@remotion/promo-pages 4.0.473 → 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 +1032 -169
- package/dist/design.js +11817 -10959
- package/dist/experts.js +117 -73
- package/dist/homepage/Pricing.js +7780 -6922
- package/dist/prompts/PromptsGallery.js +11717 -10859
- package/dist/prompts/PromptsShow.js +11079 -10221
- package/dist/prompts/PromptsSubmit.js +11097 -10239
- package/dist/team.js +11716 -10858
- package/dist/template-modal-content.js +11807 -10949
- package/dist/templates.js +11130 -10272
- 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;
|
|
@@ -2808,11 +2808,17 @@ var SequenceManager = React11.createContext({
|
|
|
2808
2808
|
},
|
|
2809
2809
|
sequences: []
|
|
2810
2810
|
});
|
|
2811
|
+
var SequenceManagerRefContext = React11.createContext({
|
|
2812
|
+
current: []
|
|
2813
|
+
});
|
|
2811
2814
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
2812
2815
|
return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
2813
2816
|
};
|
|
2814
|
-
var
|
|
2815
|
-
|
|
2817
|
+
var VisualModePropStatusesContext = React11.createContext({
|
|
2818
|
+
propStatuses: {}
|
|
2819
|
+
});
|
|
2820
|
+
var VisualModePropStatusesRefContext = React11.createContext({
|
|
2821
|
+
current: {}
|
|
2816
2822
|
});
|
|
2817
2823
|
var VisualModeDragOverridesContext = React11.createContext({
|
|
2818
2824
|
getDragOverrides: () => {
|
|
@@ -2835,18 +2841,22 @@ var VisualModeSettersContext = React11.createContext({
|
|
|
2835
2841
|
clearEffectDragOverrides: () => {
|
|
2836
2842
|
throw new Error("VisualModeSettersContext not initialized");
|
|
2837
2843
|
},
|
|
2838
|
-
|
|
2844
|
+
setPropStatuses: () => {
|
|
2839
2845
|
throw new Error("VisualModeSettersContext not initialized");
|
|
2840
2846
|
}
|
|
2841
2847
|
});
|
|
2842
2848
|
var effectDragOverridesKey = (nodePath, effectIndex) => `${makeSequencePropsSubscriptionKey(nodePath)}.effects.${effectIndex}`;
|
|
2843
2849
|
var SequenceManagerProvider = ({ children }) => {
|
|
2844
2850
|
const [sequences, setSequences] = useState3([]);
|
|
2851
|
+
const sequencesRef = useRef4(sequences);
|
|
2852
|
+
sequencesRef.current = sequences;
|
|
2845
2853
|
const [dragOverrides, setControlOverrides] = useState3({});
|
|
2846
2854
|
const controlOverridesRef = useRef4(dragOverrides);
|
|
2847
2855
|
controlOverridesRef.current = dragOverrides;
|
|
2848
2856
|
const [effectDragOverridesState, setEffectDragOverridesState] = useState3({});
|
|
2849
|
-
const [
|
|
2857
|
+
const [propStatuses, setPropStatusesMapState] = useState3({});
|
|
2858
|
+
const propStatusesRef = useRef4(propStatuses);
|
|
2859
|
+
propStatusesRef.current = propStatuses;
|
|
2850
2860
|
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
2851
2861
|
setControlOverrides((prev) => ({
|
|
2852
2862
|
...prev,
|
|
@@ -2890,8 +2900,8 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
2890
2900
|
return next;
|
|
2891
2901
|
});
|
|
2892
2902
|
}, []);
|
|
2893
|
-
const
|
|
2894
|
-
|
|
2903
|
+
const setPropStatuses = useCallback5((nodePath, values) => {
|
|
2904
|
+
setPropStatusesMapState((prev) => {
|
|
2895
2905
|
const key = makeSequencePropsSubscriptionKey(nodePath);
|
|
2896
2906
|
const prevKey = prev[key];
|
|
2897
2907
|
const newKey = values(prevKey);
|
|
@@ -2922,11 +2932,11 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
2922
2932
|
const getEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
|
|
2923
2933
|
return effectDragOverridesState[effectDragOverridesKey(nodePath, effectIndex)] ?? {};
|
|
2924
2934
|
}, [effectDragOverridesState]);
|
|
2925
|
-
const
|
|
2935
|
+
const propStatusesContext = useMemo12(() => {
|
|
2926
2936
|
return {
|
|
2927
|
-
|
|
2937
|
+
propStatuses
|
|
2928
2938
|
};
|
|
2929
|
-
}, [
|
|
2939
|
+
}, [propStatuses]);
|
|
2930
2940
|
const dragOverridesContext = useMemo12(() => {
|
|
2931
2941
|
return {
|
|
2932
2942
|
getDragOverrides,
|
|
@@ -2939,24 +2949,30 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
2939
2949
|
clearDragOverrides,
|
|
2940
2950
|
setEffectDragOverrides,
|
|
2941
2951
|
clearEffectDragOverrides,
|
|
2942
|
-
|
|
2952
|
+
setPropStatuses
|
|
2943
2953
|
};
|
|
2944
2954
|
}, [
|
|
2945
2955
|
setDragOverrides,
|
|
2946
2956
|
clearDragOverrides,
|
|
2947
2957
|
setEffectDragOverrides,
|
|
2948
2958
|
clearEffectDragOverrides,
|
|
2949
|
-
|
|
2959
|
+
setPropStatuses
|
|
2950
2960
|
]);
|
|
2951
|
-
return /* @__PURE__ */ jsx10(
|
|
2952
|
-
value:
|
|
2953
|
-
children: /* @__PURE__ */ jsx10(
|
|
2954
|
-
value:
|
|
2955
|
-
children: /* @__PURE__ */ jsx10(
|
|
2956
|
-
value:
|
|
2957
|
-
children: /* @__PURE__ */ jsx10(
|
|
2958
|
-
value:
|
|
2959
|
-
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
|
+
})
|
|
2960
2976
|
})
|
|
2961
2977
|
})
|
|
2962
2978
|
})
|
|
@@ -4126,7 +4142,7 @@ var resolveDragOverrideValue = ({
|
|
|
4126
4142
|
return { type: "resolved", value: interpolated };
|
|
4127
4143
|
};
|
|
4128
4144
|
var getEffectiveVisualModeValue = ({
|
|
4129
|
-
|
|
4145
|
+
propStatus,
|
|
4130
4146
|
dragOverrideValue,
|
|
4131
4147
|
defaultValue,
|
|
4132
4148
|
frame = null,
|
|
@@ -4139,16 +4155,19 @@ var getEffectiveVisualModeValue = ({
|
|
|
4139
4155
|
if (dragOverride.type === "resolved" && dragOverride.value !== undefined) {
|
|
4140
4156
|
return dragOverride.value;
|
|
4141
4157
|
}
|
|
4142
|
-
if (
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4158
|
+
if (propStatus.status === "keyframed") {
|
|
4159
|
+
if (frame !== null) {
|
|
4160
|
+
return interpolateKeyframedStatus({
|
|
4161
|
+
frame,
|
|
4162
|
+
status: propStatus
|
|
4163
|
+
});
|
|
4164
|
+
}
|
|
4165
|
+
return shouldResortToDefaultValueIfUndefined ? defaultValue : undefined;
|
|
4147
4166
|
}
|
|
4148
|
-
if (
|
|
4167
|
+
if (propStatus.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
|
|
4149
4168
|
return defaultValue;
|
|
4150
4169
|
}
|
|
4151
|
-
return
|
|
4170
|
+
return propStatus.codeValue;
|
|
4152
4171
|
};
|
|
4153
4172
|
var OverrideIdsToNodePathsGettersContext = createContext16({
|
|
4154
4173
|
overrideIdToNodePathMappings: {}
|
|
@@ -4160,18 +4179,18 @@ var OverrideIdsToNodePathsSettersContext = createContext16({
|
|
|
4160
4179
|
});
|
|
4161
4180
|
var mergeOverrides = ({
|
|
4162
4181
|
descriptor,
|
|
4163
|
-
|
|
4182
|
+
propStatusOverrides,
|
|
4164
4183
|
dragOverrides,
|
|
4165
4184
|
frame
|
|
4166
4185
|
}) => {
|
|
4167
|
-
if (!
|
|
4186
|
+
if (!propStatusOverrides && !dragOverrides) {
|
|
4168
4187
|
return { params: descriptor.params, effectKey: descriptor.effectKey };
|
|
4169
4188
|
}
|
|
4170
4189
|
const merged = {
|
|
4171
4190
|
...descriptor.params
|
|
4172
4191
|
};
|
|
4173
|
-
if (
|
|
4174
|
-
for (const [key, value] of Object.entries(
|
|
4192
|
+
if (propStatusOverrides) {
|
|
4193
|
+
for (const [key, value] of Object.entries(propStatusOverrides)) {
|
|
4175
4194
|
if (value !== undefined) {
|
|
4176
4195
|
merged[key] = value;
|
|
4177
4196
|
}
|
|
@@ -4193,16 +4212,27 @@ var mergeOverrides = ({
|
|
|
4193
4212
|
effectKey: descriptor.definition.calculateKey(merged)
|
|
4194
4213
|
};
|
|
4195
4214
|
};
|
|
4196
|
-
var
|
|
4215
|
+
var resolvePropStatusOverrides = (propStatus, frame) => {
|
|
4197
4216
|
if (!propStatus) {
|
|
4198
4217
|
return null;
|
|
4199
4218
|
}
|
|
4200
4219
|
const out = {};
|
|
4201
4220
|
let hasAny = false;
|
|
4202
4221
|
for (const [key, status] of Object.entries(propStatus)) {
|
|
4203
|
-
if (status.status
|
|
4222
|
+
if (status.status === "static") {
|
|
4204
4223
|
out[key] = status.codeValue;
|
|
4205
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
|
+
}
|
|
4206
4236
|
}
|
|
4207
4237
|
}
|
|
4208
4238
|
return hasAny ? out : null;
|
|
@@ -4218,12 +4248,12 @@ var useMemoizedEffectDefinitions = (effects) => {
|
|
|
4218
4248
|
previousRef.current = definitions;
|
|
4219
4249
|
return definitions;
|
|
4220
4250
|
};
|
|
4221
|
-
var
|
|
4222
|
-
|
|
4251
|
+
var getEffectPropStatusesCtx = ({
|
|
4252
|
+
propStatuses,
|
|
4223
4253
|
nodePath,
|
|
4224
4254
|
effectIndex
|
|
4225
4255
|
}) => {
|
|
4226
|
-
const status =
|
|
4256
|
+
const status = propStatuses[makeSequencePropsSubscriptionKey(nodePath)];
|
|
4227
4257
|
if (!status) {
|
|
4228
4258
|
return { type: "cannot-update-sequence", reason: "not-found" };
|
|
4229
4259
|
}
|
|
@@ -4239,8 +4269,8 @@ var getEffectCodeValuesCtx = ({
|
|
|
4239
4269
|
}
|
|
4240
4270
|
return { type: "can-update-effect", props: effect.props };
|
|
4241
4271
|
};
|
|
4242
|
-
var
|
|
4243
|
-
const status =
|
|
4272
|
+
var getPropStatusesCtx = (propStatuses, nodePath) => {
|
|
4273
|
+
const status = propStatuses[makeSequencePropsSubscriptionKey(nodePath)];
|
|
4244
4274
|
if (!status) {
|
|
4245
4275
|
return;
|
|
4246
4276
|
}
|
|
@@ -4254,7 +4284,7 @@ var useMemoizedEffects = ({
|
|
|
4254
4284
|
overrideId
|
|
4255
4285
|
}) => {
|
|
4256
4286
|
const previousRef = useRef5(null);
|
|
4257
|
-
const {
|
|
4287
|
+
const { propStatuses } = useContext15(VisualModePropStatusesContext);
|
|
4258
4288
|
const { getEffectDragOverrides } = useContext15(VisualModeDragOverridesContext);
|
|
4259
4289
|
const frame = useCurrentFrame();
|
|
4260
4290
|
const { overrideIdToNodePathMappings } = useContext15(OverrideIdsToNodePathsGettersContext);
|
|
@@ -4268,17 +4298,17 @@ var useMemoizedEffects = ({
|
|
|
4268
4298
|
effectKey: descriptor.effectKey
|
|
4269
4299
|
};
|
|
4270
4300
|
}
|
|
4271
|
-
const effectStatus =
|
|
4272
|
-
|
|
4301
|
+
const effectStatus = getEffectPropStatusesCtx({
|
|
4302
|
+
propStatuses,
|
|
4273
4303
|
nodePath,
|
|
4274
4304
|
effectIndex: index
|
|
4275
4305
|
});
|
|
4276
|
-
const
|
|
4306
|
+
const propStatusOverrides = effectStatus.type === "can-update-effect" ? resolvePropStatusOverrides(effectStatus.props, frame) : null;
|
|
4277
4307
|
const dragOverridesMap = getEffectDragOverrides(nodePath, index);
|
|
4278
4308
|
const dragOverrides = Object.keys(dragOverridesMap).length === 0 ? null : dragOverridesMap;
|
|
4279
4309
|
const { params, effectKey } = mergeOverrides({
|
|
4280
4310
|
descriptor,
|
|
4281
|
-
|
|
4311
|
+
propStatusOverrides,
|
|
4282
4312
|
dragOverrides,
|
|
4283
4313
|
frame
|
|
4284
4314
|
});
|
|
@@ -4430,15 +4460,15 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
4430
4460
|
const merged = {};
|
|
4431
4461
|
const propsToDelete = new Set;
|
|
4432
4462
|
for (const key of Object.keys(currentValue)) {
|
|
4433
|
-
const
|
|
4463
|
+
const status = propStatus?.[key] ?? null;
|
|
4434
4464
|
const field = findFieldInSchema(schema, key);
|
|
4435
4465
|
if (field?.type === "hidden") {
|
|
4436
4466
|
continue;
|
|
4437
4467
|
}
|
|
4438
4468
|
let value;
|
|
4439
|
-
if (
|
|
4469
|
+
if (status === null) {
|
|
4440
4470
|
value = currentValue[key];
|
|
4441
|
-
} else if (isKeyframedStatus(
|
|
4471
|
+
} else if (isKeyframedStatus(status)) {
|
|
4442
4472
|
if (field?.type === "array" || field?.keyframable === false) {
|
|
4443
4473
|
value = currentValue[key];
|
|
4444
4474
|
} else {
|
|
@@ -4451,18 +4481,18 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
4451
4481
|
} else if (frame !== null) {
|
|
4452
4482
|
const interpolated = interpolateKeyframedStatus({
|
|
4453
4483
|
frame,
|
|
4454
|
-
status
|
|
4484
|
+
status
|
|
4455
4485
|
});
|
|
4456
4486
|
value = interpolated ?? currentValue[key];
|
|
4457
4487
|
} else {
|
|
4458
4488
|
value = currentValue[key];
|
|
4459
4489
|
}
|
|
4460
4490
|
}
|
|
4461
|
-
} else if (
|
|
4491
|
+
} else if (status.status === "computed") {
|
|
4462
4492
|
value = currentValue[key];
|
|
4463
4493
|
} else {
|
|
4464
4494
|
value = getEffectiveVisualModeValue({
|
|
4465
|
-
|
|
4495
|
+
propStatus: status,
|
|
4466
4496
|
dragOverrideValue: overrideValues[key],
|
|
4467
4497
|
defaultValue: field?.default,
|
|
4468
4498
|
frame,
|
|
@@ -4554,7 +4584,7 @@ var wrapInSchema = ({
|
|
|
4554
4584
|
ref
|
|
4555
4585
|
});
|
|
4556
4586
|
}
|
|
4557
|
-
const {
|
|
4587
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
4558
4588
|
const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
4559
4589
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
4560
4590
|
const frame = useCurrentFrame();
|
|
@@ -4593,14 +4623,14 @@ var wrapInSchema = ({
|
|
|
4593
4623
|
schema,
|
|
4594
4624
|
currentValue: currentRuntimeValueDotNotation,
|
|
4595
4625
|
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
4596
|
-
propStatus: nodePath === null ? undefined :
|
|
4626
|
+
propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses, nodePath),
|
|
4597
4627
|
frame
|
|
4598
4628
|
});
|
|
4599
4629
|
}, [
|
|
4600
4630
|
currentRuntimeValueDotNotation,
|
|
4601
4631
|
getDragOverrides,
|
|
4602
4632
|
nodePath,
|
|
4603
|
-
|
|
4633
|
+
propStatuses,
|
|
4604
4634
|
frame
|
|
4605
4635
|
]);
|
|
4606
4636
|
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
@@ -5838,7 +5868,7 @@ var calculateMediaDuration = ({
|
|
|
5838
5868
|
duration -= trimBefore;
|
|
5839
5869
|
}
|
|
5840
5870
|
const actualDuration = duration / playbackRate;
|
|
5841
|
-
return
|
|
5871
|
+
return Number(actualDuration.toFixed(10));
|
|
5842
5872
|
};
|
|
5843
5873
|
var LoopContext = createContext18(null);
|
|
5844
5874
|
var useLoop = () => {
|
|
@@ -10960,6 +10990,8 @@ function useRemotionContexts() {
|
|
|
10960
10990
|
const resolveCompositionContext = React38.useContext(ResolveCompositionContext);
|
|
10961
10991
|
const renderAssetManagerContext = React38.useContext(RenderAssetManager);
|
|
10962
10992
|
const sequenceManagerContext = React38.useContext(SequenceManager);
|
|
10993
|
+
const sequenceManagerRefContext = React38.useContext(SequenceManagerRefContext);
|
|
10994
|
+
const visualModePropStatusesRefContext = React38.useContext(VisualModePropStatusesRefContext);
|
|
10963
10995
|
const bufferManagerContext = React38.useContext(BufferingContextReact);
|
|
10964
10996
|
const logLevelContext = React38.useContext(LogLevelContext);
|
|
10965
10997
|
return useMemo37(() => ({
|
|
@@ -10973,6 +11005,8 @@ function useRemotionContexts() {
|
|
|
10973
11005
|
resolveCompositionContext,
|
|
10974
11006
|
renderAssetManagerContext,
|
|
10975
11007
|
sequenceManagerContext,
|
|
11008
|
+
sequenceManagerRefContext,
|
|
11009
|
+
visualModePropStatusesRefContext,
|
|
10976
11010
|
bufferManagerContext,
|
|
10977
11011
|
logLevelContext
|
|
10978
11012
|
}), [
|
|
@@ -10986,6 +11020,8 @@ function useRemotionContexts() {
|
|
|
10986
11020
|
resolveCompositionContext,
|
|
10987
11021
|
renderAssetManagerContext,
|
|
10988
11022
|
sequenceManagerContext,
|
|
11023
|
+
sequenceManagerRefContext,
|
|
11024
|
+
visualModePropStatusesRefContext,
|
|
10989
11025
|
bufferManagerContext,
|
|
10990
11026
|
logLevelContext
|
|
10991
11027
|
]);
|
|
@@ -11002,21 +11038,27 @@ var RemotionContextProvider = (props2) => {
|
|
|
11002
11038
|
value: contexts.preloadContext,
|
|
11003
11039
|
children: /* @__PURE__ */ jsx35(CompositionManager.Provider, {
|
|
11004
11040
|
value: contexts.compositionManagerCtx,
|
|
11005
|
-
children: /* @__PURE__ */ jsx35(
|
|
11006
|
-
value: contexts.
|
|
11007
|
-
children: /* @__PURE__ */ jsx35(
|
|
11008
|
-
value: contexts.
|
|
11009
|
-
children: /* @__PURE__ */ jsx35(
|
|
11010
|
-
value: contexts.
|
|
11011
|
-
children: /* @__PURE__ */ jsx35(
|
|
11012
|
-
value: contexts.
|
|
11013
|
-
children: /* @__PURE__ */ jsx35(
|
|
11014
|
-
value: contexts.
|
|
11015
|
-
children: /* @__PURE__ */ jsx35(
|
|
11016
|
-
value: contexts.
|
|
11017
|
-
children: /* @__PURE__ */ jsx35(
|
|
11018
|
-
value: contexts.
|
|
11019
|
-
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
|
+
})
|
|
11020
11062
|
})
|
|
11021
11063
|
})
|
|
11022
11064
|
})
|
|
@@ -11047,10 +11089,12 @@ var Internals = {
|
|
|
11047
11089
|
VideoForPreview,
|
|
11048
11090
|
CompositionManager,
|
|
11049
11091
|
CompositionSetters,
|
|
11050
|
-
|
|
11092
|
+
VisualModePropStatusesContext,
|
|
11093
|
+
VisualModePropStatusesRefContext,
|
|
11051
11094
|
VisualModeDragOverridesContext,
|
|
11052
11095
|
VisualModeSettersContext,
|
|
11053
11096
|
SequenceManager,
|
|
11097
|
+
SequenceManagerRefContext,
|
|
11054
11098
|
SequenceStackTracesUpdateContext,
|
|
11055
11099
|
wrapInSchema,
|
|
11056
11100
|
sequenceSchema,
|
|
@@ -11169,8 +11213,8 @@ var Internals = {
|
|
|
11169
11213
|
OverrideIdsToNodePathsSettersContext,
|
|
11170
11214
|
findPropsToDelete,
|
|
11171
11215
|
makeSequencePropsSubscriptionKey,
|
|
11172
|
-
|
|
11173
|
-
|
|
11216
|
+
getPropStatusesCtx,
|
|
11217
|
+
getEffectPropStatusesCtx,
|
|
11174
11218
|
hiddenField,
|
|
11175
11219
|
durationInFramesField,
|
|
11176
11220
|
fromField
|
|
@@ -12528,7 +12572,7 @@ var ExpertsPageContent = ({ Link }) => {
|
|
|
12528
12572
|
import * as React23 from "react";
|
|
12529
12573
|
import * as React8 from "react";
|
|
12530
12574
|
import { Fragment as Fragment22, jsx as jsx45 } from "react/jsx-runtime";
|
|
12531
|
-
import React52, { useCallback as useCallback25, useRef as
|
|
12575
|
+
import React52, { useCallback as useCallback25, useRef as useRef29, useState as useState22 } from "react";
|
|
12532
12576
|
|
|
12533
12577
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
12534
12578
|
function r(e) {
|
|
@@ -16636,7 +16680,7 @@ var PathInternals = {
|
|
|
16636
16680
|
};
|
|
16637
16681
|
|
|
16638
16682
|
// ../shapes/dist/esm/index.mjs
|
|
16639
|
-
import React3, { useMemo as useMemo42 } from "react";
|
|
16683
|
+
import React3, { useCallback as useCallback24, useMemo as useMemo42, useRef as useRef28 } from "react";
|
|
16640
16684
|
import { version } from "react-dom";
|
|
16641
16685
|
import { jsx as jsx43, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
16642
16686
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16648,6 +16692,141 @@ import { jsx as jsx72 } from "react/jsx-runtime";
|
|
|
16648
16692
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
16649
16693
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
16650
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
|
+
};
|
|
16651
16830
|
var doesReactSupportTransformOriginProperty = (version2) => {
|
|
16652
16831
|
if (version2.includes("canary") || version2.includes("experimental")) {
|
|
16653
16832
|
const last8Chars = parseInt(version2.slice(-8), 10);
|
|
@@ -16657,6 +16836,8 @@ var doesReactSupportTransformOriginProperty = (version2) => {
|
|
|
16657
16836
|
return major > 18;
|
|
16658
16837
|
};
|
|
16659
16838
|
var RenderSvg = ({
|
|
16839
|
+
defaultName,
|
|
16840
|
+
documentationLink,
|
|
16660
16841
|
width,
|
|
16661
16842
|
height,
|
|
16662
16843
|
path,
|
|
@@ -16664,7 +16845,16 @@ var RenderSvg = ({
|
|
|
16664
16845
|
pathStyle,
|
|
16665
16846
|
transformOrigin,
|
|
16666
16847
|
debug,
|
|
16848
|
+
effects = [],
|
|
16667
16849
|
instructions,
|
|
16850
|
+
pixelDensity,
|
|
16851
|
+
durationInFrames,
|
|
16852
|
+
from,
|
|
16853
|
+
hidden,
|
|
16854
|
+
name,
|
|
16855
|
+
showInTimeline,
|
|
16856
|
+
_experimentalControls: controls,
|
|
16857
|
+
stack,
|
|
16668
16858
|
...props
|
|
16669
16859
|
}) => {
|
|
16670
16860
|
const actualStyle = useMemo42(() => {
|
|
@@ -16679,13 +16869,23 @@ var RenderSvg = ({
|
|
|
16679
16869
|
...pathStyle ?? {}
|
|
16680
16870
|
};
|
|
16681
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();
|
|
16682
16881
|
const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
|
|
16683
|
-
|
|
16882
|
+
const svg = /* @__PURE__ */ jsxs5("svg", {
|
|
16883
|
+
ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
|
|
16684
16884
|
width,
|
|
16685
16885
|
height,
|
|
16686
16886
|
viewBox: `0 0 ${width} ${height}`,
|
|
16687
16887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16688
|
-
style: actualStyle,
|
|
16888
|
+
style: effects.length === 0 || !videoConfig ? actualStyle : { overflow: "visible" },
|
|
16689
16889
|
children: [
|
|
16690
16890
|
/* @__PURE__ */ jsx43("path", {
|
|
16691
16891
|
...reactSupportsTransformOrigin ? {
|
|
@@ -16740,7 +16940,160 @@ var RenderSvg = ({
|
|
|
16740
16940
|
}) : null
|
|
16741
16941
|
]
|
|
16742
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
|
+
};
|
|
16743
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
|
+
});
|
|
17090
|
+
};
|
|
17091
|
+
var Arrow = Internals.wrapInSchema({
|
|
17092
|
+
Component: ArrowInner,
|
|
17093
|
+
schema: arrowSchema,
|
|
17094
|
+
supportsEffects: true
|
|
17095
|
+
});
|
|
17096
|
+
Internals.addSequenceStackTraces(Arrow);
|
|
16744
17097
|
var makeCircle = ({ radius }) => {
|
|
16745
17098
|
const instructions = [
|
|
16746
17099
|
{
|
|
@@ -16781,6 +17134,83 @@ var makeCircle = ({ radius }) => {
|
|
|
16781
17134
|
transformOrigin: `${radius} ${radius}`
|
|
16782
17135
|
};
|
|
16783
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);
|
|
16784
17214
|
var makeHeart = ({
|
|
16785
17215
|
height,
|
|
16786
17216
|
aspectRatio = 1.1,
|
|
@@ -16870,7 +17300,30 @@ var makeHeart = ({
|
|
|
16870
17300
|
instructions
|
|
16871
17301
|
};
|
|
16872
17302
|
};
|
|
16873
|
-
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 = ({
|
|
16874
17327
|
aspectRatio,
|
|
16875
17328
|
height,
|
|
16876
17329
|
bottomRoundnessAdjustment = 0,
|
|
@@ -16878,6 +17331,8 @@ var Heart = ({
|
|
|
16878
17331
|
...props
|
|
16879
17332
|
}) => {
|
|
16880
17333
|
return /* @__PURE__ */ jsx52(RenderSvg, {
|
|
17334
|
+
defaultName: "<Heart>",
|
|
17335
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/heart",
|
|
16881
17336
|
...makeHeart({
|
|
16882
17337
|
aspectRatio,
|
|
16883
17338
|
height,
|
|
@@ -16887,6 +17342,12 @@ var Heart = ({
|
|
|
16887
17342
|
...props
|
|
16888
17343
|
});
|
|
16889
17344
|
};
|
|
17345
|
+
var Heart = Internals.wrapInSchema({
|
|
17346
|
+
Component: HeartInner,
|
|
17347
|
+
schema: heartSchema,
|
|
17348
|
+
supportsEffects: true
|
|
17349
|
+
});
|
|
17350
|
+
Internals.addSequenceStackTraces(Heart);
|
|
16890
17351
|
var getCoord = ({
|
|
16891
17352
|
counterClockwise,
|
|
16892
17353
|
actualProgress,
|
|
@@ -16992,6 +17453,54 @@ var makePie = ({
|
|
|
16992
17453
|
transformOrigin: `${radius} ${radius}`
|
|
16993
17454
|
};
|
|
16994
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);
|
|
16995
17504
|
var shortenVector = (vector, radius) => {
|
|
16996
17505
|
const [x, y] = vector;
|
|
16997
17506
|
const currentLength = Math.sqrt(x * x + y * y);
|
|
@@ -17116,6 +17625,104 @@ var joinPoints = (points, {
|
|
|
17116
17625
|
];
|
|
17117
17626
|
}).flat(1);
|
|
17118
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);
|
|
17119
17726
|
var makeRect = ({
|
|
17120
17727
|
width,
|
|
17121
17728
|
height,
|
|
@@ -17144,6 +17751,257 @@ var makeRect = ({
|
|
|
17144
17751
|
transformOrigin: transformOrigin.join(" ")
|
|
17145
17752
|
};
|
|
17146
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);
|
|
17147
18005
|
|
|
17148
18006
|
// ../svg-3d-engine/dist/esm/index.mjs
|
|
17149
18007
|
function truthy2(value) {
|
|
@@ -18210,7 +19068,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
18210
19068
|
// ../design/dist/esm/index.mjs
|
|
18211
19069
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
18212
19070
|
import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
18213
|
-
import { useEffect as useEffect23, useMemo as useMemo210, useRef as
|
|
19071
|
+
import { useEffect as useEffect23, useMemo as useMemo210, useRef as useRef30 } from "react";
|
|
18214
19072
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
18215
19073
|
import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
18216
19074
|
import React62 from "react";
|
|
@@ -18732,7 +19590,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
18732
19590
|
height: size
|
|
18733
19591
|
};
|
|
18734
19592
|
}, [size]);
|
|
18735
|
-
const pathsRef =
|
|
19593
|
+
const pathsRef = useRef30([]);
|
|
18736
19594
|
useEffect23(() => {
|
|
18737
19595
|
const animate = () => {
|
|
18738
19596
|
const now = performance.now();
|
|
@@ -18778,7 +19636,7 @@ var Button = ({
|
|
|
18778
19636
|
...rest
|
|
18779
19637
|
}) => {
|
|
18780
19638
|
const [dimensions, setDimensions] = useState22(null);
|
|
18781
|
-
const ref =
|
|
19639
|
+
const ref = useRef29(null);
|
|
18782
19640
|
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
18783
19641
|
const onPointerEnter = useCallback25((e) => {
|
|
18784
19642
|
if (e.pointerType !== "mouse") {
|
|
@@ -18908,7 +19766,7 @@ var CheckIcon = (props) => {
|
|
|
18908
19766
|
})
|
|
18909
19767
|
});
|
|
18910
19768
|
};
|
|
18911
|
-
var
|
|
19769
|
+
var Triangle2 = ({ rotated: rotated2 }) => /* @__PURE__ */ jsx83("svg", {
|
|
18912
19770
|
width: "12px",
|
|
18913
19771
|
height: "7px",
|
|
18914
19772
|
viewBox: "0 0 12 7",
|
|
@@ -18990,7 +19848,7 @@ var Counter = ({
|
|
|
18990
19848
|
...buttonContainer
|
|
18991
19849
|
},
|
|
18992
19850
|
onClick: increment,
|
|
18993
|
-
children: /* @__PURE__ */ jsx83(
|
|
19851
|
+
children: /* @__PURE__ */ jsx83(Triangle2, {
|
|
18994
19852
|
rotated: false
|
|
18995
19853
|
})
|
|
18996
19854
|
}),
|
|
@@ -19001,7 +19859,7 @@ var Counter = ({
|
|
|
19001
19859
|
...buttonContainer
|
|
19002
19860
|
},
|
|
19003
19861
|
onClick: decrement,
|
|
19004
|
-
children: /* @__PURE__ */ jsx83(
|
|
19862
|
+
children: /* @__PURE__ */ jsx83(Triangle2, {
|
|
19005
19863
|
rotated: true
|
|
19006
19864
|
})
|
|
19007
19865
|
})
|
|
@@ -21541,7 +22399,7 @@ var arrow3 = (options, deps) => ({
|
|
|
21541
22399
|
options: [options, deps]
|
|
21542
22400
|
});
|
|
21543
22401
|
var NAME = "Arrow";
|
|
21544
|
-
var
|
|
22402
|
+
var Arrow2 = React222.forwardRef((props, forwardedRef) => {
|
|
21545
22403
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
21546
22404
|
return /* @__PURE__ */ jsx202(Primitive.svg, {
|
|
21547
22405
|
...arrowProps,
|
|
@@ -21553,8 +22411,8 @@ var Arrow = React222.forwardRef((props, forwardedRef) => {
|
|
|
21553
22411
|
children: props.asChild ? children : /* @__PURE__ */ jsx202("polygon", { points: "0,0 30,0 15,10" })
|
|
21554
22412
|
});
|
|
21555
22413
|
});
|
|
21556
|
-
|
|
21557
|
-
var Root2 =
|
|
22414
|
+
Arrow2.displayName = NAME;
|
|
22415
|
+
var Root2 = Arrow2;
|
|
21558
22416
|
function useSize(element) {
|
|
21559
22417
|
const [size4, setSize] = React232.useState(undefined);
|
|
21560
22418
|
useLayoutEffect22(() => {
|
|
@@ -21820,7 +22678,7 @@ function getSideAndAlignFromPlacement(placement) {
|
|
|
21820
22678
|
var Root22 = Popper;
|
|
21821
22679
|
var Anchor = PopperAnchor;
|
|
21822
22680
|
var Content = PopperContent;
|
|
21823
|
-
var
|
|
22681
|
+
var Arrow22 = PopperArrow;
|
|
21824
22682
|
var PORTAL_NAME = "Portal";
|
|
21825
22683
|
var Portal = React25.forwardRef((props, forwardedRef) => {
|
|
21826
22684
|
const { container: containerProp, ...portalProps } = props;
|
|
@@ -23564,7 +24422,7 @@ var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
|
23564
24422
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23565
24423
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
23566
24424
|
const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
|
|
23567
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx242(
|
|
24425
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx242(Arrow22, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
23568
24426
|
});
|
|
23569
24427
|
SelectArrow.displayName = ARROW_NAME2;
|
|
23570
24428
|
function shouldShowPlaceholder(value) {
|
|
@@ -24898,7 +25756,7 @@ var Textarea = React51.forwardRef(({ className, style, ...props }, ref) => {
|
|
|
24898
25756
|
});
|
|
24899
25757
|
});
|
|
24900
25758
|
Textarea.displayName = "Textarea";
|
|
24901
|
-
var
|
|
25759
|
+
var Triangle22 = (props) => {
|
|
24902
25760
|
return /* @__PURE__ */ jsx362("svg", {
|
|
24903
25761
|
viewBox: "0 0 127 131",
|
|
24904
25762
|
fill: "none",
|
|
@@ -24911,7 +25769,7 @@ var Triangle2 = (props) => {
|
|
|
24911
25769
|
};
|
|
24912
25770
|
|
|
24913
25771
|
// src/components/homepage/FreePricing.tsx
|
|
24914
|
-
import React53, { useCallback as
|
|
25772
|
+
import React53, { useCallback as useCallback36, useMemo as useMemo52 } from "react";
|
|
24915
25773
|
|
|
24916
25774
|
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
24917
25775
|
var CLASS_PART_SEPARATOR2 = "-";
|
|
@@ -26558,7 +27416,7 @@ var CompanyPricing = () => {
|
|
|
26558
27416
|
const [automatorsSelected, setAutomatorsSelected] = React53.useState(true);
|
|
26559
27417
|
const [devSeatCount, setDevSeatCount] = React53.useState(3);
|
|
26560
27418
|
const [cloudRenders, setCloudRenders] = React53.useState(1e4);
|
|
26561
|
-
const formatPrice =
|
|
27419
|
+
const formatPrice = useCallback36((price) => {
|
|
26562
27420
|
const formatter = new Intl.NumberFormat("en-US", {
|
|
26563
27421
|
style: "currency",
|
|
26564
27422
|
currency: "USD",
|
|
@@ -27437,7 +28295,7 @@ var GitHubStars = () => {
|
|
|
27437
28295
|
width: "45px"
|
|
27438
28296
|
}),
|
|
27439
28297
|
/* @__PURE__ */ jsx56(StatItemContent, {
|
|
27440
|
-
content: "
|
|
28298
|
+
content: "49k",
|
|
27441
28299
|
width: "80px",
|
|
27442
28300
|
fontSize: "2.5rem",
|
|
27443
28301
|
fontWeight: "bold"
|
|
@@ -27622,8 +28480,8 @@ import { jsx as jsx314 } from "react/jsx-runtime";
|
|
|
27622
28480
|
import { useEffect as useEffect210, useState as useState210 } from "react";
|
|
27623
28481
|
import { useLayoutEffect as useLayoutEffect23 } from "react";
|
|
27624
28482
|
import { useContext as useContext47, useEffect as useEffect52, useRef as useRef46 } from "react";
|
|
27625
|
-
import { useEffect as useEffect310, useRef as
|
|
27626
|
-
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";
|
|
27627
28485
|
import { useEffect as useEffect43, useRef as useRef310 } from "react";
|
|
27628
28486
|
import { useCallback as useCallback210, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
|
|
27629
28487
|
import {
|
|
@@ -27653,7 +28511,7 @@ import { jsx as jsx55 } from "react/jsx-runtime";
|
|
|
27653
28511
|
import { useCallback as useCallback72, useEffect as useEffect112, useMemo as useMemo92, useRef as useRef82, useState as useState102 } from "react";
|
|
27654
28512
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
27655
28513
|
import { useCallback as useCallback42, useMemo as useMemo410, useRef as useRef52, useState as useState62 } from "react";
|
|
27656
|
-
import React54, { useCallback as
|
|
28514
|
+
import React54, { useCallback as useCallback38, useMemo as useMemo310, useState as useState52 } from "react";
|
|
27657
28515
|
import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
27658
28516
|
import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
27659
28517
|
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo54, useState as useState82 } from "react";
|
|
@@ -29470,7 +30328,7 @@ var usePlayer = () => {
|
|
|
29470
30328
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
29471
30329
|
}
|
|
29472
30330
|
const { buffering } = bufferingContext;
|
|
29473
|
-
const seek2 =
|
|
30331
|
+
const seek2 = useCallback37((newFrame) => {
|
|
29474
30332
|
const frameToSeekTo = config ? Internals.TimelinePosition.clampFrameToCompositionRange(newFrame, config.durationInFrames) : Math.max(0, newFrame);
|
|
29475
30333
|
if (video?.id) {
|
|
29476
30334
|
setTimelinePosition((c2) => ({ ...c2, [video.id]: frameToSeekTo }));
|
|
@@ -29478,7 +30336,7 @@ var usePlayer = () => {
|
|
|
29478
30336
|
frameRef.current = frameToSeekTo;
|
|
29479
30337
|
emitter.dispatchSeek(frameToSeekTo);
|
|
29480
30338
|
}, [config, emitter, setTimelinePosition, video?.id]);
|
|
29481
|
-
const play =
|
|
30339
|
+
const play = useCallback37((e) => {
|
|
29482
30340
|
if (imperativePlaying.current) {
|
|
29483
30341
|
return;
|
|
29484
30342
|
}
|
|
@@ -29505,7 +30363,7 @@ var usePlayer = () => {
|
|
|
29505
30363
|
seek2,
|
|
29506
30364
|
audioAndVideoTags
|
|
29507
30365
|
]);
|
|
29508
|
-
const pause =
|
|
30366
|
+
const pause = useCallback37(() => {
|
|
29509
30367
|
if (imperativePlaying.current) {
|
|
29510
30368
|
imperativePlaying.current = false;
|
|
29511
30369
|
setPlaying(false);
|
|
@@ -29513,7 +30371,7 @@ var usePlayer = () => {
|
|
|
29513
30371
|
audioContext?.suspend();
|
|
29514
30372
|
}
|
|
29515
30373
|
}, [emitter, imperativePlaying, setPlaying, audioContext]);
|
|
29516
|
-
const pauseAndReturnToPlayStart =
|
|
30374
|
+
const pauseAndReturnToPlayStart = useCallback37(() => {
|
|
29517
30375
|
if (imperativePlaying.current) {
|
|
29518
30376
|
imperativePlaying.current = false;
|
|
29519
30377
|
frameRef.current = playStart.current;
|
|
@@ -29528,7 +30386,7 @@ var usePlayer = () => {
|
|
|
29528
30386
|
}
|
|
29529
30387
|
}, [config, emitter, imperativePlaying, setPlaying, setTimelinePosition]);
|
|
29530
30388
|
const videoId = video?.id;
|
|
29531
|
-
const frameBack =
|
|
30389
|
+
const frameBack = useCallback37((frames) => {
|
|
29532
30390
|
if (!videoId) {
|
|
29533
30391
|
return null;
|
|
29534
30392
|
}
|
|
@@ -29547,7 +30405,7 @@ var usePlayer = () => {
|
|
|
29547
30405
|
};
|
|
29548
30406
|
});
|
|
29549
30407
|
}, [imperativePlaying, setFrame, videoId]);
|
|
29550
|
-
const frameForward =
|
|
30408
|
+
const frameForward = useCallback37((frames) => {
|
|
29551
30409
|
if (!videoId) {
|
|
29552
30410
|
return null;
|
|
29553
30411
|
}
|
|
@@ -29566,20 +30424,20 @@ var usePlayer = () => {
|
|
|
29566
30424
|
};
|
|
29567
30425
|
});
|
|
29568
30426
|
}, [videoId, imperativePlaying, lastFrame, setFrame]);
|
|
29569
|
-
const toggle =
|
|
30427
|
+
const toggle = useCallback37((e) => {
|
|
29570
30428
|
if (imperativePlaying.current) {
|
|
29571
30429
|
pause();
|
|
29572
30430
|
} else {
|
|
29573
30431
|
play(e);
|
|
29574
30432
|
}
|
|
29575
30433
|
}, [imperativePlaying, pause, play]);
|
|
29576
|
-
const isPlaying =
|
|
30434
|
+
const isPlaying = useCallback37(() => {
|
|
29577
30435
|
return imperativePlaying.current;
|
|
29578
30436
|
}, [imperativePlaying]);
|
|
29579
|
-
const getCurrentFrame =
|
|
30437
|
+
const getCurrentFrame = useCallback37(() => {
|
|
29580
30438
|
return frameRef.current;
|
|
29581
30439
|
}, [frameRef]);
|
|
29582
|
-
const isBuffering =
|
|
30440
|
+
const isBuffering = useCallback37(() => {
|
|
29583
30441
|
return buffering.current;
|
|
29584
30442
|
}, [buffering]);
|
|
29585
30443
|
const returnValue = useMemo53(() => {
|
|
@@ -29625,7 +30483,7 @@ var useBrowserMediaSession = ({
|
|
|
29625
30483
|
playbackRate
|
|
29626
30484
|
}) => {
|
|
29627
30485
|
const { playing, pause, play, emitter, getCurrentFrame, seek: seek2 } = usePlayer();
|
|
29628
|
-
const hasEverPlayed =
|
|
30486
|
+
const hasEverPlayed = useRef211(false);
|
|
29629
30487
|
useEffect310(() => {
|
|
29630
30488
|
if (playing) {
|
|
29631
30489
|
hasEverPlayed.current = true;
|
|
@@ -30332,7 +31190,7 @@ var DefaultVolumeSlider = ({
|
|
|
30332
31190
|
}, [isVertical]);
|
|
30333
31191
|
const randomId = typeof React54.useId === "undefined" ? "volume-slider" : React54.useId();
|
|
30334
31192
|
const [randomClass] = useState52(() => `__remotion-volume-slider-${random(randomId)}`.replace(".", ""));
|
|
30335
|
-
const onVolumeChange =
|
|
31193
|
+
const onVolumeChange = useCallback38((e) => {
|
|
30336
31194
|
setVolume(parseFloat(e.target.value));
|
|
30337
31195
|
}, [setVolume]);
|
|
30338
31196
|
const inputStyle = useMemo310(() => {
|
|
@@ -32518,7 +33376,7 @@ var Thumbnail = forward2(ThumbnailFn);
|
|
|
32518
33376
|
|
|
32519
33377
|
// src/components/homepage/Demo/index.tsx
|
|
32520
33378
|
import {
|
|
32521
|
-
useCallback as
|
|
33379
|
+
useCallback as useCallback55,
|
|
32522
33380
|
useEffect as useEffect58,
|
|
32523
33381
|
useMemo as useMemo67,
|
|
32524
33382
|
useRef as useRef58,
|
|
@@ -33319,12 +34177,12 @@ import { jsx as jsx216 } from "react/jsx-runtime";
|
|
|
33319
34177
|
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
33320
34178
|
import React63, { useMemo as useMemo63, useState as useState63 } from "react";
|
|
33321
34179
|
import {
|
|
33322
|
-
useCallback as
|
|
34180
|
+
useCallback as useCallback39,
|
|
33323
34181
|
useContext as useContext49,
|
|
33324
34182
|
useEffect as useEffect212,
|
|
33325
34183
|
useLayoutEffect as useLayoutEffect34,
|
|
33326
34184
|
useMemo as useMemo412,
|
|
33327
|
-
useRef as
|
|
34185
|
+
useRef as useRef212,
|
|
33328
34186
|
useState as useState43
|
|
33329
34187
|
} from "react";
|
|
33330
34188
|
import { jsx as jsx412 } from "react/jsx-runtime";
|
|
@@ -36212,7 +37070,12 @@ var makeKeyframeBank = async ({
|
|
|
36212
37070
|
}
|
|
36213
37071
|
const roundedTimestamp = roundTo4Digits(timestamp);
|
|
36214
37072
|
const firstFrameTimestamp = roundTo4Digits(frameTimestamps[0]);
|
|
37073
|
+
const range = getRangeOfTimestamps();
|
|
37074
|
+
if (!range) {
|
|
37075
|
+
return false;
|
|
37076
|
+
}
|
|
36215
37077
|
const lastFrameTimestamp = roundTo4Digits(frameTimestamps[frameTimestamps.length - 1]);
|
|
37078
|
+
const lastFrameEndTimestamp = roundTo4Digits(range.lastTimestamp);
|
|
36216
37079
|
if (hasReachedEndOfVideo && roundedTimestamp > lastFrameTimestamp) {
|
|
36217
37080
|
return true;
|
|
36218
37081
|
}
|
|
@@ -36221,7 +37084,7 @@ var makeKeyframeBank = async ({
|
|
|
36221
37084
|
const firstFrameDoesSatisfy = firstFrameIsInitialFrame && roundedTimestamp >= initialTimestampRequest;
|
|
36222
37085
|
return firstFrameDoesSatisfy;
|
|
36223
37086
|
}
|
|
36224
|
-
if (roundedTimestamp - BIGGEST_ALLOWED_JUMP_FORWARD_SECONDS >
|
|
37087
|
+
if (roundedTimestamp - BIGGEST_ALLOWED_JUMP_FORWARD_SECONDS > lastFrameEndTimestamp) {
|
|
36225
37088
|
return false;
|
|
36226
37089
|
}
|
|
36227
37090
|
return true;
|
|
@@ -37915,13 +38778,13 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
37915
38778
|
...props
|
|
37916
38779
|
}) => {
|
|
37917
38780
|
const src = usePreload22(unpreloadedSrc);
|
|
37918
|
-
const canvasRef =
|
|
38781
|
+
const canvasRef = useRef212(null);
|
|
37919
38782
|
const videoConfig = useUnsafeVideoConfig22();
|
|
37920
38783
|
const frame = useCurrentFrame();
|
|
37921
|
-
const mediaPlayerRef =
|
|
37922
|
-
const initialTrimBeforeRef =
|
|
37923
|
-
const initialTrimAfterRef =
|
|
37924
|
-
const initialOnVideoFrameRef =
|
|
38784
|
+
const mediaPlayerRef = useRef212(null);
|
|
38785
|
+
const initialTrimBeforeRef = useRef212(trimBefore);
|
|
38786
|
+
const initialTrimAfterRef = useRef212(trimAfter);
|
|
38787
|
+
const initialOnVideoFrameRef = useRef212(onVideoFrame);
|
|
37925
38788
|
const [initialRequestInit] = useState43(requestInit);
|
|
37926
38789
|
const [mediaPlayerReady, setMediaPlayerReady] = useState43(false);
|
|
37927
38790
|
const [shouldFallbackToNativeVideo, setShouldFallbackToNativeVideo] = useState43(false);
|
|
@@ -37929,11 +38792,11 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
37929
38792
|
const { playbackRate: globalPlaybackRate } = Internals.usePlaybackRate();
|
|
37930
38793
|
const sharedAudioContext = useContext49(SharedAudioContext22);
|
|
37931
38794
|
const buffer = useBufferState();
|
|
37932
|
-
const canvasRefCallback =
|
|
38795
|
+
const canvasRefCallback = useCallback39((canvas) => {
|
|
37933
38796
|
canvasRef.current = canvas;
|
|
37934
38797
|
refForOutline.current = canvas;
|
|
37935
38798
|
}, [refForOutline]);
|
|
37936
|
-
const fallbackVideoRef =
|
|
38799
|
+
const fallbackVideoRef = useCallback39((video) => {
|
|
37937
38800
|
refForOutline.current = video;
|
|
37938
38801
|
}, [refForOutline]);
|
|
37939
38802
|
const [mediaMuted] = useMediaMutedState22();
|
|
@@ -37949,16 +38812,16 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
37949
38812
|
}
|
|
37950
38813
|
warnAboutTooHighVolume22(userPreferredVolume);
|
|
37951
38814
|
const effectChainState = useEffectChainState2();
|
|
37952
|
-
const effectsRef =
|
|
38815
|
+
const effectsRef = useRef212(effects);
|
|
37953
38816
|
effectsRef.current = effects;
|
|
37954
|
-
const effectChainStateRef =
|
|
38817
|
+
const effectChainStateRef = useRef212(effectChainState);
|
|
37955
38818
|
effectChainStateRef.current = effectChainState;
|
|
37956
38819
|
const parentSequence = useContext49(SequenceContext22);
|
|
37957
38820
|
const isPremounting = Boolean(parentSequence?.premounting);
|
|
37958
38821
|
const isPostmounting = Boolean(parentSequence?.postmounting);
|
|
37959
38822
|
const sequenceOffset = ((parentSequence?.cumulatedFrom ?? 0) + (parentSequence?.relativeFrom ?? 0)) / videoConfig.fps;
|
|
37960
38823
|
const currentTime = frame / videoConfig.fps;
|
|
37961
|
-
const currentTimeRef =
|
|
38824
|
+
const currentTimeRef = useRef212(currentTime);
|
|
37962
38825
|
currentTimeRef.current = currentTime;
|
|
37963
38826
|
const preloadedSrc = usePreload22(src);
|
|
37964
38827
|
const buffering = useContext49(Internals.BufferingContextReact);
|
|
@@ -37967,16 +38830,16 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
37967
38830
|
}
|
|
37968
38831
|
const effectiveMuted = muted || mediaMuted || userPreferredVolume <= 0;
|
|
37969
38832
|
const isPlayerBuffering = Internals.useIsPlayerBuffering(buffering);
|
|
37970
|
-
const initialPlaying =
|
|
37971
|
-
const initialIsPremounting =
|
|
37972
|
-
const initialIsPostmounting =
|
|
37973
|
-
const initialGlobalPlaybackRate =
|
|
37974
|
-
const initialPlaybackRate =
|
|
37975
|
-
const initialMuted =
|
|
37976
|
-
const initialSequenceDuration =
|
|
37977
|
-
const initialSequenceOffset =
|
|
37978
|
-
const hasDrawnRealFrameRef =
|
|
37979
|
-
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);
|
|
37980
38843
|
isPremountingRef.current = isPremounting;
|
|
37981
38844
|
useLayoutEffect34(() => {
|
|
37982
38845
|
if (!_experimentalInitiallyDrawCachedFrame) {
|
|
@@ -38877,19 +39740,19 @@ var Video = Internals.wrapInSchema({
|
|
|
38877
39740
|
Internals.addSequenceStackTraces(Video);
|
|
38878
39741
|
|
|
38879
39742
|
// src/components/homepage/Demo/Comp.tsx
|
|
38880
|
-
import { useCallback as
|
|
39743
|
+
import { useCallback as useCallback47, useEffect as useEffect50, useMemo as useMemo60, useState as useState48 } from "react";
|
|
38881
39744
|
|
|
38882
39745
|
// src/components/homepage/Demo/Cards.tsx
|
|
38883
39746
|
import {
|
|
38884
39747
|
createRef as createRef4,
|
|
38885
|
-
useCallback as
|
|
39748
|
+
useCallback as useCallback46,
|
|
38886
39749
|
useEffect as useEffect49,
|
|
38887
39750
|
useRef as useRef55,
|
|
38888
39751
|
useState as useState47
|
|
38889
39752
|
} from "react";
|
|
38890
39753
|
|
|
38891
39754
|
// src/components/homepage/Demo/Card.tsx
|
|
38892
|
-
import { useCallback as
|
|
39755
|
+
import { useCallback as useCallback43, useRef as useRef50 } from "react";
|
|
38893
39756
|
|
|
38894
39757
|
// src/components/homepage/Demo/math.ts
|
|
38895
39758
|
var paddingAndMargin = 20;
|
|
@@ -38923,10 +39786,10 @@ var getIndexFromPosition = (clientX, clientY) => {
|
|
|
38923
39786
|
};
|
|
38924
39787
|
|
|
38925
39788
|
// src/components/homepage/Demo/Switcher.tsx
|
|
38926
|
-
import { useCallback as
|
|
39789
|
+
import { useCallback as useCallback41 } from "react";
|
|
38927
39790
|
import { jsx as jsx61, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
38928
39791
|
var Switcher = ({ type, theme, onTap }) => {
|
|
38929
|
-
const onPointerDown =
|
|
39792
|
+
const onPointerDown = useCallback41((e) => {
|
|
38930
39793
|
e.stopPropagation();
|
|
38931
39794
|
onTap();
|
|
38932
39795
|
}, [onTap]);
|
|
@@ -38989,7 +39852,7 @@ var Card2 = ({
|
|
|
38989
39852
|
const refToUse = refsToUse[index2];
|
|
38990
39853
|
const stopPrevious = useRef50([]);
|
|
38991
39854
|
let newIndices = [...indices];
|
|
38992
|
-
const applyPositions =
|
|
39855
|
+
const applyPositions = useCallback43((except) => {
|
|
38993
39856
|
let stopped = false;
|
|
38994
39857
|
stopPrevious.current.forEach((s) => {
|
|
38995
39858
|
s();
|
|
@@ -39062,7 +39925,7 @@ var Card2 = ({
|
|
|
39062
39925
|
update();
|
|
39063
39926
|
});
|
|
39064
39927
|
}, [newIndices, onUpdate, positions, refsToUse, shouldBePositions]);
|
|
39065
|
-
const onPointerDown =
|
|
39928
|
+
const onPointerDown = useCallback43((e) => {
|
|
39066
39929
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
39067
39930
|
const cardLeft = refToUse.current.offsetLeft;
|
|
39068
39931
|
const cardTop = refToUse.current.offsetTop;
|
|
@@ -39123,7 +39986,7 @@ var Card2 = ({
|
|
|
39123
39986
|
}, { once: true });
|
|
39124
39987
|
refToUse.current.addEventListener("pointermove", onMove);
|
|
39125
39988
|
}, [applyPositions, index2, positions, refToUse, shouldBePositions]);
|
|
39126
|
-
const onPointerUp =
|
|
39989
|
+
const onPointerUp = useCallback43((e) => {
|
|
39127
39990
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
39128
39991
|
}, []);
|
|
39129
39992
|
const { x, y } = getPositionForIndex(index2);
|
|
@@ -39250,7 +40113,7 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
|
|
|
39250
40113
|
// src/components/homepage/Demo/EmojiCard.tsx
|
|
39251
40114
|
import {
|
|
39252
40115
|
forwardRef as forwardRef37,
|
|
39253
|
-
useCallback as
|
|
40116
|
+
useCallback as useCallback45,
|
|
39254
40117
|
useEffect as useEffect48,
|
|
39255
40118
|
useImperativeHandle as useImperativeHandle13,
|
|
39256
40119
|
useRef as useRef53
|
|
@@ -39534,7 +40397,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
39534
40397
|
const ref2 = useRef53(null);
|
|
39535
40398
|
const ref3 = useRef53(null);
|
|
39536
40399
|
const transforms = useRef53([-100, 0, 100]);
|
|
39537
|
-
const onLeft =
|
|
40400
|
+
const onLeft = useCallback45(() => {
|
|
39538
40401
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
39539
40402
|
return;
|
|
39540
40403
|
}
|
|
@@ -39545,7 +40408,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
39545
40408
|
transforms: transforms.current
|
|
39546
40409
|
});
|
|
39547
40410
|
}, []);
|
|
39548
|
-
const onRight =
|
|
40411
|
+
const onRight = useCallback45(() => {
|
|
39549
40412
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
39550
40413
|
return;
|
|
39551
40414
|
}
|
|
@@ -40005,11 +40868,11 @@ var Cards = ({
|
|
|
40005
40868
|
};
|
|
40006
40869
|
}, [onToggle]);
|
|
40007
40870
|
const ref = useRef55(null);
|
|
40008
|
-
const onLeft =
|
|
40871
|
+
const onLeft = useCallback46(() => {
|
|
40009
40872
|
ref.current?.onRight();
|
|
40010
40873
|
onRightPress();
|
|
40011
40874
|
}, [onRightPress]);
|
|
40012
|
-
const onRight =
|
|
40875
|
+
const onRight = useCallback46(() => {
|
|
40013
40876
|
ref.current?.onLeft();
|
|
40014
40877
|
onLeftPress();
|
|
40015
40878
|
}, [onLeftPress]);
|
|
@@ -40079,7 +40942,7 @@ var HomepageVideoComp = ({
|
|
|
40079
40942
|
onClickRight
|
|
40080
40943
|
}) => {
|
|
40081
40944
|
const [rerenders, setRerenders] = useState48(0);
|
|
40082
|
-
const onUpdate =
|
|
40945
|
+
const onUpdate = useCallback47((newIndices) => {
|
|
40083
40946
|
setRerenders(rerenders + 1);
|
|
40084
40947
|
updateCardOrder(newIndices);
|
|
40085
40948
|
}, [rerenders, updateCardOrder]);
|
|
@@ -40177,7 +41040,7 @@ import {
|
|
|
40177
41040
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
40178
41041
|
|
|
40179
41042
|
// ../core/dist/esm/version.mjs
|
|
40180
|
-
var VERSION2 = "4.0.
|
|
41043
|
+
var VERSION2 = "4.0.474";
|
|
40181
41044
|
|
|
40182
41045
|
// ../web-renderer/dist/esm/index.mjs
|
|
40183
41046
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -44814,7 +45677,7 @@ var renderMediaOnWeb = (options2) => {
|
|
|
44814
45677
|
};
|
|
44815
45678
|
|
|
44816
45679
|
// src/components/homepage/Demo/DemoRender.tsx
|
|
44817
|
-
import React69, { useCallback as
|
|
45680
|
+
import React69, { useCallback as useCallback48 } from "react";
|
|
44818
45681
|
import { z } from "zod";
|
|
44819
45682
|
|
|
44820
45683
|
// src/components/homepage/Demo/DemoErrorIcon.tsx
|
|
@@ -45015,7 +45878,7 @@ var RenderButton = ({ renderData, onError, playerRef }) => {
|
|
|
45015
45878
|
const [state, setState] = React69.useState({
|
|
45016
45879
|
type: "idle"
|
|
45017
45880
|
});
|
|
45018
|
-
const triggerRender =
|
|
45881
|
+
const triggerRender = useCallback48(async () => {
|
|
45019
45882
|
if (renderData === null) {
|
|
45020
45883
|
return;
|
|
45021
45884
|
}
|
|
@@ -45190,10 +46053,10 @@ var DragAndDropNudge = () => {
|
|
|
45190
46053
|
};
|
|
45191
46054
|
|
|
45192
46055
|
// src/components/homepage/Demo/PlayerSeekBar.tsx
|
|
45193
|
-
import { useCallback as
|
|
46056
|
+
import { useCallback as useCallback50, useEffect as useEffect53, useMemo as useMemo66, useRef as useRef56, useState as useState51 } from "react";
|
|
45194
46057
|
|
|
45195
46058
|
// src/components/homepage/layout/use-el-size.ts
|
|
45196
|
-
import { useCallback as
|
|
46059
|
+
import { useCallback as useCallback49, useEffect as useEffect51, useMemo as useMemo64, useState as useState50 } from "react";
|
|
45197
46060
|
var useElementSize2 = (ref) => {
|
|
45198
46061
|
const [size4, setSize] = useState50(null);
|
|
45199
46062
|
const observer = useMemo64(() => {
|
|
@@ -45207,7 +46070,7 @@ var useElementSize2 = (ref) => {
|
|
|
45207
46070
|
});
|
|
45208
46071
|
});
|
|
45209
46072
|
}, []);
|
|
45210
|
-
const updateSize =
|
|
46073
|
+
const updateSize = useCallback49(() => {
|
|
45211
46074
|
if (ref === null) {
|
|
45212
46075
|
return;
|
|
45213
46076
|
}
|
|
@@ -45359,7 +46222,7 @@ var PlayerSeekBar2 = ({
|
|
|
45359
46222
|
dragging: false
|
|
45360
46223
|
});
|
|
45361
46224
|
const width2 = size4?.width ?? 0;
|
|
45362
|
-
const onPointerDown =
|
|
46225
|
+
const onPointerDown = useCallback50((e) => {
|
|
45363
46226
|
if (e.button !== 0) {
|
|
45364
46227
|
return;
|
|
45365
46228
|
}
|
|
@@ -45373,7 +46236,7 @@ var PlayerSeekBar2 = ({
|
|
|
45373
46236
|
});
|
|
45374
46237
|
onSeekStart();
|
|
45375
46238
|
}, [durationInFrames, width2, playerRef, playing, onSeekStart]);
|
|
45376
|
-
const onPointerMove =
|
|
46239
|
+
const onPointerMove = useCallback50((e) => {
|
|
45377
46240
|
if (!size4) {
|
|
45378
46241
|
throw new Error("Player has no size");
|
|
45379
46242
|
}
|
|
@@ -45384,7 +46247,7 @@ var PlayerSeekBar2 = ({
|
|
|
45384
46247
|
const _frame = getFrameFromX2(e.clientX - posLeft, durationInFrames, size4.width);
|
|
45385
46248
|
playerRef.current.seekTo(_frame);
|
|
45386
46249
|
}, [dragging.dragging, durationInFrames, playerRef, size4]);
|
|
45387
|
-
const onPointerUp =
|
|
46250
|
+
const onPointerUp = useCallback50(() => {
|
|
45388
46251
|
setDragging({
|
|
45389
46252
|
dragging: false
|
|
45390
46253
|
});
|
|
@@ -45468,7 +46331,7 @@ var PlayerSeekBar2 = ({
|
|
|
45468
46331
|
};
|
|
45469
46332
|
|
|
45470
46333
|
// src/components/homepage/Demo/PlayerVolume.tsx
|
|
45471
|
-
import { useCallback as
|
|
46334
|
+
import { useCallback as useCallback51, useEffect as useEffect55, useRef as useRef57, useState as useState54 } from "react";
|
|
45472
46335
|
|
|
45473
46336
|
// src/components/homepage/Demo/icons.tsx
|
|
45474
46337
|
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
@@ -45549,7 +46412,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
45549
46412
|
document.body.style.userSelect = "auto";
|
|
45550
46413
|
}
|
|
45551
46414
|
}, [isHovered]);
|
|
45552
|
-
const onClick =
|
|
46415
|
+
const onClick = useCallback51(() => {
|
|
45553
46416
|
if (timerRef.current !== null) {
|
|
45554
46417
|
clearTimeout(timerRef.current);
|
|
45555
46418
|
timerRef.current = null;
|
|
@@ -45587,7 +46450,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
45587
46450
|
};
|
|
45588
46451
|
|
|
45589
46452
|
// src/components/homepage/Demo/PlayPauseButton.tsx
|
|
45590
|
-
import React73, { useCallback as
|
|
46453
|
+
import React73, { useCallback as useCallback53, useEffect as useEffect56 } from "react";
|
|
45591
46454
|
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
45592
46455
|
var playerButtonStyle2 = {
|
|
45593
46456
|
appearance: "none",
|
|
@@ -45623,7 +46486,7 @@ var PlayPauseButton = ({ playerRef }) => {
|
|
|
45623
46486
|
current.removeEventListener("pause", onPause);
|
|
45624
46487
|
};
|
|
45625
46488
|
}, [playerRef]);
|
|
45626
|
-
const onToggle =
|
|
46489
|
+
const onToggle = useCallback53(() => {
|
|
45627
46490
|
playerRef.current?.toggle();
|
|
45628
46491
|
}, [playerRef]);
|
|
45629
46492
|
const playPauseIconStyle = {
|
|
@@ -45844,7 +46707,7 @@ var Demo = () => {
|
|
|
45844
46707
|
playerRef.removeEventListener("fullscreenchange", onFullscreenChange);
|
|
45845
46708
|
};
|
|
45846
46709
|
}, [data2]);
|
|
45847
|
-
const updateCardOrder =
|
|
46710
|
+
const updateCardOrder = useCallback55((newCardOrder) => {
|
|
45848
46711
|
setCardOrder(newCardOrder);
|
|
45849
46712
|
}, []);
|
|
45850
46713
|
const props = useMemo67(() => {
|
|
@@ -45866,7 +46729,7 @@ var Demo = () => {
|
|
|
45866
46729
|
emojiIndex
|
|
45867
46730
|
};
|
|
45868
46731
|
}, [cardOrder, emojiIndex, colorMode, data2, updateCardOrder]);
|
|
45869
|
-
const onError =
|
|
46732
|
+
const onError = useCallback55(() => {
|
|
45870
46733
|
setError(true);
|
|
45871
46734
|
}, []);
|
|
45872
46735
|
return /* @__PURE__ */ jsxs39("div", {
|
|
@@ -46151,13 +47014,13 @@ var IfYouKnowReact = () => {
|
|
|
46151
47014
|
};
|
|
46152
47015
|
|
|
46153
47016
|
// src/components/homepage/NewsletterButton.tsx
|
|
46154
|
-
import { useCallback as
|
|
47017
|
+
import { useCallback as useCallback56, useState as useState59 } from "react";
|
|
46155
47018
|
import { jsx as jsx118, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
46156
47019
|
var NewsletterButton = () => {
|
|
46157
47020
|
const [email, setEmail] = useState59("");
|
|
46158
47021
|
const [submitting, setSubmitting] = useState59(false);
|
|
46159
47022
|
const [subscribed, setSubscribed] = useState59(false);
|
|
46160
|
-
const handleSubmit =
|
|
47023
|
+
const handleSubmit = useCallback56(async (e) => {
|
|
46161
47024
|
try {
|
|
46162
47025
|
setSubmitting(true);
|
|
46163
47026
|
e.preventDefault();
|
|
@@ -46632,7 +47495,7 @@ import { forwardRef as forwardRef40, useEffect as useEffect66, useImperativeHand
|
|
|
46632
47495
|
// src/components/homepage/VideoPlayerWithControls.tsx
|
|
46633
47496
|
import Hls from "hls.js";
|
|
46634
47497
|
import"plyr/dist/plyr.css";
|
|
46635
|
-
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";
|
|
46636
47499
|
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
46637
47500
|
var useCombinedRefs = function(...refs) {
|
|
46638
47501
|
const targetRef = useRef61(null);
|
|
@@ -46654,8 +47517,8 @@ var VideoPlayerWithControls = forwardRef39(({ playbackId, poster, currentTime, o
|
|
|
46654
47517
|
const metaRef = useCombinedRefs(ref, videoRef);
|
|
46655
47518
|
const playerRef = useRef61(null);
|
|
46656
47519
|
const [playerInitTime] = useState64(Date.now());
|
|
46657
|
-
const videoError =
|
|
46658
|
-
const onImageLoad =
|
|
47520
|
+
const videoError = useCallback57((event) => onError(event), [onError]);
|
|
47521
|
+
const onImageLoad = useCallback57((event) => {
|
|
46659
47522
|
const [w, h] = [event.target.width, event.target.height];
|
|
46660
47523
|
if (w && h) {
|
|
46661
47524
|
onSize({ width: w, height: h });
|
|
@@ -46819,7 +47682,7 @@ var icon6 = {
|
|
|
46819
47682
|
height: 16,
|
|
46820
47683
|
marginLeft: 10
|
|
46821
47684
|
};
|
|
46822
|
-
var
|
|
47685
|
+
var Arrow4 = () => /* @__PURE__ */ jsx127("svg", {
|
|
46823
47686
|
style: icon6,
|
|
46824
47687
|
xmlns: "http://www.w3.org/2000/svg",
|
|
46825
47688
|
viewBox: "0 0 448 512",
|
|
@@ -46984,7 +47847,7 @@ var BuiltWithRemotionShowcase = () => {
|
|
|
46984
47847
|
href: videoApps[activeTab].link,
|
|
46985
47848
|
children: [
|
|
46986
47849
|
videoApps[activeTab].buttonText,
|
|
46987
|
-
/* @__PURE__ */ jsx127(
|
|
47850
|
+
/* @__PURE__ */ jsx127(Arrow4, {})
|
|
46988
47851
|
]
|
|
46989
47852
|
})
|
|
46990
47853
|
]
|
|
@@ -48369,7 +49232,7 @@ var GithubButton = () => {
|
|
|
48369
49232
|
" ",
|
|
48370
49233
|
/* @__PURE__ */ jsx161("div", {
|
|
48371
49234
|
className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
|
|
48372
|
-
children: "
|
|
49235
|
+
children: "49k"
|
|
48373
49236
|
})
|
|
48374
49237
|
]
|
|
48375
49238
|
});
|