@clerk/chrome-extension 2.8.4-snapshot.v20251121134419 → 2.8.5-canary.v20251121181637

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.4-snapshot.v20251121134419"
432
+ version: "2.8.5-canary.v20251121181637"
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-DoVTElgI.mjs
419
+ // ../shared/dist/runtime/telemetry-wqMDWlvR.mjs
420
420
  var EVENT_METHOD_CALLED = "METHOD_CALLED";
421
- var EVENT_SAMPLING_RATE$3 = 0.1;
421
+ var EVENT_SAMPLING_RATE$2 = 0.1;
422
422
  function eventMethodCalled(method, payload) {
423
423
  return {
424
424
  event: EVENT_METHOD_CALLED,
425
- eventSamplingRate: EVENT_SAMPLING_RATE$3,
425
+ eventSamplingRate: EVENT_SAMPLING_RATE$2,
426
426
  payload: {
427
427
  method,
428
428
  ...payload
@@ -460,6 +460,11 @@ 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
+
463
468
  // ../../node_modules/.pnpm/swr@2.3.4_react@18.3.1/node_modules/swr/dist/_internal/events.mjs
464
469
  var events_exports = {};
465
470
  __export(events_exports, {
@@ -1764,7 +1769,7 @@ function dequal2(foo, bar) {
1764
1769
  return foo !== foo && bar !== bar;
1765
1770
  }
1766
1771
 
1767
- // ../shared/dist/runtime/organization-CY9GplQ0.mjs
1772
+ // ../shared/dist/runtime/react/index.mjs
1768
1773
  function assertContextExists(contextVal, msgOrCtx) {
1769
1774
  if (!contextVal) throw typeof msgOrCtx === "string" ? new Error(msgOrCtx) : /* @__PURE__ */ new Error(`${msgOrCtx.displayName} not found`);
1770
1775
  }
@@ -1850,6 +1855,14 @@ function createCacheKeys(params) {
1850
1855
  authenticated: params.authenticated
1851
1856
  };
1852
1857
  }
1858
+ function toSWRQuery(keys) {
1859
+ const { queryKey } = keys;
1860
+ return {
1861
+ type: queryKey[0],
1862
+ ...queryKey[2],
1863
+ ...queryKey[3].args
1864
+ };
1865
+ }
1853
1866
  var useWithSafeValues = (params, defaultValues) => {
1854
1867
  var _a5, _b, _c;
1855
1868
  const shouldUseDefaults = typeof params === "boolean" && params;
@@ -1898,9 +1911,7 @@ var usePagesOrInfinite = (params) => {
1898
1911
  const keepPreviousData = (_f = config.keepPreviousData) != null ? _f : false;
1899
1912
  const isSignedIn = config.isSignedIn;
1900
1913
  const pagesCacheKey = {
1901
- type: keys.queryKey[0],
1902
- ...keys.queryKey[2],
1903
- ...keys.queryKey[3].args,
1914
+ ...toSWRQuery(keys),
1904
1915
  initialPage: paginatedPage,
1905
1916
  pageSize: pageSizeRef.current
1906
1917
  };
@@ -1919,9 +1930,7 @@ var usePagesOrInfinite = (params) => {
1919
1930
  const { data: swrInfiniteData, isLoading: swrInfiniteIsLoading, isValidating: swrInfiniteIsValidating, error: swrInfiniteError, size, setSize, mutate: swrInfiniteMutate } = useSWRInfinite((pageIndex) => {
1920
1931
  if (!triggerInfinite || !enabled || isSignedIn === false) return null;
1921
1932
  return {
1922
- type: keys.queryKey[0],
1923
- ...keys.queryKey[2],
1924
- ...keys.queryKey[3].args,
1933
+ ...toSWRQuery(keys),
1925
1934
  initialPage: initialPageRef.current + pageIndex,
1926
1935
  pageSize: pageSizeRef.current
1927
1936
  };
@@ -2015,7 +2024,6 @@ function useOrganization(params) {
2015
2024
  var _a5;
2016
2025
  const { domains: domainListParams, membershipRequests: membershipRequestsListParams, memberships: membersListParams, invitations: invitationsListParams } = params || {};
2017
2026
  useAssertWrappedByClerkProvider("useOrganization");
2018
- useAttemptToEnableOrganizations("useOrganization");
2019
2027
  const { organization } = useOrganizationContext();
2020
2028
  const session = useSessionContext();
2021
2029
  const domainSafeValues = useWithSafeValues(domainListParams, {
@@ -2196,7 +2204,6 @@ function useOrganizationList(params) {
2196
2204
  var _a5;
2197
2205
  const { userMemberships, userInvitations, userSuggestions } = params || {};
2198
2206
  useAssertWrappedByClerkProvider("useOrganizationList");
2199
- useAttemptToEnableOrganizations("useOrganizationList");
2200
2207
  const userMembershipsSafeValues = useWithSafeValues(userMemberships, {
2201
2208
  initialPage: 1,
2202
2209
  pageSize: 10,
@@ -2590,25 +2597,8 @@ var createElementComponent = (type, isServer) => {
2590
2597
  return Element;
2591
2598
  };
2592
2599
  createElementComponent("payment", typeof window === "undefined");
2593
- createContextAndHook("StripeLibsContext");
2594
2600
  createContextAndHook("PaymentElementContext");
2595
2601
  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
- var _a5;
2604
- if (hasAttempted.current || !clerk2.loaded) return;
2605
- hasAttempted.current = true;
2606
- (_a5 = clerk2.__internal_attemptToEnableEnvironmentSetting) == null ? void 0 : _a5.call(clerk2, {
2607
- for: "organizations",
2608
- caller
2609
- });
2610
- }, [clerk2, caller]);
2611
- }
2612
2602
  var errorThrower = buildErrorThrower({ packageName: "@clerk/clerk-react" });
2613
2603
  function setErrorThrowerOptions(options) {
2614
2604
  errorThrower.setMessages(options).setPackageName(options);
@@ -4427,7 +4417,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
4427
4417
  }
4428
4418
  var SDK_METADATA = {
4429
4419
  name: "@clerk/clerk-react",
4430
- version: "5.57.0-snapshot.v20251121134419",
4420
+ version: "5.56.3-canary.v20251121181637",
4431
4421
  environment: process.env.NODE_ENV
4432
4422
  };
4433
4423
  var _status;
@@ -4445,7 +4435,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
4445
4435
  this.clerkjs = null;
4446
4436
  this.preopenOneTap = null;
4447
4437
  this.preopenUserVerification = null;
4448
- this.preopenEnableOrganizationsPrompt = null;
4449
4438
  this.preopenSignIn = null;
4450
4439
  this.preopenCheckout = null;
4451
4440
  this.preopenPlanDetails = null;
@@ -4712,9 +4701,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
4712
4701
  if (this.preOpenWaitlist !== null) {
4713
4702
  clerkjs.openWaitlist(this.preOpenWaitlist);
4714
4703
  }
4715
- if (this.preopenEnableOrganizationsPrompt) {
4716
- clerkjs.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt);
4717
- }
4718
4704
  this.premountSignInNodes.forEach((props, node) => {
4719
4705
  clerkjs.mountSignIn(node, props);
4720
4706
  });
@@ -4841,20 +4827,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
4841
4827
  this.preopenUserVerification = null;
4842
4828
  }
4843
4829
  };
4844
- this.__internal_openEnableOrganizationsPrompt = (props) => {
4845
- if (this.clerkjs && this.loaded) {
4846
- this.clerkjs.__internal_openEnableOrganizationsPrompt(props);
4847
- } else {
4848
- this.preopenEnableOrganizationsPrompt = props;
4849
- }
4850
- };
4851
- this.__internal_closeEnableOrganizationsPrompt = () => {
4852
- if (this.clerkjs && this.loaded) {
4853
- this.clerkjs.__internal_closeEnableOrganizationsPrompt();
4854
- } else {
4855
- this.preopenEnableOrganizationsPrompt = null;
4856
- }
4857
- };
4858
4830
  this.openGoogleOneTap = (props) => {
4859
4831
  if (this.clerkjs && this.loaded) {
4860
4832
  this.clerkjs.openGoogleOneTap(props);
@@ -5446,17 +5418,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
5446
5418
  this.premountMethodCalls.set("signOut", callback);
5447
5419
  }
5448
5420
  };
5449
- this.__internal_attemptToEnableEnvironmentSetting = (options2) => {
5450
- const callback = () => {
5451
- var _a5;
5452
- return (_a5 = this.clerkjs) == null ? void 0 : _a5.__internal_attemptToEnableEnvironmentSetting(options2);
5453
- };
5454
- if (this.clerkjs && this.loaded) {
5455
- return callback();
5456
- } else {
5457
- this.premountMethodCalls.set("__internal_attemptToEnableEnvironmentSetting", callback);
5458
- }
5459
- };
5460
5421
  const { Clerk: Clerk2 = null, publishableKey } = options || {};
5461
5422
  __privateSet2(this, _publishableKey, publishableKey);
5462
5423
  __privateSet2(this, _proxyUrl, options == null ? void 0 : options.proxyUrl);
@@ -6000,7 +5961,7 @@ var BrowserStorageCache = createBrowserStorageCache();
6000
5961
  var clerk;
6001
5962
  noRhc.Clerk.sdkMetadata = {
6002
5963
  name: "@clerk/chrome-extension",
6003
- version: "2.8.4-snapshot.v20251121134419"
5964
+ version: "2.8.5-canary.v20251121181637"
6004
5965
  };
6005
5966
  async function createClerkClient({
6006
5967
  __experimental_syncHostListener = false,