@flamingo-stack/openframe-frontend-core 0.0.454 → 0.0.455-snapshot.20260719161719

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 (163) hide show
  1. package/dist/{chunk-UGFB5EAW.js → chunk-2I3GN7WW.js} +4 -4
  2. package/dist/{chunk-44AD5D3C.cjs → chunk-6K6LAD6H.cjs} +18 -18
  3. package/dist/{chunk-44AD5D3C.cjs.map → chunk-6K6LAD6H.cjs.map} +1 -1
  4. package/dist/{chunk-UPRY4I63.cjs → chunk-6TI3DCOG.cjs} +3 -3
  5. package/dist/{chunk-UPRY4I63.cjs.map → chunk-6TI3DCOG.cjs.map} +1 -1
  6. package/dist/{chunk-YAZIVPUF.cjs → chunk-A7FTNFBX.cjs} +73 -73
  7. package/dist/{chunk-YAZIVPUF.cjs.map → chunk-A7FTNFBX.cjs.map} +1 -1
  8. package/dist/{chunk-YJ7SPS7I.js → chunk-DAEKUR3J.js} +2 -2
  9. package/dist/{chunk-PT233TJV.js → chunk-DU6R7XNU.js} +2 -2
  10. package/dist/{chunk-OZZ4VQ52.cjs → chunk-DYBATZJP.cjs} +5 -5
  11. package/dist/{chunk-OZZ4VQ52.cjs.map → chunk-DYBATZJP.cjs.map} +1 -1
  12. package/dist/{chunk-PB24PKG2.cjs → chunk-F2CCUPKC.cjs} +29 -29
  13. package/dist/{chunk-PB24PKG2.cjs.map → chunk-F2CCUPKC.cjs.map} +1 -1
  14. package/dist/{chunk-OGKDOG5D.js → chunk-F3IBBAKV.js} +2 -2
  15. package/dist/{chunk-IM5A5F2E.cjs → chunk-GC63K4VD.cjs} +73 -73
  16. package/dist/{chunk-IM5A5F2E.cjs.map → chunk-GC63K4VD.cjs.map} +1 -1
  17. package/dist/{chunk-N2UFIQAD.cjs → chunk-GQZGCMRF.cjs} +7 -7
  18. package/dist/{chunk-N2UFIQAD.cjs.map → chunk-GQZGCMRF.cjs.map} +1 -1
  19. package/dist/{chunk-EQWE64RJ.js → chunk-ILUX3DXS.js} +2 -2
  20. package/dist/{chunk-NUT3HRKS.cjs → chunk-INH6SIP5.cjs} +12 -12
  21. package/dist/{chunk-NUT3HRKS.cjs.map → chunk-INH6SIP5.cjs.map} +1 -1
  22. package/dist/{chunk-QF3NQW7C.cjs → chunk-IOHQJOLR.cjs} +35 -81
  23. package/dist/chunk-IOHQJOLR.cjs.map +1 -0
  24. package/dist/{chunk-TMST2WFZ.js → chunk-JHIT44TA.js} +3 -3
  25. package/dist/{chunk-ACUD4XVZ.cjs → chunk-KH5VTGCS.cjs} +40 -40
  26. package/dist/{chunk-ACUD4XVZ.cjs.map → chunk-KH5VTGCS.cjs.map} +1 -1
  27. package/dist/{chunk-MX2ITMKK.js → chunk-LAFCXJVT.js} +5 -5
  28. package/dist/{chunk-55ISAJFV.js → chunk-LMBPJAQ2.js} +6 -6
  29. package/dist/{chunk-MLFFBQ5B.js → chunk-MK2YWJAA.js} +98 -144
  30. package/dist/chunk-MK2YWJAA.js.map +1 -0
  31. package/dist/{chunk-5HQV2F5K.cjs → chunk-TXS2AMFV.cjs} +32 -32
  32. package/dist/{chunk-5HQV2F5K.cjs.map → chunk-TXS2AMFV.cjs.map} +1 -1
  33. package/dist/{chunk-GOWE4WSU.js → chunk-U27TXTAK.js} +6 -6
  34. package/dist/{chunk-UOTHXOCS.js → chunk-UEKCD6WV.js} +5539 -5559
  35. package/dist/chunk-UEKCD6WV.js.map +1 -0
  36. package/dist/{chunk-XH33VG5A.cjs → chunk-UHVVNVUE.cjs} +40 -40
  37. package/dist/{chunk-XH33VG5A.cjs.map → chunk-UHVVNVUE.cjs.map} +1 -1
  38. package/dist/{chunk-AJAF456I.js → chunk-UXKSOJR7.js} +3 -3
  39. package/dist/{chunk-WLUIXASU.cjs → chunk-VZNJ3RYI.cjs} +15 -15
  40. package/dist/{chunk-WLUIXASU.cjs.map → chunk-VZNJ3RYI.cjs.map} +1 -1
  41. package/dist/{chunk-YED55PQY.js → chunk-YLTY4Z4B.js} +3 -3
  42. package/dist/{chunk-72VDY6MM.cjs → chunk-YMGOTPY7.cjs} +1431 -1451
  43. package/dist/chunk-YMGOTPY7.cjs.map +1 -0
  44. package/dist/{chunk-JUNKHNWE.js → chunk-ZQHGSR3H.js} +5 -5
  45. package/dist/components/case-studies/index.cjs +9 -9
  46. package/dist/components/case-studies/index.js +3 -3
  47. package/dist/components/chat/chat-message-list.d.ts.map +1 -1
  48. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  49. package/dist/components/chat/guide-welcome.d.ts.map +1 -1
  50. package/dist/components/chat/index.cjs +3 -9
  51. package/dist/components/chat/index.cjs.map +1 -1
  52. package/dist/components/chat/index.d.ts +0 -2
  53. package/dist/components/chat/index.d.ts.map +1 -1
  54. package/dist/components/chat/index.js +2 -8
  55. package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
  56. package/dist/components/chat/quick-action-chip.d.ts +48 -0
  57. package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
  58. package/dist/components/chat/quick-action-marquee.d.ts.map +1 -1
  59. package/dist/components/chat/quick-action-wall.d.ts +6 -3
  60. package/dist/components/chat/quick-action-wall.d.ts.map +1 -1
  61. package/dist/components/chat/types/component.types.d.ts +17 -12
  62. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  63. package/dist/components/contact/index.cjs +4 -4
  64. package/dist/components/contact/index.js +3 -3
  65. package/dist/components/docs/index.cjs +6 -6
  66. package/dist/components/docs/index.js +5 -5
  67. package/dist/components/embeds/index.cjs +4 -4
  68. package/dist/components/embeds/index.js +3 -3
  69. package/dist/components/faq/index.cjs +5 -5
  70. package/dist/components/faq/index.js +4 -4
  71. package/dist/components/features/cards-strip.d.ts.map +1 -1
  72. package/dist/components/features/index.cjs +3 -3
  73. package/dist/components/features/index.js +2 -2
  74. package/dist/components/help-center-pages/index.cjs +22 -22
  75. package/dist/components/help-center-pages/index.js +13 -13
  76. package/dist/components/index.cjs +135 -141
  77. package/dist/components/index.cjs.map +1 -1
  78. package/dist/components/index.js +11 -17
  79. package/dist/components/index.js.map +1 -1
  80. package/dist/components/navigation/index.cjs +3 -3
  81. package/dist/components/navigation/index.js +2 -2
  82. package/dist/components/onboarding-guides/index.cjs +7 -7
  83. package/dist/components/onboarding-guides/index.js +6 -6
  84. package/dist/components/related-content/index.cjs +5 -5
  85. package/dist/components/related-content/index.js +4 -4
  86. package/dist/components/tickets/index.cjs +6 -6
  87. package/dist/components/tickets/index.js +5 -5
  88. package/dist/components/ui/index.cjs +3 -9
  89. package/dist/components/ui/index.cjs.map +1 -1
  90. package/dist/components/ui/index.js +2 -8
  91. package/dist/components/ui/marquee-wall.d.ts +8 -1
  92. package/dist/components/ui/marquee-wall.d.ts.map +1 -1
  93. package/dist/hooks/index.cjs +2 -2
  94. package/dist/hooks/index.cjs.map +1 -1
  95. package/dist/hooks/index.d.ts +0 -1
  96. package/dist/hooks/index.d.ts.map +1 -1
  97. package/dist/hooks/index.js +3 -3
  98. package/dist/hooks/ui/index.d.ts +1 -0
  99. package/dist/hooks/ui/index.d.ts.map +1 -1
  100. package/dist/hooks/ui/use-reset-on-page-hidden.d.ts +19 -0
  101. package/dist/hooks/ui/use-reset-on-page-hidden.d.ts.map +1 -0
  102. package/dist/hooks/use-near-viewport.d.ts +3 -1
  103. package/dist/hooks/use-near-viewport.d.ts.map +1 -1
  104. package/dist/index.cjs +3 -9
  105. package/dist/index.cjs.map +1 -1
  106. package/dist/index.js +4 -10
  107. package/package.json +1 -1
  108. package/src/components/chat/approval-request-message.tsx +1 -1
  109. package/src/components/chat/chat-context-picker.tsx +1 -1
  110. package/src/components/chat/chat-input.tsx +1 -1
  111. package/src/components/chat/chat-message-list.tsx +47 -0
  112. package/src/components/chat/chat-message-skeleton.tsx +1 -1
  113. package/src/components/chat/chat-sidebar-skeleton.tsx +1 -1
  114. package/src/components/chat/chat-sidebar.tsx +2 -2
  115. package/src/components/chat/chat-ticket-list.tsx +1 -1
  116. package/src/components/chat/context-items-list.tsx +1 -1
  117. package/src/components/chat/embeddable-chat.tsx +46 -6
  118. package/src/components/chat/guide-welcome.tsx +24 -14
  119. package/src/components/chat/index.ts +0 -2
  120. package/src/components/chat/mingo-chat-history.tsx +1 -1
  121. package/src/components/chat/mingo-welcome.tsx +42 -27
  122. package/src/components/chat/quick-action-chip.tsx +77 -0
  123. package/src/components/chat/quick-action-marquee.tsx +1 -2
  124. package/src/components/chat/quick-action-wall.tsx +13 -4
  125. package/src/components/chat/slash-command-suggestions.tsx +1 -1
  126. package/src/components/chat/tool-call-blocks.tsx +1 -1
  127. package/src/components/chat/types/component.types.ts +17 -15
  128. package/src/components/features/cards-strip.tsx +16 -0
  129. package/src/components/ui/marquee-wall.tsx +160 -10
  130. package/src/hooks/.index.md +0 -1
  131. package/src/hooks/index.ts +0 -1
  132. package/src/hooks/ui/index.ts +1 -0
  133. package/src/hooks/ui/use-reset-on-page-hidden.ts +32 -0
  134. package/src/hooks/use-near-viewport.ts +36 -12
  135. package/src/stories/ChatContainer.stories.tsx +15 -12
  136. package/src/stories/QuickActionWall.stories.tsx +1 -2
  137. package/dist/chunk-72VDY6MM.cjs.map +0 -1
  138. package/dist/chunk-MLFFBQ5B.js.map +0 -1
  139. package/dist/chunk-QF3NQW7C.cjs.map +0 -1
  140. package/dist/chunk-UOTHXOCS.js.map +0 -1
  141. package/dist/components/chat/chat-quick-action-row.d.ts +0 -84
  142. package/dist/components/chat/chat-quick-action-row.d.ts.map +0 -1
  143. package/dist/components/chat/chat-quick-action.d.ts +0 -11
  144. package/dist/components/chat/chat-quick-action.d.ts.map +0 -1
  145. package/dist/hooks/use-quick-action-hint.d.ts +0 -25
  146. package/dist/hooks/use-quick-action-hint.d.ts.map +0 -1
  147. package/src/components/chat/.chat-quick-action.md +0 -46
  148. package/src/components/chat/chat-quick-action-row.tsx +0 -282
  149. package/src/components/chat/chat-quick-action.tsx +0 -59
  150. package/src/hooks/.use-quick-action-hint.md +0 -43
  151. package/src/hooks/use-quick-action-hint.ts +0 -126
  152. /package/dist/{chunk-UGFB5EAW.js.map → chunk-2I3GN7WW.js.map} +0 -0
  153. /package/dist/{chunk-YJ7SPS7I.js.map → chunk-DAEKUR3J.js.map} +0 -0
  154. /package/dist/{chunk-PT233TJV.js.map → chunk-DU6R7XNU.js.map} +0 -0
  155. /package/dist/{chunk-OGKDOG5D.js.map → chunk-F3IBBAKV.js.map} +0 -0
  156. /package/dist/{chunk-EQWE64RJ.js.map → chunk-ILUX3DXS.js.map} +0 -0
  157. /package/dist/{chunk-TMST2WFZ.js.map → chunk-JHIT44TA.js.map} +0 -0
  158. /package/dist/{chunk-MX2ITMKK.js.map → chunk-LAFCXJVT.js.map} +0 -0
  159. /package/dist/{chunk-55ISAJFV.js.map → chunk-LMBPJAQ2.js.map} +0 -0
  160. /package/dist/{chunk-GOWE4WSU.js.map → chunk-U27TXTAK.js.map} +0 -0
  161. /package/dist/{chunk-AJAF456I.js.map → chunk-UXKSOJR7.js.map} +0 -0
  162. /package/dist/{chunk-YED55PQY.js.map → chunk-YLTY4Z4B.js.map} +0 -0
  163. /package/dist/{chunk-JUNKHNWE.js.map → chunk-ZQHGSR3H.js.map} +0 -0
