@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.
Files changed (101) hide show
  1. package/dist/audio/hover.mp3 +0 -0
  2. package/dist/audio/public/audio/click.wav +0 -0
  3. package/dist/audio/public/audio/hover.mp3 +0 -0
  4. package/dist/audio/public/audio/lock/select.mp3 +0 -0
  5. package/dist/index.cjs +430 -207
  6. package/dist/index.d.ts +36 -3
  7. package/dist/index.js +431 -208
  8. package/dist/styles.css +618 -552
  9. package/dist/{tokens-B2AxRYyF.js → tokens-CDVSR49D.js} +1 -0
  10. package/dist/{tokens-DlMougUi.cjs → tokens-Nhzxtwvl.cjs} +1 -0
  11. package/dist/tokens.cjs +1 -1
  12. package/dist/tokens.d.ts +1 -0
  13. package/dist/tokens.js +1 -1
  14. package/package.json +17 -17
  15. package/dist/fonts/gt/maru/GT-Maru-Light-Oblique-Trial.woff2 +0 -0
  16. package/dist/fonts/gt/maru/GT-Maru-Light-Trial.woff2 +0 -0
  17. package/dist/fonts/gt/maru/GT-Maru-Medium-Oblique-Trial.woff2 +0 -0
  18. package/dist/fonts/gt/maru/GT-Maru-Medium-Trial.woff2 +0 -0
  19. package/dist/fonts/gt/maru/GT-Maru-Mono-Black-Oblique-Trial.woff2 +0 -0
  20. package/dist/fonts/gt/maru/GT-Maru-Mono-Black-Trial.woff2 +0 -0
  21. package/dist/fonts/gt/maru/GT-Maru-Mono-Bold-Oblique-Trial.woff2 +0 -0
  22. package/dist/fonts/gt/maru/GT-Maru-Mono-Bold-Trial.woff2 +0 -0
  23. package/dist/fonts/gt/maru/GT-Maru-Mono-Light-Oblique-Trial.woff2 +0 -0
  24. package/dist/fonts/gt/maru/GT-Maru-Mono-Light-Trial.woff2 +0 -0
  25. package/dist/fonts/gt/maru/GT-Maru-Mono-Medium-Oblique-Trial.woff2 +0 -0
  26. package/dist/fonts/gt/maru/GT-Maru-Mono-Medium-Trial.woff2 +0 -0
  27. package/dist/fonts/gt/maru/gt-maru-black-oblique.woff2 +0 -0
  28. package/dist/fonts/gt/maru/gt-maru-black.woff2 +0 -0
  29. package/dist/fonts/gt/maru/gt-maru-bold-oblique.woff2 +0 -0
  30. package/dist/fonts/gt/maru/gt-maru-bold.woff2 +0 -0
  31. package/dist/fonts/gt/maru/gt-maru-mega-l.woff2 +0 -0
  32. package/dist/fonts/gt/maru/gt-maru-mega-m.woff2 +0 -0
  33. package/dist/fonts/gt/maru/gt-maru-mega-s.woff2 +0 -0
  34. package/dist/fonts/gt/maru/gt-maru-mono-regular-oblique.woff2 +0 -0
  35. package/dist/fonts/gt/maru/gt-maru-mono-regular.woff2 +0 -0
  36. package/dist/fonts/gt/maru/gt-maru-regular-oblique.woff2 +0 -0
  37. package/dist/fonts/gt/maru/gt-maru-regular.woff2 +0 -0
  38. package/dist/fonts/gt-flexa/GT-Flexa-VF-Trial.woff2 +0 -0
  39. package/dist/fonts/maru/GT-Maru-Light-Oblique-Trial.woff2 +0 -0
  40. package/dist/fonts/maru/GT-Maru-Light-Trial.woff2 +0 -0
  41. package/dist/fonts/maru/GT-Maru-Medium-Oblique-Trial.woff2 +0 -0
  42. package/dist/fonts/maru/GT-Maru-Medium-Trial.woff2 +0 -0
  43. package/dist/fonts/maru/GT-Maru-Mono-Black-Oblique-Trial.woff2 +0 -0
  44. package/dist/fonts/maru/GT-Maru-Mono-Black-Trial.woff2 +0 -0
  45. package/dist/fonts/maru/GT-Maru-Mono-Bold-Oblique-Trial.woff2 +0 -0
  46. package/dist/fonts/maru/GT-Maru-Mono-Bold-Trial.woff2 +0 -0
  47. package/dist/fonts/maru/GT-Maru-Mono-Light-Oblique-Trial.woff2 +0 -0
  48. package/dist/fonts/maru/GT-Maru-Mono-Light-Trial.woff2 +0 -0
  49. package/dist/fonts/maru/GT-Maru-Mono-Medium-Oblique-Trial.woff2 +0 -0
  50. package/dist/fonts/maru/GT-Maru-Mono-Medium-Trial.woff2 +0 -0
  51. package/dist/fonts/maru/gt-maru-black-oblique.woff2 +0 -0
  52. package/dist/fonts/maru/gt-maru-black.woff2 +0 -0
  53. package/dist/fonts/maru/gt-maru-bold-oblique.woff2 +0 -0
  54. package/dist/fonts/maru/gt-maru-bold.woff2 +0 -0
  55. package/dist/fonts/maru/gt-maru-mega-l.woff2 +0 -0
  56. package/dist/fonts/maru/gt-maru-mega-m.woff2 +0 -0
  57. package/dist/fonts/maru/gt-maru-mega-s.woff2 +0 -0
  58. package/dist/fonts/maru/gt-maru-mono-regular-oblique.woff2 +0 -0
  59. package/dist/fonts/maru/gt-maru-mono-regular.woff2 +0 -0
  60. package/dist/fonts/maru/gt-maru-regular-oblique.woff2 +0 -0
  61. package/dist/fonts/maru/gt-maru-regular.woff2 +0 -0
  62. package/dist/fonts/orbitron/orbitron-black.fnt +0 -426
  63. package/dist/fonts/orbitron/orbitron-black.png +0 -0
  64. /package/dist/audio/{fail.mp3 → public/audio/lock/fail.mp3} +0 -0
  65. /package/dist/audio/{fail.ogg → public/audio/lock/fail.ogg} +0 -0
  66. /package/dist/audio/{select.mp3 → public/audio/lock/hover.mp3} +0 -0
  67. /package/dist/audio/{hover.ogg → public/audio/lock/hover.ogg} +0 -0
  68. /package/dist/audio/{prev-next.mp3 → public/audio/lock/prev-next.mp3} +0 -0
  69. /package/dist/audio/{prev-next.ogg → public/audio/lock/prev-next.ogg} +0 -0
  70. /package/dist/audio/{select.ogg → public/audio/lock/select.ogg} +0 -0
  71. /package/dist/audio/{success.mp3 → public/audio/lock/success.mp3} +0 -0
  72. /package/dist/audio/{success.ogg → public/audio/lock/success.ogg} +0 -0
  73. /package/dist/fonts/{GT-Maru-Light-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Light-Oblique-Trial.woff2} +0 -0
  74. /package/dist/fonts/{GT-Maru-Light-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Light-Trial.woff2} +0 -0
  75. /package/dist/fonts/{GT-Maru-Medium-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Medium-Oblique-Trial.woff2} +0 -0
  76. /package/dist/fonts/{GT-Maru-Medium-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Medium-Trial.woff2} +0 -0
  77. /package/dist/fonts/{GT-Maru-Mono-Black-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Black-Oblique-Trial.woff2} +0 -0
  78. /package/dist/fonts/{GT-Maru-Mono-Black-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Black-Trial.woff2} +0 -0
  79. /package/dist/fonts/{GT-Maru-Mono-Bold-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Bold-Oblique-Trial.woff2} +0 -0
  80. /package/dist/fonts/{GT-Maru-Mono-Bold-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Bold-Trial.woff2} +0 -0
  81. /package/dist/fonts/{GT-Maru-Mono-Light-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Light-Oblique-Trial.woff2} +0 -0
  82. /package/dist/fonts/{GT-Maru-Mono-Light-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Light-Trial.woff2} +0 -0
  83. /package/dist/fonts/{GT-Maru-Mono-Medium-Oblique-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Medium-Oblique-Trial.woff2} +0 -0
  84. /package/dist/fonts/{GT-Maru-Mono-Medium-Trial.woff2 → src/fonts/gt/maru/GT-Maru-Mono-Medium-Trial.woff2} +0 -0
  85. /package/dist/fonts/{gt-maru-black-oblique.woff2 → src/fonts/gt/maru/gt-maru-black-oblique.woff2} +0 -0
  86. /package/dist/fonts/{gt-maru-black.woff2 → src/fonts/gt/maru/gt-maru-black.woff2} +0 -0
  87. /package/dist/fonts/{gt-maru-bold-oblique.woff2 → src/fonts/gt/maru/gt-maru-bold-oblique.woff2} +0 -0
  88. /package/dist/fonts/{gt-maru-bold.woff2 → src/fonts/gt/maru/gt-maru-bold.woff2} +0 -0
  89. /package/dist/fonts/{gt-maru-mega-l.woff2 → src/fonts/gt/maru/gt-maru-mega-l.woff2} +0 -0
  90. /package/dist/fonts/{gt-maru-mega-m.woff2 → src/fonts/gt/maru/gt-maru-mega-m.woff2} +0 -0
  91. /package/dist/fonts/{gt-maru-mega-s.woff2 → src/fonts/gt/maru/gt-maru-mega-s.woff2} +0 -0
  92. /package/dist/fonts/{gt-maru-mono-regular-oblique.woff2 → src/fonts/gt/maru/gt-maru-mono-regular-oblique.woff2} +0 -0
  93. /package/dist/fonts/{gt-maru-mono-regular.woff2 → src/fonts/gt/maru/gt-maru-mono-regular.woff2} +0 -0
  94. /package/dist/fonts/{gt-maru-regular-oblique.woff2 → src/fonts/gt/maru/gt-maru-regular-oblique.woff2} +0 -0
  95. /package/dist/fonts/{gt-maru-regular.woff2 → src/fonts/gt/maru/gt-maru-regular.woff2} +0 -0
  96. /package/dist/fonts/{GT-Flexa-VF-Trial.woff2 → src/fonts/gt-flexa/GT-Flexa-VF-Trial.woff2} +0 -0
  97. /package/dist/fonts/{orbitron-black.fnt → src/fonts/orbitron/orbitron-black.fnt} +0 -0
  98. /package/dist/fonts/{orbitron-black.png → src/fonts/orbitron/orbitron-black.png} +0 -0
  99. /package/dist/icons/{arrow-dots-mask.svg → src/icons/arrow-dots-mask.svg} +0 -0
  100. /package/dist/icons/{arrow-dots.svg → src/icons/arrow-dots.svg} +0 -0
  101. /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-DlMougUi.cjs");
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: "_root_7dhw5_1",
770
- button: "_button_7dhw5_11",
771
- p: "_p_7dhw5_24",
772
- text: "_text_7dhw5_24",
773
- rise1: "_rise1_7dhw5_1",
774
- rise2: "_rise2_7dhw5_1",
775
- rise3: "_rise3_7dhw5_1",
776
- rise4: "_rise4_7dhw5_1",
777
- rise5: "_rise5_7dhw5_1",
778
- rise6: "_rise6_7dhw5_1",
779
- rise7: "_rise7_7dhw5_1",
780
- rise8: "_rise8_7dhw5_1",
781
- rise9: "_rise9_7dhw5_1",
782
- rise10: "_rise10_7dhw5_1",
783
- rise11: "_rise11_7dhw5_1",
784
- rise12: "_rise12_7dhw5_1",
785
- rise13: "_rise13_7dhw5_1",
786
- rise14: "_rise14_7dhw5_1",
787
- rise15: "_rise15_7dhw5_1",
788
- rise16: "_rise16_7dhw5_1",
789
- rise17: "_rise17_7dhw5_1",
790
- rise18: "_rise18_7dhw5_1",
791
- rise19: "_rise19_7dhw5_1",
792
- rise20: "_rise20_7dhw5_1",
793
- effects: "_effects_7dhw5_238"
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: "_root_hepo2_2",
3846
- i: "_i_hepo2_22",
3847
- noise: "_noise_hepo2_1",
3848
- text: "_text_hepo2_482"
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/ShinyButton/MacCursor.tsx
4734
- var MacCursor = () => {
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: "url(#filter0_d_3664_1573)",
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: "filter0_d_3664_1573",
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/ShinyButton/ShinyButton.helpers.ts
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
- var ShinyButton_module_default = {
4824
- root: "_root_yozjp_1",
4825
- buttonContainer: "_buttonContainer_yozjp_7",
4826
- pressed: "_pressed_yozjp_14",
4827
- button: "_button_yozjp_7",
4828
- shadow: "_shadow_yozjp_33",
4829
- text: "_text_yozjp_49",
4830
- buttonReflection: "_buttonReflection_yozjp_68",
4831
- surfaceReflection: "_surfaceReflection_yozjp_77",
4832
- detailsContainer: "_detailsContainer_yozjp_95",
4833
- hackyCursorInnerDiv: "_hackyCursorInnerDiv_yozjp_108",
4834
- cursor: "_cursor_yozjp_119",
4835
- fingerprint: "_fingerprint_yozjp_129"
4836
- };
4837
- //#endregion
4838
- //#region src/components/Buttons/ShinyButton/ShinyButton.tsx
4839
- var ShinyButton = () => {
4840
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4841
- className: ShinyButton_module_default.root,
4842
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
4843
- roughness: .2,
4844
- offset: -200,
4845
- children: "Button"
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 Button({ roughness = 0, offset = 0, children }) {
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 detailsContainerRef = (0, react.useRef)(null);
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 [buttonFocus, setButtonFocus] = (0, react.useState)(false);
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 [inBrowser] = (0, react.useState)(() => typeof window !== "undefined");
4861
- const mappedRoughness = Math.round(scale$2(roughness, 0, 1, 0, 16));
4862
- const [showBorderRadius] = (0, react.useState)(() => !navigator.userAgent.includes("Chrome"));
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
- if (!reflectionRef.current || !surfaceReflectionRef.current || !inBrowser) return;
4865
- try {
4866
- navigator.mediaDevices.getUserMedia({
4867
- audio: false,
4868
- video: {
4869
- width: { ideal: 600 },
4870
- height: { ideal: 600 },
4871
- facingMode: "user"
4872
- }
4873
- }).then((stream) => {
4874
- const video = reflectionRef.current;
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
- reflectionRef,
4894
- surfaceReflectionRef,
4895
- inBrowser
5008
+ camera,
5009
+ disabled,
5010
+ start,
5011
+ stop
4896
5012
  ]);
4897
5013
  (0, react.useEffect)(() => {
4898
- if (!detailsContainerRef.current || !inBrowser) return;
4899
- const handleMouseMove = (event) => {
4900
- const rect = detailsContainerRef.current?.getBoundingClientRect();
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: event.clientX - rect.x,
4904
- y: event.clientY - rect.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
- }, [inBrowser]);
4912
- const handleMouseDown = (e) => {
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
- if (!detailsContainerRef.current) return;
4915
- const rect = detailsContainerRef.current.getBoundingClientRect();
4916
- const fingerprint = {
4917
- x: e.clientX - rect.x,
4918
- y: e.clientY - rect.y
4919
- };
4920
- setFingerprints((fingerprints) => [...fingerprints, fingerprint]);
4921
- };
4922
- const handleTouchStart = (e) => {
4923
- if (e.touches.length > 0 && detailsContainerRef.current) {
4924
- const touch = e.touches[0];
4925
- const rect = detailsContainerRef.current.getBoundingClientRect();
4926
- const fingerprint = {
4927
- x: touch.clientX - rect.x,
4928
- y: touch.clientY - rect.y
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
- onMouseEnter: () => setButtonFocus(true),
4937
- onMouseLeave: () => setButtonFocus(false),
4938
- className: (0, clsx.default)(ShinyButton_module_default.buttonContainer, { [ShinyButton_module_default.pressed]: buttonPressed }),
4939
- children: [
4940
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4941
- className: ShinyButton_module_default.detailsContainer,
4942
- ref: detailsContainerRef,
4943
- style: { borderRadius: showBorderRadius ? "var(--border-radius)" : 0 },
4944
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4945
- className: ShinyButton_module_default.hackyCursorInnerDiv,
4946
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4947
- className: ShinyButton_module_default.cursor,
4948
- style: {
4949
- transform: `translate(${cursorPosition.x}px, ${cursorPosition.y}px) translate(-50%, -50%)`,
4950
- opacity: buttonFocus ? 1 : 0
4951
- },
4952
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MacCursor, {})
4953
- })
4954
- }), fingerprints.map((el, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4955
- className: ShinyButton_module_default.fingerprint,
4956
- style: { transform: `translate(${el.x}px, ${el.y}px) translate(-50%, -50%)` }
4957
- }, i))]
4958
- }),
4959
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("video", {
4960
- ref: surfaceReflectionRef,
4961
- className: (0, clsx.default)(ShinyButton_module_default.surfaceReflection, { [ShinyButton_module_default.pressed]: buttonPressed })
4962
- }),
4963
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4964
- className: (0, clsx.default)(ShinyButton_module_default.button, { [ShinyButton_module_default.pressed]: buttonPressed }),
4965
- onMouseDown: handleMouseDown,
4966
- onTouchStart: handleTouchStart,
4967
- onMouseUp: () => setButtonPressed(false),
4968
- onTouchEnd: () => setButtonPressed(false),
4969
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("video", {
4970
- ref: reflectionRef,
4971
- playsInline: true,
4972
- className: ShinyButton_module_default.buttonReflection,
4973
- style: {
4974
- filter: `blur(${mappedRoughness}px) saturate(0.4) brightness(1.1)`,
4975
- objectPosition: `0px ${offset}px`
4976
- }
4977
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: ShinyButton_module_default.shadow })]
4978
- }),
4979
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4980
- className: ShinyButton_module_default.text,
4981
- children
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: "_root_ofkv2_1",
9593
- container: "_container_ofkv2_18",
9594
- containerGlass: "_containerGlass_ofkv2_32",
9595
- glossyXLine: "_glossyXLine_ofkv2_39",
9596
- items: "_items_ofkv2_49",
9597
- child: "_child_ofkv2_89",
9598
- divider: "_divider_ofkv2_95",
9599
- glassFilter: "_glassFilter_ofkv2_106",
9600
- glassOverlay: "_glassOverlay_ofkv2_118",
9601
- glassSpecular: "_glassSpecular_ofkv2_127"
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: "_root_1aw22_1",
10044
- expanded: "_expanded_1aw22_15",
10045
- rootGlass: "_rootGlass_1aw22_24",
10046
- item: "_item_1aw22_28",
10047
- itemGlass: "_itemGlass_1aw22_44",
10048
- content: "_content_1aw22_52",
10049
- gloss: "_gloss_1aw22_63",
10050
- glassFilter: "_glassFilter_1aw22_73",
10051
- glassOverlay: "_glassOverlay_1aw22_85",
10052
- glassSpecular: "_glassSpecular_1aw22_94"
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 = null;
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: "_root_1xkae_1",
19538
- line: "_line_1xkae_9",
19539
- word: "_word_1xkae_14",
19540
- link: "_link_1xkae_18",
19541
- letter: "_letter_1xkae_22",
19542
- wobble: "_wobble_1xkae_1"
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 (colorSpace) root.setAttribute(COLOR_SPACE_ATTRIBUTE, colorSpace === "p3" ? "true" : "false");
19836
- else root.removeAttribute(COLOR_SPACE_ATTRIBUTE);
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({ resolvedTheme });
19864
- }, [resolvedTheme]);
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;