@remotion/promo-pages 4.0.475 → 4.0.476
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 +415 -364
- package/dist/cn.d.ts +2 -0
- package/dist/cn.js +5 -0
- package/dist/components/3DEngine/ButtonDemo.d.ts +2 -0
- package/dist/components/3DEngine/ButtonDemo.js +43 -0
- package/dist/components/3DEngine/Faces.d.ts +5 -0
- package/dist/components/3DEngine/Faces.js +7 -0
- package/dist/components/3DEngine/Outer.d.ts +8 -0
- package/dist/components/3DEngine/Outer.js +56 -0
- package/dist/components/3DEngine/Switch.d.ts +4 -0
- package/dist/components/3DEngine/Switch.js +4 -0
- package/dist/components/3DEngine/get-child-node-from.d.ts +1 -0
- package/dist/components/3DEngine/get-child-node-from.js +14 -0
- package/dist/components/3DEngine/hover-transforms.d.ts +9 -0
- package/dist/components/3DEngine/hover-transforms.js +177 -0
- package/dist/components/BackButton.d.ts +6 -0
- package/dist/components/BackButton.js +9 -0
- package/dist/components/CommandCopyButton.d.ts +5 -0
- package/dist/components/CommandCopyButton.js +4 -0
- package/dist/components/Homepage.d.ts +6 -0
- package/dist/components/Homepage.js +20 -0
- package/dist/components/ManageTeamMembers.d.ts +2 -0
- package/dist/components/ManageTeamMembers.js +42 -0
- package/dist/components/Spinner.d.ts +3 -0
- package/dist/components/Spinner.js +4 -0
- package/dist/components/TeamPicture.d.ts +1 -0
- package/dist/components/TeamPicture.js +4 -0
- package/dist/components/design.d.ts +1 -0
- package/dist/components/design.js +33 -0
- package/dist/components/experts/ExpertsPage.d.ts +11 -0
- package/dist/components/experts/ExpertsPage.js +50 -0
- package/dist/components/experts/experts-data.d.ts +19 -0
- package/dist/components/experts/experts-data.js +391 -0
- package/dist/components/experts/experts-icons.d.ts +8 -0
- package/dist/components/experts/experts-icons.js +42 -0
- package/dist/components/experts.d.ts +3 -0
- package/dist/components/experts.js +2 -0
- package/dist/components/homepage/AutomationsSection.d.ts +3 -0
- package/dist/components/homepage/AutomationsSection.js +85 -0
- package/dist/components/homepage/BackgroundAnimation.d.ts +2 -0
- package/dist/components/homepage/BackgroundAnimation.js +66 -0
- package/dist/components/homepage/ChooseTemplate.d.ts +2 -0
- package/dist/components/homepage/ChooseTemplate.js +25 -0
- package/dist/components/homepage/CommunityStats.d.ts +3 -0
- package/dist/components/homepage/CommunityStats.js +6 -0
- package/dist/components/homepage/CommunityStatsItems.d.ts +7 -0
- package/dist/components/homepage/CommunityStatsItems.js +58 -0
- package/dist/components/homepage/Demo/Card.d.ts +15 -0
- package/dist/components/homepage/Demo/Card.js +174 -0
- package/dist/components/homepage/Demo/Cards.d.ts +15 -0
- package/dist/components/homepage/Demo/Cards.js +57 -0
- package/dist/components/homepage/Demo/Comp.d.ts +38 -0
- package/dist/components/homepage/Demo/Comp.js +72 -0
- package/dist/components/homepage/Demo/CurrentCountry.d.ts +9 -0
- package/dist/components/homepage/Demo/CurrentCountry.js +48 -0
- package/dist/components/homepage/Demo/DemoError.d.ts +2 -0
- package/dist/components/homepage/Demo/DemoError.js +10 -0
- package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +2 -0
- package/dist/components/homepage/Demo/DemoErrorIcon.js +16 -0
- package/dist/components/homepage/Demo/DemoRender.d.ts +33 -0
- package/dist/components/homepage/Demo/DemoRender.js +107 -0
- package/dist/components/homepage/Demo/DigitWheel.d.ts +9 -0
- package/dist/components/homepage/Demo/DigitWheel.js +94 -0
- package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +5 -0
- package/dist/components/homepage/Demo/DisplayedEmoji.js +59 -0
- package/dist/components/homepage/Demo/DoneCheckmark.d.ts +2 -0
- package/dist/components/homepage/Demo/DoneCheckmark.js +20 -0
- package/dist/components/homepage/Demo/DownloadNudge.d.ts +2 -0
- package/dist/components/homepage/Demo/DownloadNudge.js +27 -0
- package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +3 -0
- package/dist/components/homepage/Demo/DragAndDropNudge.js +26 -0
- package/dist/components/homepage/Demo/EmojiCard.d.ts +10 -0
- package/dist/components/homepage/Demo/EmojiCard.js +120 -0
- package/dist/components/homepage/Demo/Minus.d.ts +5 -0
- package/dist/components/homepage/Demo/Minus.js +11 -0
- package/dist/components/homepage/Demo/PlayPauseButton.d.ts +5 -0
- package/dist/components/homepage/Demo/PlayPauseButton.js +47 -0
- package/dist/components/homepage/Demo/PlayerControls.d.ts +8 -0
- package/dist/components/homepage/Demo/PlayerControls.js +15 -0
- package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +11 -0
- package/dist/components/homepage/Demo/PlayerSeekBar.js +216 -0
- package/dist/components/homepage/Demo/PlayerVolume.d.ts +5 -0
- package/dist/components/homepage/Demo/PlayerVolume.js +53 -0
- package/dist/components/homepage/Demo/Progress.d.ts +4 -0
- package/dist/components/homepage/Demo/Progress.js +14 -0
- package/dist/components/homepage/Demo/Spinner.d.ts +5 -0
- package/dist/components/homepage/Demo/Spinner.js +37 -0
- package/dist/components/homepage/Demo/Switcher.d.ts +6 -0
- package/dist/components/homepage/Demo/Switcher.js +25 -0
- package/dist/components/homepage/Demo/Temperature.d.ts +6 -0
- package/dist/components/homepage/Demo/Temperature.js +21 -0
- package/dist/components/homepage/Demo/TemperatureNumber.d.ts +5 -0
- package/dist/components/homepage/Demo/TemperatureNumber.js +36 -0
- package/dist/components/homepage/Demo/ThemeNudge.d.ts +3 -0
- package/dist/components/homepage/Demo/ThemeNudge.js +35 -0
- package/dist/components/homepage/Demo/TimeDisplay.d.ts +6 -0
- package/dist/components/homepage/Demo/TimeDisplay.js +27 -0
- package/dist/components/homepage/Demo/TrendingRepos.d.ts +6 -0
- package/dist/components/homepage/Demo/TrendingRepos.js +65 -0
- package/dist/components/homepage/Demo/icons.d.ts +10 -0
- package/dist/components/homepage/Demo/icons.js +22 -0
- package/dist/components/homepage/Demo/index.d.ts +2 -0
- package/dist/components/homepage/Demo/index.js +95 -0
- package/dist/components/homepage/Demo/math.d.ts +10 -0
- package/dist/components/homepage/Demo/math.js +29 -0
- package/dist/components/homepage/Demo/types.d.ts +6 -0
- package/dist/components/homepage/Demo/types.js +0 -0
- package/dist/components/homepage/EvaluateRemotion.d.ts +3 -0
- package/dist/components/homepage/EvaluateRemotion.js +21 -0
- package/dist/components/homepage/FreePricing.d.ts +4 -0
- package/dist/components/homepage/FreePricing.js +133 -0
- package/dist/components/homepage/GetStartedStrip.d.ts +2 -0
- package/dist/components/homepage/GetStartedStrip.js +14 -0
- package/dist/components/homepage/GitHubButton.d.ts +2 -0
- package/dist/components/homepage/GitHubButton.js +7 -0
- package/dist/components/homepage/IconForTemplate.d.ts +6 -0
- package/dist/components/homepage/IconForTemplate.js +105 -0
- package/dist/components/homepage/IfYouKnowReact.d.ts +3 -0
- package/dist/components/homepage/IfYouKnowReact.js +23 -0
- package/dist/components/homepage/MoreTemplatesButton.d.ts +2 -0
- package/dist/components/homepage/MoreTemplatesButton.js +11 -0
- package/dist/components/homepage/MuxVideo.d.ts +7 -0
- package/dist/components/homepage/MuxVideo.js +45 -0
- package/dist/components/homepage/NewsletterButton.d.ts +2 -0
- package/dist/components/homepage/NewsletterButton.js +38 -0
- package/dist/components/homepage/ParameterizeAndEdit.d.ts +2 -0
- package/dist/components/homepage/ParameterizeAndEdit.js +22 -0
- package/dist/components/homepage/Pricing.d.ts +2 -0
- package/dist/components/homepage/Pricing.js +15 -0
- package/dist/components/homepage/PricingBulletPoint.d.ts +6 -0
- package/dist/components/homepage/PricingBulletPoint.js +19 -0
- package/dist/components/homepage/RealMp4Videos.d.ts +2 -0
- package/dist/components/homepage/RealMp4Videos.js +41 -0
- package/dist/components/homepage/Spacer.d.ts +2 -0
- package/dist/components/homepage/Spacer.js +4 -0
- package/dist/components/homepage/TemplateIcon.d.ts +5 -0
- package/dist/components/homepage/TemplateIcon.js +24 -0
- package/dist/components/homepage/TextInput.d.ts +7 -0
- package/dist/components/homepage/TextInput.js +34 -0
- package/dist/components/homepage/TrustedByBanner.d.ts +2 -0
- package/dist/components/homepage/TrustedByBanner.js +27 -0
- package/dist/components/homepage/VideoApps.d.ts +4 -0
- package/dist/components/homepage/VideoApps.js +72 -0
- package/dist/components/homepage/VideoAppsShowcase.d.ts +2 -0
- package/dist/components/homepage/VideoAppsShowcase.js +139 -0
- package/dist/components/homepage/VideoAppsTitle.d.ts +4 -0
- package/dist/components/homepage/VideoAppsTitle.js +4 -0
- package/dist/components/homepage/VideoPlayerWithControls.d.ts +20 -0
- package/dist/components/homepage/VideoPlayerWithControls.js +105 -0
- package/dist/components/homepage/WriteInReact.d.ts +2 -0
- package/dist/components/homepage/WriteInReact.js +10 -0
- package/dist/components/homepage/YouAreHere.d.ts +2 -0
- package/dist/components/homepage/YouAreHere.js +23 -0
- package/dist/components/homepage/layout/Button.d.ts +22 -0
- package/dist/components/homepage/layout/Button.js +30 -0
- package/dist/components/homepage/layout/colors.d.ts +13 -0
- package/dist/components/homepage/layout/colors.js +14 -0
- package/dist/components/homepage/layout/use-color-mode.d.ts +21 -0
- package/dist/components/homepage/layout/use-color-mode.js +22 -0
- package/dist/components/homepage/layout/use-el-size.d.ts +5 -0
- package/dist/components/homepage/layout/use-el-size.js +40 -0
- package/dist/components/homepage/layout/use-mobile-layout.d.ts +1 -0
- package/dist/components/homepage/layout/use-mobile-layout.js +6 -0
- package/dist/components/icons/blank.d.ts +3 -0
- package/dist/components/icons/blank.js +4 -0
- package/dist/components/icons/brain.d.ts +2 -0
- package/dist/components/icons/brain.js +4 -0
- package/dist/components/icons/clone.d.ts +2 -0
- package/dist/components/icons/clone.js +2 -0
- package/dist/components/icons/code-hike.d.ts +3 -0
- package/dist/components/icons/code-hike.js +4 -0
- package/dist/components/icons/cubes.d.ts +3 -0
- package/dist/components/icons/cubes.js +4 -0
- package/dist/components/icons/editor.d.ts +3 -0
- package/dist/components/icons/editor.js +4 -0
- package/dist/components/icons/electron.d.ts +4 -0
- package/dist/components/icons/electron.js +4 -0
- package/dist/components/icons/js.d.ts +3 -0
- package/dist/components/icons/js.js +4 -0
- package/dist/components/icons/music.d.ts +2 -0
- package/dist/components/icons/music.js +4 -0
- package/dist/components/icons/next.d.ts +4 -0
- package/dist/components/icons/next.js +4 -0
- package/dist/components/icons/overlay.d.ts +3 -0
- package/dist/components/icons/overlay.js +4 -0
- package/dist/components/icons/prompt-to-video.d.ts +2 -0
- package/dist/components/icons/prompt-to-video.js +4 -0
- package/dist/components/icons/recorder.d.ts +3 -0
- package/dist/components/icons/recorder.js +4 -0
- package/dist/components/icons/remix.d.ts +3 -0
- package/dist/components/icons/remix.js +4 -0
- package/dist/components/icons/render-server.d.ts +3 -0
- package/dist/components/icons/render-server.js +4 -0
- package/dist/components/icons/skia.d.ts +3 -0
- package/dist/components/icons/skia.js +4 -0
- package/dist/components/icons/stargazer.d.ts +3 -0
- package/dist/components/icons/stargazer.js +4 -0
- package/dist/components/icons/still.d.ts +3 -0
- package/dist/components/icons/still.js +4 -0
- package/dist/components/icons/tailwind.d.ts +3 -0
- package/dist/components/icons/tailwind.js +4 -0
- package/dist/components/icons/tiktok.d.ts +3 -0
- package/dist/components/icons/tiktok.js +4 -0
- package/dist/components/icons/timeline.d.ts +3 -0
- package/dist/components/icons/timeline.js +4 -0
- package/dist/components/icons/ts.d.ts +3 -0
- package/dist/components/icons/ts.js +4 -0
- package/dist/components/icons/undo.d.ts +3 -0
- package/dist/components/icons/undo.js +2 -0
- package/dist/components/icons/vercel.d.ts +4 -0
- package/dist/components/icons/vercel.js +4 -0
- package/dist/components/icons/waveform.d.ts +3 -0
- package/dist/components/icons/waveform.js +4 -0
- package/dist/components/prompts/CardLikeButton.d.ts +5 -0
- package/dist/components/prompts/CardLikeButton.js +49 -0
- package/dist/components/prompts/ClipboardIcon.d.ts +5 -0
- package/dist/components/prompts/ClipboardIcon.js +4 -0
- package/dist/components/prompts/CopyPromptButton.d.ts +4 -0
- package/dist/components/prompts/CopyPromptButton.js +13 -0
- package/dist/components/prompts/LikeButton.d.ts +5 -0
- package/dist/components/prompts/LikeButton.js +49 -0
- package/dist/components/prompts/MuxPlayer.d.ts +8 -0
- package/dist/components/prompts/MuxPlayer.js +21 -0
- package/dist/components/prompts/NewBackButton.d.ts +5 -0
- package/dist/components/prompts/NewBackButton.js +8 -0
- package/dist/components/prompts/Page.d.ts +8 -0
- package/dist/components/prompts/Page.js +7 -0
- package/dist/components/prompts/PromptsGallery.d.ts +7 -0
- package/dist/components/prompts/PromptsGallery.js +60 -0
- package/dist/components/prompts/PromptsShow.d.ts +5 -0
- package/dist/components/prompts/PromptsShow.js +17 -0
- package/dist/components/prompts/PromptsSubmit.d.ts +2 -0
- package/dist/components/prompts/PromptsSubmit.js +173 -0
- package/dist/components/prompts/config.d.ts +1 -0
- package/dist/components/prompts/config.js +1 -0
- package/dist/components/prompts/prompt-helpers.d.ts +8 -0
- package/dist/components/prompts/prompt-helpers.js +76 -0
- package/dist/components/prompts/prompt-types.d.ts +14 -0
- package/dist/components/prompts/prompt-types.js +0 -0
- package/dist/components/prompts/use-heart-animation.d.ts +5 -0
- package/dist/components/prompts/use-heart-animation.js +29 -0
- package/dist/components/team/TeamCards.d.ts +6 -0
- package/dist/components/team/TeamCards.js +19 -0
- package/dist/components/team/TitleTeamCards.d.ts +2 -0
- package/dist/components/team/TitleTeamCards.js +6 -0
- package/dist/components/team/TrustSection.d.ts +2 -0
- package/dist/components/team/TrustSection.js +59 -0
- package/dist/components/team.d.ts +3 -0
- package/dist/components/team.js +15 -0
- package/dist/components/template-modal-content.d.ts +5 -0
- package/dist/components/template-modal-content.js +73 -0
- package/dist/components/templates.d.ts +2 -0
- package/dist/components/templates.js +27 -0
- package/dist/design.js +527 -490
- package/dist/experts.js +527 -490
- package/dist/helpers/mobile-layout.d.ts +1 -0
- package/dist/helpers/mobile-layout.js +6 -0
- package/dist/helpers/use-el-size.d.ts +5 -0
- package/dist/helpers/use-el-size.js +40 -0
- package/dist/homepage/Pricing.js +527 -490
- package/dist/main.d.ts +1 -0
- package/dist/main.js +6 -0
- package/dist/prompts/PromptsGallery.js +527 -490
- package/dist/prompts/PromptsShow.js +527 -490
- package/dist/prompts/PromptsSubmit.js +527 -490
- package/dist/prompts-show.d.ts +1 -0
- package/dist/prompts-show.js +20 -0
- package/dist/prompts-submit.d.ts +1 -0
- package/dist/prompts-submit.js +6 -0
- package/dist/prompts.d.ts +1 -0
- package/dist/prompts.js +6 -0
- package/dist/team.d.ts +1 -0
- package/dist/team.js +527 -490
- package/dist/template-modal-content.js +527 -490
- package/dist/templates.js +527 -490
- package/package.json +13 -13
package/dist/design.js
CHANGED
|
@@ -5564,7 +5564,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
5564
5564
|
var addSequenceStackTraces = (component) => {
|
|
5565
5565
|
componentsToAddStacksTo.push(component);
|
|
5566
5566
|
};
|
|
5567
|
-
var VERSION = "4.0.
|
|
5567
|
+
var VERSION = "4.0.476";
|
|
5568
5568
|
var checkMultipleRemotionVersions = () => {
|
|
5569
5569
|
if (typeof globalThis === "undefined") {
|
|
5570
5570
|
return;
|
|
@@ -5998,6 +5998,18 @@ var hiddenField = {
|
|
|
5998
5998
|
default: false,
|
|
5999
5999
|
description: "Hidden"
|
|
6000
6000
|
};
|
|
6001
|
+
var showInTimelineField = {
|
|
6002
|
+
type: "hidden"
|
|
6003
|
+
};
|
|
6004
|
+
var sequenceNameField = {
|
|
6005
|
+
type: "hidden"
|
|
6006
|
+
};
|
|
6007
|
+
var extendSchemaWithSequenceName = (schema) => {
|
|
6008
|
+
return {
|
|
6009
|
+
name: sequenceNameField,
|
|
6010
|
+
...schema
|
|
6011
|
+
};
|
|
6012
|
+
};
|
|
6001
6013
|
var durationInFramesField = {
|
|
6002
6014
|
type: "number",
|
|
6003
6015
|
default: undefined,
|
|
@@ -6011,8 +6023,9 @@ var fromField = {
|
|
|
6011
6023
|
step: 1,
|
|
6012
6024
|
hiddenFromList: true
|
|
6013
6025
|
};
|
|
6014
|
-
var sequenceSchema = {
|
|
6026
|
+
var sequenceSchema = extendSchemaWithSequenceName({
|
|
6015
6027
|
hidden: hiddenField,
|
|
6028
|
+
showInTimeline: showInTimelineField,
|
|
6016
6029
|
from: fromField,
|
|
6017
6030
|
durationInFrames: durationInFramesField,
|
|
6018
6031
|
layout: {
|
|
@@ -6024,12 +6037,13 @@ var sequenceSchema = {
|
|
|
6024
6037
|
none: {}
|
|
6025
6038
|
}
|
|
6026
6039
|
}
|
|
6027
|
-
};
|
|
6028
|
-
var sequenceSchemaWithoutFrom = {
|
|
6040
|
+
});
|
|
6041
|
+
var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
|
|
6029
6042
|
hidden: hiddenField,
|
|
6043
|
+
showInTimeline: showInTimelineField,
|
|
6030
6044
|
durationInFrames: durationInFramesField,
|
|
6031
6045
|
layout: sequenceSchema.layout
|
|
6032
|
-
};
|
|
6046
|
+
});
|
|
6033
6047
|
var sequenceSchemaDefaultLayoutNone = {
|
|
6034
6048
|
...sequenceSchema,
|
|
6035
6049
|
layout: {
|
|
@@ -6373,81 +6387,6 @@ function bezier(mX1, mY1, mX2, mY2) {
|
|
|
6373
6387
|
return calcBezier(getTForX(clampedX), mY1, mY2);
|
|
6374
6388
|
};
|
|
6375
6389
|
}
|
|
6376
|
-
var clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
6377
|
-
|
|
6378
|
-
class Easing {
|
|
6379
|
-
static step0(n) {
|
|
6380
|
-
return n > 0 ? 1 : 0;
|
|
6381
|
-
}
|
|
6382
|
-
static step1(n) {
|
|
6383
|
-
return n >= 1 ? 1 : 0;
|
|
6384
|
-
}
|
|
6385
|
-
static linear(t) {
|
|
6386
|
-
return t;
|
|
6387
|
-
}
|
|
6388
|
-
static ease(t) {
|
|
6389
|
-
return Easing.bezier(0.42, 0, 1, 1)(t);
|
|
6390
|
-
}
|
|
6391
|
-
static quad(t) {
|
|
6392
|
-
return t * t;
|
|
6393
|
-
}
|
|
6394
|
-
static cubic(t) {
|
|
6395
|
-
return t * t * t;
|
|
6396
|
-
}
|
|
6397
|
-
static poly(n) {
|
|
6398
|
-
return (t) => t ** n;
|
|
6399
|
-
}
|
|
6400
|
-
static sin(t) {
|
|
6401
|
-
return 1 - Math.cos(t * Math.PI / 2);
|
|
6402
|
-
}
|
|
6403
|
-
static circle(t) {
|
|
6404
|
-
const u = clampUnit(t);
|
|
6405
|
-
return 1 - Math.sqrt(1 - u * u);
|
|
6406
|
-
}
|
|
6407
|
-
static exp(t) {
|
|
6408
|
-
return 2 ** (10 * (t - 1));
|
|
6409
|
-
}
|
|
6410
|
-
static elastic(bounciness = 1) {
|
|
6411
|
-
const p = bounciness * Math.PI;
|
|
6412
|
-
return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
|
|
6413
|
-
}
|
|
6414
|
-
static back(s = 1.70158) {
|
|
6415
|
-
return (t) => t * t * ((s + 1) * t - s);
|
|
6416
|
-
}
|
|
6417
|
-
static bounce(t) {
|
|
6418
|
-
const u = clampUnit(t);
|
|
6419
|
-
if (u < 1 / 2.75) {
|
|
6420
|
-
return 7.5625 * u * u;
|
|
6421
|
-
}
|
|
6422
|
-
if (u < 2 / 2.75) {
|
|
6423
|
-
const t2_ = u - 1.5 / 2.75;
|
|
6424
|
-
return 7.5625 * t2_ * t2_ + 0.75;
|
|
6425
|
-
}
|
|
6426
|
-
if (u < 2.5 / 2.75) {
|
|
6427
|
-
const t2_ = u - 2.25 / 2.75;
|
|
6428
|
-
return 7.5625 * t2_ * t2_ + 0.9375;
|
|
6429
|
-
}
|
|
6430
|
-
const t2 = u - 2.625 / 2.75;
|
|
6431
|
-
return 7.5625 * t2 * t2 + 0.984375;
|
|
6432
|
-
}
|
|
6433
|
-
static bezier(x1, y1, x2, y2) {
|
|
6434
|
-
return bezier(x1, y1, x2, y2);
|
|
6435
|
-
}
|
|
6436
|
-
static in(easing) {
|
|
6437
|
-
return easing;
|
|
6438
|
-
}
|
|
6439
|
-
static out(easing) {
|
|
6440
|
-
return (t) => 1 - easing(1 - t);
|
|
6441
|
-
}
|
|
6442
|
-
static inOut(easing) {
|
|
6443
|
-
return (t) => {
|
|
6444
|
-
if (t < 0.5) {
|
|
6445
|
-
return easing(t * 2) / 2;
|
|
6446
|
-
}
|
|
6447
|
-
return 1 - easing((1 - t) * 2) / 2;
|
|
6448
|
-
};
|
|
6449
|
-
}
|
|
6450
|
-
}
|
|
6451
6390
|
var normalizeNumber = (value) => {
|
|
6452
6391
|
return Math.round(value * 1e6) / 1e6;
|
|
6453
6392
|
};
|
|
@@ -6950,130 +6889,480 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
6950
6889
|
checkInfiniteRange("outputRange", outputRange);
|
|
6951
6890
|
return interpolateNumber({ input, inputRange, outputRange, options });
|
|
6952
6891
|
}
|
|
6953
|
-
var
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
}
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
|
|
6961
|
-
}
|
|
6962
|
-
function getMatchers() {
|
|
6963
|
-
const cachedMatchers = {
|
|
6964
|
-
rgb: undefined,
|
|
6965
|
-
rgba: undefined,
|
|
6966
|
-
hsl: undefined,
|
|
6967
|
-
hsla: undefined,
|
|
6968
|
-
hex3: undefined,
|
|
6969
|
-
hex4: undefined,
|
|
6970
|
-
hex5: undefined,
|
|
6971
|
-
hex6: undefined,
|
|
6972
|
-
hex8: undefined,
|
|
6973
|
-
oklch: undefined,
|
|
6974
|
-
oklab: undefined,
|
|
6975
|
-
lab: undefined,
|
|
6976
|
-
lch: undefined,
|
|
6977
|
-
hwb: undefined
|
|
6978
|
-
};
|
|
6979
|
-
if (cachedMatchers.rgb === undefined) {
|
|
6980
|
-
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
|
|
6981
|
-
cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
|
6982
|
-
cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
|
6983
|
-
cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
|
6984
|
-
cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
6985
|
-
cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
6986
|
-
cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
|
|
6987
|
-
cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
|
|
6988
|
-
cachedMatchers.oklch = modernColorCall("oklch");
|
|
6989
|
-
cachedMatchers.oklab = modernColorCall("oklab");
|
|
6990
|
-
cachedMatchers.lab = modernColorCall("lab");
|
|
6991
|
-
cachedMatchers.lch = modernColorCall("lch");
|
|
6992
|
-
cachedMatchers.hwb = modernColorCall("hwb");
|
|
6993
|
-
}
|
|
6994
|
-
return cachedMatchers;
|
|
6995
|
-
}
|
|
6996
|
-
function hue2rgb(p, q, t) {
|
|
6997
|
-
if (t < 0) {
|
|
6998
|
-
t += 1;
|
|
6892
|
+
var validateFrame = ({
|
|
6893
|
+
allowFloats,
|
|
6894
|
+
durationInFrames,
|
|
6895
|
+
frame
|
|
6896
|
+
}) => {
|
|
6897
|
+
if (typeof frame === "undefined") {
|
|
6898
|
+
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
6999
6899
|
}
|
|
7000
|
-
if (
|
|
7001
|
-
|
|
6900
|
+
if (typeof frame !== "number") {
|
|
6901
|
+
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
7002
6902
|
}
|
|
7003
|
-
if (
|
|
7004
|
-
|
|
6903
|
+
if (!Number.isFinite(frame)) {
|
|
6904
|
+
throw new RangeError(`Frame ${frame} is not finite`);
|
|
7005
6905
|
}
|
|
7006
|
-
if (
|
|
7007
|
-
|
|
6906
|
+
if (frame % 1 !== 0 && !allowFloats) {
|
|
6907
|
+
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
7008
6908
|
}
|
|
7009
|
-
if (
|
|
7010
|
-
|
|
6909
|
+
if (frame < 0 && frame < -durationInFrames) {
|
|
6910
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
|
|
7011
6911
|
}
|
|
7012
|
-
|
|
7013
|
-
}
|
|
7014
|
-
function hslToRgb(h, s, l) {
|
|
7015
|
-
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
7016
|
-
const p = 2 * l - q;
|
|
7017
|
-
const r2 = hue2rgb(p, q, h + 1 / 3);
|
|
7018
|
-
const g = hue2rgb(p, q, h);
|
|
7019
|
-
const b2 = hue2rgb(p, q, h - 1 / 3);
|
|
7020
|
-
return Math.round(r2 * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
7021
|
-
}
|
|
7022
|
-
function parse255(str) {
|
|
7023
|
-
const int = Number.parseInt(str, 10);
|
|
7024
|
-
if (int < 0) {
|
|
7025
|
-
return 0;
|
|
6912
|
+
if (frame > durationInFrames - 1) {
|
|
6913
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
7026
6914
|
}
|
|
7027
|
-
|
|
7028
|
-
|
|
6915
|
+
};
|
|
6916
|
+
var validateSpringDuration = (dur) => {
|
|
6917
|
+
if (typeof dur === "undefined") {
|
|
6918
|
+
return;
|
|
7029
6919
|
}
|
|
7030
|
-
|
|
7031
|
-
}
|
|
7032
|
-
function parse360(str) {
|
|
7033
|
-
const int = Number.parseFloat(str);
|
|
7034
|
-
return (int % 360 + 360) % 360 / 360;
|
|
7035
|
-
}
|
|
7036
|
-
function parse1(str) {
|
|
7037
|
-
const num = Number.parseFloat(str);
|
|
7038
|
-
if (num < 0) {
|
|
7039
|
-
return 0;
|
|
6920
|
+
if (typeof dur !== "number") {
|
|
6921
|
+
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
|
|
7040
6922
|
}
|
|
7041
|
-
if (
|
|
7042
|
-
|
|
6923
|
+
if (Number.isNaN(dur)) {
|
|
6924
|
+
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
|
|
7043
6925
|
}
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
function parsePercentage(str) {
|
|
7047
|
-
const int = Number.parseFloat(str);
|
|
7048
|
-
if (int < 0) {
|
|
7049
|
-
return 0;
|
|
6926
|
+
if (!Number.isFinite(dur)) {
|
|
6927
|
+
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
|
|
7050
6928
|
}
|
|
7051
|
-
if (
|
|
7052
|
-
|
|
6929
|
+
if (dur <= 0) {
|
|
6930
|
+
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
|
|
7053
6931
|
}
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
6932
|
+
};
|
|
6933
|
+
var defaultSpringConfig = {
|
|
6934
|
+
damping: 10,
|
|
6935
|
+
mass: 1,
|
|
6936
|
+
stiffness: 100,
|
|
6937
|
+
overshootClamping: false
|
|
6938
|
+
};
|
|
6939
|
+
var advanceCache = {};
|
|
6940
|
+
function advance({
|
|
6941
|
+
animation,
|
|
6942
|
+
now,
|
|
6943
|
+
config
|
|
6944
|
+
}) {
|
|
6945
|
+
const { toValue: toValue2, lastTimestamp, current, velocity } = animation;
|
|
6946
|
+
const deltaTime = Math.min(now - lastTimestamp, 64);
|
|
6947
|
+
if (config.damping <= 0) {
|
|
6948
|
+
throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
|
|
7061
6949
|
}
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
6950
|
+
const c2 = config.damping;
|
|
6951
|
+
const m = config.mass;
|
|
6952
|
+
const k = config.stiffness;
|
|
6953
|
+
const cacheKey = [
|
|
6954
|
+
toValue2,
|
|
6955
|
+
lastTimestamp,
|
|
6956
|
+
current,
|
|
6957
|
+
velocity,
|
|
6958
|
+
c2,
|
|
6959
|
+
m,
|
|
6960
|
+
k,
|
|
6961
|
+
now
|
|
6962
|
+
].join("-");
|
|
6963
|
+
if (advanceCache[cacheKey]) {
|
|
6964
|
+
return advanceCache[cacheKey];
|
|
7069
6965
|
}
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
6966
|
+
const v0 = -velocity;
|
|
6967
|
+
const x0 = toValue2 - current;
|
|
6968
|
+
const zeta = c2 / (2 * Math.sqrt(k * m));
|
|
6969
|
+
const omega0 = Math.sqrt(k / m);
|
|
6970
|
+
const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
|
|
6971
|
+
const t = deltaTime / 1000;
|
|
6972
|
+
const sin1 = Math.sin(omega1 * t);
|
|
6973
|
+
const cos1 = Math.cos(omega1 * t);
|
|
6974
|
+
const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
|
|
6975
|
+
const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
|
|
6976
|
+
const underDampedPosition = toValue2 - underDampedFrag1;
|
|
6977
|
+
const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
|
|
6978
|
+
const criticallyDampedEnvelope = Math.exp(-omega0 * t);
|
|
6979
|
+
const criticallyDampedPosition = toValue2 - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
|
|
6980
|
+
const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
|
|
6981
|
+
const animationNode = {
|
|
6982
|
+
toValue: toValue2,
|
|
6983
|
+
prevPosition: current,
|
|
6984
|
+
lastTimestamp: now,
|
|
6985
|
+
current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
|
|
6986
|
+
velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
|
|
6987
|
+
};
|
|
6988
|
+
advanceCache[cacheKey] = animationNode;
|
|
6989
|
+
return animationNode;
|
|
6990
|
+
}
|
|
6991
|
+
var calculationCache = {};
|
|
6992
|
+
function springCalculation({
|
|
6993
|
+
frame,
|
|
6994
|
+
fps,
|
|
6995
|
+
config = {}
|
|
6996
|
+
}) {
|
|
6997
|
+
const from = 0;
|
|
6998
|
+
const to = 1;
|
|
6999
|
+
const cacheKey = [
|
|
7000
|
+
frame,
|
|
7001
|
+
fps,
|
|
7002
|
+
config.damping,
|
|
7003
|
+
config.mass,
|
|
7004
|
+
config.overshootClamping,
|
|
7005
|
+
config.stiffness
|
|
7006
|
+
].join("-");
|
|
7007
|
+
if (calculationCache[cacheKey]) {
|
|
7008
|
+
return calculationCache[cacheKey];
|
|
7009
|
+
}
|
|
7010
|
+
let animation = {
|
|
7011
|
+
lastTimestamp: 0,
|
|
7012
|
+
current: from,
|
|
7013
|
+
toValue: to,
|
|
7014
|
+
velocity: 0,
|
|
7015
|
+
prevPosition: 0
|
|
7016
|
+
};
|
|
7017
|
+
const frameClamped = Math.max(0, frame);
|
|
7018
|
+
const unevenRest = frameClamped % 1;
|
|
7019
|
+
for (let f = 0;f <= Math.floor(frameClamped); f++) {
|
|
7020
|
+
if (f === Math.floor(frameClamped)) {
|
|
7021
|
+
f += unevenRest;
|
|
7022
|
+
}
|
|
7023
|
+
const time = f / fps * 1000;
|
|
7024
|
+
animation = advance({
|
|
7025
|
+
animation,
|
|
7026
|
+
now: time,
|
|
7027
|
+
config: {
|
|
7028
|
+
...defaultSpringConfig,
|
|
7029
|
+
...config
|
|
7030
|
+
}
|
|
7031
|
+
});
|
|
7032
|
+
}
|
|
7033
|
+
calculationCache[cacheKey] = animation;
|
|
7034
|
+
return animation;
|
|
7035
|
+
}
|
|
7036
|
+
var cache = new Map;
|
|
7037
|
+
function measureSpring({
|
|
7038
|
+
fps,
|
|
7039
|
+
config = {},
|
|
7040
|
+
threshold = 0.005
|
|
7041
|
+
}) {
|
|
7042
|
+
if (typeof threshold !== "number") {
|
|
7043
|
+
throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
|
|
7044
|
+
}
|
|
7045
|
+
if (threshold === 0) {
|
|
7046
|
+
return Infinity;
|
|
7047
|
+
}
|
|
7048
|
+
if (threshold === 1) {
|
|
7049
|
+
return 0;
|
|
7050
|
+
}
|
|
7051
|
+
if (isNaN(threshold)) {
|
|
7052
|
+
throw new TypeError("Threshold is NaN");
|
|
7053
|
+
}
|
|
7054
|
+
if (!Number.isFinite(threshold)) {
|
|
7055
|
+
throw new TypeError("Threshold is not finite");
|
|
7056
|
+
}
|
|
7057
|
+
if (threshold < 0) {
|
|
7058
|
+
throw new TypeError("Threshold is below 0");
|
|
7059
|
+
}
|
|
7060
|
+
const cacheKey = [
|
|
7061
|
+
fps,
|
|
7062
|
+
config.damping,
|
|
7063
|
+
config.mass,
|
|
7064
|
+
config.overshootClamping,
|
|
7065
|
+
config.stiffness,
|
|
7066
|
+
threshold
|
|
7067
|
+
].join("-");
|
|
7068
|
+
if (cache.has(cacheKey)) {
|
|
7069
|
+
return cache.get(cacheKey);
|
|
7070
|
+
}
|
|
7071
|
+
validateFps(fps, "to the measureSpring() function", false);
|
|
7072
|
+
let frame = 0;
|
|
7073
|
+
let finishedFrame = 0;
|
|
7074
|
+
const calc = () => {
|
|
7075
|
+
return springCalculation({
|
|
7076
|
+
fps,
|
|
7077
|
+
frame,
|
|
7078
|
+
config
|
|
7079
|
+
});
|
|
7080
|
+
};
|
|
7081
|
+
let animation = calc();
|
|
7082
|
+
const calcDifference = () => {
|
|
7083
|
+
return Math.abs(animation.current - animation.toValue);
|
|
7084
|
+
};
|
|
7085
|
+
let difference = calcDifference();
|
|
7086
|
+
while (difference >= threshold) {
|
|
7087
|
+
frame++;
|
|
7088
|
+
animation = calc();
|
|
7089
|
+
difference = calcDifference();
|
|
7090
|
+
}
|
|
7091
|
+
finishedFrame = frame;
|
|
7092
|
+
for (let i = 0;i < 20; i++) {
|
|
7093
|
+
frame++;
|
|
7094
|
+
animation = calc();
|
|
7095
|
+
difference = calcDifference();
|
|
7096
|
+
if (difference >= threshold) {
|
|
7097
|
+
i = 0;
|
|
7098
|
+
finishedFrame = frame + 1;
|
|
7099
|
+
}
|
|
7100
|
+
}
|
|
7101
|
+
cache.set(cacheKey, finishedFrame);
|
|
7102
|
+
return finishedFrame;
|
|
7103
|
+
}
|
|
7104
|
+
function spring({
|
|
7105
|
+
frame: passedFrame,
|
|
7106
|
+
fps,
|
|
7107
|
+
config = {},
|
|
7108
|
+
from = 0,
|
|
7109
|
+
to = 1,
|
|
7110
|
+
durationInFrames: passedDurationInFrames,
|
|
7111
|
+
durationRestThreshold,
|
|
7112
|
+
delay = 0,
|
|
7113
|
+
reverse = false
|
|
7114
|
+
}) {
|
|
7115
|
+
validateSpringDuration(passedDurationInFrames);
|
|
7116
|
+
validateFrame({
|
|
7117
|
+
frame: passedFrame,
|
|
7118
|
+
durationInFrames: Infinity,
|
|
7119
|
+
allowFloats: true
|
|
7120
|
+
});
|
|
7121
|
+
validateFps(fps, "to spring()", false);
|
|
7122
|
+
const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
|
|
7123
|
+
const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
|
|
7124
|
+
fps,
|
|
7125
|
+
config,
|
|
7126
|
+
threshold: durationRestThreshold
|
|
7127
|
+
}) : undefined;
|
|
7128
|
+
const naturalDurationGetter = needsToCalculateNaturalDuration ? {
|
|
7129
|
+
get: () => naturalDuration
|
|
7130
|
+
} : {
|
|
7131
|
+
get: () => {
|
|
7132
|
+
throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
|
|
7133
|
+
}
|
|
7134
|
+
};
|
|
7135
|
+
const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
|
|
7136
|
+
const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
|
|
7137
|
+
const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
|
|
7138
|
+
if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
|
|
7139
|
+
return to;
|
|
7140
|
+
}
|
|
7141
|
+
const spr = springCalculation({
|
|
7142
|
+
fps,
|
|
7143
|
+
frame: durationProcessed,
|
|
7144
|
+
config
|
|
7145
|
+
});
|
|
7146
|
+
const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
|
|
7147
|
+
const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
|
|
7148
|
+
return interpolated;
|
|
7149
|
+
}
|
|
7150
|
+
var clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
7151
|
+
var springEasingDurationInFrames = 30;
|
|
7152
|
+
|
|
7153
|
+
class Easing {
|
|
7154
|
+
static step0(n) {
|
|
7155
|
+
return n > 0 ? 1 : 0;
|
|
7156
|
+
}
|
|
7157
|
+
static step1(n) {
|
|
7158
|
+
return n >= 1 ? 1 : 0;
|
|
7159
|
+
}
|
|
7160
|
+
static linear(t) {
|
|
7161
|
+
return t;
|
|
7162
|
+
}
|
|
7163
|
+
static ease(t) {
|
|
7164
|
+
return Easing.bezier(0.42, 0, 1, 1)(t);
|
|
7165
|
+
}
|
|
7166
|
+
static quad(t) {
|
|
7167
|
+
return t * t;
|
|
7168
|
+
}
|
|
7169
|
+
static cubic(t) {
|
|
7170
|
+
return t * t * t;
|
|
7171
|
+
}
|
|
7172
|
+
static poly(n) {
|
|
7173
|
+
return (t) => t ** n;
|
|
7174
|
+
}
|
|
7175
|
+
static sin(t) {
|
|
7176
|
+
return 1 - Math.cos(t * Math.PI / 2);
|
|
7177
|
+
}
|
|
7178
|
+
static circle(t) {
|
|
7179
|
+
const u = clampUnit(t);
|
|
7180
|
+
return 1 - Math.sqrt(1 - u * u);
|
|
7181
|
+
}
|
|
7182
|
+
static exp(t) {
|
|
7183
|
+
return 2 ** (10 * (t - 1));
|
|
7184
|
+
}
|
|
7185
|
+
static elastic(bounciness = 1) {
|
|
7186
|
+
const p = bounciness * Math.PI;
|
|
7187
|
+
return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
|
|
7188
|
+
}
|
|
7189
|
+
static back(s = 1.70158) {
|
|
7190
|
+
return (t) => t * t * ((s + 1) * t - s);
|
|
7191
|
+
}
|
|
7192
|
+
static spring(config = {}) {
|
|
7193
|
+
return (t) => {
|
|
7194
|
+
if (t <= 0) {
|
|
7195
|
+
return 0;
|
|
7196
|
+
}
|
|
7197
|
+
if (t >= 1) {
|
|
7198
|
+
return 1;
|
|
7199
|
+
}
|
|
7200
|
+
return spring({
|
|
7201
|
+
fps: springEasingDurationInFrames,
|
|
7202
|
+
frame: t * springEasingDurationInFrames,
|
|
7203
|
+
config,
|
|
7204
|
+
durationInFrames: springEasingDurationInFrames
|
|
7205
|
+
});
|
|
7206
|
+
};
|
|
7207
|
+
}
|
|
7208
|
+
static bounce(t) {
|
|
7209
|
+
const u = clampUnit(t);
|
|
7210
|
+
if (u < 1 / 2.75) {
|
|
7211
|
+
return 7.5625 * u * u;
|
|
7212
|
+
}
|
|
7213
|
+
if (u < 2 / 2.75) {
|
|
7214
|
+
const t2_ = u - 1.5 / 2.75;
|
|
7215
|
+
return 7.5625 * t2_ * t2_ + 0.75;
|
|
7216
|
+
}
|
|
7217
|
+
if (u < 2.5 / 2.75) {
|
|
7218
|
+
const t2_ = u - 2.25 / 2.75;
|
|
7219
|
+
return 7.5625 * t2_ * t2_ + 0.9375;
|
|
7220
|
+
}
|
|
7221
|
+
const t2 = u - 2.625 / 2.75;
|
|
7222
|
+
return 7.5625 * t2 * t2 + 0.984375;
|
|
7223
|
+
}
|
|
7224
|
+
static bezier(x1, y1, x2, y2) {
|
|
7225
|
+
return bezier(x1, y1, x2, y2);
|
|
7226
|
+
}
|
|
7227
|
+
static in(easing) {
|
|
7228
|
+
return easing;
|
|
7229
|
+
}
|
|
7230
|
+
static out(easing) {
|
|
7231
|
+
return (t) => 1 - easing(1 - t);
|
|
7232
|
+
}
|
|
7233
|
+
static inOut(easing) {
|
|
7234
|
+
return (t) => {
|
|
7235
|
+
if (t < 0.5) {
|
|
7236
|
+
return easing(t * 2) / 2;
|
|
7237
|
+
}
|
|
7238
|
+
return 1 - easing((1 - t) * 2) / 2;
|
|
7239
|
+
};
|
|
7240
|
+
}
|
|
7241
|
+
}
|
|
7242
|
+
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
7243
|
+
var PERCENTAGE = NUMBER + "%";
|
|
7244
|
+
function call(...args) {
|
|
7245
|
+
return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
|
|
7246
|
+
}
|
|
7247
|
+
var MODERN_VALUE = "(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";
|
|
7248
|
+
function modernColorCall(name) {
|
|
7249
|
+
return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
|
|
7250
|
+
}
|
|
7251
|
+
function getMatchers() {
|
|
7252
|
+
const cachedMatchers = {
|
|
7253
|
+
rgb: undefined,
|
|
7254
|
+
rgba: undefined,
|
|
7255
|
+
hsl: undefined,
|
|
7256
|
+
hsla: undefined,
|
|
7257
|
+
hex3: undefined,
|
|
7258
|
+
hex4: undefined,
|
|
7259
|
+
hex5: undefined,
|
|
7260
|
+
hex6: undefined,
|
|
7261
|
+
hex8: undefined,
|
|
7262
|
+
oklch: undefined,
|
|
7263
|
+
oklab: undefined,
|
|
7264
|
+
lab: undefined,
|
|
7265
|
+
lch: undefined,
|
|
7266
|
+
hwb: undefined
|
|
7267
|
+
};
|
|
7268
|
+
if (cachedMatchers.rgb === undefined) {
|
|
7269
|
+
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
|
|
7270
|
+
cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
|
7271
|
+
cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
|
7272
|
+
cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
|
7273
|
+
cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
7274
|
+
cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
7275
|
+
cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
|
|
7276
|
+
cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
|
|
7277
|
+
cachedMatchers.oklch = modernColorCall("oklch");
|
|
7278
|
+
cachedMatchers.oklab = modernColorCall("oklab");
|
|
7279
|
+
cachedMatchers.lab = modernColorCall("lab");
|
|
7280
|
+
cachedMatchers.lch = modernColorCall("lch");
|
|
7281
|
+
cachedMatchers.hwb = modernColorCall("hwb");
|
|
7282
|
+
}
|
|
7283
|
+
return cachedMatchers;
|
|
7284
|
+
}
|
|
7285
|
+
function hue2rgb(p, q, t) {
|
|
7286
|
+
if (t < 0) {
|
|
7287
|
+
t += 1;
|
|
7288
|
+
}
|
|
7289
|
+
if (t > 1) {
|
|
7290
|
+
t -= 1;
|
|
7291
|
+
}
|
|
7292
|
+
if (t < 1 / 6) {
|
|
7293
|
+
return p + (q - p) * 6 * t;
|
|
7294
|
+
}
|
|
7295
|
+
if (t < 1 / 2) {
|
|
7296
|
+
return q;
|
|
7297
|
+
}
|
|
7298
|
+
if (t < 2 / 3) {
|
|
7299
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
7300
|
+
}
|
|
7301
|
+
return p;
|
|
7302
|
+
}
|
|
7303
|
+
function hslToRgb(h, s, l) {
|
|
7304
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
7305
|
+
const p = 2 * l - q;
|
|
7306
|
+
const r2 = hue2rgb(p, q, h + 1 / 3);
|
|
7307
|
+
const g = hue2rgb(p, q, h);
|
|
7308
|
+
const b2 = hue2rgb(p, q, h - 1 / 3);
|
|
7309
|
+
return Math.round(r2 * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
7310
|
+
}
|
|
7311
|
+
function parse255(str) {
|
|
7312
|
+
const int = Number.parseInt(str, 10);
|
|
7313
|
+
if (int < 0) {
|
|
7314
|
+
return 0;
|
|
7315
|
+
}
|
|
7316
|
+
if (int > 255) {
|
|
7317
|
+
return 255;
|
|
7318
|
+
}
|
|
7319
|
+
return int;
|
|
7320
|
+
}
|
|
7321
|
+
function parse360(str) {
|
|
7322
|
+
const int = Number.parseFloat(str);
|
|
7323
|
+
return (int % 360 + 360) % 360 / 360;
|
|
7324
|
+
}
|
|
7325
|
+
function parse1(str) {
|
|
7326
|
+
const num = Number.parseFloat(str);
|
|
7327
|
+
if (num < 0) {
|
|
7328
|
+
return 0;
|
|
7329
|
+
}
|
|
7330
|
+
if (num > 1) {
|
|
7331
|
+
return 255;
|
|
7332
|
+
}
|
|
7333
|
+
return Math.round(num * 255);
|
|
7334
|
+
}
|
|
7335
|
+
function parsePercentage(str) {
|
|
7336
|
+
const int = Number.parseFloat(str);
|
|
7337
|
+
if (int < 0) {
|
|
7338
|
+
return 0;
|
|
7339
|
+
}
|
|
7340
|
+
if (int > 100) {
|
|
7341
|
+
return 1;
|
|
7342
|
+
}
|
|
7343
|
+
return int / 100;
|
|
7344
|
+
}
|
|
7345
|
+
function parseModernComponent(str, percentScale) {
|
|
7346
|
+
if (str === "none")
|
|
7347
|
+
return 0;
|
|
7348
|
+
if (str.endsWith("%")) {
|
|
7349
|
+
return Number.parseFloat(str) / 100 * percentScale;
|
|
7350
|
+
}
|
|
7351
|
+
return Number.parseFloat(str);
|
|
7352
|
+
}
|
|
7353
|
+
function parseHueAngle(str) {
|
|
7354
|
+
if (str === "none")
|
|
7355
|
+
return 0;
|
|
7356
|
+
if (str.endsWith("rad")) {
|
|
7357
|
+
return Number.parseFloat(str) * 180 / Math.PI;
|
|
7358
|
+
}
|
|
7359
|
+
if (str.endsWith("grad"))
|
|
7360
|
+
return Number.parseFloat(str) * 0.9;
|
|
7361
|
+
if (str.endsWith("turn"))
|
|
7362
|
+
return Number.parseFloat(str) * 360;
|
|
7363
|
+
return Number.parseFloat(str);
|
|
7364
|
+
}
|
|
7365
|
+
function parseModernAlpha(str) {
|
|
7077
7366
|
if (str === undefined || str === "none")
|
|
7078
7367
|
return 1;
|
|
7079
7368
|
if (str.endsWith("%")) {
|
|
@@ -7946,7 +8235,8 @@ var wrapInSchema = ({
|
|
|
7946
8235
|
schema,
|
|
7947
8236
|
supportsEffects
|
|
7948
8237
|
}) => {
|
|
7949
|
-
const
|
|
8238
|
+
const schemaWithSequenceName = extendSchemaWithSequenceName(schema);
|
|
8239
|
+
const flatSchema = getFlatSchemaWithAllKeys(schemaWithSequenceName);
|
|
7950
8240
|
const flatKeys = Object.keys(flatSchema);
|
|
7951
8241
|
const Wrapped = forwardRef2((props, ref) => {
|
|
7952
8242
|
const env = useRemotionEnvironment();
|
|
@@ -7985,7 +8275,7 @@ var wrapInSchema = ({
|
|
|
7985
8275
|
const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
7986
8276
|
const controls = useMemo13(() => {
|
|
7987
8277
|
return {
|
|
7988
|
-
schema,
|
|
8278
|
+
schema: schemaWithSequenceName,
|
|
7989
8279
|
currentRuntimeValueDotNotation,
|
|
7990
8280
|
overrideId,
|
|
7991
8281
|
supportsEffects
|
|
@@ -7993,7 +8283,7 @@ var wrapInSchema = ({
|
|
|
7993
8283
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
7994
8284
|
const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
|
|
7995
8285
|
return computeEffectiveSchemaValuesDotNotation({
|
|
7996
|
-
schema,
|
|
8286
|
+
schema: schemaWithSequenceName,
|
|
7997
8287
|
currentValue: currentRuntimeValueDotNotation,
|
|
7998
8288
|
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
7999
8289
|
propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses, nodePath),
|
|
@@ -8006,7 +8296,7 @@ var wrapInSchema = ({
|
|
|
8006
8296
|
propStatuses,
|
|
8007
8297
|
frame
|
|
8008
8298
|
]);
|
|
8009
|
-
const activeKeys = selectActiveKeys(
|
|
8299
|
+
const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
|
|
8010
8300
|
const mergedProps = mergeValues({
|
|
8011
8301
|
props,
|
|
8012
8302
|
valuesDotNotation,
|
|
@@ -8048,6 +8338,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8048
8338
|
const parentSequence = useContext17(SequenceContext);
|
|
8049
8339
|
const { rootId } = useTimelineContext();
|
|
8050
8340
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
8341
|
+
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + from;
|
|
8051
8342
|
const nonce = useNonce();
|
|
8052
8343
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
8053
8344
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
@@ -8085,6 +8376,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8085
8376
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
8086
8377
|
const contextValue = useMemo14(() => {
|
|
8087
8378
|
return {
|
|
8379
|
+
absoluteFrom,
|
|
8088
8380
|
cumulatedFrom,
|
|
8089
8381
|
relativeFrom: from,
|
|
8090
8382
|
cumulatedNegativeFrom,
|
|
@@ -8100,6 +8392,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8100
8392
|
};
|
|
8101
8393
|
}, [
|
|
8102
8394
|
cumulatedFrom,
|
|
8395
|
+
absoluteFrom,
|
|
8103
8396
|
from,
|
|
8104
8397
|
actualDurationInFrames,
|
|
8105
8398
|
parentSequence,
|
|
@@ -8115,7 +8408,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8115
8408
|
const timelineClipName = useMemo14(() => {
|
|
8116
8409
|
return name ?? "";
|
|
8117
8410
|
}, [name]);
|
|
8118
|
-
const resolvedDocumentationLink = documentationLink ??
|
|
8411
|
+
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
8119
8412
|
const env = useRemotionEnvironment();
|
|
8120
8413
|
const isInsideSeries = useContext17(IsInsideSeriesContext);
|
|
8121
8414
|
const inheritedStack = other?.stack ?? null;
|
|
@@ -8742,10 +9035,10 @@ var decodeImage = async ({
|
|
|
8742
9035
|
if (!selectedTrack) {
|
|
8743
9036
|
throw new Error("No selected track");
|
|
8744
9037
|
}
|
|
8745
|
-
const
|
|
9038
|
+
const cache2 = [];
|
|
8746
9039
|
let durationFound = null;
|
|
8747
9040
|
const getFrameByIndex = async (frameIndex) => {
|
|
8748
|
-
const foundInCache =
|
|
9041
|
+
const foundInCache = cache2.find((c2) => c2.frameIndex === frameIndex);
|
|
8749
9042
|
if (foundInCache && foundInCache.frame) {
|
|
8750
9043
|
return foundInCache;
|
|
8751
9044
|
}
|
|
@@ -8756,7 +9049,7 @@ var decodeImage = async ({
|
|
|
8756
9049
|
if (foundInCache) {
|
|
8757
9050
|
foundInCache.frame = frame.image;
|
|
8758
9051
|
} else {
|
|
8759
|
-
|
|
9052
|
+
cache2.push({
|
|
8760
9053
|
frame: frame.image,
|
|
8761
9054
|
frameIndex,
|
|
8762
9055
|
timeInSeconds: frame.image.timestamp / 1e6
|
|
@@ -8769,7 +9062,7 @@ var decodeImage = async ({
|
|
|
8769
9062
|
};
|
|
8770
9063
|
};
|
|
8771
9064
|
const clearCache = (closeToTimeInSec) => {
|
|
8772
|
-
const itemsInCache =
|
|
9065
|
+
const itemsInCache = cache2.filter((c2) => c2.frame);
|
|
8773
9066
|
const sortByClosestToCurrentTime = itemsInCache.sort((a2, b2) => {
|
|
8774
9067
|
const aDiff = Math.abs(a2.timeInSeconds - closeToTimeInSec);
|
|
8775
9068
|
const bDiff = Math.abs(b2.timeInSeconds - closeToTimeInSec);
|
|
@@ -8792,7 +9085,7 @@ var decodeImage = async ({
|
|
|
8792
9085
|
loopBehavior,
|
|
8793
9086
|
timeInSec
|
|
8794
9087
|
});
|
|
8795
|
-
const framesBefore =
|
|
9088
|
+
const framesBefore = cache2.filter((c2) => c2.timeInSeconds <= actualTimeInSec);
|
|
8796
9089
|
const biggestIndex = framesBefore.map((c2) => c2.frameIndex).reduce((a2, b2) => Math.max(a2, b2), 0);
|
|
8797
9090
|
let i = biggestIndex;
|
|
8798
9091
|
while (true) {
|
|
@@ -8835,7 +9128,7 @@ var decodeImage = async ({
|
|
|
8835
9128
|
timeInSec
|
|
8836
9129
|
});
|
|
8837
9130
|
await ensureFrameBeforeAndAfter({ timeInSec: actualTimeInSec, loopBehavior });
|
|
8838
|
-
const itemsInCache =
|
|
9131
|
+
const itemsInCache = cache2.filter((c2) => c2.frame);
|
|
8839
9132
|
const closest = itemsInCache.reduce((a2, b2) => {
|
|
8840
9133
|
const aDiff = Math.abs(a2.timeInSeconds - actualTimeInSec);
|
|
8841
9134
|
const bDiff = Math.abs(b2.timeInSeconds - actualTimeInSec);
|
|
@@ -9296,7 +9589,7 @@ var Loop = ({
|
|
|
9296
9589
|
durationInFrames,
|
|
9297
9590
|
from,
|
|
9298
9591
|
name: name ?? "<Loop>",
|
|
9299
|
-
_remotionInternalDocumentationLink:
|
|
9592
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/loop",
|
|
9300
9593
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
9301
9594
|
layout: props.layout,
|
|
9302
9595
|
style,
|
|
@@ -11685,7 +11978,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11685
11978
|
premountDisplay: sequenceContext?.premountDisplay ?? null,
|
|
11686
11979
|
postmountDisplay: sequenceContext?.postmountDisplay ?? null,
|
|
11687
11980
|
loopDisplay: undefined,
|
|
11688
|
-
documentationLink:
|
|
11981
|
+
documentationLink: "https://www.remotion.dev/docs/html5-audio",
|
|
11689
11982
|
refForOutline: null
|
|
11690
11983
|
});
|
|
11691
11984
|
useMediaPlayback({
|
|
@@ -12179,7 +12472,7 @@ var SolidOuter = forwardRef8(({
|
|
|
12179
12472
|
durationInFrames,
|
|
12180
12473
|
name: name ?? "<Solid>",
|
|
12181
12474
|
_remotionInternalRefForOutline: actualRef,
|
|
12182
|
-
_remotionInternalDocumentationLink:
|
|
12475
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid",
|
|
12183
12476
|
...props2,
|
|
12184
12477
|
children: /* @__PURE__ */ jsx24(SolidInner, {
|
|
12185
12478
|
reference: actualRef,
|
|
@@ -12491,7 +12784,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
12491
12784
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
12492
12785
|
durationInFrames: resolvedDuration,
|
|
12493
12786
|
name: name ?? "<HtmlInCanvas>",
|
|
12494
|
-
_remotionInternalDocumentationLink:
|
|
12787
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
12495
12788
|
_experimentalControls: controls,
|
|
12496
12789
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
12497
12790
|
_remotionInternalRefForOutline: actualRef,
|
|
@@ -13055,7 +13348,7 @@ var NativeImgInner = ({
|
|
|
13055
13348
|
from: from ?? 0,
|
|
13056
13349
|
durationInFrames: durationInFrames ?? Infinity,
|
|
13057
13350
|
_remotionInternalStack: stack,
|
|
13058
|
-
_remotionInternalDocumentationLink:
|
|
13351
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
13059
13352
|
_remotionInternalIsMedia: { type: "image", src },
|
|
13060
13353
|
name: name ?? "<Img>",
|
|
13061
13354
|
_experimentalControls: controls,
|
|
@@ -13197,7 +13490,7 @@ var ImgInner = ({
|
|
|
13197
13490
|
name: name ?? "<Img>",
|
|
13198
13491
|
showInTimeline,
|
|
13199
13492
|
stack,
|
|
13200
|
-
_remotionInternalDocumentationLink:
|
|
13493
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
13201
13494
|
_experimentalControls: controls,
|
|
13202
13495
|
_remotionInternalRefForOutline: refForOutline,
|
|
13203
13496
|
...canvasProps
|
|
@@ -13248,6 +13541,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
13248
13541
|
showInTimeline: showInTimeline ?? true,
|
|
13249
13542
|
_experimentalControls,
|
|
13250
13543
|
_remotionInternalStack: stack,
|
|
13544
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
13251
13545
|
_remotionInternalRefForOutline: refForOutline,
|
|
13252
13546
|
children: React29.createElement(tag, {
|
|
13253
13547
|
...props2,
|
|
@@ -14145,7 +14439,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14145
14439
|
premountDisplay: parentSequence?.premountDisplay ?? null,
|
|
14146
14440
|
postmountDisplay: parentSequence?.postmountDisplay ?? null,
|
|
14147
14441
|
loopDisplay: undefined,
|
|
14148
|
-
documentationLink:
|
|
14442
|
+
documentationLink: onlyWarnForMediaSeekingError ? "https://www.remotion.dev/docs/offthreadvideo" : "https://www.remotion.dev/docs/html5-video",
|
|
14149
14443
|
refForOutline: videoRef
|
|
14150
14444
|
});
|
|
14151
14445
|
useMediaPlayback({
|
|
@@ -14276,6 +14570,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14276
14570
|
isClientSideRendering: false
|
|
14277
14571
|
});
|
|
14278
14572
|
return /* @__PURE__ */ jsx34("video", {
|
|
14573
|
+
...nativeProps,
|
|
14279
14574
|
ref: videoRef,
|
|
14280
14575
|
muted: muted || mediaMuted || userPreferredVolume <= 0,
|
|
14281
14576
|
playsInline: true,
|
|
@@ -14284,7 +14579,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14284
14579
|
style: actualStyle,
|
|
14285
14580
|
disableRemotePlayback: true,
|
|
14286
14581
|
crossOrigin: crossOriginValue,
|
|
14287
|
-
|
|
14582
|
+
controls: false
|
|
14288
14583
|
});
|
|
14289
14584
|
};
|
|
14290
14585
|
var VideoForPreview = forwardRef13(VideoForDevelopmentRefForwardingFunction);
|
|
@@ -14662,52 +14957,28 @@ var Internals = {
|
|
|
14662
14957
|
CompositionRenderErrorContext,
|
|
14663
14958
|
useEffectChainState,
|
|
14664
14959
|
createEffectChainState,
|
|
14665
|
-
cleanupEffectChainState,
|
|
14666
|
-
runEffectChain,
|
|
14667
|
-
useMemoizedEffects,
|
|
14668
|
-
useMemoizedEffectDefinitions,
|
|
14669
|
-
createEffect,
|
|
14670
|
-
createWebGLContextError,
|
|
14671
|
-
createWebGL2ContextError,
|
|
14672
|
-
computeEffectiveSchemaValuesDotNotation,
|
|
14673
|
-
interpolateKeyframedStatus,
|
|
14674
|
-
makeStaticDragOverride,
|
|
14675
|
-
makeKeyframedDragOverride,
|
|
14676
|
-
resolveDragOverrideValue,
|
|
14677
|
-
getStaticDragOverrideValue,
|
|
14678
|
-
OverrideIdsToNodePathsGettersContext,
|
|
14679
|
-
OverrideIdsToNodePathsSettersContext,
|
|
14680
|
-
findPropsToDelete,
|
|
14681
|
-
makeSequencePropsSubscriptionKey,
|
|
14682
|
-
getPropStatusesCtx,
|
|
14683
|
-
getEffectPropStatusesCtx,
|
|
14684
|
-
hiddenField,
|
|
14685
|
-
durationInFramesField,
|
|
14686
|
-
fromField
|
|
14687
|
-
};
|
|
14688
|
-
var validateFrame = ({
|
|
14689
|
-
allowFloats,
|
|
14690
|
-
durationInFrames,
|
|
14691
|
-
frame
|
|
14692
|
-
}) => {
|
|
14693
|
-
if (typeof frame === "undefined") {
|
|
14694
|
-
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
14695
|
-
}
|
|
14696
|
-
if (typeof frame !== "number") {
|
|
14697
|
-
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
14698
|
-
}
|
|
14699
|
-
if (!Number.isFinite(frame)) {
|
|
14700
|
-
throw new RangeError(`Frame ${frame} is not finite`);
|
|
14701
|
-
}
|
|
14702
|
-
if (frame % 1 !== 0 && !allowFloats) {
|
|
14703
|
-
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
14704
|
-
}
|
|
14705
|
-
if (frame < 0 && frame < -durationInFrames) {
|
|
14706
|
-
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
|
|
14707
|
-
}
|
|
14708
|
-
if (frame > durationInFrames - 1) {
|
|
14709
|
-
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
14710
|
-
}
|
|
14960
|
+
cleanupEffectChainState,
|
|
14961
|
+
runEffectChain,
|
|
14962
|
+
useMemoizedEffects,
|
|
14963
|
+
useMemoizedEffectDefinitions,
|
|
14964
|
+
createEffect,
|
|
14965
|
+
createWebGLContextError,
|
|
14966
|
+
createWebGL2ContextError,
|
|
14967
|
+
computeEffectiveSchemaValuesDotNotation,
|
|
14968
|
+
interpolateKeyframedStatus,
|
|
14969
|
+
makeStaticDragOverride,
|
|
14970
|
+
makeKeyframedDragOverride,
|
|
14971
|
+
resolveDragOverrideValue,
|
|
14972
|
+
getStaticDragOverrideValue,
|
|
14973
|
+
OverrideIdsToNodePathsGettersContext,
|
|
14974
|
+
OverrideIdsToNodePathsSettersContext,
|
|
14975
|
+
findPropsToDelete,
|
|
14976
|
+
makeSequencePropsSubscriptionKey,
|
|
14977
|
+
getPropStatusesCtx,
|
|
14978
|
+
getEffectPropStatusesCtx,
|
|
14979
|
+
hiddenField,
|
|
14980
|
+
durationInFramesField,
|
|
14981
|
+
fromField
|
|
14711
14982
|
};
|
|
14712
14983
|
var flattenChildren = (children) => {
|
|
14713
14984
|
const childrenArray = React40.Children.toArray(children);
|
|
@@ -14798,240 +15069,6 @@ var Series = Object.assign(wrapInSchema({
|
|
|
14798
15069
|
Sequence: SeriesSequence
|
|
14799
15070
|
});
|
|
14800
15071
|
addSequenceStackTraces(Series);
|
|
14801
|
-
var validateSpringDuration = (dur) => {
|
|
14802
|
-
if (typeof dur === "undefined") {
|
|
14803
|
-
return;
|
|
14804
|
-
}
|
|
14805
|
-
if (typeof dur !== "number") {
|
|
14806
|
-
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
|
|
14807
|
-
}
|
|
14808
|
-
if (Number.isNaN(dur)) {
|
|
14809
|
-
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
|
|
14810
|
-
}
|
|
14811
|
-
if (!Number.isFinite(dur)) {
|
|
14812
|
-
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
|
|
14813
|
-
}
|
|
14814
|
-
if (dur <= 0) {
|
|
14815
|
-
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
|
|
14816
|
-
}
|
|
14817
|
-
};
|
|
14818
|
-
var defaultSpringConfig = {
|
|
14819
|
-
damping: 10,
|
|
14820
|
-
mass: 1,
|
|
14821
|
-
stiffness: 100,
|
|
14822
|
-
overshootClamping: false
|
|
14823
|
-
};
|
|
14824
|
-
var advanceCache = {};
|
|
14825
|
-
function advance({
|
|
14826
|
-
animation,
|
|
14827
|
-
now,
|
|
14828
|
-
config
|
|
14829
|
-
}) {
|
|
14830
|
-
const { toValue: toValue2, lastTimestamp, current, velocity } = animation;
|
|
14831
|
-
const deltaTime = Math.min(now - lastTimestamp, 64);
|
|
14832
|
-
if (config.damping <= 0) {
|
|
14833
|
-
throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
|
|
14834
|
-
}
|
|
14835
|
-
const c2 = config.damping;
|
|
14836
|
-
const m = config.mass;
|
|
14837
|
-
const k = config.stiffness;
|
|
14838
|
-
const cacheKey = [
|
|
14839
|
-
toValue2,
|
|
14840
|
-
lastTimestamp,
|
|
14841
|
-
current,
|
|
14842
|
-
velocity,
|
|
14843
|
-
c2,
|
|
14844
|
-
m,
|
|
14845
|
-
k,
|
|
14846
|
-
now
|
|
14847
|
-
].join("-");
|
|
14848
|
-
if (advanceCache[cacheKey]) {
|
|
14849
|
-
return advanceCache[cacheKey];
|
|
14850
|
-
}
|
|
14851
|
-
const v0 = -velocity;
|
|
14852
|
-
const x0 = toValue2 - current;
|
|
14853
|
-
const zeta = c2 / (2 * Math.sqrt(k * m));
|
|
14854
|
-
const omega0 = Math.sqrt(k / m);
|
|
14855
|
-
const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
|
|
14856
|
-
const t = deltaTime / 1000;
|
|
14857
|
-
const sin1 = Math.sin(omega1 * t);
|
|
14858
|
-
const cos1 = Math.cos(omega1 * t);
|
|
14859
|
-
const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
|
|
14860
|
-
const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
|
|
14861
|
-
const underDampedPosition = toValue2 - underDampedFrag1;
|
|
14862
|
-
const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
|
|
14863
|
-
const criticallyDampedEnvelope = Math.exp(-omega0 * t);
|
|
14864
|
-
const criticallyDampedPosition = toValue2 - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
|
|
14865
|
-
const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
|
|
14866
|
-
const animationNode = {
|
|
14867
|
-
toValue: toValue2,
|
|
14868
|
-
prevPosition: current,
|
|
14869
|
-
lastTimestamp: now,
|
|
14870
|
-
current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
|
|
14871
|
-
velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
|
|
14872
|
-
};
|
|
14873
|
-
advanceCache[cacheKey] = animationNode;
|
|
14874
|
-
return animationNode;
|
|
14875
|
-
}
|
|
14876
|
-
var calculationCache = {};
|
|
14877
|
-
function springCalculation({
|
|
14878
|
-
frame,
|
|
14879
|
-
fps,
|
|
14880
|
-
config = {}
|
|
14881
|
-
}) {
|
|
14882
|
-
const from = 0;
|
|
14883
|
-
const to = 1;
|
|
14884
|
-
const cacheKey = [
|
|
14885
|
-
frame,
|
|
14886
|
-
fps,
|
|
14887
|
-
config.damping,
|
|
14888
|
-
config.mass,
|
|
14889
|
-
config.overshootClamping,
|
|
14890
|
-
config.stiffness
|
|
14891
|
-
].join("-");
|
|
14892
|
-
if (calculationCache[cacheKey]) {
|
|
14893
|
-
return calculationCache[cacheKey];
|
|
14894
|
-
}
|
|
14895
|
-
let animation = {
|
|
14896
|
-
lastTimestamp: 0,
|
|
14897
|
-
current: from,
|
|
14898
|
-
toValue: to,
|
|
14899
|
-
velocity: 0,
|
|
14900
|
-
prevPosition: 0
|
|
14901
|
-
};
|
|
14902
|
-
const frameClamped = Math.max(0, frame);
|
|
14903
|
-
const unevenRest = frameClamped % 1;
|
|
14904
|
-
for (let f = 0;f <= Math.floor(frameClamped); f++) {
|
|
14905
|
-
if (f === Math.floor(frameClamped)) {
|
|
14906
|
-
f += unevenRest;
|
|
14907
|
-
}
|
|
14908
|
-
const time = f / fps * 1000;
|
|
14909
|
-
animation = advance({
|
|
14910
|
-
animation,
|
|
14911
|
-
now: time,
|
|
14912
|
-
config: {
|
|
14913
|
-
...defaultSpringConfig,
|
|
14914
|
-
...config
|
|
14915
|
-
}
|
|
14916
|
-
});
|
|
14917
|
-
}
|
|
14918
|
-
calculationCache[cacheKey] = animation;
|
|
14919
|
-
return animation;
|
|
14920
|
-
}
|
|
14921
|
-
var cache = new Map;
|
|
14922
|
-
function measureSpring({
|
|
14923
|
-
fps,
|
|
14924
|
-
config = {},
|
|
14925
|
-
threshold = 0.005
|
|
14926
|
-
}) {
|
|
14927
|
-
if (typeof threshold !== "number") {
|
|
14928
|
-
throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
|
|
14929
|
-
}
|
|
14930
|
-
if (threshold === 0) {
|
|
14931
|
-
return Infinity;
|
|
14932
|
-
}
|
|
14933
|
-
if (threshold === 1) {
|
|
14934
|
-
return 0;
|
|
14935
|
-
}
|
|
14936
|
-
if (isNaN(threshold)) {
|
|
14937
|
-
throw new TypeError("Threshold is NaN");
|
|
14938
|
-
}
|
|
14939
|
-
if (!Number.isFinite(threshold)) {
|
|
14940
|
-
throw new TypeError("Threshold is not finite");
|
|
14941
|
-
}
|
|
14942
|
-
if (threshold < 0) {
|
|
14943
|
-
throw new TypeError("Threshold is below 0");
|
|
14944
|
-
}
|
|
14945
|
-
const cacheKey = [
|
|
14946
|
-
fps,
|
|
14947
|
-
config.damping,
|
|
14948
|
-
config.mass,
|
|
14949
|
-
config.overshootClamping,
|
|
14950
|
-
config.stiffness,
|
|
14951
|
-
threshold
|
|
14952
|
-
].join("-");
|
|
14953
|
-
if (cache.has(cacheKey)) {
|
|
14954
|
-
return cache.get(cacheKey);
|
|
14955
|
-
}
|
|
14956
|
-
validateFps(fps, "to the measureSpring() function", false);
|
|
14957
|
-
let frame = 0;
|
|
14958
|
-
let finishedFrame = 0;
|
|
14959
|
-
const calc = () => {
|
|
14960
|
-
return springCalculation({
|
|
14961
|
-
fps,
|
|
14962
|
-
frame,
|
|
14963
|
-
config
|
|
14964
|
-
});
|
|
14965
|
-
};
|
|
14966
|
-
let animation = calc();
|
|
14967
|
-
const calcDifference = () => {
|
|
14968
|
-
return Math.abs(animation.current - animation.toValue);
|
|
14969
|
-
};
|
|
14970
|
-
let difference = calcDifference();
|
|
14971
|
-
while (difference >= threshold) {
|
|
14972
|
-
frame++;
|
|
14973
|
-
animation = calc();
|
|
14974
|
-
difference = calcDifference();
|
|
14975
|
-
}
|
|
14976
|
-
finishedFrame = frame;
|
|
14977
|
-
for (let i = 0;i < 20; i++) {
|
|
14978
|
-
frame++;
|
|
14979
|
-
animation = calc();
|
|
14980
|
-
difference = calcDifference();
|
|
14981
|
-
if (difference >= threshold) {
|
|
14982
|
-
i = 0;
|
|
14983
|
-
finishedFrame = frame + 1;
|
|
14984
|
-
}
|
|
14985
|
-
}
|
|
14986
|
-
cache.set(cacheKey, finishedFrame);
|
|
14987
|
-
return finishedFrame;
|
|
14988
|
-
}
|
|
14989
|
-
function spring({
|
|
14990
|
-
frame: passedFrame,
|
|
14991
|
-
fps,
|
|
14992
|
-
config = {},
|
|
14993
|
-
from = 0,
|
|
14994
|
-
to = 1,
|
|
14995
|
-
durationInFrames: passedDurationInFrames,
|
|
14996
|
-
durationRestThreshold,
|
|
14997
|
-
delay = 0,
|
|
14998
|
-
reverse = false
|
|
14999
|
-
}) {
|
|
15000
|
-
validateSpringDuration(passedDurationInFrames);
|
|
15001
|
-
validateFrame({
|
|
15002
|
-
frame: passedFrame,
|
|
15003
|
-
durationInFrames: Infinity,
|
|
15004
|
-
allowFloats: true
|
|
15005
|
-
});
|
|
15006
|
-
validateFps(fps, "to spring()", false);
|
|
15007
|
-
const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
|
|
15008
|
-
const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
|
|
15009
|
-
fps,
|
|
15010
|
-
config,
|
|
15011
|
-
threshold: durationRestThreshold
|
|
15012
|
-
}) : undefined;
|
|
15013
|
-
const naturalDurationGetter = needsToCalculateNaturalDuration ? {
|
|
15014
|
-
get: () => naturalDuration
|
|
15015
|
-
} : {
|
|
15016
|
-
get: () => {
|
|
15017
|
-
throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
|
|
15018
|
-
}
|
|
15019
|
-
};
|
|
15020
|
-
const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
|
|
15021
|
-
const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
|
|
15022
|
-
const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
|
|
15023
|
-
if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
|
|
15024
|
-
return to;
|
|
15025
|
-
}
|
|
15026
|
-
const spr = springCalculation({
|
|
15027
|
-
fps,
|
|
15028
|
-
frame: durationProcessed,
|
|
15029
|
-
config
|
|
15030
|
-
});
|
|
15031
|
-
const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
|
|
15032
|
-
const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
|
|
15033
|
-
return interpolated;
|
|
15034
|
-
}
|
|
15035
15072
|
var problematicCharacters = {
|
|
15036
15073
|
"%3A": ":",
|
|
15037
15074
|
"%2F": "/",
|