@stacksjs/composables 0.75.457 → 0.75.459
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/useInterval.d.ts +9 -5
- package/dist/useTimeout.d.ts +9 -5
- package/package.json +2 -2
package/dist/useInterval.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { Ref } from '@stacksjs/stx';
|
|
2
|
+
/**
|
|
3
|
+
* Reactive interval counter.
|
|
4
|
+
* Increments a counter ref on every interval tick.
|
|
5
|
+
*
|
|
6
|
+
* @param interval - Interval duration in milliseconds (default 1000)
|
|
7
|
+
* @param options - Configuration options
|
|
8
|
+
* @returns Ref<number> if controls is false, or UseIntervalControls if controls is true
|
|
9
|
+
*/
|
|
10
|
+
export declare function useInterval(interval?: number, options?: { controls: true, immediate?: boolean }): UseIntervalControls;
|
|
2
11
|
export declare function useInterval(interval?: number, options?: { controls?: false, immediate?: boolean }): Ref<number>;
|
|
3
|
-
export declare function useInterval(interval?: number, options?: UseIntervalOptions): Ref<number> | UseIntervalControls;
|
|
4
12
|
declare interface UseIntervalControls {
|
|
5
13
|
counter: Ref<number>
|
|
6
14
|
pause: () => void
|
|
7
15
|
resume: () => void
|
|
8
16
|
reset: () => void
|
|
9
17
|
}
|
|
10
|
-
declare interface UseIntervalOptions {
|
|
11
|
-
controls?: boolean
|
|
12
|
-
immediate?: boolean
|
|
13
|
-
}
|
package/dist/useTimeout.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { Ref } from '@stacksjs/stx';
|
|
2
|
+
/**
|
|
3
|
+
* Reactive timeout ready state.
|
|
4
|
+
* Returns a ref that becomes true after the specified interval.
|
|
5
|
+
*
|
|
6
|
+
* @param interval - Timeout duration in milliseconds (default 1000)
|
|
7
|
+
* @param options - Configuration options
|
|
8
|
+
* @returns Ref<boolean> if controls is false, or UseTimeoutControls if controls is true
|
|
9
|
+
*/
|
|
10
|
+
export declare function useTimeout(interval?: number, options?: { controls: true, immediate?: boolean }): UseTimeoutControls;
|
|
2
11
|
export declare function useTimeout(interval?: number, options?: { controls?: false, immediate?: boolean }): Ref<boolean>;
|
|
3
|
-
export declare function useTimeout(interval?: number, options?: UseTimeoutOptions): Ref<boolean> | UseTimeoutControls;
|
|
4
12
|
declare interface UseTimeoutControls {
|
|
5
13
|
ready: Ref<boolean>
|
|
6
14
|
start: () => void
|
|
7
15
|
stop: () => void
|
|
8
16
|
}
|
|
9
|
-
declare interface UseTimeoutOptions {
|
|
10
|
-
controls?: boolean
|
|
11
|
-
immediate?: boolean
|
|
12
|
-
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/composables",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.459",
|
|
6
6
|
"description": "Stacks composables powered by stx reactivity.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@stacksjs/stx": "0.2.794",
|
|
55
|
-
"@stacksjs/datetime": "0.75.
|
|
55
|
+
"@stacksjs/datetime": "0.75.459"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"better-dx": "^0.2.24"
|