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