kitzo 2.1.12 → 2.1.14

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
@@ -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.12/dist/kitzo.umd.min.js"></script>
29
+ <script src="https://cdn.jsdelivr.net/npm/kitzo@2.1.14/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.
package/dist/react.d.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import type { ReactNode, CSSProperties, JSX, PropsWithChildren, RefObject } from 'react';
2
2
 
3
3
  //! Toast API types declaration
4
- export type Positions = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
4
+ export type Positions =
5
+ | 'top-left'
6
+ | 'top-center'
7
+ | 'top-right'
8
+ | 'bottom-left'
9
+ | 'bottom-center'
10
+ | 'bottom-right';
5
11
 
6
12
  export interface ToastOptions {
7
13
  position?: Positions;
@@ -29,7 +35,10 @@ export interface ToastAPI {
29
35
  options?: ToastOptions,
30
36
  ): void;
31
37
 
32
- custom(content: CustomContent, options?: { duration?: number; exitDelay?: number; position?: Positions }): void;
38
+ custom(
39
+ content: CustomContent,
40
+ options?: { duration?: number; exitDelay?: number; position?: Positions },
41
+ ): void;
33
42
  }
34
43
 
35
44
  export declare const toast: ToastAPI;
@@ -59,4 +68,8 @@ type LocationLike = {
59
68
  [key: string]: any;
60
69
  };
61
70
 
62
- export declare function useScrollRestoration(path: LocationLike | string, key: string | number, options?: ScrollHookOptions): RefObject<HTMLElement | null>;
71
+ export declare function useScrollRestoration<T extends HTMLElement = HTMLDivElement>(
72
+ path: LocationLike | string,
73
+ key: string | number,
74
+ options?: ScrollHookOptions,
75
+ ): RefObject<T | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitzo",
3
- "version": "2.1.12",
3
+ "version": "2.1.14",
4
4
  "description": "A lightweight JavaScript UI micro-library.",
5
5
  "type": "module",
6
6
  "main": "./dist/kitzo.umd.js",