@stytch/vanilla-js 3.0.3 → 3.1.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 CHANGED
@@ -145,6 +145,28 @@ declare class StytchUIClient extends StytchHeadlessClient {
145
145
  callbacks?: Callbacks;
146
146
  passwordResetToken: string;
147
147
  }): void;
148
+ /**
149
+ * Mounts a Passkey registration screen inside the element provided.
150
+ * If a passkey registration screen has already been rendered inside the element,
151
+ * it will be updated to use the new config, style, and callback options passed in.
152
+ * @example
153
+ * stytchClient.mountPasskeyRegistration({
154
+ * elementId: '#login-container',
155
+ * config: {...}
156
+ * });
157
+ *
158
+ * @param elementId - A string containing the id of the element that should contain the login screen.
159
+ * @param config - A {@link StytchLoginConfig} object containing the products that should be registered
160
+ * @param styles - A {@link StyleConfig} object containing custom styling info
161
+ * @param callbacks - Optional {@link Callbacks} triggered by various events in the Stytch SDK.
162
+ * @throws An error when the element specified by elementId cannot be found.
163
+ */
164
+ mountPasskeyRegistration({ elementId, config, styles, callbacks }: {
165
+ elementId: string;
166
+ config: StytchLoginConfig;
167
+ styles?: StyleConfig;
168
+ callbacks?: Callbacks;
169
+ }): void;
148
170
  }
149
171
  export { StytchUIClient };
150
172
  export * from '@stytch/core/public';
@@ -145,6 +145,28 @@ declare class StytchUIClient extends StytchHeadlessClient {
145
145
  callbacks?: Callbacks;
146
146
  passwordResetToken: string;
147
147
  }): void;
148
+ /**
149
+ * Mounts a Passkey registration screen inside the element provided.
150
+ * If a passkey registration screen has already been rendered inside the element,
151
+ * it will be updated to use the new config, style, and callback options passed in.
152
+ * @example
153
+ * stytchClient.mountPasskeyRegistration({
154
+ * elementId: '#login-container',
155
+ * config: {...}
156
+ * });
157
+ *
158
+ * @param elementId - A string containing the id of the element that should contain the login screen.
159
+ * @param config - A {@link StytchLoginConfig} object containing the products that should be registered
160
+ * @param styles - A {@link StyleConfig} object containing custom styling info
161
+ * @param callbacks - Optional {@link Callbacks} triggered by various events in the Stytch SDK.
162
+ * @throws An error when the element specified by elementId cannot be found.
163
+ */
164
+ mountPasskeyRegistration({ elementId, config, styles, callbacks }: {
165
+ elementId: string;
166
+ config: StytchLoginConfig;
167
+ styles?: StyleConfig;
168
+ callbacks?: Callbacks;
169
+ }): void;
148
170
  }
149
171
  export { StytchUIClient };
150
172
  export * from '@stytch/core/public';