@remotion/promo-pages 4.0.489 → 4.0.490
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 +291 -153
- package/dist/components/Homepage.js +5 -21
- package/dist/components/homepage/CommunityStatsItems.js +2 -2
- package/dist/components/homepage/Demo/DemoRender.d.ts +1 -1
- package/dist/components/homepage/Demo/DisplayedEmoji.js +5 -3
- package/dist/components/homepage/Demo/math.d.ts +1 -1
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/MakeVideosAgentically.d.ts +1 -0
- package/dist/components/homepage/MakeVideosAgentically.js +4 -6
- package/dist/components/homepage/MakeVideosInteractively.d.ts +2 -0
- package/dist/components/homepage/MakeVideosInteractively.js +3 -6
- package/dist/components/homepage/MakeVideosLinks.js +1 -1
- package/dist/components/homepage/MakeVideosProgrammatically.d.ts +2 -0
- package/dist/components/homepage/MakeVideosProgrammatically.js +2 -5
- package/dist/components/homepage/Pricing.d.ts +3 -1
- package/dist/components/homepage/Pricing.js +6 -2
- package/dist/components/homepage/WriteInReact.js +2 -1
- package/dist/components/team/TrustSection.js +1 -1
- package/dist/design.js +94 -48
- package/dist/experts.js +94 -37
- package/dist/homepage/Pricing.js +94 -48
- package/dist/prompts/PromptsGallery.js +94 -48
- package/dist/prompts/PromptsShow.js +94 -48
- package/dist/prompts/PromptsSubmit.js +94 -48
- package/dist/team.js +94 -48
- package/dist/template-modal-content.js +94 -48
- package/dist/templates.js +95 -48
- package/package.json +13 -13
- package/dist/components/homepage/CanvasSectionTitle.d.ts +0 -4
- package/dist/components/homepage/CanvasSectionTitle.js +0 -14
- package/dist/components/homepage/EditorStarterSection.d.ts +0 -3
- package/dist/components/homepage/EditorStarterSection.js +0 -8
package/dist/design.js
CHANGED
|
@@ -5279,26 +5279,20 @@ var continueRenderInternal = ({
|
|
|
5279
5279
|
if (typeof handle !== "number") {
|
|
5280
5280
|
throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: " + JSON.stringify(handle));
|
|
5281
5281
|
}
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
delete scope.remotion_delayRenderTimeouts[handle];
|
|
5297
|
-
}
|
|
5298
|
-
return false;
|
|
5299
|
-
}
|
|
5300
|
-
return true;
|
|
5301
|
-
});
|
|
5282
|
+
const handleExists = scope.remotion_delayRenderHandles.includes(handle);
|
|
5283
|
+
const timeoutEntry = scope.remotion_delayRenderTimeouts[handle];
|
|
5284
|
+
if (handleExists && environment.isRendering && timeoutEntry) {
|
|
5285
|
+
const { label: label2, startTime, timeout } = timeoutEntry;
|
|
5286
|
+
clearTimeout(timeout);
|
|
5287
|
+
const message = [
|
|
5288
|
+
label2 ? `"${label2}"` : "A handle",
|
|
5289
|
+
DELAY_RENDER_CLEAR_TOKEN,
|
|
5290
|
+
`${Date.now() - startTime}ms`
|
|
5291
|
+
].filter(truthy).join(" ");
|
|
5292
|
+
Log.verbose({ logLevel, tag: "delayRender()" }, message);
|
|
5293
|
+
delete scope.remotion_delayRenderTimeouts[handle];
|
|
5294
|
+
}
|
|
5295
|
+
scope.remotion_delayRenderHandles = scope.remotion_delayRenderHandles.filter((h) => h !== handle);
|
|
5302
5296
|
if (scope.remotion_delayRenderHandles.length === 0) {
|
|
5303
5297
|
scope.remotion_renderReady = true;
|
|
5304
5298
|
}
|
|
@@ -5571,7 +5565,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
5571
5565
|
var addSequenceStackTraces = (component) => {
|
|
5572
5566
|
componentsToAddStacksTo.push(component);
|
|
5573
5567
|
};
|
|
5574
|
-
var VERSION = "4.0.
|
|
5568
|
+
var VERSION = "4.0.490";
|
|
5575
5569
|
var checkMultipleRemotionVersions = () => {
|
|
5576
5570
|
if (typeof globalThis === "undefined") {
|
|
5577
5571
|
return;
|
|
@@ -5952,7 +5946,8 @@ var transformSchema = {
|
|
|
5952
5946
|
max: 100,
|
|
5953
5947
|
step: 0.01,
|
|
5954
5948
|
default: 1,
|
|
5955
|
-
description: "Scale"
|
|
5949
|
+
description: "Scale",
|
|
5950
|
+
defaultKeyframeOutput: "perceptual-scale"
|
|
5956
5951
|
},
|
|
5957
5952
|
"style.rotate": {
|
|
5958
5953
|
type: "rotation-css",
|
|
@@ -6756,8 +6751,20 @@ var serializeStringInterpolationValue = ({
|
|
|
6756
6751
|
}
|
|
6757
6752
|
return values.slice(0, dimensions).map((value, index) => `${stringifyNumber(value)}${units[index]}`).join(" ");
|
|
6758
6753
|
};
|
|
6754
|
+
var toSignedArea = (scale) => {
|
|
6755
|
+
if (scale === 0) {
|
|
6756
|
+
return 0;
|
|
6757
|
+
}
|
|
6758
|
+
return Math.sign(scale) * scale * scale;
|
|
6759
|
+
};
|
|
6760
|
+
var fromSignedArea = (area) => {
|
|
6761
|
+
if (area === 0) {
|
|
6762
|
+
return 0;
|
|
6763
|
+
}
|
|
6764
|
+
return Math.sign(area) * Math.sqrt(Math.abs(area));
|
|
6765
|
+
};
|
|
6759
6766
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
6760
|
-
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
6767
|
+
const { extrapolateLeft, extrapolateRight, easing, output } = options;
|
|
6761
6768
|
let result = input;
|
|
6762
6769
|
const [inputMin, inputMax] = inputRange;
|
|
6763
6770
|
const [outputMin, outputMax] = outputRange;
|
|
@@ -6788,7 +6795,13 @@ function interpolateFunction(input, inputRange, outputRange, options) {
|
|
|
6788
6795
|
}
|
|
6789
6796
|
result = (result - inputMin) / (inputMax - inputMin);
|
|
6790
6797
|
result = easing(result);
|
|
6791
|
-
|
|
6798
|
+
if (output === "perceptual-scale") {
|
|
6799
|
+
const signedAreaMin = toSignedArea(outputMin);
|
|
6800
|
+
const signedAreaMax = toSignedArea(outputMax);
|
|
6801
|
+
result = fromSignedArea(result * (signedAreaMax - signedAreaMin) + signedAreaMin);
|
|
6802
|
+
} else {
|
|
6803
|
+
result = result * (outputMax - outputMin) + outputMin;
|
|
6804
|
+
}
|
|
6792
6805
|
return result;
|
|
6793
6806
|
}
|
|
6794
6807
|
function findRange(input, inputRange) {
|
|
@@ -6801,6 +6814,9 @@ function findRange(input, inputRange) {
|
|
|
6801
6814
|
return i - 1;
|
|
6802
6815
|
}
|
|
6803
6816
|
var defaultEasing = (num) => num;
|
|
6817
|
+
var resolveOutputOption = (output) => {
|
|
6818
|
+
return output ?? "linear";
|
|
6819
|
+
};
|
|
6804
6820
|
var shouldExtendRightForEasing = (easing) => {
|
|
6805
6821
|
return easing.remotionShouldExtendRight === true;
|
|
6806
6822
|
};
|
|
@@ -6822,12 +6838,14 @@ var interpolateSegment = ({
|
|
|
6822
6838
|
outputRange,
|
|
6823
6839
|
easing,
|
|
6824
6840
|
extrapolateLeft,
|
|
6825
|
-
extrapolateRight
|
|
6841
|
+
extrapolateRight,
|
|
6842
|
+
output
|
|
6826
6843
|
}) => {
|
|
6827
6844
|
return interpolateFunction(input, inputRange, outputRange, {
|
|
6828
6845
|
easing,
|
|
6829
6846
|
extrapolateLeft,
|
|
6830
|
-
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight
|
|
6847
|
+
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight,
|
|
6848
|
+
output
|
|
6831
6849
|
});
|
|
6832
6850
|
};
|
|
6833
6851
|
var interpolateNumber = ({
|
|
@@ -6836,6 +6854,7 @@ var interpolateNumber = ({
|
|
|
6836
6854
|
outputRange,
|
|
6837
6855
|
options
|
|
6838
6856
|
}) => {
|
|
6857
|
+
const output = resolveOutputOption(options?.output);
|
|
6839
6858
|
if (inputRange.length === 1) {
|
|
6840
6859
|
return outputRange[0];
|
|
6841
6860
|
}
|
|
@@ -6860,7 +6879,8 @@ var interpolateNumber = ({
|
|
|
6860
6879
|
outputRange: [outputRange[range], outputRange[range + 1]],
|
|
6861
6880
|
easing,
|
|
6862
6881
|
extrapolateLeft,
|
|
6863
|
-
extrapolateRight
|
|
6882
|
+
extrapolateRight,
|
|
6883
|
+
output
|
|
6864
6884
|
});
|
|
6865
6885
|
for (let segmentIndex = 0;segmentIndex < range; segmentIndex++) {
|
|
6866
6886
|
const previousEasing = resolveEasingForSegment({
|
|
@@ -6880,7 +6900,8 @@ var interpolateNumber = ({
|
|
|
6880
6900
|
outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
|
|
6881
6901
|
easing: previousEasing,
|
|
6882
6902
|
extrapolateLeft,
|
|
6883
|
-
extrapolateRight: "extend"
|
|
6903
|
+
extrapolateRight: "extend",
|
|
6904
|
+
output
|
|
6884
6905
|
});
|
|
6885
6906
|
result += continuedSegmentValue - outputRange[segmentIndex + 1];
|
|
6886
6907
|
}
|
|
@@ -6928,14 +6949,18 @@ var interpolateString = ({
|
|
|
6928
6949
|
}
|
|
6929
6950
|
}
|
|
6930
6951
|
}
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
values
|
|
6952
|
+
const values = [0, 0, 0];
|
|
6953
|
+
for (let axis = 0;axis < dimensions; axis++) {
|
|
6954
|
+
values[axis] = interpolateNumber({
|
|
6934
6955
|
input,
|
|
6935
6956
|
inputRange,
|
|
6936
6957
|
outputRange: parsedOutputRange.map((parsed) => parsed.values[axis]),
|
|
6937
6958
|
options
|
|
6938
|
-
})
|
|
6959
|
+
});
|
|
6960
|
+
}
|
|
6961
|
+
return serializeStringInterpolationValue({
|
|
6962
|
+
kind,
|
|
6963
|
+
values,
|
|
6939
6964
|
units,
|
|
6940
6965
|
dimensions
|
|
6941
6966
|
});
|
|
@@ -7019,6 +7044,12 @@ function assertValidInterpolatePosterizeOption(posterize) {
|
|
|
7019
7044
|
throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
|
|
7020
7045
|
}
|
|
7021
7046
|
}
|
|
7047
|
+
function assertValidInterpolateOutputOption(output) {
|
|
7048
|
+
if (output === undefined || output === "linear" || output === "perceptual-scale") {
|
|
7049
|
+
return;
|
|
7050
|
+
}
|
|
7051
|
+
throw new Error(`output must be "linear" or "perceptual-scale", but got ${String(output)}`);
|
|
7052
|
+
}
|
|
7022
7053
|
function interpolate(input, inputRange, outputRange, options) {
|
|
7023
7054
|
if (typeof input === "undefined") {
|
|
7024
7055
|
throw new Error("input can not be undefined");
|
|
@@ -7036,6 +7067,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
7036
7067
|
checkValidInputRange(inputRange);
|
|
7037
7068
|
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
7038
7069
|
assertValidInterpolatePosterizeOption(options?.posterize);
|
|
7070
|
+
assertValidInterpolateOutputOption(options?.output);
|
|
7039
7071
|
if (typeof input !== "number") {
|
|
7040
7072
|
throw new TypeError("Cannot interpolate an input which is not a number");
|
|
7041
7073
|
}
|
|
@@ -7980,6 +8012,7 @@ var interpolateKeyframedStatus = ({
|
|
|
7980
8012
|
easing: easing.map((e) => easingToFn({ easing: e, forceSpringAllowTail })),
|
|
7981
8013
|
extrapolateLeft: clamping.left,
|
|
7982
8014
|
extrapolateRight: clamping.right,
|
|
8015
|
+
output: status.output,
|
|
7983
8016
|
posterize: status.posterize
|
|
7984
8017
|
});
|
|
7985
8018
|
} catch {
|
|
@@ -8220,7 +8253,7 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
8220
8253
|
const out = {};
|
|
8221
8254
|
const addKey = (key, field) => {
|
|
8222
8255
|
if (key in out) {
|
|
8223
|
-
|
|
8256
|
+
return;
|
|
8224
8257
|
}
|
|
8225
8258
|
out[key] = field;
|
|
8226
8259
|
};
|
|
@@ -14099,6 +14132,22 @@ var Img = withInteractivitySchema({
|
|
|
14099
14132
|
supportsEffects: true
|
|
14100
14133
|
});
|
|
14101
14134
|
addSequenceStackTraces(Img);
|
|
14135
|
+
var sourcePathToIdentityPrefix = (packageName) => {
|
|
14136
|
+
if (packageName === "remotion") {
|
|
14137
|
+
return "dev.remotion.remotion";
|
|
14138
|
+
}
|
|
14139
|
+
if (packageName.startsWith("@remotion/")) {
|
|
14140
|
+
const normalizedPackageName = packageName.slice("@remotion/".length).replace(/-([a-z])/g, (_, char) => char.toUpperCase());
|
|
14141
|
+
return `dev.remotion.${normalizedPackageName}`;
|
|
14142
|
+
}
|
|
14143
|
+
throw new Error(`Unsupported Remotion package name: ${packageName}`);
|
|
14144
|
+
};
|
|
14145
|
+
var makeRemotionComponentIdentity = ({
|
|
14146
|
+
packageName,
|
|
14147
|
+
componentName
|
|
14148
|
+
}) => {
|
|
14149
|
+
return `${sourcePathToIdentityPrefix(packageName)}.${componentName}`;
|
|
14150
|
+
};
|
|
14102
14151
|
var interactiveElementSchema = {
|
|
14103
14152
|
...baseSchema,
|
|
14104
14153
|
...transformSchema,
|
|
@@ -14112,6 +14161,11 @@ var setRef = (ref, value) => {
|
|
|
14112
14161
|
ref.current = value;
|
|
14113
14162
|
}
|
|
14114
14163
|
};
|
|
14164
|
+
var withSchema = (options) => {
|
|
14165
|
+
const Wrapped = withInteractivitySchema(options);
|
|
14166
|
+
addSequenceStackTraces(Wrapped);
|
|
14167
|
+
return Wrapped;
|
|
14168
|
+
};
|
|
14115
14169
|
var makeInteractiveElement = (tag, displayName) => {
|
|
14116
14170
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
14117
14171
|
const {
|
|
@@ -14151,15 +14205,17 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14151
14205
|
});
|
|
14152
14206
|
});
|
|
14153
14207
|
Inner.displayName = displayName;
|
|
14154
|
-
const Wrapped =
|
|
14208
|
+
const Wrapped = withSchema({
|
|
14155
14209
|
Component: Inner,
|
|
14156
14210
|
componentName: displayName,
|
|
14157
|
-
componentIdentity:
|
|
14211
|
+
componentIdentity: makeRemotionComponentIdentity({
|
|
14212
|
+
packageName: "remotion",
|
|
14213
|
+
componentName: displayName.slice(1, -1)
|
|
14214
|
+
}),
|
|
14158
14215
|
schema: interactiveElementSchema,
|
|
14159
14216
|
supportsEffects: false
|
|
14160
14217
|
});
|
|
14161
14218
|
Wrapped.displayName = displayName;
|
|
14162
|
-
addSequenceStackTraces(Wrapped);
|
|
14163
14219
|
return Wrapped;
|
|
14164
14220
|
};
|
|
14165
14221
|
var Interactive = {
|
|
@@ -14168,7 +14224,8 @@ var Interactive = {
|
|
|
14168
14224
|
textSchema,
|
|
14169
14225
|
premountSchema,
|
|
14170
14226
|
sequenceSchema,
|
|
14171
|
-
withSchema
|
|
14227
|
+
withSchema,
|
|
14228
|
+
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
14172
14229
|
A: makeInteractiveElement("a", "<Interactive.A>"),
|
|
14173
14230
|
Article: makeInteractiveElement("article", "<Interactive.Article>"),
|
|
14174
14231
|
Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
|
|
@@ -16651,7 +16708,6 @@ var Arrow = Interactive.withSchema({
|
|
|
16651
16708
|
schema: arrowSchema,
|
|
16652
16709
|
supportsEffects: true
|
|
16653
16710
|
});
|
|
16654
|
-
Internals.addSequenceStackTraces(Arrow);
|
|
16655
16711
|
var shortenVector = (vector, radius) => {
|
|
16656
16712
|
const [x, y] = vector;
|
|
16657
16713
|
const currentLength = Math.sqrt(x * x + y * y);
|
|
@@ -17076,7 +17132,6 @@ var Callout = Interactive.withSchema({
|
|
|
17076
17132
|
schema: calloutSchema,
|
|
17077
17133
|
supportsEffects: true
|
|
17078
17134
|
});
|
|
17079
|
-
Internals.addSequenceStackTraces(Callout);
|
|
17080
17135
|
var makeCircle = ({ radius }) => {
|
|
17081
17136
|
const instructions = [
|
|
17082
17137
|
{
|
|
@@ -17139,7 +17194,6 @@ var Circle = Interactive.withSchema({
|
|
|
17139
17194
|
schema: circleSchema,
|
|
17140
17195
|
supportsEffects: true
|
|
17141
17196
|
});
|
|
17142
|
-
Internals.addSequenceStackTraces(Circle);
|
|
17143
17197
|
var makeEllipse = ({ rx, ry }) => {
|
|
17144
17198
|
const instructions = [
|
|
17145
17199
|
{
|
|
@@ -17197,7 +17251,6 @@ var Ellipse = Interactive.withSchema({
|
|
|
17197
17251
|
schema: ellipseSchema,
|
|
17198
17252
|
supportsEffects: true
|
|
17199
17253
|
});
|
|
17200
|
-
Internals.addSequenceStackTraces(Ellipse);
|
|
17201
17254
|
var makeHeart = ({
|
|
17202
17255
|
height,
|
|
17203
17256
|
aspectRatio = 1.1,
|
|
@@ -17336,7 +17389,6 @@ var Heart = Interactive.withSchema({
|
|
|
17336
17389
|
schema: heartSchema,
|
|
17337
17390
|
supportsEffects: true
|
|
17338
17391
|
});
|
|
17339
|
-
Internals.addSequenceStackTraces(Heart);
|
|
17340
17392
|
var getCoord = ({
|
|
17341
17393
|
counterClockwise,
|
|
17342
17394
|
actualProgress,
|
|
@@ -17491,7 +17543,6 @@ var Pie = Interactive.withSchema({
|
|
|
17491
17543
|
schema: pieSchema,
|
|
17492
17544
|
supportsEffects: true
|
|
17493
17545
|
});
|
|
17494
|
-
Internals.addSequenceStackTraces(Pie);
|
|
17495
17546
|
function polygon({
|
|
17496
17547
|
points,
|
|
17497
17548
|
radius,
|
|
@@ -17591,7 +17642,6 @@ var Polygon = Interactive.withSchema({
|
|
|
17591
17642
|
schema: polygonSchema,
|
|
17592
17643
|
supportsEffects: true
|
|
17593
17644
|
});
|
|
17594
|
-
Internals.addSequenceStackTraces(Polygon);
|
|
17595
17645
|
var makeRect = ({
|
|
17596
17646
|
width,
|
|
17597
17647
|
height,
|
|
@@ -17658,7 +17708,6 @@ var Rect = Interactive.withSchema({
|
|
|
17658
17708
|
schema: rectSchema,
|
|
17659
17709
|
supportsEffects: true
|
|
17660
17710
|
});
|
|
17661
|
-
Internals.addSequenceStackTraces(Rect);
|
|
17662
17711
|
var KAPPA = 0.5522847498307936;
|
|
17663
17712
|
var CAP_HANDLE = 4 / 3;
|
|
17664
17713
|
var curve = ({
|
|
@@ -17870,7 +17919,6 @@ var Spark = Interactive.withSchema({
|
|
|
17870
17919
|
schema: sparkSchema,
|
|
17871
17920
|
supportsEffects: true
|
|
17872
17921
|
});
|
|
17873
|
-
Internals.addSequenceStackTraces(Spark);
|
|
17874
17922
|
var star = ({
|
|
17875
17923
|
centerX,
|
|
17876
17924
|
centerY,
|
|
@@ -17981,7 +18029,6 @@ var Star = Interactive.withSchema({
|
|
|
17981
18029
|
schema: starSchema,
|
|
17982
18030
|
supportsEffects: true
|
|
17983
18031
|
});
|
|
17984
|
-
Internals.addSequenceStackTraces(Star);
|
|
17985
18032
|
var makeTriangle = ({
|
|
17986
18033
|
length: length2,
|
|
17987
18034
|
direction = "right",
|
|
@@ -18088,7 +18135,6 @@ var Triangle = Interactive.withSchema({
|
|
|
18088
18135
|
schema: triangleSchema,
|
|
18089
18136
|
supportsEffects: true
|
|
18090
18137
|
});
|
|
18091
|
-
Internals.addSequenceStackTraces(Triangle);
|
|
18092
18138
|
|
|
18093
18139
|
// ../svg-3d-engine/dist/esm/index.mjs
|
|
18094
18140
|
function truthy2(value) {
|
package/dist/experts.js
CHANGED
|
@@ -2049,26 +2049,20 @@ var continueRenderInternal = ({
|
|
|
2049
2049
|
if (typeof handle !== "number") {
|
|
2050
2050
|
throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: " + JSON.stringify(handle));
|
|
2051
2051
|
}
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
delete scope.remotion_delayRenderTimeouts[handle];
|
|
2067
|
-
}
|
|
2068
|
-
return false;
|
|
2069
|
-
}
|
|
2070
|
-
return true;
|
|
2071
|
-
});
|
|
2052
|
+
const handleExists = scope.remotion_delayRenderHandles.includes(handle);
|
|
2053
|
+
const timeoutEntry = scope.remotion_delayRenderTimeouts[handle];
|
|
2054
|
+
if (handleExists && environment.isRendering && timeoutEntry) {
|
|
2055
|
+
const { label: label2, startTime, timeout } = timeoutEntry;
|
|
2056
|
+
clearTimeout(timeout);
|
|
2057
|
+
const message = [
|
|
2058
|
+
label2 ? `"${label2}"` : "A handle",
|
|
2059
|
+
DELAY_RENDER_CLEAR_TOKEN,
|
|
2060
|
+
`${Date.now() - startTime}ms`
|
|
2061
|
+
].filter(truthy).join(" ");
|
|
2062
|
+
Log.verbose({ logLevel, tag: "delayRender()" }, message);
|
|
2063
|
+
delete scope.remotion_delayRenderTimeouts[handle];
|
|
2064
|
+
}
|
|
2065
|
+
scope.remotion_delayRenderHandles = scope.remotion_delayRenderHandles.filter((h) => h !== handle);
|
|
2072
2066
|
if (scope.remotion_delayRenderHandles.length === 0) {
|
|
2073
2067
|
scope.remotion_renderReady = true;
|
|
2074
2068
|
}
|
|
@@ -2341,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2341
2335
|
var addSequenceStackTraces = (component) => {
|
|
2342
2336
|
componentsToAddStacksTo.push(component);
|
|
2343
2337
|
};
|
|
2344
|
-
var VERSION = "4.0.
|
|
2338
|
+
var VERSION = "4.0.490";
|
|
2345
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2346
2340
|
if (typeof globalThis === "undefined") {
|
|
2347
2341
|
return;
|
|
@@ -2722,7 +2716,8 @@ var transformSchema = {
|
|
|
2722
2716
|
max: 100,
|
|
2723
2717
|
step: 0.01,
|
|
2724
2718
|
default: 1,
|
|
2725
|
-
description: "Scale"
|
|
2719
|
+
description: "Scale",
|
|
2720
|
+
defaultKeyframeOutput: "perceptual-scale"
|
|
2726
2721
|
},
|
|
2727
2722
|
"style.rotate": {
|
|
2728
2723
|
type: "rotation-css",
|
|
@@ -3526,8 +3521,20 @@ var serializeStringInterpolationValue = ({
|
|
|
3526
3521
|
}
|
|
3527
3522
|
return values.slice(0, dimensions).map((value, index) => `${stringifyNumber(value)}${units[index]}`).join(" ");
|
|
3528
3523
|
};
|
|
3524
|
+
var toSignedArea = (scale) => {
|
|
3525
|
+
if (scale === 0) {
|
|
3526
|
+
return 0;
|
|
3527
|
+
}
|
|
3528
|
+
return Math.sign(scale) * scale * scale;
|
|
3529
|
+
};
|
|
3530
|
+
var fromSignedArea = (area) => {
|
|
3531
|
+
if (area === 0) {
|
|
3532
|
+
return 0;
|
|
3533
|
+
}
|
|
3534
|
+
return Math.sign(area) * Math.sqrt(Math.abs(area));
|
|
3535
|
+
};
|
|
3529
3536
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
3530
|
-
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
3537
|
+
const { extrapolateLeft, extrapolateRight, easing, output } = options;
|
|
3531
3538
|
let result = input;
|
|
3532
3539
|
const [inputMin, inputMax] = inputRange;
|
|
3533
3540
|
const [outputMin, outputMax] = outputRange;
|
|
@@ -3558,7 +3565,13 @@ function interpolateFunction(input, inputRange, outputRange, options) {
|
|
|
3558
3565
|
}
|
|
3559
3566
|
result = (result - inputMin) / (inputMax - inputMin);
|
|
3560
3567
|
result = easing(result);
|
|
3561
|
-
|
|
3568
|
+
if (output === "perceptual-scale") {
|
|
3569
|
+
const signedAreaMin = toSignedArea(outputMin);
|
|
3570
|
+
const signedAreaMax = toSignedArea(outputMax);
|
|
3571
|
+
result = fromSignedArea(result * (signedAreaMax - signedAreaMin) + signedAreaMin);
|
|
3572
|
+
} else {
|
|
3573
|
+
result = result * (outputMax - outputMin) + outputMin;
|
|
3574
|
+
}
|
|
3562
3575
|
return result;
|
|
3563
3576
|
}
|
|
3564
3577
|
function findRange(input, inputRange) {
|
|
@@ -3571,6 +3584,9 @@ function findRange(input, inputRange) {
|
|
|
3571
3584
|
return i - 1;
|
|
3572
3585
|
}
|
|
3573
3586
|
var defaultEasing = (num) => num;
|
|
3587
|
+
var resolveOutputOption = (output) => {
|
|
3588
|
+
return output ?? "linear";
|
|
3589
|
+
};
|
|
3574
3590
|
var shouldExtendRightForEasing = (easing) => {
|
|
3575
3591
|
return easing.remotionShouldExtendRight === true;
|
|
3576
3592
|
};
|
|
@@ -3592,12 +3608,14 @@ var interpolateSegment = ({
|
|
|
3592
3608
|
outputRange,
|
|
3593
3609
|
easing,
|
|
3594
3610
|
extrapolateLeft,
|
|
3595
|
-
extrapolateRight
|
|
3611
|
+
extrapolateRight,
|
|
3612
|
+
output
|
|
3596
3613
|
}) => {
|
|
3597
3614
|
return interpolateFunction(input, inputRange, outputRange, {
|
|
3598
3615
|
easing,
|
|
3599
3616
|
extrapolateLeft,
|
|
3600
|
-
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight
|
|
3617
|
+
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight,
|
|
3618
|
+
output
|
|
3601
3619
|
});
|
|
3602
3620
|
};
|
|
3603
3621
|
var interpolateNumber = ({
|
|
@@ -3606,6 +3624,7 @@ var interpolateNumber = ({
|
|
|
3606
3624
|
outputRange,
|
|
3607
3625
|
options
|
|
3608
3626
|
}) => {
|
|
3627
|
+
const output = resolveOutputOption(options?.output);
|
|
3609
3628
|
if (inputRange.length === 1) {
|
|
3610
3629
|
return outputRange[0];
|
|
3611
3630
|
}
|
|
@@ -3630,7 +3649,8 @@ var interpolateNumber = ({
|
|
|
3630
3649
|
outputRange: [outputRange[range], outputRange[range + 1]],
|
|
3631
3650
|
easing,
|
|
3632
3651
|
extrapolateLeft,
|
|
3633
|
-
extrapolateRight
|
|
3652
|
+
extrapolateRight,
|
|
3653
|
+
output
|
|
3634
3654
|
});
|
|
3635
3655
|
for (let segmentIndex = 0;segmentIndex < range; segmentIndex++) {
|
|
3636
3656
|
const previousEasing = resolveEasingForSegment({
|
|
@@ -3650,7 +3670,8 @@ var interpolateNumber = ({
|
|
|
3650
3670
|
outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
|
|
3651
3671
|
easing: previousEasing,
|
|
3652
3672
|
extrapolateLeft,
|
|
3653
|
-
extrapolateRight: "extend"
|
|
3673
|
+
extrapolateRight: "extend",
|
|
3674
|
+
output
|
|
3654
3675
|
});
|
|
3655
3676
|
result += continuedSegmentValue - outputRange[segmentIndex + 1];
|
|
3656
3677
|
}
|
|
@@ -3698,14 +3719,18 @@ var interpolateString = ({
|
|
|
3698
3719
|
}
|
|
3699
3720
|
}
|
|
3700
3721
|
}
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
values
|
|
3722
|
+
const values = [0, 0, 0];
|
|
3723
|
+
for (let axis = 0;axis < dimensions; axis++) {
|
|
3724
|
+
values[axis] = interpolateNumber({
|
|
3704
3725
|
input,
|
|
3705
3726
|
inputRange,
|
|
3706
3727
|
outputRange: parsedOutputRange.map((parsed) => parsed.values[axis]),
|
|
3707
3728
|
options
|
|
3708
|
-
})
|
|
3729
|
+
});
|
|
3730
|
+
}
|
|
3731
|
+
return serializeStringInterpolationValue({
|
|
3732
|
+
kind,
|
|
3733
|
+
values,
|
|
3709
3734
|
units,
|
|
3710
3735
|
dimensions
|
|
3711
3736
|
});
|
|
@@ -3789,6 +3814,12 @@ function assertValidInterpolatePosterizeOption(posterize) {
|
|
|
3789
3814
|
throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
|
|
3790
3815
|
}
|
|
3791
3816
|
}
|
|
3817
|
+
function assertValidInterpolateOutputOption(output) {
|
|
3818
|
+
if (output === undefined || output === "linear" || output === "perceptual-scale") {
|
|
3819
|
+
return;
|
|
3820
|
+
}
|
|
3821
|
+
throw new Error(`output must be "linear" or "perceptual-scale", but got ${String(output)}`);
|
|
3822
|
+
}
|
|
3792
3823
|
function interpolate(input, inputRange, outputRange, options) {
|
|
3793
3824
|
if (typeof input === "undefined") {
|
|
3794
3825
|
throw new Error("input can not be undefined");
|
|
@@ -3806,6 +3837,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
3806
3837
|
checkValidInputRange(inputRange);
|
|
3807
3838
|
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
3808
3839
|
assertValidInterpolatePosterizeOption(options?.posterize);
|
|
3840
|
+
assertValidInterpolateOutputOption(options?.output);
|
|
3809
3841
|
if (typeof input !== "number") {
|
|
3810
3842
|
throw new TypeError("Cannot interpolate an input which is not a number");
|
|
3811
3843
|
}
|
|
@@ -4750,6 +4782,7 @@ var interpolateKeyframedStatus = ({
|
|
|
4750
4782
|
easing: easing.map((e) => easingToFn({ easing: e, forceSpringAllowTail })),
|
|
4751
4783
|
extrapolateLeft: clamping.left,
|
|
4752
4784
|
extrapolateRight: clamping.right,
|
|
4785
|
+
output: status.output,
|
|
4753
4786
|
posterize: status.posterize
|
|
4754
4787
|
});
|
|
4755
4788
|
} catch {
|
|
@@ -4990,7 +5023,7 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
4990
5023
|
const out = {};
|
|
4991
5024
|
const addKey = (key, field) => {
|
|
4992
5025
|
if (key in out) {
|
|
4993
|
-
|
|
5026
|
+
return;
|
|
4994
5027
|
}
|
|
4995
5028
|
out[key] = field;
|
|
4996
5029
|
};
|
|
@@ -10869,6 +10902,22 @@ var Img = withInteractivitySchema({
|
|
|
10869
10902
|
supportsEffects: true
|
|
10870
10903
|
});
|
|
10871
10904
|
addSequenceStackTraces(Img);
|
|
10905
|
+
var sourcePathToIdentityPrefix = (packageName) => {
|
|
10906
|
+
if (packageName === "remotion") {
|
|
10907
|
+
return "dev.remotion.remotion";
|
|
10908
|
+
}
|
|
10909
|
+
if (packageName.startsWith("@remotion/")) {
|
|
10910
|
+
const normalizedPackageName = packageName.slice("@remotion/".length).replace(/-([a-z])/g, (_, char) => char.toUpperCase());
|
|
10911
|
+
return `dev.remotion.${normalizedPackageName}`;
|
|
10912
|
+
}
|
|
10913
|
+
throw new Error(`Unsupported Remotion package name: ${packageName}`);
|
|
10914
|
+
};
|
|
10915
|
+
var makeRemotionComponentIdentity = ({
|
|
10916
|
+
packageName,
|
|
10917
|
+
componentName
|
|
10918
|
+
}) => {
|
|
10919
|
+
return `${sourcePathToIdentityPrefix(packageName)}.${componentName}`;
|
|
10920
|
+
};
|
|
10872
10921
|
var interactiveElementSchema = {
|
|
10873
10922
|
...baseSchema,
|
|
10874
10923
|
...transformSchema,
|
|
@@ -10882,6 +10931,11 @@ var setRef = (ref, value) => {
|
|
|
10882
10931
|
ref.current = value;
|
|
10883
10932
|
}
|
|
10884
10933
|
};
|
|
10934
|
+
var withSchema = (options) => {
|
|
10935
|
+
const Wrapped = withInteractivitySchema(options);
|
|
10936
|
+
addSequenceStackTraces(Wrapped);
|
|
10937
|
+
return Wrapped;
|
|
10938
|
+
};
|
|
10885
10939
|
var makeInteractiveElement = (tag, displayName) => {
|
|
10886
10940
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
10887
10941
|
const {
|
|
@@ -10921,15 +10975,17 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10921
10975
|
});
|
|
10922
10976
|
});
|
|
10923
10977
|
Inner.displayName = displayName;
|
|
10924
|
-
const Wrapped =
|
|
10978
|
+
const Wrapped = withSchema({
|
|
10925
10979
|
Component: Inner,
|
|
10926
10980
|
componentName: displayName,
|
|
10927
|
-
componentIdentity:
|
|
10981
|
+
componentIdentity: makeRemotionComponentIdentity({
|
|
10982
|
+
packageName: "remotion",
|
|
10983
|
+
componentName: displayName.slice(1, -1)
|
|
10984
|
+
}),
|
|
10928
10985
|
schema: interactiveElementSchema,
|
|
10929
10986
|
supportsEffects: false
|
|
10930
10987
|
});
|
|
10931
10988
|
Wrapped.displayName = displayName;
|
|
10932
|
-
addSequenceStackTraces(Wrapped);
|
|
10933
10989
|
return Wrapped;
|
|
10934
10990
|
};
|
|
10935
10991
|
var Interactive = {
|
|
@@ -10938,7 +10994,8 @@ var Interactive = {
|
|
|
10938
10994
|
textSchema,
|
|
10939
10995
|
premountSchema,
|
|
10940
10996
|
sequenceSchema,
|
|
10941
|
-
withSchema
|
|
10997
|
+
withSchema,
|
|
10998
|
+
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
10942
10999
|
A: makeInteractiveElement("a", "<Interactive.A>"),
|
|
10943
11000
|
Article: makeInteractiveElement("article", "<Interactive.Article>"),
|
|
10944
11001
|
Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
|