@tarsis/toolkit 0.7.1 → 0.7.3
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/audio/hover.mp3 +0 -0
- package/dist/audio/public/audio/click.wav +0 -0
- package/dist/audio/public/audio/hover.mp3 +0 -0
- package/dist/audio/public/audio/lock/select.mp3 +0 -0
- package/dist/index.cjs +430 -207
- package/dist/index.d.ts +36 -3
- package/dist/index.js +431 -208
- package/dist/styles.css +618 -552
- package/dist/{tokens-B2AxRYyF.js → tokens-CDVSR49D.js} +1 -0
- package/dist/{tokens-DlMougUi.cjs → tokens-Nhzxtwvl.cjs} +1 -0
- package/dist/tokens.cjs +1 -1
- package/dist/tokens.d.ts +1 -0
- package/dist/tokens.js +1 -1
- package/package.json +24 -19
- package/dist/fonts/gt/maru/GT-Maru-Light-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Light-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Medium-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Medium-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Mono-Black-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Mono-Black-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Mono-Bold-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Mono-Bold-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Mono-Light-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Mono-Light-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Mono-Medium-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/GT-Maru-Mono-Medium-Trial.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-black-oblique.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-black.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-bold-oblique.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-bold.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-mega-l.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-mega-m.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-mega-s.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-mono-regular-oblique.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-mono-regular.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-regular-oblique.woff2 +0 -0
- package/dist/fonts/gt/maru/gt-maru-regular.woff2 +0 -0
- package/dist/fonts/gt-flexa/GT-Flexa-VF-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Light-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Light-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Medium-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Medium-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Mono-Black-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Mono-Black-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Mono-Bold-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Mono-Bold-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Mono-Light-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Mono-Light-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Mono-Medium-Oblique-Trial.woff2 +0 -0
- package/dist/fonts/maru/GT-Maru-Mono-Medium-Trial.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-black-oblique.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-black.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-bold-oblique.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-bold.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-mega-l.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-mega-m.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-mega-s.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-mono-regular-oblique.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-mono-regular.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-regular-oblique.woff2 +0 -0
- package/dist/fonts/maru/gt-maru-regular.woff2 +0 -0
- package/dist/fonts/orbitron/orbitron-black.fnt +0 -426
- package/dist/fonts/orbitron/orbitron-black.png +0 -0
- /package/dist/audio/{fail.mp3 → public/audio/lock/fail.mp3} +0 -0
- /package/dist/audio/{fail.ogg → public/audio/lock/fail.ogg} +0 -0
- /package/dist/audio/{select.mp3 → public/audio/lock/hover.mp3} +0 -0
- /package/dist/audio/{hover.ogg → public/audio/lock/hover.ogg} +0 -0
- /package/dist/audio/{prev-next.mp3 → public/audio/lock/prev-next.mp3} +0 -0
- /package/dist/audio/{prev-next.ogg → public/audio/lock/prev-next.ogg} +0 -0
- /package/dist/audio/{select.ogg → public/audio/lock/select.ogg} +0 -0
- /package/dist/audio/{success.mp3 → public/audio/lock/success.mp3} +0 -0
- /package/dist/audio/{success.ogg → public/audio/lock/success.ogg} +0 -0
- /package/dist/fonts/{GT-Maru-Light-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Light-Oblique-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Light-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Light-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Medium-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Medium-Oblique-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Medium-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Medium-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Mono-Black-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Black-Oblique-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Mono-Black-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Black-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Mono-Bold-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Bold-Oblique-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Mono-Bold-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Bold-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Mono-Light-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Light-Oblique-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Mono-Light-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Light-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Mono-Medium-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Medium-Oblique-Trial.woff2} +0 -0
- /package/dist/fonts/{GT-Maru-Mono-Medium-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Medium-Trial.woff2} +0 -0
- /package/dist/fonts/{gt-maru-black-oblique.woff2 → src/fonts/gt/maru/gt-maru-black-oblique.woff2} +0 -0
- /package/dist/fonts/{gt-maru-black.woff2 → src/fonts/gt/maru/gt-maru-black.woff2} +0 -0
- /package/dist/fonts/{gt-maru-bold-oblique.woff2 → src/fonts/gt/maru/gt-maru-bold-oblique.woff2} +0 -0
- /package/dist/fonts/{gt-maru-bold.woff2 → src/fonts/gt/maru/gt-maru-bold.woff2} +0 -0
- /package/dist/fonts/{gt-maru-mega-l.woff2 → src/fonts/gt/maru/gt-maru-mega-l.woff2} +0 -0
- /package/dist/fonts/{gt-maru-mega-m.woff2 → src/fonts/gt/maru/gt-maru-mega-m.woff2} +0 -0
- /package/dist/fonts/{gt-maru-mega-s.woff2 → src/fonts/gt/maru/gt-maru-mega-s.woff2} +0 -0
- /package/dist/fonts/{gt-maru-mono-regular-oblique.woff2 → src/fonts/gt/maru/gt-maru-mono-regular-oblique.woff2} +0 -0
- /package/dist/fonts/{gt-maru-mono-regular.woff2 → src/fonts/gt/maru/gt-maru-mono-regular.woff2} +0 -0
- /package/dist/fonts/{gt-maru-regular-oblique.woff2 → src/fonts/gt/maru/gt-maru-regular-oblique.woff2} +0 -0
- /package/dist/fonts/{gt-maru-regular.woff2 → src/fonts/gt/maru/gt-maru-regular.woff2} +0 -0
- /package/dist/fonts/{GT-Flexa-VF-Trial.woff2 → src/fonts/gt-flexa/GT-Flexa-VF-Trial.woff2} +0 -0
- /package/dist/fonts/{orbitron-black.fnt → src/fonts/orbitron/orbitron-black.fnt} +0 -0
- /package/dist/fonts/{orbitron-black.png → src/fonts/orbitron/orbitron-black.png} +0 -0
- /package/dist/icons/{arrow-dots-mask.svg → src/icons/arrow-dots-mask.svg} +0 -0
- /package/dist/icons/{arrow-dots.svg → src/icons/arrow-dots.svg} +0 -0
- /package/dist/icons/{repost.svg → src/icons/repost.svg} +0 -0
package/dist/index.js
CHANGED
|
@@ -7,9 +7,9 @@ import { n as easing, r as staggerDelay, t as animationDuration } from "./animat
|
|
|
7
7
|
import { i as lockAudioAssets, r as iconAssets, t as dockAudioAssets } from "./assets-huTvlamy.js";
|
|
8
8
|
import { a as FormField, c as VisuallyHidden, i as DialogBase, n as TooltipBase, o as useFormFieldContext, r as PopoverBase, s as Portal, t as SelectBase } from "./SelectBase-DPcXvMTa.js";
|
|
9
9
|
import { n as Cluster, r as Stack, t as Container } from "./Container-BirkN1fA.js";
|
|
10
|
-
import { a as getVarName, i as Token, n as validateColorScheme, o as resolveToken, r as springPreset, t as REQUIRED_SEMANTIC_VARS } from "./tokens-
|
|
10
|
+
import { a as getVarName, i as Token, n as validateColorScheme, o as resolveToken, r as springPreset, t as REQUIRED_SEMANTIC_VARS } from "./tokens-CDVSR49D.js";
|
|
11
11
|
import cn from "clsx";
|
|
12
|
-
import { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
12
|
+
import { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
13
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import * as THREE from "three";
|
|
15
15
|
import gsap from "gsap";
|
|
@@ -758,31 +758,31 @@ var BubblyParticlesButton = () => {
|
|
|
758
758
|
});
|
|
759
759
|
};
|
|
760
760
|
var BurningButton_module_default = {
|
|
761
|
-
root: "
|
|
762
|
-
button: "
|
|
763
|
-
p: "
|
|
764
|
-
text: "
|
|
765
|
-
rise1: "
|
|
766
|
-
rise2: "
|
|
767
|
-
rise3: "
|
|
768
|
-
rise4: "
|
|
769
|
-
rise5: "
|
|
770
|
-
rise6: "
|
|
771
|
-
rise7: "
|
|
772
|
-
rise8: "
|
|
773
|
-
rise9: "
|
|
774
|
-
rise10: "
|
|
775
|
-
rise11: "
|
|
776
|
-
rise12: "
|
|
777
|
-
rise13: "
|
|
778
|
-
rise14: "
|
|
779
|
-
rise15: "
|
|
780
|
-
rise16: "
|
|
781
|
-
rise17: "
|
|
782
|
-
rise18: "
|
|
783
|
-
rise19: "
|
|
784
|
-
rise20: "
|
|
785
|
-
effects: "
|
|
761
|
+
root: "_root_16kfh_1",
|
|
762
|
+
button: "_button_16kfh_11",
|
|
763
|
+
p: "_p_16kfh_24",
|
|
764
|
+
text: "_text_16kfh_24",
|
|
765
|
+
rise1: "_rise1_16kfh_1",
|
|
766
|
+
rise2: "_rise2_16kfh_1",
|
|
767
|
+
rise3: "_rise3_16kfh_1",
|
|
768
|
+
rise4: "_rise4_16kfh_1",
|
|
769
|
+
rise5: "_rise5_16kfh_1",
|
|
770
|
+
rise6: "_rise6_16kfh_1",
|
|
771
|
+
rise7: "_rise7_16kfh_1",
|
|
772
|
+
rise8: "_rise8_16kfh_1",
|
|
773
|
+
rise9: "_rise9_16kfh_1",
|
|
774
|
+
rise10: "_rise10_16kfh_1",
|
|
775
|
+
rise11: "_rise11_16kfh_1",
|
|
776
|
+
rise12: "_rise12_16kfh_1",
|
|
777
|
+
rise13: "_rise13_16kfh_1",
|
|
778
|
+
rise14: "_rise14_16kfh_1",
|
|
779
|
+
rise15: "_rise15_16kfh_1",
|
|
780
|
+
rise16: "_rise16_16kfh_1",
|
|
781
|
+
rise17: "_rise17_16kfh_1",
|
|
782
|
+
rise18: "_rise18_16kfh_1",
|
|
783
|
+
rise19: "_rise19_16kfh_1",
|
|
784
|
+
rise20: "_rise20_16kfh_1",
|
|
785
|
+
effects: "_effects_16kfh_238"
|
|
786
786
|
};
|
|
787
787
|
//#endregion
|
|
788
788
|
//#region src/components/Buttons/BurningButton/BurningButton.tsx
|
|
@@ -3834,10 +3834,10 @@ var NeonButton = ({ className, ...rest }) => {
|
|
|
3834
3834
|
});
|
|
3835
3835
|
};
|
|
3836
3836
|
var NoisyButton_module_default = {
|
|
3837
|
-
root: "
|
|
3838
|
-
i: "
|
|
3839
|
-
noise: "
|
|
3840
|
-
text: "
|
|
3837
|
+
root: "_root_g5m4p_2",
|
|
3838
|
+
i: "_i_g5m4p_22",
|
|
3839
|
+
noise: "_noise_g5m4p_1",
|
|
3840
|
+
text: "_text_g5m4p_482"
|
|
3841
3841
|
};
|
|
3842
3842
|
//#endregion
|
|
3843
3843
|
//#region src/components/Buttons/NoisyButton/NoisyButton.tsx
|
|
@@ -4722,16 +4722,18 @@ var ShimmeringBorderGradient = () => {
|
|
|
4722
4722
|
});
|
|
4723
4723
|
};
|
|
4724
4724
|
//#endregion
|
|
4725
|
-
//#region src/components/Buttons/
|
|
4726
|
-
|
|
4725
|
+
//#region src/components/Buttons/ReflectiveButton/MacCursor.tsx
|
|
4726
|
+
function MacCursor() {
|
|
4727
|
+
const filterId = useId().replace(/:/g, "");
|
|
4727
4728
|
return /* @__PURE__ */ jsxs("svg", {
|
|
4728
4729
|
width: "22",
|
|
4729
4730
|
height: "22",
|
|
4730
4731
|
viewBox: "0 0 22 22",
|
|
4731
4732
|
fill: "none",
|
|
4732
4733
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4734
|
+
"aria-hidden": true,
|
|
4733
4735
|
children: [/* @__PURE__ */ jsxs("g", {
|
|
4734
|
-
filter:
|
|
4736
|
+
filter: `url(#${filterId})`,
|
|
4735
4737
|
children: [
|
|
4736
4738
|
/* @__PURE__ */ jsx("path", {
|
|
4737
4739
|
fillRule: "evenodd",
|
|
@@ -4768,7 +4770,7 @@ var MacCursor = () => {
|
|
|
4768
4770
|
})
|
|
4769
4771
|
]
|
|
4770
4772
|
}), /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("filter", {
|
|
4771
|
-
id:
|
|
4773
|
+
id: filterId,
|
|
4772
4774
|
x: "0.733344",
|
|
4773
4775
|
y: "0.4",
|
|
4774
4776
|
width: "21.2",
|
|
@@ -4806,173 +4808,384 @@ var MacCursor = () => {
|
|
|
4806
4808
|
]
|
|
4807
4809
|
}) })]
|
|
4808
4810
|
});
|
|
4809
|
-
}
|
|
4811
|
+
}
|
|
4810
4812
|
//#endregion
|
|
4811
|
-
//#region src/components/Buttons/
|
|
4813
|
+
//#region src/components/Buttons/ReflectiveButton/ReflectiveButton.helpers.ts
|
|
4812
4814
|
var scale$2 = (number, inMin, inMax, outMin, outMax) => {
|
|
4813
4815
|
return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
|
|
4814
4816
|
};
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4817
|
+
function getDefaultReflectiveButtonVideoConstraints() {
|
|
4818
|
+
return {
|
|
4819
|
+
audio: false,
|
|
4820
|
+
video: {
|
|
4821
|
+
width: { ideal: 600 },
|
|
4822
|
+
height: { ideal: 600 },
|
|
4823
|
+
facingMode: "user"
|
|
4824
|
+
}
|
|
4825
|
+
};
|
|
4826
|
+
}
|
|
4827
|
+
var ReflectiveButton_module_default = {
|
|
4828
|
+
root: "_root_1xtu1_1",
|
|
4829
|
+
buttonContainer: "_buttonContainer_1xtu1_6",
|
|
4830
|
+
pressed: "_pressed_1xtu1_13",
|
|
4831
|
+
button: "_button_1xtu1_6",
|
|
4832
|
+
shadow: "_shadow_1xtu1_55",
|
|
4833
|
+
text: "_text_1xtu1_71",
|
|
4834
|
+
buttonReflection: "_buttonReflection_1xtu1_88",
|
|
4835
|
+
surfaceReflection: "_surfaceReflection_1xtu1_96",
|
|
4836
|
+
detailsContainer: "_detailsContainer_1xtu1_113",
|
|
4837
|
+
playfulLayersClip: "_playfulLayersClip_1xtu1_125",
|
|
4838
|
+
cursor: "_cursor_1xtu1_135",
|
|
4839
|
+
visuallyHidden: "_visuallyHidden_1xtu1_144",
|
|
4840
|
+
fingerprint: "_fingerprint_1xtu1_156"
|
|
4841
|
+
};
|
|
4842
|
+
//#endregion
|
|
4843
|
+
//#region src/components/Buttons/ReflectiveButton/useUserMediaVideo.ts
|
|
4844
|
+
function mapGetUserMediaError(e) {
|
|
4845
|
+
const error = e instanceof DOMException ? e : e instanceof Error ? e : new Error(String(e));
|
|
4846
|
+
if (e instanceof DOMException && e.name === "NotAllowedError") return {
|
|
4847
|
+
status: "denied",
|
|
4848
|
+
error
|
|
4849
|
+
};
|
|
4850
|
+
return {
|
|
4851
|
+
status: "unavailable",
|
|
4852
|
+
error
|
|
4853
|
+
};
|
|
4854
|
+
}
|
|
4855
|
+
function useUserMediaVideo(constraints, options) {
|
|
4856
|
+
const optsRef = useRef(options);
|
|
4857
|
+
const constraintsRef = useRef(constraints);
|
|
4858
|
+
useEffect(() => {
|
|
4859
|
+
optsRef.current = options;
|
|
4860
|
+
}, [options]);
|
|
4861
|
+
useEffect(() => {
|
|
4862
|
+
constraintsRef.current = constraints;
|
|
4863
|
+
}, [constraints]);
|
|
4864
|
+
const [status, setStatus] = useState("idle");
|
|
4865
|
+
const [stream, setStream] = useState(null);
|
|
4866
|
+
const requestGenerationRef = useRef(0);
|
|
4867
|
+
const streamRef = useRef(null);
|
|
4868
|
+
const setStatusAndNotify = useCallback((next) => {
|
|
4869
|
+
setStatus(next);
|
|
4870
|
+
optsRef.current?.onStatusChange?.(next);
|
|
4871
|
+
}, []);
|
|
4872
|
+
const stopTracksInternal = useCallback(() => {
|
|
4873
|
+
const s = streamRef.current;
|
|
4874
|
+
if (s) s.getTracks().forEach((t) => {
|
|
4875
|
+
t.stop();
|
|
4876
|
+
});
|
|
4877
|
+
streamRef.current = null;
|
|
4878
|
+
setStream(null);
|
|
4879
|
+
}, []);
|
|
4880
|
+
const stop = useCallback(() => {
|
|
4881
|
+
requestGenerationRef.current += 1;
|
|
4882
|
+
stopTracksInternal();
|
|
4883
|
+
setStatusAndNotify("idle");
|
|
4884
|
+
}, [setStatusAndNotify, stopTracksInternal]);
|
|
4885
|
+
const start = useCallback(() => {
|
|
4886
|
+
if (typeof navigator === "undefined") {
|
|
4887
|
+
const err = /* @__PURE__ */ new Error("navigator is not available");
|
|
4888
|
+
setStatusAndNotify("unavailable");
|
|
4889
|
+
optsRef.current?.onError?.(err);
|
|
4890
|
+
return;
|
|
4891
|
+
}
|
|
4892
|
+
const mediaDevices = navigator.mediaDevices;
|
|
4893
|
+
if (!mediaDevices?.getUserMedia) {
|
|
4894
|
+
const err = /* @__PURE__ */ new Error("getUserMedia is not supported");
|
|
4895
|
+
setStatusAndNotify("unavailable");
|
|
4896
|
+
optsRef.current?.onError?.(err);
|
|
4897
|
+
return;
|
|
4898
|
+
}
|
|
4899
|
+
const myGeneration = ++requestGenerationRef.current;
|
|
4900
|
+
stopTracksInternal();
|
|
4901
|
+
setStatusAndNotify("pending");
|
|
4902
|
+
mediaDevices.getUserMedia(constraintsRef.current).then((mediaStream) => {
|
|
4903
|
+
if (myGeneration !== requestGenerationRef.current) {
|
|
4904
|
+
mediaStream.getTracks().forEach((t) => {
|
|
4905
|
+
t.stop();
|
|
4906
|
+
});
|
|
4907
|
+
return;
|
|
4908
|
+
}
|
|
4909
|
+
streamRef.current = mediaStream;
|
|
4910
|
+
setStream(mediaStream);
|
|
4911
|
+
setStatusAndNotify("live");
|
|
4912
|
+
}).catch((e) => {
|
|
4913
|
+
if (myGeneration !== requestGenerationRef.current) return;
|
|
4914
|
+
const { status: nextStatus, error } = mapGetUserMediaError(e);
|
|
4915
|
+
setStatusAndNotify(nextStatus);
|
|
4916
|
+
optsRef.current?.onError?.(error);
|
|
4917
|
+
});
|
|
4918
|
+
}, [setStatusAndNotify, stopTracksInternal]);
|
|
4919
|
+
useEffect(() => {
|
|
4920
|
+
return () => {
|
|
4921
|
+
requestGenerationRef.current += 1;
|
|
4922
|
+
const s = streamRef.current;
|
|
4923
|
+
if (s) s.getTracks().forEach((t) => {
|
|
4924
|
+
t.stop();
|
|
4925
|
+
});
|
|
4926
|
+
streamRef.current = null;
|
|
4927
|
+
};
|
|
4928
|
+
}, []);
|
|
4929
|
+
return {
|
|
4930
|
+
status,
|
|
4931
|
+
stream,
|
|
4932
|
+
start,
|
|
4933
|
+
stop
|
|
4934
|
+
};
|
|
4935
|
+
}
|
|
4936
|
+
//#endregion
|
|
4937
|
+
//#region src/components/Buttons/ReflectiveButton/ReflectiveButton.tsx
|
|
4938
|
+
var FINGERPRINT_MAX = 12;
|
|
4939
|
+
var defaultFeatures = {
|
|
4940
|
+
fingerprints: true,
|
|
4941
|
+
macCursor: true
|
|
4840
4942
|
};
|
|
4841
|
-
function
|
|
4943
|
+
function ReflectiveButton({ children, className, style, disabled = false, roughness = .2, offset = -200, camera = "on-interaction", features: featuresProp, videoConstraints, onCameraError, onCameraStateChange, cameraHandleRef, onPointerDown, onClick, onFocus, onBlur, ref, ...rest }) {
|
|
4944
|
+
const features = {
|
|
4945
|
+
...defaultFeatures,
|
|
4946
|
+
...featuresProp
|
|
4947
|
+
};
|
|
4948
|
+
const showPlayfulLayers = !useReducedMotion() && (features.macCursor || features.fingerprints);
|
|
4842
4949
|
const reflectionRef = useRef(null);
|
|
4843
4950
|
const surfaceReflectionRef = useRef(null);
|
|
4844
|
-
const
|
|
4951
|
+
const buttonElementRef = useRef(null);
|
|
4952
|
+
const interactionCameraStartedRef = useRef(false);
|
|
4953
|
+
const fingerprintIdRef = useRef(0);
|
|
4954
|
+
const pointerClientRef = useRef({
|
|
4955
|
+
x: 0,
|
|
4956
|
+
y: 0
|
|
4957
|
+
});
|
|
4958
|
+
const rafIdRef = useRef(null);
|
|
4845
4959
|
const [cursorPosition, setCursorPosition] = useState({
|
|
4846
4960
|
x: 0,
|
|
4847
4961
|
y: 0
|
|
4848
4962
|
});
|
|
4849
|
-
const [
|
|
4963
|
+
const [pointerOverRoot, setPointerOverRoot] = useState(false);
|
|
4964
|
+
const [buttonKeyboardFocus, setButtonKeyboardFocus] = useState(false);
|
|
4850
4965
|
const [buttonPressed, setButtonPressed] = useState(false);
|
|
4851
4966
|
const [fingerprints, setFingerprints] = useState([]);
|
|
4852
|
-
const
|
|
4853
|
-
const
|
|
4854
|
-
|
|
4967
|
+
const mergedButtonRef = useMergeRefs(ref, buttonElementRef);
|
|
4968
|
+
const { status, stream, start, stop } = useUserMediaVideo(useMemo(() => {
|
|
4969
|
+
const base = getDefaultReflectiveButtonVideoConstraints();
|
|
4970
|
+
if (!videoConstraints) return base;
|
|
4971
|
+
return {
|
|
4972
|
+
...base,
|
|
4973
|
+
video: {
|
|
4974
|
+
...base.video,
|
|
4975
|
+
...videoConstraints
|
|
4976
|
+
}
|
|
4977
|
+
};
|
|
4978
|
+
}, [videoConstraints]), {
|
|
4979
|
+
onError: onCameraError,
|
|
4980
|
+
onStatusChange: onCameraStateChange
|
|
4981
|
+
});
|
|
4982
|
+
const cameraStatusMessage = status === "denied" ? "Camera access denied" : status === "unavailable" ? "Camera unavailable" : null;
|
|
4983
|
+
useImperativeHandle(cameraHandleRef, () => ({
|
|
4984
|
+
requestCamera: start,
|
|
4985
|
+
stopCamera: stop
|
|
4986
|
+
}), [start, stop]);
|
|
4855
4987
|
useEffect(() => {
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
if (!video) return;
|
|
4868
|
-
video.setAttribute("playsinline", "true");
|
|
4869
|
-
video.srcObject = stream;
|
|
4870
|
-
video.onloadedmetadata = () => {
|
|
4871
|
-
video.play();
|
|
4872
|
-
};
|
|
4873
|
-
const surface = surfaceReflectionRef.current;
|
|
4874
|
-
if (!surface) return;
|
|
4875
|
-
surface.setAttribute("playsinline", "true");
|
|
4876
|
-
surface.srcObject = stream;
|
|
4877
|
-
surface.onloadedmetadata = () => {
|
|
4878
|
-
surface.play();
|
|
4879
|
-
};
|
|
4880
|
-
}).catch((e) => console.error(e));
|
|
4881
|
-
} catch (e) {
|
|
4882
|
-
console.error(e);
|
|
4883
|
-
}
|
|
4988
|
+
interactionCameraStartedRef.current = false;
|
|
4989
|
+
}, [camera, disabled]);
|
|
4990
|
+
useEffect(() => {
|
|
4991
|
+
if (disabled) stop();
|
|
4992
|
+
}, [disabled, stop]);
|
|
4993
|
+
useEffect(() => {
|
|
4994
|
+
if (camera !== "on-mount" || disabled) return;
|
|
4995
|
+
start();
|
|
4996
|
+
return () => {
|
|
4997
|
+
stop();
|
|
4998
|
+
};
|
|
4884
4999
|
}, [
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
5000
|
+
camera,
|
|
5001
|
+
disabled,
|
|
5002
|
+
start,
|
|
5003
|
+
stop
|
|
4888
5004
|
]);
|
|
4889
5005
|
useEffect(() => {
|
|
4890
|
-
|
|
4891
|
-
const
|
|
4892
|
-
|
|
5006
|
+
const face = reflectionRef.current;
|
|
5007
|
+
const surface = surfaceReflectionRef.current;
|
|
5008
|
+
const clearVideo = (el) => {
|
|
5009
|
+
if (!el) return;
|
|
5010
|
+
el.onloadedmetadata = null;
|
|
5011
|
+
el.srcObject = null;
|
|
5012
|
+
};
|
|
5013
|
+
if (!stream) {
|
|
5014
|
+
clearVideo(face);
|
|
5015
|
+
clearVideo(surface);
|
|
5016
|
+
return;
|
|
5017
|
+
}
|
|
5018
|
+
const attach = (el) => {
|
|
5019
|
+
if (!el) return;
|
|
5020
|
+
el.setAttribute("playsinline", "true");
|
|
5021
|
+
el.muted = true;
|
|
5022
|
+
el.srcObject = stream;
|
|
5023
|
+
el.onloadedmetadata = () => {
|
|
5024
|
+
el.play().catch(() => {});
|
|
5025
|
+
};
|
|
5026
|
+
};
|
|
5027
|
+
attach(face);
|
|
5028
|
+
attach(surface);
|
|
5029
|
+
return () => {
|
|
5030
|
+
clearVideo(face);
|
|
5031
|
+
clearVideo(surface);
|
|
5032
|
+
};
|
|
5033
|
+
}, [stream]);
|
|
5034
|
+
useEffect(() => {
|
|
5035
|
+
if (!showPlayfulLayers || !features.macCursor) return;
|
|
5036
|
+
const flushCursor = () => {
|
|
5037
|
+
rafIdRef.current = null;
|
|
5038
|
+
const rect = buttonElementRef.current?.getBoundingClientRect();
|
|
4893
5039
|
if (!rect) return;
|
|
5040
|
+
const { x: clientX, y: clientY } = pointerClientRef.current;
|
|
4894
5041
|
setCursorPosition({
|
|
4895
|
-
x:
|
|
4896
|
-
y:
|
|
5042
|
+
x: clientX - rect.x,
|
|
5043
|
+
y: clientY - rect.y
|
|
4897
5044
|
});
|
|
4898
5045
|
};
|
|
5046
|
+
const handleMouseMove = (event) => {
|
|
5047
|
+
pointerClientRef.current = {
|
|
5048
|
+
x: event.clientX,
|
|
5049
|
+
y: event.clientY
|
|
5050
|
+
};
|
|
5051
|
+
if (rafIdRef.current === null) rafIdRef.current = window.requestAnimationFrame(flushCursor);
|
|
5052
|
+
};
|
|
4899
5053
|
window.addEventListener("mousemove", handleMouseMove);
|
|
4900
5054
|
return () => {
|
|
4901
5055
|
window.removeEventListener("mousemove", handleMouseMove);
|
|
5056
|
+
if (rafIdRef.current !== null) {
|
|
5057
|
+
window.cancelAnimationFrame(rafIdRef.current);
|
|
5058
|
+
rafIdRef.current = null;
|
|
5059
|
+
}
|
|
4902
5060
|
};
|
|
4903
|
-
}, [
|
|
4904
|
-
const
|
|
5061
|
+
}, [features.macCursor, showPlayfulLayers]);
|
|
5062
|
+
const mappedRoughness = Math.round(scale$2(roughness, 0, 1, 0, 16));
|
|
5063
|
+
const tryStartInteractionCamera = useCallback(() => {
|
|
5064
|
+
if (camera !== "on-interaction" || disabled) return;
|
|
5065
|
+
if (interactionCameraStartedRef.current) return;
|
|
5066
|
+
interactionCameraStartedRef.current = true;
|
|
5067
|
+
start();
|
|
5068
|
+
}, [
|
|
5069
|
+
camera,
|
|
5070
|
+
disabled,
|
|
5071
|
+
start
|
|
5072
|
+
]);
|
|
5073
|
+
const addFingerprintFromClient = useCallback((clientX, clientY) => {
|
|
5074
|
+
if (!features.fingerprints || !showPlayfulLayers) return;
|
|
5075
|
+
const rect = buttonElementRef.current?.getBoundingClientRect();
|
|
5076
|
+
if (!rect) return;
|
|
5077
|
+
fingerprintIdRef.current += 1;
|
|
5078
|
+
const id = String(fingerprintIdRef.current);
|
|
5079
|
+
setFingerprints((prev) => [...prev, {
|
|
5080
|
+
id,
|
|
5081
|
+
x: clientX - rect.x,
|
|
5082
|
+
y: clientY - rect.y
|
|
5083
|
+
}].slice(-FINGERPRINT_MAX));
|
|
5084
|
+
}, [features.fingerprints, showPlayfulLayers]);
|
|
5085
|
+
const endPress = useCallback(() => setButtonPressed(false), []);
|
|
5086
|
+
const handleButtonFocus = useCallback((e) => {
|
|
5087
|
+
onFocus?.(e);
|
|
5088
|
+
setButtonKeyboardFocus(true);
|
|
5089
|
+
}, [onFocus]);
|
|
5090
|
+
const handleButtonBlur = useCallback((e) => {
|
|
5091
|
+
onBlur?.(e);
|
|
5092
|
+
setButtonKeyboardFocus(false);
|
|
5093
|
+
}, [onBlur]);
|
|
5094
|
+
const handlePointerDown = useCallback((e) => {
|
|
5095
|
+
onPointerDown?.(e);
|
|
5096
|
+
if (e.defaultPrevented) return;
|
|
5097
|
+
tryStartInteractionCamera();
|
|
4905
5098
|
setButtonPressed(true);
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
};
|
|
4922
|
-
setButtonPressed(true);
|
|
4923
|
-
setFingerprints((fingerprints) => [...fingerprints, fingerprint]);
|
|
4924
|
-
}
|
|
4925
|
-
};
|
|
4926
|
-
if (!inBrowser) return null;
|
|
5099
|
+
try {
|
|
5100
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
5101
|
+
} catch {}
|
|
5102
|
+
addFingerprintFromClient(e.clientX, e.clientY);
|
|
5103
|
+
}, [
|
|
5104
|
+
addFingerprintFromClient,
|
|
5105
|
+
onPointerDown,
|
|
5106
|
+
tryStartInteractionCamera
|
|
5107
|
+
]);
|
|
5108
|
+
const handleClick = useCallback((e) => {
|
|
5109
|
+
onClick?.(e);
|
|
5110
|
+
if (e.defaultPrevented) return;
|
|
5111
|
+
tryStartInteractionCamera();
|
|
5112
|
+
}, [onClick, tryStartInteractionCamera]);
|
|
5113
|
+
const showMacCursorAffordance = pointerOverRoot || buttonKeyboardFocus;
|
|
4927
5114
|
return /* @__PURE__ */ jsxs("div", {
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
children: /* @__PURE__ */ jsx(
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
}
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
5115
|
+
className: cn(ReflectiveButton_module_default.root, className),
|
|
5116
|
+
style,
|
|
5117
|
+
onMouseEnter: () => setPointerOverRoot(true),
|
|
5118
|
+
onMouseLeave: () => setPointerOverRoot(false),
|
|
5119
|
+
children: [cameraStatusMessage ? /* @__PURE__ */ jsx("span", {
|
|
5120
|
+
className: ReflectiveButton_module_default.visuallyHidden,
|
|
5121
|
+
role: "status",
|
|
5122
|
+
"aria-live": "polite",
|
|
5123
|
+
children: cameraStatusMessage
|
|
5124
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
5125
|
+
className: cn(ReflectiveButton_module_default.buttonContainer, { [ReflectiveButton_module_default.pressed]: buttonPressed }),
|
|
5126
|
+
children: [
|
|
5127
|
+
/* @__PURE__ */ jsx("div", {
|
|
5128
|
+
className: ReflectiveButton_module_default.detailsContainer,
|
|
5129
|
+
children: showPlayfulLayers && (features.macCursor || features.fingerprints) ? /* @__PURE__ */ jsxs("div", {
|
|
5130
|
+
className: ReflectiveButton_module_default.playfulLayersClip,
|
|
5131
|
+
children: [features.macCursor ? /* @__PURE__ */ jsx("div", {
|
|
5132
|
+
className: ReflectiveButton_module_default.cursor,
|
|
5133
|
+
style: {
|
|
5134
|
+
transform: `translate(${cursorPosition.x}px, ${cursorPosition.y}px) translate(-50%, -50%)`,
|
|
5135
|
+
opacity: showMacCursorAffordance ? 1 : 0
|
|
5136
|
+
},
|
|
5137
|
+
children: /* @__PURE__ */ jsx(MacCursor, {})
|
|
5138
|
+
}) : null, features.fingerprints ? fingerprints.map((fp) => /* @__PURE__ */ jsx("div", {
|
|
5139
|
+
className: ReflectiveButton_module_default.fingerprint,
|
|
5140
|
+
style: { transform: `translate(${fp.x}px, ${fp.y}px) translate(-50%, -50%)` }
|
|
5141
|
+
}, fp.id)) : null]
|
|
5142
|
+
}) : null
|
|
5143
|
+
}),
|
|
5144
|
+
/* @__PURE__ */ jsx("video", {
|
|
5145
|
+
ref: surfaceReflectionRef,
|
|
5146
|
+
className: cn(ReflectiveButton_module_default.surfaceReflection, { [ReflectiveButton_module_default.pressed]: buttonPressed }),
|
|
5147
|
+
"aria-hidden": true,
|
|
5148
|
+
muted: true,
|
|
5149
|
+
playsInline: true
|
|
5150
|
+
}),
|
|
5151
|
+
/* @__PURE__ */ jsxs("button", {
|
|
5152
|
+
type: "button",
|
|
5153
|
+
ref: mergedButtonRef,
|
|
5154
|
+
disabled,
|
|
5155
|
+
className: cn(ReflectiveButton_module_default.button, { [ReflectiveButton_module_default.pressed]: buttonPressed }),
|
|
5156
|
+
"aria-busy": status === "pending" || void 0,
|
|
5157
|
+
onPointerDown: handlePointerDown,
|
|
5158
|
+
onPointerUp: endPress,
|
|
5159
|
+
onPointerCancel: endPress,
|
|
5160
|
+
onLostPointerCapture: endPress,
|
|
5161
|
+
onClick: handleClick,
|
|
5162
|
+
onFocus: handleButtonFocus,
|
|
5163
|
+
onBlur: handleButtonBlur,
|
|
5164
|
+
...rest,
|
|
5165
|
+
children: [
|
|
5166
|
+
/* @__PURE__ */ jsx("video", {
|
|
5167
|
+
ref: reflectionRef,
|
|
5168
|
+
playsInline: true,
|
|
5169
|
+
className: ReflectiveButton_module_default.buttonReflection,
|
|
5170
|
+
"aria-hidden": true,
|
|
5171
|
+
muted: true,
|
|
5172
|
+
style: {
|
|
5173
|
+
filter: `blur(${mappedRoughness}px) saturate(0.4) brightness(1.1)`,
|
|
5174
|
+
objectPosition: `0px ${offset}px`
|
|
5175
|
+
}
|
|
5176
|
+
}),
|
|
5177
|
+
/* @__PURE__ */ jsx("div", {
|
|
5178
|
+
className: ReflectiveButton_module_default.shadow,
|
|
5179
|
+
"aria-hidden": true
|
|
5180
|
+
}),
|
|
5181
|
+
/* @__PURE__ */ jsx("span", {
|
|
5182
|
+
className: ReflectiveButton_module_default.text,
|
|
5183
|
+
children
|
|
5184
|
+
})
|
|
5185
|
+
]
|
|
5186
|
+
})
|
|
5187
|
+
]
|
|
5188
|
+
})]
|
|
4976
5189
|
});
|
|
4977
5190
|
}
|
|
4978
5191
|
//#endregion
|
|
@@ -9581,16 +9794,16 @@ var playAudio = (src, onError) => {
|
|
|
9581
9794
|
});
|
|
9582
9795
|
};
|
|
9583
9796
|
var DockMotion_module_default = {
|
|
9584
|
-
root: "
|
|
9585
|
-
container: "
|
|
9586
|
-
containerGlass: "
|
|
9587
|
-
glossyXLine: "
|
|
9588
|
-
items: "
|
|
9589
|
-
child: "
|
|
9590
|
-
divider: "
|
|
9591
|
-
glassFilter: "
|
|
9592
|
-
glassOverlay: "
|
|
9593
|
-
glassSpecular: "
|
|
9797
|
+
root: "_root_1b5vk_1",
|
|
9798
|
+
container: "_container_1b5vk_18",
|
|
9799
|
+
containerGlass: "_containerGlass_1b5vk_32",
|
|
9800
|
+
glossyXLine: "_glossyXLine_1b5vk_39",
|
|
9801
|
+
items: "_items_1b5vk_49",
|
|
9802
|
+
child: "_child_1b5vk_89",
|
|
9803
|
+
divider: "_divider_1b5vk_95",
|
|
9804
|
+
glassFilter: "_glassFilter_1b5vk_106",
|
|
9805
|
+
glassOverlay: "_glassOverlay_1b5vk_118",
|
|
9806
|
+
glassSpecular: "_glassSpecular_1b5vk_127"
|
|
9594
9807
|
};
|
|
9595
9808
|
//#endregion
|
|
9596
9809
|
//#region src/components/Docks/DockMotion/DockMotionDivider.tsx
|
|
@@ -10032,16 +10245,16 @@ var TooltipRangeSlider = () => {
|
|
|
10032
10245
|
});
|
|
10033
10246
|
};
|
|
10034
10247
|
var DockMotionItem_module_default = {
|
|
10035
|
-
root: "
|
|
10036
|
-
expanded: "
|
|
10037
|
-
rootGlass: "
|
|
10038
|
-
item: "
|
|
10039
|
-
itemGlass: "
|
|
10040
|
-
content: "
|
|
10041
|
-
gloss: "
|
|
10042
|
-
glassFilter: "
|
|
10043
|
-
glassOverlay: "
|
|
10044
|
-
glassSpecular: "
|
|
10248
|
+
root: "_root_5hf3i_1",
|
|
10249
|
+
expanded: "_expanded_5hf3i_17",
|
|
10250
|
+
rootGlass: "_rootGlass_5hf3i_26",
|
|
10251
|
+
item: "_item_5hf3i_30",
|
|
10252
|
+
itemGlass: "_itemGlass_5hf3i_56",
|
|
10253
|
+
content: "_content_5hf3i_64",
|
|
10254
|
+
gloss: "_gloss_5hf3i_75",
|
|
10255
|
+
glassFilter: "_glassFilter_5hf3i_85",
|
|
10256
|
+
glassOverlay: "_glassOverlay_5hf3i_97",
|
|
10257
|
+
glassSpecular: "_glassSpecular_5hf3i_106"
|
|
10045
10258
|
};
|
|
10046
10259
|
//#endregion
|
|
10047
10260
|
//#region src/components/Docks/DockMotion/DockMotionItem.tsx
|
|
@@ -12510,7 +12723,7 @@ var SignatureAnimation = ({ className, onChange }) => {
|
|
|
12510
12723
|
return;
|
|
12511
12724
|
}
|
|
12512
12725
|
const digitData = DIGIT_BANK[key];
|
|
12513
|
-
let charInfo
|
|
12726
|
+
let charInfo;
|
|
12514
12727
|
let className;
|
|
12515
12728
|
let charKey;
|
|
12516
12729
|
if (digitData) {
|
|
@@ -19526,12 +19739,12 @@ var ScrambledText = ({ children, reveal = false }) => {
|
|
|
19526
19739
|
});
|
|
19527
19740
|
};
|
|
19528
19741
|
var ScramblingLetters_module_default = {
|
|
19529
|
-
root: "
|
|
19530
|
-
line: "
|
|
19531
|
-
word: "
|
|
19532
|
-
link: "
|
|
19533
|
-
letter: "
|
|
19534
|
-
wobble: "
|
|
19742
|
+
root: "_root_1i3jf_1",
|
|
19743
|
+
line: "_line_1i3jf_9",
|
|
19744
|
+
word: "_word_1i3jf_14",
|
|
19745
|
+
link: "_link_1i3jf_18",
|
|
19746
|
+
letter: "_letter_1i3jf_22",
|
|
19747
|
+
wobble: "_wobble_1i3jf_1"
|
|
19535
19748
|
};
|
|
19536
19749
|
//#endregion
|
|
19537
19750
|
//#region src/components/Texts/ScramblingLetters/ScramblingLetters.tsx
|
|
@@ -19822,17 +20035,24 @@ function resolveThemeMode(mode) {
|
|
|
19822
20035
|
function syncThemeToDom({ backgroundColor, colorSpace, resolvedTheme }) {
|
|
19823
20036
|
if (typeof document === "undefined") return;
|
|
19824
20037
|
const root = document.documentElement;
|
|
20038
|
+
const body = document.body;
|
|
19825
20039
|
root.setAttribute(THEME_ATTRIBUTE, resolvedTheme);
|
|
19826
20040
|
root.style.colorScheme = resolvedTheme;
|
|
19827
|
-
if (
|
|
19828
|
-
|
|
20041
|
+
if (body) body.setAttribute(THEME_ATTRIBUTE, resolvedTheme);
|
|
20042
|
+
if (colorSpace) {
|
|
20043
|
+
root.setAttribute(COLOR_SPACE_ATTRIBUTE, colorSpace === "p3" ? "true" : "false");
|
|
20044
|
+
if (body) body.setAttribute(COLOR_SPACE_ATTRIBUTE, colorSpace === "p3" ? "true" : "false");
|
|
20045
|
+
} else {
|
|
20046
|
+
root.removeAttribute(COLOR_SPACE_ATTRIBUTE);
|
|
20047
|
+
if (body) body.removeAttribute(COLOR_SPACE_ATTRIBUTE);
|
|
20048
|
+
}
|
|
19829
20049
|
if (backgroundColor) root.style.backgroundColor = backgroundColor;
|
|
19830
20050
|
else root.style.removeProperty("background-color");
|
|
19831
20051
|
}
|
|
19832
20052
|
//#endregion
|
|
19833
20053
|
//#region src/components/primitives/ThemeProvider/ThemeProvider.tsx
|
|
19834
20054
|
var STORAGE_KEY = "theme-mode";
|
|
19835
|
-
var ThemeProvider = ({ children, defaultMode = "system", mode: controlledMode, onModeChange, storageKey = STORAGE_KEY }) => {
|
|
20055
|
+
var ThemeProvider = ({ children, defaultMode = "system", mode: controlledMode, onModeChange, storageKey = STORAGE_KEY, syncDomExtras }) => {
|
|
19836
20056
|
const isControlled = controlledMode !== void 0;
|
|
19837
20057
|
const [uncontrolledMode, setUncontrolledMode] = useState(() => {
|
|
19838
20058
|
if (isControlled) return controlledMode;
|
|
@@ -19852,8 +20072,11 @@ var ThemeProvider = ({ children, defaultMode = "system", mode: controlledMode, o
|
|
|
19852
20072
|
return () => mql.removeEventListener("change", handler);
|
|
19853
20073
|
}, [mode]);
|
|
19854
20074
|
useEffect(() => {
|
|
19855
|
-
syncThemeToDom({
|
|
19856
|
-
|
|
20075
|
+
syncThemeToDom({
|
|
20076
|
+
resolvedTheme,
|
|
20077
|
+
...syncDomExtras
|
|
20078
|
+
});
|
|
20079
|
+
}, [resolvedTheme, syncDomExtras]);
|
|
19857
20080
|
const setMode = useCallback((next) => {
|
|
19858
20081
|
if (!isControlled) {
|
|
19859
20082
|
setUncontrolledMode(next);
|
|
@@ -26279,4 +26502,4 @@ var ViewTransitionImageGallery = () => {
|
|
|
26279
26502
|
});
|
|
26280
26503
|
};
|
|
26281
26504
|
//#endregion
|
|
26282
|
-
export { AccentShardCard, AcrobaticPreloader, ActivateButton, AdjoinedFilters, AirplaneAnimation, AlienSkeuomorphicLoaders, AnimatedBlendedCard, AnimatedHeroTitle, AnimatedHoverButton, AnimatedHoverGlowButton, AnimatedIconsNav, AnimatedShareMenu, ApertureVideo, Appearance, AreaLight, AuroraButton, AutoMasonryGrid, AvatarHover, BackgroundCircles, BackgroundSlider, BaseLogger, BlurVignette, BlurredBackground, BoldHamburger, BorderGradient, BorderLink, BouncyClock, BrandCard, BreakingProgress, BubblyParticlesButton, BugsPage, BulletsCarousel, BurningButton, ButtonBase, ButtonHoverFill, ButtonShimmer, ButtonWithDot, CanOfDigits, CaptionCard, CardCarousel, CardDetails, CardGlow, CardMarquee, CardTile, ChaseLoader, Checkbox, CheckboxBase, ChequeredCard, Chips, ChromaticAberration, CircleDotsLoader, CircleLinesAnimation, CircleLink, CircleParticles, CircleTextHover, ClaymorphicHeart, ClearInput, ClickButtonParticles, ClickSpark, Cluster, CollapseAnimation, ColorfulButtons, ComingSoonBadge, ComplexGradient, ConfettiButton, Container, ContrastBackgroundText, Counter, CoverFlowGallery, CubeLoader, CurtainRevealMenu, DDDButton, DDDHoverCard, DDDRangeSlider, DailClock, DarkMatterButton, DarkMatterMouseEffect, DaySwitch, DenseGrid, DetachedMenu, DialControl, DialFuturistic, DialogBase, DissolveElementEffect, Dock, DockButton, DockHas, DockMotion, DoubleArrowButton, DoubleArrowCollabButton, DoubleStateButton, DropdownMenu, Duck, DynamicIconButton, DynamicIsland, EchoClickButton, ElasticCursor, ElectrifiedButton, ElectrifiedButtonGS, EmailInput, EmojiLayer, EndlessLoader, EnlightenedText, EnvelopeTile, Expand, FadeUp, FailedDownloadButton, FeedbackReactions, FigmaLogo, FileIcons, Fingerprint, FlipChips, FloatingLabelInput, FluidGooeyTextBackground, FootprintButton, FormField, ForwardArrowLink, FullScreenImageCarousel, Futuristic3DHoverMenu, GalaxyButton, GalleryReverseScroll, GlassIcon, GlassMusicPlayer, GlassSwitch, GlassToolbar, GlideImageGallery, GlidingReveal, GlitterCard, GlowButton, GlowSlider, GlowingDropdown, GlowingInput, GlowingShadows, GlowingTabs, GlowingTabs2, GlowingText, GlowingTile, GoHoverButton, GodRaysButton, GooeyButton, GradientBorder, GradientGlowingTile, GrainyGradientText, GravityButton, Grid3DCards, GridAccordion, GridHover, GridViewTransition, HamburgerMusic, HamburgerX, Header, HeartFoldButton, HoldSubmitButton, HoverGlowButton, HoverTile, Hoverable3DCard, ITEMS, Illumination, ImageCard, ImageClipping, IndeterminateCheckboxes, InfiniteLoader, InputBase, InputFirework, InvertedRadius, Ios15Button, IosSwitch, JellyText, LandingXYScroll, LayeredComponents, LeaningCards, ListItemHover, LoaderGenerator, LoadingBook, LoadingWave, Lock, LoveGlow, MagicMouseEffect, MagicalText, MagneticButton, MagnifiedNavItems, MetalCircleController, MinimalisticAccordion, MinimalisticGlassButton, MobileNavBar, MorphingSubmitButton, MotionClock, MotionDigits, MouseMoveGallery, MultiGradientBackground, MultiStageButton, MultipathSvgAnimation, NamedPointer, NavigationMenu, NeonButton, NeonToggleSwitch, NeumorphicAnalogClock, NeumorphicLogo, NeumorphicSlider, NeuromorphicToggle, NewsletterInput, NoisyButton, NotificationBell, OffTrackPreloader, OrbitalSubmitButton, PaintedLink, PaperPlanButton, ParallaxEmoji, ParallaxMenu, PasswordInput, PhotoCard, PhotoZoom, PianoNav, PieLoader, PinDropdown, PlayPauseButton, PlayPauseMusicButton, PolaroidStack, PopoverBase, Portal, PositionHover, PredictionButton, ProductTile, ProfileCard, ProgressButton, PsychedelicButton, PulseInLoader, PulseOutLoader, QuickTimeClock, REQUIRED_SEMANTIC_VARS, RadialMenu, RadialNavigation, RadioHopping, RadioParticles, RadioRolling, RadioSlidingFocus, RaysBackground, RealisticSmoke, RedirectPage, RegularLink, RepostButton, RevealImageAnimation, RhombusGallery, RingLoader, RotatedCardsCarousel, RoundScaleLoader, RubberButton, RunningButton, SchrodingerFormControls, ScrambledText, ScramblingLetters, ScrollCountdown, ScrollDrivenTextBlowOut, ScrollTextHighlight, ScrollTimeline, ScrollWithLight, Scroller, ScrollingTextReveal, SearchInput, SegmentedControls, SegmentedToggle, SelectBase, ShadowedCardsList, ShadowedClick, ShakingText, ShakyLine, ShapeSelection, ShimmerButton, ShimmeringBorderGradient, ShineAnimation, ShineCard, ShiningText,
|
|
26505
|
+
export { AccentShardCard, AcrobaticPreloader, ActivateButton, AdjoinedFilters, AirplaneAnimation, AlienSkeuomorphicLoaders, AnimatedBlendedCard, AnimatedHeroTitle, AnimatedHoverButton, AnimatedHoverGlowButton, AnimatedIconsNav, AnimatedShareMenu, ApertureVideo, Appearance, AreaLight, AuroraButton, AutoMasonryGrid, AvatarHover, BackgroundCircles, BackgroundSlider, BaseLogger, BlurVignette, BlurredBackground, BoldHamburger, BorderGradient, BorderLink, BouncyClock, BrandCard, BreakingProgress, BubblyParticlesButton, BugsPage, BulletsCarousel, BurningButton, ButtonBase, ButtonHoverFill, ButtonShimmer, ButtonWithDot, CanOfDigits, CaptionCard, CardCarousel, CardDetails, CardGlow, CardMarquee, CardTile, ChaseLoader, Checkbox, CheckboxBase, ChequeredCard, Chips, ChromaticAberration, CircleDotsLoader, CircleLinesAnimation, CircleLink, CircleParticles, CircleTextHover, ClaymorphicHeart, ClearInput, ClickButtonParticles, ClickSpark, Cluster, CollapseAnimation, ColorfulButtons, ComingSoonBadge, ComplexGradient, ConfettiButton, Container, ContrastBackgroundText, Counter, CoverFlowGallery, CubeLoader, CurtainRevealMenu, DDDButton, DDDHoverCard, DDDRangeSlider, DailClock, DarkMatterButton, DarkMatterMouseEffect, DaySwitch, DenseGrid, DetachedMenu, DialControl, DialFuturistic, DialogBase, DissolveElementEffect, Dock, DockButton, DockHas, DockMotion, DoubleArrowButton, DoubleArrowCollabButton, DoubleStateButton, DropdownMenu, Duck, DynamicIconButton, DynamicIsland, EchoClickButton, ElasticCursor, ElectrifiedButton, ElectrifiedButtonGS, EmailInput, EmojiLayer, EndlessLoader, EnlightenedText, EnvelopeTile, Expand, FadeUp, FailedDownloadButton, FeedbackReactions, FigmaLogo, FileIcons, Fingerprint, FlipChips, FloatingLabelInput, FluidGooeyTextBackground, FootprintButton, FormField, ForwardArrowLink, FullScreenImageCarousel, Futuristic3DHoverMenu, GalaxyButton, GalleryReverseScroll, GlassIcon, GlassMusicPlayer, GlassSwitch, GlassToolbar, GlideImageGallery, GlidingReveal, GlitterCard, GlowButton, GlowSlider, GlowingDropdown, GlowingInput, GlowingShadows, GlowingTabs, GlowingTabs2, GlowingText, GlowingTile, GoHoverButton, GodRaysButton, GooeyButton, GradientBorder, GradientGlowingTile, GrainyGradientText, GravityButton, Grid3DCards, GridAccordion, GridHover, GridViewTransition, HamburgerMusic, HamburgerX, Header, HeartFoldButton, HoldSubmitButton, HoverGlowButton, HoverTile, Hoverable3DCard, ITEMS, Illumination, ImageCard, ImageClipping, IndeterminateCheckboxes, InfiniteLoader, InputBase, InputFirework, InvertedRadius, Ios15Button, IosSwitch, JellyText, LandingXYScroll, LayeredComponents, LeaningCards, ListItemHover, LoaderGenerator, LoadingBook, LoadingWave, Lock, LoveGlow, MagicMouseEffect, MagicalText, MagneticButton, MagnifiedNavItems, MetalCircleController, MinimalisticAccordion, MinimalisticGlassButton, MobileNavBar, MorphingSubmitButton, MotionClock, MotionDigits, MouseMoveGallery, MultiGradientBackground, MultiStageButton, MultipathSvgAnimation, NamedPointer, NavigationMenu, NeonButton, NeonToggleSwitch, NeumorphicAnalogClock, NeumorphicLogo, NeumorphicSlider, NeuromorphicToggle, NewsletterInput, NoisyButton, NotificationBell, OffTrackPreloader, OrbitalSubmitButton, PaintedLink, PaperPlanButton, ParallaxEmoji, ParallaxMenu, PasswordInput, PhotoCard, PhotoZoom, PianoNav, PieLoader, PinDropdown, PlayPauseButton, PlayPauseMusicButton, PolaroidStack, PopoverBase, Portal, PositionHover, PredictionButton, ProductTile, ProfileCard, ProgressButton, PsychedelicButton, PulseInLoader, PulseOutLoader, QuickTimeClock, REQUIRED_SEMANTIC_VARS, RadialMenu, RadialNavigation, RadioHopping, RadioParticles, RadioRolling, RadioSlidingFocus, RaysBackground, RealisticSmoke, RedirectPage, ReflectiveButton, RegularLink, RepostButton, RevealImageAnimation, RhombusGallery, RingLoader, RotatedCardsCarousel, RoundScaleLoader, RubberButton, RunningButton, SchrodingerFormControls, ScrambledText, ScramblingLetters, ScrollCountdown, ScrollDrivenTextBlowOut, ScrollTextHighlight, ScrollTimeline, ScrollWithLight, Scroller, ScrollingTextReveal, SearchInput, SegmentedControls, SegmentedToggle, SelectBase, ShadowedCardsList, ShadowedClick, ShakingText, ShakyLine, ShapeSelection, ShimmerButton, ShimmeringBorderGradient, ShineAnimation, ShineCard, ShiningText, ShinyCtaButton, SignatureAnimation, SinglePopoverMenu, SkateboardPreloader, SkeuomorphicLikeButton, SlideIn, SlidingButton, SlidingIcon, SlidingImages, SlidingStepper, Slot, Slottable, SmileyPreloader, SmokeTextDisappearance, SmoothScroll, SnowballPreloader, SolarEclipse, SparkleButton, SparklyButton, SpeechToText, SpinningClickAnimation, SpiralLoadingText, SplashCursor, SquircleAvatar, SquishButton, Stack, StackingCards, StaticSolarEclipse, StickyHeader, StickyList, StretchToggle, StretchyLoader, StrikethroughCheckbox, StrikethroughCheckboxes, StuntPreloader, SubtleBorderAnimation, SuccessLoader, SuccessLoadingButton, SwitchBase, TabBarAnimation, TextImageHover, TextMorphing, TextOutline, TextShadow, Texture, ThanosDisappearEffect, ThanosDisappearEffectList, ThanosDissolve, ThemeProvider, ThreadsLikeButton, ThreeDotsLoader, ThumbsUpButton, Ticker, TicklishButton, TimeCirclesLoader, TippingSwitch, Toasts, ToggleBubble, ToggleClipPath, Token, Tooltip, TooltipBase, TooltipRangeSlider, TranslucentBackdrop, TrickButton, TurbulenceFilter, UnderlinedLink, UnderlinedLink2, ViewTransitionAddToCard, ViewTransitionImageGallery, VisuallyHidden, VoiceAnimation, WavyMenu, WebGLSmoke, WeightText, animationDuration, animationLogger, apiLogger, chain, clearSession, componentLogger, createBoundedMap, createPresenceVariants, delay, distance, easing, eventLogger, fadePresence, formatDuration, formatTime, getCurrentLogLevel, getPath, getVarName, hookLogger, is, isDebugEnabled, isNonNullable, keys, lerp, lineEq, logger, mergeRefs, move, noop, normalizeError, notReachable, resolveToken, scalePresence, setLogLevel, setRequestId, setSessionId, slideDownPresence, slideUpPresence, springPreset, staggerDelay, startViewTransition, storageLogger, supportsViewTransitions, times, useAnimatedText, useBowser, useControllableState, useDebounce, useEffectEvent, useFormField, useFormFieldContext, useGsapContext, useInterval, useLiveRef, useMatchMedia, useMergeRefs, useOklch, useOutsideClick, usePreviousRender, usePreviousState, useRaf, useReducedMotion, useTheme, useThrottle, useTimeout, useUniversalLayoutEffect, useWindowReady, utilsLogger, validateColorScheme, values, wait };
|