From 9b4999e9d0c30aed210d1433b5b024604637a6f2 Mon Sep 17 00:00:00 2001 From: mayank1513 Date: Mon, 17 Jun 2024 16:29:24 +0000 Subject: [PATCH] upgrade deps && docs --- docs/functions/index.useRGS.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 +- .../plugins_persist.PersistOptions.html | 6 ++--- docs/modules/index.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/utils.globalRGS.html | 2 +- pnpm-lock.yaml | 22 ++++++++++++------- 24 files changed, 39 insertions(+), 33 deletions(-) diff --git a/docs/functions/index.useRGS.html b/docs/functions/index.useRGS.html index 8f81a8a6..8e35822a 100644 --- a/docs/functions/index.useRGS.html +++ b/docs/functions/index.useRGS.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 6ab6e830..b4083bdb 100644 --- a/docs/functions/plugins_persist.persist.html +++ b/docs/functions/plugins_persist.persist.html @@ -1,3 +1,3 @@ persist | React18 Global Store
  • A plugin that persists and syncs RGS store between tabs.

    Type Parameters

    • T

    Parameters

    Returns Plugin<T>

    A plugin that persists and syncs a value between tabs.

    -
\ 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 5ce79685..46e64737 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 f5bb6412..c6bb2ef2 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 fa909b8d..493be83a 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 01aa9418..34ed818d 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 856e9f99..18f6b32a 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 c482f246..531291e9 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 18f3d902..371b08a2 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 38866ae0..9cc13103 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/index.html b/docs/modules/index.html index cf455c18..84a644c7 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

Plugin SetStateAction SetterArgType index diff --git a/docs/modules/plugins_persist.html b/docs/modules/plugins_persist.html index 730f9125..46d9b4de 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

Index

Interfaces

Functions

\ No newline at end of file diff --git a/docs/modules/utils.html b/docs/modules/utils.html index 066c2c98..36d6bad3 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 31925ddc..c61fd390 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 5dbb0c14..dad0e70f 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 e273275d..ffb1a23b 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 06ee3776..230a35a3 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 1cc4c629..3239ecae 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 501433e4..cb7511c8 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 2e418111..d2a25f50 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 a4b2443b..a7865a51 100644 --- a/docs/types/utils._internal_.RGS.html +++ b/docs/types/utils._internal_.RGS.html @@ -1 +1 @@ -RGS | React18 Global Store
RGS: [unknown, Listener[], SetStateAction<unknown> | null, Subscriber]
\ No newline at end of file +RGS | React18 Global Store
RGS: [unknown, Listener[], SetStateAction<unknown> | null, Subscriber]
\ No newline at end of file diff --git a/docs/types/utils._internal_.Subscriber.html b/docs/types/utils._internal_.Subscriber.html index dfa7e1ba..182459db 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/utils.globalRGS.html b/docs/variables/utils.globalRGS.html index a7b3a9a9..e5ccd535 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 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea4a7d7c..d40e285a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5117,11 +5117,15 @@ packages: '@types/react': 16.8 - 18 react: 16.8 - 18 - r18gs@1.1.1: - resolution: {integrity: sha512-osmk7CinxcRLETlw2pddw0IOVc0CTO3G6kp9RYW9i4J4JhsjvrWMErgbx/fQlqxkbHYq/dPDPPH+6bXP/7iu5g==} + r18gs@1.1.2: + resolution: {integrity: sha512-kDM2CvgG0HmSqxIzYSEv5NQ5a/g3RggvT1Vl939HKtPBCq9Qi4U+8+FSLN29lxSx2rCQDFIjvDDGb+IlCfhg+g==} peerDependencies: - '@types/react': 16.8 - 18 - react: 16.8 - 18 + '@types/react': 16.8 - 19 + next: '*' + react: 16.8 - 19 + peerDependenciesMeta: + next: + optional: true range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} @@ -11952,7 +11956,7 @@ snapshots: nextjs-darkmode@1.0.2(@types/react@18.3.3)(next@14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5))(react@18.3.1): dependencies: '@types/react': 18.3.3 - r18gs: 1.1.1(@types/react@18.3.3)(react@18.3.1) + r18gs: 1.1.2(@types/react@18.3.3)(next@14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5))(react@18.3.1) react: 18.3.1 optionalDependencies: next: 14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5) @@ -11960,7 +11964,7 @@ snapshots: nextjs-themes@3.1.2(@types/react@18.3.3)(next@14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5))(react@18.3.1): dependencies: '@types/react': 18.3.3 - r18gs: 1.1.1(@types/react@18.3.3)(react@18.3.1) + r18gs: 1.1.2(@types/react@18.3.3)(next@14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5))(react@18.3.1) react: 18.3.1 optionalDependencies: next: 14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5) @@ -12522,10 +12526,12 @@ snapshots: '@types/react': 18.3.3 react: 18.3.1 - r18gs@1.1.1(@types/react@18.3.3)(react@18.3.1): + r18gs@1.1.2(@types/react@18.3.3)(next@14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5))(react@18.3.1): dependencies: '@types/react': 18.3.3 react: 18.3.1 + optionalDependencies: + next: 14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5) range-parser@1.2.1: {} @@ -12579,7 +12585,7 @@ snapshots: react18-loaders@1.1.2(@types/react@18.3.3)(next@14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5))(react@18.3.1): dependencies: '@types/react': 18.3.3 - r18gs: 1.1.1(@types/react@18.3.3)(react@18.3.1) + r18gs: 1.1.2(@types/react@18.3.3)(next@14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5))(react@18.3.1) react: 18.3.1 optionalDependencies: next: 14.2.4(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.5)