reykit 1.0.36 → 1.0.38

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.
@@ -2,14 +2,8 @@ import { ReactNode, ComponentProps, MouseEvent } from 'react';
2
2
  /**
3
3
  * Button component of cycle display children.
4
4
  *
5
- * Parameters
6
- * ----------
7
- * @param childrens Children array.
8
- * @param handleCycle Handle cycle.
9
- *
10
- * Returns
11
- * -------
12
- * @returns React element.
5
+ * @param childrens - Children array.
6
+ * @param handleCycle - Handle cycle.
13
7
  */
14
8
  export declare function CycleButton({ childrens, handleCycle, onClick, ...props }: {
15
9
  childrens: ReactNode[];
@@ -2,14 +2,8 @@ import { ComponentProps } from 'react';
2
2
  /**
3
3
  * Form component of prevent access link.
4
4
  *
5
- * Parameters
6
- * ----------
7
- * @param handleFormData Handle submited form data.
8
- * @param link Access router link.
9
- *
10
- * Returns
11
- * -------
12
- * @returns React element.
5
+ * @param handleFormData - Handle submited form data.
6
+ * @param link - Access router link.
13
7
  */
14
8
  export default function Form({ handleFormData, link, onSubmit, ...props }: {
15
9
  handleFormData?: (formData: FormData) => void;
package/dist/hook.d.ts CHANGED
@@ -1,49 +1,32 @@
1
1
  /**
2
2
  * Hook of toggle.
3
3
  *
4
- * Parameters
5
- * ----------
6
- * @param array Array.
7
- * @param loop Whether to loop count.
8
- *
9
- * Returns
10
- * -------
4
+ * @param array - Array.
5
+ * @param loop - Whether to loop count.
11
6
  * @returns Returns a stateful open value, and a function to automatic count it.
12
7
  */
13
8
  export declare function useOpen(defaultOpen?: boolean): [boolean, () => void];
14
9
  /**
15
10
  * Hook of count number.
16
11
  *
17
- * Parameters
18
- * ----------
19
- * @param start Start number.
20
- * @param step Count step.
21
- * @param stop Stop number.
22
- * @param loop Whether to loop count.
23
- *
24
- * Returns
25
- * -------
12
+ * @param start - Start number.
13
+ * @param step - Count step.
14
+ * @param stop - Stop number.
15
+ * @param loop - Whether to loop count.
26
16
  * @returns Returns a stateful count value, and a function to automatic count it.
27
17
  */
28
18
  export declare function useCount(start?: number, step?: number, stop?: number, loop?: boolean): [number, () => void];
29
19
  /**
30
20
  * Hook of count array index.
31
21
  *
32
- * Parameters
33
- * ----------
34
- * @param array Array.
35
- * @param loop Whether to loop count.
36
- *
37
- * Returns
38
- * -------
22
+ * @param array - Array.
23
+ * @param loop - Whether to loop count.
39
24
  * @returns Returns a stateful index value, and a function to automatic count it.
40
25
  */
41
26
  export declare function useIndex(array: any[], loop?: boolean): [number, () => void];
42
27
  /**
43
28
  * Whether is mobile.
44
29
  *
45
- * Returns
46
- * -------
47
30
  * @returns Judgement.
48
31
  */
49
32
  export declare function useIsMobile(): boolean;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { CycleButton } from './component/Button';
2
- import { default as Form } from './component/Form';
1
+ import { CycleButton } from './components/Button';
2
+ import { default as Form } from './components/Form';
3
3
  import { useOpen, useCount, useIndex, useIsMobile } from './hook';
4
4
  import { renderReact } from './react';
5
5
  import { default as Storager } from './storage';
package/dist/index.js CHANGED
@@ -27536,17 +27536,14 @@ var AE = EE();
27536
27536
  let dS = null;
27537
27537
  function zE(Z, ft = "root") {
27538
27538
  const it = document.getElementById(ft);
27539
- if (!it)
27540
- throw new Error("element ID not found");
27539
+ if (!it) throw new Error("element ID not found");
27541
27540
  dS || (dS = AE.createRoot(it)), dS.render(Z);
27542
27541
  }
27543
27542
  class DE {
27544
27543
  /**
27545
27544
  * Build instance.
27546
27545
  *
27547
- * Parameters
27548
- * ----------
27549
- * @param name Local storage key.
27546
+ * @param name - Local storage key.
27550
27547
  */
27551
27548
  constructor(ft) {
27552
27549
  this.name = ft, localStorage.getItem(ft) || localStorage.setItem(ft, "{}");
@@ -27554,8 +27551,6 @@ class DE {
27554
27551
  /**
27555
27552
  * Get all data.
27556
27553
  *
27557
- * Returns
27558
- * -------
27559
27554
  * @returns All data.
27560
27555
  */
27561
27556
  get data() {
@@ -27565,9 +27560,7 @@ class DE {
27565
27560
  /**
27566
27561
  * Update data.
27567
27562
  *
27568
- * Parameters
27569
- * ----------
27570
- * @param data New data.
27563
+ * @param data - New data.
27571
27564
  */
27572
27565
  update(ft) {
27573
27566
  const it = Object.assign(this.data, ft), _ = JSON.stringify(it);
@@ -27582,12 +27575,7 @@ class DE {
27582
27575
  /**
27583
27576
  * Get a item value.
27584
27577
  *
27585
- * Parameters
27586
- * ----------
27587
- * @param key Item key.
27588
- *
27589
- * Returns
27590
- * -------
27578
+ * @param key - Item key.
27591
27579
  * @returns Item value.
27592
27580
  */
27593
27581
  get(ft) {
@@ -27596,10 +27584,8 @@ class DE {
27596
27584
  /**
27597
27585
  * Set a item.
27598
27586
  *
27599
- * Parameters
27600
- * ----------
27601
- * @param key Item key.
27602
- * @param value Item value.
27587
+ * @param key - Item key.
27588
+ * @param value - Item value.
27603
27589
  */
27604
27590
  set(ft, it) {
27605
27591
  const _ = { [ft]: it };
@@ -27608,9 +27594,7 @@ class DE {
27608
27594
  /**
27609
27595
  * Delete a item.
27610
27596
  *
27611
- * Parameters
27612
- * ----------
27613
- * @param key Item key.
27597
+ * @param key - Item key.
27614
27598
  */
27615
27599
  del(ft) {
27616
27600
  const it = this.data;
package/dist/react.d.ts CHANGED
@@ -2,9 +2,7 @@ import { ReactNode } from 'react';
2
2
  /**
3
3
  * Render react note.
4
4
  *
5
- * Parameters
6
- * ----------
7
- * @param app React note.
8
- * @param elementId Render HTML element ID.
5
+ * @param app - React note.
6
+ * @param elementId - Render HTML element ID.
9
7
  */
10
8
  export declare function renderReact(app: ReactNode, elementId?: string): void;
package/dist/storage.d.ts CHANGED
@@ -6,25 +6,19 @@ export default class Storager<Data extends Record<string, any>> {
6
6
  /**
7
7
  * Build instance.
8
8
  *
9
- * Parameters
10
- * ----------
11
- * @param name Local storage key.
9
+ * @param name - Local storage key.
12
10
  */
13
11
  constructor(name: string);
14
12
  /**
15
13
  * Get all data.
16
14
  *
17
- * Returns
18
- * -------
19
15
  * @returns All data.
20
16
  */
21
17
  get data(): Data;
22
18
  /**
23
19
  * Update data.
24
20
  *
25
- * Parameters
26
- * ----------
27
- * @param data New data.
21
+ * @param data - New data.
28
22
  */
29
23
  update(data: Partial<Data>): void;
30
24
  /**
@@ -34,30 +28,21 @@ export default class Storager<Data extends Record<string, any>> {
34
28
  /**
35
29
  * Get a item value.
36
30
  *
37
- * Parameters
38
- * ----------
39
- * @param key Item key.
40
- *
41
- * Returns
42
- * -------
31
+ * @param key - Item key.
43
32
  * @returns Item value.
44
33
  */
45
34
  get<K extends keyof Data>(key: K): Data[K];
46
35
  /**
47
36
  * Set a item.
48
37
  *
49
- * Parameters
50
- * ----------
51
- * @param key Item key.
52
- * @param value Item value.
38
+ * @param key - Item key.
39
+ * @param value - Item value.
53
40
  */
54
41
  set<K extends keyof Data>(key: K, value: Data[K]): void;
55
42
  /**
56
43
  * Delete a item.
57
44
  *
58
- * Parameters
59
- * ----------
60
- * @param key Item key.
45
+ * @param key - Item key.
61
46
  */
62
47
  del<K extends keyof Data>(key: K): void;
63
48
  }
@@ -2,12 +2,7 @@ import { ClassValue } from 'clsx';
2
2
  /**
3
3
  * Merge TailwindCSS class style string array.
4
4
  *
5
- * Parameters
6
- * ----------
7
- * @param inputs TailwindCSS class style string array.
8
- *
9
- * Returns
10
- * -------
5
+ * @param inputs - TailwindCSS class style string array.
11
6
  * @returns Merged string.
12
7
  */
13
8
  export declare function cn(...inputs: ClassValue[]): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reykit",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "Kit method set.",
5
5
  "author": "reyxbo",
6
6
  "keywords": [