@clerk/chrome-extension 2.8.3-canary.v20251118172715 → 2.8.3-snapshot.v20251118233019

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: "2.8.3-canary.v20251118172715"
432
+ version: "2.8.3-snapshot.v20251118233019"
433
433
  };
434
434
  async function createClerkClient({
435
435
  __experimental_syncHostListener = false,
package/dist/cjs/index.js CHANGED
@@ -416,13 +416,13 @@ function isPublishableKey(key = "") {
416
416
  }
417
417
  }
418
418
 
419
- // ../shared/dist/runtime/telemetry-wqMDWlvR.mjs
419
+ // ../shared/dist/runtime/telemetry-DoVTElgI.mjs
420
420
  var EVENT_METHOD_CALLED = "METHOD_CALLED";
421
- var EVENT_SAMPLING_RATE$2 = 0.1;
421
+ var EVENT_SAMPLING_RATE$3 = 0.1;
422
422
  function eventMethodCalled(method, payload) {
423
423
  return {
424
424
  event: EVENT_METHOD_CALLED,
425
- eventSamplingRate: EVENT_SAMPLING_RATE$2,
425
+ eventSamplingRate: EVENT_SAMPLING_RATE$3,
426
426
  payload: {
427
427
  method,
428
428
  ...payload
@@ -460,11 +460,6 @@ var createDeferredPromise = () => {
460
460
  };
461
461
  };
462
462
 
463
- // ../shared/dist/runtime/organization-D9SEGukq.mjs
464
- function getCurrentOrganizationMembership(organizationMemberships, organizationId) {
465
- return organizationMemberships.find((organizationMembership) => organizationMembership.organization.id === organizationId);
466
- }
467
-
468
463
  // ../../node_modules/.pnpm/swr@2.3.4_react@18.3.1/node_modules/swr/dist/_internal/events.mjs
469
464
  var events_exports = {};
470
465
  __export(events_exports, {
@@ -1769,7 +1764,7 @@ function dequal2(foo, bar) {
1769
1764
  return foo !== foo && bar !== bar;
1770
1765
  }
1771
1766
 
1772
- // ../shared/dist/runtime/react/index.mjs
1767
+ // ../shared/dist/runtime/organization-oPqzCGOd.mjs
1773
1768
  function assertContextExists(contextVal, msgOrCtx) {
1774
1769
  if (!contextVal) throw typeof msgOrCtx === "string" ? new Error(msgOrCtx) : /* @__PURE__ */ new Error(`${msgOrCtx.displayName} not found`);
1775
1770
  }
@@ -2020,6 +2015,7 @@ function useOrganization(params) {
2020
2015
  var _a5;
2021
2016
  const { domains: domainListParams, membershipRequests: membershipRequestsListParams, memberships: membersListParams, invitations: invitationsListParams } = params || {};
2022
2017
  useAssertWrappedByClerkProvider("useOrganization");
2018
+ useAttemptToEnableOrganizations("useOrganization");
2023
2019
  const { organization } = useOrganizationContext();
2024
2020
  const session = useSessionContext();
2025
2021
  const domainSafeValues = useWithSafeValues(domainListParams, {
@@ -2200,6 +2196,7 @@ function useOrganizationList(params) {
2200
2196
  var _a5;
2201
2197
  const { userMemberships, userInvitations, userSuggestions } = params || {};
2202
2198
  useAssertWrappedByClerkProvider("useOrganizationList");
2199
+ useAttemptToEnableOrganizations("useOrganizationList");
2203
2200
  const userMembershipsSafeValues = useWithSafeValues(userMemberships, {
2204
2201
  initialPage: 1,
2205
2202
  pageSize: 10,
@@ -2596,6 +2593,21 @@ createElementComponent("payment", typeof window === "undefined");
2596
2593
  createContextAndHook("StripeLibsContext");
2597
2594
  createContextAndHook("PaymentElementContext");
2598
2595
  createContextAndHook("StripeUtilsContext");
2596
+ function getCurrentOrganizationMembership(organizationMemberships, organizationId) {
2597
+ return organizationMemberships.find((organizationMembership) => organizationMembership.organization.id === organizationId);
2598
+ }
2599
+ function useAttemptToEnableOrganizations(caller) {
2600
+ const clerk2 = useClerk();
2601
+ const hasAttempted = React7.useRef(false);
2602
+ React7.useEffect(() => {
2603
+ if (hasAttempted.current) return;
2604
+ hasAttempted.current = true;
2605
+ clerk2.__internal_attemptToEnableEnvironmentSetting({
2606
+ for: "organizations",
2607
+ caller
2608
+ });
2609
+ }, [clerk2, caller]);
2610
+ }
2599
2611
  var errorThrower = buildErrorThrower({ packageName: "@clerk/clerk-react" });
2600
2612
  function setErrorThrowerOptions(options) {
2601
2613
  errorThrower.setMessages(options).setPackageName(options);
@@ -4414,7 +4426,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
4414
4426
  }
4415
4427
  var SDK_METADATA = {
4416
4428
  name: "@clerk/clerk-react",
4417
- version: "5.56.1-canary.v20251118172715",
4429
+ version: "5.57.0-snapshot.v20251118233019",
4418
4430
  environment: process.env.NODE_ENV
4419
4431
  };
4420
4432
  var _status;
@@ -4824,6 +4836,16 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
4824
4836
  this.preopenUserVerification = null;
4825
4837
  }
4826
4838
  };
4839
+ this.__internal_openEnableOrganizationsPrompt = (props) => {
4840
+ if (this.clerkjs && this.loaded) {
4841
+ this.clerkjs.__internal_openEnableOrganizationsPrompt(props);
4842
+ }
4843
+ };
4844
+ this.__internal_closeEnableOrganizationsPrompt = () => {
4845
+ if (this.clerkjs && this.loaded) {
4846
+ this.clerkjs.__internal_closeEnableOrganizationsPrompt();
4847
+ }
4848
+ };
4827
4849
  this.openGoogleOneTap = (props) => {
4828
4850
  if (this.clerkjs && this.loaded) {
4829
4851
  this.clerkjs.openGoogleOneTap(props);
@@ -5415,6 +5437,17 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
5415
5437
  this.premountMethodCalls.set("signOut", callback);
5416
5438
  }
5417
5439
  };
5440
+ this.__internal_attemptToEnableEnvironmentSetting = (options2) => {
5441
+ const callback = () => {
5442
+ var _a5;
5443
+ return (_a5 = this.clerkjs) == null ? void 0 : _a5.__internal_attemptToEnableEnvironmentSetting(options2);
5444
+ };
5445
+ if (this.clerkjs && this.loaded) {
5446
+ return callback();
5447
+ } else {
5448
+ this.premountMethodCalls.set("__internal_attemptToEnableEnvironmentSetting", callback);
5449
+ }
5450
+ };
5418
5451
  const { Clerk: Clerk2 = null, publishableKey } = options || {};
5419
5452
  __privateSet2(this, _publishableKey, publishableKey);
5420
5453
  __privateSet2(this, _proxyUrl, options == null ? void 0 : options.proxyUrl);
@@ -5958,7 +5991,7 @@ var BrowserStorageCache = createBrowserStorageCache();
5958
5991
  var clerk;
5959
5992
  noRhc.Clerk.sdkMetadata = {
5960
5993
  name: "@clerk/chrome-extension",
5961
- version: "2.8.3-canary.v20251118172715"
5994
+ version: "2.8.3-snapshot.v20251118233019"
5962
5995
  };
5963
5996
  async function createClerkClient({
5964
5997
  __experimental_syncHostListener = false,