@clerk/shared 3.35.1 → 3.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime/alternativePhoneCode.d.mts +1 -1
- package/dist/runtime/alternativePhoneCode.d.ts +1 -1
- package/dist/runtime/{apiUrlFromPublishableKey-DOAlYzda.d.ts → apiUrlFromPublishableKey-BK2JHLjb.d.ts} +2 -2
- package/dist/runtime/apiUrlFromPublishableKey-BK2JHLjb.d.ts.map +1 -0
- package/dist/runtime/apiUrlFromPublishableKey.d.ts +1 -1
- package/dist/runtime/authorization-errors.d.mts +1 -1
- package/dist/runtime/authorization-errors.d.ts +1 -1
- package/dist/runtime/authorization.d.mts +1 -1
- package/dist/runtime/authorization.d.mts.map +1 -1
- package/dist/runtime/authorization.d.ts +1 -1
- package/dist/runtime/clerkEventBus.d.mts +1 -1
- package/dist/runtime/clerkEventBus.d.ts +1 -1
- package/dist/runtime/{color-C4WEb-OX.d.ts → color-BJuf2abZ.d.ts} +2 -2
- package/dist/runtime/color-BJuf2abZ.d.ts.map +1 -0
- package/dist/runtime/{color-Cm1rXzsl.d.mts → color-BWxRgnuw.d.mts} +2 -2
- package/dist/runtime/{color-Cm1rXzsl.d.mts.map → color-BWxRgnuw.d.mts.map} +1 -1
- package/dist/runtime/color.d.mts +2 -2
- package/dist/runtime/color.d.ts +2 -2
- package/dist/runtime/date-DDNRUU0r.d.ts.map +1 -1
- package/dist/runtime/{deriveState-CGjGkEm1.d.ts → deriveState-BlkHvH6g.d.ts} +2 -2
- package/dist/runtime/{deriveState-CGjGkEm1.d.ts.map → deriveState-BlkHvH6g.d.ts.map} +1 -1
- package/dist/runtime/{deriveState-ZZ38X3Yb.d.mts → deriveState-o9no84Zo.d.mts} +2 -2
- package/dist/runtime/{deriveState-ZZ38X3Yb.d.mts.map → deriveState-o9no84Zo.d.mts.map} +1 -1
- package/dist/runtime/deriveState.d.mts +2 -2
- package/dist/runtime/deriveState.d.ts +2 -2
- package/dist/runtime/{error-FTbfymLH.d.mts → error-D7mHptsm.d.mts} +2 -2
- package/dist/runtime/{error-FTbfymLH.d.mts.map → error-D7mHptsm.d.mts.map} +1 -1
- package/dist/runtime/{error-D6NGfe7k.d.ts → error-DUHToUnE.d.ts} +2 -2
- package/dist/runtime/{error-D6NGfe7k.d.ts.map → error-DUHToUnE.d.ts.map} +1 -1
- package/dist/runtime/error.d.mts +2 -2
- package/dist/runtime/error.d.ts +2 -2
- package/dist/runtime/globs.d.mts.map +1 -1
- package/dist/runtime/{index-C5uDZEdc.d.ts → index-B48cufC_.d.mts} +3 -1
- package/dist/runtime/{index-_F9ZukqR.d.mts.map → index-B48cufC_.d.mts.map} +1 -1
- package/dist/runtime/{index-_F9ZukqR.d.mts → index-DI4GG9K4.d.ts} +3 -1
- package/dist/runtime/{index-C5uDZEdc.d.ts.map → index-DI4GG9K4.d.ts.map} +1 -1
- package/dist/runtime/index.d.mts +7 -7
- package/dist/runtime/index.d.ts +8 -8
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/index.mjs +2 -2
- package/dist/runtime/jwtPayloadParser.d.mts +1 -1
- package/dist/runtime/jwtPayloadParser.d.ts +1 -1
- package/dist/runtime/{keys-fE_BcoVi.d.mts → keys-CToOcaYh.d.mts} +2 -2
- package/dist/runtime/{keys-fE_BcoVi.d.mts.map → keys-CToOcaYh.d.mts.map} +1 -1
- package/dist/runtime/{keys-DdzF28d-.d.ts → keys-CZIl86HQ.d.ts} +2 -2
- package/dist/runtime/{keys-DdzF28d-.d.ts.map → keys-CZIl86HQ.d.ts.map} +1 -1
- package/dist/runtime/keys.d.mts +2 -2
- package/dist/runtime/keys.d.ts +2 -2
- package/dist/runtime/{loadClerkJsScript-BaBJTAgM.js → loadClerkJsScript-BS2150jv.js} +2 -2
- package/dist/runtime/{loadClerkJsScript-BaBJTAgM.js.map → loadClerkJsScript-BS2150jv.js.map} +1 -1
- package/dist/runtime/{loadClerkJsScript-amyia8eQ.d.ts → loadClerkJsScript-CVmbzyxS.d.ts} +2 -2
- package/dist/runtime/{loadClerkJsScript-amyia8eQ.d.ts.map → loadClerkJsScript-CVmbzyxS.d.ts.map} +1 -1
- package/dist/runtime/{loadClerkJsScript-CD13NyLj.d.mts → loadClerkJsScript-CWhB9ASv.d.mts} +2 -2
- package/dist/runtime/{loadClerkJsScript-CD13NyLj.d.mts.map → loadClerkJsScript-CWhB9ASv.d.mts.map} +1 -1
- package/dist/runtime/{loadClerkJsScript-BctCAY1Y.mjs → loadClerkJsScript-VXxafQD6.mjs} +2 -2
- package/dist/runtime/{loadClerkJsScript-BctCAY1Y.mjs.map → loadClerkJsScript-VXxafQD6.mjs.map} +1 -1
- package/dist/runtime/loadClerkJsScript.d.mts +2 -2
- package/dist/runtime/loadClerkJsScript.d.ts +2 -2
- package/dist/runtime/loadClerkJsScript.js +2 -2
- package/dist/runtime/loadClerkJsScript.mjs +2 -2
- package/dist/runtime/oauth.d.mts +1 -1
- package/dist/runtime/oauth.d.ts +1 -1
- package/dist/runtime/organization.d.mts +1 -1
- package/dist/runtime/organization.d.ts +1 -1
- package/dist/runtime/{pathMatcher-BNPlgGld.d.mts → pathMatcher-DfP6rsOw.d.mts} +2 -2
- package/dist/runtime/pathMatcher-DfP6rsOw.d.mts.map +1 -0
- package/dist/runtime/{pathMatcher-DW2tkgbM.d.ts → pathMatcher-WU_-IXYh.d.ts} +2 -2
- package/dist/runtime/pathMatcher-WU_-IXYh.d.ts.map +1 -0
- package/dist/runtime/pathMatcher.d.mts +2 -2
- package/dist/runtime/pathMatcher.d.ts +2 -2
- package/dist/runtime/poller-CIrx6NwR.d.ts.map +1 -1
- package/dist/runtime/react/index.d.mts +7 -7
- package/dist/runtime/react/index.d.ts +8 -8
- package/dist/runtime/router.d.mts +1 -1
- package/dist/runtime/router.d.ts +1 -1
- package/dist/runtime/saml.d.mts +1 -1
- package/dist/runtime/saml.d.ts +1 -1
- package/dist/runtime/telemetry.d.mts +1 -1
- package/dist/runtime/telemetry.d.ts +1 -1
- package/dist/runtime/types/index.d.mts +1 -1
- package/dist/runtime/types/index.d.ts +1 -1
- package/dist/runtime/url-Ty-8oURg.d.mts.map +1 -1
- package/dist/runtime/{versionSelector-CuP6bpmG.js → versionSelector-CvsZr-ts.js} +3 -3
- package/dist/runtime/{versionSelector-CuP6bpmG.js.map → versionSelector-CvsZr-ts.js.map} +1 -1
- package/dist/runtime/{versionSelector-DzegTfJe.mjs → versionSelector-wk5jCgUy.mjs} +3 -3
- package/dist/runtime/{versionSelector-DzegTfJe.mjs.map → versionSelector-wk5jCgUy.mjs.map} +1 -1
- package/dist/runtime/versionSelector.js +1 -1
- package/dist/runtime/versionSelector.mjs +1 -1
- package/dist/runtime/web3.d.mts +1 -1
- package/dist/runtime/web3.d.ts +1 -1
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/runtime/apiUrlFromPublishableKey-DOAlYzda.d.ts.map +0 -1
- package/dist/runtime/color-C4WEb-OX.d.ts.map +0 -1
- package/dist/runtime/pathMatcher-BNPlgGld.d.mts.map +0 -1
- package/dist/runtime/pathMatcher-DW2tkgbM.d.ts.map +0 -1
package/dist/runtime/index.d.mts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, createClerkGlobalHookError } from "./index-
|
|
1
|
+
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, createClerkGlobalHookError } from "./index-B48cufC_.mjs";
|
|
2
2
|
import { apiUrlFromPublishableKey } from "./apiUrlFromPublishableKey-BMA_oB1l.mjs";
|
|
3
3
|
import { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot } from "./browser-CwBluoYn.mjs";
|
|
4
|
-
import { colorToSameTypeString, hasAlpha, hexStringToRgbaColor, isHSLColor, isRGBColor, isTransparent, isValidHexString, isValidHslaString, isValidRgbaString, stringToHslaColor, stringToSameTypeColor } from "./color-
|
|
4
|
+
import { colorToSameTypeString, hasAlpha, hexStringToRgbaColor, isHSLColor, isRGBColor, isTransparent, isValidHexString, isValidHslaString, isValidRgbaString, stringToHslaColor, stringToSameTypeColor } from "./color-BWxRgnuw.mjs";
|
|
5
5
|
import { CURRENT_DEV_INSTANCE_SUFFIXES, DEV_OR_STAGING_SUFFIXES, LEGACY_DEV_INSTANCE_SUFFIXES, LOCAL_API_URL, LOCAL_ENV_SUFFIXES, PROD_API_URL, STAGING_API_URL, STAGING_ENV_SUFFIXES, iconImageUrl } from "./constants-UOcJjdve.mjs";
|
|
6
6
|
import { RelativeDateCase, addYears, dateTo12HourTime, differenceInCalendarDays, formatRelative, normalizeDate } from "./date-DIGfFkoy.mjs";
|
|
7
7
|
import { deprecated, deprecatedObjectProperty, deprecatedProperty } from "./deprecated-BRApxWmG.mjs";
|
|
8
|
-
import { deriveState } from "./deriveState-
|
|
8
|
+
import { deriveState } from "./deriveState-o9no84Zo.mjs";
|
|
9
9
|
import { DEV_BROWSER_JWT_KEY, extractDevBrowserJWTFromURL, setDevBrowserJWTInURL } from "./devBrowser-DGNGESpp.mjs";
|
|
10
|
-
import { ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from "./error-
|
|
10
|
+
import { ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from "./error-D7mHptsm.mjs";
|
|
11
11
|
import { SupportedMimeType, extension, readJSONFile } from "./file-BgHDMp4o.mjs";
|
|
12
12
|
import { getEnvVariable } from "./getEnvVariable-58tQPflG.mjs";
|
|
13
13
|
import { handleValueOrFn } from "./handleValueOrFn-2pqr_dC8.mjs";
|
|
14
14
|
import { allSettled, createDeferredPromise, fastDeepMergeAndKeep, fastDeepMergeAndReplace, isDevelopmentEnvironment, isProductionEnvironment, isStaging, isTestEnvironment, logErrorInDevMode, noop } from "./index-Dd9r-3AL.mjs";
|
|
15
15
|
import { isomorphicAtob } from "./isomorphicAtob-DqIxJQZE.mjs";
|
|
16
16
|
import { isomorphicBtoa } from "./isomorphicBtoa-Cu4s1rFu.mjs";
|
|
17
|
-
import { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey } from "./keys-
|
|
18
|
-
import { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-
|
|
17
|
+
import { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey } from "./keys-CToOcaYh.mjs";
|
|
18
|
+
import { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-CWhB9ASv.mjs";
|
|
19
19
|
import { loadScript } from "./loadScript-C6SUcPSp.mjs";
|
|
20
20
|
import { LocalStorageBroadcastChannel } from "./localStorageBroadcastChannel-CNmeXxpW.mjs";
|
|
21
21
|
import { Poller, PollerCallback, PollerRun, PollerStop } from "./poller-I92Dozmd.mjs";
|
|
@@ -26,7 +26,7 @@ import { versionSelector } from "./versionSelector-Btv3m_NV.mjs";
|
|
|
26
26
|
import { applyFunctionToObj, filterProps, removeUndefined, without } from "./object-CgEEf_DM.mjs";
|
|
27
27
|
import { logger } from "./logger-CFsSyN6O.mjs";
|
|
28
28
|
import { createWorkerTimers } from "./index-D_rS0fDT.mjs";
|
|
29
|
-
import { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher } from "./pathMatcher-
|
|
29
|
+
import { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher } from "./pathMatcher-DfP6rsOw.mjs";
|
|
30
30
|
import { CLERK_NETLIFY_CACHE_BUST_PARAM, handleNetlifyCacheInDevInstance } from "./netlifyCacheHandler-DaSimV39.mjs";
|
|
31
31
|
import "./index-CoUVmp_Q.mjs";
|
|
32
32
|
export { CLERK_NETLIFY_CACHE_BUST_PARAM, CURRENT_DEV_INSTANCE_SUFFIXES, ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, DEV_BROWSER_JWT_KEY, DEV_OR_STAGING_SUFFIXES, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, LEGACY_DEV_INSTANCE_SUFFIXES, LOCAL_API_URL, LOCAL_ENV_SUFFIXES, LoadClerkJsScriptOptions, LocalStorageBroadcastChannel, MetamaskError, PROD_API_URL, PathMatcherParam, PathPattern, Poller, PollerCallback, PollerRun, PollerStop, RelativeDateCase, STAGING_API_URL, STAGING_ENV_SUFFIXES, SupportedMimeType, WithPathPatternWildcard, addClerkPrefix, addYears, allSettled, apiUrlFromPublishableKey, applyFunctionToObj, buildClerkJsScriptAttributes, buildErrorThrower, buildPublishableKey, camelToSnake, cleanDoubleSlashes, clerkJsScriptUrl, colorToSameTypeString, createClerkGlobalHookError, createDeferredPromise, createDevOrStagingUrlCache, createPathMatcher, createWorkerTimers, dateTo12HourTime, deepCamelToSnake, deepSnakeToCamel, deprecated, deprecatedObjectProperty, deprecatedProperty, deriveState, differenceInCalendarDays, errorToJSON, extension, extractDevBrowserJWTFromURL, fastDeepMergeAndKeep, fastDeepMergeAndReplace, filterProps, formatRelative, getClerkJsMajorVersionOrTag, getCookieSuffix, getEnvVariable, getNonUndefinedValues, getScriptUrl, getSuffixedCookieName, handleNetlifyCacheInDevInstance, handleValueOrFn, hasAlpha, hasLeadingSlash, hasTrailingSlash, hexStringToRgbaColor, iconImageUrl, inBrowser, is4xxError, isAbsoluteUrl, isBrowserOnline, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isCurrentDevAccountPortalOrigin, isDevelopmentEnvironment, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isEmailLinkError, isHSLColor, isHttpOrHttps, isIPV4Address, isKnownError, isLegacyDevAccountPortalOrigin, isMetamaskError, isNetworkError, isNonEmptyURL, isPasswordPwnedError, isProductionEnvironment, isProductionFromPublishableKey, isProductionFromSecretKey, isProxyUrlRelative, isPublishableKey, isRGBColor, isReverificationCancelledError, isStaging, isTestEnvironment, isTransparent, isTruthy, isUnauthorizedError, isUserLockedError, isValidBrowser, isValidBrowserOnline, isValidHexString, isValidHslaString, isValidProxyUrl, isValidRgbaString, isomorphicAtob, isomorphicBtoa, joinURL, loadClerkJsScript, loadScript, logErrorInDevMode, logger, noop, normalizeDate, parseError, parseErrors, parsePublishableKey, parseSearchParams, proxyUrlToAbsoluteURL, readJSONFile, removeUndefined, setClerkJsLoadingErrorPackageName, setDevBrowserJWTInURL, snakeToCamel, stringToHslaColor, stringToSameTypeColor, stripScheme, titleize, toSentence, userAgentIsRobot, versionSelector, withLeadingSlash, withTrailingSlash, without, withoutLeadingSlash, withoutTrailingSlash };
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, createClerkGlobalHookError } from "./index-
|
|
2
|
-
import { apiUrlFromPublishableKey } from "./apiUrlFromPublishableKey-
|
|
1
|
+
import { ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, createClerkGlobalHookError } from "./index-DI4GG9K4.js";
|
|
2
|
+
import { apiUrlFromPublishableKey } from "./apiUrlFromPublishableKey-BK2JHLjb.js";
|
|
3
3
|
import { inBrowser, isBrowserOnline, isValidBrowser, isValidBrowserOnline, userAgentIsRobot } from "./browser-CT1g0w-N.js";
|
|
4
|
-
import { colorToSameTypeString, hasAlpha, hexStringToRgbaColor, isHSLColor, isRGBColor, isTransparent, isValidHexString, isValidHslaString, isValidRgbaString, stringToHslaColor, stringToSameTypeColor } from "./color-
|
|
4
|
+
import { colorToSameTypeString, hasAlpha, hexStringToRgbaColor, isHSLColor, isRGBColor, isTransparent, isValidHexString, isValidHslaString, isValidRgbaString, stringToHslaColor, stringToSameTypeColor } from "./color-BJuf2abZ.js";
|
|
5
5
|
import { CURRENT_DEV_INSTANCE_SUFFIXES, DEV_OR_STAGING_SUFFIXES, LEGACY_DEV_INSTANCE_SUFFIXES, LOCAL_API_URL, LOCAL_ENV_SUFFIXES, PROD_API_URL, STAGING_API_URL, STAGING_ENV_SUFFIXES, iconImageUrl } from "./constants-DP5-fAPw.js";
|
|
6
6
|
import { RelativeDateCase, addYears, dateTo12HourTime, differenceInCalendarDays, formatRelative, normalizeDate } from "./date-DDNRUU0r.js";
|
|
7
7
|
import { deprecated, deprecatedObjectProperty, deprecatedProperty } from "./deprecated-BnVl0yxv.js";
|
|
8
|
-
import { deriveState } from "./deriveState-
|
|
8
|
+
import { deriveState } from "./deriveState-BlkHvH6g.js";
|
|
9
9
|
import { DEV_BROWSER_JWT_KEY, extractDevBrowserJWTFromURL, setDevBrowserJWTInURL } from "./devBrowser-ezvLE7uo.js";
|
|
10
|
-
import { ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from "./error-
|
|
10
|
+
import { ClerkWebAuthnError, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, MetamaskError, buildErrorThrower, errorToJSON, is4xxError, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isNetworkError, isPasswordPwnedError, isReverificationCancelledError, isUnauthorizedError, isUserLockedError, parseError, parseErrors } from "./error-DUHToUnE.js";
|
|
11
11
|
import { SupportedMimeType, extension, readJSONFile } from "./file-B_f0oD8h.js";
|
|
12
12
|
import { getEnvVariable } from "./getEnvVariable-BcT_PqmA.js";
|
|
13
13
|
import { handleValueOrFn } from "./handleValueOrFn-BpIDq7Ek.js";
|
|
14
14
|
import { allSettled, createDeferredPromise, fastDeepMergeAndKeep, fastDeepMergeAndReplace, isDevelopmentEnvironment, isProductionEnvironment, isStaging, isTestEnvironment, logErrorInDevMode, noop } from "./index-DcfXAwQx.js";
|
|
15
15
|
import { isomorphicAtob } from "./isomorphicAtob-D61jyCi3.js";
|
|
16
16
|
import { isomorphicBtoa } from "./isomorphicBtoa-DZZ0MKdz.js";
|
|
17
|
-
import { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey } from "./keys-
|
|
18
|
-
import { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-
|
|
17
|
+
import { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey } from "./keys-CZIl86HQ.js";
|
|
18
|
+
import { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-CVmbzyxS.js";
|
|
19
19
|
import { loadScript } from "./loadScript-BPX0RAWu.js";
|
|
20
20
|
import { LocalStorageBroadcastChannel } from "./localStorageBroadcastChannel-BSisnDfR.js";
|
|
21
21
|
import { Poller, PollerCallback, PollerRun, PollerStop } from "./poller-CIrx6NwR.js";
|
|
@@ -26,7 +26,7 @@ import { versionSelector } from "./versionSelector-CP0JpoAM.js";
|
|
|
26
26
|
import { applyFunctionToObj, filterProps, removeUndefined, without } from "./object-5d8ACLdH.js";
|
|
27
27
|
import { logger } from "./logger-CWWjPZMR.js";
|
|
28
28
|
import { createWorkerTimers } from "./index-z_SguuaJ.js";
|
|
29
|
-
import { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher } from "./pathMatcher-
|
|
29
|
+
import { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher } from "./pathMatcher-WU_-IXYh.js";
|
|
30
30
|
import { CLERK_NETLIFY_CACHE_BUST_PARAM, handleNetlifyCacheInDevInstance } from "./netlifyCacheHandler-Di70sUEE.js";
|
|
31
31
|
import "./index-B5F3AfVc.js";
|
|
32
32
|
export { CLERK_NETLIFY_CACHE_BUST_PARAM, CURRENT_DEV_INSTANCE_SUFFIXES, ClerkAPIError, ClerkAPIResponseError, ClerkError, ClerkRuntimeError, ClerkWebAuthnError, DEV_BROWSER_JWT_KEY, DEV_OR_STAGING_SUFFIXES, EmailLinkError, EmailLinkErrorCode, EmailLinkErrorCodeStatus, ErrorThrower, ErrorThrowerOptions, LEGACY_DEV_INSTANCE_SUFFIXES, LOCAL_API_URL, LOCAL_ENV_SUFFIXES, LoadClerkJsScriptOptions, LocalStorageBroadcastChannel, MetamaskError, PROD_API_URL, PathMatcherParam, PathPattern, Poller, PollerCallback, PollerRun, PollerStop, RelativeDateCase, STAGING_API_URL, STAGING_ENV_SUFFIXES, SupportedMimeType, WithPathPatternWildcard, addClerkPrefix, addYears, allSettled, apiUrlFromPublishableKey, applyFunctionToObj, buildClerkJsScriptAttributes, buildErrorThrower, buildPublishableKey, camelToSnake, cleanDoubleSlashes, clerkJsScriptUrl, colorToSameTypeString, createClerkGlobalHookError, createDeferredPromise, createDevOrStagingUrlCache, createPathMatcher, createWorkerTimers, dateTo12HourTime, deepCamelToSnake, deepSnakeToCamel, deprecated, deprecatedObjectProperty, deprecatedProperty, deriveState, differenceInCalendarDays, errorToJSON, extension, extractDevBrowserJWTFromURL, fastDeepMergeAndKeep, fastDeepMergeAndReplace, filterProps, formatRelative, getClerkJsMajorVersionOrTag, getCookieSuffix, getEnvVariable, getNonUndefinedValues, getScriptUrl, getSuffixedCookieName, handleNetlifyCacheInDevInstance, handleValueOrFn, hasAlpha, hasLeadingSlash, hasTrailingSlash, hexStringToRgbaColor, iconImageUrl, inBrowser, is4xxError, isAbsoluteUrl, isBrowserOnline, isCaptchaError, isClerkAPIResponseError, isClerkRuntimeError, isCurrentDevAccountPortalOrigin, isDevelopmentEnvironment, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isEmailLinkError, isHSLColor, isHttpOrHttps, isIPV4Address, isKnownError, isLegacyDevAccountPortalOrigin, isMetamaskError, isNetworkError, isNonEmptyURL, isPasswordPwnedError, isProductionEnvironment, isProductionFromPublishableKey, isProductionFromSecretKey, isProxyUrlRelative, isPublishableKey, isRGBColor, isReverificationCancelledError, isStaging, isTestEnvironment, isTransparent, isTruthy, isUnauthorizedError, isUserLockedError, isValidBrowser, isValidBrowserOnline, isValidHexString, isValidHslaString, isValidProxyUrl, isValidRgbaString, isomorphicAtob, isomorphicBtoa, joinURL, loadClerkJsScript, loadScript, logErrorInDevMode, logger, noop, normalizeDate, parseError, parseErrors, parsePublishableKey, parseSearchParams, proxyUrlToAbsoluteURL, readJSONFile, removeUndefined, setClerkJsLoadingErrorPackageName, setDevBrowserJWTInURL, snakeToCamel, stringToHslaColor, stringToSameTypeColor, stripScheme, titleize, toSentence, userAgentIsRobot, versionSelector, withLeadingSlash, withTrailingSlash, without, withoutLeadingSlash, withoutTrailingSlash };
|
package/dist/runtime/index.js
CHANGED
|
@@ -22,8 +22,8 @@ require('./retry-rhkPbMCS.js');
|
|
|
22
22
|
const require_loadScript = require('./loadScript-D8zceEj8.js');
|
|
23
23
|
const require_proxy = require('./proxy-B_Yui2Mf.js');
|
|
24
24
|
const require_url = require('./url-Clb-n8zC.js');
|
|
25
|
-
const require_versionSelector = require('./versionSelector-
|
|
26
|
-
const require_loadClerkJsScript = require('./loadClerkJsScript-
|
|
25
|
+
const require_versionSelector = require('./versionSelector-CvsZr-ts.js');
|
|
26
|
+
const require_loadClerkJsScript = require('./loadClerkJsScript-BS2150jv.js');
|
|
27
27
|
const require_localStorageBroadcastChannel = require('./localStorageBroadcastChannel-Bgbc3aUe.js');
|
|
28
28
|
const require_workerTimers = require('./workerTimers-0T9WnoJq.js');
|
|
29
29
|
const require_poller = require('./poller-CVTUNwuX.js');
|
package/dist/runtime/index.mjs
CHANGED
|
@@ -22,8 +22,8 @@ import "./retry-DAlTROH9.mjs";
|
|
|
22
22
|
import { loadScript } from "./loadScript-t1vaIfy5.mjs";
|
|
23
23
|
import { isHttpOrHttps, isProxyUrlRelative, isValidProxyUrl, proxyUrlToAbsoluteURL } from "./proxy-Bq8EHApG.mjs";
|
|
24
24
|
import { addClerkPrefix, cleanDoubleSlashes, getClerkJsMajorVersionOrTag, getScriptUrl, hasLeadingSlash, hasTrailingSlash, isAbsoluteUrl, isCurrentDevAccountPortalOrigin, isLegacyDevAccountPortalOrigin, isNonEmptyURL, joinURL, parseSearchParams, stripScheme, withLeadingSlash, withTrailingSlash, withoutLeadingSlash, withoutTrailingSlash } from "./url-Cdy8w8vK.mjs";
|
|
25
|
-
import { versionSelector } from "./versionSelector-
|
|
26
|
-
import { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-
|
|
25
|
+
import { versionSelector } from "./versionSelector-wk5jCgUy.mjs";
|
|
26
|
+
import { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-VXxafQD6.mjs";
|
|
27
27
|
import { LocalStorageBroadcastChannel } from "./localStorageBroadcastChannel-BipM-nkf.mjs";
|
|
28
28
|
import { createWorkerTimers } from "./workerTimers-mT3yzhis.mjs";
|
|
29
29
|
import { Poller } from "./poller-DA-neXTk.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublishableKey } from "./index-
|
|
1
|
+
import { PublishableKey } from "./index-B48cufC_.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/keys.d.ts
|
|
4
4
|
|
|
@@ -100,4 +100,4 @@ declare function getCookieSuffix(publishableKey: string, subtle?: SubtleCrypto):
|
|
|
100
100
|
declare const getSuffixedCookieName: (cookieName: string, cookieSuffix: string) => string;
|
|
101
101
|
//#endregion
|
|
102
102
|
export { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey };
|
|
103
|
-
//# sourceMappingURL=keys-
|
|
103
|
+
//# sourceMappingURL=keys-CToOcaYh.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys-
|
|
1
|
+
{"version":3,"file":"keys-CToOcaYh.d.mts","names":[],"sources":["../../src/keys.ts"],"sourcesContent":[],"mappings":";;;;;;AAG8C;AAkC9C,KA7BK,0BAAA,GA6B8B;EA4BnB;EAIA,KAAA,CAAA,EAAA,OAAA;EA0EA;EA+BA,MAAA,CAAA,EAAA,MAAA;EAiCA;EAWA,QAAA,CAAA,EAAA,MAAA;EAWA;EAWA,WAAA,CAAA,EAAA,OAAA;AAYhB,CAAA;AAmBA;;;;;;iBA1OgB,mBAAA;iBA4BA,mBAAA,mCAEL;;IACR;iBACa,mBAAA,oCAEJ,6BACT;;;;;;;iBAuEa,gBAAA;;;;;;;iBA+BA,0BAAA,CAAA;;;;;;;oCAUsB;;;;;;;;;iBAuBtB,+BAAA;;;;;;;;iBAWA,8BAAA;;;;;;;;iBAWA,0BAAA;;;;;;;;iBAWA,yBAAA;;;;;;;;;iBAYM,eAAA,kCAEZ,eACP;;;;;;;;;cAgBU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublishableKey } from "./index-
|
|
1
|
+
import { PublishableKey } from "./index-DI4GG9K4.js";
|
|
2
2
|
|
|
3
3
|
//#region src/keys.d.ts
|
|
4
4
|
|
|
@@ -100,4 +100,4 @@ declare function getCookieSuffix(publishableKey: string, subtle?: SubtleCrypto):
|
|
|
100
100
|
declare const getSuffixedCookieName: (cookieName: string, cookieSuffix: string) => string;
|
|
101
101
|
//#endregion
|
|
102
102
|
export { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey };
|
|
103
|
-
//# sourceMappingURL=keys-
|
|
103
|
+
//# sourceMappingURL=keys-CZIl86HQ.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys-
|
|
1
|
+
{"version":3,"file":"keys-CZIl86HQ.d.ts","names":[],"sources":["../../src/keys.ts"],"sourcesContent":[],"mappings":";;;;;;AAG8C;AAkC9C,KA7BK,0BAAA,GA6B8B;EA4BnB;EAIA,KAAA,CAAA,EAAA,OAAA;EA0EA;EA+BA,MAAA,CAAA,EAAA,MAAA;EAiCA;EAWA,QAAA,CAAA,EAAA,MAAA;EAWA;EAWA,WAAA,CAAA,EAAA,OAAA;AAYhB,CAAA;AAmBA;;;;;;iBA1OgB,mBAAA;iBA4BA,mBAAA,mCAEL;;IACR;iBACa,mBAAA,oCAEJ,6BACT;;;;;;;iBAuEa,gBAAA;;;;;;;iBA+BA,0BAAA,CAAA;;;;;;;oCAUsB;;;;;;;;;iBAuBtB,+BAAA;;;;;;;;iBAWA,8BAAA;;;;;;;;iBAWA,0BAAA;;;;;;;;iBAWA,yBAAA;;;;;;;;;iBAYM,eAAA,kCAEZ,eACP;;;;;;;;;cAgBU"}
|
package/dist/runtime/keys.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey } from "./keys-
|
|
1
|
+
import "./index-B48cufC_.mjs";
|
|
2
|
+
import { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey } from "./keys-CToOcaYh.mjs";
|
|
3
3
|
export { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey };
|
package/dist/runtime/keys.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey } from "./keys-
|
|
1
|
+
import "./index-DI4GG9K4.js";
|
|
2
|
+
import { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey } from "./keys-CZIl86HQ.js";
|
|
3
3
|
export { buildPublishableKey, createDevOrStagingUrlCache, getCookieSuffix, getSuffixedCookieName, isDevelopmentFromPublishableKey, isDevelopmentFromSecretKey, isProductionFromPublishableKey, isProductionFromSecretKey, isPublishableKey, parsePublishableKey };
|
|
@@ -3,7 +3,7 @@ const require_error = require('./error-DyScPmkp.js');
|
|
|
3
3
|
const require_loadScript = require('./loadScript-D8zceEj8.js');
|
|
4
4
|
const require_proxy = require('./proxy-B_Yui2Mf.js');
|
|
5
5
|
const require_url = require('./url-Clb-n8zC.js');
|
|
6
|
-
const require_versionSelector = require('./versionSelector-
|
|
6
|
+
const require_versionSelector = require('./versionSelector-CvsZr-ts.js');
|
|
7
7
|
|
|
8
8
|
//#region src/loadClerkJsScript.ts
|
|
9
9
|
const ERROR_CODE = "failed_to_load_clerk_js";
|
|
@@ -190,4 +190,4 @@ Object.defineProperty(exports, 'setClerkJsLoadingErrorPackageName', {
|
|
|
190
190
|
return setClerkJsLoadingErrorPackageName;
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
|
-
//# sourceMappingURL=loadClerkJsScript-
|
|
193
|
+
//# sourceMappingURL=loadClerkJsScript-BS2150jv.js.map
|
package/dist/runtime/{loadClerkJsScript-BaBJTAgM.js.map → loadClerkJsScript-BS2150jv.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadClerkJsScript-BaBJTAgM.js","names":["createDevOrStagingUrlCache","buildErrorThrower","timeoutId","pollInterval","ClerkRuntimeError","isValidProxyUrl","proxyUrlToAbsoluteURL","parsePublishableKey","addClerkPrefix","versionSelector","obj: Record<string, string>"],"sources":["../../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { ClerkOptions, SDKMetadata, Without } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst ERROR_CODE = 'failed_to_load_clerk_js';\nconst ERROR_CODE_TIMEOUT = 'failed_to_load_clerk_js_timeout';\nconst FAILED_TO_LOAD_ERROR = 'Failed to load Clerk';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\n/**\n * Sets the package name for error messages during ClerkJS script loading.\n *\n * @param packageName - The name of the package to use in error messages (e.g., '@clerk/clerk-react').\n * @example\n * ```typescript\n * setClerkJsLoadingErrorPackageName('@clerk/clerk-react');\n * ```\n */\nexport function setClerkJsLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\ntype LoadClerkJsScriptOptions = Without<ClerkOptions, 'isSatellite'> & {\n publishableKey: string;\n clerkJSUrl?: string;\n clerkJSVariant?: 'headless' | '';\n 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 * 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 isClerkProperlyLoaded(): boolean {\n if (typeof window === 'undefined' || !(window as any).Clerk) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const clerk = (window as any).Clerk;\n return typeof clerk === 'object' && typeof clerk.load === 'function';\n}\n\n/**\n * Waits for Clerk to be properly loaded with a timeout mechanism.\n * Uses polling to check if Clerk becomes available within the specified timeout.\n *\n * @param timeoutMs - Maximum time to wait in milliseconds.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error if timeout is reached.\n */\nfunction waitForClerkWithTimeout(timeoutMs: number): 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 const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (isClerkProperlyLoaded()) {\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 (!isClerkProperlyLoaded()) {\n reject(new ClerkRuntimeError(FAILED_TO_LOAD_ERROR, { code: ERROR_CODE_TIMEOUT }));\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\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 */\nconst loadClerkJsScript = async (opts?: LoadClerkJsScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n return waitForClerkWithTimeout(timeout);\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const loadPromise = waitForClerkWithTimeout(timeout);\n\n loadScript(clerkJsScriptUrl(opts), {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyClerkJsScriptAttributes(opts),\n }).catch(error => {\n throw new ClerkRuntimeError(FAILED_TO_LOAD_ERROR + (error.message ? `, ${error.message}` : ''), {\n code: ERROR_CODE,\n cause: error,\n });\n });\n\n return loadPromise;\n};\n\n/**\n * Generates a Clerk JS script URL based on the provided options.\n *\n * @param opts - The options to use when building the Clerk JS script URL.\n * @returns The complete URL to the Clerk JS script.\n *\n * @example\n * ```typescript\n * const url = clerkJsScriptUrl({ publishableKey: 'pk_test_...' });\n * // Returns: \"https://example.clerk.accounts.dev/npm/@clerk/clerk-js@5/dist/clerk.browser.js\"\n * ```\n */\nconst clerkJsScriptUrl = (opts: LoadClerkJsScriptOptions) => {\n const { clerkJSUrl, clerkJSVariant, clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (clerkJSUrl) {\n return clerkJSUrl;\n }\n\n let scriptHost = '';\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n scriptHost = proxyUrlToAbsoluteURL(proxyUrl).replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n scriptHost = addClerkPrefix(domain);\n } else {\n scriptHost = parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n const variant = clerkJSVariant ? `${clerkJSVariant.replace(/\\.+$/, '')}.` : '';\n const version = versionSelector(clerkJSVersion);\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.${variant}browser.js`;\n};\n\n/**\n * Builds an object of Clerk JS script attributes based on the provided options.\n *\n * @param options - The options containing the values for script attributes.\n * @returns An object containing data attributes to be applied to the script element.\n */\nconst 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\n/**\n * Returns a function that applies Clerk JS script attributes to a script element.\n *\n * @param options - The options containing the values for script attributes.\n * @returns A function that accepts a script element and applies the attributes to it.\n */\nconst applyClerkJsScriptAttributes = (options: LoadClerkJsScriptOptions) => (script: HTMLScriptElement) => {\n const attributes = buildClerkJsScriptAttributes(options);\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nexport { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript };\nexport type { LoadClerkJsScriptOptions };\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"loadClerkJsScript-BS2150jv.js","names":["createDevOrStagingUrlCache","buildErrorThrower","timeoutId","pollInterval","ClerkRuntimeError","isValidProxyUrl","proxyUrlToAbsoluteURL","parsePublishableKey","addClerkPrefix","versionSelector","obj: Record<string, string>"],"sources":["../../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { ClerkOptions, SDKMetadata, Without } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst ERROR_CODE = 'failed_to_load_clerk_js';\nconst ERROR_CODE_TIMEOUT = 'failed_to_load_clerk_js_timeout';\nconst FAILED_TO_LOAD_ERROR = 'Failed to load Clerk';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\n/**\n * Sets the package name for error messages during ClerkJS script loading.\n *\n * @param packageName - The name of the package to use in error messages (e.g., '@clerk/clerk-react').\n * @example\n * ```typescript\n * setClerkJsLoadingErrorPackageName('@clerk/clerk-react');\n * ```\n */\nexport function setClerkJsLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\ntype LoadClerkJsScriptOptions = Without<ClerkOptions, 'isSatellite'> & {\n publishableKey: string;\n clerkJSUrl?: string;\n clerkJSVariant?: 'headless' | '';\n 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 * 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 isClerkProperlyLoaded(): boolean {\n if (typeof window === 'undefined' || !(window as any).Clerk) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const clerk = (window as any).Clerk;\n return typeof clerk === 'object' && typeof clerk.load === 'function';\n}\n\n/**\n * Waits for Clerk to be properly loaded with a timeout mechanism.\n * Uses polling to check if Clerk becomes available within the specified timeout.\n *\n * @param timeoutMs - Maximum time to wait in milliseconds.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error if timeout is reached.\n */\nfunction waitForClerkWithTimeout(timeoutMs: number): 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 const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (isClerkProperlyLoaded()) {\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 (!isClerkProperlyLoaded()) {\n reject(new ClerkRuntimeError(FAILED_TO_LOAD_ERROR, { code: ERROR_CODE_TIMEOUT }));\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\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 */\nconst loadClerkJsScript = async (opts?: LoadClerkJsScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n return waitForClerkWithTimeout(timeout);\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const loadPromise = waitForClerkWithTimeout(timeout);\n\n loadScript(clerkJsScriptUrl(opts), {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyClerkJsScriptAttributes(opts),\n }).catch(error => {\n throw new ClerkRuntimeError(FAILED_TO_LOAD_ERROR + (error.message ? `, ${error.message}` : ''), {\n code: ERROR_CODE,\n cause: error,\n });\n });\n\n return loadPromise;\n};\n\n/**\n * Generates a Clerk JS script URL based on the provided options.\n *\n * @param opts - The options to use when building the Clerk JS script URL.\n * @returns The complete URL to the Clerk JS script.\n *\n * @example\n * ```typescript\n * const url = clerkJsScriptUrl({ publishableKey: 'pk_test_...' });\n * // Returns: \"https://example.clerk.accounts.dev/npm/@clerk/clerk-js@5/dist/clerk.browser.js\"\n * ```\n */\nconst clerkJsScriptUrl = (opts: LoadClerkJsScriptOptions) => {\n const { clerkJSUrl, clerkJSVariant, clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (clerkJSUrl) {\n return clerkJSUrl;\n }\n\n let scriptHost = '';\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n scriptHost = proxyUrlToAbsoluteURL(proxyUrl).replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n scriptHost = addClerkPrefix(domain);\n } else {\n scriptHost = parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n const variant = clerkJSVariant ? `${clerkJSVariant.replace(/\\.+$/, '')}.` : '';\n const version = versionSelector(clerkJSVersion);\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.${variant}browser.js`;\n};\n\n/**\n * Builds an object of Clerk JS script attributes based on the provided options.\n *\n * @param options - The options containing the values for script attributes.\n * @returns An object containing data attributes to be applied to the script element.\n */\nconst 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\n/**\n * Returns a function that applies Clerk JS script attributes to a script element.\n *\n * @param options - The options containing the values for script attributes.\n * @returns A function that accepts a script element and applies the attributes to it.\n */\nconst applyClerkJsScriptAttributes = (options: LoadClerkJsScriptOptions) => (script: HTMLScriptElement) => {\n const attributes = buildClerkJsScriptAttributes(options);\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nexport { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript };\nexport type { LoadClerkJsScriptOptions };\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClerkOptions, SDKMetadata, Without } from "./index-
|
|
1
|
+
import { ClerkOptions, SDKMetadata, Without } from "./index-DI4GG9K4.js";
|
|
2
2
|
|
|
3
3
|
//#region src/loadClerkJsScript.d.ts
|
|
4
4
|
|
|
@@ -72,4 +72,4 @@ declare const clerkJsScriptUrl: (opts: LoadClerkJsScriptOptions) => string;
|
|
|
72
72
|
declare const buildClerkJsScriptAttributes: (options: LoadClerkJsScriptOptions) => Record<string, string>;
|
|
73
73
|
//#endregion
|
|
74
74
|
export { type LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName };
|
|
75
|
-
//# sourceMappingURL=loadClerkJsScript-
|
|
75
|
+
//# sourceMappingURL=loadClerkJsScript-CVmbzyxS.d.ts.map
|
package/dist/runtime/{loadClerkJsScript-amyia8eQ.d.ts.map → loadClerkJsScript-CVmbzyxS.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadClerkJsScript-
|
|
1
|
+
{"version":3,"file":"loadClerkJsScript-CVmbzyxS.d.ts","names":[],"sources":["../../src/loadClerkJsScript.ts"],"sourcesContent":[],"mappings":";;;;;;AAyBA;AAEC;;;;;AAO0B;AA0Ga,iBAnHxB,iCAAA,CAmHwB,WAAA,EAAA,MAAA,CAAA,EAAA,IAAA;KA/GnC,wBAAA,GAA2B,OA+G2C,CA/GnC,YA+GmC,EAAA,aAAA,CAAA,GAAA;EAAR,cAAA,EAAA,MAAA;EAAO,UAAA,CAAA,EAAA,MAAA;EA+CpE,cAAA,CAAA,EAAA,UAmBL,GAAA,EAnB+B;EA2B1B,cAAA,CAAA,EAAA,MAAA;gBApLU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0GV,2BAAkC,6BAA2B,QAAQ;;;;;;;;;;;;;cA+CrE,yBAA0B;;;;;;;cA2B1B,wCAAyC,6BAAwB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClerkOptions, SDKMetadata, Without } from "./index-
|
|
1
|
+
import { ClerkOptions, SDKMetadata, Without } from "./index-B48cufC_.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/loadClerkJsScript.d.ts
|
|
4
4
|
|
|
@@ -72,4 +72,4 @@ declare const clerkJsScriptUrl: (opts: LoadClerkJsScriptOptions) => string;
|
|
|
72
72
|
declare const buildClerkJsScriptAttributes: (options: LoadClerkJsScriptOptions) => Record<string, string>;
|
|
73
73
|
//#endregion
|
|
74
74
|
export { type LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName };
|
|
75
|
-
//# sourceMappingURL=loadClerkJsScript-
|
|
75
|
+
//# sourceMappingURL=loadClerkJsScript-CWhB9ASv.d.mts.map
|
package/dist/runtime/{loadClerkJsScript-CD13NyLj.d.mts.map → loadClerkJsScript-CWhB9ASv.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadClerkJsScript-
|
|
1
|
+
{"version":3,"file":"loadClerkJsScript-CWhB9ASv.d.mts","names":[],"sources":["../../src/loadClerkJsScript.ts"],"sourcesContent":[],"mappings":";;;;;;AAyBA;AAEC;;;;;AAO0B;AA0Ga,iBAnHxB,iCAAA,CAmHwB,WAAA,EAAA,MAAA,CAAA,EAAA,IAAA;KA/GnC,wBAAA,GAA2B,OA+G2C,CA/GnC,YA+GmC,EAAA,aAAA,CAAA,GAAA;EAAR,cAAA,EAAA,MAAA;EAAO,UAAA,CAAA,EAAA,MAAA;EA+CpE,cAAA,CAAA,EAAA,UAmBL,GAAA,EAnB+B;EA2B1B,cAAA,CAAA,EAAA,MAAA;gBApLU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0GV,2BAAkC,6BAA2B,QAAQ;;;;;;;;;;;;;cA+CrE,yBAA0B;;;;;;;cA2B1B,wCAAyC,6BAAwB"}
|
|
@@ -3,7 +3,7 @@ import { ClerkRuntimeError, buildErrorThrower } from "./error-74EhajFh.mjs";
|
|
|
3
3
|
import { loadScript } from "./loadScript-t1vaIfy5.mjs";
|
|
4
4
|
import { isValidProxyUrl, proxyUrlToAbsoluteURL } from "./proxy-Bq8EHApG.mjs";
|
|
5
5
|
import { addClerkPrefix } from "./url-Cdy8w8vK.mjs";
|
|
6
|
-
import { versionSelector } from "./versionSelector-
|
|
6
|
+
import { versionSelector } from "./versionSelector-wk5jCgUy.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/loadClerkJsScript.ts
|
|
9
9
|
const ERROR_CODE = "failed_to_load_clerk_js";
|
|
@@ -167,4 +167,4 @@ const applyClerkJsScriptAttributes = (options) => (script) => {
|
|
|
167
167
|
|
|
168
168
|
//#endregion
|
|
169
169
|
export { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName };
|
|
170
|
-
//# sourceMappingURL=loadClerkJsScript-
|
|
170
|
+
//# sourceMappingURL=loadClerkJsScript-VXxafQD6.mjs.map
|
package/dist/runtime/{loadClerkJsScript-BctCAY1Y.mjs.map → loadClerkJsScript-VXxafQD6.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadClerkJsScript-BctCAY1Y.mjs","names":["timeoutId","pollInterval","obj: Record<string, string>"],"sources":["../../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { ClerkOptions, SDKMetadata, Without } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst ERROR_CODE = 'failed_to_load_clerk_js';\nconst ERROR_CODE_TIMEOUT = 'failed_to_load_clerk_js_timeout';\nconst FAILED_TO_LOAD_ERROR = 'Failed to load Clerk';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\n/**\n * Sets the package name for error messages during ClerkJS script loading.\n *\n * @param packageName - The name of the package to use in error messages (e.g., '@clerk/clerk-react').\n * @example\n * ```typescript\n * setClerkJsLoadingErrorPackageName('@clerk/clerk-react');\n * ```\n */\nexport function setClerkJsLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\ntype LoadClerkJsScriptOptions = Without<ClerkOptions, 'isSatellite'> & {\n publishableKey: string;\n clerkJSUrl?: string;\n clerkJSVariant?: 'headless' | '';\n 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 * 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 isClerkProperlyLoaded(): boolean {\n if (typeof window === 'undefined' || !(window as any).Clerk) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const clerk = (window as any).Clerk;\n return typeof clerk === 'object' && typeof clerk.load === 'function';\n}\n\n/**\n * Waits for Clerk to be properly loaded with a timeout mechanism.\n * Uses polling to check if Clerk becomes available within the specified timeout.\n *\n * @param timeoutMs - Maximum time to wait in milliseconds.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error if timeout is reached.\n */\nfunction waitForClerkWithTimeout(timeoutMs: number): 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 const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (isClerkProperlyLoaded()) {\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 (!isClerkProperlyLoaded()) {\n reject(new ClerkRuntimeError(FAILED_TO_LOAD_ERROR, { code: ERROR_CODE_TIMEOUT }));\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\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 */\nconst loadClerkJsScript = async (opts?: LoadClerkJsScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n return waitForClerkWithTimeout(timeout);\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const loadPromise = waitForClerkWithTimeout(timeout);\n\n loadScript(clerkJsScriptUrl(opts), {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyClerkJsScriptAttributes(opts),\n }).catch(error => {\n throw new ClerkRuntimeError(FAILED_TO_LOAD_ERROR + (error.message ? `, ${error.message}` : ''), {\n code: ERROR_CODE,\n cause: error,\n });\n });\n\n return loadPromise;\n};\n\n/**\n * Generates a Clerk JS script URL based on the provided options.\n *\n * @param opts - The options to use when building the Clerk JS script URL.\n * @returns The complete URL to the Clerk JS script.\n *\n * @example\n * ```typescript\n * const url = clerkJsScriptUrl({ publishableKey: 'pk_test_...' });\n * // Returns: \"https://example.clerk.accounts.dev/npm/@clerk/clerk-js@5/dist/clerk.browser.js\"\n * ```\n */\nconst clerkJsScriptUrl = (opts: LoadClerkJsScriptOptions) => {\n const { clerkJSUrl, clerkJSVariant, clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (clerkJSUrl) {\n return clerkJSUrl;\n }\n\n let scriptHost = '';\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n scriptHost = proxyUrlToAbsoluteURL(proxyUrl).replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n scriptHost = addClerkPrefix(domain);\n } else {\n scriptHost = parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n const variant = clerkJSVariant ? `${clerkJSVariant.replace(/\\.+$/, '')}.` : '';\n const version = versionSelector(clerkJSVersion);\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.${variant}browser.js`;\n};\n\n/**\n * Builds an object of Clerk JS script attributes based on the provided options.\n *\n * @param options - The options containing the values for script attributes.\n * @returns An object containing data attributes to be applied to the script element.\n */\nconst 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\n/**\n * Returns a function that applies Clerk JS script attributes to a script element.\n *\n * @param options - The options containing the values for script attributes.\n * @returns A function that accepts a script element and applies the attributes to it.\n */\nconst applyClerkJsScriptAttributes = (options: LoadClerkJsScriptOptions) => (script: HTMLScriptElement) => {\n const attributes = buildClerkJsScriptAttributes(options);\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nexport { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript };\nexport type { LoadClerkJsScriptOptions };\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"loadClerkJsScript-VXxafQD6.mjs","names":["timeoutId","pollInterval","obj: Record<string, string>"],"sources":["../../src/loadClerkJsScript.ts"],"sourcesContent":["import { buildErrorThrower, ClerkRuntimeError } from './error';\nimport { createDevOrStagingUrlCache, parsePublishableKey } from './keys';\nimport { loadScript } from './loadScript';\nimport { isValidProxyUrl, proxyUrlToAbsoluteURL } from './proxy';\nimport type { ClerkOptions, SDKMetadata, Without } from './types';\nimport { addClerkPrefix } from './url';\nimport { versionSelector } from './versionSelector';\n\nconst ERROR_CODE = 'failed_to_load_clerk_js';\nconst ERROR_CODE_TIMEOUT = 'failed_to_load_clerk_js_timeout';\nconst FAILED_TO_LOAD_ERROR = 'Failed to load Clerk';\n\nconst { isDevOrStagingUrl } = createDevOrStagingUrlCache();\n\nconst errorThrower = buildErrorThrower({ packageName: '@clerk/shared' });\n\n/**\n * Sets the package name for error messages during ClerkJS script loading.\n *\n * @param packageName - The name of the package to use in error messages (e.g., '@clerk/clerk-react').\n * @example\n * ```typescript\n * setClerkJsLoadingErrorPackageName('@clerk/clerk-react');\n * ```\n */\nexport function setClerkJsLoadingErrorPackageName(packageName: string) {\n errorThrower.setPackageName({ packageName });\n}\n\ntype LoadClerkJsScriptOptions = Without<ClerkOptions, 'isSatellite'> & {\n publishableKey: string;\n clerkJSUrl?: string;\n clerkJSVariant?: 'headless' | '';\n 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 * 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 isClerkProperlyLoaded(): boolean {\n if (typeof window === 'undefined' || !(window as any).Clerk) {\n return false;\n }\n\n // Basic validation that window.Clerk has the expected structure\n const clerk = (window as any).Clerk;\n return typeof clerk === 'object' && typeof clerk.load === 'function';\n}\n\n/**\n * Waits for Clerk to be properly loaded with a timeout mechanism.\n * Uses polling to check if Clerk becomes available within the specified timeout.\n *\n * @param timeoutMs - Maximum time to wait in milliseconds.\n * @returns Promise that resolves with null if Clerk loads successfully, or rejects with an error if timeout is reached.\n */\nfunction waitForClerkWithTimeout(timeoutMs: number): 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 const checkAndResolve = () => {\n if (resolved) {\n return;\n }\n\n if (isClerkProperlyLoaded()) {\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 (!isClerkProperlyLoaded()) {\n reject(new ClerkRuntimeError(FAILED_TO_LOAD_ERROR, { code: ERROR_CODE_TIMEOUT }));\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\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 */\nconst loadClerkJsScript = async (opts?: LoadClerkJsScriptOptions): Promise<HTMLScriptElement | null> => {\n const timeout = opts?.scriptLoadTimeout ?? 15000;\n\n if (isClerkProperlyLoaded()) {\n return null;\n }\n\n const existingScript = document.querySelector<HTMLScriptElement>('script[data-clerk-js-script]');\n\n if (existingScript) {\n return waitForClerkWithTimeout(timeout);\n }\n\n if (!opts?.publishableKey) {\n errorThrower.throwMissingPublishableKeyError();\n return null;\n }\n\n const loadPromise = waitForClerkWithTimeout(timeout);\n\n loadScript(clerkJsScriptUrl(opts), {\n async: true,\n crossOrigin: 'anonymous',\n nonce: opts.nonce,\n beforeLoad: applyClerkJsScriptAttributes(opts),\n }).catch(error => {\n throw new ClerkRuntimeError(FAILED_TO_LOAD_ERROR + (error.message ? `, ${error.message}` : ''), {\n code: ERROR_CODE,\n cause: error,\n });\n });\n\n return loadPromise;\n};\n\n/**\n * Generates a Clerk JS script URL based on the provided options.\n *\n * @param opts - The options to use when building the Clerk JS script URL.\n * @returns The complete URL to the Clerk JS script.\n *\n * @example\n * ```typescript\n * const url = clerkJsScriptUrl({ publishableKey: 'pk_test_...' });\n * // Returns: \"https://example.clerk.accounts.dev/npm/@clerk/clerk-js@5/dist/clerk.browser.js\"\n * ```\n */\nconst clerkJsScriptUrl = (opts: LoadClerkJsScriptOptions) => {\n const { clerkJSUrl, clerkJSVariant, clerkJSVersion, proxyUrl, domain, publishableKey } = opts;\n\n if (clerkJSUrl) {\n return clerkJSUrl;\n }\n\n let scriptHost = '';\n if (!!proxyUrl && isValidProxyUrl(proxyUrl)) {\n scriptHost = proxyUrlToAbsoluteURL(proxyUrl).replace(/http(s)?:\\/\\//, '');\n } else if (domain && !isDevOrStagingUrl(parsePublishableKey(publishableKey)?.frontendApi || '')) {\n scriptHost = addClerkPrefix(domain);\n } else {\n scriptHost = parsePublishableKey(publishableKey)?.frontendApi || '';\n }\n\n const variant = clerkJSVariant ? `${clerkJSVariant.replace(/\\.+$/, '')}.` : '';\n const version = versionSelector(clerkJSVersion);\n return `https://${scriptHost}/npm/@clerk/clerk-js@${version}/dist/clerk.${variant}browser.js`;\n};\n\n/**\n * Builds an object of Clerk JS script attributes based on the provided options.\n *\n * @param options - The options containing the values for script attributes.\n * @returns An object containing data attributes to be applied to the script element.\n */\nconst 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\n/**\n * Returns a function that applies Clerk JS script attributes to a script element.\n *\n * @param options - The options containing the values for script attributes.\n * @returns A function that accepts a script element and applies the attributes to it.\n */\nconst applyClerkJsScriptAttributes = (options: LoadClerkJsScriptOptions) => (script: HTMLScriptElement) => {\n const attributes = buildClerkJsScriptAttributes(options);\n for (const attribute in attributes) {\n script.setAttribute(attribute, attributes[attribute]);\n }\n};\n\nexport { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript };\nexport type { LoadClerkJsScriptOptions };\n"],"mappings":"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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-
|
|
1
|
+
import "./index-B48cufC_.mjs";
|
|
2
|
+
import { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-CWhB9ASv.mjs";
|
|
3
3
|
export { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-
|
|
1
|
+
import "./index-DI4GG9K4.js";
|
|
2
|
+
import { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-CVmbzyxS.js";
|
|
3
3
|
export { LoadClerkJsScriptOptions, buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName };
|
|
@@ -8,8 +8,8 @@ require('./retry-rhkPbMCS.js');
|
|
|
8
8
|
require('./loadScript-D8zceEj8.js');
|
|
9
9
|
require('./proxy-B_Yui2Mf.js');
|
|
10
10
|
require('./url-Clb-n8zC.js');
|
|
11
|
-
require('./versionSelector-
|
|
12
|
-
const require_loadClerkJsScript = require('./loadClerkJsScript-
|
|
11
|
+
require('./versionSelector-CvsZr-ts.js');
|
|
12
|
+
const require_loadClerkJsScript = require('./loadClerkJsScript-BS2150jv.js');
|
|
13
13
|
|
|
14
14
|
exports.buildClerkJsScriptAttributes = require_loadClerkJsScript.buildClerkJsScriptAttributes;
|
|
15
15
|
exports.clerkJsScriptUrl = require_loadClerkJsScript.clerkJsScriptUrl;
|
|
@@ -8,7 +8,7 @@ import "./retry-DAlTROH9.mjs";
|
|
|
8
8
|
import "./loadScript-t1vaIfy5.mjs";
|
|
9
9
|
import "./proxy-Bq8EHApG.mjs";
|
|
10
10
|
import "./url-Cdy8w8vK.mjs";
|
|
11
|
-
import "./versionSelector-
|
|
12
|
-
import { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-
|
|
11
|
+
import "./versionSelector-wk5jCgUy.mjs";
|
|
12
|
+
import { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName } from "./loadClerkJsScript-VXxafQD6.mjs";
|
|
13
13
|
|
|
14
14
|
export { buildClerkJsScriptAttributes, clerkJsScriptUrl, loadClerkJsScript, setClerkJsLoadingErrorPackageName };
|
package/dist/runtime/oauth.d.mts
CHANGED
package/dist/runtime/oauth.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Autocomplete } from "./index-
|
|
1
|
+
import { Autocomplete } from "./index-B48cufC_.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/pathMatcher.d.ts
|
|
4
4
|
type WithPathPatternWildcard<T = string> = `${T & string}(.*)`;
|
|
@@ -13,4 +13,4 @@ type PathMatcherParam = Array<RegExp | PathPattern> | RegExp | PathPattern;
|
|
|
13
13
|
declare const createPathMatcher: (patterns: PathMatcherParam) => (pathname: string) => boolean;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher };
|
|
16
|
-
//# sourceMappingURL=pathMatcher-
|
|
16
|
+
//# sourceMappingURL=pathMatcher-DfP6rsOw.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathMatcher-DfP6rsOw.d.mts","names":[],"sources":["../../src/pathMatcher.ts"],"sourcesContent":[],"mappings":";;;KAGY,yCAAyC;KACzC,WAAA,GAAc,aAAa;AAD3B,KAEA,gBAAA,GAAmB,KAFI,CAEE,MAFgB,GAEP,WAFQ,CAAA,GAEO,MAFP,GAEgB,WAFhB;AACtD;AACA;;;;;AAAsE,cAYzD,iBAZyD,EAAA,CAAA,QAAA,EAY1B,gBAZ0B,EAAA,GAAA,CAAA,QAAA,EAAA,MAAA,EAAA,GAAA,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Autocomplete } from "./index-
|
|
1
|
+
import { Autocomplete } from "./index-DI4GG9K4.js";
|
|
2
2
|
|
|
3
3
|
//#region src/pathMatcher.d.ts
|
|
4
4
|
type WithPathPatternWildcard<T = string> = `${T & string}(.*)`;
|
|
@@ -13,4 +13,4 @@ type PathMatcherParam = Array<RegExp | PathPattern> | RegExp | PathPattern;
|
|
|
13
13
|
declare const createPathMatcher: (patterns: PathMatcherParam) => (pathname: string) => boolean;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher };
|
|
16
|
-
//# sourceMappingURL=pathMatcher-
|
|
16
|
+
//# sourceMappingURL=pathMatcher-WU_-IXYh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathMatcher-WU_-IXYh.d.ts","names":[],"sources":["../../src/pathMatcher.ts"],"sourcesContent":[],"mappings":";;;KAGY,yCAAyC;KACzC,WAAA,GAAc,aAAa;AAD3B,KAEA,gBAAA,GAAmB,KAFI,CAEE,MAFF,GAEW,WAFQ,CAAA,GAEO,MAFP,GAEgB,WAFhB;AACtD;AACA;;;;;AAAsE,cAYzD,iBAZyD,EAAA,CAAA,QAAA,EAY1B,gBAZ0B,EAAA,GAAA,CAAA,QAAA,EAAA,MAAA,EAAA,GAAA,OAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher } from "./pathMatcher-
|
|
1
|
+
import "./index-B48cufC_.mjs";
|
|
2
|
+
import { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher } from "./pathMatcher-DfP6rsOw.mjs";
|
|
3
3
|
export { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher } from "./pathMatcher-
|
|
1
|
+
import "./index-DI4GG9K4.js";
|
|
2
|
+
import { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher } from "./pathMatcher-WU_-IXYh.js";
|
|
3
3
|
export { PathMatcherParam, PathPattern, WithPathPatternWildcard, createPathMatcher };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poller-CIrx6NwR.d.ts","names":[],"sources":["../../src/poller.ts"],"sourcesContent":[],"mappings":";KAEY,UAAA;AAAA,KACA,cAAA,GADU,CAAA,IAAA,EACc,UADd,EAAA,GAC6B,OAD7B,CAAA,OAAA,CAAA;AACV,KACA,SAAA,GADc,CAAA,EAAA,EACG,cADO,
|
|
1
|
+
{"version":3,"file":"poller-CIrx6NwR.d.ts","names":[],"sources":["../../src/poller.ts"],"sourcesContent":[],"mappings":";KAEY,UAAA;AAAA,KACA,cAAA,GADU,CAAA,IAAA,EACc,UADd,EAAA,GAC6B,OAD7B,CAAA,OAAA,CAAA;AACV,KACA,SAAA,GADc,CAAA,EAAA,EACG,cADO,EAAe,GACH,OADU,CAAA,IAAA,CAAA;AAC1D,KAEK,aAAA,GAFgB;EAEhB,SAAA,EAAA,MAAa;AAIlB,CAAA;AAKgB,KALJ,MAAA,GAKU;EAAG,GAAA,EAJlB,SAIkB;EAAa,IAAA,EAH9B,UAG8B;CAAsC;AAAM,iBAAlE,MAAA,CAAkE;EAAA;AAAA,CAAA,CAAA,EAA5C,aAA4C,CAAA,EAAN,MAAM"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { APIKeyResource, BillingCheckoutResource, BillingPaymentMethodResource, BillingPaymentResource, BillingPlanResource, BillingStatementResource, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, ClerkAPIResponseError, ClerkOptions, ClerkPaginatedResponse, ClientResource, CreateOrganizationParams, ForPayerType, GetAPIKeysParams, GetDomainsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, LoadedClerk, OrganizationDomainResource, OrganizationInvitationResource, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationResource, OrganizationSuggestionResource, SessionVerificationLevel, SetActive, SetActiveNavigate, SignedInSessionResource, UseSessionListReturn, UseSessionReturn, UseUserReturn, UserOrganizationInvitationResource, UserResource, __experimental_CheckoutCacheState, __experimental_CheckoutInstance } from "../index-
|
|
1
|
+
import { APIKeyResource, BillingCheckoutResource, BillingPaymentMethodResource, BillingPaymentResource, BillingPlanResource, BillingStatementResource, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, ClerkAPIResponseError, ClerkOptions, ClerkPaginatedResponse, ClientResource, CreateOrganizationParams, ForPayerType, GetAPIKeysParams, GetDomainsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, LoadedClerk, OrganizationDomainResource, OrganizationInvitationResource, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationResource, OrganizationSuggestionResource, SessionVerificationLevel, SetActive, SetActiveNavigate, SignedInSessionResource, UseSessionListReturn, UseSessionReturn, UseUserReturn, UserOrganizationInvitationResource, UserResource, __experimental_CheckoutCacheState, __experimental_CheckoutInstance } from "../index-B48cufC_.mjs";
|
|
2
2
|
import "../apiUrlFromPublishableKey-BMA_oB1l.mjs";
|
|
3
3
|
import "../browser-CwBluoYn.mjs";
|
|
4
|
-
import "../color-
|
|
4
|
+
import "../color-BWxRgnuw.mjs";
|
|
5
5
|
import "../constants-UOcJjdve.mjs";
|
|
6
6
|
import "../date-DIGfFkoy.mjs";
|
|
7
7
|
import "../deprecated-BRApxWmG.mjs";
|
|
8
|
-
import "../deriveState-
|
|
8
|
+
import "../deriveState-o9no84Zo.mjs";
|
|
9
9
|
import "../devBrowser-DGNGESpp.mjs";
|
|
10
|
-
import "../error-
|
|
10
|
+
import "../error-D7mHptsm.mjs";
|
|
11
11
|
import "../file-BgHDMp4o.mjs";
|
|
12
12
|
import "../getEnvVariable-58tQPflG.mjs";
|
|
13
13
|
import "../handleValueOrFn-2pqr_dC8.mjs";
|
|
14
14
|
import "../index-Dd9r-3AL.mjs";
|
|
15
15
|
import "../isomorphicAtob-DqIxJQZE.mjs";
|
|
16
16
|
import "../isomorphicBtoa-Cu4s1rFu.mjs";
|
|
17
|
-
import "../keys-
|
|
18
|
-
import "../loadClerkJsScript-
|
|
17
|
+
import "../keys-CToOcaYh.mjs";
|
|
18
|
+
import "../loadClerkJsScript-CWhB9ASv.mjs";
|
|
19
19
|
import "../loadScript-C6SUcPSp.mjs";
|
|
20
20
|
import "../localStorageBroadcastChannel-CNmeXxpW.mjs";
|
|
21
21
|
import "../poller-I92Dozmd.mjs";
|
|
@@ -26,7 +26,7 @@ import "../versionSelector-Btv3m_NV.mjs";
|
|
|
26
26
|
import "../object-CgEEf_DM.mjs";
|
|
27
27
|
import "../logger-CFsSyN6O.mjs";
|
|
28
28
|
import "../index-D_rS0fDT.mjs";
|
|
29
|
-
import "../pathMatcher-
|
|
29
|
+
import "../pathMatcher-DfP6rsOw.mjs";
|
|
30
30
|
import "../netlifyCacheHandler-DaSimV39.mjs";
|
|
31
31
|
import "../index-CoUVmp_Q.mjs";
|
|
32
32
|
import React, { PropsWithChildren, ReactNode } from "react";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { APIKeyResource, BillingCheckoutResource, BillingPaymentMethodResource, BillingPaymentResource, BillingPlanResource, BillingStatementResource, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, ClerkAPIResponseError, ClerkOptions, ClerkPaginatedResponse, ClientResource, CreateOrganizationParams, ForPayerType, GetAPIKeysParams, GetDomainsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, LoadedClerk, OrganizationDomainResource, OrganizationInvitationResource, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationResource, OrganizationSuggestionResource, SessionVerificationLevel, SetActive, SetActiveNavigate, SignedInSessionResource, UseSessionListReturn, UseSessionReturn, UseUserReturn, UserOrganizationInvitationResource, UserResource, __experimental_CheckoutCacheState, __experimental_CheckoutInstance } from "../index-
|
|
2
|
-
import "../apiUrlFromPublishableKey-
|
|
1
|
+
import { APIKeyResource, BillingCheckoutResource, BillingPaymentMethodResource, BillingPaymentResource, BillingPlanResource, BillingStatementResource, BillingSubscriptionPlanPeriod, BillingSubscriptionResource, ClerkAPIResponseError, ClerkOptions, ClerkPaginatedResponse, ClientResource, CreateOrganizationParams, ForPayerType, GetAPIKeysParams, GetDomainsParams, GetInvitationsParams, GetMembersParams, GetMembershipRequestParams, GetUserOrganizationInvitationsParams, GetUserOrganizationMembershipParams, GetUserOrganizationSuggestionsParams, LoadedClerk, OrganizationDomainResource, OrganizationInvitationResource, OrganizationMembershipRequestResource, OrganizationMembershipResource, OrganizationResource, OrganizationSuggestionResource, SessionVerificationLevel, SetActive, SetActiveNavigate, SignedInSessionResource, UseSessionListReturn, UseSessionReturn, UseUserReturn, UserOrganizationInvitationResource, UserResource, __experimental_CheckoutCacheState, __experimental_CheckoutInstance } from "../index-DI4GG9K4.js";
|
|
2
|
+
import "../apiUrlFromPublishableKey-BK2JHLjb.js";
|
|
3
3
|
import "../browser-CT1g0w-N.js";
|
|
4
|
-
import "../color-
|
|
4
|
+
import "../color-BJuf2abZ.js";
|
|
5
5
|
import "../constants-DP5-fAPw.js";
|
|
6
6
|
import "../date-DDNRUU0r.js";
|
|
7
7
|
import "../deprecated-BnVl0yxv.js";
|
|
8
|
-
import "../deriveState-
|
|
8
|
+
import "../deriveState-BlkHvH6g.js";
|
|
9
9
|
import "../devBrowser-ezvLE7uo.js";
|
|
10
|
-
import "../error-
|
|
10
|
+
import "../error-DUHToUnE.js";
|
|
11
11
|
import "../file-B_f0oD8h.js";
|
|
12
12
|
import "../getEnvVariable-BcT_PqmA.js";
|
|
13
13
|
import "../handleValueOrFn-BpIDq7Ek.js";
|
|
14
14
|
import "../index-DcfXAwQx.js";
|
|
15
15
|
import "../isomorphicAtob-D61jyCi3.js";
|
|
16
16
|
import "../isomorphicBtoa-DZZ0MKdz.js";
|
|
17
|
-
import "../keys-
|
|
18
|
-
import "../loadClerkJsScript-
|
|
17
|
+
import "../keys-CZIl86HQ.js";
|
|
18
|
+
import "../loadClerkJsScript-CVmbzyxS.js";
|
|
19
19
|
import "../loadScript-BPX0RAWu.js";
|
|
20
20
|
import "../localStorageBroadcastChannel-BSisnDfR.js";
|
|
21
21
|
import "../poller-CIrx6NwR.js";
|
|
@@ -26,7 +26,7 @@ import "../versionSelector-CP0JpoAM.js";
|
|
|
26
26
|
import "../object-5d8ACLdH.js";
|
|
27
27
|
import "../logger-CWWjPZMR.js";
|
|
28
28
|
import "../index-z_SguuaJ.js";
|
|
29
|
-
import "../pathMatcher-
|
|
29
|
+
import "../pathMatcher-WU_-IXYh.js";
|
|
30
30
|
import "../netlifyCacheHandler-Di70sUEE.js";
|
|
31
31
|
import "../index-B5F3AfVc.js";
|
|
32
32
|
import React, { PropsWithChildren, ReactNode } from "react";
|