@stytch/nextjs 0.4.2 → 0.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # @stytch/nextjs
2
+
3
+ ## 0.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Send methods in the SDK
8
+ - Updated dependencies
9
+ - @stytch/vanilla-js@0.4.4
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ const useStytch = () => {
114
114
  const withStytch = (Component) => {
115
115
  const WithStytch = (props) => {
116
116
  invariant(useIsMounted__INTERNAL(), noProviderError('withStytch'));
117
- return React__default["default"].createElement(Component, Object.assign({}, props, { stytch: useStytch() }));
117
+ return React__default['default'].createElement(Component, Object.assign({}, props, { stytch: useStytch() }));
118
118
  };
119
119
  WithStytch.displayName = `withStytch(${Component.displayName || Component.name || 'Component'})`;
120
120
  return WithStytch;
@@ -123,7 +123,7 @@ const withStytchUser = (Component) => {
123
123
  const WithStytchUser = (props) => {
124
124
  invariant(useIsMounted__INTERNAL(), noProviderError('withStytchUser'));
125
125
  const { user, isInitialized, fromCache } = useStytchUser();
126
- return (React__default["default"].createElement(Component, Object.assign({}, props, { stytchUser: user, stytchUserIsInitialized: isInitialized, stytchUserIsFromCache: fromCache })));
126
+ return (React__default['default'].createElement(Component, Object.assign({}, props, { stytchUser: user, stytchUserIsInitialized: isInitialized, stytchUserIsFromCache: fromCache })));
127
127
  };
128
128
  WithStytchUser.displayName = `withStytchUser(${Component.displayName || Component.name || 'Component'})`;
129
129
  return WithStytchUser;
@@ -132,7 +132,7 @@ const withStytchSession = (Component) => {
132
132
  const WithStytchSession = (props) => {
133
133
  invariant(useIsMounted__INTERNAL(), noProviderError('withStytchSession'));
134
134
  const { session, isInitialized, fromCache } = useStytchSession();
135
- return (React__default["default"].createElement(Component, Object.assign({}, props, { stytchSession: session, stytchSessionIsInitialized: isInitialized, stytchSessionIsFromCache: fromCache })));
135
+ return (React__default['default'].createElement(Component, Object.assign({}, props, { stytchSession: session, stytchSessionIsInitialized: isInitialized, stytchSessionIsFromCache: fromCache })));
136
136
  };
137
137
  WithStytchSession.displayName = `withStytchSession(${Component.displayName || Component.name || 'Component'})`;
138
138
  return WithStytchSession;
@@ -176,9 +176,9 @@ const StytchProvider = ({ stytch, children }) => {
176
176
  }, [stytch, setUser, setSession]);
177
177
  const finalSess = !!session.session === !!user.user ? session : initialSession;
178
178
  const finalUser = !!session.session === !!user.user ? user : initialUser;
179
- return (React__default["default"].createElement(StytchContext.Provider, { value: ctx },
180
- React__default["default"].createElement(StytchUserContext.Provider, { value: finalUser },
181
- React__default["default"].createElement(StytchSessionContext.Provider, { value: finalSess }, children))));
179
+ return (React__default['default'].createElement(StytchContext.Provider, { value: ctx },
180
+ React__default['default'].createElement(StytchUserContext.Provider, { value: finalUser },
181
+ React__default['default'].createElement(StytchSessionContext.Provider, { value: finalSess }, children))));
182
182
  };
183
183
 
184
184
  // cc https://medium.com/@alexandereardon/uselayouteffect-and-ssr-192986cdcf7a
@@ -240,7 +240,7 @@ const StytchLogin = ({ config, styles, callbacks }) => {
240
240
  styles,
241
241
  });
242
242
  }, [stytchClient, config, styles, callbacks]);
243
- return React__default["default"].createElement("div", { ref: containerEl });
243
+ return React__default['default'].createElement("div", { ref: containerEl });
244
244
  };
245
245
 
246
246
  exports.StytchLogin = StytchLogin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stytch/nextjs",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Stytch's official Next.js Library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -20,14 +20,14 @@
20
20
  "license": "MIT",
21
21
  "author": "Stytch",
22
22
  "devDependencies": {
23
- "@babel/runtime": "^7.18.6",
24
- "@stytch/vanilla-js": "0.3.2",
23
+ "@babel/runtime": "7.18.6",
24
+ "@stytch/vanilla-js": "0.4.4",
25
25
  "eslint-config-custom": "0.0.0",
26
- "rollup": "^2.56.3",
26
+ "rollup": "2.56.3",
27
27
  "typescript": "4.7.4"
28
28
  },
29
29
  "peerDependencies": {
30
- "@stytch/vanilla-js": "^0.3.2",
30
+ "@stytch/vanilla-js": "^0.4.4",
31
31
  "react": ">= 17.0.2",
32
32
  "react-dom": ">= 17.0.2"
33
33
  },
@@ -43,4 +43,4 @@
43
43
  "jwt",
44
44
  "user"
45
45
  ]
46
- }
46
+ }