@stytch/vanilla-js 0.1.0 → 0.3.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/dist/index.d.ts +39 -0
- package/dist/index.esm.d.ts +39 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.headless.esm.js +3 -3
- package/dist/index.headless.js +3 -3
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -46,12 +46,51 @@ declare class StytchHeadlessClient {
|
|
|
46
46
|
*/
|
|
47
47
|
declare class StytchUIClient extends StytchHeadlessClient {
|
|
48
48
|
constructor(...args: ConstructorParameters<typeof StytchHeadlessClient>);
|
|
49
|
+
/**
|
|
50
|
+
* Mounts a login screen inside the element provided.
|
|
51
|
+
* If a login screen has already been rendered inside the element,
|
|
52
|
+
* it will be updated to use the new config, style, and callback options passed in.
|
|
53
|
+
* @example
|
|
54
|
+
* stytchClient.mountLogin({
|
|
55
|
+
* elementId: '#login-container',
|
|
56
|
+
* config: {...}
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* @param elementId - A string containing the id of the element that should contain the login screen.
|
|
60
|
+
* @param config - A {@link StytchLoginConfig} object containing the products that should be registered
|
|
61
|
+
* @param styles - A {@link StyleConfig} object containing custom styling info
|
|
62
|
+
* @param callbacks - Optional {@link Callbacks} triggered by various events in the Stytch SDK.
|
|
63
|
+
* @throws An error when the element specified by elementId cannot be found.
|
|
64
|
+
*/
|
|
49
65
|
mountLogin({ elementId, config, styles, callbacks }: {
|
|
50
66
|
elementId: string;
|
|
51
67
|
config: StytchLoginConfig;
|
|
52
68
|
styles?: StyleConfig;
|
|
53
69
|
callbacks?: Callbacks;
|
|
54
70
|
}): void;
|
|
71
|
+
/**
|
|
72
|
+
* Mounts a reset password screen inside the element provided.
|
|
73
|
+
* If a reset password screen has already been rendered inside the element,
|
|
74
|
+
* it will be updated to use the new config, style, and callback options passed in.
|
|
75
|
+
* @example
|
|
76
|
+
* stytchClient.mountResetPassword({
|
|
77
|
+
* elementId: '#login-container',
|
|
78
|
+
* config: {...}
|
|
79
|
+
* });
|
|
80
|
+
*
|
|
81
|
+
* @param elementId - A string containing the id of the element that should contain the login screen.
|
|
82
|
+
* @param config - A {@link StytchLoginConfig} object containing the products that should be registered
|
|
83
|
+
* @param styles - A {@link StyleConfig} object containing custom styling info
|
|
84
|
+
* @param callbacks - Optional {@link Callbacks} triggered by various events in the Stytch SDK.
|
|
85
|
+
* @throws An error when the element specified by elementId cannot be found.
|
|
86
|
+
*/
|
|
87
|
+
mountResetPassword({ elementId, config, styles, callbacks, passwordResetToken }: {
|
|
88
|
+
elementId: string;
|
|
89
|
+
config: StytchLoginConfig;
|
|
90
|
+
styles?: StyleConfig;
|
|
91
|
+
callbacks?: Callbacks;
|
|
92
|
+
passwordResetToken: string;
|
|
93
|
+
}): void;
|
|
55
94
|
}
|
|
56
95
|
export { StytchUIClient };
|
|
57
96
|
export * from '@stytch/core/public';
|
package/dist/index.esm.d.ts
CHANGED
|
@@ -46,12 +46,51 @@ declare class StytchHeadlessClient {
|
|
|
46
46
|
*/
|
|
47
47
|
declare class StytchUIClient extends StytchHeadlessClient {
|
|
48
48
|
constructor(...args: ConstructorParameters<typeof StytchHeadlessClient>);
|
|
49
|
+
/**
|
|
50
|
+
* Mounts a login screen inside the element provided.
|
|
51
|
+
* If a login screen has already been rendered inside the element,
|
|
52
|
+
* it will be updated to use the new config, style, and callback options passed in.
|
|
53
|
+
* @example
|
|
54
|
+
* stytchClient.mountLogin({
|
|
55
|
+
* elementId: '#login-container',
|
|
56
|
+
* config: {...}
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* @param elementId - A string containing the id of the element that should contain the login screen.
|
|
60
|
+
* @param config - A {@link StytchLoginConfig} object containing the products that should be registered
|
|
61
|
+
* @param styles - A {@link StyleConfig} object containing custom styling info
|
|
62
|
+
* @param callbacks - Optional {@link Callbacks} triggered by various events in the Stytch SDK.
|
|
63
|
+
* @throws An error when the element specified by elementId cannot be found.
|
|
64
|
+
*/
|
|
49
65
|
mountLogin({ elementId, config, styles, callbacks }: {
|
|
50
66
|
elementId: string;
|
|
51
67
|
config: StytchLoginConfig;
|
|
52
68
|
styles?: StyleConfig;
|
|
53
69
|
callbacks?: Callbacks;
|
|
54
70
|
}): void;
|
|
71
|
+
/**
|
|
72
|
+
* Mounts a reset password screen inside the element provided.
|
|
73
|
+
* If a reset password screen has already been rendered inside the element,
|
|
74
|
+
* it will be updated to use the new config, style, and callback options passed in.
|
|
75
|
+
* @example
|
|
76
|
+
* stytchClient.mountResetPassword({
|
|
77
|
+
* elementId: '#login-container',
|
|
78
|
+
* config: {...}
|
|
79
|
+
* });
|
|
80
|
+
*
|
|
81
|
+
* @param elementId - A string containing the id of the element that should contain the login screen.
|
|
82
|
+
* @param config - A {@link StytchLoginConfig} object containing the products that should be registered
|
|
83
|
+
* @param styles - A {@link StyleConfig} object containing custom styling info
|
|
84
|
+
* @param callbacks - Optional {@link Callbacks} triggered by various events in the Stytch SDK.
|
|
85
|
+
* @throws An error when the element specified by elementId cannot be found.
|
|
86
|
+
*/
|
|
87
|
+
mountResetPassword({ elementId, config, styles, callbacks, passwordResetToken }: {
|
|
88
|
+
elementId: string;
|
|
89
|
+
config: StytchLoginConfig;
|
|
90
|
+
styles?: StyleConfig;
|
|
91
|
+
callbacks?: Callbacks;
|
|
92
|
+
passwordResetToken: string;
|
|
93
|
+
}): void;
|
|
55
94
|
}
|
|
56
95
|
export { StytchUIClient };
|
|
57
96
|
export * from '@stytch/core/public';
|