kitzo 2.3.30 → 2.3.31
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
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# Kitzo
|
|
2
|
-
|
|
3
|
-
**Lightweight React UI components and essential hooks.**
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
### Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install kitzo
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
### Core Features
|
|
16
|
-
|
|
17
|
-
#### Components
|
|
18
|
-
|
|
19
|
-
- **Toast** — Accessible, animated notifications.
|
|
20
|
-
- **Tooltip** — Smart-positioned contextual labels.
|
|
21
|
-
|
|
22
|
-
#### Hooks
|
|
23
|
-
|
|
24
|
-
- **useDebounce** — Optimize performance by delaying execution.
|
|
25
|
-
- **useWindowSize** — Real-time viewport dimensions.
|
|
26
|
-
- **useCopy** — Simple "copy to clipboard" functionality.
|
|
27
|
-
- **useThrottle** — Limits how often a value can change within a specified time interval.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
### Documentation
|
|
32
|
-
|
|
33
|
-
For usage guides and live demos, visit documentation:
|
|
34
|
-
[https://kitzo.vercel.app](https://kitzo.vercel.app)
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
### License
|
|
39
|
-
|
|
40
|
-
MIT
|
|
1
|
+
# Kitzo
|
|
2
|
+
|
|
3
|
+
**Lightweight React UI components and essential hooks.**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install kitzo
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
### Core Features
|
|
16
|
+
|
|
17
|
+
#### Components
|
|
18
|
+
|
|
19
|
+
- **Toast** — Accessible, animated notifications.
|
|
20
|
+
- **Tooltip** — Smart-positioned contextual labels.
|
|
21
|
+
|
|
22
|
+
#### Hooks
|
|
23
|
+
|
|
24
|
+
- **useDebounce** — Optimize performance by delaying execution.
|
|
25
|
+
- **useWindowSize** — Real-time viewport dimensions.
|
|
26
|
+
- **useCopy** — Simple "copy to clipboard" functionality.
|
|
27
|
+
- **useThrottle** — Limits how often a value can change within a specified time interval.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### Documentation
|
|
32
|
+
|
|
33
|
+
For usage guides and live demos, visit documentation:
|
|
34
|
+
[https://kitzo.vercel.app](https://kitzo.vercel.app)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### License
|
|
39
|
+
|
|
40
|
+
MIT
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { LEAVE_DELAY as
|
|
2
|
-
function
|
|
3
|
-
if (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
},
|
|
1
|
+
import { LEAVE_DELAY as n, clearAllTimers as t, clearTimer as u } from "./timers.js";
|
|
2
|
+
function m({ toast: a, setToasts: l }) {
|
|
3
|
+
if (a.id == null) {
|
|
4
|
+
l((e) => e.map((i) => ({ ...i, status: "leaving" }))), setTimeout(() => {
|
|
5
|
+
l((e) => e.filter((i) => i.status !== "leaving"));
|
|
6
|
+
}, n), t();
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
|
-
u(
|
|
10
|
-
|
|
9
|
+
u(a.id);
|
|
10
|
+
const r = `toast-id:${a.id}`;
|
|
11
|
+
console.log(r), l(
|
|
12
|
+
(e) => e.map((i) => i.id === r ? { ...i, status: "leaving" } : i)
|
|
11
13
|
), setTimeout(() => {
|
|
12
|
-
|
|
13
|
-
(e) => e.filter((i) => !(i.id ===
|
|
14
|
+
l(
|
|
15
|
+
(e) => e.filter((i) => !(i.id === r && i.status === "leaving"))
|
|
14
16
|
);
|
|
15
|
-
},
|
|
17
|
+
}, n);
|
|
16
18
|
}
|
|
17
19
|
export {
|
|
18
|
-
|
|
20
|
+
m as default
|
|
19
21
|
};
|
package/package.json
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "kitzo",
|
|
3
|
-
"version": "2.3.
|
|
4
|
-
"description": "A lightweight React micro-utility.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"sideEffects": false,
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
"import": "./dist/index.js",
|
|
14
|
-
"default": "./dist/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./fns": {
|
|
17
|
-
"types": "./dist/fns.d.ts",
|
|
18
|
-
"import": "./dist/fns.js",
|
|
19
|
-
"default": "./dist/fns.js"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"dev": "vite",
|
|
24
|
-
"dev:host": "vite --host",
|
|
25
|
-
"build": "tsc -b && vite build",
|
|
26
|
-
"lint": "eslint .",
|
|
27
|
-
"preview": "vite preview"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"kitzo",
|
|
31
|
-
"components",
|
|
32
|
-
"toast",
|
|
33
|
-
"tooltip",
|
|
34
|
-
"hooks",
|
|
35
|
-
"function",
|
|
36
|
-
"micro-utility",
|
|
37
|
-
"ui",
|
|
38
|
-
"react",
|
|
39
|
-
"reactjs"
|
|
40
|
-
],
|
|
41
|
-
"author": "Riyad",
|
|
42
|
-
"license": "MIT",
|
|
43
|
-
"repository": {
|
|
44
|
-
"type": "git",
|
|
45
|
-
"url": "git+https://github.com/riyad-96/kitzo.git"
|
|
46
|
-
},
|
|
47
|
-
"homepage": "https://github.com/riyad-96/kitzo#readme",
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"react": ">=19",
|
|
50
|
-
"react-dom": ">=19"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@eslint/js": "^9.39.2",
|
|
54
|
-
"@tailwindcss/vite": "^4.1.18",
|
|
55
|
-
"@types/node": "^25.0.6",
|
|
56
|
-
"@types/react": "^19.2.8",
|
|
57
|
-
"@types/react-dom": "^19.2.3",
|
|
58
|
-
"@vitejs/plugin-react-swc": "^4.2.2",
|
|
59
|
-
"daisyui": "^5.5.14",
|
|
60
|
-
"eslint": "^9.39.2",
|
|
61
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
62
|
-
"eslint-plugin-react-refresh": "^0.4.26",
|
|
63
|
-
"globals": "^17.0.0",
|
|
64
|
-
"prettier": "^3.7.4",
|
|
65
|
-
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
66
|
-
"react": "^19.2.3",
|
|
67
|
-
"react-dom": "^19.2.3",
|
|
68
|
-
"tailwindcss": "^4.1.18",
|
|
69
|
-
"typescript": "~5.9.3",
|
|
70
|
-
"typescript-eslint": "^8.52.0",
|
|
71
|
-
"vite": "^7.3.1",
|
|
72
|
-
"vite-plugin-dts": "^4.5.4"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "kitzo",
|
|
3
|
+
"version": "2.3.31",
|
|
4
|
+
"description": "A lightweight React micro-utility.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./fns": {
|
|
17
|
+
"types": "./dist/fns.d.ts",
|
|
18
|
+
"import": "./dist/fns.js",
|
|
19
|
+
"default": "./dist/fns.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"dev:host": "vite --host",
|
|
25
|
+
"build": "tsc -b && vite build",
|
|
26
|
+
"lint": "eslint .",
|
|
27
|
+
"preview": "vite preview"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"kitzo",
|
|
31
|
+
"components",
|
|
32
|
+
"toast",
|
|
33
|
+
"tooltip",
|
|
34
|
+
"hooks",
|
|
35
|
+
"function",
|
|
36
|
+
"micro-utility",
|
|
37
|
+
"ui",
|
|
38
|
+
"react",
|
|
39
|
+
"reactjs"
|
|
40
|
+
],
|
|
41
|
+
"author": "Riyad",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/riyad-96/kitzo.git"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/riyad-96/kitzo#readme",
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"react": ">=19",
|
|
50
|
+
"react-dom": ">=19"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@eslint/js": "^9.39.2",
|
|
54
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
55
|
+
"@types/node": "^25.0.6",
|
|
56
|
+
"@types/react": "^19.2.8",
|
|
57
|
+
"@types/react-dom": "^19.2.3",
|
|
58
|
+
"@vitejs/plugin-react-swc": "^4.2.2",
|
|
59
|
+
"daisyui": "^5.5.14",
|
|
60
|
+
"eslint": "^9.39.2",
|
|
61
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
62
|
+
"eslint-plugin-react-refresh": "^0.4.26",
|
|
63
|
+
"globals": "^17.0.0",
|
|
64
|
+
"prettier": "^3.7.4",
|
|
65
|
+
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
66
|
+
"react": "^19.2.3",
|
|
67
|
+
"react-dom": "^19.2.3",
|
|
68
|
+
"tailwindcss": "^4.1.18",
|
|
69
|
+
"typescript": "~5.9.3",
|
|
70
|
+
"typescript-eslint": "^8.52.0",
|
|
71
|
+
"vite": "^7.3.1",
|
|
72
|
+
"vite-plugin-dts": "^4.5.4"
|
|
73
|
+
}
|
|
74
|
+
}
|