@worldcoin/idkit 1.0.0-alpha.6 → 1.0.0
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/build/{chunk-NDPS4MUA.js → chunk-7LVU5WA2.js} +1 -4
- package/build/{config-6a355d3b.d.ts → config-71e4be16.d.ts} +1 -3
- package/build/index.d.ts +3 -20
- package/build/index.js +396 -397
- package/build/internal.d.ts +1 -2
- package/build/internal.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -4
|
@@ -36,7 +36,6 @@ var useIDKitStore = createWithEqualityFn()(
|
|
|
36
36
|
verification_level: DEFAULT_VERIFICATION_LEVEL,
|
|
37
37
|
open: false,
|
|
38
38
|
result: null,
|
|
39
|
-
theme: "light",
|
|
40
39
|
errorTitle: "",
|
|
41
40
|
errorDetail: "",
|
|
42
41
|
autoClose: true,
|
|
@@ -86,16 +85,14 @@ var useIDKitStore = createWithEqualityFn()(
|
|
|
86
85
|
action_description,
|
|
87
86
|
bridge_url,
|
|
88
87
|
autoClose,
|
|
89
|
-
theme,
|
|
90
88
|
advanced
|
|
91
89
|
}, source) => {
|
|
92
90
|
set({
|
|
93
|
-
theme,
|
|
94
91
|
signal,
|
|
95
92
|
action,
|
|
96
|
-
autoClose,
|
|
97
93
|
bridge_url,
|
|
98
94
|
action_description,
|
|
95
|
+
autoClose: autoClose ?? true,
|
|
99
96
|
app_id: advanced?.self_hosted ? SELF_HOSTED_APP_ID : app_id,
|
|
100
97
|
verification_level: verification_level ?? DEFAULT_VERIFICATION_LEVEL
|
|
101
98
|
});
|
|
@@ -17,8 +17,6 @@ declare enum ConfigSource {
|
|
|
17
17
|
type WidgetConfig = {
|
|
18
18
|
/** Whether to automatically close the widget after a successful verification. Defaults to `false`. */
|
|
19
19
|
autoClose?: boolean;
|
|
20
|
-
/** The theme to apply to the widget's UI. Defaults to `light`. */
|
|
21
|
-
theme?: 'dark' | 'light';
|
|
22
20
|
/** Function to trigger when verification is successful. Should receive a single parameter of type `ISuccessResult` which contains the proof details. */
|
|
23
21
|
onSuccess: CallbackFn<ISuccessResult>;
|
|
24
22
|
/** Called after the proof is returned from the World App, but before showing the success screen. Throwing in this screen will show the user a custom error. Used to perform additional validation when needed. */
|
|
@@ -41,4 +39,4 @@ type WidgetProps = Config & {
|
|
|
41
39
|
}) => JSX.Element;
|
|
42
40
|
};
|
|
43
41
|
|
|
44
|
-
export { Config as C, IDKITStage as I, WidgetProps as W,
|
|
42
|
+
export { Config as C, IDKITStage as I, WidgetProps as W, ConfigSource as a, CallbackFn as b };
|
package/build/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { C as Config, W as WidgetProps
|
|
2
|
-
import { MotionProps } from 'framer-motion';
|
|
1
|
+
import { C as Config, W as WidgetProps } from './config-71e4be16.js';
|
|
3
2
|
import * as react from 'react';
|
|
4
|
-
|
|
3
|
+
export { IErrorState, ISuccessResult, VerificationLevel } from '@worldcoin/idkit-core';
|
|
5
4
|
export { solidityEncode } from '@worldcoin/idkit-core/hashing';
|
|
6
|
-
import { IDKitConfig } from '@worldcoin/idkit-core';
|
|
7
|
-
export { CredentialType, IErrorState, ISuccessResult, VerificationLevel } from '@worldcoin/idkit-core';
|
|
8
5
|
|
|
9
6
|
type HookConfig = Partial<Pick<Config, 'handleVerify' | 'onSuccess'>>;
|
|
10
7
|
declare const useIDKit: ({ handleVerify, onSuccess }?: HookConfig) => {
|
|
@@ -12,20 +9,6 @@ declare const useIDKit: ({ handleVerify, onSuccess }?: HookConfig) => {
|
|
|
12
9
|
setOpen: (open: boolean) => void;
|
|
13
10
|
};
|
|
14
11
|
|
|
15
|
-
type Props$1 = ButtonHTMLAttributes<HTMLButtonElement> & MotionProps & {
|
|
16
|
-
theme?: 'dark' | 'light';
|
|
17
|
-
};
|
|
18
|
-
declare const SignInButton: FC<Props$1>;
|
|
19
|
-
|
|
20
12
|
declare const _default: react.NamedExoticComponent<WidgetProps>;
|
|
21
13
|
|
|
22
|
-
|
|
23
|
-
nonce?: string;
|
|
24
|
-
onSuccess: (jwt: string) => void;
|
|
25
|
-
children?: ({ open }: {
|
|
26
|
-
open: () => void;
|
|
27
|
-
}) => JSX.Element;
|
|
28
|
-
};
|
|
29
|
-
declare const SignInWithWorldID: FC<Props>;
|
|
30
|
-
|
|
31
|
-
export { Config, _default as IDKitWidget, SignInButton, SignInWithWorldID, WidgetProps, useIDKit };
|
|
14
|
+
export { Config, _default as IDKitWidget, WidgetProps, useIDKit };
|