@stytch/react 19.5.1 → 19.5.2

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/react
2
2
 
3
+ ## 19.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 16f3109: Fix exported type declarations for useStytchB2BClient, withStytchB2BClient, and withStytchPermissions
8
+
3
9
  ## 19.5.1
4
10
 
5
11
  ### Patch 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 { n as noProviderError, i as isStytchSSRProxy } 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-9c062712.js';
4
+ import { u as useIsMounted__INTERNAL, a as useStytchB2BClient } from '../StytchB2BContext-4afdf6a8.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
 
@@ -306,5 +306,6 @@ interface StytchB2BProviderProps<TProjectConfiguration extends StytchProjectConf
306
306
  * )
307
307
  */
308
308
  declare const StytchB2BProvider: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>({ stytch, children, assumeHydrated }: StytchB2BProviderProps<TProjectConfiguration>) => JSX.Element;
309
- export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions, StytchB2B, B2BIdentityProvider };
309
+ export { useStytchB2BClient, withStytchB2BClient, withStytchPermissions } from "../StytchB2BContext-f7acf57f.js";
310
+ export { StytchB2BProvider, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchMemberSession, withStytchMember, withStytchOrganization, StytchB2B, B2BIdentityProvider };
310
311
  export type { StytchB2BProviderProps, StytchB2BProps, B2BIdentityProviderProps };
@@ -306,5 +306,6 @@ interface StytchB2BProviderProps<TProjectConfiguration extends StytchProjectConf
306
306
  * )
307
307
  */
308
308
  declare const StytchB2BProvider: <TProjectConfiguration extends Partial<import("@stytch/core/public").StytchProjectConfiguration> = Stytch.DefaultProjectConfiguration>({ stytch, children, assumeHydrated }: StytchB2BProviderProps<TProjectConfiguration>) => JSX.Element;
309
- export { StytchB2BProvider, useStytchB2BClient, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchB2BClient, withStytchMemberSession, withStytchMember, withStytchOrganization, withStytchPermissions, StytchB2B, B2BIdentityProvider };
309
+ export { useStytchB2BClient, withStytchB2BClient, withStytchPermissions } from "../StytchB2BContext-4afdf6a8.js";
310
+ export { StytchB2BProvider, useStytchMemberSession, useStytchMember, useStytchIsAuthorized, useStytchOrganization, withStytchMemberSession, withStytchMember, withStytchOrganization, StytchB2B, B2BIdentityProvider };
310
311
  export type { StytchB2BProviderProps, StytchB2BProps, B2BIdentityProviderProps };
@@ -1,7 +1,7 @@
1
1
  import React, { useRef } from 'react';
2
- import { u as useIsMounted__INTERNAL, a as useStytchB2BClient, i as isUIClient, b as useStytchMember$1, c as useStytchMemberSession$1, d as useStytchOrganization$1, e as useStytchIsAuthorized$1, w as withStytchMember$1, f as withStytchMemberSession$1, g as withStytchOrganization$1, S as StytchB2BProvider$1 } from '../StytchB2BContext-9c062712.js';
3
- export { a as useStytchB2BClient, h as withStytchB2BClient, j as withStytchPermissions } from '../StytchB2BContext-9c062712.js';
4
- import { i as invariant, a as useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect-1babb81e.js';
2
+ import { u as useIsMounted__INTERNAL, a as useStytchB2BClient, i as isUIClient, b as useStytchMember$1, c as useStytchMemberSession$1, d as useStytchOrganization$1, e as useStytchIsAuthorized$1, w as withStytchMember$1, f as withStytchMemberSession$1, g as withStytchOrganization$1, S as StytchB2BProvider$1 } from '../StytchB2BContext-4afdf6a8.js';
3
+ export { a as useStytchB2BClient, h as withStytchB2BClient, j as withStytchPermissions } from '../StytchB2BContext-4afdf6a8.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
  /**
package/dist/b2b/index.js CHANGED
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var StytchB2BContext = require('../StytchB2BContext-c5062f9b.js');
7
- var useIsomorphicLayoutEffect = require('../useIsomorphicLayoutEffect-65746ef3.js');
6
+ var StytchB2BContext = require('../StytchB2BContext-f7acf57f.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 }; }
@@ -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 { n as noProviderError, p as providerMustBeUniqueError, i as isStytchSSRProxy, a as noHeadlessClientError } from './StytchSSRProxy-34c789b5.js';
4
4
 
5
5
  const initialUser = {
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 }; }
@@ -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/react",
3
- "version": "19.5.1",
3
+ "version": "19.5.2",
4
4
  "description": "Stytch's official React Library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -39,7 +39,7 @@
39
39
  "@stytch/internal-test-utils": "0.0.0",
40
40
  "@stytch/internal-tsconfigs": "0.0.0",
41
41
  "@stytch/js-utils": "0.0.1",
42
- "@stytch/vanilla-js": "5.22.7",
42
+ "@stytch/vanilla-js": "5.23.4",
43
43
  "@testing-library/react": "14.0.0",
44
44
  "@types/jest": "29.5.14",
45
45
  "eslint-config-custom": "0.0.1",