@trackunit/react-components 4.2.0 → 5.0.0

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/index.cjs.js CHANGED
@@ -13662,99 +13662,6 @@ const useContainerBreakpoints = (ref, options = {}) => {
13662
13662
  return containerSize;
13663
13663
  };
13664
13664
 
13665
- /**
13666
- * Hook for managing timeouts.
13667
- *
13668
- * @param {object} options - Options for the useTimeout hook.
13669
- * @param {Function} options.onTimeout - Callback function to execute on timeout.
13670
- * @param {number} options.duration - Duration of the timeout in milliseconds.
13671
- * @returns {object} An object containing functions to start and stop the timeout.
13672
- */
13673
- const useTimeout = ({ onTimeout, duration, }) => {
13674
- const ready = react.useRef(false);
13675
- const timeout = react.useRef(null);
13676
- const callback = react.useRef(onTimeout);
13677
- const startTimeout = react.useCallback(() => {
13678
- ready.current = false;
13679
- if (timeout.current) {
13680
- clearTimeout(timeout.current);
13681
- }
13682
- timeout.current = setTimeout(() => {
13683
- ready.current = true;
13684
- callback.current();
13685
- }, duration);
13686
- }, [duration]);
13687
- const stopTimeout = react.useCallback(() => {
13688
- ready.current = null;
13689
- if (timeout.current) {
13690
- clearTimeout(timeout.current);
13691
- }
13692
- }, []);
13693
- react.useEffect(() => {
13694
- // Use the latest callback function provided by the parent component.
13695
- callback.current = onTimeout;
13696
- }, [onTimeout]);
13697
- react.useEffect(() => {
13698
- // Cleanup function to clear the timeout when component unmounts
13699
- return () => {
13700
- if (timeout.current) {
13701
- clearTimeout(timeout.current);
13702
- }
13703
- };
13704
- }, []);
13705
- return react.useMemo(() => ({ startTimeout, stopTimeout }), [startTimeout, stopTimeout]);
13706
- };
13707
-
13708
- /**
13709
- * Hook for continuous retries with a timeout mechanism.
13710
- *
13711
- * @param {object} options - Options for the useContinuousTimeout hook.
13712
- * @param {Function} options.onTimeout - Callback function to execute on each timeout.
13713
- * @param {Function} options.onMaxRetries - Callback function to execute when the maximum number of retries is reached.
13714
- * @param {number} options.duration - Duration of the timeout in milliseconds.
13715
- * @param {number} options.maxRetries - Maximum number of retry attempts.
13716
- * @returns {object} An object containing functions to start and stop the timeout, current retry count, and the timeout status.
13717
- */
13718
- const useContinuousTimeout = ({ onTimeout, onMaxRetries, duration, maxRetries, }) => {
13719
- const retries = react.useRef(0);
13720
- const [isRunning, setIsRunning] = react.useState(false); // Track the timeout status
13721
- const { startTimeout, stopTimeout } = useTimeout({
13722
- duration,
13723
- onTimeout: () => {
13724
- if (isRunning) {
13725
- onTimeout();
13726
- if (retries.current < maxRetries) {
13727
- retries.current++;
13728
- }
13729
- else {
13730
- onMaxRetries?.();
13731
- retries.current = 0;
13732
- }
13733
- startTimeout(); // Restart the timeout if it's still running
13734
- }
13735
- },
13736
- });
13737
- const stopTimeouts = react.useCallback(() => {
13738
- stopTimeout();
13739
- setIsRunning(false); // Update the status when stopped
13740
- }, [stopTimeout]);
13741
- const startTimeouts = react.useCallback(() => {
13742
- if (isRunning) {
13743
- return; // Prevent multiple timeouts from running
13744
- }
13745
- startTimeout();
13746
- setIsRunning(true); // Update the status when started
13747
- }, [isRunning, startTimeout]);
13748
- return react.useMemo(() => ({
13749
- startTimeouts,
13750
- stopTimeouts,
13751
- isRunning,
13752
- get retries() {
13753
- return retries.current;
13754
- },
13755
- }), [startTimeouts, stopTimeouts, isRunning]);
13756
- };
13757
-
13758
13665
  // Copied from https://github.com/rexxars/use-device-pixel-ratio
