kitzo 2.3.7 → 2.3.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/README.md CHANGED
@@ -16,14 +16,14 @@ npm install kitzo
16
16
 
17
17
  #### Components
18
18
 
19
- 🍞 **Toast** — Accessible, animated notifications.
20
- 💡 **Tooltip** — Smart-positioned contextual labels.
19
+ - 🍞 **Toast** — Accessible, animated notifications.
20
+ - 💡 **Tooltip** — Smart-positioned contextual labels.
21
21
 
22
22
  #### Hooks
23
23
 
24
- ⏱️ **useDebounce** — Optimize performance by delaying execution.
25
- 📏 **useWindowSize** — Real-time viewport dimensions.
26
- 📋 **useCopy** — Simple "copy to clipboard" functionality.
24
+ - ⏱️ **useDebounce** — Optimize performance by delaying execution.
25
+ - 📏 **useWindowSize** — Real-time viewport dimensions.
26
+ - 📋 **useCopy** — Simple "copy to clipboard" functionality.
27
27
 
28
28
  ---
29
29
 
@@ -1,14 +1,13 @@
1
- const i = {
1
+ const a = {
2
2
  duration: 2800,
3
3
  showIcon: !0,
4
- animateTransformOrigin: void 0,
5
- position: "top-center"
4
+ animateTransformOrigin: void 0
6
5
  };
7
6
  let e = 0;
8
7
  const s = () => crypto.randomUUID?.() ?? `kitzo_toast_id_${++e}`;
9
8
  let d = 1;
10
- function u({
11
- type: a,
9
+ function c({
10
+ type: i,
12
11
  action: r,
13
12
  content: o,
14
13
  options: n
@@ -16,30 +15,30 @@ function u({
16
15
  const t = typeof n == "object" && n !== null ? n : {};
17
16
  return {
18
17
  id: t.id ?? s(),
19
- duration: t.duration ?? i.duration,
20
- showIcon: t.showIcon ?? i.showIcon,
21
- animateTransformOrigin: t.animateTransformOrigin ?? i.animateTransformOrigin,
22
- position: t.position ?? i.position,
18
+ duration: t.duration ?? a.duration,
19
+ showIcon: t.showIcon ?? a.showIcon,
20
+ animateTransformOrigin: t.animateTransformOrigin ?? a.animateTransformOrigin,
21
+ position: t.position,
23
22
  icon: t.icon,
24
- type: a,
23
+ type: i,
25
24
  status: "entering",
26
25
  zIndex: ++d,
27
26
  content: o,
28
27
  action: r
29
28
  };
30
29
  }
31
- function p({ id: a, content: r, options: o }) {
30
+ function T({ id: i, content: r, options: o }) {
32
31
  const n = typeof o == "object" && o !== null ? o : {};
33
32
  return {
34
33
  ...n,
35
- id: a,
34
+ id: i,
36
35
  content: r,
37
36
  action: "update",
38
- duration: n.duration ?? i.duration
37
+ duration: n.duration ?? a.duration
39
38
  };
40
39
  }
41
40
  export {
42
- u as createToast,
41
+ c as createToast,
43
42
  s as genId,
44
- p as updateToast
43
+ T as updateToast
45
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitzo",
3
- "version": "2.3.7",
3
+ "version": "2.3.9",
4
4
  "description": "A lightweight React micro-utility.",
5
5
  "type": "module",
6
6
  "files": [