@clerk/shared 4.37.0-snapshot.v20260929195855 → 4.37.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.
@@ -140,7 +140,7 @@ const clerkJSScriptUrl = (opts) => {
140
140
  const clerkUIScriptUrl = (opts) => {
141
141
  const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;
142
142
  if (__internal_clerkUIUrl) return __internal_clerkUIUrl;
143
- const version = require_versionSelector.versionSelector(__internal_clerkUIVersion, "1.37.0-snapshot.v20260929195855");
143
+ const version = require_versionSelector.versionSelector(__internal_clerkUIVersion, "1.37.0");
144
144
  if (proxyUrl && require_proxy.isProxyUrlRelative(proxyUrl)) return buildRelativeProxyScriptUrl(proxyUrl, "ui", version, "ui.browser.js");
145
145
  return `https://${buildScriptHost({
146
146
  publishableKey,
@@ -1 +1 @@
1
- {"version":3,"file":"loadClerkJsScript.js","names":["createDevOrStagingUrlCache","buildErrorThrower","ClerkRuntimeError","versionSelector","isProxyUrlRelative","isValidProxyUrl","proxyUrlToAbsoluteURL","parsePublishableKey","addClerkPrefix"],"sources":["../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { SDKMetadata } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\nexport type LoadClerkJSScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkJSUrl?: string;\n /** @internal */\n __internal_clerkJSVersion?: string;\n sdkMetadata?: SDKMetadata;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n /**\n * Timeout in milliseconds to wait for clerk-js to load before considering it failed.\n *\n * @default 15000 (15 seconds)\n */\n scriptLoadTimeout?: number;\n};\n\n/**\n * @deprecated Use `LoadClerkJSScriptOptions` instead. This alias will be removed in a future major version.\n */\nexport type LoadClerkJsScriptOptions = LoadClerkJSScriptOptions;\n\nexport type LoadClerkUIScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkUIUrl?: string;\n /** @internal */\n __internal_clerkUIVersion?: string;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n scriptLoadTimeout?: number;\n};\n\n/**\n * Validates that window.Clerk exists and is properly initialized.\n * This ensures we don't have false positives where the script loads but Clerk is malformed.\n *\n * @returns `true` if window.Clerk exists and has the expected structure with a load method.\n */\nfunction isClerkGlobalProperlyLoaded(prop: 'Clerk' | '__internal_ClerkUICtor'): boolean {\n if (typeof window === 'undefined' || !(window as any)[prop]) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const val = (window as any)[prop];\n return !!val;\n}\nconst isClerkProperlyLoaded = () => isClerkGlobalProperlyLoaded('Clerk');\nconst isClerkUIProperlyLoaded = () => isClerkGlobalProperlyLoaded('__internal_ClerkUICtor');\n\n/**\n * Checks if an existing script has a request error using Performance API.\n *\n * @param scriptUrl - The URL of the script to check.\n * @returns True if the script has failed to load due to a network/HTTP error.\n */\nfunction hasScriptRequestError(scriptUrl: string): boolean {\n if (typeof window === 'undefined' || !window.performance) {\n return false;\n }\n\n const entries = performance.getEntriesByName(scriptUrl, 'resource') as PerformanceResourceTiming[];\n\n if (entries.length === 0) {\n return false;\n }\n\n const scriptEntry = entries[entries.length - 1];\n\n // transferSize === 0 with responseEnd === 0 indicates network failure\n // transferSize === 0 with responseEnd > 0 might be a 4xx/5xx error or blocked request\n if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {\n // If there was no response at all, it's definitely an error\n if (scriptEntry.responseEnd === 0) {\n return true;\n }\n // If we got a response but no content, likely an HTTP error (4xx/5xx)\n if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) {\n return true;\n }\n\n if ('responseStatus' in scriptEntry) {\n const status = (scriptEntry as any).responseStatus;\n if (status >= 400) {\n return true;\n }\n if (scriptEntry.responseStatus === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Hotloads the Clerk JS script with robust failure detection.\n *\n * Uses a timeout-based approach to ensure absolute certainty about load success/failure.\n * If the script fails to load within the timeout period, or loads but doesn't create\n * a proper Clerk instance, the promise rejects with an error.\n *\n * @param opts - The options used to build the Clerk JS script URL and load the script.\n * Must include a `publishableKey` if no existing script is found.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error.\n *\n * @example\n * ```typescript\n * try {\n * await loadClerkJsScript({ publishableKey: 'pk_test_...' });\n * console.log('Clerk loaded successfully');\n * } catch (error) {\n * console.error('Failed to load Clerk:', error.message);\n * }\n * ```\n */\nexport const loadClerkJSScript = async (opts?: LoadClerkJSScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk JS' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_js',\n cause: error,\n });\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkJSScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkJSScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const loadClerkUIScript = async (opts?: LoadClerkUIScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk UI' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_ui',\n cause: error,\n });\n\n if (isClerkUIProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkUIScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-ui-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkUIScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const clerkJSScriptUrl = (opts: LoadClerkJSScriptOptions) => {\n const { __internal_clerkJSUrl, __internal_clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkJSUrl) {\n return __internal_clerkJSUrl;\n }\n\n const version = versionSelector(__internal_clerkJSVersion);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'clerk-js', version, 'clerk.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.browser.js`;\n};\n\nexport const clerkUIScriptUrl = (opts: LoadClerkUIScriptOptions) => {\n const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkUIUrl) {\n return __internal_clerkUIUrl;\n }\n\n const version = versionSelector(__internal_clerkUIVersion, UI_PACKAGE_VERSION);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'ui', version, 'ui.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/ui@${version}/dist/ui.browser.js`;\n};\n\nexport const buildClerkJSScriptAttributes = (options: LoadClerkJSScriptOptions) => {\n const obj: Record<string, string> = {};\n\n if (options.publishableKey) {\n obj['data-clerk-publishable-key'] = options.publishableKey;\n }\n\n if (options.proxyUrl) {\n obj['data-clerk-proxy-url'] = options.proxyUrl;\n }\n\n if (options.domain) {\n obj['data-clerk-domain'] = options.domain;\n }\n\n if (options.nonce) {\n obj.nonce = options.nonce;\n }\n\n return obj;\n};\n\nexport const buildClerkUIScriptAttributes = (options: LoadClerkUIScriptOptions) => {\n // TODO @nikos do we need this?\n return buildClerkJSScriptAttributes(options);\n};\n\nconst applyAttributesToScript = (attributes: Record<string, string>) => (script: HTMLScriptElement) => {\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nconst stripTrailingSlashes = (value: string) => {\n while (value.endsWith('/')) {\n value = value.slice(0, -1);\n }\n\n return value;\n};\n\nconst buildRelativeProxyScriptUrl = (proxyUrl: string, packageName: string, version: string, fileName: string) => {\n return `${stripTrailingSlashes(proxyUrl)}/npm/@clerk/${packageName}@${version}/dist/${fileName}`;\n};\n\nexport const buildScriptHost = (opts: { publishableKey: string; proxyUrl?: string; domain?: string }) => {\n const { proxyUrl, domain, publishableKey } = opts;\n\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n const resolvedProxyUrl = proxyUrlToAbsoluteURL(proxyUrl);\n\n if (isProxyUrlRelative(resolvedProxyUrl)) {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n return resolvedProxyUrl.replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n return addClerkPrefix(domain);\n } else {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n};\n\nfunction waitForPredicateWithTimeout(\n timeoutMs: number,\n predicate: () => boolean,\n rejectWith: Error,\n existingScript?: HTMLScriptElement,\n): Promise<HTMLScriptElement | null> {\n return new Promise((resolve, reject) => {\n let resolved = false;\n\n const cleanup = (timeoutId: ReturnType<typeof setTimeout>, pollInterval: ReturnType<typeof setInterval>) => {\n clearTimeout(timeoutId);\n clearInterval(pollInterval);\n };\n\n // Bail out early if the script fails to load, instead of waiting for the entire timeout\n existingScript?.addEventListener('error', () => {\n cleanup(timeoutId, pollInterval);\n reject(rejectWith);\n });\n\n const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (predicate()) {\n resolved = true;\n cleanup(timeoutId, pollInterval);\n resolve(null);\n }\n };\n\n const handleTimeout = () => {\n if (resolved) {\n return;\n }\n\n resolved = true;\n cleanup(timeoutId, pollInterval);\n\n if (!predicate()) {\n reject(rejectWith);\n } else {\n resolve(null);\n }\n };\n\n const timeoutId = setTimeout(handleTimeout, timeoutMs);\n\n checkAndResolve();\n\n const pollInterval = setInterval(() => {\n if (resolved) {\n clearInterval(pollInterval);\n return;\n }\n checkAndResolve();\n }, 100);\n });\n}\n\nexport function setClerkJSLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\n/**\n * @deprecated Use `loadClerkJSScript` instead. This alias will be removed in a future major version.\n */\nexport const loadClerkJsScript = loadClerkJSScript;\n\n/**\n * @deprecated Use `clerkJSScriptUrl` instead. This alias will be removed in a future major version.\n */\nexport const clerkJsScriptUrl = clerkJSScriptUrl;\n\n/**\n * @deprecated Use `buildClerkJSScriptAttributes` instead. This alias will be removed in a future major version.\n */\nexport const buildClerkJsScriptAttributes = buildClerkJSScriptAttributes;\n\n/**\n * @deprecated Use `setClerkJSLoadingErrorPackageName` instead. This alias will be removed in a future major version.\n */\nexport const setClerkJsLoadingErrorPackageName = setClerkJSLoadingErrorPackageName;\n"],"mappings":";;;;;;;;;;AAQA,MAAM,EAAE,sBAAsBA,wCAA2B;AAEzD,MAAM,eAAeC,gCAAkB,EAAE,aAAa,gBAAgB,CAAC;;;;;;;AA2CvE,SAAS,4BAA4B,MAAmD;CACtF,IAAI,OAAO,WAAW,eAAe,CAAE,OAAe,OACpD,OAAO;CAKT,OAAO,CAAC,CADK,OAAe;AAE9B;AACA,MAAM,8BAA8B,4BAA4B,OAAO;AACvE,MAAM,gCAAgC,4BAA4B,wBAAwB;;;;;;;AAQ1F,SAAS,sBAAsB,WAA4B;CACzD,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,aAC3C,OAAO;CAGT,MAAM,UAAU,YAAY,iBAAiB,WAAW,UAAU;CAElE,IAAI,QAAQ,WAAW,GACrB,OAAO;CAGT,MAAM,cAAc,QAAQ,QAAQ,SAAS;CAI7C,IAAI,YAAY,iBAAiB,KAAK,YAAY,oBAAoB,GAAG;EAEvE,IAAI,YAAY,gBAAgB,GAC9B,OAAO;EAGT,IAAI,YAAY,cAAc,KAAK,YAAY,gBAAgB,GAC7D,OAAO;EAGT,IAAI,oBAAoB,aAAa;GAEnC,IADgB,YAAoB,kBACtB,KACZ,OAAO;GAET,IAAI,YAAY,mBAAmB,GACjC,OAAO;EAEX;CACF;CAEA,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,oBAAoB,OAAO,SAAuE;CAC7G,MAAM,UAAU,MAAM,qBAAqB;CAC3C,MAAM,cAAc,UAClB,IAAIC,4CAAkB,6BAA6B,OAAO,UAAU,KAAK,MAAM,YAAY,KAAK;EAC9F,MAAM;EACN,OAAO;CACT,CAAC;CAEH,IAAI,sBAAsB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C,IAAI,UAAU;IACZ,cAAc,YAAY;IAC1B;GACF;GACA,gBAAgB;EAClB,GAAG,GAAG;CACR,CAAC;AACH;AAEA,SAAgB,kCAAkC,aAAqB;CACrE,aAAa,eAAe,EAAE,YAAY,CAAC;AAC7C;;;;AAKA,MAAa,oBAAoB;;;;AAKjC,MAAa,mBAAmB;;;;AAKhC,MAAa,+BAA+B;;;;AAK5C,MAAa,oCAAoC"}
1
+ {"version":3,"file":"loadClerkJsScript.js","names":["createDevOrStagingUrlCache","buildErrorThrower","ClerkRuntimeError","versionSelector","isProxyUrlRelative","isValidProxyUrl","proxyUrlToAbsoluteURL","parsePublishableKey","addClerkPrefix"],"sources":["../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { SDKMetadata } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\nexport type LoadClerkJSScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkJSUrl?: string;\n /** @internal */\n __internal_clerkJSVersion?: string;\n sdkMetadata?: SDKMetadata;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n /**\n * Timeout in milliseconds to wait for clerk-js to load before considering it failed.\n *\n * @default 15000 (15 seconds)\n */\n scriptLoadTimeout?: number;\n};\n\n/**\n * @deprecated Use `LoadClerkJSScriptOptions` instead. This alias will be removed in a future major version.\n */\nexport type LoadClerkJsScriptOptions = LoadClerkJSScriptOptions;\n\nexport type LoadClerkUIScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkUIUrl?: string;\n /** @internal */\n __internal_clerkUIVersion?: string;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n scriptLoadTimeout?: number;\n};\n\n/**\n * Validates that window.Clerk exists and is properly initialized.\n * This ensures we don't have false positives where the script loads but Clerk is malformed.\n *\n * @returns `true` if window.Clerk exists and has the expected structure with a load method.\n */\nfunction isClerkGlobalProperlyLoaded(prop: 'Clerk' | '__internal_ClerkUICtor'): boolean {\n if (typeof window === 'undefined' || !(window as any)[prop]) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const val = (window as any)[prop];\n return !!val;\n}\nconst isClerkProperlyLoaded = () => isClerkGlobalProperlyLoaded('Clerk');\nconst isClerkUIProperlyLoaded = () => isClerkGlobalProperlyLoaded('__internal_ClerkUICtor');\n\n/**\n * Checks if an existing script has a request error using Performance API.\n *\n * @param scriptUrl - The URL of the script to check.\n * @returns True if the script has failed to load due to a network/HTTP error.\n */\nfunction hasScriptRequestError(scriptUrl: string): boolean {\n if (typeof window === 'undefined' || !window.performance) {\n return false;\n }\n\n const entries = performance.getEntriesByName(scriptUrl, 'resource') as PerformanceResourceTiming[];\n\n if (entries.length === 0) {\n return false;\n }\n\n const scriptEntry = entries[entries.length - 1];\n\n // transferSize === 0 with responseEnd === 0 indicates network failure\n // transferSize === 0 with responseEnd > 0 might be a 4xx/5xx error or blocked request\n if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {\n // If there was no response at all, it's definitely an error\n if (scriptEntry.responseEnd === 0) {\n return true;\n }\n // If we got a response but no content, likely an HTTP error (4xx/5xx)\n if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) {\n return true;\n }\n\n if ('responseStatus' in scriptEntry) {\n const status = (scriptEntry as any).responseStatus;\n if (status >= 400) {\n return true;\n }\n if (scriptEntry.responseStatus === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Hotloads the Clerk JS script with robust failure detection.\n *\n * Uses a timeout-based approach to ensure absolute certainty about load success/failure.\n * If the script fails to load within the timeout period, or loads but doesn't create\n * a proper Clerk instance, the promise rejects with an error.\n *\n * @param opts - The options used to build the Clerk JS script URL and load the script.\n * Must include a `publishableKey` if no existing script is found.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error.\n *\n * @example\n * ```typescript\n * try {\n * await loadClerkJsScript({ publishableKey: 'pk_test_...' });\n * console.log('Clerk loaded successfully');\n * } catch (error) {\n * console.error('Failed to load Clerk:', error.message);\n * }\n * ```\n */\nexport const loadClerkJSScript = async (opts?: LoadClerkJSScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk JS' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_js',\n cause: error,\n });\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkJSScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkJSScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const loadClerkUIScript = async (opts?: LoadClerkUIScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk UI' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_ui',\n cause: error,\n });\n\n if (isClerkUIProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkUIScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-ui-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkUIScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const clerkJSScriptUrl = (opts: LoadClerkJSScriptOptions) => {\n const { __internal_clerkJSUrl, __internal_clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkJSUrl) {\n return __internal_clerkJSUrl;\n }\n\n const version = versionSelector(__internal_clerkJSVersion);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'clerk-js', version, 'clerk.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.browser.js`;\n};\n\nexport const clerkUIScriptUrl = (opts: LoadClerkUIScriptOptions) => {\n const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkUIUrl) {\n return __internal_clerkUIUrl;\n }\n\n const version = versionSelector(__internal_clerkUIVersion, UI_PACKAGE_VERSION);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'ui', version, 'ui.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/ui@${version}/dist/ui.browser.js`;\n};\n\nexport const buildClerkJSScriptAttributes = (options: LoadClerkJSScriptOptions) => {\n const obj: Record<string, string> = {};\n\n if (options.publishableKey) {\n obj['data-clerk-publishable-key'] = options.publishableKey;\n }\n\n if (options.proxyUrl) {\n obj['data-clerk-proxy-url'] = options.proxyUrl;\n }\n\n if (options.domain) {\n obj['data-clerk-domain'] = options.domain;\n }\n\n if (options.nonce) {\n obj.nonce = options.nonce;\n }\n\n return obj;\n};\n\nexport const buildClerkUIScriptAttributes = (options: LoadClerkUIScriptOptions) => {\n // TODO @nikos do we need this?\n return buildClerkJSScriptAttributes(options);\n};\n\nconst applyAttributesToScript = (attributes: Record<string, string>) => (script: HTMLScriptElement) => {\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nconst stripTrailingSlashes = (value: string) => {\n while (value.endsWith('/')) {\n value = value.slice(0, -1);\n }\n\n return value;\n};\n\nconst buildRelativeProxyScriptUrl = (proxyUrl: string, packageName: string, version: string, fileName: string) => {\n return `${stripTrailingSlashes(proxyUrl)}/npm/@clerk/${packageName}@${version}/dist/${fileName}`;\n};\n\nexport const buildScriptHost = (opts: { publishableKey: string; proxyUrl?: string; domain?: string }) => {\n const { proxyUrl, domain, publishableKey } = opts;\n\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n const resolvedProxyUrl = proxyUrlToAbsoluteURL(proxyUrl);\n\n if (isProxyUrlRelative(resolvedProxyUrl)) {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n return resolvedProxyUrl.replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n return addClerkPrefix(domain);\n } else {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n};\n\nfunction waitForPredicateWithTimeout(\n timeoutMs: number,\n predicate: () => boolean,\n rejectWith: Error,\n existingScript?: HTMLScriptElement,\n): Promise<HTMLScriptElement | null> {\n return new Promise((resolve, reject) => {\n let resolved = false;\n\n const cleanup = (timeoutId: ReturnType<typeof setTimeout>, pollInterval: ReturnType<typeof setInterval>) => {\n clearTimeout(timeoutId);\n clearInterval(pollInterval);\n };\n\n // Bail out early if the script fails to load, instead of waiting for the entire timeout\n existingScript?.addEventListener('error', () => {\n cleanup(timeoutId, pollInterval);\n reject(rejectWith);\n });\n\n const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (predicate()) {\n resolved = true;\n cleanup(timeoutId, pollInterval);\n resolve(null);\n }\n };\n\n const handleTimeout = () => {\n if (resolved) {\n return;\n }\n\n resolved = true;\n cleanup(timeoutId, pollInterval);\n\n if (!predicate()) {\n reject(rejectWith);\n } else {\n resolve(null);\n }\n };\n\n const timeoutId = setTimeout(handleTimeout, timeoutMs);\n\n checkAndResolve();\n\n const pollInterval = setInterval(() => {\n if (resolved) {\n clearInterval(pollInterval);\n return;\n }\n checkAndResolve();\n }, 100);\n });\n}\n\nexport function setClerkJSLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\n/**\n * @deprecated Use `loadClerkJSScript` instead. This alias will be removed in a future major version.\n */\nexport const loadClerkJsScript = loadClerkJSScript;\n\n/**\n * @deprecated Use `clerkJSScriptUrl` instead. This alias will be removed in a future major version.\n */\nexport const clerkJsScriptUrl = clerkJSScriptUrl;\n\n/**\n * @deprecated Use `buildClerkJSScriptAttributes` instead. This alias will be removed in a future major version.\n */\nexport const buildClerkJsScriptAttributes = buildClerkJSScriptAttributes;\n\n/**\n * @deprecated Use `setClerkJSLoadingErrorPackageName` instead. This alias will be removed in a future major version.\n */\nexport const setClerkJsLoadingErrorPackageName = setClerkJSLoadingErrorPackageName;\n"],"mappings":";;;;;;;;;;AAQA,MAAM,EAAE,sBAAsBA,wCAA2B;AAEzD,MAAM,eAAeC,gCAAkB,EAAE,aAAa,gBAAgB,C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l = (opts) => {
139
139
  const clerkUIScriptUrl = (opts) => {
140
140
  const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;
141
141
  if (__internal_clerkUIUrl) return __internal_clerkUIUrl;
142
- const version = versionSelector(__internal_clerkUIVersion, "1.37.0-snapshot.v20260929195855");
142
+ const version = versionSelector(__internal_clerkUIVersion, "1.37.0");
143
143
  if (proxyUrl && isProxyUrlRelative(proxyUrl)) return buildRelativeProxyScriptUrl(proxyUrl, "ui", version, "ui.browser.js");
144
144
  return `https://${buildScriptHost({
145
145
  publishableKey,
@@ -1 +1 @@
1
- {"version":3,"file":"loadClerkJsScript.mjs","names":[],"sources":["../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { SDKMetadata } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\nexport type LoadClerkJSScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkJSUrl?: string;\n /** @internal */\n __internal_clerkJSVersion?: string;\n sdkMetadata?: SDKMetadata;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n /**\n * Timeout in milliseconds to wait for clerk-js to load before considering it failed.\n *\n * @default 15000 (15 seconds)\n */\n scriptLoadTimeout?: number;\n};\n\n/**\n * @deprecated Use `LoadClerkJSScriptOptions` instead. This alias will be removed in a future major version.\n */\nexport type LoadClerkJsScriptOptions = LoadClerkJSScriptOptions;\n\nexport type LoadClerkUIScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkUIUrl?: string;\n /** @internal */\n __internal_clerkUIVersion?: string;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n scriptLoadTimeout?: number;\n};\n\n/**\n * Validates that window.Clerk exists and is properly initialized.\n * This ensures we don't have false positives where the script loads but Clerk is malformed.\n *\n * @returns `true` if window.Clerk exists and has the expected structure with a load method.\n */\nfunction isClerkGlobalProperlyLoaded(prop: 'Clerk' | '__internal_ClerkUICtor'): boolean {\n if (typeof window === 'undefined' || !(window as any)[prop]) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const val = (window as any)[prop];\n return !!val;\n}\nconst isClerkProperlyLoaded = () => isClerkGlobalProperlyLoaded('Clerk');\nconst isClerkUIProperlyLoaded = () => isClerkGlobalProperlyLoaded('__internal_ClerkUICtor');\n\n/**\n * Checks if an existing script has a request error using Performance API.\n *\n * @param scriptUrl - The URL of the script to check.\n * @returns True if the script has failed to load due to a network/HTTP error.\n */\nfunction hasScriptRequestError(scriptUrl: string): boolean {\n if (typeof window === 'undefined' || !window.performance) {\n return false;\n }\n\n const entries = performance.getEntriesByName(scriptUrl, 'resource') as PerformanceResourceTiming[];\n\n if (entries.length === 0) {\n return false;\n }\n\n const scriptEntry = entries[entries.length - 1];\n\n // transferSize === 0 with responseEnd === 0 indicates network failure\n // transferSize === 0 with responseEnd > 0 might be a 4xx/5xx error or blocked request\n if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {\n // If there was no response at all, it's definitely an error\n if (scriptEntry.responseEnd === 0) {\n return true;\n }\n // If we got a response but no content, likely an HTTP error (4xx/5xx)\n if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) {\n return true;\n }\n\n if ('responseStatus' in scriptEntry) {\n const status = (scriptEntry as any).responseStatus;\n if (status >= 400) {\n return true;\n }\n if (scriptEntry.responseStatus === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Hotloads the Clerk JS script with robust failure detection.\n *\n * Uses a timeout-based approach to ensure absolute certainty about load success/failure.\n * If the script fails to load within the timeout period, or loads but doesn't create\n * a proper Clerk instance, the promise rejects with an error.\n *\n * @param opts - The options used to build the Clerk JS script URL and load the script.\n * Must include a `publishableKey` if no existing script is found.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error.\n *\n * @example\n * ```typescript\n * try {\n * await loadClerkJsScript({ publishableKey: 'pk_test_...' });\n * console.log('Clerk loaded successfully');\n * } catch (error) {\n * console.error('Failed to load Clerk:', error.message);\n * }\n * ```\n */\nexport const loadClerkJSScript = async (opts?: LoadClerkJSScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk JS' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_js',\n cause: error,\n });\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkJSScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkJSScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const loadClerkUIScript = async (opts?: LoadClerkUIScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk UI' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_ui',\n cause: error,\n });\n\n if (isClerkUIProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkUIScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-ui-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkUIScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const clerkJSScriptUrl = (opts: LoadClerkJSScriptOptions) => {\n const { __internal_clerkJSUrl, __internal_clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkJSUrl) {\n return __internal_clerkJSUrl;\n }\n\n const version = versionSelector(__internal_clerkJSVersion);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'clerk-js', version, 'clerk.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.browser.js`;\n};\n\nexport const clerkUIScriptUrl = (opts: LoadClerkUIScriptOptions) => {\n const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkUIUrl) {\n return __internal_clerkUIUrl;\n }\n\n const version = versionSelector(__internal_clerkUIVersion, UI_PACKAGE_VERSION);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'ui', version, 'ui.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/ui@${version}/dist/ui.browser.js`;\n};\n\nexport const buildClerkJSScriptAttributes = (options: LoadClerkJSScriptOptions) => {\n const obj: Record<string, string> = {};\n\n if (options.publishableKey) {\n obj['data-clerk-publishable-key'] = options.publishableKey;\n }\n\n if (options.proxyUrl) {\n obj['data-clerk-proxy-url'] = options.proxyUrl;\n }\n\n if (options.domain) {\n obj['data-clerk-domain'] = options.domain;\n }\n\n if (options.nonce) {\n obj.nonce = options.nonce;\n }\n\n return obj;\n};\n\nexport const buildClerkUIScriptAttributes = (options: LoadClerkUIScriptOptions) => {\n // TODO @nikos do we need this?\n return buildClerkJSScriptAttributes(options);\n};\n\nconst applyAttributesToScript = (attributes: Record<string, string>) => (script: HTMLScriptElement) => {\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nconst stripTrailingSlashes = (value: string) => {\n while (value.endsWith('/')) {\n value = value.slice(0, -1);\n }\n\n return value;\n};\n\nconst buildRelativeProxyScriptUrl = (proxyUrl: string, packageName: string, version: string, fileName: string) => {\n return `${stripTrailingSlashes(proxyUrl)}/npm/@clerk/${packageName}@${version}/dist/${fileName}`;\n};\n\nexport const buildScriptHost = (opts: { publishableKey: string; proxyUrl?: string; domain?: string }) => {\n const { proxyUrl, domain, publishableKey } = opts;\n\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n const resolvedProxyUrl = proxyUrlToAbsoluteURL(proxyUrl);\n\n if (isProxyUrlRelative(resolvedProxyUrl)) {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n return resolvedProxyUrl.replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n return addClerkPrefix(domain);\n } else {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n};\n\nfunction waitForPredicateWithTimeout(\n timeoutMs: number,\n predicate: () => boolean,\n rejectWith: Error,\n existingScript?: HTMLScriptElement,\n): Promise<HTMLScriptElement | null> {\n return new Promise((resolve, reject) => {\n let resolved = false;\n\n const cleanup = (timeoutId: ReturnType<typeof setTimeout>, pollInterval: ReturnType<typeof setInterval>) => {\n clearTimeout(timeoutId);\n clearInterval(pollInterval);\n };\n\n // Bail out early if the script fails to load, instead of waiting for the entire timeout\n existingScript?.addEventListener('error', () => {\n cleanup(timeoutId, pollInterval);\n reject(rejectWith);\n });\n\n const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (predicate()) {\n resolved = true;\n cleanup(timeoutId, pollInterval);\n resolve(null);\n }\n };\n\n const handleTimeout = () => {\n if (resolved) {\n return;\n }\n\n resolved = true;\n cleanup(timeoutId, pollInterval);\n\n if (!predicate()) {\n reject(rejectWith);\n } else {\n resolve(null);\n }\n };\n\n const timeoutId = setTimeout(handleTimeout, timeoutMs);\n\n checkAndResolve();\n\n const pollInterval = setInterval(() => {\n if (resolved) {\n clearInterval(pollInterval);\n return;\n }\n checkAndResolve();\n }, 100);\n });\n}\n\nexport function setClerkJSLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\n/**\n * @deprecated Use `loadClerkJSScript` instead. This alias will be removed in a future major version.\n */\nexport const loadClerkJsScript = loadClerkJSScript;\n\n/**\n * @deprecated Use `clerkJSScriptUrl` instead. This alias will be removed in a future major version.\n */\nexport const clerkJsScriptUrl = clerkJSScriptUrl;\n\n/**\n * @deprecated Use `buildClerkJSScriptAttributes` instead. This alias will be removed in a future major version.\n */\nexport const buildClerkJsScriptAttributes = buildClerkJSScriptAttributes;\n\n/**\n * @deprecated Use `setClerkJSLoadingErrorPackageName` instead. This alias will be removed in a future major version.\n */\nexport const setClerkJsLoadingErrorPackageName = setClerkJSLoadingErrorPackageName;\n"],"mappings":";;;;;;;;;AAQA,MAAM,EAAE,sBAAsB,2BAA2B;AAEzD,MAAM,eAAe,kBAAkB,EAAE,aAAa,gBAAgB,C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erkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { SDKMetadata } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\nexport type LoadClerkJSScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkJSUrl?: string;\n /** @internal */\n __internal_clerkJSVersion?: string;\n sdkMetadata?: SDKMetadata;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n /**\n * Timeout in milliseconds to wait for clerk-js to load before considering it failed.\n *\n * @default 15000 (15 seconds)\n */\n scriptLoadTimeout?: number;\n};\n\n/**\n * @deprecated Use `LoadClerkJSScriptOptions` instead. This alias will be removed in a future major version.\n */\nexport type LoadClerkJsScriptOptions = LoadClerkJSScriptOptions;\n\nexport type LoadClerkUIScriptOptions = {\n publishableKey: string;\n /** @internal */\n __internal_clerkUIUrl?: string;\n /** @internal */\n __internal_clerkUIVersion?: string;\n proxyUrl?: string;\n domain?: string;\n nonce?: string;\n scriptLoadTimeout?: number;\n};\n\n/**\n * Validates that window.Clerk exists and is properly initialized.\n * This ensures we don't have false positives where the script loads but Clerk is malformed.\n *\n * @returns `true` if window.Clerk exists and has the expected structure with a load method.\n */\nfunction isClerkGlobalProperlyLoaded(prop: 'Clerk' | '__internal_ClerkUICtor'): boolean {\n if (typeof window === 'undefined' || !(window as any)[prop]) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const val = (window as any)[prop];\n return !!val;\n}\nconst isClerkProperlyLoaded = () => isClerkGlobalProperlyLoaded('Clerk');\nconst isClerkUIProperlyLoaded = () => isClerkGlobalProperlyLoaded('__internal_ClerkUICtor');\n\n/**\n * Checks if an existing script has a request error using Performance API.\n *\n * @param scriptUrl - The URL of the script to check.\n * @returns True if the script has failed to load due to a network/HTTP error.\n */\nfunction hasScriptRequestError(scriptUrl: string): boolean {\n if (typeof window === 'undefined' || !window.performance) {\n return false;\n }\n\n const entries = performance.getEntriesByName(scriptUrl, 'resource') as PerformanceResourceTiming[];\n\n if (entries.length === 0) {\n return false;\n }\n\n const scriptEntry = entries[entries.length - 1];\n\n // transferSize === 0 with responseEnd === 0 indicates network failure\n // transferSize === 0 with responseEnd > 0 might be a 4xx/5xx error or blocked request\n if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {\n // If there was no response at all, it's definitely an error\n if (scriptEntry.responseEnd === 0) {\n return true;\n }\n // If we got a response but no content, likely an HTTP error (4xx/5xx)\n if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) {\n return true;\n }\n\n if ('responseStatus' in scriptEntry) {\n const status = (scriptEntry as any).responseStatus;\n if (status >= 400) {\n return true;\n }\n if (scriptEntry.responseStatus === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Hotloads the Clerk JS script with robust failure detection.\n *\n * Uses a timeout-based approach to ensure absolute certainty about load success/failure.\n * If the script fails to load within the timeout period, or loads but doesn't create\n * a proper Clerk instance, the promise rejects with an error.\n *\n * @param opts - The options used to build the Clerk JS script URL and load the script.\n * Must include a `publishableKey` if no existing script is found.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error.\n *\n * @example\n * ```typescript\n * try {\n * await loadClerkJsScript({ publishableKey: 'pk_test_...' });\n * console.log('Clerk loaded successfully');\n * } catch (error) {\n * console.error('Failed to load Clerk:', error.message);\n * }\n * ```\n */\nexport const loadClerkJSScript = async (opts?: LoadClerkJSScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk JS' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_js',\n cause: error,\n });\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkJSScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkJSScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const loadClerkUIScript = async (opts?: LoadClerkUIScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n const rejectWith = (error?: Error) =>\n new ClerkRuntimeError('Failed to load Clerk UI' + (error?.message ? `, ${error.message}` : ''), {\n code: 'failed_to_load_clerk_ui',\n cause: error,\n });\n\n if (isClerkUIProperlyLoaded()) {\n return null;\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const scriptUrl = clerkUIScriptUrl(opts);\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-ui-script]');\n\n if (existingScript) {\n if (hasScriptRequestError(scriptUrl)) {\n existingScript.remove();\n } else {\n try {\n await waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith(), existingScript);\n return null;\n } catch {\n existingScript.remove();\n }\n }\n }\n\n const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUIProperlyLoaded, rejectWith());\n\n loadScript(scriptUrl, {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyAttributesToScript(buildClerkUIScriptAttributes(opts)),\n }).catch(error => {\n throw rejectWith(error);\n });\n\n return loadPromise;\n};\n\nexport const clerkJSScriptUrl = (opts: LoadClerkJSScriptOptions) => {\n const { __internal_clerkJSUrl, __internal_clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkJSUrl) {\n return __internal_clerkJSUrl;\n }\n\n const version = versionSelector(__internal_clerkJSVersion);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'clerk-js', version, 'clerk.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.browser.js`;\n};\n\nexport const clerkUIScriptUrl = (opts: LoadClerkUIScriptOptions) => {\n const { __internal_clerkUIUrl, __internal_clerkUIVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (__internal_clerkUIUrl) {\n return __internal_clerkUIUrl;\n }\n\n const version = versionSelector(__internal_clerkUIVersion, UI_PACKAGE_VERSION);\n\n if (proxyUrl && isProxyUrlRelative(proxyUrl)) {\n return buildRelativeProxyScriptUrl(proxyUrl, 'ui', version, 'ui.browser.js');\n }\n\n const scriptHost = buildScriptHost({ publishableKey, proxyUrl, domain });\n return `https://${scriptHost}/npm/@clerk/ui@${version}/dist/ui.browser.js`;\n};\n\nexport const buildClerkJSScriptAttributes = (options: LoadClerkJSScriptOptions) => {\n const obj: Record<string, string> = {};\n\n if (options.publishableKey) {\n obj['data-clerk-publishable-key'] = options.publishableKey;\n }\n\n if (options.proxyUrl) {\n obj['data-clerk-proxy-url'] = options.proxyUrl;\n }\n\n if (options.domain) {\n obj['data-clerk-domain'] = options.domain;\n }\n\n if (options.nonce) {\n obj.nonce = options.nonce;\n }\n\n return obj;\n};\n\nexport const buildClerkUIScriptAttributes = (options: LoadClerkUIScriptOptions) => {\n // TODO @nikos do we need this?\n return buildClerkJSScriptAttributes(options);\n};\n\nconst applyAttributesToScript = (attributes: Record<string, string>) => (script: HTMLScriptElement) => {\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nconst stripTrailingSlashes = (value: string) => {\n while (value.endsWith('/')) {\n value = value.slice(0, -1);\n }\n\n return value;\n};\n\nconst buildRelativeProxyScriptUrl = (proxyUrl: string, packageName: string, version: string, fileName: string) => {\n return `${stripTrailingSlashes(proxyUrl)}/npm/@clerk/${packageName}@${version}/dist/${fileName}`;\n};\n\nexport const buildScriptHost = (opts: { publishableKey: string; proxyUrl?: string; domain?: string }) => {\n const { proxyUrl, domain, publishableKey } = opts;\n\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n const resolvedProxyUrl = proxyUrlToAbsoluteURL(proxyUrl);\n\n if (isProxyUrlRelative(resolvedProxyUrl)) {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n return resolvedProxyUrl.replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n return addClerkPrefix(domain);\n } else {\n return parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n};\n\nfunction waitForPredicateWithTimeout(\n timeoutMs: number,\n predicate: () => boolean,\n rejectWith: Error,\n existingScript?: HTMLScriptElement,\n): Promise<HTMLScriptElement | null> {\n return new Promise((resolve, reject) => {\n let resolved = false;\n\n const cleanup = (timeoutId: ReturnType<typeof setTimeout>, pollInterval: ReturnType<typeof setInterval>) => {\n clearTimeout(timeoutId);\n clearInterval(pollInterval);\n };\n\n // Bail out early if the script fails to load, instead of waiting for the entire timeout\n existingScript?.addEventListener('error', () => {\n cleanup(timeoutId, pollInterval);\n reject(rejectWith);\n });\n\n const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (predicate()) {\n resolved = true;\n cleanup(timeoutId, pollInterval);\n resolve(null);\n }\n };\n\n const handleTimeout = () => {\n if (resolved) {\n return;\n }\n\n resolved = true;\n cleanup(timeoutId, pollInterval);\n\n if (!predicate()) {\n reject(rejectWith);\n } else {\n resolve(null);\n }\n };\n\n const timeoutId = setTimeout(handleTimeout, timeoutMs);\n\n checkAndResolve();\n\n const pollInterval = setInterval(() => {\n if (resolved) {\n clearInterval(pollInterval);\n return;\n }\n checkAndResolve();\n }, 100);\n });\n}\n\nexport function setClerkJSLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\n/**\n * @deprecated Use `loadClerkJSScript` instead. This alias will be removed in a future major version.\n */\nexport const loadClerkJsScript = loadClerkJSScript;\n\n/**\n * @deprecated Use `clerkJSScriptUrl` instead. This alias will be removed in a future major version.\n */\nexport const clerkJsScriptUrl = clerkJSScriptUrl;\n\n/**\n * @deprecated Use `buildClerkJSScriptAttributes` instead. This alias will be removed in a future major version.\n */\nexport const buildClerkJsScriptAttributes = buildClerkJSScriptAttributes;\n\n/**\n * @deprecated Use `setClerkJSLoadingErrorPackageName` instead. This alias will be removed in a future major version.\n */\nexport const setClerkJsLoadingErrorPackageName = setClerkJSLoadingErrorPackageName;\n"],"mappings":";;;;;;;;;AAQA,MAAM,EAAE,sBAAsB,2BAA2B;AAEzD,MAAM,eAAe,kBAAkB,EAAE,aAAa,gBAAgB,CAAC;;;;;;;AA2CvE,SAAS,4BAA4B,MAAmD;CACtF,IAAI,OAAO,WAAW,eAAe,CAAE,OAAe,OACpD,OAAO;CAKT,OAAO,CAAC,CADK,OAAe;AAE9B;AACA,MAAM,8BAA8B,4BAA4B,OAAO;AACvE,MAAM,gCAAgC,4BAA4B,wBAAwB;;;;;;;AAQ1F,SAAS,sBAAsB,WAA4B;CACzD,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,aAC3C,OAAO;CAGT,MAAM,UAAU,YAAY,iBAAiB,WAAW,UAAU;CAElE,IAAI,QAAQ,WAAW,GACrB,OAAO;CAGT,MAAM,cAAc,QAAQ,QAAQ,SAAS;CAI7C,IAAI,YAA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C1G,aAAa,SAAS;GACtB,cAAc,YAAY;EAC5B;EAGA,gBAAgB,iBAAiB,eAAe;GAC9C,QAAQ,WAAW,YAAY;GAC/B,OAAO,UAAU;EACnB,CAAC;EAED,MAAM,wBAAwB;GAC5B,IAAI,UACF;GAGF,IAAI,UAAU,GAAG;IACf,WAAW;IACX,QAAQ,WAAW,YAAY;IAC/B,QAAQ,IAAI;GACd;EACF;EAEA,MAAM,sBAAsB;GAC1B,IAAI,UACF;GAGF,WAAW;GACX,QAAQ,WAAW,YAAY;GAE/B,IAAI,CAAC,UAAU,GACb,OAAO,UAAU;QAEjB,QAAQ,IAAI;EAEhB;EAEA,MAAM,YAAY,WAAW,eAAe,SAAS;EAErD,gBAAgB;EAEhB,MAAM,eAAe,kBAAkB;GACrC,IAAI,UAAU;IACZ,cAAc,YAAY;IAC1B;GACF;GACA,gBAAgB;EAClB,GAAG,GAAG;CACR,CAAC;AACH;AAEA,SAAgB,kCAAkC,aAAqB;CACrE,aAAa,eAAe,EAAE,YAAY,CAAC;AAC7C;;;;AAKA,MAAa,oBAAoB;;;;AAKjC,MAAa,mBAAmB;;;;AAKhC,MAAa,+BAA+B;;;;AAK5C,MAAa,oCAAoC"}
@@ -294,24 +294,6 @@ interface Clerk {
294
294
  * @internal
295
295
  */
296
296
  __internal_protectChallengeLoadTimeoutMs?: number;
297
- /**
298
- * Registers a prebuilt component that renders Protect challenges itself for the given flows, so
299
- * clerk-js leaves a pending `protect_check` on those resources instead of opening its own modal.
300
- * Returns the unregister function.
301
- *
302
- * @internal
303
- */
304
- __internal_registerProtectCheckHandler?: (flows: ProtectCheckFlow[]) => () => void;
305
- /**
306
- * Resolves a pending `protect_check` on the client's current sign-in or sign-up through Clerk's
307
- * Protect modal. Callback pages need it because the gate arrives with the client, not on a request.
308
- * Does nothing once either attempt is `complete`. Pass `flow` to resolve only that attempt's gate,
309
- * so a callback for one flow does not open the challenge of a stale attempt on the other. Without
310
- * `flow`, the sign-in gate is resolved before the sign-up gate.
311
- *
312
- * @internal
313
- */
314
- __internal_resolvePendingProtectCheck?: (flow?: ProtectCheckFlow) => Promise<void>;
315
297
  frontendApi: string;
316
298
  /** Your Clerk [Publishable Key](!publishable-key). */
317
299
  publishableKey: string;
@@ -1737,12 +1719,6 @@ type __internal_UserVerificationProps = RoutingOptions & {
1737
1719
  appearance?: ClerkAppearanceTheme;
1738
1720
  };
1739
1721
  type __internal_UserVerificationModalProps = WithoutRouting<__internal_UserVerificationProps>;
1740
- type ProtectCheckFlow = 'signIn' | 'signUp';
1741
- type __internal_ProtectCheckModalProps = {
1742
- resource: SignInResource | SignUpResource;
1743
- onResolved: () => void;
1744
- onFailed: (error: unknown) => void;
1745
- };
1746
1722
  type __internal_EnableOrganizationsPromptProps = {
1747
1723
  onSuccess?: () => void;
1748
1724
  onClose?: () => void;
@@ -2831,5 +2807,5 @@ interface LoadedClerk extends Clerk {
2831
2807
  client: ClientResource;
2832
2808
  }
2833
2809
  //#endregion
2834
- export { APIKeysProps, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithSolanaParams, BrowserClerk, BrowserClerkConstructor, CheckoutErrors, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkOptions, ClerkOptionsNavigation, ClerkProp, ClerkStatus, ClerkThemeOptions, ConfigureSSOProps, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CustomNavigation, DecorateUrl, GetAPIKeysParams, GoogleOneTapProps, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, InternalClerkScriptProps, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersProps, IsomorphicClerkOptions, ListenerCallback, ListenerOptions, LoadedClerk, NavigateOptions, OAuthConsentProps, OAuthDeviceVerificationProps, OffEventListener, OnEventListener, OrganizationListProps, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationSwitcherProps, PricingTableProps, ProtectCheckContinuation, ProtectCheckFlow, Resources, ResumeAfterProtectCheckParams, RevokeAPIKeyParams, RoutingOptions, RoutingStrategy, SDKMetadata, SetActive, SetActiveNavigate, SetActiveParams, SignInButtonProps, SignInInitialValues, SignInModalProps, SignInProps, SignInRedirectOptions, SignOut, SignOutCallback, SignOutOptions, SignUpButtonProps, SignUpInitialValues, SignUpModalProps, SignUpProps, SignUpRedirectOptions, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TransferableOption, UnsubscribeCallback, UserAvatarProps, UserButtonProps, UserProfileModalProps, UserProfileProps, WaitlistModalProps, WaitlistProps, WithoutRouting, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps };
2810
+ export { APIKeysProps, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithSolanaParams, BrowserClerk, BrowserClerkConstructor, CheckoutErrors, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkOptions, ClerkOptionsNavigation, ClerkProp, ClerkStatus, ClerkThemeOptions, ConfigureSSOProps, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CustomNavigation, DecorateUrl, GetAPIKeysParams, GoogleOneTapProps, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, InternalClerkScriptProps, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersProps, IsomorphicClerkOptions, ListenerCallback, ListenerOptions, LoadedClerk, NavigateOptions, OAuthConsentProps, OAuthDeviceVerificationProps, OffEventListener, OnEventListener, OrganizationListProps, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationSwitcherProps, PricingTableProps, ProtectCheckContinuation, Resources, ResumeAfterProtectCheckParams, RevokeAPIKeyParams, RoutingOptions, RoutingStrategy, SDKMetadata, SetActive, SetActiveNavigate, SetActiveParams, SignInButtonProps, SignInInitialValues, SignInModalProps, SignInProps, SignInRedirectOptions, SignOut, SignOutCallback, SignOutOptions, SignUpButtonProps, SignUpInitialValues, SignUpModalProps, SignUpProps, SignUpRedirectOptions, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TransferableOption, UnsubscribeCallback, UserAvatarProps, UserButtonProps, UserProfileModalProps, UserProfileProps, WaitlistModalProps, WaitlistProps, WithoutRouting, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps };
2835
2811
  //# sourceMappingURL=clerk.d.mts.map
@@ -294,24 +294,6 @@ interface Clerk {
294
294
  * @internal
295
295
  */
296
296
  __internal_protectChallengeLoadTimeoutMs?: number;
297
- /**
298
- * Registers a prebuilt component that renders Protect challenges itself for the given flows, so
299
- * clerk-js leaves a pending `protect_check` on those resources instead of opening its own modal.
300
- * Returns the unregister function.
301
- *
302
- * @internal
303
- */
304
- __internal_registerProtectCheckHandler?: (flows: ProtectCheckFlow[]) => () => void;
305
- /**
306
- * Resolves a pending `protect_check` on the client's current sign-in or sign-up through Clerk's
307
- * Protect modal. Callback pages need it because the gate arrives with the client, not on a request.
308
- * Does nothing once either attempt is `complete`. Pass `flow` to resolve only that attempt's gate,
309
- * so a callback for one flow does not open the challenge of a stale attempt on the other. Without
310
- * `flow`, the sign-in gate is resolved before the sign-up gate.
311
- *
312
- * @internal
313
- */
314
- __internal_resolvePendingProtectCheck?: (flow?: ProtectCheckFlow) => Promise<void>;
315
297
  frontendApi: string;
316
298
  /** Your Clerk [Publishable Key](!publishable-key). */
317
299
  publishableKey: string;
@@ -1737,12 +1719,6 @@ type __internal_UserVerificationProps = RoutingOptions & {
1737
1719
  appearance?: ClerkAppearanceTheme;
1738
1720
  };
1739
1721
  type __internal_UserVerificationModalProps = WithoutRouting<__internal_UserVerificationProps>;
1740
- type ProtectCheckFlow = 'signIn' | 'signUp';
1741
- type __internal_ProtectCheckModalProps = {
1742
- resource: SignInResource | SignUpResource;
1743
- onResolved: () => void;
1744
- onFailed: (error: unknown) => void;
1745
- };
1746
1722
  type __internal_EnableOrganizationsPromptProps = {
1747
1723
  onSuccess?: () => void;
1748
1724
  onClose?: () => void;
@@ -2831,5 +2807,5 @@ interface LoadedClerk extends Clerk {
2831
2807
  client: ClientResource;
2832
2808
  }
2833
2809
  //#endregion
2834
- export { APIKeysProps, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithSolanaParams, BrowserClerk, BrowserClerkConstructor, CheckoutErrors, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkOptions, ClerkOptionsNavigation, ClerkProp, ClerkStatus, ClerkThemeOptions, ConfigureSSOProps, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CustomNavigation, DecorateUrl, GetAPIKeysParams, GoogleOneTapProps, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, InternalClerkScriptProps, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersProps, IsomorphicClerkOptions, ListenerCallback, ListenerOptions, LoadedClerk, NavigateOptions, OAuthConsentProps, OAuthDeviceVerificationProps, OffEventListener, OnEventListener, OrganizationListProps, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationSwitcherProps, PricingTableProps, ProtectCheckContinuation, ProtectCheckFlow, Resources, ResumeAfterProtectCheckParams, RevokeAPIKeyParams, RoutingOptions, RoutingStrategy, SDKMetadata, SetActive, SetActiveNavigate, SetActiveParams, SignInButtonProps, SignInInitialValues, SignInModalProps, SignInProps, SignInRedirectOptions, SignOut, SignOutCallback, SignOutOptions, SignUpButtonProps, SignUpInitialValues, SignUpModalProps, SignUpProps, SignUpRedirectOptions, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TransferableOption, UnsubscribeCallback, UserAvatarProps, UserButtonProps, UserProfileModalProps, UserProfileProps, WaitlistModalProps, WaitlistProps, WithoutRouting, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps };
2810
+ export { APIKeysProps, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithSolanaParams, BrowserClerk, BrowserClerkConstructor, CheckoutErrors, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkOptions, ClerkOptionsNavigation, ClerkProp, ClerkStatus, ClerkThemeOptions, ConfigureSSOProps, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CustomNavigation, DecorateUrl, GetAPIKeysParams, GoogleOneTapProps, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, InternalClerkScriptProps, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersProps, IsomorphicClerkOptions, ListenerCallback, ListenerOptions, LoadedClerk, NavigateOptions, OAuthConsentProps, OAuthDeviceVerificationProps, OffEventListener, OnEventListener, OrganizationListProps, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationSwitcherProps, PricingTableProps, ProtectCheckContinuation, Resources, ResumeAfterProtectCheckParams, RevokeAPIKeyParams, RoutingOptions, RoutingStrategy, SDKMetadata, SetActive, SetActiveNavigate, SetActiveParams, SignInButtonProps, SignInInitialValues, SignInModalProps, SignInProps, SignInRedirectOptions, SignOut, SignOutCallback, SignOutOptions, SignUpButtonProps, SignUpInitialValues, SignUpModalProps, SignUpProps, SignUpRedirectOptions, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TransferableOption, UnsubscribeCallback, UserAvatarProps, UserButtonProps, UserProfileModalProps, UserProfileProps, WaitlistModalProps, WaitlistProps, WithoutRouting, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps };
2835
2811
  //# sourceMappingURL=clerk.d.ts.map
@@ -73,7 +73,7 @@ import { OAuthTransport } from "./oauthTransport.mjs";
73
73
  import { JoinWaitlistParams, WaitlistResource } from "./waitlist.mjs";
74
74
  import { Errors, FieldError, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, SignInErrors, SignInFields, SignInSignal, SignInSignalValue, SignUpErrors, SignUpFields, SignUpSignal, SignUpSignalValue, State, WaitlistErrors, WaitlistFields, WaitlistSignal, WaitlistSignalValue } from "./state.mjs";
75
75
  import { TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry } from "./telemetry.mjs";
76
- import { APIKeysProps, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithSolanaParams, BrowserClerk, BrowserClerkConstructor, CheckoutErrors, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkOptions, ClerkOptionsNavigation, ClerkProp, ClerkStatus, ClerkThemeOptions, ConfigureSSOProps, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CustomNavigation, DecorateUrl, GetAPIKeysParams, GoogleOneTapProps, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, InternalClerkScriptProps, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersProps, IsomorphicClerkOptions, ListenerCallback, ListenerOptions, LoadedClerk, NavigateOptions, OAuthConsentProps, OAuthDeviceVerificationProps, OffEventListener, OnEventListener, OrganizationListProps, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationSwitcherProps, PricingTableProps, ProtectCheckContinuation, ProtectCheckFlow, Resources, ResumeAfterProtectCheckParams, RevokeAPIKeyParams, RoutingOptions, RoutingStrategy, SDKMetadata, SetActive, SetActiveNavigate, SetActiveParams, SignInButtonProps, SignInInitialValues, SignInModalProps, SignInProps, SignInRedirectOptions, SignOut, SignOutCallback, SignOutOptions, SignUpButtonProps, SignUpInitialValues, SignUpModalProps, SignUpProps, SignUpRedirectOptions, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TransferableOption, UnsubscribeCallback, UserAvatarProps, UserButtonProps, UserProfileModalProps, UserProfileProps, WaitlistModalProps, WaitlistProps, WithoutRouting, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps } from "./clerk.mjs";
76
+ import { APIKeysProps, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithSolanaParams, BrowserClerk, BrowserClerkConstructor, CheckoutErrors, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkOptions, ClerkOptionsNavigation, ClerkProp, ClerkStatus, ClerkThemeOptions, ConfigureSSOProps, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CustomNavigation, DecorateUrl, GetAPIKeysParams, GoogleOneTapProps, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, InternalClerkScriptProps, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersProps, IsomorphicClerkOptions, ListenerCallback, ListenerOptions, LoadedClerk, NavigateOptions, OAuthConsentProps, OAuthDeviceVerificationProps, OffEventListener, OnEventListener, OrganizationListProps, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationSwitcherProps, PricingTableProps, ProtectCheckContinuation, Resources, ResumeAfterProtectCheckParams, RevokeAPIKeyParams, RoutingOptions, RoutingStrategy, SDKMetadata, SetActive, SetActiveNavigate, SetActiveParams, SignInButtonProps, SignInInitialValues, SignInModalProps, SignInProps, SignInRedirectOptions, SignOut, SignOutCallback, SignOutOptions, SignUpButtonProps, SignUpInitialValues, SignUpModalProps, SignUpProps, SignUpRedirectOptions, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TransferableOption, UnsubscribeCallback, UserAvatarProps, UserButtonProps, UserProfileModalProps, UserProfileProps, WaitlistModalProps, WaitlistProps, WithoutRouting, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps } from "./clerk.mjs";
77
77
  import { APIKeyResource, APIKeysNamespace } from "./apiKeys.mjs";
78
78
  import { AuthConfigResource } from "./authConfig.mjs";
79
79
  import { SharedSignedInAuthObjectProperties } from "./authObject.mjs";
@@ -85,4 +85,4 @@ import { ProtectParams, ShowProps, ShowWhenCondition } from "./authorization.mjs
85
85
  import { ClerkHostRouter, RoutingMode } from "./router.mjs";
86
86
  import { OAUTH_PROVIDERS, SAML_IDPS, WEB3_PROVIDERS, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders } from "./runtime-values.mjs";
87
87
  import { InitialState, ServerGetToken, ServerGetTokenOptions } from "./ssr.mjs";
88
- export type { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, ActClaim, ActClaimType, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AgentActClaim, AgentIDOauthProvider, AlertId, ApiKeyJSON, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttackProtectionData, AttemptAffiliationVerificationParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseWeb3Provider, BillingAppliedDiscount, BillingAppliedDiscountJSON, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingCreditBalanceJSON, BillingCreditBalanceResource, BillingCreditLedgerJSON, BillingCreditLedgerResource, BillingCredits, BillingCreditsJSON, BillingDiscountRedemption, BillingDiscountRedemptionJSON, BillingDiscounts, BillingDiscountsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerCredit, BillingPayerCreditJSON, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPaymentTotals, BillingPaymentTotalsJSON, BillingPerUnitTotal, BillingPerUnitTotalJSON, BillingPerUnitTotalTier, BillingPerUnitTotalTierJSON, BillingPeriodTotals, BillingPeriodTotalsJSON, BillingPlanJSON, BillingPlanPrice, BillingPlanResource, BillingPlanUnitPrice, BillingPlanUnitPriceJSON, BillingPlanUnitPriceTier, BillingPlanUnitPriceTierJSON, BillingPriceJSON, BillingProrationCreditDetail, BillingProrationCreditDetailJSON, BillingProrationDiscount, BillingProrationDiscountJSON, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemNextPayment, BillingSubscriptionItemNextPaymentJSON, BillingSubscriptionItemResource, BillingSubscriptionItemSeats, BillingSubscriptionItemSeatsJSON, BillingSubscriptionJSON, BillingSubscriptionNextPayment, BillingSubscriptionNextPaymentJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BillingTotals, BillingTotalsJSON, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BrowserClerk, BrowserClerkConstructor, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutErrors, CheckoutFlowFinalizeParams, CheckoutFlowResource, CheckoutFlowResourceNonStrict, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAPIError, ClerkAPIErrorJSON, ClerkAPIResponseError, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkOptionsNavigation, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkProp, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkStatus, ClerkThemeOptions, ClerkUI, ClerkUIConstructor, ClerkUIInstance, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ComponentControls, ConfigureSSOProps, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateDirectorySyncParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateMeEnterpriseConnectionParams, CreateOrganizationDomainParams, CreateOrganizationEnterpriseConnectionParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DecorateUrl, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncRunStatus, DirectorySyncStatusJSON, DirectorySyncStatusResource, DirectorySyncUserJSON, DirectorySyncUserResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseConnectionJSON, EnterpriseConnectionJSONSnapshot, EnterpriseConnectionResource, EnterpriseConnectionTestRunInitJSON, EnterpriseConnectionTestRunInitResource, EnterpriseConnectionTestRunJSON, EnterpriseConnectionTestRunJSONSnapshot, EnterpriseConnectionTestRunLogJSON, EnterpriseConnectionTestRunLogResource, EnterpriseConnectionTestRunOauthPayloadJSON, EnterpriseConnectionTestRunOauthPayloadResource, EnterpriseConnectionTestRunParsedUserInfoJSON, EnterpriseConnectionTestRunParsedUserInfoResource, EnterpriseConnectionTestRunResource, EnterpriseConnectionTestRunSamlPayloadJSON, EnterpriseConnectionTestRunSamlPayloadResource, EnterpriseConnectionTestRunStatus, EnterpriseConnectionTestRunsPaginatedJSON, EnterpriseOAuthConfigJSON, EnterpriseOAuthConfigResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnterpriseSamlConnectionNestedJSON, EnterpriseSamlConnectionNestedResource, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontWeight, ForPayerType, ForceNull, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetCreditBalanceParams, GetCreditHistoryParams, GetDirectorySyncUsersParams, GetDomainsParams, GetEnterpriseConnectionTestRunsParams, GetEnterpriseConnectionsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOAuthConsentInfoParams, GetOrganizationMemberships, GetPaymentAttemptParams, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlanParams, GetPlansParams, GetRolesParams, GetRolesResponse, GetStatementParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InternalClerkScriptProps, InviteMemberParams, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersParams, InviteMembersProps, IsomorphicClerkOptions, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, ListenerOptions, LoadedClerk, LocalizationResource, LocalizationValue, LookupOAuthDeviceVerificationParams, MakeDefaultPaymentMethodParams, MeEnterpriseConnectionOidcInput, MeEnterpriseConnectionProvider, MeEnterpriseConnectionSamlInput, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, OAUTH_PROVIDERS, OAuthApplicationNamespace, OAuthConfig, OAuthConsentInfo, OAuthConsentInfoJSON, OAuthConsentProps, OAuthConsentScope, OAuthConsentScopeJSON, OAuthDeviceVerificationInfo, OAuthDeviceVerificationInfoJSON, OAuthDeviceVerificationProps, OAuthDeviceVerificationResult, OAuthDeviceVerificationResultJSON, OAuthDeviceVerificationScope, OAuthDeviceVerificationStatus, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OAuthTransport, OKXWalletWeb3Provider, OauthFactor, OffEventListener, OnEventListener, OrganizationCreationAdvisorySeverity, OrganizationCreationAdvisoryType, OrganizationCreationDefaultsJSON, OrganizationCreationDefaultsJSONSnapshot, OrganizationCreationDefaultsResource, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainBulkOwnershipVerificationError, OrganizationDomainBulkOwnershipVerificationErrorJSON, OrganizationDomainJSON, OrganizationDomainOwnershipVerification, OrganizationDomainOwnershipVerificationJSON, OrganizationDomainOwnershipVerificationStatus, OrganizationDomainOwnershipVerificationStrategy, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationDomainsBulkOwnershipVerificationJSON, OrganizationDomainsBulkOwnershipVerificationResource, OrganizationEnrollmentMode, OrganizationEnterpriseConnectionOidcInput, OrganizationEnterpriseConnectionProvider, OrganizationEnterpriseConnectionSamlInput, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, ProfilePageId, ProfileSectionId, ProtectAssertion, ProtectAssertionResolver, ProtectCheckContinuation, ProtectCheckField, ProtectCheckFlow, ProtectCheckJSON, ProtectCheckResource, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectParams, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemoveFunctions, RemovePaymentMethodParams, RemoveUserPasswordParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ResumeAfterProtectCheckParams, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource, SamlIdp, SamlIdpMap, SamlIdpSlug, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetDirectorySyncCredentialsParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, ShowProps, ShowWhenCondition, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAEmailCodeVerifyParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordPhoneCodeSendParams, SignInFutureResetPasswordPhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureSubmitProtectCheckParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureAdditionalParams, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureEmailLinkSendParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureSubmitProtectCheckParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureVerifications, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, SubmitOAuthDeviceVerificationParams, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TwitchOauthProvider, TwitterOauthProvider, UIVersion, UnsubscribeCallback, UpdateCheckoutParams, UpdateDirectorySyncParams, UpdateEnrollmentModeParams, UpdateMeEnterpriseConnectionParams, UpdateMembershipParams, UpdateOrganizationEnterpriseConnectionParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserButtonProps, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistErrors, WaitlistFields, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistSignal, WaitlistSignalValue, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, WithOptionalOrgType, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
88
+ export type { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, ActClaim, ActClaimType, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AgentActClaim, AgentIDOauthProvider, AlertId, ApiKeyJSON, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttackProtectionData, AttemptAffiliationVerificationParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseWeb3Provider, BillingAppliedDiscount, BillingAppliedDiscountJSON, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingCreditBalanceJSON, BillingCreditBalanceResource, BillingCreditLedgerJSON, BillingCreditLedgerResource, BillingCredits, BillingCreditsJSON, BillingDiscountRedemption, BillingDiscountRedemptionJSON, BillingDiscounts, BillingDiscountsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerCredit, BillingPayerCreditJSON, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPaymentTotals, BillingPaymentTotalsJSON, BillingPerUnitTotal, BillingPerUnitTotalJSON, BillingPerUnitTotalTier, BillingPerUnitTotalTierJSON, BillingPeriodTotals, BillingPeriodTotalsJSON, BillingPlanJSON, BillingPlanPrice, BillingPlanResource, BillingPlanUnitPrice, BillingPlanUnitPriceJSON, BillingPlanUnitPriceTier, BillingPlanUnitPriceTierJSON, BillingPriceJSON, BillingProrationCreditDetail, BillingProrationCreditDetailJSON, BillingProrationDiscount, BillingProrationDiscountJSON, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemNextPayment, BillingSubscriptionItemNextPaymentJSON, BillingSubscriptionItemResource, BillingSubscriptionItemSeats, BillingSubscriptionItemSeatsJSON, BillingSubscriptionJSON, BillingSubscriptionNextPayment, BillingSubscriptionNextPaymentJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BillingTotals, BillingTotalsJSON, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BrowserClerk, BrowserClerkConstructor, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutErrors, CheckoutFlowFinalizeParams, CheckoutFlowResource, CheckoutFlowResourceNonStrict, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAPIError, ClerkAPIErrorJSON, ClerkAPIResponseError, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkOptionsNavigation, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkProp, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkStatus, ClerkThemeOptions, ClerkUI, ClerkUIConstructor, ClerkUIInstance, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ComponentControls, ConfigureSSOProps, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateDirectorySyncParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateMeEnterpriseConnectionParams, CreateOrganizationDomainParams, CreateOrganizationEnterpriseConnectionParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DecorateUrl, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncRunStatus, DirectorySyncStatusJSON, DirectorySyncStatusResource, DirectorySyncUserJSON, DirectorySyncUserResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseConnectionJSON, EnterpriseConnectionJSONSnapshot, EnterpriseConnectionResource, EnterpriseConnectionTestRunInitJSON, EnterpriseConnectionTestRunInitResource, EnterpriseConnectionTestRunJSON, EnterpriseConnectionTestRunJSONSnapshot, EnterpriseConnectionTestRunLogJSON, EnterpriseConnectionTestRunLogResource, EnterpriseConnectionTestRunOauthPayloadJSON, EnterpriseConnectionTestRunOauthPayloadResource, EnterpriseConnectionTestRunParsedUserInfoJSON, EnterpriseConnectionTestRunParsedUserInfoResource, EnterpriseConnectionTestRunResource, EnterpriseConnectionTestRunSamlPayloadJSON, EnterpriseConnectionTestRunSamlPayloadResource, EnterpriseConnectionTestRunStatus, EnterpriseConnectionTestRunsPaginatedJSON, EnterpriseOAuthConfigJSON, EnterpriseOAuthConfigResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnterpriseSamlConnectionNestedJSON, EnterpriseSamlConnectionNestedResource, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontWeight, ForPayerType, ForceNull, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetCreditBalanceParams, GetCreditHistoryParams, GetDirectorySyncUsersParams, GetDomainsParams, GetEnterpriseConnectionTestRunsParams, GetEnterpriseConnectionsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOAuthConsentInfoParams, GetOrganizationMemberships, GetPaymentAttemptParams, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlanParams, GetPlansParams, GetRolesParams, GetRolesResponse, GetStatementParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InternalClerkScriptProps, InviteMemberParams, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersParams, InviteMembersProps, IsomorphicClerkOptions, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, ListenerOptions, LoadedClerk, LocalizationResource, LocalizationValue, LookupOAuthDeviceVerificationParams, MakeDefaultPaymentMethodParams, MeEnterpriseConnectionOidcInput, MeEnterpriseConnectionProvider, MeEnterpriseConnectionSamlInput, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, OAUTH_PROVIDERS, OAuthApplicationNamespace, OAuthConfig, OAuthConsentInfo, OAuthConsentInfoJSON, OAuthConsentProps, OAuthConsentScope, OAuthConsentScopeJSON, OAuthDeviceVerificationInfo, OAuthDeviceVerificationInfoJSON, OAuthDeviceVerificationProps, OAuthDeviceVerificationResult, OAuthDeviceVerificationResultJSON, OAuthDeviceVerificationScope, OAuthDeviceVerificationStatus, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OAuthTransport, OKXWalletWeb3Provider, OauthFactor, OffEventListener, OnEventListener, OrganizationCreationAdvisorySeverity, OrganizationCreationAdvisoryType, OrganizationCreationDefaultsJSON, OrganizationCreationDefaultsJSONSnapshot, OrganizationCreationDefaultsResource, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainBulkOwnershipVerificationError, OrganizationDomainBulkOwnershipVerificationErrorJSON, OrganizationDomainJSON, OrganizationDomainOwnershipVerification, OrganizationDomainOwnershipVerificationJSON, OrganizationDomainOwnershipVerificationStatus, OrganizationDomainOwnershipVerificationStrategy, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationDomainsBulkOwnershipVerificationJSON, OrganizationDomainsBulkOwnershipVerificationResource, OrganizationEnrollmentMode, OrganizationEnterpriseConnectionOidcInput, OrganizationEnterpriseConnectionProvider, OrganizationEnterpriseConnectionSamlInput, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, ProfilePageId, ProfileSectionId, ProtectAssertion, ProtectAssertionResolver, ProtectCheckContinuation, ProtectCheckField, ProtectCheckJSON, ProtectCheckResource, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectParams, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemoveFunctions, RemovePaymentMethodParams, RemoveUserPasswordParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ResumeAfterProtectCheckParams, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource, SamlIdp, SamlIdpMap, SamlIdpSlug, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetDirectorySyncCredentialsParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, ShowProps, ShowWhenCondition, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAEmailCodeVerifyParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordPhoneCodeSendParams, SignInFutureResetPasswordPhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureSubmitProtectCheckParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureAdditionalParams, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureEmailLinkSendParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureSubmitProtectCheckParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureVerifications, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, SubmitOAuthDeviceVerificationParams, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TwitchOauthProvider, TwitterOauthProvider, UIVersion, UnsubscribeCallback, UpdateCheckoutParams, UpdateDirectorySyncParams, UpdateEnrollmentModeParams, UpdateMeEnterpriseConnectionParams, UpdateMembershipParams, UpdateOrganizationEnterpriseConnectionParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserButtonProps, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistErrors, WaitlistFields, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistSignal, WaitlistSignalValue, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, WithOptionalOrgType, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
@@ -73,7 +73,7 @@ import { OAuthTransport } from "./oauthTransport.js";
73
73
  import { JoinWaitlistParams, WaitlistResource } from "./waitlist.js";
74
74
  import { Errors, FieldError, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, SignInErrors, SignInFields, SignInSignal, SignInSignalValue, SignUpErrors, SignUpFields, SignUpSignal, SignUpSignalValue, State, WaitlistErrors, WaitlistFields, WaitlistSignal, WaitlistSignalValue } from "./state.js";
75
75
  import { TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry } from "./telemetry.js";
76
- import { APIKeysProps, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithSolanaParams, BrowserClerk, BrowserClerkConstructor, CheckoutErrors, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkOptions, ClerkOptionsNavigation, ClerkProp, ClerkStatus, ClerkThemeOptions, ConfigureSSOProps, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CustomNavigation, DecorateUrl, GetAPIKeysParams, GoogleOneTapProps, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, InternalClerkScriptProps, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersProps, IsomorphicClerkOptions, ListenerCallback, ListenerOptions, LoadedClerk, NavigateOptions, OAuthConsentProps, OAuthDeviceVerificationProps, OffEventListener, OnEventListener, OrganizationListProps, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationSwitcherProps, PricingTableProps, ProtectCheckContinuation, ProtectCheckFlow, Resources, ResumeAfterProtectCheckParams, RevokeAPIKeyParams, RoutingOptions, RoutingStrategy, SDKMetadata, SetActive, SetActiveNavigate, SetActiveParams, SignInButtonProps, SignInInitialValues, SignInModalProps, SignInProps, SignInRedirectOptions, SignOut, SignOutCallback, SignOutOptions, SignUpButtonProps, SignUpInitialValues, SignUpModalProps, SignUpProps, SignUpRedirectOptions, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TransferableOption, UnsubscribeCallback, UserAvatarProps, UserButtonProps, UserProfileModalProps, UserProfileProps, WaitlistModalProps, WaitlistProps, WithoutRouting, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps } from "./clerk.js";
76
+ import { APIKeysProps, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithSolanaParams, BrowserClerk, BrowserClerkConstructor, CheckoutErrors, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkOptions, ClerkOptionsNavigation, ClerkProp, ClerkStatus, ClerkThemeOptions, ConfigureSSOProps, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CustomNavigation, DecorateUrl, GetAPIKeysParams, GoogleOneTapProps, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, InternalClerkScriptProps, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersProps, IsomorphicClerkOptions, ListenerCallback, ListenerOptions, LoadedClerk, NavigateOptions, OAuthConsentProps, OAuthDeviceVerificationProps, OffEventListener, OnEventListener, OrganizationListProps, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationSwitcherProps, PricingTableProps, ProtectCheckContinuation, Resources, ResumeAfterProtectCheckParams, RevokeAPIKeyParams, RoutingOptions, RoutingStrategy, SDKMetadata, SetActive, SetActiveNavigate, SetActiveParams, SignInButtonProps, SignInInitialValues, SignInModalProps, SignInProps, SignInRedirectOptions, SignOut, SignOutCallback, SignOutOptions, SignUpButtonProps, SignUpInitialValues, SignUpModalProps, SignUpProps, SignUpRedirectOptions, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TransferableOption, UnsubscribeCallback, UserAvatarProps, UserButtonProps, UserProfileModalProps, UserProfileProps, WaitlistModalProps, WaitlistProps, WithoutRouting, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps } from "./clerk.js";
77
77
  import { APIKeyResource, APIKeysNamespace } from "./apiKeys.js";
78
78
  import { AuthConfigResource } from "./authConfig.js";
79
79
  import { SharedSignedInAuthObjectProperties } from "./authObject.js";
@@ -85,4 +85,4 @@ import { ProtectParams, ShowProps, ShowWhenCondition } from "./authorization.js"
85
85
  import { ClerkHostRouter, RoutingMode } from "./router.js";
86
86
  import { OAUTH_PROVIDERS, SAML_IDPS, WEB3_PROVIDERS, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders } from "./runtime-values.js";
87
87
  import { InitialState, ServerGetToken, ServerGetTokenOptions } from "./ssr.js";
88
- export type { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, ActClaim, ActClaimType, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AgentActClaim, AgentIDOauthProvider, AlertId, ApiKeyJSON, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttackProtectionData, AttemptAffiliationVerificationParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseWeb3Provider, BillingAppliedDiscount, BillingAppliedDiscountJSON, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingCreditBalanceJSON, BillingCreditBalanceResource, BillingCreditLedgerJSON, BillingCreditLedgerResource, BillingCredits, BillingCreditsJSON, BillingDiscountRedemption, BillingDiscountRedemptionJSON, BillingDiscounts, BillingDiscountsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerCredit, BillingPayerCreditJSON, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPaymentTotals, BillingPaymentTotalsJSON, BillingPerUnitTotal, BillingPerUnitTotalJSON, BillingPerUnitTotalTier, BillingPerUnitTotalTierJSON, BillingPeriodTotals, BillingPeriodTotalsJSON, BillingPlanJSON, BillingPlanPrice, BillingPlanResource, BillingPlanUnitPrice, BillingPlanUnitPriceJSON, BillingPlanUnitPriceTier, BillingPlanUnitPriceTierJSON, BillingPriceJSON, BillingProrationCreditDetail, BillingProrationCreditDetailJSON, BillingProrationDiscount, BillingProrationDiscountJSON, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemNextPayment, BillingSubscriptionItemNextPaymentJSON, BillingSubscriptionItemResource, BillingSubscriptionItemSeats, BillingSubscriptionItemSeatsJSON, BillingSubscriptionJSON, BillingSubscriptionNextPayment, BillingSubscriptionNextPaymentJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BillingTotals, BillingTotalsJSON, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BrowserClerk, BrowserClerkConstructor, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutErrors, CheckoutFlowFinalizeParams, CheckoutFlowResource, CheckoutFlowResourceNonStrict, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAPIError, ClerkAPIErrorJSON, ClerkAPIResponseError, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkOptionsNavigation, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkProp, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkStatus, ClerkThemeOptions, ClerkUI, ClerkUIConstructor, ClerkUIInstance, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ComponentControls, ConfigureSSOProps, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateDirectorySyncParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateMeEnterpriseConnectionParams, CreateOrganizationDomainParams, CreateOrganizationEnterpriseConnectionParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DecorateUrl, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncRunStatus, DirectorySyncStatusJSON, DirectorySyncStatusResource, DirectorySyncUserJSON, DirectorySyncUserResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseConnectionJSON, EnterpriseConnectionJSONSnapshot, EnterpriseConnectionResource, EnterpriseConnectionTestRunInitJSON, EnterpriseConnectionTestRunInitResource, EnterpriseConnectionTestRunJSON, EnterpriseConnectionTestRunJSONSnapshot, EnterpriseConnectionTestRunLogJSON, EnterpriseConnectionTestRunLogResource, EnterpriseConnectionTestRunOauthPayloadJSON, EnterpriseConnectionTestRunOauthPayloadResource, EnterpriseConnectionTestRunParsedUserInfoJSON, EnterpriseConnectionTestRunParsedUserInfoResource, EnterpriseConnectionTestRunResource, EnterpriseConnectionTestRunSamlPayloadJSON, EnterpriseConnectionTestRunSamlPayloadResource, EnterpriseConnectionTestRunStatus, EnterpriseConnectionTestRunsPaginatedJSON, EnterpriseOAuthConfigJSON, EnterpriseOAuthConfigResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnterpriseSamlConnectionNestedJSON, EnterpriseSamlConnectionNestedResource, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontWeight, ForPayerType, ForceNull, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetCreditBalanceParams, GetCreditHistoryParams, GetDirectorySyncUsersParams, GetDomainsParams, GetEnterpriseConnectionTestRunsParams, GetEnterpriseConnectionsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOAuthConsentInfoParams, GetOrganizationMemberships, GetPaymentAttemptParams, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlanParams, GetPlansParams, GetRolesParams, GetRolesResponse, GetStatementParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InternalClerkScriptProps, InviteMemberParams, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersParams, InviteMembersProps, IsomorphicClerkOptions, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, ListenerOptions, LoadedClerk, LocalizationResource, LocalizationValue, LookupOAuthDeviceVerificationParams, MakeDefaultPaymentMethodParams, MeEnterpriseConnectionOidcInput, MeEnterpriseConnectionProvider, MeEnterpriseConnectionSamlInput, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, OAUTH_PROVIDERS, OAuthApplicationNamespace, OAuthConfig, OAuthConsentInfo, OAuthConsentInfoJSON, OAuthConsentProps, OAuthConsentScope, OAuthConsentScopeJSON, OAuthDeviceVerificationInfo, OAuthDeviceVerificationInfoJSON, OAuthDeviceVerificationProps, OAuthDeviceVerificationResult, OAuthDeviceVerificationResultJSON, OAuthDeviceVerificationScope, OAuthDeviceVerificationStatus, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OAuthTransport, OKXWalletWeb3Provider, OauthFactor, OffEventListener, OnEventListener, OrganizationCreationAdvisorySeverity, OrganizationCreationAdvisoryType, OrganizationCreationDefaultsJSON, OrganizationCreationDefaultsJSONSnapshot, OrganizationCreationDefaultsResource, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainBulkOwnershipVerificationError, OrganizationDomainBulkOwnershipVerificationErrorJSON, OrganizationDomainJSON, OrganizationDomainOwnershipVerification, OrganizationDomainOwnershipVerificationJSON, OrganizationDomainOwnershipVerificationStatus, OrganizationDomainOwnershipVerificationStrategy, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationDomainsBulkOwnershipVerificationJSON, OrganizationDomainsBulkOwnershipVerificationResource, OrganizationEnrollmentMode, OrganizationEnterpriseConnectionOidcInput, OrganizationEnterpriseConnectionProvider, OrganizationEnterpriseConnectionSamlInput, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, ProfilePageId, ProfileSectionId, ProtectAssertion, ProtectAssertionResolver, ProtectCheckContinuation, ProtectCheckField, ProtectCheckFlow, ProtectCheckJSON, ProtectCheckResource, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectParams, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemoveFunctions, RemovePaymentMethodParams, RemoveUserPasswordParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ResumeAfterProtectCheckParams, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource, SamlIdp, SamlIdpMap, SamlIdpSlug, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetDirectorySyncCredentialsParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, ShowProps, ShowWhenCondition, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAEmailCodeVerifyParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordPhoneCodeSendParams, SignInFutureResetPasswordPhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureSubmitProtectCheckParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureAdditionalParams, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureEmailLinkSendParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureSubmitProtectCheckParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureVerifications, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, SubmitOAuthDeviceVerificationParams, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TwitchOauthProvider, TwitterOauthProvider, UIVersion, UnsubscribeCallback, UpdateCheckoutParams, UpdateDirectorySyncParams, UpdateEnrollmentModeParams, UpdateMeEnterpriseConnectionParams, UpdateMembershipParams, UpdateOrganizationEnterpriseConnectionParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserButtonProps, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistErrors, WaitlistFields, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistSignal, WaitlistSignalValue, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, WithOptionalOrgType, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_ProtectCheckModalProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
88
+ export type { APIKeyResource, APIKeysNamespace, APIKeysProps, APIKeysSettingsJSON, APIKeysSettingsJSONSnapshot, APIKeysSettingsResource, ActClaim, ActClaimType, ActJWTClaim, Actions, ActiveSessionResource, AddMemberParams, AddPaymentMethodParams, AddSSOBypassAllowlistUserParams, AddSSOBypassAllowlistUsersParams, AfterMultiSessionSingleSignOutUrl, AfterSignOutUrl, AgentActClaim, AgentIDOauthProvider, AlertId, ApiKeyJSON, AppleIdTokenStrategy, AppleOauthProvider, AtlassianOauthProvider, AttackProtectionData, AttemptAffiliationVerificationParams, AttemptEmailAddressVerificationParams, AttemptFirstFactorParams, AttemptPhoneNumberVerificationParams, AttemptSecondFactorParams, AttemptVerificationParams, AttemptWeb3WalletVerificationParams, Attribute, AttributeData, AttributeDataJSON, Attributes, AttributesJSON, AuthConfigJSON, AuthConfigJSONSnapshot, AuthConfigResource, AuthenticateWithBaseParams, AuthenticateWithCoinbaseWalletParams, AuthenticateWithGoogleOneTapParams, AuthenticateWithMetamaskParams, AuthenticateWithOKXWalletParams, AuthenticateWithPasskeyParams, AuthenticateWithPopupParams, AuthenticateWithRedirectParams, AuthenticateWithSolanaParams, AuthenticateWithWeb3Params, Autocomplete, BackupCodeAttempt, BackupCodeFactor, BackupCodeJSON, BackupCodeResource, BackupCodeStrategy, BaseWeb3Provider, BillingAppliedDiscount, BillingAppliedDiscountJSON, BillingCheckoutJSON, BillingCheckoutResource, BillingCheckoutTotals, BillingCheckoutTotalsJSON, BillingCreditBalanceJSON, BillingCreditBalanceResource, BillingCreditLedgerJSON, BillingCreditLedgerResource, BillingCredits, BillingCreditsJSON, BillingDiscountRedemption, BillingDiscountRedemptionJSON, BillingDiscounts, BillingDiscountsJSON, BillingInitializedPaymentMethodJSON, BillingInitializedPaymentMethodResource, BillingMoneyAmount, BillingMoneyAmountJSON, BillingNamespace, BillingPayerCredit, BillingPayerCreditJSON, BillingPayerJSON, BillingPayerMethods, BillingPayerResource, BillingPayerResourceType, BillingPaymentChargeType, BillingPaymentJSON, BillingPaymentMethodJSON, BillingPaymentMethodResource, BillingPaymentMethodStatus, BillingPaymentResource, BillingPaymentStatus, BillingPaymentTotals, BillingPaymentTotalsJSON, BillingPerUnitTotal, BillingPerUnitTotalJSON, BillingPerUnitTotalTier, BillingPerUnitTotalTierJSON, BillingPeriodTotals, BillingPeriodTotalsJSON, BillingPlanJSON, BillingPlanPrice, BillingPlanResource, BillingPlanUnitPrice, BillingPlanUnitPriceJSON, BillingPlanUnitPriceTier, BillingPlanUnitPriceTierJSON, BillingPriceJSON, BillingProrationCreditDetail, BillingProrationCreditDetailJSON, BillingProrationDiscount, BillingProrationDiscountJSON, BillingStatementGroup, BillingStatementGroupJSON, BillingStatementJSON, BillingStatementResource, BillingStatementStatus, BillingStatementTotals, BillingStatementTotalsJSON, BillingSubscriptionItemJSON, BillingSubscriptionItemNextPayment, BillingSubscriptionItemNextPaymentJSON, BillingSubscriptionItemResource, BillingSubscriptionItemSeats, BillingSubscriptionItemSeatsJSON, BillingSubscriptionJSON, BillingSubscriptionNextPayment, BillingSubscriptionNextPaymentJSON, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, BillingSubscriptionStatus, BillingTotals, BillingTotalsJSON, BitbucketOauthProvider, BoxOauthProvider, BoxShadow, BrowserClerk, BrowserClerkConstructor, BuiltInColors, CamelToSnake, CancelSubscriptionParams, CaptchaProvider, CaptchaWidgetType, CardActionId, CheckAuthorization, CheckAuthorizationFn, CheckAuthorizationFromSessionClaims, CheckAuthorizationParamsFromSessionClaims, CheckAuthorizationParamsWithCustomPermissions, CheckAuthorizationWithCustomPermissions, CheckoutErrors, CheckoutFlowFinalizeParams, CheckoutFlowResource, CheckoutFlowResourceNonStrict, CheckoutSignal, CheckoutSignalValue, Clerk, ClerkAPIError, ClerkAPIErrorJSON, ClerkAPIResponseError, ClerkAppearanceTheme, ClerkAuthenticateWithWeb3Params, ClerkEventPayload, ClerkHostRouter, ClerkJWTClaims, ClerkOptions, ClerkOptionsNavigation, ClerkPaginatedResponse, ClerkPaginationParams, ClerkPaginationRequest, ClerkProp, ClerkResource, ClerkResourceJSON, ClerkResourceReloadParams, ClerkRuntimeError, ClerkStatus, ClerkThemeOptions, ClerkUI, ClerkUIConstructor, ClerkUIInstance, ClientJSON, ClientJSONSnapshot, ClientResource, ClientTrustState, CodeVerificationAttemptParam, CoinbaseOauthProvider, CoinbaseWalletWeb3Provider, Color, ColorString, CommerceSettingsJSON, CommerceSettingsJSONSnapshot, CommerceSettingsResource, ComplexityErrors, ComponentControls, ConfigureSSOProps, ConfirmCheckoutParams, CreateAPIKeyParams, CreateBulkOrganizationInvitationParams, CreateCheckoutParams, CreateDirectorySyncParams, CreateEmailAddressParams, CreateEmailLinkFlowReturn, CreateEnterpriseSSOLinkFlowReturn, CreateExternalAccountParams, CreateMeEnterpriseConnectionParams, CreateOrganizationDomainParams, CreateOrganizationEnterpriseConnectionParams, CreateOrganizationInvitationParams, CreateOrganizationModalProps, CreateOrganizationParams, CreateOrganizationProps, CreatePhoneNumberParams, CreateWeb3WalletParams, CredentialReturn, CustomMenuItem, CustomNavigation, CustomOAuthStrategy, CustomOauthProvider, CustomPage, DecorateUrl, DeepCamelToSnake, DeepPartial, DeepRequired, DeepSnakeToCamel, DeletedObjectJSON, DeletedObjectResource, DevToolsResource, DirectorySyncJSON, DirectorySyncJSONSnapshot, DirectorySyncProvider, DirectorySyncResource, DirectorySyncRunStatus, DirectorySyncStatusJSON, DirectorySyncStatusResource, DirectorySyncUserJSON, DirectorySyncUserResource, DiscordOauthProvider, DisplayConfigJSON, DisplayConfigJSONSnapshot, DisplayConfigResource, DisplayThemeJSON, DomainOrProxyUrl, DropboxOauthProvider, EmUnit, EmailAddressIdentifier, EmailAddressJSON, EmailAddressJSONSnapshot, EmailAddressOrPhoneNumberIdentifier, EmailAddressResource, EmailCodeAttempt, EmailCodeConfig, EmailCodeFactor, EmailCodeSecondFactorConfig, EmailCodeStrategy, EmailLinkConfig, EmailLinkFactor, EmailLinkStrategy, EnableEnvironmentSettingParams, EnstallOauthProvider, EnterpriseAccountConnectionJSON, EnterpriseAccountConnectionJSONSnapshot, EnterpriseAccountConnectionResource, EnterpriseAccountJSON, EnterpriseAccountJSONSnapshot, EnterpriseAccountResource, EnterpriseConnectionJSON, EnterpriseConnectionJSONSnapshot, EnterpriseConnectionResource, EnterpriseConnectionTestRunInitJSON, EnterpriseConnectionTestRunInitResource, EnterpriseConnectionTestRunJSON, EnterpriseConnectionTestRunJSONSnapshot, EnterpriseConnectionTestRunLogJSON, EnterpriseConnectionTestRunLogResource, EnterpriseConnectionTestRunOauthPayloadJSON, EnterpriseConnectionTestRunOauthPayloadResource, EnterpriseConnectionTestRunParsedUserInfoJSON, EnterpriseConnectionTestRunParsedUserInfoResource, EnterpriseConnectionTestRunResource, EnterpriseConnectionTestRunSamlPayloadJSON, EnterpriseConnectionTestRunSamlPayloadResource, EnterpriseConnectionTestRunStatus, EnterpriseConnectionTestRunsPaginatedJSON, EnterpriseOAuthConfigJSON, EnterpriseOAuthConfigResource, EnterpriseProtocol, EnterpriseProvider, EnterpriseSSOConfig, EnterpriseSSOFactor, EnterpriseSSOSettings, EnterpriseSSOStrategy, EnterpriseSamlConnectionNestedJSON, EnterpriseSamlConnectionNestedResource, EnvironmentJSON, EnvironmentJSONSnapshot, EnvironmentResource, Errors, EthereumWeb3Provider, ExternalAccountJSON, ExternalAccountJSONSnapshot, ExternalAccountResource, FacebookOauthProvider, FeatureJSON, FeatureResource, FieldError, FieldId, FirstNameAttribute, FontWeight, ForPayerType, ForceNull, GenerateSignature, GenerateSignatureParams, GetAPIKeysParams, GetCreditBalanceParams, GetCreditHistoryParams, GetDirectorySyncUsersParams, GetDomainsParams, GetEnterpriseConnectionTestRunsParams, GetEnterpriseConnectionsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetMemberships, GetOAuthConsentInfoParams, GetOrganizationMemberships, GetPaymentAttemptParams, GetPaymentAttemptsParams, GetPaymentMethodsParams, GetPlanParams, GetPlansParams, GetRolesParams, GetRolesResponse, GetStatementParams, GetStatementsParams, GetSubscriptionParams, GetToken, GetTokenOptions, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, GithubOauthProvider, GitlabOauthProvider, GoogleOauthProvider, GoogleOneTapProps, GoogleOneTapStrategy, HandleEmailLinkVerificationParams, HandleOAuthCallbackParams, HandleSamlCallbackParams, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, HexColor, HexColorString, HslaColor, HslaColorString, HubspotOauthProvider, HuggingfaceOAuthProvider, IdentificationLinkJSON, IdentificationLinkJSONSnapshot, IdentificationLinkResource, ImageJSON, ImageResource, InitialState, InitializePaymentMethodParams, InstagramOauthProvider, InstanceType, InternalClerkScriptProps, InviteMemberParams, InviteMembersButtonProps, InviteMembersModalProps, InviteMembersParams, InviteMembersProps, IsomorphicClerkOptions, JWT, JWTClaims, JWTHeader, JoinWaitlistParams, Jwt, JwtHeader, JwtPayload, LastAuthenticationStrategy, LastNameAttribute, LegalAcceptedAttribute, LineOauthProvider, LinearOauthProvider, LinkedinOIDCOauthProvider, LinkedinOauthProvider, ListenerCallback, ListenerOptions, LoadedClerk, LocalizationResource, LocalizationValue, LookupOAuthDeviceVerificationParams, MakeDefaultPaymentMethodParams, MeEnterpriseConnectionOidcInput, MeEnterpriseConnectionProvider, MeEnterpriseConnectionSamlInput, MenuId, MetamaskWeb3Provider, MicrosoftOauthProvider, MultiDomainAndOrProxy, MultiDomainAndOrProxyPrimitives, NavigateOptions, NewSubscriptionRedirectUrl, NotionOauthProvider, Nullable, NullableSignInSignal, NullableSignUpSignal, NullableWaitlistSignal, OAUTH_PROVIDERS, OAuthApplicationNamespace, OAuthConfig, OAuthConsentInfo, OAuthConsentInfoJSON, OAuthConsentProps, OAuthConsentScope, OAuthConsentScopeJSON, OAuthDeviceVerificationInfo, OAuthDeviceVerificationInfoJSON, OAuthDeviceVerificationProps, OAuthDeviceVerificationResult, OAuthDeviceVerificationResultJSON, OAuthDeviceVerificationScope, OAuthDeviceVerificationStatus, OAuthProvider, OAuthProviderData, OAuthProviderSettings, OAuthProviders, OAuthScope, OAuthStrategy, OAuthTransport, OKXWalletWeb3Provider, OauthFactor, OffEventListener, OnEventListener, OrganizationCreationAdvisorySeverity, OrganizationCreationAdvisoryType, OrganizationCreationDefaultsJSON, OrganizationCreationDefaultsJSONSnapshot, OrganizationCreationDefaultsResource, OrganizationCustomPermissionKey, OrganizationCustomRoleKey, OrganizationDomainBulkOwnershipVerificationError, OrganizationDomainBulkOwnershipVerificationErrorJSON, OrganizationDomainJSON, OrganizationDomainOwnershipVerification, OrganizationDomainOwnershipVerificationJSON, OrganizationDomainOwnershipVerificationStatus, OrganizationDomainOwnershipVerificationStrategy, OrganizationDomainResource, OrganizationDomainVerification, OrganizationDomainVerificationJSON, OrganizationDomainVerificationStatus, OrganizationDomainsBulkOwnershipVerificationJSON, OrganizationDomainsBulkOwnershipVerificationResource, OrganizationEnrollmentMode, OrganizationEnterpriseConnectionOidcInput, OrganizationEnterpriseConnectionProvider, OrganizationEnterpriseConnectionSamlInput, OrganizationInvitationJSON, OrganizationInvitationResource, OrganizationInvitationStatus, OrganizationJSON, OrganizationJSONSnapshot, OrganizationListProps, OrganizationMembershipJSON, OrganizationMembershipJSONSnapshot, OrganizationMembershipRequestJSON, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationPermissionKey, OrganizationPreviewId, OrganizationProfileModalProps, OrganizationProfileProps, OrganizationResource, OrganizationSettingsJSON, OrganizationSettingsJSONSnapshot, OrganizationSettingsResource, OrganizationSuggestionJSON, OrganizationSuggestionResource, OrganizationSuggestionStatus, OrganizationSwitcherProps, OrganizationSystemPermissionKey, OrganizationSystemPermissionPrefix, OrganizationsJWTClaim, Override, PartialWithClerkResource, PassKeyConfig, PasskeyAttempt, PasskeyFactor, PasskeyJSON, PasskeyJSONSnapshot, PasskeyResource, PasskeySettingsData, PasskeyStrategy, PasskeyVerificationResource, PasswordAttempt, PasswordAttribute, PasswordFactor, PasswordSettingsData, PasswordStrategy, PasswordStrength, PasswordValidation, PathValue, PaymentGateway, PendingSessionOptions, PendingSessionResource, PermissionJSON, PermissionResource, PhoneCodeAttempt, PhoneCodeChannel, PhoneCodeChannelData, PhoneCodeConfig, PhoneCodeFactor, PhoneCodeProvider, PhoneCodeSMSChannel, PhoneCodeSecondFactorConfig, PhoneCodeStrategy, PhoneCodeWhatsAppChannel, PhoneNumberIdentifier, PhoneNumberJSON, PhoneNumberJSONSnapshot, PhoneNumberResource, PhoneNumberVerificationStrategy, PreferredSignInStrategy, PrepareAffiliationVerificationParams, PrepareEmailAddressVerificationParams, PrepareFirstFactorParams, PreparePhoneNumberVerificationParams, PrepareSecondFactorParams, PrepareVerificationParams, PrepareWeb3WalletVerificationParams, PricingTableProps, ProfilePageId, ProfileSectionId, ProtectAssertion, ProtectAssertionResolver, ProtectCheckContinuation, ProtectCheckField, ProtectCheckJSON, ProtectCheckResource, ProtectConfigJSON, ProtectConfigJSONSnapshot, ProtectConfigResource, ProtectLoader, ProtectParams, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsJSON, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, PublicOrganizationDataJSON, PublicUserData, PublicUserDataJSON, PublicUserDataJSONSnapshot, PublishableKey, ReauthorizeExternalAccountParams, RecordToPath, RedirectOptions, RedirectUrlProp, RemoveFunctions, RemovePaymentMethodParams, RemoveUserPasswordParams, ResetPasswordCodeFactor, ResetPasswordEmailCodeAttempt, ResetPasswordEmailCodeFactor, ResetPasswordEmailCodeFactorConfig, ResetPasswordEmailCodeStrategy, ResetPasswordParams, ResetPasswordPhoneCodeAttempt, ResetPasswordPhoneCodeFactor, ResetPasswordPhoneCodeFactorConfig, ResetPasswordPhoneCodeStrategy, Resources, ResumeAfterProtectCheckParams, ReverificationConfig, RevokeAPIKeyParams, RgbaColor, RgbaColorString, RoleJSON, RoleResource, RoutingMode, RoutingOptions, RoutingStrategy, SAML_IDPS, SDKMetadata, SSOBypassAllowlistBulkCreateError, SSOBypassAllowlistBulkCreateErrorJSON, SSOBypassAllowlistBulkCreateJSON, SSOBypassAllowlistBulkCreateResult, SSOBypassAllowlistResource, SSOBypassAllowlistUserJSON, SSOBypassAllowlistUserJSONSnapshot, SSOBypassAllowlistUserResource, SamlIdp, SamlIdpMap, SamlIdpSlug, SelectId, Serializable, ServerGetToken, ServerGetTokenOptions, SessionActivity, SessionActivityJSON, SessionJSON, SessionJSONSnapshot, SessionResource, SessionStatus, SessionStatusClaim, SessionTask, SessionTouchIntent, SessionTouchParams, SessionVerificationAfterMinutes, SessionVerificationFirstFactor, SessionVerificationJSON, SessionVerificationLevel, SessionVerificationResource, SessionVerificationSecondFactor, SessionVerificationStatus, SessionVerificationTypes, SessionVerifyAttemptFirstFactorParams, SessionVerifyAttemptSecondFactorParams, SessionVerifyCreateParams, SessionVerifyPrepareFirstFactorParams, SessionVerifyPrepareSecondFactorParams, SessionWithActivitiesJSON, SessionWithActivitiesResource, SetActive, SetActiveNavigate, SetActiveParams, SetDirectorySyncCredentialsParams, SetOrganizationLogoParams, SetProfileImageParams, SetReservedForSecondFactorParams, SharedSignedInAuthObjectProperties, ShowProps, ShowWhenCondition, SignInAuthenticateWithSolanaParams, SignInButtonProps, SignInCreateParams, SignInData, SignInErrors, SignInFactor, SignInFallbackRedirectUrl, SignInFields, SignInFirstFactor, SignInFirstFactorJSON, SignInForceRedirectUrl, SignInFutureBackupCodeVerifyParams, SignInFutureCreateParams, SignInFutureEmailCodeSendParams, SignInFutureEmailCodeVerifyParams, SignInFutureEmailLinkSendParams, SignInFutureFinalizeParams, SignInFutureMFAEmailCodeVerifyParams, SignInFutureMFAPhoneCodeVerifyParams, SignInFuturePasskeyParams, SignInFuturePasswordParams, SignInFuturePhoneCodeSendParams, SignInFuturePhoneCodeVerifyParams, SignInFutureResetPasswordPhoneCodeSendParams, SignInFutureResetPasswordPhoneCodeVerifyParams, SignInFutureResetPasswordSubmitParams, SignInFutureResource, SignInFutureSSOParams, SignInFutureSubmitProtectCheckParams, SignInFutureTOTPVerifyParams, SignInFutureTicketParams, SignInFutureWeb3Params, SignInIdentifier, SignInInitialValues, SignInJSON, SignInJSONSnapshot, SignInModalProps, SignInProps, SignInRedirectOptions, SignInResource, SignInSecondFactor, SignInSecondFactorJSON, SignInSignal, SignInSignalValue, SignInStartEmailLinkFlowParams, SignInStatus, SignInStrategy, SignOut, SignOutCallback, SignOutOptions, SignUpAttributeField, SignUpAuthenticateWithMetamaskParams, SignUpAuthenticateWithSolanaParams, SignUpAuthenticateWithWeb3Params, SignUpButtonProps, SignUpCreateParams, SignUpData, SignUpEnterpriseConnectionJSON, SignUpEnterpriseConnectionResource, SignUpErrors, SignUpFallbackRedirectUrl, SignUpField, SignUpFields, SignUpForceRedirectUrl, SignUpFutureAdditionalParams, SignUpFutureCreateParams, SignUpFutureEmailCodeVerifyParams, SignUpFutureEmailLinkSendParams, SignUpFutureFinalizeParams, SignUpFuturePasswordParams, SignUpFuturePhoneCodeSendParams, SignUpFuturePhoneCodeVerifyParams, SignUpFutureResource, SignUpFutureSSOParams, SignUpFutureSubmitProtectCheckParams, SignUpFutureTicketParams, SignUpFutureUpdateParams, SignUpFutureVerifications, SignUpFutureWeb3Params, SignUpIdentificationField, SignUpInitialValues, SignUpJSON, SignUpJSONSnapshot, SignUpModalProps, SignUpModes, SignUpProps, SignUpRedirectOptions, SignUpResource, SignUpSignal, SignUpSignalValue, SignUpStatus, SignUpUpdateParams, SignUpVerifiableField, SignUpVerificationJSON, SignUpVerificationJSONSnapshot, SignUpVerificationResource, SignUpVerificationsJSON, SignUpVerificationsJSONSnapshot, SignUpVerificationsResource, SignatureVerificationAttemptParam, SignedInSessionResource, Simplify, SlackOauthProvider, SnakeToCamel, SolanaWeb3Provider, SpotifyOauthProvider, StartEmailLinkFlowParams, StartEnterpriseSSOLinkFlowParams, State, SubmitOAuthDeviceVerificationParams, TOTPAttempt, TOTPFactor, TOTPJSON, TOTPResource, TOTPStrategy, TaskChooseOrganizationProps, TaskResetPasswordProps, TaskSetupMFAProps, TasksRedirectOptions, TelemetryCollector, TelemetryEvent, TelemetryEventRaw, TelemetryLogEntry, TicketStrategy, TiktokOauthProvider, TokenJSON, TokenJSONSnapshot, TokenResource, TransferableOption, TransparentColor, TwitchOauthProvider, TwitterOauthProvider, UIVersion, UnsubscribeCallback, UpdateCheckoutParams, UpdateDirectorySyncParams, UpdateEnrollmentModeParams, UpdateMeEnterpriseConnectionParams, UpdateMembershipParams, UpdateOrganizationEnterpriseConnectionParams, UpdateOrganizationMembershipParams, UpdateOrganizationParams, UpdatePasskeyParams, UpdateUserMetadataParams, UpdateUserParams, UpdateUserPasswordParams, UseAuthReturn, UseSessionListReturn, UseSessionReturn, UseSignInReturn, UseSignUpReturn, UseUserReturn, UserAvatarProps, UserButtonProps, UserData, UserDataJSON, UserDataJSONSnapshot, UserJSON, UserJSONSnapshot, UserOrganizationInvitationJSON, UserOrganizationInvitationResource, UserPreviewId, UserProfileModalProps, UserProfileProps, UserResource, UserSettingsJSON, UserSettingsJSONSnapshot, UserSettingsResource, UsernameIdentifier, UsernameSettingsData, ValidatePasswordCallbacks, VercelOauthProvider, VerificationAttemptParams, VerificationJSON, VerificationJSONSnapshot, VerificationResource, VerificationStatus, VerificationStrategy, VerifyTOTPParams, VersionedJwtPayload, WEB3_PROVIDERS, WaitlistErrors, WaitlistFields, WaitlistJSON, WaitlistModalProps, WaitlistProps, WaitlistResource, WaitlistSignal, WaitlistSignalValue, Web3Attempt, Web3Provider, Web3ProviderData, Web3SignatureConfig, Web3SignatureFactor, Web3Strategy, Web3WalletIdentifier, Web3WalletJSON, Web3WalletJSONSnapshot, Web3WalletResource, WithOptionalOrgType, Without, WithoutRouting, XOauthProvider, XeroOauthProvider, ZxcvbnResult, __experimental_CheckoutButtonProps, __experimental_CheckoutCacheState, __experimental_CheckoutOptions, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps, __internal_AttemptToEnableEnvironmentSettingParams, __internal_AttemptToEnableEnvironmentSettingResult, __internal_CheckoutProps, __internal_EnableOrganizationsPromptProps, __internal_LocalizationResource, __internal_OAuthConsentProps, __internal_PlanDetailsProps, __internal_SubscriptionDetailsProps, __internal_UserVerificationModalProps, __internal_UserVerificationProps, getOAuthProviderData, getWeb3ProviderData, sortedOAuthProviders };
@@ -1,5 +1,5 @@
1
1
  import { ModuleManager } from "../moduleManager.mjs";
2
- import { Clerk, ClerkOptions, __internal_ProtectCheckModalProps } from "../types/clerk.mjs";
2
+ import { Clerk, ClerkOptions } from "../types/clerk.mjs";
3
3
  import { EnvironmentResource } from "../types/environment.mjs";
4
4
  //#region src/ui/types.d.ts
5
5
  type Appearance = any;
@@ -30,7 +30,6 @@ type ComponentControls = {
30
30
  }) => void;
31
31
  prefetch: (component: 'organizationSwitcher') => void;
32
32
  mountImpersonationFab: () => void;
33
- openProtectCheckModal?: (props: __internal_ProtectCheckModalProps) => void;
34
33
  };
35
34
  interface ClerkUIInstance {
36
35
  version: string;
@@ -1,5 +1,5 @@
1
1
  import { ModuleManager } from "../moduleManager.js";
2
- import { Clerk, ClerkOptions, __internal_ProtectCheckModalProps } from "../types/clerk.js";
2
+ import { Clerk, ClerkOptions } from "../types/clerk.js";
3
3
  import { EnvironmentResource } from "../types/environment.js";
4
4
  //#region src/ui/types.d.ts
5
5
  type Appearance = any;
@@ -30,7 +30,6 @@ type ComponentControls = {
30
30
  }) => void;
31
31
  prefetch: (component: 'organizationSwitcher') => void;
32
32
  mountImpersonationFab: () => void;
33
- openProtectCheckModal?: (props: __internal_ProtectCheckModalProps) => void;
34
33
  };
35
34
  interface ClerkUIInstance {
36
35
  version: string;
@@ -12,7 +12,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
12
12
  * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided
13
13
  * @returns The npm tag, version or major version to use
14
14
  */
15
- const versionSelector = (clerkJSVersion, packageVersion = "6.35.0-snapshot.v20260929195855") => {
15
+ const versionSelector = (clerkJSVersion, packageVersion = "6.35.0") => {
16
16
  if (clerkJSVersion) return clerkJSVersion;
17
17
  const prereleaseTag = getPrereleaseTag(packageVersion);
18
18
  if (prereleaseTag) {
@@ -1 +1 @@
1
- {"version":3,"file":"versionSelector.js","names":[],"sources":["../src/versionSelector.ts"],"sourcesContent":["/**\n * This version selector is a bit complicated, so here is the flow:\n * 1. Use the clerkJSVersion prop on the provider\n * 2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease\n * 3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided\n * 4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided\n *\n * @param clerkJSVersion - The optional clerkJSVersion prop on the provider\n * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided\n * @returns The npm tag, version or major version to use\n */\nexport const versionSelector = (clerkJSVersion: string | undefined, packageVersion = JS_PACKAGE_VERSION) => {\n if (clerkJSVersion) {\n return clerkJSVersion;\n }\n\n const prereleaseTag = getPrereleaseTag(packageVersion);\n if (prereleaseTag) {\n if (prereleaseTag === 'snapshot') {\n return packageVersion;\n }\n\n return prereleaseTag;\n }\n\n return getMajorVersion(packageVersion);\n};\n\nconst getPrereleaseTag = (packageVersion: string) =>\n packageVersion\n .trim()\n .replace(/^v/, '')\n .match(/-(.+?)(\\.|$)/)?.[1];\n\nexport const getMajorVersion = (packageVersion: string) => packageVersion.trim().replace(/^v/, '').split('.')[0];\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAa,mBAAmB,gBAAoC,uDAAwC;CAC1G,IAAI,gBACF,OAAO;CAGT,MAAM,gBAAgB,iBAAiB,cAAc;CACrD,IAAI,eAAe;EACjB,IAAI,kBAAkB,YACpB,OAAO;EAGT,OAAO;CACT;CAEA,OAAO,gBAAgB,cAAc;AACvC;AAEA,MAAM,oBAAoB,mBACxB,eACG,KAAK,CAAC,CACN,QAAQ,MAAM,EAAE,CAAC,CACjB,MAAM,cAAc,CAAC,GAAG;AAE7B,MAAa,mBAAmB,mBAA2B,eAAe,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"versionSelector.js","names":[],"sources":["../src/versionSelector.ts"],"sourcesContent":["/**\n * This version selector is a bit complicated, so here is the flow:\n * 1. Use the clerkJSVersion prop on the provider\n * 2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease\n * 3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided\n * 4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided\n *\n * @param clerkJSVersion - The optional clerkJSVersion prop on the provider\n * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided\n * @returns The npm tag, version or major version to use\n */\nexport const versionSelector = (clerkJSVersion: string | undefined, packageVersion = JS_PACKAGE_VERSION) => {\n if (clerkJSVersion) {\n return clerkJSVersion;\n }\n\n const prereleaseTag = getPrereleaseTag(packageVersion);\n if (prereleaseTag) {\n if (prereleaseTag === 'snapshot') {\n return packageVersion;\n }\n\n return prereleaseTag;\n }\n\n return getMajorVersion(packageVersion);\n};\n\nconst getPrereleaseTag = (packageVersion: string) =>\n packageVersion\n .trim()\n .replace(/^v/, '')\n .match(/-(.+?)(\\.|$)/)?.[1];\n\nexport const getMajorVersion = (packageVersion: string) => packageVersion.trim().replace(/^v/, '').split('.')[0];\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAa,mBAAmB,gBAAoC,8BAAwC;CAC1G,IAAI,gBACF,OAAO;CAGT,MAAM,gBAAgB,iBAAiB,cAAc;CACrD,IAAI,eAAe;EACjB,IAAI,kBAAkB,YACpB,OAAO;EAGT,OAAO;CACT;CAEA,OAAO,gBAAgB,cAAc;AACvC;AAEA,MAAM,oBAAoB,mBACxB,eACG,KAAK,CAAC,CACN,QAAQ,MAAM,EAAE,CAAC,CACjB,MAAM,cAAc,CAAC,GAAG;AAE7B,MAAa,mBAAmB,mBAA2B,eAAe,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC"}
@@ -10,7 +10,7 @@
10
10
  * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided
11
11
  * @returns The npm tag, version or major version to use
12
12
  */
13
- const versionSelector = (clerkJSVersion, packageVersion = "6.35.0-snapshot.v20260929195855") => {
13
+ const versionSelector = (clerkJSVersion, packageVersion = "6.35.0") => {
14
14
  if (clerkJSVersion) return clerkJSVersion;
15
15
  const prereleaseTag = getPrereleaseTag(packageVersion);
16
16
  if (prereleaseTag) {
@@ -1 +1 @@
1
- {"version":3,"file":"versionSelector.mjs","names":[],"sources":["../src/versionSelector.ts"],"sourcesContent":["/**\n * This version selector is a bit complicated, so here is the flow:\n * 1. Use the clerkJSVersion prop on the provider\n * 2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease\n * 3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided\n * 4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided\n *\n * @param clerkJSVersion - The optional clerkJSVersion prop on the provider\n * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided\n * @returns The npm tag, version or major version to use\n */\nexport const versionSelector = (clerkJSVersion: string | undefined, packageVersion = JS_PACKAGE_VERSION) => {\n if (clerkJSVersion) {\n return clerkJSVersion;\n }\n\n const prereleaseTag = getPrereleaseTag(packageVersion);\n if (prereleaseTag) {\n if (prereleaseTag === 'snapshot') {\n return packageVersion;\n }\n\n return prereleaseTag;\n }\n\n return getMajorVersion(packageVersion);\n};\n\nconst getPrereleaseTag = (packageVersion: string) =>\n packageVersion\n .trim()\n .replace(/^v/, '')\n .match(/-(.+?)(\\.|$)/)?.[1];\n\nexport const getMajorVersion = (packageVersion: string) => packageVersion.trim().replace(/^v/, '').split('.')[0];\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,mBAAmB,gBAAoC,uDAAwC;CAC1G,IAAI,gBACF,OAAO;CAGT,MAAM,gBAAgB,iBAAiB,cAAc;CACrD,IAAI,eAAe;EACjB,IAAI,kBAAkB,YACpB,OAAO;EAGT,OAAO;CACT;CAEA,OAAO,gBAAgB,cAAc;AACvC;AAEA,MAAM,oBAAoB,mBACxB,eACG,KAAK,CAAC,CACN,QAAQ,MAAM,EAAE,CAAC,CACjB,MAAM,cAAc,CAAC,GAAG;AAE7B,MAAa,mBAAmB,mBAA2B,eAAe,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"versionSelector.mjs","names":[],"sources":["../src/versionSelector.ts"],"sourcesContent":["/**\n * This version selector is a bit complicated, so here is the flow:\n * 1. Use the clerkJSVersion prop on the provider\n * 2. Use the exact `@clerk/clerk-js` version if it is a `@snapshot` prerelease\n * 3. Use the prerelease tag of `@clerk/clerk-js` or the packageVersion provided\n * 4. Fallback to the major version of `@clerk/clerk-js` or the packageVersion provided\n *\n * @param clerkJSVersion - The optional clerkJSVersion prop on the provider\n * @param packageVersion - The version of `@clerk/clerk-js` that will be used if an explicit version is not provided\n * @returns The npm tag, version or major version to use\n */\nexport const versionSelector = (clerkJSVersion: string | undefined, packageVersion = JS_PACKAGE_VERSION) => {\n if (clerkJSVersion) {\n return clerkJSVersion;\n }\n\n const prereleaseTag = getPrereleaseTag(packageVersion);\n if (prereleaseTag) {\n if (prereleaseTag === 'snapshot') {\n return packageVersion;\n }\n\n return prereleaseTag;\n }\n\n return getMajorVersion(packageVersion);\n};\n\nconst getPrereleaseTag = (packageVersion: string) =>\n packageVersion\n .trim()\n .replace(/^v/, '')\n .match(/-(.+?)(\\.|$)/)?.[1];\n\nexport const getMajorVersion = (packageVersion: string) => packageVersion.trim().replace(/^v/, '').split('.')[0];\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,mBAAmB,gBAAoC,8BAAwC;CAC1G,IAAI,gBACF,OAAO;CAGT,MAAM,gBAAgB,iBAAiB,cAAc;CACrD,IAAI,eAAe;EACjB,IAAI,kBAAkB,YACpB,OAAO;EAGT,OAAO;CACT;CAEA,OAAO,gBAAgB,cAAc;AACvC;AAEA,MAAM,oBAAoB,mBACxB,eACG,KAAK,CAAC,CACN,QAAQ,MAAM,EAAE,CAAC,CACjB,MAAM,cAAc,CAAC,GAAG;AAE7B,MAAa,mBAAmB,mBAA2B,eAAe,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerk/shared",
3
- "version": "4.37.0-snapshot.v20260929195855",
3
+ "version": "4.37.0",
4
4
  "description": "Internal package utils used by the Clerk SDKs",
5
5
  "repository": {
6
6
  "type": "git",