@iress-oss/ids-components 5.13.1 → 5.14.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/dist/{AutocompleteNoResults-Bk7q5K89.js → AutocompleteNoResults-D-7ik_op.js} +1 -1
- package/dist/{ComboboxHiddenInput-BRgHrfvH.js → ComboboxHiddenInput-Bo5hqUzo.js} +6 -6
- package/dist/{FieldAppendToLabel-B7A85TG1.js → FieldAppendToLabel-kSkgzhQp.js} +4 -4
- package/dist/{InputBase-K0leqZnv.js → InputBase-2wLvSYMJ.js} +2 -2
- package/dist/Loading.module-nxv4vxd0.js +13 -0
- package/dist/LoadingSuspense-BDiikfSh.js +5691 -0
- package/dist/LogoFromSrc-RCkIBALM.js +59 -0
- package/dist/MenuItem.module-C1hy3JLs.js +24 -0
- package/dist/Popover.module-BVuEALLH.js +11 -0
- package/dist/{SelectControl-415DMBPp.js → SelectControl-ebML3vaP.js} +2 -2
- package/dist/{SliderTicks-B6vu-MUH.js → SliderTicks-Bvc90tyk.js} +2 -2
- package/dist/TabSet.module-DLn6e1BG.js +13 -0
- package/dist/Table.module-CztzYVfs.js +32 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +3 -3
- package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Badge/Badge.js +5 -5
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/CloseButton/CloseButton.js +2 -2
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +3 -3
- package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +2 -2
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Card/helpers/composeIDSCard.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +7 -7
- package/dist/components/CheckboxMark/CheckboxMark.js +1 -1
- package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
- package/dist/components/Col/Col.js +1 -1
- package/dist/components/Combobox/Combobox.js +3 -3
- package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +3 -3
- package/dist/components/Combobox/components/ComboboxHiddenInput.js +2 -2
- package/dist/components/Combobox/components/ComboboxResults.js +6 -6
- package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +3 -3
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/Container/Container.js +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Expander/Expander.js +2 -2
- package/dist/components/Field/Field.js +2 -2
- package/dist/components/Field/FieldGroup/FieldGroup.js +3 -3
- package/dist/components/Field/components/FieldAppendToLabel.js +4 -4
- package/dist/components/Filter/Filter.js +3 -3
- package/dist/components/Filter/components/FilterResetButton.js +3 -3
- package/dist/components/Filter/components/FilterSearch.js +3 -3
- package/dist/components/Filter/index.js +1 -1
- package/dist/components/Form/Form.js +1 -1
- package/dist/components/Form/FormField/FormField.js +3 -3
- package/dist/components/Form/FormField/FormFieldset.js +3 -3
- package/dist/components/Form/HookForm/HookForm.js +2 -2
- package/dist/components/Form/components/FormValidationSummary.js +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Hide/Hide.js +2 -2
- package/dist/components/Hide/helpers/composeHideClasses.js +5 -5
- package/dist/components/Hide/index.js +1 -1
- package/dist/components/Icon/Icon.js +3 -3
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Inline/Inline.js +3 -3
- package/dist/components/Inline/index.js +1 -1
- package/dist/components/Input/ClearButton/ClearButton.js +1 -1
- package/dist/components/Input/Input.js +3 -3
- package/dist/components/Input/InputBase/InputBase.js +2 -2
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputCurrency/InputCurrency.js +1 -1
- package/dist/components/InputCurrency/index.js +1 -1
- package/dist/components/Label/LabelBase/LabelBase.js +2 -2
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDivider/MenuDivider.js +3 -3
- package/dist/components/Menu/MenuHeading/MenuHeading.js +3 -3
- package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
- package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +2 -2
- package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
- package/dist/components/Menu/MenuText/MenuText.js +4 -4
- package/dist/components/Menu/helpers/mapMenuItems.js +1 -1
- package/dist/components/Menu/hooks/useMenuStyles.js +4 -4
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/hooks/useModal.js +17 -14
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Navbar/Navbar.js +3 -3
- package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
- package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
- package/dist/components/Navbar/components/NavbarLogo.js +3 -3
- package/dist/components/Navbar/index.js +1 -1
- package/dist/components/Panel/Panel.js +1 -1
- package/dist/components/Placeholder/Placeholder.js +2 -2
- package/dist/components/Popover/InputPopover/InputPopover.js +37 -35
- package/dist/components/Popover/InputPopover/InputPopoverActivator.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopoverProvider.js +55 -53
- package/dist/components/Popover/Popover.js +40 -38
- package/dist/components/Popover/PopoverProvider.js +47 -45
- package/dist/components/Popover/components/NestedPopoverActivator.js +9 -0
- package/dist/components/Popover/components/PopoverActivator.js +2 -2
- package/dist/components/Popover/components/PopoverContent.js +3 -3
- package/dist/components/Popover/helpers/composeFloatingProps.js +26 -22
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +16 -13
- package/dist/components/Popover/helpers/waitUntilTrue.js +12 -0
- package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +25 -17
- package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
- package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
- package/dist/components/Progress/Progress.js +2 -2
- package/dist/components/Radio/Radio.js +2 -2
- package/dist/components/Radio/helpers/mapRadioGroupOptions.js +1 -1
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +4 -4
- package/dist/components/Readonly/Readonly.js +4 -4
- package/dist/components/Readonly/index.js +1 -1
- package/dist/components/RichSelect/RichSelect.js +2 -2
- package/dist/components/RichSelect/SelectBody/SelectBody.js +5 -5
- package/dist/components/RichSelect/SelectCreate/SelectCreate.js +3 -3
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +3 -3
- package/dist/components/RichSelect/SelectLabel/SelectLabel.js +2 -2
- package/dist/components/RichSelect/SelectMenu/SelectMenu.js +3 -3
- package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +3 -3
- package/dist/components/RichSelect/SelectSearch/SelectSearch.js +3 -3
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +2 -2
- package/dist/components/RichSelect/SelectTags/SelectTags.js +3 -3
- package/dist/components/RichSelect/components/SelectActivator.js +1 -1
- package/dist/components/RichSelect/components/SelectOptions.js +3 -3
- package/dist/components/RichSelect/index.js +1 -1
- package/dist/components/Row/Row.js +3 -3
- package/dist/components/Row/index.js +1 -1
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/components/SelectControl.js +2 -2
- package/dist/components/Select/components/SelectReadonly.js +3 -3
- package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
- package/dist/components/Select/helpers/nodesToSelectOptions.js +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +3 -3
- package/dist/components/SkipLink/SkipLink.js +2 -2
- package/dist/components/Slideout/Slideout.js +3 -3
- package/dist/components/Slideout/components/SlideoutInner.js +2 -2
- package/dist/components/Slideout/hooks/useSlideout.js +17 -14
- package/dist/components/Slideout/index.js +1 -1
- package/dist/components/Slider/Slider.js +3 -3
- package/dist/components/Slider/components/SliderTicks.js +2 -2
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/Stack/Stack.js +1 -1
- package/dist/components/TabSet/Tab/Tab.js +2 -2
- package/dist/components/TabSet/TabSet.js +3 -3
- package/dist/components/TabSet/components/TabSetItem.js +2 -2
- package/dist/components/Table/Table.js +3 -3
- package/dist/components/Table/TableBody/TableBody.js +16 -16
- package/dist/components/Table/components/TableEmpty.js +1 -1
- package/dist/components/Table/components/TableHeader.js +1 -1
- package/dist/components/Table/components/TableHeaderCell.js +2 -2
- package/dist/components/Table/components/TableSortButton.js +4 -4
- package/dist/components/Table/hooks/useIDSTableColumnStyles.js +2 -2
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tag/Tag.js +2 -2
- package/dist/components/Tag/TagInput/TagInput.js +1 -1
- package/dist/components/Tag/components/TagListInput/TagListInput.js +2 -2
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Toaster/Toast/Toast.js +2 -2
- package/dist/components/Toaster/Toast/ToastAnimated.js +3 -3
- package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
- package/dist/components/Toaster/Toaster.js +4 -4
- package/dist/components/Toaster/ToasterProvider.js +1 -1
- package/dist/components/Toaster/hooks/useToaster.js +1 -1
- package/dist/components/Toaster/index.js +1 -1
- package/dist/components/Toggle/Toggle.js +4 -4
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +2 -2
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/{floating-ui.react-D_ysmiM3.js → floating-ui.react-RKRjRgyj.js} +972 -961
- package/dist/fuzzysort-eoXOpoo6.js +395 -0
- package/dist/helpers/label-value/getQueryRangeExclusive.js +1 -1
- package/dist/helpers/label-value/highlightQueryInLabel.js +1 -1
- package/dist/helpers/label-value/searchLabelValues.js +1 -1
- package/dist/index-2QXL0WYc.js +45 -0
- package/dist/main.js +309 -308
- package/dist/patterns/Loading/Loading.js +4 -3
- package/dist/patterns/Loading/LoadingSuspense.js +7 -0
- package/dist/patterns/Loading/components/ComponentLoading.js +3 -3
- package/dist/patterns/Loading/components/DefaultLoading.js +4 -4
- package/dist/patterns/Loading/components/LongLoading.js +132 -0
- package/dist/patterns/Loading/components/PageLoading.js +4 -4
- package/dist/patterns/Loading/components/StartUpLoading.js +105 -9
- package/dist/patterns/Loading/components/ValidateLoading.js +3 -3
- package/dist/patterns/Loading/hooks/useEstimatedProgressValue.js +29 -0
- package/dist/patterns/Loading/hooks/useShouldRenderLoading.js +19 -15
- package/dist/patterns/Loading/hooks/useShowIndicator.js +20 -0
- package/dist/patterns/Loading/hooks/useSuspenseResource.js +27 -0
- package/dist/patterns/Loading/index.js +3 -2
- package/dist/src/components/Popover/Popover.types.d.ts +1 -0
- package/dist/src/components/Popover/components/NestedPopoverActivator.d.ts +5 -0
- package/dist/src/components/Popover/helpers/handlePopoverTabKey.d.ts +1 -1
- package/dist/src/components/Popover/helpers/waitUntilTrue.d.ts +1 -0
- package/dist/src/components/RichSelect/RichSelect.types.d.ts +14 -0
- package/dist/src/components/RichSelect/components/SelectOptions.d.ts +2 -2
- package/dist/src/patterns/Loading/Loading.d.ts +7 -2
- package/dist/src/patterns/Loading/LoadingSuspense.d.ts +73 -0
- package/dist/src/patterns/Loading/components/LongLoading.d.ts +60 -0
- package/dist/src/patterns/Loading/components/StartUpLoading.d.ts +1 -1
- package/dist/src/patterns/Loading/hooks/useEstimatedProgressValue.d.ts +11 -0
- package/dist/src/patterns/Loading/hooks/useShouldRenderLoading.d.ts +2 -1
- package/dist/src/patterns/Loading/hooks/useShowIndicator.d.ts +9 -0
- package/dist/src/patterns/Loading/hooks/useSuspenseResource.d.ts +17 -0
- package/dist/src/patterns/Loading/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{useIDSButtonGroupItem-Dzgv35ni.js → useIDSButtonGroupItem-D278MaLC.js} +2 -2
- package/package.json +9 -9
- package/dist/Loading-CZ64hUvP.js +0 -5638
- package/dist/LogoFromSrc-tAhdMB9Y.js +0 -59
- package/dist/MenuItem.module-Br0lJU3k.js +0 -24
- package/dist/Popover.module-COHnD5HM.js +0 -11
- package/dist/StartUpLoading-DpO7RfDY.js +0 -145
- package/dist/TabSet.module-Bje9oAao.js +0 -13
- package/dist/Table.module-CSNtX5ab.js +0 -32
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/fuzzysort-CuIReeYY.js +0 -393
- package/dist/index-Cu0xwYjD.js +0 -42
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IressProgressProps } from '../../../components/Progress/Progress.types';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { IressHTMLAttributes } from '../../../interfaces';
|
|
4
|
+
export interface LongLoadingProps extends IressHTMLAttributes {
|
|
5
|
+
/**
|
|
6
|
+
* The children are displayed while loading. This will be displayed above the progress bar and checklist.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* An error to display if the loading fails. This will override the `messageList` and show an error message instead.
|
|
11
|
+
*/
|
|
12
|
+
error?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Estimated time in milliseconds for the loading to finish.
|
|
15
|
+
* @default 10000
|
|
16
|
+
*/
|
|
17
|
+
estimatedFinishTime?: number;
|
|
18
|
+
/**
|
|
19
|
+
* If set to `true`, will start hiding the loading indicator. It is recommended to use this prop if you are using the `IressLoading.shouldRender` hook to achieve a smooth loading experience.
|
|
20
|
+
*/
|
|
21
|
+
loaded?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A checklist to display while loading. The key is the time when you want the item to be checked.
|
|
24
|
+
*/
|
|
25
|
+
messageList: Record<number, ReactNode>;
|
|
26
|
+
/**
|
|
27
|
+
* The long loading pattern will display a checklist of items that are being loaded.
|
|
28
|
+
*
|
|
29
|
+
* Use `pattern="long"` for the following use cases:
|
|
30
|
+
* - Calling multiple slow APIs to load data
|
|
31
|
+
* - Loading results from AI
|
|
32
|
+
* - Processing a large amount of data as a queue (eg. bulk uploading or large media file uploads)
|
|
33
|
+
*/
|
|
34
|
+
pattern?: 'long';
|
|
35
|
+
/**
|
|
36
|
+
* If provided, will use this to set the `value` of the progress bar. If not provided, will use the `estimatedFinishTime` to calculate the progress.
|
|
37
|
+
*/
|
|
38
|
+
progress?: IressProgressProps['value'];
|
|
39
|
+
/**
|
|
40
|
+
* This is a render prop that allows you to override the default progress rendering.
|
|
41
|
+
* This is useful if you want to use a different progress component or if you want to add additional props to the progress bar.
|
|
42
|
+
*/
|
|
43
|
+
renderProgress?: (props: Pick<IressProgressProps, 'className' | 'min' | 'max' | 'sectionTitle' | 'value'>) => ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Set the timeouts for showing the progress bar and message.
|
|
46
|
+
*/
|
|
47
|
+
timeout?: {
|
|
48
|
+
/**
|
|
49
|
+
* The time in milliseconds before this component begins to fade out (if `loaded` is set to `true`).
|
|
50
|
+
* @default 1300
|
|
51
|
+
*/
|
|
52
|
+
loaded?: number;
|
|
53
|
+
/**
|
|
54
|
+
* The time in milliseconds before the checklist is displayed.
|
|
55
|
+
* @default 500
|
|
56
|
+
*/
|
|
57
|
+
message?: number;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export declare const LongLoading: ({ children, className, error, estimatedFinishTime, loaded, messageList, progress, renderProgress, timeout, ...restProps }: LongLoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ export interface StartUpLoadingProps extends IressHTMLAttributes {
|
|
|
8
8
|
*/
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
/**
|
|
11
|
-
* Estimated time in milliseconds for the loading to finish.
|
|
11
|
+
* Estimated time in milliseconds for the loading to finish.
|
|
12
12
|
* @default 3000
|
|
13
13
|
*/
|
|
14
14
|
estimatedFinishTime?: number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IressProgressProps } from '../../../components/Progress/Progress.types';
|
|
2
|
+
/**
|
|
3
|
+
* This hook is used to calculate the estimated progress of a loading component, allowing you to show an animated progress bar even when real progress is not available.
|
|
4
|
+
*
|
|
5
|
+
* @param estimatedFinishTime - The estimated time in milliseconds for the loading to finish.
|
|
6
|
+
* @param isLoaded - A boolean value that determines if the component waiting to be loaded has finished loading.
|
|
7
|
+
* @param progress - If provided, will use this as the progress value. If not provided, will use the `estimatedFinishTime` to calculate the progress.
|
|
8
|
+
* @param latestMessageTimecode - The latest timecode of the message list. It helps us determine if still in progress, particularly when its higher than the estimated finish time.
|
|
9
|
+
* @returns A number value that represents the current progress of the loading component.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useEstimatedProgressValue: (estimatedFinishTime: number, isLoaded?: boolean, progress?: IressProgressProps["value"], latestMessageTimecode?: number) => number;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @param isLoaded - A boolean value that determines if the component waiting to be loaded has finished loading.
|
|
5
5
|
* @param delay - Once a component has loaded, how long should the loading indicator be displayed for. This is useful to allow the loading indicator to animate out.
|
|
6
6
|
* @param startFrom - If a component is still loading after this time in milliseconds, you should show the loading message. Default is 500ms, meaning a user will not even see the loading indicator if the page loads before this time.
|
|
7
|
+
* @param avoidDelayTimeout - If the component has a start up animation, this is the time in milliseconds that we will avoid the delay timeout for. This is useful to speed up the loading indicator removal if the component loaded before the first half of an animation finishes.
|
|
7
8
|
* @returns A boolean value that determines whether the `IressLoading` component should be rendered.
|
|
8
9
|
*/
|
|
9
|
-
export declare const useShouldRenderLoading: (isLoaded: boolean, delay?: number, startFrom?: number) => boolean;
|
|
10
|
+
export declare const useShouldRenderLoading: (isLoaded: boolean, delay?: number, startFrom?: number, avoidDelayTimeout?: number) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This hook is used to delay the indicator being shown and removed during the loading process.
|
|
3
|
+
*
|
|
4
|
+
* @param isLoaded - A boolean value that determines if the component waiting to be loaded has finished loading.
|
|
5
|
+
* @param showDelay - Once a component has started loading, how long long we should wait before showing the loading indicator. This is useful to avoid flickering if the component loads quickly.
|
|
6
|
+
* @param hideDelay - Once a component has loaded, how long we should wait before removing the loading indicator. This is useful to allow the loading indicator to animate out.
|
|
7
|
+
* @returns A boolean value that determines whether the loading indicator should be shown.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useShowIndicator: (isLoaded?: boolean, showDelay?: number, hideDelay?: number) => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a polyfill for the `use` hook in React 19, allowing you to suspend a component until the resource (Promise) is resolved.
|
|
3
|
+
* **Note:** For those using React 19, import the `use` hook from React instead of using this polyfill.
|
|
4
|
+
* @param promise The promise to suspend on. Once it resolves, the component will re-render with the resolved value.
|
|
5
|
+
* @returns {T | Error | Promise<void>} If the promise has not resolved, it will throw the promise, causing the component to suspend. If it has resolved successfully, it will return the result. If it has errored, it will throw the error.
|
|
6
|
+
* @see https://react.dev/reference/react/use
|
|
7
|
+
*/
|
|
8
|
+
export declare const useSuspenseResource: <T>(fetcher: () => Promise<T>) => T;
|
|
9
|
+
/**
|
|
10
|
+
* Our polyfill is not as smart as React's `use` hook, so we need to manually uncache the resource after a certain timeout.
|
|
11
|
+
* You usually need this if you are calling parameters with your `useSuspenseResource` hook (eg. `useSuspenseResource(() => fetch('/api/data'))`).
|
|
12
|
+
* **Note:** For those using React 19, import the `use` hook from React instead of using this polyfill.
|
|
13
|
+
* @param fetcher The function that returns a promise to suspend on (usually an API call).
|
|
14
|
+
* @param timeout The time in milliseconds after which the resource will be uncached. Default is 1000ms, usually enough to avoid flickering.
|
|
15
|
+
* @see https://react.dev/reference/react/use
|
|
16
|
+
*/
|
|
17
|
+
export declare const uncacheSuspenseResource: (fetcher: () => Promise<unknown>, timeout?: number) => void;
|