@clerk/chrome-extension 3.0.0-snapshot.v20251204143242 → 3.0.0-snapshot.v20251208202852

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.
@@ -1313,7 +1313,7 @@ var isThatComponent = (v, component) => {
1313
1313
  return !!v && React7__default.default.isValidElement(v) && (v == null ? void 0 : v.type) === component;
1314
1314
  };
1315
1315
  var useUserProfileCustomPages = (children, options) => {
1316
- const reorderItemsLabels = ["account", "security"];
1316
+ const reorderItemsLabels = ["account", "security", "billing", "apiKeys"];
1317
1317
  return useCustomPages(
1318
1318
  {
1319
1319
  children,
@@ -1327,7 +1327,7 @@ var useUserProfileCustomPages = (children, options) => {
1327
1327
  );
1328
1328
  };
1329
1329
  var useOrganizationProfileCustomPages = (children, options) => {
1330
- const reorderItemsLabels = ["general", "members"];
1330
+ const reorderItemsLabels = ["general", "members", "billing", "apiKeys"];
1331
1331
  return useCustomPages(
1332
1332
  {
1333
1333
  children,
@@ -2175,6 +2175,27 @@ withClerk(
2175
2175
  },
2176
2176
  { component: "TaskChooseOrganization", renderWhileLoading: true }
2177
2177
  );
2178
+ withClerk(
2179
+ ({ clerk: clerk2, component, fallback, ...props }) => {
2180
+ const mountingStatus = useWaitForComponentMount(component);
2181
+ const shouldShowFallback = mountingStatus === "rendering" || !clerk2.loaded;
2182
+ const rendererRootProps = {
2183
+ ...shouldShowFallback && fallback && { style: { display: "none" } }
2184
+ };
2185
+ return /* @__PURE__ */ React7__default.default.createElement(React7__default.default.Fragment, null, shouldShowFallback && fallback, clerk2.loaded && /* @__PURE__ */ React7__default.default.createElement(
2186
+ ClerkHostRenderer,
2187
+ {
2188
+ component,
2189
+ mount: clerk2.mountTaskResetPassword,
2190
+ unmount: clerk2.unmountTaskResetPassword,
2191
+ updateProps: clerk2.__internal_updateProps,
2192
+ props,
2193
+ rootProps: rendererRootProps
2194
+ }
2195
+ ));
2196
+ },
2197
+ { component: "TaskResetPassword", renderWhileLoading: true }
2198
+ );
2178
2199
 
2179
2200
  // ../react/dist/chunk-OANWQR3B.mjs
2180
2201
  var __typeError = (msg) => {
@@ -2237,7 +2258,7 @@ var retry = async (callback, options = {}) => {
2237
2258
  }
2238
2259
  };
2239
2260
 
2240
- // ../shared/dist/runtime/loadScript-DDWWb733.mjs
2261
+ // ../shared/dist/runtime/loadScript-CHWOPTAN.mjs
2241
2262
  var NO_DOCUMENT_ERROR = "loadScript cannot be called when document does not exist";
2242
2263
  var NO_SRC_ERROR = "loadScript cannot be called without a src";
2243
2264
  async function loadScript(src = "", opts) {
@@ -2251,7 +2272,6 @@ async function loadScript(src = "", opts) {
2251
2272
  script.async = async || false;
2252
2273
  script.defer = defer || false;
2253
2274
  script.addEventListener("load", () => {
2254
- console.log("this loaded ", src);
2255
2275
  script.remove();
2256
2276
  resolve(script);
2257
2277
  });
@@ -2267,7 +2287,6 @@ async function loadScript(src = "", opts) {
2267
2287
  });
2268
2288
  };
2269
2289
  return retry(load, { shouldRetry: (_, iterations) => {
2270
- console.log("nikos 3", _, iterations);
2271
2290
  return iterations <= 5;
2272
2291
  } });
2273
2292
  }
@@ -2298,12 +2317,12 @@ function addClerkPrefix(str) {
2298
2317
  return `clerk.${str.replace(regex, "")}`;
2299
2318
  }
2300
2319
 
2301
- // ../shared/dist/runtime/versionSelector-DAHukW82.mjs
2302
- var versionSelector = (clerkJSVersion, packageVersion = "6.0.0-snapshot.v20251204143242") => {
2320
+ // ../shared/dist/runtime/versionSelector-BCQasG48.mjs
2321
+ var versionSelector = (clerkJSVersion, packageVersion = "6.0.0-snapshot.v20251208202852") => {
2303
2322
  if (clerkJSVersion) return clerkJSVersion;
2304
2323
  const prereleaseTag = getPrereleaseTag(packageVersion);
2305
2324
  if (prereleaseTag) {
2306
- if (prereleaseTag === "snapshot") return "6.0.0-snapshot.v20251204143242";
2325
+ if (prereleaseTag === "snapshot") return "6.0.0-snapshot.v20251208202852";
2307
2326
  return prereleaseTag;
2308
2327
  }
2309
2328
  return getMajorVersion(packageVersion);
@@ -2322,6 +2341,21 @@ function isClerkGlobalProperlyLoaded(prop) {
2322
2341
  return !!window[prop];
2323
2342
  }
2324
2343
  var isClerkUiProperlyLoaded = () => isClerkGlobalProperlyLoaded("__internal_ClerkUiCtor");
2344
+ function hasScriptRequestError(scriptUrl) {
2345
+ if (typeof window === "undefined" || !window.performance) return false;
2346
+ const entries = performance.getEntriesByName(scriptUrl, "resource");
2347
+ if (entries.length === 0) return false;
2348
+ const scriptEntry = entries[entries.length - 1];
2349
+ if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {
2350
+ if (scriptEntry.responseEnd === 0) return true;
2351
+ if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) return true;
2352
+ if ("responseStatus" in scriptEntry) {
2353
+ if (scriptEntry.responseStatus >= 400) return true;
2354
+ if (scriptEntry.responseStatus === 0) return true;
2355
+ }
2356
+ }
2357
+ return false;
2358
+ }
2325
2359
  var loadClerkUiScript = async (opts) => {
2326
2360
  var _a5;
2327
2361
  const timeout = (_a5 = opts == null ? void 0 : opts.scriptLoadTimeout) != null ? _a5 : 15e3;
@@ -2330,13 +2364,21 @@ var loadClerkUiScript = async (opts) => {
2330
2364
  cause: error
2331
2365
  });
2332
2366
  if (isClerkUiProperlyLoaded()) return null;
2333
- if (document.querySelector("script[data-clerk-ui-script]")) return waitForPredicateWithTimeout(timeout, isClerkUiProperlyLoaded, rejectWith());
2334
2367
  if (!(opts == null ? void 0 : opts.publishableKey)) {
2335
2368
  errorThrower2.throwMissingPublishableKeyError();
2336
2369
  return null;
2337
2370
  }
2371
+ const scriptUrl = clerkUiScriptUrl(opts);
2372
+ const existingScript = document.querySelector("script[data-clerk-ui-script]");
2373
+ if (existingScript) if (hasScriptRequestError(scriptUrl)) existingScript.remove();
2374
+ else try {
2375
+ await waitForPredicateWithTimeout(timeout, isClerkUiProperlyLoaded, rejectWith(), existingScript);
2376
+ return null;
2377
+ } catch {
2378
+ existingScript.remove();
2379
+ }
2338
2380
  const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUiProperlyLoaded, rejectWith());
2339
- loadScript(clerkUiScriptUrl(opts), {
2381
+ loadScript(scriptUrl, {
2340
2382
  async: true,
2341
2383
  crossOrigin: "anonymous",
2342
2384
  nonce: opts.nonce,
@@ -2376,13 +2418,17 @@ var buildScriptHost = (opts) => {
2376
2418
  else if (domain && !isDevOrStagingUrl(((_a5 = parsePublishableKey(publishableKey)) == null ? void 0 : _a5.frontendApi) || "")) return addClerkPrefix(domain);
2377
2419
  else return ((_b = parsePublishableKey(publishableKey)) == null ? void 0 : _b.frontendApi) || "";
2378
2420
  };
2379
- function waitForPredicateWithTimeout(timeoutMs, predicate, rejectWith) {
2421
+ function waitForPredicateWithTimeout(timeoutMs, predicate, rejectWith, existingScript) {
2380
2422
  return new Promise((resolve, reject) => {
2381
2423
  let resolved = false;
2382
2424
  const cleanup = (timeoutId$1, pollInterval$1) => {
2383
2425
  clearTimeout(timeoutId$1);
2384
2426
  clearInterval(pollInterval$1);
2385
2427
  };
2428
+ existingScript == null ? void 0 : existingScript.addEventListener("error", () => {
2429
+ cleanup(timeoutId, pollInterval);
2430
+ reject(rejectWith);
2431
+ });
2386
2432
  const checkAndResolve = () => {
2387
2433
  if (resolved) return;
2388
2434
  if (predicate()) {
@@ -2995,7 +3041,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
2995
3041
  }
2996
3042
  var SDK_METADATA = {
2997
3043
  name: "@clerk/react",
2998
- version: "6.0.0-snapshot.v20251204143242",
3044
+ version: "6.0.0-snapshot.v20251208202852",
2999
3045
  environment: process.env.NODE_ENV
3000
3046
  };
3001
3047
  var _status;
@@ -3038,6 +3084,7 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
3038
3084
  this.premountAPIKeysNodes = /* @__PURE__ */ new Map();
3039
3085
  this.premountOAuthConsentNodes = /* @__PURE__ */ new Map();
3040
3086
  this.premountTaskChooseOrganizationNodes = /* @__PURE__ */ new Map();
3087
+ this.premountTaskResetPasswordNodes = /* @__PURE__ */ new Map();
3041
3088
  this.premountAddListenerCalls = /* @__PURE__ */ new Map();
3042
3089
  this.loadedListeners = [];
3043
3090
  __privateAdd2(this, _status, "loading");
@@ -3316,6 +3363,9 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
3316
3363
  this.premountTaskChooseOrganizationNodes.forEach((props, node) => {
3317
3364
  clerkjs.mountTaskChooseOrganization(node, props);
3318
3365
  });
3366
+ this.premountTaskResetPasswordNodes.forEach((props, node) => {
3367
+ clerkjs.mountTaskResetPassword(node, props);
3368
+ });
3319
3369
  if (typeof this.clerkjs.status === "undefined") {
3320
3370
  __privateGet2(this, _eventBus).emit(clerkEvents.Status, "ready");
3321
3371
  }
@@ -3713,6 +3763,20 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
3713
3763
  this.premountTaskChooseOrganizationNodes.delete(node);
3714
3764
  }
3715
3765
  };
3766
+ this.mountTaskResetPassword = (node, props) => {
3767
+ if (this.clerkjs && this.loaded) {
3768
+ this.clerkjs.mountTaskResetPassword(node, props);
3769
+ } else {
3770
+ this.premountTaskResetPasswordNodes.set(node, props);
3771
+ }
3772
+ };
3773
+ this.unmountTaskResetPassword = (node) => {
3774
+ if (this.clerkjs && this.loaded) {
3775
+ this.clerkjs.unmountTaskResetPassword(node);
3776
+ } else {
3777
+ this.premountTaskResetPasswordNodes.delete(node);
3778
+ }
3779
+ };
3716
3780
  this.addListener = (listener) => {
3717
3781
  if (this.clerkjs) {
3718
3782
  return this.clerkjs.addListener(listener);
@@ -4574,7 +4638,7 @@ var BrowserStorageCache = createBrowserStorageCache();
4574
4638
  var clerk;
4575
4639
  noRhc.Clerk.sdkMetadata = {
4576
4640
  name: "@clerk/chrome-extension",
4577
- version: "3.0.0-snapshot.v20251204143242"
4641
+ version: "3.0.0-snapshot.v20251208202852"
4578
4642
  };
4579
4643
  function createClerkClient({
4580
4644
  __experimental_syncHostListener = false,