@remotion/promo-pages 4.0.456 → 4.0.458
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 +912 -684
- package/dist/design.js +530 -447
- package/dist/experts/experts-data.js +124 -2
- package/dist/experts.js +667 -441
- package/dist/homepage/Pricing.js +533 -450
- package/dist/prompts/PromptsGallery.js +534 -451
- package/dist/prompts/PromptsShow.js +566 -483
- package/dist/prompts/PromptsSubmit.js +568 -485
- package/dist/team.js +530 -447
- package/dist/template-modal-content.js +540 -457
- package/dist/templates.js +530 -447
- package/package.json +13 -13
- package/public/img/freelancers/huang-chi-chang.jpg +0 -0
- package/dist/cn.d.ts +0 -2
- package/dist/cn.js +0 -5
- package/dist/components/3DEngine/ButtonDemo.d.ts +0 -2
- package/dist/components/3DEngine/ButtonDemo.js +0 -43
- package/dist/components/3DEngine/Faces.d.ts +0 -5
- package/dist/components/3DEngine/Faces.js +0 -7
- package/dist/components/3DEngine/Outer.d.ts +0 -8
- package/dist/components/3DEngine/Outer.js +0 -56
- package/dist/components/3DEngine/Switch.d.ts +0 -4
- package/dist/components/3DEngine/Switch.js +0 -4
- package/dist/components/3DEngine/get-child-node-from.d.ts +0 -1
- package/dist/components/3DEngine/get-child-node-from.js +0 -14
- package/dist/components/3DEngine/hover-transforms.d.ts +0 -9
- package/dist/components/3DEngine/hover-transforms.js +0 -177
- package/dist/components/BackButton.d.ts +0 -6
- package/dist/components/BackButton.js +0 -9
- package/dist/components/CommandCopyButton.d.ts +0 -5
- package/dist/components/CommandCopyButton.js +0 -4
- package/dist/components/Homepage.d.ts +0 -6
- package/dist/components/Homepage.js +0 -20
- package/dist/components/ManageTeamMembers.d.ts +0 -2
- package/dist/components/ManageTeamMembers.js +0 -42
- package/dist/components/Spinner.d.ts +0 -3
- package/dist/components/Spinner.js +0 -4
- package/dist/components/TeamPicture.d.ts +0 -1
- package/dist/components/TeamPicture.js +0 -4
- package/dist/components/design.d.ts +0 -1
- package/dist/components/design.js +0 -33
- package/dist/components/experts/ExpertsPage.d.ts +0 -11
- package/dist/components/experts/ExpertsPage.js +0 -50
- package/dist/components/experts/experts-data.d.ts +0 -15
- package/dist/components/experts/experts-data.js +0 -276
- package/dist/components/experts/experts-icons.d.ts +0 -7
- package/dist/components/experts/experts-icons.js +0 -36
- package/dist/components/experts.d.ts +0 -3
- package/dist/components/experts.js +0 -2
- package/dist/components/homepage/BackgroundAnimation.d.ts +0 -2
- package/dist/components/homepage/BackgroundAnimation.js +0 -66
- package/dist/components/homepage/ChooseTemplate.d.ts +0 -2
- package/dist/components/homepage/ChooseTemplate.js +0 -25
- package/dist/components/homepage/CommunityStats.d.ts +0 -3
- package/dist/components/homepage/CommunityStats.js +0 -6
- package/dist/components/homepage/CommunityStatsItems.d.ts +0 -7
- package/dist/components/homepage/CommunityStatsItems.js +0 -58
- package/dist/components/homepage/Demo/Card.d.ts +0 -15
- package/dist/components/homepage/Demo/Card.js +0 -174
- package/dist/components/homepage/Demo/Cards.d.ts +0 -15
- package/dist/components/homepage/Demo/Cards.js +0 -57
- package/dist/components/homepage/Demo/Comp.d.ts +0 -38
- package/dist/components/homepage/Demo/Comp.js +0 -72
- package/dist/components/homepage/Demo/CurrentCountry.d.ts +0 -9
- package/dist/components/homepage/Demo/CurrentCountry.js +0 -48
- package/dist/components/homepage/Demo/DemoError.d.ts +0 -2
- package/dist/components/homepage/Demo/DemoError.js +0 -10
- package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +0 -2
- package/dist/components/homepage/Demo/DemoErrorIcon.js +0 -16
- package/dist/components/homepage/Demo/DemoRender.d.ts +0 -33
- package/dist/components/homepage/Demo/DemoRender.js +0 -107
- package/dist/components/homepage/Demo/DigitWheel.d.ts +0 -9
- package/dist/components/homepage/Demo/DigitWheel.js +0 -94
- package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +0 -5
- package/dist/components/homepage/Demo/DisplayedEmoji.js +0 -59
- package/dist/components/homepage/Demo/DoneCheckmark.d.ts +0 -2
- package/dist/components/homepage/Demo/DoneCheckmark.js +0 -20
- package/dist/components/homepage/Demo/DownloadNudge.d.ts +0 -2
- package/dist/components/homepage/Demo/DownloadNudge.js +0 -27
- package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +0 -3
- package/dist/components/homepage/Demo/DragAndDropNudge.js +0 -26
- package/dist/components/homepage/Demo/EmojiCard.d.ts +0 -10
- package/dist/components/homepage/Demo/EmojiCard.js +0 -120
- package/dist/components/homepage/Demo/Minus.d.ts +0 -5
- package/dist/components/homepage/Demo/Minus.js +0 -11
- package/dist/components/homepage/Demo/PlayPauseButton.d.ts +0 -5
- package/dist/components/homepage/Demo/PlayPauseButton.js +0 -47
- package/dist/components/homepage/Demo/PlayerControls.d.ts +0 -8
- package/dist/components/homepage/Demo/PlayerControls.js +0 -15
- package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +0 -11
- package/dist/components/homepage/Demo/PlayerSeekBar.js +0 -216
- package/dist/components/homepage/Demo/PlayerVolume.d.ts +0 -5
- package/dist/components/homepage/Demo/PlayerVolume.js +0 -53
- package/dist/components/homepage/Demo/Progress.d.ts +0 -4
- package/dist/components/homepage/Demo/Progress.js +0 -14
- package/dist/components/homepage/Demo/Spinner.d.ts +0 -5
- package/dist/components/homepage/Demo/Spinner.js +0 -37
- package/dist/components/homepage/Demo/Switcher.d.ts +0 -6
- package/dist/components/homepage/Demo/Switcher.js +0 -25
- package/dist/components/homepage/Demo/Temperature.d.ts +0 -6
- package/dist/components/homepage/Demo/Temperature.js +0 -21
- package/dist/components/homepage/Demo/TemperatureNumber.d.ts +0 -5
- package/dist/components/homepage/Demo/TemperatureNumber.js +0 -36
- package/dist/components/homepage/Demo/ThemeNudge.d.ts +0 -3
- package/dist/components/homepage/Demo/ThemeNudge.js +0 -35
- package/dist/components/homepage/Demo/TimeDisplay.d.ts +0 -6
- package/dist/components/homepage/Demo/TimeDisplay.js +0 -27
- package/dist/components/homepage/Demo/TrendingRepos.d.ts +0 -6
- package/dist/components/homepage/Demo/TrendingRepos.js +0 -65
- package/dist/components/homepage/Demo/icons.d.ts +0 -10
- package/dist/components/homepage/Demo/icons.js +0 -22
- package/dist/components/homepage/Demo/index.d.ts +0 -2
- package/dist/components/homepage/Demo/index.js +0 -95
- package/dist/components/homepage/Demo/math.d.ts +0 -10
- package/dist/components/homepage/Demo/math.js +0 -29
- package/dist/components/homepage/Demo/types.d.ts +0 -6
- package/dist/components/homepage/Demo/types.js +0 -0
- package/dist/components/homepage/EditorStarterSection.d.ts +0 -3
- package/dist/components/homepage/EditorStarterSection.js +0 -8
- package/dist/components/homepage/EvaluateRemotion.d.ts +0 -3
- package/dist/components/homepage/EvaluateRemotion.js +0 -21
- package/dist/components/homepage/FreePricing.d.ts +0 -4
- package/dist/components/homepage/FreePricing.js +0 -133
- package/dist/components/homepage/GetStartedStrip.d.ts +0 -2
- package/dist/components/homepage/GetStartedStrip.js +0 -14
- package/dist/components/homepage/GitHubButton.d.ts +0 -2
- package/dist/components/homepage/GitHubButton.js +0 -7
- package/dist/components/homepage/IconForTemplate.d.ts +0 -6
- package/dist/components/homepage/IconForTemplate.js +0 -105
- package/dist/components/homepage/IfYouKnowReact.d.ts +0 -3
- package/dist/components/homepage/IfYouKnowReact.js +0 -23
- package/dist/components/homepage/MoreTemplatesButton.d.ts +0 -2
- package/dist/components/homepage/MoreTemplatesButton.js +0 -11
- package/dist/components/homepage/MuxVideo.d.ts +0 -7
- package/dist/components/homepage/MuxVideo.js +0 -45
- package/dist/components/homepage/NewsletterButton.d.ts +0 -2
- package/dist/components/homepage/NewsletterButton.js +0 -38
- package/dist/components/homepage/ParameterizeAndEdit.d.ts +0 -2
- package/dist/components/homepage/ParameterizeAndEdit.js +0 -22
- package/dist/components/homepage/Pricing.d.ts +0 -2
- package/dist/components/homepage/Pricing.js +0 -15
- package/dist/components/homepage/PricingBulletPoint.d.ts +0 -6
- package/dist/components/homepage/PricingBulletPoint.js +0 -19
- package/dist/components/homepage/RealMp4Videos.d.ts +0 -2
- package/dist/components/homepage/RealMp4Videos.js +0 -41
- package/dist/components/homepage/Spacer.d.ts +0 -2
- package/dist/components/homepage/Spacer.js +0 -4
- package/dist/components/homepage/TemplateIcon.d.ts +0 -5
- package/dist/components/homepage/TemplateIcon.js +0 -24
- package/dist/components/homepage/TextInput.d.ts +0 -7
- package/dist/components/homepage/TextInput.js +0 -34
- package/dist/components/homepage/TrustedByBanner.d.ts +0 -2
- package/dist/components/homepage/TrustedByBanner.js +0 -27
- package/dist/components/homepage/VideoApps.d.ts +0 -4
- package/dist/components/homepage/VideoApps.js +0 -72
- package/dist/components/homepage/VideoAppsShowcase.d.ts +0 -3
- package/dist/components/homepage/VideoAppsShowcase.js +0 -139
- package/dist/components/homepage/VideoAppsTitle.d.ts +0 -4
- package/dist/components/homepage/VideoAppsTitle.js +0 -4
- package/dist/components/homepage/VideoPlayerWithControls.d.ts +0 -20
- package/dist/components/homepage/VideoPlayerWithControls.js +0 -105
- package/dist/components/homepage/WriteInReact.d.ts +0 -2
- package/dist/components/homepage/WriteInReact.js +0 -10
- package/dist/components/homepage/YouAreHere.d.ts +0 -2
- package/dist/components/homepage/YouAreHere.js +0 -23
- package/dist/components/homepage/layout/Button.d.ts +0 -22
- package/dist/components/homepage/layout/Button.js +0 -30
- package/dist/components/homepage/layout/colors.d.ts +0 -13
- package/dist/components/homepage/layout/colors.js +0 -14
- package/dist/components/homepage/layout/use-color-mode.d.ts +0 -21
- package/dist/components/homepage/layout/use-color-mode.js +0 -22
- package/dist/components/homepage/layout/use-el-size.d.ts +0 -5
- package/dist/components/homepage/layout/use-el-size.js +0 -40
- package/dist/components/homepage/layout/use-mobile-layout.d.ts +0 -1
- package/dist/components/homepage/layout/use-mobile-layout.js +0 -6
- package/dist/components/icons/blank.d.ts +0 -3
- package/dist/components/icons/blank.js +0 -4
- package/dist/components/icons/brain.d.ts +0 -2
- package/dist/components/icons/brain.js +0 -4
- package/dist/components/icons/clone.d.ts +0 -2
- package/dist/components/icons/clone.js +0 -2
- package/dist/components/icons/code-hike.d.ts +0 -3
- package/dist/components/icons/code-hike.js +0 -4
- package/dist/components/icons/cubes.d.ts +0 -3
- package/dist/components/icons/cubes.js +0 -4
- package/dist/components/icons/editor.d.ts +0 -3
- package/dist/components/icons/editor.js +0 -4
- package/dist/components/icons/electron.d.ts +0 -4
- package/dist/components/icons/electron.js +0 -4
- package/dist/components/icons/js.d.ts +0 -3
- package/dist/components/icons/js.js +0 -4
- package/dist/components/icons/music.d.ts +0 -2
- package/dist/components/icons/music.js +0 -4
- package/dist/components/icons/next.d.ts +0 -4
- package/dist/components/icons/next.js +0 -4
- package/dist/components/icons/overlay.d.ts +0 -3
- package/dist/components/icons/overlay.js +0 -4
- package/dist/components/icons/prompt-to-video.d.ts +0 -2
- package/dist/components/icons/prompt-to-video.js +0 -4
- package/dist/components/icons/recorder.d.ts +0 -3
- package/dist/components/icons/recorder.js +0 -4
- package/dist/components/icons/remix.d.ts +0 -3
- package/dist/components/icons/remix.js +0 -4
- package/dist/components/icons/render-server.d.ts +0 -3
- package/dist/components/icons/render-server.js +0 -4
- package/dist/components/icons/skia.d.ts +0 -3
- package/dist/components/icons/skia.js +0 -4
- package/dist/components/icons/stargazer.d.ts +0 -3
- package/dist/components/icons/stargazer.js +0 -4
- package/dist/components/icons/still.d.ts +0 -3
- package/dist/components/icons/still.js +0 -4
- package/dist/components/icons/tailwind.d.ts +0 -3
- package/dist/components/icons/tailwind.js +0 -4
- package/dist/components/icons/tiktok.d.ts +0 -3
- package/dist/components/icons/tiktok.js +0 -4
- package/dist/components/icons/timeline.d.ts +0 -3
- package/dist/components/icons/timeline.js +0 -4
- package/dist/components/icons/ts.d.ts +0 -3
- package/dist/components/icons/ts.js +0 -4
- package/dist/components/icons/undo.d.ts +0 -3
- package/dist/components/icons/undo.js +0 -2
- package/dist/components/icons/vercel.d.ts +0 -4
- package/dist/components/icons/vercel.js +0 -4
- package/dist/components/icons/waveform.d.ts +0 -3
- package/dist/components/icons/waveform.js +0 -4
- package/dist/components/prompts/CardLikeButton.d.ts +0 -5
- package/dist/components/prompts/CardLikeButton.js +0 -49
- package/dist/components/prompts/ClipboardIcon.d.ts +0 -5
- package/dist/components/prompts/ClipboardIcon.js +0 -4
- package/dist/components/prompts/CopyPromptButton.d.ts +0 -4
- package/dist/components/prompts/CopyPromptButton.js +0 -13
- package/dist/components/prompts/LikeButton.d.ts +0 -5
- package/dist/components/prompts/LikeButton.js +0 -49
- package/dist/components/prompts/MuxPlayer.d.ts +0 -8
- package/dist/components/prompts/MuxPlayer.js +0 -21
- package/dist/components/prompts/NewBackButton.d.ts +0 -5
- package/dist/components/prompts/NewBackButton.js +0 -8
- package/dist/components/prompts/Page.d.ts +0 -8
- package/dist/components/prompts/Page.js +0 -7
- package/dist/components/prompts/PromptsGallery.d.ts +0 -7
- package/dist/components/prompts/PromptsGallery.js +0 -60
- package/dist/components/prompts/PromptsShow.d.ts +0 -5
- package/dist/components/prompts/PromptsShow.js +0 -17
- package/dist/components/prompts/PromptsSubmit.d.ts +0 -2
- package/dist/components/prompts/PromptsSubmit.js +0 -173
- package/dist/components/prompts/config.d.ts +0 -1
- package/dist/components/prompts/config.js +0 -1
- package/dist/components/prompts/prompt-helpers.d.ts +0 -8
- package/dist/components/prompts/prompt-helpers.js +0 -76
- package/dist/components/prompts/prompt-types.d.ts +0 -14
- package/dist/components/prompts/prompt-types.js +0 -0
- package/dist/components/prompts/use-heart-animation.d.ts +0 -5
- package/dist/components/prompts/use-heart-animation.js +0 -29
- package/dist/components/team/TeamCards.d.ts +0 -6
- package/dist/components/team/TeamCards.js +0 -19
- package/dist/components/team/TitleTeamCards.d.ts +0 -2
- package/dist/components/team/TitleTeamCards.js +0 -6
- package/dist/components/team/TrustSection.d.ts +0 -2
- package/dist/components/team/TrustSection.js +0 -59
- package/dist/components/team.d.ts +0 -3
- package/dist/components/team.js +0 -15
- package/dist/components/template-modal-content.d.ts +0 -5
- package/dist/components/template-modal-content.js +0 -73
- package/dist/components/templates.d.ts +0 -2
- package/dist/components/templates.js +0 -27
- package/dist/helpers/mobile-layout.d.ts +0 -1
- package/dist/helpers/mobile-layout.js +0 -6
- package/dist/helpers/use-el-size.d.ts +0 -5
- package/dist/helpers/use-el-size.js +0 -40
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -6
- package/dist/prompts-show.d.ts +0 -1
- package/dist/prompts-show.js +0 -20
- package/dist/prompts-submit.d.ts +0 -1
- package/dist/prompts-submit.js +0 -6
- package/dist/prompts.d.ts +0 -1
- package/dist/prompts.js +0 -6
- package/dist/team.d.ts +0 -1
package/dist/design.js
CHANGED
|
@@ -1378,7 +1378,7 @@ var getDefaultConfig = () => {
|
|
|
1378
1378
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1379
1379
|
|
|
1380
1380
|
// ../design/dist/esm/index.mjs
|
|
1381
|
-
import React33, { useEffect as
|
|
1381
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo38, useState as useState23 } from "react";
|
|
1382
1382
|
|
|
1383
1383
|
// ../paths/dist/esm/index.mjs
|
|
1384
1384
|
var cutLInstruction = ({
|
|
@@ -5758,11 +5758,11 @@ import { jsx as jsx82 } from "react/jsx-runtime";
|
|
|
5758
5758
|
import { useEffect as useEffect3, useMemo as useMemo10, useRef as useRef4 } from "react";
|
|
5759
5759
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
5760
5760
|
import {
|
|
5761
|
-
forwardRef as
|
|
5762
|
-
useContext as
|
|
5761
|
+
forwardRef as forwardRef3,
|
|
5762
|
+
useContext as useContext16,
|
|
5763
5763
|
useEffect as useEffect5,
|
|
5764
|
-
useMemo as
|
|
5765
|
-
useState as
|
|
5764
|
+
useMemo as useMemo16,
|
|
5765
|
+
useState as useState6
|
|
5766
5766
|
} from "react";
|
|
5767
5767
|
import { useRef as useRef5 } from "react";
|
|
5768
5768
|
import { useContext as useContext14, useMemo as useMemo13 } from "react";
|
|
@@ -5772,104 +5772,105 @@ import { jsx as jsx102 } from "react/jsx-runtime";
|
|
|
5772
5772
|
import { createContext as createContext14 } from "react";
|
|
5773
5773
|
import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
|
|
5774
5774
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
5775
|
+
import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
|
|
5775
5776
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
5776
5777
|
import {
|
|
5777
|
-
forwardRef as
|
|
5778
|
+
forwardRef as forwardRef4,
|
|
5778
5779
|
useEffect as useEffect6,
|
|
5779
5780
|
useImperativeHandle as useImperativeHandle2,
|
|
5780
5781
|
useLayoutEffect as useLayoutEffect2,
|
|
5781
5782
|
useRef as useRef8,
|
|
5782
|
-
useState as
|
|
5783
|
+
useState as useState7
|
|
5783
5784
|
} from "react";
|
|
5784
|
-
import
|
|
5785
|
+
import React15, { useCallback as useCallback6, useImperativeHandle, useRef as useRef7 } from "react";
|
|
5785
5786
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
5786
5787
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
5787
5788
|
import {
|
|
5789
|
+
createContext as createContext15,
|
|
5788
5790
|
forwardRef as forwardRef5,
|
|
5789
5791
|
useCallback as useCallback7,
|
|
5792
|
+
useContext as useContext17,
|
|
5790
5793
|
useLayoutEffect as useLayoutEffect3,
|
|
5791
|
-
useMemo as
|
|
5794
|
+
useMemo as useMemo17,
|
|
5792
5795
|
useRef as useRef9,
|
|
5793
5796
|
useState as useState8
|
|
5794
5797
|
} from "react";
|
|
5795
|
-
import React15, { forwardRef as forwardRef4, useMemo as useMemo17 } from "react";
|
|
5796
|
-
import { useContext as useContext16, useMemo as useMemo16, useState as useState7 } from "react";
|
|
5797
5798
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
5798
|
-
import { useContext as
|
|
5799
|
+
import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
|
|
5799
5800
|
import {
|
|
5800
|
-
createContext as
|
|
5801
|
+
createContext as createContext16,
|
|
5801
5802
|
useCallback as useCallback8,
|
|
5802
5803
|
useImperativeHandle as useImperativeHandle3,
|
|
5803
5804
|
useLayoutEffect as useLayoutEffect4,
|
|
5804
|
-
useMemo as
|
|
5805
|
+
useMemo as useMemo18,
|
|
5805
5806
|
useRef as useRef10,
|
|
5806
5807
|
useState as useState9
|
|
5807
5808
|
} from "react";
|
|
5808
5809
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
5809
|
-
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as
|
|
5810
|
-
import React17, { createContext as
|
|
5810
|
+
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
|
|
5811
|
+
import React17, { createContext as createContext17, useMemo as useMemo19 } from "react";
|
|
5811
5812
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
5812
|
-
import { useContext as
|
|
5813
|
-
import { createContext as
|
|
5813
|
+
import { useContext as useContext19 } from "react";
|
|
5814
|
+
import { createContext as createContext18, useEffect as useEffect7, useState as useState11 } from "react";
|
|
5814
5815
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
5815
|
-
import { createContext as
|
|
5816
|
+
import { createContext as createContext19, useMemo as useMemo20, useReducer } from "react";
|
|
5816
5817
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
5817
5818
|
import React23, {
|
|
5818
5819
|
forwardRef as forwardRef6,
|
|
5819
|
-
useContext as
|
|
5820
|
-
useEffect as
|
|
5820
|
+
useContext as useContext28,
|
|
5821
|
+
useEffect as useEffect15,
|
|
5821
5822
|
useImperativeHandle as useImperativeHandle4,
|
|
5822
|
-
useMemo as
|
|
5823
|
+
useMemo as useMemo28,
|
|
5823
5824
|
useRef as useRef18,
|
|
5824
5825
|
useState as useState16
|
|
5825
5826
|
} from "react";
|
|
5826
|
-
import { useContext as
|
|
5827
|
+
import { useContext as useContext21, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
|
|
5827
5828
|
import React20, {
|
|
5828
|
-
createContext as
|
|
5829
|
+
createContext as createContext20,
|
|
5829
5830
|
createRef as createRef2,
|
|
5830
5831
|
useCallback as useCallback9,
|
|
5831
|
-
useContext as
|
|
5832
|
-
useMemo as
|
|
5832
|
+
useContext as useContext20,
|
|
5833
|
+
useMemo as useMemo22,
|
|
5833
5834
|
useRef as useRef11,
|
|
5834
5835
|
useState as useState12
|
|
5835
5836
|
} from "react";
|
|
5836
|
-
import { useMemo as
|
|
5837
|
+
import { useEffect as useEffect8, useMemo as useMemo21 } from "react";
|
|
5837
5838
|
import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5838
5839
|
import { useRef as useRef12 } from "react";
|
|
5839
|
-
import { useContext as
|
|
5840
|
-
import { useContext as
|
|
5840
|
+
import { useContext as useContext23, useEffect as useEffect9, useMemo as useMemo23, useState as useState13 } from "react";
|
|
5841
|
+
import { useContext as useContext22 } from "react";
|
|
5841
5842
|
import {
|
|
5842
5843
|
useCallback as useCallback12,
|
|
5843
|
-
useContext as
|
|
5844
|
-
useEffect as
|
|
5844
|
+
useContext as useContext26,
|
|
5845
|
+
useEffect as useEffect13,
|
|
5845
5846
|
useLayoutEffect as useLayoutEffect8,
|
|
5846
5847
|
useRef as useRef17
|
|
5847
5848
|
} from "react";
|
|
5848
|
-
import { useCallback as useCallback11, useMemo as
|
|
5849
|
-
import { useContext as
|
|
5849
|
+
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef15 } from "react";
|
|
5850
|
+
import { useContext as useContext25, useMemo as useMemo25 } from "react";
|
|
5850
5851
|
import React21, {
|
|
5851
5852
|
useCallback as useCallback10,
|
|
5852
|
-
useContext as
|
|
5853
|
-
useEffect as
|
|
5853
|
+
useContext as useContext24,
|
|
5854
|
+
useEffect as useEffect10,
|
|
5854
5855
|
useLayoutEffect as useLayoutEffect7,
|
|
5855
|
-
useMemo as
|
|
5856
|
+
useMemo as useMemo24,
|
|
5856
5857
|
useRef as useRef14,
|
|
5857
5858
|
useState as useState14
|
|
5858
5859
|
} from "react";
|
|
5859
5860
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
5860
5861
|
import React22 from "react";
|
|
5861
|
-
import { useEffect as
|
|
5862
|
-
import { useEffect as
|
|
5863
|
-
import { useEffect as
|
|
5864
|
-
import { createContext as
|
|
5862
|
+
import { useEffect as useEffect11, useState as useState15 } from "react";
|
|
5863
|
+
import { useEffect as useEffect12, useRef as useRef16 } from "react";
|
|
5864
|
+
import { useEffect as useEffect14 } from "react";
|
|
5865
|
+
import { createContext as createContext21, useContext as useContext27, useMemo as useMemo27 } from "react";
|
|
5865
5866
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
5866
5867
|
import {
|
|
5867
5868
|
forwardRef as forwardRef7,
|
|
5868
|
-
useContext as
|
|
5869
|
-
useEffect as
|
|
5869
|
+
useContext as useContext29,
|
|
5870
|
+
useEffect as useEffect16,
|
|
5870
5871
|
useImperativeHandle as useImperativeHandle5,
|
|
5871
5872
|
useLayoutEffect as useLayoutEffect9,
|
|
5872
|
-
useMemo as
|
|
5873
|
+
useMemo as useMemo29,
|
|
5873
5874
|
useRef as useRef19
|
|
5874
5875
|
} from "react";
|
|
5875
5876
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
@@ -5878,7 +5879,7 @@ import { forwardRef as forwardRef9, useCallback as useCallback14, useState as us
|
|
|
5878
5879
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
5879
5880
|
import {
|
|
5880
5881
|
useCallback as useCallback15,
|
|
5881
|
-
useContext as
|
|
5882
|
+
useContext as useContext31,
|
|
5882
5883
|
useImperativeHandle as useImperativeHandle6,
|
|
5883
5884
|
useLayoutEffect as useLayoutEffect10,
|
|
5884
5885
|
useRef as useRef20,
|
|
@@ -5890,57 +5891,57 @@ import React28 from "react";
|
|
|
5890
5891
|
import {
|
|
5891
5892
|
useCallback as useCallback16,
|
|
5892
5893
|
useImperativeHandle as useImperativeHandle7,
|
|
5893
|
-
useMemo as
|
|
5894
|
+
useMemo as useMemo30,
|
|
5894
5895
|
useRef as useRef21,
|
|
5895
5896
|
useState as useState19
|
|
5896
5897
|
} from "react";
|
|
5897
5898
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5898
5899
|
import React29 from "react";
|
|
5899
|
-
import { useMemo as
|
|
5900
|
-
import { createContext as
|
|
5900
|
+
import { useMemo as useMemo322 } from "react";
|
|
5901
|
+
import { createContext as createContext22, useContext as useContext32, useMemo as useMemo31 } from "react";
|
|
5901
5902
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
5902
5903
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5903
5904
|
import React31 from "react";
|
|
5904
|
-
import React32, { createContext as
|
|
5905
|
-
import { useContext as
|
|
5905
|
+
import React32, { createContext as createContext23 } from "react";
|
|
5906
|
+
import { useContext as useContext33 } from "react";
|
|
5906
5907
|
import { useCallback as useCallback18 } from "react";
|
|
5907
5908
|
import {
|
|
5908
5909
|
useCallback as useCallback17,
|
|
5909
|
-
useContext as
|
|
5910
|
-
useEffect as
|
|
5910
|
+
useContext as useContext34,
|
|
5911
|
+
useEffect as useEffect17,
|
|
5911
5912
|
useLayoutEffect as useLayoutEffect11,
|
|
5912
|
-
useMemo as
|
|
5913
|
+
useMemo as useMemo33,
|
|
5913
5914
|
useState as useState20
|
|
5914
5915
|
} from "react";
|
|
5915
5916
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
5916
5917
|
import React34, {
|
|
5917
5918
|
forwardRef as forwardRef10,
|
|
5918
|
-
useContext as
|
|
5919
|
-
useEffect as
|
|
5919
|
+
useContext as useContext35,
|
|
5920
|
+
useEffect as useEffect19,
|
|
5920
5921
|
useImperativeHandle as useImperativeHandle8,
|
|
5921
|
-
useMemo as
|
|
5922
|
+
useMemo as useMemo34,
|
|
5922
5923
|
useRef as useRef22,
|
|
5923
5924
|
useState as useState21
|
|
5924
5925
|
} from "react";
|
|
5925
|
-
import { useEffect as
|
|
5926
|
+
import { useEffect as useEffect18 } from "react";
|
|
5926
5927
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5927
5928
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
5928
|
-
import React36, { useMemo as
|
|
5929
|
+
import React36, { useMemo as useMemo35 } from "react";
|
|
5929
5930
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5930
|
-
import { Children, forwardRef as forwardRef11, useMemo as
|
|
5931
|
+
import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
|
|
5931
5932
|
import React37 from "react";
|
|
5932
|
-
import React38, { createContext as
|
|
5933
|
+
import React38, { createContext as createContext24 } from "react";
|
|
5933
5934
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
5934
5935
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
5935
5936
|
import React40 from "react";
|
|
5936
|
-
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as
|
|
5937
|
+
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext37 } from "react";
|
|
5937
5938
|
import {
|
|
5938
5939
|
forwardRef as forwardRef12,
|
|
5939
|
-
useContext as
|
|
5940
|
-
useEffect as
|
|
5940
|
+
useContext as useContext36,
|
|
5941
|
+
useEffect as useEffect20,
|
|
5941
5942
|
useImperativeHandle as useImperativeHandle9,
|
|
5942
5943
|
useLayoutEffect as useLayoutEffect12,
|
|
5943
|
-
useMemo as
|
|
5944
|
+
useMemo as useMemo37,
|
|
5944
5945
|
useRef as useRef23
|
|
5945
5946
|
} from "react";
|
|
5946
5947
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
@@ -7019,6 +7020,7 @@ __export2(exports_timeline_position_state, {
|
|
|
7019
7020
|
useTimelinePosition: () => useTimelinePosition,
|
|
7020
7021
|
useTimelineContext: () => useTimelineContext,
|
|
7021
7022
|
usePlayingState: () => usePlayingState,
|
|
7023
|
+
usePlaybackRate: () => usePlaybackRate,
|
|
7022
7024
|
useAbsoluteTimelinePosition: () => useAbsoluteTimelinePosition,
|
|
7023
7025
|
persistCurrentFrame: () => persistCurrentFrame,
|
|
7024
7026
|
getInitialFrameState: () => getInitialFrameState,
|
|
@@ -7065,6 +7067,7 @@ var SetTimelineContext = createContext13({
|
|
|
7065
7067
|
}
|
|
7066
7068
|
});
|
|
7067
7069
|
var TimelineContext = createContext13(null);
|
|
7070
|
+
var PlaybackRateContext = createContext13(null);
|
|
7068
7071
|
var AbsoluteTimeContext = createContext13(null);
|
|
7069
7072
|
var TimelineContextProvider = ({ children, frameState }) => {
|
|
7070
7073
|
const [playing, setPlaying] = useState2(false);
|
|
@@ -7107,11 +7110,15 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
7107
7110
|
playing,
|
|
7108
7111
|
imperativePlaying,
|
|
7109
7112
|
rootId: remotionRootId,
|
|
7110
|
-
playbackRate,
|
|
7111
|
-
setPlaybackRate,
|
|
7112
7113
|
audioAndVideoTags
|
|
7113
7114
|
};
|
|
7114
|
-
}, [frame,
|
|
7115
|
+
}, [frame, playing, remotionRootId]);
|
|
7116
|
+
const playbackRateContextValue = useMemo8(() => {
|
|
7117
|
+
return {
|
|
7118
|
+
playbackRate,
|
|
7119
|
+
setPlaybackRate
|
|
7120
|
+
};
|
|
7121
|
+
}, [playbackRate]);
|
|
7115
7122
|
const setTimelineContextValue = useMemo8(() => {
|
|
7116
7123
|
return {
|
|
7117
7124
|
setFrame,
|
|
@@ -7120,11 +7127,14 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
7120
7127
|
}, []);
|
|
7121
7128
|
return /* @__PURE__ */ jsx82(AbsoluteTimeContext.Provider, {
|
|
7122
7129
|
value: timelineContextValue,
|
|
7123
|
-
children: /* @__PURE__ */ jsx82(
|
|
7124
|
-
value:
|
|
7125
|
-
children: /* @__PURE__ */ jsx82(
|
|
7126
|
-
value:
|
|
7127
|
-
children
|
|
7130
|
+
children: /* @__PURE__ */ jsx82(PlaybackRateContext.Provider, {
|
|
7131
|
+
value: playbackRateContextValue,
|
|
7132
|
+
children: /* @__PURE__ */ jsx82(TimelineContext.Provider, {
|
|
7133
|
+
value: timelineContextValue,
|
|
7134
|
+
children: /* @__PURE__ */ jsx82(SetTimelineContext.Provider, {
|
|
7135
|
+
value: setTimelineContextValue,
|
|
7136
|
+
children
|
|
7137
|
+
})
|
|
7128
7138
|
})
|
|
7129
7139
|
})
|
|
7130
7140
|
});
|
|
@@ -7167,6 +7177,13 @@ var useTimelineContext = () => {
|
|
|
7167
7177
|
}
|
|
7168
7178
|
return state;
|
|
7169
7179
|
};
|
|
7180
|
+
var usePlaybackRate = () => {
|
|
7181
|
+
const state = useContext10(PlaybackRateContext);
|
|
7182
|
+
if (state === null) {
|
|
7183
|
+
throw new Error("PlaybackRateContext is not available. This hook must be used inside a <Player> or the Remotion Studio.");
|
|
7184
|
+
}
|
|
7185
|
+
return state;
|
|
7186
|
+
};
|
|
7170
7187
|
var useTimelinePosition = () => {
|
|
7171
7188
|
const state = useTimelineContext();
|
|
7172
7189
|
return useTimelinePositionFromContext(state);
|
|
@@ -7458,7 +7475,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
7458
7475
|
var addSequenceStackTraces = (component) => {
|
|
7459
7476
|
componentsToAddStacksTo.push(component);
|
|
7460
7477
|
};
|
|
7461
|
-
var VERSION = "4.0.
|
|
7478
|
+
var VERSION = "4.0.458";
|
|
7462
7479
|
var checkMultipleRemotionVersions = () => {
|
|
7463
7480
|
if (typeof globalThis === "undefined") {
|
|
7464
7481
|
return;
|
|
@@ -7629,6 +7646,54 @@ var Freeze = ({
|
|
|
7629
7646
|
var PremountContext = createContext14({
|
|
7630
7647
|
premountFramesRemaining: 0
|
|
7631
7648
|
});
|
|
7649
|
+
var sequenceStyleSchema = {
|
|
7650
|
+
"style.translate": {
|
|
7651
|
+
type: "translate",
|
|
7652
|
+
step: 1,
|
|
7653
|
+
default: "0px 0px",
|
|
7654
|
+
description: "Offset"
|
|
7655
|
+
},
|
|
7656
|
+
"style.scale": {
|
|
7657
|
+
type: "number",
|
|
7658
|
+
min: 0.05,
|
|
7659
|
+
max: 100,
|
|
7660
|
+
step: 0.01,
|
|
7661
|
+
default: 1,
|
|
7662
|
+
description: "Scale"
|
|
7663
|
+
},
|
|
7664
|
+
"style.rotate": {
|
|
7665
|
+
type: "rotation",
|
|
7666
|
+
step: 1,
|
|
7667
|
+
default: "0deg",
|
|
7668
|
+
description: "Rotation"
|
|
7669
|
+
},
|
|
7670
|
+
"style.opacity": {
|
|
7671
|
+
type: "number",
|
|
7672
|
+
min: 0,
|
|
7673
|
+
max: 1,
|
|
7674
|
+
step: 0.01,
|
|
7675
|
+
default: 1,
|
|
7676
|
+
description: "Opacity"
|
|
7677
|
+
}
|
|
7678
|
+
};
|
|
7679
|
+
var sequenceSchema = {
|
|
7680
|
+
layout: {
|
|
7681
|
+
type: "enum",
|
|
7682
|
+
default: "absolute-fill",
|
|
7683
|
+
description: "Layout",
|
|
7684
|
+
variants: {
|
|
7685
|
+
"absolute-fill": sequenceStyleSchema,
|
|
7686
|
+
none: {}
|
|
7687
|
+
}
|
|
7688
|
+
}
|
|
7689
|
+
};
|
|
7690
|
+
var sequenceSchemaDefaultLayoutNone = {
|
|
7691
|
+
...sequenceSchema,
|
|
7692
|
+
layout: {
|
|
7693
|
+
...sequenceSchema.layout,
|
|
7694
|
+
default: "none"
|
|
7695
|
+
}
|
|
7696
|
+
};
|
|
7632
7697
|
var SequenceManager = React12.createContext({
|
|
7633
7698
|
registerSequence: () => {
|
|
7634
7699
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -7750,6 +7815,204 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
7750
7815
|
});
|
|
7751
7816
|
};
|
|
7752
7817
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
7818
|
+
var flattenActiveSchema = (schema, resolve) => {
|
|
7819
|
+
const out = {};
|
|
7820
|
+
for (const key of Object.keys(schema)) {
|
|
7821
|
+
const field = schema[key];
|
|
7822
|
+
if (field.type === "enum") {
|
|
7823
|
+
out[key] = field;
|
|
7824
|
+
const current = resolve(key) ?? field.default;
|
|
7825
|
+
const variant = field.variants[current];
|
|
7826
|
+
if (variant) {
|
|
7827
|
+
Object.assign(out, flattenActiveSchema(variant, resolve));
|
|
7828
|
+
}
|
|
7829
|
+
} else {
|
|
7830
|
+
out[key] = field;
|
|
7831
|
+
}
|
|
7832
|
+
}
|
|
7833
|
+
return out;
|
|
7834
|
+
};
|
|
7835
|
+
var getFlatSchemaWithAllKeys = (schema) => {
|
|
7836
|
+
const out = {};
|
|
7837
|
+
const addKey = (key, field) => {
|
|
7838
|
+
if (key in out) {
|
|
7839
|
+
throw new Error(`Duplicate key "${key}" in schema: discriminated union variants must not share keys`);
|
|
7840
|
+
}
|
|
7841
|
+
out[key] = field;
|
|
7842
|
+
};
|
|
7843
|
+
for (const key of Object.keys(schema)) {
|
|
7844
|
+
const field = schema[key];
|
|
7845
|
+
addKey(key, field);
|
|
7846
|
+
if (field.type === "enum") {
|
|
7847
|
+
for (const variant of Object.values(field.variants)) {
|
|
7848
|
+
const flatVariant = getFlatSchemaWithAllKeys(variant);
|
|
7849
|
+
for (const variantKey of Object.keys(flatVariant)) {
|
|
7850
|
+
addKey(variantKey, flatVariant[variantKey]);
|
|
7851
|
+
}
|
|
7852
|
+
}
|
|
7853
|
+
}
|
|
7854
|
+
}
|
|
7855
|
+
return out;
|
|
7856
|
+
};
|
|
7857
|
+
var getEffectiveVisualModeValue = ({
|
|
7858
|
+
codeValue,
|
|
7859
|
+
runtimeValue,
|
|
7860
|
+
dragOverrideValue,
|
|
7861
|
+
defaultValue,
|
|
7862
|
+
shouldResortToDefaultValueIfUndefined = false
|
|
7863
|
+
}) => {
|
|
7864
|
+
if (dragOverrideValue !== undefined) {
|
|
7865
|
+
return dragOverrideValue;
|
|
7866
|
+
}
|
|
7867
|
+
if (!codeValue) {
|
|
7868
|
+
return runtimeValue;
|
|
7869
|
+
}
|
|
7870
|
+
if (!codeValue.canUpdate) {
|
|
7871
|
+
return runtimeValue;
|
|
7872
|
+
}
|
|
7873
|
+
if (codeValue.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
|
|
7874
|
+
return defaultValue;
|
|
7875
|
+
}
|
|
7876
|
+
return codeValue.codeValue;
|
|
7877
|
+
};
|
|
7878
|
+
var findFieldInSchema = (schema, key) => {
|
|
7879
|
+
if (key in schema) {
|
|
7880
|
+
return schema[key];
|
|
7881
|
+
}
|
|
7882
|
+
for (const field of Object.values(schema)) {
|
|
7883
|
+
if (field.type !== "enum") {
|
|
7884
|
+
continue;
|
|
7885
|
+
}
|
|
7886
|
+
for (const variant of Object.values(field.variants)) {
|
|
7887
|
+
const found = findFieldInSchema(variant, key);
|
|
7888
|
+
if (found) {
|
|
7889
|
+
return found;
|
|
7890
|
+
}
|
|
7891
|
+
}
|
|
7892
|
+
}
|
|
7893
|
+
return;
|
|
7894
|
+
};
|
|
7895
|
+
var computeEffectiveSchemaValuesDotNotation = ({
|
|
7896
|
+
schema,
|
|
7897
|
+
currentValue,
|
|
7898
|
+
overrideValues,
|
|
7899
|
+
propStatus
|
|
7900
|
+
}) => {
|
|
7901
|
+
const merged = {};
|
|
7902
|
+
for (const key of Object.keys(currentValue)) {
|
|
7903
|
+
const codeValueStatus = propStatus?.[key] ?? null;
|
|
7904
|
+
merged[key] = getEffectiveVisualModeValue({
|
|
7905
|
+
codeValue: codeValueStatus,
|
|
7906
|
+
runtimeValue: currentValue[key],
|
|
7907
|
+
dragOverrideValue: overrideValues[key],
|
|
7908
|
+
defaultValue: findFieldInSchema(schema, key)?.default,
|
|
7909
|
+
shouldResortToDefaultValueIfUndefined: false
|
|
7910
|
+
});
|
|
7911
|
+
}
|
|
7912
|
+
return merged;
|
|
7913
|
+
};
|
|
7914
|
+
var getNestedValue = (obj, key) => {
|
|
7915
|
+
const parts = key.split(".");
|
|
7916
|
+
let current = obj;
|
|
7917
|
+
for (const part of parts) {
|
|
7918
|
+
if (current === null || current === undefined || typeof current !== "object")
|
|
7919
|
+
return;
|
|
7920
|
+
current = current[part];
|
|
7921
|
+
}
|
|
7922
|
+
return current;
|
|
7923
|
+
};
|
|
7924
|
+
var readValuesFromProps = (props, keys) => {
|
|
7925
|
+
const out = {};
|
|
7926
|
+
for (const key of keys) {
|
|
7927
|
+
out[key] = getNestedValue(props, key);
|
|
7928
|
+
}
|
|
7929
|
+
return out;
|
|
7930
|
+
};
|
|
7931
|
+
var selectActiveKeys = (schema, values) => {
|
|
7932
|
+
return Object.keys(flattenActiveSchema(schema, (key) => values[key]));
|
|
7933
|
+
};
|
|
7934
|
+
var mergeValues = ({
|
|
7935
|
+
props,
|
|
7936
|
+
valuesDotNotation,
|
|
7937
|
+
schemaKeys
|
|
7938
|
+
}) => {
|
|
7939
|
+
const merged = { ...props };
|
|
7940
|
+
for (const key of schemaKeys) {
|
|
7941
|
+
const value = valuesDotNotation[key];
|
|
7942
|
+
const parts = key.split(".");
|
|
7943
|
+
if (parts.length === 1) {
|
|
7944
|
+
merged[key] = value;
|
|
7945
|
+
continue;
|
|
7946
|
+
}
|
|
7947
|
+
let current = merged;
|
|
7948
|
+
for (let i = 0;i < parts.length - 1; i++) {
|
|
7949
|
+
const part = parts[i];
|
|
7950
|
+
if (typeof current[part] === "object" && current[part] !== null) {
|
|
7951
|
+
current[part] = { ...current[part] };
|
|
7952
|
+
} else {
|
|
7953
|
+
current[part] = {};
|
|
7954
|
+
}
|
|
7955
|
+
current = current[part];
|
|
7956
|
+
}
|
|
7957
|
+
current[parts[parts.length - 1]] = value;
|
|
7958
|
+
}
|
|
7959
|
+
return merged;
|
|
7960
|
+
};
|
|
7961
|
+
var wrapInSchema = (Component, schema) => {
|
|
7962
|
+
if (typeof process === "undefined" || !process.env?.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
|
|
7963
|
+
return Component;
|
|
7964
|
+
}
|
|
7965
|
+
const flatSchema = getFlatSchemaWithAllKeys(schema);
|
|
7966
|
+
const flatKeys = Object.keys(flatSchema);
|
|
7967
|
+
const Wrapped = forwardRef2((props, ref) => {
|
|
7968
|
+
const env = useRemotionEnvironment();
|
|
7969
|
+
const { visualModeEnabled, dragOverrides, codeValues } = useContext15(VisualModeOverridesContext);
|
|
7970
|
+
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !visualModeEnabled) {
|
|
7971
|
+
return React13.createElement(Component, {
|
|
7972
|
+
...props,
|
|
7973
|
+
_experimentalControls: null,
|
|
7974
|
+
ref
|
|
7975
|
+
});
|
|
7976
|
+
}
|
|
7977
|
+
if (props._experimentalControls) {
|
|
7978
|
+
return React13.createElement(Component, {
|
|
7979
|
+
...props,
|
|
7980
|
+
ref
|
|
7981
|
+
});
|
|
7982
|
+
}
|
|
7983
|
+
const [overrideId] = useState5(() => String(Math.random()));
|
|
7984
|
+
const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
|
|
7985
|
+
const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
7986
|
+
const controls = useMemo15(() => {
|
|
7987
|
+
return {
|
|
7988
|
+
schema,
|
|
7989
|
+
currentRuntimeValueDotNotation,
|
|
7990
|
+
overrideId
|
|
7991
|
+
};
|
|
7992
|
+
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
7993
|
+
const valuesDotNotation = useMemo15(() => {
|
|
7994
|
+
return computeEffectiveSchemaValuesDotNotation({
|
|
7995
|
+
schema,
|
|
7996
|
+
currentValue: currentRuntimeValueDotNotation,
|
|
7997
|
+
overrideValues: dragOverrides[overrideId] ?? {},
|
|
7998
|
+
propStatus: codeValues[overrideId]
|
|
7999
|
+
});
|
|
8000
|
+
}, [currentRuntimeValueDotNotation, dragOverrides, overrideId, codeValues]);
|
|
8001
|
+
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
8002
|
+
const mergedProps = mergeValues({
|
|
8003
|
+
props,
|
|
8004
|
+
valuesDotNotation,
|
|
8005
|
+
schemaKeys: activeKeys
|
|
8006
|
+
});
|
|
8007
|
+
return React13.createElement(Component, {
|
|
8008
|
+
...mergedProps,
|
|
8009
|
+
_experimentalControls: controls,
|
|
8010
|
+
ref
|
|
8011
|
+
});
|
|
8012
|
+
});
|
|
8013
|
+
Wrapped.displayName = `wrapInSchema(${Component.displayName || Component.name || "Component"})`;
|
|
8014
|
+
return Wrapped;
|
|
8015
|
+
};
|
|
7753
8016
|
var RegularSequenceRefForwardingFunction = ({
|
|
7754
8017
|
from = 0,
|
|
7755
8018
|
durationInFrames = Infinity,
|
|
@@ -7768,8 +8031,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7768
8031
|
...other
|
|
7769
8032
|
}, ref) => {
|
|
7770
8033
|
const { layout = "absolute-fill" } = other;
|
|
7771
|
-
const [id] =
|
|
7772
|
-
const parentSequence =
|
|
8034
|
+
const [id] = useState6(() => String(Math.random()));
|
|
8035
|
+
const parentSequence = useContext16(SequenceContext);
|
|
7773
8036
|
const { rootId } = useTimelineContext();
|
|
7774
8037
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
7775
8038
|
const nonce = useNonce();
|
|
@@ -7777,7 +8040,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7777
8040
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
7778
8041
|
}
|
|
7779
8042
|
if (layout === "none" && typeof other.style !== "undefined") {
|
|
7780
|
-
throw new TypeError('If layout="none", you may not pass a style.');
|
|
8043
|
+
throw new TypeError('If layout="none", you may not pass a style. Passed: ' + JSON.stringify(other.style));
|
|
7781
8044
|
}
|
|
7782
8045
|
if (typeof durationInFrames !== "number") {
|
|
7783
8046
|
throw new TypeError(`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`);
|
|
@@ -7795,15 +8058,15 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7795
8058
|
const videoConfig = useVideoConfig();
|
|
7796
8059
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
7797
8060
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
7798
|
-
const { registerSequence, unregisterSequence } =
|
|
7799
|
-
const { hidden } =
|
|
7800
|
-
const premounting =
|
|
8061
|
+
const { registerSequence, unregisterSequence } = useContext16(SequenceManager);
|
|
8062
|
+
const { hidden } = useContext16(SequenceVisibilityToggleContext);
|
|
8063
|
+
const premounting = useMemo16(() => {
|
|
7801
8064
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
7802
8065
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
7803
|
-
const postmounting =
|
|
8066
|
+
const postmounting = useMemo16(() => {
|
|
7804
8067
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
7805
8068
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
7806
|
-
const contextValue =
|
|
8069
|
+
const contextValue = useMemo16(() => {
|
|
7807
8070
|
return {
|
|
7808
8071
|
cumulatedFrom,
|
|
7809
8072
|
relativeFrom: from,
|
|
@@ -7830,7 +8093,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7830
8093
|
premountDisplay,
|
|
7831
8094
|
postmountDisplay
|
|
7832
8095
|
]);
|
|
7833
|
-
const timelineClipName =
|
|
8096
|
+
const timelineClipName = useMemo16(() => {
|
|
7834
8097
|
return name ?? "";
|
|
7835
8098
|
}, [name]);
|
|
7836
8099
|
const env = useRemotionEnvironment();
|
|
@@ -7913,7 +8176,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7913
8176
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
7914
8177
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
7915
8178
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
7916
|
-
const defaultStyle =
|
|
8179
|
+
const defaultStyle = useMemo16(() => {
|
|
7917
8180
|
return {
|
|
7918
8181
|
flexDirection: undefined,
|
|
7919
8182
|
...width ? { width } : {},
|
|
@@ -7938,9 +8201,9 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7938
8201
|
})
|
|
7939
8202
|
});
|
|
7940
8203
|
};
|
|
7941
|
-
var RegularSequence =
|
|
8204
|
+
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
7942
8205
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
7943
|
-
const parentPremountContext =
|
|
8206
|
+
const parentPremountContext = useContext16(PremountContext);
|
|
7944
8207
|
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
7945
8208
|
if (props.layout === "none") {
|
|
7946
8209
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
@@ -7960,7 +8223,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
7960
8223
|
const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
|
|
7961
8224
|
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
7962
8225
|
const isFreezingActive = premountingActive || postmountingActive;
|
|
7963
|
-
const style =
|
|
8226
|
+
const style = useMemo16(() => {
|
|
7964
8227
|
return {
|
|
7965
8228
|
...passedStyle,
|
|
7966
8229
|
opacity: premountingActive || postmountingActive ? 0 : 1,
|
|
@@ -7978,7 +8241,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
7978
8241
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
7979
8242
|
frame: freezeFrame,
|
|
7980
8243
|
active: isFreezingActive,
|
|
7981
|
-
children: /* @__PURE__ */ jsx12(
|
|
8244
|
+
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
7982
8245
|
ref,
|
|
7983
8246
|
from,
|
|
7984
8247
|
durationInFrames,
|
|
@@ -7991,7 +8254,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
7991
8254
|
})
|
|
7992
8255
|
});
|
|
7993
8256
|
};
|
|
7994
|
-
var PremountedPostmountedSequence =
|
|
8257
|
+
var PremountedPostmountedSequence = forwardRef3(PremountedPostmountedSequenceRefForwardingFunction);
|
|
7995
8258
|
var SequenceRefForwardingFunction = (props, ref) => {
|
|
7996
8259
|
const env = useRemotionEnvironment();
|
|
7997
8260
|
const { fps } = useVideoConfig();
|
|
@@ -8010,7 +8273,8 @@ var SequenceRefForwardingFunction = (props, ref) => {
|
|
|
8010
8273
|
ref
|
|
8011
8274
|
});
|
|
8012
8275
|
};
|
|
8013
|
-
var
|
|
8276
|
+
var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
8277
|
+
var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
|
|
8014
8278
|
var calcArgs = (fit, frameSize, canvasSize) => {
|
|
8015
8279
|
switch (fit) {
|
|
8016
8280
|
case "fill": {
|
|
@@ -8106,7 +8370,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref
|
|
|
8106
8370
|
style
|
|
8107
8371
|
});
|
|
8108
8372
|
};
|
|
8109
|
-
var Canvas =
|
|
8373
|
+
var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
|
|
8110
8374
|
var CACHE_SIZE = 5;
|
|
8111
8375
|
var getActualTime = ({
|
|
8112
8376
|
loopBehavior,
|
|
@@ -8253,7 +8517,7 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
8253
8517
|
}
|
|
8254
8518
|
return new URL(src, window.origin).href;
|
|
8255
8519
|
};
|
|
8256
|
-
var AnimatedImage =
|
|
8520
|
+
var AnimatedImage = forwardRef4(({
|
|
8257
8521
|
src,
|
|
8258
8522
|
width,
|
|
8259
8523
|
height,
|
|
@@ -8272,9 +8536,9 @@ var AnimatedImage = forwardRef3(({
|
|
|
8272
8536
|
};
|
|
8273
8537
|
}, []);
|
|
8274
8538
|
const resolvedSrc = resolveAnimatedImageSource(src);
|
|
8275
|
-
const [imageDecoder, setImageDecoder] =
|
|
8539
|
+
const [imageDecoder, setImageDecoder] = useState7(null);
|
|
8276
8540
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
8277
|
-
const [decodeHandle] =
|
|
8541
|
+
const [decodeHandle] = useState7(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
8278
8542
|
const frame = useCurrentFrame();
|
|
8279
8543
|
const { fps } = useVideoConfig();
|
|
8280
8544
|
const currentTime = frame / playbackRate / fps;
|
|
@@ -8288,7 +8552,7 @@ var AnimatedImage = forwardRef3(({
|
|
|
8288
8552
|
}
|
|
8289
8553
|
return c;
|
|
8290
8554
|
}, []);
|
|
8291
|
-
const [initialLoopBehavior] =
|
|
8555
|
+
const [initialLoopBehavior] = useState7(() => loopBehavior);
|
|
8292
8556
|
useEffect6(() => {
|
|
8293
8557
|
const controller = new AbortController;
|
|
8294
8558
|
decodeImage({
|
|
@@ -8360,158 +8624,6 @@ var AnimatedImage = forwardRef3(({
|
|
|
8360
8624
|
...props
|
|
8361
8625
|
});
|
|
8362
8626
|
});
|
|
8363
|
-
var getEffectiveVisualModeValue = ({
|
|
8364
|
-
codeValue,
|
|
8365
|
-
runtimeValue,
|
|
8366
|
-
dragOverrideValue,
|
|
8367
|
-
defaultValue,
|
|
8368
|
-
shouldResortToDefaultValueIfUndefined = false
|
|
8369
|
-
}) => {
|
|
8370
|
-
if (dragOverrideValue !== undefined) {
|
|
8371
|
-
return dragOverrideValue;
|
|
8372
|
-
}
|
|
8373
|
-
if (!codeValue) {
|
|
8374
|
-
return runtimeValue;
|
|
8375
|
-
}
|
|
8376
|
-
if (!codeValue.canUpdate) {
|
|
8377
|
-
return runtimeValue;
|
|
8378
|
-
}
|
|
8379
|
-
if (codeValue.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
|
|
8380
|
-
return defaultValue;
|
|
8381
|
-
}
|
|
8382
|
-
return codeValue.codeValue;
|
|
8383
|
-
};
|
|
8384
|
-
var useSchema = (schema, currentValue) => {
|
|
8385
|
-
const env = useRemotionEnvironment();
|
|
8386
|
-
const earlyReturn = useMemo16(() => {
|
|
8387
|
-
if (!env.isStudio || env.isReadOnlyStudio) {
|
|
8388
|
-
return {
|
|
8389
|
-
controls: undefined,
|
|
8390
|
-
values: currentValue ?? {}
|
|
8391
|
-
};
|
|
8392
|
-
}
|
|
8393
|
-
return;
|
|
8394
|
-
}, [env.isStudio, env.isReadOnlyStudio, currentValue]);
|
|
8395
|
-
if (earlyReturn) {
|
|
8396
|
-
return earlyReturn;
|
|
8397
|
-
}
|
|
8398
|
-
const [overrideId] = useState7(() => String(Math.random()));
|
|
8399
|
-
const {
|
|
8400
|
-
visualModeEnabled,
|
|
8401
|
-
dragOverrides: overrides,
|
|
8402
|
-
codeValues
|
|
8403
|
-
} = useContext16(VisualModeOverridesContext);
|
|
8404
|
-
const controls = useMemo16(() => {
|
|
8405
|
-
if (!visualModeEnabled) {
|
|
8406
|
-
return;
|
|
8407
|
-
}
|
|
8408
|
-
if (schema === null || currentValue === null) {
|
|
8409
|
-
return;
|
|
8410
|
-
}
|
|
8411
|
-
return {
|
|
8412
|
-
schema,
|
|
8413
|
-
currentValue,
|
|
8414
|
-
overrideId
|
|
8415
|
-
};
|
|
8416
|
-
}, [schema, currentValue, overrideId, visualModeEnabled]);
|
|
8417
|
-
return useMemo16(() => {
|
|
8418
|
-
if (controls === undefined || currentValue === null || schema === null || !visualModeEnabled) {
|
|
8419
|
-
return {
|
|
8420
|
-
controls: undefined,
|
|
8421
|
-
values: currentValue ?? {}
|
|
8422
|
-
};
|
|
8423
|
-
}
|
|
8424
|
-
const overrideValues = overrides[overrideId] ?? {};
|
|
8425
|
-
const propStatus = codeValues[overrideId];
|
|
8426
|
-
const currentValueKeys = Object.keys(currentValue);
|
|
8427
|
-
const keysToUpdate = [...new Set(currentValueKeys)];
|
|
8428
|
-
const merged = {};
|
|
8429
|
-
for (const key of keysToUpdate) {
|
|
8430
|
-
const codeValueStatus = propStatus?.[key] ?? null;
|
|
8431
|
-
merged[key] = getEffectiveVisualModeValue({
|
|
8432
|
-
codeValue: codeValueStatus,
|
|
8433
|
-
runtimeValue: currentValue[key],
|
|
8434
|
-
dragOverrideValue: overrideValues[key],
|
|
8435
|
-
defaultValue: schema[key]?.default,
|
|
8436
|
-
shouldResortToDefaultValueIfUndefined: false
|
|
8437
|
-
});
|
|
8438
|
-
}
|
|
8439
|
-
return {
|
|
8440
|
-
controls,
|
|
8441
|
-
values: merged
|
|
8442
|
-
};
|
|
8443
|
-
}, [
|
|
8444
|
-
controls,
|
|
8445
|
-
currentValue,
|
|
8446
|
-
overrideId,
|
|
8447
|
-
overrides,
|
|
8448
|
-
codeValues,
|
|
8449
|
-
schema,
|
|
8450
|
-
visualModeEnabled
|
|
8451
|
-
]);
|
|
8452
|
-
};
|
|
8453
|
-
var getNestedValue = (obj, key) => {
|
|
8454
|
-
const parts = key.split(".");
|
|
8455
|
-
let current = obj;
|
|
8456
|
-
for (const part of parts) {
|
|
8457
|
-
if (current === null || current === undefined || typeof current !== "object")
|
|
8458
|
-
return;
|
|
8459
|
-
current = current[part];
|
|
8460
|
-
}
|
|
8461
|
-
return current;
|
|
8462
|
-
};
|
|
8463
|
-
var mergeValues = (props, values, schemaKeys) => {
|
|
8464
|
-
const merged = { ...props };
|
|
8465
|
-
for (const key of schemaKeys) {
|
|
8466
|
-
const value = values[key];
|
|
8467
|
-
const parts = key.split(".");
|
|
8468
|
-
if (parts.length === 1) {
|
|
8469
|
-
merged[key] = value;
|
|
8470
|
-
continue;
|
|
8471
|
-
}
|
|
8472
|
-
let current = merged;
|
|
8473
|
-
for (let i = 0;i < parts.length - 1; i++) {
|
|
8474
|
-
const part = parts[i];
|
|
8475
|
-
if (typeof current[part] === "object" && current[part] !== null) {
|
|
8476
|
-
current[part] = { ...current[part] };
|
|
8477
|
-
} else {
|
|
8478
|
-
current[part] = {};
|
|
8479
|
-
}
|
|
8480
|
-
current = current[part];
|
|
8481
|
-
}
|
|
8482
|
-
current[parts[parts.length - 1]] = value;
|
|
8483
|
-
}
|
|
8484
|
-
return merged;
|
|
8485
|
-
};
|
|
8486
|
-
var wrapInSchema = (Component, schema) => {
|
|
8487
|
-
const schemaKeys = Object.keys(schema);
|
|
8488
|
-
const Wrapped = forwardRef4((props, ref) => {
|
|
8489
|
-
const env = useRemotionEnvironment();
|
|
8490
|
-
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
|
|
8491
|
-
return React15.createElement(Component, {
|
|
8492
|
-
...props,
|
|
8493
|
-
_experimentalControls: null,
|
|
8494
|
-
ref
|
|
8495
|
-
});
|
|
8496
|
-
}
|
|
8497
|
-
const schemaInput = useMemo17(() => {
|
|
8498
|
-
const input = {};
|
|
8499
|
-
for (const key of schemaKeys) {
|
|
8500
|
-
input[key] = getNestedValue(props, key);
|
|
8501
|
-
}
|
|
8502
|
-
return input;
|
|
8503
|
-
}, schemaKeys.map((key) => getNestedValue(props, key)));
|
|
8504
|
-
const { controls, values } = useSchema(schema, schemaInput);
|
|
8505
|
-
const mergedProps = mergeValues(props, values, schemaKeys);
|
|
8506
|
-
return React15.createElement(Component, {
|
|
8507
|
-
...mergedProps,
|
|
8508
|
-
_experimentalControls: controls,
|
|
8509
|
-
ref
|
|
8510
|
-
});
|
|
8511
|
-
});
|
|
8512
|
-
Wrapped.displayName = `wrapInSchema(${Component.displayName || Component.name || "Component"})`;
|
|
8513
|
-
return Wrapped;
|
|
8514
|
-
};
|
|
8515
8627
|
var cachedSupport = null;
|
|
8516
8628
|
var isHtmlInCanvasSupported = () => {
|
|
8517
8629
|
if (cachedSupport !== null) {
|
|
@@ -8549,40 +8661,11 @@ var defaultOnPaint = ({
|
|
|
8549
8661
|
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
8550
8662
|
element.style.transform = transform.toString();
|
|
8551
8663
|
};
|
|
8552
|
-
var
|
|
8553
|
-
"style.translate": {
|
|
8554
|
-
type: "translate",
|
|
8555
|
-
step: 1,
|
|
8556
|
-
default: "0px 0px",
|
|
8557
|
-
description: "Position"
|
|
8558
|
-
},
|
|
8559
|
-
"style.scale": {
|
|
8560
|
-
type: "number",
|
|
8561
|
-
min: 0.05,
|
|
8562
|
-
max: 100,
|
|
8563
|
-
step: 0.01,
|
|
8564
|
-
default: 1,
|
|
8565
|
-
description: "Scale"
|
|
8566
|
-
},
|
|
8567
|
-
"style.rotate": {
|
|
8568
|
-
type: "rotation",
|
|
8569
|
-
step: 1,
|
|
8570
|
-
default: "0deg",
|
|
8571
|
-
description: "Rotation"
|
|
8572
|
-
},
|
|
8573
|
-
"style.opacity": {
|
|
8574
|
-
type: "number",
|
|
8575
|
-
min: 0,
|
|
8576
|
-
max: 1,
|
|
8577
|
-
step: 0.01,
|
|
8578
|
-
default: 1,
|
|
8579
|
-
description: "Opacity"
|
|
8580
|
-
}
|
|
8581
|
-
};
|
|
8664
|
+
var HtmlInCanvasAncestorContext = createContext15(false);
|
|
8582
8665
|
var HtmlInCanvasInner = forwardRef5(({
|
|
8583
8666
|
width,
|
|
8584
8667
|
height,
|
|
8585
|
-
_experimentalEffects:
|
|
8668
|
+
_experimentalEffects: effects = [],
|
|
8586
8669
|
children,
|
|
8587
8670
|
onPaint,
|
|
8588
8671
|
onInit,
|
|
@@ -8591,6 +8674,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
8591
8674
|
durationInFrames,
|
|
8592
8675
|
...sequenceProps
|
|
8593
8676
|
}, ref) => {
|
|
8677
|
+
const isInsideAncestorHtmlInCanvas = useContext17(HtmlInCanvasAncestorContext);
|
|
8594
8678
|
assertHtmlInCanvasDimensions(width, height);
|
|
8595
8679
|
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
8596
8680
|
if (!isHtmlInCanvasSupported()) {
|
|
@@ -8611,8 +8695,8 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
8611
8695
|
}, [ref]);
|
|
8612
8696
|
const [offscreenCanvas] = useState8(() => new OffscreenCanvas(1, 1));
|
|
8613
8697
|
const chainState = useEffectChainState();
|
|
8614
|
-
const effectsRef = useRef9(
|
|
8615
|
-
effectsRef.current =
|
|
8698
|
+
const effectsRef = useRef9(effects);
|
|
8699
|
+
effectsRef.current = effects;
|
|
8616
8700
|
const frameRef = useRef9(frame);
|
|
8617
8701
|
frameRef.current = frame;
|
|
8618
8702
|
const onPaintRef = useRef9(onPaint);
|
|
@@ -8726,35 +8810,42 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
8726
8810
|
continueRender2(handle);
|
|
8727
8811
|
};
|
|
8728
8812
|
}, [width, height, continueRender2]);
|
|
8729
|
-
const innerStyle =
|
|
8813
|
+
const innerStyle = useMemo17(() => {
|
|
8730
8814
|
return {
|
|
8731
8815
|
width,
|
|
8732
|
-
height
|
|
8733
|
-
...style
|
|
8816
|
+
height
|
|
8734
8817
|
};
|
|
8735
|
-
}, [width, height
|
|
8818
|
+
}, [width, height]);
|
|
8819
|
+
if (isInsideAncestorHtmlInCanvas) {
|
|
8820
|
+
throw new Error("<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.");
|
|
8821
|
+
}
|
|
8736
8822
|
return /* @__PURE__ */ jsx15(Sequence, {
|
|
8737
8823
|
durationInFrames: resolvedDuration,
|
|
8738
8824
|
name: "<HtmlInCanvas>",
|
|
8739
8825
|
_experimentalControls: controls,
|
|
8826
|
+
_experimentalEffects: effects,
|
|
8740
8827
|
layout: "none",
|
|
8741
8828
|
...sequenceProps,
|
|
8742
|
-
children: /* @__PURE__ */ jsx15(
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
style
|
|
8749
|
-
children
|
|
8829
|
+
children: /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
|
|
8830
|
+
value: true,
|
|
8831
|
+
children: /* @__PURE__ */ jsx15("canvas", {
|
|
8832
|
+
ref: setLayoutCanvasRef,
|
|
8833
|
+
width,
|
|
8834
|
+
height,
|
|
8835
|
+
style,
|
|
8836
|
+
children: /* @__PURE__ */ jsx15("div", {
|
|
8837
|
+
ref: divRef,
|
|
8838
|
+
style: innerStyle,
|
|
8839
|
+
children
|
|
8840
|
+
})
|
|
8750
8841
|
})
|
|
8751
8842
|
})
|
|
8752
8843
|
});
|
|
8753
8844
|
});
|
|
8754
8845
|
HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
8755
|
-
var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner,
|
|
8846
|
+
var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, sequenceStyleSchema);
|
|
8756
8847
|
var HtmlInCanvas = Object.assign(HtmlInCanvasWrapped, {
|
|
8757
|
-
isHtmlInCanvasSupported
|
|
8848
|
+
isSupported: isHtmlInCanvasSupported
|
|
8758
8849
|
});
|
|
8759
8850
|
HtmlInCanvas.displayName = "HtmlInCanvas";
|
|
8760
8851
|
addSequenceStackTraces(HtmlInCanvas);
|
|
@@ -8787,7 +8878,7 @@ var validateRenderAsset = (artifact) => {
|
|
|
8787
8878
|
}
|
|
8788
8879
|
validateContent(artifact.content);
|
|
8789
8880
|
};
|
|
8790
|
-
var RenderAssetManager =
|
|
8881
|
+
var RenderAssetManager = createContext16({
|
|
8791
8882
|
registerRenderAsset: () => {
|
|
8792
8883
|
return;
|
|
8793
8884
|
},
|
|
@@ -8830,7 +8921,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
8830
8921
|
};
|
|
8831
8922
|
}
|
|
8832
8923
|
}, []);
|
|
8833
|
-
const contextValue =
|
|
8924
|
+
const contextValue = useMemo18(() => {
|
|
8834
8925
|
return {
|
|
8835
8926
|
registerRenderAsset,
|
|
8836
8927
|
unregisterRenderAsset,
|
|
@@ -8844,7 +8935,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
8844
8935
|
};
|
|
8845
8936
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
8846
8937
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
8847
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
8938
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext18(RenderAssetManager);
|
|
8848
8939
|
const env = useRemotionEnvironment();
|
|
8849
8940
|
const frame = useCurrentFrame();
|
|
8850
8941
|
const [id] = useState10(() => {
|
|
@@ -8925,7 +9016,7 @@ var calculateMediaDuration = ({
|
|
|
8925
9016
|
const actualDuration = duration / playbackRate;
|
|
8926
9017
|
return Math.floor(actualDuration);
|
|
8927
9018
|
};
|
|
8928
|
-
var LoopContext =
|
|
9019
|
+
var LoopContext = createContext17(null);
|
|
8929
9020
|
var useLoop = () => {
|
|
8930
9021
|
return React17.useContext(LoopContext);
|
|
8931
9022
|
};
|
|
@@ -8959,14 +9050,14 @@ var Loop = ({
|
|
|
8959
9050
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
8960
9051
|
const start = iteration * durationInFrames;
|
|
8961
9052
|
const from = Math.min(start, maxFrame);
|
|
8962
|
-
const loopDisplay =
|
|
9053
|
+
const loopDisplay = useMemo19(() => {
|
|
8963
9054
|
return {
|
|
8964
9055
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
8965
9056
|
startOffset: -from,
|
|
8966
9057
|
durationInFrames
|
|
8967
9058
|
};
|
|
8968
9059
|
}, [compDuration, durationInFrames, from, times]);
|
|
8969
|
-
const loopContext =
|
|
9060
|
+
const loopContext = useMemo19(() => {
|
|
8970
9061
|
return {
|
|
8971
9062
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
8972
9063
|
durationInFrames
|
|
@@ -8996,7 +9087,7 @@ var playbackLogging = ({
|
|
|
8996
9087
|
const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
|
|
8997
9088
|
Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
|
|
8998
9089
|
};
|
|
8999
|
-
var PreloadContext =
|
|
9090
|
+
var PreloadContext = createContext18({});
|
|
9000
9091
|
var preloads = {};
|
|
9001
9092
|
var updaters = [];
|
|
9002
9093
|
var setPreloads = (updater) => {
|
|
@@ -9034,7 +9125,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
9034
9125
|
return src.slice(0, hashIndex);
|
|
9035
9126
|
};
|
|
9036
9127
|
var usePreload = (src) => {
|
|
9037
|
-
const preloads2 =
|
|
9128
|
+
const preloads2 = useContext19(PreloadContext);
|
|
9038
9129
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
9039
9130
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
9040
9131
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -9317,7 +9408,7 @@ var durationReducer = (state, action) => {
|
|
|
9317
9408
|
return state;
|
|
9318
9409
|
}
|
|
9319
9410
|
};
|
|
9320
|
-
var DurationsContext =
|
|
9411
|
+
var DurationsContext = createContext19({
|
|
9321
9412
|
durations: {},
|
|
9322
9413
|
setDurations: () => {
|
|
9323
9414
|
throw new Error("context missing");
|
|
@@ -9325,7 +9416,7 @@ var DurationsContext = createContext18({
|
|
|
9325
9416
|
});
|
|
9326
9417
|
var DurationsContextProvider = ({ children }) => {
|
|
9327
9418
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
9328
|
-
const value =
|
|
9419
|
+
const value = useMemo20(() => {
|
|
9329
9420
|
return {
|
|
9330
9421
|
durations,
|
|
9331
9422
|
setDurations
|
|
@@ -9459,7 +9550,7 @@ var useSingletonAudioContext = ({
|
|
|
9459
9550
|
audioEnabled
|
|
9460
9551
|
}) => {
|
|
9461
9552
|
const env = useRemotionEnvironment();
|
|
9462
|
-
|
|
9553
|
+
const context = useMemo21(() => {
|
|
9463
9554
|
if (env.isRendering) {
|
|
9464
9555
|
return null;
|
|
9465
9556
|
}
|
|
@@ -9476,11 +9567,19 @@ var useSingletonAudioContext = ({
|
|
|
9476
9567
|
});
|
|
9477
9568
|
const gainNode = audioContext.createGain();
|
|
9478
9569
|
gainNode.connect(audioContext.destination);
|
|
9570
|
+
Log.trace({ logLevel, tag: "audio" }, "Creating new audio context");
|
|
9571
|
+
audioContext.suspend();
|
|
9479
9572
|
return {
|
|
9480
9573
|
audioContext,
|
|
9481
9574
|
gainNode
|
|
9482
9575
|
};
|
|
9483
9576
|
}, [logLevel, latencyHint, env.isRendering, audioEnabled]);
|
|
9577
|
+
useEffect8(() => {
|
|
9578
|
+
return () => {
|
|
9579
|
+
context?.audioContext?.close();
|
|
9580
|
+
};
|
|
9581
|
+
}, [context]);
|
|
9582
|
+
return context;
|
|
9484
9583
|
};
|
|
9485
9584
|
var waitUntilActuallyResumed = (audioContext, logLevel) => {
|
|
9486
9585
|
return new Promise((resolve) => {
|
|
@@ -9528,8 +9627,8 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
9528
9627
|
}
|
|
9529
9628
|
return true;
|
|
9530
9629
|
};
|
|
9531
|
-
var SharedAudioContext =
|
|
9532
|
-
var SharedAudioTagsContext =
|
|
9630
|
+
var SharedAudioContext = createContext20(null);
|
|
9631
|
+
var SharedAudioTagsContext = createContext20(null);
|
|
9533
9632
|
var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
|
|
9534
9633
|
const logLevel = useLogLevel();
|
|
9535
9634
|
const ctxAndGain = useSingletonAudioContext({
|
|
@@ -9539,9 +9638,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9539
9638
|
});
|
|
9540
9639
|
const audioContextIsPlayingEventually = useRef11(false);
|
|
9541
9640
|
const isResuming = useRef11(null);
|
|
9542
|
-
const audioSyncAnchor =
|
|
9641
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
9543
9642
|
const audioSyncAnchorListeners = useRef11([]);
|
|
9544
|
-
const audioSyncAnchorEmitter =
|
|
9643
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
9545
9644
|
return {
|
|
9546
9645
|
dispatch: (event) => {
|
|
9547
9646
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -9561,7 +9660,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9561
9660
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
9562
9661
|
nodesToResume.current.delete(node);
|
|
9563
9662
|
}, []);
|
|
9564
|
-
const scheduleAudioNode =
|
|
9663
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
9565
9664
|
return ({
|
|
9566
9665
|
node,
|
|
9567
9666
|
mediaTimestamp,
|
|
@@ -9613,16 +9712,22 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9613
9712
|
return Promise.resolve();
|
|
9614
9713
|
}
|
|
9615
9714
|
audioContextIsPlayingEventually.current = true;
|
|
9616
|
-
|
|
9715
|
+
const resumePromise = ctxAndGain.audioContext.resume();
|
|
9716
|
+
isResuming.current = new Promise((resolve) => {
|
|
9717
|
+
waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
|
|
9718
|
+
resumePromise.catch((err) => {
|
|
9719
|
+
Log.warn({ logLevel, tag: "audio" }, "AudioContext resume rejected, continuing without audio sync", err);
|
|
9720
|
+
resolve();
|
|
9721
|
+
});
|
|
9722
|
+
}).finally(() => {
|
|
9617
9723
|
isResuming.current = null;
|
|
9618
9724
|
});
|
|
9619
9725
|
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
9620
|
-
ctxAndGain.gainNode
|
|
9621
|
-
ctxAndGain.gainNode
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
});
|
|
9726
|
+
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
9727
|
+
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
9728
|
+
nodesToResume.current.forEach((r2, node) => node.start(r2.scheduledTime, r2.offset, r2.duration));
|
|
9729
|
+
nodesToResume.current.clear();
|
|
9730
|
+
return resumePromise.catch(() => {});
|
|
9626
9731
|
}, [ctxAndGain, logLevel]);
|
|
9627
9732
|
const getIsResumingAudioContext = useCallback9(() => {
|
|
9628
9733
|
return isResuming.current;
|
|
@@ -9637,7 +9742,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9637
9742
|
audioContextIsPlayingEventually.current = false;
|
|
9638
9743
|
ctxAndGain.audioContext.suspend();
|
|
9639
9744
|
}, [ctxAndGain]);
|
|
9640
|
-
const audioContextValue =
|
|
9745
|
+
const audioContextValue = useMemo22(() => {
|
|
9641
9746
|
return {
|
|
9642
9747
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
9643
9748
|
gainNode: ctxAndGain?.gainNode ?? null,
|
|
@@ -9673,10 +9778,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
9673
9778
|
const logLevel = useLogLevel();
|
|
9674
9779
|
const mountTime = useMountTime();
|
|
9675
9780
|
const env = useRemotionEnvironment();
|
|
9676
|
-
const audioCtx =
|
|
9781
|
+
const audioCtx = useContext20(SharedAudioContext);
|
|
9677
9782
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
9678
9783
|
const resume = audioCtx?.resume;
|
|
9679
|
-
const refs =
|
|
9784
|
+
const refs = useMemo22(() => {
|
|
9680
9785
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
9681
9786
|
const ref = createRef2();
|
|
9682
9787
|
return {
|
|
@@ -9813,7 +9918,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
9813
9918
|
});
|
|
9814
9919
|
resume?.();
|
|
9815
9920
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
9816
|
-
const audioTagsValue =
|
|
9921
|
+
const audioTagsValue = useMemo22(() => {
|
|
9817
9922
|
return {
|
|
9818
9923
|
registerAudio,
|
|
9819
9924
|
unregisterAudio,
|
|
@@ -9848,8 +9953,8 @@ var useSharedAudio = ({
|
|
|
9848
9953
|
premounting,
|
|
9849
9954
|
postmounting
|
|
9850
9955
|
}) => {
|
|
9851
|
-
const audioCtx =
|
|
9852
|
-
const tagsCtx =
|
|
9956
|
+
const audioCtx = useContext20(SharedAudioContext);
|
|
9957
|
+
const tagsCtx = useContext20(SharedAudioTagsContext);
|
|
9853
9958
|
const [elem] = useState12(() => {
|
|
9854
9959
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
9855
9960
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -10028,7 +10133,7 @@ var useVolume = ({
|
|
|
10028
10133
|
const audioStuffRef = useRef13(null);
|
|
10029
10134
|
const currentVolumeRef = useRef13(volume);
|
|
10030
10135
|
currentVolumeRef.current = volume;
|
|
10031
|
-
const sharedAudioContext =
|
|
10136
|
+
const sharedAudioContext = useContext21(SharedAudioContext);
|
|
10032
10137
|
if (!sharedAudioContext) {
|
|
10033
10138
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
10034
10139
|
}
|
|
@@ -10093,7 +10198,7 @@ var useVolume = ({
|
|
|
10093
10198
|
return audioStuffRef;
|
|
10094
10199
|
};
|
|
10095
10200
|
var useMediaStartsAt = () => {
|
|
10096
|
-
const parentSequence =
|
|
10201
|
+
const parentSequence = useContext22(SequenceContext);
|
|
10097
10202
|
const startsAt = Math.min(0, parentSequence?.relativeFrom ?? 0);
|
|
10098
10203
|
return startsAt;
|
|
10099
10204
|
};
|
|
@@ -10182,7 +10287,7 @@ var useBasicMediaInTimeline = ({
|
|
|
10182
10287
|
if (!src) {
|
|
10183
10288
|
throw new Error("No src passed");
|
|
10184
10289
|
}
|
|
10185
|
-
const parentSequence =
|
|
10290
|
+
const parentSequence = useContext23(SequenceContext);
|
|
10186
10291
|
const [initialVolume] = useState13(() => volume);
|
|
10187
10292
|
const duration = getTimelineDuration({
|
|
10188
10293
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -10192,7 +10297,7 @@ var useBasicMediaInTimeline = ({
|
|
|
10192
10297
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
10193
10298
|
loop
|
|
10194
10299
|
});
|
|
10195
|
-
const volumes =
|
|
10300
|
+
const volumes = useMemo23(() => {
|
|
10196
10301
|
if (typeof volume === "number") {
|
|
10197
10302
|
return volume;
|
|
10198
10303
|
}
|
|
@@ -10204,7 +10309,7 @@ var useBasicMediaInTimeline = ({
|
|
|
10204
10309
|
});
|
|
10205
10310
|
}).join(",");
|
|
10206
10311
|
}, [duration, mediaStartsAt, volume, mediaVolume]);
|
|
10207
|
-
|
|
10312
|
+
useEffect9(() => {
|
|
10208
10313
|
if (typeof volume === "number" && volume !== initialVolume) {
|
|
10209
10314
|
warnOnce2(`Remotion: The ${mediaType} with src ${src} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/audio/volume`);
|
|
10210
10315
|
}
|
|
@@ -10213,7 +10318,7 @@ var useBasicMediaInTimeline = ({
|
|
|
10213
10318
|
const nonce = useNonce();
|
|
10214
10319
|
const { rootId } = useTimelineContext();
|
|
10215
10320
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
10216
|
-
const memoizedResult =
|
|
10321
|
+
const memoizedResult = useMemo23(() => {
|
|
10217
10322
|
return {
|
|
10218
10323
|
volumes,
|
|
10219
10324
|
duration,
|
|
@@ -10249,8 +10354,8 @@ var useImageInTimeline = ({
|
|
|
10249
10354
|
loopDisplay,
|
|
10250
10355
|
controls
|
|
10251
10356
|
}) => {
|
|
10252
|
-
const parentSequence =
|
|
10253
|
-
const { registerSequence, unregisterSequence } =
|
|
10357
|
+
const parentSequence = useContext23(SequenceContext);
|
|
10358
|
+
const { registerSequence, unregisterSequence } = useContext23(SequenceManager);
|
|
10254
10359
|
const { durationInFrames } = useVideoConfig();
|
|
10255
10360
|
const mediaStartsAt = useMediaStartsAt();
|
|
10256
10361
|
const { duration, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -10267,7 +10372,7 @@ var useImageInTimeline = ({
|
|
|
10267
10372
|
loop: false
|
|
10268
10373
|
});
|
|
10269
10374
|
const { isStudio } = useRemotionEnvironment();
|
|
10270
|
-
|
|
10375
|
+
useEffect9(() => {
|
|
10271
10376
|
if (!src) {
|
|
10272
10377
|
throw new Error("No src passed");
|
|
10273
10378
|
}
|
|
@@ -10331,9 +10436,9 @@ var useMediaInTimeline = ({
|
|
|
10331
10436
|
postmountDisplay,
|
|
10332
10437
|
loopDisplay
|
|
10333
10438
|
}) => {
|
|
10334
|
-
const parentSequence =
|
|
10439
|
+
const parentSequence = useContext23(SequenceContext);
|
|
10335
10440
|
const startsAt = useMediaStartsAt();
|
|
10336
|
-
const { registerSequence, unregisterSequence } =
|
|
10441
|
+
const { registerSequence, unregisterSequence } = useContext23(SequenceManager);
|
|
10337
10442
|
const { durationInFrames } = useVideoConfig();
|
|
10338
10443
|
const mediaStartsAt = useMediaStartsAt();
|
|
10339
10444
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -10350,7 +10455,7 @@ var useMediaInTimeline = ({
|
|
|
10350
10455
|
loop: false
|
|
10351
10456
|
});
|
|
10352
10457
|
const { isStudio } = useRemotionEnvironment();
|
|
10353
|
-
|
|
10458
|
+
useEffect9(() => {
|
|
10354
10459
|
if (!src) {
|
|
10355
10460
|
throw new Error("No src passed");
|
|
10356
10461
|
}
|
|
@@ -10452,7 +10557,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
10452
10557
|
}
|
|
10453
10558
|
};
|
|
10454
10559
|
}, []);
|
|
10455
|
-
|
|
10560
|
+
useEffect10(() => {
|
|
10456
10561
|
if (rendering) {
|
|
10457
10562
|
return;
|
|
10458
10563
|
}
|
|
@@ -10482,13 +10587,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
10482
10587
|
}
|
|
10483
10588
|
}, [blocks]);
|
|
10484
10589
|
}
|
|
10485
|
-
return
|
|
10590
|
+
return useMemo24(() => {
|
|
10486
10591
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
10487
10592
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
10488
10593
|
};
|
|
10489
10594
|
var BufferingContextReact = React21.createContext(null);
|
|
10490
10595
|
var BufferingProvider = ({ children }) => {
|
|
10491
|
-
const { logLevel, mountTime } =
|
|
10596
|
+
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
10492
10597
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
10493
10598
|
return /* @__PURE__ */ jsx21(BufferingContextReact.Provider, {
|
|
10494
10599
|
value: bufferManager,
|
|
@@ -10497,7 +10602,7 @@ var BufferingProvider = ({ children }) => {
|
|
|
10497
10602
|
};
|
|
10498
10603
|
var useIsPlayerBuffering = (bufferManager) => {
|
|
10499
10604
|
const [isBuffering, setIsBuffering] = useState14(bufferManager.buffering.current);
|
|
10500
|
-
|
|
10605
|
+
useEffect10(() => {
|
|
10501
10606
|
const onBuffer = () => {
|
|
10502
10607
|
setIsBuffering(true);
|
|
10503
10608
|
};
|
|
@@ -10518,9 +10623,9 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
10518
10623
|
return isBuffering;
|
|
10519
10624
|
};
|
|
10520
10625
|
var useBufferState = () => {
|
|
10521
|
-
const buffer =
|
|
10626
|
+
const buffer = useContext25(BufferingContextReact);
|
|
10522
10627
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
10523
|
-
return
|
|
10628
|
+
return useMemo25(() => ({
|
|
10524
10629
|
delayPlayback: () => {
|
|
10525
10630
|
if (!addBlock) {
|
|
10526
10631
|
throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");
|
|
@@ -10617,7 +10722,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
10617
10722
|
onVariableFpsVideoDetected,
|
|
10618
10723
|
pauseWhenBuffering
|
|
10619
10724
|
]);
|
|
10620
|
-
return
|
|
10725
|
+
return useMemo26(() => {
|
|
10621
10726
|
return {
|
|
10622
10727
|
isBuffering: () => bufferingRef.current,
|
|
10623
10728
|
bufferUntilFirstFrame
|
|
@@ -10666,7 +10771,7 @@ var useMediaBuffering = ({
|
|
|
10666
10771
|
}) => {
|
|
10667
10772
|
const buffer = useBufferState();
|
|
10668
10773
|
const [isBuffering, setIsBuffering] = useState15(false);
|
|
10669
|
-
|
|
10774
|
+
useEffect11(() => {
|
|
10670
10775
|
let cleanupFns = [];
|
|
10671
10776
|
const { current } = element;
|
|
10672
10777
|
if (!current) {
|
|
@@ -10799,7 +10904,7 @@ var useRequestVideoCallbackTime = ({
|
|
|
10799
10904
|
onVariableFpsVideoDetected
|
|
10800
10905
|
}) => {
|
|
10801
10906
|
const currentTime = useRef16(null);
|
|
10802
|
-
|
|
10907
|
+
useEffect12(() => {
|
|
10803
10908
|
const { current } = mediaRef;
|
|
10804
10909
|
if (current) {
|
|
10805
10910
|
currentTime.current = {
|
|
@@ -11019,11 +11124,11 @@ var useMediaPlayback = ({
|
|
|
11019
11124
|
isPostmounting,
|
|
11020
11125
|
onAutoPlayError
|
|
11021
11126
|
}) => {
|
|
11022
|
-
const { playbackRate: globalPlaybackRate } =
|
|
11127
|
+
const { playbackRate: globalPlaybackRate } = usePlaybackRate();
|
|
11023
11128
|
const frame = useCurrentFrame();
|
|
11024
11129
|
const absoluteFrame = useTimelinePosition();
|
|
11025
11130
|
const [playing] = usePlayingState();
|
|
11026
|
-
const buffering =
|
|
11131
|
+
const buffering = useContext26(BufferingContextReact);
|
|
11027
11132
|
const { fps } = useVideoConfig();
|
|
11028
11133
|
const mediaStartsAt = useMediaStartsAt();
|
|
11029
11134
|
const lastSeekDueToShift = useRef17(null);
|
|
@@ -11085,7 +11190,7 @@ var useMediaPlayback = ({
|
|
|
11085
11190
|
return acceptableTimeshift ?? defaultAcceptableTimeshift;
|
|
11086
11191
|
})();
|
|
11087
11192
|
const isPlayerBuffering = useIsPlayerBuffering(buffering);
|
|
11088
|
-
|
|
11193
|
+
useEffect13(() => {
|
|
11089
11194
|
if (mediaRef.current?.paused) {
|
|
11090
11195
|
return;
|
|
11091
11196
|
}
|
|
@@ -11130,7 +11235,7 @@ var useMediaPlayback = ({
|
|
|
11130
11235
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
11131
11236
|
}
|
|
11132
11237
|
}, [mediaRef, playbackRate]);
|
|
11133
|
-
|
|
11238
|
+
useEffect13(() => {
|
|
11134
11239
|
const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
|
|
11135
11240
|
if (!mediaRef.current) {
|
|
11136
11241
|
throw new Error(`No ${mediaType} ref found`);
|
|
@@ -11259,7 +11364,7 @@ var useMediaTag = ({
|
|
|
11259
11364
|
const logLevel = useLogLevel();
|
|
11260
11365
|
const mountTime = useMountTime();
|
|
11261
11366
|
const env = useRemotionEnvironment();
|
|
11262
|
-
|
|
11367
|
+
useEffect14(() => {
|
|
11263
11368
|
const tag = {
|
|
11264
11369
|
id,
|
|
11265
11370
|
play: (reason) => {
|
|
@@ -11298,11 +11403,11 @@ var useMediaTag = ({
|
|
|
11298
11403
|
env.isPlayer
|
|
11299
11404
|
]);
|
|
11300
11405
|
};
|
|
11301
|
-
var MediaVolumeContext =
|
|
11406
|
+
var MediaVolumeContext = createContext21({
|
|
11302
11407
|
mediaMuted: false,
|
|
11303
11408
|
mediaVolume: 1
|
|
11304
11409
|
});
|
|
11305
|
-
var SetMediaVolumeContext =
|
|
11410
|
+
var SetMediaVolumeContext = createContext21({
|
|
11306
11411
|
setMediaMuted: () => {
|
|
11307
11412
|
throw new Error("default");
|
|
11308
11413
|
},
|
|
@@ -11311,16 +11416,16 @@ var SetMediaVolumeContext = createContext20({
|
|
|
11311
11416
|
}
|
|
11312
11417
|
});
|
|
11313
11418
|
var useMediaVolumeState = () => {
|
|
11314
|
-
const { mediaVolume } =
|
|
11315
|
-
const { setMediaVolume } =
|
|
11316
|
-
return
|
|
11419
|
+
const { mediaVolume } = useContext27(MediaVolumeContext);
|
|
11420
|
+
const { setMediaVolume } = useContext27(SetMediaVolumeContext);
|
|
11421
|
+
return useMemo27(() => {
|
|
11317
11422
|
return [mediaVolume, setMediaVolume];
|
|
11318
11423
|
}, [mediaVolume, setMediaVolume]);
|
|
11319
11424
|
};
|
|
11320
11425
|
var useMediaMutedState = () => {
|
|
11321
|
-
const { mediaMuted } =
|
|
11322
|
-
const { setMediaMuted } =
|
|
11323
|
-
return
|
|
11426
|
+
const { mediaMuted } = useContext27(MediaVolumeContext);
|
|
11427
|
+
const { setMediaMuted } = useContext27(SetMediaVolumeContext);
|
|
11428
|
+
return useMemo27(() => {
|
|
11324
11429
|
return [mediaMuted, setMediaMuted];
|
|
11325
11430
|
}, [mediaMuted, setMediaMuted]);
|
|
11326
11431
|
};
|
|
@@ -11369,12 +11474,12 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11369
11474
|
const [mediaVolume] = useMediaVolumeState();
|
|
11370
11475
|
const [mediaMuted] = useMediaMutedState();
|
|
11371
11476
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
11372
|
-
const { hidden } =
|
|
11477
|
+
const { hidden } = useContext28(SequenceVisibilityToggleContext);
|
|
11373
11478
|
if (!src) {
|
|
11374
11479
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
11375
11480
|
}
|
|
11376
11481
|
const preloadedSrc = usePreload(src);
|
|
11377
|
-
const sequenceContext =
|
|
11482
|
+
const sequenceContext = useContext28(SequenceContext);
|
|
11378
11483
|
const [timelineId] = useState16(() => String(Math.random()));
|
|
11379
11484
|
const isSequenceHidden = hidden[timelineId] ?? false;
|
|
11380
11485
|
const userPreferredVolume = evaluateVolume({
|
|
@@ -11388,7 +11493,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11388
11493
|
requestsVideoFrame: false,
|
|
11389
11494
|
isClientSideRendering: false
|
|
11390
11495
|
});
|
|
11391
|
-
const propsToPass =
|
|
11496
|
+
const propsToPass = useMemo28(() => {
|
|
11392
11497
|
return {
|
|
11393
11498
|
muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
|
|
11394
11499
|
src: preloadedSrc,
|
|
@@ -11406,7 +11511,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11406
11511
|
userPreferredVolume,
|
|
11407
11512
|
crossOriginValue
|
|
11408
11513
|
]);
|
|
11409
|
-
const id =
|
|
11514
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
11410
11515
|
src,
|
|
11411
11516
|
sequenceContext?.relativeFrom,
|
|
11412
11517
|
sequenceContext?.cumulatedFrom,
|
|
@@ -11478,7 +11583,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11478
11583
|
}, [audioRef]);
|
|
11479
11584
|
const currentOnDurationCallback = useRef18(onDuration);
|
|
11480
11585
|
currentOnDurationCallback.current = onDuration;
|
|
11481
|
-
|
|
11586
|
+
useEffect15(() => {
|
|
11482
11587
|
const { current } = audioRef;
|
|
11483
11588
|
if (!current) {
|
|
11484
11589
|
return;
|
|
@@ -11529,10 +11634,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
11529
11634
|
const absoluteFrame = useTimelinePosition();
|
|
11530
11635
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
11531
11636
|
const frame = useCurrentFrame();
|
|
11532
|
-
const sequenceContext =
|
|
11533
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
11637
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
11638
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);
|
|
11534
11639
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
11535
|
-
const id =
|
|
11640
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
11536
11641
|
props.src,
|
|
11537
11642
|
sequenceContext?.relativeFrom,
|
|
11538
11643
|
sequenceContext?.cumulatedFrom,
|
|
@@ -11547,7 +11652,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
11547
11652
|
useImperativeHandle5(ref, () => {
|
|
11548
11653
|
return audioRef.current;
|
|
11549
11654
|
}, []);
|
|
11550
|
-
|
|
11655
|
+
useEffect16(() => {
|
|
11551
11656
|
if (!props.src) {
|
|
11552
11657
|
throw new Error("No src passed");
|
|
11553
11658
|
}
|
|
@@ -11639,7 +11744,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
11639
11744
|
};
|
|
11640
11745
|
var AudioForRendering = forwardRef7(AudioForRenderingRefForwardingFunction);
|
|
11641
11746
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
11642
|
-
const audioTagsContext =
|
|
11747
|
+
const audioTagsContext = useContext30(SharedAudioTagsContext);
|
|
11643
11748
|
const {
|
|
11644
11749
|
startFrom,
|
|
11645
11750
|
endAt,
|
|
@@ -11658,7 +11763,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
11658
11763
|
if (environment.isClientSideRendering) {
|
|
11659
11764
|
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");
|
|
11660
11765
|
}
|
|
11661
|
-
const { durations, setDurations } =
|
|
11766
|
+
const { durations, setDurations } = useContext30(DurationsContext);
|
|
11662
11767
|
if (typeof props.src !== "string") {
|
|
11663
11768
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
11664
11769
|
}
|
|
@@ -11797,36 +11902,6 @@ function truncateSrcForLabel(src) {
|
|
|
11797
11902
|
}
|
|
11798
11903
|
return src;
|
|
11799
11904
|
}
|
|
11800
|
-
var imgSchema = {
|
|
11801
|
-
"style.translate": {
|
|
11802
|
-
type: "translate",
|
|
11803
|
-
step: 1,
|
|
11804
|
-
default: "0px 0px",
|
|
11805
|
-
description: "Position"
|
|
11806
|
-
},
|
|
11807
|
-
"style.scale": {
|
|
11808
|
-
type: "number",
|
|
11809
|
-
min: 0.05,
|
|
11810
|
-
max: 100,
|
|
11811
|
-
step: 0.01,
|
|
11812
|
-
default: 1,
|
|
11813
|
-
description: "Scale"
|
|
11814
|
-
},
|
|
11815
|
-
"style.rotate": {
|
|
11816
|
-
type: "rotation",
|
|
11817
|
-
step: 1,
|
|
11818
|
-
default: "0deg",
|
|
11819
|
-
description: "Rotation"
|
|
11820
|
-
},
|
|
11821
|
-
"style.opacity": {
|
|
11822
|
-
type: "number",
|
|
11823
|
-
min: 0,
|
|
11824
|
-
max: 1,
|
|
11825
|
-
step: 0.01,
|
|
11826
|
-
default: 1,
|
|
11827
|
-
description: "Opacity"
|
|
11828
|
-
}
|
|
11829
|
-
};
|
|
11830
11905
|
var ImgInner = ({
|
|
11831
11906
|
onError,
|
|
11832
11907
|
maxRetries = 2,
|
|
@@ -11846,7 +11921,7 @@ var ImgInner = ({
|
|
|
11846
11921
|
const imageRef = useRef20(null);
|
|
11847
11922
|
const errors = useRef20({});
|
|
11848
11923
|
const { delayPlayback } = useBufferState();
|
|
11849
|
-
const sequenceContext =
|
|
11924
|
+
const sequenceContext = useContext31(SequenceContext);
|
|
11850
11925
|
const [timelineId] = useState18(() => String(Math.random()));
|
|
11851
11926
|
if (!src) {
|
|
11852
11927
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
@@ -11990,7 +12065,7 @@ var ImgInner = ({
|
|
|
11990
12065
|
decoding: "sync"
|
|
11991
12066
|
});
|
|
11992
12067
|
};
|
|
11993
|
-
var Img = wrapInSchema(ImgInner,
|
|
12068
|
+
var Img = wrapInSchema(ImgInner, sequenceStyleSchema);
|
|
11994
12069
|
addSequenceStackTraces(Img);
|
|
11995
12070
|
var compositionsRef = React28.createRef();
|
|
11996
12071
|
var CompositionManagerProvider = ({
|
|
@@ -12046,7 +12121,7 @@ var CompositionManagerProvider = ({
|
|
|
12046
12121
|
getCompositions: () => currentcompositionsRef.current
|
|
12047
12122
|
};
|
|
12048
12123
|
}, []);
|
|
12049
|
-
const compositionManagerSetters =
|
|
12124
|
+
const compositionManagerSetters = useMemo30(() => {
|
|
12050
12125
|
return {
|
|
12051
12126
|
registerComposition,
|
|
12052
12127
|
unregisterComposition,
|
|
@@ -12062,7 +12137,7 @@ var CompositionManagerProvider = ({
|
|
|
12062
12137
|
unregisterFolder,
|
|
12063
12138
|
onlyRenderComposition
|
|
12064
12139
|
]);
|
|
12065
|
-
const compositionManagerContextValue =
|
|
12140
|
+
const compositionManagerContextValue = useMemo30(() => {
|
|
12066
12141
|
return {
|
|
12067
12142
|
compositions,
|
|
12068
12143
|
folders,
|
|
@@ -12166,9 +12241,9 @@ var waitForRoot = (fn) => {
|
|
|
12166
12241
|
listeners = listeners.filter((l) => l !== fn);
|
|
12167
12242
|
};
|
|
12168
12243
|
};
|
|
12169
|
-
var MediaEnabledContext =
|
|
12244
|
+
var MediaEnabledContext = createContext22(null);
|
|
12170
12245
|
var useVideoEnabled = () => {
|
|
12171
|
-
const context =
|
|
12246
|
+
const context = useContext32(MediaEnabledContext);
|
|
12172
12247
|
if (!context) {
|
|
12173
12248
|
return window.remotion_videoEnabled;
|
|
12174
12249
|
}
|
|
@@ -12178,7 +12253,7 @@ var useVideoEnabled = () => {
|
|
|
12178
12253
|
return context.videoEnabled;
|
|
12179
12254
|
};
|
|
12180
12255
|
var useAudioEnabled = () => {
|
|
12181
|
-
const context =
|
|
12256
|
+
const context = useContext32(MediaEnabledContext);
|
|
12182
12257
|
if (!context) {
|
|
12183
12258
|
return window.remotion_audioEnabled;
|
|
12184
12259
|
}
|
|
@@ -12192,7 +12267,7 @@ var MediaEnabledProvider = ({
|
|
|
12192
12267
|
videoEnabled,
|
|
12193
12268
|
audioEnabled
|
|
12194
12269
|
}) => {
|
|
12195
|
-
const value =
|
|
12270
|
+
const value = useMemo31(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
12196
12271
|
return /* @__PURE__ */ jsx28(MediaEnabledContext.Provider, {
|
|
12197
12272
|
value,
|
|
12198
12273
|
children
|
|
@@ -12208,13 +12283,13 @@ var RemotionRootContexts = ({
|
|
|
12208
12283
|
frameState,
|
|
12209
12284
|
visualModeEnabled
|
|
12210
12285
|
}) => {
|
|
12211
|
-
const nonceContext =
|
|
12286
|
+
const nonceContext = useMemo322(() => {
|
|
12212
12287
|
let counter = 0;
|
|
12213
12288
|
return {
|
|
12214
12289
|
getNonce: () => counter++
|
|
12215
12290
|
};
|
|
12216
12291
|
}, []);
|
|
12217
|
-
const logging =
|
|
12292
|
+
const logging = useMemo322(() => {
|
|
12218
12293
|
return { logLevel, mountTime: Date.now() };
|
|
12219
12294
|
}, [logLevel]);
|
|
12220
12295
|
return /* @__PURE__ */ jsx29(LogLevelContext.Provider, {
|
|
@@ -12448,7 +12523,7 @@ var setupEnvVariables = () => {
|
|
|
12448
12523
|
});
|
|
12449
12524
|
};
|
|
12450
12525
|
var CurrentScaleContext = React32.createContext(null);
|
|
12451
|
-
var PreviewSizeContext =
|
|
12526
|
+
var PreviewSizeContext = createContext23({
|
|
12452
12527
|
setSize: () => {
|
|
12453
12528
|
return;
|
|
12454
12529
|
},
|
|
@@ -12472,8 +12547,8 @@ var calculateScale = ({
|
|
|
12472
12547
|
return Number(previewSize);
|
|
12473
12548
|
};
|
|
12474
12549
|
var useSequenceControlOverride = (key) => {
|
|
12475
|
-
const seqContext =
|
|
12476
|
-
const { dragOverrides: overrides } =
|
|
12550
|
+
const seqContext = useContext33(SequenceContext);
|
|
12551
|
+
const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
|
|
12477
12552
|
if (!seqContext) {
|
|
12478
12553
|
return;
|
|
12479
12554
|
}
|
|
@@ -12510,13 +12585,13 @@ var OffthreadVideoForRendering = ({
|
|
|
12510
12585
|
const frame = useCurrentFrame();
|
|
12511
12586
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
12512
12587
|
const videoConfig = useUnsafeVideoConfig();
|
|
12513
|
-
const sequenceContext =
|
|
12588
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
12514
12589
|
const mediaStartsAt = useMediaStartsAt();
|
|
12515
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12590
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext34(RenderAssetManager);
|
|
12516
12591
|
if (!src) {
|
|
12517
12592
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
12518
12593
|
}
|
|
12519
|
-
const id =
|
|
12594
|
+
const id = useMemo33(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12520
12595
|
src,
|
|
12521
12596
|
sequenceContext?.cumulatedFrom,
|
|
12522
12597
|
sequenceContext?.relativeFrom,
|
|
@@ -12531,7 +12606,7 @@ var OffthreadVideoForRendering = ({
|
|
|
12531
12606
|
mediaVolume: 1
|
|
12532
12607
|
});
|
|
12533
12608
|
warnAboutTooHighVolume(volume);
|
|
12534
|
-
|
|
12609
|
+
useEffect17(() => {
|
|
12535
12610
|
if (!src) {
|
|
12536
12611
|
throw new Error("No src passed");
|
|
12537
12612
|
}
|
|
@@ -12571,14 +12646,14 @@ var OffthreadVideoForRendering = ({
|
|
|
12571
12646
|
sequenceContext?.relativeFrom,
|
|
12572
12647
|
audioStreamIndex
|
|
12573
12648
|
]);
|
|
12574
|
-
const currentTime =
|
|
12649
|
+
const currentTime = useMemo33(() => {
|
|
12575
12650
|
return getExpectedMediaFrameUncorrected({
|
|
12576
12651
|
frame,
|
|
12577
12652
|
playbackRate: playbackRate || 1,
|
|
12578
12653
|
startFrom: -mediaStartsAt
|
|
12579
12654
|
}) / videoConfig.fps;
|
|
12580
12655
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
12581
|
-
const actualSrc =
|
|
12656
|
+
const actualSrc = useMemo33(() => {
|
|
12582
12657
|
return getOffthreadVideoSource({
|
|
12583
12658
|
src,
|
|
12584
12659
|
currentTime,
|
|
@@ -12666,7 +12741,7 @@ var OffthreadVideoForRendering = ({
|
|
|
12666
12741
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
12667
12742
|
}
|
|
12668
12743
|
}, [imageSrc, onError]);
|
|
12669
|
-
const className =
|
|
12744
|
+
const className = useMemo33(() => {
|
|
12670
12745
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy2).join(" ");
|
|
12671
12746
|
}, [props2.className]);
|
|
12672
12747
|
const onImageFrame = useCallback17((img) => {
|
|
@@ -12692,7 +12767,7 @@ var useEmitVideoFrame = ({
|
|
|
12692
12767
|
ref,
|
|
12693
12768
|
onVideoFrame
|
|
12694
12769
|
}) => {
|
|
12695
|
-
|
|
12770
|
+
useEffect18(() => {
|
|
12696
12771
|
const { current } = ref;
|
|
12697
12772
|
if (!current) {
|
|
12698
12773
|
return;
|
|
@@ -12724,12 +12799,12 @@ class MediaPlaybackError extends Error {
|
|
|
12724
12799
|
}
|
|
12725
12800
|
}
|
|
12726
12801
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
12727
|
-
const context =
|
|
12802
|
+
const context = useContext35(SharedAudioContext);
|
|
12728
12803
|
if (!context) {
|
|
12729
12804
|
throw new Error("SharedAudioContext not found");
|
|
12730
12805
|
}
|
|
12731
12806
|
const videoRef = useRef22(null);
|
|
12732
|
-
const sharedSource =
|
|
12807
|
+
const sharedSource = useMemo34(() => {
|
|
12733
12808
|
if (!context.audioContext) {
|
|
12734
12809
|
return null;
|
|
12735
12810
|
}
|
|
@@ -12780,8 +12855,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12780
12855
|
}
|
|
12781
12856
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12782
12857
|
const { fps, durationInFrames } = useVideoConfig();
|
|
12783
|
-
const parentSequence =
|
|
12784
|
-
const { hidden } =
|
|
12858
|
+
const parentSequence = useContext35(SequenceContext);
|
|
12859
|
+
const { hidden } = useContext35(SequenceVisibilityToggleContext);
|
|
12785
12860
|
const logLevel = useLogLevel();
|
|
12786
12861
|
const mountTime = useMountTime();
|
|
12787
12862
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -12856,7 +12931,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12856
12931
|
tag: "video",
|
|
12857
12932
|
mountTime
|
|
12858
12933
|
}));
|
|
12859
|
-
|
|
12934
|
+
useEffect19(() => {
|
|
12860
12935
|
const { current } = videoRef;
|
|
12861
12936
|
if (!current) {
|
|
12862
12937
|
return;
|
|
@@ -12899,7 +12974,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12899
12974
|
const currentOnDurationCallback = useRef22(onDuration);
|
|
12900
12975
|
currentOnDurationCallback.current = onDuration;
|
|
12901
12976
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
12902
|
-
|
|
12977
|
+
useEffect19(() => {
|
|
12903
12978
|
const { current } = videoRef;
|
|
12904
12979
|
if (!current) {
|
|
12905
12980
|
return;
|
|
@@ -12916,7 +12991,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12916
12991
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
12917
12992
|
};
|
|
12918
12993
|
}, [src]);
|
|
12919
|
-
|
|
12994
|
+
useEffect19(() => {
|
|
12920
12995
|
const { current } = videoRef;
|
|
12921
12996
|
if (!current) {
|
|
12922
12997
|
return;
|
|
@@ -12927,7 +13002,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12927
13002
|
current.preload = "auto";
|
|
12928
13003
|
}
|
|
12929
13004
|
}, []);
|
|
12930
|
-
const actualStyle =
|
|
13005
|
+
const actualStyle = useMemo34(() => {
|
|
12931
13006
|
return {
|
|
12932
13007
|
...style,
|
|
12933
13008
|
opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
|
|
@@ -13121,7 +13196,7 @@ function useRemotionContexts() {
|
|
|
13121
13196
|
const sequenceManagerContext = React36.useContext(SequenceManager);
|
|
13122
13197
|
const bufferManagerContext = React36.useContext(BufferingContextReact);
|
|
13123
13198
|
const logLevelContext = React36.useContext(LogLevelContext);
|
|
13124
|
-
return
|
|
13199
|
+
return useMemo35(() => ({
|
|
13125
13200
|
compositionManagerCtx,
|
|
13126
13201
|
timelineContext,
|
|
13127
13202
|
setTimelineContext,
|
|
@@ -13209,8 +13284,11 @@ var Internals = {
|
|
|
13209
13284
|
SequenceManager,
|
|
13210
13285
|
SequenceStackTracesUpdateContext,
|
|
13211
13286
|
SequenceVisibilityToggleContext,
|
|
13212
|
-
useSchema,
|
|
13213
13287
|
wrapInSchema,
|
|
13288
|
+
sequenceSchema,
|
|
13289
|
+
sequenceStyleSchema,
|
|
13290
|
+
flattenActiveSchema,
|
|
13291
|
+
getFlatSchemaWithAllKeys,
|
|
13214
13292
|
useSequenceControlOverride,
|
|
13215
13293
|
RemotionRootContexts,
|
|
13216
13294
|
CompositionManagerProvider,
|
|
@@ -13260,6 +13338,7 @@ var Internals = {
|
|
|
13260
13338
|
REMOTION_STUDIO_CONTAINER_ELEMENT,
|
|
13261
13339
|
RenderAssetManager,
|
|
13262
13340
|
persistCurrentFrame,
|
|
13341
|
+
usePlaybackRate,
|
|
13263
13342
|
useTimelineContext,
|
|
13264
13343
|
useTimelineSetFrame,
|
|
13265
13344
|
isIosSafari,
|
|
@@ -13293,6 +13372,7 @@ var Internals = {
|
|
|
13293
13372
|
TimelinePosition: exports_timeline_position_state,
|
|
13294
13373
|
DelayRenderContextType,
|
|
13295
13374
|
TimelineContext,
|
|
13375
|
+
PlaybackRateContext,
|
|
13296
13376
|
AbsoluteTimeContext,
|
|
13297
13377
|
RenderAssetManagerProvider,
|
|
13298
13378
|
getEffectiveVisualModeValue,
|
|
@@ -13301,7 +13381,8 @@ var Internals = {
|
|
|
13301
13381
|
runEffectChain,
|
|
13302
13382
|
useMemoizedEffects,
|
|
13303
13383
|
defineEffect,
|
|
13304
|
-
createDescriptor
|
|
13384
|
+
createDescriptor,
|
|
13385
|
+
computeEffectiveSchemaValuesDotNotation
|
|
13305
13386
|
};
|
|
13306
13387
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
13307
13388
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -13339,7 +13420,7 @@ var flattenChildren = (children) => {
|
|
|
13339
13420
|
return flatChildren;
|
|
13340
13421
|
}, []);
|
|
13341
13422
|
};
|
|
13342
|
-
var IsInsideSeriesContext =
|
|
13423
|
+
var IsInsideSeriesContext = createContext24(false);
|
|
13343
13424
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
13344
13425
|
return /* @__PURE__ */ jsx34(IsInsideSeriesContext.Provider, {
|
|
13345
13426
|
value: true,
|
|
@@ -13365,8 +13446,8 @@ var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
|
13365
13446
|
});
|
|
13366
13447
|
};
|
|
13367
13448
|
var SeriesSequence = forwardRef11(SeriesSequenceRefForwardingFunction);
|
|
13368
|
-
var
|
|
13369
|
-
const childrenValue =
|
|
13449
|
+
var SeriesInner = (props2) => {
|
|
13450
|
+
const childrenValue = useMemo36(() => {
|
|
13370
13451
|
let startFrame = 0;
|
|
13371
13452
|
const flattenedChildren = flattenChildren(props2.children);
|
|
13372
13453
|
return Children.map(flattenedChildren, (child, i) => {
|
|
@@ -13429,7 +13510,9 @@ var Series = (props2) => {
|
|
|
13429
13510
|
})
|
|
13430
13511
|
});
|
|
13431
13512
|
};
|
|
13432
|
-
Series
|
|
13513
|
+
var Series = Object.assign(wrapInSchema(SeriesInner, sequenceSchemaDefaultLayoutNone), {
|
|
13514
|
+
Sequence: SeriesSequence
|
|
13515
|
+
});
|
|
13433
13516
|
addSequenceStackTraces(Series);
|
|
13434
13517
|
addSequenceStackTraces(SeriesSequence);
|
|
13435
13518
|
var validateSpringDuration = (dur) => {
|
|
@@ -13897,14 +13980,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13897
13980
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
13898
13981
|
const videoConfig = useUnsafeVideoConfig();
|
|
13899
13982
|
const videoRef = useRef23(null);
|
|
13900
|
-
const sequenceContext =
|
|
13983
|
+
const sequenceContext = useContext36(SequenceContext);
|
|
13901
13984
|
const mediaStartsAt = useMediaStartsAt();
|
|
13902
13985
|
const environment = useRemotionEnvironment();
|
|
13903
13986
|
const logLevel = useLogLevel();
|
|
13904
13987
|
const mountTime = useMountTime();
|
|
13905
13988
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
13906
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
13907
|
-
const id =
|
|
13989
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext36(RenderAssetManager);
|
|
13990
|
+
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
13908
13991
|
props2.src,
|
|
13909
13992
|
sequenceContext?.cumulatedFrom,
|
|
13910
13993
|
sequenceContext?.relativeFrom,
|
|
@@ -13919,7 +14002,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13919
14002
|
mediaVolume: 1
|
|
13920
14003
|
});
|
|
13921
14004
|
warnAboutTooHighVolume(volume);
|
|
13922
|
-
|
|
14005
|
+
useEffect20(() => {
|
|
13923
14006
|
if (!props2.src) {
|
|
13924
14007
|
throw new Error("No src passed");
|
|
13925
14008
|
}
|
|
@@ -13962,7 +14045,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13962
14045
|
useImperativeHandle9(ref, () => {
|
|
13963
14046
|
return videoRef.current;
|
|
13964
14047
|
}, []);
|
|
13965
|
-
|
|
14048
|
+
useEffect20(() => {
|
|
13966
14049
|
if (!window.remotion_videoEnabled) {
|
|
13967
14050
|
return;
|
|
13968
14051
|
}
|
|
@@ -14113,7 +14196,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14113
14196
|
if (environment.isClientSideRendering) {
|
|
14114
14197
|
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");
|
|
14115
14198
|
}
|
|
14116
|
-
const { durations, setDurations } =
|
|
14199
|
+
const { durations, setDurations } = useContext37(DurationsContext);
|
|
14117
14200
|
if (typeof ref === "string") {
|
|
14118
14201
|
throw new Error("string refs are not supported");
|
|
14119
14202
|
}
|
|
@@ -14252,10 +14335,10 @@ import { jsx as jsx152 } from "react/jsx-runtime";
|
|
|
14252
14335
|
import * as React122 from "react";
|
|
14253
14336
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
14254
14337
|
import * as React16 from "react";
|
|
14255
|
-
import * as
|
|
14338
|
+
import * as React132 from "react";
|
|
14256
14339
|
import * as ReactDOM from "react-dom";
|
|
14257
14340
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
14258
|
-
import * as
|
|
14341
|
+
import * as React14 from "react";
|
|
14259
14342
|
import * as React152 from "react";
|
|
14260
14343
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
14261
14344
|
import * as React172 from "react";
|
|
@@ -14482,8 +14565,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
14482
14565
|
progress: 0,
|
|
14483
14566
|
isActive: false
|
|
14484
14567
|
});
|
|
14485
|
-
const eventTarget =
|
|
14486
|
-
|
|
14568
|
+
const eventTarget = useMemo38(() => new EventTarget, []);
|
|
14569
|
+
useEffect21(() => {
|
|
14487
14570
|
if (disabled) {
|
|
14488
14571
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
14489
14572
|
} else {
|
|
@@ -14630,7 +14713,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
14630
14713
|
var lastCoordinates = null;
|
|
14631
14714
|
var useMousePosition = (ref) => {
|
|
14632
14715
|
const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
|
|
14633
|
-
|
|
14716
|
+
useEffect21(() => {
|
|
14634
14717
|
const element = ref.current;
|
|
14635
14718
|
if (!element) {
|
|
14636
14719
|
return;
|
|
@@ -15294,7 +15377,7 @@ var NODES = [
|
|
|
15294
15377
|
"ul"
|
|
15295
15378
|
];
|
|
15296
15379
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
15297
|
-
const Node2 =
|
|
15380
|
+
const Node2 = React132.forwardRef((props, forwardedRef) => {
|
|
15298
15381
|
const { asChild, ...primitiveProps } = props;
|
|
15299
15382
|
const Comp = asChild ? Slot2 : node;
|
|
15300
15383
|
if (typeof window !== "undefined") {
|
|
@@ -15310,11 +15393,11 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
15310
15393
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
15311
15394
|
}
|
|
15312
15395
|
function useCallbackRef(callback) {
|
|
15313
|
-
const callbackRef =
|
|
15314
|
-
|
|
15396
|
+
const callbackRef = React14.useRef(callback);
|
|
15397
|
+
React14.useEffect(() => {
|
|
15315
15398
|
callbackRef.current = callback;
|
|
15316
15399
|
});
|
|
15317
|
-
return
|
|
15400
|
+
return React14.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
15318
15401
|
}
|
|
15319
15402
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
15320
15403
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|