@remotion/promo-pages 4.0.494 → 4.0.496
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 +522 -381
- package/dist/design.js +289 -235
- package/dist/experts.js +286 -232
- package/dist/homepage/Pricing.js +296 -242
- package/dist/prompts/PromptsGallery.js +289 -235
- package/dist/prompts/PromptsShow.js +313 -259
- package/dist/prompts/PromptsSubmit.js +289 -235
- package/dist/team.js +289 -235
- package/dist/template-modal-content.js +291 -237
- package/dist/templates.js +289 -235
- package/package.json +13 -13
|
@@ -45,7 +45,7 @@ __export(exports_vidstack_CZgUA94N, {
|
|
|
45
45
|
useSignal: () => useSignal,
|
|
46
46
|
useReactScope: () => useReactScope,
|
|
47
47
|
useReactContext: () => useReactContext,
|
|
48
|
-
useContext: () =>
|
|
48
|
+
useContext: () => useContext48,
|
|
49
49
|
uppercaseFirstChar: () => uppercaseFirstChar,
|
|
50
50
|
untrack: () => untrack,
|
|
51
51
|
toggleClass: () => toggleClass,
|
|
@@ -619,7 +619,7 @@ function provideContext(context, value, scope = getScope()) {
|
|
|
619
619
|
const hasProvidedValue = !isUndefined(value);
|
|
620
620
|
setContext(context.id, hasProvidedValue ? value : context.provide?.(), scope);
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function useContext48(context) {
|
|
623
623
|
const value = getContext(context.id);
|
|
624
624
|
return value;
|
|
625
625
|
}
|
|
@@ -679,7 +679,7 @@ class State {
|
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
function useState44(state) {
|
|
682
|
-
return
|
|
682
|
+
return useContext48(state);
|
|
683
683
|
}
|
|
684
684
|
function camelToKebabCase(str) {
|
|
685
685
|
return str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -7061,7 +7061,7 @@ function boundTime(time, store) {
|
|
|
7061
7061
|
return Math.min(Math.max(store.seekableStart() + 0.1, clippedTime), store.seekableEnd() - 0.1);
|
|
7062
7062
|
}
|
|
7063
7063
|
function useMediaContext() {
|
|
7064
|
-
return
|
|
7064
|
+
return useContext48(mediaContext);
|
|
7065
7065
|
}
|
|
7066
7066
|
|
|
7067
7067
|
class MediaRemoteControl {
|
|
@@ -13976,7 +13976,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
13976
13976
|
if (!this.connectScope)
|
|
13977
13977
|
return;
|
|
13978
13978
|
this.#attach();
|
|
13979
|
-
const tooltip =
|
|
13979
|
+
const tooltip = useContext48(tooltipContext);
|
|
13980
13980
|
onDispose(() => {
|
|
13981
13981
|
const button = this.#getButton();
|
|
13982
13982
|
button && tooltip.detachTrigger(button);
|
|
@@ -13984,7 +13984,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
13984
13984
|
}));
|
|
13985
13985
|
}
|
|
13986
13986
|
#attach() {
|
|
13987
|
-
const button = this.#getButton(), tooltip =
|
|
13987
|
+
const button = this.#getButton(), tooltip = useContext48(tooltipContext);
|
|
13988
13988
|
button && tooltip.attachTrigger(button);
|
|
13989
13989
|
}
|
|
13990
13990
|
#getButton() {
|
|
@@ -14017,7 +14017,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14017
14017
|
}
|
|
14018
14018
|
onConnect(el) {
|
|
14019
14019
|
this.#attach(el);
|
|
14020
|
-
const tooltip =
|
|
14020
|
+
const tooltip = useContext48(tooltipContext);
|
|
14021
14021
|
onDispose(() => tooltip.detachContent(el));
|
|
14022
14022
|
onDispose(requestScopedAnimationFrame(() => {
|
|
14023
14023
|
if (!this.connectScope)
|
|
@@ -14026,11 +14026,11 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14026
14026
|
}));
|
|
14027
14027
|
}
|
|
14028
14028
|
#attach(el) {
|
|
14029
|
-
const tooltip =
|
|
14029
|
+
const tooltip = useContext48(tooltipContext);
|
|
14030
14030
|
tooltip.attachContent(el);
|
|
14031
14031
|
}
|
|
14032
14032
|
#watchPlacement() {
|
|
14033
|
-
const { showing } =
|
|
14033
|
+
const { showing } = useContext48(tooltipContext);
|
|
14034
14034
|
if (!showing())
|
|
14035
14035
|
return;
|
|
14036
14036
|
const { placement, offset: mainOffset, alignOffset } = this.$props;
|
|
@@ -14041,7 +14041,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14041
14041
|
});
|
|
14042
14042
|
}
|
|
14043
14043
|
#getTrigger() {
|
|
14044
|
-
return
|
|
14044
|
+
return useContext48(tooltipContext).trigger();
|
|
14045
14045
|
}
|
|
14046
14046
|
};
|
|
14047
14047
|
ToggleButtonController = class ToggleButtonController extends ViewController {
|
|
@@ -14537,7 +14537,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14537
14537
|
}
|
|
14538
14538
|
onSetup() {
|
|
14539
14539
|
if (hasProvidedContext(sliderObserverContext)) {
|
|
14540
|
-
this.#observer =
|
|
14540
|
+
this.#observer = useContext48(sliderObserverContext);
|
|
14541
14541
|
}
|
|
14542
14542
|
}
|
|
14543
14543
|
onConnect(el) {
|
|
@@ -15153,7 +15153,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15153
15153
|
#slider;
|
|
15154
15154
|
onSetup() {
|
|
15155
15155
|
this.#slider = useState44(Slider.state);
|
|
15156
|
-
this.#format =
|
|
15156
|
+
this.#format = useContext48(sliderValueFormatContext);
|
|
15157
15157
|
this.#text = computed(this.getValueText.bind(this));
|
|
15158
15158
|
}
|
|
15159
15159
|
getValueText() {
|
|
@@ -15192,7 +15192,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15192
15192
|
};
|
|
15193
15193
|
#slider;
|
|
15194
15194
|
onSetup() {
|
|
15195
|
-
this.#slider =
|
|
15195
|
+
this.#slider = useContext48(sliderContext);
|
|
15196
15196
|
const { active } = useState44(Slider.state);
|
|
15197
15197
|
this.setAttributes({
|
|
15198
15198
|
"data-visible": active
|
|
@@ -15620,7 +15620,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15620
15620
|
}
|
|
15621
15621
|
}
|
|
15622
15622
|
#watchPreviewing() {
|
|
15623
|
-
const player = this.#media.player.el, { preview } =
|
|
15623
|
+
const player = this.#media.player.el, { preview } = useContext48(sliderContext);
|
|
15624
15624
|
player && preview() && setAttribute(player, "data-preview", this.$state.active());
|
|
15625
15625
|
}
|
|
15626
15626
|
#seeking(time, event2) {
|
|
@@ -16058,7 +16058,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16058
16058
|
closeMenu: this.close.bind(this)
|
|
16059
16059
|
});
|
|
16060
16060
|
if (hasProvidedContext(menuContext)) {
|
|
16061
|
-
this.#parentMenu =
|
|
16061
|
+
this.#parentMenu = useContext48(menuContext);
|
|
16062
16062
|
}
|
|
16063
16063
|
this.#observeSliders();
|
|
16064
16064
|
this.setAttributes({
|
|
@@ -16103,7 +16103,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16103
16103
|
this.#transitionCallbacks.clear();
|
|
16104
16104
|
}
|
|
16105
16105
|
#observeSliders() {
|
|
16106
|
-
let sliderActiveTimer = -1, parentSliderObserver = hasProvidedContext(sliderObserverContext) ?
|
|
16106
|
+
let sliderActiveTimer = -1, parentSliderObserver = hasProvidedContext(sliderObserverContext) ? useContext48(sliderObserverContext) : null;
|
|
16107
16107
|
provideContext(sliderObserverContext, {
|
|
16108
16108
|
onDragStart: () => {
|
|
16109
16109
|
parentSliderObserver?.onDragStart?.();
|
|
@@ -16430,7 +16430,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16430
16430
|
new FocusVisibleController;
|
|
16431
16431
|
}
|
|
16432
16432
|
onSetup() {
|
|
16433
|
-
this.#menu =
|
|
16433
|
+
this.#menu = useContext48(menuContext);
|
|
16434
16434
|
}
|
|
16435
16435
|
onAttach(el) {
|
|
16436
16436
|
this.#menu.attachMenuButton(this);
|
|
@@ -16546,10 +16546,10 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16546
16546
|
});
|
|
16547
16547
|
}
|
|
16548
16548
|
onAttach(el) {
|
|
16549
|
-
this.#menu =
|
|
16549
|
+
this.#menu = useContext48(menuContext);
|
|
16550
16550
|
this.#menu.attachMenuItems(this);
|
|
16551
16551
|
if (hasProvidedContext(menuPortalContext)) {
|
|
16552
|
-
const portal =
|
|
16552
|
+
const portal = useContext48(menuPortalContext);
|
|
16553
16553
|
if (portal) {
|
|
16554
16554
|
provideContext(menuPortalContext, null);
|
|
16555
16555
|
portal.attach(el);
|
|
@@ -16724,12 +16724,12 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16724
16724
|
}
|
|
16725
16725
|
#onDisconnect() {
|
|
16726
16726
|
scoped(() => {
|
|
16727
|
-
const group =
|
|
16727
|
+
const group = useContext48(radioControllerContext);
|
|
16728
16728
|
group.remove(this.#controller);
|
|
16729
16729
|
}, this.connectScope);
|
|
16730
16730
|
}
|
|
16731
16731
|
#addToGroup() {
|
|
16732
|
-
const group =
|
|
16732
|
+
const group = useContext48(radioControllerContext);
|
|
16733
16733
|
group.add(this.#controller);
|
|
16734
16734
|
}
|
|
16735
16735
|
#watchValue() {
|
|
@@ -18712,7 +18712,7 @@ var getDefaultConfig = () => {
|
|
|
18712
18712
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
18713
18713
|
|
|
18714
18714
|
// ../design/dist/esm/index.mjs
|
|
18715
|
-
import React33, { useEffect as useEffect21, useMemo as
|
|
18715
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo43, useState as useState23 } from "react";
|
|
18716
18716
|
|
|
18717
18717
|
// ../paths/dist/esm/index.mjs
|
|
18718
18718
|
var cutLInstruction = ({
|
|
@@ -21509,9 +21509,9 @@ import React9 from "react";
|
|
|
21509
21509
|
import {
|
|
21510
21510
|
forwardRef as forwardRef3,
|
|
21511
21511
|
useCallback as useCallback6,
|
|
21512
|
-
useContext as
|
|
21512
|
+
useContext as useContext18,
|
|
21513
21513
|
useEffect as useEffect3,
|
|
21514
|
-
useMemo as
|
|
21514
|
+
useMemo as useMemo15,
|
|
21515
21515
|
useRef as useRef6,
|
|
21516
21516
|
useState as useState5
|
|
21517
21517
|
} from "react";
|
|
@@ -21530,13 +21530,14 @@ import { useContext as useContext11 } from "react";
|
|
|
21530
21530
|
import { useContext as useContext13 } from "react";
|
|
21531
21531
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
21532
21532
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
21533
|
-
import { createContext as createContext14 } from "react";
|
|
21534
21533
|
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
21535
21534
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
21536
|
-
import React13, { createContext as
|
|
21535
|
+
import React13, { createContext as createContext14 } from "react";
|
|
21537
21536
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
21538
|
-
import
|
|
21539
|
-
import {
|
|
21537
|
+
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
21538
|
+
import { createContext as createContext15 } from "react";
|
|
21539
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext17, useMemo as useMemo14, useState as useState4 } from "react";
|
|
21540
|
+
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
21540
21541
|
import { createContext as createContext16 } from "react";
|
|
21541
21542
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
21542
21543
|
import {
|
|
@@ -21547,70 +21548,70 @@ import {
|
|
|
21547
21548
|
useRef as useRef9,
|
|
21548
21549
|
useState as useState6
|
|
21549
21550
|
} from "react";
|
|
21550
|
-
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as
|
|
21551
|
-
import { useEffect as useEffect4, useMemo as
|
|
21551
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
21552
|
+
import { useEffect as useEffect4, useMemo as useMemo16, useRef as useRef7 } from "react";
|
|
21552
21553
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
21553
21554
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
21554
|
-
import { useContext as
|
|
21555
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
21555
21556
|
import {
|
|
21556
21557
|
createContext as createContext17,
|
|
21557
21558
|
useCallback as useCallback8,
|
|
21558
21559
|
useImperativeHandle as useImperativeHandle3,
|
|
21559
21560
|
useLayoutEffect as useLayoutEffect3,
|
|
21560
|
-
useMemo as
|
|
21561
|
+
useMemo as useMemo18,
|
|
21561
21562
|
useRef as useRef10,
|
|
21562
21563
|
useState as useState7
|
|
21563
21564
|
} from "react";
|
|
21564
21565
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
21565
|
-
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as
|
|
21566
|
-
import React17, { createContext as createContext18, useMemo as
|
|
21566
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
21567
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
21567
21568
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
21568
|
-
import { useContext as
|
|
21569
|
+
import { useContext as useContext20 } from "react";
|
|
21569
21570
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
21570
21571
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
21571
|
-
import { createContext as createContext20, useMemo as
|
|
21572
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
21572
21573
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
21573
21574
|
import { useCallback as useCallback13 } from "react";
|
|
21574
21575
|
import React23, {
|
|
21575
21576
|
forwardRef as forwardRef5,
|
|
21576
|
-
useContext as
|
|
21577
|
+
useContext as useContext29,
|
|
21577
21578
|
useEffect as useEffect14,
|
|
21578
21579
|
useImperativeHandle as useImperativeHandle4,
|
|
21579
|
-
useMemo as
|
|
21580
|
+
useMemo as useMemo28,
|
|
21580
21581
|
useRef as useRef19,
|
|
21581
21582
|
useState as useState14
|
|
21582
21583
|
} from "react";
|
|
21583
|
-
import { useContext as
|
|
21584
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
21584
21585
|
import React20, {
|
|
21585
21586
|
createContext as createContext21,
|
|
21586
21587
|
createRef as createRef2,
|
|
21587
21588
|
useCallback as useCallback9,
|
|
21588
|
-
useContext as
|
|
21589
|
+
useContext as useContext21,
|
|
21589
21590
|
useEffect as useEffect7,
|
|
21590
|
-
useMemo as
|
|
21591
|
+
useMemo as useMemo22,
|
|
21591
21592
|
useRef as useRef12,
|
|
21592
21593
|
useState as useState10
|
|
21593
21594
|
} from "react";
|
|
21594
|
-
import { useMemo as
|
|
21595
|
+
import { useMemo as useMemo21, useRef as useRef11 } from "react";
|
|
21595
21596
|
import { jsx as jsx19, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
21596
21597
|
import { useRef as useRef13 } from "react";
|
|
21597
|
-
import { useContext as
|
|
21598
|
-
import { useContext as
|
|
21598
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState11 } from "react";
|
|
21599
|
+
import { useContext as useContext23 } from "react";
|
|
21599
21600
|
import {
|
|
21600
21601
|
useCallback as useCallback12,
|
|
21601
|
-
useContext as
|
|
21602
|
+
useContext as useContext27,
|
|
21602
21603
|
useEffect as useEffect12,
|
|
21603
21604
|
useLayoutEffect as useLayoutEffect7,
|
|
21604
21605
|
useRef as useRef18
|
|
21605
21606
|
} from "react";
|
|
21606
|
-
import { useCallback as useCallback11, useMemo as
|
|
21607
|
-
import { useContext as
|
|
21607
|
+
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef16 } from "react";
|
|
21608
|
+
import { useContext as useContext26, useMemo as useMemo25 } from "react";
|
|
21608
21609
|
import React21, {
|
|
21609
21610
|
useCallback as useCallback10,
|
|
21610
|
-
useContext as
|
|
21611
|
+
useContext as useContext25,
|
|
21611
21612
|
useEffect as useEffect9,
|
|
21612
21613
|
useLayoutEffect as useLayoutEffect6,
|
|
21613
|
-
useMemo as
|
|
21614
|
+
useMemo as useMemo24,
|
|
21614
21615
|
useRef as useRef15,
|
|
21615
21616
|
useState as useState12
|
|
21616
21617
|
} from "react";
|
|
@@ -21619,15 +21620,15 @@ import React22 from "react";
|
|
|
21619
21620
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
21620
21621
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
21621
21622
|
import { useEffect as useEffect13 } from "react";
|
|
21622
|
-
import { createContext as createContext22, useContext as
|
|
21623
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
|
|
21623
21624
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
21624
21625
|
import {
|
|
21625
21626
|
forwardRef as forwardRef6,
|
|
21626
|
-
useContext as
|
|
21627
|
+
useContext as useContext30,
|
|
21627
21628
|
useEffect as useEffect15,
|
|
21628
21629
|
useImperativeHandle as useImperativeHandle5,
|
|
21629
21630
|
useLayoutEffect as useLayoutEffect8,
|
|
21630
|
-
useMemo as
|
|
21631
|
+
useMemo as useMemo29,
|
|
21631
21632
|
useRef as useRef20
|
|
21632
21633
|
} from "react";
|
|
21633
21634
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
@@ -21637,7 +21638,7 @@ import {
|
|
|
21637
21638
|
useCallback as useCallback15,
|
|
21638
21639
|
useEffect as useEffect16,
|
|
21639
21640
|
useImperativeHandle as useImperativeHandle6,
|
|
21640
|
-
useMemo as
|
|
21641
|
+
useMemo as useMemo30,
|
|
21641
21642
|
useRef as useRef21,
|
|
21642
21643
|
useState as useState15
|
|
21643
21644
|
} from "react";
|
|
@@ -21646,19 +21647,19 @@ import {
|
|
|
21646
21647
|
createContext as createContext23,
|
|
21647
21648
|
forwardRef as forwardRef9,
|
|
21648
21649
|
useCallback as useCallback16,
|
|
21649
|
-
useContext as
|
|
21650
|
+
useContext as useContext32,
|
|
21650
21651
|
useLayoutEffect as useLayoutEffect9,
|
|
21651
|
-
useMemo as
|
|
21652
|
+
useMemo as useMemo31,
|
|
21652
21653
|
useRef as useRef22
|
|
21653
21654
|
} from "react";
|
|
21654
21655
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
21655
21656
|
import {
|
|
21656
21657
|
forwardRef as forwardRef10,
|
|
21657
21658
|
useCallback as useCallback17,
|
|
21658
|
-
useContext as
|
|
21659
|
+
useContext as useContext33,
|
|
21659
21660
|
useImperativeHandle as useImperativeHandle7,
|
|
21660
21661
|
useLayoutEffect as useLayoutEffect10,
|
|
21661
|
-
useMemo as
|
|
21662
|
+
useMemo as useMemo32,
|
|
21662
21663
|
useRef as useRef23,
|
|
21663
21664
|
useState as useState16
|
|
21664
21665
|
} from "react";
|
|
@@ -21667,7 +21668,7 @@ import { forwardRef as forwardRef11, useCallback as useCallback18, useState as u
|
|
|
21667
21668
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
21668
21669
|
import {
|
|
21669
21670
|
useCallback as useCallback19,
|
|
21670
|
-
useContext as
|
|
21671
|
+
useContext as useContext34,
|
|
21671
21672
|
useLayoutEffect as useLayoutEffect11,
|
|
21672
21673
|
useRef as useRef24,
|
|
21673
21674
|
useState as useState18
|
|
@@ -21680,59 +21681,59 @@ import React31 from "react";
|
|
|
21680
21681
|
import {
|
|
21681
21682
|
useCallback as useCallback21,
|
|
21682
21683
|
useImperativeHandle as useImperativeHandle8,
|
|
21683
|
-
useMemo as
|
|
21684
|
+
useMemo as useMemo33,
|
|
21684
21685
|
useRef as useRef26,
|
|
21685
21686
|
useState as useState19
|
|
21686
21687
|
} from "react";
|
|
21687
21688
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
21688
21689
|
import React32 from "react";
|
|
21689
|
-
import { useMemo as
|
|
21690
|
-
import { createContext as createContext24, useContext as
|
|
21690
|
+
import { useMemo as useMemo35 } from "react";
|
|
21691
|
+
import { createContext as createContext24, useContext as useContext35, useMemo as useMemo34 } from "react";
|
|
21691
21692
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
21692
21693
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
21693
21694
|
import React34 from "react";
|
|
21694
21695
|
import React35, { createContext as createContext25 } from "react";
|
|
21695
|
-
import React36, { useContext as
|
|
21696
|
+
import React36, { useContext as useContext36 } from "react";
|
|
21696
21697
|
import { useCallback as useCallback24 } from "react";
|
|
21697
21698
|
import {
|
|
21698
21699
|
useCallback as useCallback22,
|
|
21699
|
-
useContext as
|
|
21700
|
+
useContext as useContext37,
|
|
21700
21701
|
useEffect as useEffect17,
|
|
21701
21702
|
useLayoutEffect as useLayoutEffect12,
|
|
21702
|
-
useMemo as
|
|
21703
|
+
useMemo as useMemo36,
|
|
21703
21704
|
useState as useState20
|
|
21704
21705
|
} from "react";
|
|
21705
21706
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
21706
21707
|
import React38, {
|
|
21707
21708
|
forwardRef as forwardRef13,
|
|
21708
21709
|
useCallback as useCallback23,
|
|
21709
|
-
useContext as
|
|
21710
|
+
useContext as useContext38,
|
|
21710
21711
|
useEffect as useEffect19,
|
|
21711
21712
|
useImperativeHandle as useImperativeHandle9,
|
|
21712
|
-
useMemo as
|
|
21713
|
+
useMemo as useMemo37,
|
|
21713
21714
|
useRef as useRef27,
|
|
21714
21715
|
useState as useState21
|
|
21715
21716
|
} from "react";
|
|
21716
21717
|
import { useEffect as useEffect18 } from "react";
|
|
21717
21718
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
21718
21719
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
21719
|
-
import React40, { useMemo as
|
|
21720
|
+
import React40, { useMemo as useMemo38 } from "react";
|
|
21720
21721
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
21721
21722
|
import React42, {
|
|
21722
21723
|
forwardRef as forwardRef14,
|
|
21723
|
-
useMemo as
|
|
21724
|
+
useMemo as useMemo39
|
|
21724
21725
|
} from "react";
|
|
21725
21726
|
import React41 from "react";
|
|
21726
21727
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
21727
21728
|
import React43 from "react";
|
|
21728
|
-
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
21729
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext40 } from "react";
|
|
21729
21730
|
import {
|
|
21730
21731
|
forwardRef as forwardRef15,
|
|
21731
|
-
useContext as
|
|
21732
|
+
useContext as useContext39,
|
|
21732
21733
|
useEffect as useEffect20,
|
|
21733
21734
|
useImperativeHandle as useImperativeHandle10,
|
|
21734
21735
|
useLayoutEffect as useLayoutEffect13,
|
|
21735
|
-
useMemo as
|
|
21736
|
+
useMemo as useMemo40,
|
|
21736
21737
|
useRef as useRef28
|
|
21737
21738
|
} from "react";
|
|
21738
21739
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
@@ -22592,17 +22593,6 @@ var delayRenderInternal = ({
|
|
|
22592
22593
|
scope.remotion_renderReady = false;
|
|
22593
22594
|
return handle;
|
|
22594
22595
|
};
|
|
22595
|
-
var delayRender = (label2, options) => {
|
|
22596
|
-
if (typeof window === "undefined") {
|
|
22597
|
-
return Math.random();
|
|
22598
|
-
}
|
|
22599
|
-
return delayRenderInternal({
|
|
22600
|
-
scope: window,
|
|
22601
|
-
environment: getRemotionEnvironment(),
|
|
22602
|
-
label: label2 ?? null,
|
|
22603
|
-
options: options ?? {}
|
|
22604
|
-
});
|
|
22605
|
-
};
|
|
22606
22596
|
var continueRenderInternal = ({
|
|
22607
22597
|
scope,
|
|
22608
22598
|
handle,
|
|
@@ -22923,7 +22913,7 @@ var getSingleChildComponent = (children) => {
|
|
|
22923
22913
|
}
|
|
22924
22914
|
return child.type;
|
|
22925
22915
|
};
|
|
22926
|
-
var VERSION = "4.0.
|
|
22916
|
+
var VERSION = "4.0.496";
|
|
22927
22917
|
var checkMultipleRemotionVersions = () => {
|
|
22928
22918
|
if (typeof globalThis === "undefined") {
|
|
22929
22919
|
return;
|
|
@@ -23416,15 +23406,19 @@ var premountSchema = {
|
|
|
23416
23406
|
description: "Premount For",
|
|
23417
23407
|
min: 0,
|
|
23418
23408
|
step: 1,
|
|
23419
|
-
hiddenFromList: false
|
|
23409
|
+
hiddenFromList: false,
|
|
23410
|
+
keyframable: false
|
|
23420
23411
|
},
|
|
23421
23412
|
postmountFor: {
|
|
23422
23413
|
type: "number",
|
|
23423
23414
|
default: 0,
|
|
23424
23415
|
min: 0,
|
|
23425
23416
|
step: 1,
|
|
23426
|
-
hiddenFromList: true
|
|
23427
|
-
|
|
23417
|
+
hiddenFromList: true,
|
|
23418
|
+
keyframable: false
|
|
23419
|
+
}
|
|
23420
|
+
};
|
|
23421
|
+
var premountStyleSchema = {
|
|
23428
23422
|
styleWhilePremounted: {
|
|
23429
23423
|
type: "hidden"
|
|
23430
23424
|
},
|
|
@@ -23432,10 +23426,13 @@ var premountSchema = {
|
|
|
23432
23426
|
type: "hidden"
|
|
23433
23427
|
}
|
|
23434
23428
|
};
|
|
23435
|
-
var sequencePremountSchema =
|
|
23429
|
+
var sequencePremountSchema = {
|
|
23430
|
+
...premountSchema,
|
|
23431
|
+
...premountStyleSchema
|
|
23432
|
+
};
|
|
23436
23433
|
var sequenceStyleSchema = {
|
|
23437
23434
|
...transformSchema,
|
|
23438
|
-
...
|
|
23435
|
+
...sequencePremountSchema
|
|
23439
23436
|
};
|
|
23440
23437
|
var hiddenField = {
|
|
23441
23438
|
type: "boolean",
|
|
@@ -23520,9 +23517,6 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
23520
23517
|
default: "none"
|
|
23521
23518
|
}
|
|
23522
23519
|
};
|
|
23523
|
-
var PremountContext = createContext14({
|
|
23524
|
-
premountFramesRemaining: 0
|
|
23525
|
-
});
|
|
23526
23520
|
var SequenceManager = React12.createContext({
|
|
23527
23521
|
registerSequence: () => {
|
|
23528
23522
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -23702,7 +23696,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
23702
23696
|
})
|
|
23703
23697
|
});
|
|
23704
23698
|
};
|
|
23705
|
-
var IsInsideSeriesContext =
|
|
23699
|
+
var IsInsideSeriesContext = createContext14(false);
|
|
23706
23700
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
23707
23701
|
return /* @__PURE__ */ jsx11(IsInsideSeriesContext.Provider, {
|
|
23708
23702
|
value: true,
|
|
@@ -23721,7 +23715,61 @@ var useRequireToBeInsideSeries = () => {
|
|
|
23721
23715
|
throw new Error("This component must be inside a <Series /> component.");
|
|
23722
23716
|
}
|
|
23723
23717
|
};
|
|
23718
|
+
var PremountContext = createContext15({
|
|
23719
|
+
premountFramesRemaining: 0
|
|
23720
|
+
});
|
|
23724
23721
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
23722
|
+
var usePremounting = ({
|
|
23723
|
+
from,
|
|
23724
|
+
durationInFrames,
|
|
23725
|
+
premountFor,
|
|
23726
|
+
postmountFor,
|
|
23727
|
+
style,
|
|
23728
|
+
styleWhilePremounted,
|
|
23729
|
+
styleWhilePostmounted,
|
|
23730
|
+
hideWhilePremounted
|
|
23731
|
+
}) => {
|
|
23732
|
+
const parentPremountContext = useContext15(PremountContext);
|
|
23733
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
23734
|
+
const environment = useRemotionEnvironment();
|
|
23735
|
+
const { fps } = useVideoConfig();
|
|
23736
|
+
const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? premountFor ?? fps : premountFor ?? 0;
|
|
23737
|
+
const effectivePostmountFor = postmountFor ?? 0;
|
|
23738
|
+
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
23739
|
+
const premountingActive = !environment.isRendering && frame < from && frame >= from - effectivePremountFor;
|
|
23740
|
+
const postmountingActive = !environment.isRendering && frame > endThreshold && frame <= endThreshold + effectivePostmountFor;
|
|
23741
|
+
const isPremountingOrPostmounting = premountingActive || postmountingActive;
|
|
23742
|
+
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
23743
|
+
const premountingStyle = useMemo13(() => {
|
|
23744
|
+
if (!isPremountingOrPostmounting) {
|
|
23745
|
+
return style;
|
|
23746
|
+
}
|
|
23747
|
+
return {
|
|
23748
|
+
...style,
|
|
23749
|
+
...hideWhilePremounted === "opacity" ? { opacity: 0 } : { display: "none" },
|
|
23750
|
+
pointerEvents: "none",
|
|
23751
|
+
...premountingActive ? styleWhilePremounted : {},
|
|
23752
|
+
...postmountingActive ? styleWhilePostmounted : {}
|
|
23753
|
+
};
|
|
23754
|
+
}, [
|
|
23755
|
+
isPremountingOrPostmounting,
|
|
23756
|
+
hideWhilePremounted,
|
|
23757
|
+
postmountingActive,
|
|
23758
|
+
premountingActive,
|
|
23759
|
+
style,
|
|
23760
|
+
styleWhilePostmounted,
|
|
23761
|
+
styleWhilePremounted
|
|
23762
|
+
]);
|
|
23763
|
+
return {
|
|
23764
|
+
effectivePremountFor,
|
|
23765
|
+
effectivePostmountFor,
|
|
23766
|
+
premountingActive,
|
|
23767
|
+
postmountingActive,
|
|
23768
|
+
isPremountingOrPostmounting,
|
|
23769
|
+
freezeFrame,
|
|
23770
|
+
premountingStyle
|
|
23771
|
+
};
|
|
23772
|
+
};
|
|
23725
23773
|
var deleteNestedKey = (obj, keysToRemove) => {
|
|
23726
23774
|
for (const key of keysToRemove) {
|
|
23727
23775
|
const parts = key.split(".");
|
|
@@ -25545,10 +25593,10 @@ var useMemoizedEffects = ({
|
|
|
25545
25593
|
overrideId
|
|
25546
25594
|
}) => {
|
|
25547
25595
|
const previousRef = useRef5(null);
|
|
25548
|
-
const { propStatuses } =
|
|
25549
|
-
const { getEffectDragOverrides } =
|
|
25596
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
25597
|
+
const { getEffectDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
25550
25598
|
const frame = useCurrentFrame();
|
|
25551
|
-
const { overrideIdToNodePathMappings } =
|
|
25599
|
+
const { overrideIdToNodePathMappings } = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
25552
25600
|
const previous = previousRef.current;
|
|
25553
25601
|
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
25554
25602
|
const resolved = effects.map((descriptor, index) => {
|
|
@@ -25892,9 +25940,9 @@ var withInteractivitySchema = ({
|
|
|
25892
25940
|
ref
|
|
25893
25941
|
});
|
|
25894
25942
|
}
|
|
25895
|
-
const { propStatuses } =
|
|
25896
|
-
const { getDragOverrides } =
|
|
25897
|
-
const nodePathMapping =
|
|
25943
|
+
const { propStatuses } = useContext17(VisualModePropStatusesContext);
|
|
25944
|
+
const { getDragOverrides } = useContext17(VisualModeDragOverridesContext);
|
|
25945
|
+
const nodePathMapping = useContext17(OverrideIdsToNodePathsGettersContext);
|
|
25898
25946
|
const frame = useCurrentFrame();
|
|
25899
25947
|
if (props.controls) {
|
|
25900
25948
|
return React14.createElement(Component, {
|
|
@@ -25921,8 +25969,8 @@ var withInteractivitySchema = ({
|
|
|
25921
25969
|
key,
|
|
25922
25970
|
props
|
|
25923
25971
|
}));
|
|
25924
|
-
const currentRuntimeValueDotNotation =
|
|
25925
|
-
const controls =
|
|
25972
|
+
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
25973
|
+
const controls = useMemo14(() => {
|
|
25926
25974
|
return {
|
|
25927
25975
|
schema: schemaWithSequenceName,
|
|
25928
25976
|
currentRuntimeValueDotNotation,
|
|
@@ -25932,7 +25980,7 @@ var withInteractivitySchema = ({
|
|
|
25932
25980
|
componentName
|
|
25933
25981
|
};
|
|
25934
25982
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
25935
|
-
const { merged: valuesDotNotation, propsToDelete } =
|
|
25983
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
25936
25984
|
return computeEffectiveSchemaValuesDotNotation({
|
|
25937
25985
|
schema: schemaWithSequenceName,
|
|
25938
25986
|
currentValue: currentRuntimeValueDotNotation,
|
|
@@ -25990,7 +26038,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25990
26038
|
}, ref) => {
|
|
25991
26039
|
const { layout = "absolute-fill" } = other;
|
|
25992
26040
|
const [id] = useState5(() => String(Math.random()));
|
|
25993
|
-
const parentSequence =
|
|
26041
|
+
const parentSequence = useContext18(SequenceContext);
|
|
25994
26042
|
const { rootId } = useTimelineContext();
|
|
25995
26043
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
25996
26044
|
const nonce = useNonce();
|
|
@@ -26041,13 +26089,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26041
26089
|
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
26042
26090
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
26043
26091
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
26044
|
-
const { registerSequence, unregisterSequence } =
|
|
26092
|
+
const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
|
|
26045
26093
|
const wrapperRefForOutline = useRef6(null);
|
|
26046
26094
|
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
26047
|
-
const premounting =
|
|
26095
|
+
const premounting = useMemo15(() => {
|
|
26048
26096
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
26049
26097
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
26050
|
-
const postmounting =
|
|
26098
|
+
const postmounting = useMemo15(() => {
|
|
26051
26099
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
26052
26100
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
26053
26101
|
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
@@ -26055,7 +26103,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26055
26103
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
26056
26104
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
26057
26105
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
26058
|
-
const contextValue =
|
|
26106
|
+
const contextValue = useMemo15(() => {
|
|
26059
26107
|
return {
|
|
26060
26108
|
absoluteFrom,
|
|
26061
26109
|
cumulatedFrom,
|
|
@@ -26086,12 +26134,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26086
26134
|
postmountDisplay,
|
|
26087
26135
|
cumulatedNegativeFrom
|
|
26088
26136
|
]);
|
|
26089
|
-
const timelineClipName =
|
|
26137
|
+
const timelineClipName = useMemo15(() => {
|
|
26090
26138
|
return name ?? "";
|
|
26091
26139
|
}, [name]);
|
|
26092
26140
|
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
26093
26141
|
const env = useRemotionEnvironment();
|
|
26094
|
-
const isInsideSeries =
|
|
26142
|
+
const isInsideSeries = useContext18(IsInsideSeriesContext);
|
|
26095
26143
|
const inheritedStack = other?.stack ?? null;
|
|
26096
26144
|
const stackRef = useRef6(null);
|
|
26097
26145
|
stackRef.current = stack ?? inheritedStack;
|
|
@@ -26239,7 +26287,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26239
26287
|
ref.current = node;
|
|
26240
26288
|
}
|
|
26241
26289
|
}, [ref]);
|
|
26242
|
-
const defaultStyle =
|
|
26290
|
+
const defaultStyle = useMemo15(() => {
|
|
26243
26291
|
return {
|
|
26244
26292
|
flexDirection: undefined,
|
|
26245
26293
|
...width ? { width } : {},
|
|
@@ -26265,8 +26313,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26265
26313
|
};
|
|
26266
26314
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
26267
26315
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
26268
|
-
const parentPremountContext = useContext17(PremountContext);
|
|
26269
|
-
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
26270
26316
|
if (props.layout === "none") {
|
|
26271
26317
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
26272
26318
|
}
|
|
@@ -26280,34 +26326,30 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
26280
26326
|
styleWhilePostmounted,
|
|
26281
26327
|
...otherProps
|
|
26282
26328
|
} = props;
|
|
26283
|
-
const
|
|
26284
|
-
|
|
26285
|
-
|
|
26286
|
-
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
26287
|
-
const isFreezingActive = premountingActive || postmountingActive;
|
|
26288
|
-
const style = useMemo14(() => {
|
|
26289
|
-
return {
|
|
26290
|
-
...passedStyle,
|
|
26291
|
-
opacity: premountingActive || postmountingActive ? 0 : passedStyle?.opacity,
|
|
26292
|
-
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
26293
|
-
...premountingActive ? styleWhilePremounted : {},
|
|
26294
|
-
...postmountingActive ? styleWhilePostmounted : {}
|
|
26295
|
-
};
|
|
26296
|
-
}, [
|
|
26297
|
-
passedStyle,
|
|
26298
|
-
premountingActive,
|
|
26329
|
+
const {
|
|
26330
|
+
freezeFrame,
|
|
26331
|
+
isPremountingOrPostmounting,
|
|
26299
26332
|
postmountingActive,
|
|
26300
|
-
|
|
26301
|
-
|
|
26302
|
-
|
|
26333
|
+
premountingActive,
|
|
26334
|
+
premountingStyle
|
|
26335
|
+
} = usePremounting({
|
|
26336
|
+
from,
|
|
26337
|
+
durationInFrames,
|
|
26338
|
+
premountFor,
|
|
26339
|
+
postmountFor,
|
|
26340
|
+
style: passedStyle ?? null,
|
|
26341
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
26342
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
26343
|
+
hideWhilePremounted: "opacity"
|
|
26344
|
+
});
|
|
26303
26345
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
26304
26346
|
frame: freezeFrame,
|
|
26305
|
-
active:
|
|
26347
|
+
active: isPremountingOrPostmounting,
|
|
26306
26348
|
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
26307
26349
|
ref,
|
|
26308
26350
|
from,
|
|
26309
26351
|
durationInFrames,
|
|
26310
|
-
style,
|
|
26352
|
+
style: premountingStyle ?? undefined,
|
|
26311
26353
|
_remotionInternalPremountDisplay: premountFor,
|
|
26312
26354
|
_remotionInternalPostmountDisplay: postmountFor,
|
|
26313
26355
|
_remotionInternalIsPremounting: premountingActive,
|
|
@@ -26643,7 +26685,7 @@ var useEffectChainState = () => {
|
|
|
26643
26685
|
}
|
|
26644
26686
|
};
|
|
26645
26687
|
}, []);
|
|
26646
|
-
return
|
|
26688
|
+
return useMemo16(() => ({
|
|
26647
26689
|
get: (width, height) => {
|
|
26648
26690
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
26649
26691
|
if (chainStateRef.current) {
|
|
@@ -26659,7 +26701,7 @@ var useEffectChainState = () => {
|
|
|
26659
26701
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
26660
26702
|
const canvasRef = useRef8(null);
|
|
26661
26703
|
const chainState = useEffectChainState();
|
|
26662
|
-
const sourceCanvas =
|
|
26704
|
+
const sourceCanvas = useMemo17(() => {
|
|
26663
26705
|
if (typeof document === "undefined") {
|
|
26664
26706
|
return null;
|
|
26665
26707
|
}
|
|
@@ -27216,7 +27258,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
27216
27258
|
};
|
|
27217
27259
|
}
|
|
27218
27260
|
}, []);
|
|
27219
|
-
const contextValue =
|
|
27261
|
+
const contextValue = useMemo18(() => {
|
|
27220
27262
|
return {
|
|
27221
27263
|
registerRenderAsset,
|
|
27222
27264
|
unregisterRenderAsset,
|
|
@@ -27230,7 +27272,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
27230
27272
|
};
|
|
27231
27273
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
27232
27274
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
27233
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
27275
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
27234
27276
|
const env = useRemotionEnvironment();
|
|
27235
27277
|
const frame = useCurrentFrame();
|
|
27236
27278
|
const [id] = useState8(() => {
|
|
@@ -27345,14 +27387,14 @@ var Loop = ({
|
|
|
27345
27387
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
27346
27388
|
const start = iteration * durationInFrames;
|
|
27347
27389
|
const from = Math.min(start, maxFrame);
|
|
27348
|
-
const loopDisplay =
|
|
27390
|
+
const loopDisplay = useMemo19(() => {
|
|
27349
27391
|
return {
|
|
27350
27392
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
27351
27393
|
startOffset: -from,
|
|
27352
27394
|
durationInFrames
|
|
27353
27395
|
};
|
|
27354
27396
|
}, [compDuration, durationInFrames, from, times]);
|
|
27355
|
-
const loopContext =
|
|
27397
|
+
const loopContext = useMemo19(() => {
|
|
27356
27398
|
return {
|
|
27357
27399
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
27358
27400
|
durationInFrames
|
|
@@ -27421,7 +27463,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
27421
27463
|
return src.slice(0, hashIndex);
|
|
27422
27464
|
};
|
|
27423
27465
|
var usePreload = (src) => {
|
|
27424
|
-
const preloads2 =
|
|
27466
|
+
const preloads2 = useContext20(PreloadContext);
|
|
27425
27467
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
27426
27468
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
27427
27469
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -27724,7 +27766,7 @@ var DurationsContext = createContext20({
|
|
|
27724
27766
|
});
|
|
27725
27767
|
var DurationsContextProvider = ({ children }) => {
|
|
27726
27768
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
27727
|
-
const value =
|
|
27769
|
+
const value = useMemo20(() => {
|
|
27728
27770
|
return {
|
|
27729
27771
|
durations,
|
|
27730
27772
|
setDurations
|
|
@@ -27863,7 +27905,7 @@ var useSingletonAudioContext = ({
|
|
|
27863
27905
|
if (sampleRate !== initialSampleRate.current) {
|
|
27864
27906
|
throw new Error(`Changing the AudioContext sample rate dynamically is not supported. The sample rate was initialized with ${initialSampleRate.current} Hz, but ${sampleRate} Hz was passed later.`);
|
|
27865
27907
|
}
|
|
27866
|
-
const context =
|
|
27908
|
+
const context = useMemo21(() => {
|
|
27867
27909
|
if (env.isRendering) {
|
|
27868
27910
|
return null;
|
|
27869
27911
|
}
|
|
@@ -27997,9 +28039,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27997
28039
|
});
|
|
27998
28040
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
27999
28041
|
const isResuming = useRef12(null);
|
|
28000
|
-
const audioSyncAnchor =
|
|
28042
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
28001
28043
|
const audioSyncAnchorListeners = useRef12([]);
|
|
28002
|
-
const audioSyncAnchorEmitter =
|
|
28044
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
28003
28045
|
return {
|
|
28004
28046
|
dispatch: (event2) => {
|
|
28005
28047
|
audioSyncAnchorListeners.current.forEach((l) => l(event2));
|
|
@@ -28019,7 +28061,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
28019
28061
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
28020
28062
|
nodesToResume.current.delete(node);
|
|
28021
28063
|
}, []);
|
|
28022
|
-
const scheduleAudioNode =
|
|
28064
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
28023
28065
|
return ({
|
|
28024
28066
|
node,
|
|
28025
28067
|
mediaTimestamp,
|
|
@@ -28111,7 +28153,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
28111
28153
|
audioContextIsPlayingEventually.current = false;
|
|
28112
28154
|
return ctxAndGain.suspend();
|
|
28113
28155
|
}, [ctxAndGain]);
|
|
28114
|
-
const audioContextValue =
|
|
28156
|
+
const audioContextValue = useMemo22(() => {
|
|
28115
28157
|
return {
|
|
28116
28158
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
28117
28159
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -28148,10 +28190,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28148
28190
|
const logLevel = useLogLevel();
|
|
28149
28191
|
const mountTime = useMountTime();
|
|
28150
28192
|
const env = useRemotionEnvironment();
|
|
28151
|
-
const audioCtx =
|
|
28193
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
28152
28194
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
28153
28195
|
const resume = audioCtx?.resume;
|
|
28154
|
-
const refs =
|
|
28196
|
+
const refs = useMemo22(() => {
|
|
28155
28197
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
28156
28198
|
const ref = createRef2();
|
|
28157
28199
|
return {
|
|
@@ -28290,7 +28332,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28290
28332
|
});
|
|
28291
28333
|
resume?.();
|
|
28292
28334
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
28293
|
-
const audioTagsValue =
|
|
28335
|
+
const audioTagsValue = useMemo22(() => {
|
|
28294
28336
|
return {
|
|
28295
28337
|
registerAudio,
|
|
28296
28338
|
unregisterAudio,
|
|
@@ -28305,7 +28347,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28305
28347
|
unregisterAudio,
|
|
28306
28348
|
updateAudio
|
|
28307
28349
|
]);
|
|
28308
|
-
const sharedAudioTagElements =
|
|
28350
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
28309
28351
|
return refs.map(({ id, ref }) => {
|
|
28310
28352
|
return /* @__PURE__ */ jsx19("audio", {
|
|
28311
28353
|
ref,
|
|
@@ -28328,8 +28370,8 @@ var useSharedAudio = ({
|
|
|
28328
28370
|
premounting,
|
|
28329
28371
|
postmounting
|
|
28330
28372
|
}) => {
|
|
28331
|
-
const audioCtx =
|
|
28332
|
-
const tagsCtx =
|
|
28373
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
28374
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
28333
28375
|
const [elem] = useState10(() => {
|
|
28334
28376
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
28335
28377
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -28508,7 +28550,7 @@ var useVolume = ({
|
|
|
28508
28550
|
const audioStuffRef = useRef14(null);
|
|
28509
28551
|
const currentVolumeRef = useRef14(volume);
|
|
28510
28552
|
currentVolumeRef.current = volume;
|
|
28511
|
-
const sharedAudioContext =
|
|
28553
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
28512
28554
|
if (!sharedAudioContext) {
|
|
28513
28555
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
28514
28556
|
}
|
|
@@ -28573,7 +28615,7 @@ var useVolume = ({
|
|
|
28573
28615
|
return audioStuffRef;
|
|
28574
28616
|
};
|
|
28575
28617
|
var useMediaStartsAt = () => {
|
|
28576
|
-
const parentSequence =
|
|
28618
|
+
const parentSequence = useContext23(SequenceContext);
|
|
28577
28619
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
28578
28620
|
};
|
|
28579
28621
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -28662,7 +28704,7 @@ var useBasicMediaInTimeline = ({
|
|
|
28662
28704
|
if (!src) {
|
|
28663
28705
|
throw new Error("No src passed");
|
|
28664
28706
|
}
|
|
28665
|
-
const parentSequence =
|
|
28707
|
+
const parentSequence = useContext24(SequenceContext);
|
|
28666
28708
|
const [initialVolume] = useState11(() => volume);
|
|
28667
28709
|
const duration = getTimelineDuration({
|
|
28668
28710
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -28672,7 +28714,7 @@ var useBasicMediaInTimeline = ({
|
|
|
28672
28714
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
28673
28715
|
loop
|
|
28674
28716
|
});
|
|
28675
|
-
const volumes =
|
|
28717
|
+
const volumes = useMemo23(() => {
|
|
28676
28718
|
if (typeof volume === "number") {
|
|
28677
28719
|
return volume;
|
|
28678
28720
|
}
|
|
@@ -28693,7 +28735,7 @@ var useBasicMediaInTimeline = ({
|
|
|
28693
28735
|
const nonce = useNonce();
|
|
28694
28736
|
const { rootId } = useTimelineContext();
|
|
28695
28737
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
28696
|
-
const memoizedResult =
|
|
28738
|
+
const memoizedResult = useMemo23(() => {
|
|
28697
28739
|
return {
|
|
28698
28740
|
volumes,
|
|
28699
28741
|
duration,
|
|
@@ -28734,9 +28776,9 @@ var useMediaInTimeline = ({
|
|
|
28734
28776
|
documentationLink,
|
|
28735
28777
|
refForOutline
|
|
28736
28778
|
}) => {
|
|
28737
|
-
const parentSequence =
|
|
28779
|
+
const parentSequence = useContext24(SequenceContext);
|
|
28738
28780
|
const startsAt = useMediaStartsAt();
|
|
28739
|
-
const { registerSequence, unregisterSequence } =
|
|
28781
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
28740
28782
|
const { durationInFrames } = useVideoConfig();
|
|
28741
28783
|
const mediaStartsAt = useMediaStartsAt();
|
|
28742
28784
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -28901,13 +28943,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28901
28943
|
}
|
|
28902
28944
|
}, [blocks]);
|
|
28903
28945
|
}
|
|
28904
|
-
return
|
|
28946
|
+
return useMemo24(() => {
|
|
28905
28947
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
28906
28948
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
28907
28949
|
};
|
|
28908
28950
|
var BufferingContextReact = React21.createContext(null);
|
|
28909
28951
|
var BufferingProvider = ({ children }) => {
|
|
28910
|
-
const { logLevel, mountTime } =
|
|
28952
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
28911
28953
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
28912
28954
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
28913
28955
|
value: bufferManager,
|
|
@@ -28933,10 +28975,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
28933
28975
|
return isBuffering;
|
|
28934
28976
|
};
|
|
28935
28977
|
var useBufferState = () => {
|
|
28936
|
-
const buffer =
|
|
28978
|
+
const buffer = useContext26(BufferingContextReact);
|
|
28937
28979
|
const logLevel = useLogLevel();
|
|
28938
28980
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
28939
|
-
return
|
|
28981
|
+
return useMemo25(() => ({
|
|
28940
28982
|
delayPlayback: () => {
|
|
28941
28983
|
if (!addBlock) {
|
|
28942
28984
|
throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");
|
|
@@ -29044,7 +29086,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
29044
29086
|
onVariableFpsVideoDetected,
|
|
29045
29087
|
pauseWhenBuffering
|
|
29046
29088
|
]);
|
|
29047
|
-
return
|
|
29089
|
+
return useMemo26(() => {
|
|
29048
29090
|
return {
|
|
29049
29091
|
isBuffering: () => bufferingRef.current,
|
|
29050
29092
|
bufferUntilFirstFrame
|
|
@@ -29418,7 +29460,7 @@ var useMediaPlayback = ({
|
|
|
29418
29460
|
const frame = useCurrentFrame();
|
|
29419
29461
|
const absoluteFrame = useTimelinePosition();
|
|
29420
29462
|
const [playing] = usePlayingState();
|
|
29421
|
-
const buffering =
|
|
29463
|
+
const buffering = useContext27(BufferingContextReact);
|
|
29422
29464
|
const { fps } = useVideoConfig();
|
|
29423
29465
|
const mediaStartsAt = useMediaStartsAt();
|
|
29424
29466
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -29713,16 +29755,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
29713
29755
|
}
|
|
29714
29756
|
});
|
|
29715
29757
|
var useMediaVolumeState = () => {
|
|
29716
|
-
const { mediaVolume } =
|
|
29717
|
-
const { setMediaVolume } =
|
|
29718
|
-
return
|
|
29758
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
29759
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
29760
|
+
return useMemo27(() => {
|
|
29719
29761
|
return [mediaVolume, setMediaVolume];
|
|
29720
29762
|
}, [mediaVolume, setMediaVolume]);
|
|
29721
29763
|
};
|
|
29722
29764
|
var usePlayerMutedState = () => {
|
|
29723
|
-
const { playerMuted } =
|
|
29724
|
-
const { setPlayerMuted } =
|
|
29725
|
-
return
|
|
29765
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
29766
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
29767
|
+
return useMemo27(() => {
|
|
29726
29768
|
return [playerMuted, setPlayerMuted];
|
|
29727
29769
|
}, [playerMuted, setPlayerMuted]);
|
|
29728
29770
|
};
|
|
@@ -29776,7 +29818,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29776
29818
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
29777
29819
|
}
|
|
29778
29820
|
const preloadedSrc = usePreload(src);
|
|
29779
|
-
const sequenceContext =
|
|
29821
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
29780
29822
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
29781
29823
|
const userPreferredVolume = evaluateVolume({
|
|
29782
29824
|
frame: volumePropFrame,
|
|
@@ -29789,7 +29831,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29789
29831
|
requestsVideoFrame: false,
|
|
29790
29832
|
isClientSideRendering: false
|
|
29791
29833
|
});
|
|
29792
|
-
const propsToPass =
|
|
29834
|
+
const propsToPass = useMemo28(() => {
|
|
29793
29835
|
return {
|
|
29794
29836
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
29795
29837
|
src: preloadedSrc,
|
|
@@ -29806,7 +29848,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29806
29848
|
userPreferredVolume,
|
|
29807
29849
|
crossOriginValue
|
|
29808
29850
|
]);
|
|
29809
|
-
const id =
|
|
29851
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
29810
29852
|
src,
|
|
29811
29853
|
sequenceContext?.relativeFrom,
|
|
29812
29854
|
sequenceContext?.cumulatedFrom,
|
|
@@ -29936,10 +29978,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
29936
29978
|
const absoluteFrame = useTimelinePosition();
|
|
29937
29979
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
29938
29980
|
const frame = useCurrentFrame();
|
|
29939
|
-
const sequenceContext =
|
|
29940
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
29981
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
29982
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
29941
29983
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
29942
|
-
const id =
|
|
29984
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
29943
29985
|
props.src,
|
|
29944
29986
|
sequenceContext?.relativeFrom,
|
|
29945
29987
|
sequenceContext?.cumulatedFrom,
|
|
@@ -30046,7 +30088,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
30046
30088
|
};
|
|
30047
30089
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
30048
30090
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
30049
|
-
const audioTagsContext =
|
|
30091
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
30050
30092
|
const propsWithFreeze = props;
|
|
30051
30093
|
const {
|
|
30052
30094
|
startFrom,
|
|
@@ -30070,7 +30112,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
30070
30112
|
if (typeof freeze !== "undefined") {
|
|
30071
30113
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
30072
30114
|
}
|
|
30073
|
-
const { durations, setDurations } =
|
|
30115
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
30074
30116
|
if (typeof props.src !== "string") {
|
|
30075
30117
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
30076
30118
|
}
|
|
@@ -30232,7 +30274,7 @@ var SolidInner = ({
|
|
|
30232
30274
|
effects,
|
|
30233
30275
|
overrideId: overrideId ?? null
|
|
30234
30276
|
});
|
|
30235
|
-
const sourceCanvas =
|
|
30277
|
+
const sourceCanvas = useMemo30(() => {
|
|
30236
30278
|
if (typeof document === "undefined") {
|
|
30237
30279
|
return null;
|
|
30238
30280
|
}
|
|
@@ -30300,7 +30342,7 @@ var SolidInner = ({
|
|
|
30300
30342
|
cancelRender2,
|
|
30301
30343
|
memoizedEffects
|
|
30302
30344
|
]);
|
|
30303
|
-
const canvasStyle =
|
|
30345
|
+
const canvasStyle = useMemo30(() => {
|
|
30304
30346
|
return {
|
|
30305
30347
|
width,
|
|
30306
30348
|
height,
|
|
@@ -30449,12 +30491,12 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30449
30491
|
controls,
|
|
30450
30492
|
style
|
|
30451
30493
|
}, ref) => {
|
|
30452
|
-
const ancestor =
|
|
30494
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
30453
30495
|
assertHtmlInCanvasDimensions(width, height);
|
|
30454
30496
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
30455
30497
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
30456
30498
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
30457
|
-
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
30499
|
+
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
30458
30500
|
const { isClientSideRendering, isRendering } = useRemotionEnvironment();
|
|
30459
30501
|
const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
|
|
30460
30502
|
const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
|
|
@@ -30508,7 +30550,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30508
30550
|
if (!placeholderCanvas) {
|
|
30509
30551
|
throw new Error("Canvas not found");
|
|
30510
30552
|
}
|
|
30511
|
-
const handle =
|
|
30553
|
+
const handle = delayRender2("onPaint");
|
|
30512
30554
|
if (!initializedRef.current) {
|
|
30513
30555
|
const currentOnInit = onInitRef.current;
|
|
30514
30556
|
if (!currentOnInit) {
|
|
@@ -30609,6 +30651,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30609
30651
|
chainState,
|
|
30610
30652
|
continueRender2,
|
|
30611
30653
|
cancelRender2,
|
|
30654
|
+
delayRender2,
|
|
30612
30655
|
resolvedPixelDensity,
|
|
30613
30656
|
canRetryMissingPaintRecord
|
|
30614
30657
|
]);
|
|
@@ -30660,28 +30703,28 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30660
30703
|
if (!canvas) {
|
|
30661
30704
|
return;
|
|
30662
30705
|
}
|
|
30663
|
-
const handle =
|
|
30706
|
+
const handle = delayRender2("waiting for first paint after canvas resize");
|
|
30664
30707
|
canvas.addEventListener("paint", () => {
|
|
30665
30708
|
continueRender2(handle);
|
|
30666
30709
|
}, { once: true });
|
|
30667
30710
|
return () => {
|
|
30668
30711
|
continueRender2(handle);
|
|
30669
30712
|
};
|
|
30670
|
-
}, [width, height, continueRender2, canvasSizeKey]);
|
|
30671
|
-
const innerStyle =
|
|
30713
|
+
}, [width, height, continueRender2, delayRender2, canvasSizeKey]);
|
|
30714
|
+
const innerStyle = useMemo31(() => {
|
|
30672
30715
|
return {
|
|
30673
30716
|
width,
|
|
30674
30717
|
height
|
|
30675
30718
|
};
|
|
30676
30719
|
}, [width, height]);
|
|
30677
|
-
const canvasStyle =
|
|
30720
|
+
const canvasStyle = useMemo31(() => {
|
|
30678
30721
|
return {
|
|
30679
30722
|
width,
|
|
30680
30723
|
height,
|
|
30681
30724
|
...style ?? {}
|
|
30682
30725
|
};
|
|
30683
30726
|
}, [height, style, width]);
|
|
30684
|
-
const ancestorValue =
|
|
30727
|
+
const ancestorValue = useMemo31(() => {
|
|
30685
30728
|
return {
|
|
30686
30729
|
requestParentPaint: () => {
|
|
30687
30730
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -30895,7 +30938,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30895
30938
|
effects,
|
|
30896
30939
|
overrideId: controls?.overrideId ?? null
|
|
30897
30940
|
});
|
|
30898
|
-
const sequenceContext =
|
|
30941
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
30899
30942
|
const pendingLoadDelayRef = useRef23(null);
|
|
30900
30943
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
30901
30944
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -30912,7 +30955,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30912
30955
|
continueRender2(pending.handle);
|
|
30913
30956
|
pendingLoadDelayRef.current = null;
|
|
30914
30957
|
}, [continueRender2]);
|
|
30915
|
-
const sourceCanvas =
|
|
30958
|
+
const sourceCanvas = useMemo32(() => {
|
|
30916
30959
|
if (typeof document === "undefined") {
|
|
30917
30960
|
return null;
|
|
30918
30961
|
}
|
|
@@ -31234,7 +31277,7 @@ var ImgContent = ({
|
|
|
31234
31277
|
const imageRef = useRef24(null);
|
|
31235
31278
|
const errors = useRef24({});
|
|
31236
31279
|
const { delayPlayback } = useBufferState();
|
|
31237
|
-
const sequenceContext =
|
|
31280
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
31238
31281
|
const [isLoading, setIsLoading] = useState18(false);
|
|
31239
31282
|
const _propsValid = true;
|
|
31240
31283
|
if (!_propsValid) {
|
|
@@ -31583,7 +31626,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
31583
31626
|
};
|
|
31584
31627
|
var interactiveElementSchema = {
|
|
31585
31628
|
...baseSchema,
|
|
31586
|
-
...transformSchema
|
|
31629
|
+
...transformSchema
|
|
31630
|
+
};
|
|
31631
|
+
var interactiveTextElementSchema = {
|
|
31632
|
+
...interactiveElementSchema,
|
|
31587
31633
|
...textSchema,
|
|
31588
31634
|
...textContentSchema
|
|
31589
31635
|
};
|
|
@@ -31599,7 +31645,7 @@ var withSchema = (options) => {
|
|
|
31599
31645
|
addSequenceStackTraces(Wrapped);
|
|
31600
31646
|
return Wrapped;
|
|
31601
31647
|
};
|
|
31602
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
31648
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
31603
31649
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
31604
31650
|
const {
|
|
31605
31651
|
durationInFrames,
|
|
@@ -31645,12 +31691,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
31645
31691
|
packageName: "remotion",
|
|
31646
31692
|
componentName: displayName.slice(1, -1)
|
|
31647
31693
|
}),
|
|
31648
|
-
schema
|
|
31694
|
+
schema,
|
|
31649
31695
|
supportsEffects: false
|
|
31650
31696
|
});
|
|
31651
31697
|
Wrapped.displayName = displayName;
|
|
31652
31698
|
return Wrapped;
|
|
31653
31699
|
};
|
|
31700
|
+
var makeInteractiveTextElement = (tag, displayName) => {
|
|
31701
|
+
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
31702
|
+
};
|
|
31703
|
+
var makeInteractiveNonTextElement = (tag, displayName) => {
|
|
31704
|
+
return makeInteractiveElement(tag, displayName, interactiveElementSchema);
|
|
31705
|
+
};
|
|
31654
31706
|
var Interactive = {
|
|
31655
31707
|
baseSchema,
|
|
31656
31708
|
transformSchema,
|
|
@@ -31659,41 +31711,41 @@ var Interactive = {
|
|
|
31659
31711
|
sequenceSchema,
|
|
31660
31712
|
withSchema,
|
|
31661
31713
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
31662
|
-
A:
|
|
31663
|
-
Article:
|
|
31664
|
-
Aside:
|
|
31665
|
-
Button:
|
|
31666
|
-
Circle:
|
|
31667
|
-
Code:
|
|
31668
|
-
Div:
|
|
31669
|
-
Ellipse:
|
|
31670
|
-
Em:
|
|
31671
|
-
Footer:
|
|
31672
|
-
G:
|
|
31673
|
-
H1:
|
|
31674
|
-
H2:
|
|
31675
|
-
H3:
|
|
31676
|
-
H4:
|
|
31677
|
-
H5:
|
|
31678
|
-
H6:
|
|
31679
|
-
Header:
|
|
31680
|
-
Label:
|
|
31681
|
-
Li:
|
|
31682
|
-
Line:
|
|
31683
|
-
Main:
|
|
31684
|
-
Nav:
|
|
31685
|
-
Ol:
|
|
31686
|
-
P:
|
|
31687
|
-
Path:
|
|
31688
|
-
Pre:
|
|
31689
|
-
Rect:
|
|
31690
|
-
Section:
|
|
31691
|
-
Small:
|
|
31692
|
-
Span:
|
|
31693
|
-
Strong:
|
|
31694
|
-
Svg:
|
|
31695
|
-
Text:
|
|
31696
|
-
Ul:
|
|
31714
|
+
A: makeInteractiveTextElement("a", "<Interactive.A>"),
|
|
31715
|
+
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
31716
|
+
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
31717
|
+
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
31718
|
+
Circle: makeInteractiveNonTextElement("circle", "<Interactive.Circle>"),
|
|
31719
|
+
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
31720
|
+
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
31721
|
+
Ellipse: makeInteractiveNonTextElement("ellipse", "<Interactive.Ellipse>"),
|
|
31722
|
+
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
31723
|
+
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
31724
|
+
G: makeInteractiveNonTextElement("g", "<Interactive.G>"),
|
|
31725
|
+
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
31726
|
+
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
31727
|
+
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
31728
|
+
H4: makeInteractiveTextElement("h4", "<Interactive.H4>"),
|
|
31729
|
+
H5: makeInteractiveTextElement("h5", "<Interactive.H5>"),
|
|
31730
|
+
H6: makeInteractiveTextElement("h6", "<Interactive.H6>"),
|
|
31731
|
+
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
31732
|
+
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
31733
|
+
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
31734
|
+
Line: makeInteractiveNonTextElement("line", "<Interactive.Line>"),
|
|
31735
|
+
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
31736
|
+
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
31737
|
+
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
31738
|
+
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
31739
|
+
Path: makeInteractiveNonTextElement("path", "<Interactive.Path>"),
|
|
31740
|
+
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
31741
|
+
Rect: makeInteractiveNonTextElement("rect", "<Interactive.Rect>"),
|
|
31742
|
+
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
31743
|
+
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
31744
|
+
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
31745
|
+
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
31746
|
+
Svg: makeInteractiveNonTextElement("svg", "<Interactive.Svg>"),
|
|
31747
|
+
Text: makeInteractiveTextElement("text", "<Interactive.Text>"),
|
|
31748
|
+
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
31697
31749
|
};
|
|
31698
31750
|
var compositionsRef = React31.createRef();
|
|
31699
31751
|
var CompositionManagerProvider = ({
|
|
@@ -31750,7 +31802,7 @@ var CompositionManagerProvider = ({
|
|
|
31750
31802
|
getCompositions: () => currentcompositionsRef.current
|
|
31751
31803
|
};
|
|
31752
31804
|
}, []);
|
|
31753
|
-
const compositionManagerSetters =
|
|
31805
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
31754
31806
|
return {
|
|
31755
31807
|
registerComposition,
|
|
31756
31808
|
unregisterComposition,
|
|
@@ -31766,7 +31818,7 @@ var CompositionManagerProvider = ({
|
|
|
31766
31818
|
unregisterFolder,
|
|
31767
31819
|
onlyRenderComposition
|
|
31768
31820
|
]);
|
|
31769
|
-
const compositionManagerContextValue =
|
|
31821
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
31770
31822
|
return {
|
|
31771
31823
|
compositions,
|
|
31772
31824
|
folders,
|
|
@@ -31864,7 +31916,7 @@ var waitForRoot = (fn) => {
|
|
|
31864
31916
|
};
|
|
31865
31917
|
var MediaEnabledContext = createContext24(null);
|
|
31866
31918
|
var useVideoEnabled = () => {
|
|
31867
|
-
const context =
|
|
31919
|
+
const context = useContext35(MediaEnabledContext);
|
|
31868
31920
|
if (!context) {
|
|
31869
31921
|
return window.remotion_videoEnabled;
|
|
31870
31922
|
}
|
|
@@ -31874,7 +31926,7 @@ var useVideoEnabled = () => {
|
|
|
31874
31926
|
return context.videoEnabled;
|
|
31875
31927
|
};
|
|
31876
31928
|
var useAudioEnabled = () => {
|
|
31877
|
-
const context =
|
|
31929
|
+
const context = useContext35(MediaEnabledContext);
|
|
31878
31930
|
if (!context) {
|
|
31879
31931
|
return window.remotion_audioEnabled;
|
|
31880
31932
|
}
|
|
@@ -31888,7 +31940,7 @@ var MediaEnabledProvider = ({
|
|
|
31888
31940
|
videoEnabled,
|
|
31889
31941
|
audioEnabled
|
|
31890
31942
|
}) => {
|
|
31891
|
-
const value =
|
|
31943
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
31892
31944
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
31893
31945
|
value,
|
|
31894
31946
|
children
|
|
@@ -31904,13 +31956,13 @@ var RemotionRootContexts = ({
|
|
|
31904
31956
|
audioEnabled,
|
|
31905
31957
|
frameState
|
|
31906
31958
|
}) => {
|
|
31907
|
-
const nonceContext =
|
|
31959
|
+
const nonceContext = useMemo35(() => {
|
|
31908
31960
|
let counter = 0;
|
|
31909
31961
|
return {
|
|
31910
31962
|
getNonce: () => counter++
|
|
31911
31963
|
};
|
|
31912
31964
|
}, []);
|
|
31913
|
-
const logging =
|
|
31965
|
+
const logging = useMemo35(() => {
|
|
31914
31966
|
return { logLevel, mountTime: Date.now() };
|
|
31915
31967
|
}, [logLevel]);
|
|
31916
31968
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -32211,13 +32263,13 @@ var OffthreadVideoForRendering = ({
|
|
|
32211
32263
|
const frame = useCurrentFrame();
|
|
32212
32264
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
32213
32265
|
const videoConfig = useUnsafeVideoConfig();
|
|
32214
|
-
const sequenceContext =
|
|
32266
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
32215
32267
|
const mediaStartsAt = useMediaStartsAt();
|
|
32216
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
32268
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
32217
32269
|
if (!src) {
|
|
32218
32270
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
32219
32271
|
}
|
|
32220
|
-
const id =
|
|
32272
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
32221
32273
|
src,
|
|
32222
32274
|
sequenceContext?.cumulatedFrom,
|
|
32223
32275
|
sequenceContext?.relativeFrom,
|
|
@@ -32272,14 +32324,14 @@ var OffthreadVideoForRendering = ({
|
|
|
32272
32324
|
sequenceContext?.cumulatedNegativeFrom,
|
|
32273
32325
|
audioStreamIndex
|
|
32274
32326
|
]);
|
|
32275
|
-
const currentTime =
|
|
32327
|
+
const currentTime = useMemo36(() => {
|
|
32276
32328
|
return getExpectedMediaFrameUncorrected({
|
|
32277
32329
|
frame,
|
|
32278
32330
|
playbackRate: playbackRate || 1,
|
|
32279
32331
|
startFrom: -mediaStartsAt
|
|
32280
32332
|
}) / videoConfig.fps;
|
|
32281
32333
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
32282
|
-
const actualSrc =
|
|
32334
|
+
const actualSrc = useMemo36(() => {
|
|
32283
32335
|
return getOffthreadVideoSource({
|
|
32284
32336
|
src,
|
|
32285
32337
|
currentTime,
|
|
@@ -32367,7 +32419,7 @@ var OffthreadVideoForRendering = ({
|
|
|
32367
32419
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
32368
32420
|
}
|
|
32369
32421
|
}, [imageSrc, onError]);
|
|
32370
|
-
const className =
|
|
32422
|
+
const className = useMemo36(() => {
|
|
32371
32423
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
32372
32424
|
}, [props2.className]);
|
|
32373
32425
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -32431,12 +32483,12 @@ class MediaPlaybackError extends Error {
|
|
|
32431
32483
|
}
|
|
32432
32484
|
}
|
|
32433
32485
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
32434
|
-
const context =
|
|
32486
|
+
const context = useContext38(SharedAudioContext);
|
|
32435
32487
|
if (!context) {
|
|
32436
32488
|
throw new Error("SharedAudioContext not found");
|
|
32437
32489
|
}
|
|
32438
32490
|
const videoRef = useRef27(null);
|
|
32439
|
-
const sharedSource =
|
|
32491
|
+
const sharedSource = useMemo37(() => {
|
|
32440
32492
|
if (!context.audioContext) {
|
|
32441
32493
|
return null;
|
|
32442
32494
|
}
|
|
@@ -32488,7 +32540,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32488
32540
|
}
|
|
32489
32541
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
32490
32542
|
const { fps, durationInFrames } = useVideoConfig();
|
|
32491
|
-
const parentSequence =
|
|
32543
|
+
const parentSequence = useContext38(SequenceContext);
|
|
32492
32544
|
const logLevel = useLogLevel();
|
|
32493
32545
|
const mountTime = useMountTime();
|
|
32494
32546
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -32639,7 +32691,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32639
32691
|
current.preload = "auto";
|
|
32640
32692
|
}
|
|
32641
32693
|
}, []);
|
|
32642
|
-
const actualStyle =
|
|
32694
|
+
const actualStyle = useMemo37(() => {
|
|
32643
32695
|
return {
|
|
32644
32696
|
...style
|
|
32645
32697
|
};
|
|
@@ -32835,7 +32887,7 @@ function useRemotionContexts() {
|
|
|
32835
32887
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
32836
32888
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
32837
32889
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
32838
|
-
return
|
|
32890
|
+
return useMemo38(() => ({
|
|
32839
32891
|
compositionManagerCtx,
|
|
32840
32892
|
timelineContext,
|
|
32841
32893
|
setTimelineContext,
|
|
@@ -32946,6 +32998,7 @@ var Internals = {
|
|
|
32946
32998
|
textSchema,
|
|
32947
32999
|
transformSchema,
|
|
32948
33000
|
premountSchema,
|
|
33001
|
+
premountStyleSchema,
|
|
32949
33002
|
flattenActiveSchema,
|
|
32950
33003
|
getFlatSchemaWithAllKeys,
|
|
32951
33004
|
RemotionRootContexts,
|
|
@@ -32959,6 +33012,7 @@ var Internals = {
|
|
|
32959
33012
|
truthy,
|
|
32960
33013
|
SequenceContext,
|
|
32961
33014
|
PremountContext,
|
|
33015
|
+
usePremounting,
|
|
32962
33016
|
useRemotionContexts,
|
|
32963
33017
|
RemotionContextProvider,
|
|
32964
33018
|
CSSUtils: exports_default_css,
|
|
@@ -33134,7 +33188,7 @@ var validateSeriesSequenceProps = ({
|
|
|
33134
33188
|
return offset;
|
|
33135
33189
|
};
|
|
33136
33190
|
var SeriesInner = (props2) => {
|
|
33137
|
-
const childrenValue =
|
|
33191
|
+
const childrenValue = useMemo39(() => {
|
|
33138
33192
|
const flattenedChildren = flattenChildren(props2.children);
|
|
33139
33193
|
const renderChildren = (i, startFrame) => {
|
|
33140
33194
|
if (i === flattenedChildren.length) {
|
|
@@ -33463,14 +33517,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
33463
33517
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
33464
33518
|
const videoConfig = useUnsafeVideoConfig();
|
|
33465
33519
|
const videoRef = useRef28(null);
|
|
33466
|
-
const sequenceContext =
|
|
33520
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
33467
33521
|
const mediaStartsAt = useMediaStartsAt();
|
|
33468
33522
|
const environment = useRemotionEnvironment();
|
|
33469
33523
|
const logLevel = useLogLevel();
|
|
33470
33524
|
const mountTime = useMountTime();
|
|
33471
33525
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
33472
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
33473
|
-
const id =
|
|
33526
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
33527
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
33474
33528
|
props2.src,
|
|
33475
33529
|
sequenceContext?.cumulatedFrom,
|
|
33476
33530
|
sequenceContext?.relativeFrom,
|
|
@@ -33681,7 +33735,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
33681
33735
|
if (environment.isClientSideRendering) {
|
|
33682
33736
|
throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
33683
33737
|
}
|
|
33684
|
-
const { durations, setDurations } =
|
|
33738
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
33685
33739
|
if (typeof ref === "string") {
|
|
33686
33740
|
throw new Error("string refs are not supported");
|
|
33687
33741
|
}
|
|
@@ -33800,7 +33854,7 @@ addSequenceStackTraces(Composition);
|
|
|
33800
33854
|
addSequenceStackTraces(Folder);
|
|
33801
33855
|
|
|
33802
33856
|
// ../shapes/dist/esm/index.mjs
|
|
33803
|
-
import React, { useCallback as useCallback26, useMemo as
|
|
33857
|
+
import React, { useCallback as useCallback26, useMemo as useMemo41, useRef as useRef29 } from "react";
|
|
33804
33858
|
import { version } from "react-dom";
|
|
33805
33859
|
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
33806
33860
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -33982,13 +34036,13 @@ var RenderSvg = ({
|
|
|
33982
34036
|
stack,
|
|
33983
34037
|
...props
|
|
33984
34038
|
}) => {
|
|
33985
|
-
const actualStyle =
|
|
34039
|
+
const actualStyle = useMemo41(() => {
|
|
33986
34040
|
return {
|
|
33987
34041
|
overflow: "visible",
|
|
33988
34042
|
...style ?? {}
|
|
33989
34043
|
};
|
|
33990
34044
|
}, [style]);
|
|
33991
|
-
const actualPathStyle =
|
|
34045
|
+
const actualPathStyle = useMemo41(() => {
|
|
33992
34046
|
return {
|
|
33993
34047
|
transformBox: "fill-box",
|
|
33994
34048
|
...pathStyle ?? {}
|
|
@@ -36967,7 +37021,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
36967
37021
|
progress: 0,
|
|
36968
37022
|
isActive: false
|
|
36969
37023
|
});
|
|
36970
|
-
const eventTarget =
|
|
37024
|
+
const eventTarget = useMemo43(() => new EventTarget, []);
|
|
36971
37025
|
useEffect21(() => {
|
|
36972
37026
|
if (disabled) {
|
|
36973
37027
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
@@ -44502,7 +44556,7 @@ class AudioGainRadioGroup extends Component {
|
|
|
44502
44556
|
onSetup() {
|
|
44503
44557
|
this.#media = useMediaContext();
|
|
44504
44558
|
if (hasProvidedContext(menuContext)) {
|
|
44505
|
-
this.#menu =
|
|
44559
|
+
this.#menu = useContext48(menuContext);
|
|
44506
44560
|
}
|
|
44507
44561
|
}
|
|
44508
44562
|
onConnect(el) {
|
|
@@ -45892,7 +45946,7 @@ var DefaultKeyboardDisplay = React65.forwardRef(({ icons: Icons, ...props }, for
|
|
|
45892
45946
|
});
|
|
45893
45947
|
DefaultKeyboardDisplay.displayName = "DefaultKeyboardDisplay";
|
|
45894
45948
|
function getText() {
|
|
45895
|
-
const { $state } =
|
|
45949
|
+
const { $state } = useContext48(mediaContext), action = $state.lastKeyboardAction()?.action, audioGain = $state.audioGain() ?? 1;
|
|
45896
45950
|
switch (action) {
|
|
45897
45951
|
case "toggleMuted":
|
|
45898
45952
|
return $state.muted() ? "0%" : getVolumeText($state.volume(), audioGain);
|
|
@@ -45907,7 +45961,7 @@ function getVolumeText(volume, gain) {
|
|
|
45907
45961
|
return `${Math.round(volume * gain * 100)}%`;
|
|
45908
45962
|
}
|
|
45909
45963
|
function getIcon(Icons) {
|
|
45910
|
-
const { $state } =
|
|
45964
|
+
const { $state } = useContext48(mediaContext), action = $state.lastKeyboardAction()?.action;
|
|
45911
45965
|
switch (action) {
|
|
45912
45966
|
case "togglePaused":
|
|
45913
45967
|
return !$state.paused() ? Icons.Play : Icons.Pause;
|