@ctx-core/scroll 16.0.5 → 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 +27 -0
- package/ctx-core-scroll-17.0.2.tgz +0 -0
- package/package.json +53 -51
- package/src/{index.ts → index.d.ts} +0 -0
- package/src/index.js +6 -0
- package/src/is_active_.d.ts +2 -0
- package/src/{is_active_.ts → is_active_.js} +6 -4
- package/src/is_visible_.d.ts +2 -0
- package/src/{is_visible_.ts → is_visible_.js} +6 -4
- package/src/out_is_active_.d.ts +1 -0
- package/src/out_is_active_.js +8 -0
- package/src/out_is_visible_.d.ts +2 -0
- package/src/out_is_visible_.js +11 -0
- package/src/sticky_scroll_active$_.d.ts +9 -0
- package/src/sticky_scroll_active$_.js +44 -0
- package/.swcrc +0 -10
- package/lib/index.d.ts +0 -5
- package/lib/index.js +0 -7
- package/lib/index.js.map +0 -1
- package/lib/is_active_.d.ts +0 -2
- package/lib/is_active_.js +0 -8
- package/lib/is_active_.js.map +0 -1
- package/lib/is_visible_.d.ts +0 -2
- package/lib/is_visible_.js +0 -9
- package/lib/is_visible_.js.map +0 -1
- package/lib/out_is_active_.d.ts +0 -1
- package/lib/out_is_active_.js +0 -5
- package/lib/out_is_active_.js.map +0 -1
- package/lib/out_is_visible_.d.ts +0 -2
- package/lib/out_is_visible_.js +0 -7
- package/lib/out_is_visible_.js.map +0 -1
- package/lib/sticky_scroll_active$_.d.ts +0 -11
- package/lib/sticky_scroll_active$_.js +0 -31
- package/lib/sticky_scroll_active$_.js.map +0 -1
- package/src/out_is_active_.ts +0 -3
- package/src/out_is_visible_.ts +0 -8
- package/src/sticky_scroll_active$_.ts +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @ctx-core/scroll
|
|
2
2
|
|
|
3
|
+
## 17.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- sticky*scroll_active\$*:+ jsdoc
|
|
8
|
+
|
|
9
|
+
## 17.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- .js + .d.ts instead of .ts
|
|
14
|
+
|
|
15
|
+
## 17.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- extract functions from sticky*scroll_active\$*(ctx)
|
|
20
|
+
|
|
21
|
+
add*sticky_scroll_active,remove_sticky_scroll_active,sticky_scroll_active_key_active*,sticky*scroll_active_key_match*
|
|
22
|
+
|
|
23
|
+
## 16.0.6
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @ctx-core/nanostores@0.7.0
|
|
29
|
+
|
|
3
30
|
## 16.0.5
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,52 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
2
|
+
"name": "@ctx-core/scroll",
|
|
3
|
+
"version": "17.0.2",
|
|
4
|
+
"description": "ctx-core scroll",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ctx-core",
|
|
7
|
+
"scroll"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/ctx-core/scroll#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/ctx-core/scroll/issues"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/ctx-core/scroll.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"author": "Brian Takita",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"types": "./src/index.d.ts",
|
|
21
|
+
"svelte": "./src/index.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./src/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": ":",
|
|
30
|
+
"clean": ":",
|
|
31
|
+
"exec": "$@",
|
|
32
|
+
"prepublishOnly": "npm run clean && npm run build && npm run test",
|
|
33
|
+
"test": "pnpm test-unit && check-dts",
|
|
34
|
+
"test-unit": "tsm node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'",
|
|
35
|
+
"test-unit-coverage": "c8 pnpm test-unit"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@ctx-core/nanostores": "^0.7.1",
|
|
39
|
+
"@ctx-core/object": "*"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"c8": "^7.11.0",
|
|
43
|
+
"check-dts": "^0.6.6",
|
|
44
|
+
"tslib": "^2.3.1",
|
|
45
|
+
"tsm": "^2.2.1",
|
|
46
|
+
"typescript": "next",
|
|
47
|
+
"uvu": "^0.5.3"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public",
|
|
51
|
+
"cache": "~/.npm"
|
|
52
|
+
},
|
|
53
|
+
"sideEffects": false
|
|
54
|
+
}
|
|
File without changes
|
package/src/index.js
ADDED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { out_is_active_ } from './out_is_active_.js'
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @param {HTMLElement}el
|
|
4
|
+
* @return {boolean}
|
|
5
|
+
*/
|
|
6
|
+
export function is_active_(el) {
|
|
3
7
|
const { top, bottom } = el.getBoundingClientRect()
|
|
4
8
|
return out_is_active_(top, bottom)
|
|
5
9
|
}
|
|
6
|
-
export {
|
|
7
|
-
is_active_ as _is_active,
|
|
8
|
-
}
|
|
10
|
+
export { is_active_ as _is_active, }
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { out_is_visible_ } from './out_is_visible_.js'
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @param {HTMLElement}el
|
|
4
|
+
* @return {boolean}
|
|
5
|
+
*/
|
|
6
|
+
export function is_visible_(el) {
|
|
3
7
|
const { top, bottom } = el.getBoundingClientRect()
|
|
4
8
|
const { innerHeight } = window
|
|
5
9
|
return out_is_visible_(top, bottom, innerHeight)
|
|
6
10
|
}
|
|
7
|
-
export {
|
|
8
|
-
is_visible_ as _is_visible,
|
|
9
|
-
}
|
|
11
|
+
export { is_visible_ as _is_visible, }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function out_is_active_(top:number, bottom:number):boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { out_is_active_ } from './out_is_active_.js'
|
|
2
|
+
/**
|
|
3
|
+
* @param {number}top
|
|
4
|
+
* @param {number}bottom
|
|
5
|
+
* @param {number}innerHeight
|
|
6
|
+
* @return {boolean}
|
|
7
|
+
*/
|
|
8
|
+
export function out_is_visible_(top, bottom, innerHeight) {
|
|
9
|
+
return top > 0 && top < innerHeight || out_is_active_(top, bottom)
|
|
10
|
+
}
|
|
11
|
+
export { out_is_visible_ as _out_is_visible, }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { B, Ctx } from '@ctx-core/object'
|
|
2
|
+
import { WritableAtom$ } from '@ctx-core/nanostores'
|
|
3
|
+
export declare const sticky_scroll_active$_:B<sticky_scroll_active$_T>
|
|
4
|
+
export type sticky_scroll_active_T = Record<string, boolean>
|
|
5
|
+
export type sticky_scroll_active$_T = WritableAtom$<sticky_scroll_active_T>
|
|
6
|
+
export declare function add_sticky_scroll_active(ctx:Ctx, key:string):void;
|
|
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):void;
|
|
9
|
+
export declare function sticky_scroll_active_key_match_(ctx:Ctx, key:string, active:any):void;
|
|
@@ -0,0 +1,44 @@
|
|
|
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$_} */
|
|
4
|
+
export const sticky_scroll_active$_ = b_('sticky_scroll_active$', ()=>
|
|
5
|
+
atom$({}))
|
|
6
|
+
/**
|
|
7
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
8
|
+
* @param {string}key
|
|
9
|
+
*/
|
|
10
|
+
export function add_sticky_scroll_active(ctx, key) {
|
|
11
|
+
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
12
|
+
const sticky_scroll_active = sticky_scroll_active$.$
|
|
13
|
+
sticky_scroll_active[key] = true
|
|
14
|
+
sticky_scroll_active$.$ = sticky_scroll_active
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
18
|
+
* @param {string}key
|
|
19
|
+
*/
|
|
20
|
+
export function remove_sticky_scroll_active(ctx, key) {
|
|
21
|
+
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
22
|
+
const sticky_scroll_active = sticky_scroll_active$.$
|
|
23
|
+
sticky_scroll_active[key] = false
|
|
24
|
+
sticky_scroll_active$.$ = sticky_scroll_active
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
28
|
+
* @param {string}key
|
|
29
|
+
*/
|
|
30
|
+
export function sticky_scroll_active_key_active_(ctx, key) {
|
|
31
|
+
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
32
|
+
const sticky_scroll_active = sticky_scroll_active$.$
|
|
33
|
+
const active = sticky_scroll_active ? sticky_scroll_active[key] : false
|
|
34
|
+
return active
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @param {import('@ctx-core/object').Ctx}ctx
|
|
38
|
+
* @param {string}key
|
|
39
|
+
* @param {boolean}active
|
|
40
|
+
*/
|
|
41
|
+
export function sticky_scroll_active_key_match_(ctx, key, active) {
|
|
42
|
+
const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
|
|
43
|
+
return !!active == !!sticky_scroll_active_key_active_(ctx, key)
|
|
44
|
+
}
|
package/.swcrc
DELETED
package/lib/index.d.ts
DELETED
package/lib/index.js
DELETED
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './is_active_.js'\nexport * from './is_visible_.js'\nexport * from './out_is_active_.js'\nexport * from './out_is_visible_.js'\nexport * from './sticky_scroll_active$_.js'\n"],"names":[],"mappings":"cAAc,CAAiB;cACjB,CAAkB;cAClB,CAAqB;cACrB,CAAsB;cACtB,CAA6B"}
|
package/lib/is_active_.d.ts
DELETED
package/lib/is_active_.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { out_is_active_ } from './out_is_active_.js';
|
|
2
|
-
export function is_active_(el) {
|
|
3
|
-
const { top , bottom } = el.getBoundingClientRect();
|
|
4
|
-
return out_is_active_(top, bottom);
|
|
5
|
-
}
|
|
6
|
-
export { is_active_ as _is_active, };
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=is_active_.js.map
|
package/lib/is_active_.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/is_active_.ts"],"sourcesContent":["import { out_is_active_ } from './out_is_active_.js'\nexport function is_active_(el:HTMLElement) {\n\tconst { top, bottom } = el.getBoundingClientRect()\n\treturn out_is_active_(top, bottom)\n}\nexport {\n\tis_active_ as _is_active,\n}\n"],"names":["out_is_active_","is_active_","el","top","bottom","getBoundingClientRect","_is_active"],"mappings":"AAAA,MAAM,GAAGA,cAAc,QAAQ,CAAqB;AACpD,MAAM,UAAUC,UAAU,CAACC,EAAc,EAAE,CAAC;IAC3C,KAAK,CAAC,CAAC,CAACC,GAAG,GAAEC,MAAM,EAAC,CAAC,GAAGF,EAAE,CAACG,qBAAqB;IAChD,MAAM,CAACL,cAAc,CAACG,GAAG,EAAEC,MAAM;AAClC,CAAC;AACD,MAAM,GACLH,UAAU,IAAIK,UAAU"}
|
package/lib/is_visible_.d.ts
DELETED
package/lib/is_visible_.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { out_is_visible_ } from './out_is_visible_.js';
|
|
2
|
-
export function is_visible_(el) {
|
|
3
|
-
const { top , bottom } = el.getBoundingClientRect();
|
|
4
|
-
const { innerHeight } = window;
|
|
5
|
-
return out_is_visible_(top, bottom, innerHeight);
|
|
6
|
-
}
|
|
7
|
-
export { is_visible_ as _is_visible, };
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=is_visible_.js.map
|
package/lib/is_visible_.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/is_visible_.ts"],"sourcesContent":["import { out_is_visible_ } from './out_is_visible_.js'\nexport function is_visible_(el:HTMLElement) {\n\tconst { top, bottom } = el.getBoundingClientRect()\n\tconst { innerHeight } = window\n\treturn out_is_visible_(top, bottom, innerHeight)\n}\nexport {\n\tis_visible_ as _is_visible,\n}\n"],"names":["out_is_visible_","is_visible_","el","top","bottom","getBoundingClientRect","innerHeight","window","_is_visible"],"mappings":"AAAA,MAAM,GAAGA,eAAe,QAAQ,CAAsB;AACtD,MAAM,UAAUC,WAAW,CAACC,EAAc,EAAE,CAAC;IAC5C,KAAK,CAAC,CAAC,CAACC,GAAG,GAAEC,MAAM,EAAC,CAAC,GAAGF,EAAE,CAACG,qBAAqB;IAChD,KAAK,CAAC,CAAC,CAACC,WAAW,EAAC,CAAC,GAAGC,MAAM;IAC9B,MAAM,CAACP,eAAe,CAACG,GAAG,EAAEC,MAAM,EAAEE,WAAW;AAChD,CAAC;AACD,MAAM,GACLL,WAAW,IAAIO,WAAW"}
|
package/lib/out_is_active_.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function out_is_active_(top: number, bottom: number): boolean;
|
package/lib/out_is_active_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/out_is_active_.ts"],"sourcesContent":["export function out_is_active_(top:number, bottom:number) {\n\treturn top <= 0 && bottom >= 0\n}\n"],"names":["out_is_active_","top","bottom"],"mappings":"AAAA,MAAM,UAAUA,cAAc,CAACC,GAAU,EAAEC,MAAa,EAAE,CAAC;IAC1D,MAAM,CAACD,GAAG,IAAI,CAAC,IAAIC,MAAM,IAAI,CAAC;AAC/B,CAAC"}
|
package/lib/out_is_visible_.d.ts
DELETED
package/lib/out_is_visible_.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { out_is_active_ } from './out_is_active_.js';
|
|
2
|
-
export function out_is_visible_(top, bottom, innerHeight) {
|
|
3
|
-
return top > 0 && top < innerHeight || out_is_active_(top, bottom);
|
|
4
|
-
}
|
|
5
|
-
export { out_is_visible_ as _out_is_visible, };
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=out_is_visible_.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/out_is_visible_.ts"],"sourcesContent":["import { out_is_active_ } from './out_is_active_.js'\nexport function out_is_visible_(top:number, bottom:number, innerHeight:number) {\n\treturn (top > 0 && top < innerHeight)\n\t\t|| out_is_active_(top, bottom)\n}\nexport {\n\tout_is_visible_ as _out_is_visible,\n}\n"],"names":["out_is_active_","out_is_visible_","top","bottom","innerHeight","_out_is_visible"],"mappings":"AAAA,MAAM,GAAGA,cAAc,QAAQ,CAAqB;AACpD,MAAM,UAAUC,eAAe,CAACC,GAAU,EAAEC,MAAa,EAAEC,WAAkB,EAAE,CAAC;IAC/E,MAAM,CAAEF,GAAG,GAAG,CAAC,IAAIA,GAAG,GAAGE,WAAW,IAChCJ,cAAc,CAACE,GAAG,EAAEC,MAAM;AAC/B,CAAC;AACD,MAAM,GACLF,eAAe,IAAII,eAAe"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { B } from '@ctx-core/object';
|
|
2
|
-
import { WritableAtom$ } from '@ctx-core/nanostores';
|
|
3
|
-
export declare const sticky_scroll_active$_: B<sticky_scroll_active$_T>;
|
|
4
|
-
export interface sticky_scroll_active_T extends Record<string, boolean> {
|
|
5
|
-
}
|
|
6
|
-
export interface sticky_scroll_active$_T extends WritableAtom$<sticky_scroll_active_T> {
|
|
7
|
-
add_sticky_scroll_active: (key: string) => void;
|
|
8
|
-
remove_sticky_scroll_active: (key: string) => void;
|
|
9
|
-
sticky_scroll_active_key_active_: (key: string) => void;
|
|
10
|
-
sticky_scroll_active_key_match_: (key: string, active: any) => void;
|
|
11
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { assign, b_ } from '@ctx-core/object';
|
|
2
|
-
import { atom$ } from '@ctx-core/nanostores';
|
|
3
|
-
export const sticky_scroll_active$_ = b_('sticky_scroll_active$', ()=>{
|
|
4
|
-
const sticky_scroll_active$ = atom$({});
|
|
5
|
-
return assign(sticky_scroll_active$, {
|
|
6
|
-
add_sticky_scroll_active,
|
|
7
|
-
remove_sticky_scroll_active,
|
|
8
|
-
sticky_scroll_active_key_active_,
|
|
9
|
-
sticky_scroll_active_key_match_
|
|
10
|
-
});
|
|
11
|
-
function add_sticky_scroll_active(key) {
|
|
12
|
-
const sticky_scroll_active = sticky_scroll_active$.$;
|
|
13
|
-
sticky_scroll_active[key] = true;
|
|
14
|
-
sticky_scroll_active$.$ = sticky_scroll_active;
|
|
15
|
-
}
|
|
16
|
-
function remove_sticky_scroll_active(key) {
|
|
17
|
-
const sticky_scroll_active = sticky_scroll_active$.$;
|
|
18
|
-
sticky_scroll_active[key] = false;
|
|
19
|
-
sticky_scroll_active$.$ = sticky_scroll_active;
|
|
20
|
-
}
|
|
21
|
-
function sticky_scroll_active_key_active_(key) {
|
|
22
|
-
const sticky_scroll_active = sticky_scroll_active$.$;
|
|
23
|
-
const active = sticky_scroll_active ? sticky_scroll_active[key] : false;
|
|
24
|
-
return active;
|
|
25
|
-
}
|
|
26
|
-
function sticky_scroll_active_key_match_(key, active) {
|
|
27
|
-
return !!active == !!sticky_scroll_active_key_active_(key);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=sticky_scroll_active$_.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sticky_scroll_active$_.ts"],"sourcesContent":["import { assign, B, b_ } from '@ctx-core/object'\nimport { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nexport const sticky_scroll_active$_:B<sticky_scroll_active$_T> = b_('sticky_scroll_active$', ()=>{\n\tconst sticky_scroll_active$ = atom$<sticky_scroll_active_T>({})\n\treturn assign(sticky_scroll_active$, {\n\t\tadd_sticky_scroll_active,\n\t\tremove_sticky_scroll_active,\n\t\tsticky_scroll_active_key_active_,\n\t\tsticky_scroll_active_key_match_,\n\t}) as sticky_scroll_active$_T\n\tfunction add_sticky_scroll_active(key:string) {\n\t\tconst sticky_scroll_active = sticky_scroll_active$.$\n\t\tsticky_scroll_active[key] = true\n\t\tsticky_scroll_active$.$ = sticky_scroll_active\n\t}\n\tfunction remove_sticky_scroll_active(key:string) {\n\t\tconst sticky_scroll_active = sticky_scroll_active$.$\n\t\tsticky_scroll_active[key] = false\n\t\tsticky_scroll_active$.$ = sticky_scroll_active\n\t}\n\tfunction sticky_scroll_active_key_active_(key:string) {\n\t\tconst sticky_scroll_active = sticky_scroll_active$.$\n\t\tconst active =\n\t\t\tsticky_scroll_active\n\t\t\t? sticky_scroll_active[key]\n\t\t\t: false\n\t\treturn active\n\t}\n\tfunction sticky_scroll_active_key_match_(key:string, active:boolean) {\n\t\treturn !!(active) == !!(sticky_scroll_active_key_active_(key))\n\t}\n})\nexport interface sticky_scroll_active_T extends Record<string, boolean> {}\nexport interface sticky_scroll_active$_T extends WritableAtom$<sticky_scroll_active_T> {\n\tadd_sticky_scroll_active:(key:string)=>void\n\tremove_sticky_scroll_active:(key:string)=>void\n\tsticky_scroll_active_key_active_:(key:string)=>void\n\tsticky_scroll_active_key_match_:(key:string, active:any)=>void\n}\n"],"names":["assign","b_","atom$","sticky_scroll_active$_","sticky_scroll_active$","add_sticky_scroll_active","remove_sticky_scroll_active","sticky_scroll_active_key_active_","sticky_scroll_active_key_match_","key","sticky_scroll_active","$","active"],"mappings":"AAAA,MAAM,GAAGA,MAAM,EAAKC,EAAE,QAAQ,CAAkB;AAChD,MAAM,GAAGC,KAAK,QAAuB,CAAsB;AAC3D,MAAM,CAAC,KAAK,CAACC,sBAAsB,GAA8BF,EAAE,CAAC,CAAuB,4BAAM,CAAC;IACjG,KAAK,CAACG,qBAAqB,GAAGF,KAAK,CAAyB,CAAC,CAAC;IAC9D,MAAM,CAACF,MAAM,CAACI,qBAAqB,EAAE,CAAC;QACrCC,wBAAwB;QACxBC,2BAA2B;QAC3BC,gCAAgC;QAChCC,+BAA+B;IAChC,CAAC;aACQH,wBAAwB,CAACI,GAAU,EAAE,CAAC;QAC9C,KAAK,CAACC,oBAAoB,GAAGN,qBAAqB,CAACO,CAAC;QACpDD,oBAAoB,CAACD,GAAG,IAAI,IAAI;QAChCL,qBAAqB,CAACO,CAAC,GAAGD,oBAAoB;IAC/C,CAAC;aACQJ,2BAA2B,CAACG,GAAU,EAAE,CAAC;QACjD,KAAK,CAACC,oBAAoB,GAAGN,qBAAqB,CAACO,CAAC;QACpDD,oBAAoB,CAACD,GAAG,IAAI,KAAK;QACjCL,qBAAqB,CAACO,CAAC,GAAGD,oBAAoB;IAC/C,CAAC;aACQH,gCAAgC,CAACE,GAAU,EAAE,CAAC;QACtD,KAAK,CAACC,oBAAoB,GAAGN,qBAAqB,CAACO,CAAC;QACpD,KAAK,CAACC,MAAM,GACXF,oBAAoB,GAClBA,oBAAoB,CAACD,GAAG,IACxB,KAAK;QACR,MAAM,CAACG,MAAM;IACd,CAAC;aACQJ,+BAA+B,CAACC,GAAU,EAAEG,MAAc,EAAE,CAAC;QACrE,MAAM,GAAIA,MAAM,MAAQL,gCAAgC,CAACE,GAAG;IAC7D,CAAC;AACF,CAAC"}
|
package/src/out_is_active_.ts
DELETED
package/src/out_is_visible_.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { assign, B, b_ } from '@ctx-core/object'
|
|
2
|
-
import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
|
|
3
|
-
export const sticky_scroll_active$_:B<sticky_scroll_active$_T> = b_('sticky_scroll_active$', ()=>{
|
|
4
|
-
const sticky_scroll_active$ = atom$<sticky_scroll_active_T>({})
|
|
5
|
-
return assign(sticky_scroll_active$, {
|
|
6
|
-
add_sticky_scroll_active,
|
|
7
|
-
remove_sticky_scroll_active,
|
|
8
|
-
sticky_scroll_active_key_active_,
|
|
9
|
-
sticky_scroll_active_key_match_,
|
|
10
|
-
}) as sticky_scroll_active$_T
|
|
11
|
-
function add_sticky_scroll_active(key:string) {
|
|
12
|
-
const sticky_scroll_active = sticky_scroll_active$.$
|
|
13
|
-
sticky_scroll_active[key] = true
|
|
14
|
-
sticky_scroll_active$.$ = sticky_scroll_active
|
|
15
|
-
}
|
|
16
|
-
function remove_sticky_scroll_active(key:string) {
|
|
17
|
-
const sticky_scroll_active = sticky_scroll_active$.$
|
|
18
|
-
sticky_scroll_active[key] = false
|
|
19
|
-
sticky_scroll_active$.$ = sticky_scroll_active
|
|
20
|
-
}
|
|
21
|
-
function sticky_scroll_active_key_active_(key:string) {
|
|
22
|
-
const sticky_scroll_active = sticky_scroll_active$.$
|
|
23
|
-
const active =
|
|
24
|
-
sticky_scroll_active
|
|
25
|
-
? sticky_scroll_active[key]
|
|
26
|
-
: false
|
|
27
|
-
return active
|
|
28
|
-
}
|
|
29
|
-
function sticky_scroll_active_key_match_(key:string, active:boolean) {
|
|
30
|
-
return !!(active) == !!(sticky_scroll_active_key_active_(key))
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
export interface sticky_scroll_active_T extends Record<string, boolean> {}
|
|
34
|
-
export interface sticky_scroll_active$_T extends WritableAtom$<sticky_scroll_active_T> {
|
|
35
|
-
add_sticky_scroll_active:(key:string)=>void
|
|
36
|
-
remove_sticky_scroll_active:(key:string)=>void
|
|
37
|
-
sticky_scroll_active_key_active_:(key:string)=>void
|
|
38
|
-
sticky_scroll_active_key_match_:(key:string, active:any)=>void
|
|
39
|
-
}
|