@ctx-core/scroll 15.0.5 → 15.0.9

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,37 @@
1
1
  # @ctx-core/scroll
2
2
 
3
+ ## 15.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - @swc/core: ^1.2.125 -> ^1.2.127
8
+ - Updated dependencies
9
+ - @ctx-core/nanostores@0.3.3
10
+ - @ctx-core/object@22.0.11
11
+
12
+ ## 15.0.8
13
+
14
+ ### Patch Changes
15
+
16
+ - version bump
17
+ - Updated dependencies
18
+ - @ctx-core/nanostores@0.3.2
19
+ - @ctx-core/object@22.0.10
20
+
21
+ ## 15.0.7
22
+
23
+ ### Patch Changes
24
+
25
+ - .js + .d.ts instead of .ts
26
+ - Updated dependencies
27
+ - @ctx-core/nanostores@0.3.1
28
+
29
+ ## 15.0.6
30
+
31
+ ### Patch Changes
32
+
33
+ - fix: package.json: compile types: + compile:source,compile:declaration
34
+
3
35
  ## 15.0.5
4
36
 
5
37
  ### Patch Changes
package/lib/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from './is_active_.js';
2
+ export * from './is_visible_.js';
3
+ export * from './out_is_active_.js';
4
+ export * from './out_is_visible_.js';
5
+ export * from './sticky_scroll_active$_b.js';
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ export declare function is_active_(el: HTMLElement): boolean;
2
+ export { is_active_ as _is_active, };
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ export declare function is_visible_(el: HTMLElement): boolean;
2
+ export { is_visible_ as _is_visible, };
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export declare function out_is_active_(top: number, bottom: number): boolean;
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ export declare function out_is_visible_(top: number, bottom: number, innerHeight: number): boolean;
2
+ export { out_is_visible_ as _out_is_visible, };
File without changes
File without changes
@@ -0,0 +1,12 @@
1
+ import { B } from '@ctx-core/object';
2
+ import { WritableAtom$ } from '@ctx-core/nanostores';
3
+ export declare const sticky_scroll_active$_b: 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
+ }
12
+ export { sticky_scroll_active$_b as b__active__Sticky__Scroll, };
@@ -2,8 +2,7 @@ import { assign, b_ } from '@ctx-core/object';
2
2
  import { atom$ } from '@ctx-core/nanostores';
3
3
  const key = 'sticky_scroll_active$';
