@nightshadeui/scroller 2.22.0 → 3.1.0
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/out/index.d.ts +0 -1
- package/out/index.d.ts.map +1 -1
- package/out/index.js +0 -1
- package/out/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +0 -1
- package/out/useScroller.d.ts +0 -7
- package/out/useScroller.d.ts.map +0 -1
- package/out/useScroller.js +0 -22
- package/out/useScroller.js.map +0 -1
- package/src/useScroller.ts +0 -24
package/out/index.d.ts
CHANGED
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC"}
|
package/out/index.js
CHANGED
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nightshadeui/scroller",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Scroll progress
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "Scroll progress controller for Nightshade Vue apps",
|
|
5
5
|
"author": "Boris Okunskiy",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"type": "module",
|
package/src/index.ts
CHANGED
package/out/useScroller.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ScrollerParams } from './types.js';
|
|
2
|
-
export declare function useScroller(params?: ScrollerParams): {
|
|
3
|
-
t: import("vue").Ref<number, number>;
|
|
4
|
-
scrollerEl: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
|
|
5
|
-
updateScroller: () => void;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=useScroller.d.ts.map
|
package/out/useScroller.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useScroller.d.ts","sourceRoot":"","sources":["../src/useScroller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,wBAAgB,WAAW,CAAC,MAAM,GAAE,cAAmB;;;;EAkBtD"}
|
package/out/useScroller.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { onMounted, onUnmounted, ref, toRef } from 'vue';
|
|
2
|
-
import { ScrollerController } from './ScrollerController.js';
|
|
3
|
-
export function useScroller(params = {}) {
|
|
4
|
-
const scrollerEl = ref(null);
|
|
5
|
-
const scroller = new ScrollerController(params);
|
|
6
|
-
onMounted(() => {
|
|
7
|
-
const el = scrollerEl.value;
|
|
8
|
-
if (!el) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
scroller.mount(el);
|
|
12
|
-
});
|
|
13
|
-
onUnmounted(() => {
|
|
14
|
-
scroller.unmount();
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
t: toRef(scroller, 't'),
|
|
18
|
-
scrollerEl,
|
|
19
|
-
updateScroller: () => scroller.update(),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=useScroller.js.map
|
package/out/useScroller.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useScroller.js","sourceRoot":"","sources":["../src/useScroller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,UAAU,WAAW,CAAC,SAAyB,EAAE;IACnD,MAAM,UAAU,GAAG,GAAG,CAAqB,IAAI,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAChD,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,EAAE,EAAE,CAAC;YACN,OAAO;QACX,CAAC;QACD,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,WAAW,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,OAAO;QACH,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC;QACvB,UAAU;QACV,cAAc,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE;KAC1C,CAAC;AACN,CAAC"}
|
package/src/useScroller.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { onMounted, onUnmounted, ref, toRef } from 'vue';
|
|
2
|
-
|
|
3
|
-
import { ScrollerController } from './ScrollerController.js';
|
|
4
|
-
import { ScrollerParams } from './types.js';
|
|
5
|
-
|
|
6
|
-
export function useScroller(params: ScrollerParams = {}) {
|
|
7
|
-
const scrollerEl = ref<HTMLElement | null>(null);
|
|
8
|
-
const scroller = new ScrollerController(params);
|
|
9
|
-
onMounted(() => {
|
|
10
|
-
const el = scrollerEl.value;
|
|
11
|
-
if (!el) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
scroller.mount(el);
|
|
15
|
-
});
|
|
16
|
-
onUnmounted(() => {
|
|
17
|
-
scroller.unmount();
|
|
18
|
-
});
|
|
19
|
-
return {
|
|
20
|
-
t: toRef(scroller, 't'),
|
|
21
|
-
scrollerEl,
|
|
22
|
-
updateScroller: () => scroller.update(),
|
|
23
|
-
};
|
|
24
|
-
}
|