@criipto/verify-react 4.1.4 → 5.0.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.
Files changed (51) hide show
  1. package/README.md +20 -13
  2. package/deploy-preview.sh +19 -0
  3. package/dist/index.css +223 -0
  4. package/dist/index.d.ts +267 -14
  5. package/dist/index.js +1948 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +26 -33
  8. package/tsconfig.json +8 -99
  9. package/tsdown.config.ts +23 -0
  10. package/dist/__tests__/provider.test.d.ts +0 -1
  11. package/dist/__tests__/utils.test.d.ts +0 -1
  12. package/dist/components/AuthButtonGroup.d.ts +0 -10
  13. package/dist/components/AuthMethodButton/Logo.d.ts +0 -10
  14. package/dist/components/AuthMethodButton.d.ts +0 -45
  15. package/dist/components/AuthMethodSelector.d.ts +0 -17
  16. package/dist/components/Button.d.ts +0 -12
  17. package/dist/components/QRCode.d.ts +0 -29
  18. package/dist/components/SEBankIDQRCode/SEBankIDQRCode.test.d.ts +0 -1
  19. package/dist/components/SEBankIDQRCode.d.ts +0 -53
  20. package/dist/components/SEBankIDSameDeviceButton/Foreground.d.ts +0 -12
  21. package/dist/components/SEBankIDSameDeviceButton/Poll.d.ts +0 -12
  22. package/dist/components/SEBankIDSameDeviceButton/Reload.d.ts +0 -15
  23. package/dist/components/SEBankIDSameDeviceButton/__tests__/Foreground.test.d.ts +0 -1
  24. package/dist/components/SEBankIDSameDeviceButton/__tests__/Reload.test.d.ts +0 -1
  25. package/dist/components/SEBankIDSameDeviceButton/__tests__/strategy.test.d.ts +0 -1
  26. package/dist/components/SEBankIDSameDeviceButton/__tests__/usePoll.test.d.ts +0 -1
  27. package/dist/components/SEBankIDSameDeviceButton/shared.d.ts +0 -19
  28. package/dist/components/SEBankIDSameDeviceButton/usePoll.d.ts +0 -7
  29. package/dist/components/SEBankIDSameDeviceButton.d.ts +0 -21
  30. package/dist/context.d.ts +0 -61
  31. package/dist/criipto-verify-react.cjs.js +0 -2
  32. package/dist/criipto-verify-react.cjs.js.map +0 -1
  33. package/dist/criipto-verify-react.css +0 -298
  34. package/dist/criipto-verify-react.esm.js +0 -2
  35. package/dist/criipto-verify-react.esm.js.map +0 -1
  36. package/dist/device.d.ts +0 -7
  37. package/dist/hooks/useNow.d.ts +0 -1
  38. package/dist/hooks/usePageVisibility.d.ts +0 -2
  39. package/dist/i18n/da.d.ts +0 -19
  40. package/dist/i18n/de.d.ts +0 -19
  41. package/dist/i18n/en.d.ts +0 -19
  42. package/dist/i18n/fi.d.ts +0 -19
  43. package/dist/i18n/index.d.ts +0 -4
  44. package/dist/i18n/nb.d.ts +0 -19
  45. package/dist/i18n/nl.d.ts +0 -19
  46. package/dist/i18n/sv.d.ts +0 -19
  47. package/dist/memory-storage.d.ts +0 -1
  48. package/dist/provider.d.ts +0 -66
  49. package/dist/stories/StoryResponseRenderer.d.ts +0 -6
  50. package/dist/use-criipto-verify.d.ts +0 -30
  51. package/dist/utils.d.ts +0 -25
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- children: React.ReactElement;
4
- }
5
- export default function StoryResponseRenderer(props: Props): React.ReactElement;
6
- export {};
@@ -1,30 +0,0 @@
1
- export default function useCriiptoVerify(): {
2
- result: import("./context").Result | null;
3
- /**
4
- * The claims of the decoded id_token (if available)
5
- */
6
- claims: import("./context").Claims | null;
7
- error: import("@criipto/auth-js").OAuth2Error | null;
8
- loginWithRedirect: (params?: import("@criipto/auth-js/dist/types").RedirectAuthorizeParams | undefined) => Promise<void>;
9
- loginWithPopup: (params?: import("@criipto/auth-js/dist/types").PopupAuthorizeParams | undefined) => Promise<void>;
10
- acrValues: string[] | undefined;
11
- /**
12
- * Will be true when performing token exchange after redirect or during an initial SSO check
13
- */
14
- isLoading: boolean;
15
- /**
16
- * Will be true until the first set of useEffect hooks have been called
17
- */
18
- isInitializing: boolean;
19
- /**
20
- * Check if there is an existing SSO session.
21
- */
22
- checkSession: () => Promise<void>;
23
- /**
24
- * Clear local session store and logout of any existing SSO session
25
- */
26
- logout: (params?: {
27
- redirectUri?: string | undefined;
28
- state?: string | undefined;
29
- } | undefined) => Promise<void>;
30
- };
package/dist/utils.d.ts DELETED
@@ -1,25 +0,0 @@
1
- import { Action } from './context';
2
- import { type Language } from './i18n';
3
- export declare const VERSION: string;
4
- export declare const DKMITID_PREFIX = "urn:grn:authn:dk:mitid";
5
- export declare const DKMITID_BUSINESS = "urn:grn:authn:dk:mitid:business";
6
- export declare const FTN_PREFIX = "urn:grn:authn:fi";
7
- export declare function lowestMitIDValue(input: string[]): string | null;
8
- export declare function assertUnreachable(x: never): never;
9
- export declare function stringifyAction(language: Language, action: Action): string;
10
- export declare function acrValueToProviderPrefix(value: string): string;
11
- export declare function acrValueToTitle(language: Language, value: string, { disambiguate }: {
12
- disambiguate: boolean;
13
- }): {
14
- title: string;
15
- subtitle?: string;
16
- };
17
- export declare function filterAcrValues(input: string[]): string[];
18
- export declare function isSingle(acrValue: string, acrValues: string[]): boolean;
19
- /**
20
- * A provider is considered ambiguous iff:
21
- * 1. It is in the list of ambiguous providers
22
- * 2. There is another ambiguous provider in the arc values list
23
- */
24
- export declare function isAmbiguous(acrValue: string, acrValues: string[]): boolean;
25
- export declare function trySessionStorage(): Storage | null;