@clerk/chrome-extension 3.0.0-snapshot.v20251204175016 → 3.0.0-snapshot.v20251211120550

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.
@@ -429,7 +429,7 @@ var BrowserStorageCache = createBrowserStorageCache();
429
429
  var clerk;
430
430
  noRhc.Clerk.sdkMetadata = {
431
431
  name: "@clerk/chrome-extension",
432
- version: "3.0.0-snapshot.v20251204175016"
432
+ version: "3.0.0-snapshot.v20251211120550"
433
433
  };
434
434
  function createClerkClient({
435
435
  __experimental_syncHostListener = false,
package/dist/cjs/index.js CHANGED
@@ -455,7 +455,7 @@ var resolveAuthState = ({ authObject: { sessionId, sessionStatus, userId, actor,
455
455
  };
456
456
  };
457
457
 
458
- // ../shared/dist/runtime/organization-JwY1zGRo.mjs
458
+ // ../shared/dist/runtime/organization-CDNOZNzF.mjs
459
459
  function getCurrentOrganizationMembership(organizationMemberships, organizationId) {
460
460
  return organizationMemberships.find((organizationMembership) => organizationMembership.organization.id === organizationId);
461
461
  }
@@ -3092,7 +3092,7 @@ var isThatComponent = (v, component) => {
3092
3092
  return !!v && React7__default.default.isValidElement(v) && (v == null ? void 0 : v.type) === component;
3093
3093
  };
3094
3094
  var useUserProfileCustomPages = (children, options) => {
3095
- const reorderItemsLabels = ["account", "security"];
3095
+ const reorderItemsLabels = ["account", "security", "billing", "apiKeys"];
3096
3096
  return useCustomPages(
3097
3097
  {
3098
3098
  children,
@@ -3106,7 +3106,7 @@ var useUserProfileCustomPages = (children, options) => {
3106
3106
  );
3107
3107
  };
3108
3108
  var useOrganizationProfileCustomPages = (children, options) => {
3109
- const reorderItemsLabels = ["general", "members"];
3109
+ const reorderItemsLabels = ["general", "members", "billing", "apiKeys"];
3110
3110
  return useCustomPages(
3111
3111
  {
3112
3112
  children,
@@ -3954,6 +3954,27 @@ withClerk(
3954
3954
  },
3955
3955
  { component: "TaskChooseOrganization", renderWhileLoading: true }
3956
3956
  );
3957
+ withClerk(
3958
+ ({ clerk: clerk2, component, fallback, ...props }) => {
3959
+ const mountingStatus = useWaitForComponentMount(component);
3960
+ const shouldShowFallback = mountingStatus === "rendering" || !clerk2.loaded;
3961
+ const rendererRootProps = {
3962
+ ...shouldShowFallback && fallback && { style: { display: "none" } }
3963
+ };
3964
+ return /* @__PURE__ */ React7__default.default.createElement(React7__default.default.Fragment, null, shouldShowFallback && fallback, clerk2.loaded && /* @__PURE__ */ React7__default.default.createElement(
3965
+ ClerkHostRenderer,
3966
+ {
3967
+ component,
3968
+ mount: clerk2.mountTaskResetPassword,
3969
+ unmount: clerk2.unmountTaskResetPassword,
3970
+ updateProps: clerk2.__internal_updateProps,
3971
+ props,
3972
+ rootProps: rendererRootProps
3973
+ }
3974
+ ));
3975
+ },
3976
+ { component: "TaskResetPassword", renderWhileLoading: true }
3977
+ );
3957
3978
 
3958
3979
  // ../react/dist/chunk-OANWQR3B.mjs
3959
3980
  var __typeError = (msg) => {
@@ -4016,7 +4037,7 @@ var retry = async (callback, options = {}) => {
4016
4037
  }
4017
4038
  };
4018
4039
 
4019
- // ../shared/dist/runtime/loadScript-DDWWb733.mjs
4040
+ // ../shared/dist/runtime/loadScript-CHWOPTAN.mjs
4020
4041
  var NO_DOCUMENT_ERROR = "loadScript cannot be called when document does not exist";
4021
4042
  var NO_SRC_ERROR = "loadScript cannot be called without a src";
4022
4043
  async function loadScript(src = "", opts) {
@@ -4030,7 +4051,6 @@ async function loadScript(src = "", opts) {
4030
4051
  script.async = async || false;
4031
4052
  script.defer = defer || false;
4032
4053
  script.addEventListener("load", () => {
4033
- console.log("this loaded ", src);
4034
4054
  script.remove();
4035
4055
  resolve(script);
4036
4056
  });
@@ -4046,7 +4066,6 @@ async function loadScript(src = "", opts) {
4046
4066
  });
4047
4067
  };
4048
4068
  return retry(load, { shouldRetry: (_, iterations) => {
4049
- console.log("nikos 3", _, iterations);
4050
4069
  return iterations <= 5;
4051
4070
  } });
4052
4071
  }
@@ -4077,12 +4096,12 @@ function addClerkPrefix(str) {
4077
4096
  return `clerk.${str.replace(regex, "")}`;
4078
4097
  }
4079
4098
 
4080
- // ../shared/dist/runtime/versionSelector-C99RARtR.mjs
4081
- var versionSelector = (clerkJSVersion, packageVersion = "6.0.0-snapshot.v20251204175016") => {
4099
+ // ../shared/dist/runtime/versionSelector-v6LvGO6I.mjs
4100
+ var versionSelector = (clerkJSVersion, packageVersion = "6.0.0-snapshot.v20251211120550") => {
4082
4101
  if (clerkJSVersion) return clerkJSVersion;
4083
4102
  const prereleaseTag = getPrereleaseTag(packageVersion);
4084
4103
  if (prereleaseTag) {
4085
- if (prereleaseTag === "snapshot") return "6.0.0-snapshot.v20251204175016";
4104
+ if (prereleaseTag === "snapshot") return packageVersion;
4086
4105
  return prereleaseTag;
4087
4106
  }
4088
4107
  return getMajorVersion(packageVersion);
@@ -4101,6 +4120,21 @@ function isClerkGlobalProperlyLoaded(prop) {
4101
4120
  return !!window[prop];
4102
4121
  }
4103
4122
  var isClerkUiProperlyLoaded = () => isClerkGlobalProperlyLoaded("__internal_ClerkUiCtor");
4123
+ function hasScriptRequestError(scriptUrl) {
4124
+ if (typeof window === "undefined" || !window.performance) return false;
4125
+ const entries = performance.getEntriesByName(scriptUrl, "resource");
4126
+ if (entries.length === 0) return false;
4127
+ const scriptEntry = entries[entries.length - 1];
4128
+ if (scriptEntry.transferSize === 0 && scriptEntry.decodedBodySize === 0) {
4129
+ if (scriptEntry.responseEnd === 0) return true;
4130
+ if (scriptEntry.responseEnd > 0 && scriptEntry.responseStart > 0) return true;
4131
+ if ("responseStatus" in scriptEntry) {
4132
+ if (scriptEntry.responseStatus >= 400) return true;
4133
+ if (scriptEntry.responseStatus === 0) return true;
4134
+ }
4135
+ }
4136
+ return false;
4137
+ }
4104
4138
  var loadClerkUiScript = async (opts) => {
4105
4139
  var _a5;
4106
4140
  const timeout = (_a5 = opts == null ? void 0 : opts.scriptLoadTimeout) != null ? _a5 : 15e3;
@@ -4109,13 +4143,21 @@ var loadClerkUiScript = async (opts) => {
4109
4143
  cause: error
4110
4144
  });
4111
4145
  if (isClerkUiProperlyLoaded()) return null;
4112
- if (document.querySelector("script[data-clerk-ui-script]")) return waitForPredicateWithTimeout(timeout, isClerkUiProperlyLoaded, rejectWith());
4113
4146
  if (!(opts == null ? void 0 : opts.publishableKey)) {
4114
4147
  errorThrower2.throwMissingPublishableKeyError();
4115
4148
  return null;
4116
4149
  }
4150
+ const scriptUrl = clerkUiScriptUrl(opts);
4151
+ const existingScript = document.querySelector("script[data-clerk-ui-script]");
4152
+ if (existingScript) if (hasScriptRequestError(scriptUrl)) existingScript.remove();
4153
+ else try {
4154
+ await waitForPredicateWithTimeout(timeout, isClerkUiProperlyLoaded, rejectWith(), existingScript);
4155
+ return null;
4156
+ } catch {
4157
+ existingScript.remove();
4158
+ }
4117
4159
  const loadPromise = waitForPredicateWithTimeout(timeout, isClerkUiProperlyLoaded, rejectWith());
4118
- loadScript(clerkUiScriptUrl(opts), {
4160
+ loadScript(scriptUrl, {
4119
4161
  async: true,
4120
4162
  crossOrigin: "anonymous",
4121
4163
  nonce: opts.nonce,
@@ -4132,7 +4174,7 @@ var clerkUiScriptUrl = (opts) => {
4132
4174
  publishableKey,
4133
4175
  proxyUrl,
4134
4176
  domain
4135
- })}/npm/@clerk/ui@${versionSelector(clerkUiVersion)}/dist/ui.browser.js`;
4177
+ })}/npm/@clerk/ui@${versionSelector(clerkUiVersion, "1.0.0-snapshot.v20251211120550")}/dist/ui.browser.js`;
4136
4178
  };
4137
4179
  var buildClerkJsScriptAttributes = (options) => {
4138
4180
  const obj = {};
@@ -4155,13 +4197,17 @@ var buildScriptHost = (opts) => {
4155
4197
  else if (domain && !isDevOrStagingUrl(((_a5 = parsePublishableKey(publishableKey)) == null ? void 0 : _a5.frontendApi) || "")) return addClerkPrefix(domain);
4156
4198
  else return ((_b = parsePublishableKey(publishableKey)) == null ? void 0 : _b.frontendApi) || "";
4157
4199
  };
4158
- function waitForPredicateWithTimeout(timeoutMs, predicate, rejectWith) {
4200
+ function waitForPredicateWithTimeout(timeoutMs, predicate, rejectWith, existingScript) {
4159
4201
  return new Promise((resolve, reject) => {
4160
4202
  let resolved = false;
4161
4203
  const cleanup = (timeoutId$1, pollInterval$1) => {
4162
4204
  clearTimeout(timeoutId$1);
4163
4205
  clearInterval(pollInterval$1);
4164
4206
  };
4207
+ existingScript == null ? void 0 : existingScript.addEventListener("error", () => {
4208
+ cleanup(timeoutId, pollInterval);
4209
+ reject(rejectWith);
4210
+ });
4165
4211
  const checkAndResolve = () => {
4166
4212
  if (resolved) return;
4167
4213
  if (predicate()) {
@@ -4774,7 +4820,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
4774
4820
  }
4775
4821
  var SDK_METADATA = {
4776
4822
  name: "@clerk/react",
4777
- version: "6.0.0-snapshot.v20251204175016",
4823
+ version: "6.0.0-snapshot.v20251211120550",
4778
4824
  environment: process.env.NODE_ENV
4779
4825
  };
4780
4826
  var _status;
@@ -4817,6 +4863,7 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
4817
4863
  this.premountAPIKeysNodes = /* @__PURE__ */ new Map();
4818
4864
  this.premountOAuthConsentNodes = /* @__PURE__ */ new Map();
4819
4865
  this.premountTaskChooseOrganizationNodes = /* @__PURE__ */ new Map();
4866
+ this.premountTaskResetPasswordNodes = /* @__PURE__ */ new Map();
4820
4867
  this.premountAddListenerCalls = /* @__PURE__ */ new Map();
4821
4868
  this.loadedListeners = [];
4822
4869
  __privateAdd2(this, _status, "loading");
@@ -5095,6 +5142,9 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
5095
5142
  this.premountTaskChooseOrganizationNodes.forEach((props, node) => {
5096
5143
  clerkjs.mountTaskChooseOrganization(node, props);
5097
5144
  });
5145
+ this.premountTaskResetPasswordNodes.forEach((props, node) => {
5146
+ clerkjs.mountTaskResetPassword(node, props);
5147
+ });
5098
5148
  if (typeof this.clerkjs.status === "undefined") {
5099
5149
  __privateGet2(this, _eventBus).emit(clerkEvents.Status, "ready");
5100
5150
  }
@@ -5492,6 +5542,20 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
5492
5542
  this.premountTaskChooseOrganizationNodes.delete(node);
5493
5543
  }
5494
5544
  };
5545
+ this.mountTaskResetPassword = (node, props) => {
5546
+ if (this.clerkjs && this.loaded) {
5547
+ this.clerkjs.mountTaskResetPassword(node, props);
5548
+ } else {
5549
+ this.premountTaskResetPasswordNodes.set(node, props);
5550
+ }
5551
+ };
5552
+ this.unmountTaskResetPassword = (node) => {
5553
+ if (this.clerkjs && this.loaded) {
5554
+ this.clerkjs.unmountTaskResetPassword(node);
5555
+ } else {
5556
+ this.premountTaskResetPasswordNodes.delete(node);
5557
+ }
5558
+ };
5495
5559
  this.addListener = (listener) => {
5496
5560
  if (this.clerkjs) {
5497
5561
  return this.clerkjs.addListener(listener);
@@ -6353,7 +6417,7 @@ var BrowserStorageCache = createBrowserStorageCache();
6353
6417
  var clerk;
6354
6418
  noRhc.Clerk.sdkMetadata = {
6355
6419
  name: "@clerk/chrome-extension",
6356
- version: "3.0.0-snapshot.v20251204175016"
6420
+ version: "3.0.0-snapshot.v20251211120550"
6357
6421
  };
6358
6422
  function createClerkClient({
6359
6423
  __experimental_syncHostListener = false,