From 8aae68be66126f192c5e790544474b08e3ff8292 Mon Sep 17 00:00:00 2001 From: react18-tools Date: Sat, 15 Jun 2024 08:16:56 +0000 Subject: [PATCH] upgrade deps && docs --- docs/functions/index.index.html | 2 +- docs/functions/plugins_persist.persist.html | 2 +- docs/functions/utils.createHook.html | 2 +- docs/functions/utils.createSetter.html | 2 +- docs/functions/utils.createSubcriber.html | 2 +- docs/functions/utils.initWithPlugins.html | 2 +- docs/functions/utils.useRGSWithPlugins.html | 2 +- docs/functions/with_plugins.create.html | 2 +- docs/functions/with_plugins.withPlugins.html | 2 +- docs/interfaces/plugins_persist.PersistOptions.html | 6 +++--- docs/modules/Guides.html | 2 +- docs/modules/index.html | 2 +- docs/modules/plugins.html | 2 +- docs/modules/plugins_persist.html | 2 +- docs/modules/utils.html | 2 +- docs/modules/with_plugins.html | 2 +- docs/types/utils.Plugin.html | 2 +- docs/types/utils.SetStateAction.html | 2 +- docs/types/utils.SetterArgType.html | 2 +- docs/types/utils.ValueType.html | 2 +- docs/types/utils._internal_.Listener.html | 2 +- docs/types/utils._internal_.Mutate.html | 2 +- docs/types/utils._internal_.RGS.html | 2 +- docs/types/utils._internal_.Subscriber.html | 2 +- docs/variables/Guides.A_Quick_Start.html | 2 +- docs/variables/Guides.B_Leveraging_Plugins.html | 2 +- docs/variables/utils.globalRGS.html | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/functions/index.index.html b/docs/functions/index.index.html index a5c5ce7b..97ba315a 100644 --- a/docs/functions/index.index.html +++ b/docs/functions/index.index.html @@ -9,4 +9,4 @@

Example

const [state, setState] = useRGS<number>("counter", 1);
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/plugins_persist.persist.html b/docs/functions/plugins_persist.persist.html index 39902c33..cb695f8a 100644 --- a/docs/functions/plugins_persist.persist.html +++ b/docs/functions/plugins_persist.persist.html @@ -1,3 +1,3 @@ persist | React18 Global Store
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/utils.createHook.html b/docs/functions/utils.createHook.html index a6925c00..4bc6b6ce 100644 --- a/docs/functions/utils.createHook.html +++ b/docs/functions/utils.createHook.html @@ -1,2 +1,2 @@ createHook | React18 Global Store
\ No newline at end of file +

Type Parameters

Parameters

Returns [T, SetStateAction<T>]

\ No newline at end of file diff --git a/docs/functions/utils.createSetter.html b/docs/functions/utils.createSetter.html index c9a574c5..17921a41 100644 --- a/docs/functions/utils.createSetter.html +++ b/docs/functions/utils.createSetter.html @@ -1,2 +1,2 @@ createSetter | React18 Global Store
\ No newline at end of file +

Type Parameters

Parameters

Returns SetStateAction<unknown>

\ No newline at end of file diff --git a/docs/functions/utils.createSubcriber.html b/docs/functions/utils.createSubcriber.html index b5f9b491..2211b36d 100644 --- a/docs/functions/utils.createSubcriber.html +++ b/docs/functions/utils.createSubcriber.html @@ -1,2 +1,2 @@ createSubcriber | React18 Global Store
\ No newline at end of file +

Parameters

Returns Subscriber

\ No newline at end of file diff --git a/docs/functions/utils.initWithPlugins.html b/docs/functions/utils.initWithPlugins.html index f0149604..fe0824d7 100644 --- a/docs/functions/utils.initWithPlugins.html +++ b/docs/functions/utils.initWithPlugins.html @@ -1,2 +1,2 @@ initWithPlugins | React18 Global Store
  • Initialize the named store when invoked for the first time.

    -

    Type Parameters

    • T

    Parameters

    • key: string
    • Optional value: ValueType<T>
    • plugins: Plugin<T>[] = []
    • doNotInit: boolean = false

    Returns void

\ No newline at end of file +

