@ctx-core/scroll 17.0.1 → 17.0.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ctx-core/scroll
|
|
2
2
|
|
|
3
|
+
## 17.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @ctx-core/nanostores@1.0.0
|
|
9
|
+
|
|
10
|
+
## 17.0.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- fix: sticky*scroll_active_key_active*,sticky*scroll_active_key_match*: return type: boolean
|
|
15
|
+
|
|
16
|
+
## 17.0.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- sticky*scroll_active\$*:+ jsdoc
|
|
21
|
+
|
|
3
22
|
## 17.0.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/COMMIT_EDITMSG
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/scroll",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.4",
|
|
4
4
|
"description": "ctx-core scroll",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test-unit-coverage": "c8 pnpm test-unit"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ctx-core/nanostores": "^0.
|
|
38
|
+
"@ctx-core/nanostores": "^1.0.0",
|
|
39
39
|
"@ctx-core/object": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"cache": "~/.npm"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": false
|
|
54
|
-
}
|
|
54
|
+
}
|
|
@@ -5,5 +5,5 @@ export type sticky_scroll_active_T = Record<string, boolean>
|
|
|
5
5
|
export type sticky_scroll_active$_T = WritableAtom$<sticky_scroll_active_T>
|
|
6
6
|
export declare function add_sticky_scroll_active(ctx:Ctx, key:string):void;
|
|
7
7
|
export declare function remove_sticky_scroll_active(ctx:Ctx, key:string):void;
|
|
8
|
-
export declare function sticky_scroll_active_key_active_(ctx:Ctx, key:string):
|
|
9
|
-
export declare function sticky_scroll_active_key_match_(ctx:Ctx, key:string, active:any):
|
|
8
|
+
export declare function sticky_scroll_active_key_active_(ctx:Ctx, key:string):boolean;
|
|
9
|
+
export declare function sticky_scroll_active_key_match_(ctx:Ctx, key:string, active:any):boolean;
|
|
@@ -1,25 +1,43 @@
|
|
|
1
|
-
import { assign, b_ } from '@ctx-core/object'
|
|
2
1
|
import { atom$ } from '@ctx-core/nanostores'
|
|
2
|
+
import { b_ } from '@ctx-core/object'
|
|
3
|
+
/** @type {import('./sticky_scroll_active$_.d.ts').sticky_scroll_active$_} */
|
|
3
4
|
export const sticky_scroll_active$_ = b_('sticky_scroll_active$', ()=>
|
|
4
5
|
atom$({}))
|
|
6
|
+
/**
|
|
7
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
8
|
+
* @param {string}key
|
|
9
|
+
*/
|
|
5
10
|
export function add_sticky_scroll_active(ctx, key) {
|
|
6
11
|
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
7
12
|
const sticky_scroll_active = sticky_scroll_active$.$
|
|
8
13
|
sticky_scroll_active[key] = true
|
|
9
14
|
sticky_scroll_active$.$ = sticky_scroll_active
|
|
10
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
18
|
+
* @param {string}key
|
|
19
|
+
*/
|
|
11
20
|
export function remove_sticky_scroll_active(ctx, key) {
|
|
12
21
|
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
13
22
|
const sticky_scroll_active = sticky_scroll_active$.$
|
|
14
23
|
sticky_scroll_active[key] = false
|
|
15
24
|
sticky_scroll_active$.$ = sticky_scroll_active
|
|
16
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
28
|
+
* @param {string}key
|
|
29
|
+
*/
|
|
17
30
|
export function sticky_scroll_active_key_active_(ctx, key) {
|
|
18
31
|
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
19
32
|
const sticky_scroll_active = sticky_scroll_active$.$
|
|
20
33
|
const active = sticky_scroll_active ? sticky_scroll_active[key] : false
|
|
21
34
|
return active
|
|
22
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
38
|
+
* @param {string}key
|
|
39
|
+
* @param {boolean}active
|
|
40
|
+
*/
|
|
23
41
|
export function sticky_scroll_active_key_match_(ctx, key, active) {
|
|
24
42
|
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
25
43
|
return !!active == !!sticky_scroll_active_key_active_(ctx, key)
|
|
Binary file
|