@ctx-core/scroll 17.3.15 → 17.3.20
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/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctx-core/scroll",
|
|
3
|
-
"version": "17.3.
|
|
3
|
+
"version": "17.3.20",
|
|
4
4
|
"description": "ctx-core scroll",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"./is_visible_",
|
|
26
26
|
"./out_is_active_",
|
|
27
27
|
"./out_is_visible_",
|
|
28
|
-
"
|
|
28
|
+
"sticky_scroll_active"
|
|
29
29
|
],
|
|
30
30
|
"types": "./index.d.ts",
|
|
31
31
|
"exports": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"./package.json": "./package.json"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ctx-core/nanostores": "^
|
|
37
|
-
"@ctx-core/object": "^
|
|
36
|
+
"@ctx-core/nanostores": "^9.0.3",
|
|
37
|
+
"@ctx-core/object": "^31.1.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"c8": "^8.0.1",
|
|
41
41
|
"check-dts": "^0.7.2",
|
|
42
42
|
"tslib": "^2.6.2",
|
|
43
|
-
"tsx": "^4.1.
|
|
43
|
+
"tsx": "^4.1.4",
|
|
44
44
|
"typescript": "next",
|
|
45
45
|
"uvu": "^0.5.6"
|
|
46
46
|
},
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export declare const
|
|
1
|
+
import type { be_atom_triple_T } from '@ctx-core/nanostores'
|
|
2
|
+
import type { Ctx } from '@ctx-core/object'
|
|
3
|
+
export declare const sticky_scroll_active$_:be_atom_triple_T<sticky_scroll_active_T>
|
|
4
|
+
export { sticky_scroll_active$_ as sticky_scroll_active__ }
|
|
4
5
|
export type sticky_scroll_active_T = Record<string, boolean>
|
|
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
8
|
export declare function sticky_scroll_active_key_active_(ctx:Ctx, key:string):boolean
|
|
9
9
|
export declare function sticky_scroll_active_key_match_(ctx:Ctx, key:string, active:any):boolean
|
|
10
|
-
export { sticky_scroll_active__ as sticky_scroll_active$_ }
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { be_atom_triple_ } from '@ctx-core/nanostores'
|
|
2
|
+
/** @type {typeof import('./index.d.ts').sticky_scroll_active$_} */
|
|
3
|
+
export const [
|
|
4
|
+
sticky_scroll_active$_,
|
|
5
|
+
sticky_scroll_active_,
|
|
6
|
+
sticky_scroll_active__set,
|
|
7
|
+
] = /** @type {be_atom_triple_T<sticky_scroll_active_T>} */ be_atom_triple_(()=>(
|
|
8
|
+
{}),
|
|
9
|
+
{ id: 'sticky_scroll_active_' })
|
|
10
|
+
export { sticky_scroll_active$_ as sticky_scroll_active__ }
|
|
11
|
+
/**
|
|
12
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
13
|
+
* @param {string}key
|
|
14
|
+
*/
|
|
15
|
+
export function add_sticky_scroll_active(ctx, key) {
|
|
16
|
+
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
17
|
+
const sticky_scroll_active = sticky_scroll_active$.$
|
|
18
|
+
sticky_scroll_active[key] = true
|
|
19
|
+
sticky_scroll_active$.$ = sticky_scroll_active
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
23
|
+
* @param {string}key
|
|
24
|
+
*/
|
|
25
|
+
export function remove_sticky_scroll_active(ctx, key) {
|
|
26
|
+
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
27
|
+
const sticky_scroll_active = sticky_scroll_active$.$
|
|
28
|
+
sticky_scroll_active[key] = false
|
|
29
|
+
sticky_scroll_active$.$ = sticky_scroll_active
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
33
|
+
* @param {string}key
|
|
34
|
+
*/
|
|
35
|
+
export function sticky_scroll_active_key_active_(ctx, key) {
|
|
36
|
+
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
37
|
+
const sticky_scroll_active = sticky_scroll_active$.$
|
|
38
|
+
const active = sticky_scroll_active ? sticky_scroll_active[key] : false
|
|
39
|
+
return active
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
43
|
+
* @param {string}key
|
|
44
|
+
* @param {boolean}active
|
|
45
|
+
*/
|
|
46
|
+
export function sticky_scroll_active_key_match_(ctx, key, active) {
|
|
47
|
+
return !!active == !!sticky_scroll_active_key_active_(ctx, key)
|
|
48
|
+
}
|
|
49
|
+
export { sticky_scroll_active$_ as sticky_scroll_active$_ }
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { atom_ } from '@ctx-core/nanostores'
|
|
2
|
-
import { be_ } from '@ctx-core/object'
|
|
3
|
-
/** @type {typeof import('./index.d.ts').sticky_scroll_active__} */
|
|
4
|
-
export const sticky_scroll_active__ = be_('sticky_scroll_active_',
|
|
5
|
-
()=>
|
|
6
|
-
atom_({}))
|
|
7
|
-
/**
|
|
8
|
-
* @param {import('@ctx-core/object').Ctx}ctx
|
|
9
|
-
* @param {string}key
|
|
10
|
-
*/
|
|
11
|
-
export function add_sticky_scroll_active(ctx, key) {
|
|
12
|
-
const sticky_scroll_active_ = sticky_scroll_active__(ctx)
|
|
13
|
-
const sticky_scroll_active = sticky_scroll_active_.$
|
|
14
|
-
sticky_scroll_active[key] = true
|
|
15
|
-
sticky_scroll_active_.$ = sticky_scroll_active
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @param {import('@ctx-core/object').Ctx}ctx
|
|
19
|
-
* @param {string}key
|
|
20
|
-
*/
|
|
21
|
-
export function remove_sticky_scroll_active(ctx, key) {
|
|
22
|
-
const sticky_scroll_active_ = sticky_scroll_active__(ctx)
|
|
23
|
-
const sticky_scroll_active = sticky_scroll_active_.$
|
|
24
|
-
sticky_scroll_active[key] = false
|
|
25
|
-
sticky_scroll_active_.$ = sticky_scroll_active
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @param {import('@ctx-core/object').Ctx}ctx
|
|
29
|
-
* @param {string}key
|
|
30
|
-
*/
|
|
31
|
-
export function sticky_scroll_active_key_active_(ctx, key) {
|
|
32
|
-
const sticky_scroll_active_ = sticky_scroll_active__(ctx)
|
|
33
|
-
const sticky_scroll_active = sticky_scroll_active_.$
|
|
34
|
-
const active = sticky_scroll_active ? sticky_scroll_active[key] : false
|
|
35
|
-
return active
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @param {import('@ctx-core/object').Ctx}ctx
|
|
39
|
-
* @param {string}key
|
|
40
|
-
* @param {boolean}active
|
|
41
|
-
*/
|
|
42
|
-
export function sticky_scroll_active_key_match_(ctx, key, active) {
|
|
43
|
-
const sticky_scroll_active_ = sticky_scroll_active__(ctx)
|
|
44
|
-
return !!active == !!sticky_scroll_active_key_active_(ctx, key)
|
|
45
|
-
}
|
|
46
|
-
export { sticky_scroll_active__ as sticky_scroll_active$_ }
|