@trackunit/react-core-hooks 1.7.124 → 1.7.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -680,7 +680,7 @@ const useSiteRuntime = () => {
680
680
  /**
681
681
  * This is a hook to use the UserSubscriptionContext.
682
682
  *
683
- * @requires UserSubscriptionProvider
683
+ * @requires UserSubscriptionContext
684
684
  * @example
685
685
  * import { useUserSubscription } from "@trackunit/react-core-hooks";
686
686
  * const { numberOfDaysWithAccessToHistoricalData, packageType } = useUserSubscription();
@@ -691,7 +691,7 @@ const useSiteRuntime = () => {
691
691
  const useUserSubscription = () => {
692
692
  const context = react.useContext(reactCoreContextsApi.UserSubscriptionContext);
693
693
  if (!context) {
694
- throw new Error("Cannot use useUserSubscription outside UserSubscriptionProvider");
694
+ throw new Error("useUserSubscription must be used within the UserSubscriptionContext");
695
695
  }
696
696
  return context;
697
697
  };
package/index.esm.js CHANGED
@@ -678,7 +678,7 @@ const useSiteRuntime = () => {
678
678
  /**
679
679
  * This is a hook to use the UserSubscriptionContext.
680
680
  *
681
- * @requires UserSubscriptionProvider
681
+ * @requires UserSubscriptionContext
682
682
  * @example
683
683
  * import { useUserSubscription } from "@trackunit/react-core-hooks";
684
684
  * const { numberOfDaysWithAccessToHistoricalData, packageType } = useUserSubscription();
@@ -689,7 +689,7 @@ const useSiteRuntime = () => {
689
689
  const useUserSubscription = () => {
690
690
  const context = useContext(UserSubscriptionContext);
691
691
  if (!context) {
692
- throw new Error("Cannot use useUserSubscription outside UserSubscriptionProvider");
692
+ throw new Error("useUserSubscription must be used within the UserSubscriptionContext");
693
693
  }
694
694
  return context;
695
695
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-hooks",
3
- "version": "1.7.124",
3
+ "version": "1.7.129",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -8,9 +8,9 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "react": "19.0.0",
11
- "@trackunit/iris-app-runtime-core": "1.8.120",
12
- "@trackunit/iris-app-runtime-core-api": "1.7.120",
13
- "@trackunit/react-core-contexts-api": "1.8.79"
11
+ "@trackunit/iris-app-runtime-core": "1.8.125",
12
+ "@trackunit/iris-app-runtime-core-api": "1.7.125",
13
+ "@trackunit/react-core-contexts-api": "1.8.84"
14
14
  },
15
15
  "module": "./index.esm.js",
16
16
  "main": "./index.cjs.js",
@@ -2,7 +2,7 @@ import { UserSubscription } from "@trackunit/iris-app-runtime-core-api";
2
2
  /**
3
3
  * This is a hook to use the UserSubscriptionContext.
4
4
  *
5
- * @requires UserSubscriptionProvider
5
+ * @requires UserSubscriptionContext
6
6
  * @example
7
7
  * import { useUserSubscription } from "@trackunit/react-core-hooks";
8
8
  * const { numberOfDaysWithAccessToHistoricalData, packageType } = useUserSubscription();
@@ -15,4 +15,4 @@
15
15
  * });
16
16
  * @see { IToastContext}
17
17
  */
18
- export declare const useToast: () => import("@trackunit/iris-app-runtime-core-api").IToastContext;
18
+ export declare const useToast: () => import("@trackunit/react-core-contexts-api").IToastContext;