Type Parameters

Parameters

Returns void

\ No newline at end of file diff --git a/docs/functions/utils.useRGSWithPlugins.html b/docs/functions/utils.useRGSWithPlugins.html index 13118c19..97cae658 100644 --- a/docs/functions/utils.useRGSWithPlugins.html +++ b/docs/functions/utils.useRGSWithPlugins.html @@ -11,4 +11,4 @@

Example

const [state, setState] = useRGS<number>("counter", 1);
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/with_plugins.create.html b/docs/functions/with_plugins.create.html index 719bb8aa..78cdf059 100644 --- a/docs/functions/with_plugins.create.html +++ b/docs/functions/with_plugins.create.html @@ -7,4 +7,4 @@

Example

// in hook file, e.g., store.ts
export const useMyRGS = create<type>(key, value, plugins);

// in component file
const [state, setState] = useMyRGS();
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/with_plugins.withPlugins.html b/docs/functions/with_plugins.withPlugins.html index e42846a6..f11f913d 100644 --- a/docs/functions/with_plugins.withPlugins.html +++ b/docs/functions/with_plugins.withPlugins.html @@ -1,4 +1,4 @@ withPlugins | React18 Global Store
  • Creates a hook similar to useRGS, but with plugins to be applied on first invocation.

    Type Parameters

    • T

    Parameters

    • plugins: Plugin<T>[]

      Plugins to be applied to the store.

    Returns (<U>(key, value?, doNotInit?) => [U, SetStateAction<U>])

    A hook that automatically initializes the store (if not already initialized) with the given plugins.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/interfaces/plugins_persist.PersistOptions.html b/docs/interfaces/plugins_persist.PersistOptions.html index d7a58a4a..42e2a889 100644 --- a/docs/interfaces/plugins_persist.PersistOptions.html +++ b/docs/interfaces/plugins_persist.PersistOptions.html @@ -1,7 +1,7 @@ -PersistOptions | React18 Global Store
interface PersistOptions {
    storage?: "local" | "session" | "cookie";
    sync?: boolean;
}

Properties

storage? +PersistOptions | React18 Global Store
interface PersistOptions {
    storage?: "local" | "session" | "cookie";
    sync?: boolean;
}

Properties

Properties

storage?: "local" | "session" | "cookie"

Default Value

local
 
-
sync?: boolean

Default Value

true
+
sync?: boolean

Default Value

true
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/modules/Guides.html b/docs/modules/Guides.html index fe4ad0d5..6de39bf4 100644 --- a/docs/modules/Guides.html +++ b/docs/modules/Guides.html @@ -1,3 +1,3 @@ -Guides | React18 Global Store

Index

Variables

A_Quick_Start +Guides | React18 Global Store
\ No newline at end of file diff --git a/docs/modules/index.html b/docs/modules/index.html index aa01fe5a..b7d4fe06 100644 --- a/docs/modules/index.html +++ b/docs/modules/index.html @@ -1,4 +1,4 @@ -index | React18 Global Store

References

Plugin +index | React18 Global Store

References

Functions

index diff --git a/docs/modules/plugins.html b/docs/modules/plugins.html index 6aa5850d..ef859eeb 100644 --- a/docs/modules/plugins.html +++ b/docs/modules/plugins.html @@ -1,3 +1,3 @@ -plugins | React18 Global Store

References

PersistOptions +plugins | React18 Global Store

References

Re-exports PersistOptions
Re-exports persist
\ No newline at end of file diff --git a/docs/modules/plugins_persist.html b/docs/modules/plugins_persist.html index 86c4fea5..e1d3739d 100644 --- a/docs/modules/plugins_persist.html +++ b/docs/modules/plugins_persist.html @@ -1,3 +1,3 @@ -plugins/persist | React18 Global Store

Index

Interfaces

PersistOptions +plugins/persist | React18 Global Store
\ No newline at end of file diff --git a/docs/modules/utils.html b/docs/modules/utils.html index 34357c2b..26c48b12 100644 --- a/docs/modules/utils.html +++ b/docs/modules/utils.html @@ -1,4 +1,4 @@ -utils | React18 Global Store

Index

Modules

<internal> +utils | React18 Global Store

Index

