From 0f68a2394edff611557fa2e838062a2d330e6d8e Mon Sep 17 00:00:00 2001 From: mayank1513 Date: Thu, 5 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 +- .../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 +- examples/vite/package.json | 2 +- pnpm-lock.yaml | 24 +++++++++---------- 21 files changed, 34 insertions(+), 34 deletions(-) diff --git a/docs/functions/index.useRGS.html b/docs/functions/index.useRGS.html index b8ae9ef1..fa415135 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 a2b96d9d..c91a7b50 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 f861ed03..66f3f3ad 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 39c41fb3..8b5fa343 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 068d5978..8799bcea 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 b3877d5d..fea28a5d 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 233bde08..379bd0d6 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 e6565b54..ba164088 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 f915df45..30f60670 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 bc6b9d7f..f916587e 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 2b6e921b..42f39cad 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
+Plugin | React18 Global Store
Plugin: {
    init?: (key: string, value: T | undefined, mutate: Mutate<T>) => void;
    onChange?: (key: string, value?: T) => void;
}

Type Parameters

  • T
diff --git a/docs/types/utils.SetStateAction.html b/docs/types/utils.SetStateAction.html index d3d30d86..eef4ac42 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
+SetStateAction | React18 Global Store

Type Alias SetStateAction<T>

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

Type Parameters

  • T
diff --git a/docs/types/utils.SetterArgType.html b/docs/types/utils.SetterArgType.html index 1e1dde4d..7194e522 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 578f892b..d8bceaa8 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 539c44a4..86e8fadd 100644 --- a/docs/types/utils._internal_.Listener.html +++ b/docs/types/utils._internal_.Listener.html @@ -1 +1 @@ -Listener | React18 Global Store
Listener: () => void
+Listener | React18 Global Store
Listener: () => void
diff --git a/docs/types/utils._internal_.Mutate.html b/docs/types/utils._internal_.Mutate.html index 11194a42..dd5745cc 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
+Mutate | React18 Global Store
Mutate: (value?: T) => void

Type Parameters

  • T
diff --git a/docs/types/utils._internal_.RGS.html b/docs/types/utils._internal_.RGS.html index 0da93f64..498380bb 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

-
+
diff --git a/docs/types/utils._internal_.Subscriber.html b/docs/types/utils._internal_.Subscriber.html index be7ec515..5d3f3002 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
+Subscriber | React18 Global Store
Subscriber: (l: Listener) => () => void
diff --git a/docs/variables/utils.globalRGS.html b/docs/variables/utils.globalRGS.html index eae45a71..b65ace02 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/examples/vite/package.json b/examples/vite/package.json index 12581f17..562fa73a 100644 --- a/examples/vite/package.json +++ b/examples/vite/package.json @@ -26,6 +26,6 @@ "@types/react-dom": "^18.3.1", "@vitejs/plugin-react": "^4.3.4", "typescript": "^5.7.2", - "vite": "^6.0.2" + "vite": "^6.0.3" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 867ac4d5..53918472 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -202,13 +202,13 @@ importers: version: 18.3.1 '@vitejs/plugin-react': specifier: ^4.3.4 - version: 4.3.4(vite@6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1)) + version: 4.3.4(vite@6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1)) typescript: specifier: ^5.7.2 version: 5.7.2 vite: - specifier: ^6.0.2 - version: 6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1) + specifier: ^6.0.3 + version: 6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1) lib: devDependencies: @@ -331,7 +331,7 @@ importers: version: 18.3.1 '@vitejs/plugin-react': specifier: ^4.3.4 - version: 4.3.4(vite@6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1)) + version: 4.3.4(vite@6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1)) '@vitest/coverage-v8': specifier: ^2.1.8 version: 2.1.8(vitest@2.1.8(@types/node@22.10.1)(jsdom@25.0.1)(sass@1.82.0)) @@ -358,7 +358,7 @@ importers: version: 5.7.2 vite-tsconfig-paths: specifier: ^5.1.3 - version: 5.1.3(typescript@5.7.2)(vite@6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1)) + version: 5.1.3(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1)) vitest: specifier: ^2.1.8 version: 2.1.8(@types/node@22.10.1)(jsdom@25.0.1)(sass@1.82.0) @@ -6599,8 +6599,8 @@ packages: terser: optional: true - vite@6.0.2: - resolution: {integrity: sha512-XdQ+VsY2tJpBsKGs0wf3U/+azx8BBpYRHFAyKm5VeEZNOJZRB63q7Sc8Iup3k0TrN3KO6QgyzFf+opSbfY1y0g==} + vite@6.0.3: + resolution: {integrity: sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -8880,14 +8880,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@4.3.4(vite@6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1))': + '@vitejs/plugin-react@4.3.4(vite@6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1))': dependencies: '@babel/core': 7.26.0 '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1) + vite: 6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1) transitivePeerDependencies: - supports-color @@ -14526,13 +14526,13 @@ snapshots: - supports-color - typescript - vite-tsconfig-paths@5.1.3(typescript@5.7.2)(vite@6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1)): + vite-tsconfig-paths@5.1.3(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.7.2) optionalDependencies: - vite: 6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1) + vite: 6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1) transitivePeerDependencies: - supports-color - typescript @@ -14547,7 +14547,7 @@ snapshots: fsevents: 2.3.3 sass: 1.82.0 - vite@6.0.2(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1): + vite@6.0.3(@types/node@22.10.1)(sass@1.82.0)(yaml@2.6.1): dependencies: esbuild: 0.24.0 postcss: 8.4.49