@remotion/promo-pages 4.0.438 → 4.0.439
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 +237 -92
- package/dist/design.js +23 -77
- package/dist/experts.js +23 -77
- package/dist/homepage/Pricing.js +23 -77
- package/dist/prompts/PromptsGallery.js +23 -77
- package/dist/prompts/PromptsShow.js +23 -77
- package/dist/prompts/PromptsSubmit.js +23 -77
- package/dist/tailwind.css +22 -0
- package/dist/team.js +20167 -31
- package/dist/template-modal-content.js +25 -79
- package/dist/templates.js +23 -77
- package/package.json +13 -13
package/dist/Homepage.js
CHANGED
|
@@ -770,12 +770,7 @@ import { jsx as jsx3 } from "react/jsx-runtime";
|
|
|
770
770
|
import { useContext as useContext6, useMemo as useMemo5 } from "react";
|
|
771
771
|
import { createContext as createContext7 } from "react";
|
|
772
772
|
import { createContext as createContext9, createRef, useContext as useContext5, useMemo as useMemo4 } from "react";
|
|
773
|
-
import React5, {
|
|
774
|
-
createContext as createContext8,
|
|
775
|
-
useCallback as useCallback2,
|
|
776
|
-
useImperativeHandle,
|
|
777
|
-
useMemo as useMemo3
|
|
778
|
-
} from "react";
|
|
773
|
+
import React5, { createContext as createContext8, useCallback as useCallback2, useMemo as useMemo3 } from "react";
|
|
779
774
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
780
775
|
import { useContext as useContext8 } from "react";
|
|
781
776
|
import { createContext as createContext10 } from "react";
|
|
@@ -791,19 +786,19 @@ import { jsx as jsx8 } from "react/jsx-runtime";
|
|
|
791
786
|
import {
|
|
792
787
|
forwardRef as forwardRef3,
|
|
793
788
|
useEffect as useEffect2,
|
|
794
|
-
useImperativeHandle as
|
|
789
|
+
useImperativeHandle as useImperativeHandle2,
|
|
795
790
|
useLayoutEffect as useLayoutEffect2,
|
|
796
791
|
useRef as useRef5,
|
|
797
792
|
useState as useState5
|
|
798
793
|
} from "react";
|
|
799
|
-
import React10, { useCallback as useCallback5, useImperativeHandle
|
|
794
|
+
import React10, { useCallback as useCallback5, useImperativeHandle, useRef as useRef4 } from "react";
|
|
800
795
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
801
796
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
802
797
|
import { useContext as useContext14, useLayoutEffect as useLayoutEffect4, useState as useState7 } from "react";
|
|
803
798
|
import {
|
|
804
799
|
createContext as createContext13,
|
|
805
800
|
useCallback as useCallback6,
|
|
806
|
-
useImperativeHandle as
|
|
801
|
+
useImperativeHandle as useImperativeHandle3,
|
|
807
802
|
useLayoutEffect as useLayoutEffect3,
|
|
808
803
|
useMemo as useMemo12,
|
|
809
804
|
useRef as useRef6,
|
|
@@ -822,7 +817,7 @@ import React17, {
|
|
|
822
817
|
forwardRef as forwardRef4,
|
|
823
818
|
useContext as useContext24,
|
|
824
819
|
useEffect as useEffect10,
|
|
825
|
-
useImperativeHandle as
|
|
820
|
+
useImperativeHandle as useImperativeHandle4,
|
|
826
821
|
useMemo as useMemo22,
|
|
827
822
|
useRef as useRef14,
|
|
828
823
|
useState as useState13
|
|
@@ -871,7 +866,7 @@ import {
|
|
|
871
866
|
forwardRef as forwardRef5,
|
|
872
867
|
useContext as useContext25,
|
|
873
868
|
useEffect as useEffect11,
|
|
874
|
-
useImperativeHandle as
|
|
869
|
+
useImperativeHandle as useImperativeHandle5,
|
|
875
870
|
useLayoutEffect as useLayoutEffect8,
|
|
876
871
|
useMemo as useMemo23,
|
|
877
872
|
useRef as useRef15
|
|
@@ -891,7 +886,7 @@ import {
|
|
|
891
886
|
forwardRef as forwardRef8,
|
|
892
887
|
useCallback as useCallback13,
|
|
893
888
|
useContext as useContext29,
|
|
894
|
-
useImperativeHandle as
|
|
889
|
+
useImperativeHandle as useImperativeHandle6,
|
|
895
890
|
useLayoutEffect as useLayoutEffect9,
|
|
896
891
|
useRef as useRef17
|
|
897
892
|
} from "react";
|
|
@@ -900,7 +895,7 @@ import { createRef as createRef3 } from "react";
|
|
|
900
895
|
import React24 from "react";
|
|
901
896
|
import {
|
|
902
897
|
useCallback as useCallback14,
|
|
903
|
-
useImperativeHandle as
|
|
898
|
+
useImperativeHandle as useImperativeHandle7,
|
|
904
899
|
useMemo as useMemo26,
|
|
905
900
|
useRef as useRef18,
|
|
906
901
|
useState as useState15
|
|
@@ -929,7 +924,7 @@ import React30, {
|
|
|
929
924
|
forwardRef as forwardRef9,
|
|
930
925
|
useContext as useContext34,
|
|
931
926
|
useEffect as useEffect16,
|
|
932
|
-
useImperativeHandle as
|
|
927
|
+
useImperativeHandle as useImperativeHandle8,
|
|
933
928
|
useMemo as useMemo31,
|
|
934
929
|
useRef as useRef19,
|
|
935
930
|
useState as useState18
|
|
@@ -951,7 +946,7 @@ import {
|
|
|
951
946
|
forwardRef as forwardRef12,
|
|
952
947
|
useContext as useContext35,
|
|
953
948
|
useEffect as useEffect17,
|
|
954
|
-
useImperativeHandle as
|
|
949
|
+
useImperativeHandle as useImperativeHandle9,
|
|
955
950
|
useLayoutEffect as useLayoutEffect11,
|
|
956
951
|
useMemo as useMemo35,
|
|
957
952
|
useRef as useRef20
|
|
@@ -1003,7 +998,7 @@ var useIsPlayer = () => {
|
|
|
1003
998
|
function truthy(value) {
|
|
1004
999
|
return Boolean(value);
|
|
1005
1000
|
}
|
|
1006
|
-
var VERSION = "4.0.
|
|
1001
|
+
var VERSION = "4.0.439";
|
|
1007
1002
|
var checkMultipleRemotionVersions = () => {
|
|
1008
1003
|
if (typeof globalThis === "undefined") {
|
|
1009
1004
|
return;
|
|
@@ -1524,9 +1519,6 @@ var CompositionSetters = createContext7({
|
|
|
1524
1519
|
setCanvasContent: () => {
|
|
1525
1520
|
return;
|
|
1526
1521
|
},
|
|
1527
|
-
updateCompositionDefaultProps: () => {
|
|
1528
|
-
return;
|
|
1529
|
-
},
|
|
1530
1522
|
onlyRenderComposition: null
|
|
1531
1523
|
});
|
|
1532
1524
|
var getKey = () => {
|
|
@@ -1646,12 +1638,8 @@ var EditorPropsContext = createContext8({
|
|
|
1646
1638
|
props: {},
|
|
1647
1639
|
updateProps: () => {
|
|
1648
1640
|
throw new Error("Not implemented");
|
|
1649
|
-
},
|
|
1650
|
-
resetUnsaved: () => {
|
|
1651
|
-
throw new Error("Not implemented");
|
|
1652
1641
|
}
|
|
1653
1642
|
});
|
|
1654
|
-
var editorPropsProviderRef = React5.createRef();
|
|
1655
1643
|
var timeValueRef = React5.createRef();
|
|
1656
1644
|
var EditorPropsProvider = ({ children }) => {
|
|
1657
1645
|
const [props, setProps] = React5.useState({});
|
|
@@ -1667,25 +1655,9 @@ var EditorPropsProvider = ({ children }) => {
|
|
|
1667
1655
|
};
|
|
1668
1656
|
});
|
|
1669
1657
|
}, []);
|
|
1670
|
-
const resetUnsaved = useCallback2((compositionId) => {
|
|
1671
|
-
setProps((prev) => {
|
|
1672
|
-
if (prev[compositionId]) {
|
|
1673
|
-
const newProps = { ...prev };
|
|
1674
|
-
delete newProps[compositionId];
|
|
1675
|
-
return newProps;
|
|
1676
|
-
}
|
|
1677
|
-
return prev;
|
|
1678
|
-
});
|
|
1679
|
-
}, []);
|
|
1680
|
-
useImperativeHandle(editorPropsProviderRef, () => {
|
|
1681
|
-
return {
|
|
1682
|
-
getProps: () => props,
|
|
1683
|
-
setProps
|
|
1684
|
-
};
|
|
1685
|
-
}, [props]);
|
|
1686
1658
|
const ctx = useMemo3(() => {
|
|
1687
|
-
return { props, updateProps
|
|
1688
|
-
}, [props,
|
|
1659
|
+
return { props, updateProps };
|
|
1660
|
+
}, [props, updateProps]);
|
|
1689
1661
|
return /* @__PURE__ */ jsx4(EditorPropsContext.Provider, {
|
|
1690
1662
|
value: ctx,
|
|
1691
1663
|
children
|
|
@@ -1748,7 +1720,6 @@ var resolveCompositionsRef = createRef();
|
|
|
1748
1720
|
var needsResolution = (composition) => {
|
|
1749
1721
|
return Boolean(composition.calculateMetadata);
|
|
1750
1722
|
};
|
|
1751
|
-
var PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally";
|
|
1752
1723
|
var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
1753
1724
|
const context = useContext5(ResolveCompositionContext);
|
|
1754
1725
|
const { props: allEditorProps } = useContext5(EditorPropsContext);
|
|
@@ -2519,7 +2490,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref
|
|
|
2519
2490
|
height: canvasHeight
|
|
2520
2491
|
}));
|
|
2521
2492
|
}, [fit, height, width]);
|
|
2522
|
-
|
|
2493
|
+
useImperativeHandle(ref, () => {
|
|
2523
2494
|
return {
|
|
2524
2495
|
draw,
|
|
2525
2496
|
getCanvas: () => {
|
|
@@ -2718,7 +2689,7 @@ var AnimatedImage = forwardRef3(({
|
|
|
2718
2689
|
const currentTimeRef = useRef5(currentTime);
|
|
2719
2690
|
currentTimeRef.current = currentTime;
|
|
2720
2691
|
const ref = useRef5(null);
|
|
2721
|
-
|
|
2692
|
+
useImperativeHandle2(canvasRef, () => {
|
|
2722
2693
|
const c = ref.current?.getCanvas();
|
|
2723
2694
|
if (!c) {
|
|
2724
2695
|
throw new Error("Canvas ref is not set");
|
|
@@ -2844,7 +2815,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
2844
2815
|
setRenderAssets(renderAssetsRef.current);
|
|
2845
2816
|
}, []);
|
|
2846
2817
|
if (collectAssets) {
|
|
2847
|
-
|
|
2818
|
+
useImperativeHandle3(collectAssets, () => {
|
|
2848
2819
|
return {
|
|
2849
2820
|
collectAssets: () => {
|
|
2850
2821
|
const assets = renderAssetsRef.current;
|
|
@@ -5275,7 +5246,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
5275
5246
|
});
|
|
5276
5247
|
};
|
|
5277
5248
|
}, [cleanupOnMediaTagUnmount]);
|
|
5278
|
-
|
|
5249
|
+
useImperativeHandle4(ref, () => {
|
|
5279
5250
|
return audioRef.current;
|
|
5280
5251
|
}, [audioRef]);
|
|
5281
5252
|
const currentOnDurationCallback = useRef14(onDuration);
|
|
@@ -5346,7 +5317,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
5346
5317
|
mediaVolume: 1
|
|
5347
5318
|
});
|
|
5348
5319
|
warnAboutTooHighVolume(volume);
|
|
5349
|
-
|
|
5320
|
+
useImperativeHandle5(ref, () => {
|
|
5350
5321
|
return audioRef.current;
|
|
5351
5322
|
}, []);
|
|
5352
5323
|
useEffect11(() => {
|
|
@@ -5775,13 +5746,6 @@ var InnerComposition = ({
|
|
|
5775
5746
|
registerComposition,
|
|
5776
5747
|
unregisterComposition
|
|
5777
5748
|
]);
|
|
5778
|
-
useEffect13(() => {
|
|
5779
|
-
window.dispatchEvent(new CustomEvent(PROPS_UPDATED_EXTERNALLY, {
|
|
5780
|
-
detail: {
|
|
5781
|
-
resetUnsaved: id
|
|
5782
|
-
}
|
|
5783
|
-
}));
|
|
5784
|
-
}, [defaultProps, id]);
|
|
5785
5749
|
const resolved = useResolvedVideoConfig(id);
|
|
5786
5750
|
if (environment.isStudio && video && video.component === lazy && video.id === id) {
|
|
5787
5751
|
const Comp = lazy;
|
|
@@ -5882,7 +5846,7 @@ var ImgRefForwarding = ({
|
|
|
5882
5846
|
if (!_propsValid) {
|
|
5883
5847
|
throw new Error("typecheck error");
|
|
5884
5848
|
}
|
|
5885
|
-
|
|
5849
|
+
useImperativeHandle6(ref, () => {
|
|
5886
5850
|
return imageRef.current;
|
|
5887
5851
|
}, []);
|
|
5888
5852
|
const actualSrc = usePreload(src);
|
|
@@ -6056,25 +6020,11 @@ var CompositionManagerProvider = ({
|
|
|
6056
6020
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
6057
6021
|
});
|
|
6058
6022
|
}, []);
|
|
6059
|
-
|
|
6023
|
+
useImperativeHandle7(compositionsRef, () => {
|
|
6060
6024
|
return {
|
|
6061
6025
|
getCompositions: () => currentcompositionsRef.current
|
|
6062
6026
|
};
|
|
6063
6027
|
}, []);
|
|
6064
|
-
const updateCompositionDefaultProps = useCallback14((id, newDefaultProps) => {
|
|
6065
|
-
setCompositions((comps) => {
|
|
6066
|
-
const updated = comps.map((c2) => {
|
|
6067
|
-
if (c2.id === id) {
|
|
6068
|
-
return {
|
|
6069
|
-
...c2,
|
|
6070
|
-
defaultProps: newDefaultProps
|
|
6071
|
-
};
|
|
6072
|
-
}
|
|
6073
|
-
return c2;
|
|
6074
|
-
});
|
|
6075
|
-
return updated;
|
|
6076
|
-
});
|
|
6077
|
-
}, []);
|
|
6078
6028
|
const compositionManagerSetters = useMemo26(() => {
|
|
6079
6029
|
return {
|
|
6080
6030
|
registerComposition,
|
|
@@ -6082,7 +6032,6 @@ var CompositionManagerProvider = ({
|
|
|
6082
6032
|
registerFolder,
|
|
6083
6033
|
unregisterFolder,
|
|
6084
6034
|
setCanvasContent,
|
|
6085
|
-
updateCompositionDefaultProps,
|
|
6086
6035
|
onlyRenderComposition
|
|
6087
6036
|
};
|
|
6088
6037
|
}, [
|
|
@@ -6090,7 +6039,6 @@ var CompositionManagerProvider = ({
|
|
|
6090
6039
|
registerFolder,
|
|
6091
6040
|
unregisterComposition,
|
|
6092
6041
|
unregisterFolder,
|
|
6093
|
-
updateCompositionDefaultProps,
|
|
6094
6042
|
onlyRenderComposition
|
|
6095
6043
|
]);
|
|
6096
6044
|
const compositionManagerContextValue = useMemo26(() => {
|
|
@@ -6549,7 +6497,7 @@ var useSchema = (schema, currentValue) => {
|
|
|
6549
6497
|
const overrideValues = overrides[overrideId] ?? {};
|
|
6550
6498
|
const propStatus = codeValues[overrideId];
|
|
6551
6499
|
const currentValueKeys = Object.keys(currentValue);
|
|
6552
|
-
const keysToUpdate = new Set(currentValueKeys)
|
|
6500
|
+
const keysToUpdate = [...new Set(currentValueKeys)];
|
|
6553
6501
|
const merged = {};
|
|
6554
6502
|
for (const key of keysToUpdate) {
|
|
6555
6503
|
const codeValueStatus = propStatus?.[key] ?? null;
|
|
@@ -6942,7 +6890,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
6942
6890
|
duration,
|
|
6943
6891
|
fps
|
|
6944
6892
|
});
|
|
6945
|
-
|
|
6893
|
+
useImperativeHandle8(ref, () => {
|
|
6946
6894
|
return videoRef.current;
|
|
6947
6895
|
}, []);
|
|
6948
6896
|
useState18(() => playbackLogging({
|
|
@@ -7415,8 +7363,6 @@ var Internals = {
|
|
|
7415
7363
|
CurrentScaleContext,
|
|
7416
7364
|
PreviewSizeContext,
|
|
7417
7365
|
calculateScale,
|
|
7418
|
-
editorPropsProviderRef,
|
|
7419
|
-
PROPS_UPDATED_EXTERNALLY,
|
|
7420
7366
|
validateRenderAsset,
|
|
7421
7367
|
Log,
|
|
7422
7368
|
LogLevelContext,
|
|
@@ -8100,7 +8046,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
8100
8046
|
sequenceContext?.relativeFrom,
|
|
8101
8047
|
audioStreamIndex
|
|
8102
8048
|
]);
|
|
8103
|
-
|
|
8049
|
+
useImperativeHandle9(ref, () => {
|
|
8104
8050
|
return videoRef.current;
|
|
8105
8051
|
}, []);
|
|
8106
8052
|
useEffect17(() => {
|
|
@@ -23124,7 +23070,7 @@ var InstallsPerMonth = () => {
|
|
|
23124
23070
|
},
|
|
23125
23071
|
children: [
|
|
23126
23072
|
/* @__PURE__ */ jsx50(StatItemContent, {
|
|
23127
|
-
content: "
|
|
23073
|
+
content: "1.4M",
|
|
23128
23074
|
width: "100px",
|
|
23129
23075
|
fontSize: "2.5rem",
|
|
23130
23076
|
fontWeight: "bold"
|
|
@@ -23176,7 +23122,7 @@ var PagesOfDocs = () => {
|
|
|
23176
23122
|
width: "40px"
|
|
23177
23123
|
}),
|
|
23178
23124
|
/* @__PURE__ */ jsx50(StatItemContent, {
|
|
23179
|
-
content: "
|
|
23125
|
+
content: "800",
|
|
23180
23126
|
width: "85px",
|
|
23181
23127
|
maxWidth: "100px",
|
|
23182
23128
|
fontSize: "2.5rem",
|
|
@@ -23232,7 +23178,7 @@ var GitHubStars = () => {
|
|
|
23232
23178
|
width: "45px"
|
|
23233
23179
|
}),
|
|
23234
23180
|
/* @__PURE__ */ jsx50(StatItemContent, {
|
|
23235
|
-
content: "
|
|
23181
|
+
content: "40k",
|
|
23236
23182
|
width: "80px",
|
|
23237
23183
|
fontSize: "2.5rem",
|
|
23238
23184
|
fontWeight: "bold"
|
|
@@ -23268,7 +23214,7 @@ var DiscordMembers = () => {
|
|
|
23268
23214
|
},
|
|
23269
23215
|
children: [
|
|
23270
23216
|
/* @__PURE__ */ jsx50(StatItemContent, {
|
|
23271
|
-
content: "
|
|
23217
|
+
content: "8000+",
|
|
23272
23218
|
width: "142px",
|
|
23273
23219
|
fontSize: "2.5rem",
|
|
23274
23220
|
fontWeight: "bold"
|
|
@@ -23449,7 +23395,7 @@ import React103, {
|
|
|
23449
23395
|
useCallback as useCallback112,
|
|
23450
23396
|
useContext as useContext52,
|
|
23451
23397
|
useEffect as useEffect122,
|
|
23452
|
-
useImperativeHandle as
|
|
23398
|
+
useImperativeHandle as useImperativeHandle10,
|
|
23453
23399
|
useMemo as useMemo122,
|
|
23454
23400
|
useRef as useRef112,
|
|
23455
23401
|
useState as useState113
|
|
@@ -23646,6 +23592,10 @@ var PERCENTAGE2 = NUMBER2 + "%";
|
|
|
23646
23592
|
function call(...args) {
|
|
23647
23593
|
return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
|
|
23648
23594
|
}
|
|
23595
|
+
var MODERN_VALUE = "(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";
|
|
23596
|
+
function modernColorCall(name) {
|
|
23597
|
+
return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
|
|
23598
|
+
}
|
|
23649
23599
|
function getMatchers() {
|
|
23650
23600
|
const cachedMatchers = {
|
|
23651
23601
|
rgb: undefined,
|
|
@@ -23656,7 +23606,12 @@ function getMatchers() {
|
|
|
23656
23606
|
hex4: undefined,
|
|
23657
23607
|
hex5: undefined,
|
|
23658
23608
|
hex6: undefined,
|
|
23659
|
-
hex8: undefined
|
|
23609
|
+
hex8: undefined,
|
|
23610
|
+
oklch: undefined,
|
|
23611
|
+
oklab: undefined,
|
|
23612
|
+
lab: undefined,
|
|
23613
|
+
lch: undefined,
|
|
23614
|
+
hwb: undefined
|
|
23660
23615
|
};
|
|
23661
23616
|
if (cachedMatchers.rgb === undefined) {
|
|
23662
23617
|
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER2, NUMBER2, NUMBER2));
|
|
@@ -23667,6 +23622,11 @@ function getMatchers() {
|
|
|
23667
23622
|
cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
23668
23623
|
cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
|
|
23669
23624
|
cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
|
|
23625
|
+
cachedMatchers.oklch = modernColorCall("oklch");
|
|
23626
|
+
cachedMatchers.oklab = modernColorCall("oklab");
|
|
23627
|
+
cachedMatchers.lab = modernColorCall("lab");
|
|
23628
|
+
cachedMatchers.lch = modernColorCall("lch");
|
|
23629
|
+
cachedMatchers.hwb = modernColorCall("hwb");
|
|
23670
23630
|
}
|
|
23671
23631
|
return cachedMatchers;
|
|
23672
23632
|
}
|
|
@@ -23730,6 +23690,96 @@ function parsePercentage(str) {
|
|
|
23730
23690
|
}
|
|
23731
23691
|
return int / 100;
|
|
23732
23692
|
}
|
|
23693
|
+
function parseModernComponent(str, percentScale) {
|
|
23694
|
+
if (str === "none")
|
|
23695
|
+
return 0;
|
|
23696
|
+
if (str.endsWith("%")) {
|
|
23697
|
+
return Number.parseFloat(str) / 100 * percentScale;
|
|
23698
|
+
}
|
|
23699
|
+
return Number.parseFloat(str);
|
|
23700
|
+
}
|
|
23701
|
+
function parseHueAngle(str) {
|
|
23702
|
+
if (str === "none")
|
|
23703
|
+
return 0;
|
|
23704
|
+
if (str.endsWith("rad")) {
|
|
23705
|
+
return Number.parseFloat(str) * 180 / Math.PI;
|
|
23706
|
+
}
|
|
23707
|
+
if (str.endsWith("grad"))
|
|
23708
|
+
return Number.parseFloat(str) * 0.9;
|
|
23709
|
+
if (str.endsWith("turn"))
|
|
23710
|
+
return Number.parseFloat(str) * 360;
|
|
23711
|
+
return Number.parseFloat(str);
|
|
23712
|
+
}
|
|
23713
|
+
function parseModernAlpha(str) {
|
|
23714
|
+
if (str === undefined || str === "none")
|
|
23715
|
+
return 1;
|
|
23716
|
+
if (str.endsWith("%")) {
|
|
23717
|
+
return Math.max(0, Math.min(1, Number.parseFloat(str) / 100));
|
|
23718
|
+
}
|
|
23719
|
+
return Math.max(0, Math.min(1, Number.parseFloat(str)));
|
|
23720
|
+
}
|
|
23721
|
+
function linearToSrgb(c) {
|
|
23722
|
+
if (c <= 0.0031308)
|
|
23723
|
+
return 12.92 * c;
|
|
23724
|
+
return 1.055 * c ** (1 / 2.4) - 0.055;
|
|
23725
|
+
}
|
|
23726
|
+
function clamp01(v) {
|
|
23727
|
+
return Math.max(0, Math.min(1, v));
|
|
23728
|
+
}
|
|
23729
|
+
function rgbFloatToInt(r2, g, b, alpha) {
|
|
23730
|
+
const ri = Math.round(clamp01(r2) * 255);
|
|
23731
|
+
const gi = Math.round(clamp01(g) * 255);
|
|
23732
|
+
const bi = Math.round(clamp01(b) * 255);
|
|
23733
|
+
const ai = Math.round(clamp01(alpha) * 255);
|
|
23734
|
+
return (ri << 24 | gi << 16 | bi << 8 | ai) >>> 0;
|
|
23735
|
+
}
|
|
23736
|
+
function oklabToSrgb(L, a, b) {
|
|
23737
|
+
const l_ = L + 0.3963377774 * a + 0.2158037573 * b;
|
|
23738
|
+
const m_ = L - 0.1055613458 * a - 0.0638541728 * b;
|
|
23739
|
+
const s_ = L - 0.0894841775 * a - 1.291485548 * b;
|
|
23740
|
+
const l = l_ * l_ * l_;
|
|
23741
|
+
const m = m_ * m_ * m_;
|
|
23742
|
+
const s = s_ * s_ * s_;
|
|
23743
|
+
const rLin = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
|
|
23744
|
+
const gLin = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
|
|
23745
|
+
const bLin = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
|
|
23746
|
+
return [linearToSrgb(rLin), linearToSrgb(gLin), linearToSrgb(bLin)];
|
|
23747
|
+
}
|
|
23748
|
+
function labToSrgb(L, a, b) {
|
|
23749
|
+
const epsilon = 216 / 24389;
|
|
23750
|
+
const kappa = 24389 / 27;
|
|
23751
|
+
const Xn = 0.95047;
|
|
23752
|
+
const Yn = 1;
|
|
23753
|
+
const Zn = 1.08883;
|
|
23754
|
+
const fy = (L + 16) / 116;
|
|
23755
|
+
const fx = a / 500 + fy;
|
|
23756
|
+
const fz = fy - b / 200;
|
|
23757
|
+
const fx3 = fx * fx * fx;
|
|
23758
|
+
const fz3 = fz * fz * fz;
|
|
23759
|
+
const xr = fx3 > epsilon ? fx3 : (116 * fx - 16) / kappa;
|
|
23760
|
+
const yr = L > kappa * epsilon ? ((L + 16) / 116) ** 3 : L / kappa;
|
|
23761
|
+
const zr = fz3 > epsilon ? fz3 : (116 * fz - 16) / kappa;
|
|
23762
|
+
const X = xr * Xn;
|
|
23763
|
+
const Y = yr * Yn;
|
|
23764
|
+
const Z = zr * Zn;
|
|
23765
|
+
const rLin = 3.2404542 * X - 1.5371385 * Y - 0.4985314 * Z;
|
|
23766
|
+
const gLin = -0.969266 * X + 1.8760108 * Y + 0.041556 * Z;
|
|
23767
|
+
const bLin = 0.0556434 * X - 0.2040259 * Y + 1.0572252 * Z;
|
|
23768
|
+
return [linearToSrgb(rLin), linearToSrgb(gLin), linearToSrgb(bLin)];
|
|
23769
|
+
}
|
|
23770
|
+
function hwbToSrgb(h, w, bk) {
|
|
23771
|
+
if (w + bk >= 1) {
|
|
23772
|
+
const gray = w / (w + bk);
|
|
23773
|
+
return [gray, gray, gray];
|
|
23774
|
+
}
|
|
23775
|
+
const q = 1;
|
|
23776
|
+
const p = 0;
|
|
23777
|
+
const r2 = hue2rgb(p, q, h + 1 / 3);
|
|
23778
|
+
const g = hue2rgb(p, q, h);
|
|
23779
|
+
const bl = hue2rgb(p, q, h - 1 / 3);
|
|
23780
|
+
const factor = 1 - w - bk;
|
|
23781
|
+
return [r2 * factor + w, g * factor + w, bl * factor + w];
|
|
23782
|
+
}
|
|
23733
23783
|
var colorNames = {
|
|
23734
23784
|
transparent: 0,
|
|
23735
23785
|
aliceblue: 4042850303,
|
|
@@ -23928,6 +23978,58 @@ function normalizeColor(color) {
|
|
|
23928
23978
|
return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
|
|
23929
23979
|
}
|
|
23930
23980
|
}
|
|
23981
|
+
if (matchers.oklch) {
|
|
23982
|
+
if (match = matchers.oklch.exec(color)) {
|
|
23983
|
+
const L = parseModernComponent(match[1], 1);
|
|
23984
|
+
const C = parseModernComponent(match[2], 0.4);
|
|
23985
|
+
const H = parseHueAngle(match[3]);
|
|
23986
|
+
const alpha = parseModernAlpha(match[4]);
|
|
23987
|
+
const hRad = H * Math.PI / 180;
|
|
23988
|
+
const [r2, g, b] = oklabToSrgb(L, C * Math.cos(hRad), C * Math.sin(hRad));
|
|
23989
|
+
return rgbFloatToInt(r2, g, b, alpha);
|
|
23990
|
+
}
|
|
23991
|
+
}
|
|
23992
|
+
if (matchers.oklab) {
|
|
23993
|
+
if (match = matchers.oklab.exec(color)) {
|
|
23994
|
+
const L = parseModernComponent(match[1], 1);
|
|
23995
|
+
const a = parseModernComponent(match[2], 0.4);
|
|
23996
|
+
const b = parseModernComponent(match[3], 0.4);
|
|
23997
|
+
const alpha = parseModernAlpha(match[4]);
|
|
23998
|
+
const [r2, g, bl] = oklabToSrgb(L, a, b);
|
|
23999
|
+
return rgbFloatToInt(r2, g, bl, alpha);
|
|
24000
|
+
}
|
|
24001
|
+
}
|
|
24002
|
+
if (matchers.lab) {
|
|
24003
|
+
if (match = matchers.lab.exec(color)) {
|
|
24004
|
+
const L = parseModernComponent(match[1], 100);
|
|
24005
|
+
const a = parseModernComponent(match[2], 125);
|
|
24006
|
+
const b = parseModernComponent(match[3], 125);
|
|
24007
|
+
const alpha = parseModernAlpha(match[4]);
|
|
24008
|
+
const [r2, g, bl] = labToSrgb(L, a, b);
|
|
24009
|
+
return rgbFloatToInt(r2, g, bl, alpha);
|
|
24010
|
+
}
|
|
24011
|
+
}
|
|
24012
|
+
if (matchers.lch) {
|
|
24013
|
+
if (match = matchers.lch.exec(color)) {
|
|
24014
|
+
const L = parseModernComponent(match[1], 100);
|
|
24015
|
+
const C = parseModernComponent(match[2], 150);
|
|
24016
|
+
const H = parseHueAngle(match[3]);
|
|
24017
|
+
const alpha = parseModernAlpha(match[4]);
|
|
24018
|
+
const hRad = H * Math.PI / 180;
|
|
24019
|
+
const [r2, g, bl] = labToSrgb(L, C * Math.cos(hRad), C * Math.sin(hRad));
|
|
24020
|
+
return rgbFloatToInt(r2, g, bl, alpha);
|
|
24021
|
+
}
|
|
24022
|
+
}
|
|
24023
|
+
if (matchers.hwb) {
|
|
24024
|
+
if (match = matchers.hwb.exec(color)) {
|
|
24025
|
+
const H = parseHueAngle(match[1]);
|
|
24026
|
+
const W = parseModernComponent(match[2], 1);
|
|
24027
|
+
const B = parseModernComponent(match[3], 1);
|
|
24028
|
+
const alpha = parseModernAlpha(match[4]);
|
|
24029
|
+
const [r2, g, bl] = hwbToSrgb(H / 360, W, B);
|
|
24030
|
+
return rgbFloatToInt(r2, g, bl, alpha);
|
|
24031
|
+
}
|
|
24032
|
+
}
|
|
23931
24033
|
throw new Error(`invalid color string ${color} provided`);
|
|
23932
24034
|
}
|
|
23933
24035
|
function processColor(color) {
|
|
@@ -26557,7 +26659,7 @@ var PlayerUI = ({
|
|
|
26557
26659
|
stopped = true;
|
|
26558
26660
|
};
|
|
26559
26661
|
}, [bufferStateDelayInMilliseconds, player.emitter]);
|
|
26560
|
-
|
|
26662
|
+
useImperativeHandle10(ref, () => {
|
|
26561
26663
|
const methods = {
|
|
26562
26664
|
play: player.play,
|
|
26563
26665
|
pause: () => {
|
|
@@ -33893,7 +33995,7 @@ import {
|
|
|
33893
33995
|
forwardRef as forwardRef34,
|
|
33894
33996
|
useCallback as useCallback36,
|
|
33895
33997
|
useEffect as useEffect46,
|
|
33896
|
-
useImperativeHandle as
|
|
33998
|
+
useImperativeHandle as useImperativeHandle12,
|
|
33897
33999
|
useRef as useRef46
|
|
33898
34000
|
} from "react";
|
|
33899
34001
|
|
|
@@ -34208,7 +34310,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
34208
34310
|
transforms: transforms.current
|
|
34209
34311
|
});
|
|
34210
34312
|
}, []);
|
|
34211
|
-
|
|
34313
|
+
useImperativeHandle12(ref, () => {
|
|
34212
34314
|
return {
|
|
34213
34315
|
onLeft,
|
|
34214
34316
|
onRight
|
|
@@ -34818,7 +34920,7 @@ import {
|
|
|
34818
34920
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
34819
34921
|
|
|
34820
34922
|
// ../core/dist/esm/version.mjs
|
|
34821
|
-
var VERSION2 = "4.0.
|
|
34923
|
+
var VERSION2 = "4.0.439";
|
|
34822
34924
|
|
|
34823
34925
|
// ../web-renderer/dist/esm/index.mjs
|
|
34824
34926
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -34826,7 +34928,7 @@ import { AudioSampleSource } from "mediabunny";
|
|
|
34826
34928
|
import { createRef as createRef6 } from "react";
|
|
34827
34929
|
import { flushSync as flushSync22 } from "react-dom";
|
|
34828
34930
|
import ReactDOM6 from "react-dom/client";
|
|
34829
|
-
import { useImperativeHandle as
|
|
34931
|
+
import { useImperativeHandle as useImperativeHandle13, useState as useState48 } from "react";
|
|
34830
34932
|
import { flushSync as flushSync3 } from "react-dom";
|
|
34831
34933
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
34832
34934
|
import { jsx as jsx217 } from "react/jsx-runtime";
|
|
@@ -35384,7 +35486,7 @@ var UpdateTime = ({
|
|
|
35384
35486
|
timeUpdater
|
|
35385
35487
|
}) => {
|
|
35386
35488
|
const [frame, setFrame] = useState48(initialFrame);
|
|
35387
|
-
|
|
35489
|
+
useImperativeHandle13(timeUpdater, () => ({
|
|
35388
35490
|
update: (f) => {
|
|
35389
35491
|
flushSync3(() => {
|
|
35390
35492
|
setFrame(f);
|
|
@@ -36227,6 +36329,48 @@ var parseDirection = (directionStr) => {
|
|
|
36227
36329
|
}
|
|
36228
36330
|
return 180;
|
|
36229
36331
|
};
|
|
36332
|
+
var cssColorToRgba = (color) => {
|
|
36333
|
+
try {
|
|
36334
|
+
const packed = NoReactInternals.processColor(color);
|
|
36335
|
+
const a = (packed >>> 24 & 255) / 255;
|
|
36336
|
+
const r2 = packed >>> 16 & 255;
|
|
36337
|
+
const g = packed >>> 8 & 255;
|
|
36338
|
+
const b = packed & 255;
|
|
36339
|
+
return { r: r2, g, b, a };
|
|
36340
|
+
} catch {
|
|
36341
|
+
return null;
|
|
36342
|
+
}
|
|
36343
|
+
};
|
|
36344
|
+
var isFullyTransparent = (color) => {
|
|
36345
|
+
const rgba2 = cssColorToRgba(color);
|
|
36346
|
+
return rgba2 !== null && rgba2.a === 0;
|
|
36347
|
+
};
|
|
36348
|
+
var findNearestNonTransparent = (stops, fromIndex, direction) => {
|
|
36349
|
+
let i = fromIndex + direction;
|
|
36350
|
+
while (i >= 0 && i < stops.length) {
|
|
36351
|
+
if (!isFullyTransparent(stops[i].color)) {
|
|
36352
|
+
return stops[i].color;
|
|
36353
|
+
}
|
|
36354
|
+
i += direction;
|
|
36355
|
+
}
|
|
36356
|
+
return null;
|
|
36357
|
+
};
|
|
36358
|
+
var resolveTransparentStops = (stops) => {
|
|
36359
|
+
for (let i = 0;i < stops.length; i++) {
|
|
36360
|
+
if (!isFullyTransparent(stops[i].color)) {
|
|
36361
|
+
continue;
|
|
36362
|
+
}
|
|
36363
|
+
const prev = findNearestNonTransparent(stops, i, -1);
|
|
36364
|
+
const next = findNearestNonTransparent(stops, i, 1);
|
|
36365
|
+
const neighbor = prev ?? next;
|
|
36366
|
+
if (neighbor) {
|
|
36367
|
+
const rgba2 = cssColorToRgba(neighbor);
|
|
36368
|
+
if (rgba2) {
|
|
36369
|
+
stops[i].color = `rgba(${rgba2.r}, ${rgba2.g}, ${rgba2.b}, 0)`;
|
|
36370
|
+
}
|
|
36371
|
+
}
|
|
36372
|
+
}
|
|
36373
|
+
};
|
|
36230
36374
|
var parseColorStops = (colorStopsStr) => {
|
|
36231
36375
|
const parts = colorStopsStr.split(/,(?![^(]*\))/);
|
|
36232
36376
|
const stops = [];
|
|
@@ -36310,6 +36454,7 @@ var parseColorStops = (colorStopsStr) => {
|
|
|
36310
36454
|
for (const stop of stops) {
|
|
36311
36455
|
stop.position = Math.max(0, Math.min(1, stop.position));
|
|
36312
36456
|
}
|
|
36457
|
+
resolveTransparentStops(stops);
|
|
36313
36458
|
return stops;
|
|
36314
36459
|
};
|
|
36315
36460
|
var extractGradientContent = (backgroundImage) => {
|
|
@@ -40046,7 +40191,7 @@ var ClearButton = (props) => {
|
|
|
40046
40191
|
|
|
40047
40192
|
// src/components/homepage/MuxVideo.tsx
|
|
40048
40193
|
import Hls2 from "hls.js";
|
|
40049
|
-
import { forwardRef as forwardRef37, useEffect as useEffect58, useImperativeHandle as
|
|
40194
|
+
import { forwardRef as forwardRef37, useEffect as useEffect58, useImperativeHandle as useImperativeHandle14, useRef as useRef53 } from "react";
|
|
40050
40195
|
|
|
40051
40196
|
// src/components/homepage/VideoPlayerWithControls.tsx
|
|
40052
40197
|
import Hls from "hls.js";
|
|
@@ -40158,7 +40303,7 @@ var getVideoToPlayUrl = (muxId) => {
|
|
|
40158
40303
|
var MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
40159
40304
|
const videoRef = useRef53(null);
|
|
40160
40305
|
const vidUrl = getVideoToPlayUrl(muxId);
|
|
40161
|
-
|
|
40306
|
+
useImperativeHandle14(ref, () => videoRef.current, []);
|
|
40162
40307
|
useEffect58(() => {
|
|
40163
40308
|
let hls;
|
|
40164
40309
|
if (videoRef.current) {
|
|
@@ -42515,7 +42660,7 @@ var GithubButton = () => {
|
|
|
42515
42660
|
" ",
|
|
42516
42661
|
/* @__PURE__ */ jsx164("div", {
|
|
42517
42662
|
className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
|
|
42518
|
-
children: "
|
|
42663
|
+
children: "40k"
|
|
42519
42664
|
})
|
|
42520
42665
|
]
|
|
42521
42666
|
});
|