4
4
  export const sticky_scroll_active$_b = b_(key, ()=>{
5
- const sticky_scroll_active$ = atom$({
6
- });
5
+ const sticky_scroll_active$ = atom$({});
7
6
  return assign(sticky_scroll_active$, {
8
7
  add_sticky_scroll_active,
9
8
  remove_sticky_scroll_active,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/sticky_scroll_active$_b.ts"],"sourcesContent":["import { assign, b_, B } from '@ctx-core/object'\nimport { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nconst key = 'sticky_scroll_active$'\nexport const sticky_scroll_active$_b:B<sticky_scroll_active$_T> = b_(key, ()=>{\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}\nexport {\n\tsticky_scroll_active$_b as b__active__Sticky__Scroll,\n}\n"],"names":["assign","b_","atom$","key","sticky_scroll_active$_b","sticky_scroll_active$","add_sticky_scroll_active","remove_sticky_scroll_active","sticky_scroll_active_key_active_","sticky_scroll_active_key_match_","sticky_scroll_active","$","active","b__active__Sticky__Scroll"],"mappings":"AAAA,MAAM,GAAGA,MAAM,EAAEC,EAAE,QAAW,CAAkB;AAChD,MAAM,GAAGC,KAAK,QAAuB,CAAsB;AAC3D,KAAK,CAACC,GAAG,GAAG,CAAuB;AACnC,MAAM,CAAC,KAAK,CAACC,uBAAuB,GAA8BH,EAAE,CAACE,GAAG,MAAM,CAAC;IAC9E,KAAK,CAACE,qBAAqB,GAAGH,KAAK,CAAyB,CAAC;IAAA,CAAC;IAC9D,MAAM,CAACF,MAAM,CAACK,qBAAqB,EAAE,CAAC;QACrCC,wBAAwB;QACxBC,2BAA2B;QAC3BC,gCAAgC;QAChCC,+BAA+B;IAChC,CAAC;aACQH,wBAAwB,CAACH,GAAU,EAAE,CAAC;QAC9C,KAAK,CAACO,oBAAoB,GAAGL,qBAAqB,CAACM,CAAC;QACpDD,oBAAoB,CAACP,GAAG,IAAI,IAAI;QAChCE,qBAAqB,CAACM,CAAC,GAAGD,oBAAoB;IAC/C,CAAC;aACQH,2BAA2B,CAACJ,GAAU,EAAE,CAAC;QACjD,KAAK,CAACO,oBAAoB,GAAGL,qBAAqB,CAACM,CAAC;QACpDD,oBAAoB,CAACP,GAAG,IAAI,KAAK;QACjCE,qBAAqB,CAACM,CAAC,GAAGD,oBAAoB;IAC/C,CAAC;aACQF,gCAAgC,CAACL,GAAU,EAAE,CAAC;QACtD,KAAK,CAACO,oBAAoB,GAAGL,qBAAqB,CAACM,CAAC;QACpD,KAAK,CAACC,MAAM,GACXF,oBAAoB,GAClBA,oBAAoB,CAACP,GAAG,IACxB,KAAK;QACR,MAAM,CAACS,MAAM;IACd,CAAC;aACQH,+BAA+B,CAACN,IAAU,EAAES,MAAc,EAAE,CAAC;QACrE,MAAM,GAAIA,MAAM,MAAQJ,gCAAgC,CAACL,IAAG;IAC7D,CAAC;AACF,CAAC;AAQD,MAAM,GACLC,uBAAuB,IAAIS,yBAAyB"}
1
+ {"version":3,"sources":["../src/sticky_scroll_active$_b.ts"],"sourcesContent":["import { assign, b_, B } from '@ctx-core/object'\nimport { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nconst key = 'sticky_scroll_active$'\nexport const sticky_scroll_active$_b:B<sticky_scroll_active$_T> = b_(key, ()=>{\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}\nexport {\n\tsticky_scroll_active$_b as b__active__Sticky__Scroll,\n}\n"],"names":["assign","b_","atom$","key","sticky_scroll_active$_b","sticky_scroll_active$","add_sticky_scroll_active","remove_sticky_scroll_active","sticky_scroll_active_key_active_","sticky_scroll_active_key_match_","sticky_scroll_active","$","active","b__active__Sticky__Scroll"],"mappings":"AAAA,MAAM,GAAGA,MAAM,EAAEC,EAAE,QAAW,CAAkB;AAChD,MAAM,GAAGC,KAAK,QAAuB,CAAsB;AAC3D,KAAK,CAACC,GAAG,GAAG,CAAuB;AACnC,MAAM,CAAC,KAAK,CAACC,uBAAuB,GAA8BH,EAAE,CAACE,GAAG,MAAM,CAAC;IAC9E,KAAK,CAACE,qBAAqB,GAAGH,KAAK,CAAyB,CAAC,CAAC;IAC9D,MAAM,CAACF,MAAM,CAACK,qBAAqB,EAAE,CAAC;QACrCC,wBAAwB;QACxBC,2BAA2B;QAC3BC,gCAAgC;QAChCC,+BAA+B;IAChC,CAAC;aACQH,wBAAwB,CAACH,GAAU,EAAE,CAAC;QAC9C,KAAK,CAACO,oBAAoB,GAAGL,qBAAqB,CAACM,CAAC;QACpDD,oBAAoB,CAACP,GAAG,IAAI,IAAI;QAChCE,qBAAqB,CAACM,CAAC,GAAGD,oBAAoB;IAC/C,CAAC;aACQH,2BAA2B,CAACJ,GAAU,EAAE,CAAC;QACjD,KAAK,CAACO,oBAAoB,GAAGL,qBAAqB,CAACM,CAAC;QACpDD,oBAAoB,CAACP,GAAG,IAAI,KAAK;QACjCE,qBAAqB,CAACM,CAAC,GAAGD,oBAAoB;IAC/C,CAAC;aACQF,gCAAgC,CAACL,GAAU,EAAE,CAAC;QACtD,KAAK,CAACO,oBAAoB,GAAGL,qBAAqB,CAACM,CAAC;QACpD,KAAK,CAACC,MAAM,GACXF,oBAAoB,GAClBA,oBAAoB,CAACP,GAAG,IACxB,KAAK;QACR,MAAM,CAACS,MAAM;IACd,CAAC;aACQH,+BAA+B,CAACN,IAAU,EAAES,MAAc,EAAE,CAAC;QACrE,MAAM,GAAIA,MAAM,MAAQJ,gCAAgC,CAACL,IAAG;IAC7D,CAAC;AACF,CAAC;AAQD,MAAM,GACLC,uBAAuB,IAAIS,yBAAyB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/scroll",
3
- "version": "15.0.5",
3
+ "version": "15.0.9",
4
4
  "description": "ctx-core scroll",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -17,20 +17,20 @@
17
17
  "license": "Apache-2.0",
18
18
  "author": "Brian Takita",
19
19
  "type": "module",
20
- "types": "./dist/index.d.ts",
20
+ "types": "./lib/index.d.ts",
21
21
  "exports": {
22
22
  ".": {
23
- "import": "./dist/index.js"
23
+ "import": "./lib/index.js"
24
24
  },
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@ctx-core/nanostores": "^0.3.0",
29
- "@ctx-core/object": "^22.0.8"
28
+ "@ctx-core/nanostores": "^0.3.3",
29
+ "@ctx-core/object": "^22.0.11"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@swc/cli": "^0.1.55",
33
- "@swc/core": "^1.2.121",
33
+ "@swc/core": "^1.2.127",
34
34
  "rimraf": "^3.0.2",
35
35
  "typescript": "next"
36
36
  },
@@ -38,12 +38,14 @@
38
38
  "access": "public",
39
39
  "cache": "~/.npm"
40
40
  },
41
- "svelte": "./dist/index.js",
41
+ "svelte": "./lib/index.js",
42
42
  "scripts": {
43
43
  "build": "npm run compile",
44
- "clean": "rimraf dist && npm run clean_tsbuildinfo",
45
- "clean_tsbuildinfo": "rm -f tsconfig.tsbuildinfo && rm -f dist/**/*.d.ts",
46
- "compile": "swc src --out-dir dist --copy-files --source-maps --config-file .swcrc",
44
+ "clean": "rimraf lib && npm run clean:tsbuildinfo",
45
+ "clean:tsbuildinfo": "rimraf tsconfig.tsbuildinfo && rimraf lib/**/*.d.ts",
46
+ "compile": "npm run compile:source && npm run compile:declaration",
47
+ "compile:source": "swc src --out-dir lib --copy-files --source-maps --config-file .swcrc",
48
+ "compile:declaration": "npm run clean:tsbuildinfo && tsc --declaration --emitDeclarationOnly --declarationDir lib",
47
49
  "exec": "$@"
48
50
  }
49
51
  }
package/tsconfig.json CHANGED
@@ -22,15 +22,15 @@
22
22
  "node_modules/@types"
23
23
  ],
24
24
  "rootDir": "src",
25
- "outDir": "dist",
26
- "declarationDir": "dist",
25
+ "outDir": "lib",
26
+ "declarationDir": "lib",
27
27
  "lib": ["dom", "ESNext"],
28
28
  "importsNotUsedAsValues": "error",
29
29
  "strict": true
30
30
  },
31
31
  "exclude": [
32
32
  "node_modules",
33
- "dist"
33
+ "lib"
34
34
  ],
35
35
  "references": []
36
36
  }