@stytch/nextjs 21.5.0 → 21.5.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stytch/nextjs
2
2
 
3
+ ## 21.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9349a6b: Add error handling for claimed domains in the Discovery flow when no valid organizations are found
8
+
3
9
  ## 21.5.0
4
10
 
5
11
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  import React, { createContext, useContext, useEffect, useMemo, useCallback, useRef } from 'react';
2
- import { i as invariant, u as useAsyncState, m as mergeWithStableProps } from './useIsomorphicLayoutEffect-1babb81e.js';
2
+ import { i as invariant, u as useAsyncState, m as mergeWithStableProps } from './useIsomorphicLayoutEffect-681e2138.js';
3
3
  import { i as isStytchSSRProxy, n as noProviderError } from './StytchSSRProxy-34c789b5.js';
4
4
 
5
5
  const initialMember = {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var useIsomorphicLayoutEffect = require('./useIsomorphicLayoutEffect-65746ef3.js');
4
+ var useIsomorphicLayoutEffect = require('./useIsomorphicLayoutEffect-672e4b66.js');
5
5
  var StytchSSRProxy = require('./StytchSSRProxy-86bc42b3.js');
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -1,9 +1,9 @@
1
1
  import { mountAdminPortalSSO, mountAdminPortalOrgSettings, mountAdminPortalMemberManagement, mountAdminPortalSCIM } from '@stytch/vanilla-js/b2b/adminPortal';
2
2
  export { AdminPortalB2BProducts } from '@stytch/vanilla-js/b2b/adminPortal';
3
3
  import React, { useRef } from 'react';
4
- import { u as useIsMounted__INTERNAL, a as useStytchB2BClient } from '../StytchB2BContext-54aa990c.js';
4
+ import { u as useIsMounted__INTERNAL, a as useStytchB2BClient } from '../StytchB2BContext-1cabb03b.js';
5
5
  import { n as noProviderError } from '../StytchSSRProxy-34c789b5.js';
6
- import { i as invariant, a as useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect-1babb81e.js';
6
+ import { i as invariant, a as useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect-681e2138.js';
7
7
 
8
8
  const makeAdminPortalComponent = (mountFn, componentName) => {
9
9
  const Component = (props) => {
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var adminPortal = require('@stytch/vanilla-js/b2b/adminPortal');
6
6
  var React = require('react');
7
- var StytchB2BContext = require('../StytchB2BContext-c5062f9b.js');
7
+ var StytchB2BContext = require('../StytchB2BContext-f7acf57f.js');
8
8
  var StytchSSRProxy = require('../StytchSSRProxy-86bc42b3.js');
9
- var useIsomorphicLayoutEffect = require('../useIsomorphicLayoutEffect-65746ef3.js');
9
+ var useIsomorphicLayoutEffect = require('../useIsomorphicLayoutEffect-672e4b66.js');
10
10
 
11
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
12
 
@@ -141,6 +141,6 @@ declare const StytchB2B: <TProjectConfiguration extends Partial<import("@stytch/
141
141
  * />
142
142
  */
143
143
  declare const B2BIdentityProvider: ({ styles, callbacks, getIDPConsentManifest }: B2BIdentityProviderProps) => React.JSX.Element;
144
- export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions } from "../StytchB2BContext-c5062f9b.js";
144
+ export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions } from "../StytchB2BContext-f7acf57f.js";
145
145
  export { StytchB2B, B2BIdentityProvider };
146
- export type { StytchB2BProviderProps } from "../StytchB2BContext-c5062f9b.js";
146
+ export type { StytchB2BProviderProps } from "../StytchB2BContext-f7acf57f.js";
@@ -141,6 +141,6 @@ declare const StytchB2B: <TProjectConfiguration extends Partial<import("@stytch/
141
141
  * />
142
142
  */
143
143
  declare const B2BIdentityProvider: ({ styles, callbacks, getIDPConsentManifest }: B2BIdentityProviderProps) => React.JSX.Element;
144
- export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions } from "../StytchB2BContext-54aa990c.js";
144
+ export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions } from "../StytchB2BContext-1cabb03b.js";
145
145
  export { StytchB2B, B2BIdentityProvider };
146
- export type { StytchB2BProviderProps } from "../StytchB2BContext-54aa990c.js";
146
+ export type { StytchB2BProviderProps } from "../StytchB2BContext-1cabb03b.js";
@@ -1,7 +1,7 @@
1
- import { u as useIsMounted__INTERNAL, a as useStytchB2BClient, i as isUIClient, b as useStytchMember } from '../StytchB2BContext-54aa990c.js';
2
- export { S as StytchB2BProvider, a as useStytchB2BClient, d as useStytchIsAuthorized, b as useStytchMember, c as useStytchMemberSession, e as useStytchOrganization, w as withStytchB2BClient, g as withStytchMember, f as withStytchMemberSession, h as withStytchOrganization, j as withStytchPermissions } from '../StytchB2BContext-54aa990c.js';
1
+ import { u as useIsMounted__INTERNAL, a as useStytchB2BClient, i as isUIClient, b as useStytchMember } from '../StytchB2BContext-1cabb03b.js';
2
+ export { S as StytchB2BProvider, a as useStytchB2BClient, d as useStytchIsAuthorized, b as useStytchMember, c as useStytchMemberSession, e as useStytchOrganization, w as withStytchB2BClient, g as withStytchMember, f as withStytchMemberSession, h as withStytchOrganization, j as withStytchPermissions } from '../StytchB2BContext-1cabb03b.js';
3
3
  import React, { useRef } from 'react';
4
- import { i as invariant, a as useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect-1babb81e.js';
4
+ import { i as invariant, a as useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect-681e2138.js';
5
5
  import { a as noHeadlessClientError, n as noProviderError } from '../StytchSSRProxy-34c789b5.js';
6
6
 
7
7
  /**
@@ -58,7 +58,6 @@ const StytchB2B = ({ styles, callbacks, config, }) => {
58
58
  elementId: `#${containerEl.current.id}`,
59
59
  styles,
60
60
  });
61
- // eslint-disable-next-line react-hooks/exhaustive-deps -- SDK-1354
62
61
  }, [stytchClient, styles, callbacks]);
63
62
  return React.createElement("div", { ref: containerEl });
64
63
  };
@@ -12,5 +12,5 @@ import { StytchB2BHeadlessClient } from "@stytch/vanilla-js/b2b/headless";
12
12
  * )
13
13
  * @returns A {@link StytchB2BHeadlessClient}
14
14
  */
15
- declare const createStytchB2BHeadlessClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(_PUBLIC_TOKEN: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchB2BHeadlessClient<TProjectConfiguration>;
15
+ declare const createStytchB2BHeadlessClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(rawPublicToken: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchB2BHeadlessClient<TProjectConfiguration>;
16
16
  export { createStytchB2BHeadlessClient };
@@ -12,5 +12,5 @@ import { StytchB2BHeadlessClient } from "@stytch/vanilla-js/b2b/headless";
12
12
  * )
13
13
  * @returns A {@link StytchB2BHeadlessClient}
14
14
  */
15
- declare const createStytchB2BHeadlessClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(_PUBLIC_TOKEN: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchB2BHeadlessClient<TProjectConfiguration>;
15
+ declare const createStytchB2BHeadlessClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(rawPublicToken: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchB2BHeadlessClient<TProjectConfiguration>;
16
16
  export { createStytchB2BHeadlessClient };
package/dist/b2b/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var StytchB2BContext = require('../StytchB2BContext-c5062f9b.js');
5
+ var StytchB2BContext = require('../StytchB2BContext-f7acf57f.js');
6
6
  var React = require('react');
7
- var useIsomorphicLayoutEffect = require('../useIsomorphicLayoutEffect-65746ef3.js');
7
+ var useIsomorphicLayoutEffect = require('../useIsomorphicLayoutEffect-672e4b66.js');
8
8
  var StytchSSRProxy = require('../StytchSSRProxy-86bc42b3.js');
9
9
 
10
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -65,7 +65,6 @@ const StytchB2B = ({ styles, callbacks, config, }) => {
65
65
  elementId: `#${containerEl.current.id}`,
66
66
  styles,
67
67
  });
68
- // eslint-disable-next-line react-hooks/exhaustive-deps -- SDK-1354
69
68
  }, [stytchClient, styles, callbacks]);
70
69
  return React__default["default"].createElement("div", { ref: containerEl });
71
70
  };
@@ -13,5 +13,5 @@ import { StytchB2BUIClient } from "@stytch/vanilla-js/b2b";
13
13
  * )
14
14
  * @returns A {@link StytchB2BUIClient}
15
15
  */
16
- declare const createStytchB2BUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(_PUBLIC_TOKEN: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchB2BUIClient<TProjectConfiguration>;
16
+ declare const createStytchB2BUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(rawPublicToken: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchB2BUIClient<TProjectConfiguration>;
17
17
  export { createStytchB2BUIClient };
@@ -13,5 +13,5 @@ import { StytchB2BUIClient } from "@stytch/vanilla-js/b2b";
13
13
  * )
14
14
  * @returns A {@link StytchB2BUIClient}
15
15
  */
16
- declare const createStytchB2BUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(_PUBLIC_TOKEN: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchB2BUIClient<TProjectConfiguration>;
16
+ declare const createStytchB2BUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(rawPublicToken: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchB2BUIClient<TProjectConfiguration>;
17
17
  export { createStytchB2BUIClient };
@@ -1,2 +1,2 @@
1
1
  export { createDeepEqual } from "./createDeepEqual-5555f2e1.js";
2
- export { mergeWithStableProps } from "./useIsomorphicLayoutEffect-1babb81e.js";
2
+ export { mergeWithStableProps } from "./useIsomorphicLayoutEffect-681e2138.js";
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { createContext, useContext, useMemo, useCallback, useRef, useEffect } from 'react';
2
- import { i as invariant, u as useAsyncState, m as mergeWithStableProps, a as useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect-1babb81e.js';
2
+ import { i as invariant, u as useAsyncState, m as mergeWithStableProps, a as useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect-681e2138.js';
3
3
  import { i as isStytchSSRProxy, n as noProviderError, p as providerMustBeUniqueError, a as noHeadlessClientError } from './StytchSSRProxy-34c789b5.js';
4
4
 
5
5
  const initialUser = {
@@ -12,5 +12,5 @@ import { StytchHeadlessClient } from "@stytch/vanilla-js/headless";
12
12
  * )
13
13
  * @returns A {@link StytchHeadlessClient}
14
14
  */
15
- declare const createStytchHeadlessClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(_PUBLIC_TOKEN: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchHeadlessClient<TProjectConfiguration>;
15
+ declare const createStytchHeadlessClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(publicTokenRaw: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchHeadlessClient<TProjectConfiguration>;
16
16
  export { createStytchHeadlessClient };
@@ -12,5 +12,5 @@ import { StytchHeadlessClient } from "@stytch/vanilla-js/headless";
12
12
  * )
13
13
  * @returns A {@link StytchHeadlessClient}
14
14
  */
15
- declare const createStytchHeadlessClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(_PUBLIC_TOKEN: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchHeadlessClient<TProjectConfiguration>;
15
+ declare const createStytchHeadlessClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(publicTokenRaw: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchHeadlessClient<TProjectConfiguration>;
16
16
  export { createStytchHeadlessClient };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var useIsomorphicLayoutEffect = require('./useIsomorphicLayoutEffect-65746ef3.js');
6
+ var useIsomorphicLayoutEffect = require('./useIsomorphicLayoutEffect-672e4b66.js');
7
7
  var StytchSSRProxy = require('./StytchSSRProxy-86bc42b3.js');
8
8
 
9
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -13,5 +13,5 @@ import { StytchUIClient } from "@stytch/vanilla-js";
13
13
  * )
14
14
  * @returns A {@link StytchUIClient}
15
15
  */
16
- declare const createStytchUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(_PUBLIC_TOKEN: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchUIClient<TProjectConfiguration>;
16
+ declare const createStytchUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(publicTokenRaw: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchUIClient<TProjectConfiguration>;
17
17
  export { createStytchUIClient };
@@ -13,5 +13,5 @@ import { StytchUIClient } from "@stytch/vanilla-js";
13
13
  * )
14
14
  * @returns A {@link StytchUIClient}
15
15
  */
16
- declare const createStytchUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(_PUBLIC_TOKEN: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchUIClient<TProjectConfiguration>;
16
+ declare const createStytchUIClient: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>(publicTokenRaw: string, options?: import("@stytch/core/public").StytchClientOptions | undefined) => StytchUIClient<TProjectConfiguration>;
17
17
  export { createStytchUIClient };
@@ -1,6 +1,5 @@
1
1
  import { Dispatch, SetStateAction, useEffect } from "react";
2
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
- declare function invariant(cond: any, message: string): asserts cond;
2
+ declare function invariant(cond: unknown, message: string): asserts cond;
4
3
  // useState can cause memory leaks if it is set after the component unmounted. For example, if it is
5
4
  // set after `await`, or in a `then`, `catch`, or `finally`, or in a setTimout/setInterval.
6
5
  declare const useAsyncState: <T>(initialState: T | (() => T)) => [
@@ -70,7 +70,6 @@ const useAsyncState = (initialState) => {
70
70
  return [state, setStateAction];
71
71
  };
72
72
 
73
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
73
  function invariant(cond, message) {
75
74
  if (!cond)
76
75
  throw new Error(message);
@@ -1,6 +1,5 @@
1
1
  import { Dispatch, SetStateAction, useEffect } from "react";
2
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
- declare function invariant(cond: any, message: string): asserts cond;
2
+ declare function invariant(cond: unknown, message: string): asserts cond;
4
3
  // useState can cause memory leaks if it is set after the component unmounted. For example, if it is
5
4
  // set after `await`, or in a `then`, `catch`, or `finally`, or in a setTimout/setInterval.
6
5
  declare const useAsyncState: <T>(initialState: T | (() => T)) => [
@@ -68,7 +68,6 @@ const useAsyncState = (initialState) => {
68
68
  return [state, setStateAction];
69
69
  };
70
70
 
71
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
72
71
  function invariant(cond, message) {
73
72
  if (!cond)
74
73
  throw new Error(message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stytch/nextjs",
3
- "version": "21.5.0",
3
+ "version": "21.5.1",
4
4
  "description": "Stytch's official Next.js Library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -24,7 +24,7 @@
24
24
  "@babel/runtime": "7.27.0",
25
25
  "@stytch/internal-tsconfigs": "0.0.0",
26
26
  "@stytch/js-utils": "0.0.1",
27
- "@stytch/vanilla-js": "5.22.7",
27
+ "@stytch/vanilla-js": "5.24.4",
28
28
  "@testing-library/react": "14.0.0",
29
29
  "@types/jest": "29.5.14",
30
30
  "eslint-config-custom": "0.0.1",