kitzo 2.1.15 → 2.1.17
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/README.md +1 -1
- package/dist/{react.esm.js → react/react.esm.js} +15 -13
- package/package.json +73 -62
- /package/dist/{react.d.ts → react/react.d.ts} +0 -0
- /package/dist/{kitzo.d.ts → vanilla/vanilla.d.ts} +0 -0
- /package/dist/{kitzo.esm.js → vanilla/vanilla.esm.js} +0 -0
- /package/dist/{kitzo.umd.js → vanilla/vanilla.umd.js} +0 -0
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ npm i kitzo
|
|
|
26
26
|
or
|
|
27
27
|
|
|
28
28
|
```javascript
|
|
29
|
-
<script src="https://cdn.jsdelivr.net/npm/kitzo@2.1.
|
|
29
|
+
<script src="https://cdn.jsdelivr.net/npm/kitzo@2.1.17/dist/kitzo.umd.min.js"></script>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
> Vanilla: Attach this script tag in the html head tag and you are good to go.
|
|
@@ -713,19 +713,7 @@ function useScrollRestoration(path, key, options = {}) {
|
|
|
713
713
|
const mapKey = `${pathname}::${key}`;
|
|
714
714
|
const saved = history.current.get(mapKey);
|
|
715
715
|
const restore = () => {
|
|
716
|
-
if (!saved)
|
|
717
|
-
window.scrollTo({
|
|
718
|
-
top: 0,
|
|
719
|
-
left: 0,
|
|
720
|
-
behavior: 'auto'
|
|
721
|
-
});
|
|
722
|
-
element.scrollTo({
|
|
723
|
-
top: 0,
|
|
724
|
-
left: 0,
|
|
725
|
-
behavior: 'auto'
|
|
726
|
-
});
|
|
727
|
-
return;
|
|
728
|
-
}
|
|
716
|
+
if (!saved) return;
|
|
729
717
|
if (isWindow) {
|
|
730
718
|
window.scrollTo({
|
|
731
719
|
top: saved.top,
|
|
@@ -747,6 +735,20 @@ function useScrollRestoration(path, key, options = {}) {
|
|
|
747
735
|
} else {
|
|
748
736
|
restore();
|
|
749
737
|
}
|
|
738
|
+
} else {
|
|
739
|
+
if (isWindow) {
|
|
740
|
+
window.scrollTo({
|
|
741
|
+
top: 0,
|
|
742
|
+
left: 0,
|
|
743
|
+
behavior: 'auto'
|
|
744
|
+
});
|
|
745
|
+
} else if (element) {
|
|
746
|
+
element.scrollTo({
|
|
747
|
+
top: 0,
|
|
748
|
+
left: 0,
|
|
749
|
+
behavior: 'auto'
|
|
750
|
+
});
|
|
751
|
+
}
|
|
750
752
|
}
|
|
751
753
|
let timeoutId = null;
|
|
752
754
|
const save = () => {
|
package/package.json
CHANGED
|
@@ -1,62 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "kitzo",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "A lightweight JavaScript UI micro-library.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
},
|
|
13
|
-
"./react": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"dev": "vite",
|
|
23
|
-
"build": "rollup -c",
|
|
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
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"react
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"react": "
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "kitzo",
|
|
3
|
+
"version": "2.1.17",
|
|
4
|
+
"description": "A lightweight JavaScript & React UI micro-library.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/vanilla/vanilla.umd.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/vanilla/vanilla.d.ts",
|
|
10
|
+
"import": "./dist/vanilla/vanilla.esm.js",
|
|
11
|
+
"require": "./dist/vanilla/vanilla.umd.js"
|
|
12
|
+
},
|
|
13
|
+
"./react": {
|
|
14
|
+
"types": "./dist/react/react.d.ts",
|
|
15
|
+
"import": "./dist/react/react.esm.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"dev": "vite",
|
|
23
|
+
"build": "rollup -c",
|
|
24
|
+
"build-test": "vite buil",
|
|
25
|
+
"lint": "eslint .",
|
|
26
|
+
"preview": "vite preview"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"tooltip",
|
|
30
|
+
"ripple",
|
|
31
|
+
"copy-button",
|
|
32
|
+
"micro-library",
|
|
33
|
+
"modular",
|
|
34
|
+
"ui",
|
|
35
|
+
"javascript",
|
|
36
|
+
"react",
|
|
37
|
+
"kitzo"
|
|
38
|
+
],
|
|
39
|
+
"author": "Riyad",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "https://github.com/riyad-96/kitzo"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/riyad-96/kitzo#readme",
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@babel/core": "^7.28.5",
|
|
48
|
+
"@babel/preset-react": "^7.28.5",
|
|
49
|
+
"@eslint/js": "^9.39.1",
|
|
50
|
+
"@rollup/plugin-babel": "^6.1.0",
|
|
51
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
52
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
53
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
54
|
+
"@types/react": "^19.2.5",
|
|
55
|
+
"@types/react-dom": "^19.2.3",
|
|
56
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
57
|
+
"eslint": "^9.39.1",
|
|
58
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
59
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
60
|
+
"globals": "^16.5.0",
|
|
61
|
+
"prettier": "^3.6.2",
|
|
62
|
+
"prettier-plugin-tailwindcss": "^0.7.1",
|
|
63
|
+
"react": "^19.2.0",
|
|
64
|
+
"react-dom": "^19.2.0",
|
|
65
|
+
"react-router-dom": "^7.9.6",
|
|
66
|
+
"tailwindcss": "^4.1.17",
|
|
67
|
+
"vite": "^7.2.4"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"react": ">=19",
|
|
71
|
+
"react-dom": ">=19"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|