@remotion/promo-pages 4.0.457 → 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 +792 -583
- package/dist/design.js +433 -367
- package/dist/experts/experts-data.js +124 -2
- package/dist/experts.js +570 -361
- package/dist/homepage/Pricing.js +436 -370
- package/dist/prompts/PromptsGallery.js +437 -371
- package/dist/prompts/PromptsShow.js +435 -369
- package/dist/prompts/PromptsSubmit.js +435 -369
- package/dist/team.js +433 -367
- package/dist/template-modal-content.js +443 -377
- package/dist/templates.js +433 -367
- package/package.json +13 -13
- package/public/img/freelancers/huang-chi-chang.jpg +0 -0
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.css +0 -32
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.js +0 -42672
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/design.js +0 -20460
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/experts/experts-data.js +0 -740
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/experts.js +0 -8778
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/homepage/Pricing.js +0 -21875
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsGallery.js +0 -20301
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsShow.css +0 -2578
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsShow.js +0 -40128
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsSubmit.css +0 -2578
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsSubmit.js +0 -40219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/prompt-types.js +0 -0
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/team.js +0 -292
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.css +0 -32
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js +0 -22044
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.js +0 -21306
- 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 -134
- 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/InfoTooltip.d.ts +0 -6
- package/dist/components/homepage/InfoTooltip.js +0 -6
- 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,16 +5772,17 @@ 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 {
|
|
@@ -5790,12 +5791,10 @@ import {
|
|
|
5790
5791
|
useCallback as useCallback7,
|
|
5791
5792
|
useContext as useContext17,
|
|
5792
5793
|
useLayoutEffect as useLayoutEffect3,
|
|
5793
|
-
useMemo as
|
|
5794
|
+
useMemo as useMemo17,
|
|
5794
5795
|
useRef as useRef9,
|
|
5795
5796
|
useState as useState8
|
|
5796
5797
|
} from "react";
|
|
5797
|
-
import React15, { forwardRef as forwardRef4, useMemo as useMemo17 } from "react";
|
|
5798
|
-
import { useContext as useContext16, useMemo as useMemo16, useState as useState7 } from "react";
|
|
5799
5798
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
5800
5799
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
|
|
5801
5800
|
import {
|
|
@@ -5803,25 +5802,25 @@ import {
|
|
|
5803
5802
|
useCallback as useCallback8,
|
|
5804
5803
|
useImperativeHandle as useImperativeHandle3,
|
|
5805
5804
|
useLayoutEffect as useLayoutEffect4,
|
|
5806
|
-
useMemo as
|
|
5805
|
+
useMemo as useMemo18,
|
|
5807
5806
|
useRef as useRef10,
|
|
5808
5807
|
useState as useState9
|
|
5809
5808
|
} from "react";
|
|
5810
5809
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
5811
5810
|
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
|
|
5812
|
-
import React17, { createContext as createContext17, useMemo as
|
|
5811
|
+
import React17, { createContext as createContext17, useMemo as useMemo19 } from "react";
|
|
5813
5812
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
5814
5813
|
import { useContext as useContext19 } from "react";
|
|
5815
5814
|
import { createContext as createContext18, useEffect as useEffect7, useState as useState11 } from "react";
|
|
5816
5815
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
5817
|
-
import { createContext as createContext19, useMemo as
|
|
5816
|
+
import { createContext as createContext19, useMemo as useMemo20, useReducer } from "react";
|
|
5818
5817
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
5819
5818
|
import React23, {
|
|
5820
5819
|
forwardRef as forwardRef6,
|
|
5821
5820
|
useContext as useContext28,
|
|
5822
|
-
useEffect as
|
|
5821
|
+
useEffect as useEffect15,
|
|
5823
5822
|
useImperativeHandle as useImperativeHandle4,
|
|
5824
|
-
useMemo as
|
|
5823
|
+
useMemo as useMemo28,
|
|
5825
5824
|
useRef as useRef18,
|
|
5826
5825
|
useState as useState16
|
|
5827
5826
|
} from "react";
|
|
@@ -5831,47 +5830,47 @@ import React20, {
|
|
|
5831
5830
|
createRef as createRef2,
|
|
5832
5831
|
useCallback as useCallback9,
|
|
5833
5832
|
useContext as useContext20,
|
|
5834
|
-
useMemo as
|
|
5833
|
+
useMemo as useMemo22,
|
|
5835
5834
|
useRef as useRef11,
|
|
5836
5835
|
useState as useState12
|
|
5837
5836
|
} from "react";
|
|
5838
|
-
import { useMemo as
|
|
5837
|
+
import { useEffect as useEffect8, useMemo as useMemo21 } from "react";
|
|
5839
5838
|
import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5840
5839
|
import { useRef as useRef12 } from "react";
|
|
5841
|
-
import { useContext as useContext23, useEffect as
|
|
5840
|
+
import { useContext as useContext23, useEffect as useEffect9, useMemo as useMemo23, useState as useState13 } from "react";
|
|
5842
5841
|
import { useContext as useContext22 } from "react";
|
|
5843
5842
|
import {
|
|
5844
5843
|
useCallback as useCallback12,
|
|
5845
5844
|
useContext as useContext26,
|
|
5846
|
-
useEffect as
|
|
5845
|
+
useEffect as useEffect13,
|
|
5847
5846
|
useLayoutEffect as useLayoutEffect8,
|
|
5848
5847
|
useRef as useRef17
|
|
5849
5848
|
} from "react";
|
|
5850
|
-
import { useCallback as useCallback11, useMemo as
|
|
5851
|
-
import { useContext as useContext25, useMemo as
|
|
5849
|
+
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef15 } from "react";
|
|
5850
|
+
import { useContext as useContext25, useMemo as useMemo25 } from "react";
|
|
5852
5851
|
import React21, {
|
|
5853
5852
|
useCallback as useCallback10,
|
|
5854
5853
|
useContext as useContext24,
|
|
5855
|
-
useEffect as
|
|
5854
|
+
useEffect as useEffect10,
|
|
5856
5855
|
useLayoutEffect as useLayoutEffect7,
|
|
5857
|
-
useMemo as
|
|
5856
|
+
useMemo as useMemo24,
|
|
5858
5857
|
useRef as useRef14,
|
|
5859
5858
|
useState as useState14
|
|
5860
5859
|
} from "react";
|
|
5861
5860
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
5862
5861
|
import React22 from "react";
|
|
5863
|
-
import { useEffect as
|
|
5864
|
-
import { useEffect as
|
|
5865
|
-
import { useEffect as
|
|
5866
|
-
import { createContext as createContext21, useContext as useContext27, useMemo 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";
|
|
5867
5866
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
5868
5867
|
import {
|
|
5869
5868
|
forwardRef as forwardRef7,
|
|
5870
5869
|
useContext as useContext29,
|
|
5871
|
-
useEffect as
|
|
5870
|
+
useEffect as useEffect16,
|
|
5872
5871
|
useImperativeHandle as useImperativeHandle5,
|
|
5873
5872
|
useLayoutEffect as useLayoutEffect9,
|
|
5874
|
-
useMemo as
|
|
5873
|
+
useMemo as useMemo29,
|
|
5875
5874
|
useRef as useRef19
|
|
5876
5875
|
} from "react";
|
|
5877
5876
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
@@ -5892,14 +5891,14 @@ import React28 from "react";
|
|
|
5892
5891
|
import {
|
|
5893
5892
|
useCallback as useCallback16,
|
|
5894
5893
|
useImperativeHandle as useImperativeHandle7,
|
|
5895
|
-
useMemo as
|
|
5894
|
+
useMemo as useMemo30,
|
|
5896
5895
|
useRef as useRef21,
|
|
5897
5896
|
useState as useState19
|
|
5898
5897
|
} from "react";
|
|
5899
5898
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5900
5899
|
import React29 from "react";
|
|
5901
|
-
import { useMemo as
|
|
5902
|
-
import { createContext as createContext22, useContext as useContext32, useMemo as
|
|
5900
|
+
import { useMemo as useMemo322 } from "react";
|
|
5901
|
+
import { createContext as createContext22, useContext as useContext32, useMemo as useMemo31 } from "react";
|
|
5903
5902
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
5904
5903
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5905
5904
|
import React31 from "react";
|
|
@@ -5909,27 +5908,27 @@ import { useCallback as useCallback18 } from "react";
|
|
|
5909
5908
|
import {
|
|
5910
5909
|
useCallback as useCallback17,
|
|
5911
5910
|
useContext as useContext34,
|
|
5912
|
-
useEffect as
|
|
5911
|
+
useEffect as useEffect17,
|
|
5913
5912
|
useLayoutEffect as useLayoutEffect11,
|
|
5914
|
-
useMemo as
|
|
5913
|
+
useMemo as useMemo33,
|
|
5915
5914
|
useState as useState20
|
|
5916
5915
|
} from "react";
|
|
5917
5916
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
5918
5917
|
import React34, {
|
|
5919
5918
|
forwardRef as forwardRef10,
|
|
5920
5919
|
useContext as useContext35,
|
|
5921
|
-
useEffect as
|
|
5920
|
+
useEffect as useEffect19,
|
|
5922
5921
|
useImperativeHandle as useImperativeHandle8,
|
|
5923
|
-
useMemo as
|
|
5922
|
+
useMemo as useMemo34,
|
|
5924
5923
|
useRef as useRef22,
|
|
5925
5924
|
useState as useState21
|
|
5926
5925
|
} from "react";
|
|
5927
|
-
import { useEffect as
|
|
5926
|
+
import { useEffect as useEffect18 } from "react";
|
|
5928
5927
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5929
5928
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
5930
|
-
import React36, { useMemo as
|
|
5929
|
+
import React36, { useMemo as useMemo35 } from "react";
|
|
5931
5930
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5932
|
-
import { Children, forwardRef as forwardRef11, useMemo as
|
|
5931
|
+
import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
|
|
5933
5932
|
import React37 from "react";
|
|
5934
5933
|
import React38, { createContext as createContext24 } from "react";
|
|
5935
5934
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
@@ -5939,10 +5938,10 @@ import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as
|
|
|
5939
5938
|
import {
|
|
5940
5939
|
forwardRef as forwardRef12,
|
|
5941
5940
|
useContext as useContext36,
|
|
5942
|
-
useEffect as
|
|
5941
|
+
useEffect as useEffect20,
|
|
5943
5942
|
useImperativeHandle as useImperativeHandle9,
|
|
5944
5943
|
useLayoutEffect as useLayoutEffect12,
|
|
5945
|
-
useMemo as
|
|
5944
|
+
useMemo as useMemo37,
|
|
5946
5945
|
useRef as useRef23
|
|
5947
5946
|
} from "react";
|
|
5948
5947
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
@@ -7021,6 +7020,7 @@ __export2(exports_timeline_position_state, {
|
|
|
7021
7020
|
useTimelinePosition: () => useTimelinePosition,
|
|
7022
7021
|
useTimelineContext: () => useTimelineContext,
|
|
7023
7022
|
usePlayingState: () => usePlayingState,
|
|
7023
|
+
usePlaybackRate: () => usePlaybackRate,
|
|
7024
7024
|
useAbsoluteTimelinePosition: () => useAbsoluteTimelinePosition,
|
|
7025
7025
|
persistCurrentFrame: () => persistCurrentFrame,
|
|
7026
7026
|
getInitialFrameState: () => getInitialFrameState,
|
|
@@ -7067,6 +7067,7 @@ var SetTimelineContext = createContext13({
|
|
|
7067
7067
|
}
|
|
7068
7068
|
});
|
|
7069
7069
|
var TimelineContext = createContext13(null);
|
|
7070
|
+
var PlaybackRateContext = createContext13(null);
|
|
7070
7071
|
var AbsoluteTimeContext = createContext13(null);
|
|
7071
7072
|
var TimelineContextProvider = ({ children, frameState }) => {
|
|
7072
7073
|
const [playing, setPlaying] = useState2(false);
|
|
@@ -7109,11 +7110,15 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
7109
7110
|
playing,
|
|
7110
7111
|
imperativePlaying,
|
|
7111
7112
|
rootId: remotionRootId,
|
|
7112
|
-
playbackRate,
|
|
7113
|
-
setPlaybackRate,
|
|
7114
7113
|
audioAndVideoTags
|
|
7115
7114
|
};
|
|
7116
|
-
}, [frame,
|
|
7115
|
+
}, [frame, playing, remotionRootId]);
|
|
7116
|
+
const playbackRateContextValue = useMemo8(() => {
|
|
7117
|
+
return {
|
|
7118
|
+
playbackRate,
|
|
7119
|
+
setPlaybackRate
|
|
7120
|
+
};
|
|
7121
|
+
}, [playbackRate]);
|
|
7117
7122
|
const setTimelineContextValue = useMemo8(() => {
|
|
7118
7123
|
return {
|
|
7119
7124
|
setFrame,
|
|
@@ -7122,11 +7127,14 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
7122
7127
|
}, []);
|
|
7123
7128
|
return /* @__PURE__ */ jsx82(AbsoluteTimeContext.Provider, {
|
|
7124
7129
|
value: timelineContextValue,
|
|
7125
|
-
children: /* @__PURE__ */ jsx82(
|
|
7126
|
-
value:
|
|
7127
|
-
children: /* @__PURE__ */ jsx82(
|
|
7128
|
-
value:
|
|
7129
|
-
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
|
+
})
|
|
7130
7138
|
})
|
|
7131
7139
|
})
|
|
7132
7140
|
});
|
|
@@ -7169,6 +7177,13 @@ var useTimelineContext = () => {
|
|
|
7169
7177
|
}
|
|
7170
7178
|
return state;
|
|
7171
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
|
+
};
|
|
7172
7187
|
var useTimelinePosition = () => {
|
|
7173
7188
|
const state = useTimelineContext();
|
|
7174
7189
|
return useTimelinePositionFromContext(state);
|
|
@@ -7460,7 +7475,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
7460
7475
|
var addSequenceStackTraces = (component) => {
|
|
7461
7476
|
componentsToAddStacksTo.push(component);
|
|
7462
7477
|
};
|
|
7463
|
-
var VERSION = "4.0.
|
|
7478
|
+
var VERSION = "4.0.458";
|
|
7464
7479
|
var checkMultipleRemotionVersions = () => {
|
|
7465
7480
|
if (typeof globalThis === "undefined") {
|
|
7466
7481
|
return;
|
|
@@ -7631,6 +7646,54 @@ var Freeze = ({
|
|
|
7631
7646
|
var PremountContext = createContext14({
|
|
7632
7647
|
premountFramesRemaining: 0
|
|
7633
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
|
+
};
|
|
7634
7697
|
var SequenceManager = React12.createContext({
|
|
7635
7698
|
registerSequence: () => {
|
|
7636
7699
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -7752,6 +7815,204 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
7752
7815
|
});
|
|
7753
7816
|
};
|
|
7754
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
|
+
};
|
|
7755
8016
|
var RegularSequenceRefForwardingFunction = ({
|
|
7756
8017
|
from = 0,
|
|
7757
8018
|
durationInFrames = Infinity,
|
|
@@ -7770,8 +8031,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7770
8031
|
...other
|
|
7771
8032
|
}, ref) => {
|
|
7772
8033
|
const { layout = "absolute-fill" } = other;
|
|
7773
|
-
const [id] =
|
|
7774
|
-
const parentSequence =
|
|
8034
|
+
const [id] = useState6(() => String(Math.random()));
|
|
8035
|
+
const parentSequence = useContext16(SequenceContext);
|
|
7775
8036
|
const { rootId } = useTimelineContext();
|
|
7776
8037
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
7777
8038
|
const nonce = useNonce();
|
|
@@ -7779,7 +8040,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7779
8040
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
7780
8041
|
}
|
|
7781
8042
|
if (layout === "none" && typeof other.style !== "undefined") {
|
|
7782
|
-
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));
|
|
7783
8044
|
}
|
|
7784
8045
|
if (typeof durationInFrames !== "number") {
|
|
7785
8046
|
throw new TypeError(`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`);
|
|
@@ -7797,15 +8058,15 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7797
8058
|
const videoConfig = useVideoConfig();
|
|
7798
8059
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
7799
8060
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
7800
|
-
const { registerSequence, unregisterSequence } =
|
|
7801
|
-
const { hidden } =
|
|
7802
|
-
const premounting =
|
|
8061
|
+
const { registerSequence, unregisterSequence } = useContext16(SequenceManager);
|
|
8062
|
+
const { hidden } = useContext16(SequenceVisibilityToggleContext);
|
|
8063
|
+
const premounting = useMemo16(() => {
|
|
7803
8064
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
7804
8065
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
7805
|
-
const postmounting =
|
|
8066
|
+
const postmounting = useMemo16(() => {
|
|
7806
8067
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
7807
8068
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
7808
|
-
const contextValue =
|
|
8069
|
+
const contextValue = useMemo16(() => {
|
|
7809
8070
|
return {
|
|
7810
8071
|
cumulatedFrom,
|
|
7811
8072
|
relativeFrom: from,
|
|
@@ -7832,7 +8093,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7832
8093
|
premountDisplay,
|
|
7833
8094
|
postmountDisplay
|
|
7834
8095
|
]);
|
|
7835
|
-
const timelineClipName =
|
|
8096
|
+
const timelineClipName = useMemo16(() => {
|
|
7836
8097
|
return name ?? "";
|
|
7837
8098
|
}, [name]);
|
|
7838
8099
|
const env = useRemotionEnvironment();
|
|
@@ -7915,7 +8176,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7915
8176
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
7916
8177
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
7917
8178
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
7918
|
-
const defaultStyle =
|
|
8179
|
+
const defaultStyle = useMemo16(() => {
|
|
7919
8180
|
return {
|
|
7920
8181
|
flexDirection: undefined,
|
|
7921
8182
|
...width ? { width } : {},
|
|
@@ -7940,9 +8201,9 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7940
8201
|
})
|
|
7941
8202
|
});
|
|
7942
8203
|
};
|
|
7943
|
-
var RegularSequence =
|
|
8204
|
+
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
7944
8205
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
7945
|
-
const parentPremountContext =
|
|
8206
|
+
const parentPremountContext = useContext16(PremountContext);
|
|
7946
8207
|
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
7947
8208
|
if (props.layout === "none") {
|
|
7948
8209
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
@@ -7962,7 +8223,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
7962
8223
|
const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
|
|
7963
8224
|
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
7964
8225
|
const isFreezingActive = premountingActive || postmountingActive;
|
|
7965
|
-
const style =
|
|
8226
|
+
const style = useMemo16(() => {
|
|
7966
8227
|
return {
|
|
7967
8228
|
...passedStyle,
|
|
7968
8229
|
opacity: premountingActive || postmountingActive ? 0 : 1,
|
|
@@ -7980,7 +8241,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
7980
8241
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
7981
8242
|
frame: freezeFrame,
|
|
7982
8243
|
active: isFreezingActive,
|
|
7983
|
-
children: /* @__PURE__ */ jsx12(
|
|
8244
|
+
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
7984
8245
|
ref,
|
|
7985
8246
|
from,
|
|
7986
8247
|
durationInFrames,
|
|
@@ -7993,7 +8254,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
7993
8254
|
})
|
|
7994
8255
|
});
|
|
7995
8256
|
};
|
|
7996
|
-
var PremountedPostmountedSequence =
|
|
8257
|
+
var PremountedPostmountedSequence = forwardRef3(PremountedPostmountedSequenceRefForwardingFunction);
|
|
7997
8258
|
var SequenceRefForwardingFunction = (props, ref) => {
|
|
7998
8259
|
const env = useRemotionEnvironment();
|
|
7999
8260
|
const { fps } = useVideoConfig();
|
|
@@ -8012,7 +8273,8 @@ var SequenceRefForwardingFunction = (props, ref) => {
|
|
|
8012
8273
|
ref
|
|
8013
8274
|
});
|
|
8014
8275
|
};
|
|
8015
|
-
var
|
|
8276
|
+
var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
8277
|
+
var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
|
|
8016
8278
|
var calcArgs = (fit, frameSize, canvasSize) => {
|
|
8017
8279
|
switch (fit) {
|
|
8018
8280
|
case "fill": {
|
|
@@ -8108,7 +8370,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref
|
|
|
8108
8370
|
style
|
|
8109
8371
|
});
|
|
8110
8372
|
};
|
|
8111
|
-
var Canvas =
|
|
8373
|
+
var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
|
|
8112
8374
|
var CACHE_SIZE = 5;
|
|
8113
8375
|
var getActualTime = ({
|
|
8114
8376
|
loopBehavior,
|
|
@@ -8255,7 +8517,7 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
8255
8517
|
}
|
|
8256
8518
|
return new URL(src, window.origin).href;
|
|
8257
8519
|
};
|
|
8258
|
-
var AnimatedImage =
|
|
8520
|
+
var AnimatedImage = forwardRef4(({
|
|
8259
8521
|
src,
|
|
8260
8522
|
width,
|
|
8261
8523
|
height,
|
|
@@ -8274,9 +8536,9 @@ var AnimatedImage = forwardRef3(({
|
|
|
8274
8536
|
};
|
|
8275
8537
|
}, []);
|
|
8276
8538
|
const resolvedSrc = resolveAnimatedImageSource(src);
|
|
8277
|
-
const [imageDecoder, setImageDecoder] =
|
|
8539
|
+
const [imageDecoder, setImageDecoder] = useState7(null);
|
|
8278
8540
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
8279
|
-
const [decodeHandle] =
|
|
8541
|
+
const [decodeHandle] = useState7(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
8280
8542
|
const frame = useCurrentFrame();
|
|
8281
8543
|
const { fps } = useVideoConfig();
|
|
8282
8544
|
const currentTime = frame / playbackRate / fps;
|
|
@@ -8290,7 +8552,7 @@ var AnimatedImage = forwardRef3(({
|
|
|
8290
8552
|
}
|
|
8291
8553
|
return c;
|
|
8292
8554
|
}, []);
|
|
8293
|
-
const [initialLoopBehavior] =
|
|
8555
|
+
const [initialLoopBehavior] = useState7(() => loopBehavior);
|
|
8294
8556
|
useEffect6(() => {
|
|
8295
8557
|
const controller = new AbortController;
|
|
8296
8558
|
decodeImage({
|
|
@@ -8362,158 +8624,6 @@ var AnimatedImage = forwardRef3(({
|
|
|
8362
8624
|
...props
|
|
8363
8625
|
});
|
|
8364
8626
|
});
|
|
8365
|
-
var getEffectiveVisualModeValue = ({
|
|
8366
|
-
codeValue,
|
|
8367
|
-
runtimeValue,
|
|
8368
|
-
dragOverrideValue,
|
|
8369
|
-
defaultValue,
|
|
8370
|
-
shouldResortToDefaultValueIfUndefined = false
|
|
8371
|
-
}) => {
|
|
8372
|
-
if (dragOverrideValue !== undefined) {
|
|
8373
|
-
return dragOverrideValue;
|
|
8374
|
-
}
|
|
8375
|
-
if (!codeValue) {
|
|
8376
|
-
return runtimeValue;
|
|
8377
|
-
}
|
|
8378
|
-
if (!codeValue.canUpdate) {
|
|
8379
|
-
return runtimeValue;
|
|
8380
|
-
}
|
|
8381
|
-
if (codeValue.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
|
|
8382
|
-
return defaultValue;
|
|
8383
|
-
}
|
|
8384
|
-
return codeValue.codeValue;
|
|
8385
|
-
};
|
|
8386
|
-
var useSchema = (schema, currentValue) => {
|
|
8387
|
-
const env = useRemotionEnvironment();
|
|
8388
|
-
const earlyReturn = useMemo16(() => {
|
|
8389
|
-
if (!env.isStudio || env.isReadOnlyStudio) {
|
|
8390
|
-
return {
|
|
8391
|
-
controls: undefined,
|
|
8392
|
-
values: currentValue ?? {}
|
|
8393
|
-
};
|
|
8394
|
-
}
|
|
8395
|
-
return;
|
|
8396
|
-
}, [env.isStudio, env.isReadOnlyStudio, currentValue]);
|
|
8397
|
-
if (earlyReturn) {
|
|
8398
|
-
return earlyReturn;
|
|
8399
|
-
}
|
|
8400
|
-
const [overrideId] = useState7(() => String(Math.random()));
|
|
8401
|
-
const {
|
|
8402
|
-
visualModeEnabled,
|
|
8403
|
-
dragOverrides: overrides,
|
|
8404
|
-
codeValues
|
|
8405
|
-
} = useContext16(VisualModeOverridesContext);
|
|
8406
|
-
const controls = useMemo16(() => {
|
|
8407
|
-
if (!visualModeEnabled) {
|
|
8408
|
-
return;
|
|
8409
|
-
}
|
|
8410
|
-
if (schema === null || currentValue === null) {
|
|
8411
|
-
return;
|
|
8412
|
-
}
|
|
8413
|
-
return {
|
|
8414
|
-
schema,
|
|
8415
|
-
currentValue,
|
|
8416
|
-
overrideId
|
|
8417
|
-
};
|
|
8418
|
-
}, [schema, currentValue, overrideId, visualModeEnabled]);
|
|
8419
|
-
return useMemo16(() => {
|
|
8420
|
-
if (controls === undefined || currentValue === null || schema === null || !visualModeEnabled) {
|
|
8421
|
-
return {
|
|
8422
|
-
controls: undefined,
|
|
8423
|
-
values: currentValue ?? {}
|
|
8424
|
-
};
|
|
8425
|
-
}
|
|
8426
|
-
const overrideValues = overrides[overrideId] ?? {};
|
|
8427
|
-
const propStatus = codeValues[overrideId];
|
|
8428
|
-
const currentValueKeys = Object.keys(currentValue);
|
|
8429
|
-
const keysToUpdate = [...new Set(currentValueKeys)];
|
|
8430
|
-
const merged = {};
|
|
8431
|
-
for (const key of keysToUpdate) {
|
|
8432
|
-
const codeValueStatus = propStatus?.[key] ?? null;
|
|
8433
|
-
merged[key] = getEffectiveVisualModeValue({
|
|
8434
|
-
codeValue: codeValueStatus,
|
|
8435
|
-
runtimeValue: currentValue[key],
|
|
8436
|
-
dragOverrideValue: overrideValues[key],
|
|
8437
|
-
defaultValue: schema[key]?.default,
|
|
8438
|
-
shouldResortToDefaultValueIfUndefined: false
|
|
8439
|
-
});
|
|
8440
|
-
}
|
|
8441
|
-
return {
|
|
8442
|
-
controls,
|
|
8443
|
-
values: merged
|
|
8444
|
-
};
|
|
8445
|
-
}, [
|
|
8446
|
-
controls,
|
|
8447
|
-
currentValue,
|
|
8448
|
-
overrideId,
|
|
8449
|
-
overrides,
|
|
8450
|
-
codeValues,
|
|
8451
|
-
schema,
|
|
8452
|
-
visualModeEnabled
|
|
8453
|
-
]);
|
|
8454
|
-
};
|
|
8455
|
-
var getNestedValue = (obj, key) => {
|
|
8456
|
-
const parts = key.split(".");
|
|
8457
|
-
let current = obj;
|
|
8458
|
-
for (const part of parts) {
|
|
8459
|
-
if (current === null || current === undefined || typeof current !== "object")
|
|
8460
|
-
return;
|
|
8461
|
-
current = current[part];
|
|
8462
|
-
}
|
|
8463
|
-
return current;
|
|
8464
|
-
};
|
|
8465
|
-
var mergeValues = (props, values, schemaKeys) => {
|
|
8466
|
-
const merged = { ...props };
|
|
8467
|
-
for (const key of schemaKeys) {
|
|
8468
|
-
const value = values[key];
|
|
8469
|
-
const parts = key.split(".");
|
|
8470
|
-
if (parts.length === 1) {
|
|
8471
|
-
merged[key] = value;
|
|
8472
|
-
continue;
|
|
8473
|
-
}
|
|
8474
|
-
let current = merged;
|
|
8475
|
-
for (let i = 0;i < parts.length - 1; i++) {
|
|
8476
|
-
const part = parts[i];
|
|
8477
|
-
if (typeof current[part] === "object" && current[part] !== null) {
|
|
8478
|
-
current[part] = { ...current[part] };
|
|
8479
|
-
} else {
|
|
8480
|
-
current[part] = {};
|
|
8481
|
-
}
|
|
8482
|
-
current = current[part];
|
|
8483
|
-
}
|
|
8484
|
-
current[parts[parts.length - 1]] = value;
|
|
8485
|
-
}
|
|
8486
|
-
return merged;
|
|
8487
|
-
};
|
|
8488
|
-
var wrapInSchema = (Component, schema) => {
|
|
8489
|
-
const schemaKeys = Object.keys(schema);
|
|
8490
|
-
const Wrapped = forwardRef4((props, ref) => {
|
|
8491
|
-
const env = useRemotionEnvironment();
|
|
8492
|
-
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
|
|
8493
|
-
return React15.createElement(Component, {
|
|
8494
|
-
...props,
|
|
8495
|
-
_experimentalControls: null,
|
|
8496
|
-
ref
|
|
8497
|
-
});
|
|
8498
|
-
}
|
|
8499
|
-
const schemaInput = useMemo17(() => {
|
|
8500
|
-
const input = {};
|
|
8501
|
-
for (const key of schemaKeys) {
|
|
8502
|
-
input[key] = getNestedValue(props, key);
|
|
8503
|
-
}
|
|
8504
|
-
return input;
|
|
8505
|
-
}, schemaKeys.map((key) => getNestedValue(props, key)));
|
|
8506
|
-
const { controls, values } = useSchema(schema, schemaInput);
|
|
8507
|
-
const mergedProps = mergeValues(props, values, schemaKeys);
|
|
8508
|
-
return React15.createElement(Component, {
|
|
8509
|
-
...mergedProps,
|
|
8510
|
-
_experimentalControls: controls,
|
|
8511
|
-
ref
|
|
8512
|
-
});
|
|
8513
|
-
});
|
|
8514
|
-
Wrapped.displayName = `wrapInSchema(${Component.displayName || Component.name || "Component"})`;
|
|
8515
|
-
return Wrapped;
|
|
8516
|
-
};
|
|
8517
8627
|
var cachedSupport = null;
|
|
8518
8628
|
var isHtmlInCanvasSupported = () => {
|
|
8519
8629
|
if (cachedSupport !== null) {
|
|
@@ -8552,40 +8662,10 @@ var defaultOnPaint = ({
|
|
|
8552
8662
|
element.style.transform = transform.toString();
|
|
8553
8663
|
};
|
|
8554
8664
|
var HtmlInCanvasAncestorContext = createContext15(false);
|
|
8555
|
-
var htmlInCanvasSchema = {
|
|
8556
|
-
"style.translate": {
|
|
8557
|
-
type: "translate",
|
|
8558
|
-
step: 1,
|
|
8559
|
-
default: "0px 0px",
|
|
8560
|
-
description: "Position"
|
|
8561
|
-
},
|
|
8562
|
-
"style.scale": {
|
|
8563
|
-
type: "number",
|
|
8564
|
-
min: 0.05,
|
|
8565
|
-
max: 100,
|
|
8566
|
-
step: 0.01,
|
|
8567
|
-
default: 1,
|
|
8568
|
-
description: "Scale"
|
|
8569
|
-
},
|
|
8570
|
-
"style.rotate": {
|
|
8571
|
-
type: "rotation",
|
|
8572
|
-
step: 1,
|
|
8573
|
-
default: "0deg",
|
|
8574
|
-
description: "Rotation"
|
|
8575
|
-
},
|
|
8576
|
-
"style.opacity": {
|
|
8577
|
-
type: "number",
|
|
8578
|
-
min: 0,
|
|
8579
|
-
max: 1,
|
|
8580
|
-
step: 0.01,
|
|
8581
|
-
default: 1,
|
|
8582
|
-
description: "Opacity"
|
|
8583
|
-
}
|
|
8584
|
-
};
|
|
8585
8665
|
var HtmlInCanvasInner = forwardRef5(({
|
|
8586
8666
|
width,
|
|
8587
8667
|
height,
|
|
8588
|
-
_experimentalEffects:
|
|
8668
|
+
_experimentalEffects: effects = [],
|
|
8589
8669
|
children,
|
|
8590
8670
|
onPaint,
|
|
8591
8671
|
onInit,
|
|
@@ -8615,8 +8695,8 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
8615
8695
|
}, [ref]);
|
|
8616
8696
|
const [offscreenCanvas] = useState8(() => new OffscreenCanvas(1, 1));
|
|
8617
8697
|
const chainState = useEffectChainState();
|
|
8618
|
-
const effectsRef = useRef9(
|
|
8619
|
-
effectsRef.current =
|
|
8698
|
+
const effectsRef = useRef9(effects);
|
|
8699
|
+
effectsRef.current = effects;
|
|
8620
8700
|
const frameRef = useRef9(frame);
|
|
8621
8701
|
frameRef.current = frame;
|
|
8622
8702
|
const onPaintRef = useRef9(onPaint);
|
|
@@ -8730,13 +8810,12 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
8730
8810
|
continueRender2(handle);
|
|
8731
8811
|
};
|
|
8732
8812
|
}, [width, height, continueRender2]);
|
|
8733
|
-
const innerStyle =
|
|
8813
|
+
const innerStyle = useMemo17(() => {
|
|
8734
8814
|
return {
|
|
8735
8815
|
width,
|
|
8736
|
-
height
|
|
8737
|
-
...style
|
|
8816
|
+
height
|
|
8738
8817
|
};
|
|
8739
|
-
}, [width, height
|
|
8818
|
+
}, [width, height]);
|
|
8740
8819
|
if (isInsideAncestorHtmlInCanvas) {
|
|
8741
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.");
|
|
8742
8821
|
}
|
|
@@ -8744,6 +8823,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
8744
8823
|
durationInFrames: resolvedDuration,
|
|
8745
8824
|
name: "<HtmlInCanvas>",
|
|
8746
8825
|
_experimentalControls: controls,
|
|
8826
|
+
_experimentalEffects: effects,
|
|
8747
8827
|
layout: "none",
|
|
8748
8828
|
...sequenceProps,
|
|
8749
8829
|
children: /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
|
|
@@ -8752,6 +8832,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
8752
8832
|
ref: setLayoutCanvasRef,
|
|
8753
8833
|
width,
|
|
8754
8834
|
height,
|
|
8835
|
+
style,
|
|
8755
8836
|
children: /* @__PURE__ */ jsx15("div", {
|
|
8756
8837
|
ref: divRef,
|
|
8757
8838
|
style: innerStyle,
|
|
@@ -8762,7 +8843,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
8762
8843
|
});
|
|
8763
8844
|
});
|
|
8764
8845
|
HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
8765
|
-
var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner,
|
|
8846
|
+
var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, sequenceStyleSchema);
|
|
8766
8847
|
var HtmlInCanvas = Object.assign(HtmlInCanvasWrapped, {
|
|
8767
8848
|
isSupported: isHtmlInCanvasSupported
|
|
8768
8849
|
});
|
|
@@ -8840,7 +8921,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
8840
8921
|
};
|
|
8841
8922
|
}
|
|
8842
8923
|
}, []);
|
|
8843
|
-
const contextValue =
|
|
8924
|
+
const contextValue = useMemo18(() => {
|
|
8844
8925
|
return {
|
|
8845
8926
|
registerRenderAsset,
|
|
8846
8927
|
unregisterRenderAsset,
|
|
@@ -8969,14 +9050,14 @@ var Loop = ({
|
|
|
8969
9050
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
8970
9051
|
const start = iteration * durationInFrames;
|
|
8971
9052
|
const from = Math.min(start, maxFrame);
|
|
8972
|
-
const loopDisplay =
|
|
9053
|
+
const loopDisplay = useMemo19(() => {
|
|
8973
9054
|
return {
|
|
8974
9055
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
8975
9056
|
startOffset: -from,
|
|
8976
9057
|
durationInFrames
|
|
8977
9058
|
};
|
|
8978
9059
|
}, [compDuration, durationInFrames, from, times]);
|
|
8979
|
-
const loopContext =
|
|
9060
|
+
const loopContext = useMemo19(() => {
|
|
8980
9061
|
return {
|
|
8981
9062
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
8982
9063
|
durationInFrames
|
|
@@ -9335,7 +9416,7 @@ var DurationsContext = createContext19({
|
|
|
9335
9416
|
});
|
|
9336
9417
|
var DurationsContextProvider = ({ children }) => {
|
|
9337
9418
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
9338
|
-
const value =
|
|
9419
|
+
const value = useMemo20(() => {
|
|
9339
9420
|
return {
|
|
9340
9421
|
durations,
|
|
9341
9422
|
setDurations
|
|
@@ -9469,7 +9550,7 @@ var useSingletonAudioContext = ({
|
|
|
9469
9550
|
audioEnabled
|
|
9470
9551
|
}) => {
|
|
9471
9552
|
const env = useRemotionEnvironment();
|
|
9472
|
-
|
|
9553
|
+
const context = useMemo21(() => {
|
|
9473
9554
|
if (env.isRendering) {
|
|
9474
9555
|
return null;
|
|
9475
9556
|
}
|
|
@@ -9486,11 +9567,19 @@ var useSingletonAudioContext = ({
|
|
|
9486
9567
|
});
|
|
9487
9568
|
const gainNode = audioContext.createGain();
|
|
9488
9569
|
gainNode.connect(audioContext.destination);
|
|
9570
|
+
Log.trace({ logLevel, tag: "audio" }, "Creating new audio context");
|
|
9571
|
+
audioContext.suspend();
|
|
9489
9572
|
return {
|
|
9490
9573
|
audioContext,
|
|
9491
9574
|
gainNode
|
|
9492
9575
|
};
|
|
9493
9576
|
}, [logLevel, latencyHint, env.isRendering, audioEnabled]);
|
|
9577
|
+
useEffect8(() => {
|
|
9578
|
+
return () => {
|
|
9579
|
+
context?.audioContext?.close();
|
|
9580
|
+
};
|
|
9581
|
+
}, [context]);
|
|
9582
|
+
return context;
|
|
9494
9583
|
};
|
|
9495
9584
|
var waitUntilActuallyResumed = (audioContext, logLevel) => {
|
|
9496
9585
|
return new Promise((resolve) => {
|
|
@@ -9549,9 +9638,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9549
9638
|
});
|
|
9550
9639
|
const audioContextIsPlayingEventually = useRef11(false);
|
|
9551
9640
|
const isResuming = useRef11(null);
|
|
9552
|
-
const audioSyncAnchor =
|
|
9641
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
9553
9642
|
const audioSyncAnchorListeners = useRef11([]);
|
|
9554
|
-
const audioSyncAnchorEmitter =
|
|
9643
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
9555
9644
|
return {
|
|
9556
9645
|
dispatch: (event) => {
|
|
9557
9646
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -9571,7 +9660,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9571
9660
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
9572
9661
|
nodesToResume.current.delete(node);
|
|
9573
9662
|
}, []);
|
|
9574
|
-
const scheduleAudioNode =
|
|
9663
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
9575
9664
|
return ({
|
|
9576
9665
|
node,
|
|
9577
9666
|
mediaTimestamp,
|
|
@@ -9634,12 +9723,11 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9634
9723
|
isResuming.current = null;
|
|
9635
9724
|
});
|
|
9636
9725
|
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
9637
|
-
ctxAndGain.gainNode
|
|
9638
|
-
ctxAndGain.gainNode
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
}).catch(() => {});
|
|
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(() => {});
|
|
9643
9731
|
}, [ctxAndGain, logLevel]);
|
|
9644
9732
|
const getIsResumingAudioContext = useCallback9(() => {
|
|
9645
9733
|
return isResuming.current;
|
|
@@ -9654,7 +9742,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9654
9742
|
audioContextIsPlayingEventually.current = false;
|
|
9655
9743
|
ctxAndGain.audioContext.suspend();
|
|
9656
9744
|
}, [ctxAndGain]);
|
|
9657
|
-
const audioContextValue =
|
|
9745
|
+
const audioContextValue = useMemo22(() => {
|
|
9658
9746
|
return {
|
|
9659
9747
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
9660
9748
|
gainNode: ctxAndGain?.gainNode ?? null,
|
|
@@ -9693,7 +9781,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
9693
9781
|
const audioCtx = useContext20(SharedAudioContext);
|
|
9694
9782
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
9695
9783
|
const resume = audioCtx?.resume;
|
|
9696
|
-
const refs =
|
|
9784
|
+
const refs = useMemo22(() => {
|
|
9697
9785
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
9698
9786
|
const ref = createRef2();
|
|
9699
9787
|
return {
|
|
@@ -9830,7 +9918,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
9830
9918
|
});
|
|
9831
9919
|
resume?.();
|
|
9832
9920
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
9833
|
-
const audioTagsValue =
|
|
9921
|
+
const audioTagsValue = useMemo22(() => {
|
|
9834
9922
|
return {
|
|
9835
9923
|
registerAudio,
|
|
9836
9924
|
unregisterAudio,
|
|
@@ -10209,7 +10297,7 @@ var useBasicMediaInTimeline = ({
|
|
|
10209
10297
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
10210
10298
|
loop
|
|
10211
10299
|
});
|
|
10212
|
-
const volumes =
|
|
10300
|
+
const volumes = useMemo23(() => {
|
|
10213
10301
|
if (typeof volume === "number") {
|
|
10214
10302
|
return volume;
|
|
10215
10303
|
}
|
|
@@ -10221,7 +10309,7 @@ var useBasicMediaInTimeline = ({
|
|
|
10221
10309
|
});
|
|
10222
10310
|
}).join(",");
|
|
10223
10311
|
}, [duration, mediaStartsAt, volume, mediaVolume]);
|
|
10224
|
-
|
|
10312
|
+
useEffect9(() => {
|
|
10225
10313
|
if (typeof volume === "number" && volume !== initialVolume) {
|
|
10226
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`);
|
|
10227
10315
|
}
|
|
@@ -10230,7 +10318,7 @@ var useBasicMediaInTimeline = ({
|
|
|
10230
10318
|
const nonce = useNonce();
|
|
10231
10319
|
const { rootId } = useTimelineContext();
|
|
10232
10320
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
10233
|
-
const memoizedResult =
|
|
10321
|
+
const memoizedResult = useMemo23(() => {
|
|
10234
10322
|
return {
|
|
10235
10323
|
volumes,
|
|
10236
10324
|
duration,
|
|
@@ -10284,7 +10372,7 @@ var useImageInTimeline = ({
|
|
|
10284
10372
|
loop: false
|
|
10285
10373
|
});
|
|
10286
10374
|
const { isStudio } = useRemotionEnvironment();
|
|
10287
|
-
|
|
10375
|
+
useEffect9(() => {
|
|
10288
10376
|
if (!src) {
|
|
10289
10377
|
throw new Error("No src passed");
|
|
10290
10378
|
}
|
|
@@ -10367,7 +10455,7 @@ var useMediaInTimeline = ({
|
|
|
10367
10455
|
loop: false
|
|
10368
10456
|
});
|
|
10369
10457
|
const { isStudio } = useRemotionEnvironment();
|
|
10370
|
-
|
|
10458
|
+
useEffect9(() => {
|
|
10371
10459
|
if (!src) {
|
|
10372
10460
|
throw new Error("No src passed");
|
|
10373
10461
|
}
|
|
@@ -10469,7 +10557,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
10469
10557
|
}
|
|
10470
10558
|
};
|
|
10471
10559
|
}, []);
|
|
10472
|
-
|
|
10560
|
+
useEffect10(() => {
|
|
10473
10561
|
if (rendering) {
|
|
10474
10562
|
return;
|
|
10475
10563
|
}
|
|
@@ -10499,7 +10587,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
10499
10587
|
}
|
|
10500
10588
|
}, [blocks]);
|
|
10501
10589
|
}
|
|
10502
|
-
return
|
|
10590
|
+
return useMemo24(() => {
|
|
10503
10591
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
10504
10592
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
10505
10593
|
};
|
|
@@ -10514,7 +10602,7 @@ var BufferingProvider = ({ children }) => {
|
|
|
10514
10602
|
};
|
|
10515
10603
|
var useIsPlayerBuffering = (bufferManager) => {
|
|
10516
10604
|
const [isBuffering, setIsBuffering] = useState14(bufferManager.buffering.current);
|
|
10517
|
-
|
|
10605
|
+
useEffect10(() => {
|
|
10518
10606
|
const onBuffer = () => {
|
|
10519
10607
|
setIsBuffering(true);
|
|
10520
10608
|
};
|
|
@@ -10537,7 +10625,7 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
10537
10625
|
var useBufferState = () => {
|
|
10538
10626
|
const buffer = useContext25(BufferingContextReact);
|
|
10539
10627
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
10540
|
-
return
|
|
10628
|
+
return useMemo25(() => ({
|
|
10541
10629
|
delayPlayback: () => {
|
|
10542
10630
|
if (!addBlock) {
|
|
10543
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");
|
|
@@ -10634,7 +10722,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
10634
10722
|
onVariableFpsVideoDetected,
|
|
10635
10723
|
pauseWhenBuffering
|
|
10636
10724
|
]);
|
|
10637
|
-
return
|
|
10725
|
+
return useMemo26(() => {
|
|
10638
10726
|
return {
|
|
10639
10727
|
isBuffering: () => bufferingRef.current,
|
|
10640
10728
|
bufferUntilFirstFrame
|
|
@@ -10683,7 +10771,7 @@ var useMediaBuffering = ({
|
|
|
10683
10771
|
}) => {
|
|
10684
10772
|
const buffer = useBufferState();
|
|
10685
10773
|
const [isBuffering, setIsBuffering] = useState15(false);
|
|
10686
|
-
|
|
10774
|
+
useEffect11(() => {
|
|
10687
10775
|
let cleanupFns = [];
|
|
10688
10776
|
const { current } = element;
|
|
10689
10777
|
if (!current) {
|
|
@@ -10816,7 +10904,7 @@ var useRequestVideoCallbackTime = ({
|
|
|
10816
10904
|
onVariableFpsVideoDetected
|
|
10817
10905
|
}) => {
|
|
10818
10906
|
const currentTime = useRef16(null);
|
|
10819
|
-
|
|
10907
|
+
useEffect12(() => {
|
|
10820
10908
|
const { current } = mediaRef;
|
|
10821
10909
|
if (current) {
|
|
10822
10910
|
currentTime.current = {
|
|
@@ -11036,7 +11124,7 @@ var useMediaPlayback = ({
|
|
|
11036
11124
|
isPostmounting,
|
|
11037
11125
|
onAutoPlayError
|
|
11038
11126
|
}) => {
|
|
11039
|
-
const { playbackRate: globalPlaybackRate } =
|
|
11127
|
+
const { playbackRate: globalPlaybackRate } = usePlaybackRate();
|
|
11040
11128
|
const frame = useCurrentFrame();
|
|
11041
11129
|
const absoluteFrame = useTimelinePosition();
|
|
11042
11130
|
const [playing] = usePlayingState();
|
|
@@ -11102,7 +11190,7 @@ var useMediaPlayback = ({
|
|
|
11102
11190
|
return acceptableTimeshift ?? defaultAcceptableTimeshift;
|
|
11103
11191
|
})();
|
|
11104
11192
|
const isPlayerBuffering = useIsPlayerBuffering(buffering);
|
|
11105
|
-
|
|
11193
|
+
useEffect13(() => {
|
|
11106
11194
|
if (mediaRef.current?.paused) {
|
|
11107
11195
|
return;
|
|
11108
11196
|
}
|
|
@@ -11147,7 +11235,7 @@ var useMediaPlayback = ({
|
|
|
11147
11235
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
11148
11236
|
}
|
|
11149
11237
|
}, [mediaRef, playbackRate]);
|
|
11150
|
-
|
|
11238
|
+
useEffect13(() => {
|
|
11151
11239
|
const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
|
|
11152
11240
|
if (!mediaRef.current) {
|
|
11153
11241
|
throw new Error(`No ${mediaType} ref found`);
|
|
@@ -11276,7 +11364,7 @@ var useMediaTag = ({
|
|
|
11276
11364
|
const logLevel = useLogLevel();
|
|
11277
11365
|
const mountTime = useMountTime();
|
|
11278
11366
|
const env = useRemotionEnvironment();
|
|
11279
|
-
|
|
11367
|
+
useEffect14(() => {
|
|
11280
11368
|
const tag = {
|
|
11281
11369
|
id,
|
|
11282
11370
|
play: (reason) => {
|
|
@@ -11330,14 +11418,14 @@ var SetMediaVolumeContext = createContext21({
|
|
|
11330
11418
|
var useMediaVolumeState = () => {
|
|
11331
11419
|
const { mediaVolume } = useContext27(MediaVolumeContext);
|
|
11332
11420
|
const { setMediaVolume } = useContext27(SetMediaVolumeContext);
|
|
11333
|
-
return
|
|
11421
|
+
return useMemo27(() => {
|
|
11334
11422
|
return [mediaVolume, setMediaVolume];
|
|
11335
11423
|
}, [mediaVolume, setMediaVolume]);
|
|
11336
11424
|
};
|
|
11337
11425
|
var useMediaMutedState = () => {
|
|
11338
11426
|
const { mediaMuted } = useContext27(MediaVolumeContext);
|
|
11339
11427
|
const { setMediaMuted } = useContext27(SetMediaVolumeContext);
|
|
11340
|
-
return
|
|
11428
|
+
return useMemo27(() => {
|
|
11341
11429
|
return [mediaMuted, setMediaMuted];
|
|
11342
11430
|
}, [mediaMuted, setMediaMuted]);
|
|
11343
11431
|
};
|
|
@@ -11405,7 +11493,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11405
11493
|
requestsVideoFrame: false,
|
|
11406
11494
|
isClientSideRendering: false
|
|
11407
11495
|
});
|
|
11408
|
-
const propsToPass =
|
|
11496
|
+
const propsToPass = useMemo28(() => {
|
|
11409
11497
|
return {
|
|
11410
11498
|
muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
|
|
11411
11499
|
src: preloadedSrc,
|
|
@@ -11423,7 +11511,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11423
11511
|
userPreferredVolume,
|
|
11424
11512
|
crossOriginValue
|
|
11425
11513
|
]);
|
|
11426
|
-
const id =
|
|
11514
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
11427
11515
|
src,
|
|
11428
11516
|
sequenceContext?.relativeFrom,
|
|
11429
11517
|
sequenceContext?.cumulatedFrom,
|
|
@@ -11495,7 +11583,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11495
11583
|
}, [audioRef]);
|
|
11496
11584
|
const currentOnDurationCallback = useRef18(onDuration);
|
|
11497
11585
|
currentOnDurationCallback.current = onDuration;
|
|
11498
|
-
|
|
11586
|
+
useEffect15(() => {
|
|
11499
11587
|
const { current } = audioRef;
|
|
11500
11588
|
if (!current) {
|
|
11501
11589
|
return;
|
|
@@ -11549,7 +11637,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
11549
11637
|
const sequenceContext = useContext29(SequenceContext);
|
|
11550
11638
|
const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);
|
|
11551
11639
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
11552
|
-
const id =
|
|
11640
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
11553
11641
|
props.src,
|
|
11554
11642
|
sequenceContext?.relativeFrom,
|
|
11555
11643
|
sequenceContext?.cumulatedFrom,
|
|
@@ -11564,7 +11652,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
11564
11652
|
useImperativeHandle5(ref, () => {
|
|
11565
11653
|
return audioRef.current;
|
|
11566
11654
|
}, []);
|
|
11567
|
-
|
|
11655
|
+
useEffect16(() => {
|
|
11568
11656
|
if (!props.src) {
|
|
11569
11657
|
throw new Error("No src passed");
|
|
11570
11658
|
}
|
|
@@ -11814,36 +11902,6 @@ function truncateSrcForLabel(src) {
|
|
|
11814
11902
|
}
|
|
11815
11903
|
return src;
|
|
11816
11904
|
}
|
|
11817
|
-
var imgSchema = {
|
|
11818
|
-
"style.translate": {
|
|
11819
|
-
type: "translate",
|
|
11820
|
-
step: 1,
|
|
11821
|
-
default: "0px 0px",
|
|
11822
|
-
description: "Position"
|
|
11823
|
-
},
|
|
11824
|
-
"style.scale": {
|
|
11825
|
-
type: "number",
|
|
11826
|
-
min: 0.05,
|
|
11827
|
-
max: 100,
|
|
11828
|
-
step: 0.01,
|
|
11829
|
-
default: 1,
|
|
11830
|
-
description: "Scale"
|
|
11831
|
-
},
|
|
11832
|
-
"style.rotate": {
|
|
11833
|
-
type: "rotation",
|
|
11834
|
-
step: 1,
|
|
11835
|
-
default: "0deg",
|
|
11836
|
-
description: "Rotation"
|
|
11837
|
-
},
|
|
11838
|
-
"style.opacity": {
|
|
11839
|
-
type: "number",
|
|
11840
|
-
min: 0,
|
|
11841
|
-
max: 1,
|
|
11842
|
-
step: 0.01,
|
|
11843
|
-
default: 1,
|
|
11844
|
-
description: "Opacity"
|
|
11845
|
-
}
|
|
11846
|
-
};
|
|
11847
11905
|
var ImgInner = ({
|
|
11848
11906
|
onError,
|
|
11849
11907
|
maxRetries = 2,
|
|
@@ -12007,7 +12065,7 @@ var ImgInner = ({
|
|
|
12007
12065
|
decoding: "sync"
|
|
12008
12066
|
});
|
|
12009
12067
|
};
|
|
12010
|
-
var Img = wrapInSchema(ImgInner,
|
|
12068
|
+
var Img = wrapInSchema(ImgInner, sequenceStyleSchema);
|
|
12011
12069
|
addSequenceStackTraces(Img);
|
|
12012
12070
|
var compositionsRef = React28.createRef();
|
|
12013
12071
|
var CompositionManagerProvider = ({
|
|
@@ -12063,7 +12121,7 @@ var CompositionManagerProvider = ({
|
|
|
12063
12121
|
getCompositions: () => currentcompositionsRef.current
|
|
12064
12122
|
};
|
|
12065
12123
|
}, []);
|
|
12066
|
-
const compositionManagerSetters =
|
|
12124
|
+
const compositionManagerSetters = useMemo30(() => {
|
|
12067
12125
|
return {
|
|
12068
12126
|
registerComposition,
|
|
12069
12127
|
unregisterComposition,
|
|
@@ -12079,7 +12137,7 @@ var CompositionManagerProvider = ({
|
|
|
12079
12137
|
unregisterFolder,
|
|
12080
12138
|
onlyRenderComposition
|
|
12081
12139
|
]);
|
|
12082
|
-
const compositionManagerContextValue =
|
|
12140
|
+
const compositionManagerContextValue = useMemo30(() => {
|
|
12083
12141
|
return {
|
|
12084
12142
|
compositions,
|
|
12085
12143
|
folders,
|
|
@@ -12209,7 +12267,7 @@ var MediaEnabledProvider = ({
|
|
|
12209
12267
|
videoEnabled,
|
|
12210
12268
|
audioEnabled
|
|
12211
12269
|
}) => {
|
|
12212
|
-
const value =
|
|
12270
|
+
const value = useMemo31(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
12213
12271
|
return /* @__PURE__ */ jsx28(MediaEnabledContext.Provider, {
|
|
12214
12272
|
value,
|
|
12215
12273
|
children
|
|
@@ -12225,13 +12283,13 @@ var RemotionRootContexts = ({
|
|
|
12225
12283
|
frameState,
|
|
12226
12284
|
visualModeEnabled
|
|
12227
12285
|
}) => {
|
|
12228
|
-
const nonceContext =
|
|
12286
|
+
const nonceContext = useMemo322(() => {
|
|
12229
12287
|
let counter = 0;
|
|
12230
12288
|
return {
|
|
12231
12289
|
getNonce: () => counter++
|
|
12232
12290
|
};
|
|
12233
12291
|
}, []);
|
|
12234
|
-
const logging =
|
|
12292
|
+
const logging = useMemo322(() => {
|
|
12235
12293
|
return { logLevel, mountTime: Date.now() };
|
|
12236
12294
|
}, [logLevel]);
|
|
12237
12295
|
return /* @__PURE__ */ jsx29(LogLevelContext.Provider, {
|
|
@@ -12533,7 +12591,7 @@ var OffthreadVideoForRendering = ({
|
|
|
12533
12591
|
if (!src) {
|
|
12534
12592
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
12535
12593
|
}
|
|
12536
|
-
const id =
|
|
12594
|
+
const id = useMemo33(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12537
12595
|
src,
|
|
12538
12596
|
sequenceContext?.cumulatedFrom,
|
|
12539
12597
|
sequenceContext?.relativeFrom,
|
|
@@ -12548,7 +12606,7 @@ var OffthreadVideoForRendering = ({
|
|
|
12548
12606
|
mediaVolume: 1
|
|
12549
12607
|
});
|
|
12550
12608
|
warnAboutTooHighVolume(volume);
|
|
12551
|
-
|
|
12609
|
+
useEffect17(() => {
|
|
12552
12610
|
if (!src) {
|
|
12553
12611
|
throw new Error("No src passed");
|
|
12554
12612
|
}
|
|
@@ -12588,14 +12646,14 @@ var OffthreadVideoForRendering = ({
|
|
|
12588
12646
|
sequenceContext?.relativeFrom,
|
|
12589
12647
|
audioStreamIndex
|
|
12590
12648
|
]);
|
|
12591
|
-
const currentTime =
|
|
12649
|
+
const currentTime = useMemo33(() => {
|
|
12592
12650
|
return getExpectedMediaFrameUncorrected({
|
|
12593
12651
|
frame,
|
|
12594
12652
|
playbackRate: playbackRate || 1,
|
|
12595
12653
|
startFrom: -mediaStartsAt
|
|
12596
12654
|
}) / videoConfig.fps;
|
|
12597
12655
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
12598
|
-
const actualSrc =
|
|
12656
|
+
const actualSrc = useMemo33(() => {
|
|
12599
12657
|
return getOffthreadVideoSource({
|
|
12600
12658
|
src,
|
|
12601
12659
|
currentTime,
|
|
@@ -12683,7 +12741,7 @@ var OffthreadVideoForRendering = ({
|
|
|
12683
12741
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
12684
12742
|
}
|
|
12685
12743
|
}, [imageSrc, onError]);
|
|
12686
|
-
const className =
|
|
12744
|
+
const className = useMemo33(() => {
|
|
12687
12745
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy2).join(" ");
|
|
12688
12746
|
}, [props2.className]);
|
|
12689
12747
|
const onImageFrame = useCallback17((img) => {
|
|
@@ -12709,7 +12767,7 @@ var useEmitVideoFrame = ({
|
|
|
12709
12767
|
ref,
|
|
12710
12768
|
onVideoFrame
|
|
12711
12769
|
}) => {
|
|
12712
|
-
|
|
12770
|
+
useEffect18(() => {
|
|
12713
12771
|
const { current } = ref;
|
|
12714
12772
|
if (!current) {
|
|
12715
12773
|
return;
|
|
@@ -12746,7 +12804,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12746
12804
|
throw new Error("SharedAudioContext not found");
|
|
12747
12805
|
}
|
|
12748
12806
|
const videoRef = useRef22(null);
|
|
12749
|
-
const sharedSource =
|
|
12807
|
+
const sharedSource = useMemo34(() => {
|
|
12750
12808
|
if (!context.audioContext) {
|
|
12751
12809
|
return null;
|
|
12752
12810
|
}
|
|
@@ -12873,7 +12931,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12873
12931
|
tag: "video",
|
|
12874
12932
|
mountTime
|
|
12875
12933
|
}));
|
|
12876
|
-
|
|
12934
|
+
useEffect19(() => {
|
|
12877
12935
|
const { current } = videoRef;
|
|
12878
12936
|
if (!current) {
|
|
12879
12937
|
return;
|
|
@@ -12916,7 +12974,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12916
12974
|
const currentOnDurationCallback = useRef22(onDuration);
|
|
12917
12975
|
currentOnDurationCallback.current = onDuration;
|
|
12918
12976
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
12919
|
-
|
|
12977
|
+
useEffect19(() => {
|
|
12920
12978
|
const { current } = videoRef;
|
|
12921
12979
|
if (!current) {
|
|
12922
12980
|
return;
|
|
@@ -12933,7 +12991,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12933
12991
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
12934
12992
|
};
|
|
12935
12993
|
}, [src]);
|
|
12936
|
-
|
|
12994
|
+
useEffect19(() => {
|
|
12937
12995
|
const { current } = videoRef;
|
|
12938
12996
|
if (!current) {
|
|
12939
12997
|
return;
|
|
@@ -12944,7 +13002,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12944
13002
|
current.preload = "auto";
|
|
12945
13003
|
}
|
|
12946
13004
|
}, []);
|
|
12947
|
-
const actualStyle =
|
|
13005
|
+
const actualStyle = useMemo34(() => {
|
|
12948
13006
|
return {
|
|
12949
13007
|
...style,
|
|
12950
13008
|
opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
|
|
@@ -13138,7 +13196,7 @@ function useRemotionContexts() {
|
|
|
13138
13196
|
const sequenceManagerContext = React36.useContext(SequenceManager);
|
|
13139
13197
|
const bufferManagerContext = React36.useContext(BufferingContextReact);
|
|
13140
13198
|
const logLevelContext = React36.useContext(LogLevelContext);
|
|
13141
|
-
return
|
|
13199
|
+
return useMemo35(() => ({
|
|
13142
13200
|
compositionManagerCtx,
|
|
13143
13201
|
timelineContext,
|
|
13144
13202
|
setTimelineContext,
|
|
@@ -13226,8 +13284,11 @@ var Internals = {
|
|
|
13226
13284
|
SequenceManager,
|
|
13227
13285
|
SequenceStackTracesUpdateContext,
|
|
13228
13286
|
SequenceVisibilityToggleContext,
|
|
13229
|
-
useSchema,
|
|
13230
13287
|
wrapInSchema,
|
|
13288
|
+
sequenceSchema,
|
|
13289
|
+
sequenceStyleSchema,
|
|
13290
|
+
flattenActiveSchema,
|
|
13291
|
+
getFlatSchemaWithAllKeys,
|
|
13231
13292
|
useSequenceControlOverride,
|
|
13232
13293
|
RemotionRootContexts,
|
|
13233
13294
|
CompositionManagerProvider,
|
|
@@ -13277,6 +13338,7 @@ var Internals = {
|
|
|
13277
13338
|
REMOTION_STUDIO_CONTAINER_ELEMENT,
|
|
13278
13339
|
RenderAssetManager,
|
|
13279
13340
|
persistCurrentFrame,
|
|
13341
|
+
usePlaybackRate,
|
|
13280
13342
|
useTimelineContext,
|
|
13281
13343
|
useTimelineSetFrame,
|
|
13282
13344
|
isIosSafari,
|
|
@@ -13310,6 +13372,7 @@ var Internals = {
|
|
|
13310
13372
|
TimelinePosition: exports_timeline_position_state,
|
|
13311
13373
|
DelayRenderContextType,
|
|
13312
13374
|
TimelineContext,
|
|
13375
|
+
PlaybackRateContext,
|
|
13313
13376
|
AbsoluteTimeContext,
|
|
13314
13377
|
RenderAssetManagerProvider,
|
|
13315
13378
|
getEffectiveVisualModeValue,
|
|
@@ -13318,7 +13381,8 @@ var Internals = {
|
|
|
13318
13381
|
runEffectChain,
|
|
13319
13382
|
useMemoizedEffects,
|
|
13320
13383
|
defineEffect,
|
|
13321
|
-
createDescriptor
|
|
13384
|
+
createDescriptor,
|
|
13385
|
+
computeEffectiveSchemaValuesDotNotation
|
|
13322
13386
|
};
|
|
13323
13387
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
13324
13388
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -13382,8 +13446,8 @@ var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
|
13382
13446
|
});
|
|
13383
13447
|
};
|
|
13384
13448
|
var SeriesSequence = forwardRef11(SeriesSequenceRefForwardingFunction);
|
|
13385
|
-
var
|
|
13386
|
-
const childrenValue =
|
|
13449
|
+
var SeriesInner = (props2) => {
|
|
13450
|
+
const childrenValue = useMemo36(() => {
|
|
13387
13451
|
let startFrame = 0;
|
|
13388
13452
|
const flattenedChildren = flattenChildren(props2.children);
|
|
13389
13453
|
return Children.map(flattenedChildren, (child, i) => {
|
|
@@ -13446,7 +13510,9 @@ var Series = (props2) => {
|
|
|
13446
13510
|
})
|
|
13447
13511
|
});
|
|
13448
13512
|
};
|
|
13449
|
-
Series
|
|
13513
|
+
var Series = Object.assign(wrapInSchema(SeriesInner, sequenceSchemaDefaultLayoutNone), {
|
|
13514
|
+
Sequence: SeriesSequence
|
|
13515
|
+
});
|
|
13450
13516
|
addSequenceStackTraces(Series);
|
|
13451
13517
|
addSequenceStackTraces(SeriesSequence);
|
|
13452
13518
|
var validateSpringDuration = (dur) => {
|
|
@@ -13921,7 +13987,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13921
13987
|
const mountTime = useMountTime();
|
|
13922
13988
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
13923
13989
|
const { registerRenderAsset, unregisterRenderAsset } = useContext36(RenderAssetManager);
|
|
13924
|
-
const id =
|
|
13990
|
+
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
13925
13991
|
props2.src,
|
|
13926
13992
|
sequenceContext?.cumulatedFrom,
|
|
13927
13993
|
sequenceContext?.relativeFrom,
|
|
@@ -13936,7 +14002,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13936
14002
|
mediaVolume: 1
|
|
13937
14003
|
});
|
|
13938
14004
|
warnAboutTooHighVolume(volume);
|
|
13939
|
-
|
|
14005
|
+
useEffect20(() => {
|
|
13940
14006
|
if (!props2.src) {
|
|
13941
14007
|
throw new Error("No src passed");
|
|
13942
14008
|
}
|
|
@@ -13979,7 +14045,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13979
14045
|
useImperativeHandle9(ref, () => {
|
|
13980
14046
|
return videoRef.current;
|
|
13981
14047
|
}, []);
|
|
13982
|
-
|
|
14048
|
+
useEffect20(() => {
|
|
13983
14049
|
if (!window.remotion_videoEnabled) {
|
|
13984
14050
|
return;
|
|
13985
14051
|
}
|
|
@@ -14269,10 +14335,10 @@ import { jsx as jsx152 } from "react/jsx-runtime";
|
|
|
14269
14335
|
import * as React122 from "react";
|
|
14270
14336
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
14271
14337
|
import * as React16 from "react";
|
|
14272
|
-
import * as
|
|
14338
|
+
import * as React132 from "react";
|
|
14273
14339
|
import * as ReactDOM from "react-dom";
|
|
14274
14340
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
14275
|
-
import * as
|
|
14341
|
+
import * as React14 from "react";
|
|
14276
14342
|
import * as React152 from "react";
|
|
14277
14343
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
14278
14344
|
import * as React172 from "react";
|
|
@@ -14499,8 +14565,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
14499
14565
|
progress: 0,
|
|
14500
14566
|
isActive: false
|
|
14501
14567
|
});
|
|
14502
|
-
const eventTarget =
|
|
14503
|
-
|
|
14568
|
+
const eventTarget = useMemo38(() => new EventTarget, []);
|
|
14569
|
+
useEffect21(() => {
|
|
14504
14570
|
if (disabled) {
|
|
14505
14571
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
14506
14572
|
} else {
|
|
@@ -14647,7 +14713,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
14647
14713
|
var lastCoordinates = null;
|
|
14648
14714
|
var useMousePosition = (ref) => {
|
|
14649
14715
|
const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
|
|
14650
|
-
|
|
14716
|
+
useEffect21(() => {
|
|
14651
14717
|
const element = ref.current;
|
|
14652
14718
|
if (!element) {
|
|
14653
14719
|
return;
|
|
@@ -15311,7 +15377,7 @@ var NODES = [
|
|
|
15311
15377
|
"ul"
|
|
15312
15378
|
];
|
|
15313
15379
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
15314
|
-
const Node2 =
|
|
15380
|
+
const Node2 = React132.forwardRef((props, forwardedRef) => {
|
|
15315
15381
|
const { asChild, ...primitiveProps } = props;
|
|
15316
15382
|
const Comp = asChild ? Slot2 : node;
|
|
15317
15383
|
if (typeof window !== "undefined") {
|
|
@@ -15327,11 +15393,11 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
15327
15393
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
15328
15394
|
}
|
|
15329
15395
|
function useCallbackRef(callback) {
|
|
15330
|
-
const callbackRef =
|
|
15331
|
-
|
|
15396
|
+
const callbackRef = React14.useRef(callback);
|
|
15397
|
+
React14.useEffect(() => {
|
|
15332
15398
|
callbackRef.current = callback;
|
|
15333
15399
|
});
|
|
15334
|
-
return
|
|
15400
|
+
return React14.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
15335
15401
|
}
|
|
15336
15402
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
15337
15403
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|