@remotion/promo-pages 4.0.472 → 4.0.474
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 +1142 -184
- package/dist/design.js +11209 -10298
- package/dist/experts.js +179 -82
- package/dist/homepage/Pricing.js +7835 -6924
- package/dist/prompts/PromptsGallery.js +11118 -10207
- package/dist/prompts/PromptsShow.js +11137 -10226
- package/dist/prompts/PromptsSubmit.js +11155 -10244
- package/dist/team.js +11140 -10229
- package/dist/template-modal-content.js +11852 -10941
- package/dist/templates.js +8770 -7859
- package/package.json +13 -13
package/dist/Homepage.js
CHANGED
|
@@ -2332,7 +2332,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2332
2332
|
var addSequenceStackTraces = (component) => {
|
|
2333
2333
|
componentsToAddStacksTo.push(component);
|
|
2334
2334
|
};
|
|
2335
|
-
var VERSION = "4.0.
|
|
2335
|
+
var VERSION = "4.0.474";
|
|
2336
2336
|
var checkMultipleRemotionVersions = () => {
|
|
2337
2337
|
if (typeof globalThis === "undefined") {
|
|
2338
2338
|
return;
|
|
@@ -2371,7 +2371,8 @@ __export2(exports_timeline_position_state, {
|
|
|
2371
2371
|
useAbsoluteTimelinePosition: () => useAbsoluteTimelinePosition,
|
|
2372
2372
|
persistCurrentFrame: () => persistCurrentFrame,
|
|
2373
2373
|
getInitialFrameState: () => getInitialFrameState,
|
|
2374
|
-
getFrameForComposition: () => getFrameForComposition
|
|
2374
|
+
getFrameForComposition: () => getFrameForComposition,
|
|
2375
|
+
clampFrameToCompositionRange: () => clampFrameToCompositionRange
|
|
2375
2376
|
});
|
|
2376
2377
|
function mulberry32(a) {
|
|
2377
2378
|
let t = a + 1831565813;
|
|
@@ -2508,6 +2509,9 @@ var getFrameForComposition = (composition) => {
|
|
|
2508
2509
|
}
|
|
2509
2510
|
return window.remotion_initialFrame ?? 0;
|
|
2510
2511
|
};
|
|
2512
|
+
var clampFrameToCompositionRange = (frame, durationInFrames) => {
|
|
2513
|
+
return Math.max(0, Math.min(Math.max(0, durationInFrames - 1), frame));
|
|
2514
|
+
};
|
|
2511
2515
|
var useTimelinePositionFromContext = (state) => {
|
|
2512
2516
|
const videoConfig = useVideo();
|
|
2513
2517
|
const env = useRemotionEnvironment();
|
|
@@ -2515,7 +2519,7 @@ var useTimelinePositionFromContext = (state) => {
|
|
|
2515
2519
|
return typeof window === "undefined" ? 0 : window.remotion_initialFrame ?? 0;
|
|
2516
2520
|
}
|
|
2517
2521
|
const unclamped = state.frame[videoConfig.id] ?? (env.isPlayer ? 0 : getFrameForComposition(videoConfig.id));
|
|
2518
|
-
return
|
|
2522
|
+
return clampFrameToCompositionRange(unclamped, videoConfig.durationInFrames);
|
|
2519
2523
|
};
|
|
2520
2524
|
var useTimelineContext = () => {
|
|
2521
2525
|
const state = useContext10(TimelineContext);
|
|
@@ -2703,7 +2707,6 @@ var sequenceVisualStyleSchema = {
|
|
|
2703
2707
|
},
|
|
2704
2708
|
"style.scale": {
|
|
2705
2709
|
type: "scale",
|
|
2706
|
-
min: 0.05,
|
|
2707
2710
|
max: 100,
|
|
2708
2711
|
step: 0.01,
|
|
2709
2712
|
default: 1,
|
|
@@ -2784,6 +2787,11 @@ var sequenceSchema = {
|
|
|
2784
2787
|
}
|
|
2785
2788
|
}
|
|
2786
2789
|
};
|
|
2790
|
+
var sequenceSchemaWithoutFrom = {
|
|
2791
|
+
hidden: hiddenField,
|
|
2792
|
+
durationInFrames: durationInFramesField,
|
|
2793
|
+
layout: sequenceSchema.layout
|
|
2794
|
+
};
|
|
2787
2795
|
var sequenceSchemaDefaultLayoutNone = {
|
|
2788
2796
|
...sequenceSchema,
|
|
2789
2797
|
layout: {
|
|
@@ -2800,11 +2808,17 @@ var SequenceManager = React11.createContext({
|
|
|
2800
2808
|
},
|
|
2801
2809
|
sequences: []
|
|
2802
2810
|
});
|
|
2811
|
+
var SequenceManagerRefContext = React11.createContext({
|
|
2812
|
+
current: []
|
|
2813
|
+
});
|
|
2803
2814
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
2804
2815
|
return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
2805
2816
|
};
|
|
2806
|
-
var
|
|
2807
|
-
|
|
2817
|
+
var VisualModePropStatusesContext = React11.createContext({
|
|
2818
|
+
propStatuses: {}
|
|
2819
|
+
});
|
|
2820
|
+
var VisualModePropStatusesRefContext = React11.createContext({
|
|
2821
|
+
current: {}
|
|
2808
2822
|
});
|
|
2809
2823
|
var VisualModeDragOverridesContext = React11.createContext({
|
|
2810
2824
|
getDragOverrides: () => {
|
|
@@ -2827,18 +2841,22 @@ var VisualModeSettersContext = React11.createContext({
|
|
|
2827
2841
|
clearEffectDragOverrides: () => {
|
|
2828
2842
|
throw new Error("VisualModeSettersContext not initialized");
|
|
2829
2843
|
},
|
|
2830
|
-
|
|
2844
|
+
setPropStatuses: () => {
|
|
2831
2845
|
throw new Error("VisualModeSettersContext not initialized");
|
|
2832
2846
|
}
|
|
2833
2847
|
});
|
|
2834
2848
|
var effectDragOverridesKey = (nodePath, effectIndex) => `${makeSequencePropsSubscriptionKey(nodePath)}.effects.${effectIndex}`;
|
|
2835
2849
|
var SequenceManagerProvider = ({ children }) => {
|
|
2836
2850
|
const [sequences, setSequences] = useState3([]);
|
|
2851
|
+
const sequencesRef = useRef4(sequences);
|
|
2852
|
+
sequencesRef.current = sequences;
|
|
2837
2853
|
const [dragOverrides, setControlOverrides] = useState3({});
|
|
2838
2854
|
const controlOverridesRef = useRef4(dragOverrides);
|
|
2839
2855
|
controlOverridesRef.current = dragOverrides;
|
|
2840
2856
|
const [effectDragOverridesState, setEffectDragOverridesState] = useState3({});
|
|
2841
|
-
const [
|
|
2857
|
+
const [propStatuses, setPropStatusesMapState] = useState3({});
|
|
2858
|
+
const propStatusesRef = useRef4(propStatuses);
|
|
2859
|
+
propStatusesRef.current = propStatuses;
|
|
2842
2860
|
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
2843
2861
|
setControlOverrides((prev) => ({
|
|
2844
2862
|
...prev,
|
|
@@ -2882,8 +2900,8 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
2882
2900
|
return next;
|
|
2883
2901
|
});
|
|
2884
2902
|
}, []);
|
|
2885
|
-
const
|
|
2886
|
-
|
|
2903
|
+
const setPropStatuses = useCallback5((nodePath, values) => {
|
|
2904
|
+
setPropStatusesMapState((prev) => {
|
|
2887
2905
|
const key = makeSequencePropsSubscriptionKey(nodePath);
|
|
2888
2906
|
const prevKey = prev[key];
|
|
2889
2907
|
const newKey = values(prevKey);
|
|
@@ -2914,11 +2932,11 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
2914
2932
|
const getEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
|
|
2915
2933
|
return effectDragOverridesState[effectDragOverridesKey(nodePath, effectIndex)] ?? {};
|
|
2916
2934
|
}, [effectDragOverridesState]);
|
|
2917
|
-
const
|
|
2935
|
+
const propStatusesContext = useMemo12(() => {
|
|
2918
2936
|
return {
|
|
2919
|
-
|
|
2937
|
+
propStatuses
|
|
2920
2938
|
};
|
|
2921
|
-
}, [
|
|
2939
|
+
}, [propStatuses]);
|
|
2922
2940
|
const dragOverridesContext = useMemo12(() => {
|
|
2923
2941
|
return {
|
|
2924
2942
|
getDragOverrides,
|
|
@@ -2931,24 +2949,30 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
2931
2949
|
clearDragOverrides,
|
|
2932
2950
|
setEffectDragOverrides,
|
|
2933
2951
|
clearEffectDragOverrides,
|
|
2934
|
-
|
|
2952
|
+
setPropStatuses
|
|
2935
2953
|
};
|
|
2936
2954
|
}, [
|
|
2937
2955
|
setDragOverrides,
|
|
2938
2956
|
clearDragOverrides,
|
|
2939
2957
|
setEffectDragOverrides,
|
|
2940
2958
|
clearEffectDragOverrides,
|
|
2941
|
-
|
|
2959
|
+
setPropStatuses
|
|
2942
2960
|
]);
|
|
2943
|
-
return /* @__PURE__ */ jsx10(
|
|
2944
|
-
value:
|
|
2945
|
-
children: /* @__PURE__ */ jsx10(
|
|
2946
|
-
value:
|
|
2947
|
-
children: /* @__PURE__ */ jsx10(
|
|
2948
|
-
value:
|
|
2949
|
-
children: /* @__PURE__ */ jsx10(
|
|
2950
|
-
value:
|
|
2951
|
-
children
|
|
2961
|
+
return /* @__PURE__ */ jsx10(SequenceManagerRefContext.Provider, {
|
|
2962
|
+
value: sequencesRef,
|
|
2963
|
+
children: /* @__PURE__ */ jsx10(SequenceManager.Provider, {
|
|
2964
|
+
value: sequenceContext,
|
|
2965
|
+
children: /* @__PURE__ */ jsx10(VisualModePropStatusesRefContext.Provider, {
|
|
2966
|
+
value: propStatusesRef,
|
|
2967
|
+
children: /* @__PURE__ */ jsx10(VisualModePropStatusesContext.Provider, {
|
|
2968
|
+
value: propStatusesContext,
|
|
2969
|
+
children: /* @__PURE__ */ jsx10(VisualModeDragOverridesContext.Provider, {
|
|
2970
|
+
value: dragOverridesContext,
|
|
2971
|
+
children: /* @__PURE__ */ jsx10(VisualModeSettersContext.Provider, {
|
|
2972
|
+
value: settersContext,
|
|
2973
|
+
children
|
|
2974
|
+
})
|
|
2975
|
+
})
|
|
2952
2976
|
})
|
|
2953
2977
|
})
|
|
2954
2978
|
})
|
|
@@ -3437,6 +3461,40 @@ var interpolateString = ({
|
|
|
3437
3461
|
dimensions
|
|
3438
3462
|
});
|
|
3439
3463
|
};
|
|
3464
|
+
var validateTupleOutputRange = (outputRange) => {
|
|
3465
|
+
const dimensions = outputRange[0]?.length;
|
|
3466
|
+
if (dimensions === undefined) {
|
|
3467
|
+
throw new Error("outputRange must have at least 1 element");
|
|
3468
|
+
}
|
|
3469
|
+
if (dimensions === 0) {
|
|
3470
|
+
throw new TypeError("outputRange tuples must contain at least 1 number");
|
|
3471
|
+
}
|
|
3472
|
+
for (const output of outputRange) {
|
|
3473
|
+
if (output.length !== dimensions) {
|
|
3474
|
+
throw new TypeError(`outputRange tuples must all have the same length, but got ${dimensions} and ${output.length}`);
|
|
3475
|
+
}
|
|
3476
|
+
for (const value of output) {
|
|
3477
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
3478
|
+
throw new TypeError(`outputRange tuples must contain only finite numbers, but got [${output.join(",")}]`);
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
return dimensions;
|
|
3483
|
+
};
|
|
3484
|
+
var interpolateTuple = ({
|
|
3485
|
+
input,
|
|
3486
|
+
inputRange,
|
|
3487
|
+
outputRange,
|
|
3488
|
+
options
|
|
3489
|
+
}) => {
|
|
3490
|
+
const dimensions = validateTupleOutputRange(outputRange);
|
|
3491
|
+
return new Array(dimensions).fill(true).map((_, axis) => interpolateNumber({
|
|
3492
|
+
input,
|
|
3493
|
+
inputRange,
|
|
3494
|
+
outputRange: outputRange.map((output) => output[axis]),
|
|
3495
|
+
options
|
|
3496
|
+
}));
|
|
3497
|
+
};
|
|
3440
3498
|
function checkValidInputRange(arr) {
|
|
3441
3499
|
for (let i = 1;i < arr.length; ++i) {
|
|
3442
3500
|
if (!(arr[i] > arr[i - 1])) {
|
|
@@ -3512,8 +3570,11 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
3512
3570
|
}
|
|
3513
3571
|
return interpolateString({ input, inputRange, outputRange, options });
|
|
3514
3572
|
}
|
|
3573
|
+
if (outputRange.every((output) => Array.isArray(output))) {
|
|
3574
|
+
return interpolateTuple({ input, inputRange, outputRange, options });
|
|
3575
|
+
}
|
|
3515
3576
|
if (!outputRange.every((output) => typeof output === "number")) {
|
|
3516
|
-
throw new TypeError("outputRange must contain only numbers, or supported scale, translate, and rotate strings");
|
|
3577
|
+
throw new TypeError("outputRange must contain only numbers, numeric tuples, or supported scale, translate, and rotate strings");
|
|
3517
3578
|
}
|
|
3518
3579
|
checkInfiniteRange("outputRange", outputRange);
|
|
3519
3580
|
return interpolateNumber({ input, inputRange, outputRange, options });
|
|
@@ -4026,8 +4087,9 @@ var interpolateKeyframedStatus = ({
|
|
|
4026
4087
|
if (keyframes.length === 0) {
|
|
4027
4088
|
return null;
|
|
4028
4089
|
}
|
|
4029
|
-
const
|
|
4030
|
-
const
|
|
4090
|
+
const sortedKeyframes = [...keyframes].sort((a2, b2) => a2.frame - b2.frame);
|
|
4091
|
+
const inputRange = sortedKeyframes.map((k) => k.frame);
|
|
4092
|
+
const outputs = sortedKeyframes.map((k) => k.value);
|
|
4031
4093
|
if (interpolationFunction === "interpolateColors") {
|
|
4032
4094
|
if (!outputs.every((v) => typeof v === "string")) {
|
|
4033
4095
|
return null;
|
|
@@ -4080,7 +4142,7 @@ var resolveDragOverrideValue = ({
|
|
|
4080
4142
|
return { type: "resolved", value: interpolated };
|
|
4081
4143
|
};
|
|
4082
4144
|
var getEffectiveVisualModeValue = ({
|
|
4083
|
-
|
|
4145
|
+
propStatus,
|
|
4084
4146
|
dragOverrideValue,
|
|
4085
4147
|
defaultValue,
|
|
4086
4148
|
frame = null,
|
|
@@ -4093,16 +4155,19 @@ var getEffectiveVisualModeValue = ({
|
|
|
4093
4155
|
if (dragOverride.type === "resolved" && dragOverride.value !== undefined) {
|
|
4094
4156
|
return dragOverride.value;
|
|
4095
4157
|
}
|
|
4096
|
-
if (
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4158
|
+
if (propStatus.status === "keyframed") {
|
|
4159
|
+
if (frame !== null) {
|
|
4160
|
+
return interpolateKeyframedStatus({
|
|
4161
|
+
frame,
|
|
4162
|
+
status: propStatus
|
|
4163
|
+
});
|
|
4164
|
+
}
|
|
4165
|
+
return shouldResortToDefaultValueIfUndefined ? defaultValue : undefined;
|
|
4101
4166
|
}
|
|
4102
|
-
if (
|
|
4167
|
+
if (propStatus.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
|
|
4103
4168
|
return defaultValue;
|
|
4104
4169
|
}
|
|
4105
|
-
return
|
|
4170
|
+
return propStatus.codeValue;
|
|
4106
4171
|
};
|
|
4107
4172
|
var OverrideIdsToNodePathsGettersContext = createContext16({
|
|
4108
4173
|
overrideIdToNodePathMappings: {}
|
|
@@ -4114,18 +4179,18 @@ var OverrideIdsToNodePathsSettersContext = createContext16({
|
|
|
4114
4179
|
});
|
|
4115
4180
|
var mergeOverrides = ({
|
|
4116
4181
|
descriptor,
|
|
4117
|
-
|
|
4182
|
+
propStatusOverrides,
|
|
4118
4183
|
dragOverrides,
|
|
4119
4184
|
frame
|
|
4120
4185
|
}) => {
|
|
4121
|
-
if (!
|
|
4186
|
+
if (!propStatusOverrides && !dragOverrides) {
|
|
4122
4187
|
return { params: descriptor.params, effectKey: descriptor.effectKey };
|
|
4123
4188
|
}
|
|
4124
4189
|
const merged = {
|
|
4125
4190
|
...descriptor.params
|
|
4126
4191
|
};
|
|
4127
|
-
if (
|
|
4128
|
-
for (const [key, value] of Object.entries(
|
|
4192
|
+
if (propStatusOverrides) {
|
|
4193
|
+
for (const [key, value] of Object.entries(propStatusOverrides)) {
|
|
4129
4194
|
if (value !== undefined) {
|
|
4130
4195
|
merged[key] = value;
|
|
4131
4196
|
}
|
|
@@ -4147,16 +4212,27 @@ var mergeOverrides = ({
|
|
|
4147
4212
|
effectKey: descriptor.definition.calculateKey(merged)
|
|
4148
4213
|
};
|
|
4149
4214
|
};
|
|
4150
|
-
var
|
|
4215
|
+
var resolvePropStatusOverrides = (propStatus, frame) => {
|
|
4151
4216
|
if (!propStatus) {
|
|
4152
4217
|
return null;
|
|
4153
4218
|
}
|
|
4154
4219
|
const out = {};
|
|
4155
4220
|
let hasAny = false;
|
|
4156
4221
|
for (const [key, status] of Object.entries(propStatus)) {
|
|
4157
|
-
if (status.status
|
|
4222
|
+
if (status.status === "static") {
|
|
4158
4223
|
out[key] = status.codeValue;
|
|
4159
4224
|
hasAny = true;
|
|
4225
|
+
continue;
|
|
4226
|
+
}
|
|
4227
|
+
if (status.status === "keyframed") {
|
|
4228
|
+
const value = interpolateKeyframedStatus({
|
|
4229
|
+
frame,
|
|
4230
|
+
status
|
|
4231
|
+
});
|
|
4232
|
+
if (value !== null) {
|
|
4233
|
+
out[key] = value;
|
|
4234
|
+
hasAny = true;
|
|
4235
|
+
}
|
|
4160
4236
|
}
|
|
4161
4237
|
}
|
|
4162
4238
|
return hasAny ? out : null;
|
|
@@ -4172,12 +4248,12 @@ var useMemoizedEffectDefinitions = (effects) => {
|
|
|
4172
4248
|
previousRef.current = definitions;
|
|
4173
4249
|
return definitions;
|
|
4174
4250
|
};
|
|
4175
|
-
var
|
|
4176
|
-
|
|
4251
|
+
var getEffectPropStatusesCtx = ({
|
|
4252
|
+
propStatuses,
|
|
4177
4253
|
nodePath,
|
|
4178
4254
|
effectIndex
|
|
4179
4255
|
}) => {
|
|
4180
|
-
const status =
|
|
4256
|
+
const status = propStatuses[makeSequencePropsSubscriptionKey(nodePath)];
|
|
4181
4257
|
if (!status) {
|
|
4182
4258
|
return { type: "cannot-update-sequence", reason: "not-found" };
|
|
4183
4259
|
}
|
|
@@ -4193,8 +4269,8 @@ var getEffectCodeValuesCtx = ({
|
|
|
4193
4269
|
}
|
|
4194
4270
|
return { type: "can-update-effect", props: effect.props };
|
|
4195
4271
|
};
|
|
4196
|
-
var
|
|
4197
|
-
const status =
|
|
4272
|
+
var getPropStatusesCtx = (propStatuses, nodePath) => {
|
|
4273
|
+
const status = propStatuses[makeSequencePropsSubscriptionKey(nodePath)];
|
|
4198
4274
|
if (!status) {
|
|
4199
4275
|
return;
|
|
4200
4276
|
}
|
|
@@ -4208,7 +4284,7 @@ var useMemoizedEffects = ({
|
|
|
4208
4284
|
overrideId
|
|
4209
4285
|
}) => {
|
|
4210
4286
|
const previousRef = useRef5(null);
|
|
4211
|
-
const {
|
|
4287
|
+
const { propStatuses } = useContext15(VisualModePropStatusesContext);
|
|
4212
4288
|
const { getEffectDragOverrides } = useContext15(VisualModeDragOverridesContext);
|
|
4213
4289
|
const frame = useCurrentFrame();
|
|
4214
4290
|
const { overrideIdToNodePathMappings } = useContext15(OverrideIdsToNodePathsGettersContext);
|
|
@@ -4222,17 +4298,17 @@ var useMemoizedEffects = ({
|
|
|
4222
4298
|
effectKey: descriptor.effectKey
|
|
4223
4299
|
};
|
|
4224
4300
|
}
|
|
4225
|
-
const effectStatus =
|
|
4226
|
-
|
|
4301
|
+
const effectStatus = getEffectPropStatusesCtx({
|
|
4302
|
+
propStatuses,
|
|
4227
4303
|
nodePath,
|
|
4228
4304
|
effectIndex: index
|
|
4229
4305
|
});
|
|
4230
|
-
const
|
|
4306
|
+
const propStatusOverrides = effectStatus.type === "can-update-effect" ? resolvePropStatusOverrides(effectStatus.props, frame) : null;
|
|
4231
4307
|
const dragOverridesMap = getEffectDragOverrides(nodePath, index);
|
|
4232
4308
|
const dragOverrides = Object.keys(dragOverridesMap).length === 0 ? null : dragOverridesMap;
|
|
4233
4309
|
const { params, effectKey } = mergeOverrides({
|
|
4234
4310
|
descriptor,
|
|
4235
|
-
|
|
4311
|
+
propStatusOverrides,
|
|
4236
4312
|
dragOverrides,
|
|
4237
4313
|
frame
|
|
4238
4314
|
});
|
|
@@ -4384,15 +4460,15 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
4384
4460
|
const merged = {};
|
|
4385
4461
|
const propsToDelete = new Set;
|
|
4386
4462
|
for (const key of Object.keys(currentValue)) {
|
|
4387
|
-
const
|
|
4463
|
+
const status = propStatus?.[key] ?? null;
|
|
4388
4464
|
const field = findFieldInSchema(schema, key);
|
|
4389
4465
|
if (field?.type === "hidden") {
|
|
4390
4466
|
continue;
|
|
4391
4467
|
}
|
|
4392
4468
|
let value;
|
|
4393
|
-
if (
|
|
4469
|
+
if (status === null) {
|
|
4394
4470
|
value = currentValue[key];
|
|
4395
|
-
} else if (isKeyframedStatus(
|
|
4471
|
+
} else if (isKeyframedStatus(status)) {
|
|
4396
4472
|
if (field?.type === "array" || field?.keyframable === false) {
|
|
4397
4473
|
value = currentValue[key];
|
|
4398
4474
|
} else {
|
|
@@ -4405,18 +4481,18 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
4405
4481
|
} else if (frame !== null) {
|
|
4406
4482
|
const interpolated = interpolateKeyframedStatus({
|
|
4407
4483
|
frame,
|
|
4408
|
-
status
|
|
4484
|
+
status
|
|
4409
4485
|
});
|
|
4410
4486
|
value = interpolated ?? currentValue[key];
|
|
4411
4487
|
} else {
|
|
4412
4488
|
value = currentValue[key];
|
|
4413
4489
|
}
|
|
4414
4490
|
}
|
|
4415
|
-
} else if (
|
|
4491
|
+
} else if (status.status === "computed") {
|
|
4416
4492
|
value = currentValue[key];
|
|
4417
4493
|
} else {
|
|
4418
4494
|
value = getEffectiveVisualModeValue({
|
|
4419
|
-
|
|
4495
|
+
propStatus: status,
|
|
4420
4496
|
dragOverrideValue: overrideValues[key],
|
|
4421
4497
|
defaultValue: field?.default,
|
|
4422
4498
|
frame,
|
|
@@ -4508,7 +4584,7 @@ var wrapInSchema = ({
|
|
|
4508
4584
|
ref
|
|
4509
4585
|
});
|
|
4510
4586
|
}
|
|
4511
|
-
const {
|
|
4587
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
4512
4588
|
const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
4513
4589
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
4514
4590
|
const frame = useCurrentFrame();
|
|
@@ -4547,14 +4623,14 @@ var wrapInSchema = ({
|
|
|
4547
4623
|
schema,
|
|
4548
4624
|
currentValue: currentRuntimeValueDotNotation,
|
|
4549
4625
|
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
4550
|
-
propStatus: nodePath === null ? undefined :
|
|
4626
|
+
propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses, nodePath),
|
|
4551
4627
|
frame
|
|
4552
4628
|
});
|
|
4553
4629
|
}, [
|
|
4554
4630
|
currentRuntimeValueDotNotation,
|
|
4555
4631
|
getDragOverrides,
|
|
4556
4632
|
nodePath,
|
|
4557
|
-
|
|
4633
|
+
propStatuses,
|
|
4558
4634
|
frame
|
|
4559
4635
|
]);
|
|
4560
4636
|
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
@@ -4877,11 +4953,17 @@ var SequenceRefForwardingFunction = (props, ref) => {
|
|
|
4877
4953
|
});
|
|
4878
4954
|
};
|
|
4879
4955
|
var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
4956
|
+
var SequenceWithoutSchema = SequenceInner;
|
|
4880
4957
|
var Sequence = wrapInSchema({
|
|
4881
4958
|
Component: SequenceInner,
|
|
4882
4959
|
schema: sequenceSchema,
|
|
4883
4960
|
supportsEffects: false
|
|
4884
4961
|
});
|
|
4962
|
+
var SequenceWithoutFrom = wrapInSchema({
|
|
4963
|
+
Component: SequenceInner,
|
|
4964
|
+
schema: sequenceSchemaWithoutFrom,
|
|
4965
|
+
supportsEffects: false
|
|
4966
|
+
});
|
|
4885
4967
|
var calculateImageFit = (fit, imageSize, canvasSize) => {
|
|
4886
4968
|
switch (fit) {
|
|
4887
4969
|
case "fill": {
|
|
@@ -5786,7 +5868,7 @@ var calculateMediaDuration = ({
|
|
|
5786
5868
|
duration -= trimBefore;
|
|
5787
5869
|
}
|
|
5788
5870
|
const actualDuration = duration / playbackRate;
|
|
5789
|
-
return
|
|
5871
|
+
return Number(actualDuration.toFixed(10));
|
|
5790
5872
|
};
|
|
5791
5873
|
var LoopContext = createContext18(null);
|
|
5792
5874
|
var useLoop = () => {
|
|
@@ -10908,6 +10990,8 @@ function useRemotionContexts() {
|
|
|
10908
10990
|
const resolveCompositionContext = React38.useContext(ResolveCompositionContext);
|
|
10909
10991
|
const renderAssetManagerContext = React38.useContext(RenderAssetManager);
|
|
10910
10992
|
const sequenceManagerContext = React38.useContext(SequenceManager);
|
|
10993
|
+
const sequenceManagerRefContext = React38.useContext(SequenceManagerRefContext);
|
|
10994
|
+
const visualModePropStatusesRefContext = React38.useContext(VisualModePropStatusesRefContext);
|
|
10911
10995
|
const bufferManagerContext = React38.useContext(BufferingContextReact);
|
|
10912
10996
|
const logLevelContext = React38.useContext(LogLevelContext);
|
|
10913
10997
|
return useMemo37(() => ({
|
|
@@ -10921,6 +11005,8 @@ function useRemotionContexts() {
|
|
|
10921
11005
|
resolveCompositionContext,
|
|
10922
11006
|
renderAssetManagerContext,
|
|
10923
11007
|
sequenceManagerContext,
|
|
11008
|
+
sequenceManagerRefContext,
|
|
11009
|
+
visualModePropStatusesRefContext,
|
|
10924
11010
|
bufferManagerContext,
|
|
10925
11011
|
logLevelContext
|
|
10926
11012
|
}), [
|
|
@@ -10934,6 +11020,8 @@ function useRemotionContexts() {
|
|
|
10934
11020
|
resolveCompositionContext,
|
|
10935
11021
|
renderAssetManagerContext,
|
|
10936
11022
|
sequenceManagerContext,
|
|
11023
|
+
sequenceManagerRefContext,
|
|
11024
|
+
visualModePropStatusesRefContext,
|
|
10937
11025
|
bufferManagerContext,
|
|
10938
11026
|
logLevelContext
|
|
10939
11027
|
]);
|
|
@@ -10950,21 +11038,27 @@ var RemotionContextProvider = (props2) => {
|
|
|
10950
11038
|
value: contexts.preloadContext,
|
|
10951
11039
|
children: /* @__PURE__ */ jsx35(CompositionManager.Provider, {
|
|
10952
11040
|
value: contexts.compositionManagerCtx,
|
|
10953
|
-
children: /* @__PURE__ */ jsx35(
|
|
10954
|
-
value: contexts.
|
|
10955
|
-
children: /* @__PURE__ */ jsx35(
|
|
10956
|
-
value: contexts.
|
|
10957
|
-
children: /* @__PURE__ */ jsx35(
|
|
10958
|
-
value: contexts.
|
|
10959
|
-
children: /* @__PURE__ */ jsx35(
|
|
10960
|
-
value: contexts.
|
|
10961
|
-
children: /* @__PURE__ */ jsx35(
|
|
10962
|
-
value: contexts.
|
|
10963
|
-
children: /* @__PURE__ */ jsx35(
|
|
10964
|
-
value: contexts.
|
|
10965
|
-
children: /* @__PURE__ */ jsx35(
|
|
10966
|
-
value: contexts.
|
|
10967
|
-
children
|
|
11041
|
+
children: /* @__PURE__ */ jsx35(SequenceManagerRefContext.Provider, {
|
|
11042
|
+
value: contexts.sequenceManagerRefContext,
|
|
11043
|
+
children: /* @__PURE__ */ jsx35(SequenceManager.Provider, {
|
|
11044
|
+
value: contexts.sequenceManagerContext,
|
|
11045
|
+
children: /* @__PURE__ */ jsx35(VisualModePropStatusesRefContext.Provider, {
|
|
11046
|
+
value: contexts.visualModePropStatusesRefContext,
|
|
11047
|
+
children: /* @__PURE__ */ jsx35(RenderAssetManager.Provider, {
|
|
11048
|
+
value: contexts.renderAssetManagerContext,
|
|
11049
|
+
children: /* @__PURE__ */ jsx35(ResolveCompositionContext.Provider, {
|
|
11050
|
+
value: contexts.resolveCompositionContext,
|
|
11051
|
+
children: /* @__PURE__ */ jsx35(TimelineContext.Provider, {
|
|
11052
|
+
value: contexts.timelineContext,
|
|
11053
|
+
children: /* @__PURE__ */ jsx35(SetTimelineContext.Provider, {
|
|
11054
|
+
value: contexts.setTimelineContext,
|
|
11055
|
+
children: /* @__PURE__ */ jsx35(SequenceContext.Provider, {
|
|
11056
|
+
value: contexts.sequenceContext,
|
|
11057
|
+
children: /* @__PURE__ */ jsx35(BufferingContextReact.Provider, {
|
|
11058
|
+
value: contexts.bufferManagerContext,
|
|
11059
|
+
children
|
|
11060
|
+
})
|
|
11061
|
+
})
|
|
10968
11062
|
})
|
|
10969
11063
|
})
|
|
10970
11064
|
})
|
|
@@ -10995,13 +11089,16 @@ var Internals = {
|
|
|
10995
11089
|
VideoForPreview,
|
|
10996
11090
|
CompositionManager,
|
|
10997
11091
|
CompositionSetters,
|
|
10998
|
-
|
|
11092
|
+
VisualModePropStatusesContext,
|
|
11093
|
+
VisualModePropStatusesRefContext,
|
|
10999
11094
|
VisualModeDragOverridesContext,
|
|
11000
11095
|
VisualModeSettersContext,
|
|
11001
11096
|
SequenceManager,
|
|
11097
|
+
SequenceManagerRefContext,
|
|
11002
11098
|
SequenceStackTracesUpdateContext,
|
|
11003
11099
|
wrapInSchema,
|
|
11004
11100
|
sequenceSchema,
|
|
11101
|
+
SequenceWithoutSchema,
|
|
11005
11102
|
sequenceStyleSchema,
|
|
11006
11103
|
sequenceVisualStyleSchema,
|
|
11007
11104
|
sequencePremountSchema,
|
|
@@ -11116,8 +11213,8 @@ var Internals = {
|
|
|
11116
11213
|
OverrideIdsToNodePathsSettersContext,
|
|
11117
11214
|
findPropsToDelete,
|
|
11118
11215
|
makeSequencePropsSubscriptionKey,
|
|
11119
|
-
|
|
11120
|
-
|
|
11216
|
+
getPropStatusesCtx,
|
|
11217
|
+
getEffectPropStatusesCtx,
|
|
11121
11218
|
hiddenField,
|
|
11122
11219
|
durationInFramesField,
|
|
11123
11220
|
fromField
|
|
@@ -11163,6 +11260,7 @@ var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
|
11163
11260
|
});
|
|
11164
11261
|
};
|
|
11165
11262
|
var SeriesSequence = forwardRef13(SeriesSequenceRefForwardingFunction);
|
|
11263
|
+
var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
|
|
11166
11264
|
var SeriesInner = (props2) => {
|
|
11167
11265
|
const childrenValue = useMemo38(() => {
|
|
11168
11266
|
let startFrame = 0;
|
|
@@ -11205,13 +11303,13 @@ var SeriesInner = (props2) => {
|
|
|
11205
11303
|
}
|
|
11206
11304
|
const currentStartFrame = startFrame + offset;
|
|
11207
11305
|
startFrame += durationInFramesProp + offset;
|
|
11208
|
-
return /* @__PURE__ */ jsx36(
|
|
11306
|
+
return /* @__PURE__ */ jsx36(SequenceWithoutSchemaWithRef, {
|
|
11307
|
+
ref: castedChild.ref,
|
|
11209
11308
|
name: name || "<Series.Sequence>",
|
|
11210
11309
|
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
11211
11310
|
from: currentStartFrame,
|
|
11212
11311
|
durationInFrames: durationInFramesProp,
|
|
11213
11312
|
...passedProps,
|
|
11214
|
-
ref: castedChild.ref,
|
|
11215
11313
|
children: child
|
|
11216
11314
|
});
|
|
11217
11315
|
});
|
|
@@ -11234,7 +11332,6 @@ var Series = Object.assign(wrapInSchema({
|
|
|
11234
11332
|
Sequence: SeriesSequence
|
|
11235
11333
|
});
|
|
11236
11334
|
addSequenceStackTraces(Series);
|
|
11237
|
-
addSequenceStackTraces(SeriesSequence);
|
|
11238
11335
|
var validateSpringDuration = (dur) => {
|
|
11239
11336
|
if (typeof dur === "undefined") {
|
|
11240
11337
|
return;
|
|
@@ -12475,7 +12572,7 @@ var ExpertsPageContent = ({ Link }) => {
|
|
|
12475
12572
|
import * as React23 from "react";
|
|
12476
12573
|
import * as React8 from "react";
|
|
12477
12574
|
import { Fragment as Fragment22, jsx as jsx45 } from "react/jsx-runtime";
|
|
12478
|
-
import React52, { useCallback as useCallback25, useRef as
|
|
12575
|
+
import React52, { useCallback as useCallback25, useRef as useRef29, useState as useState22 } from "react";
|
|
12479
12576
|
|
|
12480
12577
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
12481
12578
|
function r(e) {
|
|
@@ -16583,7 +16680,7 @@ var PathInternals = {
|
|
|
16583
16680
|
};
|
|
16584
16681
|
|
|
16585
16682
|
// ../shapes/dist/esm/index.mjs
|
|
16586
|
-
import React3, { useMemo as useMemo42 } from "react";
|
|
16683
|
+
import React3, { useCallback as useCallback24, useMemo as useMemo42, useRef as useRef28 } from "react";
|
|
16587
16684
|
import { version } from "react-dom";
|
|
16588
16685
|
import { jsx as jsx43, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
16589
16686
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16595,6 +16692,141 @@ import { jsx as jsx72 } from "react/jsx-runtime";
|
|
|
16595
16692
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
16596
16693
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
16597
16694
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
16695
|
+
var unitDir = (from, to) => {
|
|
16696
|
+
const dx = to[0] - from[0];
|
|
16697
|
+
const dy = to[1] - from[1];
|
|
16698
|
+
const len = Math.sqrt(dx * dx + dy * dy);
|
|
16699
|
+
return len === 0 ? [0, 0] : [dx / len, dy / len];
|
|
16700
|
+
};
|
|
16701
|
+
var buildArrowPath = (points, roundedIndices, cornerRadius) => {
|
|
16702
|
+
const n = points.length;
|
|
16703
|
+
if (cornerRadius === 0) {
|
|
16704
|
+
return [
|
|
16705
|
+
{ type: "M", x: points[0][0], y: points[0][1] },
|
|
16706
|
+
...points.slice(1).map(([x, y]) => ({ type: "L", x, y })),
|
|
16707
|
+
{ type: "Z" }
|
|
16708
|
+
];
|
|
16709
|
+
}
|
|
16710
|
+
const d0 = unitDir(points[0], points[1]);
|
|
16711
|
+
const startX = points[0][0] + d0[0] * cornerRadius;
|
|
16712
|
+
const startY = points[0][1] + d0[1] * cornerRadius;
|
|
16713
|
+
const instrs = [{ type: "M", x: startX, y: startY }];
|
|
16714
|
+
for (let i = 1;i < n; i++) {
|
|
16715
|
+
const curr = points[i];
|
|
16716
|
+
if (roundedIndices.has(i)) {
|
|
16717
|
+
const prev = points[i - 1];
|
|
16718
|
+
const next = points[(i + 1) % n];
|
|
16719
|
+
const dIn = unitDir(prev, curr);
|
|
16720
|
+
const dOut = unitDir(curr, next);
|
|
16721
|
+
instrs.push({
|
|
16722
|
+
type: "L",
|
|
16723
|
+
x: curr[0] - dIn[0] * cornerRadius,
|
|
16724
|
+
y: curr[1] - dIn[1] * cornerRadius
|
|
16725
|
+
}, {
|
|
16726
|
+
type: "C",
|
|
16727
|
+
cp1x: curr[0],
|
|
16728
|
+
cp1y: curr[1],
|
|
16729
|
+
cp2x: curr[0],
|
|
16730
|
+
cp2y: curr[1],
|
|
16731
|
+
x: curr[0] + dOut[0] * cornerRadius,
|
|
16732
|
+
y: curr[1] + dOut[1] * cornerRadius
|
|
16733
|
+
});
|
|
16734
|
+
} else {
|
|
16735
|
+
instrs.push({ type: "L", x: curr[0], y: curr[1] });
|
|
16736
|
+
}
|
|
16737
|
+
}
|
|
16738
|
+
const dIn0 = unitDir(points[n - 1], points[0]);
|
|
16739
|
+
instrs.push({
|
|
16740
|
+
type: "L",
|
|
16741
|
+
x: points[0][0] - dIn0[0] * cornerRadius,
|
|
16742
|
+
y: points[0][1] - dIn0[1] * cornerRadius
|
|
16743
|
+
}, {
|
|
16744
|
+
type: "C",
|
|
16745
|
+
cp1x: points[0][0],
|
|
16746
|
+
cp1y: points[0][1],
|
|
16747
|
+
cp2x: points[0][0],
|
|
16748
|
+
cp2y: points[0][1],
|
|
16749
|
+
x: startX,
|
|
16750
|
+
y: startY
|
|
16751
|
+
}, { type: "Z" });
|
|
16752
|
+
return instrs;
|
|
16753
|
+
};
|
|
16754
|
+
var makeArrow = ({
|
|
16755
|
+
length: length2 = 300,
|
|
16756
|
+
headWidth = 185,
|
|
16757
|
+
headLength = 120,
|
|
16758
|
+
shaftWidth = 80,
|
|
16759
|
+
direction = "right",
|
|
16760
|
+
cornerRadius = 0
|
|
16761
|
+
}) => {
|
|
16762
|
+
if (length2 <= 0 || headWidth <= 0 || headLength <= 0 || shaftWidth <= 0) {
|
|
16763
|
+
throw new Error('All dimension parameters ("length", "headWidth", "headLength", "shaftWidth") must be positive numbers');
|
|
16764
|
+
}
|
|
16765
|
+
if (headWidth < shaftWidth) {
|
|
16766
|
+
throw new Error(`"headWidth" must be greater than or equal to "shaftWidth", got headWidth=${headWidth} and shaftWidth=${shaftWidth}`);
|
|
16767
|
+
}
|
|
16768
|
+
if (headLength > length2) {
|
|
16769
|
+
throw new Error(`"headLength" must be less than or equal to "length", got headLength=${headLength} and length=${length2}`);
|
|
16770
|
+
}
|
|
16771
|
+
const shaftTop = (headWidth - shaftWidth) / 2;
|
|
16772
|
+
const shaftBottom = shaftTop + shaftWidth;
|
|
16773
|
+
const shaftEnd = length2 - headLength;
|
|
16774
|
+
const rightPoints = [
|
|
16775
|
+
[0, shaftTop],
|
|
16776
|
+
[shaftEnd, shaftTop],
|
|
16777
|
+
[shaftEnd, 0],
|
|
16778
|
+
[length2, headWidth / 2],
|
|
16779
|
+
[shaftEnd, headWidth],
|
|
16780
|
+
[shaftEnd, shaftBottom],
|
|
16781
|
+
[0, shaftBottom]
|
|
16782
|
+
];
|
|
16783
|
+
let points;
|
|
16784
|
+
let width;
|
|
16785
|
+
let height;
|
|
16786
|
+
if (direction === "right") {
|
|
16787
|
+
points = rightPoints;
|
|
16788
|
+
width = length2;
|
|
16789
|
+
height = headWidth;
|
|
16790
|
+
} else if (direction === "left") {
|
|
16791
|
+
points = rightPoints.map(([x, y]) => [length2 - x, y]);
|
|
16792
|
+
width = length2;
|
|
16793
|
+
height = headWidth;
|
|
16794
|
+
} else if (direction === "down") {
|
|
16795
|
+
points = [
|
|
16796
|
+
[shaftTop, 0],
|
|
16797
|
+
[shaftBottom, 0],
|
|
16798
|
+
[shaftBottom, shaftEnd],
|
|
16799
|
+
[headWidth, shaftEnd],
|
|
16800
|
+
[headWidth / 2, length2],
|
|
16801
|
+
[0, shaftEnd],
|
|
16802
|
+
[shaftTop, shaftEnd]
|
|
16803
|
+
];
|
|
16804
|
+
width = headWidth;
|
|
16805
|
+
height = length2;
|
|
16806
|
+
} else {
|
|
16807
|
+
points = [
|
|
16808
|
+
[shaftTop, length2],
|
|
16809
|
+
[shaftBottom, length2],
|
|
16810
|
+
[shaftBottom, headLength],
|
|
16811
|
+
[headWidth, headLength],
|
|
16812
|
+
[headWidth / 2, 0],
|
|
16813
|
+
[0, headLength],
|
|
16814
|
+
[shaftTop, headLength]
|
|
16815
|
+
];
|
|
16816
|
+
width = headWidth;
|
|
16817
|
+
height = length2;
|
|
16818
|
+
}
|
|
16819
|
+
const roundedIndices = direction === "right" || direction === "left" ? new Set([0, 2, 3, 4, 6]) : new Set([0, 1, 3, 4, 5]);
|
|
16820
|
+
const instructions = buildArrowPath(points, roundedIndices, cornerRadius);
|
|
16821
|
+
const path = serializeInstructions(instructions);
|
|
16822
|
+
return {
|
|
16823
|
+
path,
|
|
16824
|
+
instructions,
|
|
16825
|
+
width,
|
|
16826
|
+
height,
|
|
16827
|
+
transformOrigin: `${width / 2} ${height / 2}`
|
|
16828
|
+
};
|
|
16829
|
+
};
|
|
16598
16830
|
var doesReactSupportTransformOriginProperty = (version2) => {
|
|
16599
16831
|
if (version2.includes("canary") || version2.includes("experimental")) {
|
|
16600
16832
|
const last8Chars = parseInt(version2.slice(-8), 10);
|
|
@@ -16604,6 +16836,8 @@ var doesReactSupportTransformOriginProperty = (version2) => {
|
|
|
16604
16836
|
return major > 18;
|
|
16605
16837
|
};
|
|
16606
16838
|
var RenderSvg = ({
|
|
16839
|
+
defaultName,
|
|
16840
|
+
documentationLink,
|
|
16607
16841
|
width,
|
|
16608
16842
|
height,
|
|
16609
16843
|
path,
|
|
@@ -16611,7 +16845,16 @@ var RenderSvg = ({
|
|
|
16611
16845
|
pathStyle,
|
|
16612
16846
|
transformOrigin,
|
|
16613
16847
|
debug,
|
|
16848
|
+
effects = [],
|
|
16614
16849
|
instructions,
|
|
16850
|
+
pixelDensity,
|
|
16851
|
+
durationInFrames,
|
|
16852
|
+
from,
|
|
16853
|
+
hidden,
|
|
16854
|
+
name,
|
|
16855
|
+
showInTimeline,
|
|
16856
|
+
_experimentalControls: controls,
|
|
16857
|
+
stack,
|
|
16615
16858
|
...props
|
|
16616
16859
|
}) => {
|
|
16617
16860
|
const actualStyle = useMemo42(() => {
|
|
@@ -16626,13 +16869,23 @@ var RenderSvg = ({
|
|
|
16626
16869
|
...pathStyle ?? {}
|
|
16627
16870
|
};
|
|
16628
16871
|
}, [pathStyle]);
|
|
16872
|
+
const outlineRef = useRef28(null);
|
|
16873
|
+
const setSvgRef = useCallback24((node) => {
|
|
16874
|
+
outlineRef.current = node;
|
|
16875
|
+
}, []);
|
|
16876
|
+
const setCanvasRef = useCallback24((canvas) => {
|
|
16877
|
+
outlineRef.current = canvas;
|
|
16878
|
+
}, []);
|
|
16879
|
+
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
|
|
16880
|
+
const videoConfig = Internals.useUnsafeVideoConfig();
|
|
16629
16881
|
const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
|
|
16630
|
-
|
|
16882
|
+
const svg = /* @__PURE__ */ jsxs5("svg", {
|
|
16883
|
+
ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
|
|
16631
16884
|
width,
|
|
16632
16885
|
height,
|
|
16633
16886
|
viewBox: `0 0 ${width} ${height}`,
|
|
16634
16887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16635
|
-
style: actualStyle,
|
|
16888
|
+
style: effects.length === 0 || !videoConfig ? actualStyle : { overflow: "visible" },
|
|
16636
16889
|
children: [
|
|
16637
16890
|
/* @__PURE__ */ jsx43("path", {
|
|
16638
16891
|
...reactSupportsTransformOrigin ? {
|
|
@@ -16687,7 +16940,160 @@ var RenderSvg = ({
|
|
|
16687
16940
|
}) : null
|
|
16688
16941
|
]
|
|
16689
16942
|
});
|
|
16943
|
+
const content = effects.length === 0 ? svg : /* @__PURE__ */ jsx43(HtmlInCanvas, {
|
|
16944
|
+
ref: setCanvasRef,
|
|
16945
|
+
width: Math.ceil(width),
|
|
16946
|
+
height: Math.ceil(height),
|
|
16947
|
+
effects,
|
|
16948
|
+
pixelDensity,
|
|
16949
|
+
showInTimeline: false,
|
|
16950
|
+
style: actualStyle,
|
|
16951
|
+
_experimentalControls: controls,
|
|
16952
|
+
children: svg
|
|
16953
|
+
});
|
|
16954
|
+
const stackProps = stack === undefined ? null : { stack };
|
|
16955
|
+
if (!videoConfig) {
|
|
16956
|
+
return svg;
|
|
16957
|
+
}
|
|
16958
|
+
return /* @__PURE__ */ jsx43(Sequence, {
|
|
16959
|
+
layout: "none",
|
|
16960
|
+
from,
|
|
16961
|
+
hidden,
|
|
16962
|
+
showInTimeline,
|
|
16963
|
+
_experimentalControls: controls,
|
|
16964
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
16965
|
+
durationInFrames,
|
|
16966
|
+
name: name ?? defaultName,
|
|
16967
|
+
_remotionInternalRefForOutline: outlineRef,
|
|
16968
|
+
_remotionInternalDocumentationLink: name === undefined ? documentationLink : undefined,
|
|
16969
|
+
...stackProps,
|
|
16970
|
+
children: content
|
|
16971
|
+
});
|
|
16972
|
+
};
|
|
16973
|
+
var numberField = ({
|
|
16974
|
+
defaultValue,
|
|
16975
|
+
description,
|
|
16976
|
+
hiddenFromList = false,
|
|
16977
|
+
max,
|
|
16978
|
+
min,
|
|
16979
|
+
step = 1
|
|
16980
|
+
}) => {
|
|
16981
|
+
return {
|
|
16982
|
+
type: "number",
|
|
16983
|
+
default: defaultValue,
|
|
16984
|
+
description,
|
|
16985
|
+
hiddenFromList,
|
|
16986
|
+
max,
|
|
16987
|
+
min,
|
|
16988
|
+
step
|
|
16989
|
+
};
|
|
16990
|
+
};
|
|
16991
|
+
var booleanField = ({
|
|
16992
|
+
defaultValue,
|
|
16993
|
+
description
|
|
16994
|
+
}) => {
|
|
16995
|
+
return {
|
|
16996
|
+
type: "boolean",
|
|
16997
|
+
default: defaultValue,
|
|
16998
|
+
description
|
|
16999
|
+
};
|
|
17000
|
+
};
|
|
17001
|
+
var colorField = ({
|
|
17002
|
+
defaultValue,
|
|
17003
|
+
description
|
|
17004
|
+
}) => {
|
|
17005
|
+
return {
|
|
17006
|
+
type: "color",
|
|
17007
|
+
default: defaultValue,
|
|
17008
|
+
description
|
|
17009
|
+
};
|
|
17010
|
+
};
|
|
17011
|
+
var enumField = ({
|
|
17012
|
+
defaultValue,
|
|
17013
|
+
description,
|
|
17014
|
+
variants
|
|
17015
|
+
}) => {
|
|
17016
|
+
return {
|
|
17017
|
+
type: "enum",
|
|
17018
|
+
default: defaultValue,
|
|
17019
|
+
description,
|
|
17020
|
+
variants: Object.fromEntries(variants.map((variant) => [variant, {}]))
|
|
17021
|
+
};
|
|
17022
|
+
};
|
|
17023
|
+
var makeShapeSchema = (shapeFields) => {
|
|
17024
|
+
return {
|
|
17025
|
+
from: Internals.sequenceSchema.from,
|
|
17026
|
+
durationInFrames: Internals.sequenceSchema.durationInFrames,
|
|
17027
|
+
...shapeFields,
|
|
17028
|
+
fill: colorField({
|
|
17029
|
+
defaultValue: "#0b84ff",
|
|
17030
|
+
description: "Fill"
|
|
17031
|
+
}),
|
|
17032
|
+
...Internals.sequenceVisualStyleSchema,
|
|
17033
|
+
hidden: Internals.sequenceSchema.hidden
|
|
17034
|
+
};
|
|
17035
|
+
};
|
|
17036
|
+
var arrowSchema = makeShapeSchema({
|
|
17037
|
+
length: numberField({
|
|
17038
|
+
defaultValue: 300,
|
|
17039
|
+
description: "Length",
|
|
17040
|
+
min: 0
|
|
17041
|
+
}),
|
|
17042
|
+
headWidth: numberField({
|
|
17043
|
+
defaultValue: 185,
|
|
17044
|
+
description: "Head Width",
|
|
17045
|
+
min: 0
|
|
17046
|
+
}),
|
|
17047
|
+
headLength: numberField({
|
|
17048
|
+
defaultValue: 120,
|
|
17049
|
+
description: "Head Length",
|
|
17050
|
+
min: 0
|
|
17051
|
+
}),
|
|
17052
|
+
shaftWidth: numberField({
|
|
17053
|
+
defaultValue: 80,
|
|
17054
|
+
description: "Shaft Width",
|
|
17055
|
+
min: 0
|
|
17056
|
+
}),
|
|
17057
|
+
direction: enumField({
|
|
17058
|
+
defaultValue: "right",
|
|
17059
|
+
description: "Direction",
|
|
17060
|
+
variants: ["right", "left", "up", "down"]
|
|
17061
|
+
}),
|
|
17062
|
+
cornerRadius: numberField({
|
|
17063
|
+
defaultValue: 0,
|
|
17064
|
+
description: "Corner Radius",
|
|
17065
|
+
min: 0
|
|
17066
|
+
})
|
|
17067
|
+
});
|
|
17068
|
+
var ArrowInner = ({
|
|
17069
|
+
length: length2,
|
|
17070
|
+
headWidth,
|
|
17071
|
+
headLength,
|
|
17072
|
+
shaftWidth,
|
|
17073
|
+
direction,
|
|
17074
|
+
cornerRadius,
|
|
17075
|
+
...props
|
|
17076
|
+
}) => {
|
|
17077
|
+
return /* @__PURE__ */ jsx210(RenderSvg, {
|
|
17078
|
+
defaultName: "<Arrow>",
|
|
17079
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/arrow",
|
|
17080
|
+
...makeArrow({
|
|
17081
|
+
length: length2,
|
|
17082
|
+
headWidth,
|
|
17083
|
+
headLength,
|
|
17084
|
+
shaftWidth,
|
|
17085
|
+
direction,
|
|
17086
|
+
cornerRadius
|
|
17087
|
+
}),
|
|
17088
|
+
...props
|
|
17089
|
+
});
|
|
16690
17090
|
};
|
|
17091
|
+
var Arrow = Internals.wrapInSchema({
|
|
17092
|
+
Component: ArrowInner,
|
|
17093
|
+
schema: arrowSchema,
|
|
17094
|
+
supportsEffects: true
|
|
17095
|
+
});
|
|
17096
|
+
Internals.addSequenceStackTraces(Arrow);
|
|
16691
17097
|
var makeCircle = ({ radius }) => {
|
|
16692
17098
|
const instructions = [
|
|
16693
17099
|
{
|
|
@@ -16728,6 +17134,83 @@ var makeCircle = ({ radius }) => {
|
|
|
16728
17134
|
transformOrigin: `${radius} ${radius}`
|
|
16729
17135
|
};
|
|
16730
17136
|
};
|
|
17137
|
+
var circleSchema = makeShapeSchema({
|
|
17138
|
+
radius: numberField({
|
|
17139
|
+
defaultValue: 100,
|
|
17140
|
+
description: "Radius",
|
|
17141
|
+
min: 0
|
|
17142
|
+
})
|
|
17143
|
+
});
|
|
17144
|
+
var CircleInner = ({ radius, ...props }) => {
|
|
17145
|
+
return /* @__PURE__ */ jsx310(RenderSvg, {
|
|
17146
|
+
defaultName: "<Circle>",
|
|
17147
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/circle",
|
|
17148
|
+
...makeCircle({ radius }),
|
|
17149
|
+
...props
|
|
17150
|
+
});
|
|
17151
|
+
};
|
|
17152
|
+
var Circle = Internals.wrapInSchema({
|
|
17153
|
+
Component: CircleInner,
|
|
17154
|
+
schema: circleSchema,
|
|
17155
|
+
supportsEffects: true
|
|
17156
|
+
});
|
|
17157
|
+
Internals.addSequenceStackTraces(Circle);
|
|
17158
|
+
var makeEllipse = ({ rx, ry }) => {
|
|
17159
|
+
const instructions = [
|
|
17160
|
+
{
|
|
17161
|
+
type: "M",
|
|
17162
|
+
x: rx,
|
|
17163
|
+
y: 0
|
|
17164
|
+
},
|
|
17165
|
+
{
|
|
17166
|
+
type: "a",
|
|
17167
|
+
rx,
|
|
17168
|
+
ry,
|
|
17169
|
+
xAxisRotation: 0,
|
|
17170
|
+
largeArcFlag: true,
|
|
17171
|
+
sweepFlag: false,
|
|
17172
|
+
dx: 1,
|
|
17173
|
+
dy: 0
|
|
17174
|
+
},
|
|
17175
|
+
{
|
|
17176
|
+
type: "Z"
|
|
17177
|
+
}
|
|
17178
|
+
];
|
|
17179
|
+
const path = serializeInstructions(instructions);
|
|
17180
|
+
return {
|
|
17181
|
+
width: rx * 2,
|
|
17182
|
+
height: ry * 2,
|
|
17183
|
+
path,
|
|
17184
|
+
instructions,
|
|
17185
|
+
transformOrigin: `${rx} ${ry}`
|
|
17186
|
+
};
|
|
17187
|
+
};
|
|
17188
|
+
var ellipseSchema = makeShapeSchema({
|
|
17189
|
+
rx: numberField({
|
|
17190
|
+
defaultValue: 100,
|
|
17191
|
+
description: "X Radius",
|
|
17192
|
+
min: 0
|
|
17193
|
+
}),
|
|
17194
|
+
ry: numberField({
|
|
17195
|
+
defaultValue: 50,
|
|
17196
|
+
description: "Y Radius",
|
|
17197
|
+
min: 0
|
|
17198
|
+
})
|
|
17199
|
+
});
|
|
17200
|
+
var EllipseInner = ({ rx, ry, ...props }) => {
|
|
17201
|
+
return /* @__PURE__ */ jsx44(RenderSvg, {
|
|
17202
|
+
defaultName: "<Ellipse>",
|
|
17203
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/ellipse",
|
|
17204
|
+
...makeEllipse({ rx, ry }),
|
|
17205
|
+
...props
|
|
17206
|
+
});
|
|
17207
|
+
};
|
|
17208
|
+
var Ellipse = Internals.wrapInSchema({
|
|
17209
|
+
Component: EllipseInner,
|
|
17210
|
+
schema: ellipseSchema,
|
|
17211
|
+
supportsEffects: true
|
|
17212
|
+
});
|
|
17213
|
+
Internals.addSequenceStackTraces(Ellipse);
|
|
16731
17214
|
var makeHeart = ({
|
|
16732
17215
|
height,
|
|
16733
17216
|
aspectRatio = 1.1,
|
|
@@ -16817,7 +17300,30 @@ var makeHeart = ({
|
|
|
16817
17300
|
instructions
|
|
16818
17301
|
};
|
|
16819
17302
|
};
|
|
16820
|
-
var
|
|
17303
|
+
var heartSchema = makeShapeSchema({
|
|
17304
|
+
height: numberField({
|
|
17305
|
+
defaultValue: 100,
|
|
17306
|
+
description: "Height",
|
|
17307
|
+
min: 0
|
|
17308
|
+
}),
|
|
17309
|
+
aspectRatio: numberField({
|
|
17310
|
+
defaultValue: 1.1,
|
|
17311
|
+
description: "Aspect Ratio",
|
|
17312
|
+
min: 0,
|
|
17313
|
+
step: 0.01
|
|
17314
|
+
}),
|
|
17315
|
+
bottomRoundnessAdjustment: numberField({
|
|
17316
|
+
defaultValue: 0,
|
|
17317
|
+
description: "Bottom Roundness Adjustment",
|
|
17318
|
+
step: 0.01
|
|
17319
|
+
}),
|
|
17320
|
+
depthAdjustment: numberField({
|
|
17321
|
+
defaultValue: 0,
|
|
17322
|
+
description: "Depth Adjustment",
|
|
17323
|
+
step: 0.01
|
|
17324
|
+
})
|
|
17325
|
+
});
|
|
17326
|
+
var HeartInner = ({
|
|
16821
17327
|
aspectRatio,
|
|
16822
17328
|
height,
|
|
16823
17329
|
bottomRoundnessAdjustment = 0,
|
|
@@ -16825,6 +17331,8 @@ var Heart = ({
|
|
|
16825
17331
|
...props
|
|
16826
17332
|
}) => {
|
|
16827
17333
|
return /* @__PURE__ */ jsx52(RenderSvg, {
|
|
17334
|
+
defaultName: "<Heart>",
|
|
17335
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/heart",
|
|
16828
17336
|
...makeHeart({
|
|
16829
17337
|
aspectRatio,
|
|
16830
17338
|
height,
|
|
@@ -16834,6 +17342,12 @@ var Heart = ({
|
|
|
16834
17342
|
...props
|
|
16835
17343
|
});
|
|
16836
17344
|
};
|
|
17345
|
+
var Heart = Internals.wrapInSchema({
|
|
17346
|
+
Component: HeartInner,
|
|
17347
|
+
schema: heartSchema,
|
|
17348
|
+
supportsEffects: true
|
|
17349
|
+
});
|
|
17350
|
+
Internals.addSequenceStackTraces(Heart);
|
|
16837
17351
|
var getCoord = ({
|
|
16838
17352
|
counterClockwise,
|
|
16839
17353
|
actualProgress,
|
|
@@ -16939,6 +17453,54 @@ var makePie = ({
|
|
|
16939
17453
|
transformOrigin: `${radius} ${radius}`
|
|
16940
17454
|
};
|
|
16941
17455
|
};
|
|
17456
|
+
var pieSchema = makeShapeSchema({
|
|
17457
|
+
radius: numberField({
|
|
17458
|
+
defaultValue: 100,
|
|
17459
|
+
description: "Radius",
|
|
17460
|
+
min: 0
|
|
17461
|
+
}),
|
|
17462
|
+
progress: numberField({
|
|
17463
|
+
defaultValue: 0.5,
|
|
17464
|
+
description: "Progress",
|
|
17465
|
+
max: 1,
|
|
17466
|
+
min: 0,
|
|
17467
|
+
step: 0.01
|
|
17468
|
+
}),
|
|
17469
|
+
closePath: booleanField({
|
|
17470
|
+
defaultValue: true,
|
|
17471
|
+
description: "Close Path"
|
|
17472
|
+
}),
|
|
17473
|
+
counterClockwise: booleanField({
|
|
17474
|
+
defaultValue: false,
|
|
17475
|
+
description: "Counter Clockwise"
|
|
17476
|
+
}),
|
|
17477
|
+
rotation: numberField({
|
|
17478
|
+
defaultValue: 0,
|
|
17479
|
+
description: "Rotation",
|
|
17480
|
+
step: 0.01
|
|
17481
|
+
})
|
|
17482
|
+
});
|
|
17483
|
+
var PieInner = ({
|
|
17484
|
+
radius,
|
|
17485
|
+
progress,
|
|
17486
|
+
closePath,
|
|
17487
|
+
counterClockwise,
|
|
17488
|
+
rotation,
|
|
17489
|
+
...props
|
|
17490
|
+
}) => {
|
|
17491
|
+
return /* @__PURE__ */ jsx62(RenderSvg, {
|
|
17492
|
+
defaultName: "<Pie>",
|
|
17493
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/pie",
|
|
17494
|
+
...makePie({ radius, progress, closePath, counterClockwise, rotation }),
|
|
17495
|
+
...props
|
|
17496
|
+
});
|
|
17497
|
+
};
|
|
17498
|
+
var Pie = Internals.wrapInSchema({
|
|
17499
|
+
Component: PieInner,
|
|
17500
|
+
schema: pieSchema,
|
|
17501
|
+
supportsEffects: true
|
|
17502
|
+
});
|
|
17503
|
+
Internals.addSequenceStackTraces(Pie);
|
|
16942
17504
|
var shortenVector = (vector, radius) => {
|
|
16943
17505
|
const [x, y] = vector;
|
|
16944
17506
|
const currentLength = Math.sqrt(x * x + y * y);
|
|
@@ -17063,6 +17625,104 @@ var joinPoints = (points, {
|
|
|
17063
17625
|
];
|
|
17064
17626
|
}).flat(1);
|
|
17065
17627
|
};
|
|
17628
|
+
function polygon({
|
|
17629
|
+
points,
|
|
17630
|
+
radius,
|
|
17631
|
+
centerX,
|
|
17632
|
+
centerY,
|
|
17633
|
+
cornerRadius,
|
|
17634
|
+
edgeRoundness
|
|
17635
|
+
}) {
|
|
17636
|
+
const degreeIncrement = Math.PI * 2 / points;
|
|
17637
|
+
const d = new Array(points).fill(0).map((_, i) => {
|
|
17638
|
+
const angle = degreeIncrement * i - Math.PI / 2;
|
|
17639
|
+
const point = {
|
|
17640
|
+
x: centerX + radius * Math.cos(angle),
|
|
17641
|
+
y: centerY + radius * Math.sin(angle)
|
|
17642
|
+
};
|
|
17643
|
+
return [point.x, point.y];
|
|
17644
|
+
});
|
|
17645
|
+
return joinPoints([...d, d[0]], {
|
|
17646
|
+
edgeRoundness,
|
|
17647
|
+
cornerRadius,
|
|
17648
|
+
roundCornerStrategy: cornerRadius > 0 ? "bezier" : "arc"
|
|
17649
|
+
});
|
|
17650
|
+
}
|
|
17651
|
+
var makePolygon = ({
|
|
17652
|
+
points,
|
|
17653
|
+
radius,
|
|
17654
|
+
cornerRadius = 0,
|
|
17655
|
+
edgeRoundness = null
|
|
17656
|
+
}) => {
|
|
17657
|
+
if (points < 3) {
|
|
17658
|
+
throw new Error(`"points" should be minimum 3, got ${points}`);
|
|
17659
|
+
}
|
|
17660
|
+
const width = 2 * radius;
|
|
17661
|
+
const height = 2 * radius;
|
|
17662
|
+
const centerX = width / 2;
|
|
17663
|
+
const centerY = height / 2;
|
|
17664
|
+
const polygonPathInstructions = polygon({
|
|
17665
|
+
points,
|
|
17666
|
+
radius,
|
|
17667
|
+
centerX,
|
|
17668
|
+
centerY,
|
|
17669
|
+
cornerRadius,
|
|
17670
|
+
edgeRoundness
|
|
17671
|
+
});
|
|
17672
|
+
const reduced = reduceInstructions(polygonPathInstructions);
|
|
17673
|
+
const path = resetPath(serializeInstructions(reduced));
|
|
17674
|
+
const boundingBox = PathInternals.getBoundingBoxFromInstructions(reduced);
|
|
17675
|
+
return {
|
|
17676
|
+
path,
|
|
17677
|
+
width: boundingBox.width,
|
|
17678
|
+
height: boundingBox.height,
|
|
17679
|
+
transformOrigin: `${centerX} ${centerY}`,
|
|
17680
|
+
instructions: polygonPathInstructions
|
|
17681
|
+
};
|
|
17682
|
+
};
|
|
17683
|
+
var polygonSchema = makeShapeSchema({
|
|
17684
|
+
points: numberField({
|
|
17685
|
+
defaultValue: 5,
|
|
17686
|
+
description: "Points",
|
|
17687
|
+
min: 3,
|
|
17688
|
+
step: 1
|
|
17689
|
+
}),
|
|
17690
|
+
radius: numberField({
|
|
17691
|
+
defaultValue: 100,
|
|
17692
|
+
description: "Radius",
|
|
17693
|
+
min: 0
|
|
17694
|
+
}),
|
|
17695
|
+
cornerRadius: numberField({
|
|
17696
|
+
defaultValue: 0,
|
|
17697
|
+
description: "Corner Radius",
|
|
17698
|
+
min: 0
|
|
17699
|
+
})
|
|
17700
|
+
});
|
|
17701
|
+
var PolygonInner = ({
|
|
17702
|
+
points,
|
|
17703
|
+
radius,
|
|
17704
|
+
cornerRadius,
|
|
17705
|
+
edgeRoundness,
|
|
17706
|
+
...props
|
|
17707
|
+
}) => {
|
|
17708
|
+
return /* @__PURE__ */ jsx72(RenderSvg, {
|
|
17709
|
+
defaultName: "<Polygon>",
|
|
17710
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/polygon",
|
|
17711
|
+
...makePolygon({
|
|
17712
|
+
points,
|
|
17713
|
+
cornerRadius,
|
|
17714
|
+
edgeRoundness,
|
|
17715
|
+
radius
|
|
17716
|
+
}),
|
|
17717
|
+
...props
|
|
17718
|
+
});
|
|
17719
|
+
};
|
|
17720
|
+
var Polygon = Internals.wrapInSchema({
|
|
17721
|
+
Component: PolygonInner,
|
|
17722
|
+
schema: polygonSchema,
|
|
17723
|
+
supportsEffects: true
|
|
17724
|
+
});
|
|
17725
|
+
Internals.addSequenceStackTraces(Polygon);
|
|
17066
17726
|
var makeRect = ({
|
|
17067
17727
|
width,
|
|
17068
17728
|
height,
|
|
@@ -17091,6 +17751,257 @@ var makeRect = ({
|
|
|
17091
17751
|
transformOrigin: transformOrigin.join(" ")
|
|
17092
17752
|
};
|
|
17093
17753
|
};
|
|
17754
|
+
var rectSchema = makeShapeSchema({
|
|
17755
|
+
width: numberField({
|
|
17756
|
+
defaultValue: 100,
|
|
17757
|
+
description: "Width",
|
|
17758
|
+
min: 0
|
|
17759
|
+
}),
|
|
17760
|
+
height: numberField({
|
|
17761
|
+
defaultValue: 100,
|
|
17762
|
+
description: "Height",
|
|
17763
|
+
min: 0
|
|
17764
|
+
}),
|
|
17765
|
+
cornerRadius: numberField({
|
|
17766
|
+
defaultValue: 0,
|
|
17767
|
+
description: "Corner Radius",
|
|
17768
|
+
min: 0
|
|
17769
|
+
})
|
|
17770
|
+
});
|
|
17771
|
+
var RectInner = ({
|
|
17772
|
+
width,
|
|
17773
|
+
edgeRoundness,
|
|
17774
|
+
height,
|
|
17775
|
+
cornerRadius,
|
|
17776
|
+
...props
|
|
17777
|
+
}) => {
|
|
17778
|
+
return /* @__PURE__ */ jsx82(RenderSvg, {
|
|
17779
|
+
defaultName: "<Rect>",
|
|
17780
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/rect",
|
|
17781
|
+
...makeRect({ height, width, edgeRoundness, cornerRadius }),
|
|
17782
|
+
...props
|
|
17783
|
+
});
|
|
17784
|
+
};
|
|
17785
|
+
var Rect = Internals.wrapInSchema({
|
|
17786
|
+
Component: RectInner,
|
|
17787
|
+
schema: rectSchema,
|
|
17788
|
+
supportsEffects: true
|
|
17789
|
+
});
|
|
17790
|
+
Internals.addSequenceStackTraces(Rect);
|
|
17791
|
+
var star = ({
|
|
17792
|
+
centerX,
|
|
17793
|
+
centerY,
|
|
17794
|
+
points,
|
|
17795
|
+
innerRadius,
|
|
17796
|
+
outerRadius,
|
|
17797
|
+
cornerRadius,
|
|
17798
|
+
edgeRoundness
|
|
17799
|
+
}) => {
|
|
17800
|
+
const degreeIncrement = Math.PI * 2 / (points * 2);
|
|
17801
|
+
const d = new Array(points * 2).fill(true).map((_p, i) => {
|
|
17802
|
+
const radius = i % 2 === 0 ? outerRadius : innerRadius;
|
|
17803
|
+
const angle = degreeIncrement * i - Math.PI / 2;
|
|
17804
|
+
const point = {
|
|
17805
|
+
x: centerX + radius * Math.cos(angle),
|
|
17806
|
+
y: centerY + radius * Math.sin(angle)
|
|
17807
|
+
};
|
|
17808
|
+
return [point.x, point.y];
|
|
17809
|
+
});
|
|
17810
|
+
return [
|
|
17811
|
+
...joinPoints([...d, d[0]], {
|
|
17812
|
+
edgeRoundness,
|
|
17813
|
+
cornerRadius,
|
|
17814
|
+
roundCornerStrategy: cornerRadius > 0 ? "bezier" : "arc"
|
|
17815
|
+
}),
|
|
17816
|
+
{ type: "Z" }
|
|
17817
|
+
];
|
|
17818
|
+
};
|
|
17819
|
+
var makeStar = ({
|
|
17820
|
+
points,
|
|
17821
|
+
innerRadius,
|
|
17822
|
+
outerRadius,
|
|
17823
|
+
cornerRadius = 0,
|
|
17824
|
+
edgeRoundness = null
|
|
17825
|
+
}) => {
|
|
17826
|
+
const width = outerRadius * 2;
|
|
17827
|
+
const height = outerRadius * 2;
|
|
17828
|
+
const centerX = width / 2;
|
|
17829
|
+
const centerY = height / 2;
|
|
17830
|
+
const starPathInstructions = star({
|
|
17831
|
+
centerX,
|
|
17832
|
+
centerY,
|
|
17833
|
+
points,
|
|
17834
|
+
innerRadius,
|
|
17835
|
+
outerRadius,
|
|
17836
|
+
cornerRadius,
|
|
17837
|
+
edgeRoundness
|
|
17838
|
+
});
|
|
17839
|
+
const reduced = reduceInstructions(starPathInstructions);
|
|
17840
|
+
const path = resetPath(serializeInstructions(reduced));
|
|
17841
|
+
const boundingBox = PathInternals.getBoundingBoxFromInstructions(reduced);
|
|
17842
|
+
return {
|
|
17843
|
+
path,
|
|
17844
|
+
width: boundingBox.width,
|
|
17845
|
+
height: boundingBox.height,
|
|
17846
|
+
transformOrigin: `${centerX} ${centerY}`,
|
|
17847
|
+
instructions: starPathInstructions
|
|
17848
|
+
};
|
|
17849
|
+
};
|
|
17850
|
+
var starSchema = makeShapeSchema({
|
|
17851
|
+
points: numberField({
|
|
17852
|
+
defaultValue: 5,
|
|
17853
|
+
description: "Points",
|
|
17854
|
+
min: 3,
|
|
17855
|
+
step: 1
|
|
17856
|
+
}),
|
|
17857
|
+
innerRadius: numberField({
|
|
17858
|
+
defaultValue: 50,
|
|
17859
|
+
description: "Inner Radius",
|
|
17860
|
+
min: 0
|
|
17861
|
+
}),
|
|
17862
|
+
outerRadius: numberField({
|
|
17863
|
+
defaultValue: 100,
|
|
17864
|
+
description: "Outer Radius",
|
|
17865
|
+
min: 0
|
|
17866
|
+
}),
|
|
17867
|
+
cornerRadius: numberField({
|
|
17868
|
+
defaultValue: 0,
|
|
17869
|
+
description: "Corner Radius",
|
|
17870
|
+
min: 0
|
|
17871
|
+
})
|
|
17872
|
+
});
|
|
17873
|
+
var StarInner = ({
|
|
17874
|
+
innerRadius,
|
|
17875
|
+
outerRadius,
|
|
17876
|
+
points,
|
|
17877
|
+
cornerRadius,
|
|
17878
|
+
edgeRoundness,
|
|
17879
|
+
...props
|
|
17880
|
+
}) => {
|
|
17881
|
+
return /* @__PURE__ */ jsx92(RenderSvg, {
|
|
17882
|
+
defaultName: "<Star>",
|
|
17883
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/star",
|
|
17884
|
+
...makeStar({
|
|
17885
|
+
innerRadius,
|
|
17886
|
+
outerRadius,
|
|
17887
|
+
points,
|
|
17888
|
+
cornerRadius,
|
|
17889
|
+
edgeRoundness
|
|
17890
|
+
}),
|
|
17891
|
+
...props
|
|
17892
|
+
});
|
|
17893
|
+
};
|
|
17894
|
+
var Star = Internals.wrapInSchema({
|
|
17895
|
+
Component: StarInner,
|
|
17896
|
+
schema: starSchema,
|
|
17897
|
+
supportsEffects: true
|
|
17898
|
+
});
|
|
17899
|
+
Internals.addSequenceStackTraces(Star);
|
|
17900
|
+
var makeTriangle = ({
|
|
17901
|
+
length: length2,
|
|
17902
|
+
direction = "right",
|
|
17903
|
+
edgeRoundness = null,
|
|
17904
|
+
cornerRadius = 0
|
|
17905
|
+
}) => {
|
|
17906
|
+
if (typeof length2 !== "number") {
|
|
17907
|
+
throw new Error(`"length" of a triangle must be a number, got ${JSON.stringify(length2)}`);
|
|
17908
|
+
}
|
|
17909
|
+
const longerDimension = length2;
|
|
17910
|
+
const shorterSize = Math.sqrt(length2 ** 2 * 0.75);
|
|
17911
|
+
const points = {
|
|
17912
|
+
up: [
|
|
17913
|
+
[longerDimension / 2, 0],
|
|
17914
|
+
[0, shorterSize],
|
|
17915
|
+
[longerDimension, shorterSize],
|
|
17916
|
+
[longerDimension / 2, 0]
|
|
17917
|
+
],
|
|
17918
|
+
right: [
|
|
17919
|
+
[0, 0],
|
|
17920
|
+
[0, longerDimension],
|
|
17921
|
+
[shorterSize, longerDimension / 2],
|
|
17922
|
+
[0, 0]
|
|
17923
|
+
],
|
|
17924
|
+
down: [
|
|
17925
|
+
[0, 0],
|
|
17926
|
+
[longerDimension, 0],
|
|
17927
|
+
[longerDimension / 2, shorterSize],
|
|
17928
|
+
[0, 0]
|
|
17929
|
+
],
|
|
17930
|
+
left: [
|
|
17931
|
+
[shorterSize, 0],
|
|
17932
|
+
[shorterSize, longerDimension],
|
|
17933
|
+
[0, longerDimension / 2],
|
|
17934
|
+
[shorterSize, 0]
|
|
17935
|
+
]
|
|
17936
|
+
};
|
|
17937
|
+
const transformOriginX = {
|
|
17938
|
+
left: shorterSize / 3 * 2,
|
|
17939
|
+
right: shorterSize / 3,
|
|
17940
|
+
up: longerDimension / 2,
|
|
17941
|
+
down: longerDimension / 2
|
|
17942
|
+
}[direction];
|
|
17943
|
+
const transformOriginY = {
|
|
17944
|
+
up: shorterSize / 3 * 2,
|
|
17945
|
+
down: shorterSize / 3,
|
|
17946
|
+
left: longerDimension / 2,
|
|
17947
|
+
right: longerDimension / 2
|
|
17948
|
+
}[direction];
|
|
17949
|
+
const instructions = [
|
|
17950
|
+
...joinPoints(points[direction], {
|
|
17951
|
+
edgeRoundness,
|
|
17952
|
+
cornerRadius,
|
|
17953
|
+
roundCornerStrategy: "bezier"
|
|
17954
|
+
}),
|
|
17955
|
+
{
|
|
17956
|
+
type: "Z"
|
|
17957
|
+
}
|
|
17958
|
+
];
|
|
17959
|
+
const path = serializeInstructions(instructions);
|
|
17960
|
+
return {
|
|
17961
|
+
path,
|
|
17962
|
+
instructions,
|
|
17963
|
+
width: direction === "up" || direction === "down" ? length2 : shorterSize,
|
|
17964
|
+
height: direction === "up" || direction === "down" ? shorterSize : length2,
|
|
17965
|
+
transformOrigin: `${transformOriginX} ${transformOriginY}`
|
|
17966
|
+
};
|
|
17967
|
+
};
|
|
17968
|
+
var triangleSchema = makeShapeSchema({
|
|
17969
|
+
length: numberField({
|
|
17970
|
+
defaultValue: 100,
|
|
17971
|
+
description: "Length",
|
|
17972
|
+
min: 0
|
|
17973
|
+
}),
|
|
17974
|
+
direction: enumField({
|
|
17975
|
+
defaultValue: "right",
|
|
17976
|
+
description: "Direction",
|
|
17977
|
+
variants: ["right", "left", "up", "down"]
|
|
17978
|
+
}),
|
|
17979
|
+
cornerRadius: numberField({
|
|
17980
|
+
defaultValue: 0,
|
|
17981
|
+
description: "Corner Radius",
|
|
17982
|
+
min: 0
|
|
17983
|
+
})
|
|
17984
|
+
});
|
|
17985
|
+
var TriangleInner = ({
|
|
17986
|
+
length: length2,
|
|
17987
|
+
direction,
|
|
17988
|
+
edgeRoundness,
|
|
17989
|
+
cornerRadius,
|
|
17990
|
+
...props
|
|
17991
|
+
}) => {
|
|
17992
|
+
return /* @__PURE__ */ jsx102(RenderSvg, {
|
|
17993
|
+
defaultName: "<Triangle>",
|
|
17994
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/triangle",
|
|
17995
|
+
...makeTriangle({ length: length2, direction, edgeRoundness, cornerRadius }),
|
|
17996
|
+
...props
|
|
17997
|
+
});
|
|
17998
|
+
};
|
|
17999
|
+
var Triangle = Internals.wrapInSchema({
|
|
18000
|
+
Component: TriangleInner,
|
|
18001
|
+
schema: triangleSchema,
|
|
18002
|
+
supportsEffects: true
|
|
18003
|
+
});
|
|
18004
|
+
Internals.addSequenceStackTraces(Triangle);
|
|
17094
18005
|
|
|
17095
18006
|
// ../svg-3d-engine/dist/esm/index.mjs
|
|
17096
18007
|
function truthy2(value) {
|
|
@@ -18157,7 +19068,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
18157
19068
|
// ../design/dist/esm/index.mjs
|
|
18158
19069
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
18159
19070
|
import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
18160
|
-
import { useEffect as useEffect23, useMemo as useMemo210, useRef as
|
|
19071
|
+
import { useEffect as useEffect23, useMemo as useMemo210, useRef as useRef30 } from "react";
|
|
18161
19072
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
18162
19073
|
import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
18163
19074
|
import React62 from "react";
|
|
@@ -18679,7 +19590,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
18679
19590
|
height: size
|
|
18680
19591
|
};
|
|
18681
19592
|
}, [size]);
|
|
18682
|
-
const pathsRef =
|
|
19593
|
+
const pathsRef = useRef30([]);
|
|
18683
19594
|
useEffect23(() => {
|
|
18684
19595
|
const animate = () => {
|
|
18685
19596
|
const now = performance.now();
|
|
@@ -18725,7 +19636,7 @@ var Button = ({
|
|
|
18725
19636
|
...rest
|
|
18726
19637
|
}) => {
|
|
18727
19638
|
const [dimensions, setDimensions] = useState22(null);
|
|
18728
|
-
const ref =
|
|
19639
|
+
const ref = useRef29(null);
|
|
18729
19640
|
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
18730
19641
|
const onPointerEnter = useCallback25((e) => {
|
|
18731
19642
|
if (e.pointerType !== "mouse") {
|
|
@@ -18855,7 +19766,7 @@ var CheckIcon = (props) => {
|
|
|
18855
19766
|
})
|
|
18856
19767
|
});
|
|
18857
19768
|
};
|
|
18858
|
-
var
|
|
19769
|
+
var Triangle2 = ({ rotated: rotated2 }) => /* @__PURE__ */ jsx83("svg", {
|
|
18859
19770
|
width: "12px",
|
|
18860
19771
|
height: "7px",
|
|
18861
19772
|
viewBox: "0 0 12 7",
|
|
@@ -18937,7 +19848,7 @@ var Counter = ({
|
|
|
18937
19848
|
...buttonContainer
|
|
18938
19849
|
},
|
|
18939
19850
|
onClick: increment,
|
|
18940
|
-
children: /* @__PURE__ */ jsx83(
|
|
19851
|
+
children: /* @__PURE__ */ jsx83(Triangle2, {
|
|
18941
19852
|
rotated: false
|
|
18942
19853
|
})
|
|
18943
19854
|
}),
|
|
@@ -18948,7 +19859,7 @@ var Counter = ({
|
|
|
18948
19859
|
...buttonContainer
|
|
18949
19860
|
},
|
|
18950
19861
|
onClick: decrement,
|
|
18951
|
-
children: /* @__PURE__ */ jsx83(
|
|
19862
|
+
children: /* @__PURE__ */ jsx83(Triangle2, {
|
|
18952
19863
|
rotated: true
|
|
18953
19864
|
})
|
|
18954
19865
|
})
|
|
@@ -21488,7 +22399,7 @@ var arrow3 = (options, deps) => ({
|
|
|
21488
22399
|
options: [options, deps]
|
|
21489
22400
|
});
|
|
21490
22401
|
var NAME = "Arrow";
|
|
21491
|
-
var
|
|
22402
|
+
var Arrow2 = React222.forwardRef((props, forwardedRef) => {
|
|
21492
22403
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
21493
22404
|
return /* @__PURE__ */ jsx202(Primitive.svg, {
|
|
21494
22405
|
...arrowProps,
|
|
@@ -21500,8 +22411,8 @@ var Arrow = React222.forwardRef((props, forwardedRef) => {
|
|
|
21500
22411
|
children: props.asChild ? children : /* @__PURE__ */ jsx202("polygon", { points: "0,0 30,0 15,10" })
|
|
21501
22412
|
});
|
|
21502
22413
|
});
|
|
21503
|
-
|
|
21504
|
-
var Root2 =
|
|
22414
|
+
Arrow2.displayName = NAME;
|
|
22415
|
+
var Root2 = Arrow2;
|
|
21505
22416
|
function useSize(element) {
|
|
21506
22417
|
const [size4, setSize] = React232.useState(undefined);
|
|
21507
22418
|
useLayoutEffect22(() => {
|
|
@@ -21767,7 +22678,7 @@ function getSideAndAlignFromPlacement(placement) {
|
|
|
21767
22678
|
var Root22 = Popper;
|
|
21768
22679
|
var Anchor = PopperAnchor;
|
|
21769
22680
|
var Content = PopperContent;
|
|
21770
|
-
var
|
|
22681
|
+
var Arrow22 = PopperArrow;
|
|
21771
22682
|
var PORTAL_NAME = "Portal";
|
|
21772
22683
|
var Portal = React25.forwardRef((props, forwardedRef) => {
|
|
21773
22684
|
const { container: containerProp, ...portalProps } = props;
|
|
@@ -23511,7 +24422,7 @@ var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
|
23511
24422
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23512
24423
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
23513
24424
|
const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
|
|
23514
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx242(
|
|
24425
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx242(Arrow22, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
23515
24426
|
});
|
|
23516
24427
|
SelectArrow.displayName = ARROW_NAME2;
|
|
23517
24428
|
function shouldShowPlaceholder(value) {
|
|
@@ -24845,7 +25756,7 @@ var Textarea = React51.forwardRef(({ className, style, ...props }, ref) => {
|
|
|
24845
25756
|
});
|
|
24846
25757
|
});
|
|
24847
25758
|
Textarea.displayName = "Textarea";
|
|
24848
|
-
var
|
|
25759
|
+
var Triangle22 = (props) => {
|
|
24849
25760
|
return /* @__PURE__ */ jsx362("svg", {
|
|
24850
25761
|
viewBox: "0 0 127 131",
|
|
24851
25762
|
fill: "none",
|
|
@@ -24858,7 +25769,7 @@ var Triangle2 = (props) => {
|
|
|
24858
25769
|
};
|
|
24859
25770
|
|
|
24860
25771
|
// src/components/homepage/FreePricing.tsx
|
|
24861
|
-
import React53, { useCallback as
|
|
25772
|
+
import React53, { useCallback as useCallback36, useMemo as useMemo52 } from "react";
|
|
24862
25773
|
|
|
24863
25774
|
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
24864
25775
|
var CLASS_PART_SEPARATOR2 = "-";
|
|
@@ -26505,7 +27416,7 @@ var CompanyPricing = () => {
|
|
|
26505
27416
|
const [automatorsSelected, setAutomatorsSelected] = React53.useState(true);
|
|
26506
27417
|
const [devSeatCount, setDevSeatCount] = React53.useState(3);
|
|
26507
27418
|
const [cloudRenders, setCloudRenders] = React53.useState(1e4);
|
|
26508
|
-
const formatPrice =
|
|
27419
|
+
const formatPrice = useCallback36((price) => {
|
|
26509
27420
|
const formatter = new Intl.NumberFormat("en-US", {
|
|
26510
27421
|
style: "currency",
|
|
26511
27422
|
currency: "USD",
|
|
@@ -27384,7 +28295,7 @@ var GitHubStars = () => {
|
|
|
27384
28295
|
width: "45px"
|
|
27385
28296
|
}),
|
|
27386
28297
|
/* @__PURE__ */ jsx56(StatItemContent, {
|
|
27387
|
-
content: "
|
|
28298
|
+
content: "49k",
|
|
27388
28299
|
width: "80px",
|
|
27389
28300
|
fontSize: "2.5rem",
|
|
27390
28301
|
fontWeight: "bold"
|
|
@@ -27569,8 +28480,8 @@ import { jsx as jsx314 } from "react/jsx-runtime";
|
|
|
27569
28480
|
import { useEffect as useEffect210, useState as useState210 } from "react";
|
|
27570
28481
|
import { useLayoutEffect as useLayoutEffect23 } from "react";
|
|
27571
28482
|
import { useContext as useContext47, useEffect as useEffect52, useRef as useRef46 } from "react";
|
|
27572
|
-
import { useEffect as useEffect310, useRef as
|
|
27573
|
-
import { useCallback as
|
|
28483
|
+
import { useEffect as useEffect310, useRef as useRef211 } from "react";
|
|
28484
|
+
import { useCallback as useCallback37, useContext as useContext310, useMemo as useMemo53, useRef as useRef47, useState as useState39 } from "react";
|
|
27574
28485
|
import { useEffect as useEffect43, useRef as useRef310 } from "react";
|
|
27575
28486
|
import { useCallback as useCallback210, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
|
|
27576
28487
|
import {
|
|
@@ -27600,7 +28511,7 @@ import { jsx as jsx55 } from "react/jsx-runtime";
|
|
|
27600
28511
|
import { useCallback as useCallback72, useEffect as useEffect112, useMemo as useMemo92, useRef as useRef82, useState as useState102 } from "react";
|
|
27601
28512
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
27602
28513
|
import { useCallback as useCallback42, useMemo as useMemo410, useRef as useRef52, useState as useState62 } from "react";
|
|
27603
|
-
import React54, { useCallback as
|
|
28514
|
+
import React54, { useCallback as useCallback38, useMemo as useMemo310, useState as useState52 } from "react";
|
|
27604
28515
|
import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
27605
28516
|
import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
27606
28517
|
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo54, useState as useState82 } from "react";
|
|
@@ -27870,6 +28781,40 @@ var interpolateString2 = ({
|
|
|
27870
28781
|
dimensions
|
|
27871
28782
|
});
|
|
27872
28783
|
};
|
|
28784
|
+
var validateTupleOutputRange2 = (outputRange) => {
|
|
28785
|
+
const dimensions = outputRange[0]?.length;
|
|
28786
|
+
if (dimensions === undefined) {
|
|
28787
|
+
throw new Error("outputRange must have at least 1 element");
|
|
28788
|
+
}
|
|
28789
|
+
if (dimensions === 0) {
|
|
28790
|
+
throw new TypeError("outputRange tuples must contain at least 1 number");
|
|
28791
|
+
}
|
|
28792
|
+
for (const output of outputRange) {
|
|
28793
|
+
if (output.length !== dimensions) {
|
|
28794
|
+
throw new TypeError(`outputRange tuples must all have the same length, but got ${dimensions} and ${output.length}`);
|
|
28795
|
+
}
|
|
28796
|
+
for (const value of output) {
|
|
28797
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
28798
|
+
throw new TypeError(`outputRange tuples must contain only finite numbers, but got [${output.join(",")}]`);
|
|
28799
|
+
}
|
|
28800
|
+
}
|
|
28801
|
+
}
|
|
28802
|
+
return dimensions;
|
|
28803
|
+
};
|
|
28804
|
+
var interpolateTuple2 = ({
|
|
28805
|
+
input,
|
|
28806
|
+
inputRange,
|
|
28807
|
+
outputRange,
|
|
28808
|
+
options: options2
|
|
28809
|
+
}) => {
|
|
28810
|
+
const dimensions = validateTupleOutputRange2(outputRange);
|
|
28811
|
+
return new Array(dimensions).fill(true).map((_, axis) => interpolateNumber2({
|
|
28812
|
+
input,
|
|
28813
|
+
inputRange,
|
|
28814
|
+
outputRange: outputRange.map((output) => output[axis]),
|
|
28815
|
+
options: options2
|
|
28816
|
+
}));
|
|
28817
|
+
};
|
|
27873
28818
|
function checkValidInputRange2(arr) {
|
|
27874
28819
|
for (let i = 1;i < arr.length; ++i) {
|
|
27875
28820
|
if (!(arr[i] > arr[i - 1])) {
|
|
@@ -27945,8 +28890,11 @@ function interpolate3(input, inputRange, outputRange, options2) {
|
|
|
27945
28890
|
}
|
|
27946
28891
|
return interpolateString2({ input, inputRange, outputRange, options: options2 });
|
|
27947
28892
|
}
|
|
28893
|
+
if (outputRange.every((output) => Array.isArray(output))) {
|
|
28894
|
+
return interpolateTuple2({ input, inputRange, outputRange, options: options2 });
|
|
28895
|
+
}
|
|
27948
28896
|
if (!outputRange.every((output) => typeof output === "number")) {
|
|
27949
|
-
throw new TypeError("outputRange must contain only numbers, or supported scale, translate, and rotate strings");
|
|
28897
|
+
throw new TypeError("outputRange must contain only numbers, numeric tuples, or supported scale, translate, and rotate strings");
|
|
27950
28898
|
}
|
|
27951
28899
|
checkInfiniteRange2("outputRange", outputRange);
|
|
27952
28900
|
return interpolateNumber2({ input, inputRange, outputRange, options: options2 });
|
|
@@ -28548,7 +29496,6 @@ var sequenceVisualStyleSchema2 = {
|
|
|
28548
29496
|
},
|
|
28549
29497
|
"style.scale": {
|
|
28550
29498
|
type: "scale",
|
|
28551
|
-
min: 0.05,
|
|
28552
29499
|
max: 100,
|
|
28553
29500
|
step: 0.01,
|
|
28554
29501
|
default: 1,
|
|
@@ -28629,6 +29576,11 @@ var sequenceSchema2 = {
|
|
|
28629
29576
|
}
|
|
28630
29577
|
}
|
|
28631
29578
|
};
|
|
29579
|
+
var sequenceSchemaWithoutFrom2 = {
|
|
29580
|
+
hidden: hiddenField2,
|
|
29581
|
+
durationInFrames: durationInFramesField2,
|
|
29582
|
+
layout: sequenceSchema2.layout
|
|
29583
|
+
};
|
|
28632
29584
|
var sequenceSchemaDefaultLayoutNone2 = {
|
|
28633
29585
|
...sequenceSchema2,
|
|
28634
29586
|
layout: {
|
|
@@ -29376,14 +30328,15 @@ var usePlayer = () => {
|
|
|
29376
30328
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
29377
30329
|
}
|
|
29378
30330
|
const { buffering } = bufferingContext;
|
|
29379
|
-
const seek2 =
|
|
30331
|
+
const seek2 = useCallback37((newFrame) => {
|
|
30332
|
+
const frameToSeekTo = config ? Internals.TimelinePosition.clampFrameToCompositionRange(newFrame, config.durationInFrames) : Math.max(0, newFrame);
|
|
29380
30333
|
if (video?.id) {
|
|
29381
|
-
setTimelinePosition((c2) => ({ ...c2, [video.id]:
|
|
30334
|
+
setTimelinePosition((c2) => ({ ...c2, [video.id]: frameToSeekTo }));
|
|
29382
30335
|
}
|
|
29383
|
-
frameRef.current =
|
|
29384
|
-
emitter.dispatchSeek(
|
|
29385
|
-
}, [emitter, setTimelinePosition, video?.id]);
|
|
29386
|
-
const play =
|
|
30336
|
+
frameRef.current = frameToSeekTo;
|
|
30337
|
+
emitter.dispatchSeek(frameToSeekTo);
|
|
30338
|
+
}, [config, emitter, setTimelinePosition, video?.id]);
|
|
30339
|
+
const play = useCallback37((e) => {
|
|
29387
30340
|
if (imperativePlaying.current) {
|
|
29388
30341
|
return;
|
|
29389
30342
|
}
|
|
@@ -29410,7 +30363,7 @@ var usePlayer = () => {
|
|
|
29410
30363
|
seek2,
|
|
29411
30364
|
audioAndVideoTags
|
|
29412
30365
|
]);
|
|
29413
|
-
const pause =
|
|
30366
|
+
const pause = useCallback37(() => {
|
|
29414
30367
|
if (imperativePlaying.current) {
|
|
29415
30368
|
imperativePlaying.current = false;
|
|
29416
30369
|
setPlaying(false);
|
|
@@ -29418,7 +30371,7 @@ var usePlayer = () => {
|
|
|
29418
30371
|
audioContext?.suspend();
|
|
29419
30372
|
}
|
|
29420
30373
|
}, [emitter, imperativePlaying, setPlaying, audioContext]);
|
|
29421
|
-
const pauseAndReturnToPlayStart =
|
|
30374
|
+
const pauseAndReturnToPlayStart = useCallback37(() => {
|
|
29422
30375
|
if (imperativePlaying.current) {
|
|
29423
30376
|
imperativePlaying.current = false;
|
|
29424
30377
|
frameRef.current = playStart.current;
|
|
@@ -29433,7 +30386,7 @@ var usePlayer = () => {
|
|
|
29433
30386
|
}
|
|
29434
30387
|
}, [config, emitter, imperativePlaying, setPlaying, setTimelinePosition]);
|
|
29435
30388
|
const videoId = video?.id;
|
|
29436
|
-
const frameBack =
|
|
30389
|
+
const frameBack = useCallback37((frames) => {
|
|
29437
30390
|
if (!videoId) {
|
|
29438
30391
|
return null;
|
|
29439
30392
|
}
|
|
@@ -29452,7 +30405,7 @@ var usePlayer = () => {
|
|
|
29452
30405
|
};
|
|
29453
30406
|
});
|
|
29454
30407
|
}, [imperativePlaying, setFrame, videoId]);
|
|
29455
|
-
const frameForward =
|
|
30408
|
+
const frameForward = useCallback37((frames) => {
|
|
29456
30409
|
if (!videoId) {
|
|
29457
30410
|
return null;
|
|
29458
30411
|
}
|
|
@@ -29471,20 +30424,20 @@ var usePlayer = () => {
|
|
|
29471
30424
|
};
|
|
29472
30425
|
});
|
|
29473
30426
|
}, [videoId, imperativePlaying, lastFrame, setFrame]);
|
|
29474
|
-
const toggle =
|
|
30427
|
+
const toggle = useCallback37((e) => {
|
|
29475
30428
|
if (imperativePlaying.current) {
|
|
29476
30429
|
pause();
|
|
29477
30430
|
} else {
|
|
29478
30431
|
play(e);
|
|
29479
30432
|
}
|
|
29480
30433
|
}, [imperativePlaying, pause, play]);
|
|
29481
|
-
const isPlaying =
|
|
30434
|
+
const isPlaying = useCallback37(() => {
|
|
29482
30435
|
return imperativePlaying.current;
|
|
29483
30436
|
}, [imperativePlaying]);
|
|
29484
|
-
const getCurrentFrame =
|
|
30437
|
+
const getCurrentFrame = useCallback37(() => {
|
|
29485
30438
|
return frameRef.current;
|
|
29486
30439
|
}, [frameRef]);
|
|
29487
|
-
const isBuffering =
|
|
30440
|
+
const isBuffering = useCallback37(() => {
|
|
29488
30441
|
return buffering.current;
|
|
29489
30442
|
}, [buffering]);
|
|
29490
30443
|
const returnValue = useMemo53(() => {
|
|
@@ -29530,7 +30483,7 @@ var useBrowserMediaSession = ({
|
|
|
29530
30483
|
playbackRate
|
|
29531
30484
|
}) => {
|
|
29532
30485
|
const { playing, pause, play, emitter, getCurrentFrame, seek: seek2 } = usePlayer();
|
|
29533
|
-
const hasEverPlayed =
|
|
30486
|
+
const hasEverPlayed = useRef211(false);
|
|
29534
30487
|
useEffect310(() => {
|
|
29535
30488
|
if (playing) {
|
|
29536
30489
|
hasEverPlayed.current = true;
|
|
@@ -30237,7 +31190,7 @@ var DefaultVolumeSlider = ({
|
|
|
30237
31190
|
}, [isVertical]);
|
|
30238
31191
|
const randomId = typeof React54.useId === "undefined" ? "volume-slider" : React54.useId();
|
|
30239
31192
|
const [randomClass] = useState52(() => `__remotion-volume-slider-${random(randomId)}`.replace(".", ""));
|
|
30240
|
-
const onVolumeChange =
|
|
31193
|
+
const onVolumeChange = useCallback38((e) => {
|
|
30241
31194
|
setVolume(parseFloat(e.target.value));
|
|
30242
31195
|
}, [setVolume]);
|
|
30243
31196
|
const inputStyle = useMemo310(() => {
|
|
@@ -32423,7 +33376,7 @@ var Thumbnail = forward2(ThumbnailFn);
|
|
|
32423
33376
|
|
|
32424
33377
|
// src/components/homepage/Demo/index.tsx
|
|
32425
33378
|
import {
|
|
32426
|
-
useCallback as
|
|
33379
|
+
useCallback as useCallback55,
|
|
32427
33380
|
useEffect as useEffect58,
|
|
32428
33381
|
useMemo as useMemo67,
|
|
32429
33382
|
useRef as useRef58,
|
|
@@ -33224,12 +34177,12 @@ import { jsx as jsx216 } from "react/jsx-runtime";
|
|
|
33224
34177
|
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
33225
34178
|
import React63, { useMemo as useMemo63, useState as useState63 } from "react";
|
|
33226
34179
|
import {
|
|
33227
|
-
useCallback as
|
|
34180
|
+
useCallback as useCallback39,
|
|
33228
34181
|
useContext as useContext49,
|
|
33229
34182
|
useEffect as useEffect212,
|
|
33230
34183
|
useLayoutEffect as useLayoutEffect34,
|
|
33231
34184
|
useMemo as useMemo412,
|
|
33232
|
-
useRef as
|
|
34185
|
+
useRef as useRef212,
|
|
33233
34186
|
useState as useState43
|
|
33234
34187
|
} from "react";
|
|
33235
34188
|
import { jsx as jsx412 } from "react/jsx-runtime";
|
|
@@ -36117,7 +37070,12 @@ var makeKeyframeBank = async ({
|
|
|
36117
37070
|
}
|
|
36118
37071
|
const roundedTimestamp = roundTo4Digits(timestamp);
|
|
36119
37072
|
const firstFrameTimestamp = roundTo4Digits(frameTimestamps[0]);
|
|
37073
|
+
const range = getRangeOfTimestamps();
|
|
37074
|
+
if (!range) {
|
|
37075
|
+
return false;
|
|
37076
|
+
}
|
|
36120
37077
|
const lastFrameTimestamp = roundTo4Digits(frameTimestamps[frameTimestamps.length - 1]);
|
|
37078
|
+
const lastFrameEndTimestamp = roundTo4Digits(range.lastTimestamp);
|
|
36121
37079
|
if (hasReachedEndOfVideo && roundedTimestamp > lastFrameTimestamp) {
|
|
36122
37080
|
return true;
|
|
36123
37081
|
}
|
|
@@ -36126,7 +37084,7 @@ var makeKeyframeBank = async ({
|
|
|
36126
37084
|
const firstFrameDoesSatisfy = firstFrameIsInitialFrame && roundedTimestamp >= initialTimestampRequest;
|
|
36127
37085
|
return firstFrameDoesSatisfy;
|
|
36128
37086
|
}
|
|
36129
|
-
if (roundedTimestamp - BIGGEST_ALLOWED_JUMP_FORWARD_SECONDS >
|
|
37087
|
+
if (roundedTimestamp - BIGGEST_ALLOWED_JUMP_FORWARD_SECONDS > lastFrameEndTimestamp) {
|
|
36130
37088
|
return false;
|
|
36131
37089
|
}
|
|
36132
37090
|
return true;
|
|
@@ -37820,13 +38778,13 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
37820
38778
|
...props
|
|
37821
38779
|
}) => {
|
|
37822
38780
|
const src = usePreload22(unpreloadedSrc);
|
|
37823
|
-
const canvasRef =
|
|
38781
|
+
const canvasRef = useRef212(null);
|
|
37824
38782
|
const videoConfig = useUnsafeVideoConfig22();
|
|
37825
38783
|
const frame = useCurrentFrame();
|
|
37826
|
-
const mediaPlayerRef =
|
|
37827
|
-
const initialTrimBeforeRef =
|
|
37828
|
-
const initialTrimAfterRef =
|
|
37829
|
-
const initialOnVideoFrameRef =
|
|
38784
|
+
const mediaPlayerRef = useRef212(null);
|
|
38785
|
+
const initialTrimBeforeRef = useRef212(trimBefore);
|
|
38786
|
+
const initialTrimAfterRef = useRef212(trimAfter);
|
|
38787
|
+
const initialOnVideoFrameRef = useRef212(onVideoFrame);
|
|
37830
38788
|
const [initialRequestInit] = useState43(requestInit);
|
|
37831
38789
|
const [mediaPlayerReady, setMediaPlayerReady] = useState43(false);
|
|
37832
38790
|
const [shouldFallbackToNativeVideo, setShouldFallbackToNativeVideo] = useState43(false);
|
|
@@ -37834,11 +38792,11 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
37834
38792
|
const { playbackRate: globalPlaybackRate } = Internals.usePlaybackRate();
|
|
37835
38793
|
const sharedAudioContext = useContext49(SharedAudioContext22);
|
|
37836
38794
|
const buffer = useBufferState();
|
|
37837
|
-
const canvasRefCallback =
|
|
38795
|
+
const canvasRefCallback = useCallback39((canvas) => {
|
|
37838
38796
|
canvasRef.current = canvas;
|
|
37839
38797
|
refForOutline.current = canvas;
|
|
37840
38798
|
}, [refForOutline]);
|
|
37841
|
-
const fallbackVideoRef =
|
|
38799
|
+
const fallbackVideoRef = useCallback39((video) => {
|
|
37842
38800
|
refForOutline.current = video;
|
|
37843
38801
|
}, [refForOutline]);
|
|
37844
38802
|
const [mediaMuted] = useMediaMutedState22();
|
|
@@ -37854,16 +38812,16 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
37854
38812
|
}
|
|
37855
38813
|
warnAboutTooHighVolume22(userPreferredVolume);
|
|
37856
38814
|
const effectChainState = useEffectChainState2();
|
|
37857
|
-
const effectsRef =
|
|
38815
|
+
const effectsRef = useRef212(effects);
|
|
37858
38816
|
effectsRef.current = effects;
|
|
37859
|
-
const effectChainStateRef =
|
|
38817
|
+
const effectChainStateRef = useRef212(effectChainState);
|
|
37860
38818
|
effectChainStateRef.current = effectChainState;
|
|
37861
38819
|
const parentSequence = useContext49(SequenceContext22);
|
|
37862
38820
|
const isPremounting = Boolean(parentSequence?.premounting);
|
|
37863
38821
|
const isPostmounting = Boolean(parentSequence?.postmounting);
|
|
37864
38822
|
const sequenceOffset = ((parentSequence?.cumulatedFrom ?? 0) + (parentSequence?.relativeFrom ?? 0)) / videoConfig.fps;
|
|
37865
38823
|
const currentTime = frame / videoConfig.fps;
|
|
37866
|
-
const currentTimeRef =
|
|
38824
|
+
const currentTimeRef = useRef212(currentTime);
|
|
37867
38825
|
currentTimeRef.current = currentTime;
|
|
37868
38826
|
const preloadedSrc = usePreload22(src);
|
|
37869
38827
|
const buffering = useContext49(Internals.BufferingContextReact);
|
|
@@ -37872,16 +38830,16 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
37872
38830
|
}
|
|
37873
38831
|
const effectiveMuted = muted || mediaMuted || userPreferredVolume <= 0;
|
|
37874
38832
|
const isPlayerBuffering = Internals.useIsPlayerBuffering(buffering);
|
|
37875
|
-
const initialPlaying =
|
|
37876
|
-
const initialIsPremounting =
|
|
37877
|
-
const initialIsPostmounting =
|
|
37878
|
-
const initialGlobalPlaybackRate =
|
|
37879
|
-
const initialPlaybackRate =
|
|
37880
|
-
const initialMuted =
|
|
37881
|
-
const initialSequenceDuration =
|
|
37882
|
-
const initialSequenceOffset =
|
|
37883
|
-
const hasDrawnRealFrameRef =
|
|
37884
|
-
const isPremountingRef =
|
|
38833
|
+
const initialPlaying = useRef212(playing && !isPlayerBuffering);
|
|
38834
|
+
const initialIsPremounting = useRef212(isPremounting);
|
|
38835
|
+
const initialIsPostmounting = useRef212(isPostmounting);
|
|
38836
|
+
const initialGlobalPlaybackRate = useRef212(globalPlaybackRate);
|
|
38837
|
+
const initialPlaybackRate = useRef212(playbackRate);
|
|
38838
|
+
const initialMuted = useRef212(effectiveMuted);
|
|
38839
|
+
const initialSequenceDuration = useRef212(videoConfig.durationInFrames);
|
|
38840
|
+
const initialSequenceOffset = useRef212(sequenceOffset);
|
|
38841
|
+
const hasDrawnRealFrameRef = useRef212(false);
|
|
38842
|
+
const isPremountingRef = useRef212(isPremounting);
|
|
37885
38843
|
isPremountingRef.current = isPremounting;
|
|
37886
38844
|
useLayoutEffect34(() => {
|
|
37887
38845
|
if (!_experimentalInitiallyDrawCachedFrame) {
|
|
@@ -38782,19 +39740,19 @@ var Video = Internals.wrapInSchema({
|
|
|
38782
39740
|
Internals.addSequenceStackTraces(Video);
|
|
38783
39741
|
|
|
38784
39742
|
// src/components/homepage/Demo/Comp.tsx
|
|
38785
|
-
import { useCallback as
|
|
39743
|
+
import { useCallback as useCallback47, useEffect as useEffect50, useMemo as useMemo60, useState as useState48 } from "react";
|
|
38786
39744
|
|
|
38787
39745
|
// src/components/homepage/Demo/Cards.tsx
|
|
38788
39746
|
import {
|
|
38789
39747
|
createRef as createRef4,
|
|
38790
|
-
useCallback as
|
|
39748
|
+
useCallback as useCallback46,
|
|
38791
39749
|
useEffect as useEffect49,
|
|
38792
39750
|
useRef as useRef55,
|
|
38793
39751
|
useState as useState47
|
|
38794
39752
|
} from "react";
|
|
38795
39753
|
|
|
38796
39754
|
// src/components/homepage/Demo/Card.tsx
|
|
38797
|
-
import { useCallback as
|
|
39755
|
+
import { useCallback as useCallback43, useRef as useRef50 } from "react";
|
|
38798
39756
|
|
|
38799
39757
|
// src/components/homepage/Demo/math.ts
|
|
38800
39758
|
var paddingAndMargin = 20;
|
|
@@ -38828,10 +39786,10 @@ var getIndexFromPosition = (clientX, clientY) => {
|
|
|
38828
39786
|
};
|
|
38829
39787
|
|
|
38830
39788
|
// src/components/homepage/Demo/Switcher.tsx
|
|
38831
|
-
import { useCallback as
|
|
39789
|
+
import { useCallback as useCallback41 } from "react";
|
|
38832
39790
|
import { jsx as jsx61, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
38833
39791
|
var Switcher = ({ type, theme, onTap }) => {
|
|
38834
|
-
const onPointerDown =
|
|
39792
|
+
const onPointerDown = useCallback41((e) => {
|
|
38835
39793
|
e.stopPropagation();
|
|
38836
39794
|
onTap();
|
|
38837
39795
|
}, [onTap]);
|
|
@@ -38894,7 +39852,7 @@ var Card2 = ({
|
|
|
38894
39852
|
const refToUse = refsToUse[index2];
|
|
38895
39853
|
const stopPrevious = useRef50([]);
|
|
38896
39854
|
let newIndices = [...indices];
|
|
38897
|
-
const applyPositions =
|
|
39855
|
+
const applyPositions = useCallback43((except) => {
|
|
38898
39856
|
let stopped = false;
|
|
38899
39857
|
stopPrevious.current.forEach((s) => {
|
|
38900
39858
|
s();
|
|
@@ -38967,7 +39925,7 @@ var Card2 = ({
|
|
|
38967
39925
|
update();
|
|
38968
39926
|
});
|
|
38969
39927
|
}, [newIndices, onUpdate, positions, refsToUse, shouldBePositions]);
|
|
38970
|
-
const onPointerDown =
|
|
39928
|
+
const onPointerDown = useCallback43((e) => {
|
|
38971
39929
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
38972
39930
|
const cardLeft = refToUse.current.offsetLeft;
|
|
38973
39931
|
const cardTop = refToUse.current.offsetTop;
|
|
@@ -39028,7 +39986,7 @@ var Card2 = ({
|
|
|
39028
39986
|
}, { once: true });
|
|
39029
39987
|
refToUse.current.addEventListener("pointermove", onMove);
|
|
39030
39988
|
}, [applyPositions, index2, positions, refToUse, shouldBePositions]);
|
|
39031
|
-
const onPointerUp =
|
|
39989
|
+
const onPointerUp = useCallback43((e) => {
|
|
39032
39990
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
39033
39991
|
}, []);
|
|
39034
39992
|
const { x, y } = getPositionForIndex(index2);
|
|
@@ -39155,7 +40113,7 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
|
|
|
39155
40113
|
// src/components/homepage/Demo/EmojiCard.tsx
|
|
39156
40114
|
import {
|
|
39157
40115
|
forwardRef as forwardRef37,
|
|
39158
|
-
useCallback as
|
|
40116
|
+
useCallback as useCallback45,
|
|
39159
40117
|
useEffect as useEffect48,
|
|
39160
40118
|
useImperativeHandle as useImperativeHandle13,
|
|
39161
40119
|
useRef as useRef53
|
|
@@ -39439,7 +40397,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
39439
40397
|
const ref2 = useRef53(null);
|
|
39440
40398
|
const ref3 = useRef53(null);
|
|
39441
40399
|
const transforms = useRef53([-100, 0, 100]);
|
|
39442
|
-
const onLeft =
|
|
40400
|
+
const onLeft = useCallback45(() => {
|
|
39443
40401
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
39444
40402
|
return;
|
|
39445
40403
|
}
|
|
@@ -39450,7 +40408,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
39450
40408
|
transforms: transforms.current
|
|
39451
40409
|
});
|
|
39452
40410
|
}, []);
|
|
39453
|
-
const onRight =
|
|
40411
|
+
const onRight = useCallback45(() => {
|
|
39454
40412
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
39455
40413
|
return;
|
|
39456
40414
|
}
|
|
@@ -39910,11 +40868,11 @@ var Cards = ({
|
|
|
39910
40868
|
};
|
|
39911
40869
|
}, [onToggle]);
|
|
39912
40870
|
const ref = useRef55(null);
|
|
39913
|
-
const onLeft =
|
|
40871
|
+
const onLeft = useCallback46(() => {
|
|
39914
40872
|
ref.current?.onRight();
|
|
39915
40873
|
onRightPress();
|
|
39916
40874
|
}, [onRightPress]);
|
|
39917
|
-
const onRight =
|
|
40875
|
+
const onRight = useCallback46(() => {
|
|
39918
40876
|
ref.current?.onLeft();
|
|
39919
40877
|
onLeftPress();
|
|
39920
40878
|
}, [onLeftPress]);
|
|
@@ -39984,7 +40942,7 @@ var HomepageVideoComp = ({
|
|
|
39984
40942
|
onClickRight
|
|
39985
40943
|
}) => {
|
|
39986
40944
|
const [rerenders, setRerenders] = useState48(0);
|
|
39987
|
-
const onUpdate =
|
|
40945
|
+
const onUpdate = useCallback47((newIndices) => {
|
|
39988
40946
|
setRerenders(rerenders + 1);
|
|
39989
40947
|
updateCardOrder(newIndices);
|
|
39990
40948
|
}, [rerenders, updateCardOrder]);
|
|
@@ -40082,7 +41040,7 @@ import {
|
|
|
40082
41040
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
40083
41041
|
|
|
40084
41042
|
// ../core/dist/esm/version.mjs
|
|
40085
|
-
var VERSION2 = "4.0.
|
|
41043
|
+
var VERSION2 = "4.0.474";
|
|
40086
41044
|
|
|
40087
41045
|
// ../web-renderer/dist/esm/index.mjs
|
|
40088
41046
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -44719,7 +45677,7 @@ var renderMediaOnWeb = (options2) => {
|
|
|
44719
45677
|
};
|
|
44720
45678
|
|
|
44721
45679
|
// src/components/homepage/Demo/DemoRender.tsx
|
|
44722
|
-
import React69, { useCallback as
|
|
45680
|
+
import React69, { useCallback as useCallback48 } from "react";
|
|
44723
45681
|
import { z } from "zod";
|
|
44724
45682
|
|
|
44725
45683
|
// src/components/homepage/Demo/DemoErrorIcon.tsx
|
|
@@ -44920,7 +45878,7 @@ var RenderButton = ({ renderData, onError, playerRef }) => {
|
|
|
44920
45878
|
const [state, setState] = React69.useState({
|
|
44921
45879
|
type: "idle"
|
|
44922
45880
|
});
|
|
44923
|
-
const triggerRender =
|
|
45881
|
+
const triggerRender = useCallback48(async () => {
|
|
44924
45882
|
if (renderData === null) {
|
|
44925
45883
|
return;
|
|
44926
45884
|
}
|
|
@@ -45095,10 +46053,10 @@ var DragAndDropNudge = () => {
|
|
|
45095
46053
|
};
|
|
45096
46054
|
|
|
45097
46055
|
// src/components/homepage/Demo/PlayerSeekBar.tsx
|
|
45098
|
-
import { useCallback as
|
|
46056
|
+
import { useCallback as useCallback50, useEffect as useEffect53, useMemo as useMemo66, useRef as useRef56, useState as useState51 } from "react";
|
|
45099
46057
|
|
|
45100
46058
|
// src/components/homepage/layout/use-el-size.ts
|
|
45101
|
-
import { useCallback as
|
|
46059
|
+
import { useCallback as useCallback49, useEffect as useEffect51, useMemo as useMemo64, useState as useState50 } from "react";
|
|
45102
46060
|
var useElementSize2 = (ref) => {
|
|
45103
46061
|
const [size4, setSize] = useState50(null);
|
|
45104
46062
|
const observer = useMemo64(() => {
|
|
@@ -45112,7 +46070,7 @@ var useElementSize2 = (ref) => {
|
|
|
45112
46070
|
});
|
|
45113
46071
|
});
|
|
45114
46072
|
}, []);
|
|
45115
|
-
const updateSize =
|
|
46073
|
+
const updateSize = useCallback49(() => {
|
|
45116
46074
|
if (ref === null) {
|
|
45117
46075
|
return;
|
|
45118
46076
|
}
|
|
@@ -45264,7 +46222,7 @@ var PlayerSeekBar2 = ({
|
|
|
45264
46222
|
dragging: false
|
|
45265
46223
|
});
|
|
45266
46224
|
const width2 = size4?.width ?? 0;
|
|
45267
|
-
const onPointerDown =
|
|
46225
|
+
const onPointerDown = useCallback50((e) => {
|
|
45268
46226
|
if (e.button !== 0) {
|
|
45269
46227
|
return;
|
|
45270
46228
|
}
|
|
@@ -45278,7 +46236,7 @@ var PlayerSeekBar2 = ({
|
|
|
45278
46236
|
});
|
|
45279
46237
|
onSeekStart();
|
|
45280
46238
|
}, [durationInFrames, width2, playerRef, playing, onSeekStart]);
|
|
45281
|
-
const onPointerMove =
|
|
46239
|
+
const onPointerMove = useCallback50((e) => {
|
|
45282
46240
|
if (!size4) {
|
|
45283
46241
|
throw new Error("Player has no size");
|
|
45284
46242
|
}
|
|
@@ -45289,7 +46247,7 @@ var PlayerSeekBar2 = ({
|
|
|
45289
46247
|
const _frame = getFrameFromX2(e.clientX - posLeft, durationInFrames, size4.width);
|
|
45290
46248
|
playerRef.current.seekTo(_frame);
|
|
45291
46249
|
}, [dragging.dragging, durationInFrames, playerRef, size4]);
|
|
45292
|
-
const onPointerUp =
|
|
46250
|
+
const onPointerUp = useCallback50(() => {
|
|
45293
46251
|
setDragging({
|
|
45294
46252
|
dragging: false
|
|
45295
46253
|
});
|
|
@@ -45373,7 +46331,7 @@ var PlayerSeekBar2 = ({
|
|
|
45373
46331
|
};
|
|
45374
46332
|
|
|
45375
46333
|
// src/components/homepage/Demo/PlayerVolume.tsx
|
|
45376
|
-
import { useCallback as
|
|
46334
|
+
import { useCallback as useCallback51, useEffect as useEffect55, useRef as useRef57, useState as useState54 } from "react";
|
|
45377
46335
|
|
|
45378
46336
|
// src/components/homepage/Demo/icons.tsx
|
|
45379
46337
|
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
@@ -45454,7 +46412,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
45454
46412
|
document.body.style.userSelect = "auto";
|
|
45455
46413
|
}
|
|
45456
46414
|
}, [isHovered]);
|
|
45457
|
-
const onClick =
|
|
46415
|
+
const onClick = useCallback51(() => {
|
|
45458
46416
|
if (timerRef.current !== null) {
|
|
45459
46417
|
clearTimeout(timerRef.current);
|
|
45460
46418
|
timerRef.current = null;
|
|
@@ -45492,7 +46450,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
45492
46450
|
};
|
|
45493
46451
|
|
|
45494
46452
|
// src/components/homepage/Demo/PlayPauseButton.tsx
|
|
45495
|
-
import React73, { useCallback as
|
|
46453
|
+
import React73, { useCallback as useCallback53, useEffect as useEffect56 } from "react";
|
|
45496
46454
|
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
45497
46455
|
var playerButtonStyle2 = {
|
|
45498
46456
|
appearance: "none",
|
|
@@ -45528,7 +46486,7 @@ var PlayPauseButton = ({ playerRef }) => {
|
|
|
45528
46486
|
current.removeEventListener("pause", onPause);
|
|
45529
46487
|
};
|
|
45530
46488
|
}, [playerRef]);
|
|
45531
|
-
const onToggle =
|
|
46489
|
+
const onToggle = useCallback53(() => {
|
|
45532
46490
|
playerRef.current?.toggle();
|
|
45533
46491
|
}, [playerRef]);
|
|
45534
46492
|
const playPauseIconStyle = {
|
|
@@ -45749,7 +46707,7 @@ var Demo = () => {
|
|
|
45749
46707
|
playerRef.removeEventListener("fullscreenchange", onFullscreenChange);
|
|
45750
46708
|
};
|
|
45751
46709
|
}, [data2]);
|
|
45752
|
-
const updateCardOrder =
|
|
46710
|
+
const updateCardOrder = useCallback55((newCardOrder) => {
|
|
45753
46711
|
setCardOrder(newCardOrder);
|
|
45754
46712
|
}, []);
|
|
45755
46713
|
const props = useMemo67(() => {
|
|
@@ -45771,7 +46729,7 @@ var Demo = () => {
|
|
|
45771
46729
|
emojiIndex
|
|
45772
46730
|
};
|
|
45773
46731
|
}, [cardOrder, emojiIndex, colorMode, data2, updateCardOrder]);
|
|
45774
|
-
const onError =
|
|
46732
|
+
const onError = useCallback55(() => {
|
|
45775
46733
|
setError(true);
|
|
45776
46734
|
}, []);
|
|
45777
46735
|
return /* @__PURE__ */ jsxs39("div", {
|
|
@@ -46056,13 +47014,13 @@ var IfYouKnowReact = () => {
|
|
|
46056
47014
|
};
|
|
46057
47015
|
|
|
46058
47016
|
// src/components/homepage/NewsletterButton.tsx
|
|
46059
|
-
import { useCallback as
|
|
47017
|
+
import { useCallback as useCallback56, useState as useState59 } from "react";
|
|
46060
47018
|
import { jsx as jsx118, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
46061
47019
|
var NewsletterButton = () => {
|
|
46062
47020
|
const [email, setEmail] = useState59("");
|
|
46063
47021
|
const [submitting, setSubmitting] = useState59(false);
|
|
46064
47022
|
const [subscribed, setSubscribed] = useState59(false);
|
|
46065
|
-
const handleSubmit =
|
|
47023
|
+
const handleSubmit = useCallback56(async (e) => {
|
|
46066
47024
|
try {
|
|
46067
47025
|
setSubmitting(true);
|
|
46068
47026
|
e.preventDefault();
|
|
@@ -46537,7 +47495,7 @@ import { forwardRef as forwardRef40, useEffect as useEffect66, useImperativeHand
|
|
|
46537
47495
|
// src/components/homepage/VideoPlayerWithControls.tsx
|
|
46538
47496
|
import Hls from "hls.js";
|
|
46539
47497
|
import"plyr/dist/plyr.css";
|
|
46540
|
-
import { forwardRef as forwardRef39, useCallback as
|
|
47498
|
+
import { forwardRef as forwardRef39, useCallback as useCallback57, useEffect as useEffect65, useRef as useRef61, useState as useState64 } from "react";
|
|
46541
47499
|
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
46542
47500
|
var useCombinedRefs = function(...refs) {
|
|
46543
47501
|
const targetRef = useRef61(null);
|
|
@@ -46559,8 +47517,8 @@ var VideoPlayerWithControls = forwardRef39(({ playbackId, poster, currentTime, o
|
|
|
46559
47517
|
const metaRef = useCombinedRefs(ref, videoRef);
|
|
46560
47518
|
const playerRef = useRef61(null);
|
|
46561
47519
|
const [playerInitTime] = useState64(Date.now());
|
|
46562
|
-
const videoError =
|
|
46563
|
-
const onImageLoad =
|
|
47520
|
+
const videoError = useCallback57((event) => onError(event), [onError]);
|
|
47521
|
+
const onImageLoad = useCallback57((event) => {
|
|
46564
47522
|
const [w, h] = [event.target.width, event.target.height];
|
|
46565
47523
|
if (w && h) {
|
|
46566
47524
|
onSize({ width: w, height: h });
|
|
@@ -46724,7 +47682,7 @@ var icon6 = {
|
|
|
46724
47682
|
height: 16,
|
|
46725
47683
|
marginLeft: 10
|
|
46726
47684
|
};
|
|
46727
|
-
var
|
|
47685
|
+
var Arrow4 = () => /* @__PURE__ */ jsx127("svg", {
|
|
46728
47686
|
style: icon6,
|
|
46729
47687
|
xmlns: "http://www.w3.org/2000/svg",
|
|
46730
47688
|
viewBox: "0 0 448 512",
|
|
@@ -46889,7 +47847,7 @@ var BuiltWithRemotionShowcase = () => {
|
|
|
46889
47847
|
href: videoApps[activeTab].link,
|
|
46890
47848
|
children: [
|
|
46891
47849
|
videoApps[activeTab].buttonText,
|
|
46892
|
-
/* @__PURE__ */ jsx127(
|
|
47850
|
+
/* @__PURE__ */ jsx127(Arrow4, {})
|
|
46893
47851
|
]
|
|
46894
47852
|
})
|
|
46895
47853
|
]
|
|
@@ -48274,7 +49232,7 @@ var GithubButton = () => {
|
|
|
48274
49232
|
" ",
|
|
48275
49233
|
/* @__PURE__ */ jsx161("div", {
|
|
48276
49234
|
className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
|
|
48277
|
-
children: "
|
|
49235
|
+
children: "49k"
|
|
48278
49236
|
})
|
|
48279
49237
|
]
|
|
48280
49238
|
});
|