From 882d8eef61c928b74c4d3a936ef4e4033b1880b7 Mon Sep 17 00:00:00 2001 From: mayank1513 Date: Mon, 16 Dec 2024 16:21:59 +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 +- docs/interfaces/plugins_persist.PersistOptions.html | 6 +++--- 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 | 8 ++++---- 20 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/functions/index.useRGS.html b/docs/functions/index.useRGS.html index 56f771b6..9c630a64 100644 --- a/docs/functions/index.useRGS.html +++ b/docs/functions/index.useRGS.html @@ -10,4 +10,4 @@

Returns [T, SetStateAction<T>]

-
+
diff --git a/docs/functions/plugins_persist.persist.html b/docs/functions/plugins_persist.persist.html index 64c2fad4..2e9c1601 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.

+
diff --git a/docs/functions/utils.createHook.html b/docs/functions/utils.createHook.html index f41f2523..4e5c7916 100644 --- a/docs/functions/utils.createHook.html +++ b/docs/functions/utils.createHook.html @@ -1,2 +1,2 @@ createHook | React18 Global Store

Extract coomon create hook logic to utils

-
+
diff --git a/docs/functions/utils.createSetter.html b/docs/functions/utils.createSetter.html index 45b33d40..8333f0fc 100644 --- a/docs/functions/utils.createSetter.html +++ b/docs/functions/utils.createSetter.html @@ -1,2 +1,2 @@ createSetter | React18 Global Store

setter function to set the state.

-
+
diff --git a/docs/functions/utils.createSubcriber.html b/docs/functions/utils.createSubcriber.html index 72037940..e1c9d89b 100644 --- a/docs/functions/utils.createSubcriber.html +++ b/docs/functions/utils.createSubcriber.html @@ -1,2 +1,2 @@ createSubcriber | React18 Global Store

craete subscriber function to subscribe to the store.

-
+
diff --git a/docs/functions/utils.initWithPlugins.html b/docs/functions/utils.initWithPlugins.html index c451a279..de3f3382 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
    • Optionalvalue: ValueType<T>
    • plugins: Plugin<T>[] = []
    • doNotInit: boolean = false

    Returns void

+
diff --git a/docs/functions/utils.useRGSWithPlugins.html b/docs/functions/utils.useRGSWithPlugins.html index a9777dc1..62286ce8 100644 --- a/docs/functions/utils.useRGSWithPlugins.html +++ b/docs/functions/utils.useRGSWithPlugins.html @@ -12,4 +12,4 @@

Returns [T, SetStateAction<T>]

-
+
diff --git a/docs/functions/with-plugins.create.html b/docs/functions/with-plugins.create.html index e66005bf..237ab4bd 100644 --- a/docs/functions/with-plugins.create.html +++ b/docs/functions/with-plugins.create.html @@ -8,4 +8,4 @@

Returns () => [T, SetStateAction<T>]

-
+
diff --git a/docs/functions/with-plugins.withPlugins.html b/docs/functions/with-plugins.withPlugins.html index 9750d5db..12088c98 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 = T>(key: string, value?: U, doNotInit?: boolean) => [U, SetStateAction<U>]

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

    -
+
diff --git a/docs/interfaces/plugins_persist.PersistOptions.html b/docs/interfaces/plugins_persist.PersistOptions.html index 996071e2..6bf82d1b 100644 --- a/docs/interfaces/plugins_persist.PersistOptions.html +++ b/docs/interfaces/plugins_persist.PersistOptions.html @@ -1,9 +1,9 @@ -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"
local
 
-
sync?: boolean
true
+
sync?: boolean
true
 
-
+
diff --git a/docs/types/utils.Plugin.html b/docs/types/utils.Plugin.html index de677238..6eda7490 100644 --- a/docs/types/utils.Plugin.html +++ b/docs/types/utils.Plugin.html @@ -1 +1 @@ -Plugin | React18 Global Store
Plugin: {
    init?: (key: string, value: T | undefined, mutate: Mutate<T>) => void;
    onChange?: (key: string, value?: T) => void;
}

Type Parameters

  • T

Type declaration

  • Optionalinit?: (key: string, value: T | undefined, mutate: Mutate<T>) => void
  • OptionalonChange?: (key: string, value?: T) => void
+Plugin | React18 Global Store
Plugin: {
    init?: (key: string, value: T | undefined, mutate: Mutate<T>) => void;
    onChange?: (key: string, value?: T) => void;
}

Type Parameters

  • T

Type declaration

  • Optionalinit?: (key: string, value: T | undefined, mutate: Mutate<T>) => void
  • OptionalonChange?: (key: string, value?: T) => void
