@remotion/promo-pages 4.0.474 → 4.0.475
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 +1528 -1118
- package/dist/design.js +507 -271
- package/dist/experts.js +421 -185
- package/dist/homepage/Pricing.js +493 -257
- package/dist/prompts/PromptsGallery.js +497 -261
- package/dist/prompts/PromptsShow.js +615 -379
- package/dist/prompts/PromptsSubmit.js +618 -382
- package/dist/team.js +543 -307
- package/dist/template-modal-content.js +506 -270
- package/dist/templates.js +491 -254
- package/package.json +13 -13
|
@@ -717,7 +717,7 @@ function composeRefs3(...refs) {
|
|
|
717
717
|
return (node) => refs.forEach((ref) => setRef3(ref, node));
|
|
718
718
|
}
|
|
719
719
|
function createClientComponent(Component2, options2) {
|
|
720
|
-
const forwardComponent = React56.forwardRef((props,
|
|
720
|
+
const forwardComponent = React56.forwardRef((props, forwardRef18) => {
|
|
721
721
|
let parentScopeRef = React56.useContext(ReactScopeContext), scopeRef = React56.useRef(null), stateRef = React56.useRef();
|
|
722
722
|
if (!stateRef.current) {
|
|
723
723
|
const state2 = createInternalState(), component = initComponent(Component2, state2, props, parentScopeRef.current);
|
|
@@ -740,7 +740,7 @@ function createClientComponent(Component2, options2) {
|
|
|
740
740
|
attachToHost(state2, state2.el);
|
|
741
741
|
}
|
|
742
742
|
if (!state2.forwardRef) {
|
|
743
|
-
setRef3(
|
|
743
|
+
setRef3(forwardRef18, state2.component);
|
|
744
744
|
state2.forwardRef = true;
|
|
745
745
|
}
|
|
746
746
|
return () => detachFromHost(state2);
|
|
@@ -1061,7 +1061,7 @@ function createServerComponent(Component2, options2) {
|
|
|
1061
1061
|
let scope = React56.useContext(ReactScopeContext), component = createComponent(Component2, {
|
|
1062
1062
|
props,
|
|
1063
1063
|
scope: scope.current
|
|
1064
|
-
}), host = new MaverickServerElement(component), attrs = {}, { style = {}, children, forwardRef:
|
|
1064
|
+
}), host = new MaverickServerElement(component), attrs = {}, { style = {}, children, forwardRef: forwardRef18, ...renderProps } = props;
|
|
1065
1065
|
if (options2.props.size) {
|
|
1066
1066
|
for (const prop2 of Object.keys(renderProps)) {
|
|
1067
1067
|
if (!options2.props.has(prop2))
|
|
@@ -17369,8 +17369,8 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
17369
17369
|
// ../design/dist/esm/index.mjs
|
|
17370
17370
|
import * as React23 from "react";
|
|
17371
17371
|
import * as React3 from "react";
|
|
17372
|
-
import { Fragment as Fragment2, jsx as
|
|
17373
|
-
import React52, { useCallback as
|
|
17372
|
+
import { Fragment as Fragment2, jsx as jsx43 } from "react/jsx-runtime";
|
|
17373
|
+
import React52, { useCallback as useCallback26, useRef as useRef210, useState as useState22 } from "react";
|
|
17374
17374
|
|
|
17375
17375
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
17376
17376
|
function r(e) {
|
|
@@ -18712,7 +18712,7 @@ var getDefaultConfig = () => {
|
|
|
18712
18712
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
18713
18713
|
|
|
18714
18714
|
// ../design/dist/esm/index.mjs
|
|
18715
|
-
import
|
|
18715
|
+
import React32, { useEffect as useEffect22, useMemo as useMemo42, useState as useState21 } from "react";
|
|
18716
18716
|
|
|
18717
18717
|
// ../paths/dist/esm/index.mjs
|
|
18718
18718
|
var cutLInstruction = ({
|
|
@@ -21665,69 +21665,71 @@ import { forwardRef as forwardRef11, useCallback as useCallback17, useState as u
|
|
|
21665
21665
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
21666
21666
|
import { useCallback as useCallback18, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
|
|
21667
21667
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
21668
|
+
import React29, { forwardRef as forwardRef12, useCallback as useCallback19, useRef as useRef25 } from "react";
|
|
21669
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
21668
21670
|
import { createRef as createRef3 } from "react";
|
|
21669
|
-
import
|
|
21671
|
+
import React30 from "react";
|
|
21670
21672
|
import {
|
|
21671
|
-
useCallback as
|
|
21673
|
+
useCallback as useCallback20,
|
|
21672
21674
|
useImperativeHandle as useImperativeHandle8,
|
|
21673
21675
|
useMemo as useMemo32,
|
|
21674
|
-
useRef as
|
|
21676
|
+
useRef as useRef26,
|
|
21675
21677
|
useState as useState18
|
|
21676
21678
|
} from "react";
|
|
21677
|
-
import { jsx as
|
|
21678
|
-
import
|
|
21679
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
21680
|
+
import React31 from "react";
|
|
21679
21681
|
import { useMemo as useMemo34 } from "react";
|
|
21680
21682
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
21681
|
-
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
21682
21683
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
21683
|
-
import
|
|
21684
|
-
import React33
|
|
21685
|
-
import React34, {
|
|
21686
|
-
import {
|
|
21684
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
21685
|
+
import React33 from "react";
|
|
21686
|
+
import React34, { createContext as createContext25 } from "react";
|
|
21687
|
+
import React35, { useContext as useContext35 } from "react";
|
|
21688
|
+
import { useCallback as useCallback23 } from "react";
|
|
21687
21689
|
import {
|
|
21688
|
-
useCallback as
|
|
21690
|
+
useCallback as useCallback21,
|
|
21689
21691
|
useContext as useContext36,
|
|
21690
21692
|
useEffect as useEffect18,
|
|
21691
21693
|
useLayoutEffect as useLayoutEffect11,
|
|
21692
21694
|
useMemo as useMemo35,
|
|
21693
21695
|
useState as useState19
|
|
21694
21696
|
} from "react";
|
|
21695
|
-
import { jsx as
|
|
21696
|
-
import
|
|
21697
|
-
forwardRef as
|
|
21698
|
-
useCallback as
|
|
21697
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
21698
|
+
import React37, {
|
|
21699
|
+
forwardRef as forwardRef13,
|
|
21700
|
+
useCallback as useCallback22,
|
|
21699
21701
|
useContext as useContext37,
|
|
21700
21702
|
useEffect as useEffect20,
|
|
21701
21703
|
useImperativeHandle as useImperativeHandle9,
|
|
21702
21704
|
useMemo as useMemo36,
|
|
21703
|
-
useRef as
|
|
21705
|
+
useRef as useRef27,
|
|
21704
21706
|
useState as useState20
|
|
21705
21707
|
} from "react";
|
|
21706
21708
|
import { useEffect as useEffect19 } from "react";
|
|
21707
|
-
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
21708
21709
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
21709
|
-
import React38, { useMemo as useMemo37 } from "react";
|
|
21710
21710
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
21711
|
+
import React39, { useMemo as useMemo37 } from "react";
|
|
21712
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
21711
21713
|
import {
|
|
21712
21714
|
Children,
|
|
21713
|
-
forwardRef as
|
|
21715
|
+
forwardRef as forwardRef14,
|
|
21714
21716
|
useMemo as useMemo38
|
|
21715
21717
|
} from "react";
|
|
21716
|
-
import
|
|
21717
|
-
import { jsx as
|
|
21718
|
-
import
|
|
21719
|
-
import { forwardRef as
|
|
21718
|
+
import React40 from "react";
|
|
21719
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
21720
|
+
import React42 from "react";
|
|
21721
|
+
import { forwardRef as forwardRef16, useCallback as useCallback24, useContext as useContext39 } from "react";
|
|
21720
21722
|
import {
|
|
21721
|
-
forwardRef as
|
|
21723
|
+
forwardRef as forwardRef15,
|
|
21722
21724
|
useContext as useContext38,
|
|
21723
21725
|
useEffect as useEffect21,
|
|
21724
21726
|
useImperativeHandle as useImperativeHandle10,
|
|
21725
21727
|
useLayoutEffect as useLayoutEffect12,
|
|
21726
21728
|
useMemo as useMemo39,
|
|
21727
|
-
useRef as
|
|
21729
|
+
useRef as useRef28
|
|
21728
21730
|
} from "react";
|
|
21729
|
-
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
21730
21731
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
21732
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
21731
21733
|
var __defProp2 = Object.defineProperty;
|
|
21732
21734
|
var __export2 = (target, all) => {
|
|
21733
21735
|
for (var name in all)
|
|
@@ -22896,7 +22898,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
22896
22898
|
var addSequenceStackTraces = (component) => {
|
|
22897
22899
|
componentsToAddStacksTo.push(component);
|
|
22898
22900
|
};
|
|
22899
|
-
var VERSION = "4.0.
|
|
22901
|
+
var VERSION = "4.0.475";
|
|
22900
22902
|
var checkMultipleRemotionVersions = () => {
|
|
22901
22903
|
if (typeof globalThis === "undefined") {
|
|
22902
22904
|
return;
|
|
@@ -23263,6 +23265,12 @@ var PremountContext = createContext14({
|
|
|
23263
23265
|
premountFramesRemaining: 0
|
|
23264
23266
|
});
|
|
23265
23267
|
var sequenceVisualStyleSchema = {
|
|
23268
|
+
"style.transformOrigin": {
|
|
23269
|
+
type: "transform-origin",
|
|
23270
|
+
step: 1,
|
|
23271
|
+
default: "50% 50%",
|
|
23272
|
+
description: "Transform origin"
|
|
23273
|
+
},
|
|
23266
23274
|
"style.translate": {
|
|
23267
23275
|
type: "translate",
|
|
23268
23276
|
step: 1,
|
|
@@ -23815,6 +23823,32 @@ var lengthUnits = new Set([
|
|
|
23815
23823
|
"vw"
|
|
23816
23824
|
]);
|
|
23817
23825
|
var cssNumberRegex = /^([+-]?(?:\d+\.?\d*|\.\d+))([a-zA-Z%]+)?$/;
|
|
23826
|
+
var transformOriginKeywords = new Set([
|
|
23827
|
+
"left",
|
|
23828
|
+
"center",
|
|
23829
|
+
"right",
|
|
23830
|
+
"top",
|
|
23831
|
+
"bottom"
|
|
23832
|
+
]);
|
|
23833
|
+
var transformOriginKeywordOptions = (keyword) => {
|
|
23834
|
+
if (keyword === "left") {
|
|
23835
|
+
return [{ axis: "x", value: { value: 0, unit: "%" } }];
|
|
23836
|
+
}
|
|
23837
|
+
if (keyword === "right") {
|
|
23838
|
+
return [{ axis: "x", value: { value: 100, unit: "%" } }];
|
|
23839
|
+
}
|
|
23840
|
+
if (keyword === "top") {
|
|
23841
|
+
return [{ axis: "y", value: { value: 0, unit: "%" } }];
|
|
23842
|
+
}
|
|
23843
|
+
if (keyword === "bottom") {
|
|
23844
|
+
return [{ axis: "y", value: { value: 100, unit: "%" } }];
|
|
23845
|
+
}
|
|
23846
|
+
return [
|
|
23847
|
+
{ axis: "x", value: { value: 50, unit: "%" } },
|
|
23848
|
+
{ axis: "y", value: { value: 50, unit: "%" } }
|
|
23849
|
+
];
|
|
23850
|
+
};
|
|
23851
|
+
var transformOriginCenter = { value: 50, unit: "%" };
|
|
23818
23852
|
var stringifyNumber = (value) => {
|
|
23819
23853
|
return String(normalizeNumber(value));
|
|
23820
23854
|
};
|
|
@@ -23839,6 +23873,110 @@ var parseStringInterpolationComponent = (component, value) => {
|
|
|
23839
23873
|
}
|
|
23840
23874
|
throw new TypeError(`Cannot interpolate "${value}" because "${unit}" is not a supported translate or rotate unit`);
|
|
23841
23875
|
};
|
|
23876
|
+
var parseTransformOriginLengthPercentage = ({
|
|
23877
|
+
component,
|
|
23878
|
+
value,
|
|
23879
|
+
allowPercentage
|
|
23880
|
+
}) => {
|
|
23881
|
+
const match = cssNumberRegex.exec(component);
|
|
23882
|
+
if (match === null) {
|
|
23883
|
+
throw new TypeError(`Cannot interpolate "${value}" because "${component}" is not a supported transform-origin ${allowPercentage ? "length-percentage" : "z length"}`);
|
|
23884
|
+
}
|
|
23885
|
+
const unit = match[2] ?? null;
|
|
23886
|
+
const numberValue = Number(match[1]);
|
|
23887
|
+
if (!Number.isFinite(numberValue)) {
|
|
23888
|
+
throw new TypeError(`Cannot interpolate "${value}" because "${component}" is not finite`);
|
|
23889
|
+
}
|
|
23890
|
+
if (unit === null || !lengthUnits.has(unit) || !allowPercentage && unit === "%") {
|
|
23891
|
+
throw new TypeError(`Cannot interpolate "${value}" because "${component}" is not a supported transform-origin ${allowPercentage ? "length-percentage" : "z length"}`);
|
|
23892
|
+
}
|
|
23893
|
+
return { value: numberValue, unit };
|
|
23894
|
+
};
|
|
23895
|
+
var parseTransformOriginToken = (component, value) => {
|
|
23896
|
+
const lower = component.toLowerCase();
|
|
23897
|
+
if (transformOriginKeywords.has(lower)) {
|
|
23898
|
+
return { type: "keyword", keyword: lower };
|
|
23899
|
+
}
|
|
23900
|
+
return {
|
|
23901
|
+
type: "length-percentage",
|
|
23902
|
+
parsed: parseTransformOriginLengthPercentage({
|
|
23903
|
+
component,
|
|
23904
|
+
value,
|
|
23905
|
+
allowPercentage: true
|
|
23906
|
+
})
|
|
23907
|
+
};
|
|
23908
|
+
};
|
|
23909
|
+
var parseTwoTransformOriginKeywords = (first, second, value) => {
|
|
23910
|
+
const candidates = [];
|
|
23911
|
+
for (const firstOption of transformOriginKeywordOptions(first)) {
|
|
23912
|
+
for (const secondOption of transformOriginKeywordOptions(second)) {
|
|
23913
|
+
if (firstOption.axis === secondOption.axis) {
|
|
23914
|
+
continue;
|
|
23915
|
+
}
|
|
23916
|
+
candidates.push(firstOption.axis === "x" ? [firstOption.value, secondOption.value] : [secondOption.value, firstOption.value]);
|
|
23917
|
+
}
|
|
23918
|
+
}
|
|
23919
|
+
if (candidates.length === 0) {
|
|
23920
|
+
throw new TypeError(`Cannot interpolate "${value}" because "${first} ${second}" is not a valid transform-origin keyword pair`);
|
|
23921
|
+
}
|
|
23922
|
+
return candidates[0];
|
|
23923
|
+
};
|
|
23924
|
+
var parseTransformOriginXY = (parts, value) => {
|
|
23925
|
+
if (parts.length === 1) {
|
|
23926
|
+
const token = parseTransformOriginToken(parts[0], value);
|
|
23927
|
+
if (token.type === "length-percentage") {
|
|
23928
|
+
return [token.parsed, transformOriginCenter];
|
|
23929
|
+
}
|
|
23930
|
+
if (token.keyword === "top" || token.keyword === "bottom") {
|
|
23931
|
+
return [
|
|
23932
|
+
transformOriginCenter,
|
|
23933
|
+
transformOriginKeywordOptions(token.keyword)[0].value
|
|
23934
|
+
];
|
|
23935
|
+
}
|
|
23936
|
+
return [
|
|
23937
|
+
transformOriginKeywordOptions(token.keyword)[0].value,
|
|
23938
|
+
transformOriginCenter
|
|
23939
|
+
];
|
|
23940
|
+
}
|
|
23941
|
+
const first = parseTransformOriginToken(parts[0], value);
|
|
23942
|
+
const second = parseTransformOriginToken(parts[1], value);
|
|
23943
|
+
if (first.type === "length-percentage" && second.type === "length-percentage") {
|
|
23944
|
+
return [first.parsed, second.parsed];
|
|
23945
|
+
}
|
|
23946
|
+
if (first.type === "keyword" && second.type === "keyword") {
|
|
23947
|
+
return parseTwoTransformOriginKeywords(first.keyword, second.keyword, value);
|
|
23948
|
+
}
|
|
23949
|
+
const keyword = first.type === "keyword" ? first : second.type === "keyword" ? second : null;
|
|
23950
|
+
const length2 = first.type === "length-percentage" ? first.parsed : second.type === "length-percentage" ? second.parsed : null;
|
|
23951
|
+
if (keyword === null || length2 === null) {
|
|
23952
|
+
throw new Error("Expected a keyword and a length-percentage value");
|
|
23953
|
+
}
|
|
23954
|
+
const keywordIsFirst = first.type === "keyword";
|
|
23955
|
+
if (keyword.keyword === "left" || keyword.keyword === "right") {
|
|
23956
|
+
if (!keywordIsFirst) {
|
|
23957
|
+
throw new TypeError(`Cannot interpolate "${value}" because horizontal transform-origin keywords must come before a length-percentage value`);
|
|
23958
|
+
}
|
|
23959
|
+
return [transformOriginKeywordOptions(keyword.keyword)[0].value, length2];
|
|
23960
|
+
}
|
|
23961
|
+
if (keyword.keyword === "top" || keyword.keyword === "bottom") {
|
|
23962
|
+
return [length2, transformOriginKeywordOptions(keyword.keyword)[0].value];
|
|
23963
|
+
}
|
|
23964
|
+
return keywordIsFirst ? [transformOriginCenter, length2] : [length2, transformOriginCenter];
|
|
23965
|
+
};
|
|
23966
|
+
var parseTransformOriginValue = (output, parts) => {
|
|
23967
|
+
const [x, y] = parseTransformOriginXY(parts.slice(0, 2), output);
|
|
23968
|
+
const z = parts[2] === undefined ? { value: 0, unit: null } : parseTransformOriginLengthPercentage({
|
|
23969
|
+
component: parts[2],
|
|
23970
|
+
value: output,
|
|
23971
|
+
allowPercentage: false
|
|
23972
|
+
});
|
|
23973
|
+
return {
|
|
23974
|
+
kind: "translate",
|
|
23975
|
+
values: [x.value, y.value, z.value],
|
|
23976
|
+
units: [x.unit, y.unit, z.unit],
|
|
23977
|
+
dimensions: parts[2] === undefined ? 2 : 3
|
|
23978
|
+
};
|
|
23979
|
+
};
|
|
23842
23980
|
var parseStringInterpolationValue = (output) => {
|
|
23843
23981
|
if (typeof output === "number") {
|
|
23844
23982
|
if (!Number.isFinite(output)) {
|
|
@@ -23855,6 +23993,9 @@ var parseStringInterpolationValue = (output) => {
|
|
|
23855
23993
|
if (parts.length < 1 || parts.length > 3 || parts[0] === "") {
|
|
23856
23994
|
throw new TypeError(`String outputRange values must contain 1 to 3 components, but got "${output}"`);
|
|
23857
23995
|
}
|
|
23996
|
+
if (parts.some((part) => transformOriginKeywords.has(part.toLowerCase()))) {
|
|
23997
|
+
return parseTransformOriginValue(output, parts);
|
|
23998
|
+
}
|
|
23858
23999
|
const parsed = parts.map((part) => parseStringInterpolationComponent(part, output));
|
|
23859
24000
|
const [{ kind }] = parsed;
|
|
23860
24001
|
for (const part of parsed) {
|
|
@@ -24610,6 +24751,7 @@ function processColor(color) {
|
|
|
24610
24751
|
var interpolateColorsRGB = (value, inputRange, colors, options) => {
|
|
24611
24752
|
const [r2, g, b2, a2] = [red, green, blue, opacity].map((f) => {
|
|
24612
24753
|
const unrounded = interpolate(value, inputRange, colors.map((c2) => f(c2)), {
|
|
24754
|
+
easing: options?.easing,
|
|
24613
24755
|
extrapolateLeft: "clamp",
|
|
24614
24756
|
extrapolateRight: "clamp",
|
|
24615
24757
|
posterize: options?.posterize
|
|
@@ -24663,6 +24805,7 @@ var interpolateKeyframedStatus = ({
|
|
|
24663
24805
|
}
|
|
24664
24806
|
try {
|
|
24665
24807
|
return interpolateColors(frame, inputRange, outputs, {
|
|
24808
|
+
easing: easing.map(easingToFn),
|
|
24666
24809
|
posterize: status.posterize
|
|
24667
24810
|
});
|
|
24668
24811
|
} catch {
|
|
@@ -26069,7 +26212,7 @@ var animatedImageSchema = {
|
|
|
26069
26212
|
max: 10,
|
|
26070
26213
|
step: 0.1,
|
|
26071
26214
|
default: 1,
|
|
26072
|
-
description: "Playback
|
|
26215
|
+
description: "Playback rate",
|
|
26073
26216
|
hiddenFromList: false,
|
|
26074
26217
|
keyframable: false
|
|
26075
26218
|
},
|
|
@@ -30400,7 +30543,100 @@ var Img = wrapInSchema({
|
|
|
30400
30543
|
supportsEffects: true
|
|
30401
30544
|
});
|
|
30402
30545
|
addSequenceStackTraces(Img);
|
|
30403
|
-
var
|
|
30546
|
+
var interactiveElementSchema = {
|
|
30547
|
+
durationInFrames: durationInFramesField,
|
|
30548
|
+
from: fromField,
|
|
30549
|
+
...sequenceVisualStyleSchema,
|
|
30550
|
+
hidden: hiddenField
|
|
30551
|
+
};
|
|
30552
|
+
var setRef = (ref, value) => {
|
|
30553
|
+
if (typeof ref === "function") {
|
|
30554
|
+
ref(value);
|
|
30555
|
+
} else if (ref) {
|
|
30556
|
+
ref.current = value;
|
|
30557
|
+
}
|
|
30558
|
+
};
|
|
30559
|
+
var makeInteractiveElement = (tag, displayName) => {
|
|
30560
|
+
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
30561
|
+
const {
|
|
30562
|
+
durationInFrames,
|
|
30563
|
+
from,
|
|
30564
|
+
hidden,
|
|
30565
|
+
name,
|
|
30566
|
+
showInTimeline,
|
|
30567
|
+
stack,
|
|
30568
|
+
_experimentalControls,
|
|
30569
|
+
...props2
|
|
30570
|
+
} = propsWithControls;
|
|
30571
|
+
const refForOutline = useRef25(null);
|
|
30572
|
+
const callbackRef = useCallback19((element) => {
|
|
30573
|
+
refForOutline.current = element;
|
|
30574
|
+
setRef(ref, element);
|
|
30575
|
+
}, [ref]);
|
|
30576
|
+
return /* @__PURE__ */ jsx29(Sequence, {
|
|
30577
|
+
layout: "none",
|
|
30578
|
+
from: from ?? 0,
|
|
30579
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
30580
|
+
hidden,
|
|
30581
|
+
name: name ?? displayName,
|
|
30582
|
+
showInTimeline: showInTimeline ?? true,
|
|
30583
|
+
_experimentalControls,
|
|
30584
|
+
_remotionInternalStack: stack,
|
|
30585
|
+
_remotionInternalRefForOutline: refForOutline,
|
|
30586
|
+
children: React29.createElement(tag, {
|
|
30587
|
+
...props2,
|
|
30588
|
+
ref: callbackRef
|
|
30589
|
+
})
|
|
30590
|
+
});
|
|
30591
|
+
});
|
|
30592
|
+
Inner.displayName = displayName;
|
|
30593
|
+
const Wrapped = wrapInSchema({
|
|
30594
|
+
Component: Inner,
|
|
30595
|
+
schema: interactiveElementSchema,
|
|
30596
|
+
supportsEffects: false
|
|
30597
|
+
});
|
|
30598
|
+
Wrapped.displayName = displayName;
|
|
30599
|
+
addSequenceStackTraces(Wrapped);
|
|
30600
|
+
return Wrapped;
|
|
30601
|
+
};
|
|
30602
|
+
var Interactive = {
|
|
30603
|
+
A: makeInteractiveElement("a", "<Interactive.A>"),
|
|
30604
|
+
Article: makeInteractiveElement("article", "<Interactive.Article>"),
|
|
30605
|
+
Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
|
|
30606
|
+
Button: makeInteractiveElement("button", "<Interactive.Button>"),
|
|
30607
|
+
Circle: makeInteractiveElement("circle", "<Interactive.Circle>"),
|
|
30608
|
+
Code: makeInteractiveElement("code", "<Interactive.Code>"),
|
|
30609
|
+
Div: makeInteractiveElement("div", "<Interactive.Div>"),
|
|
30610
|
+
Ellipse: makeInteractiveElement("ellipse", "<Interactive.Ellipse>"),
|
|
30611
|
+
Em: makeInteractiveElement("em", "<Interactive.Em>"),
|
|
30612
|
+
Footer: makeInteractiveElement("footer", "<Interactive.Footer>"),
|
|
30613
|
+
G: makeInteractiveElement("g", "<Interactive.G>"),
|
|
30614
|
+
H1: makeInteractiveElement("h1", "<Interactive.H1>"),
|
|
30615
|
+
H2: makeInteractiveElement("h2", "<Interactive.H2>"),
|
|
30616
|
+
H3: makeInteractiveElement("h3", "<Interactive.H3>"),
|
|
30617
|
+
H4: makeInteractiveElement("h4", "<Interactive.H4>"),
|
|
30618
|
+
H5: makeInteractiveElement("h5", "<Interactive.H5>"),
|
|
30619
|
+
H6: makeInteractiveElement("h6", "<Interactive.H6>"),
|
|
30620
|
+
Header: makeInteractiveElement("header", "<Interactive.Header>"),
|
|
30621
|
+
Label: makeInteractiveElement("label", "<Interactive.Label>"),
|
|
30622
|
+
Li: makeInteractiveElement("li", "<Interactive.Li>"),
|
|
30623
|
+
Line: makeInteractiveElement("line", "<Interactive.Line>"),
|
|
30624
|
+
Main: makeInteractiveElement("main", "<Interactive.Main>"),
|
|
30625
|
+
Nav: makeInteractiveElement("nav", "<Interactive.Nav>"),
|
|
30626
|
+
Ol: makeInteractiveElement("ol", "<Interactive.Ol>"),
|
|
30627
|
+
P: makeInteractiveElement("p", "<Interactive.P>"),
|
|
30628
|
+
Path: makeInteractiveElement("path", "<Interactive.Path>"),
|
|
30629
|
+
Pre: makeInteractiveElement("pre", "<Interactive.Pre>"),
|
|
30630
|
+
Rect: makeInteractiveElement("rect", "<Interactive.Rect>"),
|
|
30631
|
+
Section: makeInteractiveElement("section", "<Interactive.Section>"),
|
|
30632
|
+
Small: makeInteractiveElement("small", "<Interactive.Small>"),
|
|
30633
|
+
Span: makeInteractiveElement("span", "<Interactive.Span>"),
|
|
30634
|
+
Strong: makeInteractiveElement("strong", "<Interactive.Strong>"),
|
|
30635
|
+
Svg: makeInteractiveElement("svg", "<Interactive.Svg>"),
|
|
30636
|
+
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
30637
|
+
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
30638
|
+
};
|
|
30639
|
+
var compositionsRef = React30.createRef();
|
|
30404
30640
|
var CompositionManagerProvider = ({
|
|
30405
30641
|
children,
|
|
30406
30642
|
onlyRenderComposition,
|
|
@@ -30411,15 +30647,15 @@ var CompositionManagerProvider = ({
|
|
|
30411
30647
|
const [folders, setFolders] = useState18([]);
|
|
30412
30648
|
const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
|
|
30413
30649
|
const [compositions, setCompositions] = useState18(initialCompositions);
|
|
30414
|
-
const currentcompositionsRef =
|
|
30415
|
-
const updateCompositions =
|
|
30650
|
+
const currentcompositionsRef = useRef26(compositions);
|
|
30651
|
+
const updateCompositions = useCallback20((updateComps) => {
|
|
30416
30652
|
setCompositions((comps) => {
|
|
30417
30653
|
const updated = updateComps(comps);
|
|
30418
30654
|
currentcompositionsRef.current = updated;
|
|
30419
30655
|
return updated;
|
|
30420
30656
|
});
|
|
30421
30657
|
}, []);
|
|
30422
|
-
const registerComposition =
|
|
30658
|
+
const registerComposition = useCallback20((comp) => {
|
|
30423
30659
|
updateCompositions((comps) => {
|
|
30424
30660
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
30425
30661
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -30427,12 +30663,12 @@ var CompositionManagerProvider = ({
|
|
|
30427
30663
|
return [...comps, comp];
|
|
30428
30664
|
});
|
|
30429
30665
|
}, [updateCompositions]);
|
|
30430
|
-
const unregisterComposition =
|
|
30666
|
+
const unregisterComposition = useCallback20((id) => {
|
|
30431
30667
|
setCompositions((comps) => {
|
|
30432
30668
|
return comps.filter((c2) => c2.id !== id);
|
|
30433
30669
|
});
|
|
30434
30670
|
}, []);
|
|
30435
|
-
const registerFolder =
|
|
30671
|
+
const registerFolder = useCallback20((name, parent, nonce, stack) => {
|
|
30436
30672
|
setFolders((prevFolders) => {
|
|
30437
30673
|
return [
|
|
30438
30674
|
...prevFolders,
|
|
@@ -30445,7 +30681,7 @@ var CompositionManagerProvider = ({
|
|
|
30445
30681
|
];
|
|
30446
30682
|
});
|
|
30447
30683
|
}, []);
|
|
30448
|
-
const unregisterFolder =
|
|
30684
|
+
const unregisterFolder = useCallback20((name, parent) => {
|
|
30449
30685
|
setFolders((prevFolders) => {
|
|
30450
30686
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
30451
30687
|
});
|
|
@@ -30479,9 +30715,9 @@ var CompositionManagerProvider = ({
|
|
|
30479
30715
|
canvasContent
|
|
30480
30716
|
};
|
|
30481
30717
|
}, [compositions, folders, currentCompositionMetadata, canvasContent]);
|
|
30482
|
-
return /* @__PURE__ */
|
|
30718
|
+
return /* @__PURE__ */ jsx30(CompositionManager.Provider, {
|
|
30483
30719
|
value: compositionManagerContextValue,
|
|
30484
|
-
children: /* @__PURE__ */
|
|
30720
|
+
children: /* @__PURE__ */ jsx30(CompositionSetters.Provider, {
|
|
30485
30721
|
value: compositionManagerSetters,
|
|
30486
30722
|
children
|
|
30487
30723
|
})
|
|
@@ -30579,7 +30815,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
30579
30815
|
var getPreviewDomElement = () => {
|
|
30580
30816
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
30581
30817
|
};
|
|
30582
|
-
var MaxMediaCacheSizeContext =
|
|
30818
|
+
var MaxMediaCacheSizeContext = React31.createContext(null);
|
|
30583
30819
|
var Root = null;
|
|
30584
30820
|
var listeners = [];
|
|
30585
30821
|
var getRoot = () => {
|
|
@@ -30624,7 +30860,7 @@ var MediaEnabledProvider = ({
|
|
|
30624
30860
|
audioEnabled
|
|
30625
30861
|
}) => {
|
|
30626
30862
|
const value = useMemo33(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
30627
|
-
return /* @__PURE__ */
|
|
30863
|
+
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
30628
30864
|
value,
|
|
30629
30865
|
children
|
|
30630
30866
|
});
|
|
@@ -30648,25 +30884,25 @@ var RemotionRootContexts = ({
|
|
|
30648
30884
|
const logging = useMemo34(() => {
|
|
30649
30885
|
return { logLevel, mountTime: Date.now() };
|
|
30650
30886
|
}, [logLevel]);
|
|
30651
|
-
return /* @__PURE__ */
|
|
30887
|
+
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
30652
30888
|
value: logging,
|
|
30653
|
-
children: /* @__PURE__ */
|
|
30889
|
+
children: /* @__PURE__ */ jsx32(NonceContext.Provider, {
|
|
30654
30890
|
value: nonceContext,
|
|
30655
|
-
children: /* @__PURE__ */
|
|
30891
|
+
children: /* @__PURE__ */ jsx32(TimelineContextProvider, {
|
|
30656
30892
|
frameState,
|
|
30657
|
-
children: /* @__PURE__ */
|
|
30893
|
+
children: /* @__PURE__ */ jsx32(MediaEnabledProvider, {
|
|
30658
30894
|
videoEnabled,
|
|
30659
30895
|
audioEnabled,
|
|
30660
|
-
children: /* @__PURE__ */
|
|
30661
|
-
children: /* @__PURE__ */
|
|
30662
|
-
children: /* @__PURE__ */
|
|
30663
|
-
children: /* @__PURE__ */
|
|
30664
|
-
children: /* @__PURE__ */
|
|
30665
|
-
children: /* @__PURE__ */
|
|
30896
|
+
children: /* @__PURE__ */ jsx32(EditorPropsProvider, {
|
|
30897
|
+
children: /* @__PURE__ */ jsx32(PrefetchProvider, {
|
|
30898
|
+
children: /* @__PURE__ */ jsx32(SequenceManagerProvider, {
|
|
30899
|
+
children: /* @__PURE__ */ jsx32(DurationsContextProvider, {
|
|
30900
|
+
children: /* @__PURE__ */ jsx32(BufferingProvider, {
|
|
30901
|
+
children: /* @__PURE__ */ jsx32(SharedAudioContextProvider, {
|
|
30666
30902
|
audioLatencyHint,
|
|
30667
30903
|
audioEnabled,
|
|
30668
30904
|
previewSampleRate,
|
|
30669
|
-
children: /* @__PURE__ */
|
|
30905
|
+
children: /* @__PURE__ */ jsx32(SharedAudioTagsContextProvider, {
|
|
30670
30906
|
numberOfAudioTags,
|
|
30671
30907
|
children
|
|
30672
30908
|
})
|
|
@@ -30852,7 +31088,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
30852
31088
|
};
|
|
30853
31089
|
}
|
|
30854
31090
|
};
|
|
30855
|
-
var SequenceStackTracesUpdateContext =
|
|
31091
|
+
var SequenceStackTracesUpdateContext = React33.createContext(() => {});
|
|
30856
31092
|
var getEnvVariables = () => {
|
|
30857
31093
|
if (getRemotionEnvironment().isRendering) {
|
|
30858
31094
|
const param = window.remotion_envVariables;
|
|
@@ -30878,7 +31114,7 @@ var setupEnvVariables = () => {
|
|
|
30878
31114
|
window.process.env[key] = env[key];
|
|
30879
31115
|
});
|
|
30880
31116
|
};
|
|
30881
|
-
var CurrentScaleContext =
|
|
31117
|
+
var CurrentScaleContext = React34.createContext(null);
|
|
30882
31118
|
var PreviewSizeContext = createContext25({
|
|
30883
31119
|
setSize: () => {
|
|
30884
31120
|
return;
|
|
@@ -30902,7 +31138,7 @@ var calculateScale = ({
|
|
|
30902
31138
|
}
|
|
30903
31139
|
return Number(previewSize);
|
|
30904
31140
|
};
|
|
30905
|
-
var PixelDensityContext =
|
|
31141
|
+
var PixelDensityContext = React35.createContext(null);
|
|
30906
31142
|
var getOffthreadVideoSource = ({
|
|
30907
31143
|
src,
|
|
30908
31144
|
transparent,
|
|
@@ -31084,7 +31320,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31084
31320
|
continueRender2,
|
|
31085
31321
|
delayRender2
|
|
31086
31322
|
]);
|
|
31087
|
-
const onErr =
|
|
31323
|
+
const onErr = useCallback21(() => {
|
|
31088
31324
|
if (onError) {
|
|
31089
31325
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
31090
31326
|
} else {
|
|
@@ -31094,7 +31330,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31094
31330
|
const className = useMemo35(() => {
|
|
31095
31331
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
31096
31332
|
}, [props2.className]);
|
|
31097
|
-
const onImageFrame =
|
|
31333
|
+
const onImageFrame = useCallback21((img) => {
|
|
31098
31334
|
if (onVideoFrame) {
|
|
31099
31335
|
onVideoFrame(img);
|
|
31100
31336
|
}
|
|
@@ -31103,7 +31339,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31103
31339
|
return null;
|
|
31104
31340
|
}
|
|
31105
31341
|
continueRender2(imageSrc.handle);
|
|
31106
|
-
return /* @__PURE__ */
|
|
31342
|
+
return /* @__PURE__ */ jsx33(Img, {
|
|
31107
31343
|
src: imageSrc.src,
|
|
31108
31344
|
delayRenderRetries,
|
|
31109
31345
|
delayRenderTimeoutInMilliseconds,
|
|
@@ -31159,7 +31395,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31159
31395
|
if (!context) {
|
|
31160
31396
|
throw new Error("SharedAudioContext not found");
|
|
31161
31397
|
}
|
|
31162
|
-
const videoRef =
|
|
31398
|
+
const videoRef = useRef27(null);
|
|
31163
31399
|
const sharedSource = useMemo36(() => {
|
|
31164
31400
|
if (!context.audioContext) {
|
|
31165
31401
|
return null;
|
|
@@ -31169,7 +31405,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31169
31405
|
ref: videoRef
|
|
31170
31406
|
});
|
|
31171
31407
|
}, [context.audioContext]);
|
|
31172
|
-
const effectToUse =
|
|
31408
|
+
const effectToUse = React37.useInsertionEffect ?? React37.useLayoutEffect;
|
|
31173
31409
|
effectToUse(() => {
|
|
31174
31410
|
return () => {
|
|
31175
31411
|
requestAnimationFrame(() => {
|
|
@@ -31227,7 +31463,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31227
31463
|
mediaVolume
|
|
31228
31464
|
});
|
|
31229
31465
|
warnAboutTooHighVolume(userPreferredVolume);
|
|
31230
|
-
const getStack =
|
|
31466
|
+
const getStack = useCallback22(() => {
|
|
31231
31467
|
return _remotionInternalStack ?? null;
|
|
31232
31468
|
}, [_remotionInternalStack]);
|
|
31233
31469
|
useMediaInTimeline({
|
|
@@ -31332,7 +31568,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31332
31568
|
current.removeEventListener("error", errorHandler);
|
|
31333
31569
|
};
|
|
31334
31570
|
}, [onError, src]);
|
|
31335
|
-
const currentOnDurationCallback =
|
|
31571
|
+
const currentOnDurationCallback = useRef27(onDuration);
|
|
31336
31572
|
currentOnDurationCallback.current = onDuration;
|
|
31337
31573
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
31338
31574
|
useEffect20(() => {
|
|
@@ -31373,7 +31609,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31373
31609
|
requestsVideoFrame: Boolean(onVideoFrame),
|
|
31374
31610
|
isClientSideRendering: false
|
|
31375
31611
|
});
|
|
31376
|
-
return /* @__PURE__ */
|
|
31612
|
+
return /* @__PURE__ */ jsx34("video", {
|
|
31377
31613
|
ref: videoRef,
|
|
31378
31614
|
muted: muted || mediaMuted || userPreferredVolume <= 0,
|
|
31379
31615
|
playsInline: true,
|
|
@@ -31385,7 +31621,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31385
31621
|
...nativeProps
|
|
31386
31622
|
});
|
|
31387
31623
|
};
|
|
31388
|
-
var VideoForPreview =
|
|
31624
|
+
var VideoForPreview = forwardRef13(VideoForDevelopmentRefForwardingFunction);
|
|
31389
31625
|
var InnerOffthreadVideo = (props2) => {
|
|
31390
31626
|
const {
|
|
31391
31627
|
startFrom,
|
|
@@ -31402,7 +31638,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
31402
31638
|
if (environment.isClientSideRendering) {
|
|
31403
31639
|
throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
31404
31640
|
}
|
|
31405
|
-
const onDuration =
|
|
31641
|
+
const onDuration = useCallback23(() => {
|
|
31406
31642
|
return;
|
|
31407
31643
|
}, []);
|
|
31408
31644
|
if (typeof props2.src !== "string") {
|
|
@@ -31416,13 +31652,13 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
31416
31652
|
trimAfter
|
|
31417
31653
|
});
|
|
31418
31654
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
31419
|
-
return /* @__PURE__ */
|
|
31655
|
+
return /* @__PURE__ */ jsx35(Sequence, {
|
|
31420
31656
|
layout: "none",
|
|
31421
31657
|
from: 0 - (trimBeforeValue ?? 0),
|
|
31422
31658
|
showInTimeline: false,
|
|
31423
31659
|
durationInFrames: trimAfterValue,
|
|
31424
31660
|
name,
|
|
31425
|
-
children: /* @__PURE__ */
|
|
31661
|
+
children: /* @__PURE__ */ jsx35(InnerOffthreadVideo, {
|
|
31426
31662
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
31427
31663
|
...otherProps,
|
|
31428
31664
|
trimAfter: undefined,
|
|
@@ -31437,7 +31673,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
31437
31673
|
}
|
|
31438
31674
|
validateMediaProps(props2, "Video");
|
|
31439
31675
|
if (environment.isRendering) {
|
|
31440
|
-
return /* @__PURE__ */
|
|
31676
|
+
return /* @__PURE__ */ jsx35(OffthreadVideoForRendering, {
|
|
31441
31677
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
31442
31678
|
...otherProps,
|
|
31443
31679
|
trimAfter: undefined,
|
|
@@ -31459,7 +31695,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
31459
31695
|
delayRenderTimeoutInMilliseconds,
|
|
31460
31696
|
...propsForPreview
|
|
31461
31697
|
} = otherProps;
|
|
31462
|
-
return /* @__PURE__ */
|
|
31698
|
+
return /* @__PURE__ */ jsx35(VideoForPreview, {
|
|
31463
31699
|
_remotionInternalStack: stack ?? null,
|
|
31464
31700
|
onDuration,
|
|
31465
31701
|
onlyWarnForMediaSeekingError: true,
|
|
@@ -31508,7 +31744,7 @@ var OffthreadVideo = ({
|
|
|
31508
31744
|
if (imageFormat) {
|
|
31509
31745
|
throw new TypeError(`The \`<OffthreadVideo>\` tag does no longer accept \`imageFormat\`. Use the \`transparent\` prop if you want to render a transparent video.`);
|
|
31510
31746
|
}
|
|
31511
|
-
return /* @__PURE__ */
|
|
31747
|
+
return /* @__PURE__ */ jsx35(InnerOffthreadVideo, {
|
|
31512
31748
|
acceptableTimeShiftInSeconds,
|
|
31513
31749
|
allowAmplificationDuringRender: allowAmplificationDuringRender ?? true,
|
|
31514
31750
|
audioStreamIndex: audioStreamIndex ?? 0,
|
|
@@ -31544,20 +31780,20 @@ var OffthreadVideo = ({
|
|
|
31544
31780
|
addSequenceStackTraces(OffthreadVideo);
|
|
31545
31781
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
31546
31782
|
function useRemotionContexts() {
|
|
31547
|
-
const compositionManagerCtx =
|
|
31548
|
-
const timelineContext =
|
|
31549
|
-
const setTimelineContext =
|
|
31550
|
-
const sequenceContext =
|
|
31551
|
-
const nonceContext =
|
|
31552
|
-
const canUseRemotionHooksContext =
|
|
31553
|
-
const preloadContext =
|
|
31554
|
-
const resolveCompositionContext =
|
|
31555
|
-
const renderAssetManagerContext =
|
|
31556
|
-
const sequenceManagerContext =
|
|
31557
|
-
const sequenceManagerRefContext =
|
|
31558
|
-
const visualModePropStatusesRefContext =
|
|
31559
|
-
const bufferManagerContext =
|
|
31560
|
-
const logLevelContext =
|
|
31783
|
+
const compositionManagerCtx = React39.useContext(CompositionManager);
|
|
31784
|
+
const timelineContext = React39.useContext(TimelineContext);
|
|
31785
|
+
const setTimelineContext = React39.useContext(SetTimelineContext);
|
|
31786
|
+
const sequenceContext = React39.useContext(SequenceContext);
|
|
31787
|
+
const nonceContext = React39.useContext(NonceContext);
|
|
31788
|
+
const canUseRemotionHooksContext = React39.useContext(CanUseRemotionHooks);
|
|
31789
|
+
const preloadContext = React39.useContext(PreloadContext);
|
|
31790
|
+
const resolveCompositionContext = React39.useContext(ResolveCompositionContext);
|
|
31791
|
+
const renderAssetManagerContext = React39.useContext(RenderAssetManager);
|
|
31792
|
+
const sequenceManagerContext = React39.useContext(SequenceManager);
|
|
31793
|
+
const sequenceManagerRefContext = React39.useContext(SequenceManagerRefContext);
|
|
31794
|
+
const visualModePropStatusesRefContext = React39.useContext(VisualModePropStatusesRefContext);
|
|
31795
|
+
const bufferManagerContext = React39.useContext(BufferingContextReact);
|
|
31796
|
+
const logLevelContext = React39.useContext(LogLevelContext);
|
|
31561
31797
|
return useMemo37(() => ({
|
|
31562
31798
|
compositionManagerCtx,
|
|
31563
31799
|
timelineContext,
|
|
@@ -31592,33 +31828,33 @@ function useRemotionContexts() {
|
|
|
31592
31828
|
}
|
|
31593
31829
|
var RemotionContextProvider = (props2) => {
|
|
31594
31830
|
const { children, contexts } = props2;
|
|
31595
|
-
return /* @__PURE__ */
|
|
31831
|
+
return /* @__PURE__ */ jsx36(LogLevelContext.Provider, {
|
|
31596
31832
|
value: contexts.logLevelContext,
|
|
31597
|
-
children: /* @__PURE__ */
|
|
31833
|
+
children: /* @__PURE__ */ jsx36(CanUseRemotionHooks.Provider, {
|
|
31598
31834
|
value: contexts.canUseRemotionHooksContext,
|
|
31599
|
-
children: /* @__PURE__ */
|
|
31835
|
+
children: /* @__PURE__ */ jsx36(NonceContext.Provider, {
|
|
31600
31836
|
value: contexts.nonceContext,
|
|
31601
|
-
children: /* @__PURE__ */
|
|
31837
|
+
children: /* @__PURE__ */ jsx36(PreloadContext.Provider, {
|
|
31602
31838
|
value: contexts.preloadContext,
|
|
31603
|
-
children: /* @__PURE__ */
|
|
31839
|
+
children: /* @__PURE__ */ jsx36(CompositionManager.Provider, {
|
|
31604
31840
|
value: contexts.compositionManagerCtx,
|
|
31605
|
-
children: /* @__PURE__ */
|
|
31841
|
+
children: /* @__PURE__ */ jsx36(SequenceManagerRefContext.Provider, {
|
|
31606
31842
|
value: contexts.sequenceManagerRefContext,
|
|
31607
|
-
children: /* @__PURE__ */
|
|
31843
|
+
children: /* @__PURE__ */ jsx36(SequenceManager.Provider, {
|
|
31608
31844
|
value: contexts.sequenceManagerContext,
|
|
31609
|
-
children: /* @__PURE__ */
|
|
31845
|
+
children: /* @__PURE__ */ jsx36(VisualModePropStatusesRefContext.Provider, {
|
|
31610
31846
|
value: contexts.visualModePropStatusesRefContext,
|
|
31611
|
-
children: /* @__PURE__ */
|
|
31847
|
+
children: /* @__PURE__ */ jsx36(RenderAssetManager.Provider, {
|
|
31612
31848
|
value: contexts.renderAssetManagerContext,
|
|
31613
|
-
children: /* @__PURE__ */
|
|
31849
|
+
children: /* @__PURE__ */ jsx36(ResolveCompositionContext.Provider, {
|
|
31614
31850
|
value: contexts.resolveCompositionContext,
|
|
31615
|
-
children: /* @__PURE__ */
|
|
31851
|
+
children: /* @__PURE__ */ jsx36(TimelineContext.Provider, {
|
|
31616
31852
|
value: contexts.timelineContext,
|
|
31617
|
-
children: /* @__PURE__ */
|
|
31853
|
+
children: /* @__PURE__ */ jsx36(SetTimelineContext.Provider, {
|
|
31618
31854
|
value: contexts.setTimelineContext,
|
|
31619
|
-
children: /* @__PURE__ */
|
|
31855
|
+
children: /* @__PURE__ */ jsx36(SequenceContext.Provider, {
|
|
31620
31856
|
value: contexts.sequenceContext,
|
|
31621
|
-
children: /* @__PURE__ */
|
|
31857
|
+
children: /* @__PURE__ */ jsx36(BufferingContextReact.Provider, {
|
|
31622
31858
|
value: contexts.bufferManagerContext,
|
|
31623
31859
|
children
|
|
31624
31860
|
})
|
|
@@ -31808,9 +32044,9 @@ var validateFrame = ({
|
|
|
31808
32044
|
}
|
|
31809
32045
|
};
|
|
31810
32046
|
var flattenChildren = (children) => {
|
|
31811
|
-
const childrenArray =
|
|
32047
|
+
const childrenArray = React40.Children.toArray(children);
|
|
31812
32048
|
return childrenArray.reduce((flatChildren, child) => {
|
|
31813
|
-
if (child.type ===
|
|
32049
|
+
if (child.type === React40.Fragment) {
|
|
31814
32050
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
31815
32051
|
}
|
|
31816
32052
|
flatChildren.push(child);
|
|
@@ -31819,11 +32055,11 @@ var flattenChildren = (children) => {
|
|
|
31819
32055
|
};
|
|
31820
32056
|
var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
31821
32057
|
useRequireToBeInsideSeries();
|
|
31822
|
-
return /* @__PURE__ */
|
|
32058
|
+
return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
|
|
31823
32059
|
children
|
|
31824
32060
|
});
|
|
31825
32061
|
};
|
|
31826
|
-
var SeriesSequence =
|
|
32062
|
+
var SeriesSequence = forwardRef14(SeriesSequenceRefForwardingFunction);
|
|
31827
32063
|
var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
|
|
31828
32064
|
var SeriesInner = (props2) => {
|
|
31829
32065
|
const childrenValue = useMemo38(() => {
|
|
@@ -31867,7 +32103,7 @@ var SeriesInner = (props2) => {
|
|
|
31867
32103
|
}
|
|
31868
32104
|
const currentStartFrame = startFrame + offset;
|
|
31869
32105
|
startFrame += durationInFramesProp + offset;
|
|
31870
|
-
return /* @__PURE__ */
|
|
32106
|
+
return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
|
|
31871
32107
|
ref: castedChild.ref,
|
|
31872
32108
|
name: name || "<Series.Sequence>",
|
|
31873
32109
|
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
@@ -31878,8 +32114,8 @@ var SeriesInner = (props2) => {
|
|
|
31878
32114
|
});
|
|
31879
32115
|
});
|
|
31880
32116
|
}, [props2.children]);
|
|
31881
|
-
return /* @__PURE__ */
|
|
31882
|
-
children: /* @__PURE__ */
|
|
32117
|
+
return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
|
|
32118
|
+
children: /* @__PURE__ */ jsx37(Sequence, {
|
|
31883
32119
|
layout: "none",
|
|
31884
32120
|
name: "<Series>",
|
|
31885
32121
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/series",
|
|
@@ -32361,7 +32597,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
32361
32597
|
const frame = useCurrentFrame();
|
|
32362
32598
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
32363
32599
|
const videoConfig = useUnsafeVideoConfig();
|
|
32364
|
-
const videoRef =
|
|
32600
|
+
const videoRef = useRef28(null);
|
|
32365
32601
|
const sequenceContext = useContext38(SequenceContext);
|
|
32366
32602
|
const mediaStartsAt = useMediaStartsAt();
|
|
32367
32603
|
const environment = useRemotionEnvironment();
|
|
@@ -32552,13 +32788,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
32552
32788
|
delayRender2
|
|
32553
32789
|
]);
|
|
32554
32790
|
}
|
|
32555
|
-
return /* @__PURE__ */
|
|
32791
|
+
return /* @__PURE__ */ jsx38("video", {
|
|
32556
32792
|
ref: videoRef,
|
|
32557
32793
|
disableRemotePlayback: true,
|
|
32558
32794
|
...props2
|
|
32559
32795
|
});
|
|
32560
32796
|
};
|
|
32561
|
-
var VideoForRendering =
|
|
32797
|
+
var VideoForRendering = forwardRef15(VideoForRenderingForwardFunction);
|
|
32562
32798
|
var VideoForwardingFunction = (props2, ref) => {
|
|
32563
32799
|
const {
|
|
32564
32800
|
startFrom,
|
|
@@ -32588,7 +32824,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32588
32824
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
32589
32825
|
}
|
|
32590
32826
|
const preloadedSrc = usePreload(props2.src);
|
|
32591
|
-
const onDuration =
|
|
32827
|
+
const onDuration = useCallback24((src, durationInSeconds) => {
|
|
32592
32828
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
32593
32829
|
}, [setDurations]);
|
|
32594
32830
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|
|
@@ -32601,7 +32837,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32601
32837
|
});
|
|
32602
32838
|
if (loop && durationFetched !== undefined) {
|
|
32603
32839
|
if (!Number.isFinite(durationFetched)) {
|
|
32604
|
-
return /* @__PURE__ */
|
|
32840
|
+
return /* @__PURE__ */ jsx39(Html5Video, {
|
|
32605
32841
|
...propsOtherThanLoop,
|
|
32606
32842
|
ref,
|
|
32607
32843
|
stack,
|
|
@@ -32609,7 +32845,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32609
32845
|
});
|
|
32610
32846
|
}
|
|
32611
32847
|
const mediaDuration = durationFetched * fps;
|
|
32612
|
-
return /* @__PURE__ */
|
|
32848
|
+
return /* @__PURE__ */ jsx39(Loop, {
|
|
32613
32849
|
durationInFrames: calculateMediaDuration({
|
|
32614
32850
|
trimAfter: trimAfterValue,
|
|
32615
32851
|
mediaDurationInFrames: mediaDuration,
|
|
@@ -32619,7 +32855,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32619
32855
|
layout: "none",
|
|
32620
32856
|
name,
|
|
32621
32857
|
showInTimeline: false,
|
|
32622
|
-
children: /* @__PURE__ */
|
|
32858
|
+
children: /* @__PURE__ */ jsx39(Html5Video, {
|
|
32623
32859
|
...propsOtherThanLoop,
|
|
32624
32860
|
ref,
|
|
32625
32861
|
stack,
|
|
@@ -32628,13 +32864,13 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32628
32864
|
});
|
|
32629
32865
|
}
|
|
32630
32866
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
32631
|
-
return /* @__PURE__ */
|
|
32867
|
+
return /* @__PURE__ */ jsx39(Sequence, {
|
|
32632
32868
|
layout: "none",
|
|
32633
32869
|
from: 0 - (trimBeforeValue ?? 0),
|
|
32634
32870
|
showInTimeline: false,
|
|
32635
32871
|
durationInFrames: trimAfterValue === undefined ? undefined : trimAfterValue / (props2.playbackRate ?? 1),
|
|
32636
32872
|
name,
|
|
32637
|
-
children: /* @__PURE__ */
|
|
32873
|
+
children: /* @__PURE__ */ jsx39(Html5Video, {
|
|
32638
32874
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
32639
32875
|
onVideoFrame,
|
|
32640
32876
|
...otherProps,
|
|
@@ -32649,14 +32885,14 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32649
32885
|
volume: props2.volume
|
|
32650
32886
|
}, "Html5Video");
|
|
32651
32887
|
if (environment.isRendering) {
|
|
32652
|
-
return /* @__PURE__ */
|
|
32888
|
+
return /* @__PURE__ */ jsx39(VideoForRendering, {
|
|
32653
32889
|
onDuration,
|
|
32654
32890
|
onVideoFrame: onVideoFrame ?? null,
|
|
32655
32891
|
...otherProps,
|
|
32656
32892
|
ref
|
|
32657
32893
|
});
|
|
32658
32894
|
}
|
|
32659
|
-
return /* @__PURE__ */
|
|
32895
|
+
return /* @__PURE__ */ jsx39(VideoForPreview, {
|
|
32660
32896
|
onlyWarnForMediaSeekingError: false,
|
|
32661
32897
|
...otherProps,
|
|
32662
32898
|
ref,
|
|
@@ -32669,7 +32905,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32669
32905
|
onAutoPlayError: onAutoPlayError ?? undefined
|
|
32670
32906
|
});
|
|
32671
32907
|
};
|
|
32672
|
-
var Html5Video =
|
|
32908
|
+
var Html5Video = forwardRef16(VideoForwardingFunction);
|
|
32673
32909
|
addSequenceStackTraces(Html5Video);
|
|
32674
32910
|
checkMultipleRemotionVersions();
|
|
32675
32911
|
var proxyObj = {};
|
|
@@ -32698,9 +32934,9 @@ addSequenceStackTraces(Composition);
|
|
|
32698
32934
|
addSequenceStackTraces(Folder);
|
|
32699
32935
|
|
|
32700
32936
|
// ../shapes/dist/esm/index.mjs
|
|
32701
|
-
import React, { useCallback as
|
|
32937
|
+
import React, { useCallback as useCallback25, useMemo as useMemo40, useRef as useRef29 } from "react";
|
|
32702
32938
|
import { version } from "react-dom";
|
|
32703
|
-
import { jsx as
|
|
32939
|
+
import { jsx as jsx40, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
32704
32940
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
32705
32941
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
32706
32942
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
@@ -32887,11 +33123,11 @@ var RenderSvg = ({
|
|
|
32887
33123
|
...pathStyle ?? {}
|
|
32888
33124
|
};
|
|
32889
33125
|
}, [pathStyle]);
|
|
32890
|
-
const outlineRef =
|
|
32891
|
-
const setSvgRef =
|
|
33126
|
+
const outlineRef = useRef29(null);
|
|
33127
|
+
const setSvgRef = useCallback25((node) => {
|
|
32892
33128
|
outlineRef.current = node;
|
|
32893
33129
|
}, []);
|
|
32894
|
-
const setCanvasRef =
|
|
33130
|
+
const setCanvasRef = useCallback25((canvas) => {
|
|
32895
33131
|
outlineRef.current = canvas;
|
|
32896
33132
|
}, []);
|
|
32897
33133
|
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
|
|
@@ -32905,7 +33141,7 @@ var RenderSvg = ({
|
|
|
32905
33141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32906
33142
|
style: effects.length === 0 || !videoConfig ? actualStyle : { overflow: "visible" },
|
|
32907
33143
|
children: [
|
|
32908
|
-
/* @__PURE__ */
|
|
33144
|
+
/* @__PURE__ */ jsx40("path", {
|
|
32909
33145
|
...reactSupportsTransformOrigin ? {
|
|
32910
33146
|
transformOrigin
|
|
32911
33147
|
} : {
|
|
@@ -32925,17 +33161,17 @@ var RenderSvg = ({
|
|
|
32925
33161
|
const prevY = prevInstruction.y;
|
|
32926
33162
|
return /* @__PURE__ */ jsxs3(React.Fragment, {
|
|
32927
33163
|
children: [
|
|
32928
|
-
/* @__PURE__ */
|
|
33164
|
+
/* @__PURE__ */ jsx40("path", {
|
|
32929
33165
|
d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
|
|
32930
33166
|
strokeWidth: 2,
|
|
32931
33167
|
stroke: "rgba(0, 0, 0, 0.4)"
|
|
32932
33168
|
}),
|
|
32933
|
-
/* @__PURE__ */
|
|
33169
|
+
/* @__PURE__ */ jsx40("path", {
|
|
32934
33170
|
d: `M ${i.x} ${i.y} ${i.cp2x} ${i.cp2y}`,
|
|
32935
33171
|
strokeWidth: 2,
|
|
32936
33172
|
stroke: "rgba(0, 0, 0, 0.4)"
|
|
32937
33173
|
}),
|
|
32938
|
-
/* @__PURE__ */
|
|
33174
|
+
/* @__PURE__ */ jsx40("circle", {
|
|
32939
33175
|
cx: i.cp1x,
|
|
32940
33176
|
cy: i.cp1y,
|
|
32941
33177
|
r: 3,
|
|
@@ -32943,7 +33179,7 @@ var RenderSvg = ({
|
|
|
32943
33179
|
strokeWidth: 2,
|
|
32944
33180
|
stroke: "black"
|
|
32945
33181
|
}),
|
|
32946
|
-
/* @__PURE__ */
|
|
33182
|
+
/* @__PURE__ */ jsx40("circle", {
|
|
32947
33183
|
cx: i.cp2x,
|
|
32948
33184
|
cy: i.cp2y,
|
|
32949
33185
|
r: 3,
|
|
@@ -32958,7 +33194,7 @@ var RenderSvg = ({
|
|
|
32958
33194
|
}) : null
|
|
32959
33195
|
]
|
|
32960
33196
|
});
|
|
32961
|
-
const content = effects.length === 0 ? svg : /* @__PURE__ */
|
|
33197
|
+
const content = effects.length === 0 ? svg : /* @__PURE__ */ jsx40(HtmlInCanvas, {
|
|
32962
33198
|
ref: setCanvasRef,
|
|
32963
33199
|
width: Math.ceil(width),
|
|
32964
33200
|
height: Math.ceil(height),
|
|
@@ -32973,7 +33209,7 @@ var RenderSvg = ({
|
|
|
32973
33209
|
if (!videoConfig) {
|
|
32974
33210
|
return svg;
|
|
32975
33211
|
}
|
|
32976
|
-
return /* @__PURE__ */
|
|
33212
|
+
return /* @__PURE__ */ jsx40(Sequence, {
|
|
32977
33213
|
layout: "none",
|
|
32978
33214
|
from,
|
|
32979
33215
|
hidden,
|
|
@@ -35086,8 +35322,8 @@ var extrudeAndTransformElement = (options) => {
|
|
|
35086
35322
|
// ../design/dist/esm/index.mjs
|
|
35087
35323
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
35088
35324
|
import { jsx as jsx312, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
35089
|
-
import { useEffect as useEffect23, useMemo as useMemo210, useRef as
|
|
35090
|
-
import { jsx as
|
|
35325
|
+
import { useEffect as useEffect23, useMemo as useMemo210, useRef as useRef31 } from "react";
|
|
35326
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
35091
35327
|
import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
35092
35328
|
import React62 from "react";
|
|
35093
35329
|
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
@@ -35098,7 +35334,7 @@ import React72 from "react";
|
|
|
35098
35334
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
35099
35335
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
35100
35336
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
35101
|
-
import * as
|
|
35337
|
+
import * as React36 from "react";
|
|
35102
35338
|
import * as ReactDOM4 from "react-dom";
|
|
35103
35339
|
import React112 from "react";
|
|
35104
35340
|
import * as React8 from "react";
|
|
@@ -35137,7 +35373,7 @@ import * as React27 from "react";
|
|
|
35137
35373
|
import * as React28 from "react";
|
|
35138
35374
|
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
35139
35375
|
import * as React352 from "react";
|
|
35140
|
-
import * as
|
|
35376
|
+
import * as React312 from "react";
|
|
35141
35377
|
import { useState as useState112 } from "react";
|
|
35142
35378
|
import * as React292 from "react";
|
|
35143
35379
|
import * as React302 from "react";
|
|
@@ -35147,21 +35383,21 @@ import * as React322 from "react";
|
|
|
35147
35383
|
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
35148
35384
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
35149
35385
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
35150
|
-
import * as
|
|
35386
|
+
import * as React372 from "react";
|
|
35151
35387
|
import { jsx as jsx252, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
35152
35388
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
35153
35389
|
import * as React49 from "react";
|
|
35154
|
-
import * as
|
|
35390
|
+
import * as React38 from "react";
|
|
35155
35391
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
35156
35392
|
import * as React47 from "react";
|
|
35157
|
-
import
|
|
35393
|
+
import React402 from "react";
|
|
35158
35394
|
import * as React392 from "react";
|
|
35159
35395
|
import { Fragment as Fragment22, jsx as jsx282 } from "react/jsx-runtime";
|
|
35160
35396
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
35161
35397
|
import React210 from "react";
|
|
35162
35398
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
35163
|
-
import * as
|
|
35164
|
-
import * as
|
|
35399
|
+
import * as React422 from "react";
|
|
35400
|
+
import * as React41 from "react";
|
|
35165
35401
|
import * as React43 from "react";
|
|
35166
35402
|
import * as ReactDOM5 from "react-dom";
|
|
35167
35403
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
@@ -35179,7 +35415,7 @@ import { jsx as jsx342 } from "react/jsx-runtime";
|
|
|
35179
35415
|
import React51 from "react";
|
|
35180
35416
|
import { jsx as jsx352 } from "react/jsx-runtime";
|
|
35181
35417
|
import { jsx as jsx362 } from "react/jsx-runtime";
|
|
35182
|
-
function
|
|
35418
|
+
function setRef2(ref, value) {
|
|
35183
35419
|
if (typeof ref === "function") {
|
|
35184
35420
|
return ref(value);
|
|
35185
35421
|
} else if (ref !== null && ref !== undefined) {
|
|
@@ -35190,7 +35426,7 @@ function composeRefs(...refs) {
|
|
|
35190
35426
|
return (node) => {
|
|
35191
35427
|
let hasCleanup = false;
|
|
35192
35428
|
const cleanups = refs.map((ref) => {
|
|
35193
|
-
const cleanup =
|
|
35429
|
+
const cleanup = setRef2(ref, node);
|
|
35194
35430
|
if (!hasCleanup && typeof cleanup == "function") {
|
|
35195
35431
|
hasCleanup = true;
|
|
35196
35432
|
}
|
|
@@ -35203,7 +35439,7 @@ function composeRefs(...refs) {
|
|
|
35203
35439
|
if (typeof cleanup == "function") {
|
|
35204
35440
|
cleanup();
|
|
35205
35441
|
} else {
|
|
35206
|
-
|
|
35442
|
+
setRef2(refs[i], null);
|
|
35207
35443
|
}
|
|
35208
35444
|
}
|
|
35209
35445
|
};
|
|
@@ -35241,9 +35477,9 @@ function createSlot(ownerName) {
|
|
|
35241
35477
|
return child;
|
|
35242
35478
|
}
|
|
35243
35479
|
});
|
|
35244
|
-
return /* @__PURE__ */
|
|
35480
|
+
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React23.isValidElement(newElement) ? React23.cloneElement(newElement, undefined, newChildren) : null });
|
|
35245
35481
|
}
|
|
35246
|
-
return /* @__PURE__ */
|
|
35482
|
+
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
35247
35483
|
});
|
|
35248
35484
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
35249
35485
|
return Slot2;
|
|
@@ -35271,7 +35507,7 @@ function createSlotClone(ownerName) {
|
|
|
35271
35507
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
35272
35508
|
function createSlottable(ownerName) {
|
|
35273
35509
|
const Slottable2 = ({ children }) => {
|
|
35274
|
-
return /* @__PURE__ */
|
|
35510
|
+
return /* @__PURE__ */ jsx43(Fragment2, { children });
|
|
35275
35511
|
};
|
|
35276
35512
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
35277
35513
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -35336,7 +35572,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
35336
35572
|
return childNode;
|
|
35337
35573
|
};
|
|
35338
35574
|
var useHoverTransforms = (ref, disabled) => {
|
|
35339
|
-
const [state, setState] =
|
|
35575
|
+
const [state, setState] = React32.useState({
|
|
35340
35576
|
progress: 0,
|
|
35341
35577
|
isActive: false
|
|
35342
35578
|
});
|
|
@@ -35348,7 +35584,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
35348
35584
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
35349
35585
|
}
|
|
35350
35586
|
}, [disabled, eventTarget]);
|
|
35351
|
-
|
|
35587
|
+
React32.useEffect(() => {
|
|
35352
35588
|
const element = ref.current;
|
|
35353
35589
|
if (!element)
|
|
35354
35590
|
return;
|
|
@@ -35423,8 +35659,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
35423
35659
|
return state;
|
|
35424
35660
|
};
|
|
35425
35661
|
var useClickTransforms = (ref) => {
|
|
35426
|
-
const [hoverProgress, setHoverProgress] =
|
|
35427
|
-
|
|
35662
|
+
const [hoverProgress, setHoverProgress] = React32.useState(0);
|
|
35663
|
+
React32.useEffect(() => {
|
|
35428
35664
|
const element = getChildNodeFrom(ref.current);
|
|
35429
35665
|
if (!element) {
|
|
35430
35666
|
return;
|
|
@@ -35608,7 +35844,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
35608
35844
|
height: size
|
|
35609
35845
|
};
|
|
35610
35846
|
}, [size]);
|
|
35611
|
-
const pathsRef =
|
|
35847
|
+
const pathsRef = useRef31([]);
|
|
35612
35848
|
useEffect23(() => {
|
|
35613
35849
|
const animate = () => {
|
|
35614
35850
|
const now = performance.now();
|
|
@@ -35627,11 +35863,11 @@ var Spinner = ({ size, duration }) => {
|
|
|
35627
35863
|
cancelAnimationFrame(id);
|
|
35628
35864
|
};
|
|
35629
35865
|
}, [duration]);
|
|
35630
|
-
return /* @__PURE__ */
|
|
35866
|
+
return /* @__PURE__ */ jsx44("svg", {
|
|
35631
35867
|
style,
|
|
35632
35868
|
viewBox: `0 0 ${viewBox} ${viewBox}`,
|
|
35633
35869
|
children: new Array(lines).fill(true).map((_, index) => {
|
|
35634
|
-
return /* @__PURE__ */
|
|
35870
|
+
return /* @__PURE__ */ jsx44("path", {
|
|
35635
35871
|
ref: (el) => pathsRef.current[index] = el,
|
|
35636
35872
|
style: {
|
|
35637
35873
|
rotate: `${index * Math.PI * 2 / lines}rad`,
|
|
@@ -35654,9 +35890,9 @@ var Button = ({
|
|
|
35654
35890
|
...rest
|
|
35655
35891
|
}) => {
|
|
35656
35892
|
const [dimensions, setDimensions] = useState22(null);
|
|
35657
|
-
const ref =
|
|
35893
|
+
const ref = useRef210(null);
|
|
35658
35894
|
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
35659
|
-
const onPointerEnter =
|
|
35895
|
+
const onPointerEnter = useCallback26((e) => {
|
|
35660
35896
|
if (e.pointerType !== "mouse") {
|
|
35661
35897
|
return;
|
|
35662
35898
|
}
|
|
@@ -35693,7 +35929,7 @@ var Button = ({
|
|
|
35693
35929
|
const isDisabled = disabled || loading;
|
|
35694
35930
|
const isAnchor = !asChild && "href" in rest && rest.href !== undefined;
|
|
35695
35931
|
const sharedClasses = cn("text-text", "inline-flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex-row", "items-center", "relative", "overflow-hidden", isDisabled && "cursor-default opacity-50", className);
|
|
35696
|
-
const preventInteraction =
|
|
35932
|
+
const preventInteraction = useCallback26((e) => {
|
|
35697
35933
|
e.preventDefault();
|
|
35698
35934
|
e.stopPropagation();
|
|
35699
35935
|
}, []);
|
|
@@ -35989,7 +36225,7 @@ function composeContextScopes(...scopes) {
|
|
|
35989
36225
|
createScope.scopeName = baseScope.scopeName;
|
|
35990
36226
|
return createScope;
|
|
35991
36227
|
}
|
|
35992
|
-
function
|
|
36228
|
+
function setRef22(ref, value) {
|
|
35993
36229
|
if (typeof ref === "function") {
|
|
35994
36230
|
ref(value);
|
|
35995
36231
|
} else if (ref !== null && ref !== undefined) {
|
|
@@ -35997,7 +36233,7 @@ function setRef2(ref, value) {
|
|
|
35997
36233
|
}
|
|
35998
36234
|
}
|
|
35999
36235
|
function composeRefs2(...refs) {
|
|
36000
|
-
return (node) => refs.forEach((ref) =>
|
|
36236
|
+
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
36001
36237
|
}
|
|
36002
36238
|
function useComposedRefs2(...refs) {
|
|
36003
36239
|
return React9.useCallback(composeRefs2(...refs), refs);
|
|
@@ -39095,9 +39331,9 @@ var effectCar = createSidecarMedium();
|
|
|
39095
39331
|
var nothing = function() {
|
|
39096
39332
|
return;
|
|
39097
39333
|
};
|
|
39098
|
-
var RemoveScroll =
|
|
39099
|
-
var ref =
|
|
39100
|
-
var _a =
|
|
39334
|
+
var RemoveScroll = React312.forwardRef(function(props, parentRef) {
|
|
39335
|
+
var ref = React312.useRef(null);
|
|
39336
|
+
var _a = React312.useState({
|
|
39101
39337
|
onScrollCapture: nothing,
|
|
39102
39338
|
onWheelCapture: nothing,
|
|
39103
39339
|
onTouchMoveCapture: nothing
|
|
@@ -39106,7 +39342,7 @@ var RemoveScroll = React31.forwardRef(function(props, parentRef) {
|
|
|
39106
39342
|
var SideCar2 = sideCar;
|
|
39107
39343
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
39108
39344
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
39109
|
-
return
|
|
39345
|
+
return React312.createElement(React312.Fragment, null, enabled && React312.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }), forwardProps ? React312.cloneElement(React312.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React312.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children));
|
|
39110
39346
|
});
|
|
39111
39347
|
RemoveScroll.defaultProps = {
|
|
39112
39348
|
enabled: true,
|
|
@@ -39598,9 +39834,9 @@ var Select = (props) => {
|
|
|
39598
39834
|
required
|
|
39599
39835
|
} = props;
|
|
39600
39836
|
const popperScope = usePopperScope(__scopeSelect);
|
|
39601
|
-
const [trigger, setTrigger] =
|
|
39602
|
-
const [valueNode, setValueNode] =
|
|
39603
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
39837
|
+
const [trigger, setTrigger] = React36.useState(null);
|
|
39838
|
+
const [valueNode, setValueNode] = React36.useState(null);
|
|
39839
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React36.useState(false);
|
|
39604
39840
|
const direction = useDirection(dir);
|
|
39605
39841
|
const [open = false, setOpen] = useControllableState({
|
|
39606
39842
|
prop: openProp,
|
|
@@ -39612,9 +39848,9 @@ var Select = (props) => {
|
|
|
39612
39848
|
defaultProp: defaultValue,
|
|
39613
39849
|
onChange: onValueChange
|
|
39614
39850
|
});
|
|
39615
|
-
const triggerPointerDownPosRef =
|
|
39851
|
+
const triggerPointerDownPosRef = React36.useRef(null);
|
|
39616
39852
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
39617
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
39853
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React36.useState(/* @__PURE__ */ new Set);
|
|
39618
39854
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
39619
39855
|
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
|
|
39620
39856
|
required,
|
|
@@ -39636,10 +39872,10 @@ var Select = (props) => {
|
|
|
39636
39872
|
children: [
|
|
39637
39873
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
39638
39874
|
scope: props.__scopeSelect,
|
|
39639
|
-
onNativeOptionAdd:
|
|
39875
|
+
onNativeOptionAdd: React36.useCallback((option) => {
|
|
39640
39876
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
39641
39877
|
}, []),
|
|
39642
|
-
onNativeOptionRemove:
|
|
39878
|
+
onNativeOptionRemove: React36.useCallback((option) => {
|
|
39643
39879
|
setNativeOptionsSet((prev) => {
|
|
39644
39880
|
const optionsSet = new Set(prev);
|
|
39645
39881
|
optionsSet.delete(option);
|
|
@@ -39667,7 +39903,7 @@ var Select = (props) => {
|
|
|
39667
39903
|
};
|
|
39668
39904
|
Select.displayName = SELECT_NAME;
|
|
39669
39905
|
var TRIGGER_NAME = "SelectTrigger";
|
|
39670
|
-
var SelectTrigger =
|
|
39906
|
+
var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
39671
39907
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
39672
39908
|
const popperScope = usePopperScope(__scopeSelect);
|
|
39673
39909
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -39735,7 +39971,7 @@ var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
|
39735
39971
|
});
|
|
39736
39972
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
39737
39973
|
var VALUE_NAME = "SelectValue";
|
|
39738
|
-
var SelectValue =
|
|
39974
|
+
var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
39739
39975
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
39740
39976
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
39741
39977
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -39753,7 +39989,7 @@ var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
|
39753
39989
|
});
|
|
39754
39990
|
SelectValue.displayName = VALUE_NAME;
|
|
39755
39991
|
var ICON_NAME = "SelectIcon";
|
|
39756
|
-
var SelectIcon =
|
|
39992
|
+
var SelectIcon = React36.forwardRef((props, forwardedRef) => {
|
|
39757
39993
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
39758
39994
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
39759
39995
|
});
|
|
@@ -39764,9 +40000,9 @@ var SelectPortal = (props) => {
|
|
|
39764
40000
|
};
|
|
39765
40001
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
39766
40002
|
var CONTENT_NAME2 = "SelectContent";
|
|
39767
|
-
var SelectContent =
|
|
40003
|
+
var SelectContent = React36.forwardRef((props, forwardedRef) => {
|
|
39768
40004
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
39769
|
-
const [fragment, setFragment] =
|
|
40005
|
+
const [fragment, setFragment] = React36.useState();
|
|
39770
40006
|
useLayoutEffect22(() => {
|
|
39771
40007
|
setFragment(new DocumentFragment);
|
|
39772
40008
|
}, []);
|
|
@@ -39780,7 +40016,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
39780
40016
|
var CONTENT_MARGIN = 10;
|
|
39781
40017
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
39782
40018
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
39783
|
-
var SelectContentImpl =
|
|
40019
|
+
var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
39784
40020
|
const {
|
|
39785
40021
|
__scopeSelect,
|
|
39786
40022
|
position = "item-aligned",
|
|
@@ -39800,20 +40036,20 @@ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
|
39800
40036
|
...contentProps
|
|
39801
40037
|
} = props;
|
|
39802
40038
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
39803
|
-
const [content, setContent] =
|
|
39804
|
-
const [viewport, setViewport] =
|
|
40039
|
+
const [content, setContent] = React36.useState(null);
|
|
40040
|
+
const [viewport, setViewport] = React36.useState(null);
|
|
39805
40041
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
39806
|
-
const [selectedItem, setSelectedItem] =
|
|
39807
|
-
const [selectedItemText, setSelectedItemText] =
|
|
40042
|
+
const [selectedItem, setSelectedItem] = React36.useState(null);
|
|
40043
|
+
const [selectedItemText, setSelectedItemText] = React36.useState(null);
|
|
39808
40044
|
const getItems = useCollection(__scopeSelect);
|
|
39809
|
-
const [isPositioned, setIsPositioned] =
|
|
39810
|
-
const firstValidItemFoundRef =
|
|
39811
|
-
|
|
40045
|
+
const [isPositioned, setIsPositioned] = React36.useState(false);
|
|
40046
|
+
const firstValidItemFoundRef = React36.useRef(false);
|
|
40047
|
+
React36.useEffect(() => {
|
|
39812
40048
|
if (content)
|
|
39813
40049
|
return hideOthers(content);
|
|
39814
40050
|
}, [content]);
|
|
39815
40051
|
useFocusGuards();
|
|
39816
|
-
const focusFirst2 =
|
|
40052
|
+
const focusFirst2 = React36.useCallback((candidates) => {
|
|
39817
40053
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
39818
40054
|
const [lastItem] = restItems.slice(-1);
|
|
39819
40055
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -39830,14 +40066,14 @@ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
|
39830
40066
|
return;
|
|
39831
40067
|
}
|
|
39832
40068
|
}, [getItems, viewport]);
|
|
39833
|
-
const focusSelectedItem =
|
|
39834
|
-
|
|
40069
|
+
const focusSelectedItem = React36.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
40070
|
+
React36.useEffect(() => {
|
|
39835
40071
|
if (isPositioned) {
|
|
39836
40072
|
focusSelectedItem();
|
|
39837
40073
|
}
|
|
39838
40074
|
}, [isPositioned, focusSelectedItem]);
|
|
39839
40075
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
39840
|
-
|
|
40076
|
+
React36.useEffect(() => {
|
|
39841
40077
|
if (content) {
|
|
39842
40078
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
39843
40079
|
const handlePointerMove = (event2) => {
|
|
@@ -39867,7 +40103,7 @@ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
|
39867
40103
|
};
|
|
39868
40104
|
}
|
|
39869
40105
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
39870
|
-
|
|
40106
|
+
React36.useEffect(() => {
|
|
39871
40107
|
const close = () => onOpenChange(false);
|
|
39872
40108
|
window.addEventListener("blur", close);
|
|
39873
40109
|
window.addEventListener("resize", close);
|
|
@@ -39884,7 +40120,7 @@ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
|
39884
40120
|
setTimeout(() => nextItem.ref.current.focus());
|
|
39885
40121
|
}
|
|
39886
40122
|
});
|
|
39887
|
-
const itemRefCallback =
|
|
40123
|
+
const itemRefCallback = React36.useCallback((node, value, disabled) => {
|
|
39888
40124
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
39889
40125
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
39890
40126
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -39893,8 +40129,8 @@ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
|
39893
40129
|
firstValidItemFoundRef.current = true;
|
|
39894
40130
|
}
|
|
39895
40131
|
}, [context.value]);
|
|
39896
|
-
const handleItemLeave =
|
|
39897
|
-
const itemTextRefCallback =
|
|
40132
|
+
const handleItemLeave = React36.useCallback(() => content?.focus(), [content]);
|
|
40133
|
+
const itemTextRefCallback = React36.useCallback((node, value, disabled) => {
|
|
39898
40134
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
39899
40135
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
39900
40136
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -39989,18 +40225,18 @@ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
|
39989
40225
|
});
|
|
39990
40226
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
39991
40227
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
39992
|
-
var SelectItemAlignedPosition =
|
|
40228
|
+
var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
39993
40229
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
39994
40230
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
39995
40231
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
39996
|
-
const [contentWrapper, setContentWrapper] =
|
|
39997
|
-
const [content, setContent] =
|
|
40232
|
+
const [contentWrapper, setContentWrapper] = React36.useState(null);
|
|
40233
|
+
const [content, setContent] = React36.useState(null);
|
|
39998
40234
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
39999
40235
|
const getItems = useCollection(__scopeSelect);
|
|
40000
|
-
const shouldExpandOnScrollRef =
|
|
40001
|
-
const shouldRepositionRef =
|
|
40236
|
+
const shouldExpandOnScrollRef = React36.useRef(false);
|
|
40237
|
+
const shouldRepositionRef = React36.useRef(true);
|
|
40002
40238
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
40003
|
-
const position =
|
|
40239
|
+
const position = React36.useCallback(() => {
|
|
40004
40240
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
40005
40241
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
40006
40242
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -40081,12 +40317,12 @@ var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
|
40081
40317
|
onPlaced
|
|
40082
40318
|
]);
|
|
40083
40319
|
useLayoutEffect22(() => position(), [position]);
|
|
40084
|
-
const [contentZIndex, setContentZIndex] =
|
|
40320
|
+
const [contentZIndex, setContentZIndex] = React36.useState();
|
|
40085
40321
|
useLayoutEffect22(() => {
|
|
40086
40322
|
if (content)
|
|
40087
40323
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
40088
40324
|
}, [content]);
|
|
40089
|
-
const handleScrollButtonChange =
|
|
40325
|
+
const handleScrollButtonChange = React36.useCallback((node) => {
|
|
40090
40326
|
if (node && shouldRepositionRef.current === true) {
|
|
40091
40327
|
position();
|
|
40092
40328
|
focusSelectedItem?.();
|
|
@@ -40120,7 +40356,7 @@ var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
|
40120
40356
|
});
|
|
40121
40357
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
40122
40358
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
40123
|
-
var SelectPopperPosition =
|
|
40359
|
+
var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
40124
40360
|
const {
|
|
40125
40361
|
__scopeSelect,
|
|
40126
40362
|
align = "start",
|
|
@@ -40150,12 +40386,12 @@ var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
|
40150
40386
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
40151
40387
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
40152
40388
|
var VIEWPORT_NAME = "SelectViewport";
|
|
40153
|
-
var SelectViewport =
|
|
40389
|
+
var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
40154
40390
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
40155
40391
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
40156
40392
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
40157
40393
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
40158
|
-
const prevScrollTopRef =
|
|
40394
|
+
const prevScrollTopRef = React36.useRef(0);
|
|
40159
40395
|
return /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
40160
40396
|
/* @__PURE__ */ jsx242("style", {
|
|
40161
40397
|
dangerouslySetInnerHTML: {
|
|
@@ -40204,14 +40440,14 @@ var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
|
40204
40440
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
40205
40441
|
var GROUP_NAME = "SelectGroup";
|
|
40206
40442
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
40207
|
-
var SelectGroup =
|
|
40443
|
+
var SelectGroup = React36.forwardRef((props, forwardedRef) => {
|
|
40208
40444
|
const { __scopeSelect, ...groupProps } = props;
|
|
40209
40445
|
const groupId = useId();
|
|
40210
40446
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
40211
40447
|
});
|
|
40212
40448
|
SelectGroup.displayName = GROUP_NAME;
|
|
40213
40449
|
var LABEL_NAME = "SelectLabel";
|
|
40214
|
-
var SelectLabel =
|
|
40450
|
+
var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
40215
40451
|
const { __scopeSelect, ...labelProps } = props;
|
|
40216
40452
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
40217
40453
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -40219,7 +40455,7 @@ var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
|
40219
40455
|
SelectLabel.displayName = LABEL_NAME;
|
|
40220
40456
|
var ITEM_NAME = "SelectItem";
|
|
40221
40457
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
40222
|
-
var SelectItem =
|
|
40458
|
+
var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
40223
40459
|
const {
|
|
40224
40460
|
__scopeSelect,
|
|
40225
40461
|
value,
|
|
@@ -40230,8 +40466,8 @@ var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
|
40230
40466
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
40231
40467
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
40232
40468
|
const isSelected = context.value === value;
|
|
40233
|
-
const [textValue, setTextValue] =
|
|
40234
|
-
const [isFocused, setIsFocused] =
|
|
40469
|
+
const [textValue, setTextValue] = React36.useState(textValueProp ?? "");
|
|
40470
|
+
const [isFocused, setIsFocused] = React36.useState(false);
|
|
40235
40471
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
40236
40472
|
const textId = useId();
|
|
40237
40473
|
const handleSelect = () => {
|
|
@@ -40249,7 +40485,7 @@ var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
|
40249
40485
|
disabled,
|
|
40250
40486
|
textId,
|
|
40251
40487
|
isSelected,
|
|
40252
|
-
onItemTextChange:
|
|
40488
|
+
onItemTextChange: React36.useCallback((node) => {
|
|
40253
40489
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
40254
40490
|
}, []),
|
|
40255
40491
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -40298,16 +40534,16 @@ var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
|
40298
40534
|
});
|
|
40299
40535
|
SelectItem.displayName = ITEM_NAME;
|
|
40300
40536
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
40301
|
-
var SelectItemText =
|
|
40537
|
+
var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
40302
40538
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
40303
40539
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
40304
40540
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
40305
40541
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
40306
40542
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
40307
|
-
const [itemTextNode, setItemTextNode] =
|
|
40543
|
+
const [itemTextNode, setItemTextNode] = React36.useState(null);
|
|
40308
40544
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
40309
40545
|
const textContent = itemTextNode?.textContent;
|
|
40310
|
-
const nativeOption =
|
|
40546
|
+
const nativeOption = React36.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
40311
40547
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
40312
40548
|
useLayoutEffect22(() => {
|
|
40313
40549
|
onNativeOptionAdd(nativeOption);
|
|
@@ -40320,17 +40556,17 @@ var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
|
40320
40556
|
});
|
|
40321
40557
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
40322
40558
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
40323
|
-
var SelectItemIndicator =
|
|
40559
|
+
var SelectItemIndicator = React36.forwardRef((props, forwardedRef) => {
|
|
40324
40560
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
40325
40561
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
40326
40562
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
40327
40563
|
});
|
|
40328
40564
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
40329
40565
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
40330
|
-
var SelectScrollUpButton =
|
|
40566
|
+
var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
40331
40567
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
40332
40568
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
40333
|
-
const [canScrollUp, setCanScrollUp] =
|
|
40569
|
+
const [canScrollUp, setCanScrollUp] = React36.useState(false);
|
|
40334
40570
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
40335
40571
|
useLayoutEffect22(() => {
|
|
40336
40572
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -40358,10 +40594,10 @@ var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
|
40358
40594
|
});
|
|
40359
40595
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
40360
40596
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
40361
|
-
var SelectScrollDownButton =
|
|
40597
|
+
var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
40362
40598
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
40363
40599
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
40364
|
-
const [canScrollDown, setCanScrollDown] =
|
|
40600
|
+
const [canScrollDown, setCanScrollDown] = React36.useState(false);
|
|
40365
40601
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
40366
40602
|
useLayoutEffect22(() => {
|
|
40367
40603
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -40389,18 +40625,18 @@ var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
|
40389
40625
|
}) : null;
|
|
40390
40626
|
});
|
|
40391
40627
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
40392
|
-
var SelectScrollButtonImpl =
|
|
40628
|
+
var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
40393
40629
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
40394
40630
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
40395
|
-
const autoScrollTimerRef =
|
|
40631
|
+
const autoScrollTimerRef = React36.useRef(null);
|
|
40396
40632
|
const getItems = useCollection(__scopeSelect);
|
|
40397
|
-
const clearAutoScrollTimer =
|
|
40633
|
+
const clearAutoScrollTimer = React36.useCallback(() => {
|
|
40398
40634
|
if (autoScrollTimerRef.current !== null) {
|
|
40399
40635
|
window.clearInterval(autoScrollTimerRef.current);
|
|
40400
40636
|
autoScrollTimerRef.current = null;
|
|
40401
40637
|
}
|
|
40402
40638
|
}, []);
|
|
40403
|
-
|
|
40639
|
+
React36.useEffect(() => {
|
|
40404
40640
|
return () => clearAutoScrollTimer();
|
|
40405
40641
|
}, [clearAutoScrollTimer]);
|
|
40406
40642
|
useLayoutEffect22(() => {
|
|
@@ -40429,13 +40665,13 @@ var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
|
40429
40665
|
});
|
|
40430
40666
|
});
|
|
40431
40667
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
40432
|
-
var SelectSeparator =
|
|
40668
|
+
var SelectSeparator = React36.forwardRef((props, forwardedRef) => {
|
|
40433
40669
|
const { __scopeSelect, ...separatorProps } = props;
|
|
40434
40670
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
40435
40671
|
});
|
|
40436
40672
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
40437
40673
|
var ARROW_NAME2 = "SelectArrow";
|
|
40438
|
-
var SelectArrow =
|
|
40674
|
+
var SelectArrow = React36.forwardRef((props, forwardedRef) => {
|
|
40439
40675
|
const { __scopeSelect, ...arrowProps } = props;
|
|
40440
40676
|
const popperScope = usePopperScope(__scopeSelect);
|
|
40441
40677
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -40446,12 +40682,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
40446
40682
|
function shouldShowPlaceholder(value) {
|
|
40447
40683
|
return value === "" || value === undefined;
|
|
40448
40684
|
}
|
|
40449
|
-
var BubbleSelect =
|
|
40685
|
+
var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
40450
40686
|
const { value, ...selectProps } = props;
|
|
40451
|
-
const ref =
|
|
40687
|
+
const ref = React36.useRef(null);
|
|
40452
40688
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
40453
40689
|
const prevValue = usePrevious(value);
|
|
40454
|
-
|
|
40690
|
+
React36.useEffect(() => {
|
|
40455
40691
|
const select = ref.current;
|
|
40456
40692
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
40457
40693
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -40467,9 +40703,9 @@ var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
|
40467
40703
|
BubbleSelect.displayName = "BubbleSelect";
|
|
40468
40704
|
function useTypeaheadSearch(onSearchChange) {
|
|
40469
40705
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
40470
|
-
const searchRef =
|
|
40471
|
-
const timerRef =
|
|
40472
|
-
const handleTypeaheadSearch =
|
|
40706
|
+
const searchRef = React36.useRef("");
|
|
40707
|
+
const timerRef = React36.useRef(0);
|
|
40708
|
+
const handleTypeaheadSearch = React36.useCallback((key) => {
|
|
40473
40709
|
const search = searchRef.current + key;
|
|
40474
40710
|
handleSearchChange(search);
|
|
40475
40711
|
(function updateSearch(value) {
|
|
@@ -40479,11 +40715,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
40479
40715
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
40480
40716
|
})(search);
|
|
40481
40717
|
}, [handleSearchChange]);
|
|
40482
|
-
const resetTypeahead =
|
|
40718
|
+
const resetTypeahead = React36.useCallback(() => {
|
|
40483
40719
|
searchRef.current = "";
|
|
40484
40720
|
window.clearTimeout(timerRef.current);
|
|
40485
40721
|
}, []);
|
|
40486
|
-
|
|
40722
|
+
React36.useEffect(() => {
|
|
40487
40723
|
return () => window.clearTimeout(timerRef.current);
|
|
40488
40724
|
}, []);
|
|
40489
40725
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -40572,7 +40808,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
40572
40808
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
40573
40809
|
var Select2 = Root222;
|
|
40574
40810
|
var SelectValue2 = Value;
|
|
40575
|
-
var SelectTrigger2 =
|
|
40811
|
+
var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Trigger, {
|
|
40576
40812
|
ref,
|
|
40577
40813
|
className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
|
|
40578
40814
|
...props,
|
|
@@ -40587,7 +40823,7 @@ var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref)
|
|
|
40587
40823
|
]
|
|
40588
40824
|
}));
|
|
40589
40825
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
40590
|
-
var SelectScrollUpButton2 =
|
|
40826
|
+
var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
40591
40827
|
ref,
|
|
40592
40828
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
40593
40829
|
...props,
|
|
@@ -40596,7 +40832,7 @@ var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) =>
|
|
|
40596
40832
|
})
|
|
40597
40833
|
}));
|
|
40598
40834
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
40599
|
-
var SelectScrollDownButton2 =
|
|
40835
|
+
var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
40600
40836
|
ref,
|
|
40601
40837
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
40602
40838
|
...props,
|
|
@@ -40605,7 +40841,7 @@ var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref)
|
|
|
40605
40841
|
})
|
|
40606
40842
|
}));
|
|
40607
40843
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
40608
|
-
var SelectContent2 =
|
|
40844
|
+
var SelectContent2 = React372.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
40609
40845
|
children: /* @__PURE__ */ jsxs52(Content2, {
|
|
40610
40846
|
ref,
|
|
40611
40847
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
@@ -40622,13 +40858,13 @@ var SelectContent2 = React37.forwardRef(({ className, children, position = "popp
|
|
|
40622
40858
|
})
|
|
40623
40859
|
}));
|
|
40624
40860
|
SelectContent2.displayName = Content2.displayName;
|
|
40625
|
-
var SelectLabel2 =
|
|
40861
|
+
var SelectLabel2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
40626
40862
|
ref,
|
|
40627
40863
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
40628
40864
|
...props
|
|
40629
40865
|
}));
|
|
40630
40866
|
SelectLabel2.displayName = Label.displayName;
|
|
40631
|
-
var SelectItem2 =
|
|
40867
|
+
var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Item, {
|
|
40632
40868
|
ref,
|
|
40633
40869
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
40634
40870
|
...props,
|
|
@@ -40647,7 +40883,7 @@ var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
40647
40883
|
]
|
|
40648
40884
|
}));
|
|
40649
40885
|
SelectItem2.displayName = Item.displayName;
|
|
40650
|
-
var SelectSeparator2 =
|
|
40886
|
+
var SelectSeparator2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
40651
40887
|
ref,
|
|
40652
40888
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
40653
40889
|
...props
|
|
@@ -40680,19 +40916,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
40680
40916
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
40681
40917
|
let defaultContexts = [];
|
|
40682
40918
|
function createContext32(rootComponentName, defaultContext) {
|
|
40683
|
-
const BaseContext =
|
|
40919
|
+
const BaseContext = React38.createContext(defaultContext);
|
|
40684
40920
|
const index2 = defaultContexts.length;
|
|
40685
40921
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
40686
40922
|
const Provider = (props) => {
|
|
40687
40923
|
const { scope, children, ...context } = props;
|
|
40688
40924
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
40689
|
-
const value =
|
|
40925
|
+
const value = React38.useMemo(() => context, Object.values(context));
|
|
40690
40926
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
40691
40927
|
};
|
|
40692
40928
|
Provider.displayName = rootComponentName + "Provider";
|
|
40693
40929
|
function useContext222(consumerName, scope) {
|
|
40694
40930
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
40695
|
-
const context =
|
|
40931
|
+
const context = React38.useContext(Context);
|
|
40696
40932
|
if (context)
|
|
40697
40933
|
return context;
|
|
40698
40934
|
if (defaultContext !== undefined)
|
|
@@ -40703,11 +40939,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
40703
40939
|
}
|
|
40704
40940
|
const createScope = () => {
|
|
40705
40941
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
40706
|
-
return
|
|
40942
|
+
return React38.createContext(defaultContext);
|
|
40707
40943
|
});
|
|
40708
40944
|
return function useScope(scope) {
|
|
40709
40945
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
40710
|
-
return
|
|
40946
|
+
return React38.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
40711
40947
|
};
|
|
40712
40948
|
};
|
|
40713
40949
|
createScope.scopeName = scopeName;
|
|
@@ -40728,7 +40964,7 @@ function composeContextScopes2(...scopes) {
|
|
|
40728
40964
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
40729
40965
|
return { ...nextScopes2, ...currentScope };
|
|
40730
40966
|
}, {});
|
|
40731
|
-
return
|
|
40967
|
+
return React38.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
40732
40968
|
};
|
|
40733
40969
|
};
|
|
40734
40970
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -40821,14 +41057,14 @@ function createCollection2(name) {
|
|
|
40821
41057
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
40822
41058
|
const CollectionProvider = (props) => {
|
|
40823
41059
|
const { scope, children } = props;
|
|
40824
|
-
const ref =
|
|
40825
|
-
const itemMap =
|
|
41060
|
+
const ref = React402.useRef(null);
|
|
41061
|
+
const itemMap = React402.useRef(/* @__PURE__ */ new Map).current;
|
|
40826
41062
|
return /* @__PURE__ */ jsx292(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
40827
41063
|
};
|
|
40828
41064
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
40829
41065
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
40830
41066
|
const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);
|
|
40831
|
-
const CollectionSlot =
|
|
41067
|
+
const CollectionSlot = React402.forwardRef((props, forwardedRef) => {
|
|
40832
41068
|
const { scope, children } = props;
|
|
40833
41069
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
40834
41070
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
@@ -40838,12 +41074,12 @@ function createCollection2(name) {
|
|
|
40838
41074
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
40839
41075
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
40840
41076
|
const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);
|
|
40841
|
-
const CollectionItemSlot =
|
|
41077
|
+
const CollectionItemSlot = React402.forwardRef((props, forwardedRef) => {
|
|
40842
41078
|
const { scope, children, ...itemData } = props;
|
|
40843
|
-
const ref =
|
|
41079
|
+
const ref = React402.useRef(null);
|
|
40844
41080
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
40845
41081
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
40846
|
-
|
|
41082
|
+
React402.useEffect(() => {
|
|
40847
41083
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
40848
41084
|
return () => void context.itemMap.delete(ref);
|
|
40849
41085
|
});
|
|
@@ -40852,7 +41088,7 @@ function createCollection2(name) {
|
|
|
40852
41088
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
40853
41089
|
function useCollection2(scope) {
|
|
40854
41090
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
40855
|
-
const getItems =
|
|
41091
|
+
const getItems = React402.useCallback(() => {
|
|
40856
41092
|
const collectionNode = context.collectionRef.current;
|
|
40857
41093
|
if (!collectionNode)
|
|
40858
41094
|
return [];
|
|
@@ -41170,13 +41406,13 @@ function toSafeIndex(array, index2) {
|
|
|
41170
41406
|
function toSafeInteger(number) {
|
|
41171
41407
|
return number !== number || number === 0 ? 0 : Math.trunc(number);
|
|
41172
41408
|
}
|
|
41173
|
-
var useLayoutEffect222 = globalThis?.document ?
|
|
41174
|
-
var useReactId2 =
|
|
41409
|
+
var useLayoutEffect222 = globalThis?.document ? React41.useLayoutEffect : () => {};
|
|
41410
|
+
var useReactId2 = React422[" useId ".trim().toString()] || (() => {
|
|
41175
41411
|
return;
|
|
41176
41412
|
});
|
|
41177
41413
|
var count3 = 0;
|
|
41178
41414
|
function useId2(deterministicId) {
|
|
41179
|
-
const [id, setId] =
|
|
41415
|
+
const [id, setId] = React422.useState(useReactId2());
|
|
41180
41416
|
useLayoutEffect222(() => {
|
|
41181
41417
|
if (!deterministicId)
|
|
41182
41418
|
setId((reactId) => reactId ?? String(count3++));
|
|
@@ -41787,18 +42023,18 @@ var Triangle22 = (props) => {
|
|
|
41787
42023
|
};
|
|
41788
42024
|
|
|
41789
42025
|
// src/components/prompts/CopyPromptButton.tsx
|
|
41790
|
-
import { useCallback as
|
|
42026
|
+
import { useCallback as useCallback37, useState as useState38 } from "react";
|
|
41791
42027
|
|
|
41792
42028
|
// src/components/prompts/ClipboardIcon.tsx
|
|
41793
|
-
import { jsx as
|
|
42029
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
41794
42030
|
var ClipboardIcon = ({ size: size4 = 16, color = "currentColor" }) => {
|
|
41795
|
-
return /* @__PURE__ */
|
|
42031
|
+
return /* @__PURE__ */ jsx45("svg", {
|
|
41796
42032
|
width: size4,
|
|
41797
42033
|
height: size4,
|
|
41798
42034
|
viewBox: "0 0 448 512",
|
|
41799
42035
|
fill: color,
|
|
41800
42036
|
xmlns: "http://www.w3.org/2000/svg",
|
|
41801
|
-
children: /* @__PURE__ */
|
|
42037
|
+
children: /* @__PURE__ */ jsx45("path", {
|
|
41802
42038
|
d: "M193.8 57.5c4.5-33.1 42.1-29 51 2 3.1 11.3 4.6 23.4 5.2 36.5l-60.1 0c.8-13.8 2.1-27.5 3.9-38.5zM303.1 32.4c-28.6-78.7-141.6-84.6-168.4-2-1-.1-52.9 .6-53.9 .6-83.2 4.6-88.7 75.4-86.5 143l0 1.5c-.8 85.3-5.3 182.8 8.1 262.5 1.6 36.1 28.4 68.6 66.9 71.6 86.7 9.3 178.9 6.3 266.1 .3 55 3.5 106.6-13.8 106.2-76.2-.7-18.9-.6-35.3 1-47.3 5.8-92.7 3.3-165.2-.5-267.9-1.7-46.5-39.3-83.6-85.8-84.8l-53.2-1.3zm10.9 64.3c20.6 2.3 62.6-7.6 64.1 24.2 3.8 102.5 6.2 171.9 .7 260.5-3.9 17.9 2 43.3-3.2 61.1-10.9 4.9-24.9 1.6-38.4 3.2-87.3 5.5-171.5 9.8-262.7 0-3.3-.3-7.2-3.2-7.7-8.6-13.6-84.2-9.3-175.1-8.5-260.2 5-25.2-12.6-79.3 23.2-82l44.4-.5c-2.6 27.2-4.4 64.6 31.1 65.5l125.3 0c34.4-.6 33.8-37 31.7-63.3z"
|
|
41803
42039
|
})
|
|
41804
42040
|
});
|
|
@@ -41808,7 +42044,7 @@ var ClipboardIcon = ({ size: size4 = 16, color = "currentColor" }) => {
|
|
|
41808
42044
|
import { jsx as jsx46, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
41809
42045
|
var CopyPromptButton = ({ prompt }) => {
|
|
41810
42046
|
const [copied, setCopied] = useState38(false);
|
|
41811
|
-
const onCopy =
|
|
42047
|
+
const onCopy = useCallback37(() => {
|
|
41812
42048
|
navigator.clipboard.writeText(prompt);
|
|
41813
42049
|
setCopied(true);
|
|
41814
42050
|
setTimeout(() => setCopied(false), 2000);
|
|
@@ -41837,7 +42073,7 @@ var CopyPromptButton = ({ prompt }) => {
|
|
|
41837
42073
|
};
|
|
41838
42074
|
|
|
41839
42075
|
// src/components/prompts/LikeButton.tsx
|
|
41840
|
-
import { useCallback as
|
|
42076
|
+
import { useCallback as useCallback39, useEffect as useEffect41, useState as useState40 } from "react";
|
|
41841
42077
|
|
|
41842
42078
|
// src/components/prompts/config.ts
|
|
41843
42079
|
var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
|
|
@@ -41914,13 +42150,13 @@ var getRelativeTime = (dateStr) => {
|
|
|
41914
42150
|
};
|
|
41915
42151
|
|
|
41916
42152
|
// src/components/prompts/use-heart-animation.ts
|
|
41917
|
-
import { useCallback as
|
|
42153
|
+
import { useCallback as useCallback38, useRef as useRef47, useState as useState39 } from "react";
|
|
41918
42154
|
var DURATION = 300;
|
|
41919
42155
|
var useHeartAnimation = () => {
|
|
41920
42156
|
const [scale, setScale] = useState39(1);
|
|
41921
42157
|
const [roundness, setRoundness] = useState39(0.09);
|
|
41922
|
-
const rafRef =
|
|
41923
|
-
const animate =
|
|
42158
|
+
const rafRef = useRef47(0);
|
|
42159
|
+
const animate = useCallback38(() => {
|
|
41924
42160
|
cancelAnimationFrame(rafRef.current);
|
|
41925
42161
|
const start = performance.now();
|
|
41926
42162
|
const tick = (now) => {
|
|
@@ -41951,7 +42187,7 @@ var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
|
41951
42187
|
useEffect41(() => {
|
|
41952
42188
|
setLiked(getLikedIds().has(submissionId));
|
|
41953
42189
|
}, [submissionId]);
|
|
41954
|
-
const onClick =
|
|
42190
|
+
const onClick = useCallback39(async () => {
|
|
41955
42191
|
if (liked) {
|
|
41956
42192
|
setLiked(false);
|
|
41957
42193
|
setLikeCount((c2) => c2 - 1);
|
|
@@ -42024,80 +42260,80 @@ function useMediaContext2() {
|
|
|
42024
42260
|
var AirPlayButtonBridge = createReactComponent(AirPlayButtonInstance, {
|
|
42025
42261
|
domEventsRegex: /^onMedia/
|
|
42026
42262
|
});
|
|
42027
|
-
var AirPlayButton2 = React58.forwardRef(({ children, ...props },
|
|
42263
|
+
var AirPlayButton2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42028
42264
|
return /* @__PURE__ */ React58.createElement(AirPlayButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42029
42265
|
...props2,
|
|
42030
|
-
ref: composeRefs3(props2.ref,
|
|
42266
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42031
42267
|
}, children));
|
|
42032
42268
|
});
|
|
42033
42269
|
AirPlayButton2.displayName = "AirPlayButton";
|
|
42034
42270
|
var PlayButtonBridge = createReactComponent(PlayButtonInstance, {
|
|
42035
42271
|
domEventsRegex: /^onMedia/
|
|
42036
42272
|
});
|
|
42037
|
-
var PlayButton2 = React58.forwardRef(({ children, ...props },
|
|
42273
|
+
var PlayButton2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42038
42274
|
return /* @__PURE__ */ React58.createElement(PlayButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42039
42275
|
...props2,
|
|
42040
|
-
ref: composeRefs3(props2.ref,
|
|
42276
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42041
42277
|
}, children));
|
|
42042
42278
|
});
|
|
42043
42279
|
PlayButton2.displayName = "PlayButton";
|
|
42044
42280
|
var CaptionButtonBridge = createReactComponent(CaptionButtonInstance, {
|
|
42045
42281
|
domEventsRegex: /^onMedia/
|
|
42046
42282
|
});
|
|
42047
|
-
var CaptionButton2 = React58.forwardRef(({ children, ...props },
|
|
42283
|
+
var CaptionButton2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42048
42284
|
return /* @__PURE__ */ React58.createElement(CaptionButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42049
42285
|
...props2,
|
|
42050
|
-
ref: composeRefs3(props2.ref,
|
|
42286
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42051
42287
|
}, children));
|
|
42052
42288
|
});
|
|
42053
42289
|
CaptionButton2.displayName = "CaptionButton";
|
|
42054
42290
|
var FullscreenButtonBridge = createReactComponent(FullscreenButtonInstance, {
|
|
42055
42291
|
domEventsRegex: /^onMedia/
|
|
42056
42292
|
});
|
|
42057
|
-
var FullscreenButton2 = React58.forwardRef(({ children, ...props },
|
|
42293
|
+
var FullscreenButton2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42058
42294
|
return /* @__PURE__ */ React58.createElement(FullscreenButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42059
42295
|
...props2,
|
|
42060
|
-
ref: composeRefs3(props2.ref,
|
|
42296
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42061
42297
|
}, children));
|
|
42062
42298
|
});
|
|
42063
42299
|
FullscreenButton2.displayName = "FullscreenButton";
|
|
42064
42300
|
var MuteButtonBridge = createReactComponent(MuteButtonInstance, {
|
|
42065
42301
|
domEventsRegex: /^onMedia/
|
|
42066
42302
|
});
|
|
42067
|
-
var MuteButton2 = React58.forwardRef(({ children, ...props },
|
|
42303
|
+
var MuteButton2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42068
42304
|
return /* @__PURE__ */ React58.createElement(MuteButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42069
42305
|
...props2,
|
|
42070
|
-
ref: composeRefs3(props2.ref,
|
|
42306
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42071
42307
|
}, children));
|
|
42072
42308
|
});
|
|
42073
42309
|
MuteButton2.displayName = "MuteButton";
|
|
42074
42310
|
var PIPButtonBridge = createReactComponent(PIPButtonInstance, {
|
|
42075
42311
|
domEventsRegex: /^onMedia/
|
|
42076
42312
|
});
|
|
42077
|
-
var PIPButton2 = React58.forwardRef(({ children, ...props },
|
|
42313
|
+
var PIPButton2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42078
42314
|
return /* @__PURE__ */ React58.createElement(PIPButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42079
42315
|
...props2,
|
|
42080
|
-
ref: composeRefs3(props2.ref,
|
|
42316
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42081
42317
|
}, children));
|
|
42082
42318
|
});
|
|
42083
42319
|
PIPButton2.displayName = "PIPButton";
|
|
42084
42320
|
var SeekButtonBridge = createReactComponent(SeekButtonInstance, {
|
|
42085
42321
|
domEventsRegex: /^onMedia/
|
|
42086
42322
|
});
|
|
42087
|
-
var SeekButton2 = React58.forwardRef(({ children, ...props },
|
|
42323
|
+
var SeekButton2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42088
42324
|
return /* @__PURE__ */ React58.createElement(SeekButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42089
42325
|
...props2,
|
|
42090
|
-
ref: composeRefs3(props2.ref,
|
|
42326
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42091
42327
|
}, children));
|
|
42092
42328
|
});
|
|
42093
42329
|
SeekButton2.displayName = "SeekButton";
|
|
42094
42330
|
var LiveButtonBridge = createReactComponent(LiveButtonInstance, {
|
|
42095
42331
|
domEventsRegex: /^onMedia/
|
|
42096
42332
|
});
|
|
42097
|
-
var LiveButton2 = React58.forwardRef(({ children, ...props },
|
|
42333
|
+
var LiveButton2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42098
42334
|
return /* @__PURE__ */ React58.createElement(LiveButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42099
42335
|
...props2,
|
|
42100
|
-
ref: composeRefs3(props2.ref,
|
|
42336
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42101
42337
|
}, children));
|
|
42102
42338
|
});
|
|
42103
42339
|
LiveButton2.displayName = "LiveButton";
|
|
@@ -42112,42 +42348,42 @@ var SliderValueBridge = createReactComponent(SliderValueInstance);
|
|
|
42112
42348
|
var SliderBridge = createReactComponent(SliderInstance, {
|
|
42113
42349
|
events: sliderCallbacks
|
|
42114
42350
|
});
|
|
42115
|
-
var Root$5 = React58.forwardRef(({ children, ...props },
|
|
42116
|
-
return /* @__PURE__ */ React58.createElement(SliderBridge, { ...props, ref:
|
|
42351
|
+
var Root$5 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42352
|
+
return /* @__PURE__ */ React58.createElement(SliderBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
|
|
42117
42353
|
});
|
|
42118
42354
|
Root$5.displayName = "Slider";
|
|
42119
|
-
var Thumb = React58.forwardRef((props,
|
|
42355
|
+
var Thumb = React58.forwardRef((props, forwardRef18) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef18 }));
|
|
42120
42356
|
Thumb.displayName = "SliderThumb";
|
|
42121
|
-
var Track = React58.forwardRef((props,
|
|
42357
|
+
var Track = React58.forwardRef((props, forwardRef18) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef18 }));
|
|
42122
42358
|
Track.displayName = "SliderTrack";
|
|
42123
|
-
var TrackFill = React58.forwardRef((props,
|
|
42359
|
+
var TrackFill = React58.forwardRef((props, forwardRef18) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef18 }));
|
|
42124
42360
|
TrackFill.displayName = "SliderTrackFill";
|
|
42125
42361
|
var PreviewBridge = createReactComponent(SliderPreviewInstance);
|
|
42126
|
-
var Preview = React58.forwardRef(({ children, ...props },
|
|
42362
|
+
var Preview = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42127
42363
|
return /* @__PURE__ */ React58.createElement(PreviewBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
|
|
42128
42364
|
...props2,
|
|
42129
|
-
ref: composeRefs3(props2.ref,
|
|
42365
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42130
42366
|
}, children));
|
|
42131
42367
|
});
|
|
42132
42368
|
Preview.displayName = "SliderPreview";
|
|
42133
|
-
var Value2 = React58.forwardRef(({ children, ...props },
|
|
42369
|
+
var Value2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42134
42370
|
return /* @__PURE__ */ React58.createElement(SliderValueBridge, { ...props }, (props2, instance) => {
|
|
42135
42371
|
const $text = useSignal(() => instance.getValueText(), instance);
|
|
42136
|
-
return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2, ref:
|
|
42372
|
+
return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2, ref: forwardRef18 }, $text, children);
|
|
42137
42373
|
});
|
|
42138
42374
|
});
|
|
42139
42375
|
Value2.displayName = "SliderValue";
|
|
42140
|
-
var Steps = React58.forwardRef(({ children, ...props },
|
|
42376
|
+
var Steps = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42141
42377
|
const $min = useSliderState("min"), $max = useSliderState("max"), $step = useSliderState("step"), steps = ($max - $min) / $step;
|
|
42142
|
-
return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref:
|
|
42378
|
+
return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef18 }, Array.from({ length: Math.floor(steps) + 1 }).map((_, step) => children(step)));
|
|
42143
42379
|
});
|
|
42144
42380
|
Steps.displayName = "SliderSteps";
|
|
42145
42381
|
var VolumeSliderBridge = createReactComponent(VolumeSliderInstance, {
|
|
42146
42382
|
events: sliderCallbacks,
|
|
42147
42383
|
domEventsRegex: /^onMedia/
|
|
42148
42384
|
});
|
|
42149
|
-
var Root$4 = React58.forwardRef(({ children, ...props },
|
|
42150
|
-
return /* @__PURE__ */ React58.createElement(VolumeSliderBridge, { ...props, ref:
|
|
42385
|
+
var Root$4 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42386
|
+
return /* @__PURE__ */ React58.createElement(VolumeSliderBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
|
|
42151
42387
|
});
|
|
42152
42388
|
Root$4.displayName = "VolumeSlider";
|
|
42153
42389
|
function createVTTCue(startTime = 0, endTime = 0, text = "") {
|
|
@@ -42171,20 +42407,20 @@ function appendParamsToURL2(baseUrl, params) {
|
|
|
42171
42407
|
return url.toString();
|
|
42172
42408
|
}
|
|
42173
42409
|
var ThumbnailBridge = createReactComponent(ThumbnailInstance);
|
|
42174
|
-
var Root$3 = React58.forwardRef(({ children, ...props },
|
|
42410
|
+
var Root$3 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42175
42411
|
return /* @__PURE__ */ React58.createElement(ThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
|
|
42176
42412
|
...props2,
|
|
42177
|
-
ref: composeRefs3(props2.ref,
|
|
42413
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42178
42414
|
}, children));
|
|
42179
42415
|
});
|
|
42180
42416
|
Root$3.displayName = "Thumbnail";
|
|
42181
|
-
var Img2 = React58.forwardRef(({ children, ...props },
|
|
42417
|
+
var Img2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42182
42418
|
const { src, img, crossOrigin } = useStateContext(ThumbnailInstance.state), $src = useSignal(src), $crossOrigin = useSignal(crossOrigin);
|
|
42183
42419
|
return /* @__PURE__ */ React58.createElement(Primitive3.img, {
|
|
42184
42420
|
crossOrigin: $crossOrigin,
|
|
42185
42421
|
...props,
|
|
42186
42422
|
src: $src || undefined,
|
|
42187
|
-
ref: composeRefs3(img.set,
|
|
42423
|
+
ref: composeRefs3(img.set, forwardRef18)
|
|
42188
42424
|
}, children);
|
|
42189
42425
|
});
|
|
42190
42426
|
Img2.displayName = "ThumbnailImg";
|
|
@@ -42196,16 +42432,16 @@ var TimeSliderBridge = createReactComponent(TimeSliderInstance, {
|
|
|
42196
42432
|
events: sliderCallbacks,
|
|
42197
42433
|
domEventsRegex: /^onMedia/
|
|
42198
42434
|
});
|
|
42199
|
-
var Root$2 = React58.forwardRef(({ children, ...props },
|
|
42435
|
+
var Root$2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42200
42436
|
const $chapters = React58.useMemo(() => signal(null), []);
|
|
42201
|
-
return /* @__PURE__ */ React58.createElement(TimeSliderContext.Provider, { value: { $chapters } }, /* @__PURE__ */ React58.createElement(TimeSliderBridge, { ...props, ref:
|
|
42437
|
+
return /* @__PURE__ */ React58.createElement(TimeSliderContext.Provider, { value: { $chapters } }, /* @__PURE__ */ React58.createElement(TimeSliderBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children)));
|
|
42202
42438
|
});
|
|
42203
42439
|
Root$2.displayName = "TimeSlider";
|
|
42204
42440
|
var SliderChaptersBridge = createReactComponent(SliderChaptersInstance);
|
|
42205
|
-
var Chapters = React58.forwardRef(({ children, ...props },
|
|
42441
|
+
var Chapters = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42206
42442
|
return /* @__PURE__ */ React58.createElement(SliderChaptersBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
|
|
42207
42443
|
...props2,
|
|
42208
|
-
ref: composeRefs3(props2.ref,
|
|
42444
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42209
42445
|
}, /* @__PURE__ */ React58.createElement(ChapterTracks, { instance }, children)));
|
|
42210
42446
|
});
|
|
42211
42447
|
Chapters.displayName = "SliderChapters";
|
|
@@ -42230,7 +42466,7 @@ function ChapterTracks({ instance, children }) {
|
|
|
42230
42466
|
});
|
|
42231
42467
|
}
|
|
42232
42468
|
ChapterTracks.displayName = "SliderChapterTracks";
|
|
42233
|
-
var ChapterTitle = React58.forwardRef(({ children, ...props },
|
|
42469
|
+
var ChapterTitle = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42234
42470
|
const { $chapters } = React58.useContext(TimeSliderContext), [title, setTitle] = React58.useState();
|
|
42235
42471
|
React58.useEffect(() => {
|
|
42236
42472
|
return effect(() => {
|
|
@@ -42238,14 +42474,14 @@ var ChapterTitle = React58.forwardRef(({ children, ...props }, forwardRef17) =>
|
|
|
42238
42474
|
setTitle(cue?.text || "");
|
|
42239
42475
|
});
|
|
42240
42476
|
}, []);
|
|
42241
|
-
return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref:
|
|
42477
|
+
return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef18 }, title, children);
|
|
42242
42478
|
});
|
|
42243
42479
|
ChapterTitle.displayName = "SliderChapterTitle";
|
|
42244
|
-
var Progress = React58.forwardRef((props,
|
|
42480
|
+
var Progress = React58.forwardRef((props, forwardRef18) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef18 }));
|
|
42245
42481
|
Progress.displayName = "SliderProgress";
|
|
42246
42482
|
var SliderThumbnailBridge = createReactComponent(SliderThumbnailInstance);
|
|
42247
|
-
var ThumbnailRoot = React58.forwardRef(({ children, ...props },
|
|
42248
|
-
return /* @__PURE__ */ React58.createElement(SliderThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2, ref: composeRefs3(props2.ref,
|
|
42483
|
+
var ThumbnailRoot = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42484
|
+
return /* @__PURE__ */ React58.createElement(SliderThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2, ref: composeRefs3(props2.ref, forwardRef18) }, children));
|
|
42249
42485
|
});
|
|
42250
42486
|
ThumbnailRoot.displayName = "SliderThumbnail";
|
|
42251
42487
|
var Thumbnail2 = {
|
|
@@ -42255,15 +42491,15 @@ var Thumbnail2 = {
|
|
|
42255
42491
|
var VideoBridge = createReactComponent(SliderVideoInstance, {
|
|
42256
42492
|
events: ["onCanPlay", "onError"]
|
|
42257
42493
|
});
|
|
42258
|
-
var Video = React58.forwardRef(({ children, ...props },
|
|
42494
|
+
var Video = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42259
42495
|
return /* @__PURE__ */ React58.createElement(VideoBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React58.createElement(VideoProvider2, {
|
|
42260
42496
|
...props2,
|
|
42261
42497
|
instance,
|
|
42262
|
-
ref: composeRefs3(props2.ref,
|
|
42498
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42263
42499
|
}, children));
|
|
42264
42500
|
});
|
|
42265
42501
|
Video.displayName = "SliderVideo";
|
|
42266
|
-
var VideoProvider2 = React58.forwardRef(({ instance, children, ...props },
|
|
42502
|
+
var VideoProvider2 = React58.forwardRef(({ instance, children, ...props }, forwardRef18) => {
|
|
42267
42503
|
const { canLoad } = useStateContext(mediaState), { src, video, crossOrigin } = instance.$state, $src = useSignal(src), $canLoad = useSignal(canLoad), $crossOrigin = useSignal(crossOrigin);
|
|
42268
42504
|
return /* @__PURE__ */ React58.createElement(Primitive3.video, {
|
|
42269
42505
|
style: { maxWidth: "unset" },
|
|
@@ -42273,24 +42509,24 @@ var VideoProvider2 = React58.forwardRef(({ instance, children, ...props }, forwa
|
|
|
42273
42509
|
playsInline: true,
|
|
42274
42510
|
preload: $canLoad ? "auto" : "none",
|
|
42275
42511
|
crossOrigin: $crossOrigin || undefined,
|
|
42276
|
-
ref: composeRefs3(video.set,
|
|
42512
|
+
ref: composeRefs3(video.set, forwardRef18)
|
|
42277
42513
|
}, children);
|
|
42278
42514
|
});
|
|
42279
42515
|
VideoProvider2.displayName = "SliderVideoProvider";
|
|
42280
42516
|
var RadioGroupBridge = createReactComponent(RadioGroupInstance, {
|
|
42281
42517
|
events: ["onChange"]
|
|
42282
42518
|
});
|
|
42283
|
-
var Root$1 = React58.forwardRef(({ children, ...props },
|
|
42284
|
-
return /* @__PURE__ */ React58.createElement(RadioGroupBridge, { ...props, ref:
|
|
42519
|
+
var Root$1 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42520
|
+
return /* @__PURE__ */ React58.createElement(RadioGroupBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
|
|
42285
42521
|
});
|
|
42286
42522
|
Root$1.displayName = "RadioGroup";
|
|
42287
42523
|
var ItemBridge$1 = createReactComponent(RadioInstance, {
|
|
42288
42524
|
events: ["onChange", "onSelect"]
|
|
42289
42525
|
});
|
|
42290
|
-
var Item$1 = React58.forwardRef(({ children, ...props },
|
|
42526
|
+
var Item$1 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42291
42527
|
return /* @__PURE__ */ React58.createElement(ItemBridge$1, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
|
|
42292
42528
|
...props2,
|
|
42293
|
-
ref: composeRefs3(props2.ref,
|
|
42529
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42294
42530
|
}, children));
|
|
42295
42531
|
});
|
|
42296
42532
|
Item$1.displayName = "RadioItem";
|
|
@@ -42298,8 +42534,8 @@ var MenuBridge = createReactComponent(MenuInstance, {
|
|
|
42298
42534
|
events: ["onOpen", "onClose"],
|
|
42299
42535
|
domEventsRegex: /^onMedia/
|
|
42300
42536
|
});
|
|
42301
|
-
var Root4 = React58.forwardRef(({ children, ...props },
|
|
42302
|
-
return /* @__PURE__ */ React58.createElement(MenuBridge, { ...props, ref:
|
|
42537
|
+
var Root4 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42538
|
+
return /* @__PURE__ */ React58.createElement(MenuBridge, { ...props, ref: forwardRef18 }, (props2, instance) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
|
|
42303
42539
|
...props2,
|
|
42304
42540
|
style: { display: !instance.isSubmenu ? "contents" : undefined, ...props2.style }
|
|
42305
42541
|
}, children));
|
|
@@ -42308,14 +42544,14 @@ Root4.displayName = "Menu";
|
|
|
42308
42544
|
var ButtonBridge = createReactComponent(MenuButtonInstance, {
|
|
42309
42545
|
events: ["onSelect"]
|
|
42310
42546
|
});
|
|
42311
|
-
var Button2 = React58.forwardRef(({ children, ...props },
|
|
42547
|
+
var Button2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42312
42548
|
return /* @__PURE__ */ React58.createElement(ButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
|
|
42313
42549
|
...props2,
|
|
42314
|
-
ref: composeRefs3(props2.ref,
|
|
42550
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42315
42551
|
}, children));
|
|
42316
42552
|
});
|
|
42317
42553
|
Button2.displayName = "MenuButton";
|
|
42318
|
-
var Portal3 = React58.forwardRef(({ container: container3 = null, disabled = false, children, ...props },
|
|
42554
|
+
var Portal3 = React58.forwardRef(({ container: container3 = null, disabled = false, children, ...props }, forwardRef18) => {
|
|
42319
42555
|
let fullscreen = useMediaState("fullscreen"), shouldPortal = disabled === "fullscreen" ? !fullscreen : !disabled;
|
|
42320
42556
|
const target = React58.useMemo(() => {
|
|
42321
42557
|
if (IS_SERVER3)
|
|
@@ -42326,45 +42562,45 @@ var Portal3 = React58.forwardRef(({ container: container3 = null, disabled = fal
|
|
|
42326
42562
|
return !target || !shouldPortal ? children : createPortal3(/* @__PURE__ */ React58.createElement(Primitive3.div, {
|
|
42327
42563
|
...props,
|
|
42328
42564
|
style: { display: "contents", ...props.style },
|
|
42329
|
-
ref:
|
|
42565
|
+
ref: forwardRef18
|
|
42330
42566
|
}, children), target);
|
|
42331
42567
|
});
|
|
42332
42568
|
Portal3.displayName = "MenuPortal";
|
|
42333
42569
|
var ItemsBridge = createReactComponent(MenuItemsInstance);
|
|
42334
|
-
var Items = React58.forwardRef(({ children, ...props },
|
|
42570
|
+
var Items = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42335
42571
|
return /* @__PURE__ */ React58.createElement(ItemsBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
|
|
42336
42572
|
...props2,
|
|
42337
|
-
ref: composeRefs3(props2.ref,
|
|
42573
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42338
42574
|
}, children));
|
|
42339
42575
|
});
|
|
42340
42576
|
Items.displayName = "MenuItems";
|
|
42341
42577
|
var ItemBridge = createReactComponent(MenuItemInstance);
|
|
42342
|
-
var Item3 = React58.forwardRef(({ children, ...props },
|
|
42578
|
+
var Item3 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42343
42579
|
return /* @__PURE__ */ React58.createElement(ItemBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
|
|
42344
42580
|
...props2,
|
|
42345
|
-
ref: composeRefs3(props2.ref,
|
|
42581
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42346
42582
|
}, children));
|
|
42347
42583
|
});
|
|
42348
42584
|
Item3.displayName = "MenuItem";
|
|
42349
42585
|
var GestureBridge = createReactComponent(GestureInstance, {
|
|
42350
42586
|
events: ["onWillTrigger", "onTrigger"]
|
|
42351
42587
|
});
|
|
42352
|
-
var Gesture2 = React58.forwardRef(({ children, ...props },
|
|
42353
|
-
return /* @__PURE__ */ React58.createElement(GestureBridge, { ...props, ref:
|
|
42588
|
+
var Gesture2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42589
|
+
return /* @__PURE__ */ React58.createElement(GestureBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
|
|
42354
42590
|
});
|
|
42355
42591
|
Gesture2.displayName = "Gesture";
|
|
42356
42592
|
var TimeBridge = createReactComponent(TimeInstance);
|
|
42357
|
-
var Time2 = React58.forwardRef(({ children, ...props },
|
|
42593
|
+
var Time2 = React58.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42358
42594
|
return /* @__PURE__ */ React58.createElement(TimeBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React58.createElement(TimeText, {
|
|
42359
42595
|
...props2,
|
|
42360
42596
|
instance,
|
|
42361
|
-
ref: composeRefs3(props2.ref,
|
|
42597
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42362
42598
|
}, children));
|
|
42363
42599
|
});
|
|
42364
42600
|
Time2.displayName = "Time";
|
|
42365
|
-
var TimeText = React58.forwardRef(({ instance, children, ...props },
|
|
42601
|
+
var TimeText = React58.forwardRef(({ instance, children, ...props }, forwardRef18) => {
|
|
42366
42602
|
const { timeText } = instance.$state, $timeText = useSignal(timeText);
|
|
42367
|
-
return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref:
|
|
42603
|
+
return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef18 }, $timeText, children);
|
|
42368
42604
|
});
|
|
42369
42605
|
TimeText.displayName = "TimeText";
|
|
42370
42606
|
function useMediaPlayer() {
|
|
@@ -42468,27 +42704,27 @@ function getTrackValue(track) {
|
|
|
42468
42704
|
var MediaAnnouncerBridge = createReactComponent(MediaAnnouncerInstance, {
|
|
42469
42705
|
events: ["onChange"]
|
|
42470
42706
|
});
|
|
42471
|
-
var MediaAnnouncer2 = React59.forwardRef(({ style, children, ...props },
|
|
42707
|
+
var MediaAnnouncer2 = React59.forwardRef(({ style, children, ...props }, forwardRef18) => {
|
|
42472
42708
|
return /* @__PURE__ */ React59.createElement(MediaAnnouncerBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, {
|
|
42473
42709
|
...props2,
|
|
42474
42710
|
style: { display: "contents", ...style },
|
|
42475
|
-
ref: composeRefs3(props2.ref,
|
|
42711
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42476
42712
|
}, children));
|
|
42477
42713
|
});
|
|
42478
42714
|
MediaAnnouncer2.displayName = "MediaAnnouncer";
|
|
42479
42715
|
var ControlsBridge = createReactComponent(ControlsInstance);
|
|
42480
|
-
var Root$52 = React59.forwardRef(({ children, ...props },
|
|
42716
|
+
var Root$52 = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42481
42717
|
return /* @__PURE__ */ React59.createElement(ControlsBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, {
|
|
42482
42718
|
...props2,
|
|
42483
|
-
ref: composeRefs3(props2.ref,
|
|
42719
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42484
42720
|
}, children));
|
|
42485
42721
|
});
|
|
42486
42722
|
Root$52.displayName = "Controls";
|
|
42487
42723
|
var ControlsGroupBridge = createReactComponent(ControlsGroupInstance);
|
|
42488
|
-
var Group = React59.forwardRef(({ children, ...props },
|
|
42724
|
+
var Group = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42489
42725
|
return /* @__PURE__ */ React59.createElement(ControlsGroupBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, {
|
|
42490
42726
|
...props2,
|
|
42491
|
-
ref: composeRefs3(props2.ref,
|
|
42727
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42492
42728
|
}, children));
|
|
42493
42729
|
});
|
|
42494
42730
|
Group.displayName = "ControlsGroup";
|
|
@@ -42498,28 +42734,28 @@ function Root$42({ children, ...props }) {
|
|
|
42498
42734
|
}
|
|
42499
42735
|
Root$42.displayName = "Tooltip";
|
|
42500
42736
|
var TriggerBridge = createReactComponent(TooltipTriggerInstance);
|
|
42501
|
-
var Trigger3 = React59.forwardRef(({ children, ...props },
|
|
42737
|
+
var Trigger3 = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42502
42738
|
return /* @__PURE__ */ React59.createElement(TriggerBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.button, {
|
|
42503
42739
|
...props2,
|
|
42504
|
-
ref: composeRefs3(props2.ref,
|
|
42740
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42505
42741
|
}, children));
|
|
42506
42742
|
});
|
|
42507
42743
|
Trigger3.displayName = "TooltipTrigger";
|
|
42508
42744
|
var ContentBridge = createReactComponent(TooltipContentInstance);
|
|
42509
|
-
var Content4 = React59.forwardRef(({ children, ...props },
|
|
42745
|
+
var Content4 = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42510
42746
|
return /* @__PURE__ */ React59.createElement(ContentBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, {
|
|
42511
42747
|
...props2,
|
|
42512
|
-
ref: composeRefs3(props2.ref,
|
|
42748
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42513
42749
|
}, children));
|
|
42514
42750
|
});
|
|
42515
42751
|
Content4.displayName = "TooltipContent";
|
|
42516
42752
|
var GoogleCastButtonBridge = createReactComponent(GoogleCastButtonInstance, {
|
|
42517
42753
|
domEventsRegex: /^onMedia/
|
|
42518
42754
|
});
|
|
42519
|
-
var GoogleCastButton2 = React59.forwardRef(({ children, ...props },
|
|
42755
|
+
var GoogleCastButton2 = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42520
42756
|
return /* @__PURE__ */ React59.createElement(GoogleCastButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.button, {
|
|
42521
42757
|
...props2,
|
|
42522
|
-
ref: composeRefs3(props2.ref,
|
|
42758
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
42523
42759
|
}, children));
|
|
42524
42760
|
});
|
|
42525
42761
|
GoogleCastButton2.displayName = "GoogleCastButton";
|
|
@@ -42527,29 +42763,29 @@ var QualitySliderBridge = createReactComponent(QualitySliderInstance, {
|
|
|
42527
42763
|
events: sliderCallbacks,
|
|
42528
42764
|
domEventsRegex: /^onMedia/
|
|
42529
42765
|
});
|
|
42530
|
-
var Root$32 = React59.forwardRef(({ children, ...props },
|
|
42531
|
-
return /* @__PURE__ */ React59.createElement(QualitySliderBridge, { ...props, ref:
|
|
42766
|
+
var Root$32 = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42767
|
+
return /* @__PURE__ */ React59.createElement(QualitySliderBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
|
|
42532
42768
|
});
|
|
42533
42769
|
Root$32.displayName = "QualitySlider";
|
|
42534
42770
|
var AudioGainSliderBridge = createReactComponent(AudioGainSliderInstance, {
|
|
42535
42771
|
events: sliderCallbacks,
|
|
42536
42772
|
domEventsRegex: /^onMedia/
|
|
42537
42773
|
});
|
|
42538
|
-
var Root$22 = React59.forwardRef(({ children, ...props },
|
|
42539
|
-
return /* @__PURE__ */ React59.createElement(AudioGainSliderBridge, { ...props, ref:
|
|
42774
|
+
var Root$22 = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42775
|
+
return /* @__PURE__ */ React59.createElement(AudioGainSliderBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
|
|
42540
42776
|
});
|
|
42541
42777
|
Root$22.displayName = "AudioGainSlider";
|
|
42542
42778
|
var SpeedSliderBridge = createReactComponent(SpeedSliderInstance, {
|
|
42543
42779
|
events: sliderCallbacks,
|
|
42544
42780
|
domEventsRegex: /^onMedia/
|
|
42545
42781
|
});
|
|
42546
|
-
var Root$12 = React59.forwardRef(({ children, ...props },
|
|
42547
|
-
return /* @__PURE__ */ React59.createElement(SpeedSliderBridge, { ...props, ref:
|
|
42782
|
+
var Root$12 = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42783
|
+
return /* @__PURE__ */ React59.createElement(SpeedSliderBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
|
|
42548
42784
|
});
|
|
42549
42785
|
Root$12.displayName = "SpeedSlider";
|
|
42550
|
-
var Title = React59.forwardRef(({ children, ...props },
|
|
42786
|
+
var Title = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42551
42787
|
const $title = useMediaState("title");
|
|
42552
|
-
return /* @__PURE__ */ React59.createElement(Primitive3.span, { ...props, ref:
|
|
42788
|
+
return /* @__PURE__ */ React59.createElement(Primitive3.span, { ...props, ref: forwardRef18 }, $title, children);
|
|
42553
42789
|
});
|
|
42554
42790
|
Title.displayName = "Title";
|
|
42555
42791
|
function useActiveTextCues(track) {
|
|
@@ -42579,17 +42815,17 @@ function useChapterTitle() {
|
|
|
42579
42815
|
const $track = useActiveTextTrack("chapters"), $cues = useActiveTextCues($track);
|
|
42580
42816
|
return $cues[0]?.text || "";
|
|
42581
42817
|
}
|
|
42582
|
-
var ChapterTitle2 = React59.forwardRef(({ defaultText = "", children, ...props },
|
|
42818
|
+
var ChapterTitle2 = React59.forwardRef(({ defaultText = "", children, ...props }, forwardRef18) => {
|
|
42583
42819
|
const $chapterTitle = useChapterTitle();
|
|
42584
|
-
return /* @__PURE__ */ React59.createElement(Primitive3.span, { ...props, ref:
|
|
42820
|
+
return /* @__PURE__ */ React59.createElement(Primitive3.span, { ...props, ref: forwardRef18 }, $chapterTitle || defaultText, children);
|
|
42585
42821
|
});
|
|
42586
42822
|
ChapterTitle2.displayName = "ChapterTitle";
|
|
42587
42823
|
var CaptionsBridge = createReactComponent(CaptionsInstance);
|
|
42588
|
-
var Captions2 = React59.forwardRef(({ children, ...props },
|
|
42589
|
-
return /* @__PURE__ */ React59.createElement(CaptionsBridge, { ...props, ref:
|
|
42824
|
+
var Captions2 = React59.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
42825
|
+
return /* @__PURE__ */ React59.createElement(CaptionsBridge, { ...props, ref: forwardRef18 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
|
|
42590
42826
|
});
|
|
42591
42827
|
Captions2.displayName = "Captions";
|
|
42592
|
-
var Root6 = React59.forwardRef(({ size: size5 = 96, children, ...props },
|
|
42828
|
+
var Root6 = React59.forwardRef(({ size: size5 = 96, children, ...props }, forwardRef18) => {
|
|
42593
42829
|
return /* @__PURE__ */ React59.createElement("svg", {
|
|
42594
42830
|
width: size5,
|
|
42595
42831
|
height: size5,
|
|
@@ -42598,7 +42834,7 @@ var Root6 = React59.forwardRef(({ size: size5 = 96, children, ...props }, forwar
|
|
|
42598
42834
|
"aria-hidden": "true",
|
|
42599
42835
|
"data-part": "root",
|
|
42600
42836
|
...props,
|
|
42601
|
-
ref:
|
|
42837
|
+
ref: forwardRef18
|
|
42602
42838
|
}, children);
|
|
42603
42839
|
});
|
|
42604
42840
|
var Track2 = React59.forwardRef(({ width = 8, children, ...props }, ref) => /* @__PURE__ */ React59.createElement("circle", {
|
|
@@ -42981,11 +43217,11 @@ var MediaPlayerBridge = createReactComponent(MediaPlayerInstance, {
|
|
|
42981
43217
|
eventsRegex: /^onHls/,
|
|
42982
43218
|
domEventsRegex: /^onMedia/
|
|
42983
43219
|
});
|
|
42984
|
-
var MediaPlayer2 = React61.forwardRef(({ aspectRatio, children, ...props },
|
|
43220
|
+
var MediaPlayer2 = React61.forwardRef(({ aspectRatio, children, ...props }, forwardRef18) => {
|
|
42985
43221
|
return /* @__PURE__ */ React61.createElement(MediaPlayerBridge, {
|
|
42986
43222
|
...props,
|
|
42987
43223
|
src: props.src,
|
|
42988
|
-
ref:
|
|
43224
|
+
ref: forwardRef18,
|
|
42989
43225
|
style: {
|
|
42990
43226
|
aspectRatio,
|
|
42991
43227
|
...props.style
|
|
@@ -42994,9 +43230,9 @@ var MediaPlayer2 = React61.forwardRef(({ aspectRatio, children, ...props }, forw
|
|
|
42994
43230
|
});
|
|
42995
43231
|
MediaPlayer2.displayName = "MediaPlayer";
|
|
42996
43232
|
var MediaProviderBridge = createReactComponent(MediaProviderInstance);
|
|
42997
|
-
var MediaProvider2 = React61.forwardRef(({ loaders = [], children, iframeProps, mediaProps, ...props },
|
|
43233
|
+
var MediaProvider2 = React61.forwardRef(({ loaders = [], children, iframeProps, mediaProps, ...props }, forwardRef18) => {
|
|
42998
43234
|
const reactLoaders = React61.useMemo(() => loaders.map((Loader) => new Loader), loaders);
|
|
42999
|
-
return /* @__PURE__ */ React61.createElement(MediaProviderBridge, { ...props, loaders: reactLoaders, ref:
|
|
43235
|
+
return /* @__PURE__ */ React61.createElement(MediaProviderBridge, { ...props, loaders: reactLoaders, ref: forwardRef18 }, (props2, instance) => /* @__PURE__ */ React61.createElement("div", { ...props2 }, /* @__PURE__ */ React61.createElement(MediaOutlet, { provider: instance, mediaProps, iframeProps }), children));
|
|
43000
43236
|
});
|
|
43001
43237
|
MediaProvider2.displayName = "MediaProvider";
|
|
43002
43238
|
function MediaOutlet({ provider: provider2, mediaProps, iframeProps }) {
|
|
@@ -43066,48 +43302,48 @@ function Track3({ lang, ...props }) {
|
|
|
43066
43302
|
}
|
|
43067
43303
|
Track3.displayName = "Track";
|
|
43068
43304
|
var ToggleButtonBridge = createReactComponent(ToggleButtonInstance);
|
|
43069
|
-
var ToggleButton2 = React61.forwardRef(({ children, ...props },
|
|
43305
|
+
var ToggleButton2 = React61.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
43070
43306
|
return /* @__PURE__ */ React61.createElement(ToggleButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React61.createElement(Primitive3.button, {
|
|
43071
43307
|
...props2,
|
|
43072
|
-
ref: composeRefs3(props2.ref,
|
|
43308
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
43073
43309
|
}, children));
|
|
43074
43310
|
});
|
|
43075
43311
|
ToggleButton2.displayName = "ToggleButton";
|
|
43076
43312
|
var PosterBridge = createReactComponent(PosterInstance);
|
|
43077
|
-
var Poster2 = React61.forwardRef(({ children, ...props },
|
|
43313
|
+
var Poster2 = React61.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
43078
43314
|
return /* @__PURE__ */ React61.createElement(PosterBridge, {
|
|
43079
43315
|
src: props.asChild && React61.isValidElement(children) ? children.props.src : undefined,
|
|
43080
43316
|
...props
|
|
43081
43317
|
}, (props2, instance) => /* @__PURE__ */ React61.createElement(PosterImg, {
|
|
43082
43318
|
...props2,
|
|
43083
43319
|
instance,
|
|
43084
|
-
ref: composeRefs3(props2.ref,
|
|
43320
|
+
ref: composeRefs3(props2.ref, forwardRef18)
|
|
43085
43321
|
}, children));
|
|
43086
43322
|
});
|
|
43087
43323
|
Poster2.displayName = "Poster";
|
|
43088
|
-
var PosterImg = React61.forwardRef(({ instance, children, ...props },
|
|
43324
|
+
var PosterImg = React61.forwardRef(({ instance, children, ...props }, forwardRef18) => {
|
|
43089
43325
|
const { src, img, alt, crossOrigin, hidden } = instance.$state, $src = useSignal(src), $alt = useSignal(alt), $crossOrigin = useSignal(crossOrigin), $hidden = useSignal(hidden);
|
|
43090
43326
|
return /* @__PURE__ */ React61.createElement(Primitive3.img, {
|
|
43091
43327
|
...props,
|
|
43092
43328
|
src: $src || undefined,
|
|
43093
43329
|
alt: $alt || undefined,
|
|
43094
43330
|
crossOrigin: $crossOrigin || undefined,
|
|
43095
|
-
ref: composeRefs3(img.set,
|
|
43331
|
+
ref: composeRefs3(img.set, forwardRef18),
|
|
43096
43332
|
style: { display: $hidden ? "none" : undefined }
|
|
43097
43333
|
}, children);
|
|
43098
43334
|
});
|
|
43099
43335
|
PosterImg.displayName = "PosterImg";
|
|
43100
|
-
var Root7 = React61.forwardRef(({ children, ...props },
|
|
43336
|
+
var Root7 = React61.forwardRef(({ children, ...props }, forwardRef18) => {
|
|
43101
43337
|
return /* @__PURE__ */ React61.createElement(Primitive3.div, {
|
|
43102
43338
|
translate: "yes",
|
|
43103
43339
|
"aria-live": "off",
|
|
43104
43340
|
"aria-atomic": "true",
|
|
43105
43341
|
...props,
|
|
43106
|
-
ref:
|
|
43342
|
+
ref: forwardRef18
|
|
43107
43343
|
}, children);
|
|
43108
43344
|
});
|
|
43109
43345
|
Root7.displayName = "Caption";
|
|
43110
|
-
var Text = React61.forwardRef((props,
|
|
43346
|
+
var Text = React61.forwardRef((props, forwardRef18) => {
|
|
43111
43347
|
const textTrack = useMediaState("textTrack"), [activeCue, setActiveCue] = React61.useState();
|
|
43112
43348
|
React61.useEffect(() => {
|
|
43113
43349
|
if (!textTrack)
|
|
@@ -43127,7 +43363,7 @@ var Text = React61.forwardRef((props, forwardRef17) => {
|
|
|
43127
43363
|
dangerouslySetInnerHTML: {
|
|
43128
43364
|
__html: activeCue?.text || ""
|
|
43129
43365
|
},
|
|
43130
|
-
ref:
|
|
43366
|
+
ref: forwardRef18
|
|
43131
43367
|
});
|
|
43132
43368
|
});
|
|
43133
43369
|
Text.displayName = "CaptionText";
|
|
@@ -43277,7 +43513,7 @@ function createDefaultMediaLayout({
|
|
|
43277
43513
|
thumbnails = null,
|
|
43278
43514
|
translations,
|
|
43279
43515
|
...props
|
|
43280
|
-
},
|
|
43516
|
+
}, forwardRef18) => {
|
|
43281
43517
|
const media = useMediaContext2(), $load = useSignal(media.$props.load), $canLoad = useMediaState("canLoad"), $viewType = useMediaState("viewType"), $streamType = useMediaState("streamType"), $smallWhen = createComputed(() => {
|
|
43282
43518
|
return isBoolean(smallLayoutWhen) ? smallLayoutWhen : smallLayoutWhen(media.player.state);
|
|
43283
43519
|
}, [smallLayoutWhen]), userPrefersAnnouncements = createSignal(true), userPrefersKeyboardAnimations = createSignal(true), isMatch = $viewType === type, isSmallLayout = $smallWhen(), isForcedLayout = isBoolean(smallLayoutWhen), isLoadLayout = $load === "play" && !$canLoad, canRender = $canLoad || isForcedLayout || isLoadLayout, colorSchemeClass = useColorSchemeClass(colorScheme), layoutEl = createSignal(null);
|
|
@@ -43290,7 +43526,7 @@ function createDefaultMediaLayout({
|
|
|
43290
43526
|
"data-lg": !isSmallLayout ? "" : null,
|
|
43291
43527
|
"data-size": isSmallLayout ? "sm" : "lg",
|
|
43292
43528
|
"data-no-scrub-gesture": noScrubGesture ? "" : null,
|
|
43293
|
-
ref: composeRefs3(layoutEl.set,
|
|
43529
|
+
ref: composeRefs3(layoutEl.set, forwardRef18)
|
|
43294
43530
|
}, canRender && isMatch ? /* @__PURE__ */ React65.createElement(DefaultLayoutContext.Provider, {
|
|
43295
43531
|
value: {
|
|
43296
43532
|
disableTimeSlider,
|
|
@@ -43351,9 +43587,9 @@ function DefaultPlayButton({ tooltip }) {
|
|
|
43351
43587
|
return /* @__PURE__ */ React65.createElement(DefaultTooltip, { content: $paused ? playText : pauseText, placement: tooltip }, /* @__PURE__ */ React65.createElement(PlayButton2, { className: "vds-play-button vds-button", "aria-label": playText }, $ended ? /* @__PURE__ */ React65.createElement(Icons.PlayButton.Replay, { className: "vds-icon" }) : $paused ? /* @__PURE__ */ React65.createElement(Icons.PlayButton.Play, { className: "vds-icon" }) : /* @__PURE__ */ React65.createElement(Icons.PlayButton.Pause, { className: "vds-icon" })));
|
|
43352
43588
|
}
|
|
43353
43589
|
DefaultPlayButton.displayName = "DefaultPlayButton";
|
|
43354
|
-
var DefaultMuteButton = React65.forwardRef(({ tooltip },
|
|
43590
|
+
var DefaultMuteButton = React65.forwardRef(({ tooltip }, forwardRef18) => {
|
|
43355
43591
|
const { icons: Icons } = useDefaultLayoutContext(), muteText = useDefaultLayoutWord("Mute"), unmuteText = useDefaultLayoutWord("Unmute"), $muted = useMediaState("muted"), $volume = useMediaState("volume");
|
|
43356
|
-
return /* @__PURE__ */ React65.createElement(DefaultTooltip, { content: $muted ? unmuteText : muteText, placement: tooltip }, /* @__PURE__ */ React65.createElement(MuteButton2, { className: "vds-mute-button vds-button", "aria-label": muteText, ref:
|
|
43592
|
+
return /* @__PURE__ */ React65.createElement(DefaultTooltip, { content: $muted ? unmuteText : muteText, placement: tooltip }, /* @__PURE__ */ React65.createElement(MuteButton2, { className: "vds-mute-button vds-button", "aria-label": muteText, ref: forwardRef18 }, $muted || $volume == 0 ? /* @__PURE__ */ React65.createElement(Icons.MuteButton.Mute, { className: "vds-icon" }) : $volume < 0.5 ? /* @__PURE__ */ React65.createElement(Icons.MuteButton.VolumeLow, { className: "vds-icon" }) : /* @__PURE__ */ React65.createElement(Icons.MuteButton.VolumeHigh, { className: "vds-icon" })));
|
|
43357
43593
|
});
|
|
43358
43594
|
DefaultMuteButton.displayName = "DefaultMuteButton";
|
|
43359
43595
|
function DefaultCaptionButton({ tooltip }) {
|
|
@@ -44129,7 +44365,7 @@ function DefaultTimeSlider() {
|
|
|
44129
44365
|
}, /* @__PURE__ */ React65.createElement(Chapters, {
|
|
44130
44366
|
className: "vds-slider-chapters",
|
|
44131
44367
|
disabled: width < sliderChaptersMinWidth
|
|
44132
|
-
}, (cues,
|
|
44368
|
+
}, (cues, forwardRef18) => cues.map((cue) => /* @__PURE__ */ React65.createElement("div", { className: "vds-slider-chapter", key: cue.startTime, ref: forwardRef18 }, /* @__PURE__ */ React65.createElement(Track, { className: "vds-slider-track" }), /* @__PURE__ */ React65.createElement(TrackFill, { className: "vds-slider-track-fill vds-slider-track" }), /* @__PURE__ */ React65.createElement(Progress, { className: "vds-slider-progress vds-slider-track" })))), /* @__PURE__ */ React65.createElement(Thumb, { className: "vds-slider-thumb" }), /* @__PURE__ */ React65.createElement(Preview, { className: "vds-slider-preview" }, thumbnails ? /* @__PURE__ */ React65.createElement(Thumbnail2.Root, {
|
|
44133
44369
|
src: thumbnails,
|
|
44134
44370
|
className: "vds-slider-thumbnail vds-thumbnail"
|
|
44135
44371
|
}, /* @__PURE__ */ React65.createElement(Thumbnail2.Img, null)) : $RemotionSliderThumbnail && isRemotionSrc($src) ? /* @__PURE__ */ React65.createElement($RemotionSliderThumbnail, { className: "vds-slider-thumbnail vds-thumbnail" }) : null, /* @__PURE__ */ React65.createElement(ChapterTitle, { className: "vds-slider-chapter-title" }), /* @__PURE__ */ React65.createElement(Value2, { className: "vds-slider-value" })));
|
|
@@ -44233,7 +44469,7 @@ function AudioTitle({ title, chapterTitle }) {
|
|
|
44233
44469
|
return /* @__PURE__ */ React65.createElement("span", { className: "vds-title-text" }, slot(slots, "title", title), slot(slots, "chapterTitle", /* @__PURE__ */ React65.createElement("span", { className: "vds-chapter-title" }, chapterTitle)));
|
|
44234
44470
|
}
|
|
44235
44471
|
AudioTitle.displayName = "AudioTitle";
|
|
44236
|
-
var DefaultKeyboardDisplay = React65.forwardRef(({ icons: Icons, ...props },
|
|
44472
|
+
var DefaultKeyboardDisplay = React65.forwardRef(({ icons: Icons, ...props }, forwardRef18) => {
|
|
44237
44473
|
const [visible, setVisible] = React65.useState(false), [Icon4, setIcon] = React65.useState(null), [count4, setCount] = React65.useState(0), $lastKeyboardAction = useMediaState("lastKeyboardAction");
|
|
44238
44474
|
React65.useEffect(() => {
|
|
44239
44475
|
setCount((n2) => n2 + 1);
|
|
@@ -44260,7 +44496,7 @@ var DefaultKeyboardDisplay = React65.forwardRef(({ icons: Icons, ...props }, for
|
|
|
44260
44496
|
...props,
|
|
44261
44497
|
className,
|
|
44262
44498
|
"data-action": actionDataAttr,
|
|
44263
|
-
ref:
|
|
44499
|
+
ref: forwardRef18
|
|
44264
44500
|
}, /* @__PURE__ */ React65.createElement("div", { className: "vds-kb-text-wrapper" }, /* @__PURE__ */ React65.createElement("div", { className: "vds-kb-text" }, $text)), /* @__PURE__ */ React65.createElement("div", { className: "vds-kb-bezel", key: count4 }, /* @__PURE__ */ React65.createElement("div", { className: "vds-kb-icon" }, /* @__PURE__ */ React65.createElement(Icon4, null)))) : null;
|
|
44265
44501
|
});
|
|
44266
44502
|
DefaultKeyboardDisplay.displayName = "DefaultKeyboardDisplay";
|
|
@@ -44472,10 +44708,10 @@ import"react-dom";
|
|
|
44472
44708
|
"use client";
|
|
44473
44709
|
|
|
44474
44710
|
// src/components/prompts/MuxPlayer.tsx
|
|
44475
|
-
import { useCallback as
|
|
44711
|
+
import { useCallback as useCallback41 } from "react";
|
|
44476
44712
|
import { jsx as jsx48, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
44477
44713
|
var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
44478
|
-
const onProviderChange =
|
|
44714
|
+
const onProviderChange = useCallback41((provider2, _e) => {
|
|
44479
44715
|
if (isHLSProvider(provider2)) {
|
|
44480
44716
|
provider2.library = () => import("hls.js");
|
|
44481
44717
|
}
|