@remotion/promo-pages 4.0.475 → 4.0.477
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 +1397 -949
- 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/EditorStarterSection.d.ts +3 -0
- package/dist/components/homepage/EditorStarterSection.js +8 -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 +3 -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 +1180 -766
- package/dist/experts.js +655 -554
- 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 +1174 -760
- package/dist/main.d.ts +1 -0
- package/dist/main.js +6 -0
- package/dist/prompts/PromptsGallery.js +1176 -762
- package/dist/prompts/PromptsShow.js +1180 -766
- package/dist/prompts/PromptsSubmit.js +1182 -768
- 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 +1172 -758
- package/dist/template-modal-content.js +1179 -765
- package/dist/templates.js +1172 -758
- package/package.json +13 -13
package/dist/experts.js
CHANGED
|
@@ -943,6 +943,7 @@ import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
|
943
943
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
944
944
|
import {
|
|
945
945
|
forwardRef as forwardRef3,
|
|
946
|
+
useCallback as useCallback6,
|
|
946
947
|
useContext as useContext17,
|
|
947
948
|
useEffect as useEffect3,
|
|
948
949
|
useMemo as useMemo14,
|
|
@@ -981,14 +982,14 @@ import {
|
|
|
981
982
|
useRef as useRef9,
|
|
982
983
|
useState as useState6
|
|
983
984
|
} from "react";
|
|
984
|
-
import React15, { useCallback as
|
|
985
|
+
import React15, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
985
986
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
986
987
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
987
988
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
988
989
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
989
990
|
import {
|
|
990
991
|
createContext as createContext17,
|
|
991
|
-
useCallback as
|
|
992
|
+
useCallback as useCallback8,
|
|
992
993
|
useImperativeHandle as useImperativeHandle3,
|
|
993
994
|
useLayoutEffect as useLayoutEffect3,
|
|
994
995
|
useMemo as useMemo17,
|
|
@@ -996,7 +997,7 @@ import {
|
|
|
996
997
|
useState as useState7
|
|
997
998
|
} from "react";
|
|
998
999
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
999
|
-
import { forwardRef as forwardRef7, useCallback as
|
|
1000
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
1000
1001
|
import React16, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
1001
1002
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1002
1003
|
import { useContext as useContext19 } from "react";
|
|
@@ -1004,7 +1005,7 @@ import { createContext as createContext19, useEffect as useEffect6, useState as
|
|
|
1004
1005
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1005
1006
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
1006
1007
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1007
|
-
import { useCallback as
|
|
1008
|
+
import { useCallback as useCallback13 } from "react";
|
|
1008
1009
|
import React22, {
|
|
1009
1010
|
forwardRef as forwardRef5,
|
|
1010
1011
|
useContext as useContext28,
|
|
@@ -1018,7 +1019,7 @@ import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef
|
|
|
1018
1019
|
import React19, {
|
|
1019
1020
|
createContext as createContext21,
|
|
1020
1021
|
createRef as createRef2,
|
|
1021
|
-
useCallback as
|
|
1022
|
+
useCallback as useCallback9,
|
|
1022
1023
|
useContext as useContext20,
|
|
1023
1024
|
useEffect as useEffect7,
|
|
1024
1025
|
useMemo as useMemo21,
|
|
@@ -1031,16 +1032,16 @@ import { useRef as useRef13 } from "react";
|
|
|
1031
1032
|
import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo22, useState as useState11 } from "react";
|
|
1032
1033
|
import { useContext as useContext22 } from "react";
|
|
1033
1034
|
import {
|
|
1034
|
-
useCallback as
|
|
1035
|
+
useCallback as useCallback12,
|
|
1035
1036
|
useContext as useContext26,
|
|
1036
1037
|
useEffect as useEffect12,
|
|
1037
1038
|
useLayoutEffect as useLayoutEffect7,
|
|
1038
1039
|
useRef as useRef18
|
|
1039
1040
|
} from "react";
|
|
1040
|
-
import { useCallback as
|
|
1041
|
+
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
1041
1042
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
1042
1043
|
import React20, {
|
|
1043
|
-
useCallback as
|
|
1044
|
+
useCallback as useCallback10,
|
|
1044
1045
|
useContext as useContext24,
|
|
1045
1046
|
useEffect as useEffect9,
|
|
1046
1047
|
useLayoutEffect as useLayoutEffect6,
|
|
@@ -1068,7 +1069,7 @@ import { jsx as jsx222 } from "react/jsx-runtime";
|
|
|
1068
1069
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1069
1070
|
import {
|
|
1070
1071
|
forwardRef as forwardRef8,
|
|
1071
|
-
useCallback as
|
|
1072
|
+
useCallback as useCallback15,
|
|
1072
1073
|
useEffect as useEffect16,
|
|
1073
1074
|
useImperativeHandle as useImperativeHandle6,
|
|
1074
1075
|
useMemo as useMemo29,
|
|
@@ -1079,7 +1080,7 @@ import { jsx as jsx24 } from "react/jsx-runtime";
|
|
|
1079
1080
|
import {
|
|
1080
1081
|
createContext as createContext23,
|
|
1081
1082
|
forwardRef as forwardRef9,
|
|
1082
|
-
useCallback as
|
|
1083
|
+
useCallback as useCallback16,
|
|
1083
1084
|
useContext as useContext31,
|
|
1084
1085
|
useLayoutEffect as useLayoutEffect9,
|
|
1085
1086
|
useMemo as useMemo30,
|
|
@@ -1088,7 +1089,7 @@ import {
|
|
|
1088
1089
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1089
1090
|
import {
|
|
1090
1091
|
forwardRef as forwardRef10,
|
|
1091
|
-
useCallback as
|
|
1092
|
+
useCallback as useCallback17,
|
|
1092
1093
|
useContext as useContext32,
|
|
1093
1094
|
useEffect as useEffect17,
|
|
1094
1095
|
useImperativeHandle as useImperativeHandle7,
|
|
@@ -1097,16 +1098,16 @@ import {
|
|
|
1097
1098
|
useState as useState16
|
|
1098
1099
|
} from "react";
|
|
1099
1100
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1100
|
-
import { forwardRef as forwardRef11, useCallback as
|
|
1101
|
+
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
1101
1102
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1102
|
-
import { useCallback as
|
|
1103
|
+
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
|
|
1103
1104
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1104
|
-
import React29, { forwardRef as forwardRef12, useCallback as
|
|
1105
|
+
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
1105
1106
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1106
1107
|
import { createRef as createRef3 } from "react";
|
|
1107
1108
|
import React30 from "react";
|
|
1108
1109
|
import {
|
|
1109
|
-
useCallback as
|
|
1110
|
+
useCallback as useCallback21,
|
|
1110
1111
|
useImperativeHandle as useImperativeHandle8,
|
|
1111
1112
|
useMemo as useMemo32,
|
|
1112
1113
|
useRef as useRef26,
|
|
@@ -1121,9 +1122,9 @@ import { jsx as jsx32 } from "react/jsx-runtime";
|
|
|
1121
1122
|
import React33 from "react";
|
|
1122
1123
|
import React34, { createContext as createContext25 } from "react";
|
|
1123
1124
|
import React35, { useContext as useContext35 } from "react";
|
|
1124
|
-
import { useCallback as
|
|
1125
|
+
import { useCallback as useCallback24 } from "react";
|
|
1125
1126
|
import {
|
|
1126
|
-
useCallback as
|
|
1127
|
+
useCallback as useCallback22,
|
|
1127
1128
|
useContext as useContext36,
|
|
1128
1129
|
useEffect as useEffect18,
|
|
1129
1130
|
useLayoutEffect as useLayoutEffect11,
|
|
@@ -1133,7 +1134,7 @@ import {
|
|
|
1133
1134
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1134
1135
|
import React37, {
|
|
1135
1136
|
forwardRef as forwardRef13,
|
|
1136
|
-
useCallback as
|
|
1137
|
+
useCallback as useCallback23,
|
|
1137
1138
|
useContext as useContext37,
|
|
1138
1139
|
useEffect as useEffect20,
|
|
1139
1140
|
useImperativeHandle as useImperativeHandle9,
|
|
@@ -1154,7 +1155,7 @@ import {
|
|
|
1154
1155
|
import React40 from "react";
|
|
1155
1156
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1156
1157
|
import React42 from "react";
|
|
1157
|
-
import { forwardRef as forwardRef16, useCallback as
|
|
1158
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
1158
1159
|
import {
|
|
1159
1160
|
forwardRef as forwardRef15,
|
|
1160
1161
|
useContext as useContext38,
|
|
@@ -2334,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2334
2335
|
var addSequenceStackTraces = (component) => {
|
|
2335
2336
|
componentsToAddStacksTo.push(component);
|
|
2336
2337
|
};
|
|
2337
|
-
var VERSION = "4.0.
|
|
2338
|
+
var VERSION = "4.0.477";
|
|
2338
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2339
2340
|
if (typeof globalThis === "undefined") {
|
|
2340
2341
|
return;
|
|
@@ -2768,6 +2769,18 @@ var hiddenField = {
|
|
|
2768
2769
|
default: false,
|
|
2769
2770
|
description: "Hidden"
|
|
2770
2771
|
};
|
|
2772
|
+
var showInTimelineField = {
|
|
2773
|
+
type: "hidden"
|
|
2774
|
+
};
|
|
2775
|
+
var sequenceNameField = {
|
|
2776
|
+
type: "hidden"
|
|
2777
|
+
};
|
|
2778
|
+
var extendSchemaWithSequenceName = (schema) => {
|
|
2779
|
+
return {
|
|
2780
|
+
name: sequenceNameField,
|
|
2781
|
+
...schema
|
|
2782
|
+
};
|
|
2783
|
+
};
|
|
2771
2784
|
var durationInFramesField = {
|
|
2772
2785
|
type: "number",
|
|
2773
2786
|
default: undefined,
|
|
@@ -2781,9 +2794,17 @@ var fromField = {
|
|
|
2781
2794
|
step: 1,
|
|
2782
2795
|
hiddenFromList: true
|
|
2783
2796
|
};
|
|
2784
|
-
var
|
|
2797
|
+
var freezeField = {
|
|
2798
|
+
type: "number",
|
|
2799
|
+
default: null,
|
|
2800
|
+
step: 1,
|
|
2801
|
+
hiddenFromList: true
|
|
2802
|
+
};
|
|
2803
|
+
var sequenceSchema = extendSchemaWithSequenceName({
|
|
2785
2804
|
hidden: hiddenField,
|
|
2805
|
+
showInTimeline: showInTimelineField,
|
|
2786
2806
|
from: fromField,
|
|
2807
|
+
freeze: freezeField,
|
|
2787
2808
|
durationInFrames: durationInFramesField,
|
|
2788
2809
|
layout: {
|
|
2789
2810
|
type: "enum",
|
|
@@ -2794,12 +2815,14 @@ var sequenceSchema = {
|
|
|
2794
2815
|
none: {}
|
|
2795
2816
|
}
|
|
2796
2817
|
}
|
|
2797
|
-
};
|
|
2798
|
-
var sequenceSchemaWithoutFrom = {
|
|
2818
|
+
});
|
|
2819
|
+
var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
|
|
2799
2820
|
hidden: hiddenField,
|
|
2821
|
+
showInTimeline: showInTimelineField,
|
|
2822
|
+
freeze: freezeField,
|
|
2800
2823
|
durationInFrames: durationInFramesField,
|
|
2801
2824
|
layout: sequenceSchema.layout
|
|
2802
|
-
};
|
|
2825
|
+
});
|
|
2803
2826
|
var sequenceSchemaDefaultLayoutNone = {
|
|
2804
2827
|
...sequenceSchema,
|
|
2805
2828
|
layout: {
|
|
@@ -3143,81 +3166,6 @@ function bezier(mX1, mY1, mX2, mY2) {
|
|
|
3143
3166
|
return calcBezier(getTForX(clampedX), mY1, mY2);
|
|
3144
3167
|
};
|
|
3145
3168
|
}
|
|
3146
|
-
var clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
3147
|
-
|
|
3148
|
-
class Easing {
|
|
3149
|
-
static step0(n) {
|
|
3150
|
-
return n > 0 ? 1 : 0;
|
|
3151
|
-
}
|
|
3152
|
-
static step1(n) {
|
|
3153
|
-
return n >= 1 ? 1 : 0;
|
|
3154
|
-
}
|
|
3155
|
-
static linear(t) {
|
|
3156
|
-
return t;
|
|
3157
|
-
}
|
|
3158
|
-
static ease(t) {
|
|
3159
|
-
return Easing.bezier(0.42, 0, 1, 1)(t);
|
|
3160
|
-
}
|
|
3161
|
-
static quad(t) {
|
|
3162
|
-
return t * t;
|
|
3163
|
-
}
|
|
3164
|
-
static cubic(t) {
|
|
3165
|
-
return t * t * t;
|
|
3166
|
-
}
|
|
3167
|
-
static poly(n) {
|
|
3168
|
-
return (t) => t ** n;
|
|
3169
|
-
}
|
|
3170
|
-
static sin(t) {
|
|
3171
|
-
return 1 - Math.cos(t * Math.PI / 2);
|
|
3172
|
-
}
|
|
3173
|
-
static circle(t) {
|
|
3174
|
-
const u = clampUnit(t);
|
|
3175
|
-
return 1 - Math.sqrt(1 - u * u);
|
|
3176
|
-
}
|
|
3177
|
-
static exp(t) {
|
|
3178
|
-
return 2 ** (10 * (t - 1));
|
|
3179
|
-
}
|
|
3180
|
-
static elastic(bounciness = 1) {
|
|
3181
|
-
const p = bounciness * Math.PI;
|
|
3182
|
-
return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
|
|
3183
|
-
}
|
|
3184
|
-
static back(s = 1.70158) {
|
|
3185
|
-
return (t) => t * t * ((s + 1) * t - s);
|
|
3186
|
-
}
|
|
3187
|
-
static bounce(t) {
|
|
3188
|
-
const u = clampUnit(t);
|
|
3189
|
-
if (u < 1 / 2.75) {
|
|
3190
|
-
return 7.5625 * u * u;
|
|
3191
|
-
}
|
|
3192
|
-
if (u < 2 / 2.75) {
|
|
3193
|
-
const t2_ = u - 1.5 / 2.75;
|
|
3194
|
-
return 7.5625 * t2_ * t2_ + 0.75;
|
|
3195
|
-
}
|
|
3196
|
-
if (u < 2.5 / 2.75) {
|
|
3197
|
-
const t2_ = u - 2.25 / 2.75;
|
|
3198
|
-
return 7.5625 * t2_ * t2_ + 0.9375;
|
|
3199
|
-
}
|
|
3200
|
-
const t2 = u - 2.625 / 2.75;
|
|
3201
|
-
return 7.5625 * t2 * t2 + 0.984375;
|
|
3202
|
-
}
|
|
3203
|
-
static bezier(x1, y1, x2, y2) {
|
|
3204
|
-
return bezier(x1, y1, x2, y2);
|
|
3205
|
-
}
|
|
3206
|
-
static in(easing) {
|
|
3207
|
-
return easing;
|
|
3208
|
-
}
|
|
3209
|
-
static out(easing) {
|
|
3210
|
-
return (t) => 1 - easing(1 - t);
|
|
3211
|
-
}
|
|
3212
|
-
static inOut(easing) {
|
|
3213
|
-
return (t) => {
|
|
3214
|
-
if (t < 0.5) {
|
|
3215
|
-
return easing(t * 2) / 2;
|
|
3216
|
-
}
|
|
3217
|
-
return 1 - easing((1 - t) * 2) / 2;
|
|
3218
|
-
};
|
|
3219
|
-
}
|
|
3220
|
-
}
|
|
3221
3169
|
var normalizeNumber = (value) => {
|
|
3222
3170
|
return Math.round(value * 1e6) / 1e6;
|
|
3223
3171
|
};
|
|
@@ -3720,128 +3668,478 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
3720
3668
|
checkInfiniteRange("outputRange", outputRange);
|
|
3721
3669
|
return interpolateNumber({ input, inputRange, outputRange, options });
|
|
3722
3670
|
}
|
|
3723
|
-
var
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
}
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
|
|
3731
|
-
}
|
|
3732
|
-
function getMatchers() {
|
|
3733
|
-
const cachedMatchers = {
|
|
3734
|
-
rgb: undefined,
|
|
3735
|
-
rgba: undefined,
|
|
3736
|
-
hsl: undefined,
|
|
3737
|
-
hsla: undefined,
|
|
3738
|
-
hex3: undefined,
|
|
3739
|
-
hex4: undefined,
|
|
3740
|
-
hex5: undefined,
|
|
3741
|
-
hex6: undefined,
|
|
3742
|
-
hex8: undefined,
|
|
3743
|
-
oklch: undefined,
|
|
3744
|
-
oklab: undefined,
|
|
3745
|
-
lab: undefined,
|
|
3746
|
-
lch: undefined,
|
|
3747
|
-
hwb: undefined
|
|
3748
|
-
};
|
|
3749
|
-
if (cachedMatchers.rgb === undefined) {
|
|
3750
|
-
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
|
|
3751
|
-
cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
|
3752
|
-
cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
|
3753
|
-
cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
|
3754
|
-
cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
3755
|
-
cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
3756
|
-
cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
|
|
3757
|
-
cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
|
|
3758
|
-
cachedMatchers.oklch = modernColorCall("oklch");
|
|
3759
|
-
cachedMatchers.oklab = modernColorCall("oklab");
|
|
3760
|
-
cachedMatchers.lab = modernColorCall("lab");
|
|
3761
|
-
cachedMatchers.lch = modernColorCall("lch");
|
|
3762
|
-
cachedMatchers.hwb = modernColorCall("hwb");
|
|
3763
|
-
}
|
|
3764
|
-
return cachedMatchers;
|
|
3765
|
-
}
|
|
3766
|
-
function hue2rgb(p, q, t) {
|
|
3767
|
-
if (t < 0) {
|
|
3768
|
-
t += 1;
|
|
3769
|
-
}
|
|
3770
|
-
if (t > 1) {
|
|
3771
|
-
t -= 1;
|
|
3671
|
+
var validateFrame = ({
|
|
3672
|
+
allowFloats,
|
|
3673
|
+
durationInFrames,
|
|
3674
|
+
frame
|
|
3675
|
+
}) => {
|
|
3676
|
+
if (typeof frame === "undefined") {
|
|
3677
|
+
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
3772
3678
|
}
|
|
3773
|
-
if (
|
|
3774
|
-
|
|
3679
|
+
if (typeof frame !== "number") {
|
|
3680
|
+
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
3775
3681
|
}
|
|
3776
|
-
if (
|
|
3777
|
-
|
|
3682
|
+
if (!Number.isFinite(frame)) {
|
|
3683
|
+
throw new RangeError(`Frame ${frame} is not finite`);
|
|
3778
3684
|
}
|
|
3779
|
-
if (
|
|
3780
|
-
|
|
3685
|
+
if (frame % 1 !== 0 && !allowFloats) {
|
|
3686
|
+
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
3781
3687
|
}
|
|
3782
|
-
|
|
3783
|
-
}
|
|
3784
|
-
function hslToRgb(h, s, l) {
|
|
3785
|
-
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
3786
|
-
const p = 2 * l - q;
|
|
3787
|
-
const r = hue2rgb(p, q, h + 1 / 3);
|
|
3788
|
-
const g = hue2rgb(p, q, h);
|
|
3789
|
-
const b2 = hue2rgb(p, q, h - 1 / 3);
|
|
3790
|
-
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
3791
|
-
}
|
|
3792
|
-
function parse255(str) {
|
|
3793
|
-
const int = Number.parseInt(str, 10);
|
|
3794
|
-
if (int < 0) {
|
|
3795
|
-
return 0;
|
|
3688
|
+
if (frame < 0 && frame < -durationInFrames) {
|
|
3689
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
|
|
3796
3690
|
}
|
|
3797
|
-
if (
|
|
3798
|
-
|
|
3691
|
+
if (frame > durationInFrames - 1) {
|
|
3692
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
3799
3693
|
}
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
return (int % 360 + 360) % 360 / 360;
|
|
3805
|
-
}
|
|
3806
|
-
function parse1(str) {
|
|
3807
|
-
const num = Number.parseFloat(str);
|
|
3808
|
-
if (num < 0) {
|
|
3809
|
-
return 0;
|
|
3694
|
+
};
|
|
3695
|
+
var validateSpringDuration = (dur) => {
|
|
3696
|
+
if (typeof dur === "undefined") {
|
|
3697
|
+
return;
|
|
3810
3698
|
}
|
|
3811
|
-
if (
|
|
3812
|
-
|
|
3699
|
+
if (typeof dur !== "number") {
|
|
3700
|
+
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
|
|
3813
3701
|
}
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
function parsePercentage(str) {
|
|
3817
|
-
const int = Number.parseFloat(str);
|
|
3818
|
-
if (int < 0) {
|
|
3819
|
-
return 0;
|
|
3702
|
+
if (Number.isNaN(dur)) {
|
|
3703
|
+
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
|
|
3820
3704
|
}
|
|
3821
|
-
if (
|
|
3822
|
-
|
|
3705
|
+
if (!Number.isFinite(dur)) {
|
|
3706
|
+
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
|
|
3823
3707
|
}
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
function parseModernComponent(str, percentScale) {
|
|
3827
|
-
if (str === "none")
|
|
3828
|
-
return 0;
|
|
3829
|
-
if (str.endsWith("%")) {
|
|
3830
|
-
return Number.parseFloat(str) / 100 * percentScale;
|
|
3708
|
+
if (dur <= 0) {
|
|
3709
|
+
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
|
|
3831
3710
|
}
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3711
|
+
};
|
|
3712
|
+
var defaultSpringConfig = {
|
|
3713
|
+
damping: 10,
|
|
3714
|
+
mass: 1,
|
|
3715
|
+
stiffness: 100,
|
|
3716
|
+
overshootClamping: false
|
|
3717
|
+
};
|
|
3718
|
+
var advanceCache = {};
|
|
3719
|
+
function advance({
|
|
3720
|
+
animation,
|
|
3721
|
+
now,
|
|
3722
|
+
config
|
|
3723
|
+
}) {
|
|
3724
|
+
const { toValue, lastTimestamp, current, velocity } = animation;
|
|
3725
|
+
const deltaTime = Math.min(now - lastTimestamp, 64);
|
|
3726
|
+
if (config.damping <= 0) {
|
|
3727
|
+
throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
|
|
3839
3728
|
}
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3729
|
+
const c2 = config.damping;
|
|
3730
|
+
const m = config.mass;
|
|
3731
|
+
const k = config.stiffness;
|
|
3732
|
+
const cacheKey = [
|
|
3733
|
+
toValue,
|
|
3734
|
+
lastTimestamp,
|
|
3735
|
+
current,
|
|
3736
|
+
velocity,
|
|
3737
|
+
c2,
|
|
3738
|
+
m,
|
|
3739
|
+
k,
|
|
3740
|
+
now
|
|
3741
|
+
].join("-");
|
|
3742
|
+
if (advanceCache[cacheKey]) {
|
|
3743
|
+
return advanceCache[cacheKey];
|
|
3744
|
+
}
|
|
3745
|
+
const v0 = -velocity;
|
|
3746
|
+
const x0 = toValue - current;
|
|
3747
|
+
const zeta = c2 / (2 * Math.sqrt(k * m));
|
|
3748
|
+
const omega0 = Math.sqrt(k / m);
|
|
3749
|
+
const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
|
|
3750
|
+
const t = deltaTime / 1000;
|
|
3751
|
+
const sin1 = Math.sin(omega1 * t);
|
|
3752
|
+
const cos1 = Math.cos(omega1 * t);
|
|
3753
|
+
const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
|
|
3754
|
+
const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
|
|
3755
|
+
const underDampedPosition = toValue - underDampedFrag1;
|
|
3756
|
+
const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
|
|
3757
|
+
const criticallyDampedEnvelope = Math.exp(-omega0 * t);
|
|
3758
|
+
const criticallyDampedPosition = toValue - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
|
|
3759
|
+
const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
|
|
3760
|
+
const animationNode = {
|
|
3761
|
+
toValue,
|
|
3762
|
+
prevPosition: current,
|
|
3763
|
+
lastTimestamp: now,
|
|
3764
|
+
current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
|
|
3765
|
+
velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
|
|
3766
|
+
};
|
|
3767
|
+
advanceCache[cacheKey] = animationNode;
|
|
3768
|
+
return animationNode;
|
|
3769
|
+
}
|
|
3770
|
+
var calculationCache = {};
|
|
3771
|
+
function springCalculation({
|
|
3772
|
+
frame,
|
|
3773
|
+
fps,
|
|
3774
|
+
config = {}
|
|
3775
|
+
}) {
|
|
3776
|
+
const from = 0;
|
|
3777
|
+
const to = 1;
|
|
3778
|
+
const cacheKey = [
|
|
3779
|
+
frame,
|
|
3780
|
+
fps,
|
|
3781
|
+
config.damping,
|
|
3782
|
+
config.mass,
|
|
3783
|
+
config.overshootClamping,
|
|
3784
|
+
config.stiffness
|
|
3785
|
+
].join("-");
|
|
3786
|
+
if (calculationCache[cacheKey]) {
|
|
3787
|
+
return calculationCache[cacheKey];
|
|
3788
|
+
}
|
|
3789
|
+
let animation = {
|
|
3790
|
+
lastTimestamp: 0,
|
|
3791
|
+
current: from,
|
|
3792
|
+
toValue: to,
|
|
3793
|
+
velocity: 0,
|
|
3794
|
+
prevPosition: 0
|
|
3795
|
+
};
|
|
3796
|
+
const frameClamped = Math.max(0, frame);
|
|
3797
|
+
const unevenRest = frameClamped % 1;
|
|
3798
|
+
for (let f = 0;f <= Math.floor(frameClamped); f++) {
|
|
3799
|
+
if (f === Math.floor(frameClamped)) {
|
|
3800
|
+
f += unevenRest;
|
|
3801
|
+
}
|
|
3802
|
+
const time = f / fps * 1000;
|
|
3803
|
+
animation = advance({
|
|
3804
|
+
animation,
|
|
3805
|
+
now: time,
|
|
3806
|
+
config: {
|
|
3807
|
+
...defaultSpringConfig,
|
|
3808
|
+
...config
|
|
3809
|
+
}
|
|
3810
|
+
});
|
|
3811
|
+
}
|
|
3812
|
+
calculationCache[cacheKey] = animation;
|
|
3813
|
+
return animation;
|
|
3814
|
+
}
|
|
3815
|
+
var cache = new Map;
|
|
3816
|
+
function measureSpring({
|
|
3817
|
+
fps,
|
|
3818
|
+
config = {},
|
|
3819
|
+
threshold = 0.005
|
|
3820
|
+
}) {
|
|
3821
|
+
if (typeof threshold !== "number") {
|
|
3822
|
+
throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
|
|
3823
|
+
}
|
|
3824
|
+
if (threshold === 0) {
|
|
3825
|
+
return Infinity;
|
|
3826
|
+
}
|
|
3827
|
+
if (threshold === 1) {
|
|
3828
|
+
return 0;
|
|
3829
|
+
}
|
|
3830
|
+
if (isNaN(threshold)) {
|
|
3831
|
+
throw new TypeError("Threshold is NaN");
|
|
3832
|
+
}
|
|
3833
|
+
if (!Number.isFinite(threshold)) {
|
|
3834
|
+
throw new TypeError("Threshold is not finite");
|
|
3835
|
+
}
|
|
3836
|
+
if (threshold < 0) {
|
|
3837
|
+
throw new TypeError("Threshold is below 0");
|
|
3838
|
+
}
|
|
3839
|
+
const cacheKey = [
|
|
3840
|
+
fps,
|
|
3841
|
+
config.damping,
|
|
3842
|
+
config.mass,
|
|
3843
|
+
config.overshootClamping,
|
|
3844
|
+
config.stiffness,
|
|
3845
|
+
threshold
|
|
3846
|
+
].join("-");
|
|
3847
|
+
if (cache.has(cacheKey)) {
|
|
3848
|
+
return cache.get(cacheKey);
|
|
3849
|
+
}
|
|
3850
|
+
validateFps(fps, "to the measureSpring() function", false);
|
|
3851
|
+
let frame = 0;
|
|
3852
|
+
let finishedFrame = 0;
|
|
3853
|
+
const calc = () => {
|
|
3854
|
+
return springCalculation({
|
|
3855
|
+
fps,
|
|
3856
|
+
frame,
|
|
3857
|
+
config
|
|
3858
|
+
});
|
|
3859
|
+
};
|
|
3860
|
+
let animation = calc();
|
|
3861
|
+
const calcDifference = () => {
|
|
3862
|
+
return Math.abs(animation.current - animation.toValue);
|
|
3863
|
+
};
|
|
3864
|
+
let difference = calcDifference();
|
|
3865
|
+
while (difference >= threshold) {
|
|
3866
|
+
frame++;
|
|
3867
|
+
animation = calc();
|
|
3868
|
+
difference = calcDifference();
|
|
3869
|
+
}
|
|
3870
|
+
finishedFrame = frame;
|
|
3871
|
+
for (let i = 0;i < 20; i++) {
|
|
3872
|
+
frame++;
|
|
3873
|
+
animation = calc();
|
|
3874
|
+
difference = calcDifference();
|
|
3875
|
+
if (difference >= threshold) {
|
|
3876
|
+
i = 0;
|
|
3877
|
+
finishedFrame = frame + 1;
|
|
3878
|
+
}
|
|
3879
|
+
}
|
|
3880
|
+
cache.set(cacheKey, finishedFrame);
|
|
3881
|
+
return finishedFrame;
|
|
3882
|
+
}
|
|
3883
|
+
function spring({
|
|
3884
|
+
frame: passedFrame,
|
|
3885
|
+
fps,
|
|
3886
|
+
config = {},
|
|
3887
|
+
from = 0,
|
|
3888
|
+
to = 1,
|
|
3889
|
+
durationInFrames: passedDurationInFrames,
|
|
3890
|
+
durationRestThreshold,
|
|
3891
|
+
delay = 0,
|
|
3892
|
+
reverse = false
|
|
3893
|
+
}) {
|
|
3894
|
+
validateSpringDuration(passedDurationInFrames);
|
|
3895
|
+
validateFrame({
|
|
3896
|
+
frame: passedFrame,
|
|
3897
|
+
durationInFrames: Infinity,
|
|
3898
|
+
allowFloats: true
|
|
3899
|
+
});
|
|
3900
|
+
validateFps(fps, "to spring()", false);
|
|
3901
|
+
const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
|
|
3902
|
+
const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
|
|
3903
|
+
fps,
|
|
3904
|
+
config,
|
|
3905
|
+
threshold: durationRestThreshold
|
|
3906
|
+
}) : undefined;
|
|
3907
|
+
const naturalDurationGetter = needsToCalculateNaturalDuration ? {
|
|
3908
|
+
get: () => naturalDuration
|
|
3909
|
+
} : {
|
|
3910
|
+
get: () => {
|
|
3911
|
+
throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
|
|
3912
|
+
}
|
|
3913
|
+
};
|
|
3914
|
+
const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
|
|
3915
|
+
const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
|
|
3916
|
+
const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
|
|
3917
|
+
if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
|
|
3918
|
+
return to;
|
|
3919
|
+
}
|
|
3920
|
+
const spr = springCalculation({
|
|
3921
|
+
fps,
|
|
3922
|
+
frame: durationProcessed,
|
|
3923
|
+
config
|
|
3924
|
+
});
|
|
3925
|
+
const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
|
|
3926
|
+
const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
|
|
3927
|
+
return interpolated;
|
|
3928
|
+
}
|
|
3929
|
+
var clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
3930
|
+
var springEasingDurationInFrames = 30;
|
|
3931
|
+
|
|
3932
|
+
class Easing {
|
|
3933
|
+
static step0(n) {
|
|
3934
|
+
return n > 0 ? 1 : 0;
|
|
3935
|
+
}
|
|
3936
|
+
static step1(n) {
|
|
3937
|
+
return n >= 1 ? 1 : 0;
|
|
3938
|
+
}
|
|
3939
|
+
static linear(t) {
|
|
3940
|
+
return t;
|
|
3941
|
+
}
|
|
3942
|
+
static ease(t) {
|
|
3943
|
+
return Easing.bezier(0.42, 0, 1, 1)(t);
|
|
3944
|
+
}
|
|
3945
|
+
static quad(t) {
|
|
3946
|
+
return t * t;
|
|
3947
|
+
}
|
|
3948
|
+
static cubic(t) {
|
|
3949
|
+
return t * t * t;
|
|
3950
|
+
}
|
|
3951
|
+
static poly(n) {
|
|
3952
|
+
return (t) => t ** n;
|
|
3953
|
+
}
|
|
3954
|
+
static sin(t) {
|
|
3955
|
+
return 1 - Math.cos(t * Math.PI / 2);
|
|
3956
|
+
}
|
|
3957
|
+
static circle(t) {
|
|
3958
|
+
const u = clampUnit(t);
|
|
3959
|
+
return 1 - Math.sqrt(1 - u * u);
|
|
3960
|
+
}
|
|
3961
|
+
static exp(t) {
|
|
3962
|
+
return 2 ** (10 * (t - 1));
|
|
3963
|
+
}
|
|
3964
|
+
static elastic(bounciness = 1) {
|
|
3965
|
+
const p = bounciness * Math.PI;
|
|
3966
|
+
return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
|
|
3967
|
+
}
|
|
3968
|
+
static back(s = 1.70158) {
|
|
3969
|
+
return (t) => t * t * ((s + 1) * t - s);
|
|
3970
|
+
}
|
|
3971
|
+
static spring(config = {}) {
|
|
3972
|
+
return (t) => {
|
|
3973
|
+
if (t <= 0) {
|
|
3974
|
+
return 0;
|
|
3975
|
+
}
|
|
3976
|
+
if (t >= 1) {
|
|
3977
|
+
return 1;
|
|
3978
|
+
}
|
|
3979
|
+
return spring({
|
|
3980
|
+
fps: springEasingDurationInFrames,
|
|
3981
|
+
frame: t * springEasingDurationInFrames,
|
|
3982
|
+
config,
|
|
3983
|
+
durationInFrames: springEasingDurationInFrames
|
|
3984
|
+
});
|
|
3985
|
+
};
|
|
3986
|
+
}
|
|
3987
|
+
static bounce(t) {
|
|
3988
|
+
const u = clampUnit(t);
|
|
3989
|
+
if (u < 1 / 2.75) {
|
|
3990
|
+
return 7.5625 * u * u;
|
|
3991
|
+
}
|
|
3992
|
+
if (u < 2 / 2.75) {
|
|
3993
|
+
const t2_ = u - 1.5 / 2.75;
|
|
3994
|
+
return 7.5625 * t2_ * t2_ + 0.75;
|
|
3995
|
+
}
|
|
3996
|
+
if (u < 2.5 / 2.75) {
|
|
3997
|
+
const t2_ = u - 2.25 / 2.75;
|
|
3998
|
+
return 7.5625 * t2_ * t2_ + 0.9375;
|
|
3999
|
+
}
|
|
4000
|
+
const t2 = u - 2.625 / 2.75;
|
|
4001
|
+
return 7.5625 * t2 * t2 + 0.984375;
|
|
4002
|
+
}
|
|
4003
|
+
static bezier(x1, y1, x2, y2) {
|
|
4004
|
+
return bezier(x1, y1, x2, y2);
|
|
4005
|
+
}
|
|
4006
|
+
static in(easing) {
|
|
4007
|
+
return easing;
|
|
4008
|
+
}
|
|
4009
|
+
static out(easing) {
|
|
4010
|
+
return (t) => 1 - easing(1 - t);
|
|
4011
|
+
}
|
|
4012
|
+
static inOut(easing) {
|
|
4013
|
+
return (t) => {
|
|
4014
|
+
if (t < 0.5) {
|
|
4015
|
+
return easing(t * 2) / 2;
|
|
4016
|
+
}
|
|
4017
|
+
return 1 - easing((1 - t) * 2) / 2;
|
|
4018
|
+
};
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
4022
|
+
var PERCENTAGE = NUMBER + "%";
|
|
4023
|
+
function call(...args) {
|
|
4024
|
+
return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
|
|
4025
|
+
}
|
|
4026
|
+
var MODERN_VALUE = "(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";
|
|
4027
|
+
function modernColorCall(name) {
|
|
4028
|
+
return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
|
|
4029
|
+
}
|
|
4030
|
+
function getMatchers() {
|
|
4031
|
+
const cachedMatchers = {
|
|
4032
|
+
rgb: undefined,
|
|
4033
|
+
rgba: undefined,
|
|
4034
|
+
hsl: undefined,
|
|
4035
|
+
hsla: undefined,
|
|
4036
|
+
hex3: undefined,
|
|
4037
|
+
hex4: undefined,
|
|
4038
|
+
hex5: undefined,
|
|
4039
|
+
hex6: undefined,
|
|
4040
|
+
hex8: undefined,
|
|
4041
|
+
oklch: undefined,
|
|
4042
|
+
oklab: undefined,
|
|
4043
|
+
lab: undefined,
|
|
4044
|
+
lch: undefined,
|
|
4045
|
+
hwb: undefined
|
|
4046
|
+
};
|
|
4047
|
+
if (cachedMatchers.rgb === undefined) {
|
|
4048
|
+
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
|
|
4049
|
+
cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
|
4050
|
+
cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
|
4051
|
+
cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
|
4052
|
+
cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
4053
|
+
cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
4054
|
+
cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
|
|
4055
|
+
cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
|
|
4056
|
+
cachedMatchers.oklch = modernColorCall("oklch");
|
|
4057
|
+
cachedMatchers.oklab = modernColorCall("oklab");
|
|
4058
|
+
cachedMatchers.lab = modernColorCall("lab");
|
|
4059
|
+
cachedMatchers.lch = modernColorCall("lch");
|
|
4060
|
+
cachedMatchers.hwb = modernColorCall("hwb");
|
|
4061
|
+
}
|
|
4062
|
+
return cachedMatchers;
|
|
4063
|
+
}
|
|
4064
|
+
function hue2rgb(p, q, t) {
|
|
4065
|
+
if (t < 0) {
|
|
4066
|
+
t += 1;
|
|
4067
|
+
}
|
|
4068
|
+
if (t > 1) {
|
|
4069
|
+
t -= 1;
|
|
4070
|
+
}
|
|
4071
|
+
if (t < 1 / 6) {
|
|
4072
|
+
return p + (q - p) * 6 * t;
|
|
4073
|
+
}
|
|
4074
|
+
if (t < 1 / 2) {
|
|
4075
|
+
return q;
|
|
4076
|
+
}
|
|
4077
|
+
if (t < 2 / 3) {
|
|
4078
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
4079
|
+
}
|
|
4080
|
+
return p;
|
|
4081
|
+
}
|
|
4082
|
+
function hslToRgb(h, s, l) {
|
|
4083
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
4084
|
+
const p = 2 * l - q;
|
|
4085
|
+
const r = hue2rgb(p, q, h + 1 / 3);
|
|
4086
|
+
const g = hue2rgb(p, q, h);
|
|
4087
|
+
const b2 = hue2rgb(p, q, h - 1 / 3);
|
|
4088
|
+
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
4089
|
+
}
|
|
4090
|
+
function parse255(str) {
|
|
4091
|
+
const int = Number.parseInt(str, 10);
|
|
4092
|
+
if (int < 0) {
|
|
4093
|
+
return 0;
|
|
4094
|
+
}
|
|
4095
|
+
if (int > 255) {
|
|
4096
|
+
return 255;
|
|
4097
|
+
}
|
|
4098
|
+
return int;
|
|
4099
|
+
}
|
|
4100
|
+
function parse360(str) {
|
|
4101
|
+
const int = Number.parseFloat(str);
|
|
4102
|
+
return (int % 360 + 360) % 360 / 360;
|
|
4103
|
+
}
|
|
4104
|
+
function parse1(str) {
|
|
4105
|
+
const num = Number.parseFloat(str);
|
|
4106
|
+
if (num < 0) {
|
|
4107
|
+
return 0;
|
|
4108
|
+
}
|
|
4109
|
+
if (num > 1) {
|
|
4110
|
+
return 255;
|
|
4111
|
+
}
|
|
4112
|
+
return Math.round(num * 255);
|
|
4113
|
+
}
|
|
4114
|
+
function parsePercentage(str) {
|
|
4115
|
+
const int = Number.parseFloat(str);
|
|
4116
|
+
if (int < 0) {
|
|
4117
|
+
return 0;
|
|
4118
|
+
}
|
|
4119
|
+
if (int > 100) {
|
|
4120
|
+
return 1;
|
|
4121
|
+
}
|
|
4122
|
+
return int / 100;
|
|
4123
|
+
}
|
|
4124
|
+
function parseModernComponent(str, percentScale) {
|
|
4125
|
+
if (str === "none")
|
|
4126
|
+
return 0;
|
|
4127
|
+
if (str.endsWith("%")) {
|
|
4128
|
+
return Number.parseFloat(str) / 100 * percentScale;
|
|
4129
|
+
}
|
|
4130
|
+
return Number.parseFloat(str);
|
|
4131
|
+
}
|
|
4132
|
+
function parseHueAngle(str) {
|
|
4133
|
+
if (str === "none")
|
|
4134
|
+
return 0;
|
|
4135
|
+
if (str.endsWith("rad")) {
|
|
4136
|
+
return Number.parseFloat(str) * 180 / Math.PI;
|
|
4137
|
+
}
|
|
4138
|
+
if (str.endsWith("grad"))
|
|
4139
|
+
return Number.parseFloat(str) * 0.9;
|
|
4140
|
+
if (str.endsWith("turn"))
|
|
4141
|
+
return Number.parseFloat(str) * 360;
|
|
4142
|
+
return Number.parseFloat(str);
|
|
3845
4143
|
}
|
|
3846
4144
|
function parseModernAlpha(str) {
|
|
3847
4145
|
if (str === undefined || str === "none")
|
|
@@ -4713,10 +5011,12 @@ var mergeValues = ({
|
|
|
4713
5011
|
var stackToOverrideMap = {};
|
|
4714
5012
|
var wrapInSchema = ({
|
|
4715
5013
|
Component,
|
|
5014
|
+
componentIdentity,
|
|
4716
5015
|
schema,
|
|
4717
5016
|
supportsEffects
|
|
4718
5017
|
}) => {
|
|
4719
|
-
const
|
|
5018
|
+
const schemaWithSequenceName = extendSchemaWithSequenceName(schema);
|
|
5019
|
+
const flatSchema = getFlatSchemaWithAllKeys(schemaWithSequenceName);
|
|
4720
5020
|
const flatKeys = Object.keys(flatSchema);
|
|
4721
5021
|
const Wrapped = forwardRef2((props, ref) => {
|
|
4722
5022
|
const env = useRemotionEnvironment();
|
|
@@ -4755,15 +5055,16 @@ var wrapInSchema = ({
|
|
|
4755
5055
|
const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
4756
5056
|
const controls = useMemo13(() => {
|
|
4757
5057
|
return {
|
|
4758
|
-
schema,
|
|
5058
|
+
schema: schemaWithSequenceName,
|
|
4759
5059
|
currentRuntimeValueDotNotation,
|
|
4760
5060
|
overrideId,
|
|
4761
|
-
supportsEffects
|
|
5061
|
+
supportsEffects,
|
|
5062
|
+
componentIdentity
|
|
4762
5063
|
};
|
|
4763
5064
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
4764
5065
|
const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
|
|
4765
5066
|
return computeEffectiveSchemaValuesDotNotation({
|
|
4766
|
-
schema,
|
|
5067
|
+
schema: schemaWithSequenceName,
|
|
4767
5068
|
currentValue: currentRuntimeValueDotNotation,
|
|
4768
5069
|
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
4769
5070
|
propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses, nodePath),
|
|
@@ -4776,7 +5077,7 @@ var wrapInSchema = ({
|
|
|
4776
5077
|
propStatuses,
|
|
4777
5078
|
frame
|
|
4778
5079
|
]);
|
|
4779
|
-
const activeKeys = selectActiveKeys(
|
|
5080
|
+
const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
|
|
4780
5081
|
const mergedProps = mergeValues({
|
|
4781
5082
|
props,
|
|
4782
5083
|
valuesDotNotation,
|
|
@@ -4795,6 +5096,7 @@ var wrapInSchema = ({
|
|
|
4795
5096
|
var EMPTY_EFFECTS = [];
|
|
4796
5097
|
var RegularSequenceRefForwardingFunction = ({
|
|
4797
5098
|
from = 0,
|
|
5099
|
+
freeze,
|
|
4798
5100
|
durationInFrames = Infinity,
|
|
4799
5101
|
children,
|
|
4800
5102
|
name,
|
|
@@ -4810,7 +5112,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4810
5112
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
4811
5113
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
4812
5114
|
_remotionInternalIsMedia: isMedia,
|
|
4813
|
-
_remotionInternalRefForOutline:
|
|
5115
|
+
_remotionInternalRefForOutline: passedRefForOutline,
|
|
4814
5116
|
...other
|
|
4815
5117
|
}, ref) => {
|
|
4816
5118
|
const { layout = "absolute-fill" } = other;
|
|
@@ -4818,6 +5120,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4818
5120
|
const parentSequence = useContext17(SequenceContext);
|
|
4819
5121
|
const { rootId } = useTimelineContext();
|
|
4820
5122
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
5123
|
+
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + from;
|
|
4821
5124
|
const nonce = useNonce();
|
|
4822
5125
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
4823
5126
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
@@ -4837,11 +5140,24 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4837
5140
|
if (!Number.isFinite(from)) {
|
|
4838
5141
|
throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
|
|
4839
5142
|
}
|
|
5143
|
+
if (typeof freeze !== "undefined" && freeze !== null) {
|
|
5144
|
+
if (typeof freeze !== "number") {
|
|
5145
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`);
|
|
5146
|
+
}
|
|
5147
|
+
if (Number.isNaN(freeze)) {
|
|
5148
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a real number, but it is NaN.`);
|
|
5149
|
+
}
|
|
5150
|
+
if (!Number.isFinite(freeze)) {
|
|
5151
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be finite, but it is ${freeze}.`);
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
4840
5154
|
const absoluteFrame = useTimelinePosition();
|
|
4841
5155
|
const videoConfig = useVideoConfig();
|
|
4842
5156
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
4843
5157
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
4844
5158
|
const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
|
|
5159
|
+
const wrapperRefForOutline = useRef6(null);
|
|
5160
|
+
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
4845
5161
|
const premounting = useMemo14(() => {
|
|
4846
5162
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
4847
5163
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
@@ -4855,6 +5171,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4855
5171
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
4856
5172
|
const contextValue = useMemo14(() => {
|
|
4857
5173
|
return {
|
|
5174
|
+
absoluteFrom,
|
|
4858
5175
|
cumulatedFrom,
|
|
4859
5176
|
relativeFrom: from,
|
|
4860
5177
|
cumulatedNegativeFrom,
|
|
@@ -4870,6 +5187,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4870
5187
|
};
|
|
4871
5188
|
}, [
|
|
4872
5189
|
cumulatedFrom,
|
|
5190
|
+
absoluteFrom,
|
|
4873
5191
|
from,
|
|
4874
5192
|
actualDurationInFrames,
|
|
4875
5193
|
parentSequence,
|
|
@@ -4885,7 +5203,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4885
5203
|
const timelineClipName = useMemo14(() => {
|
|
4886
5204
|
return name ?? "";
|
|
4887
5205
|
}, [name]);
|
|
4888
|
-
const resolvedDocumentationLink = documentationLink ??
|
|
5206
|
+
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
4889
5207
|
const env = useRemotionEnvironment();
|
|
4890
5208
|
const isInsideSeries = useContext17(IsInsideSeriesContext);
|
|
4891
5209
|
const inheritedStack = other?.stack ?? null;
|
|
@@ -4998,7 +5316,19 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4998
5316
|
]);
|
|
4999
5317
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
5000
5318
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
5319
|
+
const frozenContent = content === null || typeof freeze === "undefined" || freeze === null ? content : /* @__PURE__ */ jsx12(Freeze, {
|
|
5320
|
+
frame: freeze,
|
|
5321
|
+
children: content
|
|
5322
|
+
});
|
|
5001
5323
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
5324
|
+
const sequenceRef = useCallback6((node) => {
|
|
5325
|
+
wrapperRefForOutline.current = node;
|
|
5326
|
+
if (typeof ref === "function") {
|
|
5327
|
+
ref(node);
|
|
5328
|
+
} else if (ref) {
|
|
5329
|
+
ref.current = node;
|
|
5330
|
+
}
|
|
5331
|
+
}, [ref]);
|
|
5002
5332
|
const defaultStyle = useMemo14(() => {
|
|
5003
5333
|
return {
|
|
5004
5334
|
flexDirection: undefined,
|
|
@@ -5015,11 +5345,11 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5015
5345
|
}
|
|
5016
5346
|
return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
|
|
5017
5347
|
value: contextValue,
|
|
5018
|
-
children:
|
|
5019
|
-
ref,
|
|
5348
|
+
children: frozenContent === null ? null : other.layout === "none" ? frozenContent : /* @__PURE__ */ jsx12(AbsoluteFill, {
|
|
5349
|
+
ref: sequenceRef,
|
|
5020
5350
|
style: defaultStyle,
|
|
5021
5351
|
className: other.className,
|
|
5022
|
-
children:
|
|
5352
|
+
children: frozenContent
|
|
5023
5353
|
})
|
|
5024
5354
|
});
|
|
5025
5355
|
};
|
|
@@ -5099,11 +5429,13 @@ var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
|
5099
5429
|
var SequenceWithoutSchema = SequenceInner;
|
|
5100
5430
|
var Sequence = wrapInSchema({
|
|
5101
5431
|
Component: SequenceInner,
|
|
5432
|
+
componentIdentity: "dev.remotion.remotion.Sequence",
|
|
5102
5433
|
schema: sequenceSchema,
|
|
5103
5434
|
supportsEffects: false
|
|
5104
5435
|
});
|
|
5105
5436
|
var SequenceWithoutFrom = wrapInSchema({
|
|
5106
5437
|
Component: SequenceInner,
|
|
5438
|
+
componentIdentity: null,
|
|
5107
5439
|
schema: sequenceSchemaWithoutFrom,
|
|
5108
5440
|
supportsEffects: false
|
|
5109
5441
|
});
|
|
@@ -5421,7 +5753,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
5421
5753
|
}
|
|
5422
5754
|
return document.createElement("canvas");
|
|
5423
5755
|
}, []);
|
|
5424
|
-
const draw =
|
|
5756
|
+
const draw = useCallback7((imageData) => {
|
|
5425
5757
|
const canvas = canvasRef.current;
|
|
5426
5758
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
5427
5759
|
const canvasHeight = height ?? imageData.displayHeight;
|
|
@@ -5512,10 +5844,10 @@ var decodeImage = async ({
|
|
|
5512
5844
|
if (!selectedTrack) {
|
|
5513
5845
|
throw new Error("No selected track");
|
|
5514
5846
|
}
|
|
5515
|
-
const
|
|
5847
|
+
const cache2 = [];
|
|
5516
5848
|
let durationFound = null;
|
|
5517
5849
|
const getFrameByIndex = async (frameIndex) => {
|
|
5518
|
-
const foundInCache =
|
|
5850
|
+
const foundInCache = cache2.find((c2) => c2.frameIndex === frameIndex);
|
|
5519
5851
|
if (foundInCache && foundInCache.frame) {
|
|
5520
5852
|
return foundInCache;
|
|
5521
5853
|
}
|
|
@@ -5526,7 +5858,7 @@ var decodeImage = async ({
|
|
|
5526
5858
|
if (foundInCache) {
|
|
5527
5859
|
foundInCache.frame = frame.image;
|
|
5528
5860
|
} else {
|
|
5529
|
-
|
|
5861
|
+
cache2.push({
|
|
5530
5862
|
frame: frame.image,
|
|
5531
5863
|
frameIndex,
|
|
5532
5864
|
timeInSeconds: frame.image.timestamp / 1e6
|
|
@@ -5539,7 +5871,7 @@ var decodeImage = async ({
|
|
|
5539
5871
|
};
|
|
5540
5872
|
};
|
|
5541
5873
|
const clearCache = (closeToTimeInSec) => {
|
|
5542
|
-
const itemsInCache =
|
|
5874
|
+
const itemsInCache = cache2.filter((c2) => c2.frame);
|
|
5543
5875
|
const sortByClosestToCurrentTime = itemsInCache.sort((a2, b2) => {
|
|
5544
5876
|
const aDiff = Math.abs(a2.timeInSeconds - closeToTimeInSec);
|
|
5545
5877
|
const bDiff = Math.abs(b2.timeInSeconds - closeToTimeInSec);
|
|
@@ -5562,7 +5894,7 @@ var decodeImage = async ({
|
|
|
5562
5894
|
loopBehavior,
|
|
5563
5895
|
timeInSec
|
|
5564
5896
|
});
|
|
5565
|
-
const framesBefore =
|
|
5897
|
+
const framesBefore = cache2.filter((c2) => c2.timeInSeconds <= actualTimeInSec);
|
|
5566
5898
|
const biggestIndex = framesBefore.map((c2) => c2.frameIndex).reduce((a2, b2) => Math.max(a2, b2), 0);
|
|
5567
5899
|
let i = biggestIndex;
|
|
5568
5900
|
while (true) {
|
|
@@ -5605,7 +5937,7 @@ var decodeImage = async ({
|
|
|
5605
5937
|
timeInSec
|
|
5606
5938
|
});
|
|
5607
5939
|
await ensureFrameBeforeAndAfter({ timeInSec: actualTimeInSec, loopBehavior });
|
|
5608
|
-
const itemsInCache =
|
|
5940
|
+
const itemsInCache = cache2.filter((c2) => c2.frame);
|
|
5609
5941
|
const closest = itemsInCache.reduce((a2, b2) => {
|
|
5610
5942
|
const aDiff = Math.abs(a2.timeInSeconds - actualTimeInSec);
|
|
5611
5943
|
const bDiff = Math.abs(b2.timeInSeconds - actualTimeInSec);
|
|
@@ -5642,6 +5974,7 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
5642
5974
|
var animatedImageSchema = {
|
|
5643
5975
|
durationInFrames: durationInFramesField,
|
|
5644
5976
|
from: fromField,
|
|
5977
|
+
freeze: freezeField,
|
|
5645
5978
|
playbackRate: {
|
|
5646
5979
|
type: "number",
|
|
5647
5980
|
min: 0,
|
|
@@ -5841,6 +6174,7 @@ var AnimatedImageInner = ({
|
|
|
5841
6174
|
};
|
|
5842
6175
|
var AnimatedImage = wrapInSchema({
|
|
5843
6176
|
Component: AnimatedImageInner,
|
|
6177
|
+
componentIdentity: "dev.remotion.remotion.AnimatedImage",
|
|
5844
6178
|
schema: animatedImageSchema,
|
|
5845
6179
|
supportsEffects: true
|
|
5846
6180
|
});
|
|
@@ -5887,7 +6221,7 @@ var RenderAssetManager = createContext17({
|
|
|
5887
6221
|
var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
5888
6222
|
const [renderAssets, setRenderAssets] = useState7([]);
|
|
5889
6223
|
const renderAssetsRef = useRef10([]);
|
|
5890
|
-
const registerRenderAsset =
|
|
6224
|
+
const registerRenderAsset = useCallback8((renderAsset) => {
|
|
5891
6225
|
validateRenderAsset(renderAsset);
|
|
5892
6226
|
renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
|
|
5893
6227
|
setRenderAssets(renderAssetsRef.current);
|
|
@@ -5904,7 +6238,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
5904
6238
|
};
|
|
5905
6239
|
}, []);
|
|
5906
6240
|
}
|
|
5907
|
-
const unregisterRenderAsset =
|
|
6241
|
+
const unregisterRenderAsset = useCallback8((id) => {
|
|
5908
6242
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
5909
6243
|
setRenderAssets(renderAssetsRef.current);
|
|
5910
6244
|
}, []);
|
|
@@ -6066,7 +6400,7 @@ var Loop = ({
|
|
|
6066
6400
|
durationInFrames,
|
|
6067
6401
|
from,
|
|
6068
6402
|
name: name ?? "<Loop>",
|
|
6069
|
-
_remotionInternalDocumentationLink:
|
|
6403
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/loop",
|
|
6070
6404
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
6071
6405
|
layout: props.layout,
|
|
6072
6406
|
style,
|
|
@@ -6709,7 +7043,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
6709
7043
|
}, []);
|
|
6710
7044
|
const prevEndTimes = useRef12({ scheduledEndTime: null, mediaEndTime: null });
|
|
6711
7045
|
const nodesToResume = useRef12(new Map);
|
|
6712
|
-
const unscheduleAudioNode =
|
|
7046
|
+
const unscheduleAudioNode = useCallback9((node) => {
|
|
6713
7047
|
nodesToResume.current.delete(node);
|
|
6714
7048
|
}, []);
|
|
6715
7049
|
const scheduleAudioNode = useMemo21(() => {
|
|
@@ -6763,7 +7097,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
6763
7097
|
};
|
|
6764
7098
|
};
|
|
6765
7099
|
}, [ctxAndGain, logLevel]);
|
|
6766
|
-
const resume =
|
|
7100
|
+
const resume = useCallback9(() => {
|
|
6767
7101
|
if (!ctxAndGain) {
|
|
6768
7102
|
return Promise.resolve();
|
|
6769
7103
|
}
|
|
@@ -6790,10 +7124,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
6790
7124
|
});
|
|
6791
7125
|
return resumePromise.catch(() => {});
|
|
6792
7126
|
}, [ctxAndGain, logLevel]);
|
|
6793
|
-
const getIsResumingAudioContext =
|
|
7127
|
+
const getIsResumingAudioContext = useCallback9(() => {
|
|
6794
7128
|
return isResuming.current;
|
|
6795
7129
|
}, []);
|
|
6796
|
-
const suspend =
|
|
7130
|
+
const suspend = useCallback9(() => {
|
|
6797
7131
|
if (!ctxAndGain) {
|
|
6798
7132
|
return Promise.resolve();
|
|
6799
7133
|
}
|
|
@@ -6867,7 +7201,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
6867
7201
|
};
|
|
6868
7202
|
}, [refs]);
|
|
6869
7203
|
const takenAudios = useRef12(new Array(numberOfAudioTags).fill(false));
|
|
6870
|
-
const rerenderAudios =
|
|
7204
|
+
const rerenderAudios = useCallback9(() => {
|
|
6871
7205
|
refs.forEach(({ ref, id }) => {
|
|
6872
7206
|
const data = audios.current?.find((a2) => a2.id === id);
|
|
6873
7207
|
const { current } = ref;
|
|
@@ -6888,7 +7222,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
6888
7222
|
});
|
|
6889
7223
|
});
|
|
6890
7224
|
}, [refs]);
|
|
6891
|
-
const registerAudio =
|
|
7225
|
+
const registerAudio = useCallback9((options) => {
|
|
6892
7226
|
const { aud, audioId, premounting, postmounting } = options;
|
|
6893
7227
|
const found = audios.current?.find((a2) => a2.audioId === audioId);
|
|
6894
7228
|
if (found) {
|
|
@@ -6917,7 +7251,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
6917
7251
|
rerenderAudios();
|
|
6918
7252
|
return newElem;
|
|
6919
7253
|
}, [numberOfAudioTags, refs, rerenderAudios]);
|
|
6920
|
-
const unregisterAudio =
|
|
7254
|
+
const unregisterAudio = useCallback9((id) => {
|
|
6921
7255
|
const cloned = [...takenAudios.current];
|
|
6922
7256
|
const index = refs.findIndex((r) => r.id === id);
|
|
6923
7257
|
if (index === -1) {
|
|
@@ -6928,7 +7262,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
6928
7262
|
audios.current = audios.current?.filter((a2) => a2.id !== id);
|
|
6929
7263
|
rerenderAudios();
|
|
6930
7264
|
}, [refs, rerenderAudios]);
|
|
6931
|
-
const updateAudio =
|
|
7265
|
+
const updateAudio = useCallback9(({
|
|
6932
7266
|
aud,
|
|
6933
7267
|
audioId,
|
|
6934
7268
|
id,
|
|
@@ -6962,7 +7296,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
6962
7296
|
rerenderAudios();
|
|
6963
7297
|
}
|
|
6964
7298
|
}, [rerenderAudios]);
|
|
6965
|
-
const playAllAudios =
|
|
7299
|
+
const playAllAudios = useCallback9(() => {
|
|
6966
7300
|
refs.forEach((ref) => {
|
|
6967
7301
|
const audio = audios.current.find((a2) => a2.el === ref.ref);
|
|
6968
7302
|
if (audio?.premounting) {
|
|
@@ -7510,7 +7844,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7510
7844
|
const env = useRemotionEnvironment();
|
|
7511
7845
|
const rendering = env.isRendering;
|
|
7512
7846
|
const buffering = useRef15(false);
|
|
7513
|
-
const addBlock =
|
|
7847
|
+
const addBlock = useCallback10((block) => {
|
|
7514
7848
|
if (rendering) {
|
|
7515
7849
|
return {
|
|
7516
7850
|
unblock: () => {
|
|
@@ -7536,7 +7870,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7536
7870
|
}
|
|
7537
7871
|
};
|
|
7538
7872
|
}, [rendering]);
|
|
7539
|
-
const listenForBuffering =
|
|
7873
|
+
const listenForBuffering = useCallback10((callback) => {
|
|
7540
7874
|
setOnBufferingCallbacks((c2) => [...c2, callback]);
|
|
7541
7875
|
return {
|
|
7542
7876
|
remove: () => {
|
|
@@ -7544,7 +7878,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7544
7878
|
}
|
|
7545
7879
|
};
|
|
7546
7880
|
}, []);
|
|
7547
|
-
const listenForResume =
|
|
7881
|
+
const listenForResume = useCallback10((callback) => {
|
|
7548
7882
|
setOnResumeCallbacks((c2) => [...c2, callback]);
|
|
7549
7883
|
return {
|
|
7550
7884
|
remove: () => {
|
|
@@ -7658,7 +7992,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
7658
7992
|
}) => {
|
|
7659
7993
|
const bufferingRef = useRef16(false);
|
|
7660
7994
|
const { delayPlayback } = useBufferState();
|
|
7661
|
-
const bufferUntilFirstFrame =
|
|
7995
|
+
const bufferUntilFirstFrame = useCallback11((requestedTime) => {
|
|
7662
7996
|
if (mediaType !== "video") {
|
|
7663
7997
|
return;
|
|
7664
7998
|
}
|
|
@@ -8048,7 +8382,7 @@ var useMediaPlayback = ({
|
|
|
8048
8382
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
8049
8383
|
}
|
|
8050
8384
|
const isVariableFpsVideoMap = useRef18({});
|
|
8051
|
-
const onVariableFpsVideoDetected =
|
|
8385
|
+
const onVariableFpsVideoDetected = useCallback12(() => {
|
|
8052
8386
|
if (!src) {
|
|
8053
8387
|
return;
|
|
8054
8388
|
}
|
|
@@ -8439,7 +8773,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8439
8773
|
premounting: Boolean(sequenceContext?.premounting),
|
|
8440
8774
|
postmounting: Boolean(sequenceContext?.postmounting)
|
|
8441
8775
|
});
|
|
8442
|
-
const getStack =
|
|
8776
|
+
const getStack = useCallback13(() => {
|
|
8443
8777
|
return _remotionInternalStack ?? null;
|
|
8444
8778
|
}, [_remotionInternalStack]);
|
|
8445
8779
|
useMediaInTimeline({
|
|
@@ -8455,7 +8789,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8455
8789
|
premountDisplay: sequenceContext?.premountDisplay ?? null,
|
|
8456
8790
|
postmountDisplay: sequenceContext?.postmountDisplay ?? null,
|
|
8457
8791
|
loopDisplay: undefined,
|
|
8458
|
-
documentationLink:
|
|
8792
|
+
documentationLink: "https://www.remotion.dev/docs/html5-audio",
|
|
8459
8793
|
refForOutline: null
|
|
8460
8794
|
});
|
|
8461
8795
|
useMediaPlayback({
|
|
@@ -8685,7 +9019,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
8685
9019
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
8686
9020
|
}
|
|
8687
9021
|
const preloadedSrc = usePreload(props.src);
|
|
8688
|
-
const onError =
|
|
9022
|
+
const onError = useCallback14((e) => {
|
|
8689
9023
|
console.log(e.currentTarget.error);
|
|
8690
9024
|
const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
|
|
8691
9025
|
if (loop) {
|
|
@@ -8699,7 +9033,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
8699
9033
|
console.warn(errMessage);
|
|
8700
9034
|
}
|
|
8701
9035
|
}, [loop, onRemotionError, preloadedSrc]);
|
|
8702
|
-
const onDuration =
|
|
9036
|
+
const onDuration = useCallback14((src, durationInSeconds) => {
|
|
8703
9037
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
8704
9038
|
}, [setDurations]);
|
|
8705
9039
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
|
|
@@ -8791,6 +9125,7 @@ var resolveSolidPixelDensity = (pixelDensity) => {
|
|
|
8791
9125
|
var solidSchema = {
|
|
8792
9126
|
durationInFrames: durationInFramesField,
|
|
8793
9127
|
from: fromField,
|
|
9128
|
+
freeze: freezeField,
|
|
8794
9129
|
color: {
|
|
8795
9130
|
type: "color",
|
|
8796
9131
|
default: "transparent",
|
|
@@ -8845,7 +9180,7 @@ var SolidInner = ({
|
|
|
8845
9180
|
return canvas;
|
|
8846
9181
|
}, []);
|
|
8847
9182
|
const chainState = useEffectChainState();
|
|
8848
|
-
const canvasRef =
|
|
9183
|
+
const canvasRef = useCallback15((canvas) => {
|
|
8849
9184
|
setOutputCanvas(canvas);
|
|
8850
9185
|
if (typeof reference === "function") {
|
|
8851
9186
|
reference(canvas);
|
|
@@ -8929,6 +9264,7 @@ var SolidOuter = forwardRef8(({
|
|
|
8929
9264
|
style,
|
|
8930
9265
|
name,
|
|
8931
9266
|
from,
|
|
9267
|
+
freeze,
|
|
8932
9268
|
hidden,
|
|
8933
9269
|
showInTimeline,
|
|
8934
9270
|
pixelDensity,
|
|
@@ -8942,6 +9278,7 @@ var SolidOuter = forwardRef8(({
|
|
|
8942
9278
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
8943
9279
|
layout: "none",
|
|
8944
9280
|
from,
|
|
9281
|
+
freeze,
|
|
8945
9282
|
hidden,
|
|
8946
9283
|
showInTimeline,
|
|
8947
9284
|
_experimentalControls: controls,
|
|
@@ -8949,7 +9286,7 @@ var SolidOuter = forwardRef8(({
|
|
|
8949
9286
|
durationInFrames,
|
|
8950
9287
|
name: name ?? "<Solid>",
|
|
8951
9288
|
_remotionInternalRefForOutline: actualRef,
|
|
8952
|
-
_remotionInternalDocumentationLink:
|
|
9289
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid",
|
|
8953
9290
|
...props2,
|
|
8954
9291
|
children: /* @__PURE__ */ jsx24(SolidInner, {
|
|
8955
9292
|
reference: actualRef,
|
|
@@ -8966,6 +9303,7 @@ var SolidOuter = forwardRef8(({
|
|
|
8966
9303
|
});
|
|
8967
9304
|
var Solid = wrapInSchema({
|
|
8968
9305
|
Component: SolidOuter,
|
|
9306
|
+
componentIdentity: "dev.remotion.remotion.Solid",
|
|
8969
9307
|
schema: solidSchema,
|
|
8970
9308
|
supportsEffects: true
|
|
8971
9309
|
});
|
|
@@ -9055,7 +9393,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9055
9393
|
const offscreenRef = useRef22(null);
|
|
9056
9394
|
const divRef = useRef22(null);
|
|
9057
9395
|
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
|
|
9058
|
-
const setLayoutCanvasRef =
|
|
9396
|
+
const setLayoutCanvasRef = useCallback16((node) => {
|
|
9059
9397
|
canvas2dRef.current = node;
|
|
9060
9398
|
if (typeof ref === "function") {
|
|
9061
9399
|
ref(node);
|
|
@@ -9077,7 +9415,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9077
9415
|
const initializedRef = useRef22(false);
|
|
9078
9416
|
const onInitCleanupRef = useRef22(null);
|
|
9079
9417
|
const unmountedRef = useRef22(false);
|
|
9080
|
-
const onPaintCb =
|
|
9418
|
+
const onPaintCb = useCallback16(async () => {
|
|
9081
9419
|
const element = divRef.current;
|
|
9082
9420
|
if (!element) {
|
|
9083
9421
|
throw new Error("Canvas or scene element not found");
|
|
@@ -9250,7 +9588,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
9250
9588
|
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
9251
9589
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
9252
9590
|
const actualRef = useRef22(null);
|
|
9253
|
-
const setCanvasRef =
|
|
9591
|
+
const setCanvasRef = useCallback16((node) => {
|
|
9254
9592
|
actualRef.current = node;
|
|
9255
9593
|
if (typeof ref === "function") {
|
|
9256
9594
|
ref(node);
|
|
@@ -9261,7 +9599,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
9261
9599
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
9262
9600
|
durationInFrames: resolvedDuration,
|
|
9263
9601
|
name: name ?? "<HtmlInCanvas>",
|
|
9264
|
-
_remotionInternalDocumentationLink:
|
|
9602
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
9265
9603
|
_experimentalControls: controls,
|
|
9266
9604
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
9267
9605
|
_remotionInternalRefForOutline: actualRef,
|
|
@@ -9285,11 +9623,13 @@ HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
|
9285
9623
|
var htmlInCanvasSchema = {
|
|
9286
9624
|
durationInFrames: durationInFramesField,
|
|
9287
9625
|
from: fromField,
|
|
9626
|
+
freeze: freezeField,
|
|
9288
9627
|
...sequenceVisualStyleSchema,
|
|
9289
9628
|
hidden: hiddenField
|
|
9290
9629
|
};
|
|
9291
9630
|
var HtmlInCanvasWrapped = wrapInSchema({
|
|
9292
9631
|
Component: HtmlInCanvasInner,
|
|
9632
|
+
componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
|
|
9293
9633
|
schema: htmlInCanvasSchema,
|
|
9294
9634
|
supportsEffects: true
|
|
9295
9635
|
});
|
|
@@ -9307,6 +9647,7 @@ function truncateSrcForLabel(src) {
|
|
|
9307
9647
|
var canvasImageSchema = {
|
|
9308
9648
|
durationInFrames: durationInFramesField,
|
|
9309
9649
|
from: fromField,
|
|
9650
|
+
freeze: freezeField,
|
|
9310
9651
|
fit: {
|
|
9311
9652
|
type: "enum",
|
|
9312
9653
|
default: "fill",
|
|
@@ -9412,7 +9753,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
9412
9753
|
}
|
|
9413
9754
|
return document.createElement("canvas");
|
|
9414
9755
|
}, []);
|
|
9415
|
-
const canvasRef =
|
|
9756
|
+
const canvasRef = useCallback17((canvas) => {
|
|
9416
9757
|
setOutputCanvas(canvas);
|
|
9417
9758
|
if (refForOutline) {
|
|
9418
9759
|
refForOutline.current = canvas;
|
|
@@ -9559,6 +9900,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9559
9900
|
delayRenderTimeoutInMilliseconds,
|
|
9560
9901
|
durationInFrames,
|
|
9561
9902
|
from,
|
|
9903
|
+
freeze,
|
|
9562
9904
|
hidden,
|
|
9563
9905
|
name,
|
|
9564
9906
|
showInTimeline,
|
|
@@ -9580,6 +9922,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9580
9922
|
layout: "none",
|
|
9581
9923
|
from: from ?? 0,
|
|
9582
9924
|
durationInFrames: durationInFrames ?? Infinity,
|
|
9925
|
+
freeze,
|
|
9583
9926
|
hidden,
|
|
9584
9927
|
showInTimeline: showInTimeline ?? true,
|
|
9585
9928
|
name: name ?? "<CanvasImage>",
|
|
@@ -9612,6 +9955,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9612
9955
|
});
|
|
9613
9956
|
var CanvasImage = wrapInSchema({
|
|
9614
9957
|
Component: CanvasImageInner,
|
|
9958
|
+
componentIdentity: "dev.remotion.remotion.CanvasImage",
|
|
9615
9959
|
schema: canvasImageSchema,
|
|
9616
9960
|
supportsEffects: true
|
|
9617
9961
|
});
|
|
@@ -9629,11 +9973,11 @@ var IFrameRefForwarding = ({
|
|
|
9629
9973
|
retries: delayRenderRetries ?? undefined,
|
|
9630
9974
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
9631
9975
|
}));
|
|
9632
|
-
const didLoad =
|
|
9976
|
+
const didLoad = useCallback18((e) => {
|
|
9633
9977
|
continueRender2(handle);
|
|
9634
9978
|
onLoad?.(e);
|
|
9635
9979
|
}, [handle, onLoad, continueRender2]);
|
|
9636
|
-
const didGetError =
|
|
9980
|
+
const didGetError = useCallback18((e) => {
|
|
9637
9981
|
continueRender2(handle);
|
|
9638
9982
|
if (onError) {
|
|
9639
9983
|
onError(e);
|
|
@@ -9675,7 +10019,7 @@ var ImgContent = ({
|
|
|
9675
10019
|
if (!_propsValid) {
|
|
9676
10020
|
throw new Error("typecheck error");
|
|
9677
10021
|
}
|
|
9678
|
-
const imageCallbackRef =
|
|
10022
|
+
const imageCallbackRef = useCallback19((img) => {
|
|
9679
10023
|
imageRef.current = img;
|
|
9680
10024
|
refForOutline.current = img;
|
|
9681
10025
|
if (typeof ref === "function") {
|
|
@@ -9685,7 +10029,7 @@ var ImgContent = ({
|
|
|
9685
10029
|
}
|
|
9686
10030
|
}, [ref, refForOutline]);
|
|
9687
10031
|
const actualSrc = usePreload(src);
|
|
9688
|
-
const retryIn =
|
|
10032
|
+
const retryIn = useCallback19((timeout) => {
|
|
9689
10033
|
if (!imageRef.current) {
|
|
9690
10034
|
return;
|
|
9691
10035
|
}
|
|
@@ -9703,7 +10047,7 @@ var ImgContent = ({
|
|
|
9703
10047
|
}, timeout);
|
|
9704
10048
|
}, []);
|
|
9705
10049
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
9706
|
-
const didGetError =
|
|
10050
|
+
const didGetError = useCallback19((e) => {
|
|
9707
10051
|
if (!errors.current) {
|
|
9708
10052
|
return;
|
|
9709
10053
|
}
|
|
@@ -9813,6 +10157,7 @@ var NativeImgInner = ({
|
|
|
9813
10157
|
src,
|
|
9814
10158
|
from,
|
|
9815
10159
|
durationInFrames,
|
|
10160
|
+
freeze,
|
|
9816
10161
|
_experimentalControls: controls,
|
|
9817
10162
|
_remotionInternalRefForOutline: refForOutline,
|
|
9818
10163
|
...props2
|
|
@@ -9824,8 +10169,9 @@ var NativeImgInner = ({
|
|
|
9824
10169
|
layout: "none",
|
|
9825
10170
|
from: from ?? 0,
|
|
9826
10171
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10172
|
+
freeze,
|
|
9827
10173
|
_remotionInternalStack: stack,
|
|
9828
|
-
_remotionInternalDocumentationLink:
|
|
10174
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
9829
10175
|
_remotionInternalIsMedia: { type: "image", src },
|
|
9830
10176
|
name: name ?? "<Img>",
|
|
9831
10177
|
_experimentalControls: controls,
|
|
@@ -9843,6 +10189,7 @@ var CanvasImageWithPrivateProps = CanvasImage;
|
|
|
9843
10189
|
var imgSchema = {
|
|
9844
10190
|
durationInFrames: durationInFramesField,
|
|
9845
10191
|
from: fromField,
|
|
10192
|
+
freeze: freezeField,
|
|
9846
10193
|
...sequenceVisualStyleSchema,
|
|
9847
10194
|
hidden: hiddenField
|
|
9848
10195
|
};
|
|
@@ -9898,6 +10245,7 @@ var ImgInner = ({
|
|
|
9898
10245
|
src,
|
|
9899
10246
|
from,
|
|
9900
10247
|
durationInFrames,
|
|
10248
|
+
freeze,
|
|
9901
10249
|
_experimentalControls: controls,
|
|
9902
10250
|
width,
|
|
9903
10251
|
height,
|
|
@@ -9922,6 +10270,7 @@ var ImgInner = ({
|
|
|
9922
10270
|
src,
|
|
9923
10271
|
from,
|
|
9924
10272
|
durationInFrames,
|
|
10273
|
+
freeze,
|
|
9925
10274
|
_experimentalControls: controls,
|
|
9926
10275
|
width,
|
|
9927
10276
|
height,
|
|
@@ -9963,11 +10312,12 @@ var ImgInner = ({
|
|
|
9963
10312
|
delayRenderTimeoutInMilliseconds,
|
|
9964
10313
|
from,
|
|
9965
10314
|
durationInFrames,
|
|
10315
|
+
freeze,
|
|
9966
10316
|
hidden,
|
|
9967
10317
|
name: name ?? "<Img>",
|
|
9968
10318
|
showInTimeline,
|
|
9969
10319
|
stack,
|
|
9970
|
-
_remotionInternalDocumentationLink:
|
|
10320
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
9971
10321
|
_experimentalControls: controls,
|
|
9972
10322
|
_remotionInternalRefForOutline: refForOutline,
|
|
9973
10323
|
...canvasProps
|
|
@@ -9975,6 +10325,7 @@ var ImgInner = ({
|
|
|
9975
10325
|
};
|
|
9976
10326
|
var Img = wrapInSchema({
|
|
9977
10327
|
Component: ImgInner,
|
|
10328
|
+
componentIdentity: "dev.remotion.remotion.Img",
|
|
9978
10329
|
schema: imgSchema,
|
|
9979
10330
|
supportsEffects: true
|
|
9980
10331
|
});
|
|
@@ -9982,6 +10333,7 @@ addSequenceStackTraces(Img);
|
|
|
9982
10333
|
var interactiveElementSchema = {
|
|
9983
10334
|
durationInFrames: durationInFramesField,
|
|
9984
10335
|
from: fromField,
|
|
10336
|
+
freeze: freezeField,
|
|
9985
10337
|
...sequenceVisualStyleSchema,
|
|
9986
10338
|
hidden: hiddenField
|
|
9987
10339
|
};
|
|
@@ -9997,6 +10349,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
9997
10349
|
const {
|
|
9998
10350
|
durationInFrames,
|
|
9999
10351
|
from,
|
|
10352
|
+
freeze,
|
|
10000
10353
|
hidden,
|
|
10001
10354
|
name,
|
|
10002
10355
|
showInTimeline,
|
|
@@ -10005,7 +10358,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10005
10358
|
...props2
|
|
10006
10359
|
} = propsWithControls;
|
|
10007
10360
|
const refForOutline = useRef25(null);
|
|
10008
|
-
const callbackRef =
|
|
10361
|
+
const callbackRef = useCallback20((element) => {
|
|
10009
10362
|
refForOutline.current = element;
|
|
10010
10363
|
setRef(ref, element);
|
|
10011
10364
|
}, [ref]);
|
|
@@ -10013,11 +10366,13 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10013
10366
|
layout: "none",
|
|
10014
10367
|
from: from ?? 0,
|
|
10015
10368
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10369
|
+
freeze,
|
|
10016
10370
|
hidden,
|
|
10017
10371
|
name: name ?? displayName,
|
|
10018
10372
|
showInTimeline: showInTimeline ?? true,
|
|
10019
10373
|
_experimentalControls,
|
|
10020
10374
|
_remotionInternalStack: stack,
|
|
10375
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
10021
10376
|
_remotionInternalRefForOutline: refForOutline,
|
|
10022
10377
|
children: React29.createElement(tag, {
|
|
10023
10378
|
...props2,
|
|
@@ -10028,6 +10383,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10028
10383
|
Inner.displayName = displayName;
|
|
10029
10384
|
const Wrapped = wrapInSchema({
|
|
10030
10385
|
Component: Inner,
|
|
10386
|
+
componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
|
|
10031
10387
|
schema: interactiveElementSchema,
|
|
10032
10388
|
supportsEffects: false
|
|
10033
10389
|
});
|
|
@@ -10084,14 +10440,14 @@ var CompositionManagerProvider = ({
|
|
|
10084
10440
|
const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
|
|
10085
10441
|
const [compositions, setCompositions] = useState18(initialCompositions);
|
|
10086
10442
|
const currentcompositionsRef = useRef26(compositions);
|
|
10087
|
-
const updateCompositions =
|
|
10443
|
+
const updateCompositions = useCallback21((updateComps) => {
|
|
10088
10444
|
setCompositions((comps) => {
|
|
10089
10445
|
const updated = updateComps(comps);
|
|
10090
10446
|
currentcompositionsRef.current = updated;
|
|
10091
10447
|
return updated;
|
|
10092
10448
|
});
|
|
10093
10449
|
}, []);
|
|
10094
|
-
const registerComposition =
|
|
10450
|
+
const registerComposition = useCallback21((comp) => {
|
|
10095
10451
|
updateCompositions((comps) => {
|
|
10096
10452
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
10097
10453
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -10099,12 +10455,12 @@ var CompositionManagerProvider = ({
|
|
|
10099
10455
|
return [...comps, comp];
|
|
10100
10456
|
});
|
|
10101
10457
|
}, [updateCompositions]);
|
|
10102
|
-
const unregisterComposition =
|
|
10458
|
+
const unregisterComposition = useCallback21((id) => {
|
|
10103
10459
|
setCompositions((comps) => {
|
|
10104
10460
|
return comps.filter((c2) => c2.id !== id);
|
|
10105
10461
|
});
|
|
10106
10462
|
}, []);
|
|
10107
|
-
const registerFolder =
|
|
10463
|
+
const registerFolder = useCallback21((name, parent, nonce, stack) => {
|
|
10108
10464
|
setFolders((prevFolders) => {
|
|
10109
10465
|
return [
|
|
10110
10466
|
...prevFolders,
|
|
@@ -10117,7 +10473,7 @@ var CompositionManagerProvider = ({
|
|
|
10117
10473
|
];
|
|
10118
10474
|
});
|
|
10119
10475
|
}, []);
|
|
10120
|
-
const unregisterFolder =
|
|
10476
|
+
const unregisterFolder = useCallback21((name, parent) => {
|
|
10121
10477
|
setFolders((prevFolders) => {
|
|
10122
10478
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
10123
10479
|
});
|
|
@@ -10756,7 +11112,7 @@ var OffthreadVideoForRendering = ({
|
|
|
10756
11112
|
continueRender2,
|
|
10757
11113
|
delayRender2
|
|
10758
11114
|
]);
|
|
10759
|
-
const onErr =
|
|
11115
|
+
const onErr = useCallback22(() => {
|
|
10760
11116
|
if (onError) {
|
|
10761
11117
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
10762
11118
|
} else {
|
|
@@ -10766,7 +11122,7 @@ var OffthreadVideoForRendering = ({
|
|
|
10766
11122
|
const className = useMemo35(() => {
|
|
10767
11123
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
10768
11124
|
}, [props2.className]);
|
|
10769
|
-
const onImageFrame =
|
|
11125
|
+
const onImageFrame = useCallback22((img) => {
|
|
10770
11126
|
if (onVideoFrame) {
|
|
10771
11127
|
onVideoFrame(img);
|
|
10772
11128
|
}
|
|
@@ -10899,7 +11255,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
10899
11255
|
mediaVolume
|
|
10900
11256
|
});
|
|
10901
11257
|
warnAboutTooHighVolume(userPreferredVolume);
|
|
10902
|
-
const getStack =
|
|
11258
|
+
const getStack = useCallback23(() => {
|
|
10903
11259
|
return _remotionInternalStack ?? null;
|
|
10904
11260
|
}, [_remotionInternalStack]);
|
|
10905
11261
|
useMediaInTimeline({
|
|
@@ -10915,7 +11271,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
10915
11271
|
premountDisplay: parentSequence?.premountDisplay ?? null,
|
|
10916
11272
|
postmountDisplay: parentSequence?.postmountDisplay ?? null,
|
|
10917
11273
|
loopDisplay: undefined,
|
|
10918
|
-
documentationLink:
|
|
11274
|
+
documentationLink: onlyWarnForMediaSeekingError ? "https://www.remotion.dev/docs/offthreadvideo" : "https://www.remotion.dev/docs/html5-video",
|
|
10919
11275
|
refForOutline: videoRef
|
|
10920
11276
|
});
|
|
10921
11277
|
useMediaPlayback({
|
|
@@ -11046,6 +11402,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11046
11402
|
isClientSideRendering: false
|
|
11047
11403
|
});
|
|
11048
11404
|
return /* @__PURE__ */ jsx34("video", {
|
|
11405
|
+
...nativeProps,
|
|
11049
11406
|
ref: videoRef,
|
|
11050
11407
|
muted: muted || mediaMuted || userPreferredVolume <= 0,
|
|
11051
11408
|
playsInline: true,
|
|
@@ -11054,7 +11411,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11054
11411
|
style: actualStyle,
|
|
11055
11412
|
disableRemotePlayback: true,
|
|
11056
11413
|
crossOrigin: crossOriginValue,
|
|
11057
|
-
|
|
11414
|
+
controls: false
|
|
11058
11415
|
});
|
|
11059
11416
|
};
|
|
11060
11417
|
var VideoForPreview = forwardRef13(VideoForDevelopmentRefForwardingFunction);
|
|
@@ -11074,7 +11431,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
11074
11431
|
if (environment.isClientSideRendering) {
|
|
11075
11432
|
throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
11076
11433
|
}
|
|
11077
|
-
const onDuration =
|
|
11434
|
+
const onDuration = useCallback24(() => {
|
|
11078
11435
|
return;
|
|
11079
11436
|
}, []);
|
|
11080
11437
|
if (typeof props2.src !== "string") {
|
|
@@ -11432,52 +11789,29 @@ var Internals = {
|
|
|
11432
11789
|
CompositionRenderErrorContext,
|
|
11433
11790
|
useEffectChainState,
|
|
11434
11791
|
createEffectChainState,
|
|
11435
|
-
cleanupEffectChainState,
|
|
11436
|
-
runEffectChain,
|
|
11437
|
-
useMemoizedEffects,
|
|
11438
|
-
useMemoizedEffectDefinitions,
|
|
11439
|
-
createEffect,
|
|
11440
|
-
createWebGLContextError,
|
|
11441
|
-
createWebGL2ContextError,
|
|
11442
|
-
computeEffectiveSchemaValuesDotNotation,
|
|
11443
|
-
interpolateKeyframedStatus,
|
|
11444
|
-
makeStaticDragOverride,
|
|
11445
|
-
makeKeyframedDragOverride,
|
|
11446
|
-
resolveDragOverrideValue,
|
|
11447
|
-
getStaticDragOverrideValue,
|
|
11448
|
-
OverrideIdsToNodePathsGettersContext,
|
|
11449
|
-
OverrideIdsToNodePathsSettersContext,
|
|
11450
|
-
findPropsToDelete,
|
|
11451
|
-
makeSequencePropsSubscriptionKey,
|
|
11452
|
-
getPropStatusesCtx,
|
|
11453
|
-
getEffectPropStatusesCtx,
|
|
11454
|
-
hiddenField,
|
|
11455
|
-
durationInFramesField,
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
var validateFrame = ({
|
|
11459
|
-
allowFloats,
|
|
11460
|
-
durationInFrames,
|
|
11461
|
-
frame
|
|
11462
|
-
}) => {
|
|
11463
|
-
if (typeof frame === "undefined") {
|
|
11464
|
-
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
11465
|
-
}
|
|
11466
|
-
if (typeof frame !== "number") {
|
|
11467
|
-
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
11468
|
-
}
|
|
11469
|
-
if (!Number.isFinite(frame)) {
|
|
11470
|
-
throw new RangeError(`Frame ${frame} is not finite`);
|
|
11471
|
-
}
|
|
11472
|
-
if (frame % 1 !== 0 && !allowFloats) {
|
|
11473
|
-
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
11474
|
-
}
|
|
11475
|
-
if (frame < 0 && frame < -durationInFrames) {
|
|
11476
|
-
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
|
|
11477
|
-
}
|
|
11478
|
-
if (frame > durationInFrames - 1) {
|
|
11479
|
-
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
11480
|
-
}
|
|
11792
|
+
cleanupEffectChainState,
|
|
11793
|
+
runEffectChain,
|
|
11794
|
+
useMemoizedEffects,
|
|
11795
|
+
useMemoizedEffectDefinitions,
|
|
11796
|
+
createEffect,
|
|
11797
|
+
createWebGLContextError,
|
|
11798
|
+
createWebGL2ContextError,
|
|
11799
|
+
computeEffectiveSchemaValuesDotNotation,
|
|
11800
|
+
interpolateKeyframedStatus,
|
|
11801
|
+
makeStaticDragOverride,
|
|
11802
|
+
makeKeyframedDragOverride,
|
|
11803
|
+
resolveDragOverrideValue,
|
|
11804
|
+
getStaticDragOverrideValue,
|
|
11805
|
+
OverrideIdsToNodePathsGettersContext,
|
|
11806
|
+
OverrideIdsToNodePathsSettersContext,
|
|
11807
|
+
findPropsToDelete,
|
|
11808
|
+
makeSequencePropsSubscriptionKey,
|
|
11809
|
+
getPropStatusesCtx,
|
|
11810
|
+
getEffectPropStatusesCtx,
|
|
11811
|
+
hiddenField,
|
|
11812
|
+
durationInFramesField,
|
|
11813
|
+
freezeField,
|
|
11814
|
+
fromField
|
|
11481
11815
|
};
|
|
11482
11816
|
var flattenChildren = (children) => {
|
|
11483
11817
|
const childrenArray = React40.Children.toArray(children);
|
|
@@ -11562,246 +11896,13 @@ var SeriesInner = (props2) => {
|
|
|
11562
11896
|
};
|
|
11563
11897
|
var Series = Object.assign(wrapInSchema({
|
|
11564
11898
|
Component: SeriesInner,
|
|
11899
|
+
componentIdentity: "dev.remotion.remotion.Series",
|
|
11565
11900
|
schema: sequenceSchemaDefaultLayoutNone,
|
|
11566
11901
|
supportsEffects: false
|
|
11567
11902
|
}), {
|
|
11568
11903
|
Sequence: SeriesSequence
|
|
11569
11904
|
});
|
|
11570
11905
|
addSequenceStackTraces(Series);
|
|
11571
|
-
var validateSpringDuration = (dur) => {
|
|
11572
|
-
if (typeof dur === "undefined") {
|
|
11573
|
-
return;
|
|
11574
|
-
}
|
|
11575
|
-
if (typeof dur !== "number") {
|
|
11576
|
-
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
|
|
11577
|
-
}
|
|
11578
|
-
if (Number.isNaN(dur)) {
|
|
11579
|
-
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
|
|
11580
|
-
}
|
|
11581
|
-
if (!Number.isFinite(dur)) {
|
|
11582
|
-
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
|
|
11583
|
-
}
|
|
11584
|
-
if (dur <= 0) {
|
|
11585
|
-
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
|
|
11586
|
-
}
|
|
11587
|
-
};
|
|
11588
|
-
var defaultSpringConfig = {
|
|
11589
|
-
damping: 10,
|
|
11590
|
-
mass: 1,
|
|
11591
|
-
stiffness: 100,
|
|
11592
|
-
overshootClamping: false
|
|
11593
|
-
};
|
|
11594
|
-
var advanceCache = {};
|
|
11595
|
-
function advance({
|
|
11596
|
-
animation,
|
|
11597
|
-
now,
|
|
11598
|
-
config
|
|
11599
|
-
}) {
|
|
11600
|
-
const { toValue, lastTimestamp, current, velocity } = animation;
|
|
11601
|
-
const deltaTime = Math.min(now - lastTimestamp, 64);
|
|
11602
|
-
if (config.damping <= 0) {
|
|
11603
|
-
throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
|
|
11604
|
-
}
|
|
11605
|
-
const c2 = config.damping;
|
|
11606
|
-
const m = config.mass;
|
|
11607
|
-
const k = config.stiffness;
|
|
11608
|
-
const cacheKey = [
|
|
11609
|
-
toValue,
|
|
11610
|
-
lastTimestamp,
|
|
11611
|
-
current,
|
|
11612
|
-
velocity,
|
|
11613
|
-
c2,
|
|
11614
|
-
m,
|
|
11615
|
-
k,
|
|
11616
|
-
now
|
|
11617
|
-
].join("-");
|
|
11618
|
-
if (advanceCache[cacheKey]) {
|
|
11619
|
-
return advanceCache[cacheKey];
|
|
11620
|
-
}
|
|
11621
|
-
const v0 = -velocity;
|
|
11622
|
-
const x0 = toValue - current;
|
|
11623
|
-
const zeta = c2 / (2 * Math.sqrt(k * m));
|
|
11624
|
-
const omega0 = Math.sqrt(k / m);
|
|
11625
|
-
const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
|
|
11626
|
-
const t = deltaTime / 1000;
|
|
11627
|
-
const sin1 = Math.sin(omega1 * t);
|
|
11628
|
-
const cos1 = Math.cos(omega1 * t);
|
|
11629
|
-
const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
|
|
11630
|
-
const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
|
|
11631
|
-
const underDampedPosition = toValue - underDampedFrag1;
|
|
11632
|
-
const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
|
|
11633
|
-
const criticallyDampedEnvelope = Math.exp(-omega0 * t);
|
|
11634
|
-
const criticallyDampedPosition = toValue - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
|
|
11635
|
-
const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
|
|
11636
|
-
const animationNode = {
|
|
11637
|
-
toValue,
|
|
11638
|
-
prevPosition: current,
|
|
11639
|
-
lastTimestamp: now,
|
|
11640
|
-
current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
|
|
11641
|
-
velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
|
|
11642
|
-
};
|
|
11643
|
-
advanceCache[cacheKey] = animationNode;
|
|
11644
|
-
return animationNode;
|
|
11645
|
-
}
|
|
11646
|
-
var calculationCache = {};
|
|
11647
|
-
function springCalculation({
|
|
11648
|
-
frame,
|
|
11649
|
-
fps,
|
|
11650
|
-
config = {}
|
|
11651
|
-
}) {
|
|
11652
|
-
const from = 0;
|
|
11653
|
-
const to = 1;
|
|
11654
|
-
const cacheKey = [
|
|
11655
|
-
frame,
|
|
11656
|
-
fps,
|
|
11657
|
-
config.damping,
|
|
11658
|
-
config.mass,
|
|
11659
|
-
config.overshootClamping,
|
|
11660
|
-
config.stiffness
|
|
11661
|
-
].join("-");
|
|
11662
|
-
if (calculationCache[cacheKey]) {
|
|
11663
|
-
return calculationCache[cacheKey];
|
|
11664
|
-
}
|
|
11665
|
-
let animation = {
|
|
11666
|
-
lastTimestamp: 0,
|
|
11667
|
-
current: from,
|
|
11668
|
-
toValue: to,
|
|
11669
|
-
velocity: 0,
|
|
11670
|
-
prevPosition: 0
|
|
11671
|
-
};
|
|
11672
|
-
const frameClamped = Math.max(0, frame);
|
|
11673
|
-
const unevenRest = frameClamped % 1;
|
|
11674
|
-
for (let f = 0;f <= Math.floor(frameClamped); f++) {
|
|
11675
|
-
if (f === Math.floor(frameClamped)) {
|
|
11676
|
-
f += unevenRest;
|
|
11677
|
-
}
|
|
11678
|
-
const time = f / fps * 1000;
|
|
11679
|
-
animation = advance({
|
|
11680
|
-
animation,
|
|
11681
|
-
now: time,
|
|
11682
|
-
config: {
|
|
11683
|
-
...defaultSpringConfig,
|
|
11684
|
-
...config
|
|
11685
|
-
}
|
|
11686
|
-
});
|
|
11687
|
-
}
|
|
11688
|
-
calculationCache[cacheKey] = animation;
|
|
11689
|
-
return animation;
|
|
11690
|
-
}
|
|
11691
|
-
var cache = new Map;
|
|
11692
|
-
function measureSpring({
|
|
11693
|
-
fps,
|
|
11694
|
-
config = {},
|
|
11695
|
-
threshold = 0.005
|
|
11696
|
-
}) {
|
|
11697
|
-
if (typeof threshold !== "number") {
|
|
11698
|
-
throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
|
|
11699
|
-
}
|
|
11700
|
-
if (threshold === 0) {
|
|
11701
|
-
return Infinity;
|
|
11702
|
-
}
|
|
11703
|
-
if (threshold === 1) {
|
|
11704
|
-
return 0;
|
|
11705
|
-
}
|
|
11706
|
-
if (isNaN(threshold)) {
|
|
11707
|
-
throw new TypeError("Threshold is NaN");
|
|
11708
|
-
}
|
|
11709
|
-
if (!Number.isFinite(threshold)) {
|
|
11710
|
-
throw new TypeError("Threshold is not finite");
|
|
11711
|
-
}
|
|
11712
|
-
if (threshold < 0) {
|
|
11713
|
-
throw new TypeError("Threshold is below 0");
|
|
11714
|
-
}
|
|
11715
|
-
const cacheKey = [
|
|
11716
|
-
fps,
|
|
11717
|
-
config.damping,
|
|
11718
|
-
config.mass,
|
|
11719
|
-
config.overshootClamping,
|
|
11720
|
-
config.stiffness,
|
|
11721
|
-
threshold
|
|
11722
|
-
].join("-");
|
|
11723
|
-
if (cache.has(cacheKey)) {
|
|
11724
|
-
return cache.get(cacheKey);
|
|
11725
|
-
}
|
|
11726
|
-
validateFps(fps, "to the measureSpring() function", false);
|
|
11727
|
-
let frame = 0;
|
|
11728
|
-
let finishedFrame = 0;
|
|
11729
|
-
const calc = () => {
|
|
11730
|
-
return springCalculation({
|
|
11731
|
-
fps,
|
|
11732
|
-
frame,
|
|
11733
|
-
config
|
|
11734
|
-
});
|
|
11735
|
-
};
|
|
11736
|
-
let animation = calc();
|
|
11737
|
-
const calcDifference = () => {
|
|
11738
|
-
return Math.abs(animation.current - animation.toValue);
|
|
11739
|
-
};
|
|
11740
|
-
let difference = calcDifference();
|
|
11741
|
-
while (difference >= threshold) {
|
|
11742
|
-
frame++;
|
|
11743
|
-
animation = calc();
|
|
11744
|
-
difference = calcDifference();
|
|
11745
|
-
}
|
|
11746
|
-
finishedFrame = frame;
|
|
11747
|
-
for (let i = 0;i < 20; i++) {
|
|
11748
|
-
frame++;
|
|
11749
|
-
animation = calc();
|
|
11750
|
-
difference = calcDifference();
|
|
11751
|
-
if (difference >= threshold) {
|
|
11752
|
-
i = 0;
|
|
11753
|
-
finishedFrame = frame + 1;
|
|
11754
|
-
}
|
|
11755
|
-
}
|
|
11756
|
-
cache.set(cacheKey, finishedFrame);
|
|
11757
|
-
return finishedFrame;
|
|
11758
|
-
}
|
|
11759
|
-
function spring({
|
|
11760
|
-
frame: passedFrame,
|
|
11761
|
-
fps,
|
|
11762
|
-
config = {},
|
|
11763
|
-
from = 0,
|
|
11764
|
-
to = 1,
|
|
11765
|
-
durationInFrames: passedDurationInFrames,
|
|
11766
|
-
durationRestThreshold,
|
|
11767
|
-
delay = 0,
|
|
11768
|
-
reverse = false
|
|
11769
|
-
}) {
|
|
11770
|
-
validateSpringDuration(passedDurationInFrames);
|
|
11771
|
-
validateFrame({
|
|
11772
|
-
frame: passedFrame,
|
|
11773
|
-
durationInFrames: Infinity,
|
|
11774
|
-
allowFloats: true
|
|
11775
|
-
});
|
|
11776
|
-
validateFps(fps, "to spring()", false);
|
|
11777
|
-
const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
|
|
11778
|
-
const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
|
|
11779
|
-
fps,
|
|
11780
|
-
config,
|
|
11781
|
-
threshold: durationRestThreshold
|
|
11782
|
-
}) : undefined;
|
|
11783
|
-
const naturalDurationGetter = needsToCalculateNaturalDuration ? {
|
|
11784
|
-
get: () => naturalDuration
|
|
11785
|
-
} : {
|
|
11786
|
-
get: () => {
|
|
11787
|
-
throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
|
|
11788
|
-
}
|
|
11789
|
-
};
|
|
11790
|
-
const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
|
|
11791
|
-
const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
|
|
11792
|
-
const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
|
|
11793
|
-
if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
|
|
11794
|
-
return to;
|
|
11795
|
-
}
|
|
11796
|
-
const spr = springCalculation({
|
|
11797
|
-
fps,
|
|
11798
|
-
frame: durationProcessed,
|
|
11799
|
-
config
|
|
11800
|
-
});
|
|
11801
|
-
const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
|
|
11802
|
-
const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
|
|
11803
|
-
return interpolated;
|
|
11804
|
-
}
|
|
11805
11906
|
var problematicCharacters = {
|
|
11806
11907
|
"%3A": ":",
|
|
11807
11908
|
"%2F": "/",
|
|
@@ -12260,7 +12361,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
12260
12361
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
12261
12362
|
}
|
|
12262
12363
|
const preloadedSrc = usePreload(props2.src);
|
|
12263
|
-
const onDuration =
|
|
12364
|
+
const onDuration = useCallback25((src, durationInSeconds) => {
|
|
12264
12365
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
12265
12366
|
}, [setDurations]);
|
|
12266
12367
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|