Modules

Type Aliases

Plugin SetStateAction SetterArgType diff --git a/docs/modules/with_plugins.html b/docs/modules/with_plugins.html index cc7af034..e11fbd52 100644 --- a/docs/modules/with_plugins.html +++ b/docs/modules/with_plugins.html @@ -1,4 +1,4 @@ -with-plugins | React18 Global Store

References

useRGSWithPlugins +with-plugins | React18 Global Store

References

Re-exports useRGSWithPlugins
\ No newline at end of file diff --git a/docs/types/utils.Plugin.html b/docs/types/utils.Plugin.html index 8221b940..84a95c87 100644 --- a/docs/types/utils.Plugin.html +++ b/docs/types/utils.Plugin.html @@ -1 +1 @@ -Plugin | React18 Global Store
Plugin<T>: {
    init?: ((key, value, mutate) => void);
    onChange?: ((key, value?) => void);
}

Type Parameters

  • T

Type declaration

  • Optional init?: ((key, value, mutate) => void)
      • (key, value, mutate): void
      • Parameters

        • key: string
        • value: T | undefined
        • mutate: Mutate<T>

        Returns void

  • Optional onChange?: ((key, value?) => void)
      • (key, value?): void
      • Parameters

        • key: string
        • Optional value: T

        Returns void

\ No newline at end of file +Plugin | React18 Global Store
Plugin<T>: {
    init?: ((key, value, mutate) => void);
    onChange?: ((key, value?) => void);
}

Type Parameters

  • T

Type declaration

  • Optional init?: ((key, value, mutate) => void)
      • (key, value, mutate): void
      • Parameters

        • key: string
        • value: T | undefined
        • mutate: Mutate<T>

        Returns void

  • Optional onChange?: ((key, value?) => void)
      • (key, value?): void
      • Parameters

        • key: string
        • Optional value: T

        Returns void

\ No newline at end of file diff --git a/docs/types/utils.SetStateAction.html b/docs/types/utils.SetStateAction.html index 42018be6..75c5ba80 100644 --- a/docs/types/utils.SetStateAction.html +++ b/docs/types/utils.SetStateAction.html @@ -1 +1 @@ -SetStateAction | React18 Global Store

Type alias SetStateAction<T>

SetStateAction<T>: ((value) => void)

Type Parameters

  • T

Type declaration

\ No newline at end of file +SetStateAction | React18 Global Store

Type alias SetStateAction<T>

SetStateAction<T>: ((value) => void)

Type Parameters

  • T

Type declaration

\ No newline at end of file diff --git a/docs/types/utils.SetterArgType.html b/docs/types/utils.SetterArgType.html index d1685d6b..27ba0a33 100644 --- a/docs/types/utils.SetterArgType.html +++ b/docs/types/utils.SetterArgType.html @@ -1 +1 @@ -SetterArgType | React18 Global Store

Type alias SetterArgType<T>

SetterArgType<T>: T | ((prevState) => T)

Type Parameters

  • T

Type declaration

    • (prevState): T
    • Parameters

      • prevState: T

      Returns T

\ No newline at end of file +SetterArgType | React18 Global Store

Type alias SetterArgType<T>

SetterArgType<T>: T | ((prevState) => T)

Type Parameters

  • T

Type declaration

    • (prevState): T
    • Parameters

      • prevState: T

      Returns T

\ No newline at end of file diff --git a/docs/types/utils.ValueType.html b/docs/types/utils.ValueType.html index fe316a27..06a74d34 100644 --- a/docs/types/utils.ValueType.html +++ b/docs/types/utils.ValueType.html @@ -1 +1 @@ -ValueType | React18 Global Store

Type alias ValueType<T>

ValueType<T>: T | (() => T)

Type Parameters

  • T

Type declaration

    • (): T
    • Returns T

\ No newline at end of file +ValueType | React18 Global Store

Type alias ValueType<T>

ValueType<T>: T | (() => T)

Type Parameters

  • T

Type declaration

    • (): T
    • Returns T

\ No newline at end of file diff --git a/docs/types/utils._internal_.Listener.html b/docs/types/utils._internal_.Listener.html index 228bdcef..eb10f6aa 100644 --- a/docs/types/utils._internal_.Listener.html +++ b/docs/types/utils._internal_.Listener.html @@ -1 +1 @@ -Listener | React18 Global Store
Listener: (() => void)

