@tanstack/solid-pacer 0.22.0 → 0.23.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.
Files changed (170) hide show
  1. package/README.md +4 -4
  2. package/dist/async-batcher/createAsyncBatcher.d.ts +5 -9
  3. package/dist/async-batcher/createAsyncBatcher.js +2 -5
  4. package/dist/async-debouncer/createAsyncDebouncer.d.ts +8 -11
  5. package/dist/async-debouncer/createAsyncDebouncer.js +5 -7
  6. package/dist/async-queuer/createAsyncQueuer.d.ts +9 -11
  7. package/dist/async-queuer/createAsyncQueuer.js +4 -5
  8. package/dist/async-rate-limiter/createAsyncRateLimiter.d.ts +10 -12
  9. package/dist/async-rate-limiter/createAsyncRateLimiter.js +7 -8
  10. package/dist/async-throttler/createAsyncThrottler.d.ts +8 -13
  11. package/dist/async-throttler/createAsyncThrottler.js +5 -9
  12. package/dist/batcher/createBatcher.d.ts +11 -14
  13. package/dist/batcher/createBatcher.js +6 -8
  14. package/dist/debouncer/createDebouncedSignal.d.ts +2 -4
  15. package/dist/debouncer/createDebouncedSignal.js +1 -2
  16. package/dist/debouncer/createDebouncedValue.d.ts +2 -4
  17. package/dist/debouncer/createDebouncedValue.js +1 -2
  18. package/dist/debouncer/createDebouncer.d.ts +4 -6
  19. package/dist/debouncer/createDebouncer.js +1 -2
  20. package/dist/provider/PacerProvider.d.ts +6 -8
  21. package/dist/provider/PacerProvider.js +1 -2
  22. package/dist/queuer/createQueuedSignal.d.ts +2 -4
  23. package/dist/queuer/createQueuedSignal.js +1 -2
  24. package/dist/queuer/createQueuer.d.ts +4 -6
  25. package/dist/queuer/createQueuer.js +1 -2
  26. package/dist/rate-limiter/createRateLimitedSignal.d.ts +12 -13
  27. package/dist/rate-limiter/createRateLimitedSignal.js +11 -11
  28. package/dist/rate-limiter/createRateLimitedValue.d.ts +2 -4
  29. package/dist/rate-limiter/createRateLimitedValue.js +1 -2
  30. package/dist/rate-limiter/createRateLimiter.d.ts +8 -9
  31. package/dist/rate-limiter/createRateLimiter.js +5 -5
  32. package/dist/throttler/createThrottledSignal.d.ts +2 -6
  33. package/dist/throttler/createThrottledSignal.js +1 -4
  34. package/dist/throttler/createThrottledValue.d.ts +2 -6
  35. package/dist/throttler/createThrottledValue.js +1 -4
  36. package/dist/throttler/createThrottler.d.ts +4 -8
  37. package/dist/throttler/createThrottler.js +1 -4
  38. package/package.json +23 -67
  39. package/dist/async-batcher/createAsyncBatcher.cjs +0 -166
  40. package/dist/async-batcher/createAsyncBatcher.cjs.map +0 -1
  41. package/dist/async-batcher/createAsyncBatcher.d.cts +0 -177
  42. package/dist/async-batcher/createAsyncBatcher.js.map +0 -1
  43. package/dist/async-batcher/index.cjs +0 -11
  44. package/dist/async-batcher/index.d.cts +0 -3
  45. package/dist/async-debouncer/createAsyncDebouncer.cjs +0 -151
  46. package/dist/async-debouncer/createAsyncDebouncer.cjs.map +0 -1
  47. package/dist/async-debouncer/createAsyncDebouncer.d.cts +0 -163
  48. package/dist/async-debouncer/createAsyncDebouncer.js.map +0 -1
  49. package/dist/async-debouncer/index.cjs +0 -11
  50. package/dist/async-debouncer/index.d.cts +0 -3
  51. package/dist/async-queuer/createAsyncQueuer.cjs +0 -158
  52. package/dist/async-queuer/createAsyncQueuer.cjs.map +0 -1
  53. package/dist/async-queuer/createAsyncQueuer.d.cts +0 -169
  54. package/dist/async-queuer/createAsyncQueuer.js.map +0 -1
  55. package/dist/async-queuer/index.cjs +0 -11
  56. package/dist/async-queuer/index.d.cts +0 -3
  57. package/dist/async-rate-limiter/createAsyncRateLimiter.cjs +0 -193
  58. package/dist/async-rate-limiter/createAsyncRateLimiter.cjs.map +0 -1
  59. package/dist/async-rate-limiter/createAsyncRateLimiter.d.cts +0 -208
  60. package/dist/async-rate-limiter/createAsyncRateLimiter.js.map +0 -1
  61. package/dist/async-rate-limiter/index.cjs +0 -11
  62. package/dist/async-rate-limiter/index.d.cts +0 -3
  63. package/dist/async-throttler/createAsyncThrottler.cjs +0 -151
  64. package/dist/async-throttler/createAsyncThrottler.cjs.map +0 -1
  65. package/dist/async-throttler/createAsyncThrottler.d.cts +0 -163
  66. package/dist/async-throttler/createAsyncThrottler.js.map +0 -1
  67. package/dist/async-throttler/index.cjs +0 -11
  68. package/dist/async-throttler/index.d.cts +0 -3
  69. package/dist/batcher/createBatcher.cjs +0 -132
  70. package/dist/batcher/createBatcher.cjs.map +0 -1
  71. package/dist/batcher/createBatcher.d.cts +0 -146
  72. package/dist/batcher/createBatcher.js.map +0 -1
  73. package/dist/batcher/index.cjs +0 -11
  74. package/dist/batcher/index.d.cts +0 -3
  75. package/dist/debouncer/createDebouncedSignal.cjs +0 -88
  76. package/dist/debouncer/createDebouncedSignal.cjs.map +0 -1
  77. package/dist/debouncer/createDebouncedSignal.d.cts +0 -79
  78. package/dist/debouncer/createDebouncedSignal.js.map +0 -1
  79. package/dist/debouncer/createDebouncedValue.cjs +0 -77
  80. package/dist/debouncer/createDebouncedValue.cjs.map +0 -1
  81. package/dist/debouncer/createDebouncedValue.d.cts +0 -70
  82. package/dist/debouncer/createDebouncedValue.js.map +0 -1
  83. package/dist/debouncer/createDebouncer.cjs +0 -129
  84. package/dist/debouncer/createDebouncer.cjs.map +0 -1
  85. package/dist/debouncer/createDebouncer.d.cts +0 -144
  86. package/dist/debouncer/createDebouncer.js.map +0 -1
  87. package/dist/debouncer/index.cjs +0 -15
  88. package/dist/debouncer/index.d.cts +0 -5
  89. package/dist/index.cjs +0 -47
  90. package/dist/index.d.cts +0 -20
  91. package/dist/provider/PacerProvider.cjs +0 -27
  92. package/dist/provider/PacerProvider.cjs.map +0 -1
  93. package/dist/provider/PacerProvider.d.cts +0 -28
  94. package/dist/provider/PacerProvider.js.map +0 -1
  95. package/dist/provider/index.cjs +0 -6
  96. package/dist/provider/index.d.cts +0 -2
  97. package/dist/queuer/createQueuedSignal.cjs +0 -129
  98. package/dist/queuer/createQueuedSignal.cjs.map +0 -1
  99. package/dist/queuer/createQueuedSignal.d.cts +0 -121
  100. package/dist/queuer/createQueuedSignal.js.map +0 -1
  101. package/dist/queuer/createQueuer.cjs +0 -133
  102. package/dist/queuer/createQueuer.cjs.map +0 -1
  103. package/dist/queuer/createQueuer.d.cts +0 -147
  104. package/dist/queuer/createQueuer.js.map +0 -1
  105. package/dist/queuer/index.cjs +0 -13
  106. package/dist/queuer/index.d.cts +0 -4
  107. package/dist/rate-limiter/createRateLimitedSignal.cjs +0 -102
  108. package/dist/rate-limiter/createRateLimitedSignal.cjs.map +0 -1
  109. package/dist/rate-limiter/createRateLimitedSignal.d.cts +0 -93
  110. package/dist/rate-limiter/createRateLimitedSignal.js.map +0 -1
  111. package/dist/rate-limiter/createRateLimitedValue.cjs +0 -102
  112. package/dist/rate-limiter/createRateLimitedValue.cjs.map +0 -1
  113. package/dist/rate-limiter/createRateLimitedValue.d.cts +0 -95
  114. package/dist/rate-limiter/createRateLimitedValue.js.map +0 -1
  115. package/dist/rate-limiter/createRateLimiter.cjs +0 -157
  116. package/dist/rate-limiter/createRateLimiter.cjs.map +0 -1
  117. package/dist/rate-limiter/createRateLimiter.d.cts +0 -173
  118. package/dist/rate-limiter/createRateLimiter.js.map +0 -1
  119. package/dist/rate-limiter/index.cjs +0 -15
  120. package/dist/rate-limiter/index.d.cts +0 -5
  121. package/dist/throttler/createThrottledSignal.cjs +0 -79
  122. package/dist/throttler/createThrottledSignal.cjs.map +0 -1
  123. package/dist/throttler/createThrottledSignal.d.cts +0 -70
  124. package/dist/throttler/createThrottledSignal.js.map +0 -1
  125. package/dist/throttler/createThrottledValue.cjs +0 -74
  126. package/dist/throttler/createThrottledValue.cjs.map +0 -1
  127. package/dist/throttler/createThrottledValue.d.cts +0 -67
  128. package/dist/throttler/createThrottledValue.js.map +0 -1
  129. package/dist/throttler/createThrottler.cjs +0 -132
  130. package/dist/throttler/createThrottler.cjs.map +0 -1
  131. package/dist/throttler/createThrottler.d.cts +0 -147
  132. package/dist/throttler/createThrottler.js.map +0 -1
  133. package/dist/throttler/index.cjs +0 -15
  134. package/dist/throttler/index.d.cts +0 -5
  135. package/dist/types/index.cjs +0 -8
  136. package/dist/types/index.d.cts +0 -1
  137. package/dist/utils/index.cjs +0 -8
  138. package/dist/utils/index.d.cts +0 -1
  139. package/src/async-batcher/createAsyncBatcher.ts +0 -234
  140. package/src/async-batcher/index.ts +0 -3
  141. package/src/async-debouncer/createAsyncDebouncer.ts +0 -225
  142. package/src/async-debouncer/index.ts +0 -4
  143. package/src/async-queuer/createAsyncQueuer.ts +0 -226
  144. package/src/async-queuer/index.ts +0 -3
  145. package/src/async-rate-limiter/createAsyncRateLimiter.ts +0 -269
  146. package/src/async-rate-limiter/index.ts +0 -4
  147. package/src/async-throttler/createAsyncThrottler.ts +0 -225
  148. package/src/async-throttler/index.ts +0 -4
  149. package/src/batcher/createBatcher.ts +0 -199
  150. package/src/batcher/index.ts +0 -3
  151. package/src/debouncer/createDebouncedSignal.ts +0 -92
  152. package/src/debouncer/createDebouncedValue.ts +0 -85
  153. package/src/debouncer/createDebouncer.ts +0 -201
  154. package/src/debouncer/index.ts +0 -6
  155. package/src/index.ts +0 -46
  156. package/src/provider/PacerProvider.tsx +0 -63
  157. package/src/provider/index.ts +0 -1
  158. package/src/queuer/createQueuedSignal.ts +0 -138
  159. package/src/queuer/createQueuer.ts +0 -199
  160. package/src/queuer/index.ts +0 -4
  161. package/src/rate-limiter/createRateLimitedSignal.ts +0 -117
  162. package/src/rate-limiter/createRateLimitedValue.ts +0 -110
  163. package/src/rate-limiter/createRateLimiter.ts +0 -226
  164. package/src/rate-limiter/index.ts +0 -5
  165. package/src/throttler/createThrottledSignal.ts +0 -81
  166. package/src/throttler/createThrottledValue.ts +0 -82
  167. package/src/throttler/createThrottler.ts +0 -204
  168. package/src/throttler/index.ts +0 -6
  169. package/src/types/index.ts +0 -1
  170. package/src/utils/index.ts +0 -1
