@ctx-core/scroll 17.0.1 → 17.0.2
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
|
Binary file
|
package/package.json
CHANGED
|
@@ -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
|