From 68a91303bb3aa11fdc47fb21735bc2f84e15f941 Mon Sep 17 00:00:00 2001 From: mayank1513 Date: Thu, 19 Dec 2024 08:21:51 +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.initWithPlugins.html | 2 +- docs/functions/utils.listToRegExp.html | 2 +- docs/functions/utils.triggerListeners.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.RGS.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 +- ...tils._internal_.ListenerWithSelectors.html | 2 +- docs/types/utils._internal_.Mutate.html | 2 +- docs/variables/utils.globalRGS.html | 2 +- pnpm-lock.yaml | 53 ++++++++++--------- 20 files changed, 48 insertions(+), 47 deletions(-) diff --git a/docs/functions/index.useRGS.html b/docs/functions/index.useRGS.html index ef44bf35..a2e48ff9 100644 --- a/docs/functions/index.useRGS.html +++ b/docs/functions/index.useRGS.html @@ -9,4 +9,4 @@
  • OptionalincludeRegExp: null | 0 | RegExp

    (Optional) A regular expression to specify which fields trigger updates.

  • OptionalexcludeRegExp: RegExp

    (Optional) A regular expression to specify which fields should be excluded from updates.

  • Returns [T, SetStateAction<T>]

    A tuple containing the current state and a function to update the state.

    -
    +
    diff --git a/docs/functions/plugins_persist.persist.html b/docs/functions/plugins_persist.persist.html index 7994b431..b9f7dd5b 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 466716d4..bee6d8f5 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.initWithPlugins.html b/docs/functions/utils.initWithPlugins.html index f6d1d26e..6519fb2e 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.listToRegExp.html b/docs/functions/utils.listToRegExp.html index 411fe3b5..31e8afbe 100644 --- a/docs/functions/utils.listToRegExp.html +++ b/docs/functions/utils.listToRegExp.html @@ -1,4 +1,4 @@ listToRegExp | React18 Global Store

    Converts a list of selectors into a regular expression.

    • Parameters

      • list: string[]

        An array of strings representing the fields to match.

      Returns RegExp

      A regular expression that matches any field from the provided list.

      -
    +
    diff --git a/docs/functions/utils.triggerListeners.html b/docs/functions/utils.triggerListeners.html index b2af4439..09c65598 100644 --- a/docs/functions/utils.triggerListeners.html +++ b/docs/functions/utils.triggerListeners.html @@ -1,2 +1,2 @@ triggerListeners | React18 Global Store

    trigger all listeners

    -
    • Type Parameters

      • T

      Parameters

      Returns void

    +
    diff --git a/docs/functions/utils.useRGSWithPlugins.html b/docs/functions/utils.useRGSWithPlugins.html index d94486da..688d8f56 100644 --- a/docs/functions/utils.useRGSWithPlugins.html +++ b/docs/functions/utils.useRGSWithPlugins.html @@ -12,4 +12,4 @@
  • OptionalincludeRegExp: null | 0 | RegExp
  • OptionalexcludeRegExp: RegExp
  • Returns [T, SetStateAction<T>]

    -
    +
    diff --git a/docs/functions/with-plugins.create.html b/docs/functions/with-plugins.create.html index e4149738..97fe89e9 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 81c6993c..de087260 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 3c80d140..2a0a0ba8 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 5a35d64e..98547dac 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.RGS.html b/docs/types/utils.RGS.html index 35f8021f..9d8a6878 100644 --- a/docs/types/utils.RGS.html +++ b/docs/types/utils.RGS.html @@ -1,2 +1,2 @@ RGS | React18 Global Store
    RGS: {
        l: ListenerWithSelectors[];
        s: SetStateAction<unknown> | null;
        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.SetStateAction.html b/docs/types/utils.SetStateAction.html index a8621fff..6d74c94b 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 52db97a8..52f79f3e 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 087daa8e..a58bb19f 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 bb2b2418..2002f51a 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_.ListenerWithSelectors.html b/docs/types/utils._internal_.ListenerWithSelectors.html index bd00eb61..e86185de 100644 --- a/docs/types/utils._internal_.ListenerWithSelectors.html +++ b/docs/types/utils._internal_.ListenerWithSelectors.html @@ -1 +1 @@ -ListenerWithSelectors | React18 Global Store
    ListenerWithSelectors: {
        l: Listener;
        s: [includeRegExp?: RegExp | null, excludeRegExp?: RegExp];
    }

    Type declaration

    +ListenerWithSelectors | React18 Global Store
    ListenerWithSelectors: {
        l: Listener;
        s: [includeRegExp?: RegExp | null, excludeRegExp?: RegExp];
    }

    Type declaration

    diff --git a/docs/types/utils._internal_.Mutate.html b/docs/types/utils._internal_.Mutate.html index 0a82c136..0d770be2 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/variables/utils.globalRGS.html b/docs/variables/utils.globalRGS.html index 9c3d82ed..694526c1 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 edb5a2ac..785f4edb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2484,8 +2484,8 @@ packages: resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} engines: {node: '>=16'} - caniuse-lite@1.0.30001689: - resolution: {integrity: sha512-CmeR2VBycfa+5/jOfnp/NpWPGd06nf1XYiefUvhXFfZE4GkRc9jv+eGPS4nT558WS/8lYCzV8SlANCIPvbWP1g==} + caniuse-lite@1.0.30001690: + resolution: {integrity: sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==} capital-case@1.0.4: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} @@ -2746,8 +2746,8 @@ packages: resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} engines: {node: '>= 0.4'} - data-view-byte-offset@1.0.0: - resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + data-view-byte-offset@1.0.1: + resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==} engines: {node: '>= 0.4'} debug@2.6.9: @@ -4455,8 +4455,8 @@ packages: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true - math-intrinsics@1.0.0: - resolution: {integrity: sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} mdast-util-definitions@5.1.2: @@ -5009,8 +5009,8 @@ packages: resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} engines: {node: '>=0.10.0'} - object.values@1.2.0: - resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + object.values@1.2.1: + resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==} engines: {node: '>= 0.4'} on-finished@2.3.0: @@ -6283,8 +6283,8 @@ packages: resolution: {integrity: sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==} engines: {node: '>= 0.4'} - typed-array-byte-offset@1.0.3: - resolution: {integrity: sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==} + typed-array-byte-offset@1.0.4: + resolution: {integrity: sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==} engines: {node: '>= 0.4'} typed-array-length@1.0.7: @@ -9052,7 +9052,7 @@ snapshots: autoprefixer@10.4.20(postcss@8.4.49): dependencies: browserslist: 4.24.3 - caniuse-lite: 1.0.30001689 + caniuse-lite: 1.0.30001690 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.1.1 @@ -9185,7 +9185,7 @@ snapshots: browserslist@4.24.3: dependencies: - caniuse-lite: 1.0.30001689 + caniuse-lite: 1.0.30001690 electron-to-chromium: 1.5.74 node-releases: 2.0.19 update-browserslist-db: 1.1.1(browserslist@4.24.3) @@ -9264,7 +9264,7 @@ snapshots: camelcase@8.0.0: {} - caniuse-lite@1.0.30001689: {} + caniuse-lite@1.0.30001690: {} capital-case@1.0.4: dependencies: @@ -9531,9 +9531,9 @@ snapshots: es-errors: 1.3.0 is-data-view: 1.0.2 - data-view-byte-offset@1.0.0: + data-view-byte-offset@1.0.1: dependencies: - call-bind: 1.0.8 + call-bound: 1.0.3 es-errors: 1.3.0 is-data-view: 1.0.2 @@ -9708,7 +9708,7 @@ snapshots: call-bound: 1.0.3 data-view-buffer: 1.0.1 data-view-byte-length: 1.0.1 - data-view-byte-offset: 1.0.0 + data-view-byte-offset: 1.0.1 es-define-property: 1.0.1 es-errors: 1.3.0 es-object-atoms: 1.0.0 @@ -9733,7 +9733,7 @@ snapshots: is-string: 1.1.1 is-typed-array: 1.1.15 is-weakref: 1.1.0 - math-intrinsics: 1.0.0 + math-intrinsics: 1.1.0 object-inspect: 1.13.3 object-keys: 1.1.1 object.assign: 4.1.7 @@ -9745,7 +9745,7 @@ snapshots: string.prototype.trimstart: 1.0.8 typed-array-buffer: 1.0.3 typed-array-byte-length: 1.0.3 - typed-array-byte-offset: 1.0.3 + typed-array-byte-offset: 1.0.4 typed-array-length: 1.0.7 unbox-primitive: 1.1.0 which-typed-array: 1.1.18 @@ -9994,7 +9994,7 @@ snapshots: minimatch: 3.1.2 object.fromentries: 2.0.8 object.groupby: 1.0.3 - object.values: 1.2.0 + object.values: 1.2.1 semver: 6.3.1 string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 @@ -10085,7 +10085,7 @@ snapshots: minimatch: 3.1.2 object.entries: 1.1.8 object.fromentries: 2.0.8 - object.values: 1.2.0 + object.values: 1.2.1 prop-types: 15.8.1 resolve: 2.0.0-next.5 semver: 6.3.1 @@ -10555,7 +10555,7 @@ snapshots: gopd: 1.2.0 has-symbols: 1.1.0 hasown: 2.0.2 - math-intrinsics: 1.0.0 + math-intrinsics: 1.1.0 get-package-type@0.1.0: optional: true @@ -11563,7 +11563,7 @@ snapshots: array-includes: 3.1.8 array.prototype.flat: 1.3.3 object.assign: 4.1.7 - object.values: 1.2.0 + object.values: 1.2.1 keyv@4.5.4: dependencies: @@ -11719,7 +11719,7 @@ snapshots: punycode.js: 2.3.1 uc.micro: 2.1.0 - math-intrinsics@1.0.0: {} + math-intrinsics@1.1.0: {} mdast-util-definitions@5.1.2: dependencies: @@ -12484,7 +12484,7 @@ snapshots: '@swc/counter': 0.1.3 '@swc/helpers': 0.5.15 busboy: 1.6.0 - caniuse-lite: 1.0.30001689 + caniuse-lite: 1.0.30001690 postcss: 8.4.31 react: 19.0.0 react-dom: 19.0.0(react@19.0.0) @@ -12671,9 +12671,10 @@ snapshots: dependencies: isobject: 3.0.1 - object.values@1.2.0: + object.values@1.2.1: dependencies: call-bind: 1.0.8 + call-bound: 1.0.3 define-properties: 1.2.1 es-object-atoms: 1.0.0 @@ -14075,7 +14076,7 @@ snapshots: has-proto: 1.2.0 is-typed-array: 1.1.15 - typed-array-byte-offset@1.0.3: + typed-array-byte-offset@1.0.4: dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.8