package/README.md CHANGED
@@ -103,10 +103,10 @@ A lightweight timing and scheduling library for debouncing, throttling, rate lim
103
103
  > [!NOTE]
104
104
  > You may know **TanStack Pacer** by our adapter names, too!
105
105
  >
106
- > - [**React Pacer**](https://tanstack.com/pacer/latest/docs/framework/react/react-pacer)
107
- > - [**Preact Pacer**](https://tanstack.com/pacer/latest/docs/framework/preact/preact-pacer)
108
- > - [**Solid Pacer**](https://tanstack.com/pacer/latest/docs/framework/solid/solid-pacer)
109
- > - [**Angular Pacer**](https://tanstack.com/pacer/latest/docs/framework/angular/angular-pacer)
106
+ > - [**React Pacer**](https://tanstack.com/pacer/latest/docs/framework/react)
107
+ > - [**Preact Pacer**](https://tanstack.com/pacer/latest/docs/framework/preact)
108
+ > - [**Solid Pacer**](https://tanstack.com/pacer/latest/docs/framework/solid)
109
+ > - [**Angular Pacer**](https://tanstack.com/pacer/latest/docs/framework/angular)
110
110
  > - Svelte Pacer - needs a contributor!
111
111
  > - Vue Pacer - needs a contributor!
112
112
 
@@ -2,14 +2,14 @@ import { Accessor, JSX } from "solid-js";
2
2
  import { AsyncBatcher, AsyncBatcherOptions, AsyncBatcherState } from "@tanstack/pacer/async-batcher";
3
3
  import { Store } from "@tanstack/solid-store";
4
4
  //#region src/async-batcher/createAsyncBatcher.d.ts
5
- interface SolidAsyncBatcherOptions<TValue, TSelected = {}> extends AsyncBatcherOptions<TValue> {
5
+ export interface SolidAsyncBatcherOptions<TValue, TSelected = {}> extends AsyncBatcherOptions<TValue> {
6
6
  /**
7
7
  * Optional callback invoked when the owning component unmounts. Receives the batcher instance.
8
8
  * When provided, replaces the default cleanup (cancel + abort); use it to call flush(), reset(), cancel(), add logging, etc.
9
9
  */
10
10
  onUnmount?: (batcher: SolidAsyncBatcher<TValue, TSelected>) => void;
11
11
  }
12
- interface SolidAsyncBatcher<TValue, TSelected = {}> extends Omit<AsyncBatcher<TValue>, 'store'> {
12
+ export interface SolidAsyncBatcher<TValue, TSelected = {}> extends Omit<AsyncBatcher<TValue>, 'store'> {
13
13
  /**
14
14
  * A Solid component that allows you to subscribe to the batcher state.
15
15
  *
@@ -94,10 +94,8 @@ interface SolidAsyncBatcher<TValue, TSelected = {}> extends Omit<AsyncBatcher<TV
94
94
  * Available state properties:
95
95
  * - `errorCount`: Number of failed batch executions
96
96
  * - `executionCount`: Total number of batch execution attempts (successful + failed)
97
- * - `hasError`: Whether the last batch execution resulted in an error
98
97
  * - `isExecuting`: Whether a batch execution is currently in progress
99
98
  * - `items`: Array of items currently queued for batching
100
- * - `lastError`: The error from the most recent failed batch execution (if any)
101
99
  * - `lastResult`: The result from the most recent successful batch execution
102
100
  * - `settleCount`: Number of batch executions that have completed (successful or failed)
103
101
  * - `successCount`: Number of successful batch executions
@@ -158,7 +156,7 @@ interface SolidAsyncBatcher<TValue, TSelected = {}> extends Omit<AsyncBatcher<TV
158
156
  * return results;
159
157
  * },
160
158
  * { maxSize: 10, wait: 2000 },
161
- * (state) => ({ hasError: state.hasError, lastError: state.lastError })
159
+ * (state) => ({ errorCount: state.errorCount })
162
160
  * );
163
161
  *
164
162
  * // Add items to batch
@@ -171,7 +169,5 @@ interface SolidAsyncBatcher<TValue, TSelected = {}> extends Omit<AsyncBatcher<TV
171
169
  * const { items, isExecuting } = asyncBatcher.state();
172
170
  * ```
173
171
  */
174
- declare function createAsyncBatcher<TValue, TSelected = {}>(fn: (items: Array<TValue>) => Promise<any>, options?: SolidAsyncBatcherOptions<TValue, TSelected>, selector?: (state: AsyncBatcherState<TValue>) => TSelected): SolidAsyncBatcher<TValue, TSelected>;
175
- //#endregion
176
- export { SolidAsyncBatcher, SolidAsyncBatcherOptions, createAsyncBatcher };
177
- //# sourceMappingURL=createAsyncBatcher.d.ts.map
172
+ export declare function createAsyncBatcher<TValue, TSelected = {}>(fn: (items: Array<TValue>) => Promise<any>, options?: SolidAsyncBatcherOptions<TValue, TSelected>, selector?: (state: AsyncBatcherState<TValue>) => TSelected): SolidAsyncBatcher<TValue, TSelected>;
173
+ //#endregion
@@ -58,10 +58,8 @@ import { shallow, useSelector } from "@tanstack/solid-store";
58
58
  * Available state properties:
59
59
  * - `errorCount`: Number of failed batch executions
60
60
  * - `executionCount`: Total number of batch execution attempts (successful + failed)
61
- * - `hasError`: Whether the last batch execution resulted in an error
62
61
  * - `isExecuting`: Whether a batch execution is currently in progress
63
62
  * - `items`: Array of items currently queued for batching
64
- * - `lastError`: The error from the most recent failed batch execution (if any)
65
63
  * - `lastResult`: The result from the most recent successful batch execution
66
64
  * - `settleCount`: Number of batch executions that have completed (successful or failed)
67
65
  * - `successCount`: Number of successful batch executions
@@ -122,7 +120,7 @@ import { shallow, useSelector } from "@tanstack/solid-store";
122
120
  * return results;
123
121
  * },
124
122
  * { maxSize: 10, wait: 2000 },
125
- * (state) => ({ hasError: state.hasError, lastError: state.lastError })
123
+ * (state) => ({ errorCount: state.errorCount })
126
124
  * );
127
125
  *
128
126
  * // Add items to batch
@@ -162,5 +160,4 @@ function createAsyncBatcher(fn, options = {}, selector = () => ({})) {
162
160
  }
163
161
 
164
162
  //#endregion
165
- export { createAsyncBatcher };
166
- //# sourceMappingURL=createAsyncBatcher.js.map
163
+ export { createAsyncBatcher };
@@ -3,14 +3,14 @@ import { Store } from "@tanstack/solid-store";
3
3
  import { AsyncDebouncer, AsyncDebouncerOptions, AsyncDebouncerState } from "@tanstack/pacer/async-debouncer";
4
4
  import { AnyAsyncFunction } from "@tanstack/pacer/types";
5
5
  //#region src/async-debouncer/createAsyncDebouncer.d.ts
6
- interface SolidAsyncDebouncerOptions<TFn extends AnyAsyncFunction, TSelected = {}> extends AsyncDebouncerOptions<TFn> {
6
+ export interface SolidAsyncDebouncerOptions<TFn extends AnyAsyncFunction, TSelected = {}> extends AsyncDebouncerOptions<TFn> {
7
7
  /**
8
8
  * Optional callback invoked when the owning component unmounts. Receives the debouncer instance.
9
9
  * When provided, replaces the default cleanup (cancel + abort); use it to call flush(), reset(), cancel(), add logging, etc.
10
10
  */
11
11
  onUnmount?: (debouncer: SolidAsyncDebouncer<TFn, TSelected>) => void;
12
12
  }
13
- interface SolidAsyncDebouncer<TFn extends AnyAsyncFunction, TSelected = {}> extends Omit<AsyncDebouncer<TFn>, 'store'> {
13
+ export interface SolidAsyncDebouncer<TFn extends AnyAsyncFunction, TSelected = {}> extends Omit<AsyncDebouncer<TFn>, 'store'> {
14
14
  /**
15
15
  * A Solid component that allows you to subscribe to the debouncer state.
16
16
  *
@@ -88,14 +88,13 @@ interface SolidAsyncDebouncer<TFn extends AnyAsyncFunction, TSelected = {}> exte
88
88
  *
89
89
  * Available state properties:
90
90
  * - `canLeadingExecute`: Whether the debouncer can execute on the leading edge
91
- * - `executionCount`: Number of function executions that have been completed
92
- * - `hasError`: Whether the last execution resulted in an error
91
+ * - `settleCount`: Number of function executions that have completed (success or error)
92
+ * - `errorCount`: Number of function executions that have resulted in errors
93
93
  * - `isPending`: Whether the debouncer is waiting for the timeout to trigger execution
94
94
  * - `isExecuting`: Whether an async function execution is currently in progress
95
95
  * - `lastArgs`: The arguments from the most recent call to maybeExecute
96
- * - `lastError`: The error from the most recent failed execution (if any)
97
96
  * - `lastResult`: The result from the most recent successful execution
98
- * - `status`: Current execution status ('disabled' | 'idle' | 'pending' | 'executing')
97
+ * - `status`: Current execution status ('disabled' | 'idle' | 'pending' | 'executing' | 'settled')
99
98
  *
100
99
  * ## Unmount behavior
101
100
  *
@@ -150,14 +149,12 @@ interface SolidAsyncDebouncer<TFn extends AnyAsyncFunction, TSelected = {}> exte
150
149
  * console.error('API call failed:', error);
151
150
  * }
152
151
  * },
153
- * (state) => ({ hasError: state.hasError, lastError: state.lastError })
152
+ * (state) => ({ errorCount: state.errorCount })
154
153
  * );
155
154
  *
156
155
  * // Access the selected state (will be empty object {} unless selector provided)
157
156
  * const { isPending, isExecuting } = debouncer.state();
158
157
  * ```
159
158
  */
160
- declare function createAsyncDebouncer<TFn extends AnyAsyncFunction, TSelected = {}>(fn: TFn, options: SolidAsyncDebouncerOptions<TFn, TSelected>, selector?: (state: AsyncDebouncerState<TFn>) => TSelected): SolidAsyncDebouncer<TFn, TSelected>;
161
- //#endregion
162
- export { SolidAsyncDebouncer, SolidAsyncDebouncerOptions, createAsyncDebouncer };
163
- //# sourceMappingURL=createAsyncDebouncer.d.ts.map
159
+ export declare function createAsyncDebouncer<TFn extends AnyAsyncFunction, TSelected = {}>(fn: TFn, options: SolidAsyncDebouncerOptions<TFn, TSelected>, selector?: (state: AsyncDebouncerState<TFn>) => TSelected): SolidAsyncDebouncer<TFn, TSelected>;
160
+ //#endregion
@@ -51,14 +51,13 @@ import { AsyncDebouncer } from "@tanstack/pacer/async-debouncer";
51
51
  *
52
52
  * Available state properties:
53
53
  * - `canLeadingExecute`: Whether the debouncer can execute on the leading edge
54
- * - `executionCount`: Number of function executions that have been completed
55
- * - `hasError`: Whether the last execution resulted in an error
54
+ * - `settleCount`: Number of function executions that have completed (success or error)
55
+ * - `errorCount`: Number of function executions that have resulted in errors
56
56
  * - `isPending`: Whether the debouncer is waiting for the timeout to trigger execution
57
57
  * - `isExecuting`: Whether an async function execution is currently in progress
58
58
  * - `lastArgs`: The arguments from the most recent call to maybeExecute
59
- * - `lastError`: The error from the most recent failed execution (if any)
60
59
  * - `lastResult`: The result from the most recent successful execution
61
- * - `status`: Current execution status ('disabled' | 'idle' | 'pending' | 'executing')
60
+ * - `status`: Current execution status ('disabled' | 'idle' | 'pending' | 'executing' | 'settled')
62
61
  *
63
62
  * ## Unmount behavior
64
63
  *
@@ -113,7 +112,7 @@ import { AsyncDebouncer } from "@tanstack/pacer/async-debouncer";
113
112
  * console.error('API call failed:', error);
114
113
  * }
115
114
  * },
116
- * (state) => ({ hasError: state.hasError, lastError: state.lastError })
115
+ * (state) => ({ errorCount: state.errorCount })
117
116
  * );
118
117
  *
119
118
  * // Access the selected state (will be empty object {} unless selector provided)
@@ -147,5 +146,4 @@ function createAsyncDebouncer(fn, options, selector = () => ({})) {
147
146
  }
148
147
 
149
148
  //#endregion
150
- export { createAsyncDebouncer };
151
- //# sourceMappingURL=createAsyncDebouncer.js.map
149
+ export { createAsyncDebouncer };
@@ -2,14 +2,14 @@ import { Accessor, JSX } from "solid-js";
2
2
  import { Store } from "@tanstack/solid-store";
3
3
  import { AsyncQueuer, AsyncQueuerOptions, AsyncQueuerState } from "@tanstack/pacer/async-queuer";
4
4
  //#region src/async-queuer/createAsyncQueuer.d.ts
5
- interface SolidAsyncQueuerOptions<TValue, TSelected = {}> extends AsyncQueuerOptions<TValue> {
5
+ export interface SolidAsyncQueuerOptions<TValue, TSelected = {}> extends AsyncQueuerOptions<TValue> {
6
6
  /**
7
7
  * Optional callback invoked when the owning component unmounts. Receives the queuer instance.
8
8
  * When provided, replaces the default cleanup (stop + abort); use it to call flush(), flushAsBatch(), stop(), add logging, etc.
9
9
  */
10
10
  onUnmount?: (queuer: SolidAsyncQueuer<TValue, TSelected>) => void;
11
11
  }
12
- interface SolidAsyncQueuer<TValue, TSelected = {}> extends Omit<AsyncQueuer<TValue>, 'store'> {
12
+ export interface SolidAsyncQueuer<TValue, TSelected = {}> extends Omit<AsyncQueuer<TValue>, 'store'> {
13
13
  /**
14
14
  * A Solid component that allows you to subscribe to the queuer state.
15
15
  *
@@ -17,9 +17,9 @@ interface SolidAsyncQueuer<TValue, TSelected = {}> extends Omit<AsyncQueuer<TVal
17
17
  * deep in your component tree without needing to pass a selector to the hook.
18
18
  *
19
19
  * @example
20
- * <queuer.Subscribe selector={(state) => ({ pendingItems: state.pendingItems, activeItems: state.activeItems })}>
20
+ * <queuer.Subscribe selector={(state) => ({ items: state.items, activeItems: state.activeItems })}>
21
21
  * {(state) => (
22
- * <div>Pending: {state().pendingItems.length}, Active: {state().activeItems.length}</div>
22
+ * <div>Pending: {state().items.length}, Active: {state().activeItems.length}</div>
23
23
  * )}
24
24
  * </queuer.Subscribe>
25
25
  */
@@ -88,7 +88,7 @@ interface SolidAsyncQueuer<TValue, TSelected = {}> extends Omit<AsyncQueuer<TVal
88
88
  * - `activeItems`: Array of items currently being processed
89
89
  * - `errorCount`: Number of items that failed processing
90
90
  * - `isRunning`: Whether the queuer is currently running (not stopped)
91
- * - `pendingItems`: Array of items waiting to be processed
91
+ * - `items`: Array of items waiting to be processed
92
92
  * - `rejectionCount`: Number of items that were rejected (expired or failed validation)
93
93
  * - `settleCount`: Number of items that have completed processing (successful or failed)
94
94
  * - `successCount`: Number of items that were processed successfully
@@ -136,7 +136,7 @@ interface SolidAsyncQueuer<TValue, TSelected = {}> extends Omit<AsyncQueuer<TVal
136
136
  * async (item) => await fetchData(item),
137
137
  * { concurrency: 2, started: true },
138
138
  * (state) => ({
139
- * pendingItems: state.pendingItems,
139
+ * items: state.items,
140
140
  * activeItems: state.activeItems,
141
141
  * isRunning: state.isRunning
142
142
  * })
@@ -160,10 +160,8 @@ interface SolidAsyncQueuer<TValue, TSelected = {}> extends Omit<AsyncQueuer<TVal
160
160
  * asyncQueuer.start();
161
161
  *
162
162
  * // Access the selected state (will be empty object {} unless selector provided)
163
- * const { pendingItems, activeItems } = asyncQueuer.state();
163
+ * const { items, activeItems } = asyncQueuer.state();
164
164
  * ```
165
165
  */
166
- declare function createAsyncQueuer<TValue, TSelected = {}>(fn: (value: TValue) => Promise<any>, options?: SolidAsyncQueuerOptions<TValue, TSelected>, selector?: (state: AsyncQueuerState<TValue>) => TSelected): SolidAsyncQueuer<TValue, TSelected>;
167
- //#endregion
168
- export { SolidAsyncQueuer, SolidAsyncQueuerOptions, createAsyncQueuer };
169
- //# sourceMappingURL=createAsyncQueuer.d.ts.map
166
+ export declare function createAsyncQueuer<TValue, TSelected = {}>(fn: (value: TValue) => Promise<any>, options?: SolidAsyncQueuerOptions<TValue, TSelected>, selector?: (state: AsyncQueuerState<TValue>) => TSelected): SolidAsyncQueuer<TValue, TSelected>;
167
+ //#endregion
@@ -52,7 +52,7 @@ import { AsyncQueuer } from "@tanstack/pacer/async-queuer";
52
52
  * - `activeItems`: Array of items currently being processed
53
53
  * - `errorCount`: Number of items that failed processing
54
54
  * - `isRunning`: Whether the queuer is currently running (not stopped)
55
- * - `pendingItems`: Array of items waiting to be processed
55
+ * - `items`: Array of items waiting to be processed
56
56
  * - `rejectionCount`: Number of items that were rejected (expired or failed validation)
57
57
  * - `settleCount`: Number of items that have completed processing (successful or failed)
58
58
  * - `successCount`: Number of items that were processed successfully
@@ -100,7 +100,7 @@ import { AsyncQueuer } from "@tanstack/pacer/async-queuer";
100
100
  * async (item) => await fetchData(item),
101
101
  * { concurrency: 2, started: true },
102
102
  * (state) => ({
103
- * pendingItems: state.pendingItems,
103
+ * items: state.items,
104
104
  * activeItems: state.activeItems,
105
105
  * isRunning: state.isRunning
106
106
  * })
@@ -124,7 +124,7 @@ import { AsyncQueuer } from "@tanstack/pacer/async-queuer";
124
124
  * asyncQueuer.start();
125
125
  *
126
126
  * // Access the selected state (will be empty object {} unless selector provided)
127
- * const { pendingItems, activeItems } = asyncQueuer.state();
127
+ * const { items, activeItems } = asyncQueuer.state();
128
128
  * ```
129
129
  */
130
130
  function createAsyncQueuer(fn, options = {}, selector = () => ({})) {
@@ -154,5 +154,4 @@ function createAsyncQueuer(fn, options = {}, selector = () => ({})) {
154
154
  }
155
155
 
156
156
  //#endregion
157
- export { createAsyncQueuer };
158
- //# sourceMappingURL=createAsyncQueuer.js.map
157
+ export { createAsyncQueuer };
@@ -3,14 +3,14 @@ import { Store } from "@tanstack/solid-store";
3
3
  import { AsyncRateLimiter, AsyncRateLimiterOptions, AsyncRateLimiterState } from "@tanstack/pacer/async-rate-limiter";
4
4
  import { AnyAsyncFunction } from "@tanstack/pacer/types";
5
5
  //#region src/async-rate-limiter/createAsyncRateLimiter.d.ts
6
- interface SolidAsyncRateLimiterOptions<TFn extends AnyAsyncFunction, TSelected = {}> extends AsyncRateLimiterOptions<TFn> {
6
+ export interface SolidAsyncRateLimiterOptions<TFn extends AnyAsyncFunction, TSelected = {}> extends AsyncRateLimiterOptions<TFn> {
7
7
  /**
8
8
  * Optional callback invoked when the owning component unmounts. Receives the rate limiter instance.
9
9
  * When provided, replaces the default cleanup (abort); use it to call reset(), add logging, etc.
10
10
  */
11
11
  onUnmount?: (rateLimiter: SolidAsyncRateLimiter<TFn, TSelected>) => void;
12
12
  }
13
- interface SolidAsyncRateLimiter<TFn extends AnyAsyncFunction, TSelected = {}> extends Omit<AsyncRateLimiter<TFn>, 'store'> {
13
+ export interface SolidAsyncRateLimiter<TFn extends AnyAsyncFunction, TSelected = {}> extends Omit<AsyncRateLimiter<TFn>, 'store'> {
14
14
  /**
15
15
  * A Solid component that allows you to subscribe to the rate limiter state.
16
16
  *
@@ -97,16 +97,16 @@ interface SolidAsyncRateLimiter<TFn extends AnyAsyncFunction, TSelected = {}> ex
97
97
  * tracking by providing a selector function or using the `Subscribe` component. This prevents unnecessary
98
98
  * updates and gives you full control over when your component tracks state changes.
99
99
  *
100
+ * Use `getRemainingInWindow()` and `getMsUntilNextWindow()` for current window capacity and timing.
101
+ *
100
102
  * Available state properties:
101
- * - `currentWindowStart`: Timestamp when the current window started
102
- * - `executionCount`: Number of function executions that have been completed
103
- * - `hasError`: Whether the last execution resulted in an error
103
+ * - `executionTimes`: Timestamps of executions tracked for the current window
104
+ * - `isExceeded`: Whether the rate limit has been reached
105
+ * - `settleCount`: Number of function executions that have completed (success or error)
106
+ * - `errorCount`: Number of function executions that have resulted in errors
104
107
  * - `isExecuting`: Whether an async function execution is currently in progress
105
- * - `lastError`: The error from the most recent failed execution (if any)
106
108
  * - `lastResult`: The result from the most recent successful execution
107
- * - `nextWindowTime`: Timestamp when the next window begins
108
109
  * - `rejectionCount`: Number of function calls that were rejected due to rate limiting
109
- * - `remainingInWindow`: Number of executions remaining in the current window
110
110
  *
111
111
  * ## Unmount behavior
112
112
  *
@@ -202,7 +202,5 @@ interface SolidAsyncRateLimiter<TFn extends AnyAsyncFunction, TSelected = {}> ex
202
202
  * const { isExecuting, lastResult, rejectionCount } = asyncRateLimiter.state();
203
203
  * ```
204
204
  */
205
- declare function createAsyncRateLimiter<TFn extends AnyAsyncFunction, TSelected = {}>(fn: TFn, options: SolidAsyncRateLimiterOptions<TFn, TSelected>, selector?: (state: AsyncRateLimiterState<TFn>) => TSelected): SolidAsyncRateLimiter<TFn, TSelected>;
206
- //#endregion
207
- export { SolidAsyncRateLimiter, SolidAsyncRateLimiterOptions, createAsyncRateLimiter };
208
- //# sourceMappingURL=createAsyncRateLimiter.d.ts.map
205
+ export declare function createAsyncRateLimiter<TFn extends AnyAsyncFunction, TSelected = {}>(fn: TFn, options: SolidAsyncRateLimiterOptions<TFn, TSelected>, selector?: (state: AsyncRateLimiterState<TFn>) => TSelected): SolidAsyncRateLimiter<TFn, TSelected>;
206
+ //#endregion
@@ -60,16 +60,16 @@ import { AsyncRateLimiter } from "@tanstack/pacer/async-rate-limiter";
60
60
  * tracking by providing a selector function or using the `Subscribe` component. This prevents unnecessary
61
61
  * updates and gives you full control over when your component tracks state changes.
62
62
  *
63
+ * Use `getRemainingInWindow()` and `getMsUntilNextWindow()` for current window capacity and timing.
64
+ *
63
65
  * Available state properties:
64
- * - `currentWindowStart`: Timestamp when the current window started
65
- * - `executionCount`: Number of function executions that have been completed
66
- * - `hasError`: Whether the last execution resulted in an error
66
+ * - `executionTimes`: Timestamps of executions tracked for the current window
67
+ * - `isExceeded`: Whether the rate limit has been reached
68
+ * - `settleCount`: Number of function executions that have completed (success or error)
69
+ * - `errorCount`: Number of function executions that have resulted in errors
67
70
  * - `isExecuting`: Whether an async function execution is currently in progress
68
- * - `lastError`: The error from the most recent failed execution (if any)
69
71
  * - `lastResult`: The result from the most recent successful execution
70
- * - `nextWindowTime`: Timestamp when the next window begins
71
72
  * - `rejectionCount`: Number of function calls that were rejected due to rate limiting
72
- * - `remainingInWindow`: Number of executions remaining in the current window
73
73
  *
74
74
  * ## Unmount behavior
75
75
  *
@@ -189,5 +189,4 @@ function createAsyncRateLimiter(fn, options, selector = () => ({})) {
189
189
  }
190
190
 
191
191
  //#endregion
192
- export { createAsyncRateLimiter };
193
- //# sourceMappingURL=createAsyncRateLimiter.js.map
192
+ export { createAsyncRateLimiter };
@@ -3,14 +3,14 @@ import { Store } from "@tanstack/solid-store";
3
3
  import { AsyncThrottler, AsyncThrottlerOptions, AsyncThrottlerState } from "@tanstack/pacer/async-throttler";
4
4
  import { AnyAsyncFunction } from "@tanstack/pacer/types";
5
5
  //#region src/async-throttler/createAsyncThrottler.d.ts
6
- interface SolidAsyncThrottlerOptions<TFn extends AnyAsyncFunction, TSelected = {}> extends AsyncThrottlerOptions<TFn> {
6
+ export interface SolidAsyncThrottlerOptions<TFn extends AnyAsyncFunction, TSelected = {}> extends AsyncThrottlerOptions<TFn> {
7
7
  /**
8
8
  * Optional callback invoked when the owning component unmounts. Receives the throttler instance.
9
9
  * When provided, replaces the default cleanup (cancel + abort); use it to call flush(), reset(), cancel(), add logging, etc.
10
10
  */
11
11
  onUnmount?: (throttler: SolidAsyncThrottler<TFn, TSelected>) => void;
12
12
  }
13
- interface SolidAsyncThrottler<TFn extends AnyAsyncFunction, TSelected = {}> extends Omit<AsyncThrottler<TFn>, 'store'> {
13
+ export interface SolidAsyncThrottler<TFn extends AnyAsyncFunction, TSelected = {}> extends Omit<AsyncThrottler<TFn>, 'store'> {
14
14
  /**
15
15
  * A Solid component that allows you to subscribe to the throttler state.
16
16
  *
@@ -84,18 +84,15 @@ interface SolidAsyncThrottler<TFn extends AnyAsyncFunction, TSelected = {}> exte
84
84
  * updates and gives you full control over when your component tracks state changes.
85
85
  *
86
86
  * Available state properties:
87
- * - `canLeadingExecute`: Whether the throttler can execute on the leading edge
88
- * - `canTrailingExecute`: Whether the throttler can execute on the trailing edge
89
- * - `executionCount`: Number of function executions that have been completed
90
- * - `hasError`: Whether the last execution resulted in an error
87
+ * - `settleCount`: Number of function executions that have completed (success or error)
88
+ * - `errorCount`: Number of function executions that have resulted in errors
91
89
  * - `isPending`: Whether the throttler is waiting for the timeout to trigger execution
92
90
  * - `isExecuting`: Whether an async function execution is currently in progress
93
91
  * - `lastArgs`: The arguments from the most recent call to maybeExecute
94
- * - `lastError`: The error from the most recent failed execution (if any)
95
92
  * - `lastExecutionTime`: Timestamp of the last execution
96
93
  * - `lastResult`: The result from the most recent successful execution
97
94
  * - `nextExecutionTime`: Timestamp of the next allowed execution
98
- * - `status`: Current execution status ('disabled' | 'idle' | 'pending' | 'executing')
95
+ * - `status`: Current execution status ('disabled' | 'idle' | 'pending' | 'executing' | 'settled')
99
96
  *
100
97
  * ## Unmount behavior
101
98
  *
@@ -150,14 +147,12 @@ interface SolidAsyncThrottler<TFn extends AnyAsyncFunction, TSelected = {}> exte
150
147
  * console.error('API call failed:', error);
151
148
  * }
152
149
  * },
153
- * (state) => ({ hasError: state.hasError, lastError: state.lastError })
150
+ * (state) => ({ errorCount: state.errorCount })
154
151
  * );
155
152
  *
156
153
  * // Access the selected state (will be empty object {} unless selector provided)
157
154
  * const { isPending, isExecuting } = throttler.state();
158
155
  * ```
159
156
  */
160
- declare function createAsyncThrottler<TFn extends AnyAsyncFunction, TSelected = {}>(fn: TFn, options: SolidAsyncThrottlerOptions<TFn, TSelected>, selector?: (state: AsyncThrottlerState<TFn>) => TSelected): SolidAsyncThrottler<TFn, TSelected>;
161
- //#endregion
162
- export { SolidAsyncThrottler, SolidAsyncThrottlerOptions, createAsyncThrottler };
163
- //# sourceMappingURL=createAsyncThrottler.d.ts.map
157
+ export declare function createAsyncThrottler<TFn extends AnyAsyncFunction, TSelected = {}>(fn: TFn, options: SolidAsyncThrottlerOptions<TFn, TSelected>, selector?: (state: AsyncThrottlerState<TFn>) => TSelected): SolidAsyncThrottler<TFn, TSelected>;
158
+ //#endregion
@@ -47,18 +47,15 @@ import { AsyncThrottler } from "@tanstack/pacer/async-throttler";
47
47
  * updates and gives you full control over when your component tracks state changes.
48
48
  *
49
49
  * Available state properties:
50
- * - `canLeadingExecute`: Whether the throttler can execute on the leading edge
51
- * - `canTrailingExecute`: Whether the throttler can execute on the trailing edge
52
- * - `executionCount`: Number of function executions that have been completed
53
- * - `hasError`: Whether the last execution resulted in an error
50
+ * - `settleCount`: Number of function executions that have completed (success or error)
51
+ * - `errorCount`: Number of function executions that have resulted in errors
54
52
  * - `isPending`: Whether the throttler is waiting for the timeout to trigger execution
55
53
  * - `isExecuting`: Whether an async function execution is currently in progress
56
54
  * - `lastArgs`: The arguments from the most recent call to maybeExecute
57
- * - `lastError`: The error from the most recent failed execution (if any)
58
55
  * - `lastExecutionTime`: Timestamp of the last execution
59
56
  * - `lastResult`: The result from the most recent successful execution
60
57
  * - `nextExecutionTime`: Timestamp of the next allowed execution
61
- * - `status`: Current execution status ('disabled' | 'idle' | 'pending' | 'executing')
58
+ * - `status`: Current execution status ('disabled' | 'idle' | 'pending' | 'executing' | 'settled')
62
59
  *
63
60
  * ## Unmount behavior
64
61
  *
@@ -113,7 +110,7 @@ import { AsyncThrottler } from "@tanstack/pacer/async-throttler";
113
110
  * console.error('API call failed:', error);
114
111
  * }
115
112
  * },
116
- * (state) => ({ hasError: state.hasError, lastError: state.lastError })
113
+ * (state) => ({ errorCount: state.errorCount })
117
114
  * );
118
115
  *
119
116
  * // Access the selected state (will be empty object {} unless selector provided)
@@ -147,5 +144,4 @@ function createAsyncThrottler(fn, options, selector = () => ({})) {
147
144
  }
148
145
 
149
146
  //#endregion
150
- export { createAsyncThrottler };
151
- //# sourceMappingURL=createAsyncThrottler.js.map
147
+ export { createAsyncThrottler };
@@ -2,14 +2,14 @@ import { Accessor, JSX } from "solid-js";
2
2
  import { Store } from "@tanstack/solid-store";
3
3
  import { Batcher, BatcherOptions, BatcherState } from "@tanstack/pacer/batcher";
4
4
  //#region src/batcher/createBatcher.d.ts
5
- interface SolidBatcherOptions<TValue, TSelected = {}> extends BatcherOptions<TValue> {
5
+ export interface SolidBatcherOptions<TValue, TSelected = {}> extends BatcherOptions<TValue> {
6
6
  /**
7
7
  * Optional callback invoked when the owning component unmounts. Receives the batcher instance.
8
8
  * When provided, replaces the default cleanup (cancel); use it to call flush(), reset(), cancel(), add logging, etc.
9
9
  */
10
10
  onUnmount?: (batcher: SolidBatcher<TValue, TSelected>) => void;
11
11
  }
12
- interface SolidBatcher<TValue, TSelected = {}> extends Omit<Batcher<TValue>, 'store'> {
12
+ export interface SolidBatcher<TValue, TSelected = {}> extends Omit<Batcher<TValue>, 'store'> {
13
13
  /**
14
14
  * A Solid component that allows you to subscribe to the batcher state.
15
15
  *
@@ -17,9 +17,9 @@ interface SolidBatcher<TValue, TSelected = {}> extends Omit<Batcher<TValue>, 'st
17
17
  * deep in your component tree without needing to pass a selector to the hook.
18
18
  *
19
19
  * @example
20
- * <batcher.Subscribe selector={(state) => ({ size: state.size, isRunning: state.isRunning })}>
20
+ * <batcher.Subscribe selector={(state) => ({ size: state.size, isPending: state.isPending })}>
21
21
  * {(state) => (
22
- * <div>Batch: {state().size} items, {state().isRunning ? 'Processing' : 'Idle'}</div>
22
+ * <div>Batch: {state().size} items, {state().isPending ? 'Pending' : 'Idle'}</div>
23
23
  * )}
24
24
  * </batcher.Subscribe>
25
25
  */
@@ -78,7 +78,6 @@ interface SolidBatcher<TValue, TSelected = {}> extends Omit<Batcher<TValue>, 'st
78
78
  *
79
79
  * Available state properties:
80
80
  * - `executionCount`: Number of batch executions that have been completed
81
- * - `isRunning`: Whether the batcher is currently running (not stopped)
82
81
  * - `items`: Array of items currently queued for batching
83
82
  * - `totalItemsProcessed`: Total number of individual items that have been processed across all batches
84
83
  *
@@ -111,11 +110,11 @@ interface SolidBatcher<TValue, TSelected = {}> extends Omit<Batcher<TValue>, 'st
111
110
  * }
112
111
  * );
113
112
  *
114
- * // Opt-in to track items or isRunning changes (optimized for UI updates)
113
+ * // Opt-in to track items or isPending changes (optimized for UI updates)
115
114
  * const batcher = createBatcher(
116
115
  * (items) => console.log('Processing batch:', items),
117
116
  * { maxSize: 5, wait: 2000 },
118
- * (state) => ({ items: state.items, isRunning: state.isRunning })
117
+ * (state) => ({ items: state.items, isPending: state.isPending })
119
118
  * );
120
119
  *
121
120
  * // Opt-in to track execution metrics changes (optimized for tracking progress)
@@ -133,14 +132,12 @@ interface SolidBatcher<TValue, TSelected = {}> extends Omit<Batcher<TValue>, 'st
133
132
  * batcher.addItem('task2');
134
133
  *
135
134
  * // Control the batcher
136
- * batcher.stop(); // Pause processing
137
- * batcher.start(); // Resume processing
135
+ * batcher.cancel(); // Cancel the pending timer; queued items are retained
136
+ * batcher.flush(); // Process queued items immediately
138
137
  *
139
138
  * // Access the selected state (will be empty object {} unless selector provided)
140
- * const { items, isRunning } = batcher.state();
139
+ * const { items, isPending } = batcher.state();
141
140
  * ```
142
141
  */
143
- declare function createBatcher<TValue, TSelected = {}>(fn: (items: Array<TValue>) => void, options?: SolidBatcherOptions<TValue, TSelected>, selector?: (state: BatcherState<TValue>) => TSelected): SolidBatcher<TValue, TSelected>;
144
- //#endregion
145
- export { SolidBatcher, SolidBatcherOptions, createBatcher };
146
- //# sourceMappingURL=createBatcher.d.ts.map
142
+ export declare function createBatcher<TValue, TSelected = {}>(fn: (items: Array<TValue>) => void, options?: SolidBatcherOptions<TValue, TSelected>, selector?: (state: BatcherState<TValue>) => TSelected): SolidBatcher<TValue, TSelected>;
143
+ //#endregion
@@ -42,7 +42,6 @@ import { Batcher } from "@tanstack/pacer/batcher";
42
42
  *
43
43
  * Available state properties:
44
44
  * - `executionCount`: Number of batch executions that have been completed
45
- * - `isRunning`: Whether the batcher is currently running (not stopped)
46
45
  * - `items`: Array of items currently queued for batching
47
46
  * - `totalItemsProcessed`: Total number of individual items that have been processed across all batches
48
47
  *
@@ -75,11 +74,11 @@ import { Batcher } from "@tanstack/pacer/batcher";
75
74
  * }
76
75
  * );
77
76
  *
78
- * // Opt-in to track items or isRunning changes (optimized for UI updates)
77
+ * // Opt-in to track items or isPending changes (optimized for UI updates)
79
78
  * const batcher = createBatcher(
80
79
  * (items) => console.log('Processing batch:', items),
81
80
  * { maxSize: 5, wait: 2000 },
82
- * (state) => ({ items: state.items, isRunning: state.isRunning })
81
+ * (state) => ({ items: state.items, isPending: state.isPending })
83
82
  * );
84
83
  *
85
84
  * // Opt-in to track execution metrics changes (optimized for tracking progress)
@@ -97,11 +96,11 @@ import { Batcher } from "@tanstack/pacer/batcher";
97
96
  * batcher.addItem('task2');
98
97
  *
99
98
  * // Control the batcher
100
- * batcher.stop(); // Pause processing
101
- * batcher.start(); // Resume processing
99
+ * batcher.cancel(); // Cancel the pending timer; queued items are retained
100
+ * batcher.flush(); // Process queued items immediately
102
101
  *
103
102
  * // Access the selected state (will be empty object {} unless selector provided)
104
- * const { items, isRunning } = batcher.state();
103
+ * const { items, isPending } = batcher.state();
105
104
  * ```
106
105
  */
107
106
  function createBatcher(fn, options = {}, selector = () => ({})) {
@@ -128,5 +127,4 @@ function createBatcher(fn, options = {}, selector = () => ({})) {
128
127
  }
129
128
 
130
129
  //#endregion
131
- export { createBatcher };
132
- //# sourceMappingURL=createBatcher.js.map
130
+ export { createBatcher };
@@ -73,7 +73,5 @@ import { DebouncerState } from "@tanstack/pacer/debouncer";
73
73
  * });
74
74
  * ```
75
75
  */
76
- declare function createDebouncedSignal<TValue, TSelected = {}>(value: TValue, initialOptions: SolidDebouncerOptions<Setter<TValue>, TSelected>, selector?: (state: DebouncerState<Setter<TValue>>) => TSelected): [Accessor<TValue>, Setter<TValue>, SolidDebouncer<Setter<TValue>, TSelected>];
77
- //#endregion
78
- export { createDebouncedSignal };
79
- //# sourceMappingURL=createDebouncedSignal.d.ts.map
76
+ export declare function createDebouncedSignal<TValue, TSelected = {}>(value: TValue, initialOptions: SolidDebouncerOptions<Setter<TValue>, TSelected>, selector?: (state: DebouncerState<Setter<TValue>>) => TSelected): [Accessor<TValue>, Setter<TValue>, SolidDebouncer<Setter<TValue>, TSelected>];
77
+ //#endregion
@@ -84,5 +84,4 @@ function createDebouncedSignal(value, initialOptions, selector) {
84
84
  }
85
85
 
86
86
  //#endregion
87
- export { createDebouncedSignal };
88
- //# sourceMappingURL=createDebouncedSignal.js.map
87
+ export { createDebouncedSignal };
@@ -64,7 +64,5 @@ import { DebouncerState } from "@tanstack/pacer/debouncer";
64
64
  * debouncer.cancel(); // Cancel any pending updates
65
65
  * ```
66
66
  */
67
- declare function createDebouncedValue<TValue, TSelected = {}>(value: Accessor<TValue>, initialOptions: SolidDebouncerOptions<Setter<TValue>, TSelected>, selector?: (state: DebouncerState<Setter<TValue>>) => TSelected): [Accessor<TValue>, SolidDebouncer<Setter<TValue>, TSelected>];
68
- //#endregion
69
- export { createDebouncedValue };
70
- //# sourceMappingURL=createDebouncedValue.d.ts.map
67
+ export declare function createDebouncedValue<TValue, TSelected = {}>(value: Accessor<TValue>, initialOptions: SolidDebouncerOptions<Setter<TValue>, TSelected>, selector?: (state: DebouncerState<Setter<TValue>>) => TSelected): [Accessor<TValue>, SolidDebouncer<Setter<TValue>, TSelected>];
68
+ //#endregion
@@ -73,5 +73,4 @@ function createDebouncedValue(value, initialOptions, selector) {
73
73
  }
74
74
 
75
75
  //#endregion
76
- export { createDebouncedValue };
77
- //# sourceMappingURL=createDebouncedValue.js.map
76
+ export { createDebouncedValue };