@zoreal/oauth2-react 0.2.14 → 0.2.15
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/README.md +23 -1
- package/dist/index.cjs +198 -229
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -2
- package/dist/index.d.ts +32 -2
- package/dist/index.js +196 -228
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The public types of @zoreal/oauth2-react.
|
|
@@ -243,6 +243,36 @@ declare function useZorealOAuth(): ZorealOAuthContextProps;
|
|
|
243
243
|
|
|
244
244
|
declare function ZorealLogin(props: ZorealLoginProps): react.JSX.Element;
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
* The light of the pairing dialog's QR well, run around whatever this wraps
|
|
248
|
+
* while `busy` is true: the well's colours, line, halo and lap, on a dash
|
|
249
|
+
* that travels the outline at one speed whatever the shape.
|
|
250
|
+
*
|
|
251
|
+
* The SDK's own button uses it for the gap on a phone between the tap and the
|
|
252
|
+
* hand-over to the app. A site with its own sign-in button MAY wrap that
|
|
253
|
+
* button the same way: set your busy state on the tap, clear it when
|
|
254
|
+
* `onSuccess` or `onError` fires. `radius` is the wrapped control's corner
|
|
255
|
+
* radius in pixels, so the light follows its shape; `theme` picks the light
|
|
256
|
+
* and dark strengths the dialog uses, following the OS by default.
|
|
257
|
+
*
|
|
258
|
+
* It is a wrapper, and a wrapper is a change to your markup, so know what it
|
|
259
|
+
* does before you use it: it is inline by default and shrinks to the button,
|
|
260
|
+
* so a full-width button needs `block`; the light sits outside the button,
|
|
261
|
+
* so an ancestor with `overflow: hidden` clips it; and a selector that relies
|
|
262
|
+
* on the button's parent (`.card > button`) no longer matches. A site that
|
|
263
|
+
* would rather draw its own busy state needs nothing from here.
|
|
264
|
+
*/
|
|
265
|
+
declare function ZorealBusyRing({ busy, radius, theme, block, className, style, children, }: {
|
|
266
|
+
busy: boolean;
|
|
267
|
+
radius?: number;
|
|
268
|
+
theme?: ZorealTheme;
|
|
269
|
+
/** Lay the wrapper out as a block, for a button that fills its row. */
|
|
270
|
+
block?: boolean;
|
|
271
|
+
className?: string;
|
|
272
|
+
style?: CSSProperties;
|
|
273
|
+
children: ReactNode;
|
|
274
|
+
}): react.JSX.Element;
|
|
275
|
+
|
|
246
276
|
/**
|
|
247
277
|
* The pairing modal, rendered by the SDK rather than by every integrator.
|
|
248
278
|
*
|
|
@@ -312,4 +342,4 @@ declare function hasGrantedAnyScopeZoreal(response: Pick<ZorealCodeResponse, 'sc
|
|
|
312
342
|
*/
|
|
313
343
|
declare function resolveIntent(intent: LoginIntent | undefined, scope: string | undefined, acrValues: string | readonly string[] | undefined): LoginIntent;
|
|
314
344
|
|
|
315
|
-
export { type AcrValue, type AuthCodeFlowOptions, type BrowserDirectFlowOptions, DEFAULT_PAIRING_TIMEOUT_MS, type ErrorCode, type LoginIntent, type NonOAuthError, PairingModal, type PairingModalProps, type PairingState, type PairingUI, type SelectBy, type UseZorealAutoLoginOptions, type ZorealButtonConfiguration, type ZorealCodeResponse, type ZorealCredentialResponse, ZorealLogin, type ZorealLoginProps, type ZorealLoginRequestOptions, type ZorealOAuthContextProps, ZorealOAuthProvider, type ZorealOAuthProviderProps, type ZorealTheme, hasGrantedAllScopesZoreal, hasGrantedAnyScopeZoreal, resolveIntent, useZorealAutoLogin, useZorealLogin, useZorealOAuth, zorealLogout };
|
|
345
|
+
export { type AcrValue, type AuthCodeFlowOptions, type BrowserDirectFlowOptions, DEFAULT_PAIRING_TIMEOUT_MS, type ErrorCode, type LoginIntent, type NonOAuthError, PairingModal, type PairingModalProps, type PairingState, type PairingUI, type SelectBy, type UseZorealAutoLoginOptions, ZorealBusyRing, type ZorealButtonConfiguration, type ZorealCodeResponse, type ZorealCredentialResponse, ZorealLogin, type ZorealLoginProps, type ZorealLoginRequestOptions, type ZorealOAuthContextProps, ZorealOAuthProvider, type ZorealOAuthProviderProps, type ZorealTheme, hasGrantedAllScopesZoreal, hasGrantedAnyScopeZoreal, resolveIntent, useZorealAutoLogin, useZorealLogin, useZorealOAuth, zorealLogout };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The public types of @zoreal/oauth2-react.
|
|
@@ -243,6 +243,36 @@ declare function useZorealOAuth(): ZorealOAuthContextProps;
|
|
|
243
243
|
|
|
244
244
|
declare function ZorealLogin(props: ZorealLoginProps): react.JSX.Element;
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
* The light of the pairing dialog's QR well, run around whatever this wraps
|
|
248
|
+
* while `busy` is true: the well's colours, line, halo and lap, on a dash
|
|
249
|
+
* that travels the outline at one speed whatever the shape.
|
|
250
|
+
*
|
|
251
|
+
* The SDK's own button uses it for the gap on a phone between the tap and the
|
|
252
|
+
* hand-over to the app. A site with its own sign-in button MAY wrap that
|
|
253
|
+
* button the same way: set your busy state on the tap, clear it when
|
|
254
|
+
* `onSuccess` or `onError` fires. `radius` is the wrapped control's corner
|
|
255
|
+
* radius in pixels, so the light follows its shape; `theme` picks the light
|
|
256
|
+
* and dark strengths the dialog uses, following the OS by default.
|
|
257
|
+
*
|
|
258
|
+
* It is a wrapper, and a wrapper is a change to your markup, so know what it
|
|
259
|
+
* does before you use it: it is inline by default and shrinks to the button,
|
|
260
|
+
* so a full-width button needs `block`; the light sits outside the button,
|
|
261
|
+
* so an ancestor with `overflow: hidden` clips it; and a selector that relies
|
|
262
|
+
* on the button's parent (`.card > button`) no longer matches. A site that
|
|
263
|
+
* would rather draw its own busy state needs nothing from here.
|
|
264
|
+
*/
|
|
265
|
+
declare function ZorealBusyRing({ busy, radius, theme, block, className, style, children, }: {
|
|
266
|
+
busy: boolean;
|
|
267
|
+
radius?: number;
|
|
268
|
+
theme?: ZorealTheme;
|
|
269
|
+
/** Lay the wrapper out as a block, for a button that fills its row. */
|
|
270
|
+
block?: boolean;
|
|
271
|
+
className?: string;
|
|
272
|
+
style?: CSSProperties;
|
|
273
|
+
children: ReactNode;
|
|
274
|
+
}): react.JSX.Element;
|
|
275
|
+
|
|
246
276
|
/**
|
|
247
277
|
* The pairing modal, rendered by the SDK rather than by every integrator.
|
|
248
278
|
*
|
|
@@ -312,4 +342,4 @@ declare function hasGrantedAnyScopeZoreal(response: Pick<ZorealCodeResponse, 'sc
|
|
|
312
342
|
*/
|
|
313
343
|
declare function resolveIntent(intent: LoginIntent | undefined, scope: string | undefined, acrValues: string | readonly string[] | undefined): LoginIntent;
|
|
314
344
|
|
|
315
|
-
export { type AcrValue, type AuthCodeFlowOptions, type BrowserDirectFlowOptions, DEFAULT_PAIRING_TIMEOUT_MS, type ErrorCode, type LoginIntent, type NonOAuthError, PairingModal, type PairingModalProps, type PairingState, type PairingUI, type SelectBy, type UseZorealAutoLoginOptions, type ZorealButtonConfiguration, type ZorealCodeResponse, type ZorealCredentialResponse, ZorealLogin, type ZorealLoginProps, type ZorealLoginRequestOptions, type ZorealOAuthContextProps, ZorealOAuthProvider, type ZorealOAuthProviderProps, type ZorealTheme, hasGrantedAllScopesZoreal, hasGrantedAnyScopeZoreal, resolveIntent, useZorealAutoLogin, useZorealLogin, useZorealOAuth, zorealLogout };
|
|
345
|
+
export { type AcrValue, type AuthCodeFlowOptions, type BrowserDirectFlowOptions, DEFAULT_PAIRING_TIMEOUT_MS, type ErrorCode, type LoginIntent, type NonOAuthError, PairingModal, type PairingModalProps, type PairingState, type PairingUI, type SelectBy, type UseZorealAutoLoginOptions, ZorealBusyRing, type ZorealButtonConfiguration, type ZorealCodeResponse, type ZorealCredentialResponse, ZorealLogin, type ZorealLoginProps, type ZorealLoginRequestOptions, type ZorealOAuthContextProps, ZorealOAuthProvider, type ZorealOAuthProviderProps, type ZorealTheme, hasGrantedAllScopesZoreal, hasGrantedAnyScopeZoreal, resolveIntent, useZorealAutoLogin, useZorealLogin, useZorealOAuth, zorealLogout };
|