@tarsis/toolkit 0.7.1 → 0.7.2
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 +17 -17
- 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.cjs
CHANGED
|
@@ -9,7 +9,7 @@ const require_animation = require("./animation-BauloIgQ.cjs");
|
|
|
9
9
|
const require_assets = require("./assets-BMqH4phf.cjs");
|
|
10
10
|
const require_SelectBase = require("./SelectBase-BC6WKZVF.cjs");
|
|
11
11
|
const require_Container = require("./Container-BVX2MW1U.cjs");
|
|
12
|
-
const require_tokens = require("./tokens-
|
|
12
|
+
const require_tokens = require("./tokens-Nhzxtwvl.cjs");
|
|
13
13
|
let clsx = require("clsx");
|
|
14
14
|
clsx = require_chunk.__toESM(clsx);
|
|
15
15
|
let react = require("react");
|
|
@@ -766,31 +766,31 @@ var BubblyParticlesButton = () => {
|
|
|
766
766
|
});
|
|
767
767
|
};
|
|
768
768
|
var BurningButton_module_default = {
|
|
769
|
-
root: "
|
|
770
|
-
button: "
|
|
771
|
-
p: "
|
|
772
|
-
text: "
|
|
773
|
-
rise1: "
|
|
774
|
-
rise2: "
|
|
775
|
-
rise3: "
|
|
776
|
-
rise4: "
|
|
777
|
-
rise5: "
|
|
778
|
-
rise6: "
|
|
779
|
-
rise7: "
|
|
780
|
-
rise8: "
|
|
781
|
-
rise9: "
|
|
782
|
-
rise10: "
|
|
783
|
-
rise11: "
|
|
784
|
-
rise12: "
|
|
785
|
-
rise13: "
|
|
786
|
-
rise14: "
|
|
787
|
-
rise15: "
|
|
788
|
-
rise16: "
|
|
789
|
-
rise17: "
|
|
790
|
-
rise18: "
|
|
791
|
-
rise19: "
|
|
792
|
-
rise20: "
|
|
793
|
-
effects: "
|
|
769
|
+
root: "_root_1mtdb_1",
|
|
770
|
+
button: "_button_1mtdb_11",
|
|
771
|
+
p: "_p_1mtdb_24",
|
|
772
|
+
text: "_text_1mtdb_24",
|
|
773
|
+
rise1: "_rise1_1mtdb_1",
|
|
774
|
+
rise2: "_rise2_1mtdb_1",
|
|
775
|
+
rise3: "_rise3_1mtdb_1",
|
|
776
|
+
rise4: "_rise4_1mtdb_1",
|
|
777
|
+
rise5: "_rise5_1mtdb_1",
|
|
778
|
+
rise6: "_rise6_1mtdb_1",
|
|
779
|
+
rise7: "_rise7_1mtdb_1",
|
|
780
|
+
rise8: "_rise8_1mtdb_1",
|
|
781
|
+
rise9: "_rise9_1mtdb_1",
|
|
782
|
+
rise10: "_rise10_1mtdb_1",
|
|
783
|
+
rise11: "_rise11_1mtdb_1",
|
|
784
|
+
rise12: "_rise12_1mtdb_1",
|
|
785
|
+
rise13: "_rise13_1mtdb_1",
|
|
786
|
+
rise14: "_rise14_1mtdb_1",
|
|
787
|
+
rise15: "_rise15_1mtdb_1",
|
|
788
|
+
rise16: "_rise16_1mtdb_1",
|
|
789
|
+
rise17: "_rise17_1mtdb_1",
|
|
790
|
+
rise18: "_rise18_1mtdb_1",
|
|
791
|
+
rise19: "_rise19_1mtdb_1",
|
|
792
|
+
rise20: "_rise20_1mtdb_1",
|
|
793
|
+
effects: "_effects_1mtdb_238"
|
|
794
794
|
};
|
|
795
795
|
//#endregion
|
|
796
796
|
//#region src/components/Buttons/BurningButton/BurningButton.tsx
|
|
@@ -3842,10 +3842,10 @@ var NeonButton = ({ className, ...rest }) => {
|
|
|
3842
3842
|
});
|
|
3843
3843
|
};
|
|
3844
3844
|
var NoisyButton_module_default = {
|
|
3845
|
-
root: "
|
|
3846
|
-
i: "
|
|
3847
|
-
noise: "
|
|
3848
|
-
text: "
|
|
3845
|
+
root: "_root_1nssk_2",
|
|
3846
|
+
i: "_i_1nssk_22",
|
|
3847
|
+
noise: "_noise_1nssk_1",
|
|
3848
|
+
text: "_text_1nssk_482"
|
|
3849
3849
|
};
|
|
3850
3850
|
//#endregion
|
|
3851
3851
|
//#region src/components/Buttons/NoisyButton/NoisyButton.tsx
|
|
@@ -4730,16 +4730,18 @@ var ShimmeringBorderGradient = () => {
|
|
|
4730
4730
|
});
|
|
4731
4731
|
};
|
|
4732
4732
|
//#endregion
|
|
4733
|
-
//#region src/components/Buttons/
|
|
4734
|
-
|
|
4733
|
+
//#region src/components/Buttons/ReflectiveButton/MacCursor.tsx
|
|
4734
|
+
function MacCursor() {
|
|
4735
|
+
const filterId = (0, react.useId)().replace(/:/g, "");
|
|
4735
4736
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
4736
4737
|
width: "22",
|
|
4737
4738
|
height: "22",
|
|
4738
4739
|
viewBox: "0 0 22 22",
|
|
4739
4740
|
fill: "none",
|
|
4740
4741
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4742
|
+
"aria-hidden": true,
|
|
4741
4743
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
|
|
4742
|
-
filter:
|
|
4744
|
+
filter: `url(#${filterId})`,
|
|
4743
4745
|
children: [
|
|
4744
4746
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
4745
4747
|
fillRule: "evenodd",
|
|
@@ -4776,7 +4778,7 @@ var MacCursor = () => {
|
|
|
4776
4778
|
})
|
|
4777
4779
|
]
|
|
4778
4780
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("filter", {
|
|
4779
|
-
id:
|
|
4781
|
+
id: filterId,
|
|
4780
4782
|
x: "0.733344",
|
|
4781
4783
|
y: "0.4",
|
|
4782
4784
|
width: "21.2",
|
|
@@ -4814,173 +4816,384 @@ var MacCursor = () => {
|
|
|
4814
4816
|
]
|
|
4815
4817
|
}) })]
|
|
4816
4818
|
});
|
|
4817
|
-
}
|
|
4819
|
+
}
|
|
4818
4820
|
//#endregion
|
|
4819
|
-
//#region src/components/Buttons/
|
|
4821
|
+
//#region src/components/Buttons/ReflectiveButton/ReflectiveButton.helpers.ts
|
|
4820
4822
|
var scale$2 = (number, inMin, inMax, outMin, outMax) => {
|
|
4821
4823
|
return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
|
|
4822
4824
|
};
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4825
|
+
function getDefaultReflectiveButtonVideoConstraints() {
|
|
4826
|
+
return {
|
|
4827
|
+
audio: false,
|
|
4828
|
+
video: {
|
|
4829
|
+
width: { ideal: 600 },
|
|
4830
|
+
height: { ideal: 600 },
|
|
4831
|
+
facingMode: "user"
|
|
4832
|
+
}
|
|
4833
|
+
};
|
|
4834
|
+
}
|
|
4835
|
+
var ReflectiveButton_module_default = {
|
|
4836
|
+
root: "_root_1xtu1_1",
|
|
4837
|
+
buttonContainer: "_buttonContainer_1xtu1_6",
|
|
4838
|
+
pressed: "_pressed_1xtu1_13",
|
|
4839
|
+
button: "_button_1xtu1_6",
|
|
4840
|
+
shadow: "_shadow_1xtu1_55",
|
|
4841
|
+
text: "_text_1xtu1_71",
|
|
4842
|
+
buttonReflection: "_buttonReflection_1xtu1_88",
|
|
4843
|
+
surfaceReflection: "_surfaceReflection_1xtu1_96",
|
|
4844
|
+
detailsContainer: "_detailsContainer_1xtu1_113",
|
|
4845
|
+
playfulLayersClip: "_playfulLayersClip_1xtu1_125",
|
|
4846
|
+
cursor: "_cursor_1xtu1_135",
|
|
4847
|
+
visuallyHidden: "_visuallyHidden_1xtu1_144",
|
|
4848
|
+
fingerprint: "_fingerprint_1xtu1_156"
|
|
4849
|
+
};
|
|
4850
|
+
//#endregion
|
|
4851
|
+
//#region src/components/Buttons/ReflectiveButton/useUserMediaVideo.ts
|
|
4852
|
+
function mapGetUserMediaError(e) {
|
|
4853
|
+
const error = e instanceof DOMException ? e : e instanceof Error ? e : new Error(String(e));
|
|
4854
|
+
if (e instanceof DOMException && e.name === "NotAllowedError") return {
|
|
4855
|
+
status: "denied",
|
|
4856
|
+
error
|
|
4857
|
+
};
|
|
4858
|
+
return {
|
|
4859
|
+
status: "unavailable",
|
|
4860
|
+
error
|
|
4861
|
+
};
|
|
4862
|
+
}
|
|
4863
|
+
function useUserMediaVideo(constraints, options) {
|
|
4864
|
+
const optsRef = (0, react.useRef)(options);
|
|
4865
|
+
const constraintsRef = (0, react.useRef)(constraints);
|
|
4866
|
+
(0, react.useEffect)(() => {
|
|
4867
|
+
optsRef.current = options;
|
|
4868
|
+
}, [options]);
|
|
4869
|
+
(0, react.useEffect)(() => {
|
|
4870
|
+
constraintsRef.current = constraints;
|
|
4871
|
+
}, [constraints]);
|
|
4872
|
+
const [status, setStatus] = (0, react.useState)("idle");
|
|
4873
|
+
const [stream, setStream] = (0, react.useState)(null);
|
|
4874
|
+
const requestGenerationRef = (0, react.useRef)(0);
|
|
4875
|
+
const streamRef = (0, react.useRef)(null);
|
|
4876
|
+
const setStatusAndNotify = (0, react.useCallback)((next) => {
|
|
4877
|
+
setStatus(next);
|
|
4878
|
+
optsRef.current?.onStatusChange?.(next);
|
|
4879
|
+
}, []);
|
|
4880
|
+
const stopTracksInternal = (0, react.useCallback)(() => {
|
|
4881
|
+
const s = streamRef.current;
|
|
4882
|
+
if (s) s.getTracks().forEach((t) => {
|
|
4883
|
+
t.stop();
|
|
4884
|
+
});
|
|
4885
|
+
streamRef.current = null;
|
|
4886
|
+
setStream(null);
|
|
4887
|
+
}, []);
|
|
4888
|
+
const stop = (0, react.useCallback)(() => {
|
|
4889
|
+
requestGenerationRef.current += 1;
|
|
4890
|
+
stopTracksInternal();
|
|
4891
|
+
setStatusAndNotify("idle");
|
|
4892
|
+
}, [setStatusAndNotify, stopTracksInternal]);
|
|
4893
|
+
const start = (0, react.useCallback)(() => {
|
|
4894
|
+
if (typeof navigator === "undefined") {
|
|
4895
|
+
const err = /* @__PURE__ */ new Error("navigator is not available");
|
|
4896
|
+
setStatusAndNotify("unavailable");
|
|
4897
|
+
optsRef.current?.onError?.(err);
|
|
4898
|
+
return;
|
|
4899
|
+
}
|
|
4900
|
+
const mediaDevices = navigator.mediaDevices;
|
|
4901
|
+
if (!mediaDevices?.getUserMedia) {
|
|
4902
|
+
const err = /* @__PURE__ */ new Error("getUserMedia is not supported");
|
|
4903
|
+
setStatusAndNotify("unavailable");
|
|
4904
|
+
optsRef.current?.onError?.(err);
|
|
4905
|
+
return;
|
|
4906
|
+
}
|
|
4907
|
+
const myGeneration = ++requestGenerationRef.current;
|
|
4908
|
+
stopTracksInternal();
|
|
4909
|
+
setStatusAndNotify("pending");
|
|
4910
|
+
mediaDevices.getUserMedia(constraintsRef.current).then((mediaStream) => {
|
|
4911
|
+
if (myGeneration !== requestGenerationRef.current) {
|
|
4912
|
+
mediaStream.getTracks().forEach((t) => {
|
|
4913
|
+
t.stop();
|
|
4914
|
+
});
|
|
4915
|
+
return;
|
|
4916
|
+
}
|
|
4917
|
+
streamRef.current = mediaStream;
|
|
4918
|
+
setStream(mediaStream);
|
|
4919
|
+
setStatusAndNotify("live");
|
|
4920
|
+
}).catch((e) => {
|
|
4921
|
+
if (myGeneration !== requestGenerationRef.current) return;
|
|
4922
|
+
const { status: nextStatus, error } = mapGetUserMediaError(e);
|
|
4923
|
+
setStatusAndNotify(nextStatus);
|
|
4924
|
+
optsRef.current?.onError?.(error);
|
|
4925
|
+
});
|
|
4926
|
+
}, [setStatusAndNotify, stopTracksInternal]);
|
|
4927
|
+
(0, react.useEffect)(() => {
|
|
4928
|
+
return () => {
|
|
4929
|
+
requestGenerationRef.current += 1;
|
|
4930
|
+
const s = streamRef.current;
|
|
4931
|
+
if (s) s.getTracks().forEach((t) => {
|
|
4932
|
+
t.stop();
|
|
4933
|
+
});
|
|
4934
|
+
streamRef.current = null;
|
|
4935
|
+
};
|
|
4936
|
+
}, []);
|
|
4937
|
+
return {
|
|
4938
|
+
status,
|
|
4939
|
+
stream,
|
|
4940
|
+
start,
|
|
4941
|
+
stop
|
|
4942
|
+
};
|
|
4943
|
+
}
|
|
4944
|
+
//#endregion
|
|
4945
|
+
//#region src/components/Buttons/ReflectiveButton/ReflectiveButton.tsx
|
|
4946
|
+
var FINGERPRINT_MAX = 12;
|
|
4947
|
+
var defaultFeatures = {
|
|
4948
|
+
fingerprints: true,
|
|
4949
|
+
macCursor: true
|
|
4848
4950
|
};
|
|
4849
|
-
function
|
|
4951
|
+
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 }) {
|
|
4952
|
+
const features = {
|
|
4953
|
+
...defaultFeatures,
|
|
4954
|
+
...featuresProp
|
|
4955
|
+
};
|
|
4956
|
+
const showPlayfulLayers = !require_hooks.useReducedMotion() && (features.macCursor || features.fingerprints);
|
|
4850
4957
|
const reflectionRef = (0, react.useRef)(null);
|
|
4851
4958
|
const surfaceReflectionRef = (0, react.useRef)(null);
|
|
4852
|
-
const
|
|
4959
|
+
const buttonElementRef = (0, react.useRef)(null);
|
|
4960
|
+
const interactionCameraStartedRef = (0, react.useRef)(false);
|
|
4961
|
+
const fingerprintIdRef = (0, react.useRef)(0);
|
|
4962
|
+
const pointerClientRef = (0, react.useRef)({
|
|
4963
|
+
x: 0,
|
|
4964
|
+
y: 0
|
|
4965
|
+
});
|
|
4966
|
+
const rafIdRef = (0, react.useRef)(null);
|
|
4853
4967
|
const [cursorPosition, setCursorPosition] = (0, react.useState)({
|
|
4854
4968
|
x: 0,
|
|
4855
4969
|
y: 0
|
|
4856
4970
|
});
|
|
4857
|
-
const [
|
|
4971
|
+
const [pointerOverRoot, setPointerOverRoot] = (0, react.useState)(false);
|
|
4972
|
+
const [buttonKeyboardFocus, setButtonKeyboardFocus] = (0, react.useState)(false);
|
|
4858
4973
|
const [buttonPressed, setButtonPressed] = (0, react.useState)(false);
|
|
4859
4974
|
const [fingerprints, setFingerprints] = (0, react.useState)([]);
|
|
4860
|
-
const
|
|
4861
|
-
const
|
|
4862
|
-
|
|
4975
|
+
const mergedButtonRef = require_useMergeRefs.useMergeRefs(ref, buttonElementRef);
|
|
4976
|
+
const { status, stream, start, stop } = useUserMediaVideo((0, react.useMemo)(() => {
|
|
4977
|
+
const base = getDefaultReflectiveButtonVideoConstraints();
|
|
4978
|
+
if (!videoConstraints) return base;
|
|
4979
|
+
return {
|
|
4980
|
+
...base,
|
|
4981
|
+
video: {
|
|
4982
|
+
...base.video,
|
|
4983
|
+
...videoConstraints
|
|
4984
|
+
}
|
|
4985
|
+
};
|
|
4986
|
+
}, [videoConstraints]), {
|
|
4987
|
+
onError: onCameraError,
|
|
4988
|
+
onStatusChange: onCameraStateChange
|
|
4989
|
+
});
|
|
4990
|
+
const cameraStatusMessage = status === "denied" ? "Camera access denied" : status === "unavailable" ? "Camera unavailable" : null;
|
|
4991
|
+
(0, react.useImperativeHandle)(cameraHandleRef, () => ({
|
|
4992
|
+
requestCamera: start,
|
|
4993
|
+
stopCamera: stop
|
|
4994
|
+
}), [start, stop]);
|
|
4863
4995
|
(0, react.useEffect)(() => {
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
if (!video) return;
|
|
4876
|
-
video.setAttribute("playsinline", "true");
|
|
4877
|
-
video.srcObject = stream;
|
|
4878
|
-
video.onloadedmetadata = () => {
|
|
4879
|
-
video.play();
|
|
4880
|
-
};
|
|
4881
|
-
const surface = surfaceReflectionRef.current;
|
|
4882
|
-
if (!surface) return;
|
|
4883
|
-
surface.setAttribute("playsinline", "true");
|
|
4884
|
-
surface.srcObject = stream;
|
|
4885
|
-
surface.onloadedmetadata = () => {
|
|
4886
|
-
surface.play();
|
|
4887
|
-
};
|
|
4888
|
-
}).catch((e) => console.error(e));
|
|
4889
|
-
} catch (e) {
|
|
4890
|
-
console.error(e);
|
|
4891
|
-
}
|
|
4996
|
+
interactionCameraStartedRef.current = false;
|
|
4997
|
+
}, [camera, disabled]);
|
|
4998
|
+
(0, react.useEffect)(() => {
|
|
4999
|
+
if (disabled) stop();
|
|
5000
|
+
}, [disabled, stop]);
|
|
5001
|
+
(0, react.useEffect)(() => {
|
|
5002
|
+
if (camera !== "on-mount" || disabled) return;
|
|
5003
|
+
start();
|
|
5004
|
+
return () => {
|
|
5005
|
+
stop();
|
|
5006
|
+
};
|
|
4892
5007
|
}, [
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
5008
|
+
camera,
|
|
5009
|
+
disabled,
|
|
5010
|
+
start,
|
|
5011
|
+
stop
|
|
4896
5012
|
]);
|
|
4897
5013
|
(0, react.useEffect)(() => {
|
|
4898
|
-
|
|
4899
|
-
const
|
|
4900
|
-
|
|
5014
|
+
const face = reflectionRef.current;
|
|
5015
|
+
const surface = surfaceReflectionRef.current;
|
|
5016
|
+
const clearVideo = (el) => {
|
|
5017
|
+
if (!el) return;
|
|
5018
|
+
el.onloadedmetadata = null;
|
|
5019
|
+
el.srcObject = null;
|
|
5020
|
+
};
|
|
5021
|
+
if (!stream) {
|
|
5022
|
+
clearVideo(face);
|
|
5023
|
+
clearVideo(surface);
|
|
5024
|
+
return;
|
|
5025
|
+
}
|
|
5026
|
+
const attach = (el) => {
|
|
5027
|
+
if (!el) return;
|
|
5028
|
+
el.setAttribute("playsinline", "true");
|
|
5029
|
+
el.muted = true;
|
|
5030
|
+
el.srcObject = stream;
|
|
5031
|
+
el.onloadedmetadata = () => {
|
|
5032
|
+
el.play().catch(() => {});
|
|
5033
|
+
};
|
|
5034
|
+
};
|
|
5035
|
+
attach(face);
|
|
5036
|
+
attach(surface);
|
|
5037
|
+
return () => {
|
|
5038
|
+
clearVideo(face);
|
|
5039
|
+
clearVideo(surface);
|
|
5040
|
+
};
|
|
5041
|
+
}, [stream]);
|
|
5042
|
+
(0, react.useEffect)(() => {
|
|
5043
|
+
if (!showPlayfulLayers || !features.macCursor) return;
|
|
5044
|
+
const flushCursor = () => {
|
|
5045
|
+
rafIdRef.current = null;
|
|
5046
|
+
const rect = buttonElementRef.current?.getBoundingClientRect();
|
|
4901
5047
|
if (!rect) return;
|
|
5048
|
+
const { x: clientX, y: clientY } = pointerClientRef.current;
|
|
4902
5049
|
setCursorPosition({
|
|
4903
|
-
x:
|
|
4904
|
-
y:
|
|
5050
|
+
x: clientX - rect.x,
|
|
5051
|
+
y: clientY - rect.y
|
|
4905
5052
|
});
|
|
4906
5053
|
};
|
|
5054
|
+
const handleMouseMove = (event) => {
|
|
5055
|
+
pointerClientRef.current = {
|
|
5056
|
+
x: event.clientX,
|
|
5057
|
+
y: event.clientY
|
|
5058
|
+
};
|
|
5059
|
+
if (rafIdRef.current === null) rafIdRef.current = window.requestAnimationFrame(flushCursor);
|
|
5060
|
+
};
|
|
4907
5061
|
window.addEventListener("mousemove", handleMouseMove);
|
|
4908
5062
|
return () => {
|
|
4909
5063
|
window.removeEventListener("mousemove", handleMouseMove);
|
|
5064
|
+
if (rafIdRef.current !== null) {
|
|
5065
|
+
window.cancelAnimationFrame(rafIdRef.current);
|
|
5066
|
+
rafIdRef.current = null;
|
|
5067
|
+
}
|
|
4910
5068
|
};
|
|
4911
|
-
}, [
|
|
4912
|
-
const
|
|
5069
|
+
}, [features.macCursor, showPlayfulLayers]);
|
|
5070
|
+
const mappedRoughness = Math.round(scale$2(roughness, 0, 1, 0, 16));
|
|
5071
|
+
const tryStartInteractionCamera = (0, react.useCallback)(() => {
|
|
5072
|
+
if (camera !== "on-interaction" || disabled) return;
|
|
5073
|
+
if (interactionCameraStartedRef.current) return;
|
|
5074
|
+
interactionCameraStartedRef.current = true;
|
|
5075
|
+
start();
|
|
5076
|
+
}, [
|
|
5077
|
+
camera,
|
|
5078
|
+
disabled,
|
|
5079
|
+
start
|
|
5080
|
+
]);
|
|
5081
|
+
const addFingerprintFromClient = (0, react.useCallback)((clientX, clientY) => {
|
|
5082
|
+
if (!features.fingerprints || !showPlayfulLayers) return;
|
|
5083
|
+
const rect = buttonElementRef.current?.getBoundingClientRect();
|
|
5084
|
+
if (!rect) return;
|
|
5085
|
+
fingerprintIdRef.current += 1;
|
|
5086
|
+
const id = String(fingerprintIdRef.current);
|
|
5087
|
+
setFingerprints((prev) => [...prev, {
|
|
5088
|
+
id,
|
|
5089
|
+
x: clientX - rect.x,
|
|
5090
|
+
y: clientY - rect.y
|
|
5091
|
+
}].slice(-FINGERPRINT_MAX));
|
|
5092
|
+
}, [features.fingerprints, showPlayfulLayers]);
|
|
5093
|
+
const endPress = (0, react.useCallback)(() => setButtonPressed(false), []);
|
|
5094
|
+
const handleButtonFocus = (0, react.useCallback)((e) => {
|
|
5095
|
+
onFocus?.(e);
|
|
5096
|
+
setButtonKeyboardFocus(true);
|
|
5097
|
+
}, [onFocus]);
|
|
5098
|
+
const handleButtonBlur = (0, react.useCallback)((e) => {
|
|
5099
|
+
onBlur?.(e);
|
|
5100
|
+
setButtonKeyboardFocus(false);
|
|
5101
|
+
}, [onBlur]);
|
|
5102
|
+
const handlePointerDown = (0, react.useCallback)((e) => {
|
|
5103
|
+
onPointerDown?.(e);
|
|
5104
|
+
if (e.defaultPrevented) return;
|
|
5105
|
+
tryStartInteractionCamera();
|
|
4913
5106
|
setButtonPressed(true);
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
};
|
|
4930
|
-
setButtonPressed(true);
|
|
4931
|
-
setFingerprints((fingerprints) => [...fingerprints, fingerprint]);
|
|
4932
|
-
}
|
|
4933
|
-
};
|
|
4934
|
-
if (!inBrowser) return null;
|
|
5107
|
+
try {
|
|
5108
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
5109
|
+
} catch {}
|
|
5110
|
+
addFingerprintFromClient(e.clientX, e.clientY);
|
|
5111
|
+
}, [
|
|
5112
|
+
addFingerprintFromClient,
|
|
5113
|
+
onPointerDown,
|
|
5114
|
+
tryStartInteractionCamera
|
|
5115
|
+
]);
|
|
5116
|
+
const handleClick = (0, react.useCallback)((e) => {
|
|
5117
|
+
onClick?.(e);
|
|
5118
|
+
if (e.defaultPrevented) return;
|
|
5119
|
+
tryStartInteractionCamera();
|
|
5120
|
+
}, [onClick, tryStartInteractionCamera]);
|
|
5121
|
+
const showMacCursorAffordance = pointerOverRoot || buttonKeyboardFocus;
|
|
4935
5122
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
}
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
5123
|
+
className: (0, clsx.default)(ReflectiveButton_module_default.root, className),
|
|
5124
|
+
style,
|
|
5125
|
+
onMouseEnter: () => setPointerOverRoot(true),
|
|
5126
|
+
onMouseLeave: () => setPointerOverRoot(false),
|
|
5127
|
+
children: [cameraStatusMessage ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5128
|
+
className: ReflectiveButton_module_default.visuallyHidden,
|
|
5129
|
+
role: "status",
|
|
5130
|
+
"aria-live": "polite",
|
|
5131
|
+
children: cameraStatusMessage
|
|
5132
|
+
}) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5133
|
+
className: (0, clsx.default)(ReflectiveButton_module_default.buttonContainer, { [ReflectiveButton_module_default.pressed]: buttonPressed }),
|
|
5134
|
+
children: [
|
|
5135
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5136
|
+
className: ReflectiveButton_module_default.detailsContainer,
|
|
5137
|
+
children: showPlayfulLayers && (features.macCursor || features.fingerprints) ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5138
|
+
className: ReflectiveButton_module_default.playfulLayersClip,
|
|
5139
|
+
children: [features.macCursor ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5140
|
+
className: ReflectiveButton_module_default.cursor,
|
|
5141
|
+
style: {
|
|
5142
|
+
transform: `translate(${cursorPosition.x}px, ${cursorPosition.y}px) translate(-50%, -50%)`,
|
|
5143
|
+
opacity: showMacCursorAffordance ? 1 : 0
|
|
5144
|
+
},
|
|
5145
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MacCursor, {})
|
|
5146
|
+
}) : null, features.fingerprints ? fingerprints.map((fp) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5147
|
+
className: ReflectiveButton_module_default.fingerprint,
|
|
5148
|
+
style: { transform: `translate(${fp.x}px, ${fp.y}px) translate(-50%, -50%)` }
|
|
5149
|
+
}, fp.id)) : null]
|
|
5150
|
+
}) : null
|
|
5151
|
+
}),
|
|
5152
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("video", {
|
|
5153
|
+
ref: surfaceReflectionRef,
|
|
5154
|
+
className: (0, clsx.default)(ReflectiveButton_module_default.surfaceReflection, { [ReflectiveButton_module_default.pressed]: buttonPressed }),
|
|
5155
|
+
"aria-hidden": true,
|
|
5156
|
+
muted: true,
|
|
5157
|
+
playsInline: true
|
|
5158
|
+
}),
|
|
5159
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
5160
|
+
type: "button",
|
|
5161
|
+
ref: mergedButtonRef,
|
|
5162
|
+
disabled,
|
|
5163
|
+
className: (0, clsx.default)(ReflectiveButton_module_default.button, { [ReflectiveButton_module_default.pressed]: buttonPressed }),
|
|
5164
|
+
"aria-busy": status === "pending" || void 0,
|
|
5165
|
+
onPointerDown: handlePointerDown,
|
|
5166
|
+
onPointerUp: endPress,
|
|
5167
|
+
onPointerCancel: endPress,
|
|
5168
|
+
onLostPointerCapture: endPress,
|
|
5169
|
+
onClick: handleClick,
|
|
5170
|
+
onFocus: handleButtonFocus,
|
|
5171
|
+
onBlur: handleButtonBlur,
|
|
5172
|
+
...rest,
|
|
5173
|
+
children: [
|
|
5174
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("video", {
|
|
5175
|
+
ref: reflectionRef,
|
|
5176
|
+
playsInline: true,
|
|
5177
|
+
className: ReflectiveButton_module_default.buttonReflection,
|
|
5178
|
+
"aria-hidden": true,
|
|
5179
|
+
muted: true,
|
|
5180
|
+
style: {
|
|
5181
|
+
filter: `blur(${mappedRoughness}px) saturate(0.4) brightness(1.1)`,
|
|
5182
|
+
objectPosition: `0px ${offset}px`
|
|
5183
|
+
}
|
|
5184
|
+
}),
|
|
5185
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5186
|
+
className: ReflectiveButton_module_default.shadow,
|
|
5187
|
+
"aria-hidden": true
|
|
5188
|
+
}),
|
|
5189
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5190
|
+
className: ReflectiveButton_module_default.text,
|
|
5191
|
+
children
|
|
5192
|
+
})
|
|
5193
|
+
]
|
|
5194
|
+
})
|
|
5195
|
+
]
|
|
5196
|
+
})]
|
|
4984
5197
|
});
|
|
4985
5198
|
}
|
|
4986
5199
|
//#endregion
|
|
@@ -9589,16 +9802,16 @@ var playAudio = (src, onError) => {
|
|
|
9589
9802
|
});
|
|
9590
9803
|
};
|
|
9591
9804
|
var DockMotion_module_default = {
|
|
9592
|
-
root: "
|
|
9593
|
-
container: "
|
|
9594
|
-
containerGlass: "
|
|
9595
|
-
glossyXLine: "
|
|
9596
|
-
items: "
|
|
9597
|
-
child: "
|
|
9598
|
-
divider: "
|
|
9599
|
-
glassFilter: "
|
|
9600
|
-
glassOverlay: "
|
|
9601
|
-
glassSpecular: "
|
|
9805
|
+
root: "_root_1b5vk_1",
|
|
9806
|
+
container: "_container_1b5vk_18",
|
|
9807
|
+
containerGlass: "_containerGlass_1b5vk_32",
|
|
9808
|
+
glossyXLine: "_glossyXLine_1b5vk_39",
|
|
9809
|
+
items: "_items_1b5vk_49",
|
|
9810
|
+
child: "_child_1b5vk_89",
|
|
9811
|
+
divider: "_divider_1b5vk_95",
|
|
9812
|
+
glassFilter: "_glassFilter_1b5vk_106",
|
|
9813
|
+
glassOverlay: "_glassOverlay_1b5vk_118",
|
|
9814
|
+
glassSpecular: "_glassSpecular_1b5vk_127"
|
|
9602
9815
|
};
|
|
9603
9816
|
//#endregion
|
|
9604
9817
|
//#region src/components/Docks/DockMotion/DockMotionDivider.tsx
|
|
@@ -10040,16 +10253,16 @@ var TooltipRangeSlider = () => {
|
|
|
10040
10253
|
});
|
|
10041
10254
|
};
|
|
10042
10255
|
var DockMotionItem_module_default = {
|
|
10043
|
-
root: "
|
|
10044
|
-
expanded: "
|
|
10045
|
-
rootGlass: "
|
|
10046
|
-
item: "
|
|
10047
|
-
itemGlass: "
|
|
10048
|
-
content: "
|
|
10049
|
-
gloss: "
|
|
10050
|
-
glassFilter: "
|
|
10051
|
-
glassOverlay: "
|
|
10052
|
-
glassSpecular: "
|
|
10256
|
+
root: "_root_5hf3i_1",
|
|
10257
|
+
expanded: "_expanded_5hf3i_17",
|
|
10258
|
+
rootGlass: "_rootGlass_5hf3i_26",
|
|
10259
|
+
item: "_item_5hf3i_30",
|
|
10260
|
+
itemGlass: "_itemGlass_5hf3i_56",
|
|
10261
|
+
content: "_content_5hf3i_64",
|
|
10262
|
+
gloss: "_gloss_5hf3i_75",
|
|
10263
|
+
glassFilter: "_glassFilter_5hf3i_85",
|
|
10264
|
+
glassOverlay: "_glassOverlay_5hf3i_97",
|
|
10265
|
+
glassSpecular: "_glassSpecular_5hf3i_106"
|
|
10053
10266
|
};
|
|
10054
10267
|
//#endregion
|
|
10055
10268
|
//#region src/components/Docks/DockMotion/DockMotionItem.tsx
|
|
@@ -12518,7 +12731,7 @@ var SignatureAnimation = ({ className, onChange }) => {
|
|
|
12518
12731
|
return;
|
|
12519
12732
|
}
|
|
12520
12733
|
const digitData = DIGIT_BANK[key];
|
|
12521
|
-
let charInfo
|
|
12734
|
+
let charInfo;
|
|
12522
12735
|
let className;
|
|
12523
12736
|
let charKey;
|
|
12524
12737
|
if (digitData) {
|
|
@@ -19534,12 +19747,12 @@ var ScrambledText = ({ children, reveal = false }) => {
|
|
|
19534
19747
|
});
|
|
19535
19748
|
};
|
|
19536
19749
|
var ScramblingLetters_module_default = {
|
|
19537
|
-
root: "
|
|
19538
|
-
line: "
|
|
19539
|
-
word: "
|
|
19540
|
-
link: "
|
|
19541
|
-
letter: "
|
|
19542
|
-
wobble: "
|
|
19750
|
+
root: "_root_m9eu9_1",
|
|
19751
|
+
line: "_line_m9eu9_9",
|
|
19752
|
+
word: "_word_m9eu9_14",
|
|
19753
|
+
link: "_link_m9eu9_18",
|
|
19754
|
+
letter: "_letter_m9eu9_22",
|
|
19755
|
+
wobble: "_wobble_m9eu9_1"
|
|
19543
19756
|
};
|
|
19544
19757
|
//#endregion
|
|
19545
19758
|
//#region src/components/Texts/ScramblingLetters/ScramblingLetters.tsx
|
|
@@ -19830,17 +20043,24 @@ function resolveThemeMode(mode) {
|
|
|
19830
20043
|
function syncThemeToDom({ backgroundColor, colorSpace, resolvedTheme }) {
|
|
19831
20044
|
if (typeof document === "undefined") return;
|
|
19832
20045
|
const root = document.documentElement;
|
|
20046
|
+
const body = document.body;
|
|
19833
20047
|
root.setAttribute(THEME_ATTRIBUTE, resolvedTheme);
|
|
19834
20048
|
root.style.colorScheme = resolvedTheme;
|
|
19835
|
-
if (
|
|
19836
|
-
|
|
20049
|
+
if (body) body.setAttribute(THEME_ATTRIBUTE, resolvedTheme);
|
|
20050
|
+
if (colorSpace) {
|
|
20051
|
+
root.setAttribute(COLOR_SPACE_ATTRIBUTE, colorSpace === "p3" ? "true" : "false");
|
|
20052
|
+
if (body) body.setAttribute(COLOR_SPACE_ATTRIBUTE, colorSpace === "p3" ? "true" : "false");
|
|
20053
|
+
} else {
|
|
20054
|
+
root.removeAttribute(COLOR_SPACE_ATTRIBUTE);
|
|
20055
|
+
if (body) body.removeAttribute(COLOR_SPACE_ATTRIBUTE);
|
|
20056
|
+
}
|
|
19837
20057
|
if (backgroundColor) root.style.backgroundColor = backgroundColor;
|
|
19838
20058
|
else root.style.removeProperty("background-color");
|
|
19839
20059
|
}
|
|
19840
20060
|
//#endregion
|
|
19841
20061
|
//#region src/components/primitives/ThemeProvider/ThemeProvider.tsx
|
|
19842
20062
|
var STORAGE_KEY = "theme-mode";
|
|
19843
|
-
var ThemeProvider = ({ children, defaultMode = "system", mode: controlledMode, onModeChange, storageKey = STORAGE_KEY }) => {
|
|
20063
|
+
var ThemeProvider = ({ children, defaultMode = "system", mode: controlledMode, onModeChange, storageKey = STORAGE_KEY, syncDomExtras }) => {
|
|
19844
20064
|
const isControlled = controlledMode !== void 0;
|
|
19845
20065
|
const [uncontrolledMode, setUncontrolledMode] = (0, react.useState)(() => {
|
|
19846
20066
|
if (isControlled) return controlledMode;
|
|
@@ -19860,8 +20080,11 @@ var ThemeProvider = ({ children, defaultMode = "system", mode: controlledMode, o
|
|
|
19860
20080
|
return () => mql.removeEventListener("change", handler);
|
|
19861
20081
|
}, [mode]);
|
|
19862
20082
|
(0, react.useEffect)(() => {
|
|
19863
|
-
syncThemeToDom({
|
|
19864
|
-
|
|
20083
|
+
syncThemeToDom({
|
|
20084
|
+
resolvedTheme,
|
|
20085
|
+
...syncDomExtras
|
|
20086
|
+
});
|
|
20087
|
+
}, [resolvedTheme, syncDomExtras]);
|
|
19865
20088
|
const setMode = (0, react.useCallback)((next) => {
|
|
19866
20089
|
if (!isControlled) {
|
|
19867
20090
|
setUncontrolledMode(next);
|
|
@@ -26526,6 +26749,7 @@ exports.RadioSlidingFocus = RadioSlidingFocus;
|
|
|
26526
26749
|
exports.RaysBackground = RaysBackground;
|
|
26527
26750
|
exports.RealisticSmoke = RealisticSmoke;
|
|
26528
26751
|
exports.RedirectPage = RedirectPage;
|
|
26752
|
+
exports.ReflectiveButton = ReflectiveButton;
|
|
26529
26753
|
exports.RegularLink = RegularLink;
|
|
26530
26754
|
exports.RepostButton = RepostButton;
|
|
26531
26755
|
exports.RevealImageAnimation = RevealImageAnimation;
|
|
@@ -26559,7 +26783,6 @@ exports.ShimmeringBorderGradient = ShimmeringBorderGradient;
|
|
|
26559
26783
|
exports.ShineAnimation = ShineAnimation;
|
|
26560
26784
|
exports.ShineCard = ShineCard;
|
|
26561
26785
|
exports.ShiningText = ShiningText;
|
|
26562
|
-
exports.ShinyButton = ShinyButton;
|
|
26563
26786
|
exports.ShinyCtaButton = ShinyCtaButton;
|
|
26564
26787
|
exports.SignatureAnimation = SignatureAnimation;
|
|
26565
26788
|
exports.SinglePopoverMenu = SinglePopoverMenu;
|