diff --git a/docs/types/utils.SetStateAction.html b/docs/types/utils.SetStateAction.html index 8641984b..481f149a 100644 --- a/docs/types/utils.SetStateAction.html +++ b/docs/types/utils.SetStateAction.html @@ -1 +1 @@ -SetStateAction | React18 Global Store

Type Alias SetStateAction<T>

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

Type Parameters

  • T

Type declaration

+SetStateAction | React18 Global Store

Type Alias SetStateAction<T>

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

Type Parameters

  • T

Type declaration

diff --git a/docs/types/utils.SetterArgType.html b/docs/types/utils.SetterArgType.html index b3c19485..96e78bc1 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 | (prevState: T) => T

Type Parameters

  • T
+SetterArgType | React18 Global Store

Type Alias SetterArgType<T>

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

Type Parameters

  • T
diff --git a/docs/types/utils.ValueType.html b/docs/types/utils.ValueType.html index ffa65e7b..ee1c1279 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

Type Parameters

  • T
+ValueType | React18 Global Store

Type Alias ValueType<T>

ValueType: T | () => T

Type Parameters

  • T
diff --git a/docs/types/utils._internal_.Listener.html b/docs/types/utils._internal_.Listener.html index 6d9f6ad7..6931c9ad 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

+Listener | React18 Global Store
Listener: () => void

Type declaration

    • (): void
    • Returns void

diff --git a/docs/types/utils._internal_.Mutate.html b/docs/types/utils._internal_.Mutate.html index c1a5afd5..17cfaadf 100644 --- a/docs/types/utils._internal_.Mutate.html +++ b/docs/types/utils._internal_.Mutate.html @@ -1 +1 @@ -Mutate | React18 Global Store
Mutate: (value?: T) => void

Type Parameters

  • T

Type declaration

    • (value?: T): void
    • Parameters

      • Optionalvalue: T

      Returns void

+Mutate | React18 Global Store
Mutate: (value?: T) => void

Type Parameters

  • T

Type declaration

    • (value?: T): void
    • Parameters

      • Optionalvalue: T

      Returns void

diff --git a/docs/types/utils._internal_.RGS.html b/docs/types/utils._internal_.RGS.html index 24b50e86..68cd114b 100644 --- a/docs/types/utils._internal_.RGS.html +++ b/docs/types/utils._internal_.RGS.html @@ -1,2 +1,2 @@ RGS | React18 Global Store
RGS: {
    l: Listener[];
    s: SetStateAction<unknown> | null;
    u: Subscriber;
    v: unknown;
}

This is a hack to reduce lib size + readability + not encouraging direct access to globalThis

-

Type declaration

+

Type declaration

diff --git a/docs/types/utils._internal_.Subscriber.html b/docs/types/utils._internal_.Subscriber.html index bccc6a05..2f4d4ea0 100644 --- a/docs/types/utils._internal_.Subscriber.html +++ b/docs/types/utils._internal_.Subscriber.html @@ -1 +1 @@ -Subscriber | React18 Global Store
Subscriber: (l: Listener) => () => void

Type declaration

+Subscriber | React18 Global Store
Subscriber: (l: Listener) => () => void

Type declaration

diff --git a/docs/variables/utils.globalRGS.html b/docs/variables/utils.globalRGS.html index e909a45c..8c226f7f 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
+globalRGS | React18 Global Store

Variable globalRGSConst

globalRGS: Record<string, undefined | RGS> = globalThisForBetterMinification.rgs
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 02e89772..c14a19cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1985,8 +1985,8 @@ packages: peerDependencies: '@types/react': ^19.0.0 - '@types/react@18.3.16': - resolution: {integrity: sha512-oh8AMIC4Y2ciKufU8hnKgs+ufgbA/dhPTACaZPM86AbwX9QwnFtSoPWEeRUj8fge+v6kFt78BXcDhAU1SrrAsw==} + '@types/react@18.3.17': + resolution: {integrity: sha512-opAQ5no6LqJNo9TqnxBKsgnkIYHozW9KSTlFVoSUJYh1Fl/sswkEoqIugRSm7tbh6pABtYjGAjW+GOS23j8qbw==} '@types/react@19.0.1': resolution: {integrity: sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==} @@ -8346,7 +8346,7 @@ snapshots: dependencies: '@remix-run/router': 1.3.1 '@types/cookie': 0.4.1 - '@types/react': 18.3.16 + '@types/react': 18.3.17 '@web3-storage/multipart-parser': 1.0.0 cookie: 0.4.2 set-cookie-parser: 2.7.1 @@ -8631,7 +8631,7 @@ snapshots: dependencies: '@types/react': 19.0.1 - '@types/react@18.3.16': + '@types/react@18.3.17': dependencies: '@types/prop-types': 15.7.14 csstype: 3.1.3