@remotion/promo-pages 4.0.460 → 4.0.462
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 +860 -450
- 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/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 +590 -325
- package/dist/experts.js +575 -310
- 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 +590 -325
- package/dist/main.d.ts +1 -0
- package/dist/main.js +6 -0
- package/dist/prompts/PromptsGallery.js +590 -325
- package/dist/prompts/PromptsShow.js +616 -351
- package/dist/prompts/PromptsSubmit.js +616 -351
- 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 +590 -325
- package/dist/template-modal-content.js +590 -325
- package/dist/templates.js +591 -325
- package/package.json +18 -18
package/dist/Homepage.js
CHANGED
|
@@ -941,7 +941,7 @@ import * as React6 from "react";
|
|
|
941
941
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
942
942
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
943
943
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
944
|
-
import { useEffect as useEffect4, useMemo as
|
|
944
|
+
import { useEffect as useEffect4, useMemo as useMemo12, useState as useState4 } from "react";
|
|
945
945
|
import { useContext as useContext11 } from "react";
|
|
946
946
|
import { createContext as createContext12 } from "react";
|
|
947
947
|
import { useContext as useContext10, useMemo as useMemo9 } from "react";
|
|
@@ -954,24 +954,24 @@ import {
|
|
|
954
954
|
} from "react";
|
|
955
955
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
956
956
|
import { useEffect as useEffect3, useMemo as useMemo10, useRef as useRef4 } from "react";
|
|
957
|
+
import { useContext as useContext12, useRef as useRef6 } from "react";
|
|
958
|
+
import { createContext as createContext14 } from "react";
|
|
959
|
+
import React10, { useCallback as useCallback5, useMemo as useMemo11, useRef as useRef5, useState as useState3 } from "react";
|
|
957
960
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
961
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
958
962
|
import {
|
|
959
963
|
forwardRef as forwardRef3,
|
|
960
|
-
useContext as
|
|
964
|
+
useContext as useContext17,
|
|
961
965
|
useEffect as useEffect5,
|
|
962
966
|
useMemo as useMemo16,
|
|
963
967
|
useState as useState6
|
|
964
968
|
} from "react";
|
|
965
|
-
import {
|
|
966
|
-
import { useContext as useContext14
|
|
967
|
-
import { useContext as useContext13 } from "react";
|
|
968
|
-
import { useContext as useContext12, useMemo as useMemo12 } from "react";
|
|
969
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
970
|
-
import { createContext as createContext14 } from "react";
|
|
971
|
-
import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
|
|
969
|
+
import { useContext as useContext15, useMemo as useMemo14 } from "react";
|
|
970
|
+
import { useContext as useContext14 } from "react";
|
|
971
|
+
import { useContext as useContext13, useMemo as useMemo13 } from "react";
|
|
972
972
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
973
|
-
import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
|
|
974
973
|
import { createContext as createContext15 } from "react";
|
|
974
|
+
import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext16, useMemo as useMemo15 } from "react";
|
|
975
975
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
976
976
|
import {
|
|
977
977
|
forwardRef as forwardRef4,
|
|
@@ -988,14 +988,14 @@ import {
|
|
|
988
988
|
createContext as createContext16,
|
|
989
989
|
forwardRef as forwardRef5,
|
|
990
990
|
useCallback as useCallback7,
|
|
991
|
-
useContext as
|
|
991
|
+
useContext as useContext18,
|
|
992
992
|
useLayoutEffect as useLayoutEffect3,
|
|
993
993
|
useMemo as useMemo17,
|
|
994
994
|
useRef as useRef9,
|
|
995
995
|
useState as useState8
|
|
996
996
|
} from "react";
|
|
997
997
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
998
|
-
import { useContext as
|
|
998
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
|
|
999
999
|
import {
|
|
1000
1000
|
createContext as createContext17,
|
|
1001
1001
|
useCallback as useCallback8,
|
|
@@ -1006,29 +1006,29 @@ import {
|
|
|
1006
1006
|
useState as useState9
|
|
1007
1007
|
} from "react";
|
|
1008
1008
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1009
|
-
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as
|
|
1009
|
+
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext31 } from "react";
|
|
1010
1010
|
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
1011
1011
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1012
|
-
import { useContext as
|
|
1012
|
+
import { useContext as useContext20 } from "react";
|
|
1013
1013
|
import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
|
|
1014
1014
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1015
1015
|
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
1016
1016
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1017
1017
|
import React23, {
|
|
1018
1018
|
forwardRef as forwardRef6,
|
|
1019
|
-
useContext as
|
|
1019
|
+
useContext as useContext29,
|
|
1020
1020
|
useEffect as useEffect14,
|
|
1021
1021
|
useImperativeHandle as useImperativeHandle4,
|
|
1022
1022
|
useMemo as useMemo28,
|
|
1023
1023
|
useRef as useRef18,
|
|
1024
1024
|
useState as useState16
|
|
1025
1025
|
} from "react";
|
|
1026
|
-
import { useContext as
|
|
1026
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
|
|
1027
1027
|
import React20, {
|
|
1028
1028
|
createContext as createContext21,
|
|
1029
1029
|
createRef as createRef2,
|
|
1030
1030
|
useCallback as useCallback9,
|
|
1031
|
-
useContext as
|
|
1031
|
+
useContext as useContext21,
|
|
1032
1032
|
useMemo as useMemo22,
|
|
1033
1033
|
useRef as useRef11,
|
|
1034
1034
|
useState as useState12
|
|
@@ -1036,20 +1036,20 @@ import React20, {
|
|
|
1036
1036
|
import { useMemo as useMemo21 } from "react";
|
|
1037
1037
|
import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1038
1038
|
import { useRef as useRef12 } from "react";
|
|
1039
|
-
import { useContext as
|
|
1040
|
-
import { useContext as
|
|
1039
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
|
|
1040
|
+
import { useContext as useContext23 } from "react";
|
|
1041
1041
|
import {
|
|
1042
1042
|
useCallback as useCallback12,
|
|
1043
|
-
useContext as
|
|
1043
|
+
useContext as useContext27,
|
|
1044
1044
|
useEffect as useEffect12,
|
|
1045
1045
|
useLayoutEffect as useLayoutEffect8,
|
|
1046
1046
|
useRef as useRef17
|
|
1047
1047
|
} from "react";
|
|
1048
1048
|
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef15 } from "react";
|
|
1049
|
-
import { useContext as
|
|
1049
|
+
import { useContext as useContext26, useMemo as useMemo25 } from "react";
|
|
1050
1050
|
import React21, {
|
|
1051
1051
|
useCallback as useCallback10,
|
|
1052
|
-
useContext as
|
|
1052
|
+
useContext as useContext25,
|
|
1053
1053
|
useEffect as useEffect9,
|
|
1054
1054
|
useLayoutEffect as useLayoutEffect7,
|
|
1055
1055
|
useMemo as useMemo24,
|
|
@@ -1061,11 +1061,11 @@ import React22 from "react";
|
|
|
1061
1061
|
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
1062
1062
|
import { useEffect as useEffect11, useRef as useRef16 } from "react";
|
|
1063
1063
|
import { useEffect as useEffect13 } from "react";
|
|
1064
|
-
import { createContext as createContext22, useContext as
|
|
1064
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
|
|
1065
1065
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
1066
1066
|
import {
|
|
1067
1067
|
forwardRef as forwardRef7,
|
|
1068
|
-
useContext as
|
|
1068
|
+
useContext as useContext30,
|
|
1069
1069
|
useEffect as useEffect15,
|
|
1070
1070
|
useImperativeHandle as useImperativeHandle5,
|
|
1071
1071
|
useLayoutEffect as useLayoutEffect9,
|
|
@@ -1078,7 +1078,7 @@ import { forwardRef as forwardRef9, useCallback as useCallback14, useState as us
|
|
|
1078
1078
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1079
1079
|
import {
|
|
1080
1080
|
useCallback as useCallback15,
|
|
1081
|
-
useContext as
|
|
1081
|
+
useContext as useContext32,
|
|
1082
1082
|
useImperativeHandle as useImperativeHandle6,
|
|
1083
1083
|
useLayoutEffect as useLayoutEffect10,
|
|
1084
1084
|
useRef as useRef20,
|
|
@@ -1097,7 +1097,7 @@ import {
|
|
|
1097
1097
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1098
1098
|
import React29 from "react";
|
|
1099
1099
|
import { useMemo as useMemo32 } from "react";
|
|
1100
|
-
import { createContext as createContext23, useContext as
|
|
1100
|
+
import { createContext as createContext23, useContext as useContext33, useMemo as useMemo31 } from "react";
|
|
1101
1101
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1102
1102
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1103
1103
|
import React31 from "react";
|
|
@@ -1105,7 +1105,7 @@ import React32, { createContext as createContext24 } from "react";
|
|
|
1105
1105
|
import { useCallback as useCallback18 } from "react";
|
|
1106
1106
|
import {
|
|
1107
1107
|
useCallback as useCallback17,
|
|
1108
|
-
useContext as
|
|
1108
|
+
useContext as useContext34,
|
|
1109
1109
|
useEffect as useEffect16,
|
|
1110
1110
|
useLayoutEffect as useLayoutEffect11,
|
|
1111
1111
|
useMemo as useMemo33,
|
|
@@ -1114,7 +1114,7 @@ import {
|
|
|
1114
1114
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1115
1115
|
import React34, {
|
|
1116
1116
|
forwardRef as forwardRef10,
|
|
1117
|
-
useContext as
|
|
1117
|
+
useContext as useContext35,
|
|
1118
1118
|
useEffect as useEffect18,
|
|
1119
1119
|
useImperativeHandle as useImperativeHandle8,
|
|
1120
1120
|
useMemo as useMemo34,
|
|
@@ -1132,10 +1132,10 @@ import React38, { createContext as createContext25 } from "react";
|
|
|
1132
1132
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1133
1133
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1134
1134
|
import React40 from "react";
|
|
1135
|
-
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as
|
|
1135
|
+
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext37 } from "react";
|
|
1136
1136
|
import {
|
|
1137
1137
|
forwardRef as forwardRef12,
|
|
1138
|
-
useContext as
|
|
1138
|
+
useContext as useContext36,
|
|
1139
1139
|
useEffect as useEffect19,
|
|
1140
1140
|
useImperativeHandle as useImperativeHandle9,
|
|
1141
1141
|
useLayoutEffect as useLayoutEffect12,
|
|
@@ -2489,19 +2489,6 @@ class CanvasPool {
|
|
|
2489
2489
|
}
|
|
2490
2490
|
}
|
|
2491
2491
|
}
|
|
2492
|
-
var flattenEffects = (effects) => {
|
|
2493
|
-
const out = [];
|
|
2494
|
-
for (const item of effects) {
|
|
2495
|
-
if (Array.isArray(item)) {
|
|
2496
|
-
for (const inner of item) {
|
|
2497
|
-
out.push(inner);
|
|
2498
|
-
}
|
|
2499
|
-
} else {
|
|
2500
|
-
out.push(item);
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
return out;
|
|
2504
|
-
};
|
|
2505
2492
|
var groupByBackend = (effects) => {
|
|
2506
2493
|
const runs = [];
|
|
2507
2494
|
let current = [];
|
|
@@ -2573,8 +2560,7 @@ var runEffectChain = async ({
|
|
|
2573
2560
|
}) => {
|
|
2574
2561
|
const runId = ++state.currentRunId;
|
|
2575
2562
|
const isCancelled = () => state.currentRunId !== runId;
|
|
2576
|
-
const
|
|
2577
|
-
const runs = groupByBackend(flattened);
|
|
2563
|
+
const runs = groupByBackend(effects);
|
|
2578
2564
|
let currentImage = source;
|
|
2579
2565
|
let lastTarget = null;
|
|
2580
2566
|
if (runs.length === 0) {
|
|
@@ -2668,12 +2654,329 @@ var useEffectChainState = () => {
|
|
|
2668
2654
|
}
|
|
2669
2655
|
}), []);
|
|
2670
2656
|
};
|
|
2657
|
+
var OverrideIdsToNodePathsGettersContext = createContext14({
|
|
2658
|
+
overrideIdToNodePathMappings: {}
|
|
2659
|
+
});
|
|
2660
|
+
var OverrideIdsToNodePathsSettersContext = createContext14({
|
|
2661
|
+
setOverrideIdToNodePath: () => {
|
|
2662
|
+
throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
|
|
2663
|
+
}
|
|
2664
|
+
});
|
|
2665
|
+
var SequenceManager = React10.createContext({
|
|
2666
|
+
registerSequence: () => {
|
|
2667
|
+
throw new Error("SequenceManagerContext not initialized");
|
|
2668
|
+
},
|
|
2669
|
+
unregisterSequence: () => {
|
|
2670
|
+
throw new Error("SequenceManagerContext not initialized");
|
|
2671
|
+
},
|
|
2672
|
+
sequences: []
|
|
2673
|
+
});
|
|
2674
|
+
var SequenceVisibilityToggleContext = React10.createContext({
|
|
2675
|
+
hidden: {},
|
|
2676
|
+
setHidden: () => {
|
|
2677
|
+
throw new Error("SequenceVisibilityToggle not initialized");
|
|
2678
|
+
}
|
|
2679
|
+
});
|
|
2680
|
+
var makeSequencePropsSubscriptionKey = (key) => {
|
|
2681
|
+
return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
2682
|
+
};
|
|
2683
|
+
var VisualModeCodeValuesContext = React10.createContext({
|
|
2684
|
+
codeValues: {}
|
|
2685
|
+
});
|
|
2686
|
+
var VisualModeDragOverridesContext = React10.createContext({
|
|
2687
|
+
getDragOverrides: () => {
|
|
2688
|
+
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
2689
|
+
},
|
|
2690
|
+
getEffectDragOverrides: () => {
|
|
2691
|
+
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
2692
|
+
}
|
|
2693
|
+
});
|
|
2694
|
+
var VisualModeSettersContext = React10.createContext({
|
|
2695
|
+
setDragOverrides: () => {
|
|
2696
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
2697
|
+
},
|
|
2698
|
+
clearDragOverrides: () => {
|
|
2699
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
2700
|
+
},
|
|
2701
|
+
setEffectDragOverrides: () => {
|
|
2702
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
2703
|
+
},
|
|
2704
|
+
clearEffectDragOverrides: () => {
|
|
2705
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
2706
|
+
},
|
|
2707
|
+
setCodeValues: () => {
|
|
2708
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
2709
|
+
}
|
|
2710
|
+
});
|
|
2711
|
+
var effectDragOverridesKey = (nodePath, effectIndex) => `${makeSequencePropsSubscriptionKey(nodePath)}.effects.${effectIndex}`;
|
|
2712
|
+
var SequenceManagerProvider = ({ children }) => {
|
|
2713
|
+
const [sequences, setSequences] = useState3([]);
|
|
2714
|
+
const [hidden, setHidden] = useState3({});
|
|
2715
|
+
const [dragOverrides, setControlOverrides] = useState3({});
|
|
2716
|
+
const controlOverridesRef = useRef5(dragOverrides);
|
|
2717
|
+
controlOverridesRef.current = dragOverrides;
|
|
2718
|
+
const [effectDragOverridesState, setEffectDragOverridesState] = useState3({});
|
|
2719
|
+
const [codeValues, setCodeValuesMapState] = useState3({});
|
|
2720
|
+
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
2721
|
+
setControlOverrides((prev) => ({
|
|
2722
|
+
...prev,
|
|
2723
|
+
[makeSequencePropsSubscriptionKey(nodePath)]: {
|
|
2724
|
+
...prev[makeSequencePropsSubscriptionKey(nodePath)],
|
|
2725
|
+
[key]: value
|
|
2726
|
+
}
|
|
2727
|
+
}));
|
|
2728
|
+
}, []);
|
|
2729
|
+
const clearDragOverrides = useCallback5((nodePath) => {
|
|
2730
|
+
setControlOverrides((prev) => {
|
|
2731
|
+
const key = makeSequencePropsSubscriptionKey(nodePath);
|
|
2732
|
+
if (!prev[key]) {
|
|
2733
|
+
return prev;
|
|
2734
|
+
}
|
|
2735
|
+
const next = { ...prev };
|
|
2736
|
+
delete next[key];
|
|
2737
|
+
return next;
|
|
2738
|
+
});
|
|
2739
|
+
}, []);
|
|
2740
|
+
const setEffectDragOverrides = useCallback5((nodePath, effectIndex, key, value) => {
|
|
2741
|
+
setEffectDragOverridesState((prev) => {
|
|
2742
|
+
const mapKey = effectDragOverridesKey(nodePath, effectIndex);
|
|
2743
|
+
return {
|
|
2744
|
+
...prev,
|
|
2745
|
+
[mapKey]: {
|
|
2746
|
+
...prev[mapKey],
|
|
2747
|
+
[key]: value
|
|
2748
|
+
}
|
|
2749
|
+
};
|
|
2750
|
+
});
|
|
2751
|
+
}, []);
|
|
2752
|
+
const clearEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
|
|
2753
|
+
setEffectDragOverridesState((prev) => {
|
|
2754
|
+
const mapKey = effectDragOverridesKey(nodePath, effectIndex);
|
|
2755
|
+
if (!prev[mapKey]) {
|
|
2756
|
+
return prev;
|
|
2757
|
+
}
|
|
2758
|
+
const next = { ...prev };
|
|
2759
|
+
delete next[mapKey];
|
|
2760
|
+
return next;
|
|
2761
|
+
});
|
|
2762
|
+
}, []);
|
|
2763
|
+
const setCodeValues = useCallback5((nodePath, values) => {
|
|
2764
|
+
setCodeValuesMapState((prev) => {
|
|
2765
|
+
const key = makeSequencePropsSubscriptionKey(nodePath);
|
|
2766
|
+
const prevKey = prev[key];
|
|
2767
|
+
const newKey = values(prevKey);
|
|
2768
|
+
if (prevKey === newKey) {
|
|
2769
|
+
return prev;
|
|
2770
|
+
}
|
|
2771
|
+
return { ...prev, [key]: newKey };
|
|
2772
|
+
});
|
|
2773
|
+
}, []);
|
|
2774
|
+
const registerSequence = useCallback5((seq) => {
|
|
2775
|
+
setSequences((seqs) => {
|
|
2776
|
+
return [...seqs, seq];
|
|
2777
|
+
});
|
|
2778
|
+
}, []);
|
|
2779
|
+
const unregisterSequence = useCallback5((seq) => {
|
|
2780
|
+
setSequences((seqs) => seqs.filter((s) => s.id !== seq));
|
|
2781
|
+
}, []);
|
|
2782
|
+
const sequenceContext = useMemo11(() => {
|
|
2783
|
+
return {
|
|
2784
|
+
registerSequence,
|
|
2785
|
+
sequences,
|
|
2786
|
+
unregisterSequence
|
|
2787
|
+
};
|
|
2788
|
+
}, [registerSequence, sequences, unregisterSequence]);
|
|
2789
|
+
const hiddenContext = useMemo11(() => {
|
|
2790
|
+
return {
|
|
2791
|
+
hidden,
|
|
2792
|
+
setHidden
|
|
2793
|
+
};
|
|
2794
|
+
}, [hidden]);
|
|
2795
|
+
const getDragOverrides = useCallback5((nodePath) => {
|
|
2796
|
+
return dragOverrides[makeSequencePropsSubscriptionKey(nodePath)] ?? {};
|
|
2797
|
+
}, [dragOverrides]);
|
|
2798
|
+
const getEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
|
|
2799
|
+
return effectDragOverridesState[effectDragOverridesKey(nodePath, effectIndex)] ?? {};
|
|
2800
|
+
}, [effectDragOverridesState]);
|
|
2801
|
+
const codeValuesContext = useMemo11(() => {
|
|
2802
|
+
return {
|
|
2803
|
+
codeValues
|
|
2804
|
+
};
|
|
2805
|
+
}, [codeValues]);
|
|
2806
|
+
const dragOverridesContext = useMemo11(() => {
|
|
2807
|
+
return {
|
|
2808
|
+
getDragOverrides,
|
|
2809
|
+
getEffectDragOverrides
|
|
2810
|
+
};
|
|
2811
|
+
}, [getDragOverrides, getEffectDragOverrides]);
|
|
2812
|
+
const settersContext = useMemo11(() => {
|
|
2813
|
+
return {
|
|
2814
|
+
setDragOverrides,
|
|
2815
|
+
clearDragOverrides,
|
|
2816
|
+
setEffectDragOverrides,
|
|
2817
|
+
clearEffectDragOverrides,
|
|
2818
|
+
setCodeValues
|
|
2819
|
+
};
|
|
2820
|
+
}, [
|
|
2821
|
+
setDragOverrides,
|
|
2822
|
+
clearDragOverrides,
|
|
2823
|
+
setEffectDragOverrides,
|
|
2824
|
+
clearEffectDragOverrides,
|
|
2825
|
+
setCodeValues
|
|
2826
|
+
]);
|
|
2827
|
+
return /* @__PURE__ */ jsx9(SequenceManager.Provider, {
|
|
2828
|
+
value: sequenceContext,
|
|
2829
|
+
children: /* @__PURE__ */ jsx9(SequenceVisibilityToggleContext.Provider, {
|
|
2830
|
+
value: hiddenContext,
|
|
2831
|
+
children: /* @__PURE__ */ jsx9(VisualModeCodeValuesContext.Provider, {
|
|
2832
|
+
value: codeValuesContext,
|
|
2833
|
+
children: /* @__PURE__ */ jsx9(VisualModeDragOverridesContext.Provider, {
|
|
2834
|
+
value: dragOverridesContext,
|
|
2835
|
+
children: /* @__PURE__ */ jsx9(VisualModeSettersContext.Provider, {
|
|
2836
|
+
value: settersContext,
|
|
2837
|
+
children
|
|
2838
|
+
})
|
|
2839
|
+
})
|
|
2840
|
+
})
|
|
2841
|
+
})
|
|
2842
|
+
});
|
|
2843
|
+
};
|
|
2844
|
+
var mergeOverrides = ({
|
|
2845
|
+
descriptor,
|
|
2846
|
+
codeOverrides,
|
|
2847
|
+
dragOverrides
|
|
2848
|
+
}) => {
|
|
2849
|
+
if (!codeOverrides && !dragOverrides) {
|
|
2850
|
+
return { params: descriptor.params, effectKey: descriptor.effectKey };
|
|
2851
|
+
}
|
|
2852
|
+
const merged = {
|
|
2853
|
+
...descriptor.params
|
|
2854
|
+
};
|
|
2855
|
+
if (codeOverrides) {
|
|
2856
|
+
for (const [key, value] of Object.entries(codeOverrides)) {
|
|
2857
|
+
if (value !== undefined) {
|
|
2858
|
+
merged[key] = value;
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
if (dragOverrides) {
|
|
2863
|
+
for (const [key, value] of Object.entries(dragOverrides)) {
|
|
2864
|
+
merged[key] = value;
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
return {
|
|
2868
|
+
params: merged,
|
|
2869
|
+
effectKey: descriptor.definition.calculateKey(merged)
|
|
2870
|
+
};
|
|
2871
|
+
};
|
|
2872
|
+
var extractCodeOverrides = (propStatus) => {
|
|
2873
|
+
if (!propStatus) {
|
|
2874
|
+
return null;
|
|
2875
|
+
}
|
|
2876
|
+
const out = {};
|
|
2877
|
+
let hasAny = false;
|
|
2878
|
+
for (const [key, status] of Object.entries(propStatus)) {
|
|
2879
|
+
if (status.canUpdate) {
|
|
2880
|
+
out[key] = status.codeValue;
|
|
2881
|
+
hasAny = true;
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2884
|
+
return hasAny ? out : null;
|
|
2885
|
+
};
|
|
2886
|
+
var useMemoizedEffectDefinitions = (effects) => {
|
|
2887
|
+
const previousRef = useRef6(null);
|
|
2888
|
+
const definitions = effects.map((descriptor) => descriptor.definition);
|
|
2889
|
+
const previous = previousRef.current;
|
|
2890
|
+
const isSame = previous !== null && previous.length === definitions.length && previous.every((def, i) => def === definitions[i]);
|
|
2891
|
+
if (isSame) {
|
|
2892
|
+
return previous;
|
|
2893
|
+
}
|
|
2894
|
+
previousRef.current = definitions;
|
|
2895
|
+
return definitions;
|
|
2896
|
+
};
|
|
2897
|
+
var getEffectCodeValuesCtx = ({
|
|
2898
|
+
codeValues,
|
|
2899
|
+
nodePath,
|
|
2900
|
+
effectIndex
|
|
2901
|
+
}) => {
|
|
2902
|
+
const status = codeValues[makeSequencePropsSubscriptionKey(nodePath)];
|
|
2903
|
+
if (!status) {
|
|
2904
|
+
return { type: "cannot-update-sequence", reason: "not-found" };
|
|
2905
|
+
}
|
|
2906
|
+
if (!status.canUpdate) {
|
|
2907
|
+
return { type: "cannot-update-sequence", reason: status.reason };
|
|
2908
|
+
}
|
|
2909
|
+
const effect = status.effects.find((e) => e.effectIndex === effectIndex);
|
|
2910
|
+
if (!effect) {
|
|
2911
|
+
return { type: "cannot-update-effect", reason: "not-found" };
|
|
2912
|
+
}
|
|
2913
|
+
if (!effect.canUpdate) {
|
|
2914
|
+
return { type: "cannot-update-effect", reason: effect.reason };
|
|
2915
|
+
}
|
|
2916
|
+
return { type: "can-update-effect", props: effect.props };
|
|
2917
|
+
};
|
|
2918
|
+
var getCodeValuesCtx = (codeValues, nodePath) => {
|
|
2919
|
+
const status = codeValues[makeSequencePropsSubscriptionKey(nodePath)];
|
|
2920
|
+
if (!status) {
|
|
2921
|
+
return;
|
|
2922
|
+
}
|
|
2923
|
+
if (!status.canUpdate) {
|
|
2924
|
+
return;
|
|
2925
|
+
}
|
|
2926
|
+
return status.props;
|
|
2927
|
+
};
|
|
2928
|
+
var useMemoizedEffects = ({
|
|
2929
|
+
effects,
|
|
2930
|
+
overrideId
|
|
2931
|
+
}) => {
|
|
2932
|
+
const previousRef = useRef6(null);
|
|
2933
|
+
const { codeValues } = useContext12(VisualModeCodeValuesContext);
|
|
2934
|
+
const { getEffectDragOverrides } = useContext12(VisualModeDragOverridesContext);
|
|
2935
|
+
const { overrideIdToNodePathMappings } = useContext12(OverrideIdsToNodePathsGettersContext);
|
|
2936
|
+
const previous = previousRef.current;
|
|
2937
|
+
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
2938
|
+
const resolved = effects.map((descriptor, index) => {
|
|
2939
|
+
if (nodePath === null) {
|
|
2940
|
+
return {
|
|
2941
|
+
descriptor,
|
|
2942
|
+
params: descriptor.params,
|
|
2943
|
+
effectKey: descriptor.effectKey
|
|
2944
|
+
};
|
|
2945
|
+
}
|
|
2946
|
+
const effectStatus = getEffectCodeValuesCtx({
|
|
2947
|
+
codeValues,
|
|
2948
|
+
nodePath,
|
|
2949
|
+
effectIndex: index
|
|
2950
|
+
});
|
|
2951
|
+
const codeOverrides = effectStatus.type === "can-update-effect" ? extractCodeOverrides(effectStatus.props) : null;
|
|
2952
|
+
const dragOverridesMap = getEffectDragOverrides(nodePath, index);
|
|
2953
|
+
const dragOverrides = Object.keys(dragOverridesMap).length === 0 ? null : dragOverridesMap;
|
|
2954
|
+
const { params, effectKey } = mergeOverrides({
|
|
2955
|
+
descriptor,
|
|
2956
|
+
codeOverrides,
|
|
2957
|
+
dragOverrides
|
|
2958
|
+
});
|
|
2959
|
+
return { descriptor, params, effectKey };
|
|
2960
|
+
});
|
|
2961
|
+
const isSame = previous !== null && previous.length === resolved.length && previous.every((p, i) => p.definition === resolved[i].descriptor.definition && p.effectKey === resolved[i].effectKey);
|
|
2962
|
+
if (isSame) {
|
|
2963
|
+
return previous;
|
|
2964
|
+
}
|
|
2965
|
+
const next = resolved.map(({ descriptor, params, effectKey }) => ({
|
|
2966
|
+
definition: descriptor.definition,
|
|
2967
|
+
effectKey,
|
|
2968
|
+
params,
|
|
2969
|
+
memoized: true
|
|
2970
|
+
}));
|
|
2971
|
+
previousRef.current = next;
|
|
2972
|
+
return next;
|
|
2973
|
+
};
|
|
2671
2974
|
var componentsToAddStacksTo = [];
|
|
2672
2975
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
2673
2976
|
var addSequenceStackTraces = (component) => {
|
|
2674
2977
|
componentsToAddStacksTo.push(component);
|
|
2675
2978
|
};
|
|
2676
|
-
var VERSION = "4.0.
|
|
2979
|
+
var VERSION = "4.0.462";
|
|
2677
2980
|
var checkMultipleRemotionVersions = () => {
|
|
2678
2981
|
if (typeof globalThis === "undefined") {
|
|
2679
2982
|
return;
|
|
@@ -2701,27 +3004,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2701
3004
|
}
|
|
2702
3005
|
set();
|
|
2703
3006
|
};
|
|
2704
|
-
var useMemoizedEffects = (effects) => {
|
|
2705
|
-
const previousRef = useRef5(null);
|
|
2706
|
-
const previous = previousRef.current;
|
|
2707
|
-
const isSame = previous !== null && previous.length === effects.length && previous.every((p, i) => p.definition === effects[i].definition && p.stack === effects[i].stack);
|
|
2708
|
-
if (isSame) {
|
|
2709
|
-
return previous;
|
|
2710
|
-
}
|
|
2711
|
-
const next = effects.map((e) => ({
|
|
2712
|
-
definition: e.definition,
|
|
2713
|
-
stack: e.stack
|
|
2714
|
-
}));
|
|
2715
|
-
previousRef.current = next;
|
|
2716
|
-
return next;
|
|
2717
|
-
};
|
|
2718
3007
|
var useUnsafeVideoConfig = () => {
|
|
2719
|
-
const context =
|
|
3008
|
+
const context = useContext13(SequenceContext);
|
|
2720
3009
|
const ctxWidth = context?.width ?? null;
|
|
2721
3010
|
const ctxHeight = context?.height ?? null;
|
|
2722
3011
|
const ctxDuration = context?.durationInFrames ?? null;
|
|
2723
3012
|
const video = useVideo();
|
|
2724
|
-
return
|
|
3013
|
+
return useMemo13(() => {
|
|
2725
3014
|
if (!video) {
|
|
2726
3015
|
return null;
|
|
2727
3016
|
}
|
|
@@ -2759,7 +3048,7 @@ var useUnsafeVideoConfig = () => {
|
|
|
2759
3048
|
};
|
|
2760
3049
|
var useVideoConfig = () => {
|
|
2761
3050
|
const videoConfig = useUnsafeVideoConfig();
|
|
2762
|
-
const context =
|
|
3051
|
+
const context = useContext14(CanUseRemotionHooks);
|
|
2763
3052
|
const isPlayer = useIsPlayer();
|
|
2764
3053
|
if (!videoConfig) {
|
|
2765
3054
|
if (typeof window !== "undefined" && window.remotion_isPlayer || isPlayer) {
|
|
@@ -2795,7 +3084,7 @@ var Freeze = ({
|
|
|
2795
3084
|
if (!Number.isFinite(frameToFreeze)) {
|
|
2796
3085
|
throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
|
|
2797
3086
|
}
|
|
2798
|
-
const isActive =
|
|
3087
|
+
const isActive = useMemo14(() => {
|
|
2799
3088
|
if (typeof active === "boolean") {
|
|
2800
3089
|
return active;
|
|
2801
3090
|
}
|
|
@@ -2804,9 +3093,9 @@ var Freeze = ({
|
|
|
2804
3093
|
}
|
|
2805
3094
|
}, [active, frame]);
|
|
2806
3095
|
const timelineContext = useTimelineContext();
|
|
2807
|
-
const sequenceContext =
|
|
3096
|
+
const sequenceContext = useContext15(SequenceContext);
|
|
2808
3097
|
const relativeFrom = sequenceContext?.relativeFrom ?? 0;
|
|
2809
|
-
const timelineValue =
|
|
3098
|
+
const timelineValue = useMemo14(() => {
|
|
2810
3099
|
if (!isActive) {
|
|
2811
3100
|
return timelineContext;
|
|
2812
3101
|
}
|
|
@@ -2821,7 +3110,7 @@ var Freeze = ({
|
|
|
2821
3110
|
}
|
|
2822
3111
|
};
|
|
2823
3112
|
}, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
|
|
2824
|
-
const newSequenceContext =
|
|
3113
|
+
const newSequenceContext = useMemo14(() => {
|
|
2825
3114
|
if (!sequenceContext) {
|
|
2826
3115
|
return null;
|
|
2827
3116
|
}
|
|
@@ -2833,15 +3122,15 @@ var Freeze = ({
|
|
|
2833
3122
|
cumulatedFrom: 0
|
|
2834
3123
|
};
|
|
2835
3124
|
}, [sequenceContext, isActive]);
|
|
2836
|
-
return /* @__PURE__ */
|
|
3125
|
+
return /* @__PURE__ */ jsx11(TimelineContext.Provider, {
|
|
2837
3126
|
value: timelineValue,
|
|
2838
|
-
children: /* @__PURE__ */
|
|
3127
|
+
children: /* @__PURE__ */ jsx11(SequenceContext.Provider, {
|
|
2839
3128
|
value: newSequenceContext,
|
|
2840
3129
|
children
|
|
2841
3130
|
})
|
|
2842
3131
|
});
|
|
2843
3132
|
};
|
|
2844
|
-
var PremountContext =
|
|
3133
|
+
var PremountContext = createContext15({
|
|
2845
3134
|
premountFramesRemaining: 0
|
|
2846
3135
|
});
|
|
2847
3136
|
var sequenceStyleSchema = {
|
|
@@ -2872,6 +3161,22 @@ var sequenceStyleSchema = {
|
|
|
2872
3161
|
step: 0.01,
|
|
2873
3162
|
default: 1,
|
|
2874
3163
|
description: "Opacity"
|
|
3164
|
+
},
|
|
3165
|
+
premountFor: {
|
|
3166
|
+
type: "number",
|
|
3167
|
+
default: 0,
|
|
3168
|
+
description: "Premount For",
|
|
3169
|
+
min: 0,
|
|
3170
|
+
step: 1
|
|
3171
|
+
},
|
|
3172
|
+
postmountFor: {
|
|
3173
|
+
type: "hidden"
|
|
3174
|
+
},
|
|
3175
|
+
styleWhilePremounted: {
|
|
3176
|
+
type: "hidden"
|
|
3177
|
+
},
|
|
3178
|
+
styleWhilePostmounted: {
|
|
3179
|
+
type: "hidden"
|
|
2875
3180
|
}
|
|
2876
3181
|
};
|
|
2877
3182
|
var sequenceSchema = {
|
|
@@ -2892,159 +3197,45 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
2892
3197
|
default: "none"
|
|
2893
3198
|
}
|
|
2894
3199
|
};
|
|
2895
|
-
var
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
var SequenceVisibilityToggleContext = React12.createContext({
|
|
2908
|
-
hidden: {},
|
|
2909
|
-
setHidden: () => {
|
|
2910
|
-
throw new Error("SequenceVisibilityToggle not initialized");
|
|
2911
|
-
}
|
|
2912
|
-
});
|
|
2913
|
-
var getCodeValues = (codeValues, nodePath) => {
|
|
2914
|
-
const status = codeValues[nodePathToString(nodePath)];
|
|
2915
|
-
if (!status) {
|
|
2916
|
-
return;
|
|
2917
|
-
}
|
|
2918
|
-
if (!status.canUpdate) {
|
|
2919
|
-
return;
|
|
2920
|
-
}
|
|
2921
|
-
return status.props;
|
|
2922
|
-
};
|
|
2923
|
-
var getIsJsxInMapCallback = (codeValues, nodePath) => {
|
|
2924
|
-
const status = codeValues[nodePathToString(nodePath)];
|
|
2925
|
-
if (!status) {
|
|
2926
|
-
return false;
|
|
2927
|
-
}
|
|
2928
|
-
if (!status.canUpdate) {
|
|
2929
|
-
return false;
|
|
2930
|
-
}
|
|
2931
|
-
return status.jsxInMapCallback;
|
|
2932
|
-
};
|
|
2933
|
-
var VisualModeGettersContext = React12.createContext({
|
|
2934
|
-
getDragOverrides: () => {
|
|
2935
|
-
throw new Error("VisualModeGettersContext not initialized");
|
|
2936
|
-
},
|
|
2937
|
-
getCodeValues: () => {
|
|
2938
|
-
throw new Error("VisualModeGettersContext not initialized");
|
|
2939
|
-
},
|
|
2940
|
-
getIsJsxInMapCallback: () => {
|
|
2941
|
-
throw new Error("VisualModeGettersContext not initialized");
|
|
2942
|
-
},
|
|
2943
|
-
visualModeEnabled: false
|
|
2944
|
-
});
|
|
2945
|
-
var VisualModeSettersContext = React12.createContext({
|
|
2946
|
-
setDragOverrides: () => {
|
|
2947
|
-
throw new Error("VisualModeSettersContext not initialized");
|
|
2948
|
-
},
|
|
2949
|
-
clearDragOverrides: () => {
|
|
2950
|
-
throw new Error("VisualModeSettersContext not initialized");
|
|
2951
|
-
},
|
|
2952
|
-
setCodeValues: () => {
|
|
2953
|
-
throw new Error("VisualModeSettersContext not initialized");
|
|
2954
|
-
}
|
|
2955
|
-
});
|
|
2956
|
-
var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
2957
|
-
const [sequences, setSequences] = useState4([]);
|
|
2958
|
-
const [hidden, setHidden] = useState4({});
|
|
2959
|
-
const [dragOverrides, setControlOverrides] = useState4({});
|
|
2960
|
-
const controlOverridesRef = useRef6(dragOverrides);
|
|
2961
|
-
controlOverridesRef.current = dragOverrides;
|
|
2962
|
-
const [codeValues, setCodeValuesMapState] = useState4({});
|
|
2963
|
-
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
2964
|
-
setControlOverrides((prev) => ({
|
|
2965
|
-
...prev,
|
|
2966
|
-
[nodePathToString(nodePath)]: {
|
|
2967
|
-
...prev[nodePathToString(nodePath)],
|
|
2968
|
-
[key]: value
|
|
2969
|
-
}
|
|
2970
|
-
}));
|
|
2971
|
-
}, []);
|
|
2972
|
-
const clearDragOverrides = useCallback5((nodePath) => {
|
|
2973
|
-
setControlOverrides((prev) => {
|
|
2974
|
-
const key = nodePathToString(nodePath);
|
|
2975
|
-
if (!prev[key]) {
|
|
2976
|
-
return prev;
|
|
3200
|
+
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
3201
|
+
var deleteNestedKey = (obj, keysToRemove) => {
|
|
3202
|
+
for (const key of keysToRemove) {
|
|
3203
|
+
const parts = key.split(".");
|
|
3204
|
+
const parents = [obj];
|
|
3205
|
+
let current = obj;
|
|
3206
|
+
for (let i = 0;i < parts.length - 1; i++) {
|
|
3207
|
+
const part = parts[i];
|
|
3208
|
+
const next = current[part];
|
|
3209
|
+
if (next === undefined || next === null) {
|
|
3210
|
+
current = null;
|
|
3211
|
+
break;
|
|
2977
3212
|
}
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
3213
|
+
current = next;
|
|
3214
|
+
parents.push(current);
|
|
3215
|
+
}
|
|
3216
|
+
if (current === null) {
|
|
3217
|
+
continue;
|
|
3218
|
+
}
|
|
3219
|
+
delete current[parts[parts.length - 1]];
|
|
3220
|
+
for (let i = parents.length - 1;i > 0; i--) {
|
|
3221
|
+
const parent = parents[i];
|
|
3222
|
+
if (Object.keys(parent).length === 0) {
|
|
3223
|
+
const parentKey = parts[i - 1];
|
|
3224
|
+
delete parents[i - 1][parentKey];
|
|
3225
|
+
} else {
|
|
3226
|
+
break;
|
|
2988
3227
|
}
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
const registerSequence = useCallback5((seq) => {
|
|
2993
|
-
setSequences((seqs) => {
|
|
2994
|
-
return [...seqs, seq];
|
|
2995
|
-
});
|
|
2996
|
-
}, []);
|
|
2997
|
-
const unregisterSequence = useCallback5((seq) => {
|
|
2998
|
-
setSequences((seqs) => seqs.filter((s) => s.id !== seq));
|
|
2999
|
-
}, []);
|
|
3000
|
-
const sequenceContext = useMemo14(() => {
|
|
3001
|
-
return {
|
|
3002
|
-
registerSequence,
|
|
3003
|
-
sequences,
|
|
3004
|
-
unregisterSequence
|
|
3005
|
-
};
|
|
3006
|
-
}, [registerSequence, sequences, unregisterSequence]);
|
|
3007
|
-
const hiddenContext = useMemo14(() => {
|
|
3008
|
-
return {
|
|
3009
|
-
hidden,
|
|
3010
|
-
setHidden
|
|
3011
|
-
};
|
|
3012
|
-
}, [hidden]);
|
|
3013
|
-
const gettersContext = useMemo14(() => {
|
|
3014
|
-
return {
|
|
3015
|
-
visualModeEnabled,
|
|
3016
|
-
getDragOverrides: (nodePath) => dragOverrides[nodePathToString(nodePath)] ?? {},
|
|
3017
|
-
getCodeValues: (nodePath) => getCodeValues(codeValues, nodePath),
|
|
3018
|
-
getIsJsxInMapCallback: (nodePath) => getIsJsxInMapCallback(codeValues, nodePath)
|
|
3019
|
-
};
|
|
3020
|
-
}, [visualModeEnabled, dragOverrides, codeValues]);
|
|
3021
|
-
const settersContext = useMemo14(() => {
|
|
3022
|
-
return {
|
|
3023
|
-
setDragOverrides,
|
|
3024
|
-
clearDragOverrides,
|
|
3025
|
-
setCodeValues
|
|
3026
|
-
};
|
|
3027
|
-
}, [setDragOverrides, clearDragOverrides, setCodeValues]);
|
|
3028
|
-
return /* @__PURE__ */ jsx11(SequenceManager.Provider, {
|
|
3029
|
-
value: sequenceContext,
|
|
3030
|
-
children: /* @__PURE__ */ jsx11(SequenceVisibilityToggleContext.Provider, {
|
|
3031
|
-
value: hiddenContext,
|
|
3032
|
-
children: /* @__PURE__ */ jsx11(VisualModeGettersContext.Provider, {
|
|
3033
|
-
value: gettersContext,
|
|
3034
|
-
children: /* @__PURE__ */ jsx11(VisualModeSettersContext.Provider, {
|
|
3035
|
-
value: settersContext,
|
|
3036
|
-
children
|
|
3037
|
-
})
|
|
3038
|
-
})
|
|
3039
|
-
})
|
|
3040
|
-
});
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
return obj;
|
|
3041
3231
|
};
|
|
3042
|
-
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
3043
3232
|
var flattenActiveSchema = (schema, resolve) => {
|
|
3044
3233
|
const out = {};
|
|
3045
3234
|
for (const key of Object.keys(schema)) {
|
|
3046
3235
|
const field = schema[key];
|
|
3047
|
-
if (field.type === "
|
|
3236
|
+
if (field.type === "hidden") {
|
|
3237
|
+
continue;
|
|
3238
|
+
} else if (field.type === "enum") {
|
|
3048
3239
|
out[key] = field;
|
|
3049
3240
|
const current = resolve(key) ?? field.default;
|
|
3050
3241
|
const variant = field.variants[current];
|
|
@@ -3079,17 +3270,38 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
3079
3270
|
}
|
|
3080
3271
|
return out;
|
|
3081
3272
|
};
|
|
3082
|
-
var
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3273
|
+
var findPropsToDelete = ({
|
|
3274
|
+
schema,
|
|
3275
|
+
key,
|
|
3276
|
+
value
|
|
3277
|
+
}) => {
|
|
3278
|
+
const fieldSchema = schema[key];
|
|
3279
|
+
if (!fieldSchema) {
|
|
3280
|
+
throw new Error("Key " + JSON.stringify(key) + " not found in schema");
|
|
3088
3281
|
}
|
|
3089
|
-
|
|
3282
|
+
if (typeof value !== "string") {
|
|
3283
|
+
throw new Error("Value must be a string, but is " + JSON.stringify(value));
|
|
3284
|
+
}
|
|
3285
|
+
if (fieldSchema.type !== "enum") {
|
|
3286
|
+
throw new Error("Key " + JSON.stringify(key) + " is not an enum");
|
|
3287
|
+
}
|
|
3288
|
+
const currentVariant = fieldSchema.variants[value];
|
|
3289
|
+
if (!currentVariant) {
|
|
3290
|
+
throw new Error("Value for " + JSON.stringify(key) + " must be one of " + Object.keys(fieldSchema.variants).map((v) => JSON.stringify(v)).join(", ") + ", got " + JSON.stringify(value));
|
|
3291
|
+
}
|
|
3292
|
+
const otherVariants = Object.keys(fieldSchema.variants).filter((v) => v !== value);
|
|
3293
|
+
const otherKeys = new Set;
|
|
3294
|
+
for (const variant of otherVariants) {
|
|
3295
|
+
const otherVariant = fieldSchema.variants[variant];
|
|
3296
|
+
const keys = Object.keys(otherVariant);
|
|
3297
|
+
for (const k of keys) {
|
|
3298
|
+
otherKeys.add(k);
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
return [...otherKeys];
|
|
3302
|
+
};
|
|
3090
3303
|
var getEffectiveVisualModeValue = ({
|
|
3091
3304
|
codeValue,
|
|
3092
|
-
runtimeValue,
|
|
3093
3305
|
dragOverrideValue,
|
|
3094
3306
|
defaultValue,
|
|
3095
3307
|
shouldResortToDefaultValueIfUndefined = false
|
|
@@ -3097,12 +3309,6 @@ var getEffectiveVisualModeValue = ({
|
|
|
3097
3309
|
if (dragOverrideValue !== undefined) {
|
|
3098
3310
|
return dragOverrideValue;
|
|
3099
3311
|
}
|
|
3100
|
-
if (!codeValue) {
|
|
3101
|
-
return runtimeValue;
|
|
3102
|
-
}
|
|
3103
|
-
if (!codeValue.canUpdate) {
|
|
3104
|
-
return runtimeValue;
|
|
3105
|
-
}
|
|
3106
3312
|
if (codeValue.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
|
|
3107
3313
|
return defaultValue;
|
|
3108
3314
|
}
|
|
@@ -3132,17 +3338,37 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
3132
3338
|
propStatus
|
|
3133
3339
|
}) => {
|
|
3134
3340
|
const merged = {};
|
|
3341
|
+
const propsToDelete = new Set;
|
|
3135
3342
|
for (const key of Object.keys(currentValue)) {
|
|
3136
3343
|
const codeValueStatus = propStatus?.[key] ?? null;
|
|
3137
|
-
|
|
3344
|
+
const field = findFieldInSchema(schema, key);
|
|
3345
|
+
if (field?.type === "hidden") {
|
|
3346
|
+
continue;
|
|
3347
|
+
}
|
|
3348
|
+
const value = codeValueStatus === null || codeValueStatus.canUpdate === false ? currentValue[key] : getEffectiveVisualModeValue({
|
|
3138
3349
|
codeValue: codeValueStatus,
|
|
3139
|
-
runtimeValue: currentValue[key],
|
|
3140
3350
|
dragOverrideValue: overrideValues[key],
|
|
3141
|
-
defaultValue:
|
|
3351
|
+
defaultValue: field?.default,
|
|
3142
3352
|
shouldResortToDefaultValueIfUndefined: false
|
|
3143
3353
|
});
|
|
3354
|
+
if (value === undefined) {
|
|
3355
|
+
propsToDelete.add(key);
|
|
3356
|
+
}
|
|
3357
|
+
merged[key] = value;
|
|
3144
3358
|
}
|
|
3145
|
-
|
|
3359
|
+
for (const key of Object.keys(overrideValues)) {
|
|
3360
|
+
if (schema[key]?.type === "enum") {
|
|
3361
|
+
const propsToDeleteForKey = findPropsToDelete({
|
|
3362
|
+
schema,
|
|
3363
|
+
key,
|
|
3364
|
+
value: merged[key]
|
|
3365
|
+
});
|
|
3366
|
+
for (const propToDelete of propsToDeleteForKey) {
|
|
3367
|
+
propsToDelete.add(propToDelete);
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
return { merged, propsToDelete };
|
|
3146
3372
|
};
|
|
3147
3373
|
var getNestedValue = (obj, key) => {
|
|
3148
3374
|
const parts = key.split(".");
|
|
@@ -3167,7 +3393,8 @@ var selectActiveKeys = (schema, values) => {
|
|
|
3167
3393
|
var mergeValues = ({
|
|
3168
3394
|
props,
|
|
3169
3395
|
valuesDotNotation,
|
|
3170
|
-
schemaKeys
|
|
3396
|
+
schemaKeys,
|
|
3397
|
+
propsToDelete
|
|
3171
3398
|
}) => {
|
|
3172
3399
|
const merged = { ...props };
|
|
3173
3400
|
for (const key of schemaKeys) {
|
|
@@ -3189,26 +3416,25 @@ var mergeValues = ({
|
|
|
3189
3416
|
}
|
|
3190
3417
|
current[parts[parts.length - 1]] = value;
|
|
3191
3418
|
}
|
|
3419
|
+
deleteNestedKey(merged, propsToDelete);
|
|
3192
3420
|
return merged;
|
|
3193
3421
|
};
|
|
3194
3422
|
var stackToOverrideMap = {};
|
|
3195
3423
|
var wrapInSchema = (Component, schema) => {
|
|
3196
|
-
if (typeof process === "undefined" || !process.env?.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
|
|
3197
|
-
return Component;
|
|
3198
|
-
}
|
|
3199
3424
|
const flatSchema = getFlatSchemaWithAllKeys(schema);
|
|
3200
3425
|
const flatKeys = Object.keys(flatSchema);
|
|
3201
3426
|
const Wrapped = forwardRef2((props, ref) => {
|
|
3202
3427
|
const env = useRemotionEnvironment();
|
|
3203
|
-
|
|
3204
|
-
const nodePathMapping = useContext15(OverrideIdsToNodePathsGettersContext);
|
|
3205
|
-
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !visualModeEnabled) {
|
|
3428
|
+
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
3206
3429
|
return React13.createElement(Component, {
|
|
3207
3430
|
...props,
|
|
3208
3431
|
_experimentalControls: null,
|
|
3209
3432
|
ref
|
|
3210
3433
|
});
|
|
3211
3434
|
}
|
|
3435
|
+
const { codeValues } = useContext16(VisualModeCodeValuesContext);
|
|
3436
|
+
const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
3437
|
+
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
3212
3438
|
if (props._experimentalControls) {
|
|
3213
3439
|
return React13.createElement(Component, {
|
|
3214
3440
|
...props,
|
|
@@ -3238,24 +3464,25 @@ var wrapInSchema = (Component, schema) => {
|
|
|
3238
3464
|
overrideId
|
|
3239
3465
|
};
|
|
3240
3466
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
3241
|
-
const valuesDotNotation = useMemo15(() => {
|
|
3467
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo15(() => {
|
|
3242
3468
|
return computeEffectiveSchemaValuesDotNotation({
|
|
3243
3469
|
schema,
|
|
3244
3470
|
currentValue: currentRuntimeValueDotNotation,
|
|
3245
3471
|
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
3246
|
-
propStatus: nodePath === null ? undefined :
|
|
3472
|
+
propStatus: nodePath === null ? undefined : getCodeValuesCtx(codeValues, nodePath)
|
|
3247
3473
|
});
|
|
3248
3474
|
}, [
|
|
3249
3475
|
currentRuntimeValueDotNotation,
|
|
3250
3476
|
getDragOverrides,
|
|
3251
3477
|
nodePath,
|
|
3252
|
-
|
|
3478
|
+
codeValues
|
|
3253
3479
|
]);
|
|
3254
3480
|
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
3255
3481
|
const mergedProps = mergeValues({
|
|
3256
3482
|
props,
|
|
3257
3483
|
valuesDotNotation,
|
|
3258
|
-
schemaKeys: activeKeys
|
|
3484
|
+
schemaKeys: activeKeys,
|
|
3485
|
+
propsToDelete
|
|
3259
3486
|
});
|
|
3260
3487
|
return React13.createElement(Component, {
|
|
3261
3488
|
...mergedProps,
|
|
@@ -3285,7 +3512,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
3285
3512
|
}, ref) => {
|
|
3286
3513
|
const { layout = "absolute-fill" } = other;
|
|
3287
3514
|
const [id] = useState6(() => String(Math.random()));
|
|
3288
|
-
const parentSequence =
|
|
3515
|
+
const parentSequence = useContext17(SequenceContext);
|
|
3289
3516
|
const { rootId } = useTimelineContext();
|
|
3290
3517
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
3291
3518
|
const nonce = useNonce();
|
|
@@ -3311,8 +3538,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
3311
3538
|
const videoConfig = useVideoConfig();
|
|
3312
3539
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
3313
3540
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
3314
|
-
const { registerSequence, unregisterSequence } =
|
|
3315
|
-
const { hidden } =
|
|
3541
|
+
const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
|
|
3542
|
+
const { hidden } = useContext17(SequenceVisibilityToggleContext);
|
|
3316
3543
|
const premounting = useMemo16(() => {
|
|
3317
3544
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
3318
3545
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
@@ -3351,7 +3578,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
3351
3578
|
}, [name]);
|
|
3352
3579
|
const env = useRemotionEnvironment();
|
|
3353
3580
|
const inheritedStack = other?.stack ?? null;
|
|
3354
|
-
const memoizedEffects = useMemoizedEffects(flattenEffects(_experimentalEffects ?? []));
|
|
3355
3581
|
useEffect5(() => {
|
|
3356
3582
|
if (!env.isStudio) {
|
|
3357
3583
|
return;
|
|
@@ -3360,7 +3586,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
3360
3586
|
registerSequence({
|
|
3361
3587
|
type: isMedia.type,
|
|
3362
3588
|
controls: controls ?? null,
|
|
3363
|
-
effects:
|
|
3589
|
+
effects: _experimentalEffects ?? [],
|
|
3364
3590
|
displayName: timelineClipName,
|
|
3365
3591
|
doesVolumeChange: isMedia.data.doesVolumeChange,
|
|
3366
3592
|
duration: actualDurationInFrames,
|
|
@@ -3398,7 +3624,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
3398
3624
|
premountDisplay: premountDisplay ?? null,
|
|
3399
3625
|
postmountDisplay: postmountDisplay ?? null,
|
|
3400
3626
|
controls: controls ?? null,
|
|
3401
|
-
effects:
|
|
3627
|
+
effects: _experimentalEffects ?? []
|
|
3402
3628
|
});
|
|
3403
3629
|
return () => {
|
|
3404
3630
|
unregisterSequence(id);
|
|
@@ -3423,7 +3649,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
3423
3649
|
env.isStudio,
|
|
3424
3650
|
inheritedStack,
|
|
3425
3651
|
controls,
|
|
3426
|
-
|
|
3652
|
+
_experimentalEffects,
|
|
3427
3653
|
isMedia
|
|
3428
3654
|
]);
|
|
3429
3655
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
@@ -3456,7 +3682,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
3456
3682
|
};
|
|
3457
3683
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
3458
3684
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
3459
|
-
const parentPremountContext =
|
|
3685
|
+
const parentPremountContext = useContext17(PremountContext);
|
|
3460
3686
|
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
3461
3687
|
if (props.layout === "none") {
|
|
3462
3688
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
@@ -3890,6 +4116,7 @@ var isHtmlInCanvasSupported = () => {
|
|
|
3890
4116
|
cachedSupport = typeof ctx?.drawElementImage === "function" && typeof canvas.requestPaint === "function" && typeof canvas.captureElementImage === "function";
|
|
3891
4117
|
return cachedSupport;
|
|
3892
4118
|
};
|
|
4119
|
+
var HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = "HTML in Canvas is not supported. Two common causes: Chrome is older than version 148 (update Chrome), or the HTML-in-Canvas flag is disabled at chrome://flags/#canvas-draw-element (enable it and restart Chrome).";
|
|
3893
4120
|
function assertHtmlInCanvasDimensions(width, height) {
|
|
3894
4121
|
if (typeof width !== "number" || typeof height !== "number") {
|
|
3895
4122
|
throw new Error(`HtmlInCanvas: \`width\` and \`height\` must be numbers. Received width=${String(width)}, height=${String(height)}.`);
|
|
@@ -3927,11 +4154,11 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
3927
4154
|
durationInFrames,
|
|
3928
4155
|
...sequenceProps
|
|
3929
4156
|
}, ref) => {
|
|
3930
|
-
const isInsideAncestorHtmlInCanvas =
|
|
4157
|
+
const isInsideAncestorHtmlInCanvas = useContext18(HtmlInCanvasAncestorContext);
|
|
3931
4158
|
assertHtmlInCanvasDimensions(width, height);
|
|
3932
4159
|
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
3933
4160
|
if (!isHtmlInCanvasSupported()) {
|
|
3934
|
-
cancelRender2(new Error(
|
|
4161
|
+
cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
|
|
3935
4162
|
}
|
|
3936
4163
|
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
3937
4164
|
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
@@ -3948,8 +4175,13 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
3948
4175
|
}, [ref]);
|
|
3949
4176
|
const [offscreenCanvas] = useState8(() => new OffscreenCanvas(1, 1));
|
|
3950
4177
|
const chainState = useEffectChainState();
|
|
3951
|
-
const
|
|
3952
|
-
|
|
4178
|
+
const memoizedEffects = useMemoizedEffects({
|
|
4179
|
+
effects,
|
|
4180
|
+
overrideId: controls?.overrideId ?? null
|
|
4181
|
+
});
|
|
4182
|
+
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
4183
|
+
const effectsRef = useRef9(memoizedEffects);
|
|
4184
|
+
effectsRef.current = memoizedEffects;
|
|
3953
4185
|
const frameRef = useRef9(frame);
|
|
3954
4186
|
frameRef.current = frame;
|
|
3955
4187
|
const onPaintRef = useRef9(onPaint);
|
|
@@ -4049,7 +4281,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
4049
4281
|
return;
|
|
4050
4282
|
}
|
|
4051
4283
|
canvas.requestPaint?.();
|
|
4052
|
-
}, [onPaint]);
|
|
4284
|
+
}, [onPaint, memoizedEffects]);
|
|
4053
4285
|
useLayoutEffect3(() => {
|
|
4054
4286
|
const canvas = canvas2dRef.current;
|
|
4055
4287
|
if (!canvas) {
|
|
@@ -4076,7 +4308,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
4076
4308
|
durationInFrames: resolvedDuration,
|
|
4077
4309
|
name: "<HtmlInCanvas>",
|
|
4078
4310
|
_experimentalControls: controls,
|
|
4079
|
-
_experimentalEffects:
|
|
4311
|
+
_experimentalEffects: memoizedEffectDefinitions,
|
|
4080
4312
|
layout: "none",
|
|
4081
4313
|
...sequenceProps,
|
|
4082
4314
|
children: /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
|
|
@@ -4188,7 +4420,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
4188
4420
|
};
|
|
4189
4421
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
4190
4422
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
4191
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
4423
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
4192
4424
|
const env = useRemotionEnvironment();
|
|
4193
4425
|
const frame = useCurrentFrame();
|
|
4194
4426
|
const [id] = useState10(() => {
|
|
@@ -4378,7 +4610,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
4378
4610
|
return src.slice(0, hashIndex);
|
|
4379
4611
|
};
|
|
4380
4612
|
var usePreload = (src) => {
|
|
4381
|
-
const preloads2 =
|
|
4613
|
+
const preloads2 = useContext20(PreloadContext);
|
|
4382
4614
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
4383
4615
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
4384
4616
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -5029,7 +5261,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
5029
5261
|
const logLevel = useLogLevel();
|
|
5030
5262
|
const mountTime = useMountTime();
|
|
5031
5263
|
const env = useRemotionEnvironment();
|
|
5032
|
-
const audioCtx =
|
|
5264
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
5033
5265
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
5034
5266
|
const resume = audioCtx?.resume;
|
|
5035
5267
|
const refs = useMemo22(() => {
|
|
@@ -5204,8 +5436,8 @@ var useSharedAudio = ({
|
|
|
5204
5436
|
premounting,
|
|
5205
5437
|
postmounting
|
|
5206
5438
|
}) => {
|
|
5207
|
-
const audioCtx =
|
|
5208
|
-
const tagsCtx =
|
|
5439
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
5440
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
5209
5441
|
const [elem] = useState12(() => {
|
|
5210
5442
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
5211
5443
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -5384,7 +5616,7 @@ var useVolume = ({
|
|
|
5384
5616
|
const audioStuffRef = useRef13(null);
|
|
5385
5617
|
const currentVolumeRef = useRef13(volume);
|
|
5386
5618
|
currentVolumeRef.current = volume;
|
|
5387
|
-
const sharedAudioContext =
|
|
5619
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
5388
5620
|
if (!sharedAudioContext) {
|
|
5389
5621
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
5390
5622
|
}
|
|
@@ -5449,7 +5681,7 @@ var useVolume = ({
|
|
|
5449
5681
|
return audioStuffRef;
|
|
5450
5682
|
};
|
|
5451
5683
|
var useMediaStartsAt = () => {
|
|
5452
|
-
const parentSequence =
|
|
5684
|
+
const parentSequence = useContext23(SequenceContext);
|
|
5453
5685
|
const startsAt = Math.min(0, parentSequence?.relativeFrom ?? 0);
|
|
5454
5686
|
return startsAt;
|
|
5455
5687
|
};
|
|
@@ -5538,7 +5770,7 @@ var useBasicMediaInTimeline = ({
|
|
|
5538
5770
|
if (!src) {
|
|
5539
5771
|
throw new Error("No src passed");
|
|
5540
5772
|
}
|
|
5541
|
-
const parentSequence =
|
|
5773
|
+
const parentSequence = useContext24(SequenceContext);
|
|
5542
5774
|
const [initialVolume] = useState13(() => volume);
|
|
5543
5775
|
const duration = getTimelineDuration({
|
|
5544
5776
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -5605,8 +5837,8 @@ var useImageInTimeline = ({
|
|
|
5605
5837
|
loopDisplay,
|
|
5606
5838
|
controls
|
|
5607
5839
|
}) => {
|
|
5608
|
-
const parentSequence =
|
|
5609
|
-
const { registerSequence, unregisterSequence } =
|
|
5840
|
+
const parentSequence = useContext24(SequenceContext);
|
|
5841
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
5610
5842
|
const { durationInFrames } = useVideoConfig();
|
|
5611
5843
|
const mediaStartsAt = useMediaStartsAt();
|
|
5612
5844
|
const { duration, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -5687,9 +5919,9 @@ var useMediaInTimeline = ({
|
|
|
5687
5919
|
postmountDisplay,
|
|
5688
5920
|
loopDisplay
|
|
5689
5921
|
}) => {
|
|
5690
|
-
const parentSequence =
|
|
5922
|
+
const parentSequence = useContext24(SequenceContext);
|
|
5691
5923
|
const startsAt = useMediaStartsAt();
|
|
5692
|
-
const { registerSequence, unregisterSequence } =
|
|
5924
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
5693
5925
|
const { durationInFrames } = useVideoConfig();
|
|
5694
5926
|
const mediaStartsAt = useMediaStartsAt();
|
|
5695
5927
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -5849,7 +6081,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
5849
6081
|
};
|
|
5850
6082
|
var BufferingContextReact = React21.createContext(null);
|
|
5851
6083
|
var BufferingProvider = ({ children }) => {
|
|
5852
|
-
const { logLevel, mountTime } =
|
|
6084
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
5853
6085
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
5854
6086
|
return /* @__PURE__ */ jsx21(BufferingContextReact.Provider, {
|
|
5855
6087
|
value: bufferManager,
|
|
@@ -5879,7 +6111,7 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
5879
6111
|
return isBuffering;
|
|
5880
6112
|
};
|
|
5881
6113
|
var useBufferState = () => {
|
|
5882
|
-
const buffer =
|
|
6114
|
+
const buffer = useContext26(BufferingContextReact);
|
|
5883
6115
|
const logLevel = useLogLevel();
|
|
5884
6116
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
5885
6117
|
return useMemo25(() => ({
|
|
@@ -6290,6 +6522,23 @@ function checkInfiniteRange(name, arr) {
|
|
|
6290
6522
|
}
|
|
6291
6523
|
}
|
|
6292
6524
|
}
|
|
6525
|
+
function assertValidInterpolateEasingOption(easing, inputRangeLength) {
|
|
6526
|
+
if (easing === undefined) {
|
|
6527
|
+
return;
|
|
6528
|
+
}
|
|
6529
|
+
if (typeof easing === "function") {
|
|
6530
|
+
return;
|
|
6531
|
+
}
|
|
6532
|
+
const expectedLength = inputRangeLength - 1;
|
|
6533
|
+
if (easing.length !== expectedLength) {
|
|
6534
|
+
throw new Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${expectedLength}), but got length ${easing.length}`);
|
|
6535
|
+
}
|
|
6536
|
+
for (let i = 0;i < easing.length; i++) {
|
|
6537
|
+
if (typeof easing[i] !== "function") {
|
|
6538
|
+
throw new Error(`easing[${i}] must be a function`);
|
|
6539
|
+
}
|
|
6540
|
+
}
|
|
6541
|
+
}
|
|
6293
6542
|
function interpolate(input, inputRange, outputRange, options) {
|
|
6294
6543
|
if (typeof input === "undefined") {
|
|
6295
6544
|
throw new Error("input can not be undefined");
|
|
@@ -6306,7 +6555,18 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
6306
6555
|
checkInfiniteRange("inputRange", inputRange);
|
|
6307
6556
|
checkInfiniteRange("outputRange", outputRange);
|
|
6308
6557
|
checkValidInputRange(inputRange);
|
|
6309
|
-
|
|
6558
|
+
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
6559
|
+
const easingOption = options?.easing;
|
|
6560
|
+
const defaultEasing = (num) => num;
|
|
6561
|
+
const resolveEasingForSegment = (segmentIndex) => {
|
|
6562
|
+
if (easingOption === undefined) {
|
|
6563
|
+
return defaultEasing;
|
|
6564
|
+
}
|
|
6565
|
+
if (typeof easingOption === "function") {
|
|
6566
|
+
return easingOption;
|
|
6567
|
+
}
|
|
6568
|
+
return easingOption[segmentIndex];
|
|
6569
|
+
};
|
|
6310
6570
|
let extrapolateLeft = "extend";
|
|
6311
6571
|
if (options?.extrapolateLeft !== undefined) {
|
|
6312
6572
|
extrapolateLeft = options.extrapolateLeft;
|
|
@@ -6320,7 +6580,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
6320
6580
|
}
|
|
6321
6581
|
const range = findRange(input, inputRange);
|
|
6322
6582
|
return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
6323
|
-
easing,
|
|
6583
|
+
easing: resolveEasingForSegment(range),
|
|
6324
6584
|
extrapolateLeft,
|
|
6325
6585
|
extrapolateRight
|
|
6326
6586
|
});
|
|
@@ -6396,7 +6656,7 @@ var useMediaPlayback = ({
|
|
|
6396
6656
|
const frame = useCurrentFrame();
|
|
6397
6657
|
const absoluteFrame = useTimelinePosition();
|
|
6398
6658
|
const [playing] = usePlayingState();
|
|
6399
|
-
const buffering =
|
|
6659
|
+
const buffering = useContext27(BufferingContextReact);
|
|
6400
6660
|
const { fps } = useVideoConfig();
|
|
6401
6661
|
const mediaStartsAt = useMediaStartsAt();
|
|
6402
6662
|
const lastSeekDueToShift = useRef17(null);
|
|
@@ -6684,15 +6944,15 @@ var SetMediaVolumeContext = createContext22({
|
|
|
6684
6944
|
}
|
|
6685
6945
|
});
|
|
6686
6946
|
var useMediaVolumeState = () => {
|
|
6687
|
-
const { mediaVolume } =
|
|
6688
|
-
const { setMediaVolume } =
|
|
6947
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
6948
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
6689
6949
|
return useMemo27(() => {
|
|
6690
6950
|
return [mediaVolume, setMediaVolume];
|
|
6691
6951
|
}, [mediaVolume, setMediaVolume]);
|
|
6692
6952
|
};
|
|
6693
6953
|
var useMediaMutedState = () => {
|
|
6694
|
-
const { mediaMuted } =
|
|
6695
|
-
const { setMediaMuted } =
|
|
6954
|
+
const { mediaMuted } = useContext28(MediaVolumeContext);
|
|
6955
|
+
const { setMediaMuted } = useContext28(SetMediaVolumeContext);
|
|
6696
6956
|
return useMemo27(() => {
|
|
6697
6957
|
return [mediaMuted, setMediaMuted];
|
|
6698
6958
|
}, [mediaMuted, setMediaMuted]);
|
|
@@ -6742,12 +7002,12 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
6742
7002
|
const [mediaVolume] = useMediaVolumeState();
|
|
6743
7003
|
const [mediaMuted] = useMediaMutedState();
|
|
6744
7004
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
6745
|
-
const { hidden } =
|
|
7005
|
+
const { hidden } = useContext29(SequenceVisibilityToggleContext);
|
|
6746
7006
|
if (!src) {
|
|
6747
7007
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
6748
7008
|
}
|
|
6749
7009
|
const preloadedSrc = usePreload(src);
|
|
6750
|
-
const sequenceContext =
|
|
7010
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
6751
7011
|
const [timelineId] = useState16(() => String(Math.random()));
|
|
6752
7012
|
const isSequenceHidden = hidden[timelineId] ?? false;
|
|
6753
7013
|
const userPreferredVolume = evaluateVolume({
|
|
@@ -6902,8 +7162,8 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
6902
7162
|
const absoluteFrame = useTimelinePosition();
|
|
6903
7163
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
6904
7164
|
const frame = useCurrentFrame();
|
|
6905
|
-
const sequenceContext =
|
|
6906
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
7165
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
7166
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
6907
7167
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
6908
7168
|
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
6909
7169
|
props.src,
|
|
@@ -7012,7 +7272,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
7012
7272
|
};
|
|
7013
7273
|
var AudioForRendering = forwardRef7(AudioForRenderingRefForwardingFunction);
|
|
7014
7274
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
7015
|
-
const audioTagsContext =
|
|
7275
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
7016
7276
|
const {
|
|
7017
7277
|
startFrom,
|
|
7018
7278
|
endAt,
|
|
@@ -7031,7 +7291,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
7031
7291
|
if (environment.isClientSideRendering) {
|
|
7032
7292
|
throw new Error("<Html5Audio> is not supported in @remotion/web-renderer. Use <Audio> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
7033
7293
|
}
|
|
7034
|
-
const { durations, setDurations } =
|
|
7294
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
7035
7295
|
if (typeof props.src !== "string") {
|
|
7036
7296
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
7037
7297
|
}
|
|
@@ -7189,7 +7449,7 @@ var ImgInner = ({
|
|
|
7189
7449
|
const imageRef = useRef20(null);
|
|
7190
7450
|
const errors = useRef20({});
|
|
7191
7451
|
const { delayPlayback } = useBufferState();
|
|
7192
|
-
const sequenceContext =
|
|
7452
|
+
const sequenceContext = useContext32(SequenceContext);
|
|
7193
7453
|
const [timelineId] = useState18(() => String(Math.random()));
|
|
7194
7454
|
if (!src) {
|
|
7195
7455
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
@@ -7479,13 +7739,15 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
|
|
|
7479
7739
|
}
|
|
7480
7740
|
`;
|
|
7481
7741
|
};
|
|
7482
|
-
var
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
definition,
|
|
7742
|
+
var createEffect = (definition) => {
|
|
7743
|
+
const widened = definition;
|
|
7744
|
+
const factory = (params = {}) => ({
|
|
7745
|
+
definition: widened,
|
|
7486
7746
|
params,
|
|
7487
|
-
|
|
7488
|
-
|
|
7747
|
+
effectKey: widened.calculateKey(params),
|
|
7748
|
+
memoized: false
|
|
7749
|
+
});
|
|
7750
|
+
return factory;
|
|
7489
7751
|
};
|
|
7490
7752
|
var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
7491
7753
|
var getPreviewDomElement = () => {
|
|
@@ -7511,7 +7773,7 @@ var waitForRoot = (fn) => {
|
|
|
7511
7773
|
};
|
|
7512
7774
|
var MediaEnabledContext = createContext23(null);
|
|
7513
7775
|
var useVideoEnabled = () => {
|
|
7514
|
-
const context =
|
|
7776
|
+
const context = useContext33(MediaEnabledContext);
|
|
7515
7777
|
if (!context) {
|
|
7516
7778
|
return window.remotion_videoEnabled;
|
|
7517
7779
|
}
|
|
@@ -7521,7 +7783,7 @@ var useVideoEnabled = () => {
|
|
|
7521
7783
|
return context.videoEnabled;
|
|
7522
7784
|
};
|
|
7523
7785
|
var useAudioEnabled = () => {
|
|
7524
|
-
const context =
|
|
7786
|
+
const context = useContext33(MediaEnabledContext);
|
|
7525
7787
|
if (!context) {
|
|
7526
7788
|
return window.remotion_audioEnabled;
|
|
7527
7789
|
}
|
|
@@ -7548,8 +7810,7 @@ var RemotionRootContexts = ({
|
|
|
7548
7810
|
audioLatencyHint,
|
|
7549
7811
|
videoEnabled,
|
|
7550
7812
|
audioEnabled,
|
|
7551
|
-
frameState
|
|
7552
|
-
visualModeEnabled
|
|
7813
|
+
frameState
|
|
7553
7814
|
}) => {
|
|
7554
7815
|
const nonceContext = useMemo32(() => {
|
|
7555
7816
|
let counter = 0;
|
|
@@ -7572,7 +7833,6 @@ var RemotionRootContexts = ({
|
|
|
7572
7833
|
children: /* @__PURE__ */ jsx29(EditorPropsProvider, {
|
|
7573
7834
|
children: /* @__PURE__ */ jsx29(PrefetchProvider, {
|
|
7574
7835
|
children: /* @__PURE__ */ jsx29(SequenceManagerProvider, {
|
|
7575
|
-
visualModeEnabled,
|
|
7576
7836
|
children: /* @__PURE__ */ jsx29(DurationsContextProvider, {
|
|
7577
7837
|
children: /* @__PURE__ */ jsx29(BufferingProvider, {
|
|
7578
7838
|
children: /* @__PURE__ */ jsx29(SharedAudioContextProvider, {
|
|
@@ -7845,9 +8105,9 @@ var OffthreadVideoForRendering = ({
|
|
|
7845
8105
|
const frame = useCurrentFrame();
|
|
7846
8106
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
7847
8107
|
const videoConfig = useUnsafeVideoConfig();
|
|
7848
|
-
const sequenceContext =
|
|
8108
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
7849
8109
|
const mediaStartsAt = useMediaStartsAt();
|
|
7850
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
8110
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext34(RenderAssetManager);
|
|
7851
8111
|
if (!src) {
|
|
7852
8112
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
7853
8113
|
}
|
|
@@ -8059,7 +8319,7 @@ class MediaPlaybackError extends Error {
|
|
|
8059
8319
|
}
|
|
8060
8320
|
}
|
|
8061
8321
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
8062
|
-
const context =
|
|
8322
|
+
const context = useContext35(SharedAudioContext);
|
|
8063
8323
|
if (!context) {
|
|
8064
8324
|
throw new Error("SharedAudioContext not found");
|
|
8065
8325
|
}
|
|
@@ -8115,8 +8375,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
8115
8375
|
}
|
|
8116
8376
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
8117
8377
|
const { fps, durationInFrames } = useVideoConfig();
|
|
8118
|
-
const parentSequence =
|
|
8119
|
-
const { hidden } =
|
|
8378
|
+
const parentSequence = useContext35(SequenceContext);
|
|
8379
|
+
const { hidden } = useContext35(SequenceVisibilityToggleContext);
|
|
8120
8380
|
const logLevel = useLogLevel();
|
|
8121
8381
|
const mountTime = useMountTime();
|
|
8122
8382
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -8540,7 +8800,8 @@ var Internals = {
|
|
|
8540
8800
|
VideoForPreview,
|
|
8541
8801
|
CompositionManager,
|
|
8542
8802
|
CompositionSetters,
|
|
8543
|
-
|
|
8803
|
+
VisualModeCodeValuesContext,
|
|
8804
|
+
VisualModeDragOverridesContext,
|
|
8544
8805
|
VisualModeSettersContext,
|
|
8545
8806
|
SequenceManager,
|
|
8546
8807
|
SequenceStackTracesUpdateContext,
|
|
@@ -8640,11 +8901,15 @@ var Internals = {
|
|
|
8640
8901
|
useEffectChainState,
|
|
8641
8902
|
runEffectChain,
|
|
8642
8903
|
useMemoizedEffects,
|
|
8643
|
-
|
|
8644
|
-
|
|
8904
|
+
useMemoizedEffectDefinitions,
|
|
8905
|
+
createEffect,
|
|
8645
8906
|
computeEffectiveSchemaValuesDotNotation,
|
|
8646
8907
|
OverrideIdsToNodePathsGettersContext,
|
|
8647
|
-
OverrideIdsToNodePathsSettersContext
|
|
8908
|
+
OverrideIdsToNodePathsSettersContext,
|
|
8909
|
+
findPropsToDelete,
|
|
8910
|
+
makeSequencePropsSubscriptionKey,
|
|
8911
|
+
getCodeValuesCtx,
|
|
8912
|
+
getEffectCodeValuesCtx
|
|
8648
8913
|
};
|
|
8649
8914
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
8650
8915
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -9239,13 +9504,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
9239
9504
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
9240
9505
|
const videoConfig = useUnsafeVideoConfig();
|
|
9241
9506
|
const videoRef = useRef23(null);
|
|
9242
|
-
const sequenceContext =
|
|
9507
|
+
const sequenceContext = useContext36(SequenceContext);
|
|
9243
9508
|
const mediaStartsAt = useMediaStartsAt();
|
|
9244
9509
|
const environment = useRemotionEnvironment();
|
|
9245
9510
|
const logLevel = useLogLevel();
|
|
9246
9511
|
const mountTime = useMountTime();
|
|
9247
9512
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
9248
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9513
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext36(RenderAssetManager);
|
|
9249
9514
|
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
9250
9515
|
props2.src,
|
|
9251
9516
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9455,7 +9720,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
9455
9720
|
if (environment.isClientSideRendering) {
|
|
9456
9721
|
throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
9457
9722
|
}
|
|
9458
|
-
const { durations, setDurations } =
|
|
9723
|
+
const { durations, setDurations } = useContext37(DurationsContext);
|
|
9459
9724
|
if (typeof ref === "string") {
|
|
9460
9725
|
throw new Error("string refs are not supported");
|
|
9461
9726
|
}
|
|
@@ -15706,10 +15971,10 @@ import React11 from "react";
|
|
|
15706
15971
|
import * as React82 from "react";
|
|
15707
15972
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
15708
15973
|
import * as React9 from "react";
|
|
15709
|
-
import * as
|
|
15974
|
+
import * as React102 from "react";
|
|
15710
15975
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
15711
15976
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
15712
|
-
import * as
|
|
15977
|
+
import * as React12 from "react";
|
|
15713
15978
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
15714
15979
|
import * as React16 from "react";
|
|
15715
15980
|
import * as React132 from "react";
|
|
@@ -16604,43 +16869,43 @@ function composeRefs2(...refs) {
|
|
|
16604
16869
|
function useComposedRefs2(...refs) {
|
|
16605
16870
|
return React9.useCallback(composeRefs2(...refs), refs);
|
|
16606
16871
|
}
|
|
16607
|
-
var Slot2 =
|
|
16872
|
+
var Slot2 = React102.forwardRef((props, forwardedRef) => {
|
|
16608
16873
|
const { children, ...slotProps } = props;
|
|
16609
|
-
const childrenArray =
|
|
16874
|
+
const childrenArray = React102.Children.toArray(children);
|
|
16610
16875
|
const slottable = childrenArray.find(isSlottable2);
|
|
16611
16876
|
if (slottable) {
|
|
16612
16877
|
const newElement = slottable.props.children;
|
|
16613
16878
|
const newChildren = childrenArray.map((child) => {
|
|
16614
16879
|
if (child === slottable) {
|
|
16615
|
-
if (
|
|
16616
|
-
return
|
|
16617
|
-
return
|
|
16880
|
+
if (React102.Children.count(newElement) > 1)
|
|
16881
|
+
return React102.Children.only(null);
|
|
16882
|
+
return React102.isValidElement(newElement) ? newElement.props.children : null;
|
|
16618
16883
|
} else {
|
|
16619
16884
|
return child;
|
|
16620
16885
|
}
|
|
16621
16886
|
});
|
|
16622
|
-
return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
16887
|
+
return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children: React102.isValidElement(newElement) ? React102.cloneElement(newElement, undefined, newChildren) : null });
|
|
16623
16888
|
}
|
|
16624
16889
|
return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
16625
16890
|
});
|
|
16626
16891
|
Slot2.displayName = "Slot";
|
|
16627
|
-
var SlotClone =
|
|
16892
|
+
var SlotClone = React102.forwardRef((props, forwardedRef) => {
|
|
16628
16893
|
const { children, ...slotProps } = props;
|
|
16629
|
-
if (
|
|
16894
|
+
if (React102.isValidElement(children)) {
|
|
16630
16895
|
const childrenRef = getElementRef2(children);
|
|
16631
|
-
return
|
|
16896
|
+
return React102.cloneElement(children, {
|
|
16632
16897
|
...mergeProps2(slotProps, children.props),
|
|
16633
16898
|
ref: forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef
|
|
16634
16899
|
});
|
|
16635
16900
|
}
|
|
16636
|
-
return
|
|
16901
|
+
return React102.Children.count(children) > 1 ? React102.Children.only(null) : null;
|
|
16637
16902
|
});
|
|
16638
16903
|
SlotClone.displayName = "SlotClone";
|
|
16639
16904
|
var Slottable2 = ({ children }) => {
|
|
16640
16905
|
return /* @__PURE__ */ jsx142(Fragment5, { children });
|
|
16641
16906
|
};
|
|
16642
16907
|
function isSlottable2(child) {
|
|
16643
|
-
return
|
|
16908
|
+
return React102.isValidElement(child) && child.type === Slottable2;
|
|
16644
16909
|
}
|
|
16645
16910
|
function mergeProps2(slotProps, childProps) {
|
|
16646
16911
|
const overrideProps = { ...childProps };
|
|
@@ -16730,9 +16995,9 @@ function createCollection(name) {
|
|
|
16730
16995
|
createCollectionScope
|
|
16731
16996
|
];
|
|
16732
16997
|
}
|
|
16733
|
-
var DirectionContext =
|
|
16998
|
+
var DirectionContext = React12.createContext(undefined);
|
|
16734
16999
|
function useDirection(localDir) {
|
|
16735
|
-
const globalDir =
|
|
17000
|
+
const globalDir = React12.useContext(DirectionContext);
|
|
16736
17001
|
return localDir || globalDir || "ltr";
|
|
16737
17002
|
}
|
|
16738
17003
|
var NODES = [
|
|
@@ -24755,63 +25020,63 @@ var CommunityStats = () => /* @__PURE__ */ jsxs12("div", {
|
|
|
24755
25020
|
var CommunityStats_default = CommunityStats;
|
|
24756
25021
|
|
|
24757
25022
|
// ../player/dist/esm/index.mjs
|
|
25023
|
+
import { createContext as createContext32 } from "react";
|
|
24758
25024
|
import { jsx as jsx56, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
24759
25025
|
import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment11 } from "react/jsx-runtime";
|
|
24760
25026
|
import React56 from "react";
|
|
24761
25027
|
import { useContext as useContext210, useEffect as useEffect42, useState as useState40 } from "react";
|
|
24762
|
-
import { useContext as
|
|
25028
|
+
import { useContext as useContext44, useLayoutEffect as useLayoutEffect17 } from "react";
|
|
24763
25029
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
24764
|
-
import { useCallback as useCallback34, useRef as useRef42 } from "react";
|
|
24765
25030
|
import { useEffect as useEffect24, useState as useState24 } from "react";
|
|
24766
25031
|
import { useLayoutEffect as useLayoutEffect23 } from "react";
|
|
24767
|
-
import { useContext as
|
|
24768
|
-
import { useEffect as useEffect310, useRef as
|
|
24769
|
-
import { useCallback as
|
|
24770
|
-
import { useEffect as useEffect43, useRef as
|
|
24771
|
-
import { useCallback as
|
|
25032
|
+
import { useContext as useContext45, useEffect as useEffect52, useRef as useRef42 } from "react";
|
|
25033
|
+
import { useEffect as useEffect310, useRef as useRef26 } from "react";
|
|
25034
|
+
import { useCallback as useCallback34, useContext as useContext39, useMemo as useMemo51, useRef as useRef43, useState as useState310 } from "react";
|
|
25035
|
+
import { useEffect as useEffect43, useRef as useRef310 } from "react";
|
|
25036
|
+
import { useCallback as useCallback24, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
|
|
24772
25037
|
import {
|
|
24773
25038
|
forwardRef as forwardRef210,
|
|
24774
25039
|
useEffect as useEffect132,
|
|
24775
25040
|
useImperativeHandle as useImperativeHandle22,
|
|
24776
25041
|
useLayoutEffect as useLayoutEffect33,
|
|
24777
25042
|
useMemo as useMemo142,
|
|
24778
|
-
useRef as
|
|
25043
|
+
useRef as useRef112,
|
|
24779
25044
|
useState as useState132
|
|
24780
25045
|
} from "react";
|
|
24781
|
-
import
|
|
25046
|
+
import React103, {
|
|
24782
25047
|
Suspense as Suspense2,
|
|
24783
25048
|
forwardRef as forwardRef33,
|
|
24784
|
-
useCallback as
|
|
25049
|
+
useCallback as useCallback102,
|
|
24785
25050
|
useContext as useContext52,
|
|
24786
25051
|
useEffect as useEffect122,
|
|
24787
25052
|
useImperativeHandle as useImperativeHandle10,
|
|
24788
25053
|
useMemo as useMemo122,
|
|
24789
|
-
useRef as
|
|
25054
|
+
useRef as useRef102,
|
|
24790
25055
|
useState as useState113
|
|
24791
25056
|
} from "react";
|
|
24792
25057
|
import React310 from "react";
|
|
24793
25058
|
import { jsx as jsx410 } from "react/jsx-runtime";
|
|
24794
25059
|
import React410, { useEffect as useEffect72 } from "react";
|
|
24795
25060
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
24796
|
-
import { useCallback as
|
|
25061
|
+
import { useCallback as useCallback72, useEffect as useEffect112, useMemo as useMemo92, useRef as useRef82, useState as useState102 } from "react";
|
|
24797
25062
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
24798
|
-
import { useCallback as
|
|
24799
|
-
import React54, { useCallback as
|
|
25063
|
+
import { useCallback as useCallback42, useMemo as useMemo410, useRef as useRef52, useState as useState62 } from "react";
|
|
25064
|
+
import React54, { useCallback as useCallback35, useMemo as useMemo39, useState as useState52 } from "react";
|
|
24800
25065
|
import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
24801
25066
|
import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
24802
|
-
import { useCallback as
|
|
24803
|
-
import { useEffect as useEffect83, useRef as
|
|
25067
|
+
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo52, useState as useState82 } from "react";
|
|
25068
|
+
import { useEffect as useEffect83, useRef as useRef62, useState as useState72 } from "react";
|
|
24804
25069
|
import { jsx as jsx94, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
24805
|
-
import { useCallback as
|
|
25070
|
+
import { useCallback as useCallback62, useEffect as useEffect102, useMemo as useMemo62, useRef as useRef72, useState as useState92 } from "react";
|
|
24806
25071
|
import { jsx as jsx104, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
24807
25072
|
import { useMemo as useMemo72 } from "react";
|
|
24808
25073
|
import { jsxs as jsxs72 } from "react/jsx-runtime";
|
|
24809
25074
|
import { useMemo as useMemo82 } from "react";
|
|
24810
25075
|
import { jsx as jsx113, jsxs as jsxs82, Fragment as Fragment23 } from "react/jsx-runtime";
|
|
24811
|
-
import { useCallback as
|
|
24812
|
-
import { useCallback as
|
|
25076
|
+
import { useCallback as useCallback92, useMemo as useMemo112 } from "react";
|
|
25077
|
+
import { useCallback as useCallback82, useMemo as useMemo102, useRef as useRef92 } from "react";
|
|
24813
25078
|
import { jsx as jsx123, jsxs as jsxs92, Fragment as Fragment32 } from "react/jsx-runtime";
|
|
24814
|
-
import { useCallback as
|
|
25079
|
+
import { useCallback as useCallback112, useMemo as useMemo132, useState as useState122 } from "react";
|
|
24815
25080
|
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
24816
25081
|
|
|
24817
25082
|
// ../core/dist/esm/no-react.mjs
|
|
@@ -24879,6 +25144,23 @@ function checkInfiniteRange2(name, arr) {
|
|
|
24879
25144
|
}
|
|
24880
25145
|
}
|
|
24881
25146
|
}
|
|
25147
|
+
function assertValidInterpolateEasingOption2(easing, inputRangeLength) {
|
|
25148
|
+
if (easing === undefined) {
|
|
25149
|
+
return;
|
|
25150
|
+
}
|
|
25151
|
+
if (typeof easing === "function") {
|
|
25152
|
+
return;
|
|
25153
|
+
}
|
|
25154
|
+
const expectedLength = inputRangeLength - 1;
|
|
25155
|
+
if (easing.length !== expectedLength) {
|
|
25156
|
+
throw new Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${expectedLength}), but got length ${easing.length}`);
|
|
25157
|
+
}
|
|
25158
|
+
for (let i = 0;i < easing.length; i++) {
|
|
25159
|
+
if (typeof easing[i] !== "function") {
|
|
25160
|
+
throw new Error(`easing[${i}] must be a function`);
|
|
25161
|
+
}
|
|
25162
|
+
}
|
|
25163
|
+
}
|
|
24882
25164
|
function interpolate3(input, inputRange, outputRange, options2) {
|
|
24883
25165
|
if (typeof input === "undefined") {
|
|
24884
25166
|
throw new Error("input can not be undefined");
|
|
@@ -24895,7 +25177,18 @@ function interpolate3(input, inputRange, outputRange, options2) {
|
|
|
24895
25177
|
checkInfiniteRange2("inputRange", inputRange);
|
|
24896
25178
|
checkInfiniteRange2("outputRange", outputRange);
|
|
24897
25179
|
checkValidInputRange2(inputRange);
|
|
24898
|
-
|
|
25180
|
+
assertValidInterpolateEasingOption2(options2?.easing, inputRange.length);
|
|
25181
|
+
const easingOption = options2?.easing;
|
|
25182
|
+
const defaultEasing = (num) => num;
|
|
25183
|
+
const resolveEasingForSegment = (segmentIndex) => {
|
|
25184
|
+
if (easingOption === undefined) {
|
|
25185
|
+
return defaultEasing;
|
|
25186
|
+
}
|
|
25187
|
+
if (typeof easingOption === "function") {
|
|
25188
|
+
return easingOption;
|
|
25189
|
+
}
|
|
25190
|
+
return easingOption[segmentIndex];
|
|
25191
|
+
};
|
|
24899
25192
|
let extrapolateLeft = "extend";
|
|
24900
25193
|
if (options2?.extrapolateLeft !== undefined) {
|
|
24901
25194
|
extrapolateLeft = options2.extrapolateLeft;
|
|
@@ -24909,7 +25202,7 @@ function interpolate3(input, inputRange, outputRange, options2) {
|
|
|
24909
25202
|
}
|
|
24910
25203
|
const range = findRange2(input, inputRange);
|
|
24911
25204
|
return interpolateFunction2(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
24912
|
-
easing,
|
|
25205
|
+
easing: resolveEasingForSegment(range),
|
|
24913
25206
|
extrapolateLeft,
|
|
24914
25207
|
extrapolateRight
|
|
24915
25208
|
});
|
|
@@ -24928,6 +25221,36 @@ var DELAY_RENDER_CALLSTACK_TOKEN2 = "The delayRender was called:";
|
|
|
24928
25221
|
var DELAY_RENDER_RETRIES_LEFT2 = "Retries left: ";
|
|
24929
25222
|
var DELAY_RENDER_RETRY_TOKEN2 = "- Rendering the frame will be retried.";
|
|
24930
25223
|
var DELAY_RENDER_CLEAR_TOKEN2 = "handle was cleared after";
|
|
25224
|
+
var findPropsToDelete2 = ({
|
|
25225
|
+
schema,
|
|
25226
|
+
key,
|
|
25227
|
+
value
|
|
25228
|
+
}) => {
|
|
25229
|
+
const fieldSchema = schema[key];
|
|
25230
|
+
if (!fieldSchema) {
|
|
25231
|
+
throw new Error("Key " + JSON.stringify(key) + " not found in schema");
|
|
25232
|
+
}
|
|
25233
|
+
if (typeof value !== "string") {
|
|
25234
|
+
throw new Error("Value must be a string, but is " + JSON.stringify(value));
|
|
25235
|
+
}
|
|
25236
|
+
if (fieldSchema.type !== "enum") {
|
|
25237
|
+
throw new Error("Key " + JSON.stringify(key) + " is not an enum");
|
|
25238
|
+
}
|
|
25239
|
+
const currentVariant = fieldSchema.variants[value];
|
|
25240
|
+
if (!currentVariant) {
|
|
25241
|
+
throw new Error("Value for " + JSON.stringify(key) + " must be one of " + Object.keys(fieldSchema.variants).map((v) => JSON.stringify(v)).join(", ") + ", got " + JSON.stringify(value));
|
|
25242
|
+
}
|
|
25243
|
+
const otherVariants = Object.keys(fieldSchema.variants).filter((v) => v !== value);
|
|
25244
|
+
const otherKeys = new Set;
|
|
25245
|
+
for (const variant of otherVariants) {
|
|
25246
|
+
const otherVariant = fieldSchema.variants[variant];
|
|
25247
|
+
const keys = Object.keys(otherVariant);
|
|
25248
|
+
for (const k of keys) {
|
|
25249
|
+
otherKeys.add(k);
|
|
25250
|
+
}
|
|
25251
|
+
}
|
|
25252
|
+
return [...otherKeys];
|
|
25253
|
+
};
|
|
24931
25254
|
var DATE_TOKEN2 = "remotion-date:";
|
|
24932
25255
|
var FILE_TOKEN2 = "remotion-file:";
|
|
24933
25256
|
var serializeJSONWithSpecialTypes2 = ({
|
|
@@ -25433,6 +25756,70 @@ var proResProfileOptions = [
|
|
|
25433
25756
|
"light",
|
|
25434
25757
|
"proxy"
|
|
25435
25758
|
];
|
|
25759
|
+
var sequenceStyleSchema2 = {
|
|
25760
|
+
"style.translate": {
|
|
25761
|
+
type: "translate",
|
|
25762
|
+
step: 1,
|
|
25763
|
+
default: "0px 0px",
|
|
25764
|
+
description: "Offset"
|
|
25765
|
+
},
|
|
25766
|
+
"style.scale": {
|
|
25767
|
+
type: "number",
|
|
25768
|
+
min: 0.05,
|
|
25769
|
+
max: 100,
|
|
25770
|
+
step: 0.01,
|
|
25771
|
+
default: 1,
|
|
25772
|
+
description: "Scale"
|
|
25773
|
+
},
|
|
25774
|
+
"style.rotate": {
|
|
25775
|
+
type: "rotation",
|
|
25776
|
+
step: 1,
|
|
25777
|
+
default: "0deg",
|
|
25778
|
+
description: "Rotation"
|
|
25779
|
+
},
|
|
25780
|
+
"style.opacity": {
|
|
25781
|
+
type: "number",
|
|
25782
|
+
min: 0,
|
|
25783
|
+
max: 1,
|
|
25784
|
+
step: 0.01,
|
|
25785
|
+
default: 1,
|
|
25786
|
+
description: "Opacity"
|
|
25787
|
+
},
|
|
25788
|
+
premountFor: {
|
|
25789
|
+
type: "number",
|
|
25790
|
+
default: 0,
|
|
25791
|
+
description: "Premount For",
|
|
25792
|
+
min: 0,
|
|
25793
|
+
step: 1
|
|
25794
|
+
},
|
|
25795
|
+
postmountFor: {
|
|
25796
|
+
type: "hidden"
|
|
25797
|
+
},
|
|
25798
|
+
styleWhilePremounted: {
|
|
25799
|
+
type: "hidden"
|
|
25800
|
+
},
|
|
25801
|
+
styleWhilePostmounted: {
|
|
25802
|
+
type: "hidden"
|
|
25803
|
+
}
|
|
25804
|
+
};
|
|
25805
|
+
var sequenceSchema2 = {
|
|
25806
|
+
layout: {
|
|
25807
|
+
type: "enum",
|
|
25808
|
+
default: "absolute-fill",
|
|
25809
|
+
description: "Layout",
|
|
25810
|
+
variants: {
|
|
25811
|
+
"absolute-fill": sequenceStyleSchema2,
|
|
25812
|
+
none: {}
|
|
25813
|
+
}
|
|
25814
|
+
}
|
|
25815
|
+
};
|
|
25816
|
+
var sequenceSchemaDefaultLayoutNone2 = {
|
|
25817
|
+
...sequenceSchema2,
|
|
25818
|
+
layout: {
|
|
25819
|
+
...sequenceSchema2.layout,
|
|
25820
|
+
default: "none"
|
|
25821
|
+
}
|
|
25822
|
+
};
|
|
25436
25823
|
var ENABLE_V5_BREAKING_CHANGES2 = false;
|
|
25437
25824
|
var validateFrame2 = ({
|
|
25438
25825
|
allowFloats,
|
|
@@ -25595,7 +25982,9 @@ var NoReactInternals = {
|
|
|
25595
25982
|
DATE_TOKEN: DATE_TOKEN2,
|
|
25596
25983
|
FILE_TOKEN: FILE_TOKEN2,
|
|
25597
25984
|
validateCodec: validateCodec2,
|
|
25598
|
-
proResProfileOptions
|
|
25985
|
+
proResProfileOptions,
|
|
25986
|
+
findPropsToDelete: findPropsToDelete2,
|
|
25987
|
+
sequenceSchema: sequenceSchema2
|
|
25599
25988
|
};
|
|
25600
25989
|
|
|
25601
25990
|
// ../player/dist/esm/index.mjs
|
|
@@ -25605,21 +25994,36 @@ import {
|
|
|
25605
25994
|
useImperativeHandle as useImperativeHandle42,
|
|
25606
25995
|
useLayoutEffect as useLayoutEffect42,
|
|
25607
25996
|
useMemo as useMemo172,
|
|
25608
|
-
useRef as
|
|
25997
|
+
useRef as useRef132,
|
|
25609
25998
|
useState as useState142
|
|
25610
25999
|
} from "react";
|
|
25611
26000
|
import React133, {
|
|
25612
26001
|
forwardRef as forwardRef34,
|
|
25613
26002
|
Suspense as Suspense22,
|
|
25614
|
-
useCallback as
|
|
26003
|
+
useCallback as useCallback122,
|
|
25615
26004
|
useImperativeHandle as useImperativeHandle32,
|
|
25616
26005
|
useMemo as useMemo162,
|
|
25617
|
-
useRef as
|
|
26006
|
+
useRef as useRef122
|
|
25618
26007
|
} from "react";
|
|
25619
26008
|
import { useContext as useContext62, useMemo as useMemo152 } from "react";
|
|
25620
26009
|
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
25621
26010
|
import { jsx as jsx163 } from "react/jsx-runtime";
|
|
25622
26011
|
"use client";
|
|
26012
|
+
if (typeof createContext32 !== "function") {
|
|
26013
|
+
const err = [
|
|
26014
|
+
'Remotion requires React.createContext, but it is "undefined".',
|
|
26015
|
+
'If you are in a React Server Component, turn it into a client component by adding "use client" at the top of the file.',
|
|
26016
|
+
"",
|
|
26017
|
+
"Before:",
|
|
26018
|
+
' import {Player} from "@remotion/player";',
|
|
26019
|
+
"",
|
|
26020
|
+
"After:",
|
|
26021
|
+
' "use client";',
|
|
26022
|
+
' import {Player} from "@remotion/player";'
|
|
26023
|
+
];
|
|
26024
|
+
throw new Error(err.join(`
|
|
26025
|
+
`));
|
|
26026
|
+
}
|
|
25623
26027
|
var ICON_SIZE2 = 25;
|
|
25624
26028
|
var fullscreenIconSize = 16;
|
|
25625
26029
|
var PlayIcon = () => {
|
|
@@ -26052,7 +26456,7 @@ class ThumbnailEmitter {
|
|
|
26052
26456
|
};
|
|
26053
26457
|
}
|
|
26054
26458
|
var useBufferStateEmitter = (emitter) => {
|
|
26055
|
-
const bufferManager =
|
|
26459
|
+
const bufferManager = useContext44(Internals.BufferingContextReact);
|
|
26056
26460
|
if (!bufferManager) {
|
|
26057
26461
|
throw new Error("BufferingContextReact not found");
|
|
26058
26462
|
}
|
|
@@ -26132,36 +26536,36 @@ var usePlayer = () => {
|
|
|
26132
26536
|
const [playing, setPlaying, imperativePlaying] = Internals.Timeline.usePlayingState();
|
|
26133
26537
|
const [hasPlayed, setHasPlayed] = useState310(false);
|
|
26134
26538
|
const frame = Internals.Timeline.useTimelinePosition();
|
|
26135
|
-
const playStart =
|
|
26539
|
+
const playStart = useRef43(frame);
|
|
26136
26540
|
const setFrame = Internals.Timeline.useTimelineSetFrame();
|
|
26137
26541
|
const setTimelinePosition = Internals.Timeline.useTimelineSetFrame();
|
|
26138
|
-
const audioContext =
|
|
26139
|
-
const audioTagsContext =
|
|
26542
|
+
const audioContext = useContext39(Internals.SharedAudioContext);
|
|
26543
|
+
const audioTagsContext = useContext39(Internals.SharedAudioTagsContext);
|
|
26140
26544
|
const { audioAndVideoTags } = Internals.useTimelineContext();
|
|
26141
|
-
const frameRef =
|
|
26545
|
+
const frameRef = useRef43(frame);
|
|
26142
26546
|
frameRef.current = frame;
|
|
26143
26547
|
const video = Internals.useVideo();
|
|
26144
26548
|
const config = Internals.useUnsafeVideoConfig();
|
|
26145
|
-
const emitter =
|
|
26549
|
+
const emitter = useContext39(PlayerEventEmitterContext);
|
|
26146
26550
|
const lastFrame = (config?.durationInFrames ?? 1) - 1;
|
|
26147
26551
|
const isLastFrame = frame === lastFrame;
|
|
26148
26552
|
const isFirstFrame = frame === 0;
|
|
26149
26553
|
if (!emitter) {
|
|
26150
26554
|
throw new TypeError("Expected Player event emitter context");
|
|
26151
26555
|
}
|
|
26152
|
-
const bufferingContext =
|
|
26556
|
+
const bufferingContext = useContext39(Internals.BufferingContextReact);
|
|
26153
26557
|
if (!bufferingContext) {
|
|
26154
26558
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
26155
26559
|
}
|
|
26156
26560
|
const { buffering } = bufferingContext;
|
|
26157
|
-
const seek2 =
|
|
26561
|
+
const seek2 = useCallback34((newFrame) => {
|
|
26158
26562
|
if (video?.id) {
|
|
26159
26563
|
setTimelinePosition((c) => ({ ...c, [video.id]: newFrame }));
|
|
26160
26564
|
}
|
|
26161
26565
|
frameRef.current = newFrame;
|
|
26162
26566
|
emitter.dispatchSeek(newFrame);
|
|
26163
26567
|
}, [emitter, setTimelinePosition, video?.id]);
|
|
26164
|
-
const play =
|
|
26568
|
+
const play = useCallback34((e) => {
|
|
26165
26569
|
if (imperativePlaying.current) {
|
|
26166
26570
|
return;
|
|
26167
26571
|
}
|
|
@@ -26188,7 +26592,7 @@ var usePlayer = () => {
|
|
|
26188
26592
|
seek2,
|
|
26189
26593
|
audioAndVideoTags
|
|
26190
26594
|
]);
|
|
26191
|
-
const pause =
|
|
26595
|
+
const pause = useCallback34(() => {
|
|
26192
26596
|
if (imperativePlaying.current) {
|
|
26193
26597
|
imperativePlaying.current = false;
|
|
26194
26598
|
setPlaying(false);
|
|
@@ -26196,7 +26600,7 @@ var usePlayer = () => {
|
|
|
26196
26600
|
audioContext?.suspend();
|
|
26197
26601
|
}
|
|
26198
26602
|
}, [emitter, imperativePlaying, setPlaying, audioContext]);
|
|
26199
|
-
const pauseAndReturnToPlayStart =
|
|
26603
|
+
const pauseAndReturnToPlayStart = useCallback34(() => {
|
|
26200
26604
|
if (imperativePlaying.current) {
|
|
26201
26605
|
imperativePlaying.current = false;
|
|
26202
26606
|
frameRef.current = playStart.current;
|
|
@@ -26211,7 +26615,7 @@ var usePlayer = () => {
|
|
|
26211
26615
|
}
|
|
26212
26616
|
}, [config, emitter, imperativePlaying, setPlaying, setTimelinePosition]);
|
|
26213
26617
|
const videoId = video?.id;
|
|
26214
|
-
const frameBack =
|
|
26618
|
+
const frameBack = useCallback34((frames) => {
|
|
26215
26619
|
if (!videoId) {
|
|
26216
26620
|
return null;
|
|
26217
26621
|
}
|
|
@@ -26230,7 +26634,7 @@ var usePlayer = () => {
|
|
|
26230
26634
|
};
|
|
26231
26635
|
});
|
|
26232
26636
|
}, [imperativePlaying, setFrame, videoId]);
|
|
26233
|
-
const frameForward =
|
|
26637
|
+
const frameForward = useCallback34((frames) => {
|
|
26234
26638
|
if (!videoId) {
|
|
26235
26639
|
return null;
|
|
26236
26640
|
}
|
|
@@ -26249,20 +26653,20 @@ var usePlayer = () => {
|
|
|
26249
26653
|
};
|
|
26250
26654
|
});
|
|
26251
26655
|
}, [videoId, imperativePlaying, lastFrame, setFrame]);
|
|
26252
|
-
const toggle =
|
|
26656
|
+
const toggle = useCallback34((e) => {
|
|
26253
26657
|
if (imperativePlaying.current) {
|
|
26254
26658
|
pause();
|
|
26255
26659
|
} else {
|
|
26256
26660
|
play(e);
|
|
26257
26661
|
}
|
|
26258
26662
|
}, [imperativePlaying, pause, play]);
|
|
26259
|
-
const isPlaying =
|
|
26663
|
+
const isPlaying = useCallback34(() => {
|
|
26260
26664
|
return imperativePlaying.current;
|
|
26261
26665
|
}, [imperativePlaying]);
|
|
26262
|
-
const getCurrentFrame =
|
|
26666
|
+
const getCurrentFrame = useCallback34(() => {
|
|
26263
26667
|
return frameRef.current;
|
|
26264
26668
|
}, [frameRef]);
|
|
26265
|
-
const isBuffering =
|
|
26669
|
+
const isBuffering = useCallback34(() => {
|
|
26266
26670
|
return buffering.current;
|
|
26267
26671
|
}, [buffering]);
|
|
26268
26672
|
const returnValue = useMemo51(() => {
|
|
@@ -26308,7 +26712,7 @@ var useBrowserMediaSession = ({
|
|
|
26308
26712
|
playbackRate
|
|
26309
26713
|
}) => {
|
|
26310
26714
|
const { playing, pause, play, emitter, getCurrentFrame, seek: seek2 } = usePlayer();
|
|
26311
|
-
const hasEverPlayed =
|
|
26715
|
+
const hasEverPlayed = useRef26(false);
|
|
26312
26716
|
useEffect310(() => {
|
|
26313
26717
|
if (playing) {
|
|
26314
26718
|
hasEverPlayed.current = true;
|
|
@@ -26450,7 +26854,7 @@ var getIsBackgrounded = () => {
|
|
|
26450
26854
|
return document.visibilityState === "hidden";
|
|
26451
26855
|
};
|
|
26452
26856
|
var useIsBackgrounded = () => {
|
|
26453
|
-
const isBackgrounded =
|
|
26857
|
+
const isBackgrounded = useRef310(getIsBackgrounded());
|
|
26454
26858
|
useEffect43(() => {
|
|
26455
26859
|
const onVisibilityChange = () => {
|
|
26456
26860
|
isBackgrounded.current = getIsBackgrounded();
|
|
@@ -26497,11 +26901,11 @@ var usePlayback = ({
|
|
|
26497
26901
|
const frame = Internals.Timeline.useTimelinePosition();
|
|
26498
26902
|
const { playing, pause, emitter, isPlaying } = usePlayer();
|
|
26499
26903
|
const setFrame = Internals.Timeline.useTimelineSetFrame();
|
|
26500
|
-
const sharedAudioContext =
|
|
26904
|
+
const sharedAudioContext = useContext45(Internals.SharedAudioContext);
|
|
26501
26905
|
const logLevel = Internals.useLogLevel();
|
|
26502
26906
|
const isBackgroundedRef = useIsBackgrounded();
|
|
26503
|
-
const lastTimeUpdateTimestamp =
|
|
26504
|
-
const context =
|
|
26907
|
+
const lastTimeUpdateTimestamp = useRef42(0);
|
|
26908
|
+
const context = useContext45(Internals.BufferingContextReact);
|
|
26505
26909
|
if (!context) {
|
|
26506
26910
|
throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
|
|
26507
26911
|
}
|
|
@@ -26767,7 +27171,7 @@ var useElementSize = (ref, options2) => {
|
|
|
26767
27171
|
});
|
|
26768
27172
|
});
|
|
26769
27173
|
}, [options2.shouldApplyCssTransforms]);
|
|
26770
|
-
const updateSize =
|
|
27174
|
+
const updateSize = useCallback24(() => {
|
|
26771
27175
|
if (!ref.current) {
|
|
26772
27176
|
return;
|
|
26773
27177
|
}
|
|
@@ -26988,7 +27392,7 @@ var DefaultVolumeSlider = ({
|
|
|
26988
27392
|
}, [isVertical]);
|
|
26989
27393
|
const randomId = typeof React54.useId === "undefined" ? "volume-slider" : React54.useId();
|
|
26990
27394
|
const [randomClass] = useState52(() => `__remotion-volume-slider-${random(randomId)}`.replace(".", ""));
|
|
26991
|
-
const onVolumeChange =
|
|
27395
|
+
const onVolumeChange = useCallback35((e) => {
|
|
26992
27396
|
setVolume(parseFloat(e.target.value));
|
|
26993
27397
|
}, [setVolume]);
|
|
26994
27398
|
const inputStyle = useMemo39(() => {
|
|
@@ -27065,10 +27469,10 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
27065
27469
|
const [mediaMuted, setMediaMuted] = Internals.useMediaMutedState();
|
|
27066
27470
|
const [mediaVolume, setMediaVolume] = Internals.useMediaVolumeState();
|
|
27067
27471
|
const [focused, setFocused] = useState62(false);
|
|
27068
|
-
const parentDivRef =
|
|
27069
|
-
const inputRef =
|
|
27472
|
+
const parentDivRef = useRef52(null);
|
|
27473
|
+
const inputRef = useRef52(null);
|
|
27070
27474
|
const hover = useHoverState(parentDivRef, false);
|
|
27071
|
-
const onBlur =
|
|
27475
|
+
const onBlur = useCallback42(() => {
|
|
27072
27476
|
setTimeout(() => {
|
|
27073
27477
|
if (inputRef.current && document.activeElement !== inputRef.current) {
|
|
27074
27478
|
setFocused(false);
|
|
@@ -27076,7 +27480,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
27076
27480
|
}, 10);
|
|
27077
27481
|
}, []);
|
|
27078
27482
|
const isVolume0 = mediaVolume === 0;
|
|
27079
|
-
const onClick =
|
|
27483
|
+
const onClick = useCallback42(() => {
|
|
27080
27484
|
if (isVolume0) {
|
|
27081
27485
|
setMediaVolume(1);
|
|
27082
27486
|
setMediaMuted(false);
|
|
@@ -27107,7 +27511,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
27107
27511
|
padding: 0
|
|
27108
27512
|
};
|
|
27109
27513
|
}, []);
|
|
27110
|
-
const renderDefaultMuteButton =
|
|
27514
|
+
const renderDefaultMuteButton = useCallback42(({ muted, volume }) => {
|
|
27111
27515
|
const isMutedOrZero = muted || volume === 0;
|
|
27112
27516
|
return /* @__PURE__ */ jsx84("button", {
|
|
27113
27517
|
"aria-label": isMutedOrZero ? "Unmute sound" : "Mute sound",
|
|
@@ -27151,7 +27555,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
27151
27555
|
};
|
|
27152
27556
|
function useComponentVisible(initialIsVisible) {
|
|
27153
27557
|
const [isComponentVisible, setIsComponentVisible] = useState72(initialIsVisible);
|
|
27154
|
-
const ref =
|
|
27558
|
+
const ref = useRef62(null);
|
|
27155
27559
|
useEffect83(() => {
|
|
27156
27560
|
const handleClickOutside = (event) => {
|
|
27157
27561
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
@@ -27198,16 +27602,16 @@ var formatPlaybackRate = (rate) => {
|
|
|
27198
27602
|
return str.includes(".") ? str : str + ".0";
|
|
27199
27603
|
};
|
|
27200
27604
|
var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }) => {
|
|
27201
|
-
const onClick =
|
|
27605
|
+
const onClick = useCallback52((e) => {
|
|
27202
27606
|
e.stopPropagation();
|
|
27203
27607
|
e.preventDefault();
|
|
27204
27608
|
onSelect(rate);
|
|
27205
27609
|
}, [onSelect, rate]);
|
|
27206
27610
|
const [hovered, setHovered] = useState82(false);
|
|
27207
|
-
const onMouseEnter =
|
|
27611
|
+
const onMouseEnter = useCallback52(() => {
|
|
27208
27612
|
setHovered(true);
|
|
27209
27613
|
}, []);
|
|
27210
|
-
const onMouseLeave =
|
|
27614
|
+
const onMouseLeave = useCallback52(() => {
|
|
27211
27615
|
setHovered(false);
|
|
27212
27616
|
}, []);
|
|
27213
27617
|
const isFocused = keyboardSelectedRate === rate;
|
|
@@ -27274,7 +27678,7 @@ var PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
|
|
|
27274
27678
|
setPlaybackRate,
|
|
27275
27679
|
setIsComponentVisible
|
|
27276
27680
|
]);
|
|
27277
|
-
const onSelect =
|
|
27681
|
+
const onSelect = useCallback52((rate) => {
|
|
27278
27682
|
setPlaybackRate(rate);
|
|
27279
27683
|
setIsComponentVisible(false);
|
|
27280
27684
|
}, [setIsComponentVisible, setPlaybackRate]);
|
|
@@ -27337,7 +27741,7 @@ var button = {
|
|
|
27337
27741
|
var PlaybackrateControl = ({ playbackRates, canvasSize }) => {
|
|
27338
27742
|
const { ref, isComponentVisible, setIsComponentVisible } = useComponentVisible(false);
|
|
27339
27743
|
const { playbackRate } = Internals.usePlaybackRate();
|
|
27340
|
-
const onClick =
|
|
27744
|
+
const onClick = useCallback52((e) => {
|
|
27341
27745
|
e.stopPropagation();
|
|
27342
27746
|
e.preventDefault();
|
|
27343
27747
|
setIsComponentVisible((prevIsComponentVisible) => !prevIsComponentVisible);
|
|
@@ -27401,7 +27805,7 @@ var findBodyInWhichDivIsLocated = (div) => {
|
|
|
27401
27805
|
return current;
|
|
27402
27806
|
};
|
|
27403
27807
|
var PlayerSeekBar = ({ durationInFrames, onSeekEnd, onSeekStart, inFrame, outFrame }) => {
|
|
27404
|
-
const containerRef =
|
|
27808
|
+
const containerRef = useRef72(null);
|
|
27405
27809
|
const barHovered = useHoverState(containerRef, false);
|
|
27406
27810
|
const size4 = useElementSize(containerRef, {
|
|
27407
27811
|
triggerOnWindowResize: true,
|
|
@@ -27413,7 +27817,7 @@ var PlayerSeekBar = ({ durationInFrames, onSeekEnd, onSeekStart, inFrame, outFra
|
|
|
27413
27817
|
dragging: false
|
|
27414
27818
|
});
|
|
27415
27819
|
const width = size4?.width ?? 0;
|
|
27416
|
-
const onPointerDown =
|
|
27820
|
+
const onPointerDown = useCallback62((e) => {
|
|
27417
27821
|
if (e.button !== 0) {
|
|
27418
27822
|
return;
|
|
27419
27823
|
}
|
|
@@ -27427,7 +27831,7 @@ var PlayerSeekBar = ({ durationInFrames, onSeekEnd, onSeekStart, inFrame, outFra
|
|
|
27427
27831
|
});
|
|
27428
27832
|
onSeekStart();
|
|
27429
27833
|
}, [durationInFrames, width, pause, seek2, playing, onSeekStart]);
|
|
27430
|
-
const onPointerMove =
|
|
27834
|
+
const onPointerMove = useCallback62((e) => {
|
|
27431
27835
|
if (!size4) {
|
|
27432
27836
|
throw new Error("Player has no size");
|
|
27433
27837
|
}
|
|
@@ -27438,7 +27842,7 @@ var PlayerSeekBar = ({ durationInFrames, onSeekEnd, onSeekStart, inFrame, outFra
|
|
|
27438
27842
|
const _frame = getFrameFromX(e.clientX - posLeft, durationInFrames, size4.width);
|
|
27439
27843
|
seek2(_frame);
|
|
27440
27844
|
}, [dragging.dragging, durationInFrames, seek2, size4]);
|
|
27441
|
-
const onPointerUp =
|
|
27845
|
+
const onPointerUp = useCallback62(() => {
|
|
27442
27846
|
setDragging({
|
|
27443
27847
|
dragging: false
|
|
27444
27848
|
});
|
|
@@ -27678,7 +28082,7 @@ var Controls = ({
|
|
|
27678
28082
|
toggle,
|
|
27679
28083
|
renderCustomControls
|
|
27680
28084
|
}) => {
|
|
27681
|
-
const playButtonRef =
|
|
28085
|
+
const playButtonRef = useRef82(null);
|
|
27682
28086
|
const [supportsFullscreen, setSupportsFullscreen] = useState102(false);
|
|
27683
28087
|
const hovered = useHoverState(containerRef, hideControlsWhenPointerDoesntMove);
|
|
27684
28088
|
const { maxTimeLabelWidth, displayVerticalVolumeSlider } = useVideoControlsResize({
|
|
@@ -27753,14 +28157,14 @@ var Controls = ({
|
|
|
27753
28157
|
return null;
|
|
27754
28158
|
}, [showPlaybackRateControl]);
|
|
27755
28159
|
const customControlsElement = renderCustomControls ? renderCustomControls() : null;
|
|
27756
|
-
const ref =
|
|
27757
|
-
const flexRef =
|
|
27758
|
-
const onPointerDownIfContainer =
|
|
28160
|
+
const ref = useRef82(null);
|
|
28161
|
+
const flexRef = useRef82(null);
|
|
28162
|
+
const onPointerDownIfContainer = useCallback72((e) => {
|
|
27759
28163
|
if (e.target === ref.current || e.target === flexRef.current) {
|
|
27760
28164
|
onPointerDown?.(e);
|
|
27761
28165
|
}
|
|
27762
28166
|
}, [onPointerDown]);
|
|
27763
|
-
const onDoubleClickIfContainer =
|
|
28167
|
+
const onDoubleClickIfContainer = useCallback72((e) => {
|
|
27764
28168
|
if (e.target === ref.current || e.target === flexRef.current) {
|
|
27765
28169
|
onDoubleClick?.(e);
|
|
27766
28170
|
}
|
|
@@ -27886,14 +28290,14 @@ var cancellablePromise = (promise) => {
|
|
|
27886
28290
|
};
|
|
27887
28291
|
var delay = (n) => new Promise((resolve) => setTimeout(resolve, n));
|
|
27888
28292
|
var useCancellablePromises = () => {
|
|
27889
|
-
const pendingPromises =
|
|
27890
|
-
const appendPendingPromise =
|
|
28293
|
+
const pendingPromises = useRef92([]);
|
|
28294
|
+
const appendPendingPromise = useCallback82((promise) => {
|
|
27891
28295
|
pendingPromises.current = [...pendingPromises.current, promise];
|
|
27892
28296
|
}, []);
|
|
27893
|
-
const removePendingPromise =
|
|
28297
|
+
const removePendingPromise = useCallback82((promise) => {
|
|
27894
28298
|
pendingPromises.current = pendingPromises.current.filter((p) => p !== promise);
|
|
27895
28299
|
}, []);
|
|
27896
|
-
const clearPendingPromises =
|
|
28300
|
+
const clearPendingPromises = useCallback82(() => pendingPromises.current.map((p) => p.cancel()), []);
|
|
27897
28301
|
const api = useMemo102(() => ({
|
|
27898
28302
|
appendPendingPromise,
|
|
27899
28303
|
removePendingPromise,
|
|
@@ -27903,7 +28307,7 @@ var useCancellablePromises = () => {
|
|
|
27903
28307
|
};
|
|
27904
28308
|
var useClickPreventionOnDoubleClick = (onClick, onDoubleClick, doubleClickToFullscreen) => {
|
|
27905
28309
|
const api = useCancellablePromises();
|
|
27906
|
-
const handleClick =
|
|
28310
|
+
const handleClick = useCallback92(async (e) => {
|
|
27907
28311
|
if (e instanceof PointerEvent ? e.pointerType === "touch" : e.nativeEvent.pointerType === "touch") {
|
|
27908
28312
|
onClick(e);
|
|
27909
28313
|
return;
|
|
@@ -27923,14 +28327,14 @@ var useClickPreventionOnDoubleClick = (onClick, onDoubleClick, doubleClickToFull
|
|
|
27923
28327
|
}
|
|
27924
28328
|
}
|
|
27925
28329
|
}, [api, onClick]);
|
|
27926
|
-
const handlePointerDown =
|
|
28330
|
+
const handlePointerDown = useCallback92(() => {
|
|
27927
28331
|
document.addEventListener("pointerup", (newEvt) => {
|
|
27928
28332
|
handleClick(newEvt);
|
|
27929
28333
|
}, {
|
|
27930
28334
|
once: true
|
|
27931
28335
|
});
|
|
27932
28336
|
}, [handleClick]);
|
|
27933
|
-
const handleDoubleClick =
|
|
28337
|
+
const handleDoubleClick = useCallback92(() => {
|
|
27934
28338
|
api.clearPendingPromises();
|
|
27935
28339
|
onDoubleClick();
|
|
27936
28340
|
}, [api, onDoubleClick]);
|
|
@@ -27944,7 +28348,7 @@ var useClickPreventionOnDoubleClick = (onClick, onDoubleClick, doubleClickToFull
|
|
|
27944
28348
|
}, [doubleClickToFullscreen, handleDoubleClick, handlePointerDown, onClick]);
|
|
27945
28349
|
return returnValue;
|
|
27946
28350
|
};
|
|
27947
|
-
var reactVersion =
|
|
28351
|
+
var reactVersion = React103.version.split(".")[0];
|
|
27948
28352
|
if (reactVersion === "0") {
|
|
27949
28353
|
throw new Error(`Version ${reactVersion} of "react" is not supported by Remotion`);
|
|
27950
28354
|
}
|
|
@@ -27991,7 +28395,7 @@ var PlayerUI = ({
|
|
|
27991
28395
|
}, ref) => {
|
|
27992
28396
|
const config = Internals.useUnsafeVideoConfig();
|
|
27993
28397
|
const video = Internals.useVideo();
|
|
27994
|
-
const container4 =
|
|
28398
|
+
const container4 = useRef102(null);
|
|
27995
28399
|
const canvasSize = useElementSize(container4, {
|
|
27996
28400
|
triggerOnWindowResize: false,
|
|
27997
28401
|
shouldApplyCssTransforms: false
|
|
@@ -28050,10 +28454,10 @@ var PlayerUI = ({
|
|
|
28050
28454
|
document.removeEventListener("webkitfullscreenchange", onFullscreenChange);
|
|
28051
28455
|
};
|
|
28052
28456
|
}, []);
|
|
28053
|
-
const toggle =
|
|
28457
|
+
const toggle = useCallback102((e) => {
|
|
28054
28458
|
playerToggle(e);
|
|
28055
28459
|
}, [playerToggle]);
|
|
28056
|
-
const requestFullscreen =
|
|
28460
|
+
const requestFullscreen = useCallback102(() => {
|
|
28057
28461
|
if (!allowFullscreen) {
|
|
28058
28462
|
throw new Error("allowFullscreen is false");
|
|
28059
28463
|
}
|
|
@@ -28069,7 +28473,7 @@ var PlayerUI = ({
|
|
|
28069
28473
|
container4.current.requestFullscreen();
|
|
28070
28474
|
}
|
|
28071
28475
|
}, [allowFullscreen, supportsFullScreen]);
|
|
28072
|
-
const exitFullscreen =
|
|
28476
|
+
const exitFullscreen = useCallback102(() => {
|
|
28073
28477
|
if (document.webkitExitFullscreen) {
|
|
28074
28478
|
document.webkitExitFullscreen();
|
|
28075
28479
|
} else {
|
|
@@ -28113,7 +28517,7 @@ var PlayerUI = ({
|
|
|
28113
28517
|
});
|
|
28114
28518
|
}, [canvasSize, config]);
|
|
28115
28519
|
const scale = layout?.scale ?? 1;
|
|
28116
|
-
const initialScaleIgnored =
|
|
28520
|
+
const initialScaleIgnored = useRef102(false);
|
|
28117
28521
|
useEffect122(() => {
|
|
28118
28522
|
if (!initialScaleIgnored.current) {
|
|
28119
28523
|
initialScaleIgnored.current = true;
|
|
@@ -28262,32 +28666,32 @@ var PlayerUI = ({
|
|
|
28262
28666
|
}, [config, layout, overflowVisible, scale]);
|
|
28263
28667
|
const playerPause = player.pause;
|
|
28264
28668
|
const playerDispatchError = player.emitter.dispatchError;
|
|
28265
|
-
const onError =
|
|
28669
|
+
const onError = useCallback102((error2) => {
|
|
28266
28670
|
playerPause();
|
|
28267
28671
|
playerDispatchError(error2);
|
|
28268
28672
|
}, [playerDispatchError, playerPause]);
|
|
28269
|
-
const onFullscreenButtonClick =
|
|
28673
|
+
const onFullscreenButtonClick = useCallback102((e) => {
|
|
28270
28674
|
e.stopPropagation();
|
|
28271
28675
|
requestFullscreen();
|
|
28272
28676
|
}, [requestFullscreen]);
|
|
28273
|
-
const onExitFullscreenButtonClick =
|
|
28677
|
+
const onExitFullscreenButtonClick = useCallback102((e) => {
|
|
28274
28678
|
e.stopPropagation();
|
|
28275
28679
|
exitFullscreen();
|
|
28276
28680
|
}, [exitFullscreen]);
|
|
28277
|
-
const onSingleClick =
|
|
28681
|
+
const onSingleClick = useCallback102((e) => {
|
|
28278
28682
|
const rightClick = e instanceof MouseEvent ? e.button === 2 : e.nativeEvent.button;
|
|
28279
28683
|
if (rightClick) {
|
|
28280
28684
|
return;
|
|
28281
28685
|
}
|
|
28282
28686
|
toggle(e);
|
|
28283
28687
|
}, [toggle]);
|
|
28284
|
-
const onSeekStart =
|
|
28688
|
+
const onSeekStart = useCallback102(() => {
|
|
28285
28689
|
setSeeking(true);
|
|
28286
28690
|
}, []);
|
|
28287
|
-
const onSeekEnd =
|
|
28691
|
+
const onSeekEnd = useCallback102(() => {
|
|
28288
28692
|
setSeeking(false);
|
|
28289
28693
|
}, []);
|
|
28290
|
-
const onDoubleClick =
|
|
28694
|
+
const onDoubleClick = useCallback102(() => {
|
|
28291
28695
|
if (isFullscreen) {
|
|
28292
28696
|
exitFullscreen();
|
|
28293
28697
|
} else {
|
|
@@ -28520,7 +28924,7 @@ var SharedPlayerContexts = ({
|
|
|
28520
28924
|
mediaVolume
|
|
28521
28925
|
};
|
|
28522
28926
|
}, [mediaMuted, mediaVolume]);
|
|
28523
|
-
const setMediaVolumeAndPersist =
|
|
28927
|
+
const setMediaVolumeAndPersist = useCallback112((vol) => {
|
|
28524
28928
|
setMediaVolume(vol);
|
|
28525
28929
|
if (persistVolumeToStorage) {
|
|
28526
28930
|
persistVolume(vol, logLevel, volumePersistenceKey ?? null);
|
|
@@ -28771,9 +29175,9 @@ var PlayerFn = ({
|
|
|
28771
29175
|
}));
|
|
28772
29176
|
const [playing, setPlaying] = useState132(false);
|
|
28773
29177
|
const [rootId] = useState132("player-comp");
|
|
28774
|
-
const rootRef =
|
|
28775
|
-
const audioAndVideoTags =
|
|
28776
|
-
const imperativePlaying =
|
|
29178
|
+
const rootRef = useRef112(null);
|
|
29179
|
+
const audioAndVideoTags = useRef112([]);
|
|
29180
|
+
const imperativePlaying = useRef112(false);
|
|
28777
29181
|
const [currentPlaybackRate, setCurrentPlaybackRate] = useState132(playbackRate);
|
|
28778
29182
|
if (typeof compositionHeight !== "number") {
|
|
28779
29183
|
throw new TypeError(`'compositionHeight' must be a number but got '${typeof compositionHeight}' instead`);
|
|
@@ -28970,7 +29374,7 @@ var ThumbnailUI = ({
|
|
|
28970
29374
|
}, ref) => {
|
|
28971
29375
|
const config = Internals.useUnsafeVideoConfig();
|
|
28972
29376
|
const video = Internals.useVideo();
|
|
28973
|
-
const container4 =
|
|
29377
|
+
const container4 = useRef122(null);
|
|
28974
29378
|
const canvasSize = useElementSize(container4, {
|
|
28975
29379
|
triggerOnWindowResize: false,
|
|
28976
29380
|
shouldApplyCssTransforms: false
|
|
@@ -29017,7 +29421,7 @@ var ThumbnailUI = ({
|
|
|
29017
29421
|
overflowVisible
|
|
29018
29422
|
});
|
|
29019
29423
|
}, [config, layout, overflowVisible, scale]);
|
|
29020
|
-
const onError =
|
|
29424
|
+
const onError = useCallback122((error2) => {
|
|
29021
29425
|
thumbnail.emitter.dispatchError(error2);
|
|
29022
29426
|
}, [thumbnail.emitter]);
|
|
29023
29427
|
const loadingMarkup = useMemo162(() => {
|
|
@@ -29096,7 +29500,7 @@ var ThumbnailFn = ({
|
|
|
29096
29500
|
}, []);
|
|
29097
29501
|
}
|
|
29098
29502
|
const [thumbnailId] = useState142(() => String(random(null)));
|
|
29099
|
-
const rootRef =
|
|
29503
|
+
const rootRef = useRef132(null);
|
|
29100
29504
|
const timelineState = useMemo172(() => {
|
|
29101
29505
|
const value = {
|
|
29102
29506
|
playing: false,
|
|
@@ -29919,7 +30323,7 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
|
|
|
29919
30323
|
var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
|
|
29920
30324
|
|
|
29921
30325
|
// src/components/homepage/layout/use-color-mode.tsx
|
|
29922
|
-
import React57, { useContext as
|
|
30326
|
+
import React57, { useContext as useContext46, useMemo as useMemo53 } from "react";
|
|
29923
30327
|
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
29924
30328
|
var Context = React57.createContext(undefined);
|
|
29925
30329
|
var ColorModeProvider = ({
|
|
@@ -29936,7 +30340,7 @@ var ColorModeProvider = ({
|
|
|
29936
30340
|
});
|
|
29937
30341
|
};
|
|
29938
30342
|
function useColorMode() {
|
|
29939
|
-
const context =
|
|
30343
|
+
const context = useContext46(Context);
|
|
29940
30344
|
if (context === null || context === undefined) {
|
|
29941
30345
|
throw new Error("ColorModeProvider");
|
|
29942
30346
|
}
|
|
@@ -29946,13 +30350,13 @@ function useColorMode() {
|
|
|
29946
30350
|
// ../media/dist/esm/index.mjs
|
|
29947
30351
|
import { useState as useState312 } from "react";
|
|
29948
30352
|
import { useMemo as useMemo311 } from "react";
|
|
29949
|
-
import { useContext as useContext212, useEffect as useEffect44, useMemo as useMemo55, useRef as
|
|
30353
|
+
import { useContext as useContext212, useEffect as useEffect44, useMemo as useMemo55, useRef as useRef45, useState as useState41 } from "react";
|
|
29950
30354
|
import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
|
|
29951
30355
|
import { AudioBufferSink, InputDisposedError } from "mediabunny";
|
|
29952
30356
|
import { CanvasSink } from "mediabunny";
|
|
29953
|
-
import { useContext as
|
|
30357
|
+
import { useContext as useContext48, useLayoutEffect as useLayoutEffect18 } from "react";
|
|
29954
30358
|
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
29955
|
-
import { useContext as
|
|
30359
|
+
import { useContext as useContext311, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState210 } from "react";
|
|
29956
30360
|
import React211 from "react";
|
|
29957
30361
|
import {
|
|
29958
30362
|
ALL_FORMATS as ALL_FORMATS2,
|
|
@@ -29968,7 +30372,7 @@ import { jsx as jsx216 } from "react/jsx-runtime";
|
|
|
29968
30372
|
import { jsx as jsx315 } from "react/jsx-runtime";
|
|
29969
30373
|
import { useMemo as useMemo63, useState as useState63 } from "react";
|
|
29970
30374
|
import {
|
|
29971
|
-
useContext as
|
|
30375
|
+
useContext as useContext47,
|
|
29972
30376
|
useEffect as useEffect210,
|
|
29973
30377
|
useLayoutEffect as useLayoutEffect34,
|
|
29974
30378
|
useMemo as useMemo412,
|
|
@@ -31735,7 +32139,7 @@ var useCommonEffects = ({
|
|
|
31735
32139
|
logLevel,
|
|
31736
32140
|
label: label3
|
|
31737
32141
|
}) => {
|
|
31738
|
-
const sharedAudioContext =
|
|
32142
|
+
const sharedAudioContext = useContext48(Internals.SharedAudioContext);
|
|
31739
32143
|
useLayoutEffect18(() => {
|
|
31740
32144
|
const mediaPlayer = mediaPlayerRef.current;
|
|
31741
32145
|
if (!mediaPlayer)
|
|
@@ -31891,9 +32295,9 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
31891
32295
|
}) => {
|
|
31892
32296
|
const videoConfig = useUnsafeVideoConfig2();
|
|
31893
32297
|
const frame = useCurrentFrame();
|
|
31894
|
-
const mediaPlayerRef =
|
|
31895
|
-
const initialTrimBeforeRef =
|
|
31896
|
-
const initialTrimAfterRef =
|
|
32298
|
+
const mediaPlayerRef = useRef45(null);
|
|
32299
|
+
const initialTrimBeforeRef = useRef45(trimBefore);
|
|
32300
|
+
const initialTrimAfterRef = useRef45(trimAfter);
|
|
31897
32301
|
const [mediaPlayerReady, setMediaPlayerReady] = useState41(false);
|
|
31898
32302
|
const [shouldFallbackToNativeAudio, setShouldFallbackToNativeAudio] = useState41(false);
|
|
31899
32303
|
const [playing] = Timeline.usePlayingState();
|
|
@@ -31916,7 +32320,7 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
31916
32320
|
throw new TypeError("No `src` was passed to <NewAudioForPreview>.");
|
|
31917
32321
|
}
|
|
31918
32322
|
const currentTime = frame / videoConfig.fps;
|
|
31919
|
-
const currentTimeRef =
|
|
32323
|
+
const currentTimeRef = useRef45(currentTime);
|
|
31920
32324
|
currentTimeRef.current = currentTime;
|
|
31921
32325
|
const preloadedSrc = usePreload2(src);
|
|
31922
32326
|
const parentSequence = useContext212(SequenceContext2);
|
|
@@ -31929,14 +32333,14 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
31929
32333
|
}
|
|
31930
32334
|
const effectiveMuted = muted || mediaMuted || userPreferredVolume <= 0;
|
|
31931
32335
|
const isPlayerBuffering = Internals.useIsPlayerBuffering(bufferingContext);
|
|
31932
|
-
const initialPlaying =
|
|
31933
|
-
const initialIsPremounting =
|
|
31934
|
-
const initialIsPostmounting =
|
|
31935
|
-
const initialGlobalPlaybackRate =
|
|
31936
|
-
const initialPlaybackRate =
|
|
31937
|
-
const initialMuted =
|
|
31938
|
-
const initialDurationInFrames =
|
|
31939
|
-
const initialSequenceOffset =
|
|
32336
|
+
const initialPlaying = useRef45(playing && !isPlayerBuffering);
|
|
32337
|
+
const initialIsPremounting = useRef45(isPremounting);
|
|
32338
|
+
const initialIsPostmounting = useRef45(isPostmounting);
|
|
32339
|
+
const initialGlobalPlaybackRate = useRef45(globalPlaybackRate);
|
|
32340
|
+
const initialPlaybackRate = useRef45(playbackRate);
|
|
32341
|
+
const initialMuted = useRef45(effectiveMuted);
|
|
32342
|
+
const initialDurationInFrames = useRef45(videoConfig.durationInFrames);
|
|
32343
|
+
const initialSequenceOffset = useRef45(sequenceOffset);
|
|
31940
32344
|
useCommonEffects({
|
|
31941
32345
|
mediaPlayerRef,
|
|
31942
32346
|
mediaPlayerReady,
|
|
@@ -34011,7 +34415,7 @@ var AudioForRendering2 = ({
|
|
|
34011
34415
|
const frame = useCurrentFrame();
|
|
34012
34416
|
const absoluteFrame = Internals.useTimelinePosition();
|
|
34013
34417
|
const videoConfig = Internals.useUnsafeVideoConfig();
|
|
34014
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
34418
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext311(Internals.RenderAssetManager);
|
|
34015
34419
|
const startsAt = Internals.useMediaStartsAt();
|
|
34016
34420
|
const environment = useRemotionEnvironment();
|
|
34017
34421
|
if (!videoConfig) {
|
|
@@ -34023,7 +34427,7 @@ var AudioForRendering2 = ({
|
|
|
34023
34427
|
const { fps } = videoConfig;
|
|
34024
34428
|
const { delayRender: delayRender2, continueRender } = useDelayRender();
|
|
34025
34429
|
const [replaceWithHtml5Audio, setReplaceWithHtml5Audio] = useState210(false);
|
|
34026
|
-
const sequenceContext =
|
|
34430
|
+
const sequenceContext = useContext311(Internals.SequenceContext);
|
|
34027
34431
|
const id = useMemo213(() => `media-audio-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
34028
34432
|
src,
|
|
34029
34433
|
sequenceContext?.cumulatedFrom,
|
|
@@ -34376,7 +34780,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
34376
34780
|
const [shouldFallbackToNativeVideo, setShouldFallbackToNativeVideo] = useState43(false);
|
|
34377
34781
|
const [playing] = Timeline2.usePlayingState();
|
|
34378
34782
|
const { playbackRate: globalPlaybackRate } = Internals.usePlaybackRate();
|
|
34379
|
-
const sharedAudioContext =
|
|
34783
|
+
const sharedAudioContext = useContext47(SharedAudioContext22);
|
|
34380
34784
|
const buffer = useBufferState();
|
|
34381
34785
|
const [mediaMuted] = useMediaMutedState22();
|
|
34382
34786
|
const [mediaVolume] = useMediaVolumeState22();
|
|
@@ -34397,7 +34801,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
34397
34801
|
effectChainStateRef.current = effectChainState;
|
|
34398
34802
|
const frameRef = useRef210(frame);
|
|
34399
34803
|
frameRef.current = frame;
|
|
34400
|
-
const parentSequence =
|
|
34804
|
+
const parentSequence = useContext47(SequenceContext22);
|
|
34401
34805
|
const isPremounting = Boolean(parentSequence?.premounting);
|
|
34402
34806
|
const isPostmounting = Boolean(parentSequence?.postmounting);
|
|
34403
34807
|
const sequenceOffset = ((parentSequence?.cumulatedFrom ?? 0) + (parentSequence?.relativeFrom ?? 0)) / videoConfig.fps;
|
|
@@ -34405,7 +34809,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
34405
34809
|
const currentTimeRef = useRef210(currentTime);
|
|
34406
34810
|
currentTimeRef.current = currentTime;
|
|
34407
34811
|
const preloadedSrc = usePreload22(src);
|
|
34408
|
-
const buffering =
|
|
34812
|
+
const buffering = useContext47(Internals.BufferingContextReact);
|
|
34409
34813
|
if (!buffering) {
|
|
34410
34814
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
34411
34815
|
}
|
|
@@ -35197,6 +35601,11 @@ var VideoInner = ({
|
|
|
35197
35601
|
type: "video",
|
|
35198
35602
|
data: basicInfo
|
|
35199
35603
|
}), [basicInfo]);
|
|
35604
|
+
const memoizedEffects = Internals.useMemoizedEffects({
|
|
35605
|
+
effects: _experimentalEffects ?? [],
|
|
35606
|
+
overrideId: controls?.overrideId ?? null
|
|
35607
|
+
});
|
|
35608
|
+
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(_experimentalEffects ?? []);
|
|
35200
35609
|
if (sequenceDurationInFrames === 0) {
|
|
35201
35610
|
return null;
|
|
35202
35611
|
}
|
|
@@ -35209,6 +35618,7 @@ var VideoInner = ({
|
|
|
35209
35618
|
name: name ?? "<Video>",
|
|
35210
35619
|
_experimentalControls: controls,
|
|
35211
35620
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
35621
|
+
_experimentalEffects: memoizedEffectDefinitions,
|
|
35212
35622
|
showInTimeline: showInTimeline ?? true,
|
|
35213
35623
|
children: /* @__PURE__ */ jsx65(InnerVideo, {
|
|
35214
35624
|
audioStreamIndex: audioStreamIndex ?? 0,
|
|
@@ -35238,7 +35648,7 @@ var VideoInner = ({
|
|
|
35238
35648
|
_experimentalControls: controls,
|
|
35239
35649
|
objectFit: objectFit ?? "contain",
|
|
35240
35650
|
_experimentalInitiallyDrawCachedFrame: _experimentalInitiallyDrawCachedFrame ?? false,
|
|
35241
|
-
_experimentalEffects:
|
|
35651
|
+
_experimentalEffects: memoizedEffects,
|
|
35242
35652
|
setMediaDurationInSeconds
|
|
35243
35653
|
})
|
|
35244
35654
|
});
|
|
@@ -36547,7 +36957,7 @@ import {
|
|
|
36547
36957
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
36548
36958
|
|
|
36549
36959
|
// ../core/dist/esm/version.mjs
|
|
36550
|
-
var VERSION2 = "4.0.
|
|
36960
|
+
var VERSION2 = "4.0.462";
|
|
36551
36961
|
|
|
36552
36962
|
// ../web-renderer/dist/esm/index.mjs
|
|
36553
36963
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -37195,7 +37605,6 @@ var UpdateTime = ({
|
|
|
37195
37605
|
}
|
|
37196
37606
|
}));
|
|
37197
37607
|
return /* @__PURE__ */ jsx88(Internals.RemotionRootContexts, {
|
|
37198
|
-
visualModeEnabled: false,
|
|
37199
37608
|
audioEnabled,
|
|
37200
37609
|
videoEnabled,
|
|
37201
37610
|
logLevel,
|
|
@@ -40236,7 +40645,7 @@ var applyTextTransform = (text, transform) => {
|
|
|
40236
40645
|
return text.toLowerCase();
|
|
40237
40646
|
}
|
|
40238
40647
|
if (transform === "capitalize") {
|
|
40239
|
-
return text.replace(/\b\w/g, (char) => char.toUpperCase());
|
|
40648
|
+
return text.replace(/\b(?<!['\u2019])\w/g, (char) => char.toUpperCase());
|
|
40240
40649
|
}
|
|
40241
40650
|
return text;
|
|
40242
40651
|
};
|
|
@@ -43530,6 +43939,7 @@ var listOfRemotionPackages = [
|
|
|
43530
43939
|
"@remotion/serverless",
|
|
43531
43940
|
"@remotion/serverless-client",
|
|
43532
43941
|
"@remotion/skills",
|
|
43942
|
+
"@remotion/skills-evals",
|
|
43533
43943
|
"@remotion/studio-server",
|
|
43534
43944
|
"@remotion/studio-shared",
|
|
43535
43945
|
"@remotion/studio",
|