Type declaration

    • (): void
    • Returns void

\ No newline at end of file +Listener | React18 Global Store
Listener: (() => void)

Type declaration

    • (): void
    • Returns void

\ No newline at end of file diff --git a/docs/types/utils._internal_.Mutate.html b/docs/types/utils._internal_.Mutate.html index 74df3e43..4f9f6134 100644 --- a/docs/types/utils._internal_.Mutate.html +++ b/docs/types/utils._internal_.Mutate.html @@ -1 +1 @@ -Mutate | React18 Global Store
Mutate<T>: ((value?) => void)

Type Parameters

  • T

Type declaration

    • (value?): void
    • Parameters

      • Optional value: T

      Returns void

\ No newline at end of file +Mutate | React18 Global Store
Mutate<T>: ((value?) => void)

Type Parameters

  • T

Type declaration

    • (value?): void
    • Parameters

      • Optional value: T

      Returns void

\ No newline at end of file diff --git a/docs/types/utils._internal_.RGS.html b/docs/types/utils._internal_.RGS.html index 194af96a..164a57c3 100644 --- a/docs/types/utils._internal_.RGS.html +++ b/docs/types/utils._internal_.RGS.html @@ -1 +1 @@ -RGS | React18 Global Store
\ No newline at end of file +RGS | React18 Global Store
\ No newline at end of file diff --git a/docs/types/utils._internal_.Subscriber.html b/docs/types/utils._internal_.Subscriber.html index ab8d82bb..f7e6b671 100644 --- a/docs/types/utils._internal_.Subscriber.html +++ b/docs/types/utils._internal_.Subscriber.html @@ -1 +1 @@ -Subscriber | React18 Global Store
Subscriber: ((l) => (() => void))

Type declaration

    • (l): (() => void)
    • Parameters

      Returns (() => void)

        • (): void
        • Returns void

\ No newline at end of file +Subscriber | React18 Global Store
Subscriber: ((l) => (() => void))

Type declaration

    • (l): (() => void)
    • Parameters

      Returns (() => void)

        • (): void
        • Returns void

\ No newline at end of file diff --git a/docs/variables/Guides.A_Quick_Start.html b/docs/variables/Guides.A_Quick_Start.html index 95de9c92..1c4c8cd9 100644 --- a/docs/variables/Guides.A_Quick_Start.html +++ b/docs/variables/Guides.A_Quick_Start.html @@ -21,4 +21,4 @@
// components/counter.tsx
"use client";

import useRGS from "r18gs";
import { COUNTER } from "../constants/global-states";

export default function Counter() {
const [count, setCount] = useRGS(COUNTER, 0);
return (
<div>
<h2>Client Component 1</h2>
<input
onChange={e => {
setCount(parseInt(e.target.value.trim()));
}}
type="number"
value={count}
/>
</div>
);
}
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/variables/Guides.B_Leveraging_Plugins.html b/docs/variables/Guides.B_Leveraging_Plugins.html index aeeb6c1b..d770fafe 100644 --- a/docs/variables/Guides.B_Leveraging_Plugins.html +++ b/docs/variables/Guides.B_Leveraging_Plugins.html @@ -18,4 +18,4 @@
export function MyComponent(props: MyComponentProps) {
const [state, setState] = useMyRGS(props.key, props.initialVal, props.doNotInit);
// ...
}

You can also create your own plugins. Refer to Creating Plugins.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/variables/utils.globalRGS.html b/docs/variables/utils.globalRGS.html index 7b0f3dd2..524eaa26 100644 --- a/docs/variables/utils.globalRGS.html +++ b/docs/variables/utils.globalRGS.html @@ -1 +1 @@ -globalRGS | React18 Global Store

Variable globalRGSConst

globalRGS: Record<string, undefined | RGS> = globalThisForBetterMinification.rgs
\ No newline at end of file +globalRGS | React18 Global Store

Variable globalRGSConst

globalRGS: Record<string, undefined | RGS> = globalThisForBetterMinification.rgs
\ No newline at end of file