@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/template-modal-content.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, {
|
|
@@ -4137,46 +4152,7 @@ import { jsx as jsx6 } from "react/jsx-runtime";
|
|
|
4137
4152
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
4138
4153
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
4139
4154
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4140
|
-
|
|
4141
|
-
const instructions = [
|
|
4142
|
-
{
|
|
4143
|
-
type: "M",
|
|
4144
|
-
x: radius,
|
|
4145
|
-
y: 0
|
|
4146
|
-
},
|
|
4147
|
-
{
|
|
4148
|
-
type: "a",
|
|
4149
|
-
rx: radius,
|
|
4150
|
-
ry: radius,
|
|
4151
|
-
xAxisRotation: 0,
|
|
4152
|
-
largeArcFlag: true,
|
|
4153
|
-
sweepFlag: true,
|
|
4154
|
-
dx: 0,
|
|
4155
|
-
dy: radius * 2
|
|
4156
|
-
},
|
|
4157
|
-
{
|
|
4158
|
-
type: "a",
|
|
4159
|
-
rx: radius,
|
|
4160
|
-
ry: radius,
|
|
4161
|
-
xAxisRotation: 0,
|
|
4162
|
-
largeArcFlag: true,
|
|
4163
|
-
sweepFlag: true,
|
|
4164
|
-
dx: 0,
|
|
4165
|
-
dy: -radius * 2
|
|
4166
|
-
},
|
|
4167
|
-
{
|
|
4168
|
-
type: "Z"
|
|
4169
|
-
}
|
|
4170
|
-
];
|
|
4171
|
-
const path = serializeInstructions(instructions);
|
|
4172
|
-
return {
|
|
4173
|
-
height: radius * 2,
|
|
4174
|
-
width: radius * 2,
|
|
4175
|
-
path,
|
|
4176
|
-
instructions,
|
|
4177
|
-
transformOrigin: `${radius} ${radius}`
|
|
4178
|
-
};
|
|
4179
|
-
};
|
|
4155
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4180
4156
|
var doesReactSupportTransformOriginProperty = (version2) => {
|
|
4181
4157
|
if (version2.includes("canary") || version2.includes("experimental")) {
|
|
4182
4158
|
const last8Chars = parseInt(version2.slice(-8), 10);
|
|
@@ -4270,6 +4246,46 @@ var RenderSvg = ({
|
|
|
4270
4246
|
]
|
|
4271
4247
|
});
|
|
4272
4248
|
};
|
|
4249
|
+
var makeCircle = ({ radius }) => {
|
|
4250
|
+
const instructions = [
|
|
4251
|
+
{
|
|
4252
|
+
type: "M",
|
|
4253
|
+
x: radius,
|
|
4254
|
+
y: 0
|
|
4255
|
+
},
|
|
4256
|
+
{
|
|
4257
|
+
type: "a",
|
|
4258
|
+
rx: radius,
|
|
4259
|
+
ry: radius,
|
|
4260
|
+
xAxisRotation: 0,
|
|
4261
|
+
largeArcFlag: true,
|
|
4262
|
+
sweepFlag: true,
|
|
4263
|
+
dx: 0,
|
|
4264
|
+
dy: radius * 2
|
|
4265
|
+
},
|
|
4266
|
+
{
|
|
4267
|
+
type: "a",
|
|
4268
|
+
rx: radius,
|
|
4269
|
+
ry: radius,
|
|
4270
|
+
xAxisRotation: 0,
|
|
4271
|
+
largeArcFlag: true,
|
|
4272
|
+
sweepFlag: true,
|
|
4273
|
+
dx: 0,
|
|
4274
|
+
dy: -radius * 2
|
|
4275
|
+
},
|
|
4276
|
+
{
|
|
4277
|
+
type: "Z"
|
|
4278
|
+
}
|
|
4279
|
+
];
|
|
4280
|
+
const path = serializeInstructions(instructions);
|
|
4281
|
+
return {
|
|
4282
|
+
height: radius * 2,
|
|
4283
|
+
width: radius * 2,
|
|
4284
|
+
path,
|
|
4285
|
+
instructions,
|
|
4286
|
+
transformOrigin: `${radius} ${radius}`
|
|
4287
|
+
};
|
|
4288
|
+
};
|
|
4273
4289
|
var makeHeart = ({
|
|
4274
4290
|
height,
|
|
4275
4291
|
aspectRatio = 1.1,
|
|
@@ -4366,7 +4382,7 @@ var Heart = ({
|
|
|
4366
4382
|
depthAdjustment = 0,
|
|
4367
4383
|
...props
|
|
4368
4384
|
}) => {
|
|
4369
|
-
return /* @__PURE__ */
|
|
4385
|
+
return /* @__PURE__ */ jsx5(RenderSvg, {
|
|
4370
4386
|
...makeHeart({
|
|
4371
4387
|
aspectRatio,
|
|
4372
4388
|
height,
|
|
@@ -5699,7 +5715,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
5699
5715
|
// ../core/dist/esm/index.mjs
|
|
5700
5716
|
import { createContext } from "react";
|
|
5701
5717
|
import { createContext as createContext2, useContext } from "react";
|
|
5702
|
-
import { jsx as
|
|
5718
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
5703
5719
|
import {
|
|
5704
5720
|
forwardRef as forwardRef2,
|
|
5705
5721
|
useContext as useContext13,
|
|
@@ -5767,7 +5783,7 @@ import {
|
|
|
5767
5783
|
useRef as useRef6,
|
|
5768
5784
|
useState as useState7
|
|
5769
5785
|
} from "react";
|
|
5770
|
-
import { jsx as
|
|
5786
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
5771
5787
|
import { forwardRef as forwardRef6, useCallback as useCallback10, useContext as useContext27 } from "react";
|
|
5772
5788
|
import React11, { createContext as createContext14, useMemo as useMemo12 } from "react";
|
|
5773
5789
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -5869,7 +5885,8 @@ import { useMemo as useMemo27 } from "react";
|
|
|
5869
5885
|
import { createContext as createContext20, useContext as useContext31, useMemo as useMemo26 } from "react";
|
|
5870
5886
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
5871
5887
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5872
|
-
import React27
|
|
5888
|
+
import React27 from "react";
|
|
5889
|
+
import React28, { createContext as createContext21 } from "react";
|
|
5873
5890
|
import { useContext as useContext32, useMemo as useMemo28, useState as useState17 } from "react";
|
|
5874
5891
|
import { useContext as useContext33 } from "react";
|
|
5875
5892
|
import { useCallback as useCallback15 } from "react";
|
|
@@ -5882,7 +5899,7 @@ import {
|
|
|
5882
5899
|
useState as useState18
|
|
5883
5900
|
} from "react";
|
|
5884
5901
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
5885
|
-
import
|
|
5902
|
+
import React30, {
|
|
5886
5903
|
forwardRef as forwardRef9,
|
|
5887
5904
|
useContext as useContext35,
|
|
5888
5905
|
useEffect as useEffect17,
|
|
@@ -5894,14 +5911,14 @@ import React29, {
|
|
|
5894
5911
|
import { useEffect as useEffect16 } from "react";
|
|
5895
5912
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5896
5913
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
5897
|
-
import
|
|
5914
|
+
import React32, { useMemo as useMemo31 } from "react";
|
|
5898
5915
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5899
5916
|
import { Children, forwardRef as forwardRef10, useMemo as useMemo32 } from "react";
|
|
5900
|
-
import
|
|
5901
|
-
import
|
|
5917
|
+
import React33 from "react";
|
|
5918
|
+
import React34, { createContext as createContext22 } from "react";
|
|
5902
5919
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
5903
5920
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5904
|
-
import
|
|
5921
|
+
import React36 from "react";
|
|
5905
5922
|
import { forwardRef as forwardRef12, useCallback as useCallback16, useContext as useContext37 } from "react";
|
|
5906
5923
|
import {
|
|
5907
5924
|
forwardRef as forwardRef11,
|
|
@@ -5948,7 +5965,7 @@ var IsPlayerContext = createContext2(false);
|
|
|
5948
5965
|
var IsPlayerContextProvider = ({
|
|
5949
5966
|
children
|
|
5950
5967
|
}) => {
|
|
5951
|
-
return /* @__PURE__ */
|
|
5968
|
+
return /* @__PURE__ */ jsx11(IsPlayerContext.Provider, {
|
|
5952
5969
|
value: true,
|
|
5953
5970
|
children
|
|
5954
5971
|
});
|
|
@@ -5959,7 +5976,7 @@ var useIsPlayer = () => {
|
|
|
5959
5976
|
function truthy2(value) {
|
|
5960
5977
|
return Boolean(value);
|
|
5961
5978
|
}
|
|
5962
|
-
var VERSION = "4.0.
|
|
5979
|
+
var VERSION = "4.0.432";
|
|
5963
5980
|
var checkMultipleRemotionVersions = () => {
|
|
5964
5981
|
if (typeof globalThis === "undefined") {
|
|
5965
5982
|
return;
|
|
@@ -6117,6 +6134,7 @@ __export2(exports_timeline_position_state, {
|
|
|
6117
6134
|
useTimelineSetFrame: () => useTimelineSetFrame,
|
|
6118
6135
|
useTimelinePosition: () => useTimelinePosition,
|
|
6119
6136
|
usePlayingState: () => usePlayingState,
|
|
6137
|
+
useAbsoluteTimelinePosition: () => useAbsoluteTimelinePosition,
|
|
6120
6138
|
persistCurrentFrame: () => persistCurrentFrame,
|
|
6121
6139
|
getInitialFrameState: () => getInitialFrameState,
|
|
6122
6140
|
getFrameForComposition: () => getFrameForComposition
|
|
@@ -6513,9 +6531,8 @@ var getFrameForComposition = (composition) => {
|
|
|
6513
6531
|
}
|
|
6514
6532
|
return window.remotion_initialFrame ?? 0;
|
|
6515
6533
|
};
|
|
6516
|
-
var
|
|
6534
|
+
var useTimelinePositionFromContext = (state) => {
|
|
6517
6535
|
const videoConfig = useVideo();
|
|
6518
|
-
const state = useContext5(TimelineContext);
|
|
6519
6536
|
const env = useRemotionEnvironment();
|
|
6520
6537
|
if (!videoConfig) {
|
|
6521
6538
|
return typeof window === "undefined" ? 0 : window.remotion_initialFrame ?? 0;
|
|
@@ -6523,6 +6540,14 @@ var useTimelinePosition = () => {
|
|
|
6523
6540
|
const unclamped = state.frame[videoConfig.id] ?? (env.isPlayer ? 0 : getFrameForComposition(videoConfig.id));
|
|
6524
6541
|
return Math.min(videoConfig.durationInFrames - 1, unclamped);
|
|
6525
6542
|
};
|
|
6543
|
+
var useTimelinePosition = () => {
|
|
6544
|
+
const state = useContext5(TimelineContext);
|
|
6545
|
+
return useTimelinePositionFromContext(state);
|
|
6546
|
+
};
|
|
6547
|
+
var useAbsoluteTimelinePosition = () => {
|
|
6548
|
+
const state = useContext5(AbsoluteTimeContext);
|
|
6549
|
+
return useTimelinePositionFromContext(state);
|
|
6550
|
+
};
|
|
6526
6551
|
var useTimelineSetFrame = () => {
|
|
6527
6552
|
const { setFrame } = useContext5(SetTimelineContext);
|
|
6528
6553
|
return setFrame;
|
|
@@ -6790,6 +6815,19 @@ var TimelineContext = createContext9({
|
|
|
6790
6815
|
},
|
|
6791
6816
|
audioAndVideoTags: { current: [] }
|
|
6792
6817
|
});
|
|
6818
|
+
var AbsoluteTimeContext = createContext9({
|
|
6819
|
+
frame: {},
|
|
6820
|
+
playing: false,
|
|
6821
|
+
playbackRate: 1,
|
|
6822
|
+
rootId: "",
|
|
6823
|
+
imperativePlaying: {
|
|
6824
|
+
current: false
|
|
6825
|
+
},
|
|
6826
|
+
setPlaybackRate: () => {
|
|
6827
|
+
throw new Error("default");
|
|
6828
|
+
},
|
|
6829
|
+
audioAndVideoTags: { current: [] }
|
|
6830
|
+
});
|
|
6793
6831
|
var TimelineContextProvider = ({ children, frameState }) => {
|
|
6794
6832
|
const [playing, setPlaying] = useState2(false);
|
|
6795
6833
|
const imperativePlaying = useRef(false);
|
|
@@ -6842,11 +6880,14 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
6842
6880
|
setPlaying
|
|
6843
6881
|
};
|
|
6844
6882
|
}, []);
|
|
6845
|
-
return /* @__PURE__ */ jsx42(
|
|
6883
|
+
return /* @__PURE__ */ jsx42(AbsoluteTimeContext.Provider, {
|
|
6846
6884
|
value: timelineContextValue,
|
|
6847
|
-
children: /* @__PURE__ */ jsx42(
|
|
6848
|
-
value:
|
|
6849
|
-
children
|
|
6885
|
+
children: /* @__PURE__ */ jsx42(TimelineContext.Provider, {
|
|
6886
|
+
value: timelineContextValue,
|
|
6887
|
+
children: /* @__PURE__ */ jsx42(SetTimelineContext.Provider, {
|
|
6888
|
+
value: setTimelineContextValue,
|
|
6889
|
+
children
|
|
6890
|
+
})
|
|
6850
6891
|
})
|
|
6851
6892
|
});
|
|
6852
6893
|
};
|
|
@@ -7030,22 +7071,28 @@ var SequenceVisibilityToggleContext = React8.createContext({
|
|
|
7030
7071
|
throw new Error("SequenceVisibilityToggle not initialized");
|
|
7031
7072
|
}
|
|
7032
7073
|
});
|
|
7033
|
-
var
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
throw new Error("
|
|
7074
|
+
var VisualModeOverridesContext = React8.createContext({
|
|
7075
|
+
dragOverrides: {},
|
|
7076
|
+
setDragOverrides: () => {
|
|
7077
|
+
throw new Error("VisualModeOverridesContext not initialized");
|
|
7037
7078
|
},
|
|
7038
|
-
|
|
7039
|
-
throw new Error("
|
|
7040
|
-
}
|
|
7079
|
+
clearDragOverrides: () => {
|
|
7080
|
+
throw new Error("VisualModeOverridesContext not initialized");
|
|
7081
|
+
},
|
|
7082
|
+
codeValues: {},
|
|
7083
|
+
setCodeValues: () => {
|
|
7084
|
+
throw new Error("VisualModeOverridesContext not initialized");
|
|
7085
|
+
},
|
|
7086
|
+
visualModeEnabled: false
|
|
7041
7087
|
});
|
|
7042
|
-
var SequenceManagerProvider = ({ children }) => {
|
|
7088
|
+
var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
7043
7089
|
const [sequences, setSequences] = useState4([]);
|
|
7044
7090
|
const [hidden, setHidden] = useState4({});
|
|
7045
|
-
const [
|
|
7046
|
-
const controlOverridesRef = useRef3(
|
|
7047
|
-
controlOverridesRef.current =
|
|
7048
|
-
const
|
|
7091
|
+
const [dragOverrides, setControlOverrides] = useState4({});
|
|
7092
|
+
const controlOverridesRef = useRef3(dragOverrides);
|
|
7093
|
+
controlOverridesRef.current = dragOverrides;
|
|
7094
|
+
const [codeValues, setCodeValuesMapState] = useState4({});
|
|
7095
|
+
const setDragOverrides = useCallback3((sequenceId, key, value) => {
|
|
7049
7096
|
setControlOverrides((prev) => ({
|
|
7050
7097
|
...prev,
|
|
7051
7098
|
[sequenceId]: {
|
|
@@ -7054,7 +7101,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
7054
7101
|
}
|
|
7055
7102
|
}));
|
|
7056
7103
|
}, []);
|
|
7057
|
-
const
|
|
7104
|
+
const clearDragOverrides = useCallback3((sequenceId) => {
|
|
7058
7105
|
setControlOverrides((prev) => {
|
|
7059
7106
|
if (!prev[sequenceId]) {
|
|
7060
7107
|
return prev;
|
|
@@ -7064,6 +7111,22 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
7064
7111
|
return next;
|
|
7065
7112
|
});
|
|
7066
7113
|
}, []);
|
|
7114
|
+
const setCodeValues = useCallback3((sequenceId, values) => {
|
|
7115
|
+
setCodeValuesMapState((prev) => {
|
|
7116
|
+
if (prev[sequenceId] === values) {
|
|
7117
|
+
return prev;
|
|
7118
|
+
}
|
|
7119
|
+
if (values === null) {
|
|
7120
|
+
if (!(sequenceId in prev)) {
|
|
7121
|
+
return prev;
|
|
7122
|
+
}
|
|
7123
|
+
const next = { ...prev };
|
|
7124
|
+
delete next[sequenceId];
|
|
7125
|
+
return next;
|
|
7126
|
+
}
|
|
7127
|
+
return { ...prev, [sequenceId]: values };
|
|
7128
|
+
});
|
|
7129
|
+
}, []);
|
|
7067
7130
|
const registerSequence = useCallback3((seq) => {
|
|
7068
7131
|
setSequences((seqs) => {
|
|
7069
7132
|
return [...seqs, seq];
|
|
@@ -7087,16 +7150,26 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
7087
7150
|
}, [hidden]);
|
|
7088
7151
|
const overrideContext = useMemo9(() => {
|
|
7089
7152
|
return {
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7153
|
+
visualModeEnabled,
|
|
7154
|
+
dragOverrides,
|
|
7155
|
+
setDragOverrides,
|
|
7156
|
+
clearDragOverrides,
|
|
7157
|
+
codeValues,
|
|
7158
|
+
setCodeValues
|
|
7093
7159
|
};
|
|
7094
|
-
}, [
|
|
7160
|
+
}, [
|
|
7161
|
+
visualModeEnabled,
|
|
7162
|
+
dragOverrides,
|
|
7163
|
+
setDragOverrides,
|
|
7164
|
+
clearDragOverrides,
|
|
7165
|
+
codeValues,
|
|
7166
|
+
setCodeValues
|
|
7167
|
+
]);
|
|
7095
7168
|
return /* @__PURE__ */ jsx72(SequenceManager.Provider, {
|
|
7096
7169
|
value: sequenceContext,
|
|
7097
7170
|
children: /* @__PURE__ */ jsx72(SequenceVisibilityToggleContext.Provider, {
|
|
7098
7171
|
value: hiddenContext,
|
|
7099
|
-
children: /* @__PURE__ */ jsx72(
|
|
7172
|
+
children: /* @__PURE__ */ jsx72(VisualModeOverridesContext.Provider, {
|
|
7100
7173
|
value: overrideContext,
|
|
7101
7174
|
children
|
|
7102
7175
|
})
|
|
@@ -7261,7 +7334,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
7261
7334
|
};
|
|
7262
7335
|
var RegularSequence = forwardRef2(RegularSequenceRefForwardingFunction);
|
|
7263
7336
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
7264
|
-
const
|
|
7337
|
+
const parentPremountContext = useContext13(PremountContext);
|
|
7338
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
7265
7339
|
if (props.layout === "none") {
|
|
7266
7340
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
7267
7341
|
}
|
|
@@ -7295,9 +7369,8 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
7295
7369
|
styleWhilePremounted,
|
|
7296
7370
|
styleWhilePostmounted
|
|
7297
7371
|
]);
|
|
7298
|
-
const parentPremountContext = useContext13(PremountContext);
|
|
7299
7372
|
const { playing } = useContext13(TimelineContext);
|
|
7300
|
-
const premountFramesRemaining =
|
|
7373
|
+
const premountFramesRemaining = premountingActive ? from - frame : 0;
|
|
7301
7374
|
const premountContextValue = useMemo10(() => {
|
|
7302
7375
|
return {
|
|
7303
7376
|
premountFramesRemaining,
|
|
@@ -7771,7 +7844,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
7771
7844
|
renderAssets
|
|
7772
7845
|
};
|
|
7773
7846
|
}, [renderAssets, registerRenderAsset, unregisterRenderAsset]);
|
|
7774
|
-
return /* @__PURE__ */
|
|
7847
|
+
return /* @__PURE__ */ jsx112(RenderAssetManager.Provider, {
|
|
7775
7848
|
value: contextValue,
|
|
7776
7849
|
children
|
|
7777
7850
|
});
|
|
@@ -8442,6 +8515,63 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
|
|
|
8442
8515
|
latencyHint: audioLatencyHint,
|
|
8443
8516
|
audioEnabled
|
|
8444
8517
|
});
|
|
8518
|
+
const audioSyncAnchor = useMemo15(() => ({ value: 0 }), []);
|
|
8519
|
+
const prevEndTimes = useRef7({ scheduledEndTime: null, mediaEndTime: null });
|
|
8520
|
+
const scheduleAudioNode = useMemo15(() => {
|
|
8521
|
+
return ({
|
|
8522
|
+
node,
|
|
8523
|
+
mediaTimestamp,
|
|
8524
|
+
targetTime,
|
|
8525
|
+
currentTime,
|
|
8526
|
+
sequenceEndTime,
|
|
8527
|
+
sequenceStartTime,
|
|
8528
|
+
debugAudioScheduling
|
|
8529
|
+
}) => {
|
|
8530
|
+
if (!audioContext) {
|
|
8531
|
+
throw new Error("Audio context not found");
|
|
8532
|
+
}
|
|
8533
|
+
const bufferDuration = node.buffer?.duration ?? 0;
|
|
8534
|
+
const unclampedMediaEndTime = mediaTimestamp + bufferDuration;
|
|
8535
|
+
const needsTrimEnd = unclampedMediaEndTime > sequenceEndTime;
|
|
8536
|
+
const needsTrimStart = mediaTimestamp < sequenceStartTime;
|
|
8537
|
+
const offsetBecauseOfTrim = needsTrimStart ? sequenceStartTime - mediaTimestamp : 0;
|
|
8538
|
+
const offsetBecauseOfTooLate = targetTime < 0 ? -targetTime : 0;
|
|
8539
|
+
const offset = offsetBecauseOfTrim + offsetBecauseOfTooLate;
|
|
8540
|
+
const duration = needsTrimEnd ? bufferDuration - Math.max(0, unclampedMediaEndTime - sequenceEndTime) - offset : bufferDuration - offset;
|
|
8541
|
+
const scheduledTime = targetTime + currentTime + offset;
|
|
8542
|
+
if (offset < 0) {
|
|
8543
|
+
throw new Error("offset < 0: " + JSON.stringify({
|
|
8544
|
+
offset,
|
|
8545
|
+
targetTime,
|
|
8546
|
+
currentTime,
|
|
8547
|
+
offsetBecauseOfTrim,
|
|
8548
|
+
offsetBecauseOfTooLate
|
|
8549
|
+
}));
|
|
8550
|
+
}
|
|
8551
|
+
if (duration > 0) {
|
|
8552
|
+
node.start(scheduledTime, offset, duration);
|
|
8553
|
+
}
|
|
8554
|
+
const scheduledEndTime = scheduledTime + duration / node.playbackRate.value;
|
|
8555
|
+
const mediaTime = mediaTimestamp + offset;
|
|
8556
|
+
const mediaEndTime = mediaTime + duration;
|
|
8557
|
+
const latency = audioContext.baseLatency + audioContext.outputLatency;
|
|
8558
|
+
const timeDiff = scheduledTime - currentTime - latency;
|
|
8559
|
+
const prev = prevEndTimes.current;
|
|
8560
|
+
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
8561
|
+
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
8562
|
+
if (debugAudioScheduling) {
|
|
8563
|
+
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);
|
|
8564
|
+
}
|
|
8565
|
+
prev.scheduledEndTime = scheduledEndTime;
|
|
8566
|
+
prev.mediaEndTime = mediaEndTime;
|
|
8567
|
+
return duration > 0 ? {
|
|
8568
|
+
type: "started",
|
|
8569
|
+
scheduledTime
|
|
8570
|
+
} : {
|
|
8571
|
+
type: "not-started"
|
|
8572
|
+
};
|
|
8573
|
+
};
|
|
8574
|
+
}, [audioContext, logLevel]);
|
|
8445
8575
|
const refs = useMemo15(() => {
|
|
8446
8576
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
8447
8577
|
const ref = createRef2();
|
|
@@ -8588,7 +8718,9 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
|
|
|
8588
8718
|
updateAudio,
|
|
8589
8719
|
playAllAudios,
|
|
8590
8720
|
numberOfAudioTags,
|
|
8591
|
-
audioContext
|
|
8721
|
+
audioContext,
|
|
8722
|
+
audioSyncAnchor,
|
|
8723
|
+
scheduleAudioNode
|
|
8592
8724
|
};
|
|
8593
8725
|
}, [
|
|
8594
8726
|
numberOfAudioTags,
|
|
@@ -8596,7 +8728,9 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
|
|
|
8596
8728
|
registerAudio,
|
|
8597
8729
|
unregisterAudio,
|
|
8598
8730
|
updateAudio,
|
|
8599
|
-
audioContext
|
|
8731
|
+
audioContext,
|
|
8732
|
+
audioSyncAnchor,
|
|
8733
|
+
scheduleAudioNode
|
|
8600
8734
|
]);
|
|
8601
8735
|
return /* @__PURE__ */ jsxs2(SharedAudioContext.Provider, {
|
|
8602
8736
|
value,
|
|
@@ -10737,6 +10871,7 @@ var ImgRefForwarding = ({
|
|
|
10737
10871
|
imageRef.current.setAttribute("src", newSrc);
|
|
10738
10872
|
}, timeout);
|
|
10739
10873
|
}, []);
|
|
10874
|
+
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
10740
10875
|
const didGetError = useCallback12((e) => {
|
|
10741
10876
|
if (!errors.current) {
|
|
10742
10877
|
return;
|
|
@@ -10752,9 +10887,10 @@ var ImgRefForwarding = ({
|
|
|
10752
10887
|
retryIn(backoff);
|
|
10753
10888
|
return;
|
|
10754
10889
|
}
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10890
|
+
try {
|
|
10891
|
+
cancelRender2("Error loading image with src: " + imageRef.current?.src);
|
|
10892
|
+
} catch {}
|
|
10893
|
+
}, [cancelRender2, maxRetries, onError, retryIn]);
|
|
10758
10894
|
if (typeof window !== "undefined") {
|
|
10759
10895
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
10760
10896
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
@@ -10799,7 +10935,7 @@ var ImgRefForwarding = ({
|
|
|
10799
10935
|
current.src = actualSrc;
|
|
10800
10936
|
current.decode().then(onComplete).catch((err) => {
|
|
10801
10937
|
console.warn(err);
|
|
10802
|
-
if (current.complete) {
|
|
10938
|
+
if (current.complete && current.naturalWidth > 0 && current.naturalHeight > 0) {
|
|
10803
10939
|
onComplete();
|
|
10804
10940
|
} else {
|
|
10805
10941
|
current.addEventListener("load", onComplete);
|
|
@@ -10999,6 +11135,26 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
|
|
|
10999
11135
|
}
|
|
11000
11136
|
`;
|
|
11001
11137
|
};
|
|
11138
|
+
var getEffectiveVisualModeValue = ({
|
|
11139
|
+
codeValue,
|
|
11140
|
+
runtimeValue,
|
|
11141
|
+
dragOverrideValue,
|
|
11142
|
+
defaultValue
|
|
11143
|
+
}) => {
|
|
11144
|
+
if (dragOverrideValue !== undefined) {
|
|
11145
|
+
return dragOverrideValue;
|
|
11146
|
+
}
|
|
11147
|
+
if (!codeValue) {
|
|
11148
|
+
return runtimeValue;
|
|
11149
|
+
}
|
|
11150
|
+
if (!codeValue.canUpdate) {
|
|
11151
|
+
return runtimeValue;
|
|
11152
|
+
}
|
|
11153
|
+
if (codeValue.codeValue === undefined) {
|
|
11154
|
+
return defaultValue;
|
|
11155
|
+
}
|
|
11156
|
+
return codeValue.codeValue;
|
|
11157
|
+
};
|
|
11002
11158
|
var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
11003
11159
|
var getPreviewDomElement = () => {
|
|
11004
11160
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
@@ -11061,7 +11217,8 @@ var RemotionRootContexts = ({
|
|
|
11061
11217
|
videoEnabled,
|
|
11062
11218
|
audioEnabled,
|
|
11063
11219
|
frameState,
|
|
11064
|
-
nonceContextSeed
|
|
11220
|
+
nonceContextSeed,
|
|
11221
|
+
visualModeEnabled
|
|
11065
11222
|
}) => {
|
|
11066
11223
|
const nonceContext = useMemo27(() => {
|
|
11067
11224
|
let counter = 0;
|
|
@@ -11084,6 +11241,7 @@ var RemotionRootContexts = ({
|
|
|
11084
11241
|
children: /* @__PURE__ */ jsx27(EditorPropsProvider, {
|
|
11085
11242
|
children: /* @__PURE__ */ jsx27(PrefetchProvider, {
|
|
11086
11243
|
children: /* @__PURE__ */ jsx27(SequenceManagerProvider, {
|
|
11244
|
+
visualModeEnabled,
|
|
11087
11245
|
children: /* @__PURE__ */ jsx27(SharedAudioContextProvider, {
|
|
11088
11246
|
numberOfAudioTags,
|
|
11089
11247
|
audioLatencyHint,
|
|
@@ -11266,6 +11424,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
11266
11424
|
};
|
|
11267
11425
|
}
|
|
11268
11426
|
};
|
|
11427
|
+
var SequenceStackTracesUpdateContext = React27.createContext(() => {});
|
|
11269
11428
|
var getEnvVariables = () => {
|
|
11270
11429
|
if (getRemotionEnvironment().isRendering) {
|
|
11271
11430
|
const param = window.remotion_envVariables;
|
|
@@ -11291,7 +11450,7 @@ var setupEnvVariables = () => {
|
|
|
11291
11450
|
window.process.env[key] = env[key];
|
|
11292
11451
|
});
|
|
11293
11452
|
};
|
|
11294
|
-
var CurrentScaleContext =
|
|
11453
|
+
var CurrentScaleContext = React28.createContext(null);
|
|
11295
11454
|
var PreviewSizeContext = createContext21({
|
|
11296
11455
|
setSize: () => {
|
|
11297
11456
|
return;
|
|
@@ -11330,34 +11489,62 @@ var useSchema = (schema, currentValue) => {
|
|
|
11330
11489
|
return earlyReturn;
|
|
11331
11490
|
}
|
|
11332
11491
|
const [overrideId] = useState17(() => String(Math.random()));
|
|
11333
|
-
const {
|
|
11334
|
-
|
|
11492
|
+
const {
|
|
11493
|
+
visualModeEnabled,
|
|
11494
|
+
dragOverrides: overrides,
|
|
11495
|
+
codeValues
|
|
11496
|
+
} = useContext32(VisualModeOverridesContext);
|
|
11497
|
+
const controls = useMemo28(() => {
|
|
11498
|
+
if (!visualModeEnabled) {
|
|
11499
|
+
return;
|
|
11500
|
+
}
|
|
11335
11501
|
if (schema === null || currentValue === null) {
|
|
11502
|
+
return;
|
|
11503
|
+
}
|
|
11504
|
+
return {
|
|
11505
|
+
schema,
|
|
11506
|
+
currentValue,
|
|
11507
|
+
overrideId
|
|
11508
|
+
};
|
|
11509
|
+
}, [schema, currentValue, overrideId, visualModeEnabled]);
|
|
11510
|
+
return useMemo28(() => {
|
|
11511
|
+
if (controls === undefined || currentValue === null || schema === null || !visualModeEnabled) {
|
|
11336
11512
|
return {
|
|
11337
11513
|
controls: undefined,
|
|
11338
11514
|
values: currentValue ?? {}
|
|
11339
11515
|
};
|
|
11340
11516
|
}
|
|
11341
11517
|
const overrideValues = overrides[overrideId] ?? {};
|
|
11342
|
-
const
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11518
|
+
const propStatus = codeValues[overrideId];
|
|
11519
|
+
const currentValueKeys = Object.keys(currentValue);
|
|
11520
|
+
const keysToUpdate = new Set(currentValueKeys).values();
|
|
11521
|
+
const merged = {};
|
|
11522
|
+
for (const key of keysToUpdate) {
|
|
11523
|
+
const codeValueStatus = propStatus?.[key] ?? null;
|
|
11524
|
+
merged[key] = getEffectiveVisualModeValue({
|
|
11525
|
+
codeValue: codeValueStatus,
|
|
11526
|
+
runtimeValue: currentValue[key],
|
|
11527
|
+
dragOverrideValue: overrideValues[key],
|
|
11528
|
+
defaultValue: schema[key]?.default
|
|
11529
|
+
});
|
|
11347
11530
|
}
|
|
11348
11531
|
return {
|
|
11349
|
-
controls
|
|
11350
|
-
schema,
|
|
11351
|
-
currentValue,
|
|
11352
|
-
overrideId
|
|
11353
|
-
},
|
|
11532
|
+
controls,
|
|
11354
11533
|
values: merged
|
|
11355
11534
|
};
|
|
11356
|
-
}, [
|
|
11535
|
+
}, [
|
|
11536
|
+
controls,
|
|
11537
|
+
currentValue,
|
|
11538
|
+
overrideId,
|
|
11539
|
+
overrides,
|
|
11540
|
+
codeValues,
|
|
11541
|
+
schema,
|
|
11542
|
+
visualModeEnabled
|
|
11543
|
+
]);
|
|
11357
11544
|
};
|
|
11358
11545
|
var useSequenceControlOverride = (key) => {
|
|
11359
11546
|
const seqContext = useContext33(SequenceContext);
|
|
11360
|
-
const { overrides } = useContext33(
|
|
11547
|
+
const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
|
|
11361
11548
|
if (!seqContext) {
|
|
11362
11549
|
return;
|
|
11363
11550
|
}
|
|
@@ -11613,7 +11800,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11613
11800
|
ref: videoRef
|
|
11614
11801
|
});
|
|
11615
11802
|
}, [context.audioContext]);
|
|
11616
|
-
const effectToUse =
|
|
11803
|
+
const effectToUse = React30.useInsertionEffect ?? React30.useLayoutEffect;
|
|
11617
11804
|
effectToUse(() => {
|
|
11618
11805
|
return () => {
|
|
11619
11806
|
requestAnimationFrame(() => {
|
|
@@ -11972,18 +12159,18 @@ var OffthreadVideo = ({
|
|
|
11972
12159
|
addSequenceStackTraces(OffthreadVideo);
|
|
11973
12160
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
11974
12161
|
function useRemotionContexts() {
|
|
11975
|
-
const compositionManagerCtx =
|
|
11976
|
-
const timelineContext =
|
|
11977
|
-
const setTimelineContext =
|
|
11978
|
-
const sequenceContext =
|
|
11979
|
-
const nonceContext =
|
|
11980
|
-
const canUseRemotionHooksContext =
|
|
11981
|
-
const preloadContext =
|
|
11982
|
-
const resolveCompositionContext =
|
|
11983
|
-
const renderAssetManagerContext =
|
|
11984
|
-
const sequenceManagerContext =
|
|
11985
|
-
const bufferManagerContext =
|
|
11986
|
-
const logLevelContext =
|
|
12162
|
+
const compositionManagerCtx = React32.useContext(CompositionManager);
|
|
12163
|
+
const timelineContext = React32.useContext(TimelineContext);
|
|
12164
|
+
const setTimelineContext = React32.useContext(SetTimelineContext);
|
|
12165
|
+
const sequenceContext = React32.useContext(SequenceContext);
|
|
12166
|
+
const nonceContext = React32.useContext(NonceContext);
|
|
12167
|
+
const canUseRemotionHooksContext = React32.useContext(CanUseRemotionHooks);
|
|
12168
|
+
const preloadContext = React32.useContext(PreloadContext);
|
|
12169
|
+
const resolveCompositionContext = React32.useContext(ResolveCompositionContext);
|
|
12170
|
+
const renderAssetManagerContext = React32.useContext(RenderAssetManager);
|
|
12171
|
+
const sequenceManagerContext = React32.useContext(SequenceManager);
|
|
12172
|
+
const bufferManagerContext = React32.useContext(BufferingContextReact);
|
|
12173
|
+
const logLevelContext = React32.useContext(LogLevelContext);
|
|
11987
12174
|
return useMemo31(() => ({
|
|
11988
12175
|
compositionManagerCtx,
|
|
11989
12176
|
timelineContext,
|
|
@@ -12058,6 +12245,7 @@ var Internals = {
|
|
|
12058
12245
|
useUnsafeVideoConfig,
|
|
12059
12246
|
useFrameForVolumeProp,
|
|
12060
12247
|
useTimelinePosition,
|
|
12248
|
+
useAbsoluteTimelinePosition,
|
|
12061
12249
|
evaluateVolume,
|
|
12062
12250
|
getAbsoluteSrc,
|
|
12063
12251
|
Timeline: exports_timeline_position_state,
|
|
@@ -12067,8 +12255,9 @@ var Internals = {
|
|
|
12067
12255
|
VideoForPreview,
|
|
12068
12256
|
CompositionManager,
|
|
12069
12257
|
CompositionSetters,
|
|
12070
|
-
|
|
12258
|
+
VisualModeOverridesContext,
|
|
12071
12259
|
SequenceManager,
|
|
12260
|
+
SequenceStackTracesUpdateContext,
|
|
12072
12261
|
SequenceVisibilityToggleContext,
|
|
12073
12262
|
useSchema,
|
|
12074
12263
|
useSequenceControlOverride,
|
|
@@ -12152,7 +12341,9 @@ var Internals = {
|
|
|
12152
12341
|
TimelinePosition: exports_timeline_position_state,
|
|
12153
12342
|
DelayRenderContextType,
|
|
12154
12343
|
TimelineContext,
|
|
12155
|
-
|
|
12344
|
+
AbsoluteTimeContext,
|
|
12345
|
+
RenderAssetManagerProvider,
|
|
12346
|
+
getEffectiveVisualModeValue
|
|
12156
12347
|
};
|
|
12157
12348
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
12158
12349
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -12181,9 +12372,9 @@ var validateFrame = ({
|
|
|
12181
12372
|
}
|
|
12182
12373
|
};
|
|
12183
12374
|
var flattenChildren = (children) => {
|
|
12184
|
-
const childrenArray =
|
|
12375
|
+
const childrenArray = React33.Children.toArray(children);
|
|
12185
12376
|
return childrenArray.reduce((flatChildren, child) => {
|
|
12186
|
-
if (child.type ===
|
|
12377
|
+
if (child.type === React33.Fragment) {
|
|
12187
12378
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
12188
12379
|
}
|
|
12189
12380
|
flatChildren.push(child);
|
|
@@ -12204,7 +12395,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
12204
12395
|
});
|
|
12205
12396
|
};
|
|
12206
12397
|
var useRequireToBeInsideSeries = () => {
|
|
12207
|
-
const isInsideSeries =
|
|
12398
|
+
const isInsideSeries = React34.useContext(IsInsideSeriesContext);
|
|
12208
12399
|
if (!isInsideSeries) {
|
|
12209
12400
|
throw new Error("This component must be inside a <Series /> component.");
|
|
12210
12401
|
}
|
|
@@ -13084,8 +13275,8 @@ import { jsx as jsx83 } from "react/jsx-runtime";
|
|
|
13084
13275
|
import React52 from "react";
|
|
13085
13276
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
13086
13277
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
13087
|
-
import { jsx as
|
|
13088
|
-
import * as
|
|
13278
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
13279
|
+
import * as React342 from "react";
|
|
13089
13280
|
import * as ReactDOM4 from "react-dom";
|
|
13090
13281
|
import React9 from "react";
|
|
13091
13282
|
import * as React6 from "react";
|
|
@@ -13124,21 +13315,21 @@ import * as React252 from "react";
|
|
|
13124
13315
|
import * as React26 from "react";
|
|
13125
13316
|
import { jsx as jsx223 } from "react/jsx-runtime";
|
|
13126
13317
|
import * as React332 from "react";
|
|
13127
|
-
import * as
|
|
13318
|
+
import * as React29 from "react";
|
|
13128
13319
|
import { useState as useState112 } from "react";
|
|
13129
13320
|
import * as React272 from "react";
|
|
13130
|
-
import * as
|
|
13321
|
+
import * as React282 from "react";
|
|
13131
13322
|
import * as React322 from "react";
|
|
13132
|
-
import * as
|
|
13133
|
-
import * as
|
|
13323
|
+
import * as React31 from "react";
|
|
13324
|
+
import * as React302 from "react";
|
|
13134
13325
|
import { Fragment as Fragment62, jsx as jsx232, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13135
13326
|
import { forwardRef as forwardRef132, createElement as createElement7 } from "react";
|
|
13136
13327
|
import { forwardRef as forwardRef122, createElement as createElement6 } from "react";
|
|
13137
|
-
import * as
|
|
13328
|
+
import * as React35 from "react";
|
|
13138
13329
|
import { jsx as jsx242, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13139
13330
|
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
13140
13331
|
import * as React48 from "react";
|
|
13141
|
-
import * as
|
|
13332
|
+
import * as React362 from "react";
|
|
13142
13333
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
13143
13334
|
import * as React46 from "react";
|
|
13144
13335
|
import React39 from "react";
|
|
@@ -13736,11 +13927,11 @@ var Link = ({
|
|
|
13736
13927
|
});
|
|
13737
13928
|
};
|
|
13738
13929
|
var PlanePaperIcon = (props) => {
|
|
13739
|
-
return /* @__PURE__ */
|
|
13930
|
+
return /* @__PURE__ */ jsx113("svg", {
|
|
13740
13931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13741
13932
|
...props,
|
|
13742
13933
|
viewBox: "0 0 576 512",
|
|
13743
|
-
children: /* @__PURE__ */
|
|
13934
|
+
children: /* @__PURE__ */ jsx113("path", {
|
|
13744
13935
|
fill: "currentcolor",
|
|
13745
13936
|
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"
|
|
13746
13937
|
})
|
|
@@ -16719,7 +16910,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
16719
16910
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
16720
16911
|
};
|
|
16721
16912
|
var __assign = function() {
|
|
16722
|
-
__assign = Object.assign || function
|
|
16913
|
+
__assign = Object.assign || function __assign(t) {
|
|
16723
16914
|
for (var s, i = 1, n = arguments.length;i < n; i++) {
|
|
16724
16915
|
s = arguments[i];
|
|
16725
16916
|
for (var p in s)
|
|
@@ -16909,7 +17100,7 @@ var SideCar = function(_a) {
|
|
|
16909
17100
|
if (!Target) {
|
|
16910
17101
|
throw new Error("Sidecar medium not found");
|
|
16911
17102
|
}
|
|
16912
|
-
return
|
|
17103
|
+
return React282.createElement(Target, __assign({}, rest));
|
|
16913
17104
|
};
|
|
16914
17105
|
SideCar.isSideCarExport = true;
|
|
16915
17106
|
function exportSidecar(medium, exported) {
|
|
@@ -16920,9 +17111,9 @@ var effectCar = createSidecarMedium();
|
|
|
16920
17111
|
var nothing = function() {
|
|
16921
17112
|
return;
|
|
16922
17113
|
};
|
|
16923
|
-
var RemoveScroll =
|
|
16924
|
-
var ref =
|
|
16925
|
-
var _a =
|
|
17114
|
+
var RemoveScroll = React29.forwardRef(function(props, parentRef) {
|
|
17115
|
+
var ref = React29.useRef(null);
|
|
17116
|
+
var _a = React29.useState({
|
|
16926
17117
|
onScrollCapture: nothing,
|
|
16927
17118
|
onWheelCapture: nothing,
|
|
16928
17119
|
onTouchMoveCapture: nothing
|
|
@@ -16931,7 +17122,7 @@ var RemoveScroll = React292.forwardRef(function(props, parentRef) {
|
|
|
16931
17122
|
var SideCar2 = sideCar;
|
|
16932
17123
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
16933
17124
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
16934
|
-
return
|
|
17125
|
+
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));
|
|
16935
17126
|
});
|
|
16936
17127
|
RemoveScroll.defaultProps = {
|
|
16937
17128
|
enabled: true,
|
|
@@ -16999,7 +17190,7 @@ var stylesheetSingleton = function() {
|
|
|
16999
17190
|
var styleHookSingleton = function() {
|
|
17000
17191
|
var sheet = stylesheetSingleton();
|
|
17001
17192
|
return function(styles, isDynamic) {
|
|
17002
|
-
|
|
17193
|
+
React302.useEffect(function() {
|
|
17003
17194
|
sheet.add(styles);
|
|
17004
17195
|
return function() {
|
|
17005
17196
|
sheet.remove();
|
|
@@ -17104,7 +17295,7 @@ var getCurrentUseCounter = function() {
|
|
|
17104
17295
|
return isFinite(counter) ? counter : 0;
|
|
17105
17296
|
};
|
|
17106
17297
|
var useLockAttribute = function() {
|
|
17107
|
-
|
|
17298
|
+
React31.useEffect(function() {
|
|
17108
17299
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
17109
17300
|
return function() {
|
|
17110
17301
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -17119,10 +17310,10 @@ var useLockAttribute = function() {
|
|
|
17119
17310
|
var RemoveScrollBar = function(_a) {
|
|
17120
17311
|
var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
|
|
17121
17312
|
useLockAttribute();
|
|
17122
|
-
var gap =
|
|
17313
|
+
var gap = React31.useMemo(function() {
|
|
17123
17314
|
return getGapWidth(gapMode);
|
|
17124
17315
|
}, [gapMode]);
|
|
17125
|
-
return
|
|
17316
|
+
return React31.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
17126
17317
|
};
|
|
17127
17318
|
var passiveSupported = false;
|
|
17128
17319
|
if (typeof window !== "undefined") {
|
|
@@ -17423,9 +17614,9 @@ var Select = (props) => {
|
|
|
17423
17614
|
required
|
|
17424
17615
|
} = props;
|
|
17425
17616
|
const popperScope = usePopperScope(__scopeSelect);
|
|
17426
|
-
const [trigger, setTrigger] =
|
|
17427
|
-
const [valueNode, setValueNode] =
|
|
17428
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
17617
|
+
const [trigger, setTrigger] = React342.useState(null);
|
|
17618
|
+
const [valueNode, setValueNode] = React342.useState(null);
|
|
17619
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React342.useState(false);
|
|
17429
17620
|
const direction = useDirection(dir);
|
|
17430
17621
|
const [open = false, setOpen] = useControllableState({
|
|
17431
17622
|
prop: openProp,
|
|
@@ -17437,9 +17628,9 @@ var Select = (props) => {
|
|
|
17437
17628
|
defaultProp: defaultValue,
|
|
17438
17629
|
onChange: onValueChange
|
|
17439
17630
|
});
|
|
17440
|
-
const triggerPointerDownPosRef =
|
|
17631
|
+
const triggerPointerDownPosRef = React342.useRef(null);
|
|
17441
17632
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
17442
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
17633
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React342.useState(/* @__PURE__ */ new Set);
|
|
17443
17634
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
17444
17635
|
return /* @__PURE__ */ jsx232(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
|
|
17445
17636
|
required,
|
|
@@ -17461,10 +17652,10 @@ var Select = (props) => {
|
|
|
17461
17652
|
children: [
|
|
17462
17653
|
/* @__PURE__ */ jsx232(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx232(SelectNativeOptionsProvider, {
|
|
17463
17654
|
scope: props.__scopeSelect,
|
|
17464
|
-
onNativeOptionAdd:
|
|
17655
|
+
onNativeOptionAdd: React342.useCallback((option) => {
|
|
17465
17656
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
17466
17657
|
}, []),
|
|
17467
|
-
onNativeOptionRemove:
|
|
17658
|
+
onNativeOptionRemove: React342.useCallback((option) => {
|
|
17468
17659
|
setNativeOptionsSet((prev) => {
|
|
17469
17660
|
const optionsSet = new Set(prev);
|
|
17470
17661
|
optionsSet.delete(option);
|
|
@@ -17492,7 +17683,7 @@ var Select = (props) => {
|
|
|
17492
17683
|
};
|
|
17493
17684
|
Select.displayName = SELECT_NAME;
|
|
17494
17685
|
var TRIGGER_NAME = "SelectTrigger";
|
|
17495
|
-
var SelectTrigger =
|
|
17686
|
+
var SelectTrigger = React342.forwardRef((props, forwardedRef) => {
|
|
17496
17687
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
17497
17688
|
const popperScope = usePopperScope(__scopeSelect);
|
|
17498
17689
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -17560,7 +17751,7 @@ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
|
17560
17751
|
});
|
|
17561
17752
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
17562
17753
|
var VALUE_NAME = "SelectValue";
|
|
17563
|
-
var SelectValue =
|
|
17754
|
+
var SelectValue = React342.forwardRef((props, forwardedRef) => {
|
|
17564
17755
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
17565
17756
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
17566
17757
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -17578,7 +17769,7 @@ var SelectValue = React34.forwardRef((props, forwardedRef) => {
|
|
|
17578
17769
|
});
|
|
17579
17770
|
SelectValue.displayName = VALUE_NAME;
|
|
17580
17771
|
var ICON_NAME = "SelectIcon";
|
|
17581
|
-
var SelectIcon =
|
|
17772
|
+
var SelectIcon = React342.forwardRef((props, forwardedRef) => {
|
|
17582
17773
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
17583
17774
|
return /* @__PURE__ */ jsx232(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
17584
17775
|
});
|
|
@@ -17589,9 +17780,9 @@ var SelectPortal = (props) => {
|
|
|
17589
17780
|
};
|
|
17590
17781
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
17591
17782
|
var CONTENT_NAME2 = "SelectContent";
|
|
17592
|
-
var SelectContent =
|
|
17783
|
+
var SelectContent = React342.forwardRef((props, forwardedRef) => {
|
|
17593
17784
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
17594
|
-
const [fragment, setFragment] =
|
|
17785
|
+
const [fragment, setFragment] = React342.useState();
|
|
17595
17786
|
useLayoutEffect22(() => {
|
|
17596
17787
|
setFragment(new DocumentFragment);
|
|
17597
17788
|
}, []);
|
|
@@ -17605,7 +17796,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
17605
17796
|
var CONTENT_MARGIN = 10;
|
|
17606
17797
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
17607
17798
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
17608
|
-
var SelectContentImpl =
|
|
17799
|
+
var SelectContentImpl = React342.forwardRef((props, forwardedRef) => {
|
|
17609
17800
|
const {
|
|
17610
17801
|
__scopeSelect,
|
|
17611
17802
|
position = "item-aligned",
|
|
@@ -17625,20 +17816,20 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17625
17816
|
...contentProps
|
|
17626
17817
|
} = props;
|
|
17627
17818
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
17628
|
-
const [content, setContent] =
|
|
17629
|
-
const [viewport, setViewport] =
|
|
17819
|
+
const [content, setContent] = React342.useState(null);
|
|
17820
|
+
const [viewport, setViewport] = React342.useState(null);
|
|
17630
17821
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
17631
|
-
const [selectedItem, setSelectedItem] =
|
|
17632
|
-
const [selectedItemText, setSelectedItemText] =
|
|
17822
|
+
const [selectedItem, setSelectedItem] = React342.useState(null);
|
|
17823
|
+
const [selectedItemText, setSelectedItemText] = React342.useState(null);
|
|
17633
17824
|
const getItems = useCollection(__scopeSelect);
|
|
17634
|
-
const [isPositioned, setIsPositioned] =
|
|
17635
|
-
const firstValidItemFoundRef =
|
|
17636
|
-
|
|
17825
|
+
const [isPositioned, setIsPositioned] = React342.useState(false);
|
|
17826
|
+
const firstValidItemFoundRef = React342.useRef(false);
|
|
17827
|
+
React342.useEffect(() => {
|
|
17637
17828
|
if (content)
|
|
17638
17829
|
return hideOthers(content);
|
|
17639
17830
|
}, [content]);
|
|
17640
17831
|
useFocusGuards();
|
|
17641
|
-
const focusFirst2 =
|
|
17832
|
+
const focusFirst2 = React342.useCallback((candidates) => {
|
|
17642
17833
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
17643
17834
|
const [lastItem] = restItems.slice(-1);
|
|
17644
17835
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -17655,14 +17846,14 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17655
17846
|
return;
|
|
17656
17847
|
}
|
|
17657
17848
|
}, [getItems, viewport]);
|
|
17658
|
-
const focusSelectedItem =
|
|
17659
|
-
|
|
17849
|
+
const focusSelectedItem = React342.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
17850
|
+
React342.useEffect(() => {
|
|
17660
17851
|
if (isPositioned) {
|
|
17661
17852
|
focusSelectedItem();
|
|
17662
17853
|
}
|
|
17663
17854
|
}, [isPositioned, focusSelectedItem]);
|
|
17664
17855
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
17665
|
-
|
|
17856
|
+
React342.useEffect(() => {
|
|
17666
17857
|
if (content) {
|
|
17667
17858
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
17668
17859
|
const handlePointerMove = (event) => {
|
|
@@ -17692,7 +17883,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17692
17883
|
};
|
|
17693
17884
|
}
|
|
17694
17885
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
17695
|
-
|
|
17886
|
+
React342.useEffect(() => {
|
|
17696
17887
|
const close = () => onOpenChange(false);
|
|
17697
17888
|
window.addEventListener("blur", close);
|
|
17698
17889
|
window.addEventListener("resize", close);
|
|
@@ -17709,7 +17900,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17709
17900
|
setTimeout(() => nextItem.ref.current.focus());
|
|
17710
17901
|
}
|
|
17711
17902
|
});
|
|
17712
|
-
const itemRefCallback =
|
|
17903
|
+
const itemRefCallback = React342.useCallback((node, value, disabled) => {
|
|
17713
17904
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
17714
17905
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
17715
17906
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -17718,8 +17909,8 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17718
17909
|
firstValidItemFoundRef.current = true;
|
|
17719
17910
|
}
|
|
17720
17911
|
}, [context.value]);
|
|
17721
|
-
const handleItemLeave =
|
|
17722
|
-
const itemTextRefCallback =
|
|
17912
|
+
const handleItemLeave = React342.useCallback(() => content?.focus(), [content]);
|
|
17913
|
+
const itemTextRefCallback = React342.useCallback((node, value, disabled) => {
|
|
17723
17914
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
17724
17915
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
17725
17916
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -17814,18 +18005,18 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17814
18005
|
});
|
|
17815
18006
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
17816
18007
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
17817
|
-
var SelectItemAlignedPosition =
|
|
18008
|
+
var SelectItemAlignedPosition = React342.forwardRef((props, forwardedRef) => {
|
|
17818
18009
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
17819
18010
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
17820
18011
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
17821
|
-
const [contentWrapper, setContentWrapper] =
|
|
17822
|
-
const [content, setContent] =
|
|
18012
|
+
const [contentWrapper, setContentWrapper] = React342.useState(null);
|
|
18013
|
+
const [content, setContent] = React342.useState(null);
|
|
17823
18014
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
17824
18015
|
const getItems = useCollection(__scopeSelect);
|
|
17825
|
-
const shouldExpandOnScrollRef =
|
|
17826
|
-
const shouldRepositionRef =
|
|
18016
|
+
const shouldExpandOnScrollRef = React342.useRef(false);
|
|
18017
|
+
const shouldRepositionRef = React342.useRef(true);
|
|
17827
18018
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
17828
|
-
const position =
|
|
18019
|
+
const position = React342.useCallback(() => {
|
|
17829
18020
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
17830
18021
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
17831
18022
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -17906,12 +18097,12 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17906
18097
|
onPlaced
|
|
17907
18098
|
]);
|
|
17908
18099
|
useLayoutEffect22(() => position(), [position]);
|
|
17909
|
-
const [contentZIndex, setContentZIndex] =
|
|
18100
|
+
const [contentZIndex, setContentZIndex] = React342.useState();
|
|
17910
18101
|
useLayoutEffect22(() => {
|
|
17911
18102
|
if (content)
|
|
17912
18103
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
17913
18104
|
}, [content]);
|
|
17914
|
-
const handleScrollButtonChange =
|
|
18105
|
+
const handleScrollButtonChange = React342.useCallback((node) => {
|
|
17915
18106
|
if (node && shouldRepositionRef.current === true) {
|
|
17916
18107
|
position();
|
|
17917
18108
|
focusSelectedItem?.();
|
|
@@ -17945,7 +18136,7 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17945
18136
|
});
|
|
17946
18137
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
17947
18138
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
17948
|
-
var SelectPopperPosition =
|
|
18139
|
+
var SelectPopperPosition = React342.forwardRef((props, forwardedRef) => {
|
|
17949
18140
|
const {
|
|
17950
18141
|
__scopeSelect,
|
|
17951
18142
|
align = "start",
|
|
@@ -17975,12 +18166,12 @@ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17975
18166
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
17976
18167
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
17977
18168
|
var VIEWPORT_NAME = "SelectViewport";
|
|
17978
|
-
var SelectViewport =
|
|
18169
|
+
var SelectViewport = React342.forwardRef((props, forwardedRef) => {
|
|
17979
18170
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
17980
18171
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
17981
18172
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
17982
18173
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
17983
|
-
const prevScrollTopRef =
|
|
18174
|
+
const prevScrollTopRef = React342.useRef(0);
|
|
17984
18175
|
return /* @__PURE__ */ jsxs4(Fragment62, { children: [
|
|
17985
18176
|
/* @__PURE__ */ jsx232("style", {
|
|
17986
18177
|
dangerouslySetInnerHTML: {
|
|
@@ -18029,14 +18220,14 @@ var SelectViewport = React34.forwardRef((props, forwardedRef) => {
|
|
|
18029
18220
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
18030
18221
|
var GROUP_NAME = "SelectGroup";
|
|
18031
18222
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
18032
|
-
var SelectGroup =
|
|
18223
|
+
var SelectGroup = React342.forwardRef((props, forwardedRef) => {
|
|
18033
18224
|
const { __scopeSelect, ...groupProps } = props;
|
|
18034
18225
|
const groupId = useId();
|
|
18035
18226
|
return /* @__PURE__ */ jsx232(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx232(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
18036
18227
|
});
|
|
18037
18228
|
SelectGroup.displayName = GROUP_NAME;
|
|
18038
18229
|
var LABEL_NAME = "SelectLabel";
|
|
18039
|
-
var SelectLabel =
|
|
18230
|
+
var SelectLabel = React342.forwardRef((props, forwardedRef) => {
|
|
18040
18231
|
const { __scopeSelect, ...labelProps } = props;
|
|
18041
18232
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
18042
18233
|
return /* @__PURE__ */ jsx232(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -18044,7 +18235,7 @@ var SelectLabel = React34.forwardRef((props, forwardedRef) => {
|
|
|
18044
18235
|
SelectLabel.displayName = LABEL_NAME;
|
|
18045
18236
|
var ITEM_NAME = "SelectItem";
|
|
18046
18237
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
18047
|
-
var SelectItem =
|
|
18238
|
+
var SelectItem = React342.forwardRef((props, forwardedRef) => {
|
|
18048
18239
|
const {
|
|
18049
18240
|
__scopeSelect,
|
|
18050
18241
|
value,
|
|
@@ -18055,8 +18246,8 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
18055
18246
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
18056
18247
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
18057
18248
|
const isSelected = context.value === value;
|
|
18058
|
-
const [textValue, setTextValue] =
|
|
18059
|
-
const [isFocused, setIsFocused] =
|
|
18249
|
+
const [textValue, setTextValue] = React342.useState(textValueProp ?? "");
|
|
18250
|
+
const [isFocused, setIsFocused] = React342.useState(false);
|
|
18060
18251
|
const composedRefs = useComposedRefs(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
18061
18252
|
const textId = useId();
|
|
18062
18253
|
const handleSelect = () => {
|
|
@@ -18074,7 +18265,7 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
18074
18265
|
disabled,
|
|
18075
18266
|
textId,
|
|
18076
18267
|
isSelected,
|
|
18077
|
-
onItemTextChange:
|
|
18268
|
+
onItemTextChange: React342.useCallback((node) => {
|
|
18078
18269
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
18079
18270
|
}, []),
|
|
18080
18271
|
children: /* @__PURE__ */ jsx232(Collection.ItemSlot, {
|
|
@@ -18123,16 +18314,16 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
18123
18314
|
});
|
|
18124
18315
|
SelectItem.displayName = ITEM_NAME;
|
|
18125
18316
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
18126
|
-
var SelectItemText =
|
|
18317
|
+
var SelectItemText = React342.forwardRef((props, forwardedRef) => {
|
|
18127
18318
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
18128
18319
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
18129
18320
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
18130
18321
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
18131
18322
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
18132
|
-
const [itemTextNode, setItemTextNode] =
|
|
18323
|
+
const [itemTextNode, setItemTextNode] = React342.useState(null);
|
|
18133
18324
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
18134
18325
|
const textContent = itemTextNode?.textContent;
|
|
18135
|
-
const nativeOption =
|
|
18326
|
+
const nativeOption = React342.useMemo(() => /* @__PURE__ */ jsx232("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
18136
18327
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
18137
18328
|
useLayoutEffect22(() => {
|
|
18138
18329
|
onNativeOptionAdd(nativeOption);
|
|
@@ -18145,17 +18336,17 @@ var SelectItemText = React34.forwardRef((props, forwardedRef) => {
|
|
|
18145
18336
|
});
|
|
18146
18337
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
18147
18338
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
18148
|
-
var SelectItemIndicator =
|
|
18339
|
+
var SelectItemIndicator = React342.forwardRef((props, forwardedRef) => {
|
|
18149
18340
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
18150
18341
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
18151
18342
|
return itemContext.isSelected ? /* @__PURE__ */ jsx232(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
18152
18343
|
});
|
|
18153
18344
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
18154
18345
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
18155
|
-
var SelectScrollUpButton =
|
|
18346
|
+
var SelectScrollUpButton = React342.forwardRef((props, forwardedRef) => {
|
|
18156
18347
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
18157
18348
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
18158
|
-
const [canScrollUp, setCanScrollUp] =
|
|
18349
|
+
const [canScrollUp, setCanScrollUp] = React342.useState(false);
|
|
18159
18350
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
18160
18351
|
useLayoutEffect22(() => {
|
|
18161
18352
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -18183,10 +18374,10 @@ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
18183
18374
|
});
|
|
18184
18375
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
18185
18376
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
18186
|
-
var SelectScrollDownButton =
|
|
18377
|
+
var SelectScrollDownButton = React342.forwardRef((props, forwardedRef) => {
|
|
18187
18378
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
18188
18379
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
18189
|
-
const [canScrollDown, setCanScrollDown] =
|
|
18380
|
+
const [canScrollDown, setCanScrollDown] = React342.useState(false);
|
|
18190
18381
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
18191
18382
|
useLayoutEffect22(() => {
|
|
18192
18383
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -18214,18 +18405,18 @@ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
18214
18405
|
}) : null;
|
|
18215
18406
|
});
|
|
18216
18407
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
18217
|
-
var SelectScrollButtonImpl =
|
|
18408
|
+
var SelectScrollButtonImpl = React342.forwardRef((props, forwardedRef) => {
|
|
18218
18409
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
18219
18410
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
18220
|
-
const autoScrollTimerRef =
|
|
18411
|
+
const autoScrollTimerRef = React342.useRef(null);
|
|
18221
18412
|
const getItems = useCollection(__scopeSelect);
|
|
18222
|
-
const clearAutoScrollTimer =
|
|
18413
|
+
const clearAutoScrollTimer = React342.useCallback(() => {
|
|
18223
18414
|
if (autoScrollTimerRef.current !== null) {
|
|
18224
18415
|
window.clearInterval(autoScrollTimerRef.current);
|
|
18225
18416
|
autoScrollTimerRef.current = null;
|
|
18226
18417
|
}
|
|
18227
18418
|
}, []);
|
|
18228
|
-
|
|
18419
|
+
React342.useEffect(() => {
|
|
18229
18420
|
return () => clearAutoScrollTimer();
|
|
18230
18421
|
}, [clearAutoScrollTimer]);
|
|
18231
18422
|
useLayoutEffect22(() => {
|
|
@@ -18254,13 +18445,13 @@ var SelectScrollButtonImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
18254
18445
|
});
|
|
18255
18446
|
});
|
|
18256
18447
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
18257
|
-
var SelectSeparator =
|
|
18448
|
+
var SelectSeparator = React342.forwardRef((props, forwardedRef) => {
|
|
18258
18449
|
const { __scopeSelect, ...separatorProps } = props;
|
|
18259
18450
|
return /* @__PURE__ */ jsx232(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
18260
18451
|
});
|
|
18261
18452
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
18262
18453
|
var ARROW_NAME2 = "SelectArrow";
|
|
18263
|
-
var SelectArrow =
|
|
18454
|
+
var SelectArrow = React342.forwardRef((props, forwardedRef) => {
|
|
18264
18455
|
const { __scopeSelect, ...arrowProps } = props;
|
|
18265
18456
|
const popperScope = usePopperScope(__scopeSelect);
|
|
18266
18457
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -18271,12 +18462,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
18271
18462
|
function shouldShowPlaceholder(value) {
|
|
18272
18463
|
return value === "" || value === undefined;
|
|
18273
18464
|
}
|
|
18274
|
-
var BubbleSelect =
|
|
18465
|
+
var BubbleSelect = React342.forwardRef((props, forwardedRef) => {
|
|
18275
18466
|
const { value, ...selectProps } = props;
|
|
18276
|
-
const ref =
|
|
18467
|
+
const ref = React342.useRef(null);
|
|
18277
18468
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
18278
18469
|
const prevValue = usePrevious(value);
|
|
18279
|
-
|
|
18470
|
+
React342.useEffect(() => {
|
|
18280
18471
|
const select = ref.current;
|
|
18281
18472
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
18282
18473
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -18292,9 +18483,9 @@ var BubbleSelect = React34.forwardRef((props, forwardedRef) => {
|
|
|
18292
18483
|
BubbleSelect.displayName = "BubbleSelect";
|
|
18293
18484
|
function useTypeaheadSearch(onSearchChange) {
|
|
18294
18485
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
18295
|
-
const searchRef =
|
|
18296
|
-
const timerRef =
|
|
18297
|
-
const handleTypeaheadSearch =
|
|
18486
|
+
const searchRef = React342.useRef("");
|
|
18487
|
+
const timerRef = React342.useRef(0);
|
|
18488
|
+
const handleTypeaheadSearch = React342.useCallback((key) => {
|
|
18298
18489
|
const search = searchRef.current + key;
|
|
18299
18490
|
handleSearchChange(search);
|
|
18300
18491
|
(function updateSearch(value) {
|
|
@@ -18304,11 +18495,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
18304
18495
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
18305
18496
|
})(search);
|
|
18306
18497
|
}, [handleSearchChange]);
|
|
18307
|
-
const resetTypeahead =
|
|
18498
|
+
const resetTypeahead = React342.useCallback(() => {
|
|
18308
18499
|
searchRef.current = "";
|
|
18309
18500
|
window.clearTimeout(timerRef.current);
|
|
18310
18501
|
}, []);
|
|
18311
|
-
|
|
18502
|
+
React342.useEffect(() => {
|
|
18312
18503
|
return () => window.clearTimeout(timerRef.current);
|
|
18313
18504
|
}, []);
|
|
18314
18505
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -18397,7 +18588,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
18397
18588
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
18398
18589
|
var Select2 = Root222;
|
|
18399
18590
|
var SelectValue2 = Value;
|
|
18400
|
-
var SelectTrigger2 =
|
|
18591
|
+
var SelectTrigger2 = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
18401
18592
|
ref,
|
|
18402
18593
|
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),
|
|
18403
18594
|
...props,
|
|
@@ -18412,7 +18603,7 @@ var SelectTrigger2 = React352.forwardRef(({ className, children, ...props }, ref
|
|
|
18412
18603
|
]
|
|
18413
18604
|
}));
|
|
18414
18605
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
18415
|
-
var SelectScrollUpButton2 =
|
|
18606
|
+
var SelectScrollUpButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(ScrollUpButton, {
|
|
18416
18607
|
ref,
|
|
18417
18608
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
18418
18609
|
...props,
|
|
@@ -18421,7 +18612,7 @@ var SelectScrollUpButton2 = React352.forwardRef(({ className, ...props }, ref) =
|
|
|
18421
18612
|
})
|
|
18422
18613
|
}));
|
|
18423
18614
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
18424
|
-
var SelectScrollDownButton2 =
|
|
18615
|
+
var SelectScrollDownButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(ScrollDownButton, {
|
|
18425
18616
|
ref,
|
|
18426
18617
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
18427
18618
|
...props,
|
|
@@ -18430,7 +18621,7 @@ var SelectScrollDownButton2 = React352.forwardRef(({ className, ...props }, ref)
|
|
|
18430
18621
|
})
|
|
18431
18622
|
}));
|
|
18432
18623
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
18433
|
-
var SelectContent2 =
|
|
18624
|
+
var SelectContent2 = React35.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx242(Portal2, {
|
|
18434
18625
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
18435
18626
|
ref,
|
|
18436
18627
|
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),
|
|
@@ -18447,13 +18638,13 @@ var SelectContent2 = React352.forwardRef(({ className, children, position = "pop
|
|
|
18447
18638
|
})
|
|
18448
18639
|
}));
|
|
18449
18640
|
SelectContent2.displayName = Content2.displayName;
|
|
18450
|
-
var SelectLabel2 =
|
|
18641
|
+
var SelectLabel2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(Label, {
|
|
18451
18642
|
ref,
|
|
18452
18643
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
18453
18644
|
...props
|
|
18454
18645
|
}));
|
|
18455
18646
|
SelectLabel2.displayName = Label.displayName;
|
|
18456
|
-
var SelectItem2 =
|
|
18647
|
+
var SelectItem2 = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
18457
18648
|
ref,
|
|
18458
18649
|
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),
|
|
18459
18650
|
...props,
|
|
@@ -18472,7 +18663,7 @@ var SelectItem2 = React352.forwardRef(({ className, children, ...props }, ref) =
|
|
|
18472
18663
|
]
|
|
18473
18664
|
}));
|
|
18474
18665
|
SelectItem2.displayName = Item.displayName;
|
|
18475
|
-
var SelectSeparator2 =
|
|
18666
|
+
var SelectSeparator2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx242(Separator, {
|
|
18476
18667
|
ref,
|
|
18477
18668
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
18478
18669
|
...props
|
|
@@ -18501,19 +18692,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
18501
18692
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
18502
18693
|
let defaultContexts = [];
|
|
18503
18694
|
function createContext32(rootComponentName, defaultContext) {
|
|
18504
|
-
const BaseContext =
|
|
18695
|
+
const BaseContext = React362.createContext(defaultContext);
|
|
18505
18696
|
const index2 = defaultContexts.length;
|
|
18506
18697
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
18507
18698
|
const Provider = (props) => {
|
|
18508
18699
|
const { scope, children, ...context } = props;
|
|
18509
18700
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
18510
|
-
const value =
|
|
18701
|
+
const value = React362.useMemo(() => context, Object.values(context));
|
|
18511
18702
|
return /* @__PURE__ */ jsx262(Context.Provider, { value, children });
|
|
18512
18703
|
};
|
|
18513
18704
|
Provider.displayName = rootComponentName + "Provider";
|
|
18514
18705
|
function useContext222(consumerName, scope) {
|
|
18515
18706
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
18516
|
-
const context =
|
|
18707
|
+
const context = React362.useContext(Context);
|
|
18517
18708
|
if (context)
|
|
18518
18709
|
return context;
|
|
18519
18710
|
if (defaultContext !== undefined)
|
|
@@ -18524,11 +18715,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
18524
18715
|
}
|
|
18525
18716
|
const createScope = () => {
|
|
18526
18717
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
18527
|
-
return
|
|
18718
|
+
return React362.createContext(defaultContext);
|
|
18528
18719
|
});
|
|
18529
18720
|
return function useScope(scope) {
|
|
18530
18721
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
18531
|
-
return
|
|
18722
|
+
return React362.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
18532
18723
|
};
|
|
18533
18724
|
};
|
|
18534
18725
|
createScope.scopeName = scopeName;
|
|
@@ -18549,7 +18740,7 @@ function composeContextScopes2(...scopes) {
|
|
|
18549
18740
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
18550
18741
|
return { ...nextScopes2, ...currentScope };
|
|
18551
18742
|
}, {});
|
|
18552
|
-
return
|
|
18743
|
+
return React362.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
18553
18744
|
};
|
|
18554
18745
|
};
|
|
18555
18746
|
createScope.scopeName = baseScope.scopeName;
|