13759
13666
  /**
13760
13667
  * Get the device pixel ratio, potentially rounded and capped.
@@ -14535,19 +14442,6 @@ const getWindowSize = () => {
14535
14442
  }
14536
14443
  };
14537
14444
 
14538
- /**
14539
- * A useRef that updates its given value whenever it changes.
14540
- *
14541
- * @returns {boolean} Returns true if it is the first render, false otherwise.
14542
- */
14543
- const useSelfUpdatingRef = (initialState) => {
14544
- const stateRef = react.useRef(initialState);
14545
- react.useEffect(() => {
14546
- stateRef.current = initialState;
14547
- }, [initialState]);
14548
- return stateRef;
14549
- };
14550
-
14551
14445
  /**
14552
14446
  * Hook for filtering a list of items by text search, client side search in a list.
14553
14447
  *
@@ -14569,6 +14463,49 @@ function useTextSearch(items, props) {
14569
14463
  return react.useMemo(() => [result, searchText, setSearchText], [result, searchText, setSearchText]);
14570
14464
  }
14571
14465
 
14466
+ /**
14467
+ * Hook for managing timeouts.
14468
+ *
14469
+ * @param {object} options - Options for the useTimeout hook.
14470
+ * @param {Function} options.onTimeout - Callback function to execute on timeout.
14471
+ * @param {number} options.duration - Duration of the timeout in milliseconds.
14472
+ * @returns {object} An object containing functions to start and stop the timeout.
14473
+ */
14474
+ const useTimeout = ({ onTimeout, duration, }) => {
14475
+ const ready = react.useRef(false);
14476
+ const timeout = react.useRef(null);
14477
+ const callback = react.useRef(onTimeout);
14478
+ const startTimeout = react.useCallback(() => {
14479
+ ready.current = false;
14480
+ if (timeout.current) {
14481
+ clearTimeout(timeout.current);
14482
+ }
14483
+ timeout.current = setTimeout(() => {
14484
+ ready.current = true;
14485
+ callback.current();
14486
+ }, duration);
14487
+ }, [duration]);
14488
+ const stopTimeout = react.useCallback(() => {
14489
+ ready.current = null;
14490
+ if (timeout.current) {
14491
+ clearTimeout(timeout.current);
14492
+ }
14493
+ }, []);
14494
+ react.useEffect(() => {
14495
+ // Use the latest callback function provided by the parent component.
14496
+ callback.current = onTimeout;
14497
+ }, [onTimeout]);
14498
+ react.useEffect(() => {
14499
+ // Cleanup function to clear the timeout when component unmounts
14500
+ return () => {
14501
+ if (timeout.current) {
14502
+ clearTimeout(timeout.current);
14503
+ }
14504
+ };
14505
+ }, []);
14506
+ return react.useMemo(() => ({ startTimeout, stopTimeout }), [startTimeout, stopTimeout]);
14507
+ };
14508
+
14572
14509
  const canUseMatchMedia = () => typeof window !== "undefined" && typeof window.matchMedia === "function";