@@ -889,8 +889,24 @@ function useOnboardingState(storageKey = "openframe-onboarding-state") {
889
889
  };
890
890
  }
891
891
 
892
+ // src/hooks/ui/use-reset-on-page-hidden.ts
893
+ import { useEffect as useEffect11 } from "react";
894
+ function useResetOnPageHidden(reset) {
895
+ useEffect11(() => {
896
+ const onVisibility = () => {
897
+ if (document.visibilityState === "hidden") reset();
898
+ };
899
+ window.addEventListener("blur", reset);
900
+ document.addEventListener("visibilitychange", onVisibility);
901
+ return () => {
902
+ window.removeEventListener("blur", reset);
903
+ document.removeEventListener("visibilitychange", onVisibility);
904
+ };
905
+ }, [reset]);
906
+ }
907
+
892
908
  // src/hooks/ui/use-search.ts
893
- import { useState as useState11, useEffect as useEffect11, useCallback as useCallback8 } from "react";
909
+ import { useState as useState11, useEffect as useEffect12, useCallback as useCallback8 } from "react";
894
910
  function useSearch(config) {
895
911
  const { searchFn, mapResult, debounceMs = 300, minQueryLength = 2 } = config;
896
912
  const [query, setQuery] = useState11("");
@@ -902,7 +918,7 @@ function useSearch(config) {
902
918
  setResults([]);
903
919
  setError(null);
904
920
  }, []);
