@stytch/nextjs 21.4.2 → 21.4.4

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +9 -8
  3. package/dist/{StytchB2BContext-47d523b4.d.ts → StytchB2BContext-a27d4ac7.d.ts} +75 -15
  4. package/dist/{StytchB2BContext-47d523b4.js → StytchB2BContext-a27d4ac7.js} +13 -16
  5. package/dist/{StytchB2BContext-f172fdfe.d.ts → StytchB2BContext-c11ed503.d.ts} +75 -15
  6. package/dist/{StytchB2BContext-f172fdfe.js → StytchB2BContext-c11ed503.js} +13 -16
  7. package/dist/adminPortal/index.d.ts +1 -1
  8. package/dist/adminPortal/index.esm.d.ts +1 -1
  9. package/dist/adminPortal/index.esm.js +3 -3
  10. package/dist/adminPortal/index.js +3 -3
  11. package/dist/b2b/index.d.ts +19 -23
  12. package/dist/b2b/index.esm.d.ts +19 -23
  13. package/dist/b2b/index.esm.js +19 -24
  14. package/dist/b2b/index.headless.esm.js +1 -1
  15. package/dist/b2b/index.headless.js +1 -1
  16. package/dist/b2b/index.js +18 -23
  17. package/dist/b2b/index.ui.esm.js +1 -1
  18. package/dist/b2b/index.ui.js +1 -1
  19. package/dist/index-b14d4efe.d.ts +1 -1
  20. package/dist/index.d.ts +64 -44
  21. package/dist/index.esm.d.ts +64 -44
  22. package/dist/index.esm.js +27 -46
  23. package/dist/index.headless.esm.js +1 -1
  24. package/dist/index.headless.js +1 -1
  25. package/dist/index.js +27 -46
  26. package/dist/index.ui.esm.js +1 -1
  27. package/dist/index.ui.js +1 -1
  28. package/dist/{useIsomorphicLayoutEffect-41b6e419.d.ts → useIsomorphicLayoutEffect-1babb81e.d.ts} +3 -3
  29. package/dist/{useIsomorphicLayoutEffect-8da8c061.d.ts → useIsomorphicLayoutEffect-65746ef3.d.ts} +3 -3
  30. package/package.json +3 -4
  31. package/dist/{StytchSSRProxy-14916009.d.ts → StytchSSRProxy-4e34fb34.d.ts} +0 -0
  32. package/dist/{StytchSSRProxy-14916009.js → StytchSSRProxy-4e34fb34.js} +0 -0
  33. package/dist/{StytchSSRProxy-63bc6323.d.ts → StytchSSRProxy-c9d3bc41.d.ts} +0 -0
  34. package/dist/{StytchSSRProxy-63bc6323.js → StytchSSRProxy-c9d3bc41.js} +0 -0
  35. package/dist/{useIsomorphicLayoutEffect-8da8c061.js → useIsomorphicLayoutEffect-1babb81e.js} +6 -6
  36. package/dist/{useIsomorphicLayoutEffect-41b6e419.js → useIsomorphicLayoutEffect-65746ef3.js} +6 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stytch/nextjs",
3
- "version": "21.4.2",
3
+ "version": "21.4.4",
4
4
  "description": "Stytch's official Next.js Library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -15,8 +15,7 @@
15
15
  "build": "npm run clean && npm run compile",
16
16
  "clean": "rm -rf ./dist",
17
17
  "compile": "rollup -c",
18
- "dev": "tsc -p tsconfig.build.json --watch",
19
- "test": "jest"
18
+ "dev": "tsc -p tsconfig.build.json --watch"
20
19
  },
21
20
  "license": "MIT",
22
21
  "author": "Stytch",
@@ -24,7 +23,7 @@
24
23
  "@babel/runtime": "7.26.10",
25
24
  "@stytch/internal-tsconfigs": "0.0.0",
26
25
  "@stytch/js-utils": "0.0.1",
27
- "@stytch/vanilla-js": "5.18.6",
26
+ "@stytch/vanilla-js": "5.22.3",
28
27
  "@testing-library/react": "14.0.0",
29
28
  "@types/jest": "29.5.14",
30
29
  "eslint-config-custom": "0.0.1",
@@ -51,12 +51,6 @@ const mergeWithStableProps = (oldValue, newValue) => {
51
51
  }, Object.assign({}, newValue));
52
52
  };
53
53
 
54
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
55
- function invariant(cond, message) {
56
- if (!cond)
57
- throw new Error(message);
58
- }
59
-
60
54
  // useState can cause memory leaks if it is set after the component unmounted. For example, if it is
61
55
  // set after `await`, or in a `then`, `catch`, or `finally`, or in a setTimout/setInterval.
62
56
  const useAsyncState = (initialState) => {
@@ -74,6 +68,12 @@ const useAsyncState = (initialState) => {
74
68
  return [state, setStateAction];
75
69
  };
76
70
 
71
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
72
+ function invariant(cond, message) {
73
+ if (!cond)
74
+ throw new Error(message);
75
+ }
76
+
77
77
  // cc https://medium.com/@alexandereardon/uselayouteffect-and-ssr-192986cdcf7a
78
78
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
79
79
 
@@ -53,12 +53,6 @@ const mergeWithStableProps = (oldValue, newValue) => {
53
53
  }, Object.assign({}, newValue));
54
54
  };
55
55
 
56
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
- function invariant(cond, message) {
58
- if (!cond)
59
- throw new Error(message);
60
- }
61
-
62
56
  // useState can cause memory leaks if it is set after the component unmounted. For example, if it is
63
57
  // set after `await`, or in a `then`, `catch`, or `finally`, or in a setTimout/setInterval.
64
58
  const useAsyncState = (initialState) => {
@@ -76,6 +70,12 @@ const useAsyncState = (initialState) => {
76
70
  return [state, setStateAction];
77
71
  };
78
72
 
73
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
+ function invariant(cond, message) {
75
+ if (!cond)
76
+ throw new Error(message);
77
+ }
78
+
79
79
  // cc https://medium.com/@alexandereardon/uselayouteffect-and-ssr-192986cdcf7a
80
80
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
81
81