@flamingo-stack/openframe-frontend-core 0.0.449 → 0.0.450
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/{chunk-DJP5HYFG.cjs → chunk-26JSJMMZ.cjs} +7 -7
- package/dist/{chunk-DJP5HYFG.cjs.map → chunk-26JSJMMZ.cjs.map} +1 -1
- package/dist/{chunk-NPBTNWRA.js → chunk-3ITY2LBM.js} +4 -4
- package/dist/{chunk-MWRFPLNB.js → chunk-4SZDO3TE.js} +3 -3
- package/dist/{chunk-LWT6G75Q.js → chunk-4VSTLJDO.js} +2 -2
- package/dist/{chunk-DRKQNXSZ.cjs → chunk-5HW5HMNF.cjs} +5 -5
- package/dist/{chunk-DRKQNXSZ.cjs.map → chunk-5HW5HMNF.cjs.map} +1 -1
- package/dist/{chunk-KKJRBMG3.cjs → chunk-5OY7HYII.cjs} +73 -73
- package/dist/{chunk-KKJRBMG3.cjs.map → chunk-5OY7HYII.cjs.map} +1 -1
- package/dist/{chunk-WYPROXL4.cjs → chunk-6GJKSYM2.cjs} +73 -73
- package/dist/{chunk-WYPROXL4.cjs.map → chunk-6GJKSYM2.cjs.map} +1 -1
- package/dist/{chunk-6TS4AIDX.cjs → chunk-6RA4NRBA.cjs} +15 -15
- package/dist/{chunk-6TS4AIDX.cjs.map → chunk-6RA4NRBA.cjs.map} +1 -1
- package/dist/{chunk-X754WDWO.cjs → chunk-76EN3GEH.cjs} +40 -40
- package/dist/{chunk-X754WDWO.cjs.map → chunk-76EN3GEH.cjs.map} +1 -1
- package/dist/{chunk-YSNMV53O.js → chunk-CM5XKHHS.js} +6 -6
- package/dist/{chunk-47AMTR2S.cjs → chunk-DQ5U6DCR.cjs} +18 -18
- package/dist/{chunk-47AMTR2S.cjs.map → chunk-DQ5U6DCR.cjs.map} +1 -1
- package/dist/{chunk-YHNBJ3F3.js → chunk-EQWE64RJ.js} +2 -2
- package/dist/{chunk-5SJGFLL2.js → chunk-HXCQHMS5.js} +6386 -6032
- package/dist/chunk-HXCQHMS5.js.map +1 -0
- package/dist/{chunk-VSWFYFIG.js → chunk-HYIHXXF3.js} +5 -5
- package/dist/{chunk-AZKVNRZP.cjs → chunk-J5BYYZVM.cjs} +32 -32
- package/dist/{chunk-AZKVNRZP.cjs.map → chunk-J5BYYZVM.cjs.map} +1 -1
- package/dist/{chunk-JAASDJOF.js → chunk-K3GXIGN6.js} +5 -5
- package/dist/{chunk-UNQVTGVG.js → chunk-M3AKWFAO.js} +2 -2
- package/dist/{chunk-TKGCTDQY.js → chunk-MLFFBQ5B.js} +180 -87
- package/dist/chunk-MLFFBQ5B.js.map +1 -0
- package/dist/{chunk-XLFAFH2B.js → chunk-N53FC732.js} +2 -2
- package/dist/{chunk-H56AEHFC.cjs → chunk-N5M72LJX.cjs} +1620 -1266
- package/dist/chunk-N5M72LJX.cjs.map +1 -0
- package/dist/{chunk-4IMXFDRI.js → chunk-PCW2TRZ4.js} +3 -3
- package/dist/{chunk-AN7MCJTV.cjs → chunk-QF3NQW7C.cjs} +122 -29
- package/dist/chunk-QF3NQW7C.cjs.map +1 -0
- package/dist/{chunk-EOFENGSZ.cjs → chunk-ROBGJH52.cjs} +12 -12
- package/dist/{chunk-EOFENGSZ.cjs.map → chunk-ROBGJH52.cjs.map} +1 -1
- package/dist/{chunk-HQ7S6JG5.js → chunk-RQHHACP2.js} +3 -3
- package/dist/{chunk-ROCJMSJI.cjs → chunk-UPRY4I63.cjs} +3 -3
- package/dist/{chunk-ROCJMSJI.cjs.map → chunk-UPRY4I63.cjs.map} +1 -1
- package/dist/{chunk-LQTX7EJS.cjs → chunk-VLDZ4363.cjs} +29 -29
- package/dist/{chunk-LQTX7EJS.cjs.map → chunk-VLDZ4363.cjs.map} +1 -1
- package/dist/{chunk-BSBWBQ7M.js → chunk-VUDZOCPW.js} +6 -6
- package/dist/{chunk-4S4RR7XC.cjs → chunk-XITG5ICQ.cjs} +40 -40
- package/dist/{chunk-4S4RR7XC.cjs.map → chunk-XITG5ICQ.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-quick-action-row.d.ts +26 -1
- package/dist/components/chat/chat-quick-action-row.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +15 -3
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +14 -2
- package/dist/components/chat/quick-action-chip.d.ts +45 -4
- package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
- package/dist/components/chat/quick-action-marquee.d.ts +24 -9
- package/dist/components/chat/quick-action-marquee.d.ts.map +1 -1
- package/dist/components/chat/quick-action-wall.d.ts +96 -0
- package/dist/components/chat/quick-action-wall.d.ts.map +1 -0
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/content-loading-container.d.ts +1 -1
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/cards-strip.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/form.d.ts +1 -1
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +159 -135
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +35 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +27 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +26 -2
- package/dist/components/ui/marquee-wall.d.ts +159 -0
- package/dist/components/ui/marquee-wall.d.ts.map +1 -0
- package/dist/hooks/index.cjs +6 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/ui/index.d.ts +2 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/use-marquee-engine.d.ts +73 -0
- package/dist/hooks/ui/use-marquee-engine.d.ts.map +1 -0
- package/dist/hooks/ui/use-suppress-clone-focus.d.ts +24 -0
- package/dist/hooks/ui/use-suppress-clone-focus.d.ts.map +1 -0
- package/dist/index.cjs +31 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -2
- package/dist/tailwind.config.cjs +1 -8
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.js +1 -8
- package/dist/tailwind.config.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-quick-action-row.tsx +47 -3
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/quick-action-chip.tsx +81 -13
- package/src/components/chat/quick-action-marquee.tsx +54 -47
- package/src/components/chat/quick-action-wall.tsx +247 -0
- package/src/components/features/cards-strip.tsx +88 -158
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/marquee-wall.tsx +522 -0
- package/src/hooks/ui/index.ts +2 -0
- package/src/hooks/ui/use-marquee-engine.ts +158 -0
- package/src/hooks/ui/use-suppress-clone-focus.ts +61 -0
- package/src/stories/MarqueeWall.stories.tsx +132 -0
- package/src/stories/QuickActionMarquee.stories.tsx +8 -7
- package/src/stories/QuickActionWall.stories.tsx +116 -0
- package/tailwind.config.ts +0 -7
- package/dist/chunk-5SJGFLL2.js.map +0 -1
- package/dist/chunk-AN7MCJTV.cjs.map +0 -1
- package/dist/chunk-H56AEHFC.cjs.map +0 -1
- package/dist/chunk-TKGCTDQY.js.map +0 -1
- /package/dist/{chunk-NPBTNWRA.js.map → chunk-3ITY2LBM.js.map} +0 -0
- /package/dist/{chunk-MWRFPLNB.js.map → chunk-4SZDO3TE.js.map} +0 -0
- /package/dist/{chunk-LWT6G75Q.js.map → chunk-4VSTLJDO.js.map} +0 -0
- /package/dist/{chunk-YSNMV53O.js.map → chunk-CM5XKHHS.js.map} +0 -0
- /package/dist/{chunk-YHNBJ3F3.js.map → chunk-EQWE64RJ.js.map} +0 -0
- /package/dist/{chunk-VSWFYFIG.js.map → chunk-HYIHXXF3.js.map} +0 -0
- /package/dist/{chunk-JAASDJOF.js.map → chunk-K3GXIGN6.js.map} +0 -0
- /package/dist/{chunk-UNQVTGVG.js.map → chunk-M3AKWFAO.js.map} +0 -0
- /package/dist/{chunk-XLFAFH2B.js.map → chunk-N53FC732.js.map} +0 -0
- /package/dist/{chunk-4IMXFDRI.js.map → chunk-PCW2TRZ4.js.map} +0 -0
- /package/dist/{chunk-HQ7S6JG5.js.map → chunk-RQHHACP2.js.map} +0 -0
- /package/dist/{chunk-BSBWBQ7M.js.map → chunk-VUDZOCPW.js.map} +0 -0
|
@@ -598,6 +598,71 @@ function useLocalStorage(key, initialValue) {
|
|
|
598
598
|
return [storedValue, setValue];
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
+
// src/hooks/ui/use-marquee-engine.ts
|
|
602
|
+
import { useCallback as useCallback4, useEffect as useEffect8, useRef as useRef5 } from "react";
|
|
603
|
+
var RESYNC_EPSILON = 1.5;
|
|
604
|
+
function useMarqueeEngine(options) {
|
|
605
|
+
const posRef = useRef5(0);
|
|
606
|
+
const glideRemainingRef = useRef5(0);
|
|
607
|
+
const speedEnvRef = useRef5(0);
|
|
608
|
+
const optsRef = useRef5(options);
|
|
609
|
+
optsRef.current = options;
|
|
610
|
+
const wrap = useCallback4((pos) => {
|
|
611
|
+
const half = optsRef.current.getWrapSize();
|
|
612
|
+
if (half <= 0) return pos;
|
|
613
|
+
const min = optsRef.current.getWrapMin?.() ?? 0;
|
|
614
|
+
while (pos >= min + half) pos -= half;
|
|
615
|
+
while (pos < min) pos += half;
|
|
616
|
+
return pos;
|
|
617
|
+
}, []);
|
|
618
|
+
const glideBy = useCallback4((px) => {
|
|
619
|
+
glideRemainingRef.current += px;
|
|
620
|
+
}, []);
|
|
621
|
+
const active = options.active;
|
|
622
|
+
useEffect8(() => {
|
|
623
|
+
if (!active) return;
|
|
624
|
+
let raf = 0;
|
|
625
|
+
let last = performance.now();
|
|
626
|
+
const readBack = optsRef.current.readBack;
|
|
627
|
+
if (readBack) posRef.current = readBack();
|
|
628
|
+
const tick = (now) => {
|
|
629
|
+
const opts = optsRef.current;
|
|
630
|
+
const dt = Math.min(now - last, 100) / 1e3;
|
|
631
|
+
last = now;
|
|
632
|
+
const paused = opts.isPaused(now);
|
|
633
|
+
const targetSpeed = paused ? 0 : opts.speed;
|
|
634
|
+
speedEnvRef.current += (targetSpeed - speedEnvRef.current) * Math.min(1, dt / 0.25);
|
|
635
|
+
if (targetSpeed === 0 && speedEnvRef.current < 0.5) speedEnvRef.current = 0;
|
|
636
|
+
const external = opts.readBack ? opts.readBack() : null;
|
|
637
|
+
const resync = () => {
|
|
638
|
+
if (external !== null && Math.abs(external - posRef.current) > RESYNC_EPSILON) {
|
|
639
|
+
posRef.current = external;
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
const glide = glideRemainingRef.current;
|
|
643
|
+
if (glide !== 0) {
|
|
644
|
+
resync();
|
|
645
|
+
const speed = Math.max(Math.abs(glide) * 6, 240);
|
|
646
|
+
const step = Math.sign(glide) * Math.min(Math.abs(glide), speed * dt);
|
|
647
|
+
glideRemainingRef.current = Math.abs(glide - step) < 0.5 ? 0 : glide - step;
|
|
648
|
+
posRef.current = wrap(posRef.current + step);
|
|
649
|
+
opts.apply(posRef.current);
|
|
650
|
+
} else if (speedEnvRef.current > 0) {
|
|
651
|
+
resync();
|
|
652
|
+
posRef.current = wrap(posRef.current + speedEnvRef.current * dt);
|
|
653
|
+
opts.apply(posRef.current);
|
|
654
|
+
} else if (external !== null) {
|
|
655
|
+
posRef.current = external;
|
|
656
|
+
}
|
|
657
|
+
opts.onAfterFrame?.();
|
|
658
|
+
raf = requestAnimationFrame(tick);
|
|
659
|
+
};
|
|
660
|
+
raf = requestAnimationFrame(tick);
|
|
661
|
+
return () => cancelAnimationFrame(raf);
|
|
662
|
+
}, [active, wrap]);
|
|
663
|
+
return { posRef, glideBy, wrap };
|
|
664
|
+
}
|
|
665
|
+
|
|
601
666
|
// src/hooks/ui/use-media-query.ts
|
|
602
667
|
import { useLayoutEffect, useState as useState8 } from "react";
|
|
603
668
|
function useMediaQuery(query) {
|
|
@@ -634,24 +699,24 @@ function useLgUp() {
|
|
|
634
699
|
}
|
|
635
700
|
|
|
636
701
|
// src/hooks/ui/use-memoized-callback.ts
|
|
637
|
-
import { useCallback as
|
|
702
|
+
import { useCallback as useCallback5, useRef as useRef6 } from "react";
|
|
638
703
|
function useMemoizedCallback(callback, dependencies) {
|
|
639
|
-
const callbackRef =
|
|
640
|
-
const dependenciesRef =
|
|
704
|
+
const callbackRef = useRef6(callback);
|
|
705
|
+
const dependenciesRef = useRef6(dependencies);
|
|
641
706
|
callbackRef.current = callback;
|
|
642
707
|
const depsChanged = dependencies.some((dep, i) => !Object.is(dep, dependenciesRef.current[i]));
|
|
643
708
|
if (depsChanged) {
|
|
644
709
|
dependenciesRef.current = dependencies;
|
|
645
710
|
}
|
|
646
|
-
return
|
|
711
|
+
return useCallback5(((...args) => callbackRef.current(...args)), [depsChanged]);
|
|
647
712
|
}
|
|
648
713
|
|
|
649
714
|
// src/hooks/ui/use-notification-permission.ts
|
|
650
|
-
import { useCallback as
|
|
715
|
+
import { useCallback as useCallback6, useEffect as useEffect9, useState as useState9 } from "react";
|
|
651
716
|
function useNotificationPermission() {
|
|
652
717
|
const [supported, setSupported] = useState9(false);
|
|
653
718
|
const [permission, setPermission] = useState9("default");
|
|
654
|
-
|
|
719
|
+
useEffect9(() => {
|
|
655
720
|
if (typeof window === "undefined" || !("Notification" in window)) return;
|
|
656
721
|
setSupported(true);
|
|
657
722
|
const sync = () => setPermission(Notification.permission);
|
|
@@ -672,7 +737,7 @@ function useNotificationPermission() {
|
|
|
672
737
|
window.removeEventListener("focus", sync);
|
|
673
738
|
};
|
|
674
739
|
}, []);
|
|
675
|
-
const request =
|
|
740
|
+
const request = useCallback6(async () => {
|
|
676
741
|
if (typeof window === "undefined" || !("Notification" in window)) {
|
|
677
742
|
return "denied";
|
|
678
743
|
}
|
|
@@ -687,7 +752,7 @@ function useNotificationPermission() {
|
|
|
687
752
|
}
|
|
688
753
|
|
|
689
754
|
// src/hooks/ui/use-onboarding-state.ts
|
|
690
|
-
import { useState as useState10, useEffect as
|
|
755
|
+
import { useState as useState10, useEffect as useEffect10, useCallback as useCallback7 } from "react";
|
|
691
756
|
|
|
692
757
|
// src/utils/onboarding-storage.ts
|
|
693
758
|
var DEFAULT_STATE = {
|
|
@@ -764,7 +829,7 @@ function dismissOnboarding(key) {
|
|
|
764
829
|
function useOnboardingState(storageKey = "openframe-onboarding-state") {
|
|
765
830
|
const [state, setState] = useState10(() => loadOnboardingState(storageKey));
|
|
766
831
|
const [, forceUpdate] = useState10(0);
|
|
767
|
-
|
|
832
|
+
useEffect10(() => {
|
|
768
833
|
const handleStorageUpdate = (e) => {
|
|
769
834
|
if (e.detail.key === storageKey) {
|
|
770
835
|
const newState = loadOnboardingState(storageKey);
|
|
@@ -778,38 +843,38 @@ function useOnboardingState(storageKey = "openframe-onboarding-state") {
|
|
|
778
843
|
window.removeEventListener("localStorageUpdate", handleStorageUpdate);
|
|
779
844
|
};
|
|
780
845
|
}, [storageKey]);
|
|
781
|
-
const markComplete =
|
|
846
|
+
const markComplete = useCallback7((stepId) => {
|
|
782
847
|
console.log(`\u{1F3AF} markComplete called for: "${stepId}"`);
|
|
783
848
|
const newState = markStepComplete(storageKey, stepId);
|
|
784
849
|
setState(newState);
|
|
785
850
|
forceUpdate((prev) => prev + 1);
|
|
786
851
|
}, [storageKey]);
|
|
787
|
-
const markSkipped =
|
|
852
|
+
const markSkipped = useCallback7((stepId) => {
|
|
788
853
|
console.log(`\u23ED\uFE0F markSkipped called for: "${stepId}"`);
|
|
789
854
|
const newState = markStepSkipped(storageKey, stepId);
|
|
790
855
|
setState(newState);
|
|
791
856
|
forceUpdate((prev) => prev + 1);
|
|
792
857
|
}, [storageKey]);
|
|
793
|
-
const dismissOnboarding2 =
|
|
858
|
+
const dismissOnboarding2 = useCallback7(() => {
|
|
794
859
|
console.log(`\u{1F6AB} dismissOnboarding called`);
|
|
795
860
|
const newState = dismissOnboarding(storageKey);
|
|
796
861
|
setState(newState);
|
|
797
862
|
forceUpdate((prev) => prev + 1);
|
|
798
863
|
}, [storageKey]);
|
|
799
|
-
const markMultipleComplete2 =
|
|
864
|
+
const markMultipleComplete2 = useCallback7((stepIds) => {
|
|
800
865
|
console.log(`\u{1F3AF} markMultipleComplete called for:`, stepIds);
|
|
801
866
|
const newState = markMultipleComplete(storageKey, stepIds);
|
|
802
867
|
setState(newState);
|
|
803
868
|
forceUpdate((prev) => prev + 1);
|
|
804
869
|
console.log(`\u{1F4DD} State after batch:`, newState);
|
|
805
870
|
}, [storageKey]);
|
|
806
|
-
const isStepComplete =
|
|
871
|
+
const isStepComplete = useCallback7((stepId) => {
|
|
807
872
|
return state.completedSteps.includes(stepId);
|
|
808
873
|
}, [state.completedSteps]);
|
|
809
|
-
const isStepSkipped =
|
|
874
|
+
const isStepSkipped = useCallback7((stepId) => {
|
|
810
875
|
return state.skippedSteps.includes(stepId);
|
|
811
876
|
}, [state.skippedSteps]);
|
|
812
|
-
const allStepsComplete =
|
|
877
|
+
const allStepsComplete = useCallback7((steps) => {
|
|
813
878
|
return steps.every((step) => isStepComplete(step.id) || isStepSkipped(step.id));
|
|
814
879
|
}, [isStepComplete, isStepSkipped]);
|
|
815
880
|
return {
|
|
@@ -825,7 +890,7 @@ function useOnboardingState(storageKey = "openframe-onboarding-state") {
|
|
|
825
890
|
}
|
|
826
891
|
|
|
827
892
|
// src/hooks/ui/use-search.ts
|
|
828
|
-
import { useState as useState11, useEffect as
|
|
893
|
+
import { useState as useState11, useEffect as useEffect11, useCallback as useCallback8 } from "react";
|
|
829
894
|
function useSearch(config) {
|
|
830
895
|
const { searchFn, mapResult, debounceMs = 300, minQueryLength = 2 } = config;
|
|
831
896
|
const [query, setQuery] = useState11("");
|
|
@@ -833,11 +898,11 @@ function useSearch(config) {
|
|
|
833
898
|
const [isLoading, setIsLoading] = useState11(false);
|
|
834
899
|
const [error, setError] = useState11(null);
|
|
835
900
|
const debouncedQuery = useDebounce(query, debounceMs);
|
|
836
|
-
const clearResults =
|
|
901
|
+
const clearResults = useCallback8(() => {
|
|
837
902
|
setResults([]);
|
|
838
903
|
setError(null);
|
|
839
904
|
}, []);
|
|
840
|
-
|
|
905
|
+
useEffect11(() => {
|
|
841
906
|
if (!debouncedQuery || debouncedQuery.length < minQueryLength) {
|
|
842
907
|
setResults([]);
|
|
843
908
|
setIsLoading(false);
|
|
@@ -872,6 +937,32 @@ function useSearch(config) {
|
|
|
872
937
|
return { query, setQuery, results, isLoading, error, clearResults };
|
|
873
938
|
}
|
|
874
939
|
|
|
940
|
+
// src/hooks/ui/use-suppress-clone-focus.ts
|
|
941
|
+
import { useEffect as useEffect12, useRef as useRef7 } from "react";
|
|
942
|
+
var CLONE_FOCUSABLE_SELECTOR = 'a[href],button,input,select,textarea,iframe,summary,audio[controls],video[controls],[tabindex],[contenteditable]:not([contenteditable="false"])';
|
|
943
|
+
function useSuppressCloneFocus(active) {
|
|
944
|
+
const ref = useRef7(null);
|
|
945
|
+
useEffect12(() => {
|
|
946
|
+
const root = ref.current;
|
|
947
|
+
if (!root || !active) return;
|
|
948
|
+
const suppress = () => {
|
|
949
|
+
root.querySelectorAll(CLONE_FOCUSABLE_SELECTOR).forEach((el) => {
|
|
950
|
+
if (el.getAttribute("tabindex") !== "-1") el.setAttribute("tabindex", "-1");
|
|
951
|
+
});
|
|
952
|
+
};
|
|
953
|
+
suppress();
|
|
954
|
+
const mo = new MutationObserver(suppress);
|
|
955
|
+
mo.observe(root, {
|
|
956
|
+
childList: true,
|
|
957
|
+
subtree: true,
|
|
958
|
+
attributes: true,
|
|
959
|
+
attributeFilter: ["href", "tabindex", "contenteditable", "controls"]
|
|
960
|
+
});
|
|
961
|
+
return () => mo.disconnect();
|
|
962
|
+
}, [active]);
|
|
963
|
+
return ref;
|
|
964
|
+
}
|
|
965
|
+
|
|
875
966
|
// src/hooks/ui/use-table-pagination.ts
|
|
876
967
|
import { useMemo } from "react";
|
|
877
968
|
function useTablePagination(config) {
|
|
@@ -910,11 +1001,11 @@ function useTablePagination(config) {
|
|
|
910
1001
|
}
|
|
911
1002
|
|
|
912
1003
|
// src/hooks/ui/use-throttle.ts
|
|
913
|
-
import { useState as useState12, useEffect as
|
|
1004
|
+
import { useState as useState12, useEffect as useEffect13, useRef as useRef8 } from "react";
|
|
914
1005
|
function useThrottle(value, limit = 200) {
|
|
915
1006
|
const [throttledValue, setThrottledValue] = useState12(value);
|
|
916
|
-
const lastUpdated =
|
|
917
|
-
|
|
1007
|
+
const lastUpdated = useRef8(Date.now());
|
|
1008
|
+
useEffect13(() => {
|
|
918
1009
|
const now = Date.now();
|
|
919
1010
|
const elapsed = now - lastUpdated.current;
|
|
920
1011
|
if (elapsed >= limit) {
|
|
@@ -961,7 +1052,7 @@ function useWindowSize() {
|
|
|
961
1052
|
import { usePreventScroll } from "@react-aria/overlays";
|
|
962
1053
|
|
|
963
1054
|
// src/hooks/platform/use-platform-config.ts
|
|
964
|
-
import { useState as useState14, useEffect as
|
|
1055
|
+
import { useState as useState14, useEffect as useEffect14 } from "react";
|
|
965
1056
|
|
|
966
1057
|
// src/utils/platform-config.tsx
|
|
967
1058
|
import { Globe } from "lucide-react";
|
|
@@ -1142,7 +1233,7 @@ function usePlatformConfig() {
|
|
|
1142
1233
|
const [platforms, setPlatforms] = useState14(platformCache || []);
|
|
1143
1234
|
const [isLoading, setIsLoading] = useState14(!platformCache);
|
|
1144
1235
|
const [error, setError] = useState14(null);
|
|
1145
|
-
|
|
1236
|
+
useEffect14(() => {
|
|
1146
1237
|
if (platformCache) {
|
|
1147
1238
|
setPlatforms(platformCache);
|
|
1148
1239
|
setIsLoading(false);
|
|
@@ -1591,7 +1682,7 @@ var useToast = () => ({
|
|
|
1591
1682
|
});
|
|
1592
1683
|
|
|
1593
1684
|
// src/hooks/use-contact-submission.ts
|
|
1594
|
-
import { useState as useState16, useCallback as
|
|
1685
|
+
import { useState as useState16, useCallback as useCallback9, useEffect as useEffect15 } from "react";
|
|
1595
1686
|
init_next_navigation();
|
|
1596
1687
|
|
|
1597
1688
|
// src/utils/local-storage-adapter.ts
|
|
@@ -1861,7 +1952,7 @@ function useContactSubmission(options = {}) {
|
|
|
1861
1952
|
const { contactUrl } = useRequiredEndpointsRuntime();
|
|
1862
1953
|
const [isSubmitting, setIsSubmitting] = useState16(false);
|
|
1863
1954
|
const [isSuccess, setIsSuccess] = useState16(false);
|
|
1864
|
-
const submit =
|
|
1955
|
+
const submit = useCallback9(async (formData) => {
|
|
1865
1956
|
if (isSubmitting) return;
|
|
1866
1957
|
setIsSubmitting(true);
|
|
1867
1958
|
try {
|
|
@@ -1896,7 +1987,7 @@ function useContactSubmission(options = {}) {
|
|
|
1896
1987
|
setIsSubmitting(false);
|
|
1897
1988
|
}
|
|
1898
1989
|
}, [isSubmitting, toast2, userId, successToastMessage, contactUrl]);
|
|
1899
|
-
|
|
1990
|
+
useEffect15(() => {
|
|
1900
1991
|
if (isSuccess && successRedirectUrl) {
|
|
1901
1992
|
console.log("\u{1F680} Contact submission successful, redirecting to:", successRedirectUrl);
|
|
1902
1993
|
const timer = setTimeout(() => {
|
|
@@ -1910,7 +2001,7 @@ function useContactSubmission(options = {}) {
|
|
|
1910
2001
|
return () => clearTimeout(timer);
|
|
1911
2002
|
}
|
|
1912
2003
|
}, [isSuccess, successRedirectUrl, router]);
|
|
1913
|
-
|
|
2004
|
+
useEffect15(() => {
|
|
1914
2005
|
if (isSuccess && onSuccess) {
|
|
1915
2006
|
onSuccess();
|
|
1916
2007
|
}
|
|
@@ -1919,19 +2010,19 @@ function useContactSubmission(options = {}) {
|
|
|
1919
2010
|
}
|
|
1920
2011
|
|
|
1921
2012
|
// src/hooks/use-quick-action-hint.ts
|
|
1922
|
-
import { useEffect as
|
|
2013
|
+
import { useEffect as useEffect16, useState as useState17, useRef as useRef9, useCallback as useCallback10 } from "react";
|
|
1923
2014
|
function useQuickActionHint({
|
|
1924
2015
|
actionCount,
|
|
1925
2016
|
cycleDuration = 5e3,
|
|
1926
2017
|
enabled = true
|
|
1927
2018
|
}) {
|
|
1928
2019
|
const [activeHintIndex, setActiveHintIndex] = useState17(-1);
|
|
1929
|
-
const containerRef =
|
|
1930
|
-
const timeoutRef =
|
|
1931
|
-
const cycleCountRef =
|
|
1932
|
-
const currentIndexRef =
|
|
1933
|
-
const sequenceRef =
|
|
1934
|
-
const shuffleIndices =
|
|
2020
|
+
const containerRef = useRef9(null);
|
|
2021
|
+
const timeoutRef = useRef9(null);
|
|
2022
|
+
const cycleCountRef = useRef9(0);
|
|
2023
|
+
const currentIndexRef = useRef9(0);
|
|
2024
|
+
const sequenceRef = useRef9([]);
|
|
2025
|
+
const shuffleIndices = useCallback10((length) => {
|
|
1935
2026
|
const indices = Array.from({ length }, (_, i) => i);
|
|
1936
2027
|
for (let i = indices.length - 1; i > 0; i--) {
|
|
1937
2028
|
const j = Math.floor(Math.random() * (i + 1));
|
|
@@ -1939,7 +2030,7 @@ function useQuickActionHint({
|
|
|
1939
2030
|
}
|
|
1940
2031
|
return indices;
|
|
1941
2032
|
}, []);
|
|
1942
|
-
const stopHint =
|
|
2033
|
+
const stopHint = useCallback10(() => {
|
|
1943
2034
|
if (timeoutRef.current) {
|
|
1944
2035
|
clearTimeout(timeoutRef.current);
|
|
1945
2036
|
timeoutRef.current = null;
|
|
@@ -1949,7 +2040,7 @@ function useQuickActionHint({
|
|
|
1949
2040
|
currentIndexRef.current = 0;
|
|
1950
2041
|
sequenceRef.current = [];
|
|
1951
2042
|
}, []);
|
|
1952
|
-
const advanceHint =
|
|
2043
|
+
const advanceHint = useCallback10(() => {
|
|
1953
2044
|
if (currentIndexRef.current === 0) {
|
|
1954
2045
|
sequenceRef.current = shuffleIndices(actionCount);
|
|
1955
2046
|
}
|
|
@@ -1962,7 +2053,7 @@ function useQuickActionHint({
|
|
|
1962
2053
|
}
|
|
1963
2054
|
timeoutRef.current = setTimeout(advanceHint, cycleDuration);
|
|
1964
2055
|
}, [actionCount, cycleDuration, shuffleIndices]);
|
|
1965
|
-
|
|
2056
|
+
useEffect16(() => {
|
|
1966
2057
|
if (!enabled || actionCount === 0) {
|
|
1967
2058
|
return;
|
|
1968
2059
|
}
|
|
@@ -1988,7 +2079,7 @@ function useQuickActionHint({
|
|
|
1988
2079
|
}
|
|
1989
2080
|
|
|
1990
2081
|
// src/hooks/use-copy-to-clipboard.ts
|
|
1991
|
-
import { useCallback as
|
|
2082
|
+
import { useCallback as useCallback11, useState as useState18 } from "react";
|
|
1992
2083
|
function useCopyToClipboard({
|
|
1993
2084
|
successTitle = "Copied",
|
|
1994
2085
|
successDescription = "Copied to clipboard",
|
|
@@ -1998,7 +2089,7 @@ function useCopyToClipboard({
|
|
|
1998
2089
|
} = {}) {
|
|
1999
2090
|
const { toast: toast2 } = useToast();
|
|
2000
2091
|
const [copied, setCopied] = useState18(false);
|
|
2001
|
-
const copy =
|
|
2092
|
+
const copy = useCallback11(
|
|
2002
2093
|
async (text) => {
|
|
2003
2094
|
try {
|
|
2004
2095
|
await navigator.clipboard.writeText(text);
|
|
@@ -2015,7 +2106,7 @@ function useCopyToClipboard({
|
|
|
2015
2106
|
}
|
|
2016
2107
|
|
|
2017
2108
|
// src/hooks/use-batch-images.ts
|
|
2018
|
-
import { useEffect as
|
|
2109
|
+
import { useEffect as useEffect17, useMemo as useMemo2, useState as useState19, useRef as useRef10 } from "react";
|
|
2019
2110
|
var globalBatchImageConfig = {};
|
|
2020
2111
|
function configureBatchImageFetch(config) {
|
|
2021
2112
|
globalBatchImageConfig = { ...globalBatchImageConfig, ...config };
|
|
@@ -2094,8 +2185,8 @@ function useBatchImages(imageUrls, config) {
|
|
|
2094
2185
|
() => Array.from(new Set(imageUrls.filter((url) => Boolean(url)))),
|
|
2095
2186
|
[imageUrls]
|
|
2096
2187
|
);
|
|
2097
|
-
const requestedUrls =
|
|
2098
|
-
|
|
2188
|
+
const requestedUrls = useRef10(/* @__PURE__ */ new Set());
|
|
2189
|
+
useEffect17(() => {
|
|
2099
2190
|
if (uniqueUrls.length === 0) {
|
|
2100
2191
|
setFetchedImages({});
|
|
2101
2192
|
return;
|
|
@@ -2125,7 +2216,7 @@ function useBatchImages(imageUrls, config) {
|
|
|
2125
2216
|
}
|
|
2126
2217
|
|
|
2127
2218
|
// src/hooks/use-authenticated-image.ts
|
|
2128
|
-
import { useEffect as
|
|
2219
|
+
import { useEffect as useEffect18, useState as useState20, useRef as useRef11 } from "react";
|
|
2129
2220
|
var globalImageConfig = {};
|
|
2130
2221
|
var imageCache = /* @__PURE__ */ new Map();
|
|
2131
2222
|
var pendingRequests = /* @__PURE__ */ new Map();
|
|
@@ -2157,8 +2248,8 @@ function useAuthenticatedImage(imageUrl, refreshKey, config) {
|
|
|
2157
2248
|
const [fetchedImageUrl, setFetchedImageUrl] = useState20();
|
|
2158
2249
|
const [isLoading, setIsLoading] = useState20(false);
|
|
2159
2250
|
const [error, setError] = useState20(null);
|
|
2160
|
-
const currentCacheKeyRef =
|
|
2161
|
-
|
|
2251
|
+
const currentCacheKeyRef = useRef11(null);
|
|
2252
|
+
useEffect18(() => {
|
|
2162
2253
|
if (!imageUrl) {
|
|
2163
2254
|
setFetchedImageUrl(void 0);
|
|
2164
2255
|
setIsLoading(false);
|
|
@@ -2269,7 +2360,7 @@ function useAuthenticatedImage(imageUrl, refreshKey, config) {
|
|
|
2269
2360
|
});
|
|
2270
2361
|
pendingRequests.set(cacheKey, fetchPromise2);
|
|
2271
2362
|
}, [imageUrl, refreshKey, config]);
|
|
2272
|
-
|
|
2363
|
+
useEffect18(() => {
|
|
2273
2364
|
return () => {
|
|
2274
2365
|
if (currentCacheKeyRef.current) {
|
|
2275
2366
|
const entry = imageCache.get(currentCacheKeyRef.current);
|
|
@@ -2284,7 +2375,7 @@ function useAuthenticatedImage(imageUrl, refreshKey, config) {
|
|
|
2284
2375
|
|
|
2285
2376
|
// src/hooks/state/use-query-params.ts
|
|
2286
2377
|
init_next_navigation();
|
|
2287
|
-
import { useEffect as
|
|
2378
|
+
import { useEffect as useEffect19, useState as useState21, useMemo as useMemo3, useCallback as useCallback12 } from "react";
|
|
2288
2379
|
|
|
2289
2380
|
// src/hooks/state/graphql-parser.ts
|
|
2290
2381
|
import {
|
|
@@ -2753,7 +2844,7 @@ function useQueryParams(query, options = {}) {
|
|
|
2753
2844
|
const defaultValues = options.defaultValues || {};
|
|
2754
2845
|
const skipIntrospection = options.skipIntrospection || false;
|
|
2755
2846
|
const debug = options.debug || false;
|
|
2756
|
-
|
|
2847
|
+
useEffect19(() => {
|
|
2757
2848
|
async function initialize() {
|
|
2758
2849
|
try {
|
|
2759
2850
|
if (debug) console.log("[useQueryParams] Initializing...");
|
|
@@ -2823,14 +2914,14 @@ function useQueryParams(query, options = {}) {
|
|
|
2823
2914
|
});
|
|
2824
2915
|
return result;
|
|
2825
2916
|
}, [searchParams]);
|
|
2826
|
-
const updateUrl =
|
|
2917
|
+
const updateUrl = useCallback12((newParams) => {
|
|
2827
2918
|
const url = newParams.toString() ? `?${newParams.toString()}` : window.location.pathname;
|
|
2828
2919
|
if (debug) {
|
|
2829
2920
|
console.log("[useQueryParams] Updating URL:", url);
|
|
2830
2921
|
}
|
|
2831
2922
|
router.replace(url, { scroll: false });
|
|
2832
2923
|
}, [router, debug]);
|
|
2833
|
-
const setParam =
|
|
2924
|
+
const setParam = useCallback12((key, value) => {
|
|
2834
2925
|
if (!isReady) {
|
|
2835
2926
|
console.warn("[useQueryParams] Schema not ready, cannot set param");
|
|
2836
2927
|
return;
|
|
@@ -2844,7 +2935,7 @@ function useQueryParams(query, options = {}) {
|
|
|
2844
2935
|
console.error("[useQueryParams] Failed to set param:", err);
|
|
2845
2936
|
}
|
|
2846
2937
|
}, [variables, schema, isReady, updateUrl]);
|
|
2847
|
-
const setParams =
|
|
2938
|
+
const setParams = useCallback12((updates) => {
|
|
2848
2939
|
if (!isReady) {
|
|
2849
2940
|
console.warn("[useQueryParams] Schema not ready, cannot set params");
|
|
2850
2941
|
return;
|
|
@@ -2858,7 +2949,7 @@ function useQueryParams(query, options = {}) {
|
|
|
2858
2949
|
console.error("[useQueryParams] Failed to set params:", err);
|
|
2859
2950
|
}
|
|
2860
2951
|
}, [variables, schema, isReady, updateUrl]);
|
|
2861
|
-
const clearParamsHandler =
|
|
2952
|
+
const clearParamsHandler = useCallback12((keys) => {
|
|
2862
2953
|
if (!isReady) {
|
|
2863
2954
|
console.warn("[useQueryParams] Schema not ready, cannot clear params");
|
|
2864
2955
|
return;
|
|
@@ -2872,7 +2963,7 @@ function useQueryParams(query, options = {}) {
|
|
|
2872
2963
|
console.error("[useQueryParams] Failed to clear params:", err);
|
|
2873
2964
|
}
|
|
2874
2965
|
}, [variables, schema, isReady, updateUrl]);
|
|
2875
|
-
const resetParams =
|
|
2966
|
+
const resetParams = useCallback12(() => {
|
|
2876
2967
|
if (debug) {
|
|
2877
2968
|
console.log("[useQueryParams] Resetting params");
|
|
2878
2969
|
}
|
|
@@ -2905,9 +2996,9 @@ function applyParamMapping(schema, mapping) {
|
|
|
2905
2996
|
|
|
2906
2997
|
// src/hooks/state/use-api-params.ts
|
|
2907
2998
|
init_next_navigation();
|
|
2908
|
-
import { useCallback as
|
|
2999
|
+
import { useCallback as useCallback13, useMemo as useMemo4, useRef as useRef12 } from "react";
|
|
2909
3000
|
function useContentStable(value, key) {
|
|
2910
|
-
const ref =
|
|
3001
|
+
const ref = useRef12(void 0);
|
|
2911
3002
|
if (ref.current && ref.current.key === key) return ref.current.value;
|
|
2912
3003
|
ref.current = { value, key };
|
|
2913
3004
|
return value;
|
|
@@ -2940,7 +3031,7 @@ function useApiParams(schema, options = {}) {
|
|
|
2940
3031
|
}
|
|
2941
3032
|
return flattened;
|
|
2942
3033
|
}, [schemaKey]);
|
|
2943
|
-
const prevParamsRef =
|
|
3034
|
+
const prevParamsRef = useRef12(void 0);
|
|
2944
3035
|
const params = useMemo4(() => {
|
|
2945
3036
|
const sp = new URLSearchParams(searchString);
|
|
2946
3037
|
const result = {};
|
|
@@ -2964,7 +3055,7 @@ function useApiParams(schema, options = {}) {
|
|
|
2964
3055
|
prevParamsRef.current = result;
|
|
2965
3056
|
return result;
|
|
2966
3057
|
}, [searchString, schemaKey, debug]);
|
|
2967
|
-
const addParamToSearchParams =
|
|
3058
|
+
const addParamToSearchParams = useCallback13((searchParams, key, value) => {
|
|
2968
3059
|
if (value === void 0 || value === "" || value === null) {
|
|
2969
3060
|
return;
|
|
2970
3061
|
}
|
|
@@ -2992,7 +3083,7 @@ function useApiParams(schema, options = {}) {
|
|
|
2992
3083
|
}
|
|
2993
3084
|
return newParams;
|
|
2994
3085
|
}, [params, schemaKey, flattenedSchema, addParamToSearchParams]);
|
|
2995
|
-
const updateUrl =
|
|
3086
|
+
const updateUrl = useCallback13((newParams, keysToRemove = []) => {
|
|
2996
3087
|
const finalParams = new URLSearchParams(searchString);
|
|
2997
3088
|
keysToRemove.forEach((key) => {
|
|
2998
3089
|
if (key in stableSchema) {
|
|
@@ -3028,7 +3119,7 @@ function useApiParams(schema, options = {}) {
|
|
|
3028
3119
|
}
|
|
3029
3120
|
return false;
|
|
3030
3121
|
};
|
|
3031
|
-
const setParam =
|
|
3122
|
+
const setParam = useCallback13((key, value) => {
|
|
3032
3123
|
const config = stableSchema[key];
|
|
3033
3124
|
if (!config) {
|
|
3034
3125
|
console.warn(`[useApiParams] Unknown parameter: ${key}`);
|
|
@@ -3042,7 +3133,7 @@ function useApiParams(schema, options = {}) {
|
|
|
3042
3133
|
updateUrl(newParams);
|
|
3043
3134
|
}
|
|
3044
3135
|
}, [schemaKey, updateUrl, addParamToSearchParams]);
|
|
3045
|
-
const setParams =
|
|
3136
|
+
const setParams = useCallback13((updates) => {
|
|
3046
3137
|
const newParams = new URLSearchParams();
|
|
3047
3138
|
const keysToRemove = [];
|
|
3048
3139
|
for (const [key, value] of Object.entries(updates)) {
|
|
@@ -3059,11 +3150,11 @@ function useApiParams(schema, options = {}) {
|
|
|
3059
3150
|
}
|
|
3060
3151
|
updateUrl(newParams, keysToRemove);
|
|
3061
3152
|
}, [schemaKey, updateUrl, addParamToSearchParams]);
|
|
3062
|
-
const clearParams2 =
|
|
3153
|
+
const clearParams2 = useCallback13((keys) => {
|
|
3063
3154
|
const newParams = new URLSearchParams();
|
|
3064
3155
|
updateUrl(newParams, keys);
|
|
3065
3156
|
}, [updateUrl]);
|
|
3066
|
-
const resetParams =
|
|
3157
|
+
const resetParams = useCallback13(() => {
|
|
3067
3158
|
if (debug) {
|
|
3068
3159
|
console.log("[useApiParams] Resetting params");
|
|
3069
3160
|
}
|
|
@@ -3100,7 +3191,7 @@ function createSearchParams(params) {
|
|
|
3100
3191
|
}
|
|
3101
3192
|
|
|
3102
3193
|
// src/hooks/state/use-cursor-pagination-state.ts
|
|
3103
|
-
import { useCallback as
|
|
3194
|
+
import { useCallback as useCallback14, useEffect as useEffect20, useRef as useRef13, useState as useState22 } from "react";
|
|
3104
3195
|
var urlSchema = {
|
|
3105
3196
|
search: { type: "string", default: "" },
|
|
3106
3197
|
cursor: { type: "string", default: "" }
|
|
@@ -3114,10 +3205,10 @@ function useCursorPaginationState(options) {
|
|
|
3114
3205
|
const [searchInput, setSearchInput] = useState22(params.search || "");
|
|
3115
3206
|
const [hasLoadedBeyondFirst, setHasLoadedBeyondFirst] = useState22(false);
|
|
3116
3207
|
const [initialLoadCount, setInitialLoadCount] = useState22(0);
|
|
3117
|
-
const lastSearchRef =
|
|
3118
|
-
const isSyncingFromUrl =
|
|
3119
|
-
const isInitialLoadInProgress =
|
|
3120
|
-
|
|
3208
|
+
const lastSearchRef = useRef13(null);
|
|
3209
|
+
const isSyncingFromUrl = useRef13(false);
|
|
3210
|
+
const isInitialLoadInProgress = useRef13(true);
|
|
3211
|
+
useEffect20(() => {
|
|
3121
3212
|
if (isInitialLoadInProgress.current) return;
|
|
3122
3213
|
const urlSearch = params.search || "";
|
|
3123
3214
|
if (urlSearch !== searchInput) {
|
|
@@ -3128,7 +3219,7 @@ function useCursorPaginationState(options) {
|
|
|
3128
3219
|
}, 0);
|
|
3129
3220
|
}
|
|
3130
3221
|
}, [params.search, initialLoadCount]);
|
|
3131
|
-
|
|
3222
|
+
useEffect20(() => {
|
|
3132
3223
|
if (isInitialLoadInProgress.current) return;
|
|
3133
3224
|
if (isSyncingFromUrl.current) return;
|
|
3134
3225
|
if (searchInput !== params.search) {
|
|
@@ -3139,7 +3230,7 @@ function useCursorPaginationState(options) {
|
|
|
3139
3230
|
});
|
|
3140
3231
|
}
|
|
3141
3232
|
}, [searchInput, params.search, setParams, initialLoadCount]);
|
|
3142
|
-
|
|
3233
|
+
useEffect20(() => {
|
|
3143
3234
|
if (initialLoadCount === 0) {
|
|
3144
3235
|
const cursor = params.cursor || null;
|
|
3145
3236
|
const search = params.search || "";
|
|
@@ -3153,7 +3244,7 @@ function useCursorPaginationState(options) {
|
|
|
3153
3244
|
});
|
|
3154
3245
|
}
|
|
3155
3246
|
}, []);
|
|
3156
|
-
|
|
3247
|
+
useEffect20(() => {
|
|
3157
3248
|
if (isInitialLoadInProgress.current) return;
|
|
3158
3249
|
if (initialLoadCount === 0) return;
|
|
3159
3250
|
const currentSearch = params.search || "";
|
|
@@ -3163,7 +3254,7 @@ function useCursorPaginationState(options) {
|
|
|
3163
3254
|
onSearchChange(currentSearch);
|
|
3164
3255
|
}
|
|
3165
3256
|
}, [params.search, onSearchChange, initialLoadCount]);
|
|
3166
|
-
const handleNextPage =
|
|
3257
|
+
const handleNextPage = useCallback14(
|
|
3167
3258
|
async (endCursor, fetchFn) => {
|
|
3168
3259
|
setParam("cursor", endCursor);
|
|
3169
3260
|
await fetchFn();
|
|
@@ -3171,7 +3262,7 @@ function useCursorPaginationState(options) {
|
|
|
3171
3262
|
},
|
|
3172
3263
|
[setParam]
|
|
3173
3264
|
);
|
|
3174
|
-
const handleResetToFirstPage =
|
|
3265
|
+
const handleResetToFirstPage = useCallback14(
|
|
3175
3266
|
async (fetchFn) => {
|
|
3176
3267
|
setParam("cursor", "");
|
|
3177
3268
|
await fetchFn();
|
|
@@ -3193,7 +3284,7 @@ function useCursorPaginationState(options) {
|
|
|
3193
3284
|
}
|
|
3194
3285
|
|
|
3195
3286
|
// src/hooks/nats/use-nats-client.ts
|
|
3196
|
-
import { useEffect as
|
|
3287
|
+
import { useEffect as useEffect21, useMemo as useMemo5, useState as useState23 } from "react";
|
|
3197
3288
|
function useNatsClient(clientOptions, options = {}) {
|
|
3198
3289
|
const { autoConnect = true } = options;
|
|
3199
3290
|
const client = useMemo5(() => {
|
|
@@ -3202,7 +3293,7 @@ function useNatsClient(clientOptions, options = {}) {
|
|
|
3202
3293
|
}, [clientOptions]);
|
|
3203
3294
|
const [status, setStatus] = useState23("disconnected");
|
|
3204
3295
|
const [lastError, setLastError] = useState23(null);
|
|
3205
|
-
|
|
3296
|
+
useEffect21(() => {
|
|
3206
3297
|
if (!client) {
|
|
3207
3298
|
setStatus("disconnected");
|
|
3208
3299
|
setLastError(null);
|
|
@@ -3233,7 +3324,7 @@ function useNatsClient(clientOptions, options = {}) {
|
|
|
3233
3324
|
}
|
|
3234
3325
|
|
|
3235
3326
|
// src/hooks/use-near-viewport.ts
|
|
3236
|
-
import { useEffect as
|
|
3327
|
+
import { useEffect as useEffect22, useRef as useRef14, useState as useState24, useCallback as useCallback15 } from "react";
|
|
3237
3328
|
var observers = /* @__PURE__ */ new Map();
|
|
3238
3329
|
var subscribers = /* @__PURE__ */ new WeakMap();
|
|
3239
3330
|
function getObserverFor(rootMargin) {
|
|
@@ -3259,8 +3350,8 @@ function getObserverFor(rootMargin) {
|
|
|
3259
3350
|
var NEAR_VIEWPORT_ROOT_MARGIN = "500px";
|
|
3260
3351
|
function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN) {
|
|
3261
3352
|
const [isNear, setIsNear] = useState24(false);
|
|
3262
|
-
const elRef =
|
|
3263
|
-
const ref =
|
|
3353
|
+
const elRef = useRef14(null);
|
|
3354
|
+
const ref = useCallback15(
|
|
3264
3355
|
(node) => {
|
|
3265
3356
|
const prev = elRef.current;
|
|
3266
3357
|
if (prev) {
|
|
@@ -3278,7 +3369,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN) {
|
|
|
3278
3369
|
},
|
|
3279
3370
|
[rootMargin]
|
|
3280
3371
|
);
|
|
3281
|
-
|
|
3372
|
+
useEffect22(() => {
|
|
3282
3373
|
return () => {
|
|
3283
3374
|
const el = elRef.current;
|
|
3284
3375
|
if (!el) return;
|
|
@@ -3436,7 +3527,7 @@ function useOgPlaceholderUrl({
|
|
|
3436
3527
|
}
|
|
3437
3528
|
|
|
3438
3529
|
// src/hooks/use-scroll-to-hash.ts
|
|
3439
|
-
import { useEffect as
|
|
3530
|
+
import { useEffect as useEffect23 } from "react";
|
|
3440
3531
|
|
|
3441
3532
|
// src/utils/scroll-into-view.ts
|
|
3442
3533
|
var activeRaf = 0;
|
|
@@ -3574,7 +3665,7 @@ function navigateSamePageHash(target, options = {}) {
|
|
|
3574
3665
|
var MAX_POLL_FRAMES = 60;
|
|
3575
3666
|
function useScrollToHash(readyDep = true, options) {
|
|
3576
3667
|
const headerOffset = options?.headerOffset ?? 0;
|
|
3577
|
-
|
|
3668
|
+
useEffect23(() => {
|
|
3578
3669
|
if (typeof window === "undefined") return;
|
|
3579
3670
|
if (readyDep === null || readyDep === false) return;
|
|
3580
3671
|
let rafId = null;
|
|
@@ -3614,7 +3705,7 @@ function useScrollToHash(readyDep = true, options) {
|
|
|
3614
3705
|
}
|
|
3615
3706
|
|
|
3616
3707
|
// src/hooks/use-humanity-signals.ts
|
|
3617
|
-
import { useCallback as
|
|
3708
|
+
import { useCallback as useCallback16, useRef as useRef15 } from "react";
|
|
3618
3709
|
|
|
3619
3710
|
// src/utils/humanity-signals.ts
|
|
3620
3711
|
var HONEYPOT_FIELD = "contact_url_confirm";
|
|
@@ -3638,16 +3729,16 @@ var splitCsvEnv = (s) => s?.split(",").map((t) => t.trim()).filter(Boolean) ?? [
|
|
|
3638
3729
|
|
|
3639
3730
|
// src/hooks/use-humanity-signals.ts
|
|
3640
3731
|
function useHumanitySignals() {
|
|
3641
|
-
const ref =
|
|
3642
|
-
const mountedAt =
|
|
3643
|
-
const getSignals =
|
|
3732
|
+
const ref = useRef15(null);
|
|
3733
|
+
const mountedAt = useRef15(typeof performance !== "undefined" ? performance.now() : 0);
|
|
3734
|
+
const getSignals = useCallback16(
|
|
3644
3735
|
() => ({
|
|
3645
3736
|
[HONEYPOT_FIELD]: ref.current?.value ?? "",
|
|
3646
3737
|
[ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - mountedAt.current) : 0
|
|
3647
3738
|
}),
|
|
3648
3739
|
[]
|
|
3649
3740
|
);
|
|
3650
|
-
const resetSignals =
|
|
3741
|
+
const resetSignals = useCallback16(() => {
|
|
3651
3742
|
if (ref.current) ref.current.value = "";
|
|
3652
3743
|
if (typeof performance !== "undefined") mountedAt.current = performance.now();
|
|
3653
3744
|
}, []);
|
|
@@ -3663,6 +3754,7 @@ export {
|
|
|
3663
3754
|
useHorizontalScrollbar,
|
|
3664
3755
|
useImageEdgeColor,
|
|
3665
3756
|
useLocalStorage,
|
|
3757
|
+
useMarqueeEngine,
|
|
3666
3758
|
useMediaQuery,
|
|
3667
3759
|
breakpoints,
|
|
3668
3760
|
useSmUp,
|
|
@@ -3672,6 +3764,7 @@ export {
|
|
|
3672
3764
|
useNotificationPermission,
|
|
3673
3765
|
useOnboardingState,
|
|
3674
3766
|
useSearch,
|
|
3767
|
+
useSuppressCloneFocus,
|
|
3675
3768
|
useTablePagination,
|
|
3676
3769
|
useThrottle,
|
|
3677
3770
|
useWindowSize,
|
|
@@ -3771,4 +3864,4 @@ export {
|
|
|
3771
3864
|
splitCsvEnv,
|
|
3772
3865
|
useHumanitySignals
|
|
3773
3866
|
};
|
|
3774
|
-
//# sourceMappingURL=chunk-
|
|
3867
|
+
//# sourceMappingURL=chunk-MLFFBQ5B.js.map
|