905
- useEffect11(() => {
921
+ useEffect12(() => {
906
922
  if (!debouncedQuery || debouncedQuery.length < minQueryLength) {
907
923
  setResults([]);
908
924
  setIsLoading(false);
@@ -938,11 +954,11 @@ function useSearch(config) {
938
954
  }
939
955
 
940
956
  // src/hooks/ui/use-suppress-clone-focus.ts
941
- import { useEffect as useEffect12, useRef as useRef7 } from "react";
957
+ import { useEffect as useEffect13, useRef as useRef7 } from "react";
942
958
  var CLONE_FOCUSABLE_SELECTOR = 'a[href],button,input,select,textarea,iframe,summary,audio[controls],video[controls],[tabindex],[contenteditable]:not([contenteditable="false"])';
943
959
  function useSuppressCloneFocus(active) {
944
960
  const ref = useRef7(null);
945
- useEffect12(() => {
961
+ useEffect13(() => {
946
962
  const root = ref.current;
947
963
  if (!root || !active) return;
948
964
  const suppress = () => {
@@ -1001,11 +1017,11 @@ function useTablePagination(config) {
1001
1017
  }
1002
1018
 
1003
1019
  // src/hooks/ui/use-throttle.ts
1004
- import { useState as useState12, useEffect as useEffect13, useRef as useRef8 } from "react";
1020
+ import { useState as useState12, useEffect as useEffect14, useRef as useRef8 } from "react";
1005
1021
  function useThrottle(value, limit = 200) {
1006
1022
  const [throttledValue, setThrottledValue] = useState12(value);
1007
1023
  const lastUpdated = useRef8(Date.now());
1008
- useEffect13(() => {
1024
+ useEffect14(() => {
1009
1025
  const now = Date.now();
1010
1026
  const elapsed = now - lastUpdated.current;
1011
1027
  if (elapsed >= limit) {
@@ -1052,7 +1068,7 @@ function useWindowSize() {
1052
1068
  import { usePreventScroll } from "@react-aria/overlays";
1053
1069
 
1054
1070
  // src/hooks/platform/use-platform-config.ts
1055
- import { useState as useState14, useEffect as useEffect14 } from "react";
1071
+ import { useState as useState14, useEffect as useEffect15 } from "react";
1056
1072
 
1057
1073
  // src/utils/platform-config.tsx
1058
1074
  import { Globe } from "lucide-react";
@@ -1233,7 +1249,7 @@ function usePlatformConfig() {
1233
1249
  const [platforms, setPlatforms] = useState14(platformCache || []);
1234
1250
  const [isLoading, setIsLoading] = useState14(!platformCache);
1235
1251
  const [error, setError] = useState14(null);
1236
- useEffect14(() => {
1252
+ useEffect15(() => {
1237
1253
  if (platformCache) {
1238
1254
  setPlatforms(platformCache);
1239
1255
  setIsLoading(false);
@@ -1682,7 +1698,7 @@ var useToast = () => ({
1682
1698
  });
1683
1699
 
1684
1700
  // src/hooks/use-contact-submission.ts
1685
- import { useState as useState16, useCallback as useCallback9, useEffect as useEffect15 } from "react";
1701
+ import { useState as useState16, useCallback as useCallback9, useEffect as useEffect16 } from "react";
1686
1702
  init_next_navigation();
1687
1703
 
1688
1704
  // src/utils/local-storage-adapter.ts
@@ -1987,7 +2003,7 @@ function useContactSubmission(options = {}) {
1987
2003
  setIsSubmitting(false);
1988
2004
  }
1989
2005
  }, [isSubmitting, toast2, userId, successToastMessage, contactUrl]);
1990
- useEffect15(() => {
2006
+ useEffect16(() => {
1991
2007
  if (isSuccess && successRedirectUrl) {
1992
2008
  console.log("\u{1F680} Contact submission successful, redirecting to:", successRedirectUrl);
1993
2009
  const timer = setTimeout(() => {
@@ -2001,7 +2017,7 @@ function useContactSubmission(options = {}) {
2001
2017
  return () => clearTimeout(timer);
2002
2018
  }
2003
2019
  }, [isSuccess, successRedirectUrl, router]);
2004
- useEffect15(() => {
2020
+ useEffect16(() => {
2005
2021
  if (isSuccess && onSuccess) {
2006
2022
  onSuccess();
2007
2023
  }
@@ -2009,77 +2025,8 @@ function useContactSubmission(options = {}) {
2009
2025
  return { submit, isSubmitting, isSuccess, setIsSuccess };
2010
2026
  }
2011
2027
 
2012
- // src/hooks/use-quick-action-hint.ts
2013
- import { useEffect as useEffect16, useState as useState17, useRef as useRef9, useCallback as useCallback10 } from "react";
2014
- function useQuickActionHint({
2015
- actionCount,
2016
- cycleDuration = 5e3,
2017
- enabled = true
2018
- }) {
2019
- const [activeHintIndex, setActiveHintIndex] = useState17(-1);
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) => {
2026
- const indices = Array.from({ length }, (_, i) => i);
2027
- for (let i = indices.length - 1; i > 0; i--) {
2028
- const j = Math.floor(Math.random() * (i + 1));
2029
- [indices[i], indices[j]] = [indices[j], indices[i]];
2030
- }
2031
- return indices;
2032
- }, []);
2033
- const stopHint = useCallback10(() => {
2034
- if (timeoutRef.current) {
2035
- clearTimeout(timeoutRef.current);
2036
- timeoutRef.current = null;
2037
- }
2038
- setActiveHintIndex(-1);
2039
- cycleCountRef.current = 0;
2040
- currentIndexRef.current = 0;
2041
- sequenceRef.current = [];
2042
- }, []);
2043
- const advanceHint = useCallback10(() => {
2044
- if (currentIndexRef.current === 0) {
2045
- sequenceRef.current = shuffleIndices(actionCount);
2046
- }
2047
- const nextIndex = sequenceRef.current[currentIndexRef.current];
2048
- setActiveHintIndex(nextIndex);
2049
- currentIndexRef.current++;
2050
- if (currentIndexRef.current >= actionCount) {
2051
- currentIndexRef.current = 0;
2052
- cycleCountRef.current++;
2053
- }
2054
- timeoutRef.current = setTimeout(advanceHint, cycleDuration);
2055
- }, [actionCount, cycleDuration, shuffleIndices]);
2056
- useEffect16(() => {
2057
- if (!enabled || actionCount === 0) {
2058
- return;
2059
- }
2060
- if (typeof window !== "undefined") {
2061
- const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2062
- if (prefersReducedMotion) return;
2063
- }
2064
- const startTimeout = setTimeout(() => {
2065
- cycleCountRef.current = 0;
2066
- currentIndexRef.current = 0;
2067
- advanceHint();
2068
- }, 500);
2069
- return () => {
2070
- clearTimeout(startTimeout);
2071
- stopHint();
2072
- };
2073
- }, [enabled, actionCount, advanceHint, stopHint]);
2074
- return {
2075
- activeHintIndex,
2076
- stopHint,
2077
- containerRef
2078
- };
2079
- }
2080
-
2081
2028
  // src/hooks/use-copy-to-clipboard.ts
2082
- import { useCallback as useCallback11, useState as useState18 } from "react";
2029
+ import { useCallback as useCallback10, useState as useState17 } from "react";
2083
2030
  function useCopyToClipboard({
2084
2031
  successTitle = "Copied",
2085
2032
  successDescription = "Copied to clipboard",
@@ -2088,8 +2035,8 @@ function useCopyToClipboard({
2088
2035
  resetDelay = 2e3
2089
2036
  } = {}) {
2090
2037
  const { toast: toast2 } = useToast();
2091
- const [copied, setCopied] = useState18(false);
2092
- const copy = useCallback11(
2038
+ const [copied, setCopied] = useState17(false);
2039
+ const copy = useCallback10(
2093
2040
  async (text) => {
2094
2041
  try {
2095
2042
  await navigator.clipboard.writeText(text);
@@ -2106,7 +2053,7 @@ function useCopyToClipboard({
2106
2053
  }
2107
2054
 
2108
2055
  // src/hooks/use-batch-images.ts
2109
- import { useEffect as useEffect17, useMemo as useMemo2, useState as useState19, useRef as useRef10 } from "react";
2056
+ import { useEffect as useEffect17, useMemo as useMemo2, useState as useState18, useRef as useRef9 } from "react";
2110
2057
  var globalBatchImageConfig = {};
2111
2058
  function configureBatchImageFetch(config) {
2112
2059
  globalBatchImageConfig = { ...globalBatchImageConfig, ...config };
@@ -2179,13 +2126,13 @@ async function batchFetchAuthenticatedImages(imageUrls, config) {
2179
2126
  return results;
2180
2127
  }
2181
2128
  function useBatchImages(imageUrls, config) {
2182
- const [fetchedImages, setFetchedImages] = useState19({});
2183
- const [loading, setLoading] = useState19(false);
2129
+ const [fetchedImages, setFetchedImages] = useState18({});
2130
+ const [loading, setLoading] = useState18(false);
2184
2131
  const uniqueUrls = useMemo2(
2185
2132
  () => Array.from(new Set(imageUrls.filter((url) => Boolean(url)))),
2186
2133
  [imageUrls]
2187
2134
  );
2188
- const requestedUrls = useRef10(/* @__PURE__ */ new Set());
2135
+ const requestedUrls = useRef9(/* @__PURE__ */ new Set());
2189
2136
  useEffect17(() => {
2190
2137
  if (uniqueUrls.length === 0) {
2191
2138
  setFetchedImages({});
@@ -2216,7 +2163,7 @@ function useBatchImages(imageUrls, config) {
2216
2163
  }
2217
2164
 
2218
2165
  // src/hooks/use-authenticated-image.ts
2219
- import { useEffect as useEffect18, useState as useState20, useRef as useRef11 } from "react";
2166
+ import { useEffect as useEffect18, useState as useState19, useRef as useRef10 } from "react";
2220
2167
  var globalImageConfig = {};
2221
2168
  var imageCache = /* @__PURE__ */ new Map();
2222
2169
  var pendingRequests = /* @__PURE__ */ new Map();
@@ -2245,10 +2192,10 @@ function getImageConfig() {
2245
2192
  };
2246
2193
  }
2247
2194
  function useAuthenticatedImage(imageUrl, refreshKey, config) {
2248
- const [fetchedImageUrl, setFetchedImageUrl] = useState20();
2249
- const [isLoading, setIsLoading] = useState20(false);
2250
- const [error, setError] = useState20(null);
2251
- const currentCacheKeyRef = useRef11(null);
2195
+ const [fetchedImageUrl, setFetchedImageUrl] = useState19();
2196
+ const [isLoading, setIsLoading] = useState19(false);
2197
+ const [error, setError] = useState19(null);
2198
+ const currentCacheKeyRef = useRef10(null);
2252
2199
  useEffect18(() => {
2253
2200
  if (!imageUrl) {
2254
2201
  setFetchedImageUrl(void 0);
@@ -2375,7 +2322,7 @@ function useAuthenticatedImage(imageUrl, refreshKey, config) {
2375
2322
 
2376
2323
  // src/hooks/state/use-query-params.ts
2377
2324
  init_next_navigation();
2378
- import { useEffect as useEffect19, useState as useState21, useMemo as useMemo3, useCallback as useCallback12 } from "react";
2325
+ import { useEffect as useEffect19, useState as useState20, useMemo as useMemo3, useCallback as useCallback11 } from "react";
2379
2326
 
2380
2327
  // src/hooks/state/graphql-parser.ts
2381
2328
  import {
@@ -2837,10 +2784,10 @@ var introspector = new GraphQLIntrospector();
2837
2784
  function useQueryParams(query, options = {}) {
2838
2785
  const router = useRouter();
2839
2786
  const searchParams = useSearchParams();
2840
- const [isLoading, setIsLoading] = useState21(true);
2841
- const [isReady, setIsReady] = useState21(false);
2842
- const [error, setError] = useState21(null);
2843
- const [schema, setSchema] = useState21({});
2787
+ const [isLoading, setIsLoading] = useState20(true);
2788
+ const [isReady, setIsReady] = useState20(false);
2789
+ const [error, setError] = useState20(null);
2790
+ const [schema, setSchema] = useState20({});
2844
2791
  const defaultValues = options.defaultValues || {};
2845
2792
  const skipIntrospection = options.skipIntrospection || false;
2846
2793
  const debug = options.debug || false;
@@ -2914,14 +2861,14 @@ function useQueryParams(query, options = {}) {
2914
2861
  });
2915
2862
  return result;
2916
2863
  }, [searchParams]);
2917
- const updateUrl = useCallback12((newParams) => {
2864
+ const updateUrl = useCallback11((newParams) => {
2918
2865
  const url = newParams.toString() ? `?${newParams.toString()}` : window.location.pathname;
2919
2866
  if (debug) {
2920
2867
  console.log("[useQueryParams] Updating URL:", url);
2921
2868
  }
2922
2869
  router.replace(url, { scroll: false });
2923
2870
  }, [router, debug]);
2924
- const setParam = useCallback12((key, value) => {
2871
+ const setParam = useCallback11((key, value) => {
2925
2872
  if (!isReady) {
2926
2873
  console.warn("[useQueryParams] Schema not ready, cannot set param");
2927
2874
  return;
@@ -2935,7 +2882,7 @@ function useQueryParams(query, options = {}) {
2935
2882
  console.error("[useQueryParams] Failed to set param:", err);
2936
2883
  }
2937
2884
  }, [variables, schema, isReady, updateUrl]);
2938
- const setParams = useCallback12((updates) => {
2885
+ const setParams = useCallback11((updates) => {
2939
2886
  if (!isReady) {
2940
2887
  console.warn("[useQueryParams] Schema not ready, cannot set params");
2941
2888
  return;
@@ -2949,7 +2896,7 @@ function useQueryParams(query, options = {}) {
2949
2896
  console.error("[useQueryParams] Failed to set params:", err);
2950
2897
  }
2951
2898
  }, [variables, schema, isReady, updateUrl]);
2952
- const clearParamsHandler = useCallback12((keys) => {
2899
+ const clearParamsHandler = useCallback11((keys) => {
2953
2900
  if (!isReady) {
2954
2901
  console.warn("[useQueryParams] Schema not ready, cannot clear params");
2955
2902
  return;
@@ -2963,7 +2910,7 @@ function useQueryParams(query, options = {}) {
2963
2910
  console.error("[useQueryParams] Failed to clear params:", err);
2964
2911
  }
2965
2912
  }, [variables, schema, isReady, updateUrl]);
2966
- const resetParams = useCallback12(() => {
2913
+ const resetParams = useCallback11(() => {
2967
2914
  if (debug) {
2968
2915
  console.log("[useQueryParams] Resetting params");
2969
2916
  }
@@ -2996,9 +2943,9 @@ function applyParamMapping(schema, mapping) {
2996
2943
 
2997
2944
  // src/hooks/state/use-api-params.ts
2998
2945
  init_next_navigation();
2999
- import { useCallback as useCallback13, useMemo as useMemo4, useRef as useRef12 } from "react";
2946
+ import { useCallback as useCallback12, useMemo as useMemo4, useRef as useRef11 } from "react";
3000
2947
  function useContentStable(value, key) {
3001
- const ref = useRef12(void 0);
2948
+ const ref = useRef11(void 0);
3002
2949
  if (ref.current && ref.current.key === key) return ref.current.value;
3003
2950
  ref.current = { value, key };
3004
2951
  return value;
@@ -3031,7 +2978,7 @@ function useApiParams(schema, options = {}) {
3031
2978
  }
3032
2979
  return flattened;
3033
2980
  }, [schemaKey]);
3034
- const prevParamsRef = useRef12(void 0);
2981
+ const prevParamsRef = useRef11(void 0);
3035
2982
  const params = useMemo4(() => {
3036
2983
  const sp = new URLSearchParams(searchString);
3037
2984
  const result = {};
@@ -3055,7 +3002,7 @@ function useApiParams(schema, options = {}) {
3055
3002
  prevParamsRef.current = result;
3056
3003
  return result;
3057
3004
  }, [searchString, schemaKey, debug]);
3058
- const addParamToSearchParams = useCallback13((searchParams, key, value) => {
3005
+ const addParamToSearchParams = useCallback12((searchParams, key, value) => {
3059
3006
  if (value === void 0 || value === "" || value === null) {
3060
3007
  return;
3061
3008
  }
@@ -3083,7 +3030,7 @@ function useApiParams(schema, options = {}) {
3083
3030
  }
3084
3031
  return newParams;
3085
3032
  }, [params, schemaKey, flattenedSchema, addParamToSearchParams]);
3086
- const updateUrl = useCallback13((newParams, keysToRemove = []) => {
3033
+ const updateUrl = useCallback12((newParams, keysToRemove = []) => {
3087
3034
  const finalParams = new URLSearchParams(searchString);
3088
3035
  keysToRemove.forEach((key) => {
3089
3036
  if (key in stableSchema) {
@@ -3119,7 +3066,7 @@ function useApiParams(schema, options = {}) {
3119
3066
  }
3120
3067
  return false;
3121
3068
  };
3122
- const setParam = useCallback13((key, value) => {
3069
+ const setParam = useCallback12((key, value) => {
3123
3070
  const config = stableSchema[key];
3124
3071
  if (!config) {
3125
3072
  console.warn(`[useApiParams] Unknown parameter: ${key}`);
@@ -3133,7 +3080,7 @@ function useApiParams(schema, options = {}) {
3133
3080
  updateUrl(newParams);
3134
3081
  }
3135
3082
  }, [schemaKey, updateUrl, addParamToSearchParams]);
3136
- const setParams = useCallback13((updates) => {
3083
+ const setParams = useCallback12((updates) => {
3137
3084
  const newParams = new URLSearchParams();
3138
3085
  const keysToRemove = [];
3139
3086
  for (const [key, value] of Object.entries(updates)) {
@@ -3150,11 +3097,11 @@ function useApiParams(schema, options = {}) {
3150
3097
  }
3151
3098
  updateUrl(newParams, keysToRemove);
3152
3099
  }, [schemaKey, updateUrl, addParamToSearchParams]);
3153
- const clearParams2 = useCallback13((keys) => {
3100
+ const clearParams2 = useCallback12((keys) => {
3154
3101
  const newParams = new URLSearchParams();
3155
3102
  updateUrl(newParams, keys);
3156
3103
  }, [updateUrl]);
3157
- const resetParams = useCallback13(() => {
3104
+ const resetParams = useCallback12(() => {
3158
3105
  if (debug) {
3159
3106
  console.log("[useApiParams] Resetting params");
3160
3107
  }
@@ -3191,7 +3138,7 @@ function createSearchParams(params) {
3191
3138
  }
3192
3139
 
3193
3140
  // src/hooks/state/use-cursor-pagination-state.ts
3194
- import { useCallback as useCallback14, useEffect as useEffect20, useRef as useRef13, useState as useState22 } from "react";
3141
+ import { useCallback as useCallback13, useEffect as useEffect20, useRef as useRef12, useState as useState21 } from "react";
3195
3142
  var urlSchema = {
3196
3143
  search: { type: "string", default: "" },
3197
3144
  cursor: { type: "string", default: "" }
@@ -3202,12 +3149,12 @@ function useCursorPaginationState(options) {
3202
3149
  onSearchChange
3203
3150
  } = options;
3204
3151
  const { params, setParam, setParams } = useApiParams(urlSchema);
3205
- const [searchInput, setSearchInput] = useState22(params.search || "");
3206
- const [hasLoadedBeyondFirst, setHasLoadedBeyondFirst] = useState22(false);
3207
- const [initialLoadCount, setInitialLoadCount] = useState22(0);
3208
- const lastSearchRef = useRef13(null);
3209
- const isSyncingFromUrl = useRef13(false);
3210
- const isInitialLoadInProgress = useRef13(true);
3152
+ const [searchInput, setSearchInput] = useState21(params.search || "");
3153
+ const [hasLoadedBeyondFirst, setHasLoadedBeyondFirst] = useState21(false);
3154
+ const [initialLoadCount, setInitialLoadCount] = useState21(0);
3155
+ const lastSearchRef = useRef12(null);
3156
+ const isSyncingFromUrl = useRef12(false);
3157
+ const isInitialLoadInProgress = useRef12(true);
3211
3158
  useEffect20(() => {
3212
3159
  if (isInitialLoadInProgress.current) return;
3213
3160
  const urlSearch = params.search || "";
@@ -3254,7 +3201,7 @@ function useCursorPaginationState(options) {
3254
3201
  onSearchChange(currentSearch);
3255
3202
  }
3256
3203
  }, [params.search, onSearchChange, initialLoadCount]);
3257
- const handleNextPage = useCallback14(
3204
+ const handleNextPage = useCallback13(
3258
3205
  async (endCursor, fetchFn) => {
3259
3206
  setParam("cursor", endCursor);
3260
3207
  await fetchFn();
@@ -3262,7 +3209,7 @@ function useCursorPaginationState(options) {
3262
3209
  },
3263
3210
  [setParam]
3264
3211
  );
3265
- const handleResetToFirstPage = useCallback14(
3212
+ const handleResetToFirstPage = useCallback13(
3266
3213
  async (fetchFn) => {
3267
3214
  setParam("cursor", "");
3268
3215
  await fetchFn();
@@ -3284,15 +3231,15 @@ function useCursorPaginationState(options) {
3284
3231
  }
3285
3232
 
3286
3233
  // src/hooks/nats/use-nats-client.ts
3287
- import { useEffect as useEffect21, useMemo as useMemo5, useState as useState23 } from "react";
3234
+ import { useEffect as useEffect21, useMemo as useMemo5, useState as useState22 } from "react";
3288
3235
  function useNatsClient(clientOptions, options = {}) {
3289
3236
  const { autoConnect = true } = options;
3290
3237
  const client = useMemo5(() => {
3291
3238
  if (!clientOptions) return null;
3292
3239
  return createNatsClient(clientOptions);
3293
3240
  }, [clientOptions]);
3294
- const [status, setStatus] = useState23("disconnected");
3295
- const [lastError, setLastError] = useState23(null);
3241
+ const [status, setStatus] = useState22("disconnected");
3242
+ const [lastError, setLastError] = useState22(null);
3296
3243
  useEffect21(() => {
3297
3244
  if (!client) {
3298
3245
  setStatus("disconnected");
@@ -3324,16 +3271,22 @@ function useNatsClient(clientOptions, options = {}) {
3324
3271
  }
3325
3272
 
3326
3273
  // src/hooks/use-near-viewport.ts
3327
- import { useEffect as useEffect22, useRef as useRef14, useState as useState24, useCallback as useCallback15 } from "react";
3274
+ import { useEffect as useEffect22, useRef as useRef13, useState as useState23, useCallback as useCallback14 } from "react";
3328
3275
  var observers = /* @__PURE__ */ new Map();
3329
3276
  var subscribers = /* @__PURE__ */ new WeakMap();
3330
- function getObserverFor(rootMargin) {
3331
- const existing = observers.get(rootMargin);
3277
+ var THRESHOLD_EPSILON = 0.01;
3278
+ function observerKey(rootMargin, threshold) {
3279
+ return `${rootMargin}|${threshold}`;
3280
+ }
3281
+ function getObserverFor(rootMargin, threshold) {
3282
+ const key = observerKey(rootMargin, threshold);
3283
+ const existing = observers.get(key);
3332
3284
  if (existing) return existing;
3333
3285
  const io = new IntersectionObserver(
3334
3286
  (entries) => {
3335
3287
  entries.forEach((entry) => {
3336
3288
  if (!entry.isIntersecting) return;
3289
+ if (entry.intersectionRatio < threshold - THRESHOLD_EPSILON) return;
3337
3290
  const cb = subscribers.get(entry.target);
3338
3291
  if (cb) {
3339
3292
  cb();
@@ -3342,32 +3295,33 @@ function getObserverFor(rootMargin) {
3342
3295
  }
3343
3296
  });
3344
3297
  },
3345
- { rootMargin }
3298
+ { rootMargin, threshold }
3346
3299
  );
3347
- observers.set(rootMargin, io);
3300
+ observers.set(key, io);
3348
3301
  return io;
3349
3302
  }
3350
3303
  var NEAR_VIEWPORT_ROOT_MARGIN = "500px";
3351
- function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN) {
3352
- const [isNear, setIsNear] = useState24(false);
3353
- const elRef = useRef14(null);
3354
- const ref = useCallback15(
3304
+ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN, threshold = 0) {
3305
+ const [isNear, setIsNear] = useState23(false);
3306
+ const elRef = useRef13(null);
3307
+ const key = observerKey(rootMargin, threshold);
3308
+ const ref = useCallback14(
3355
3309
  (node) => {
3356
3310
  const prev = elRef.current;
3357
3311
  if (prev) {
3358
3312
  const stillOurs = subscribers.get(prev);
3359
3313
  if (stillOurs) {
3360
3314
  subscribers.delete(prev);
3361
- observers.get(rootMargin)?.unobserve(prev);
3315
+ observers.get(key)?.unobserve(prev);
3362
3316
  }
3363
3317
  }
3364
3318
  elRef.current = node;
3365
3319
  if (!node) return;
3366
3320
  const cb = () => setIsNear(true);
3367
3321
  subscribers.set(node, cb);
3368
- getObserverFor(rootMargin).observe(node);
3322
+ getObserverFor(rootMargin, threshold).observe(node);
3369
3323
  },
3370
- [rootMargin]
3324
+ [key, rootMargin, threshold]
3371
3325
  );
3372
3326
  useEffect22(() => {
3373
3327
  return () => {
@@ -3375,10 +3329,10 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN) {
3375
3329
  if (!el) return;
3376
3330
  if (subscribers.get(el)) {
3377
3331
  subscribers.delete(el);
3378
- observers.get(rootMargin)?.unobserve(el);
3332
+ observers.get(key)?.unobserve(el);
3379
3333
  }
3380
3334
  };
3381
- }, [rootMargin]);
3335
+ }, [key]);
3382
3336
  return { ref, isNear };
3383
3337
  }
3384
3338
 
@@ -3705,7 +3659,7 @@ function useScrollToHash(readyDep = true, options) {
3705
3659
  }
3706
3660
 
3707
3661
  // src/hooks/use-humanity-signals.ts
3708
- import { useCallback as useCallback16, useRef as useRef15 } from "react";
3662
+ import { useCallback as useCallback15, useRef as useRef14 } from "react";
3709
3663
 
3710
3664
  // src/utils/humanity-signals.ts
3711
3665
  var HONEYPOT_FIELD = "contact_url_confirm";
@@ -3729,16 +3683,16 @@ var splitCsvEnv = (s) => s?.split(",").map((t) => t.trim()).filter(Boolean) ?? [
3729
3683
 
3730
3684
  // src/hooks/use-humanity-signals.ts
3731
3685
  function useHumanitySignals() {
3732
- const ref = useRef15(null);
3733
- const mountedAt = useRef15(typeof performance !== "undefined" ? performance.now() : 0);
3734
- const getSignals = useCallback16(
3686
+ const ref = useRef14(null);
3687
+ const mountedAt = useRef14(typeof performance !== "undefined" ? performance.now() : 0);
3688
+ const getSignals = useCallback15(
3735
3689
  () => ({
3736
3690
  [HONEYPOT_FIELD]: ref.current?.value ?? "",
3737
3691
  [ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - mountedAt.current) : 0
3738
3692
  }),
3739
3693
  []
3740
3694
  );
3741
- const resetSignals = useCallback16(() => {
3695
+ const resetSignals = useCallback15(() => {
3742
3696
  if (ref.current) ref.current.value = "";
3743
3697
  if (typeof performance !== "undefined") mountedAt.current = performance.now();
3744
3698
  }, []);
@@ -3763,6 +3717,7 @@ export {
3763
3717
  useMemoizedCallback,
3764
3718
  useNotificationPermission,
3765
3719
  useOnboardingState,
3720
+ useResetOnPageHidden,
3766
3721
  useSearch,
3767
3722
  useSuppressCloneFocus,
3768
3723
  useTablePagination,
@@ -3811,7 +3766,6 @@ export {
3811
3766
  embedAuthedFetch,
3812
3767
  contentFetch,
3813
3768
  useContactSubmission,
3814
- useQuickActionHint,
3815
3769
  useCopyToClipboard,
3816
3770
  configureBatchImageFetch,
3817
3771
  batchFetchAuthenticatedImages,
@@ -3864,4 +3818,4 @@ export {
3864
3818
  splitCsvEnv,
3865
3819
  useHumanitySignals
3866
3820
  };
3867
- //# sourceMappingURL=chunk-MLFFBQ5B.js.map
3821
+ //# sourceMappingURL=chunk-MK2YWJAA.js.map