@quiltt/react 3.7.2 → 3.7.3

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,14 @@
1
1
  # @quiltt/react
2
2
 
3
+ ## 3.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#293](https://github.com/quiltt/quiltt-js/pull/293) [`f4b48e6`](https://github.com/quiltt/quiltt-js/commit/f4b48e6db199cae4e880202c28974b481890b7c6) Thanks [@rubendinho](https://github.com/rubendinho)! - Improve documentation
8
+
9
+ - Updated dependencies [[`f4b48e6`](https://github.com/quiltt/quiltt-js/commit/f4b48e6db199cae4e880202c28974b481890b7c6)]:
10
+ - @quiltt/core@3.7.3
11
+
3
12
  ## 3.7.2
4
13
 
5
14
  ### Patch Changes
@@ -5,7 +5,7 @@ import { JsonWebTokenParse, QuilttClient, InMemoryCache as InMemoryCache$1 } fro
5
5
  import './useQuilttSettings-client-DU_Qfc8X.js';
6
6
  import './useSession-client-CG5lGS9F.js';
7
7
  import { jsx } from 'react/jsx-runtime';
8
- import { u as useQuilttSession } from './useQuilttSession-client-D4FPdDda.js';
8
+ import { u as useQuilttSession } from './useQuilttSession-client-TRaUyBXB.js';
9
9
 
10
10
  function _mergeNamespaces(n, m) {
11
11
  m.forEach(function (e) {
@@ -12986,4 +12986,4 @@ const GraphQLClient = new QuilttClient({
12986
12986
  });
12987
12987
  };
12988
12988
 
12989
- export { QuilttAuthProvider as Q, useImportSession as a, useIdentifySession as b, useAuthenticateSession as c, useRevokeSession as d, useApolloClient as u };
12989
+ export { GraphQLClient as G, QuilttAuthProvider as Q, useImportSession as a, useIdentifySession as b, useAuthenticateSession as c, useRevokeSession as d, useApolloClient as u };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { Maybe, QuilttJWT, UsernamePayload, UnprocessableData, AuthAPI, PasscodePayload, ConnectorSDKConnectorOptions, ConnectorSDKCallbacks } from '@quiltt/core';
1
+ import { Maybe, QuilttJWT, UsernamePayload, UnprocessableData, AuthAPI, PasscodePayload, ConnectorSDKConnectorOptions, QuilttClient, ConnectorSDKCallbacks } from '@quiltt/core';
2
2
  export * from '@quiltt/core';
3
3
  import * as react from 'react';
4
4
  import { RefObject, useLayoutEffect, Dispatch, SetStateAction, FC, PropsWithChildren, Component, ComponentType } from 'react';
5
5
  import { useApolloClient } from '@apollo/client/index.js';
6
+ import * as _apollo_client from '@apollo/client';
6
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
8
 
8
9
  declare function useEventListener<K extends keyof MediaQueryListEventMap>(eventName: K, handler: (event: MediaQueryListEventMap[K]) => void, element: RefObject<MediaQueryList>, options?: boolean | AddEventListenerOptions): void;
@@ -107,8 +108,10 @@ declare const useQuilttSettings: () => {
107
108
  declare const useStorage: <T>(key: string, initialState?: Maybe<T>) => [Maybe<T> | undefined, Dispatch<SetStateAction<Maybe<T> | undefined>>];
108
109
 
109
110
  type QuilttAuthProviderProps = PropsWithChildren & {
111
+ /** The Session token obtained from the server */
110
112
  token?: string;
111
113
  };
114
+ declare const GraphQLClient: QuilttClient<_apollo_client.NormalizedCacheObject>;
112
115
  /**
113
116
  * If a token is provided, will validate the token against the api and then import
114
117
  * it into trusted storage. While this process is happening, the component is put
@@ -119,12 +122,15 @@ type QuilttAuthProviderProps = PropsWithChildren & {
119
122
  declare const QuilttAuthProvider: FC<QuilttAuthProviderProps>;
120
123
 
121
124
  type QuilttProviderProps = PropsWithChildren & {
125
+ /** The client ID for the client-side Auth API */
122
126
  clientId?: string;
127
+ /** The Session token obtained from the server */
123
128
  token?: string;
124
129
  };
125
130
  declare const QuilttProvider: FC<QuilttProviderProps>;
126
131
 
127
132
  type QuilttSettingsProviderProps = PropsWithChildren & {
133
+ /** The Client ID to use for the client-side Auth API */
128
134
  clientId?: string;
129
135
  };
130
136
  declare const QuilttSettingsProvider: FC<QuilttSettingsProviderProps>;
@@ -151,4 +157,4 @@ type QuilttContainerProps<T extends AnyTag> = PropsWithChildren<{
151
157
  */
152
158
  declare const QuilttContainer: <T extends AnyTag = "div">({ as, connectorId, connectionId, onEvent, onLoad, onExit, onExitSuccess, onExitAbort, onExitError, children, ...props }: QuilttContainerProps<T> & PropsOf<T>) => react_jsx_runtime.JSX.Element;
153
159
 
154
- export { type AuthenticateSession, type IdentifySession, type ImportSession, QuilttAuthProvider, QuilttButton, QuilttContainer, QuilttProvider, QuilttSettings, QuilttSettingsProvider, type RevokeSession, type SetSession, type UseQuilttSession, useAuthenticateSession, useEventListener, useIdentifySession, useImportSession, useIsomorphicLayoutEffect, useQuilttClient, useQuilttConnector, useQuilttSession, useQuilttSettings, useRevokeSession, useSession, useStorage };
160
+ export { type AuthenticateSession, GraphQLClient, type IdentifySession, type ImportSession, QuilttAuthProvider, QuilttButton, QuilttContainer, QuilttProvider, QuilttSettings, QuilttSettingsProvider, type RevokeSession, type SetSession, type UseQuilttSession, useAuthenticateSession, useEventListener, useIdentifySession, useImportSession, useIsomorphicLayoutEffect, useQuilttClient, useQuilttConnector, useQuilttSession, useQuilttSettings, useRevokeSession, useSession, useStorage };
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  export * from '@quiltt/core';
2
2
  export { u as useEventListener } from './useEventListener-client-DVM5xwKY.js';
3
3
  export { u as useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect-client-DeTHOKz1.js';
4
- import { Q as QuilttAuthProvider } from './QuilttAuthProvider-client-snQrsk82.js';
5
- export { c as useAuthenticateSession, b as useIdentifySession, a as useImportSession, d as useRevokeSession } from './QuilttAuthProvider-client-snQrsk82.js';
6
- export { u as useQuilttClient } from './useQuilttClient-client-BVtLOPFl.js';
7
- import { u as useQuilttConnector } from './useQuilttConnector-client-Bxt_mb4L.js';
8
- export { u as useQuilttSession } from './useQuilttSession-client-D4FPdDda.js';
4
+ import { Q as QuilttAuthProvider } from './QuilttAuthProvider-client-D-lSeXpV.js';
5
+ export { G as GraphQLClient, c as useAuthenticateSession, b as useIdentifySession, a as useImportSession, d as useRevokeSession } from './QuilttAuthProvider-client-D-lSeXpV.js';
6
+ export { u as useQuilttClient } from './useQuilttClient-client-CGMZPnRI.js';
7
+ import { u as useQuilttConnector } from './useQuilttConnector-client-BPksnYdt.js';
8
+ export { u as useQuilttSession } from './useQuilttSession-client-TRaUyBXB.js';
9
9
  export { Q as QuilttSettings, u as useQuilttSettings } from './useQuilttSettings-client-DU_Qfc8X.js';
10
10
  export { u as useSession } from './useSession-client-CG5lGS9F.js';
11
11
  export { u as useStorage } from './useStorage-client-B3keU-oI.js';
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { u as useApolloClient } from './QuilttAuthProvider-client-snQrsk82.js';
2
+ import { u as useApolloClient } from './QuilttAuthProvider-client-D-lSeXpV.js';
3
3
 
4
4
  const useQuilttClient = useApolloClient;
5
5
 
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
  import { useState, useEffect, useCallback } from 'react';
3
3
  import { cdnBase } from '@quiltt/core';
4
- import { u as useQuilttSession } from './useQuilttSession-client-D4FPdDda.js';
4
+ import { u as useQuilttSession } from './useQuilttSession-client-TRaUyBXB.js';
5
5
  import { u as useScript } from './useScript-client-Cx5nb9RW.js';
6
6
 
7
7
  // Generated by genversion.
8
- const version = '3.7.2';
8
+ const version = '3.7.3';
9
9
 
10
10
  const useQuilttConnector = (connectorId, options)=>{
11
11
  const status = useScript(`${cdnBase}/v1/connector.js?agent=react-${version}`);
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { useCallback } from 'react';
3
3
  import { AuthAPI } from '@quiltt/core';
4
- import { a as useImportSession, b as useIdentifySession, c as useAuthenticateSession, d as useRevokeSession } from './QuilttAuthProvider-client-snQrsk82.js';
4
+ import { a as useImportSession, b as useIdentifySession, c as useAuthenticateSession, d as useRevokeSession } from './QuilttAuthProvider-client-D-lSeXpV.js';
5
5
  import { u as useQuilttSettings } from './useQuilttSettings-client-DU_Qfc8X.js';
6
6
  import { u as useSession } from './useSession-client-CG5lGS9F.js';
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quiltt/react",
3
- "version": "3.7.2",
3
+ "version": "3.7.3",
4
4
  "description": "React components and hooks for Quiltt Connector",
5
5
  "keywords": [
6
6
  "quiltt",
@@ -37,7 +37,7 @@
37
37
  "CHANGELOG.md"
38
38
  ],
39
39
  "dependencies": {
40
- "@quiltt/core": "3.7.2"
40
+ "@quiltt/core": "3.7.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@apollo/client": "3.9.11",
@@ -8,10 +8,11 @@ import { InMemoryCache, QuilttClient } from '@quiltt/core'
8
8
  import { useQuilttSession } from '../hooks'
9
9
 
10
10
  type QuilttAuthProviderProps = PropsWithChildren & {
11
+ /** The Session token obtained from the server */
11
12
  token?: string
12
13
  }
13
14
 
14
- const GraphQLClient = new QuilttClient({
15
+ export const GraphQLClient = new QuilttClient({
15
16
  cache: new InMemoryCache(),
16
17
  })
17
18
 
@@ -4,7 +4,9 @@ import { QuilttAuthProvider } from './QuilttAuthProvider'
4
4
  import { QuilttSettingsProvider } from './QuilttSettingsProvider'
5
5
 
6
6
  type QuilttProviderProps = PropsWithChildren & {
7
+ /** The client ID for the client-side Auth API */
7
8
  clientId?: string
9
+ /** The Session token obtained from the server */
8
10
  token?: string
9
11
  }
10
12
 
@@ -6,6 +6,7 @@ import { useState } from 'react'
6
6
  import { QuilttSettings } from '../hooks'
7
7
 
8
8
  type QuilttSettingsProviderProps = PropsWithChildren & {
9
+ /** The Client ID to use for the client-side Auth API */
9
10
  clientId?: string
10
11
  }
11
12
 
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '3.7.2'
2
+ export const version = '3.7.3'