@remotion/promo-pages 4.0.459 → 4.0.461
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 +580 -331
- package/dist/design.js +353 -179
- package/dist/experts.js +353 -179
- package/dist/homepage/Pricing.js +353 -179
- package/dist/prompts/PromptsGallery.js +353 -179
- package/dist/prompts/PromptsShow.js +387 -213
- package/dist/prompts/PromptsSubmit.js +387 -213
- package/dist/team.js +353 -179
- package/dist/template-modal-content.js +353 -179
- package/dist/templates.js +354 -179
- package/package.json +14 -14
|
@@ -45,7 +45,7 @@ __export(exports_vidstack_CZgUA94N, {
|
|
|
45
45
|
useSignal: () => useSignal,
|
|
46
46
|
useReactScope: () => useReactScope,
|
|
47
47
|
useReactContext: () => useReactContext,
|
|
48
|
-
useContext: () =>
|
|
48
|
+
useContext: () => useContext44,
|
|
49
49
|
uppercaseFirstChar: () => uppercaseFirstChar,
|
|
50
50
|
untrack: () => untrack,
|
|
51
51
|
toggleClass: () => toggleClass,
|
|
@@ -92,7 +92,7 @@ __export(exports_vidstack_CZgUA94N, {
|
|
|
92
92
|
createScope: () => createScope,
|
|
93
93
|
createReactComponent: () => createReactComponent,
|
|
94
94
|
createDisposalBin: () => createDisposalBin,
|
|
95
|
-
createContext: () =>
|
|
95
|
+
createContext: () => createContext33,
|
|
96
96
|
computed: () => computed,
|
|
97
97
|
composeRefs: () => composeRefs3,
|
|
98
98
|
chromecast: () => chromecast,
|
|
@@ -612,14 +612,14 @@ function unwrapDeep(fn) {
|
|
|
612
612
|
value = value.call(this);
|
|
613
613
|
return value;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function createContext33(provide) {
|
|
616
616
|
return { id: Symbol(), provide };
|
|
617
617
|
}
|
|
618
618
|
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 useContext44(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 useState41(state) {
|
|
682
|
-
return
|
|
682
|
+
return useContext44(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 useContext44(mediaContext);
|
|
7065
7065
|
}
|
|
7066
7066
|
|
|
7067
7067
|
class MediaRemoteControl {
|
|
@@ -10487,7 +10487,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
10487
10487
|
"started",
|
|
10488
10488
|
"userBehindLiveEdge"
|
|
10489
10489
|
]);
|
|
10490
|
-
mediaContext =
|
|
10490
|
+
mediaContext = createContext33();
|
|
10491
10491
|
ADD = Symbol(0);
|
|
10492
10492
|
REMOVE = Symbol(0);
|
|
10493
10493
|
RESET = Symbol(0);
|
|
@@ -13889,7 +13889,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
13889
13889
|
this.#showTimerId = -1;
|
|
13890
13890
|
}
|
|
13891
13891
|
};
|
|
13892
|
-
tooltipContext =
|
|
13892
|
+
tooltipContext = createContext33();
|
|
13893
13893
|
Tooltip = class Tooltip extends Component {
|
|
13894
13894
|
static props = {
|
|
13895
13895
|
showDelay: 700
|
|
@@ -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 = useContext44(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 = useContext44(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 = useContext44(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 = useContext44(tooltipContext);
|
|
14030
14030
|
tooltip.attachContent(el);
|
|
14031
14031
|
}
|
|
14032
14032
|
#watchPlacement() {
|
|
14033
|
-
const { showing } =
|
|
14033
|
+
const { showing } = useContext44(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 useContext44(tooltipContext).trigger();
|
|
14045
14045
|
}
|
|
14046
14046
|
};
|
|
14047
14047
|
ToggleButtonController = class ToggleButtonController extends ViewController {
|
|
@@ -14514,8 +14514,8 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14514
14514
|
this.#observer = undefined;
|
|
14515
14515
|
}
|
|
14516
14516
|
};
|
|
14517
|
-
sliderContext =
|
|
14518
|
-
sliderObserverContext =
|
|
14517
|
+
sliderContext = createContext33();
|
|
14518
|
+
sliderObserverContext = createContext33();
|
|
14519
14519
|
SliderKeyDirection = {
|
|
14520
14520
|
Left: -1,
|
|
14521
14521
|
ArrowLeft: -1,
|
|
@@ -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 = useContext44(sliderObserverContext);
|
|
14541
14541
|
}
|
|
14542
14542
|
}
|
|
14543
14543
|
onConnect(el) {
|
|
@@ -14746,7 +14746,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14746
14746
|
this.#updatePointerValue(this.#getPointerValue(event2), event2);
|
|
14747
14747
|
}, 20, { leading: true });
|
|
14748
14748
|
};
|
|
14749
|
-
sliderValueFormatContext =
|
|
14749
|
+
sliderValueFormatContext = createContext33(() => ({}));
|
|
14750
14750
|
SliderController = class SliderController extends ViewController {
|
|
14751
14751
|
static props = {
|
|
14752
14752
|
hidden: false,
|
|
@@ -15153,7 +15153,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15153
15153
|
#slider;
|
|
15154
15154
|
onSetup() {
|
|
15155
15155
|
this.#slider = useState41(Slider.state);
|
|
15156
|
-
this.#format =
|
|
15156
|
+
this.#format = useContext44(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 = useContext44(sliderContext);
|
|
15196
15196
|
const { active } = useState41(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 } = useContext44(sliderContext);
|
|
15624
15624
|
player && preview() && setAttribute(player, "data-preview", this.$state.active());
|
|
15625
15625
|
}
|
|
15626
15626
|
#seeking(time, event2) {
|
|
@@ -15974,7 +15974,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15974
15974
|
prop(sliderchapters__proto, "activeCue");
|
|
15975
15975
|
prop(sliderchapters__proto, "activePointerCue");
|
|
15976
15976
|
method(sliderchapters__proto, "setRefs");
|
|
15977
|
-
menuContext =
|
|
15977
|
+
menuContext = createContext33();
|
|
15978
15978
|
FOCUSABLE_ELEMENTS_SELECTOR = /* @__PURE__ */ [
|
|
15979
15979
|
"a[href]",
|
|
15980
15980
|
"[tabindex]",
|
|
@@ -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 = useContext44(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) ? useContext44(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 = useContext44(menuContext);
|
|
16434
16434
|
}
|
|
16435
16435
|
onAttach(el) {
|
|
16436
16436
|
this.#menu.attachMenuButton(this);
|
|
@@ -16529,7 +16529,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16529
16529
|
return selector ? document.querySelector(selector) : document.body;
|
|
16530
16530
|
}
|
|
16531
16531
|
};
|
|
16532
|
-
menuPortalContext =
|
|
16532
|
+
menuPortalContext = createContext33();
|
|
16533
16533
|
MenuItems = class MenuItems extends Component {
|
|
16534
16534
|
static props = {
|
|
16535
16535
|
placement: null,
|
|
@@ -16546,10 +16546,10 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16546
16546
|
});
|
|
16547
16547
|
}
|
|
16548
16548
|
onAttach(el) {
|
|
16549
|
-
this.#menu =
|
|
16549
|
+
this.#menu = useContext44(menuContext);
|
|
16550
16550
|
this.#menu.attachMenuItems(this);
|
|
16551
16551
|
if (hasProvidedContext(menuPortalContext)) {
|
|
16552
|
-
const portal =
|
|
16552
|
+
const portal = useContext44(menuPortalContext);
|
|
16553
16553
|
if (portal) {
|
|
16554
16554
|
provideContext(menuPortalContext, null);
|
|
16555
16555
|
portal.attach(el);
|
|
@@ -16591,7 +16591,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16591
16591
|
return this.#menu.button();
|
|
16592
16592
|
}
|
|
16593
16593
|
};
|
|
16594
|
-
radioControllerContext =
|
|
16594
|
+
radioControllerContext = createContext33();
|
|
16595
16595
|
RadioGroupController = class RadioGroupController extends ViewController {
|
|
16596
16596
|
#group = /* @__PURE__ */ new Set;
|
|
16597
16597
|
#value = signal("");
|
|
@@ -16724,12 +16724,12 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16724
16724
|
}
|
|
16725
16725
|
#onDisconnect() {
|
|
16726
16726
|
scoped(() => {
|
|
16727
|
-
const group =
|
|
16727
|
+
const group = useContext44(radioControllerContext);
|
|
16728
16728
|
group.remove(this.#controller);
|
|
16729
16729
|
}, this.connectScope);
|
|
16730
16730
|
}
|
|
16731
16731
|
#addToGroup() {
|
|
16732
|
-
const group =
|
|
16732
|
+
const group = useContext44(radioControllerContext);
|
|
16733
16733
|
group.add(this.#controller);
|
|
16734
16734
|
}
|
|
16735
16735
|
#watchValue() {
|
|
@@ -23090,6 +23090,7 @@ import {
|
|
|
23090
23090
|
} from "react";
|
|
23091
23091
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
23092
23092
|
import { useEffect as useEffect3, useMemo as useMemo10, useRef as useRef4 } from "react";
|
|
23093
|
+
import { useRef as useRef5 } from "react";
|
|
23093
23094
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
23094
23095
|
import {
|
|
23095
23096
|
forwardRef as forwardRef3,
|
|
@@ -23098,7 +23099,6 @@ import {
|
|
|
23098
23099
|
useMemo as useMemo16,
|
|
23099
23100
|
useState as useState6
|
|
23100
23101
|
} from "react";
|
|
23101
|
-
import { useRef as useRef5 } from "react";
|
|
23102
23102
|
import { useContext as useContext14, useMemo as useMemo13 } from "react";
|
|
23103
23103
|
import { useContext as useContext13 } from "react";
|
|
23104
23104
|
import { useContext as useContext12, useMemo as useMemo12 } from "react";
|
|
@@ -23107,6 +23107,7 @@ import { createContext as createContext14 } from "react";
|
|
|
23107
23107
|
import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
|
|
23108
23108
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
23109
23109
|
import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
|
|
23110
|
+
import { createContext as createContext15 } from "react";
|
|
23110
23111
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
23111
23112
|
import {
|
|
23112
23113
|
forwardRef as forwardRef4,
|
|
@@ -23120,7 +23121,7 @@ import React15, { useCallback as useCallback6, useImperativeHandle, useRef as us
|
|
|
23120
23121
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
23121
23122
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
23122
23123
|
import {
|
|
23123
|
-
createContext as
|
|
23124
|
+
createContext as createContext16,
|
|
23124
23125
|
forwardRef as forwardRef5,
|
|
23125
23126
|
useCallback as useCallback7,
|
|
23126
23127
|
useContext as useContext17,
|
|
@@ -23132,7 +23133,7 @@ import {
|
|
|
23132
23133
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
23133
23134
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
|
|
23134
23135
|
import {
|
|
23135
|
-
createContext as
|
|
23136
|
+
createContext as createContext17,
|
|
23136
23137
|
useCallback as useCallback8,
|
|
23137
23138
|
useImperativeHandle as useImperativeHandle3,
|
|
23138
23139
|
useLayoutEffect as useLayoutEffect4,
|
|
@@ -23142,12 +23143,12 @@ import {
|
|
|
23142
23143
|
} from "react";
|
|
23143
23144
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
23144
23145
|
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
|
|
23145
|
-
import React17, { createContext as
|
|
23146
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
23146
23147
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
23147
23148
|
import { useContext as useContext19 } from "react";
|
|
23148
|
-
import { createContext as
|
|
23149
|
+
import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
|
|
23149
23150
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
23150
|
-
import { createContext as
|
|
23151
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
23151
23152
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
23152
23153
|
import React23, {
|
|
23153
23154
|
forwardRef as forwardRef6,
|
|
@@ -23160,7 +23161,7 @@ import React23, {
|
|
|
23160
23161
|
} from "react";
|
|
23161
23162
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
|
|
23162
23163
|
import React20, {
|
|
23163
|
-
createContext as
|
|
23164
|
+
createContext as createContext21,
|
|
23164
23165
|
createRef as createRef2,
|
|
23165
23166
|
useCallback as useCallback9,
|
|
23166
23167
|
useContext as useContext20,
|
|
@@ -23196,7 +23197,7 @@ import React22 from "react";
|
|
|
23196
23197
|
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
23197
23198
|
import { useEffect as useEffect11, useRef as useRef16 } from "react";
|
|
23198
23199
|
import { useEffect as useEffect13 } from "react";
|
|
23199
|
-
import { createContext as
|
|
23200
|
+
import { createContext as createContext22, useContext as useContext27, useMemo as useMemo27 } from "react";
|
|
23200
23201
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
23201
23202
|
import {
|
|
23202
23203
|
forwardRef as forwardRef7,
|
|
@@ -23232,16 +23233,15 @@ import {
|
|
|
23232
23233
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
23233
23234
|
import React29 from "react";
|
|
23234
23235
|
import { useMemo as useMemo322 } from "react";
|
|
23235
|
-
import { createContext as
|
|
23236
|
+
import { createContext as createContext23, useContext as useContext32, useMemo as useMemo31 } from "react";
|
|
23236
23237
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
23237
23238
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
23238
23239
|
import React31 from "react";
|
|
23239
|
-
import React32, { createContext as
|
|
23240
|
-
import { useContext as useContext33 } from "react";
|
|
23240
|
+
import React32, { createContext as createContext24 } from "react";
|
|
23241
23241
|
import { useCallback as useCallback18 } from "react";
|
|
23242
23242
|
import {
|
|
23243
23243
|
useCallback as useCallback17,
|
|
23244
|
-
useContext as
|
|
23244
|
+
useContext as useContext33,
|
|
23245
23245
|
useEffect as useEffect16,
|
|
23246
23246
|
useLayoutEffect as useLayoutEffect11,
|
|
23247
23247
|
useMemo as useMemo33,
|
|
@@ -23250,7 +23250,7 @@ import {
|
|
|
23250
23250
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
23251
23251
|
import React34, {
|
|
23252
23252
|
forwardRef as forwardRef10,
|
|
23253
|
-
useContext as
|
|
23253
|
+
useContext as useContext34,
|
|
23254
23254
|
useEffect as useEffect18,
|
|
23255
23255
|
useImperativeHandle as useImperativeHandle8,
|
|
23256
23256
|
useMemo as useMemo34,
|
|
@@ -23264,14 +23264,14 @@ import React36, { useMemo as useMemo35 } from "react";
|
|
|
23264
23264
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
23265
23265
|
import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
|
|
23266
23266
|
import React37 from "react";
|
|
23267
|
-
import React38, { createContext as
|
|
23267
|
+
import React38, { createContext as createContext25 } from "react";
|
|
23268
23268
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
23269
23269
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
23270
23270
|
import React40 from "react";
|
|
23271
|
-
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as
|
|
23271
|
+
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext36 } from "react";
|
|
23272
23272
|
import {
|
|
23273
23273
|
forwardRef as forwardRef12,
|
|
23274
|
-
useContext as
|
|
23274
|
+
useContext as useContext35,
|
|
23275
23275
|
useEffect as useEffect19,
|
|
23276
23276
|
useImperativeHandle as useImperativeHandle9,
|
|
23277
23277
|
useLayoutEffect as useLayoutEffect12,
|
|
@@ -24552,6 +24552,39 @@ var useCurrentFrame = () => {
|
|
|
24552
24552
|
const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
|
|
24553
24553
|
return frame - contextOffset;
|
|
24554
24554
|
};
|
|
24555
|
+
var flattenEffects = (effects) => {
|
|
24556
|
+
const out = [];
|
|
24557
|
+
for (const item of effects) {
|
|
24558
|
+
if (Array.isArray(item)) {
|
|
24559
|
+
for (const inner of item) {
|
|
24560
|
+
out.push(inner);
|
|
24561
|
+
}
|
|
24562
|
+
} else {
|
|
24563
|
+
out.push(item);
|
|
24564
|
+
}
|
|
24565
|
+
}
|
|
24566
|
+
return out;
|
|
24567
|
+
};
|
|
24568
|
+
var groupByBackend = (effects) => {
|
|
24569
|
+
const runs = [];
|
|
24570
|
+
let current = [];
|
|
24571
|
+
let currentBackend = null;
|
|
24572
|
+
for (const eff of effects) {
|
|
24573
|
+
const { backend } = eff.definition;
|
|
24574
|
+
if (currentBackend === null || backend === currentBackend) {
|
|
24575
|
+
current.push(eff);
|
|
24576
|
+
currentBackend = backend;
|
|
24577
|
+
} else {
|
|
24578
|
+
runs.push({ backend: currentBackend, effects: current });
|
|
24579
|
+
current = [eff];
|
|
24580
|
+
currentBackend = backend;
|
|
24581
|
+
}
|
|
24582
|
+
}
|
|
24583
|
+
if (currentBackend !== null && current.length > 0) {
|
|
24584
|
+
runs.push({ backend: currentBackend, effects: current });
|
|
24585
|
+
}
|
|
24586
|
+
return runs;
|
|
24587
|
+
};
|
|
24555
24588
|
|
|
24556
24589
|
class CanvasPool {
|
|
24557
24590
|
width;
|
|
@@ -24625,39 +24658,6 @@ class CanvasPool {
|
|
|
24625
24658
|
}
|
|
24626
24659
|
}
|
|
24627
24660
|
}
|
|
24628
|
-
var flattenEffects = (effects) => {
|
|
24629
|
-
const out = [];
|
|
24630
|
-
for (const item of effects) {
|
|
24631
|
-
if (Array.isArray(item)) {
|
|
24632
|
-
for (const inner of item) {
|
|
24633
|
-
out.push(inner);
|
|
24634
|
-
}
|
|
24635
|
-
} else {
|
|
24636
|
-
out.push(item);
|
|
24637
|
-
}
|
|
24638
|
-
}
|
|
24639
|
-
return out;
|
|
24640
|
-
};
|
|
24641
|
-
var groupByBackend = (effects) => {
|
|
24642
|
-
const runs = [];
|
|
24643
|
-
let current = [];
|
|
24644
|
-
let currentBackend = null;
|
|
24645
|
-
for (const eff of effects) {
|
|
24646
|
-
const { backend } = eff.definition;
|
|
24647
|
-
if (currentBackend === null || backend === currentBackend) {
|
|
24648
|
-
current.push(eff);
|
|
24649
|
-
currentBackend = backend;
|
|
24650
|
-
} else {
|
|
24651
|
-
runs.push({ backend: currentBackend, effects: current });
|
|
24652
|
-
current = [eff];
|
|
24653
|
-
currentBackend = backend;
|
|
24654
|
-
}
|
|
24655
|
-
}
|
|
24656
|
-
if (currentBackend !== null && current.length > 0) {
|
|
24657
|
-
runs.push({ backend: currentBackend, effects: current });
|
|
24658
|
-
}
|
|
24659
|
-
return runs;
|
|
24660
|
-
};
|
|
24661
24661
|
var devicePromise = null;
|
|
24662
24662
|
var getGpuDevice = () => {
|
|
24663
24663
|
if (devicePromise) {
|
|
@@ -24709,8 +24709,7 @@ var runEffectChain = async ({
|
|
|
24709
24709
|
}) => {
|
|
24710
24710
|
const runId = ++state.currentRunId;
|
|
24711
24711
|
const isCancelled = () => state.currentRunId !== runId;
|
|
24712
|
-
const
|
|
24713
|
-
const runs = groupByBackend(flattened);
|
|
24712
|
+
const runs = groupByBackend(effects);
|
|
24714
24713
|
let currentImage = source;
|
|
24715
24714
|
let lastTarget = null;
|
|
24716
24715
|
if (runs.length === 0) {
|
|
@@ -24804,12 +24803,29 @@ var useEffectChainState = () => {
|
|
|
24804
24803
|
}
|
|
24805
24804
|
}), []);
|
|
24806
24805
|
};
|
|
24806
|
+
var useMemoizedEffects = (effects) => {
|
|
24807
|
+
const previousRef = useRef5(null);
|
|
24808
|
+
const previous = previousRef.current;
|
|
24809
|
+
const isSame = previous !== null && previous.length === effects.length && previous.every((p, i) => p.definition === effects[i].definition && p.effectKey === effects[i].effectKey);
|
|
24810
|
+
if (isSame) {
|
|
24811
|
+
return previous;
|
|
24812
|
+
}
|
|
24813
|
+
const next = effects.map((e) => ({
|
|
24814
|
+
definition: e.definition,
|
|
24815
|
+
stack: e.stack,
|
|
24816
|
+
effectKey: e.effectKey,
|
|
24817
|
+
params: e.params,
|
|
24818
|
+
memoized: true
|
|
24819
|
+
}));
|
|
24820
|
+
previousRef.current = next;
|
|
24821
|
+
return next;
|
|
24822
|
+
};
|
|
24807
24823
|
var componentsToAddStacksTo = [];
|
|
24808
24824
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
24809
24825
|
var addSequenceStackTraces = (component) => {
|
|
24810
24826
|
componentsToAddStacksTo.push(component);
|
|
24811
24827
|
};
|
|
24812
|
-
var VERSION = "4.0.
|
|
24828
|
+
var VERSION = "4.0.461";
|
|
24813
24829
|
var checkMultipleRemotionVersions = () => {
|
|
24814
24830
|
if (typeof globalThis === "undefined") {
|
|
24815
24831
|
return;
|
|
@@ -24837,20 +24853,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
24837
24853
|
}
|
|
24838
24854
|
set();
|
|
24839
24855
|
};
|
|
24840
|
-
var useMemoizedEffects = (effects) => {
|
|
24841
|
-
const previousRef = useRef5(null);
|
|
24842
|
-
const previous = previousRef.current;
|
|
24843
|
-
const isSame = previous !== null && previous.length === effects.length && previous.every((p, i) => p.definition === effects[i].definition && p.stack === effects[i].stack);
|
|
24844
|
-
if (isSame) {
|
|
24845
|
-
return previous;
|
|
24846
|
-
}
|
|
24847
|
-
const next = effects.map((e) => ({
|
|
24848
|
-
definition: e.definition,
|
|
24849
|
-
stack: e.stack
|
|
24850
|
-
}));
|
|
24851
|
-
previousRef.current = next;
|
|
24852
|
-
return next;
|
|
24853
|
-
};
|
|
24854
24856
|
var useUnsafeVideoConfig = () => {
|
|
24855
24857
|
const context = useContext12(SequenceContext);
|
|
24856
24858
|
const ctxWidth = context?.width ?? null;
|
|
@@ -25008,6 +25010,22 @@ var sequenceStyleSchema = {
|
|
|
25008
25010
|
step: 0.01,
|
|
25009
25011
|
default: 1,
|
|
25010
25012
|
description: "Opacity"
|
|
25013
|
+
},
|
|
25014
|
+
premountFor: {
|
|
25015
|
+
type: "number",
|
|
25016
|
+
default: 0,
|
|
25017
|
+
description: "Premount For",
|
|
25018
|
+
min: 0,
|
|
25019
|
+
step: 1
|
|
25020
|
+
},
|
|
25021
|
+
postmountFor: {
|
|
25022
|
+
type: "hidden"
|
|
25023
|
+
},
|
|
25024
|
+
styleWhilePremounted: {
|
|
25025
|
+
type: "hidden"
|
|
25026
|
+
},
|
|
25027
|
+
styleWhilePostmounted: {
|
|
25028
|
+
type: "hidden"
|
|
25011
25029
|
}
|
|
25012
25030
|
};
|
|
25013
25031
|
var sequenceSchema = {
|
|
@@ -25028,6 +25046,9 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
25028
25046
|
default: "none"
|
|
25029
25047
|
}
|
|
25030
25048
|
};
|
|
25049
|
+
var nodePathToString = (nodePath) => {
|
|
25050
|
+
return nodePath.join(".");
|
|
25051
|
+
};
|
|
25031
25052
|
var SequenceManager = React12.createContext({
|
|
25032
25053
|
registerSequence: () => {
|
|
25033
25054
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -25043,60 +25064,73 @@ var SequenceVisibilityToggleContext = React12.createContext({
|
|
|
25043
25064
|
throw new Error("SequenceVisibilityToggle not initialized");
|
|
25044
25065
|
}
|
|
25045
25066
|
});
|
|
25046
|
-
var
|
|
25047
|
-
|
|
25067
|
+
var getCodeValuesCtx = (codeValues, nodePath) => {
|
|
25068
|
+
const status = codeValues[nodePathToString(nodePath)];
|
|
25069
|
+
if (!status) {
|
|
25070
|
+
return;
|
|
25071
|
+
}
|
|
25072
|
+
if (!status.canUpdate) {
|
|
25073
|
+
return;
|
|
25074
|
+
}
|
|
25075
|
+
return status.props;
|
|
25076
|
+
};
|
|
25077
|
+
var VisualModeCodeValuesContext = React12.createContext({
|
|
25078
|
+
getCodeValues: () => {
|
|
25079
|
+
throw new Error("VisualModeCodeValuesContext not initialized");
|
|
25080
|
+
}
|
|
25081
|
+
});
|
|
25082
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
25083
|
+
getDragOverrides: () => {
|
|
25084
|
+
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
25085
|
+
}
|
|
25086
|
+
});
|
|
25087
|
+
var VisualModeSettersContext = React12.createContext({
|
|
25048
25088
|
setDragOverrides: () => {
|
|
25049
|
-
throw new Error("
|
|
25089
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
25050
25090
|
},
|
|
25051
25091
|
clearDragOverrides: () => {
|
|
25052
|
-
throw new Error("
|
|
25092
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
25053
25093
|
},
|
|
25054
|
-
codeValues: {},
|
|
25055
25094
|
setCodeValues: () => {
|
|
25056
|
-
throw new Error("
|
|
25057
|
-
}
|
|
25058
|
-
visualModeEnabled: false
|
|
25095
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
25096
|
+
}
|
|
25059
25097
|
});
|
|
25060
|
-
var SequenceManagerProvider = ({ children
|
|
25098
|
+
var SequenceManagerProvider = ({ children }) => {
|
|
25061
25099
|
const [sequences, setSequences] = useState4([]);
|
|
25062
25100
|
const [hidden, setHidden] = useState4({});
|
|
25063
25101
|
const [dragOverrides, setControlOverrides] = useState4({});
|
|
25064
25102
|
const controlOverridesRef = useRef6(dragOverrides);
|
|
25065
25103
|
controlOverridesRef.current = dragOverrides;
|
|
25066
25104
|
const [codeValues, setCodeValuesMapState] = useState4({});
|
|
25067
|
-
const setDragOverrides = useCallback5((
|
|
25105
|
+
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
25068
25106
|
setControlOverrides((prev) => ({
|
|
25069
25107
|
...prev,
|
|
25070
|
-
[
|
|
25071
|
-
...prev[
|
|
25108
|
+
[nodePathToString(nodePath)]: {
|
|
25109
|
+
...prev[nodePathToString(nodePath)],
|
|
25072
25110
|
[key]: value
|
|
25073
25111
|
}
|
|
25074
25112
|
}));
|
|
25075
25113
|
}, []);
|
|
25076
|
-
const clearDragOverrides = useCallback5((
|
|
25114
|
+
const clearDragOverrides = useCallback5((nodePath) => {
|
|
25077
25115
|
setControlOverrides((prev) => {
|
|
25078
|
-
|
|
25116
|
+
const key = nodePathToString(nodePath);
|
|
25117
|
+
if (!prev[key]) {
|
|
25079
25118
|
return prev;
|
|
25080
25119
|
}
|
|
25081
25120
|
const next = { ...prev };
|
|
25082
|
-
delete next[
|
|
25121
|
+
delete next[key];
|
|
25083
25122
|
return next;
|
|
25084
25123
|
});
|
|
25085
25124
|
}, []);
|
|
25086
|
-
const setCodeValues = useCallback5((
|
|
25125
|
+
const setCodeValues = useCallback5((nodePath, values) => {
|
|
25087
25126
|
setCodeValuesMapState((prev) => {
|
|
25088
|
-
|
|
25127
|
+
const key = nodePathToString(nodePath);
|
|
25128
|
+
const prevKey = prev[key];
|
|
25129
|
+
const newKey = values(prevKey);
|
|
25130
|
+
if (prevKey === newKey) {
|
|
25089
25131
|
return prev;
|
|
25090
25132
|
}
|
|
25091
|
-
|
|
25092
|
-
if (!(sequenceId in prev)) {
|
|
25093
|
-
return prev;
|
|
25094
|
-
}
|
|
25095
|
-
const next = { ...prev };
|
|
25096
|
-
delete next[sequenceId];
|
|
25097
|
-
return next;
|
|
25098
|
-
}
|
|
25099
|
-
return { ...prev, [sequenceId]: values };
|
|
25133
|
+
return { ...prev, [key]: newKey };
|
|
25100
25134
|
});
|
|
25101
25135
|
}, []);
|
|
25102
25136
|
const registerSequence = useCallback5((seq) => {
|
|
@@ -25120,40 +25154,85 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
25120
25154
|
setHidden
|
|
25121
25155
|
};
|
|
25122
25156
|
}, [hidden]);
|
|
25123
|
-
const
|
|
25157
|
+
const getDragOverrides = useCallback5((nodePath) => {
|
|
25158
|
+
return dragOverrides[nodePathToString(nodePath)] ?? {};
|
|
25159
|
+
}, [dragOverrides]);
|
|
25160
|
+
const getCodeValues = useCallback5((nodePath) => {
|
|
25161
|
+
return getCodeValuesCtx(codeValues, nodePath);
|
|
25162
|
+
}, [codeValues]);
|
|
25163
|
+
const codeValuesContext = useMemo14(() => {
|
|
25164
|
+
return {
|
|
25165
|
+
getCodeValues
|
|
25166
|
+
};
|
|
25167
|
+
}, [getCodeValues]);
|
|
25168
|
+
const dragOverridesContext = useMemo14(() => {
|
|
25169
|
+
return {
|
|
25170
|
+
getDragOverrides
|
|
25171
|
+
};
|
|
25172
|
+
}, [getDragOverrides]);
|
|
25173
|
+
const settersContext = useMemo14(() => {
|
|
25124
25174
|
return {
|
|
25125
|
-
visualModeEnabled,
|
|
25126
|
-
dragOverrides,
|
|
25127
25175
|
setDragOverrides,
|
|
25128
25176
|
clearDragOverrides,
|
|
25129
|
-
codeValues,
|
|
25130
25177
|
setCodeValues
|
|
25131
25178
|
};
|
|
25132
|
-
}, [
|
|
25133
|
-
visualModeEnabled,
|
|
25134
|
-
dragOverrides,
|
|
25135
|
-
setDragOverrides,
|
|
25136
|
-
clearDragOverrides,
|
|
25137
|
-
codeValues,
|
|
25138
|
-
setCodeValues
|
|
25139
|
-
]);
|
|
25179
|
+
}, [setDragOverrides, clearDragOverrides, setCodeValues]);
|
|
25140
25180
|
return /* @__PURE__ */ jsx112(SequenceManager.Provider, {
|
|
25141
25181
|
value: sequenceContext,
|
|
25142
25182
|
children: /* @__PURE__ */ jsx112(SequenceVisibilityToggleContext.Provider, {
|
|
25143
25183
|
value: hiddenContext,
|
|
25144
|
-
children: /* @__PURE__ */ jsx112(
|
|
25145
|
-
value:
|
|
25146
|
-
children
|
|
25184
|
+
children: /* @__PURE__ */ jsx112(VisualModeCodeValuesContext.Provider, {
|
|
25185
|
+
value: codeValuesContext,
|
|
25186
|
+
children: /* @__PURE__ */ jsx112(VisualModeDragOverridesContext.Provider, {
|
|
25187
|
+
value: dragOverridesContext,
|
|
25188
|
+
children: /* @__PURE__ */ jsx112(VisualModeSettersContext.Provider, {
|
|
25189
|
+
value: settersContext,
|
|
25190
|
+
children
|
|
25191
|
+
})
|
|
25192
|
+
})
|
|
25147
25193
|
})
|
|
25148
25194
|
})
|
|
25149
25195
|
});
|
|
25150
25196
|
};
|
|
25151
25197
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
25198
|
+
var deleteNestedKey = (obj, keysToRemove) => {
|
|
25199
|
+
for (const key of keysToRemove) {
|
|
25200
|
+
const parts = key.split(".");
|
|
25201
|
+
const parents = [obj];
|
|
25202
|
+
let current = obj;
|
|
25203
|
+
for (let i = 0;i < parts.length - 1; i++) {
|
|
25204
|
+
const part = parts[i];
|
|
25205
|
+
const next = current[part];
|
|
25206
|
+
if (next === undefined || next === null) {
|
|
25207
|
+
current = null;
|
|
25208
|
+
break;
|
|
25209
|
+
}
|
|
25210
|
+
current = next;
|
|
25211
|
+
parents.push(current);
|
|
25212
|
+
}
|
|
25213
|
+
if (current === null) {
|
|
25214
|
+
continue;
|
|
25215
|
+
}
|
|
25216
|
+
delete current[parts[parts.length - 1]];
|
|
25217
|
+
for (let i = parents.length - 1;i > 0; i--) {
|
|
25218
|
+
const parent = parents[i];
|
|
25219
|
+
if (Object.keys(parent).length === 0) {
|
|
25220
|
+
const parentKey = parts[i - 1];
|
|
25221
|
+
delete parents[i - 1][parentKey];
|
|
25222
|
+
} else {
|
|
25223
|
+
break;
|
|
25224
|
+
}
|
|
25225
|
+
}
|
|
25226
|
+
}
|
|
25227
|
+
return obj;
|
|
25228
|
+
};
|
|
25152
25229
|
var flattenActiveSchema = (schema, resolve) => {
|
|
25153
25230
|
const out = {};
|
|
25154
25231
|
for (const key of Object.keys(schema)) {
|
|
25155
25232
|
const field = schema[key];
|
|
25156
|
-
if (field.type === "
|
|
25233
|
+
if (field.type === "hidden") {
|
|
25234
|
+
continue;
|
|
25235
|
+
} else if (field.type === "enum") {
|
|
25157
25236
|
out[key] = field;
|
|
25158
25237
|
const current = resolve(key) ?? field.default;
|
|
25159
25238
|
const variant = field.variants[current];
|
|
@@ -25188,6 +25267,44 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
25188
25267
|
}
|
|
25189
25268
|
return out;
|
|
25190
25269
|
};
|
|
25270
|
+
var OverrideIdsToNodePathsGettersContext = createContext15({
|
|
25271
|
+
overrideIdToNodePathMappings: {}
|
|
25272
|
+
});
|
|
25273
|
+
var OverrideIdsToNodePathsSettersContext = createContext15({
|
|
25274
|
+
setOverrideIdToNodePath: () => {
|
|
25275
|
+
throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
|
|
25276
|
+
}
|
|
25277
|
+
});
|
|
25278
|
+
var findPropsToDelete = ({
|
|
25279
|
+
schema,
|
|
25280
|
+
key,
|
|
25281
|
+
value
|
|
25282
|
+
}) => {
|
|
25283
|
+
const fieldSchema = schema[key];
|
|
25284
|
+
if (!fieldSchema) {
|
|
25285
|
+
throw new Error("Key " + JSON.stringify(key) + " not found in schema");
|
|
25286
|
+
}
|
|
25287
|
+
if (typeof value !== "string") {
|
|
25288
|
+
throw new Error("Value must be a string, but is " + JSON.stringify(value));
|
|
25289
|
+
}
|
|
25290
|
+
if (fieldSchema.type !== "enum") {
|
|
25291
|
+
throw new Error("Key " + JSON.stringify(key) + " is not an enum");
|
|
25292
|
+
}
|
|
25293
|
+
const currentVariant = fieldSchema.variants[value];
|
|
25294
|
+
if (!currentVariant) {
|
|
25295
|
+
throw new Error("Value for " + JSON.stringify(key) + " must be one of " + Object.keys(fieldSchema.variants).map((v) => JSON.stringify(v)).join(", ") + ", got " + JSON.stringify(value));
|
|
25296
|
+
}
|
|
25297
|
+
const otherVariants = Object.keys(fieldSchema.variants).filter((v) => v !== value);
|
|
25298
|
+
const otherKeys = new Set;
|
|
25299
|
+
for (const variant of otherVariants) {
|
|
25300
|
+
const otherVariant = fieldSchema.variants[variant];
|
|
25301
|
+
const keys = Object.keys(otherVariant);
|
|
25302
|
+
for (const k of keys) {
|
|
25303
|
+
otherKeys.add(k);
|
|
25304
|
+
}
|
|
25305
|
+
}
|
|
25306
|
+
return [...otherKeys];
|
|
25307
|
+
};
|
|
25191
25308
|
var getEffectiveVisualModeValue = ({
|
|
25192
25309
|
codeValue,
|
|
25193
25310
|
runtimeValue,
|
|
@@ -25233,17 +25350,38 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
25233
25350
|
propStatus
|
|
25234
25351
|
}) => {
|
|
25235
25352
|
const merged = {};
|
|
25353
|
+
const propsToDelete = new Set;
|
|
25236
25354
|
for (const key of Object.keys(currentValue)) {
|
|
25237
25355
|
const codeValueStatus = propStatus?.[key] ?? null;
|
|
25238
|
-
|
|
25356
|
+
const field = findFieldInSchema(schema, key);
|
|
25357
|
+
if (field?.type === "hidden") {
|
|
25358
|
+
continue;
|
|
25359
|
+
}
|
|
25360
|
+
const value = getEffectiveVisualModeValue({
|
|
25239
25361
|
codeValue: codeValueStatus,
|
|
25240
25362
|
runtimeValue: currentValue[key],
|
|
25241
25363
|
dragOverrideValue: overrideValues[key],
|
|
25242
|
-
defaultValue:
|
|
25364
|
+
defaultValue: field?.default,
|
|
25243
25365
|
shouldResortToDefaultValueIfUndefined: false
|
|
25244
25366
|
});
|
|
25367
|
+
if (value === undefined) {
|
|
25368
|
+
propsToDelete.add(key);
|
|
25369
|
+
}
|
|
25370
|
+
merged[key] = value;
|
|
25245
25371
|
}
|
|
25246
|
-
|
|
25372
|
+
for (const key of Object.keys(overrideValues)) {
|
|
25373
|
+
if (schema[key]?.type === "enum") {
|
|
25374
|
+
const propsToDeleteForKey = findPropsToDelete({
|
|
25375
|
+
schema,
|
|
25376
|
+
key,
|
|
25377
|
+
value: merged[key]
|
|
25378
|
+
});
|
|
25379
|
+
for (const propToDelete of propsToDeleteForKey) {
|
|
25380
|
+
propsToDelete.add(propToDelete);
|
|
25381
|
+
}
|
|
25382
|
+
}
|
|
25383
|
+
}
|
|
25384
|
+
return { merged, propsToDelete };
|
|
25247
25385
|
};
|
|
25248
25386
|
var getNestedValue = (obj, key) => {
|
|
25249
25387
|
const parts = key.split(".");
|
|
@@ -25268,7 +25406,8 @@ var selectActiveKeys = (schema, values) => {
|
|
|
25268
25406
|
var mergeValues = ({
|
|
25269
25407
|
props,
|
|
25270
25408
|
valuesDotNotation,
|
|
25271
|
-
schemaKeys
|
|
25409
|
+
schemaKeys,
|
|
25410
|
+
propsToDelete
|
|
25272
25411
|
}) => {
|
|
25273
25412
|
const merged = { ...props };
|
|
25274
25413
|
for (const key of schemaKeys) {
|
|
@@ -25290,31 +25429,45 @@ var mergeValues = ({
|
|
|
25290
25429
|
}
|
|
25291
25430
|
current[parts[parts.length - 1]] = value;
|
|
25292
25431
|
}
|
|
25432
|
+
deleteNestedKey(merged, propsToDelete);
|
|
25293
25433
|
return merged;
|
|
25294
25434
|
};
|
|
25435
|
+
var stackToOverrideMap = {};
|
|
25295
25436
|
var wrapInSchema = (Component, schema) => {
|
|
25296
|
-
if (typeof process === "undefined" || !process.env?.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
|
|
25297
|
-
return Component;
|
|
25298
|
-
}
|
|
25299
25437
|
const flatSchema = getFlatSchemaWithAllKeys(schema);
|
|
25300
25438
|
const flatKeys = Object.keys(flatSchema);
|
|
25301
25439
|
const Wrapped = forwardRef2((props, ref) => {
|
|
25302
25440
|
const env = useRemotionEnvironment();
|
|
25303
|
-
|
|
25304
|
-
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !visualModeEnabled) {
|
|
25441
|
+
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
25305
25442
|
return React13.createElement(Component, {
|
|
25306
25443
|
...props,
|
|
25307
25444
|
_experimentalControls: null,
|
|
25308
25445
|
ref
|
|
25309
25446
|
});
|
|
25310
25447
|
}
|
|
25448
|
+
const { getCodeValues } = useContext15(VisualModeCodeValuesContext);
|
|
25449
|
+
const { getDragOverrides } = useContext15(VisualModeDragOverridesContext);
|
|
25450
|
+
const nodePathMapping = useContext15(OverrideIdsToNodePathsGettersContext);
|
|
25311
25451
|
if (props._experimentalControls) {
|
|
25312
25452
|
return React13.createElement(Component, {
|
|
25313
25453
|
...props,
|
|
25314
25454
|
ref
|
|
25315
25455
|
});
|
|
25316
25456
|
}
|
|
25317
|
-
const [overrideId] = useState5(() =>
|
|
25457
|
+
const [overrideId] = useState5(() => {
|
|
25458
|
+
const { stack } = props;
|
|
25459
|
+
if (!stack) {
|
|
25460
|
+
return String(Math.random());
|
|
25461
|
+
}
|
|
25462
|
+
const existingOverrideId = stackToOverrideMap[stack];
|
|
25463
|
+
if (existingOverrideId) {
|
|
25464
|
+
return existingOverrideId;
|
|
25465
|
+
}
|
|
25466
|
+
const newOverrideId = String(Math.random());
|
|
25467
|
+
stackToOverrideMap[stack] = newOverrideId;
|
|
25468
|
+
return newOverrideId;
|
|
25469
|
+
});
|
|
25470
|
+
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
25318
25471
|
const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
|
|
25319
25472
|
const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
25320
25473
|
const controls = useMemo15(() => {
|
|
@@ -25324,19 +25477,25 @@ var wrapInSchema = (Component, schema) => {
|
|
|
25324
25477
|
overrideId
|
|
25325
25478
|
};
|
|
25326
25479
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
25327
|
-
const valuesDotNotation = useMemo15(() => {
|
|
25480
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo15(() => {
|
|
25328
25481
|
return computeEffectiveSchemaValuesDotNotation({
|
|
25329
25482
|
schema,
|
|
25330
25483
|
currentValue: currentRuntimeValueDotNotation,
|
|
25331
|
-
overrideValues:
|
|
25332
|
-
propStatus:
|
|
25484
|
+
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
25485
|
+
propStatus: nodePath === null ? undefined : getCodeValues(nodePath)
|
|
25333
25486
|
});
|
|
25334
|
-
}, [
|
|
25487
|
+
}, [
|
|
25488
|
+
currentRuntimeValueDotNotation,
|
|
25489
|
+
getDragOverrides,
|
|
25490
|
+
nodePath,
|
|
25491
|
+
getCodeValues
|
|
25492
|
+
]);
|
|
25335
25493
|
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
25336
25494
|
const mergedProps = mergeValues({
|
|
25337
25495
|
props,
|
|
25338
25496
|
valuesDotNotation,
|
|
25339
|
-
schemaKeys: activeKeys
|
|
25497
|
+
schemaKeys: activeKeys,
|
|
25498
|
+
propsToDelete
|
|
25340
25499
|
});
|
|
25341
25500
|
return React13.createElement(Component, {
|
|
25342
25501
|
...mergedProps,
|
|
@@ -25432,7 +25591,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25432
25591
|
}, [name]);
|
|
25433
25592
|
const env = useRemotionEnvironment();
|
|
25434
25593
|
const inheritedStack = other?.stack ?? null;
|
|
25435
|
-
const memoizedEffects = useMemoizedEffects(flattenEffects(_experimentalEffects ?? []));
|
|
25436
25594
|
useEffect5(() => {
|
|
25437
25595
|
if (!env.isStudio) {
|
|
25438
25596
|
return;
|
|
@@ -25441,7 +25599,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25441
25599
|
registerSequence({
|
|
25442
25600
|
type: isMedia.type,
|
|
25443
25601
|
controls: controls ?? null,
|
|
25444
|
-
effects:
|
|
25602
|
+
effects: _experimentalEffects ?? [],
|
|
25445
25603
|
displayName: timelineClipName,
|
|
25446
25604
|
doesVolumeChange: isMedia.data.doesVolumeChange,
|
|
25447
25605
|
duration: actualDurationInFrames,
|
|
@@ -25479,7 +25637,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25479
25637
|
premountDisplay: premountDisplay ?? null,
|
|
25480
25638
|
postmountDisplay: postmountDisplay ?? null,
|
|
25481
25639
|
controls: controls ?? null,
|
|
25482
|
-
effects:
|
|
25640
|
+
effects: _experimentalEffects ?? []
|
|
25483
25641
|
});
|
|
25484
25642
|
return () => {
|
|
25485
25643
|
unregisterSequence(id);
|
|
@@ -25504,7 +25662,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25504
25662
|
env.isStudio,
|
|
25505
25663
|
inheritedStack,
|
|
25506
25664
|
controls,
|
|
25507
|
-
|
|
25665
|
+
_experimentalEffects,
|
|
25508
25666
|
isMedia
|
|
25509
25667
|
]);
|
|
25510
25668
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
@@ -25995,7 +26153,7 @@ var defaultOnPaint = ({
|
|
|
25995
26153
|
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
25996
26154
|
element.style.transform = transform.toString();
|
|
25997
26155
|
};
|
|
25998
|
-
var HtmlInCanvasAncestorContext =
|
|
26156
|
+
var HtmlInCanvasAncestorContext = createContext16(false);
|
|
25999
26157
|
var HtmlInCanvasInner = forwardRef5(({
|
|
26000
26158
|
width,
|
|
26001
26159
|
height,
|
|
@@ -26029,8 +26187,9 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
26029
26187
|
}, [ref]);
|
|
26030
26188
|
const [offscreenCanvas] = useState8(() => new OffscreenCanvas(1, 1));
|
|
26031
26189
|
const chainState = useEffectChainState();
|
|
26032
|
-
const
|
|
26033
|
-
effectsRef
|
|
26190
|
+
const memoizedEffects = useMemoizedEffects(flattenEffects(effects));
|
|
26191
|
+
const effectsRef = useRef9(memoizedEffects);
|
|
26192
|
+
effectsRef.current = memoizedEffects;
|
|
26034
26193
|
const frameRef = useRef9(frame);
|
|
26035
26194
|
frameRef.current = frame;
|
|
26036
26195
|
const onPaintRef = useRef9(onPaint);
|
|
@@ -26130,7 +26289,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
26130
26289
|
return;
|
|
26131
26290
|
}
|
|
26132
26291
|
canvas.requestPaint?.();
|
|
26133
|
-
}, [onPaint]);
|
|
26292
|
+
}, [onPaint, memoizedEffects]);
|
|
26134
26293
|
useLayoutEffect3(() => {
|
|
26135
26294
|
const canvas = canvas2dRef.current;
|
|
26136
26295
|
if (!canvas) {
|
|
@@ -26157,7 +26316,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
26157
26316
|
durationInFrames: resolvedDuration,
|
|
26158
26317
|
name: "<HtmlInCanvas>",
|
|
26159
26318
|
_experimentalControls: controls,
|
|
26160
|
-
_experimentalEffects:
|
|
26319
|
+
_experimentalEffects: memoizedEffects,
|
|
26161
26320
|
layout: "none",
|
|
26162
26321
|
...sequenceProps,
|
|
26163
26322
|
children: /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
|
|
@@ -26212,7 +26371,7 @@ var validateRenderAsset = (artifact) => {
|
|
|
26212
26371
|
}
|
|
26213
26372
|
validateContent(artifact.content);
|
|
26214
26373
|
};
|
|
26215
|
-
var RenderAssetManager =
|
|
26374
|
+
var RenderAssetManager = createContext17({
|
|
26216
26375
|
registerRenderAsset: () => {
|
|
26217
26376
|
return;
|
|
26218
26377
|
},
|
|
@@ -26350,7 +26509,7 @@ var calculateMediaDuration = ({
|
|
|
26350
26509
|
const actualDuration = duration / playbackRate;
|
|
26351
26510
|
return Math.floor(actualDuration);
|
|
26352
26511
|
};
|
|
26353
|
-
var LoopContext =
|
|
26512
|
+
var LoopContext = createContext18(null);
|
|
26354
26513
|
var useLoop = () => {
|
|
26355
26514
|
return React17.useContext(LoopContext);
|
|
26356
26515
|
};
|
|
@@ -26421,7 +26580,7 @@ var playbackLogging = ({
|
|
|
26421
26580
|
const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
|
|
26422
26581
|
Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
|
|
26423
26582
|
};
|
|
26424
|
-
var PreloadContext =
|
|
26583
|
+
var PreloadContext = createContext19({});
|
|
26425
26584
|
var preloads = {};
|
|
26426
26585
|
var updaters = [];
|
|
26427
26586
|
var setPreloads = (updater) => {
|
|
@@ -26742,7 +26901,7 @@ var durationReducer = (state, action) => {
|
|
|
26742
26901
|
return state;
|
|
26743
26902
|
}
|
|
26744
26903
|
};
|
|
26745
|
-
var DurationsContext =
|
|
26904
|
+
var DurationsContext = createContext20({
|
|
26746
26905
|
durations: {},
|
|
26747
26906
|
setDurations: () => {
|
|
26748
26907
|
throw new Error("context missing");
|
|
@@ -26956,8 +27115,8 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
26956
27115
|
}
|
|
26957
27116
|
return true;
|
|
26958
27117
|
};
|
|
26959
|
-
var SharedAudioContext =
|
|
26960
|
-
var SharedAudioTagsContext =
|
|
27118
|
+
var SharedAudioContext = createContext21(null);
|
|
27119
|
+
var SharedAudioTagsContext = createContext21(null);
|
|
26961
27120
|
var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
|
|
26962
27121
|
const logLevel = useLogLevel();
|
|
26963
27122
|
const ctxAndGain = useSingletonAudioContext({
|
|
@@ -27002,8 +27161,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27002
27161
|
if (!ctxAndGain) {
|
|
27003
27162
|
throw new Error("Audio context not found");
|
|
27004
27163
|
}
|
|
27164
|
+
const saveForLater = ctxAndGain.audioContext.state === "suspended" && !isResuming.current;
|
|
27005
27165
|
if (duration > 0) {
|
|
27006
|
-
if (
|
|
27166
|
+
if (saveForLater) {
|
|
27007
27167
|
nodesToResume.current.set(node, {
|
|
27008
27168
|
scheduledTime,
|
|
27009
27169
|
offset,
|
|
@@ -27021,7 +27181,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27021
27181
|
const prev = prevEndTimes.current;
|
|
27022
27182
|
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
27023
27183
|
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
27024
|
-
Log.verbose({ 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=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "");
|
|
27184
|
+
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %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), "actualcurrent=" + ctxAndGain.audioContext.currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "", "action=" + (saveForLater ? "schedule" : "start"), "");
|
|
27025
27185
|
prev.scheduledEndTime = scheduledEndTime;
|
|
27026
27186
|
prev.mediaEndTime = mediaEndTime;
|
|
27027
27187
|
return duration > 0 ? {
|
|
@@ -27041,6 +27201,13 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27041
27201
|
return Promise.resolve();
|
|
27042
27202
|
}
|
|
27043
27203
|
audioContextIsPlayingEventually.current = true;
|
|
27204
|
+
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
27205
|
+
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
27206
|
+
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
27207
|
+
nodesToResume.current.forEach((r2, node) => {
|
|
27208
|
+
node.start(r2.scheduledTime, r2.offset, r2.duration);
|
|
27209
|
+
});
|
|
27210
|
+
nodesToResume.current.clear();
|
|
27044
27211
|
const resumePromise = ctxAndGain.audioContext.resume();
|
|
27045
27212
|
isResuming.current = new Promise((resolve) => {
|
|
27046
27213
|
waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
|
|
@@ -27051,11 +27218,6 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27051
27218
|
}).finally(() => {
|
|
27052
27219
|
isResuming.current = null;
|
|
27053
27220
|
});
|
|
27054
|
-
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
27055
|
-
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
27056
|
-
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
27057
|
-
nodesToResume.current.forEach((r2, node) => node.start(r2.scheduledTime, r2.offset, r2.duration));
|
|
27058
|
-
nodesToResume.current.clear();
|
|
27059
27221
|
return resumePromise.catch(() => {});
|
|
27060
27222
|
}, [ctxAndGain, logLevel]);
|
|
27061
27223
|
const getIsResumingAudioContext = useCallback9(() => {
|
|
@@ -27857,9 +28019,14 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
27857
28019
|
}
|
|
27858
28020
|
};
|
|
27859
28021
|
}
|
|
28022
|
+
let unblocked = false;
|
|
27860
28023
|
setBlocks((b) => [...b, block]);
|
|
27861
28024
|
return {
|
|
27862
28025
|
unblock: () => {
|
|
28026
|
+
if (unblocked) {
|
|
28027
|
+
return;
|
|
28028
|
+
}
|
|
28029
|
+
unblocked = true;
|
|
27863
28030
|
setBlocks((b) => {
|
|
27864
28031
|
const newArr = b.filter((bx) => bx !== block);
|
|
27865
28032
|
if (newArr.length === b.length) {
|
|
@@ -27953,18 +28120,30 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
27953
28120
|
};
|
|
27954
28121
|
var useBufferState = () => {
|
|
27955
28122
|
const buffer = useContext25(BufferingContextReact);
|
|
28123
|
+
const logLevel = useLogLevel();
|
|
27956
28124
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
27957
28125
|
return useMemo25(() => ({
|
|
27958
28126
|
delayPlayback: () => {
|
|
27959
28127
|
if (!addBlock) {
|
|
27960
28128
|
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");
|
|
27961
28129
|
}
|
|
28130
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Adding buffer handle", new Error().stack);
|
|
27962
28131
|
const { unblock } = addBlock({
|
|
27963
28132
|
id: String(Math.random())
|
|
27964
28133
|
});
|
|
27965
|
-
|
|
28134
|
+
let unblocked = false;
|
|
28135
|
+
return {
|
|
28136
|
+
unblock: () => {
|
|
28137
|
+
if (unblocked) {
|
|
28138
|
+
return;
|
|
28139
|
+
}
|
|
28140
|
+
unblocked = true;
|
|
28141
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Removing buffer handle");
|
|
28142
|
+
unblock();
|
|
28143
|
+
}
|
|
28144
|
+
};
|
|
27966
28145
|
}
|
|
27967
|
-
}), [addBlock]);
|
|
28146
|
+
}), [addBlock, logLevel]);
|
|
27968
28147
|
};
|
|
27969
28148
|
var isSafariWebkit = () => {
|
|
27970
28149
|
const isSafari2 = /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);
|
|
@@ -28732,11 +28911,11 @@ var useMediaTag = ({
|
|
|
28732
28911
|
env.isPlayer
|
|
28733
28912
|
]);
|
|
28734
28913
|
};
|
|
28735
|
-
var MediaVolumeContext =
|
|
28914
|
+
var MediaVolumeContext = createContext22({
|
|
28736
28915
|
mediaMuted: false,
|
|
28737
28916
|
mediaVolume: 1
|
|
28738
28917
|
});
|
|
28739
|
-
var SetMediaVolumeContext =
|
|
28918
|
+
var SetMediaVolumeContext = createContext22({
|
|
28740
28919
|
setMediaMuted: () => {
|
|
28741
28920
|
throw new Error("default");
|
|
28742
28921
|
},
|
|
@@ -29542,10 +29721,13 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
|
|
|
29542
29721
|
};
|
|
29543
29722
|
var defineEffect = (definition) => definition;
|
|
29544
29723
|
var createDescriptor = (definition, params) => {
|
|
29724
|
+
const widened = definition;
|
|
29545
29725
|
return {
|
|
29546
|
-
definition,
|
|
29726
|
+
definition: widened,
|
|
29547
29727
|
params,
|
|
29548
|
-
stack: new Error().stack
|
|
29728
|
+
stack: new Error().stack,
|
|
29729
|
+
effectKey: widened.calculateKey(params),
|
|
29730
|
+
memoized: false
|
|
29549
29731
|
};
|
|
29550
29732
|
};
|
|
29551
29733
|
var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
@@ -29570,7 +29752,7 @@ var waitForRoot = (fn) => {
|
|
|
29570
29752
|
listeners = listeners.filter((l) => l !== fn);
|
|
29571
29753
|
};
|
|
29572
29754
|
};
|
|
29573
|
-
var MediaEnabledContext =
|
|
29755
|
+
var MediaEnabledContext = createContext23(null);
|
|
29574
29756
|
var useVideoEnabled = () => {
|
|
29575
29757
|
const context = useContext32(MediaEnabledContext);
|
|
29576
29758
|
if (!context) {
|
|
@@ -29609,8 +29791,7 @@ var RemotionRootContexts = ({
|
|
|
29609
29791
|
audioLatencyHint,
|
|
29610
29792
|
videoEnabled,
|
|
29611
29793
|
audioEnabled,
|
|
29612
|
-
frameState
|
|
29613
|
-
visualModeEnabled
|
|
29794
|
+
frameState
|
|
29614
29795
|
}) => {
|
|
29615
29796
|
const nonceContext = useMemo322(() => {
|
|
29616
29797
|
let counter = 0;
|
|
@@ -29633,7 +29814,6 @@ var RemotionRootContexts = ({
|
|
|
29633
29814
|
children: /* @__PURE__ */ jsx29(EditorPropsProvider, {
|
|
29634
29815
|
children: /* @__PURE__ */ jsx29(PrefetchProvider, {
|
|
29635
29816
|
children: /* @__PURE__ */ jsx29(SequenceManagerProvider, {
|
|
29636
|
-
visualModeEnabled,
|
|
29637
29817
|
children: /* @__PURE__ */ jsx29(DurationsContextProvider, {
|
|
29638
29818
|
children: /* @__PURE__ */ jsx29(BufferingProvider, {
|
|
29639
29819
|
children: /* @__PURE__ */ jsx29(SharedAudioContextProvider, {
|
|
@@ -29852,7 +30032,7 @@ var setupEnvVariables = () => {
|
|
|
29852
30032
|
});
|
|
29853
30033
|
};
|
|
29854
30034
|
var CurrentScaleContext = React32.createContext(null);
|
|
29855
|
-
var PreviewSizeContext =
|
|
30035
|
+
var PreviewSizeContext = createContext24({
|
|
29856
30036
|
setSize: () => {
|
|
29857
30037
|
return;
|
|
29858
30038
|
},
|
|
@@ -29875,14 +30055,6 @@ var calculateScale = ({
|
|
|
29875
30055
|
}
|
|
29876
30056
|
return Number(previewSize);
|
|
29877
30057
|
};
|
|
29878
|
-
var useSequenceControlOverride = (key) => {
|
|
29879
|
-
const seqContext = useContext33(SequenceContext);
|
|
29880
|
-
const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
|
|
29881
|
-
if (!seqContext) {
|
|
29882
|
-
return;
|
|
29883
|
-
}
|
|
29884
|
-
return overrides[seqContext.id]?.[key];
|
|
29885
|
-
};
|
|
29886
30058
|
var getOffthreadVideoSource = ({
|
|
29887
30059
|
src,
|
|
29888
30060
|
transparent,
|
|
@@ -29914,9 +30086,9 @@ var OffthreadVideoForRendering = ({
|
|
|
29914
30086
|
const frame = useCurrentFrame();
|
|
29915
30087
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
29916
30088
|
const videoConfig = useUnsafeVideoConfig();
|
|
29917
|
-
const sequenceContext =
|
|
30089
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
29918
30090
|
const mediaStartsAt = useMediaStartsAt();
|
|
29919
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
30091
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
|
|
29920
30092
|
if (!src) {
|
|
29921
30093
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
29922
30094
|
}
|
|
@@ -30128,7 +30300,7 @@ class MediaPlaybackError extends Error {
|
|
|
30128
30300
|
}
|
|
30129
30301
|
}
|
|
30130
30302
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
30131
|
-
const context =
|
|
30303
|
+
const context = useContext34(SharedAudioContext);
|
|
30132
30304
|
if (!context) {
|
|
30133
30305
|
throw new Error("SharedAudioContext not found");
|
|
30134
30306
|
}
|
|
@@ -30184,8 +30356,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30184
30356
|
}
|
|
30185
30357
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
30186
30358
|
const { fps, durationInFrames } = useVideoConfig();
|
|
30187
|
-
const parentSequence =
|
|
30188
|
-
const { hidden } =
|
|
30359
|
+
const parentSequence = useContext34(SequenceContext);
|
|
30360
|
+
const { hidden } = useContext34(SequenceVisibilityToggleContext);
|
|
30189
30361
|
const logLevel = useLogLevel();
|
|
30190
30362
|
const mountTime = useMountTime();
|
|
30191
30363
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -30609,7 +30781,9 @@ var Internals = {
|
|
|
30609
30781
|
VideoForPreview,
|
|
30610
30782
|
CompositionManager,
|
|
30611
30783
|
CompositionSetters,
|
|
30612
|
-
|
|
30784
|
+
VisualModeCodeValuesContext,
|
|
30785
|
+
VisualModeDragOverridesContext,
|
|
30786
|
+
VisualModeSettersContext,
|
|
30613
30787
|
SequenceManager,
|
|
30614
30788
|
SequenceStackTracesUpdateContext,
|
|
30615
30789
|
SequenceVisibilityToggleContext,
|
|
@@ -30618,7 +30792,6 @@ var Internals = {
|
|
|
30618
30792
|
sequenceStyleSchema,
|
|
30619
30793
|
flattenActiveSchema,
|
|
30620
30794
|
getFlatSchemaWithAllKeys,
|
|
30621
|
-
useSequenceControlOverride,
|
|
30622
30795
|
RemotionRootContexts,
|
|
30623
30796
|
CompositionManagerProvider,
|
|
30624
30797
|
useVideo,
|
|
@@ -30711,7 +30884,11 @@ var Internals = {
|
|
|
30711
30884
|
useMemoizedEffects,
|
|
30712
30885
|
defineEffect,
|
|
30713
30886
|
createDescriptor,
|
|
30714
|
-
computeEffectiveSchemaValuesDotNotation
|
|
30887
|
+
computeEffectiveSchemaValuesDotNotation,
|
|
30888
|
+
OverrideIdsToNodePathsGettersContext,
|
|
30889
|
+
OverrideIdsToNodePathsSettersContext,
|
|
30890
|
+
findPropsToDelete,
|
|
30891
|
+
flattenEffects
|
|
30715
30892
|
};
|
|
30716
30893
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
30717
30894
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -30749,7 +30926,7 @@ var flattenChildren = (children) => {
|
|
|
30749
30926
|
return flatChildren;
|
|
30750
30927
|
}, []);
|
|
30751
30928
|
};
|
|
30752
|
-
var IsInsideSeriesContext =
|
|
30929
|
+
var IsInsideSeriesContext = createContext25(false);
|
|
30753
30930
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
30754
30931
|
return /* @__PURE__ */ jsx34(IsInsideSeriesContext.Provider, {
|
|
30755
30932
|
value: true,
|
|
@@ -30791,9 +30968,6 @@ var SeriesInner = (props2) => {
|
|
|
30791
30968
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
|
|
30792
30969
|
}
|
|
30793
30970
|
const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
|
|
30794
|
-
if (!castedChild?.props.children) {
|
|
30795
|
-
throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);
|
|
30796
|
-
}
|
|
30797
30971
|
const durationInFramesProp = castedChild.props.durationInFrames;
|
|
30798
30972
|
const {
|
|
30799
30973
|
durationInFrames,
|
|
@@ -31309,13 +31483,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
31309
31483
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
31310
31484
|
const videoConfig = useUnsafeVideoConfig();
|
|
31311
31485
|
const videoRef = useRef23(null);
|
|
31312
|
-
const sequenceContext =
|
|
31486
|
+
const sequenceContext = useContext35(SequenceContext);
|
|
31313
31487
|
const mediaStartsAt = useMediaStartsAt();
|
|
31314
31488
|
const environment = useRemotionEnvironment();
|
|
31315
31489
|
const logLevel = useLogLevel();
|
|
31316
31490
|
const mountTime = useMountTime();
|
|
31317
31491
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
31318
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
31492
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
|
|
31319
31493
|
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
31320
31494
|
props2.src,
|
|
31321
31495
|
sequenceContext?.cumulatedFrom,
|
|
@@ -31525,7 +31699,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
31525
31699
|
if (environment.isClientSideRendering) {
|
|
31526
31700
|
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");
|
|
31527
31701
|
}
|
|
31528
|
-
const { durations, setDurations } =
|
|
31702
|
+
const { durations, setDurations } = useContext36(DurationsContext);
|
|
31529
31703
|
if (typeof ref === "string") {
|
|
31530
31704
|
throw new Error("string refs are not supported");
|
|
31531
31705
|
}
|
|
@@ -39220,7 +39394,7 @@ class AudioGainRadioGroup extends Component {
|
|
|
39220
39394
|
onSetup() {
|
|
39221
39395
|
this.#media = useMediaContext();
|
|
39222
39396
|
if (hasProvidedContext(menuContext)) {
|
|
39223
|
-
this.#menu =
|
|
39397
|
+
this.#menu = useContext44(menuContext);
|
|
39224
39398
|
}
|
|
39225
39399
|
}
|
|
39226
39400
|
onConnect(el) {
|
|
@@ -40610,7 +40784,7 @@ var DefaultKeyboardDisplay = React61.forwardRef(({ icons: Icons, ...props }, for
|
|
|
40610
40784
|
});
|
|
40611
40785
|
DefaultKeyboardDisplay.displayName = "DefaultKeyboardDisplay";
|
|
40612
40786
|
function getText() {
|
|
40613
|
-
const { $state } =
|
|
40787
|
+
const { $state } = useContext44(mediaContext), action = $state.lastKeyboardAction()?.action, audioGain = $state.audioGain() ?? 1;
|
|
40614
40788
|
switch (action) {
|
|
40615
40789
|
case "toggleMuted":
|
|
40616
40790
|
return $state.muted() ? "0%" : getVolumeText($state.volume(), audioGain);
|
|
@@ -40625,7 +40799,7 @@ function getVolumeText(volume, gain) {
|
|
|
40625
40799
|
return `${Math.round(volume * gain * 100)}%`;
|
|
40626
40800
|
}
|
|
40627
40801
|
function getIcon(Icons) {
|
|
40628
|
-
const { $state } =
|
|
40802
|
+
const { $state } = useContext44(mediaContext), action = $state.lastKeyboardAction()?.action;
|
|
40629
40803
|
switch (action) {
|
|
40630
40804
|
case "togglePaused":
|
|
40631
40805
|
return !$state.paused() ? Icons.Play : Icons.Pause;
|