@remotion/promo-pages 4.0.478 → 4.0.479
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 +870 -607
- package/dist/design.js +456 -189
- package/dist/experts.js +214 -157
- package/dist/homepage/Pricing.js +456 -189
- package/dist/prompts/PromptsGallery.js +456 -189
- package/dist/prompts/PromptsShow.js +456 -189
- package/dist/prompts/PromptsSubmit.js +456 -189
- package/dist/team.js +456 -189
- package/dist/template-modal-content.js +456 -189
- package/dist/templates.js +456 -189
- package/package.json +17 -17
package/dist/design.js
CHANGED
|
@@ -5565,7 +5565,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
5565
5565
|
var addSequenceStackTraces = (component) => {
|
|
5566
5566
|
componentsToAddStacksTo.push(component);
|
|
5567
5567
|
};
|
|
5568
|
-
var VERSION = "4.0.
|
|
5568
|
+
var VERSION = "4.0.479";
|
|
5569
5569
|
var checkMultipleRemotionVersions = () => {
|
|
5570
5570
|
if (typeof globalThis === "undefined") {
|
|
5571
5571
|
return;
|
|
@@ -5928,10 +5928,7 @@ var Freeze = ({
|
|
|
5928
5928
|
})
|
|
5929
5929
|
});
|
|
5930
5930
|
};
|
|
5931
|
-
var
|
|
5932
|
-
premountFramesRemaining: 0
|
|
5933
|
-
});
|
|
5934
|
-
var sequenceVisualStyleSchema = {
|
|
5931
|
+
var transformSchema = {
|
|
5935
5932
|
"style.transformOrigin": {
|
|
5936
5933
|
type: "transform-origin",
|
|
5937
5934
|
step: 1,
|
|
@@ -5967,7 +5964,8 @@ var sequenceVisualStyleSchema = {
|
|
|
5967
5964
|
hiddenFromList: false
|
|
5968
5965
|
}
|
|
5969
5966
|
};
|
|
5970
|
-
var
|
|
5967
|
+
var sequenceVisualStyleSchema = transformSchema;
|
|
5968
|
+
var premountSchema = {
|
|
5971
5969
|
premountFor: {
|
|
5972
5970
|
type: "number",
|
|
5973
5971
|
default: 0,
|
|
@@ -5990,9 +5988,10 @@ var sequencePremountSchema = {
|
|
|
5990
5988
|
type: "hidden"
|
|
5991
5989
|
}
|
|
5992
5990
|
};
|
|
5991
|
+
var sequencePremountSchema = premountSchema;
|
|
5993
5992
|
var sequenceStyleSchema = {
|
|
5994
|
-
...
|
|
5995
|
-
...
|
|
5993
|
+
...transformSchema,
|
|
5994
|
+
...premountSchema
|
|
5996
5995
|
};
|
|
5997
5996
|
var hiddenField = {
|
|
5998
5997
|
type: "boolean",
|
|
@@ -6030,12 +6029,16 @@ var freezeField = {
|
|
|
6030
6029
|
step: 1,
|
|
6031
6030
|
hiddenFromList: true
|
|
6032
6031
|
};
|
|
6033
|
-
var
|
|
6034
|
-
|
|
6035
|
-
showInTimeline: showInTimelineField,
|
|
6032
|
+
var baseSchema = {
|
|
6033
|
+
durationInFrames: durationInFramesField,
|
|
6036
6034
|
from: fromField,
|
|
6037
6035
|
freeze: freezeField,
|
|
6038
|
-
|
|
6036
|
+
hidden: hiddenField,
|
|
6037
|
+
name: sequenceNameField,
|
|
6038
|
+
showInTimeline: showInTimelineField
|
|
6039
|
+
};
|
|
6040
|
+
var sequenceSchema = {
|
|
6041
|
+
...baseSchema,
|
|
6039
6042
|
layout: {
|
|
6040
6043
|
type: "enum",
|
|
6041
6044
|
default: "absolute-fill",
|
|
@@ -6045,14 +6048,18 @@ var sequenceSchema = extendSchemaWithSequenceName({
|
|
|
6045
6048
|
none: {}
|
|
6046
6049
|
}
|
|
6047
6050
|
}
|
|
6048
|
-
}
|
|
6049
|
-
var
|
|
6050
|
-
hidden: hiddenField,
|
|
6051
|
-
showInTimeline: showInTimelineField,
|
|
6052
|
-
freeze: freezeField,
|
|
6051
|
+
};
|
|
6052
|
+
var baseSchemaWithoutFrom = {
|
|
6053
6053
|
durationInFrames: durationInFramesField,
|
|
6054
|
+
freeze: freezeField,
|
|
6055
|
+
hidden: hiddenField,
|
|
6056
|
+
name: sequenceNameField,
|
|
6057
|
+
showInTimeline: showInTimelineField
|
|
6058
|
+
};
|
|
6059
|
+
var sequenceSchemaWithoutFrom = {
|
|
6060
|
+
...baseSchemaWithoutFrom,
|
|
6054
6061
|
layout: sequenceSchema.layout
|
|
6055
|
-
}
|
|
6062
|
+
};
|
|
6056
6063
|
var sequenceSchemaDefaultLayoutNone = {
|
|
6057
6064
|
...sequenceSchema,
|
|
6058
6065
|
layout: {
|
|
@@ -6060,6 +6067,9 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6060
6067
|
default: "none"
|
|
6061
6068
|
}
|
|
6062
6069
|
};
|
|
6070
|
+
var PremountContext = createContext14({
|
|
6071
|
+
premountFramesRemaining: 0
|
|
6072
|
+
});
|
|
6063
6073
|
var SequenceManager = React11.createContext({
|
|
6064
6074
|
registerSequence: () => {
|
|
6065
6075
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -7744,10 +7754,21 @@ var interpolateColors = (input, inputRange, outputRange, options) => {
|
|
|
7744
7754
|
return interpolateColorsRGB(input, inputRange, processedOutputRange, options);
|
|
7745
7755
|
};
|
|
7746
7756
|
var easingToFn = (e) => {
|
|
7747
|
-
|
|
7748
|
-
|
|
7757
|
+
switch (e.type) {
|
|
7758
|
+
case "linear":
|
|
7759
|
+
return Easing.linear;
|
|
7760
|
+
case "spring":
|
|
7761
|
+
return Easing.spring({
|
|
7762
|
+
damping: e.damping,
|
|
7763
|
+
mass: e.mass,
|
|
7764
|
+
overshootClamping: e.overshootClamping,
|
|
7765
|
+
stiffness: e.stiffness
|
|
7766
|
+
});
|
|
7767
|
+
case "bezier":
|
|
7768
|
+
return bezier(e.x1, e.y1, e.x2, e.y2);
|
|
7769
|
+
default:
|
|
7770
|
+
throw new TypeError(`Unsupported easing: ${JSON.stringify(e)}`);
|
|
7749
7771
|
}
|
|
7750
|
-
return bezier(e[0], e[1], e[2], e[3]);
|
|
7751
7772
|
};
|
|
7752
7773
|
var interpolateKeyframedStatus = ({
|
|
7753
7774
|
frame,
|
|
@@ -8069,6 +8090,9 @@ var findPropsToDelete = ({
|
|
|
8069
8090
|
}
|
|
8070
8091
|
return [...otherKeys];
|
|
8071
8092
|
};
|
|
8093
|
+
var DEFAULT_LINEAR_EASING = {
|
|
8094
|
+
type: "linear"
|
|
8095
|
+
};
|
|
8072
8096
|
var makeStaticDragOverride = (value) => {
|
|
8073
8097
|
return { type: "static", value };
|
|
8074
8098
|
};
|
|
@@ -8081,7 +8105,7 @@ var makeKeyframedDragOverride = ({
|
|
|
8081
8105
|
const keyframes = existingIndex === -1 ? [...status.keyframes, { frame, value }].sort((first, second) => first.frame - second.frame) : status.keyframes.map((keyframe, index) => index === existingIndex ? { frame, value } : keyframe);
|
|
8082
8106
|
const easing = [...status.easing];
|
|
8083
8107
|
while (easing.length < keyframes.length - 1) {
|
|
8084
|
-
easing.push(
|
|
8108
|
+
easing.push(DEFAULT_LINEAR_EASING);
|
|
8085
8109
|
}
|
|
8086
8110
|
if (easing.length > keyframes.length - 1) {
|
|
8087
8111
|
easing.length = keyframes.length - 1;
|
|
@@ -8239,7 +8263,7 @@ var mergeValues = ({
|
|
|
8239
8263
|
return merged;
|
|
8240
8264
|
};
|
|
8241
8265
|
var stackToOverrideMap = {};
|
|
8242
|
-
var
|
|
8266
|
+
var withInteractivitySchema = ({
|
|
8243
8267
|
Component,
|
|
8244
8268
|
componentIdentity,
|
|
8245
8269
|
schema,
|
|
@@ -8253,7 +8277,7 @@ var wrapInSchema = ({
|
|
|
8253
8277
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
8254
8278
|
return React13.createElement(Component, {
|
|
8255
8279
|
...props,
|
|
8256
|
-
|
|
8280
|
+
controls: null,
|
|
8257
8281
|
ref
|
|
8258
8282
|
});
|
|
8259
8283
|
}
|
|
@@ -8261,7 +8285,7 @@ var wrapInSchema = ({
|
|
|
8261
8285
|
const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
8262
8286
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8263
8287
|
const frame = useCurrentFrame();
|
|
8264
|
-
if (props.
|
|
8288
|
+
if (props.controls) {
|
|
8265
8289
|
return React13.createElement(Component, {
|
|
8266
8290
|
...props,
|
|
8267
8291
|
ref
|
|
@@ -8316,11 +8340,11 @@ var wrapInSchema = ({
|
|
|
8316
8340
|
});
|
|
8317
8341
|
return React13.createElement(Component, {
|
|
8318
8342
|
...mergedProps,
|
|
8319
|
-
|
|
8343
|
+
controls,
|
|
8320
8344
|
ref
|
|
8321
8345
|
});
|
|
8322
8346
|
});
|
|
8323
|
-
Wrapped.displayName = `
|
|
8347
|
+
Wrapped.displayName = `withInteractivitySchema(${Component.displayName || Component.name || "Component"})`;
|
|
8324
8348
|
return Wrapped;
|
|
8325
8349
|
};
|
|
8326
8350
|
var EMPTY_EFFECTS = [];
|
|
@@ -8334,7 +8358,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8334
8358
|
width,
|
|
8335
8359
|
showInTimeline = true,
|
|
8336
8360
|
hidden = false,
|
|
8337
|
-
|
|
8361
|
+
controls,
|
|
8338
8362
|
_remotionInternalEffects,
|
|
8339
8363
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
8340
8364
|
_remotionInternalStack: stack,
|
|
@@ -8342,7 +8366,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8342
8366
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
8343
8367
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
8344
8368
|
_remotionInternalIsMedia: isMedia,
|
|
8345
|
-
|
|
8369
|
+
outlineRef: passedRefForOutline,
|
|
8346
8370
|
...other
|
|
8347
8371
|
}, ref) => {
|
|
8348
8372
|
const { layout = "absolute-fill" } = other;
|
|
@@ -8669,13 +8693,13 @@ var SequenceRefForwardingFunction = (props, ref) => {
|
|
|
8669
8693
|
};
|
|
8670
8694
|
var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
8671
8695
|
var SequenceWithoutSchema = SequenceInner;
|
|
8672
|
-
var Sequence =
|
|
8696
|
+
var Sequence = withInteractivitySchema({
|
|
8673
8697
|
Component: SequenceInner,
|
|
8674
8698
|
componentIdentity: "dev.remotion.remotion.Sequence",
|
|
8675
8699
|
schema: sequenceSchema,
|
|
8676
8700
|
supportsEffects: false
|
|
8677
8701
|
});
|
|
8678
|
-
var SequenceWithoutFrom =
|
|
8702
|
+
var SequenceWithoutFrom = withInteractivitySchema({
|
|
8679
8703
|
Component: SequenceInner,
|
|
8680
8704
|
componentIdentity: null,
|
|
8681
8705
|
schema: sequenceSchemaWithoutFrom,
|
|
@@ -9214,9 +9238,7 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
9214
9238
|
return new URL(src, window.origin).href;
|
|
9215
9239
|
};
|
|
9216
9240
|
var animatedImageSchema = {
|
|
9217
|
-
|
|
9218
|
-
from: fromField,
|
|
9219
|
-
freeze: freezeField,
|
|
9241
|
+
...baseSchema,
|
|
9220
9242
|
playbackRate: {
|
|
9221
9243
|
type: "number",
|
|
9222
9244
|
min: 0,
|
|
@@ -9227,8 +9249,7 @@ var animatedImageSchema = {
|
|
|
9227
9249
|
hiddenFromList: false,
|
|
9228
9250
|
keyframable: false
|
|
9229
9251
|
},
|
|
9230
|
-
...
|
|
9231
|
-
hidden: hiddenField
|
|
9252
|
+
...transformSchema
|
|
9232
9253
|
};
|
|
9233
9254
|
var AnimatedImageContent = forwardRef4(({
|
|
9234
9255
|
src,
|
|
@@ -9373,7 +9394,7 @@ var AnimatedImageInner = ({
|
|
|
9373
9394
|
durationInFrames,
|
|
9374
9395
|
requestInit,
|
|
9375
9396
|
effects = [],
|
|
9376
|
-
|
|
9397
|
+
controls,
|
|
9377
9398
|
ref,
|
|
9378
9399
|
...sequenceProps
|
|
9379
9400
|
}) => {
|
|
@@ -9402,10 +9423,10 @@ var AnimatedImageInner = ({
|
|
|
9402
9423
|
durationInFrames: resolvedDuration,
|
|
9403
9424
|
name: "<AnimatedImage>",
|
|
9404
9425
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
9405
|
-
|
|
9426
|
+
controls,
|
|
9406
9427
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
9407
9428
|
...sequenceProps,
|
|
9408
|
-
|
|
9429
|
+
outlineRef: actualRef,
|
|
9409
9430
|
children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
|
|
9410
9431
|
...animatedImageProps,
|
|
9411
9432
|
ref: actualRef,
|
|
@@ -9414,7 +9435,7 @@ var AnimatedImageInner = ({
|
|
|
9414
9435
|
})
|
|
9415
9436
|
});
|
|
9416
9437
|
};
|
|
9417
|
-
var AnimatedImage =
|
|
9438
|
+
var AnimatedImage = withInteractivitySchema({
|
|
9418
9439
|
Component: AnimatedImageInner,
|
|
9419
9440
|
componentIdentity: "dev.remotion.remotion.AnimatedImage",
|
|
9420
9441
|
schema: animatedImageSchema,
|
|
@@ -9422,6 +9443,36 @@ var AnimatedImage = wrapInSchema({
|
|
|
9422
9443
|
});
|
|
9423
9444
|
AnimatedImage.displayName = "AnimatedImage";
|
|
9424
9445
|
addSequenceStackTraces(AnimatedImage);
|
|
9446
|
+
var disabledEffectField = {
|
|
9447
|
+
type: "boolean",
|
|
9448
|
+
default: false,
|
|
9449
|
+
description: "Disabled"
|
|
9450
|
+
};
|
|
9451
|
+
var createEffect = (definition) => {
|
|
9452
|
+
const { calculateKey: userCalculateKey, validateParams } = definition;
|
|
9453
|
+
const widened = {
|
|
9454
|
+
...definition,
|
|
9455
|
+
documentationLink: definition.documentationLink ?? null,
|
|
9456
|
+
calculateKey: (params) => {
|
|
9457
|
+
const disabled = params.disabled ?? false;
|
|
9458
|
+
return `${userCalculateKey(params)}-disabled-${disabled}`;
|
|
9459
|
+
},
|
|
9460
|
+
schema: {
|
|
9461
|
+
disabled: disabledEffectField,
|
|
9462
|
+
...definition.schema
|
|
9463
|
+
}
|
|
9464
|
+
};
|
|
9465
|
+
const factory = (params = {}) => {
|
|
9466
|
+
validateParams(params);
|
|
9467
|
+
return {
|
|
9468
|
+
definition: widened,
|
|
9469
|
+
params,
|
|
9470
|
+
effectKey: widened.calculateKey(params),
|
|
9471
|
+
memoized: false
|
|
9472
|
+
};
|
|
9473
|
+
};
|
|
9474
|
+
return factory;
|
|
9475
|
+
};
|
|
9425
9476
|
var validateArtifactFilename = (filename) => {
|
|
9426
9477
|
if (typeof filename !== "string") {
|
|
9427
9478
|
throw new TypeError(`The "filename" must be a string, but you passed a value of type ${typeof filename}`);
|
|
@@ -12367,9 +12418,7 @@ var resolveSolidPixelDensity = (pixelDensity) => {
|
|
|
12367
12418
|
return pixelDensity;
|
|
12368
12419
|
};
|
|
12369
12420
|
var solidSchema = {
|
|
12370
|
-
|
|
12371
|
-
from: fromField,
|
|
12372
|
-
freeze: freezeField,
|
|
12421
|
+
...baseSchema,
|
|
12373
12422
|
color: {
|
|
12374
12423
|
type: "color",
|
|
12375
12424
|
default: "transparent",
|
|
@@ -12391,8 +12440,7 @@ var solidSchema = {
|
|
|
12391
12440
|
description: "Height",
|
|
12392
12441
|
hiddenFromList: false
|
|
12393
12442
|
},
|
|
12394
|
-
...
|
|
12395
|
-
hidden: hiddenField
|
|
12443
|
+
...transformSchema
|
|
12396
12444
|
};
|
|
12397
12445
|
var SolidInner = ({
|
|
12398
12446
|
color,
|
|
@@ -12499,7 +12547,7 @@ var SolidInner = ({
|
|
|
12499
12547
|
};
|
|
12500
12548
|
var SolidOuter = forwardRef8(({
|
|
12501
12549
|
effects = [],
|
|
12502
|
-
|
|
12550
|
+
controls,
|
|
12503
12551
|
color,
|
|
12504
12552
|
height,
|
|
12505
12553
|
width,
|
|
@@ -12525,11 +12573,11 @@ var SolidOuter = forwardRef8(({
|
|
|
12525
12573
|
freeze,
|
|
12526
12574
|
hidden,
|
|
12527
12575
|
showInTimeline,
|
|
12528
|
-
|
|
12576
|
+
controls,
|
|
12529
12577
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
12530
12578
|
durationInFrames,
|
|
12531
12579
|
name: name ?? "<Solid>",
|
|
12532
|
-
|
|
12580
|
+
outlineRef: actualRef,
|
|
12533
12581
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid",
|
|
12534
12582
|
...props2,
|
|
12535
12583
|
children: /* @__PURE__ */ jsx24(SolidInner, {
|
|
@@ -12545,7 +12593,7 @@ var SolidOuter = forwardRef8(({
|
|
|
12545
12593
|
})
|
|
12546
12594
|
});
|
|
12547
12595
|
});
|
|
12548
|
-
var Solid =
|
|
12596
|
+
var Solid = withInteractivitySchema({
|
|
12549
12597
|
Component: SolidOuter,
|
|
12550
12598
|
componentIdentity: "dev.remotion.remotion.Solid",
|
|
12551
12599
|
schema: solidSchema,
|
|
@@ -12822,7 +12870,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
12822
12870
|
onPaint,
|
|
12823
12871
|
onInit,
|
|
12824
12872
|
pixelDensity,
|
|
12825
|
-
|
|
12873
|
+
controls,
|
|
12826
12874
|
style,
|
|
12827
12875
|
durationInFrames,
|
|
12828
12876
|
name,
|
|
@@ -12844,9 +12892,9 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
12844
12892
|
durationInFrames: resolvedDuration,
|
|
12845
12893
|
name: name ?? "<HtmlInCanvas>",
|
|
12846
12894
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
12847
|
-
|
|
12895
|
+
controls,
|
|
12848
12896
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
12849
|
-
|
|
12897
|
+
outlineRef: actualRef,
|
|
12850
12898
|
layout: "none",
|
|
12851
12899
|
...sequenceProps,
|
|
12852
12900
|
children: /* @__PURE__ */ jsx25(HtmlInCanvasContent, {
|
|
@@ -12865,13 +12913,10 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
12865
12913
|
});
|
|
12866
12914
|
HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
12867
12915
|
var htmlInCanvasSchema = {
|
|
12868
|
-
|
|
12869
|
-
|
|
12870
|
-
freeze: freezeField,
|
|
12871
|
-
...sequenceVisualStyleSchema,
|
|
12872
|
-
hidden: hiddenField
|
|
12916
|
+
...baseSchema,
|
|
12917
|
+
...transformSchema
|
|
12873
12918
|
};
|
|
12874
|
-
var HtmlInCanvasWrapped =
|
|
12919
|
+
var HtmlInCanvasWrapped = withInteractivitySchema({
|
|
12875
12920
|
Component: HtmlInCanvasInner,
|
|
12876
12921
|
componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
|
|
12877
12922
|
schema: htmlInCanvasSchema,
|
|
@@ -12889,9 +12934,7 @@ function truncateSrcForLabel(src) {
|
|
|
12889
12934
|
return src;
|
|
12890
12935
|
}
|
|
12891
12936
|
var canvasImageSchema = {
|
|
12892
|
-
|
|
12893
|
-
from: fromField,
|
|
12894
|
-
freeze: freezeField,
|
|
12937
|
+
...baseSchema,
|
|
12895
12938
|
fit: {
|
|
12896
12939
|
type: "enum",
|
|
12897
12940
|
default: "fill",
|
|
@@ -12902,8 +12945,7 @@ var canvasImageSchema = {
|
|
|
12902
12945
|
cover: {}
|
|
12903
12946
|
}
|
|
12904
12947
|
},
|
|
12905
|
-
...
|
|
12906
|
-
hidden: hiddenField
|
|
12948
|
+
...transformSchema
|
|
12907
12949
|
};
|
|
12908
12950
|
var makeAbortError = () => {
|
|
12909
12951
|
if (typeof DOMException !== "undefined") {
|
|
@@ -12984,6 +13026,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
12984
13026
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
12985
13027
|
const { delayPlayback } = useBufferState();
|
|
12986
13028
|
const [outputCanvas, setOutputCanvas] = useState16(null);
|
|
13029
|
+
const [loadedImage, setLoadedImage] = useState16(null);
|
|
12987
13030
|
const actualSrc = usePreload(src);
|
|
12988
13031
|
const chainState = useEffectChainState();
|
|
12989
13032
|
const memoizedEffects = useMemoizedEffects({
|
|
@@ -13009,9 +13052,6 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13009
13052
|
}
|
|
13010
13053
|
}, [ref, refForOutline]);
|
|
13011
13054
|
useEffect17(() => {
|
|
13012
|
-
if (!outputCanvas || !sourceCanvas) {
|
|
13013
|
-
return;
|
|
13014
|
-
}
|
|
13015
13055
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
13016
13056
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
13017
13057
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
@@ -13026,6 +13066,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13026
13066
|
let continued = false;
|
|
13027
13067
|
let errorCount = 0;
|
|
13028
13068
|
let timeoutId = null;
|
|
13069
|
+
setLoadedImage(null);
|
|
13029
13070
|
const continueRenderOnce = () => {
|
|
13030
13071
|
if (continued) {
|
|
13031
13072
|
return;
|
|
@@ -13039,30 +13080,9 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13039
13080
|
if (cancelled) {
|
|
13040
13081
|
return;
|
|
13041
13082
|
}
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
colorSpace: "srgb"
|
|
13046
|
-
});
|
|
13047
|
-
if (!sourceContext) {
|
|
13048
|
-
throw new Error("Could not get 2D context for <CanvasImage> source canvas");
|
|
13049
|
-
}
|
|
13050
|
-
sourceCanvas.width = canvasWidth;
|
|
13051
|
-
sourceCanvas.height = canvasHeight;
|
|
13052
|
-
outputCanvas.width = canvasWidth;
|
|
13053
|
-
outputCanvas.height = canvasHeight;
|
|
13054
|
-
sourceContext.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
13055
|
-
sourceContext.drawImage(image.element, ...calculateImageFit(fit, { width: image.width, height: image.height }, { width: canvasWidth, height: canvasHeight }));
|
|
13056
|
-
return runEffectChain({
|
|
13057
|
-
state: chainState.get(canvasWidth, canvasHeight),
|
|
13058
|
-
source: sourceCanvas,
|
|
13059
|
-
effects: memoizedEffects,
|
|
13060
|
-
output: outputCanvas,
|
|
13061
|
-
width: canvasWidth,
|
|
13062
|
-
height: canvasHeight
|
|
13063
|
-
});
|
|
13064
|
-
}).then((completed) => {
|
|
13065
|
-
if (completed && !cancelled) {
|
|
13083
|
+
setLoadedImage(image);
|
|
13084
|
+
}).then(() => {
|
|
13085
|
+
if (!cancelled) {
|
|
13066
13086
|
continueRenderOnce();
|
|
13067
13087
|
}
|
|
13068
13088
|
}).catch((err) => {
|
|
@@ -13099,21 +13119,87 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13099
13119
|
}, [
|
|
13100
13120
|
actualSrc,
|
|
13101
13121
|
cancelRender2,
|
|
13102
|
-
chainState,
|
|
13103
13122
|
continueRender2,
|
|
13104
13123
|
delayPlayback,
|
|
13105
13124
|
delayRender2,
|
|
13106
13125
|
delayRenderRetries,
|
|
13107
13126
|
delayRenderTimeoutInMilliseconds,
|
|
13127
|
+
maxRetries,
|
|
13128
|
+
onError,
|
|
13129
|
+
pauseWhenLoading,
|
|
13130
|
+
sequenceContext?.postmounting,
|
|
13131
|
+
sequenceContext?.premounting
|
|
13132
|
+
]);
|
|
13133
|
+
useEffect17(() => {
|
|
13134
|
+
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
13135
|
+
return;
|
|
13136
|
+
}
|
|
13137
|
+
const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
|
|
13138
|
+
let cancelled = false;
|
|
13139
|
+
let continued = false;
|
|
13140
|
+
const continueRenderOnce = () => {
|
|
13141
|
+
if (continued) {
|
|
13142
|
+
return;
|
|
13143
|
+
}
|
|
13144
|
+
continued = true;
|
|
13145
|
+
continueRender2(handle);
|
|
13146
|
+
};
|
|
13147
|
+
const canvasWidth = width ?? loadedImage.width;
|
|
13148
|
+
const canvasHeight = height ?? loadedImage.height;
|
|
13149
|
+
const sourceContext = sourceCanvas.getContext("2d", {
|
|
13150
|
+
colorSpace: "srgb"
|
|
13151
|
+
});
|
|
13152
|
+
if (!sourceContext) {
|
|
13153
|
+
cancelRender2(new Error("Could not get 2D context for <CanvasImage> source canvas"));
|
|
13154
|
+
continueRenderOnce();
|
|
13155
|
+
return () => {
|
|
13156
|
+
continueRenderOnce();
|
|
13157
|
+
};
|
|
13158
|
+
}
|
|
13159
|
+
sourceCanvas.width = canvasWidth;
|
|
13160
|
+
sourceCanvas.height = canvasHeight;
|
|
13161
|
+
outputCanvas.width = canvasWidth;
|
|
13162
|
+
outputCanvas.height = canvasHeight;
|
|
13163
|
+
sourceContext.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
13164
|
+
sourceContext.drawImage(loadedImage.element, ...calculateImageFit(fit, { width: loadedImage.width, height: loadedImage.height }, { width: canvasWidth, height: canvasHeight }));
|
|
13165
|
+
runEffectChain({
|
|
13166
|
+
state: chainState.get(canvasWidth, canvasHeight),
|
|
13167
|
+
source: sourceCanvas,
|
|
13168
|
+
effects: memoizedEffects,
|
|
13169
|
+
output: outputCanvas,
|
|
13170
|
+
width: canvasWidth,
|
|
13171
|
+
height: canvasHeight
|
|
13172
|
+
}).then((completed) => {
|
|
13173
|
+
if (completed && !cancelled) {
|
|
13174
|
+
continueRenderOnce();
|
|
13175
|
+
}
|
|
13176
|
+
}).catch((err) => {
|
|
13177
|
+
if (cancelled) {
|
|
13178
|
+
return;
|
|
13179
|
+
}
|
|
13180
|
+
if (onError) {
|
|
13181
|
+
onError(err);
|
|
13182
|
+
continueRenderOnce();
|
|
13183
|
+
} else {
|
|
13184
|
+
cancelRender2(err);
|
|
13185
|
+
}
|
|
13186
|
+
});
|
|
13187
|
+
return () => {
|
|
13188
|
+
cancelled = true;
|
|
13189
|
+
continueRenderOnce();
|
|
13190
|
+
};
|
|
13191
|
+
}, [
|
|
13192
|
+
actualSrc,
|
|
13193
|
+
cancelRender2,
|
|
13194
|
+
chainState,
|
|
13195
|
+
continueRender2,
|
|
13196
|
+
delayRender2,
|
|
13108
13197
|
fit,
|
|
13109
13198
|
height,
|
|
13110
|
-
|
|
13199
|
+
loadedImage,
|
|
13111
13200
|
memoizedEffects,
|
|
13112
13201
|
onError,
|
|
13113
13202
|
outputCanvas,
|
|
13114
|
-
pauseWhenLoading,
|
|
13115
|
-
sequenceContext?.postmounting,
|
|
13116
|
-
sequenceContext?.premounting,
|
|
13117
13203
|
sourceCanvas,
|
|
13118
13204
|
width
|
|
13119
13205
|
]);
|
|
@@ -13149,9 +13235,9 @@ var CanvasImageInner = forwardRef10(({
|
|
|
13149
13235
|
name,
|
|
13150
13236
|
showInTimeline,
|
|
13151
13237
|
stack,
|
|
13152
|
-
|
|
13238
|
+
controls,
|
|
13153
13239
|
_remotionInternalDocumentationLink,
|
|
13154
|
-
|
|
13240
|
+
outlineRef,
|
|
13155
13241
|
...canvasProps
|
|
13156
13242
|
}, ref) => {
|
|
13157
13243
|
if (!src) {
|
|
@@ -13171,11 +13257,11 @@ var CanvasImageInner = forwardRef10(({
|
|
|
13171
13257
|
showInTimeline: showInTimeline ?? true,
|
|
13172
13258
|
name: name ?? "<CanvasImage>",
|
|
13173
13259
|
_remotionInternalDocumentationLink: _remotionInternalDocumentationLink ?? "https://www.remotion.dev/docs/canvasimage",
|
|
13174
|
-
|
|
13260
|
+
controls,
|
|
13175
13261
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
13176
13262
|
_remotionInternalIsMedia: { type: "image", src },
|
|
13177
13263
|
_remotionInternalStack: stack,
|
|
13178
|
-
|
|
13264
|
+
outlineRef: outlineRef ?? actualRef,
|
|
13179
13265
|
children: /* @__PURE__ */ jsx26(CanvasImageContent, {
|
|
13180
13266
|
ref: actualRef,
|
|
13181
13267
|
src,
|
|
@@ -13192,12 +13278,12 @@ var CanvasImageInner = forwardRef10(({
|
|
|
13192
13278
|
maxRetries,
|
|
13193
13279
|
delayRenderRetries,
|
|
13194
13280
|
delayRenderTimeoutInMilliseconds,
|
|
13195
|
-
refForOutline:
|
|
13281
|
+
refForOutline: outlineRef ?? null,
|
|
13196
13282
|
...canvasProps
|
|
13197
13283
|
})
|
|
13198
13284
|
});
|
|
13199
13285
|
});
|
|
13200
|
-
var CanvasImage =
|
|
13286
|
+
var CanvasImage = withInteractivitySchema({
|
|
13201
13287
|
Component: CanvasImageInner,
|
|
13202
13288
|
componentIdentity: "dev.remotion.remotion.CanvasImage",
|
|
13203
13289
|
schema: canvasImageSchema,
|
|
@@ -13402,8 +13488,8 @@ var NativeImgInner = ({
|
|
|
13402
13488
|
from,
|
|
13403
13489
|
durationInFrames,
|
|
13404
13490
|
freeze,
|
|
13405
|
-
|
|
13406
|
-
|
|
13491
|
+
controls,
|
|
13492
|
+
outlineRef: refForOutline,
|
|
13407
13493
|
...props2
|
|
13408
13494
|
}) => {
|
|
13409
13495
|
if (!src) {
|
|
@@ -13418,10 +13504,10 @@ var NativeImgInner = ({
|
|
|
13418
13504
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
13419
13505
|
_remotionInternalIsMedia: { type: "image", src },
|
|
13420
13506
|
name: name ?? "<Img>",
|
|
13421
|
-
|
|
13507
|
+
controls,
|
|
13422
13508
|
showInTimeline: showInTimeline ?? true,
|
|
13423
13509
|
hidden,
|
|
13424
|
-
|
|
13510
|
+
outlineRef: refForOutline,
|
|
13425
13511
|
children: /* @__PURE__ */ jsx28(ImgContent, {
|
|
13426
13512
|
src,
|
|
13427
13513
|
refForOutline,
|
|
@@ -13431,11 +13517,8 @@ var NativeImgInner = ({
|
|
|
13431
13517
|
};
|
|
13432
13518
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
13433
13519
|
var imgSchema = {
|
|
13434
|
-
|
|
13435
|
-
|
|
13436
|
-
freeze: freezeField,
|
|
13437
|
-
...sequenceVisualStyleSchema,
|
|
13438
|
-
hidden: hiddenField
|
|
13520
|
+
...baseSchema,
|
|
13521
|
+
...transformSchema
|
|
13439
13522
|
};
|
|
13440
13523
|
var imgCanvasFallbackIncompatibleProps = new Set([
|
|
13441
13524
|
"alt",
|
|
@@ -13490,7 +13573,7 @@ var ImgInner = ({
|
|
|
13490
13573
|
from,
|
|
13491
13574
|
durationInFrames,
|
|
13492
13575
|
freeze,
|
|
13493
|
-
|
|
13576
|
+
controls,
|
|
13494
13577
|
width,
|
|
13495
13578
|
height,
|
|
13496
13579
|
className,
|
|
@@ -13515,7 +13598,7 @@ var ImgInner = ({
|
|
|
13515
13598
|
from,
|
|
13516
13599
|
durationInFrames,
|
|
13517
13600
|
freeze,
|
|
13518
|
-
|
|
13601
|
+
controls,
|
|
13519
13602
|
width,
|
|
13520
13603
|
height,
|
|
13521
13604
|
className,
|
|
@@ -13525,7 +13608,7 @@ var ImgInner = ({
|
|
|
13525
13608
|
maxRetries,
|
|
13526
13609
|
delayRenderRetries,
|
|
13527
13610
|
delayRenderTimeoutInMilliseconds,
|
|
13528
|
-
|
|
13611
|
+
outlineRef: refForOutline
|
|
13529
13612
|
});
|
|
13530
13613
|
}
|
|
13531
13614
|
if (!src) {
|
|
@@ -13562,12 +13645,12 @@ var ImgInner = ({
|
|
|
13562
13645
|
showInTimeline,
|
|
13563
13646
|
stack,
|
|
13564
13647
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
13565
|
-
|
|
13566
|
-
|
|
13648
|
+
controls,
|
|
13649
|
+
outlineRef: refForOutline,
|
|
13567
13650
|
...canvasProps
|
|
13568
13651
|
});
|
|
13569
13652
|
};
|
|
13570
|
-
var Img =
|
|
13653
|
+
var Img = withInteractivitySchema({
|
|
13571
13654
|
Component: ImgInner,
|
|
13572
13655
|
componentIdentity: "dev.remotion.remotion.Img",
|
|
13573
13656
|
schema: imgSchema,
|
|
@@ -13575,11 +13658,8 @@ var Img = wrapInSchema({
|
|
|
13575
13658
|
});
|
|
13576
13659
|
addSequenceStackTraces(Img);
|
|
13577
13660
|
var interactiveElementSchema = {
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
freeze: freezeField,
|
|
13581
|
-
...sequenceVisualStyleSchema,
|
|
13582
|
-
hidden: hiddenField
|
|
13661
|
+
...baseSchema,
|
|
13662
|
+
...transformSchema
|
|
13583
13663
|
};
|
|
13584
13664
|
var setRef = (ref, value) => {
|
|
13585
13665
|
if (typeof ref === "function") {
|
|
@@ -13598,7 +13678,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
13598
13678
|
name,
|
|
13599
13679
|
showInTimeline,
|
|
13600
13680
|
stack,
|
|
13601
|
-
|
|
13681
|
+
controls,
|
|
13602
13682
|
...props2
|
|
13603
13683
|
} = propsWithControls;
|
|
13604
13684
|
const refForOutline = useRef25(null);
|
|
@@ -13614,10 +13694,10 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
13614
13694
|
hidden,
|
|
13615
13695
|
name: name ?? displayName,
|
|
13616
13696
|
showInTimeline: showInTimeline ?? true,
|
|
13617
|
-
|
|
13697
|
+
controls,
|
|
13618
13698
|
_remotionInternalStack: stack,
|
|
13619
13699
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
13620
|
-
|
|
13700
|
+
outlineRef: refForOutline,
|
|
13621
13701
|
children: React29.createElement(tag, {
|
|
13622
13702
|
...props2,
|
|
13623
13703
|
ref: callbackRef
|
|
@@ -13625,7 +13705,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
13625
13705
|
});
|
|
13626
13706
|
});
|
|
13627
13707
|
Inner.displayName = displayName;
|
|
13628
|
-
const Wrapped =
|
|
13708
|
+
const Wrapped = withInteractivitySchema({
|
|
13629
13709
|
Component: Inner,
|
|
13630
13710
|
componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
|
|
13631
13711
|
schema: interactiveElementSchema,
|
|
@@ -13636,6 +13716,11 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
13636
13716
|
return Wrapped;
|
|
13637
13717
|
};
|
|
13638
13718
|
var Interactive = {
|
|
13719
|
+
baseSchema,
|
|
13720
|
+
transformSchema,
|
|
13721
|
+
premountSchema,
|
|
13722
|
+
sequenceSchema,
|
|
13723
|
+
withSchema: withInteractivitySchema,
|
|
13639
13724
|
A: makeInteractiveElement("a", "<Interactive.A>"),
|
|
13640
13725
|
Article: makeInteractiveElement("article", "<Interactive.Article>"),
|
|
13641
13726
|
Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
|
|
@@ -13817,36 +13902,6 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
|
|
|
13817
13902
|
}
|
|
13818
13903
|
`;
|
|
13819
13904
|
};
|
|
13820
|
-
var disabledEffectField = {
|
|
13821
|
-
type: "boolean",
|
|
13822
|
-
default: false,
|
|
13823
|
-
description: "Disabled"
|
|
13824
|
-
};
|
|
13825
|
-
var createEffect = (definition) => {
|
|
13826
|
-
const { calculateKey: userCalculateKey, validateParams } = definition;
|
|
13827
|
-
const widened = {
|
|
13828
|
-
...definition,
|
|
13829
|
-
documentationLink: definition.documentationLink ?? null,
|
|
13830
|
-
calculateKey: (params) => {
|
|
13831
|
-
const disabled = params.disabled ?? false;
|
|
13832
|
-
return `${userCalculateKey(params)}-disabled-${disabled}`;
|
|
13833
|
-
},
|
|
13834
|
-
schema: {
|
|
13835
|
-
disabled: disabledEffectField,
|
|
13836
|
-
...definition.schema
|
|
13837
|
-
}
|
|
13838
|
-
};
|
|
13839
|
-
const factory = (params = {}) => {
|
|
13840
|
-
validateParams(params);
|
|
13841
|
-
return {
|
|
13842
|
-
definition: widened,
|
|
13843
|
-
params,
|
|
13844
|
-
effectKey: widened.calculateKey(params),
|
|
13845
|
-
memoized: false
|
|
13846
|
-
};
|
|
13847
|
-
};
|
|
13848
|
-
return factory;
|
|
13849
|
-
};
|
|
13850
13905
|
var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
13851
13906
|
var getPreviewDomElement = () => {
|
|
13852
13907
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
@@ -14933,12 +14988,14 @@ var Internals = {
|
|
|
14933
14988
|
SequenceManager,
|
|
14934
14989
|
SequenceManagerRefContext,
|
|
14935
14990
|
SequenceStackTracesUpdateContext,
|
|
14936
|
-
|
|
14991
|
+
baseSchema,
|
|
14937
14992
|
sequenceSchema,
|
|
14938
14993
|
SequenceWithoutSchema,
|
|
14939
14994
|
sequenceStyleSchema,
|
|
14940
14995
|
sequenceVisualStyleSchema,
|
|
14941
14996
|
sequencePremountSchema,
|
|
14997
|
+
transformSchema,
|
|
14998
|
+
premountSchema,
|
|
14942
14999
|
flattenActiveSchema,
|
|
14943
15000
|
getFlatSchemaWithAllKeys,
|
|
14944
15001
|
RemotionRootContexts,
|
|
@@ -15138,7 +15195,7 @@ var SeriesInner = (props2) => {
|
|
|
15138
15195
|
})
|
|
15139
15196
|
});
|
|
15140
15197
|
};
|
|
15141
|
-
var Series = Object.assign(
|
|
15198
|
+
var Series = Object.assign(withInteractivitySchema({
|
|
15142
15199
|
Component: SeriesInner,
|
|
15143
15200
|
componentIdentity: "dev.remotion.remotion.Series",
|
|
15144
15201
|
schema: sequenceSchemaDefaultLayoutNone,
|
|
@@ -15728,6 +15785,7 @@ import { jsx as jsx82 } from "react/jsx-runtime";
|
|
|
15728
15785
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
15729
15786
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
15730
15787
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
15788
|
+
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
15731
15789
|
var unitDir = (from, to) => {
|
|
15732
15790
|
const dx = to[0] - from[0];
|
|
15733
15791
|
const dy = to[1] - from[1];
|
|
@@ -15871,6 +15929,7 @@ var doesReactSupportTransformOriginProperty = (version2) => {
|
|
|
15871
15929
|
const [major] = version2.split(".").map(Number);
|
|
15872
15930
|
return major > 18;
|
|
15873
15931
|
};
|
|
15932
|
+
var HtmlInCanvasWithPrivateProps = HtmlInCanvas;
|
|
15874
15933
|
var RenderSvg = ({
|
|
15875
15934
|
defaultName,
|
|
15876
15935
|
documentationLink,
|
|
@@ -15890,7 +15949,7 @@ var RenderSvg = ({
|
|
|
15890
15949
|
hidden,
|
|
15891
15950
|
name,
|
|
15892
15951
|
showInTimeline,
|
|
15893
|
-
|
|
15952
|
+
controls,
|
|
15894
15953
|
stack,
|
|
15895
15954
|
...props
|
|
15896
15955
|
}) => {
|
|
@@ -15977,7 +16036,7 @@ var RenderSvg = ({
|
|
|
15977
16036
|
}) : null
|
|
15978
16037
|
]
|
|
15979
16038
|
});
|
|
15980
|
-
const content = effects.length === 0 ? svg : /* @__PURE__ */ jsx40(
|
|
16039
|
+
const content = effects.length === 0 ? svg : /* @__PURE__ */ jsx40(HtmlInCanvasWithPrivateProps, {
|
|
15981
16040
|
ref: setCanvasRef,
|
|
15982
16041
|
width: Math.ceil(width),
|
|
15983
16042
|
height: Math.ceil(height),
|
|
@@ -15985,7 +16044,7 @@ var RenderSvg = ({
|
|
|
15985
16044
|
pixelDensity,
|
|
15986
16045
|
showInTimeline: false,
|
|
15987
16046
|
style: actualStyle,
|
|
15988
|
-
|
|
16047
|
+
controls,
|
|
15989
16048
|
children: svg
|
|
15990
16049
|
});
|
|
15991
16050
|
const stackProps = stack === undefined ? null : { stack };
|
|
@@ -15998,11 +16057,11 @@ var RenderSvg = ({
|
|
|
15998
16057
|
freeze,
|
|
15999
16058
|
hidden,
|
|
16000
16059
|
showInTimeline,
|
|
16001
|
-
|
|
16060
|
+
controls,
|
|
16002
16061
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
16003
16062
|
durationInFrames,
|
|
16004
16063
|
name: name ?? defaultName,
|
|
16005
|
-
|
|
16064
|
+
outlineRef,
|
|
16006
16065
|
_remotionInternalDocumentationLink: name === undefined ? documentationLink : undefined,
|
|
16007
16066
|
...stackProps,
|
|
16008
16067
|
children: content
|
|
@@ -16060,16 +16119,13 @@ var enumField = ({
|
|
|
16060
16119
|
};
|
|
16061
16120
|
var makeShapeSchema = (shapeFields) => {
|
|
16062
16121
|
return {
|
|
16063
|
-
|
|
16064
|
-
freeze: Internals.sequenceSchema.freeze,
|
|
16065
|
-
durationInFrames: Internals.sequenceSchema.durationInFrames,
|
|
16122
|
+
...Internals.baseSchema,
|
|
16066
16123
|
...shapeFields,
|
|
16067
16124
|
fill: colorField({
|
|
16068
16125
|
defaultValue: "#0b84ff",
|
|
16069
16126
|
description: "Fill"
|
|
16070
16127
|
}),
|
|
16071
|
-
...Internals.
|
|
16072
|
-
hidden: Internals.sequenceSchema.hidden
|
|
16128
|
+
...Internals.transformSchema
|
|
16073
16129
|
};
|
|
16074
16130
|
};
|
|
16075
16131
|
var arrowSchema = makeShapeSchema({
|
|
@@ -16127,7 +16183,7 @@ var ArrowInner = ({
|
|
|
16127
16183
|
...props
|
|
16128
16184
|
});
|
|
16129
16185
|
};
|
|
16130
|
-
var Arrow =
|
|
16186
|
+
var Arrow = Interactive.withSchema({
|
|
16131
16187
|
Component: ArrowInner,
|
|
16132
16188
|
componentIdentity: "dev.remotion.shapes.Arrow",
|
|
16133
16189
|
schema: arrowSchema,
|
|
@@ -16551,7 +16607,7 @@ var CalloutInner = ({
|
|
|
16551
16607
|
...props
|
|
16552
16608
|
});
|
|
16553
16609
|
};
|
|
16554
|
-
var Callout =
|
|
16610
|
+
var Callout = Interactive.withSchema({
|
|
16555
16611
|
Component: CalloutInner,
|
|
16556
16612
|
componentIdentity: "dev.remotion.shapes.Callout",
|
|
16557
16613
|
schema: calloutSchema,
|
|
@@ -16613,7 +16669,7 @@ var CircleInner = ({ radius, ...props }) => {
|
|
|
16613
16669
|
...props
|
|
16614
16670
|
});
|
|
16615
16671
|
};
|
|
16616
|
-
var Circle =
|
|
16672
|
+
var Circle = Interactive.withSchema({
|
|
16617
16673
|
Component: CircleInner,
|
|
16618
16674
|
componentIdentity: "dev.remotion.shapes.Circle",
|
|
16619
16675
|
schema: circleSchema,
|
|
@@ -16670,7 +16726,7 @@ var EllipseInner = ({ rx, ry, ...props }) => {
|
|
|
16670
16726
|
...props
|
|
16671
16727
|
});
|
|
16672
16728
|
};
|
|
16673
|
-
var Ellipse =
|
|
16729
|
+
var Ellipse = Interactive.withSchema({
|
|
16674
16730
|
Component: EllipseInner,
|
|
16675
16731
|
componentIdentity: "dev.remotion.shapes.Ellipse",
|
|
16676
16732
|
schema: ellipseSchema,
|
|
@@ -16808,7 +16864,7 @@ var HeartInner = ({
|
|
|
16808
16864
|
...props
|
|
16809
16865
|
});
|
|
16810
16866
|
};
|
|
16811
|
-
var Heart =
|
|
16867
|
+
var Heart = Interactive.withSchema({
|
|
16812
16868
|
Component: HeartInner,
|
|
16813
16869
|
componentIdentity: "dev.remotion.shapes.Heart",
|
|
16814
16870
|
schema: heartSchema,
|
|
@@ -16962,7 +17018,7 @@ var PieInner = ({
|
|
|
16962
17018
|
...props
|
|
16963
17019
|
});
|
|
16964
17020
|
};
|
|
16965
|
-
var Pie =
|
|
17021
|
+
var Pie = Interactive.withSchema({
|
|
16966
17022
|
Component: PieInner,
|
|
16967
17023
|
componentIdentity: "dev.remotion.shapes.Pie",
|
|
16968
17024
|
schema: pieSchema,
|
|
@@ -17061,7 +17117,7 @@ var PolygonInner = ({
|
|
|
17061
17117
|
...props
|
|
17062
17118
|
});
|
|
17063
17119
|
};
|
|
17064
|
-
var Polygon =
|
|
17120
|
+
var Polygon = Interactive.withSchema({
|
|
17065
17121
|
Component: PolygonInner,
|
|
17066
17122
|
componentIdentity: "dev.remotion.shapes.Polygon",
|
|
17067
17123
|
schema: polygonSchema,
|
|
@@ -17127,13 +17183,224 @@ var RectInner = ({
|
|
|
17127
17183
|
...props
|
|
17128
17184
|
});
|
|
17129
17185
|
};
|
|
17130
|
-
var Rect =
|
|
17186
|
+
var Rect = Interactive.withSchema({
|
|
17131
17187
|
Component: RectInner,
|
|
17132
17188
|
componentIdentity: "dev.remotion.shapes.Rect",
|
|
17133
17189
|
schema: rectSchema,
|
|
17134
17190
|
supportsEffects: true
|
|
17135
17191
|
});
|
|
17136
17192
|
Internals.addSequenceStackTraces(Rect);
|
|
17193
|
+
var KAPPA = 0.5522847498307936;
|
|
17194
|
+
var CAP_HANDLE = 4 / 3;
|
|
17195
|
+
var curve = ({
|
|
17196
|
+
to,
|
|
17197
|
+
cp1,
|
|
17198
|
+
cp2
|
|
17199
|
+
}) => {
|
|
17200
|
+
return {
|
|
17201
|
+
type: "C",
|
|
17202
|
+
cp1x: cp1[0],
|
|
17203
|
+
cp1y: cp1[1],
|
|
17204
|
+
cp2x: cp2[0],
|
|
17205
|
+
cp2y: cp2[1],
|
|
17206
|
+
x: to[0],
|
|
17207
|
+
y: to[1]
|
|
17208
|
+
};
|
|
17209
|
+
};
|
|
17210
|
+
var cap = ({
|
|
17211
|
+
from,
|
|
17212
|
+
to,
|
|
17213
|
+
radius,
|
|
17214
|
+
direction
|
|
17215
|
+
}) => {
|
|
17216
|
+
if (direction === "top") {
|
|
17217
|
+
return curve({
|
|
17218
|
+
to,
|
|
17219
|
+
cp1: [from[0], from[1] - radius * CAP_HANDLE],
|
|
17220
|
+
cp2: [to[0], to[1] - radius * CAP_HANDLE]
|
|
17221
|
+
});
|
|
17222
|
+
}
|
|
17223
|
+
if (direction === "right") {
|
|
17224
|
+
return curve({
|
|
17225
|
+
to,
|
|
17226
|
+
cp1: [from[0] + radius * CAP_HANDLE, from[1]],
|
|
17227
|
+
cp2: [to[0] + radius * CAP_HANDLE, to[1]]
|
|
17228
|
+
});
|
|
17229
|
+
}
|
|
17230
|
+
if (direction === "bottom") {
|
|
17231
|
+
return curve({
|
|
17232
|
+
to,
|
|
17233
|
+
cp1: [from[0], from[1] + radius * CAP_HANDLE],
|
|
17234
|
+
cp2: [to[0], to[1] + radius * CAP_HANDLE]
|
|
17235
|
+
});
|
|
17236
|
+
}
|
|
17237
|
+
return curve({
|
|
17238
|
+
to,
|
|
17239
|
+
cp1: [from[0] - radius * CAP_HANDLE, from[1]],
|
|
17240
|
+
cp2: [to[0] - radius * CAP_HANDLE, to[1]]
|
|
17241
|
+
});
|
|
17242
|
+
};
|
|
17243
|
+
var edge = ({
|
|
17244
|
+
from,
|
|
17245
|
+
to,
|
|
17246
|
+
edgeRoundness,
|
|
17247
|
+
direction
|
|
17248
|
+
}) => {
|
|
17249
|
+
const dx = to[0] - from[0];
|
|
17250
|
+
const dy = to[1] - from[1];
|
|
17251
|
+
const handleX = Math.abs(dx) * KAPPA * edgeRoundness;
|
|
17252
|
+
const handleY = Math.abs(dy) * KAPPA * edgeRoundness;
|
|
17253
|
+
if (direction === "top-right") {
|
|
17254
|
+
return curve({
|
|
17255
|
+
to,
|
|
17256
|
+
cp1: [from[0], from[1] + handleY],
|
|
17257
|
+
cp2: [to[0] - handleX, to[1]]
|
|
17258
|
+
});
|
|
17259
|
+
}
|
|
17260
|
+
if (direction === "right-bottom") {
|
|
17261
|
+
return curve({
|
|
17262
|
+
to,
|
|
17263
|
+
cp1: [from[0] - handleX, from[1]],
|
|
17264
|
+
cp2: [to[0], to[1] - handleY]
|
|
17265
|
+
});
|
|
17266
|
+
}
|
|
17267
|
+
if (direction === "bottom-left") {
|
|
17268
|
+
return curve({
|
|
17269
|
+
to,
|
|
17270
|
+
cp1: [from[0], from[1] - handleY],
|
|
17271
|
+
cp2: [to[0] + handleX, to[1]]
|
|
17272
|
+
});
|
|
17273
|
+
}
|
|
17274
|
+
return curve({
|
|
17275
|
+
to,
|
|
17276
|
+
cp1: [from[0] + handleX, from[1]],
|
|
17277
|
+
cp2: [to[0], to[1] + handleY]
|
|
17278
|
+
});
|
|
17279
|
+
};
|
|
17280
|
+
var clampCornerRadius = ({
|
|
17281
|
+
cornerRadius,
|
|
17282
|
+
width,
|
|
17283
|
+
height
|
|
17284
|
+
}) => {
|
|
17285
|
+
return Math.min(Math.max(cornerRadius, 0), width / 2, height / 2);
|
|
17286
|
+
};
|
|
17287
|
+
var makeSpark = ({
|
|
17288
|
+
width,
|
|
17289
|
+
height,
|
|
17290
|
+
edgeRoundness = 1,
|
|
17291
|
+
cornerRadius = 0
|
|
17292
|
+
}) => {
|
|
17293
|
+
const centerX = width / 2;
|
|
17294
|
+
const centerY = height / 2;
|
|
17295
|
+
const radius = clampCornerRadius({ cornerRadius, width, height });
|
|
17296
|
+
const top = [centerX, 0];
|
|
17297
|
+
const right = [width, centerY];
|
|
17298
|
+
const bottom = [centerX, height];
|
|
17299
|
+
const left = [0, centerY];
|
|
17300
|
+
const topRight = radius === 0 ? top : [centerX + radius, radius];
|
|
17301
|
+
const rightTop = radius === 0 ? right : [width - radius, centerY - radius];
|
|
17302
|
+
const rightBottom = radius === 0 ? right : [width - radius, centerY + radius];
|
|
17303
|
+
const bottomRight = radius === 0 ? bottom : [centerX + radius, height - radius];
|
|
17304
|
+
const bottomLeft = radius === 0 ? bottom : [centerX - radius, height - radius];
|
|
17305
|
+
const leftBottom = radius === 0 ? left : [radius, centerY + radius];
|
|
17306
|
+
const leftTop = radius === 0 ? left : [radius, centerY - radius];
|
|
17307
|
+
const topLeft = radius === 0 ? top : [centerX - radius, radius];
|
|
17308
|
+
const instructions = [
|
|
17309
|
+
{
|
|
17310
|
+
type: "M",
|
|
17311
|
+
x: topRight[0],
|
|
17312
|
+
y: topRight[1]
|
|
17313
|
+
},
|
|
17314
|
+
edge({
|
|
17315
|
+
from: topRight,
|
|
17316
|
+
to: rightTop,
|
|
17317
|
+
edgeRoundness,
|
|
17318
|
+
direction: "top-right"
|
|
17319
|
+
})
|
|
17320
|
+
];
|
|
17321
|
+
if (radius > 0) {
|
|
17322
|
+
instructions.push(cap({ from: rightTop, to: rightBottom, radius, direction: "right" }));
|
|
17323
|
+
}
|
|
17324
|
+
instructions.push(edge({
|
|
17325
|
+
from: rightBottom,
|
|
17326
|
+
to: bottomRight,
|
|
17327
|
+
edgeRoundness,
|
|
17328
|
+
direction: "right-bottom"
|
|
17329
|
+
}));
|
|
17330
|
+
if (radius > 0) {
|
|
17331
|
+
instructions.push(cap({ from: bottomRight, to: bottomLeft, radius, direction: "bottom" }));
|
|
17332
|
+
}
|
|
17333
|
+
instructions.push(edge({
|
|
17334
|
+
from: bottomLeft,
|
|
17335
|
+
to: leftBottom,
|
|
17336
|
+
edgeRoundness,
|
|
17337
|
+
direction: "bottom-left"
|
|
17338
|
+
}));
|
|
17339
|
+
if (radius > 0) {
|
|
17340
|
+
instructions.push(cap({ from: leftBottom, to: leftTop, radius, direction: "left" }));
|
|
17341
|
+
}
|
|
17342
|
+
instructions.push(edge({
|
|
17343
|
+
from: leftTop,
|
|
17344
|
+
to: topLeft,
|
|
17345
|
+
edgeRoundness,
|
|
17346
|
+
direction: "left-top"
|
|
17347
|
+
}));
|
|
17348
|
+
if (radius > 0) {
|
|
17349
|
+
instructions.push(cap({ from: topLeft, to: topRight, radius, direction: "top" }));
|
|
17350
|
+
}
|
|
17351
|
+
instructions.push({ type: "Z" });
|
|
17352
|
+
return {
|
|
17353
|
+
path: serializeInstructions(instructions),
|
|
17354
|
+
width,
|
|
17355
|
+
height,
|
|
17356
|
+
transformOrigin: `${centerX} ${centerY}`,
|
|
17357
|
+
instructions
|
|
17358
|
+
};
|
|
17359
|
+
};
|
|
17360
|
+
var sparkSchema = makeShapeSchema({
|
|
17361
|
+
width: numberField({
|
|
17362
|
+
defaultValue: 100,
|
|
17363
|
+
description: "Width",
|
|
17364
|
+
min: 0
|
|
17365
|
+
}),
|
|
17366
|
+
height: numberField({
|
|
17367
|
+
defaultValue: 140,
|
|
17368
|
+
description: "Height",
|
|
17369
|
+
min: 0
|
|
17370
|
+
}),
|
|
17371
|
+
edgeRoundness: numberField({
|
|
17372
|
+
defaultValue: 1,
|
|
17373
|
+
description: "Edge Roundness",
|
|
17374
|
+
min: 0,
|
|
17375
|
+
step: 0.01
|
|
17376
|
+
}),
|
|
17377
|
+
cornerRadius: numberField({
|
|
17378
|
+
defaultValue: 0,
|
|
17379
|
+
description: "Corner Radius",
|
|
17380
|
+
min: 0
|
|
17381
|
+
})
|
|
17382
|
+
});
|
|
17383
|
+
var SparkInner = ({
|
|
17384
|
+
width,
|
|
17385
|
+
height,
|
|
17386
|
+
edgeRoundness,
|
|
17387
|
+
cornerRadius,
|
|
17388
|
+
...props
|
|
17389
|
+
}) => {
|
|
17390
|
+
return /* @__PURE__ */ jsx102(RenderSvg, {
|
|
17391
|
+
defaultName: "<Spark>",
|
|
17392
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/spark",
|
|
17393
|
+
...makeSpark({ width, height, edgeRoundness, cornerRadius }),
|
|
17394
|
+
...props
|
|
17395
|
+
});
|
|
17396
|
+
};
|
|
17397
|
+
var Spark = Interactive.withSchema({
|
|
17398
|
+
Component: SparkInner,
|
|
17399
|
+
componentIdentity: "dev.remotion.shapes.Spark",
|
|
17400
|
+
schema: sparkSchema,
|
|
17401
|
+
supportsEffects: true
|
|
17402
|
+
});
|
|
17403
|
+
Internals.addSequenceStackTraces(Spark);
|
|
17137
17404
|
var star = ({
|
|
17138
17405
|
centerX,
|
|
17139
17406
|
centerY,
|
|
@@ -17224,7 +17491,7 @@ var StarInner = ({
|
|
|
17224
17491
|
edgeRoundness,
|
|
17225
17492
|
...props
|
|
17226
17493
|
}) => {
|
|
17227
|
-
return /* @__PURE__ */
|
|
17494
|
+
return /* @__PURE__ */ jsx112(RenderSvg, {
|
|
17228
17495
|
defaultName: "<Star>",
|
|
17229
17496
|
documentationLink: "https://www.remotion.dev/docs/shapes/star",
|
|
17230
17497
|
...makeStar({
|
|
@@ -17237,7 +17504,7 @@ var StarInner = ({
|
|
|
17237
17504
|
...props
|
|
17238
17505
|
});
|
|
17239
17506
|
};
|
|
17240
|
-
var Star =
|
|
17507
|
+
var Star = Interactive.withSchema({
|
|
17241
17508
|
Component: StarInner,
|
|
17242
17509
|
componentIdentity: "dev.remotion.shapes.Star",
|
|
17243
17510
|
schema: starSchema,
|
|
@@ -17336,14 +17603,14 @@ var TriangleInner = ({
|
|
|
17336
17603
|
cornerRadius,
|
|
17337
17604
|
...props
|
|
17338
17605
|
}) => {
|
|
17339
|
-
return /* @__PURE__ */
|
|
17606
|
+
return /* @__PURE__ */ jsx122(RenderSvg, {
|
|
17340
17607
|
defaultName: "<Triangle>",
|
|
17341
17608
|
documentationLink: "https://www.remotion.dev/docs/shapes/triangle",
|
|
17342
17609
|
...makeTriangle({ length: length2, direction, edgeRoundness, cornerRadius }),
|
|
17343
17610
|
...props
|
|
17344
17611
|
});
|
|
17345
17612
|
};
|
|
17346
|
-
var Triangle =
|
|
17613
|
+
var Triangle = Interactive.withSchema({
|
|
17347
17614
|
Component: TriangleInner,
|
|
17348
17615
|
componentIdentity: "dev.remotion.shapes.Triangle",
|
|
17349
17616
|
schema: triangleSchema,
|
|
@@ -17809,18 +18076,18 @@ function arcToCircle2({
|
|
|
17809
18076
|
result.push(approximate_unit_arc2(theta1, delta_theta));
|
|
17810
18077
|
theta1 += delta_theta;
|
|
17811
18078
|
}
|
|
17812
|
-
return result.map((
|
|
17813
|
-
for (let i = 0;i <
|
|
17814
|
-
let x =
|
|
17815
|
-
let y =
|
|
18079
|
+
return result.map((curve2) => {
|
|
18080
|
+
for (let i = 0;i < curve2.length; i += 2) {
|
|
18081
|
+
let x = curve2[i + 0];
|
|
18082
|
+
let y = curve2[i + 1];
|
|
17816
18083
|
x *= rx;
|
|
17817
18084
|
y *= ry;
|
|
17818
18085
|
const xp = cos_phi * x - sin_phi * y;
|
|
17819
18086
|
const yp = sin_phi * x + cos_phi * y;
|
|
17820
|
-
|
|
17821
|
-
|
|
18087
|
+
curve2[i + 0] = xp + cc[0];
|
|
18088
|
+
curve2[i + 1] = yp + cc[1];
|
|
17822
18089
|
}
|
|
17823
|
-
return
|
|
18090
|
+
return curve2;
|
|
17824
18091
|
});
|
|
17825
18092
|
}
|
|
17826
18093
|
var removeATSHVQInstructions2 = (segments) => {
|
|
@@ -18427,7 +18694,7 @@ import { jsx as jsx93 } from "react/jsx-runtime";
|
|
|
18427
18694
|
import React72 from "react";
|
|
18428
18695
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
18429
18696
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
18430
|
-
import { jsx as
|
|
18697
|
+
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
18431
18698
|
import * as React36 from "react";
|
|
18432
18699
|
import * as ReactDOM4 from "react-dom";
|
|
18433
18700
|
import React112 from "react";
|
|
@@ -19241,11 +19508,11 @@ var Link = ({
|
|
|
19241
19508
|
});
|
|
19242
19509
|
};
|
|
19243
19510
|
var PlanePaperIcon = (props) => {
|
|
19244
|
-
return /* @__PURE__ */
|
|
19511
|
+
return /* @__PURE__ */ jsx123("svg", {
|
|
19245
19512
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19246
19513
|
...props,
|
|
19247
19514
|
viewBox: "0 0 576 512",
|
|
19248
|
-
children: /* @__PURE__ */
|
|
19515
|
+
children: /* @__PURE__ */ jsx123("path", {
|
|
19249
19516
|
fill: "currentcolor",
|
|
19250
19517
|
d: "M169.9 280L94.9 448.6 461.2 280 169.9 280zm291.3-48L94.9 63.4 169.9 232 461.2 232zM34.8 465.6L128 256 34.8 46.4C33 42.2 32 37.6 32 33 32 14.8 46.7 0 64.8 0 69.5 0 74.2 1 78.5 3L554.2 222c13.3 6.1 21.8 19.4 21.8 34s-8.5 27.9-21.8 34L78.5 509c-4.3 2-9 3-13.7 3-18.1 0-32.8-14.8-32.8-33 0-4.6 1-9.2 2.8-13.4z"
|
|
19251
19518
|
})
|