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

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.
@@ -1085,6 +1085,40 @@ var createElementComponent = (type, isServer) => {
1085
1085
  createElementComponent("payment", typeof window === "undefined");
1086
1086
  createContextAndHook("PaymentElementContext");
1087
1087
  createContextAndHook("StripeUtilsContext");
1088
+ var PortalRootManager = class {
1089
+ constructor() {
1090
+ __publicField(this, "stack", []);
1091
+ }
1092
+ /**
1093
+ * Push a new portal root getter onto the stack.
1094
+ * @param getContainer Function that returns the container element
1095
+ */
1096
+ push(getContainer) {
1097
+ this.stack.push(getContainer);
1098
+ }
1099
+ /**
1100
+ * Pop the most recent portal root from the stack.
1101
+ */
1102
+ pop() {
1103
+ this.stack.pop();
1104
+ }
1105
+ /**
1106
+ * Get the current (topmost) portal root container.
1107
+ * @returns The container element or null if no provider is active
1108
+ */
1109
+ getCurrent() {
1110
+ if (this.stack.length === 0) return null;
1111
+ const getContainer = this.stack[this.stack.length - 1];
1112
+ return getContainer();
1113
+ }
1114
+ };
1115
+ var portalRootManager = new PortalRootManager();
1116
+ var [PortalContext, , usePortalContextWithoutGuarantee] = createContextAndHook("PortalProvider");
1117
+ var usePortalRoot = () => {
1118
+ const contextValue = usePortalContextWithoutGuarantee();
1119
+ if (contextValue && "getContainer" in contextValue && contextValue.getContainer) return contextValue.getContainer;
1120
+ return portalRootManager.getCurrent.bind(portalRootManager);
1121
+ };
1088
1122
 
1089
1123
  // ../react/dist/chunk-MB46WFKC.mjs
1090
1124
  var errorThrower = buildErrorThrower({ packageName: "@clerk/react" });
@@ -1124,12 +1158,14 @@ var withClerk = (Component, displayNameOrOptions) => {
1124
1158
  const HOC = (props) => {
1125
1159
  useAssertWrappedByClerkProvider2(displayName || "withClerk");
1126
1160
  const clerk2 = useIsomorphicClerkContext();
1161
+ const getContainer = usePortalRoot();
1127
1162
  if (!clerk2.loaded && !(options == null ? void 0 : options.renderWhileLoading)) {
1128
1163
  return null;
1129
1164
  }
1130
1165
  return /* @__PURE__ */ React7__default.default.createElement(
1131
1166
  Component,
1132
1167
  {
1168
+ getContainer,
1133
1169
  ...props,
1134
1170
  component: displayName,
1135
1171
  clerk: clerk2
@@ -2317,8 +2353,8 @@ function addClerkPrefix(str) {
2317
2353
  return `clerk.${str.replace(regex, "")}`;
2318
2354
  }
2319
2355
 
2320
- // ../shared/dist/runtime/versionSelector-v6LvGO6I.mjs
2321
- var versionSelector = (clerkJSVersion, packageVersion = "6.0.0-snapshot.v20251211120550") => {
2356
+ // ../shared/dist/runtime/versionSelector-lqQkdqJf.mjs
2357
+ var versionSelector = (clerkJSVersion, packageVersion = "6.0.0-snapshot.v20251215210631") => {
2322
2358
  if (clerkJSVersion) return clerkJSVersion;
2323
2359
  const prereleaseTag = getPrereleaseTag(packageVersion);
2324
2360
  if (prereleaseTag) {
@@ -2395,7 +2431,7 @@ var clerkUiScriptUrl = (opts) => {
2395
2431
  publishableKey,
2396
2432
  proxyUrl,
2397
2433
  domain
2398
- })}/npm/@clerk/ui@${versionSelector(clerkUiVersion, "1.0.0-snapshot.v20251211120550")}/dist/ui.browser.js`;
2434
+ })}/npm/@clerk/ui@${versionSelector(clerkUiVersion, "1.0.0-snapshot.v20251215210631")}/dist/ui.browser.js`;
2399
2435
  };
2400
2436
  var buildClerkJsScriptAttributes = (options) => {
2401
2437
  const obj = {};
@@ -3041,7 +3077,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
3041
3077
  }
3042
3078
  var SDK_METADATA = {
3043
3079
  name: "@clerk/react",
3044
- version: "6.0.0-snapshot.v20251211120550",
3080
+ version: "6.0.0-snapshot.v20251215210631",
3045
3081
  environment: process.env.NODE_ENV
3046
3082
  };
3047
3083
  var _status;
@@ -4638,7 +4674,7 @@ var BrowserStorageCache = createBrowserStorageCache();
4638
4674
  var clerk;
4639
4675
  noRhc.Clerk.sdkMetadata = {
4640
4676
  name: "@clerk/chrome-extension",
4641
- version: "3.0.0-snapshot.v20251211120550"
4677
+ version: "3.0.0-snapshot.v20251215210631"
4642
4678
  };
4643
4679
  function createClerkClient({
4644
4680
  __experimental_syncHostListener = false,