14573
14510
  const getViewportBreakpointState = () => {
14574
14511
  if (!canUseMatchMedia())
@@ -14817,7 +14754,6 @@ exports.preferenceCardGrid = preferenceCardGrid;
14817
14754
  exports.useBidirectionalScroll = useBidirectionalScroll;
14818
14755
  exports.useClickOutside = useClickOutside;
14819
14756
  exports.useContainerBreakpoints = useContainerBreakpoints;
14820
- exports.useContinuousTimeout = useContinuousTimeout;
14821
14757
  exports.useCopyToClipboard = useCopyToClipboard;
14822
14758
  exports.useCustomEncoding = useCustomEncoding;
14823
14759
  exports.useDebounce = useDebounce;
@@ -14852,7 +14788,6 @@ exports.useRelayPagination = useRelayPagination;
14852
14788
  exports.useResize = useResize;
14853
14789
  exports.useScrollBlock = useScrollBlock;
14854
14790
  exports.useScrollDetection = useScrollDetection;
14855
- exports.useSelfUpdatingRef = useSelfUpdatingRef;
14856
14791
  exports.useSessionStorage = useSessionStorage;
14857
14792
  exports.useSessionStorageReducer = useSessionStorageReducer;
14858
14793
  exports.useSheet = useSheet;
package/index.esm.js CHANGED
@@ -13661,99 +13661,6 @@ const useContainerBreakpoints = (ref, options = {}) => {
13661
13661
  return containerSize;
13662
13662
  };
13663
13663
 
13664
- /**
13665
- * Hook for managing timeouts.
13666
- *
13667
- * @param {object} options - Options for the useTimeout hook.
13668
- * @param {Function} options.onTimeout - Callback function to execute on timeout.
13669
- * @param {number} options.duration - Duration of the timeout in milliseconds.
13670
- * @returns {object} An object containing functions to start and stop the timeout.
13671
- */
13672
- const useTimeout = ({ onTimeout, duration, }) => {
13673
- const ready = useRef(false);
13674
- const timeout = useRef(null);
13675
- const callback = useRef(onTimeout);
13676
- const startTimeout = useCallback(() => {
13677
- ready.current = false;
13678
- if (timeout.current) {
13679
- clearTimeout(timeout.current);
13680
- }
13681
- timeout.current = setTimeout(() => {
13682
- ready.current = true;
13683
- callback.current();
13684
- }, duration);
13685
- }, [duration]);
13686
- const stopTimeout = useCallback(() => {
13687
- ready.current = null;
13688
- if (timeout.current) {
13689
- clearTimeout(timeout.current);
13690
- }
13691
- }, []);
13692
- useEffect(() => {
13693
- // Use the latest callback function provided by the parent component.
13694
- callback.current = onTimeout;
13695
- }, [onTimeout]);
13696
- useEffect(() => {
13697
- // Cleanup function to clear the timeout when component unmounts
13698
- return () => {
13699
- if (timeout.current) {
13700
- clearTimeout(timeout.current);
13701
- }
13702
- };
13703
- }, []);
13704
- return useMemo(() => ({ startTimeout, stopTimeout }), [startTimeout, stopTimeout]);
13705
- };
13706
-
13707
- /**
13708
- * Hook for continuous retries with a timeout mechanism.
13709
- *
13710
- * @param {object} options - Options for the useContinuousTimeout hook.
13711
- * @param {Function} options.onTimeout - Callback function to execute on each timeout.
13712
- * @param {Function} options.onMaxRetries - Callback function to execute when the maximum number of retries is reached.
13713
- * @param {number} options.duration - Duration of the timeout in milliseconds.
13714
- * @param {number} options.maxRetries - Maximum number of retry attempts.
13715
- * @returns {object} An object containing functions to start and stop the timeout, current retry count, and the timeout status.
13716
- */
13717
- const useContinuousTimeout = ({ onTimeout, onMaxRetries, duration, maxRetries, }) => {
13718
- const retries = useRef(0);
13719
- const [isRunning, setIsRunning] = useState(false); // Track the timeout status
13720
- const { startTimeout, stopTimeout } = useTimeout({
13721
- duration,
13722
- onTimeout: () => {
13723
- if (isRunning) {
13724
- onTimeout();
13725
- if (retries.current < maxRetries) {
13726
- retries.current++;
13727
- }
13728
- else {
13729
- onMaxRetries?.();
13730
- retries.current = 0;
13731
- }
13732
- startTimeout(); // Restart the timeout if it's still running
13733
- }
13734
- },
13735
- });
13736
- const stopTimeouts = useCallback(() => {
13737
- stopTimeout();
13738
- setIsRunning(false); // Update the status when stopped
13739
- }, [stopTimeout]);
13740
- const startTimeouts = useCallback(() => {
13741
- if (isRunning) {
13742
- return; // Prevent multiple timeouts from running
13743
- }
13744
- startTimeout();
13745
- setIsRunning(true); // Update the status when started
13746
- }, [isRunning, startTimeout]);
13747
- return useMemo(() => ({
13748
- startTimeouts,
13749
- stopTimeouts,
13750
- isRunning,
13751
- get retries() {
13752
- return retries.current;
13753
- },
13754
- }), [startTimeouts, stopTimeouts, isRunning]);
13755
- };
13756
-
13757
13664
  // Copied from https://github.com/rexxars/use-device-pixel-ratio
13758
13665
  /**
13759
13666
  * Get the device pixel ratio, potentially rounded and capped.
@@ -14534,19 +14441,6 @@ const getWindowSize = () => {
14534
14441
  }
14535
14442
  };
14536
14443
 
14537
- /**
14538
- * A useRef that updates its given value whenever it changes.
14539
- *
14540
- * @returns {boolean} Returns true if it is the first render, false otherwise.
14541
- */
14542
- const useSelfUpdatingRef = (initialState) => {
14543
- const stateRef = useRef(initialState);
14544
- useEffect(() => {
14545
- stateRef.current = initialState;
14546
- }, [initialState]);
14547
- return stateRef;
14548
- };
14549
-
14550
14444
  /**
14551
14445
  * Hook for filtering a list of items by text search, client side search in a list.
14552
14446
  *
@@ -14568,6 +14462,49 @@ function useTextSearch(items, props) {
14568
14462
  return useMemo(() => [result, searchText, setSearchText], [result, searchText, setSearchText]);
14569
14463
  }
14570
14464
 
14465
+ /**
14466
+ * Hook for managing timeouts.
14467
+ *
14468
+ * @param {object} options - Options for the useTimeout hook.
14469
+ * @param {Function} options.onTimeout - Callback function to execute on timeout.
14470
+ * @param {number} options.duration - Duration of the timeout in milliseconds.
14471
+ * @returns {object} An object containing functions to start and stop the timeout.
14472
+ */
14473
+ const useTimeout = ({ onTimeout, duration, }) => {
14474
+ const ready = useRef(false);
14475
+ const timeout = useRef(null);
14476
+ const callback = useRef(onTimeout);
14477
+ const startTimeout = useCallback(() => {
14478
+ ready.current = false;
14479
+ if (timeout.current) {
14480
+ clearTimeout(timeout.current);
14481
+ }
14482
+ timeout.current = setTimeout(() => {
14483
+ ready.current = true;
14484
+ callback.current();
14485
+ }, duration);
14486
+ }, [duration]);
14487
+ const stopTimeout = useCallback(() => {
14488
+ ready.current = null;
14489
+ if (timeout.current) {
14490
+ clearTimeout(timeout.current);
14491
+ }
14492
+ }, []);
14493
+ useEffect(() => {
14494
+ // Use the latest callback function provided by the parent component.
14495
+ callback.current = onTimeout;
14496
+ }, [onTimeout]);
14497
+ useEffect(() => {
14498
+ // Cleanup function to clear the timeout when component unmounts
14499
+ return () => {
14500
+ if (timeout.current) {
14501
+ clearTimeout(timeout.current);
14502
+ }
14503
+ };
14504
+ }, []);
14505
+ return useMemo(() => ({ startTimeout, stopTimeout }), [startTimeout, stopTimeout]);
14506
+ };
14507
+
14571
14508
  const canUseMatchMedia = () => typeof window !== "undefined" && typeof window.matchMedia === "function";
14572
14509
  const getViewportBreakpointState = () => {
14573
14510
  if (!canUseMatchMedia())
@@ -14673,4 +14610,4 @@ const useWindowActivity = ({ onFocus, onBlur, skip = false } = { onBlur: undefin
14673
14610
  */
14674
14611
  setupLibraryTranslations();
14675
14612
 
14676
- export { Alert, Badge, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CompletionStatusIndicator, CopyButton, CopyableValue, DEFAULT_SKELETON_PREFERENCE_CARD_PROPS, DetailsList, EmptyState, EmptyValue, ExternalLink, GridAreas, Heading, Highlight, HorizontalOverflowScroller, Icon, IconButton, IdentityCard, IdentityCardSkeleton, Indicator, KPI, KPICard, KPICardSkeleton, KPISkeleton, LabeledValue, LabeledValueList, List, ListItem, MenuContent, MenuDivider, MenuItem, MenuTree, MoreMenu, Notice, PackageNameStoryComponent, Page, PageContent, PageHeader, PageHeaderKpiMetrics, PageHeaderSecondaryActions, PageHeaderTitle, Pagination, Polygon, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Portal, PreferenceCard, PreferenceCardSkeleton, Prompt, ROLE_CARD, SHEET_TRANSITION_DURATION, SHEET_TRANSITION_DURATION_MS, SHEET_TRANSITION_EASING, SectionHeader, SegmentedValueBar, Sheet, Sidebar, SidebarContentLayout, SkeletonBlock, SkeletonLabel, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, ToggleGroup, Tooltip, TrendIndicator, TrendIndicators, ValueBar, ZStack, createGrid, cvaButton, cvaButtonPrefixSuffix, cvaButtonSpinner, cvaButtonSpinnerContainer, cvaClickable, cvaContainerStyles, cvaContentContainer, cvaContentWrapper, cvaDescriptionCard, cvaIconBackground, cvaIconButton, cvaImgStyles, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaInputContainer, cvaInteractableItem, cvaList, cvaListContainer, cvaListItem$1 as cvaListItem, cvaMenu, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemStyle, cvaMenuItemSuffix, cvaMenuList, cvaMenuListDivider, cvaMenuListItem, cvaMenuListMultiSelect, cvaPageHeader, cvaPageHeaderContainer, cvaPageHeaderHeading, cvaPreferenceCard, cvaTitleCard, cvaToggleGroup, cvaToggleGroupWithSlidingBackground, cvaToggleItem, cvaToggleItemContent, cvaToggleItemText, cvaZStackContainer, cvaZStackItem, defaultPageSize, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, noPagination, preferenceCardGrid, useBidirectionalScroll, useClickOutside, useContainerBreakpoints, useContinuousTimeout, useCopyToClipboard, useCustomEncoding, useDebounce, useDevicePixelRatio, useElevatedReducer, useElevatedState, useGridAreas, useHold, useHover, useInfiniteScroll, useIsFirstRender, useIsFullscreen, useIsTextTruncated, useKeyboardShortcut, useList, useListItemHeight, useLocalStorage, useLocalStorageReducer, useMeasure, useMenuSearchField, useMenuTree, useMergeRefs, useModifierKey, useOptionalPopoverContext, useOverflowBorder, useOverflowItems, usePopoverContext, usePrevious, usePrompt, useRandomCSSLengths, useRelayPagination, useResize, useScrollBlock, useScrollDetection, useSelfUpdatingRef, useSessionStorage, useSessionStorageReducer, useSheet, useSheetSnap, useStorageKey, useStripForeignIdentityHash, useTextSearch, useTimeout, useViewportBreakpoints, useWatch, useWindowActivity };
14613
+ export { Alert, Badge, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CompletionStatusIndicator, CopyButton, CopyableValue, DEFAULT_SKELETON_PREFERENCE_CARD_PROPS, DetailsList, EmptyState, EmptyValue, ExternalLink, GridAreas, Heading, Highlight, HorizontalOverflowScroller, Icon, IconButton, IdentityCard, IdentityCardSkeleton, Indicator, KPI, KPICard, KPICardSkeleton, KPISkeleton, LabeledValue, LabeledValueList, List, ListItem, MenuContent, MenuDivider, MenuItem, MenuTree, MoreMenu, Notice, PackageNameStoryComponent, Page, PageContent, PageHeader, PageHeaderKpiMetrics, PageHeaderSecondaryActions, PageHeaderTitle, Pagination, Polygon, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Portal, PreferenceCard, PreferenceCardSkeleton, Prompt, ROLE_CARD, SHEET_TRANSITION_DURATION, SHEET_TRANSITION_DURATION_MS, SHEET_TRANSITION_EASING, SectionHeader, SegmentedValueBar, Sheet, Sidebar, SidebarContentLayout, SkeletonBlock, SkeletonLabel, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, ToggleGroup, Tooltip, TrendIndicator, TrendIndicators, ValueBar, ZStack, createGrid, cvaButton, cvaButtonPrefixSuffix, cvaButtonSpinner, cvaButtonSpinnerContainer, cvaClickable, cvaContainerStyles, cvaContentContainer, cvaContentWrapper, cvaDescriptionCard, cvaIconBackground, cvaIconButton, cvaImgStyles, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaInputContainer, cvaInteractableItem, cvaList, cvaListContainer, cvaListItem$1 as cvaListItem, cvaMenu, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemStyle, cvaMenuItemSuffix, cvaMenuList, cvaMenuListDivider, cvaMenuListItem, cvaMenuListMultiSelect, cvaPageHeader, cvaPageHeaderContainer, cvaPageHeaderHeading, cvaPreferenceCard, cvaTitleCard, cvaToggleGroup, cvaToggleGroupWithSlidingBackground, cvaToggleItem, cvaToggleItemContent, cvaToggleItemText, cvaZStackContainer, cvaZStackItem, defaultPageSize, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, noPagination, preferenceCardGrid, useBidirectionalScroll, useClickOutside, useContainerBreakpoints, useCopyToClipboard, useCustomEncoding, useDebounce, useDevicePixelRatio, useElevatedReducer, useElevatedState, useGridAreas, useHold, useHover, useInfiniteScroll, useIsFirstRender, useIsFullscreen, useIsTextTruncated, useKeyboardShortcut, useList, useListItemHeight, useLocalStorage, useLocalStorageReducer, useMeasure, useMenuSearchField, useMenuTree, useMergeRefs, useModifierKey, useOptionalPopoverContext, useOverflowBorder, useOverflowItems, usePopoverContext, usePrevious, usePrompt, useRandomCSSLengths, useRelayPagination, useResize, useScrollBlock, useScrollDetection, useSessionStorage, useSessionStorageReducer, useSheet, useSheetSnap, useStorageKey, useStripForeignIdentityHash, useTextSearch, useTimeout, useViewportBreakpoints, useWatch, useWindowActivity };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-router-components",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,8 +9,8 @@
9
9
  "dependencies": {
10
10
  "@trackunit/css-class-variance-utilities": "2.6.9",
11
11
  "@trackunit/i18n-library-translation": "2.13.1",
12
- "@trackunit/react-components": "4.2.0",
13
- "@trackunit/react-drawer": "2.16.0",
12
+ "@trackunit/react-components": "5.0.0",
13
+ "@trackunit/react-drawer": "2.16.1",
14
14
  "@trackunit/shared-utils": "1.22.9",
15
15
  "dequal": "^2.0.3",
16
16
  "zod": "^3.25.76"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "4.2.0",
3
+ "version": "5.0.0",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "migrations": "./migrations.json",
package/src/index.d.ts CHANGED
@@ -130,7 +130,6 @@ export * from "./hooks/persistence/useStripForeignIdentityHash";
130
130
  export * from "./hooks/useBidirectionalScroll";
131
131
  export * from "./hooks/useClickOutside";
132
132
  export * from "./hooks/useContainerBreakpoints";
133
- export * from "./hooks/useContinuousTimeout";
134
133
  export * from "./hooks/useCopyToClipboard";
135
134
  export * from "./hooks/useDebounce";
136
135
  export * from "./hooks/useDevicePixelRatio";
@@ -152,7 +151,6 @@ export * from "./hooks/useRelayPagination";
152
151
  export * from "./hooks/useResize";
153
152
  export * from "./hooks/useScrollBlock";
154
153
  export * from "./hooks/useScrollDetection";
155
- export * from "./hooks/useSelfUpdatingRef";
156
154
  export * from "./hooks/useTextSearch";
157
155
  export * from "./hooks/useTimeout";
158
156
  export * from "./hooks/useViewportBreakpoints";
@@ -1,22 +0,0 @@
1
- import { UseTimeoutProps } from "./useTimeout";
2
- interface UseContinuousTimeoutProps extends UseTimeoutProps {
3
- maxRetries: number;
4
- onMaxRetries?: () => void;
5
- }
6
- /**
7
- * Hook for continuous retries with a timeout mechanism.
8
- *
9
- * @param {object} options - Options for the useContinuousTimeout hook.
10
- * @param {Function} options.onTimeout - Callback function to execute on each timeout.
11
- * @param {Function} options.onMaxRetries - Callback function to execute when the maximum number of retries is reached.
12
- * @param {number} options.duration - Duration of the timeout in milliseconds.
13
- * @param {number} options.maxRetries - Maximum number of retry attempts.
14
- * @returns {object} An object containing functions to start and stop the timeout, current retry count, and the timeout status.
15
- */
16
- export declare const useContinuousTimeout: ({ onTimeout, onMaxRetries, duration, maxRetries, }: UseContinuousTimeoutProps) => {
17
- startTimeouts: () => void;
18
- stopTimeouts: () => void;
19
- isRunning: boolean;
20
- retries: number;
21
- };
22
- export {};
@@ -1,7 +0,0 @@
1
- import { RefObject } from "react";
2
- /**
3
- * A useRef that updates its given value whenever it changes.
4
- *
5
- * @returns {boolean} Returns true if it is the first render, false otherwise.
6
- */
7
- export declare const useSelfUpdatingRef: <TState>(initialState: TState) => RefObject<TState>;