@ctx-core/scroll 17.3.15 → 17.3.19

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
@@ -2,4 +2,4 @@ export * from './is_active_/index.js'
2
2
  export * from './is_visible_/index.js'
3
3
  export * from './out_is_active_/index.js'
4
4
  export * from './out_is_visible_/index.js'
5
- export * from './sticky_scroll_active__/index.js'
5
+ export * from './sticky_scroll_active/index.js'
package/index.js CHANGED
@@ -2,4 +2,4 @@ export * from './is_active_/index.js'
2
2
  export * from './is_visible_/index.js'
3
3
  export * from './out_is_active_/index.js'
4
4
  export * from './out_is_visible_/index.js'
5
- export * from './sticky_scroll_active__/index.js'
5
+ export * from './sticky_scroll_active/index.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/scroll",
3
- "version": "17.3.15",
3
+ "version": "17.3.19",
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
- "./sticky_scroll_active__"
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": "^7.1.16",
37
- "@ctx-core/object": "^30.4.7"
36
+ "@ctx-core/nanostores": "^9.0.2",
37
+ "@ctx-core/object": "^31.0.1"
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.3",
43
+ "tsx": "^4.1.4",
44
44
  "typescript": "next",
45
45
  "uvu": "^0.5.6"
46
46
  },
@@ -1,10 +1,9 @@
1
- import type { WritableAtom_ } from '@ctx-core/nanostores'
2
- import type { Be, Ctx } from '@ctx-core/object'
3
- export declare const sticky_scroll_active__:Be<sticky_scroll_active__T>
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,48 @@
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
+ .config({ id: 'sticky_scroll_active_' })
9
+ export { sticky_scroll_active$_ as sticky_scroll_active__ }
10
+ /**
11
+ * @param {import('@ctx-core/object').Ctx}ctx
12
+ * @param {string}key
13
+ */
14
+ export function add_sticky_scroll_active(ctx, key) {
15
+ const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
16
+ const sticky_scroll_active = sticky_scroll_active$.$
17
+ sticky_scroll_active[key] = true
18
+ sticky_scroll_active$.$ = sticky_scroll_active
19
+ }
20
+ /**
21
+ * @param {import('@ctx-core/object').Ctx}ctx
22
+ * @param {string}key
23
+ */
24
+ export function remove_sticky_scroll_active(ctx, key) {
25
+ const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
26
+ const sticky_scroll_active = sticky_scroll_active$.$
27
+ sticky_scroll_active[key] = false
28
+ sticky_scroll_active$.$ = sticky_scroll_active
29
+ }
30
+ /**
31
+ * @param {import('@ctx-core/object').Ctx}ctx
32
+ * @param {string}key
33
+ */
34
+ export function sticky_scroll_active_key_active_(ctx, key) {
35
+ const sticky_scroll_active$ = sticky_scroll_active$_(ctx)
36
+ const sticky_scroll_active = sticky_scroll_active$.$
37
+ const active = sticky_scroll_active ? sticky_scroll_active[key] : false
38
+ return active
39
+ }
40
+ /**
41
+ * @param {import('@ctx-core/object').Ctx}ctx
42
+ * @param {string}key
43
+ * @param {boolean}active
44
+ */
45
+ export function sticky_scroll_active_key_match_(ctx, key, active) {
46
+ return !!active == !!sticky_scroll_active_key_active_(ctx, key)
47
+ }
48
+ 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$_ }