@remotion/promo-pages 4.0.430 → 4.0.432
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 +52617 -50097
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.js +52617 -50097
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/design.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/experts/experts-data.js +15 -0
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/experts.js +264 -74
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/homepage/Pricing.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsGallery.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsShow.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsSubmit.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/team.js +15 -0
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js +410 -219
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.js +410 -219
- package/dist/design.js +410 -219
- package/dist/experts/experts-data.js +15 -0
- package/dist/experts.js +264 -74
- package/dist/homepage/Pricing.js +410 -219
- package/dist/prompts/PromptsGallery.js +410 -219
- package/dist/prompts/PromptsShow.js +410 -219
- package/dist/prompts/PromptsSubmit.js +410 -219
- package/dist/team.js +15 -0
- package/dist/template-modal-content.js +410 -219
- package/dist/templates.js +410 -219
- package/package.json +13 -13
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/Homepage.css +0 -32
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/Homepage.js +0 -63571
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/design.js +0 -20053
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/experts/experts-data.js +0 -689
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/experts.js +0 -8378
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/homepage/Pricing.js +0 -21502
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsGallery.js +0 -19934
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsShow.css +0 -2578
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsShow.js +0 -39755
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsSubmit.css +0 -2578
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/PromptsSubmit.js +0 -39846
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/prompts/prompt-types.js +0 -0
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/team.js +0 -292
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/template-modal-content.css +0 -32
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/template-modal-content.js +0 -21671
- package/dist/Users/jonathanburger/remotion2/packages/promo-pages/dist/templates.js +0 -21014
- 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 -263
- 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 -101
- 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/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/tts.d.ts +0 -3
- package/dist/components/icons/tts.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.d.ts +0 -3
- package/dist/components/team.js +0 -14
- 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/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsSubmit.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
1
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
+
for (let key of __getOwnPropNames(mod))
|
|
10
|
+
if (!__hasOwnProp.call(to, key))
|
|
11
|
+
__defProp(to, key, {
|
|
12
|
+
get: () => mod[key],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
2
17
|
var __export = (target, all) => {
|
|
3
18
|
for (var name in all)
|
|
4
19
|
__defProp(target, name, {
|
|
@@ -21471,46 +21486,7 @@ import { jsx as jsx6 } from "react/jsx-runtime";
|
|
|
21471
21486
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
21472
21487
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
21473
21488
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
21474
|
-
|
|
21475
|
-
const instructions = [
|
|
21476
|
-
{
|
|
21477
|
-
type: "M",
|
|
21478
|
-
x: radius,
|
|
21479
|
-
y: 0
|
|
21480
|
-
},
|
|
21481
|
-
{
|
|
21482
|
-
type: "a",
|
|
21483
|
-
rx: radius,
|
|
21484
|
-
ry: radius,
|
|
21485
|
-
xAxisRotation: 0,
|
|
21486
|
-
largeArcFlag: true,
|
|
21487
|
-
sweepFlag: true,
|
|
21488
|
-
dx: 0,
|
|
21489
|
-
dy: radius * 2
|
|
21490
|
-
},
|
|
21491
|
-
{
|
|
21492
|
-
type: "a",
|
|
21493
|
-
rx: radius,
|
|
21494
|
-
ry: radius,
|
|
21495
|
-
xAxisRotation: 0,
|
|
21496
|
-
largeArcFlag: true,
|
|
21497
|
-
sweepFlag: true,
|
|
21498
|
-
dx: 0,
|
|
21499
|
-
dy: -radius * 2
|
|
21500
|
-
},
|
|
21501
|
-
{
|
|
21502
|
-
type: "Z"
|
|
21503
|
-
}
|
|
21504
|
-
];
|
|
21505
|
-
const path = serializeInstructions(instructions);
|
|
21506
|
-
return {
|
|
21507
|
-
height: radius * 2,
|
|
21508
|
-
width: radius * 2,
|
|
21509
|
-
path,
|
|
21510
|
-
instructions,
|
|
21511
|
-
transformOrigin: `${radius} ${radius}`
|
|
21512
|
-
};
|
|
21513
|
-
};
|
|
21489
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
21514
21490
|
var doesReactSupportTransformOriginProperty = (version2) => {
|
|
21515
21491
|
if (version2.includes("canary") || version2.includes("experimental")) {
|
|
21516
21492
|
const last8Chars = parseInt(version2.slice(-8), 10);
|
|
@@ -21604,6 +21580,46 @@ var RenderSvg = ({
|
|
|
21604
21580
|
]
|
|
21605
21581
|
});
|
|
21606
21582
|
};
|
|
21583
|
+
var makeCircle = ({ radius }) => {
|
|
21584
|
+
const instructions = [
|
|
21585
|
+
{
|
|
21586
|
+
type: "M",
|
|
21587
|
+
x: radius,
|
|
21588
|
+
y: 0
|
|
21589
|
+
},
|
|
21590
|
+
{
|
|
21591
|
+
type: "a",
|
|
21592
|
+
rx: radius,
|
|
21593
|
+
ry: radius,
|
|
21594
|
+
xAxisRotation: 0,
|
|
21595
|
+
largeArcFlag: true,
|
|
21596
|
+
sweepFlag: true,
|
|
21597
|
+
dx: 0,
|
|
21598
|
+
dy: radius * 2
|
|
21599
|
+
},
|
|
21600
|
+
{
|
|
21601
|
+
type: "a",
|
|
21602
|
+
rx: radius,
|
|
21603
|
+
ry: radius,
|
|
21604
|
+
xAxisRotation: 0,
|
|
21605
|
+
largeArcFlag: true,
|
|
21606
|
+
sweepFlag: true,
|
|
21607
|
+
dx: 0,
|
|
21608
|
+
dy: -radius * 2
|
|
21609
|
+
},
|
|
21610
|
+
{
|
|
21611
|
+
type: "Z"
|
|
21612
|
+
}
|
|
21613
|
+
];
|
|
21614
|
+
const path = serializeInstructions(instructions);
|
|
21615
|
+
return {
|
|
21616
|
+
height: radius * 2,
|
|
21617
|
+
width: radius * 2,
|
|
21618
|
+
path,
|
|
21619
|
+
instructions,
|
|
21620
|
+
transformOrigin: `${radius} ${radius}`
|
|
21621
|
+
};
|
|
21622
|
+
};
|
|
21607
21623
|
var makeHeart = ({
|
|
21608
21624
|
height,
|
|
21609
21625
|
aspectRatio = 1.1,
|
|
@@ -21700,7 +21716,7 @@ var Heart = ({
|
|
|
21700
21716
|
depthAdjustment = 0,
|
|
21701
21717
|
...props
|
|
21702
21718
|
}) => {
|
|
21703
|
-
return /* @__PURE__ */
|
|
21719
|
+
return /* @__PURE__ */ jsx5(RenderSvg, {
|
|
21704
21720
|
...makeHeart({
|
|
21705
21721
|
aspectRatio,
|
|
21706
21722
|
height,
|
|
@@ -23033,7 +23049,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
23033
23049
|
// ../core/dist/esm/index.mjs
|
|
23034
23050
|
import { createContext } from "react";
|
|
23035
23051
|
import { createContext as createContext2, useContext } from "react";
|
|
23036
|
-
import { jsx as
|
|
23052
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
23037
23053
|
import {
|
|
23038
23054
|
forwardRef as forwardRef2,
|
|
23039
23055
|
useContext as useContext13,
|
|
@@ -23101,7 +23117,7 @@ import {
|
|
|
23101
23117
|
useRef as useRef6,
|
|
23102
23118
|
useState as useState7
|
|
23103
23119
|
} from "react";
|
|
23104
|
-
import { jsx as
|
|
23120
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
23105
23121
|
import { forwardRef as forwardRef6, useCallback as useCallback10, useContext as useContext27 } from "react";
|
|
23106
23122
|
import React11, { createContext as createContext14, useMemo as useMemo12 } from "react";
|
|
23107
23123
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -23203,7 +23219,8 @@ import { useMemo as useMemo27 } from "react";
|
|
|
23203
23219
|
import { createContext as createContext20, useContext as useContext31, useMemo as useMemo26 } from "react";
|
|
23204
23220
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
23205
23221
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
23206
|
-
import React27
|
|
23222
|
+
import React27 from "react";
|
|
23223
|
+
import React28, { createContext as createContext21 } from "react";
|
|
23207
23224
|
import { useContext as useContext32, useMemo as useMemo28, useState as useState17 } from "react";
|
|
23208
23225
|
import { useContext as useContext33 } from "react";
|
|
23209
23226
|
import { useCallback as useCallback15 } from "react";
|
|
@@ -23216,7 +23233,7 @@ import {
|
|
|
23216
23233
|
useState as useState18
|
|
23217
23234
|
} from "react";
|
|
23218
23235
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
23219
|
-
import
|
|
23236
|
+
import React30, {
|
|
23220
23237
|
forwardRef as forwardRef9,
|
|
23221
23238
|
useContext as useContext35,
|
|
23222
23239
|
useEffect as useEffect17,
|
|
@@ -23228,14 +23245,14 @@ import React29, {
|
|
|
23228
23245
|
import { useEffect as useEffect16 } from "react";
|
|
23229
23246
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
23230
23247
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
23231
|
-
import
|
|
23248
|
+
import React32, { useMemo as useMemo31 } from "react";
|
|
23232
23249
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
23233
23250
|
import { Children, forwardRef as forwardRef10, useMemo as useMemo32 } from "react";
|
|
23234
|
-
import
|
|
23235
|
-
import
|
|
23251
|
+
import React33 from "react";
|
|
23252
|
+
import React34, { createContext as createContext22 } from "react";
|
|
23236
23253
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
23237
23254
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
23238
|
-
import
|
|
23255
|
+
import React36 from "react";
|
|
23239
23256
|
import { forwardRef as forwardRef12, useCallback as useCallback16, useContext as useContext37 } from "react";
|
|
23240
23257
|
import {
|
|
23241
23258
|
forwardRef as forwardRef11,
|
|
@@ -23282,7 +23299,7 @@ var IsPlayerContext = createContext2(false);
|
|
|
23282
23299
|
var IsPlayerContextProvider = ({
|
|
23283
23300
|
children
|
|
23284
23301
|
}) => {
|
|
23285
|
-
return /* @__PURE__ */
|
|
23302
|
+
return /* @__PURE__ */ jsx11(IsPlayerContext.Provider, {
|
|
23286
23303
|
value: true,
|
|
23287
23304
|
children
|
|
23288
23305
|
});
|
|
@@ -23293,7 +23310,7 @@ var useIsPlayer = () => {
|
|
|
23293
23310
|
function truthy2(value) {
|
|
23294
23311
|
return Boolean(value);
|
|
23295
23312
|
}
|
|
23296
|
-
var VERSION = "4.0.
|
|
23313
|
+
var VERSION = "4.0.432";
|
|
23297
23314
|
var checkMultipleRemotionVersions = () => {
|
|
23298
23315
|
if (typeof globalThis === "undefined") {
|
|
23299
23316
|
return;
|
|
@@ -23451,6 +23468,7 @@ __export2(exports_timeline_position_state, {
|
|
|
23451
23468
|
useTimelineSetFrame: () => useTimelineSetFrame,
|
|
23452
23469
|
useTimelinePosition: () => useTimelinePosition,
|
|
23453
23470
|
usePlayingState: () => usePlayingState,
|
|
23471
|
+
useAbsoluteTimelinePosition: () => useAbsoluteTimelinePosition,
|
|
23454
23472
|
persistCurrentFrame: () => persistCurrentFrame,
|
|
23455
23473
|
getInitialFrameState: () => getInitialFrameState,
|
|
23456
23474
|
getFrameForComposition: () => getFrameForComposition
|
|
@@ -23847,9 +23865,8 @@ var getFrameForComposition = (composition) => {
|
|
|
23847
23865
|
}
|
|
23848
23866
|
return window.remotion_initialFrame ?? 0;
|
|
23849
23867
|
};
|
|
23850
|
-
var
|
|
23868
|
+
var useTimelinePositionFromContext = (state) => {
|
|
23851
23869
|
const videoConfig = useVideo();
|
|
23852
|
-
const state = useContext5(TimelineContext);
|
|
23853
23870
|
const env = useRemotionEnvironment();
|
|
23854
23871
|
if (!videoConfig) {
|
|
23855
23872
|
return typeof window === "undefined" ? 0 : window.remotion_initialFrame ?? 0;
|
|
@@ -23857,6 +23874,14 @@ var useTimelinePosition = () => {
|
|
|
23857
23874
|
const unclamped = state.frame[videoConfig.id] ?? (env.isPlayer ? 0 : getFrameForComposition(videoConfig.id));
|
|
23858
23875
|
return Math.min(videoConfig.durationInFrames - 1, unclamped);
|
|
23859
23876
|
};
|
|
23877
|
+
var useTimelinePosition = () => {
|
|
23878
|
+
const state = useContext5(TimelineContext);
|
|
23879
|
+
return useTimelinePositionFromContext(state);
|
|
23880
|
+
};
|
|
23881
|
+
var useAbsoluteTimelinePosition = () => {
|
|
23882
|
+
const state = useContext5(AbsoluteTimeContext);
|
|
23883
|
+
return useTimelinePositionFromContext(state);
|
|
23884
|
+
};
|
|
23860
23885
|
var useTimelineSetFrame = () => {
|
|
23861
23886
|
const { setFrame } = useContext5(SetTimelineContext);
|
|
23862
23887
|
return setFrame;
|
|
@@ -24124,6 +24149,19 @@ var TimelineContext = createContext9({
|
|
|
24124
24149
|
},
|
|
24125
24150
|
audioAndVideoTags: { current: [] }
|
|
24126
24151
|
});
|
|
24152
|
+
var AbsoluteTimeContext = createContext9({
|
|
24153
|
+
frame: {},
|
|
24154
|
+
playing: false,
|
|
24155
|
+
playbackRate: 1,
|
|
24156
|
+
rootId: "",
|
|
24157
|
+
imperativePlaying: {
|
|
24158
|
+
current: false
|
|
24159
|
+
},
|
|
24160
|
+
setPlaybackRate: () => {
|
|
24161
|
+
throw new Error("default");
|
|
24162
|
+
},
|
|
24163
|
+
audioAndVideoTags: { current: [] }
|
|
24164
|
+
});
|
|
24127
24165
|
var TimelineContextProvider = ({ children, frameState }) => {
|
|
24128
24166
|
const [playing, setPlaying] = useState2(false);
|
|
24129
24167
|
const imperativePlaying = useRef(false);
|
|
@@ -24176,11 +24214,14 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
24176
24214
|
setPlaying
|
|
24177
24215
|
};
|
|
24178
24216
|
}, []);
|
|
24179
|
-
return /* @__PURE__ */ jsx42(
|
|
24217
|
+
return /* @__PURE__ */ jsx42(AbsoluteTimeContext.Provider, {
|
|
24180
24218
|
value: timelineContextValue,
|
|
24181
|
-
children: /* @__PURE__ */ jsx42(
|
|
24182
|
-
value:
|
|
24183
|
-
children
|
|
24219
|
+
children: /* @__PURE__ */ jsx42(TimelineContext.Provider, {
|
|
24220
|
+
value: timelineContextValue,
|
|
24221
|
+
children: /* @__PURE__ */ jsx42(SetTimelineContext.Provider, {
|
|
24222
|
+
value: setTimelineContextValue,
|
|
24223
|
+
children
|
|
24224
|
+
})
|
|
24184
24225
|
})
|
|
24185
24226
|
});
|
|
24186
24227
|
};
|
|
@@ -24364,22 +24405,28 @@ var SequenceVisibilityToggleContext = React8.createContext({
|
|
|
24364
24405
|
throw new Error("SequenceVisibilityToggle not initialized");
|
|
24365
24406
|
}
|
|
24366
24407
|
});
|
|
24367
|
-
var
|
|
24368
|
-
|
|
24369
|
-
|
|
24370
|
-
throw new Error("
|
|
24408
|
+
var VisualModeOverridesContext = React8.createContext({
|
|
24409
|
+
dragOverrides: {},
|
|
24410
|
+
setDragOverrides: () => {
|
|
24411
|
+
throw new Error("VisualModeOverridesContext not initialized");
|
|
24371
24412
|
},
|
|
24372
|
-
|
|
24373
|
-
throw new Error("
|
|
24374
|
-
}
|
|
24413
|
+
clearDragOverrides: () => {
|
|
24414
|
+
throw new Error("VisualModeOverridesContext not initialized");
|
|
24415
|
+
},
|
|
24416
|
+
codeValues: {},
|
|
24417
|
+
setCodeValues: () => {
|
|
24418
|
+
throw new Error("VisualModeOverridesContext not initialized");
|
|
24419
|
+
},
|
|
24420
|
+
visualModeEnabled: false
|
|
24375
24421
|
});
|
|
24376
|
-
var SequenceManagerProvider = ({ children }) => {
|
|
24422
|
+
var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
24377
24423
|
const [sequences, setSequences] = useState4([]);
|
|
24378
24424
|
const [hidden, setHidden] = useState4({});
|
|
24379
|
-
const [
|
|
24380
|
-
const controlOverridesRef = useRef3(
|
|
24381
|
-
controlOverridesRef.current =
|
|
24382
|
-
const
|
|
24425
|
+
const [dragOverrides, setControlOverrides] = useState4({});
|
|
24426
|
+
const controlOverridesRef = useRef3(dragOverrides);
|
|
24427
|
+
controlOverridesRef.current = dragOverrides;
|
|
24428
|
+
const [codeValues, setCodeValuesMapState] = useState4({});
|
|
24429
|
+
const setDragOverrides = useCallback3((sequenceId, key, value) => {
|
|
24383
24430
|
setControlOverrides((prev) => ({
|
|
24384
24431
|
...prev,
|
|
24385
24432
|
[sequenceId]: {
|
|
@@ -24388,7 +24435,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
24388
24435
|
}
|
|
24389
24436
|
}));
|
|
24390
24437
|
}, []);
|
|
24391
|
-
const
|
|
24438
|
+
const clearDragOverrides = useCallback3((sequenceId) => {
|
|
24392
24439
|
setControlOverrides((prev) => {
|
|
24393
24440
|
if (!prev[sequenceId]) {
|
|
24394
24441
|
return prev;
|
|
@@ -24398,6 +24445,22 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
24398
24445
|
return next;
|
|
24399
24446
|
});
|
|
24400
24447
|
}, []);
|
|
24448
|
+
const setCodeValues = useCallback3((sequenceId, values) => {
|
|
24449
|
+
setCodeValuesMapState((prev) => {
|
|
24450
|
+
if (prev[sequenceId] === values) {
|
|
24451
|
+
return prev;
|
|
24452
|
+
}
|
|
24453
|
+
if (values === null) {
|
|
24454
|
+
if (!(sequenceId in prev)) {
|
|
24455
|
+
return prev;
|
|
24456
|
+
}
|
|
24457
|
+
const next = { ...prev };
|
|
24458
|
+
delete next[sequenceId];
|
|
24459
|
+
return next;
|
|
24460
|
+
}
|
|
24461
|
+
return { ...prev, [sequenceId]: values };
|
|
24462
|
+
});
|
|
24463
|
+
}, []);
|
|
24401
24464
|
const registerSequence = useCallback3((seq) => {
|
|
24402
24465
|
setSequences((seqs) => {
|
|
24403
24466
|
return [...seqs, seq];
|
|
@@ -24421,16 +24484,26 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
24421
24484
|
}, [hidden]);
|
|
24422
24485
|
const overrideContext = useMemo9(() => {
|
|
24423
24486
|
return {
|
|
24424
|
-
|
|
24425
|
-
|
|
24426
|
-
|
|
24487
|
+
visualModeEnabled,
|
|
24488
|
+
dragOverrides,
|
|
24489
|
+
setDragOverrides,
|
|
24490
|
+
clearDragOverrides,
|
|
24491
|
+
codeValues,
|
|
24492
|
+
setCodeValues
|
|
24427
24493
|
};
|
|
24428
|
-
}, [
|
|
24494
|
+
}, [
|
|
24495
|
+
visualModeEnabled,
|
|
24496
|
+
dragOverrides,
|
|
24497
|
+
setDragOverrides,
|
|
24498
|
+
clearDragOverrides,
|
|
24499
|
+
codeValues,
|
|
24500
|
+
setCodeValues
|
|
24501
|
+
]);
|
|
24429
24502
|
return /* @__PURE__ */ jsx72(SequenceManager.Provider, {
|
|
24430
24503
|
value: sequenceContext,
|
|
24431
24504
|
children: /* @__PURE__ */ jsx72(SequenceVisibilityToggleContext.Provider, {
|
|
24432
24505
|
value: hiddenContext,
|
|
24433
|
-
children: /* @__PURE__ */ jsx72(
|
|
24506
|
+
children: /* @__PURE__ */ jsx72(VisualModeOverridesContext.Provider, {
|
|
24434
24507
|
value: overrideContext,
|
|
24435
24508
|
children
|
|
24436
24509
|
})
|
|
@@ -24595,7 +24668,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
24595
24668
|
};
|
|
24596
24669
|
var RegularSequence = forwardRef2(RegularSequenceRefForwardingFunction);
|
|
24597
24670
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
24598
|
-
const
|
|
24671
|
+
const parentPremountContext = useContext13(PremountContext);
|
|
24672
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
24599
24673
|
if (props.layout === "none") {
|
|
24600
24674
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
24601
24675
|
}
|
|
@@ -24629,9 +24703,8 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
24629
24703
|
styleWhilePremounted,
|
|
24630
24704
|
styleWhilePostmounted
|
|
24631
24705
|
]);
|
|
24632
|
-
const parentPremountContext = useContext13(PremountContext);
|
|
24633
24706
|
const { playing } = useContext13(TimelineContext);
|
|
24634
|
-
const premountFramesRemaining =
|
|
24707
|
+
const premountFramesRemaining = premountingActive ? from - frame : 0;
|
|
24635
24708
|
const premountContextValue = useMemo10(() => {
|
|
24636
24709
|
return {
|
|
24637
24710
|
premountFramesRemaining,
|
|
@@ -25105,7 +25178,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
25105
25178
|
renderAssets
|
|
25106
25179
|
};
|
|
25107
25180
|
}, [renderAssets, registerRenderAsset, unregisterRenderAsset]);
|
|
25108
|
-
return /* @__PURE__ */
|
|
25181
|
+
return /* @__PURE__ */ jsx112(RenderAssetManager.Provider, {
|
|
25109
25182
|
value: contextValue,
|
|
25110
25183
|
children
|
|
25111
25184
|
});
|
|
@@ -25776,6 +25849,63 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
|
|
|
25776
25849
|
latencyHint: audioLatencyHint,
|
|
25777
25850
|
audioEnabled
|
|
25778
25851
|
});
|
|
25852
|
+
const audioSyncAnchor = useMemo15(() => ({ value: 0 }), []);
|
|
25853
|
+
const prevEndTimes = useRef7({ scheduledEndTime: null, mediaEndTime: null });
|
|
25854
|
+
const scheduleAudioNode = useMemo15(() => {
|
|
25855
|
+
return ({
|
|
25856
|
+
node,
|
|
25857
|
+
mediaTimestamp,
|
|
25858
|
+
targetTime,
|
|
25859
|
+
currentTime,
|
|
25860
|
+
sequenceEndTime,
|
|
25861
|
+
sequenceStartTime,
|
|
25862
|
+
debugAudioScheduling
|
|
25863
|
+
}) => {
|
|
25864
|
+
if (!audioContext) {
|
|
25865
|
+
throw new Error("Audio context not found");
|
|
25866
|
+
}
|
|
25867
|
+
const bufferDuration = node.buffer?.duration ?? 0;
|
|
25868
|
+
const unclampedMediaEndTime = mediaTimestamp + bufferDuration;
|
|
25869
|
+
const needsTrimEnd = unclampedMediaEndTime > sequenceEndTime;
|
|
25870
|
+
const needsTrimStart = mediaTimestamp < sequenceStartTime;
|
|
25871
|
+
const offsetBecauseOfTrim = needsTrimStart ? sequenceStartTime - mediaTimestamp : 0;
|
|
25872
|
+
const offsetBecauseOfTooLate = targetTime < 0 ? -targetTime : 0;
|
|
25873
|
+
const offset = offsetBecauseOfTrim + offsetBecauseOfTooLate;
|
|
25874
|
+
const duration = needsTrimEnd ? bufferDuration - Math.max(0, unclampedMediaEndTime - sequenceEndTime) - offset : bufferDuration - offset;
|
|
25875
|
+
const scheduledTime = targetTime + currentTime + offset;
|
|
25876
|
+
if (offset < 0) {
|
|
25877
|
+
throw new Error("offset < 0: " + JSON.stringify({
|
|
25878
|
+
offset,
|
|
25879
|
+
targetTime,
|
|
25880
|
+
currentTime,
|
|
25881
|
+
offsetBecauseOfTrim,
|
|
25882
|
+
offsetBecauseOfTooLate
|
|
25883
|
+
}));
|
|
25884
|
+
}
|
|
25885
|
+
if (duration > 0) {
|
|
25886
|
+
node.start(scheduledTime, offset, duration);
|
|
25887
|
+
}
|
|
25888
|
+
const scheduledEndTime = scheduledTime + duration / node.playbackRate.value;
|
|
25889
|
+
const mediaTime = mediaTimestamp + offset;
|
|
25890
|
+
const mediaEndTime = mediaTime + duration;
|
|
25891
|
+
const latency = audioContext.baseLatency + audioContext.outputLatency;
|
|
25892
|
+
const timeDiff = scheduledTime - currentTime - latency;
|
|
25893
|
+
const prev = prevEndTimes.current;
|
|
25894
|
+
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
25895
|
+
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
25896
|
+
if (debugAudioScheduling) {
|
|
25897
|
+
Log.info({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" + currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + audioContext.state);
|
|
25898
|
+
}
|
|
25899
|
+
prev.scheduledEndTime = scheduledEndTime;
|
|
25900
|
+
prev.mediaEndTime = mediaEndTime;
|
|
25901
|
+
return duration > 0 ? {
|
|
25902
|
+
type: "started",
|
|
25903
|
+
scheduledTime
|
|
25904
|
+
} : {
|
|
25905
|
+
type: "not-started"
|
|
25906
|
+
};
|
|
25907
|
+
};
|
|
25908
|
+
}, [audioContext, logLevel]);
|
|
25779
25909
|
const refs = useMemo15(() => {
|
|
25780
25910
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
25781
25911
|
const ref = createRef2();
|
|
@@ -25922,7 +26052,9 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
|
|
|
25922
26052
|
updateAudio,
|
|
25923
26053
|
playAllAudios,
|
|
25924
26054
|
numberOfAudioTags,
|
|
25925
|
-
audioContext
|
|
26055
|
+
audioContext,
|
|
26056
|
+
audioSyncAnchor,
|
|
26057
|
+
scheduleAudioNode
|
|
25926
26058
|
};
|
|
25927
26059
|
}, [
|
|
25928
26060
|
numberOfAudioTags,
|
|
@@ -25930,7 +26062,9 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
|
|
|
25930
26062
|
registerAudio,
|
|
25931
26063
|
unregisterAudio,
|
|
25932
26064
|
updateAudio,
|
|
25933
|
-
audioContext
|
|
26065
|
+
audioContext,
|
|
26066
|
+
audioSyncAnchor,
|
|
26067
|
+
scheduleAudioNode
|
|
25934
26068
|
]);
|
|
25935
26069
|
return /* @__PURE__ */ jsxs2(SharedAudioContext.Provider, {
|
|
25936
26070
|
value,
|
|
@@ -28071,6 +28205,7 @@ var ImgRefForwarding = ({
|
|
|
28071
28205
|
imageRef.current.setAttribute("src", newSrc);
|
|
28072
28206
|
}, timeout);
|
|
28073
28207
|
}, []);
|
|
28208
|
+
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
28074
28209
|
const didGetError = useCallback12((e) => {
|
|
28075
28210
|
if (!errors.current) {
|
|
28076
28211
|
return;
|
|
@@ -28086,9 +28221,10 @@ var ImgRefForwarding = ({
|
|
|
28086
28221
|
retryIn(backoff);
|
|
28087
28222
|
return;
|
|
28088
28223
|
}
|
|
28089
|
-
|
|
28090
|
-
|
|
28091
|
-
|
|
28224
|
+
try {
|
|
28225
|
+
cancelRender2("Error loading image with src: " + imageRef.current?.src);
|
|
28226
|
+
} catch {}
|
|
28227
|
+
}, [cancelRender2, maxRetries, onError, retryIn]);
|
|
28092
28228
|
if (typeof window !== "undefined") {
|
|
28093
28229
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
28094
28230
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
@@ -28133,7 +28269,7 @@ var ImgRefForwarding = ({
|
|
|
28133
28269
|
current.src = actualSrc;
|
|
28134
28270
|
current.decode().then(onComplete).catch((err) => {
|
|
28135
28271
|
console.warn(err);
|
|
28136
|
-
if (current.complete) {
|
|
28272
|
+
if (current.complete && current.naturalWidth > 0 && current.naturalHeight > 0) {
|
|
28137
28273
|
onComplete();
|
|
28138
28274
|
} else {
|
|
28139
28275
|
current.addEventListener("load", onComplete);
|
|
@@ -28333,6 +28469,26 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
|
|
|
28333
28469
|
}
|
|
28334
28470
|
`;
|
|
28335
28471
|
};
|
|
28472
|
+
var getEffectiveVisualModeValue = ({
|
|
28473
|
+
codeValue,
|
|
28474
|
+
runtimeValue,
|
|
28475
|
+
dragOverrideValue,
|
|
28476
|
+
defaultValue
|
|
28477
|
+
}) => {
|
|
28478
|
+
if (dragOverrideValue !== undefined) {
|
|
28479
|
+
return dragOverrideValue;
|
|
28480
|
+
}
|
|
28481
|
+
if (!codeValue) {
|
|
28482
|
+
return runtimeValue;
|
|
28483
|
+
}
|
|
28484
|
+
if (!codeValue.canUpdate) {
|
|
28485
|
+
return runtimeValue;
|
|
28486
|
+
}
|
|
28487
|
+
if (codeValue.codeValue === undefined) {
|
|
28488
|
+
return defaultValue;
|
|
28489
|
+
}
|
|
28490
|
+
return codeValue.codeValue;
|
|
28491
|
+
};
|
|
28336
28492
|
var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
28337
28493
|
var getPreviewDomElement = () => {
|
|
28338
28494
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
@@ -28395,7 +28551,8 @@ var RemotionRootContexts = ({
|
|
|
28395
28551
|
videoEnabled,
|
|
28396
28552
|
audioEnabled,
|
|
28397
28553
|
frameState,
|
|
28398
|
-
nonceContextSeed
|
|
28554
|
+
nonceContextSeed,
|
|
28555
|
+
visualModeEnabled
|
|
28399
28556
|
}) => {
|
|
28400
28557
|
const nonceContext = useMemo27(() => {
|
|
28401
28558
|
let counter = 0;
|
|
@@ -28418,6 +28575,7 @@ var RemotionRootContexts = ({
|
|
|
28418
28575
|
children: /* @__PURE__ */ jsx27(EditorPropsProvider, {
|
|
28419
28576
|
children: /* @__PURE__ */ jsx27(PrefetchProvider, {
|
|
28420
28577
|
children: /* @__PURE__ */ jsx27(SequenceManagerProvider, {
|
|
28578
|
+
visualModeEnabled,
|
|
28421
28579
|
children: /* @__PURE__ */ jsx27(SharedAudioContextProvider, {
|
|
28422
28580
|
numberOfAudioTags,
|
|
28423
28581
|
audioLatencyHint,
|
|
@@ -28600,6 +28758,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
28600
28758
|
};
|
|
28601
28759
|
}
|
|
28602
28760
|
};
|
|
28761
|
+
var SequenceStackTracesUpdateContext = React27.createContext(() => {});
|
|
28603
28762
|
var getEnvVariables = () => {
|
|
28604
28763
|
if (getRemotionEnvironment().isRendering) {
|
|
28605
28764
|
const param = window.remotion_envVariables;
|
|
@@ -28625,7 +28784,7 @@ var setupEnvVariables = () => {
|
|
|
28625
28784
|
window.process.env[key] = env[key];
|
|
28626
28785
|
});
|
|
28627
28786
|
};
|
|
28628
|
-
var CurrentScaleContext =
|
|
28787
|
+
var CurrentScaleContext = React28.createContext(null);
|
|
28629
28788
|
var PreviewSizeContext = createContext21({
|
|
28630
28789
|
setSize: () => {
|
|
28631
28790
|
return;
|
|
@@ -28664,34 +28823,62 @@ var useSchema = (schema, currentValue) => {
|
|
|
28664
28823
|
return earlyReturn;
|
|
28665
28824
|
}
|
|
28666
28825
|
const [overrideId] = useState17(() => String(Math.random()));
|
|
28667
|
-
const {
|
|
28668
|
-
|
|
28826
|
+
const {
|
|
28827
|
+
visualModeEnabled,
|
|
28828
|
+
dragOverrides: overrides,
|
|
28829
|
+
codeValues
|
|
28830
|
+
} = useContext32(VisualModeOverridesContext);
|
|
28831
|
+
const controls = useMemo28(() => {
|
|
28832
|
+
if (!visualModeEnabled) {
|
|
28833
|
+
return;
|
|
28834
|
+
}
|
|
28669
28835
|
if (schema === null || currentValue === null) {
|
|
28836
|
+
return;
|
|
28837
|
+
}
|
|
28838
|
+
return {
|
|
28839
|
+
schema,
|
|
28840
|
+
currentValue,
|
|
28841
|
+
overrideId
|
|
28842
|
+
};
|
|
28843
|
+
}, [schema, currentValue, overrideId, visualModeEnabled]);
|
|
28844
|
+
return useMemo28(() => {
|
|
28845
|
+
if (controls === undefined || currentValue === null || schema === null || !visualModeEnabled) {
|
|
28670
28846
|
return {
|
|
28671
28847
|
controls: undefined,
|
|
28672
28848
|
values: currentValue ?? {}
|
|
28673
28849
|
};
|
|
28674
28850
|
}
|
|
28675
28851
|
const overrideValues = overrides[overrideId] ?? {};
|
|
28676
|
-
const
|
|
28677
|
-
|
|
28678
|
-
|
|
28679
|
-
|
|
28680
|
-
|
|
28852
|
+
const propStatus = codeValues[overrideId];
|
|
28853
|
+
const currentValueKeys = Object.keys(currentValue);
|
|
28854
|
+
const keysToUpdate = new Set(currentValueKeys).values();
|
|
28855
|
+
const merged = {};
|
|
28856
|
+
for (const key of keysToUpdate) {
|
|
28857
|
+
const codeValueStatus = propStatus?.[key] ?? null;
|
|
28858
|
+
merged[key] = getEffectiveVisualModeValue({
|
|
28859
|
+
codeValue: codeValueStatus,
|
|
28860
|
+
runtimeValue: currentValue[key],
|
|
28861
|
+
dragOverrideValue: overrideValues[key],
|
|
28862
|
+
defaultValue: schema[key]?.default
|
|
28863
|
+
});
|
|
28681
28864
|
}
|
|
28682
28865
|
return {
|
|
28683
|
-
controls
|
|
28684
|
-
schema,
|
|
28685
|
-
currentValue,
|
|
28686
|
-
overrideId
|
|
28687
|
-
},
|
|
28866
|
+
controls,
|
|
28688
28867
|
values: merged
|
|
28689
28868
|
};
|
|
28690
|
-
}, [
|
|
28869
|
+
}, [
|
|
28870
|
+
controls,
|
|
28871
|
+
currentValue,
|
|
28872
|
+
overrideId,
|
|
28873
|
+
overrides,
|
|
28874
|
+
codeValues,
|
|
28875
|
+
schema,
|
|
28876
|
+
visualModeEnabled
|
|
28877
|
+
]);
|
|
28691
28878
|
};
|
|
28692
28879
|
var useSequenceControlOverride = (key) => {
|
|
28693
28880
|
const seqContext = useContext33(SequenceContext);
|
|
28694
|
-
const { overrides } = useContext33(
|
|
28881
|
+
const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
|
|
28695
28882
|
if (!seqContext) {
|
|
28696
28883
|
return;
|
|
28697
28884
|
}
|
|
@@ -28947,7 +29134,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
28947
29134
|
ref: videoRef
|
|
28948
29135
|
});
|
|
28949
29136
|
}, [context.audioContext]);
|
|
28950
|
-
const effectToUse =
|
|
29137
|
+
const effectToUse = React30.useInsertionEffect ?? React30.useLayoutEffect;
|
|
28951
29138
|
effectToUse(() => {
|
|
28952
29139
|
return () => {
|
|
28953
29140
|
requestAnimationFrame(() => {
|
|
@@ -29306,18 +29493,18 @@ var OffthreadVideo = ({
|
|
|
29306
29493
|
addSequenceStackTraces(OffthreadVideo);
|
|
29307
29494
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
29308
29495
|
function useRemotionContexts() {
|
|
29309
|
-
const compositionManagerCtx =
|
|
29310
|
-
const timelineContext =
|
|
29311
|
-
const setTimelineContext =
|
|
29312
|
-
const sequenceContext =
|
|
29313
|
-
const nonceContext =
|
|
29314
|
-
const canUseRemotionHooksContext =
|
|
29315
|
-
const preloadContext =
|
|
29316
|
-
const resolveCompositionContext =
|
|
29317
|
-
const renderAssetManagerContext =
|
|
29318
|
-
const sequenceManagerContext =
|
|
29319
|
-
const bufferManagerContext =
|
|
29320
|
-
const logLevelContext =
|
|
29496
|
+
const compositionManagerCtx = React32.useContext(CompositionManager);
|
|
29497
|
+
const timelineContext = React32.useContext(TimelineContext);
|
|
29498
|
+
const setTimelineContext = React32.useContext(SetTimelineContext);
|
|
29499
|
+
const sequenceContext = React32.useContext(SequenceContext);
|
|
29500
|
+
const nonceContext = React32.useContext(NonceContext);
|
|
29501
|
+
const canUseRemotionHooksContext = React32.useContext(CanUseRemotionHooks);
|
|
29502
|
+
const preloadContext = React32.useContext(PreloadContext);
|
|
29503
|
+
const resolveCompositionContext = React32.useContext(ResolveCompositionContext);
|
|
29504
|
+
const renderAssetManagerContext = React32.useContext(RenderAssetManager);
|
|
29505
|
+
const sequenceManagerContext = React32.useContext(SequenceManager);
|
|
29506
|
+
const bufferManagerContext = React32.useContext(BufferingContextReact);
|
|
29507
|
+
const logLevelContext = React32.useContext(LogLevelContext);
|
|
29321
29508
|
return useMemo31(() => ({
|
|
29322
29509
|
compositionManagerCtx,
|
|
29323
29510
|
timelineContext,
|
|
@@ -29392,6 +29579,7 @@ var Internals = {
|
|
|
29392
29579
|
useUnsafeVideoConfig,
|
|
29393
29580
|
useFrameForVolumeProp,
|
|
29394
29581
|
useTimelinePosition,
|
|
29582
|
+
useAbsoluteTimelinePosition,
|
|
29395
29583
|
evaluateVolume,
|
|
29396
29584
|
getAbsoluteSrc,
|
|
29397
29585
|
Timeline: exports_timeline_position_state,
|
|
@@ -29401,8 +29589,9 @@ var Internals = {
|
|
|
29401
29589
|
VideoForPreview,
|
|
29402
29590
|
CompositionManager,
|
|
29403
29591
|
CompositionSetters,
|
|
29404
|
-
|
|
29592
|
+
VisualModeOverridesContext,
|
|
29405
29593
|
SequenceManager,
|
|
29594
|
+
SequenceStackTracesUpdateContext,
|
|
29406
29595
|
SequenceVisibilityToggleContext,
|
|
29407
29596
|
useSchema,
|
|
29408
29597
|
useSequenceControlOverride,
|
|
@@ -29486,7 +29675,9 @@ var Internals = {
|
|
|
29486
29675
|
TimelinePosition: exports_timeline_position_state,
|
|
29487
29676
|
DelayRenderContextType,
|
|
29488
29677
|
TimelineContext,
|
|
29489
|
-
|
|
29678
|
+
AbsoluteTimeContext,
|
|
29679
|
+
RenderAssetManagerProvider,
|
|
29680
|
+
getEffectiveVisualModeValue
|
|
29490
29681
|
};
|
|
29491
29682
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
29492
29683
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -29515,9 +29706,9 @@ var validateFrame = ({
|
|
|
29515
29706
|
}
|
|
29516
29707
|
};
|
|
29517
29708
|
var flattenChildren = (children) => {
|
|
29518
|
-
const childrenArray =
|
|
29709
|
+
const childrenArray = React33.Children.toArray(children);
|
|
29519
29710
|
return childrenArray.reduce((flatChildren, child) => {
|
|
29520
|
-
if (child.type ===
|
|
29711
|
+
if (child.type === React33.Fragment) {
|
|
29521
29712
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
29522
29713
|
}
|
|
29523
29714
|
flatChildren.push(child);
|
|
@@ -29538,7 +29729,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
29538
29729
|
});
|
|
29539
29730
|
};
|
|
29540
29731
|
var useRequireToBeInsideSeries = () => {
|
|
29541
|
-
const isInsideSeries =
|
|
29732
|
+
const isInsideSeries = React34.useContext(IsInsideSeriesContext);
|
|
29542
29733
|
if (!isInsideSeries) {
|
|
29543
29734
|
throw new Error("This component must be inside a <Series /> component.");
|
|
29544
29735
|
}
|
|
@@ -30418,8 +30609,8 @@ import { jsx as jsx83 } from "react/jsx-runtime";
|
|
|
30418
30609
|
import React52 from "react";
|
|
30419
30610
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
30420
30611
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
30421
|
-
import { jsx as
|
|
30422
|
-
import * as
|
|
30612
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
30613
|
+
import * as React342 from "react";
|
|
30423
30614
|
import * as ReactDOM4 from "react-dom";
|
|
30424
30615
|
import React9 from "react";
|
|
30425
30616
|
import * as React6 from "react";
|
|
@@ -30458,21 +30649,21 @@ import * as React252 from "react";
|
|
|
30458
30649
|
import * as React26 from "react";
|
|
30459
30650
|
import { jsx as jsx223 } from "react/jsx-runtime";
|
|
30460
30651
|
import * as React332 from "react";
|
|
30461
|
-
import * as
|
|
30652
|
+
import * as React29 from "react";
|
|
30462
30653
|
import { useState as useState112 } from "react";
|
|
30463
30654
|
import * as React272 from "react";
|
|
30464
|
-
import * as
|
|
30655
|
+
import * as React282 from "react";
|
|
30465
30656
|
import * as React322 from "react";
|
|
30466
|
-
import * as
|
|
30467
|
-
import * as
|
|
30657
|
+
import * as React31 from "react";
|
|
30658
|
+
import * as React302 from "react";
|
|
30468
30659
|
import { Fragment as Fragment62, jsx as jsx232, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
30469
30660
|
import { forwardRef as forwardRef132, createElement as createElement7 } from "react";
|
|
30470
30661
|
import { forwardRef as forwardRef122, createElement as createElement6 } from "react";
|
|
30471
|
-
import * as
|
|
30662
|
+
import * as React35 from "react";
|
|
30472
30663
|
import { jsx as jsx242, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
30473
30664
|
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
30474
30665
|
import * as React48 from "react";
|
|
30475
|
-
import * as
|
|
30666
|
+
import * as React362 from "react";
|
|
30476
30667
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
30477
30668
|
import * as React46 from "react";
|
|
30478
30669
|
import React39 from "react";
|
|
@@ -31070,11 +31261,11 @@ var Link = ({
|
|
|
31070
31261
|
});
|
|
31071
31262
|
};
|
|
31072
31263
|
var PlanePaperIcon = (props) => {
|
|
31073
|
-
return /* @__PURE__ */
|
|
31264
|
+
return /* @__PURE__ */ jsx113("svg", {
|
|
31074
31265
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31075
31266
|
...props,
|
|
31076
31267
|
viewBox: "0 0 576 512",
|
|
31077
|
-
children: /* @__PURE__ */
|
|
31268
|
+
children: /* @__PURE__ */ jsx113("path", {
|
|
31078
31269
|
fill: "currentcolor",
|
|
31079
31270
|
d: "M169.9 280L94.9 448.6 461.2 280 169.9 280zm291.3-48L94.9 63.4 169.9 232 461.2 232zM34.8 465.6L128 256 34.8 46.4C33 42.2 32 37.6 32 33 32 14.8 46.7 0 64.8 0 69.5 0 74.2 1 78.5 3L554.2 222c13.3 6.1 21.8 19.4 21.8 34s-8.5 27.9-21.8 34L78.5 509c-4.3 2-9 3-13.7 3-18.1 0-32.8-14.8-32.8-33 0-4.6 1-9.2 2.8-13.4z"
|
|
31080
31271
|
})
|
|
@@ -34053,7 +34244,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
34053
34244
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
34054
34245
|
};
|
|
34055
34246
|
var __assign = function() {
|
|
34056
|
-
__assign = Object.assign || function
|
|
34247
|
+
__assign = Object.assign || function __assign(t) {
|
|
34057
34248
|
for (var s, i = 1, n = arguments.length;i < n; i++) {
|
|
34058
34249
|
s = arguments[i];
|
|
34059
34250
|
for (var p in s)
|
|
@@ -34243,7 +34434,7 @@ var SideCar = function(_a) {
|
|
|
34243
34434
|
if (!Target) {
|
|
34244
34435
|
throw new Error("Sidecar medium not found");
|
|
34245
34436
|
}
|
|
34246
|
-
return
|
|
34437
|
+
return React282.createElement(Target, __assign({}, rest));
|
|
34247
34438
|
};
|
|
34248
34439
|
SideCar.isSideCarExport = true;
|
|
34249
34440
|
function exportSidecar(medium, exported) {
|
|
@@ -34254,9 +34445,9 @@ var effectCar = createSidecarMedium();
|
|
|
34254
34445
|
var nothing = function() {
|
|
34255
34446
|
return;
|
|
34256
34447
|
};
|
|
34257
|
-
var RemoveScroll =
|
|
34258
|
-
var ref =
|
|
34259
|
-
var _a =
|
|
34448
|
+
var RemoveScroll = React29.forwardRef(function(props, parentRef) {
|
|
34449
|
+
var ref = React29.useRef(null);
|
|
34450
|
+
var _a = React29.useState({
|
|
34260
34451
|
onScrollCapture: nothing,
|
|
34261
34452
|
onWheelCapture: nothing,
|
|
34262
34453
|
onTouchMoveCapture: nothing
|
|
@@ -34265,7 +34456,7 @@ var RemoveScroll = React292.forwardRef(function(props, parentRef) {
|
|
|
34265
34456
|
var SideCar2 = sideCar;
|
|
34266
34457
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
34267
34458
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
34268
|
-
return
|
|
34459
|
+
return React29.createElement(React29.Fragment, null, enabled && React29.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }), forwardProps ? React29.cloneElement(React29.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React29.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children));
|
|
34269
34460
|
});
|
|
34270
34461
|
RemoveScroll.defaultProps = {
|
|
34271
34462
|
enabled: true,
|
|
@@ -34333,7 +34524,7 @@ var stylesheetSingleton = function() {
|
|
|
34333
34524
|
var styleHookSingleton = function() {
|
|
34334
34525
|
var sheet = stylesheetSingleton();
|
|
34335
34526
|
return function(styles, isDynamic) {
|
|
34336
|
-
|
|
34527
|
+
React302.useEffect(function() {
|
|
34337
34528
|
sheet.add(styles);
|
|
34338
34529
|
return function() {
|
|
34339
34530
|
sheet.remove();
|
|
@@ -34438,7 +34629,7 @@ var getCurrentUseCounter = function() {
|
|
|
34438
34629
|
return isFinite(counter) ? counter : 0;
|
|
34439
34630
|
};
|
|
34440
34631
|
var useLockAttribute = function() {
|
|
34441
|
-
|
|
34632
|
+
React31.useEffect(function() {
|
|
34442
34633
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
34443
34634
|
return function() {
|
|
34444
34635
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -34453,10 +34644,10 @@ var useLockAttribute = function() {
|
|
|
34453
34644
|
var RemoveScrollBar = function(_a) {
|
|
34454
34645
|
var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
|
|
34455
34646
|
useLockAttribute();
|
|
34456
|
-
var gap =
|
|
34647
|
+
var gap = React31.useMemo(function() {
|
|
34457
34648
|
return getGapWidth(gapMode);
|
|
34458
34649
|
}, [gapMode]);
|
|
34459
|
-
return
|
|
34650
|
+
return React31.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
34460
34651
|
};
|
|
34461
34652
|
var passiveSupported = false;
|
|
34462
34653
|
if (typeof window !== "undefined") {
|
|
@@ -34757,9 +34948,9 @@ var Select = (props) => {
|
|
|
34757
34948
|
required
|
|
34758
34949
|
} = props;
|
|
34759
34950
|
const popperScope = usePopperScope(__scopeSelect);
|
|
34760
|
-
const [trigger, setTrigger] =
|
|
34761
|
-
const [valueNode, setValueNode] =
|
|
34762
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
34951
|
+
const [trigger, setTrigger] = React342.useState(null);
|
|
34952
|
+
const [valueNode, setValueNode] = React342.useState(null);
|
|
34953
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React342.useState(false);
|
|
34763
34954
|
const direction = useDirection(dir);
|
|
34764
34955
|
const [open = false, setOpen] = useControllableState({
|
|
34765
34956
|
prop: openProp,
|
|
@@ -34771,9 +34962,9 @@ var Select = (props) => {
|
|
|
34771
34962
|
defaultProp: defaultValue,
|
|
34772
34963
|
onChange: onValueChange
|
|
34773
34964
|
});
|
|
34774
|
-
const triggerPointerDownPosRef =
|
|
34965
|
+
const triggerPointerDownPosRef = React342.useRef(null);
|
|
34775
34966
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
34776
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
34967
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React342.useState(/* @__PURE__ */ new Set);
|
|
34777
34968
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
34778
34969
|
return /* @__PURE__ */ jsx232(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
|
|
34779
34970
|
required,
|
|
@@ -34795,10 +34986,10 @@ var Select = (props) => {
|
|
|
34795
34986
|
children: [
|
|
34796
34987
|
/* @__PURE__ */ jsx232(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx232(SelectNativeOptionsProvider, {
|
|
34797
34988
|
scope: props.__scopeSelect,
|
|
34798
|
-
onNativeOptionAdd:
|
|
34989
|
+
onNativeOptionAdd: React342.useCallback((option) => {
|
|
34799
34990
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
34800
34991
|
}, []),
|
|
34801
|
-
onNativeOptionRemove:
|
|
34992
|
+
onNativeOptionRemove: React342.useCallback((option) => {
|
|
34802
34993
|
setNativeOptionsSet((prev) => {
|
|
34803
34994
|
const optionsSet = new Set(prev);
|
|
34804
34995
|
optionsSet.delete(option);
|
|
@@ -34826,7 +35017,7 @@ var Select = (props) => {
|
|
|
34826
35017
|
};
|
|
34827
35018
|
Select.displayName = SELECT_NAME;
|
|
34828
35019
|
var TRIGGER_NAME = "SelectTrigger";
|
|
34829
|
-
var SelectTrigger =
|
|
35020
|
+
var SelectTrigger = React342.forwardRef((props, forwardedRef) => {
|
|
34830
35021
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
34831
35022
|
const popperScope = usePopperScope(__scopeSelect);
|
|
34832
35023
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -34894,7 +35085,7 @@ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
|
34894
35085
|
});
|
|
34895
35086
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
34896
35087
|
var VALUE_NAME = "SelectValue";
|
|
34897
|
-
var SelectValue =
|
|
35088
|
+
var SelectValue = React342.forwardRef((props, forwardedRef) => {
|
|
34898
35089
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
34899
35090
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
34900
35091
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -34912,7 +35103,7 @@ var SelectValue = React34.forwardRef((props, forwardedRef) => {
|
|
|
34912
35103
|
});
|
|
34913
35104
|
SelectValue.displayName = VALUE_NAME;
|
|
34914
35105
|
var ICON_NAME = "SelectIcon";
|
|
34915
|
-
var SelectIcon =
|
|
35106
|
+
var SelectIcon = React342.forwardRef((props, forwardedRef) => {
|
|
34916
35107
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
34917
35108
|
return /* @__PURE__ */ jsx232(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
34918
35109
|
});
|
|
@@ -34923,9 +35114,9 @@ var SelectPortal = (props) => {
|
|
|
34923
35114
|
};
|
|
34924
35115
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
34925
35116
|
var CONTENT_NAME2 = "SelectContent";
|
|
34926
|
-
var SelectContent =
|
|
35117
|
+
var SelectContent = React342.forwardRef((props, forwardedRef) => {
|
|
34927
35118
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
34928
|
-
const [fragment, setFragment] =
|
|
35119
|
+
const [fragment, setFragment] = React342.useState();
|
|
34929
35120
|
useLayoutEffect22(() => {
|
|
34930
35121
|
setFragment(new DocumentFragment);
|
|
34931
35122
|
}, []);
|
|
@@ -34939,7 +35130,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
34939
35130
|
var CONTENT_MARGIN = 10;
|
|
34940
35131
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
34941
35132
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
34942
|
-
var SelectContentImpl =
|
|
35133
|
+
var SelectContentImpl = React342.forwardRef((props, forwardedRef) => {
|
|
34943
35134
|
const {
|
|
34944
35135
|
__scopeSelect,
|
|
34945
35136
|
position = "item-aligned",
|
|
@@ -34959,20 +35150,20 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
34959
35150
|
...contentProps
|
|
34960
35151
|
} = props;
|
|
34961
35152
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
34962
|
-
const [content, setContent] =
|
|
34963
|
-
const [viewport, setViewport] =
|
|
35153
|
+
const [content, setContent] = React342.useState(null);
|
|
35154
|
+
const [viewport, setViewport] = React342.useState(null);
|
|
34964
35155
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
34965
|
-
const [selectedItem, setSelectedItem] =
|
|
34966
|
-
const [selectedItemText, setSelectedItemText] =
|
|
35156
|
+
const [selectedItem, setSelectedItem] = React342.useState(null);
|
|
35157
|
+
const [selectedItemText, setSelectedItemText] = React342.useState(null);
|
|
34967
35158
|
const getItems = useCollection(__scopeSelect);
|
|
34968
|
-
const [isPositioned, setIsPositioned] =
|
|
34969
|
-
const firstValidItemFoundRef =
|
|
34970
|
-
|
|
35159
|
+
const [isPositioned, setIsPositioned] = React342.useState(false);
|
|
35160
|
+
const firstValidItemFoundRef = React342.useRef(false);
|
|
35161
|
+
React342.useEffect(() => {
|
|
34971
35162
|
if (content)
|
|
34972
35163
|
return hideOthers(content);
|
|
34973
35164
|
}, [content]);
|
|
34974
35165
|
useFocusGuards();
|
|
34975
|
-
const focusFirst2 =
|
|
35166
|
+
const focusFirst2 = React342.useCallback((candidates) => {
|
|
34976
35167
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
34977
35168
|
const [lastItem] = restItems.slice(-1);
|
|
34978
35169
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -34989,14 +35180,14 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
34989
35180
|
return;
|
|
34990
35181
|
}
|
|
34991
35182
|
}, [getItems, viewport]);
|
|
34992
|
-
const focusSelectedItem =
|
|
34993
|
-
|
|
35183
|
+
const focusSelectedItem = React342.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
35184
|
+
React342.useEffect(() => {
|
|
34994
35185
|
if (isPositioned) {
|
|
34995
35186
|
focusSelectedItem();
|
|
34996
35187
|
}
|
|
34997
35188
|
}, [isPositioned, focusSelectedItem]);
|
|
34998
35189
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
34999
|
-
|
|
35190
|
+
React342.useEffect(() => {
|
|
35000
35191
|
if (content) {
|
|
35001
35192
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
35002
35193
|
const handlePointerMove = (event2) => {
|
|
@@ -35026,7 +35217,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
35026
35217
|
};
|
|
35027
35218
|
}
|
|
35028
35219
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
35029
|
-
|
|
35220
|
+
React342.useEffect(() => {
|
|
35030
35221
|
const close = () => onOpenChange(false);
|
|
35031
35222
|
window.addEventListener("blur", close);
|
|
35032
35223
|
window.addEventListener("resize", close);
|
|
@@ -35043,7 +35234,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
35043
35234
|
setTimeout(() => nextItem.ref.current.focus());
|
|
35044
35235
|
}
|
|
35045
35236
|
});
|
|
35046
|
-
const itemRefCallback =
|
|
35237
|
+
const itemRefCallback = React342.useCallback((node, value, disabled) => {
|
|
35047
35238
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
35048
35239
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
35049
35240
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -35052,8 +35243,8 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
35052
35243
|
firstValidItemFoundRef.current = true;
|
|
35053
35244
|
}
|
|
35054
35245
|
}, [context.value]);
|
|
35055
|
-
const handleItemLeave =
|
|
35056
|
-
const itemTextRefCallback =
|
|
35246
|
+
const handleItemLeave = React342.useCallback(() => content?.focus(), [content]);
|
|
35247
|
+
const itemTextRefCallback = React342.useCallback((node, value, disabled) => {
|
|
35057
35248
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
35058
35249
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
35059
35250
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -35148,18 +35339,18 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
35148
35339
|
});
|
|
35149
35340
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
35150
35341
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
35151
|
-
var SelectItemAlignedPosition =
|
|
35342
|
+
var SelectItemAlignedPosition = React342.forwardRef((props, forwardedRef) => {
|
|
35152
35343
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
35153
35344
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
35154
35345
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
35155
|
-
const [contentWrapper, setContentWrapper] =
|
|
35156
|
-
const [content, setContent] =
|
|
35346
|
+
const [contentWrapper, setContentWrapper] = React342.useState(null);
|
|
35347
|
+
const [content, setContent] = React342.useState(null);
|
|
35157
35348
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
35158
35349
|
const getItems = useCollection(__scopeSelect);
|
|
35159
|
-
const shouldExpandOnScrollRef =
|
|
35160
|
-
const shouldRepositionRef =
|
|
35350
|
+
const shouldExpandOnScrollRef = React342.useRef(false);
|
|
35351
|
+
const shouldRepositionRef = React342.useRef(true);
|
|
35161
35352
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
35162
|
-
const position =
|
|
35353
|
+
const position = React342.useCallback(() => {
|
|
35163
35354
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
35164
35355
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
35165
35356
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -35240,12 +35431,12 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
35240
35431
|
onPlaced
|
|
35241
35432
|
]);
|
|
35242
35433
|
useLayoutEffect22(() => position(), [position]);
|
|
35243
|
-
const [contentZIndex, setContentZIndex] =
|
|
35434
|
+
const [contentZIndex, setContentZIndex] = React342.useState();
|
|
35244
35435
|
useLayoutEffect22(() => {
|
|
35245
35436
|
if (content)
|
|
35246
35437
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
35247
35438
|
}, [content]);
|
|
35248
|
-
const handleScrollButtonChange =
|
|
35439
|
+
const handleScrollButtonChange = React342.useCallback((node) => {
|
|
35249
35440
|
if (node && shouldRepositionRef.current === true) {
|
|
35250
35441
|
position();
|
|
35251
35442
|
focusSelectedItem?.();
|
|
@@ -35279,7 +35470,7 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
35279
35470
|
});
|
|
35280
35471
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
35281
35472
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
35282
|
-
var SelectPopperPosition =
|
|
35473
|
+
var SelectPopperPosition = React342.forwardRef((props, forwardedRef) => {
|
|
35283
35474
|
const {
|
|
35284
35475
|
__scopeSelect,
|
|
35285
35476
|
align = "start",
|
|
@@ -35309,12 +35500,12 @@ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
35309
35500
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
35310
35501
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
35311
35502
|
var VIEWPORT_NAME = "SelectViewport";
|
|
35312
|
-
var SelectViewport =
|
|
35503
|
+
var SelectViewport = React342.forwardRef((props, forwardedRef) => {
|
|
35313
35504
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
35314
35505
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
35315
35506
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
35316
35507
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
35317
|
-
const prevScrollTopRef =
|
|
35508
|
+
const prevScrollTopRef = React342.useRef(0);
|
|
35318
35509
|
return /* @__PURE__ */ jsxs4(Fragment62, { children: [
|
|
35319
35510
|
/* @__PURE__ */ jsx232("style", {
|
|
35320
35511
|
dangerouslySetInnerHTML: {
|
|
@@ -35363,14 +35554,14 @@ var SelectViewport = React34.forwardRef((props, forwardedRef) => {
|
|
|
35363
35554
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
35364
35555
|
var GROUP_NAME = "SelectGroup";
|
|
35365
35556
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
35366
|
-
var SelectGroup =
|
|
35557
|
+
var SelectGroup = React342.forwardRef((props, forwardedRef) => {
|
|
35367
35558
|
const { __scopeSelect, ...groupProps } = props;
|
|
35368
35559
|
const groupId = useId();
|
|
35369
35560
|
return /* @__PURE__ */ jsx232(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx232(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
35370
35561
|
});
|
|
35371
35562
|
SelectGroup.displayName = GROUP_NAME;
|
|
35372
35563
|
var LABEL_NAME = "SelectLabel";
|
|
35373
|
-
var SelectLabel =
|
|
35564
|
+
var SelectLabel = React342.forwardRef((props, forwardedRef) => {
|
|
35374
35565
|
const { __scopeSelect, ...labelProps } = props;
|
|
35375
35566
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
35376
35567
|
return /* @__PURE__ */ jsx232(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -35378,7 +35569,7 @@ var SelectLabel = React34.forwardRef((props, forwardedRef) => {
|
|
|
35378
35569
|
SelectLabel.displayName = LABEL_NAME;
|
|
35379
35570
|
var ITEM_NAME = "SelectItem";
|
|
35380
35571
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
35381
|
-
var SelectItem =
|
|
35572
|
+
var SelectItem = React342.forwardRef((props, forwardedRef) => {
|
|
35382
35573
|
const {
|
|
35383
35574
|
__scopeSelect,
|
|
35384
35575
|
value,
|
|
@@ -35389,8 +35580,8 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
35389
35580
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
35390
35581
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
35391
35582
|
const isSelected = context.value === value;
|
|
35392
|
-
const [textValue, setTextValue] =
|
|
35393
|
-
const [isFocused, setIsFocused] =
|
|
35583
|
+
const [textValue, setTextValue] = React342.useState(textValueProp ?? "");
|
|
35584
|
+
const [isFocused, setIsFocused] = React342.useState(false);
|
|
35394
35585
|
const composedRefs = useComposedRefs(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
35395
35586
|
const textId = useId();
|
|
35396
35587
|
const handleSelect = () => {
|
|
@@ -35408,7 +35599,7 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
35408
35599
|
disabled,
|
|
35409
35600
|
textId,
|
|
35410
35601
|
isSelected,
|
|
35411
|
-
onItemTextChange:
|
|
35602
|
+
onItemTextChange: React342.useCallback((node) => {
|
|
35412
35603
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
35413
35604
|
}, []),
|
|
35414
35605
|
children: /* @__PURE__ */ jsx232(Collection.ItemSlot, {
|
|
@@ -35457,16 +35648,16 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
35457
35648
|
});
|
|
35458
35649
|
SelectItem.displayName = ITEM_NAME;
|
|
35459
35650
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
35460
|
-
var SelectItemText =
|
|
35651
|
+
var SelectItemText = React342.forwardRef((props, forwardedRef) => {
|
|
35461
35652
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
35462
35653
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
35463
35654
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
35464
35655
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
35465
35656
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
35466
|
-
const [itemTextNode, setItemTextNode] =
|
|
35657
|
+
const [itemTextNode, setItemTextNode] = React342.useState(null);
|
|
35467
35658
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
35468
35659
|
const textContent = itemTextNode?.textContent;
|
|
35469
|
-
const nativeOption =
|
|
35660
|
+
const nativeOption = React342.useMemo(() => /* @__PURE__ */ jsx232("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
35470
35661
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
35471
35662
|
useLayoutEffect22(() => {
|
|
35472
35663
|
onNativeOptionAdd(nativeOption);
|
|
@@ -35479,17 +35670,17 @@ var SelectItemText = React34.forwardRef((props, forwardedRef) => {
|
|
|
35479
35670
|
});
|
|
35480
35671
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
35481
35672
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
35482
|
-
var SelectItemIndicator =
|
|
35673
|
+
var SelectItemIndicator = React342.forwardRef((props, forwardedRef) => {
|
|
35483
35674
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
35484
35675
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
35485
35676
|
return itemContext.isSelected ? /* @__PURE__ */ jsx232(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
35486
35677
|
});
|
|
35487
35678
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
35488
35679
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
35489
|
-
var SelectScrollUpButton =
|
|
35680
|
+
var SelectScrollUpButton = React342.forwardRef((props, forwardedRef) => {
|
|
35490
35681
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
35491
35682
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
35492
|
-
const [canScrollUp, setCanScrollUp] =
|
|
35683
|
+
const [canScrollUp, setCanScrollUp] = React342.useState(false);
|
|
35493
35684
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
35494
35685
|
useLayoutEffect22(() => {
|
|
35495
35686
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -35517,10 +35708,10 @@ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
35517
35708
|
});
|
|
35518
35709
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
35519
35710
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
35520
|
-
var SelectScrollDownButton =
|
|
35711
|
+
var SelectScrollDownButton = React342.forwardRef((props, forwardedRef) => {
|
|
35521
35712
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
35522
35713
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
35523
|
-
const [canScrollDown, setCanScrollDown] =
|
|
35714
|
+
const [canScrollDown, setCanScrollDown] = React342.useState(false);
|
|
35524
35715
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
35525
35716
|
useLayoutEffect22(() => {
|
|
35526
35717
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -35548,18 +35739,18 @@ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
35548
35739
|
}) : null;
|
|
35549
35740
|
});
|
|
35550
35741
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
35551
|
-
var SelectScrollButtonImpl =
|
|
35742
|
+
var SelectScrollButtonImpl = React342.forwardRef((props, forwardedRef) => {
|
|
35552
35743
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
35553
35744
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
35554
|
-
const autoScrollTimerRef =
|
|
35745
|
+
const autoScrollTimerRef = React342.useRef(null);
|
|
35555
35746
|
const getItems = useCollection(__scopeSelect);
|
|
35556
|
-
const clearAutoScrollTimer =
|
|
35747
|
+
const clearAutoScrollTimer = React342.useCallback(() => {
|
|
35557
35748
|
if (autoScrollTimerRef.current !== null) {
|
|
35558
35749
|
window.clearInterval(autoScrollTimerRef.current);
|
|
35559
35750
|
autoScrollTimerRef.current = null;
|
|
35560
35751
|
}
|
|
35561
35752
|
}, []);
|
|
35562
|
-
|
|
35753
|
+
React342.useEffect(() => {
|
|
35563
35754
|
return () => clearAutoScrollTimer();
|
|
35564
35755
|
}, [clearAutoScrollTimer]);
|
|
35565
35756
|
useLayoutEffect22(() => {
|
|
@@ -35588,13 +35779,13 @@ var SelectScrollButtonImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
35588
35779
|
});
|
|
35589
35780
|
});
|
|
35590
35781
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
35591
|
-
var SelectSeparator =
|
|
35782
|
+
var SelectSeparator = React342.forwardRef((props, forwardedRef) => {
|
|
35592
35783
|
const { __scopeSelect, ...separatorProps } = props;
|
|
35593
35784
|
return /* @__PURE__ */ jsx232(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
35594
35785
|
});
|
|
35595
35786
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
35596
35787
|
var ARROW_NAME2 = "SelectArrow";
|
|
35597
|
-
var SelectArrow =
|
|
35788
|
+
var SelectArrow = React342.forwardRef((props, forwardedRef) => {
|
|
35598
35789
|
const { __scopeSelect, ...arrowProps } = props;
|
|
35599
35790
|
const popperScope = usePopperScope(__scopeSelect);
|
|
35600
35791
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -35605,12 +35796,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
35605
35796
|
function shouldShowPlaceholder(value) {
|
|
35606
35797
|
return value === "" || value === undefined;
|
|
35607
35798
|
}
|
|
35608
|
-
var BubbleSelect =
|
|
35799
|
+
var BubbleSelect = React342.forwardRef((props, forwardedRef) => {
|
|
35609
35800
|
const { value, ...selectProps } = props;
|
|
35610
|
-
const ref =
|
|
35801
|
+
const ref = React342.useRef(null);
|
|
35611
35802
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
35612
35803
|
const prevValue = usePrevious(value);
|
|
35613
|
-
|
|
35804
|
+
React342.useEffect(() => {
|
|
35614
35805
|
const select = ref.current;
|
|
35615
35806
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
35616
35807
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -35626,9 +35817,9 @@ var BubbleSelect = React34.forwardRef((props, forwardedRef) => {
|
|
|
35626
35817
|
BubbleSelect.displayName = "BubbleSelect";
|
|
35627
35818
|
function useTypeaheadSearch(onSearchChange) {
|
|
35628
35819
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
35629
|
-
const searchRef =
|
|
35630
|
-
const timerRef =
|
|
35631
|
-
const handleTypeaheadSearch =
|
|
35820
|
+
const searchRef = React342.useRef("");
|
|
35821
|
+
const timerRef = React342.useRef(0);
|
|
35822
|
+
const handleTypeaheadSearch = React342.useCallback((key) => {
|
|
35632
35823
|
const search = searchRef.current + key;
|
|
35633
35824
|
handleSearchChange(search);
|
|
35634
35825
|
(function updateSearch(value) {
|
|
@@ -35638,11 +35829,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
35638
35829
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
35639
35830
|
})(search);
|
|
35640
35831
|
}, [handleSearchChange]);
|
|
35641
|
-
const resetTypeahead =
|
|
35832
|
+
const resetTypeahead = React342.useCallback(() => {
|
|
35642
35833
|
searchRef.current = "";
|
|
35643
35834
|
window.clearTimeout(timerRef.current);
|
|
35644
35835
|
}, []);
|
|
35645
|
-
|
|
35836
|
+
React342.useEffect(() => {
|
|
35646
35837
|
return () => window.clearTimeout(timerRef.current);
|
|
35647
35838
|
}, []);
|
|
35648
35839
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -35731,7 +35922,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
35731
35922
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
35732
35923
|
var Select2 = Root222;
|
|
35733
35924
|
var SelectValue2 = Value;
|
|
35734
|
-
var SelectTrigger2 =
|
|
35925
|
+
var SelectTrigger2 = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
35735
35926
|
ref,
|
|
35736
35927
|
className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
|
|
35737
35928
|
...props,
|
|
@@ -35746,7 +35937,7 @@ var SelectTrigger2 = React352.forwardRef(({ className, children, ...props }, ref
|
|
|
35746
35937
|
]
|
|
35747
35938
|
}));
|
|
35748
35939
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
35749
|
-
var SelectScrollUpButton2 =
|
|
35940
|
+
var SelectScrollUpButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(ScrollUpButton, {
|
|
35750
35941
|
ref,
|
|
35751
35942
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
35752
35943
|
...props,
|
|
@@ -35755,7 +35946,7 @@ var SelectScrollUpButton2 = React352.forwardRef(({ className, ...props }, ref) =
|
|
|
35755
35946
|
})
|
|
35756
35947
|
}));
|
|
35757
35948
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
35758
|
-
var SelectScrollDownButton2 =
|
|
35949
|
+
var SelectScrollDownButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(ScrollDownButton, {
|
|
35759
35950
|
ref,
|
|
35760
35951
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
35761
35952
|
...props,
|
|
@@ -35764,7 +35955,7 @@ var SelectScrollDownButton2 = React352.forwardRef(({ className, ...props }, ref)
|
|
|
35764
35955
|
})
|
|
35765
35956
|
}));
|
|
35766
35957
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
35767
|
-
var SelectContent2 =
|
|
35958
|
+
var SelectContent2 = React35.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx242(Portal2, {
|
|
35768
35959
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
35769
35960
|
ref,
|
|
35770
35961
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
@@ -35781,13 +35972,13 @@ var SelectContent2 = React352.forwardRef(({ className, children, position = "pop
|
|
|
35781
35972
|
})
|
|
35782
35973
|
}));
|
|
35783
35974
|
SelectContent2.displayName = Content2.displayName;
|
|
35784
|
-
var SelectLabel2 =
|
|
35975
|
+
var SelectLabel2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(Label, {
|
|
35785
35976
|
ref,
|
|
35786
35977
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
35787
35978
|
...props
|
|
35788
35979
|
}));
|
|
35789
35980
|
SelectLabel2.displayName = Label.displayName;
|
|
35790
|
-
var SelectItem2 =
|
|
35981
|
+
var SelectItem2 = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
35791
35982
|
ref,
|
|
35792
35983
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
35793
35984
|
...props,
|
|
@@ -35806,7 +35997,7 @@ var SelectItem2 = React352.forwardRef(({ className, children, ...props }, ref) =
|
|
|
35806
35997
|
]
|
|
35807
35998
|
}));
|
|
35808
35999
|
SelectItem2.displayName = Item.displayName;
|
|
35809
|
-
var SelectSeparator2 =
|
|
36000
|
+
var SelectSeparator2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(Separator, {
|
|
35810
36001
|
ref,
|
|
35811
36002
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
35812
36003
|
...props
|
|
@@ -35835,19 +36026,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
35835
36026
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
35836
36027
|
let defaultContexts = [];
|
|
35837
36028
|
function createContext32(rootComponentName, defaultContext) {
|
|
35838
|
-
const BaseContext =
|
|
36029
|
+
const BaseContext = React362.createContext(defaultContext);
|
|
35839
36030
|
const index2 = defaultContexts.length;
|
|
35840
36031
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
35841
36032
|
const Provider = (props) => {
|
|
35842
36033
|
const { scope, children, ...context } = props;
|
|
35843
36034
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
35844
|
-
const value =
|
|
36035
|
+
const value = React362.useMemo(() => context, Object.values(context));
|
|
35845
36036
|
return /* @__PURE__ */ jsx262(Context.Provider, { value, children });
|
|
35846
36037
|
};
|
|
35847
36038
|
Provider.displayName = rootComponentName + "Provider";
|
|
35848
36039
|
function useContext222(consumerName, scope) {
|
|
35849
36040
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
35850
|
-
const context =
|
|
36041
|
+
const context = React362.useContext(Context);
|
|
35851
36042
|
if (context)
|
|
35852
36043
|
return context;
|
|
35853
36044
|
if (defaultContext !== undefined)
|
|
@@ -35858,11 +36049,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
35858
36049
|
}
|
|
35859
36050
|
const createScope = () => {
|
|
35860
36051
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
35861
|
-
return
|
|
36052
|
+
return React362.createContext(defaultContext);
|
|
35862
36053
|
});
|
|
35863
36054
|
return function useScope(scope) {
|
|
35864
36055
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
35865
|
-
return
|
|
36056
|
+
return React362.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
35866
36057
|
};
|
|
35867
36058
|
};
|
|
35868
36059
|
createScope.scopeName = scopeName;
|
|
@@ -35883,7 +36074,7 @@ function composeContextScopes2(...scopes) {
|
|
|
35883
36074
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
35884
36075
|
return { ...nextScopes2, ...currentScope };
|
|
35885
36076
|
}, {});
|
|
35886
|
-
return
|
|
36077
|
+
return React362.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
35887
36078
|
};
|
|
35888
36079
|
};
|
|
35889
36080
|
createScope.scopeName = baseScope.scopeName;
|