@tanstack/preact-pacer 0.19.2 → 0.19.4
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/async-batcher/useAsyncBatchedCallback.d.cts +0 -1
- package/dist/async-batcher/useAsyncBatchedCallback.d.ts +0 -1
- package/dist/async-debouncer/useAsyncDebouncedCallback.d.cts +0 -1
- package/dist/async-debouncer/useAsyncDebouncedCallback.d.ts +0 -1
- package/dist/async-queuer/useAsyncQueuedState.d.cts +0 -1
- package/dist/async-queuer/useAsyncQueuedState.d.ts +0 -1
- package/dist/async-rate-limiter/useAsyncRateLimitedCallback.d.cts +0 -1
- package/dist/async-rate-limiter/useAsyncRateLimitedCallback.d.ts +0 -1
- package/dist/async-throttler/useAsyncThrottledCallback.d.cts +0 -1
- package/dist/async-throttler/useAsyncThrottledCallback.d.ts +0 -1
- package/dist/batcher/useBatchedCallback.d.cts +0 -1
- package/dist/batcher/useBatchedCallback.d.ts +0 -1
- package/dist/debouncer/useDebouncedCallback.d.cts +0 -1
- package/dist/debouncer/useDebouncedCallback.d.ts +0 -1
- package/dist/debouncer/useDebouncedState.d.cts +0 -1
- package/dist/debouncer/useDebouncedState.d.ts +0 -1
- package/dist/debouncer/useDebouncedValue.d.cts +0 -1
- package/dist/debouncer/useDebouncedValue.d.ts +0 -1
- package/dist/queuer/useQueuedState.d.cts +0 -1
- package/dist/queuer/useQueuedState.d.ts +0 -1
- package/dist/queuer/useQueuedValue.d.cts +0 -1
- package/dist/queuer/useQueuedValue.d.ts +0 -1
- package/dist/rate-limiter/useRateLimitedCallback.d.cts +0 -1
- package/dist/rate-limiter/useRateLimitedCallback.d.ts +0 -1
- package/dist/rate-limiter/useRateLimitedState.d.cts +0 -1
- package/dist/rate-limiter/useRateLimitedState.d.ts +0 -1
- package/dist/rate-limiter/useRateLimitedValue.d.cts +0 -1
- package/dist/rate-limiter/useRateLimitedValue.d.ts +0 -1
- package/dist/throttler/useThrottledCallback.d.cts +0 -1
- package/dist/throttler/useThrottledCallback.d.ts +0 -1
- package/dist/throttler/useThrottledState.d.cts +0 -1
- package/dist/throttler/useThrottledState.d.ts +0 -1
- package/dist/throttler/useThrottledValue.d.cts +0 -1
- package/dist/throttler/useThrottledValue.d.ts +0 -1
- package/package.json +2 -2
|
@@ -2,7 +2,6 @@ import { AsyncBatcherOptions } from "@tanstack/pacer/async-batcher";
|
|
|
2
2
|
import { AnyAsyncFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/async-batcher/useAsyncBatchedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a batched version of an async callback function.
|
|
8
7
|
* This hook is a convenient wrapper around the `useAsyncBatcher` hook,
|
|
@@ -2,7 +2,6 @@ import { AsyncBatcherOptions } from "@tanstack/pacer/async-batcher";
|
|
|
2
2
|
import { AnyAsyncFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/async-batcher/useAsyncBatchedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a batched version of an async callback function.
|
|
8
7
|
* This hook is a convenient wrapper around the `useAsyncBatcher` hook,
|
|
@@ -2,7 +2,6 @@ import { AnyAsyncFunction } from "@tanstack/pacer/types";
|
|
|
2
2
|
import { AsyncDebouncerOptions } from "@tanstack/pacer/async-debouncer";
|
|
3
3
|
|
|
4
4
|
//#region src/async-debouncer/useAsyncDebouncedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a debounced version of an async callback function.
|
|
8
7
|
* This hook is a convenient wrapper around the `useAsyncDebouncer` hook,
|
|
@@ -2,7 +2,6 @@ import { AsyncDebouncerOptions } from "@tanstack/pacer/async-debouncer";
|
|
|
2
2
|
import { AnyAsyncFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/async-debouncer/useAsyncDebouncedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a debounced version of an async callback function.
|
|
8
7
|
* This hook is a convenient wrapper around the `useAsyncDebouncer` hook,
|
|
@@ -2,7 +2,6 @@ import { PreactAsyncQueuer } from "./useAsyncQueuer.cjs";
|
|
|
2
2
|
import { AsyncQueuerOptions, AsyncQueuerState } from "@tanstack/pacer/async-queuer";
|
|
3
3
|
|
|
4
4
|
//#region src/async-queuer/useAsyncQueuedState.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A higher-level Preact hook that creates an `AsyncQueuer` instance with built-in state management.
|
|
8
7
|
*
|
|
@@ -2,7 +2,6 @@ import { PreactAsyncQueuer } from "./useAsyncQueuer.js";
|
|
|
2
2
|
import { AsyncQueuerOptions, AsyncQueuerState } from "@tanstack/pacer/async-queuer";
|
|
3
3
|
|
|
4
4
|
//#region src/async-queuer/useAsyncQueuedState.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A higher-level Preact hook that creates an `AsyncQueuer` instance with built-in state management.
|
|
8
7
|
*
|
|
@@ -2,7 +2,6 @@ import { AnyAsyncFunction } from "@tanstack/pacer/types";
|
|
|
2
2
|
import { AsyncRateLimiterOptions } from "@tanstack/pacer/async-rate-limiter";
|
|
3
3
|
|
|
4
4
|
//#region src/async-rate-limiter/useAsyncRateLimitedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a rate-limited version of an async callback function.
|
|
8
7
|
* This hook is a convenient wrapper around the `useAsyncRateLimiter` hook,
|
|
@@ -2,7 +2,6 @@ import { AsyncRateLimiterOptions } from "@tanstack/pacer/async-rate-limiter";
|
|
|
2
2
|
import { AnyAsyncFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/async-rate-limiter/useAsyncRateLimitedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a rate-limited version of an async callback function.
|
|
8
7
|
* This hook is a convenient wrapper around the `useAsyncRateLimiter` hook,
|
|
@@ -2,7 +2,6 @@ import { AnyAsyncFunction } from "@tanstack/pacer/types";
|
|
|
2
2
|
import { AsyncThrottlerOptions } from "@tanstack/pacer/async-throttler";
|
|
3
3
|
|
|
4
4
|
//#region src/async-throttler/useAsyncThrottledCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a throttled version of an async callback function.
|
|
8
7
|
* This hook is a convenient wrapper around the `useAsyncThrottler` hook,
|
|
@@ -2,7 +2,6 @@ import { AsyncThrottlerOptions } from "@tanstack/pacer/async-throttler";
|
|
|
2
2
|
import { AnyAsyncFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/async-throttler/useAsyncThrottledCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a throttled version of an async callback function.
|
|
8
7
|
* This hook is a convenient wrapper around the `useAsyncThrottler` hook,
|
|
@@ -2,7 +2,6 @@ import { AnyFunction } from "@tanstack/pacer/types";
|
|
|
2
2
|
import { BatcherOptions } from "@tanstack/pacer/batcher";
|
|
3
3
|
|
|
4
4
|
//#region src/batcher/useBatchedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a batched version of a callback function.
|
|
8
7
|
* This hook is essentially a wrapper around the basic `batch` function
|
|
@@ -2,7 +2,6 @@ import { BatcherOptions } from "@tanstack/pacer/batcher";
|
|
|
2
2
|
import { AnyFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/batcher/useBatchedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a batched version of a callback function.
|
|
8
7
|
* This hook is essentially a wrapper around the basic `batch` function
|
|
@@ -2,7 +2,6 @@ import { AnyFunction } from "@tanstack/pacer/types";
|
|
|
2
2
|
import { DebouncerOptions } from "@tanstack/pacer/debouncer";
|
|
3
3
|
|
|
4
4
|
//#region src/debouncer/useDebouncedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a debounced version of a callback function.
|
|
8
7
|
* This hook is essentially a wrapper around the basic `debounce` function
|
|
@@ -2,7 +2,6 @@ import { DebouncerOptions } from "@tanstack/pacer/debouncer";
|
|
|
2
2
|
import { AnyFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/debouncer/useDebouncedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a debounced version of a callback function.
|
|
8
7
|
* This hook is essentially a wrapper around the basic `debounce` function
|
|
@@ -3,7 +3,6 @@ import { DebouncerOptions, DebouncerState } from "@tanstack/pacer/debouncer";
|
|
|
3
3
|
import { Dispatch, StateUpdater } from "preact/hooks";
|
|
4
4
|
|
|
5
5
|
//#region src/debouncer/useDebouncedState.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A Preact hook that creates a debounced state value, combining Preact's useState with debouncing functionality.
|
|
9
8
|
* This hook provides both the current debounced value and methods to update it.
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { DebouncerOptions, DebouncerState } from "@tanstack/pacer/debouncer";
|
|
4
4
|
|
|
5
5
|
//#region src/debouncer/useDebouncedState.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A Preact hook that creates a debounced state value, combining Preact's useState with debouncing functionality.
|
|
9
8
|
* This hook provides both the current debounced value and methods to update it.
|
|
@@ -3,7 +3,6 @@ import { DebouncerOptions, DebouncerState } from "@tanstack/pacer/debouncer";
|
|
|
3
3
|
import { Dispatch, StateUpdater } from "preact/hooks";
|
|
4
4
|
|
|
5
5
|
//#region src/debouncer/useDebouncedValue.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A Preact hook that creates a debounced value that updates only after a specified delay.
|
|
9
8
|
* Unlike useDebouncedState, this hook automatically tracks changes to the input value
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { DebouncerOptions, DebouncerState } from "@tanstack/pacer/debouncer";
|
|
4
4
|
|
|
5
5
|
//#region src/debouncer/useDebouncedValue.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A Preact hook that creates a debounced value that updates only after a specified delay.
|
|
9
8
|
* Unlike useDebouncedState, this hook automatically tracks changes to the input value
|
|
@@ -2,7 +2,6 @@ import { PreactQueuer } from "./useQueuer.cjs";
|
|
|
2
2
|
import { Queuer, QueuerOptions, QueuerState } from "@tanstack/pacer/queuer";
|
|
3
3
|
|
|
4
4
|
//#region src/queuer/useQueuedState.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a queuer with managed state, combining Preact's useState with queuing functionality.
|
|
8
7
|
* This hook provides both the current queue state and queue control methods.
|
|
@@ -2,7 +2,6 @@ import { PreactQueuer } from "./useQueuer.js";
|
|
|
2
2
|
import { Queuer, QueuerOptions, QueuerState } from "@tanstack/pacer/queuer";
|
|
3
3
|
|
|
4
4
|
//#region src/queuer/useQueuedState.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a queuer with managed state, combining Preact's useState with queuing functionality.
|
|
8
7
|
* This hook provides both the current queue state and queue control methods.
|
|
@@ -2,7 +2,6 @@ import { PreactQueuer } from "./useQueuer.cjs";
|
|
|
2
2
|
import { QueuerOptions, QueuerState } from "@tanstack/pacer/queuer";
|
|
3
3
|
|
|
4
4
|
//#region src/queuer/useQueuedValue.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a queued value that processes state changes in order with an optional delay.
|
|
8
7
|
* This hook uses useQueuer internally to manage a queue of state changes and apply them sequentially.
|
|
@@ -2,7 +2,6 @@ import { PreactQueuer } from "./useQueuer.js";
|
|
|
2
2
|
import { QueuerOptions, QueuerState } from "@tanstack/pacer/queuer";
|
|
3
3
|
|
|
4
4
|
//#region src/queuer/useQueuedValue.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a queued value that processes state changes in order with an optional delay.
|
|
8
7
|
* This hook uses useQueuer internally to manage a queue of state changes and apply them sequentially.
|
|
@@ -2,7 +2,6 @@ import { AnyFunction } from "@tanstack/pacer/types";
|
|
|
2
2
|
import { RateLimiterOptions } from "@tanstack/pacer/rate-limiter";
|
|
3
3
|
|
|
4
4
|
//#region src/rate-limiter/useRateLimitedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a rate-limited version of a callback function.
|
|
8
7
|
* This hook is essentially a wrapper around the basic `rateLimiter` function
|
|
@@ -2,7 +2,6 @@ import { RateLimiterOptions } from "@tanstack/pacer/rate-limiter";
|
|
|
2
2
|
import { AnyFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/rate-limiter/useRateLimitedCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a rate-limited version of a callback function.
|
|
8
7
|
* This hook is essentially a wrapper around the basic `rateLimiter` function
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { RateLimiterOptions, RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
4
4
|
|
|
5
5
|
//#region src/rate-limiter/useRateLimitedState.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A Preact hook that creates a rate-limited state value that enforces a hard limit on state updates within a time window.
|
|
9
8
|
* This hook combines Preact's useState with rate limiting functionality to provide controlled state updates.
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { RateLimiterOptions, RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
4
4
|
|
|
5
5
|
//#region src/rate-limiter/useRateLimitedState.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A Preact hook that creates a rate-limited state value that enforces a hard limit on state updates within a time window.
|
|
9
8
|
* This hook combines Preact's useState with rate limiting functionality to provide controlled state updates.
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { RateLimiterOptions, RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
4
4
|
|
|
5
5
|
//#region src/rate-limiter/useRateLimitedValue.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A high-level Preact hook that creates a rate-limited version of a value that updates at most a certain number of times within a time window.
|
|
9
8
|
* This hook uses Preact's useState internally to manage the rate-limited state.
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { RateLimiterOptions, RateLimiterState } from "@tanstack/pacer/rate-limiter";
|
|
4
4
|
|
|
5
5
|
//#region src/rate-limiter/useRateLimitedValue.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A high-level Preact hook that creates a rate-limited version of a value that updates at most a certain number of times within a time window.
|
|
9
8
|
* This hook uses Preact's useState internally to manage the rate-limited state.
|
|
@@ -2,7 +2,6 @@ import { AnyFunction } from "@tanstack/pacer/types";
|
|
|
2
2
|
import { ThrottlerOptions } from "@tanstack/pacer/throttler";
|
|
3
3
|
|
|
4
4
|
//#region src/throttler/useThrottledCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a throttled version of a callback function.
|
|
8
7
|
* This hook is essentially a wrapper around the basic `throttle` function
|
|
@@ -2,7 +2,6 @@ import { ThrottlerOptions } from "@tanstack/pacer/throttler";
|
|
|
2
2
|
import { AnyFunction } from "@tanstack/pacer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/throttler/useThrottledCallback.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* A Preact hook that creates a throttled version of a callback function.
|
|
8
7
|
* This hook is essentially a wrapper around the basic `throttle` function
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { ThrottlerOptions, ThrottlerState } from "@tanstack/pacer/throttler";
|
|
4
4
|
|
|
5
5
|
//#region src/throttler/useThrottledState.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A Preact hook that creates a throttled state value that updates at most once within a specified time window.
|
|
9
8
|
* This hook combines Preact's useState with throttling functionality to provide controlled state updates.
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { ThrottlerOptions, ThrottlerState } from "@tanstack/pacer/throttler";
|
|
4
4
|
|
|
5
5
|
//#region src/throttler/useThrottledState.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A Preact hook that creates a throttled state value that updates at most once within a specified time window.
|
|
9
8
|
* This hook combines Preact's useState with throttling functionality to provide controlled state updates.
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { ThrottlerOptions, ThrottlerState } from "@tanstack/pacer/throttler";
|
|
4
4
|
|
|
5
5
|
//#region src/throttler/useThrottledValue.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A high-level Preact hook that creates a throttled version of a value that updates at most once within a specified time window.
|
|
9
8
|
* This hook uses Preact's useState internally to manage the throttled state.
|
|
@@ -3,7 +3,6 @@ import { Dispatch, StateUpdater } from "preact/hooks";
|
|
|
3
3
|
import { ThrottlerOptions, ThrottlerState } from "@tanstack/pacer/throttler";
|
|
4
4
|
|
|
5
5
|
//#region src/throttler/useThrottledValue.d.ts
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* A high-level Preact hook that creates a throttled version of a value that updates at most once within a specified time window.
|
|
9
8
|
* This hook uses Preact's useState internally to manage the throttled state.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/preact-pacer",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"description": "Utilities for debouncing and throttling functions in Preact.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
],
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"@tanstack/preact-store": "^0.10.1",
|
|
102
|
-
"@tanstack/pacer": "0.
|
|
102
|
+
"@tanstack/pacer": "0.18.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@preact/preset-vite": "^2.10.2",
|