@clerk/chrome-extension 2.8.2-canary.v20251115211334 → 2.8.2-canary.v20251117130523

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.
@@ -2677,7 +2677,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
2677
2677
  }
2678
2678
  var SDK_METADATA = {
2679
2679
  name: "@clerk/clerk-react",
2680
- version: "5.56.0-canary.v20251115211334",
2680
+ version: "5.56.0-canary.v20251117130523",
2681
2681
  environment: process.env.NODE_ENV
2682
2682
  };
2683
2683
  var _status;
@@ -4221,7 +4221,7 @@ var BrowserStorageCache = createBrowserStorageCache();
4221
4221
  var clerk;
4222
4222
  noRhc.Clerk.sdkMetadata = {
4223
4223
  name: "@clerk/chrome-extension",
4224
- version: "2.8.2-canary.v20251115211334"
4224
+ version: "2.8.2-canary.v20251117130523"
4225
4225
  };
4226
4226
  async function createClerkClient({
4227
4227
  __experimental_syncHostListener = false,
@@ -1,4 +1,4 @@
1
- import { createClerkClient, SCOPE } from '../chunk-A3SWP7ED.js';
1
+ import { createClerkClient, SCOPE } from '../chunk-NKKI3TVG.js';
2
2
  import { Clerk } from '@clerk/clerk-js/no-rhc';
3
3
 
4
4
  Clerk.mountComponentRenderer = void 0;
@@ -1,4 +1,4 @@
1
- import { __export, buildErrorThrower, createDevOrStagingUrlCache, createClerkClient, isClerkAPIResponseError, ClerkRuntimeError, isPublishableKey } from './chunk-A3SWP7ED.js';
1
+ import { __export, buildErrorThrower, createDevOrStagingUrlCache, createClerkClient, isClerkAPIResponseError, ClerkRuntimeError, isPublishableKey } from './chunk-NKKI3TVG.js';
2
2
  import React7, { createContext, useContext, useState, useRef, useEffect, createElement, useCallback, useMemo, useLayoutEffect, useDebugValue } from 'react';
3
3
  import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';
4
4
  import { createPortal } from 'react-dom';
@@ -1585,6 +1585,23 @@ Possible fixes:
1585
1585
  Learn more: https://clerk.com/docs/components/clerk-provider`.trim());
1586
1586
  }
1587
1587
  }
1588
+ function createCacheKeys(params) {
1589
+ return {
1590
+ queryKey: [
1591
+ params.stablePrefix,
1592
+ params.authenticated,
1593
+ params.tracked,
1594
+ params.untracked
1595
+ ],
1596
+ invalidationKey: [
1597
+ params.stablePrefix,
1598
+ params.authenticated,
1599
+ params.tracked
1600
+ ],
1601
+ stableKey: params.stablePrefix,
1602
+ authenticated: params.authenticated
1603
+ };
1604
+ }
1588
1605
  var useWithSafeValues = (params, defaultValues) => {
1589
1606
  var _a, _b, _c;
1590
1607
  const shouldUseDefaults = typeof params === "boolean" && params;
@@ -1621,19 +1638,21 @@ var cachingSWRInfiniteOptions = {
1621
1638
  ...cachingSWROptions,
1622
1639
  revalidateFirstPage: false
1623
1640
  };
1624
- var usePagesOrInfinite = (params, fetcher, config, cacheKeys) => {
1641
+ var usePagesOrInfinite = (params) => {
1625
1642
  var _a, _b, _c, _d, _e, _f, _g;
1626
- const [paginatedPage, setPaginatedPage] = useState((_a = params.initialPage) != null ? _a : 1);
1627
- const initialPageRef = useRef((_b = params.initialPage) != null ? _b : 1);
1628
- const pageSizeRef = useRef((_c = params.pageSize) != null ? _c : 10);
1643
+ const { fetcher, config, keys } = params;
1644
+ const [paginatedPage, setPaginatedPage] = useState((_a = config.initialPage) != null ? _a : 1);
1645
+ const initialPageRef = useRef((_b = config.initialPage) != null ? _b : 1);
1646
+ const pageSizeRef = useRef((_c = config.pageSize) != null ? _c : 10);
1629
1647
  const enabled = (_d = config.enabled) != null ? _d : true;
1630
1648
  const cacheMode = config.__experimental_mode === "cache";
1631
1649
  const triggerInfinite = (_e = config.infinite) != null ? _e : false;
1632
1650
  const keepPreviousData = (_f = config.keepPreviousData) != null ? _f : false;
1633
1651
  const isSignedIn = config.isSignedIn;
1634
1652
  const pagesCacheKey = {
1635
- ...cacheKeys,
1636
- ...params,
1653
+ type: keys.queryKey[0],
1654
+ ...keys.queryKey[2],
1655
+ ...keys.queryKey[3].args,
1637
1656
  initialPage: paginatedPage,
1638
1657
  pageSize: pageSizeRef.current
1639
1658
  };
@@ -1641,11 +1660,10 @@ var usePagesOrInfinite = (params, fetcher, config, cacheKeys) => {
1641
1660
  const shouldFetch = !triggerInfinite && enabled && (!cacheMode ? !!fetcher : true);
1642
1661
  const { data: swrData, isValidating: swrIsValidating, isLoading: swrIsLoading, error: swrError, mutate: swrMutate } = useSWR(typeof isSignedIn === "boolean" ? previousIsSignedIn === true && isSignedIn === false ? pagesCacheKey : isSignedIn ? shouldFetch ? pagesCacheKey : null : null : shouldFetch ? pagesCacheKey : null, !cacheMode && !!fetcher ? (cacheKeyParams) => {
1643
1662
  if (isSignedIn === false || shouldFetch === false) return null;
1644
- const requestParams = getDifferentKeys(cacheKeyParams, cacheKeys);
1645
- return fetcher({
1646
- ...params,
1647
- ...requestParams
1648
- });
1663
+ return fetcher(getDifferentKeys(cacheKeyParams, {
1664
+ type: keys.queryKey[0],
1665
+ ...keys.queryKey[2]
1666
+ }));
1649
1667
  } : null, {
1650
1668
  keepPreviousData,
1651
1669
  ...cachingSWROptions
@@ -1653,17 +1671,18 @@ var usePagesOrInfinite = (params, fetcher, config, cacheKeys) => {
1653
1671
  const { data: swrInfiniteData, isLoading: swrInfiniteIsLoading, isValidating: swrInfiniteIsValidating, error: swrInfiniteError, size, setSize, mutate: swrInfiniteMutate } = useSWRInfinite((pageIndex) => {
1654
1672
  if (!triggerInfinite || !enabled || isSignedIn === false) return null;
1655
1673
  return {
1656
- ...params,
1657
- ...cacheKeys,
1674
+ type: keys.queryKey[0],
1675
+ ...keys.queryKey[2],
1676
+ ...keys.queryKey[3].args,
1658
1677
  initialPage: initialPageRef.current + pageIndex,
1659
1678
  pageSize: pageSizeRef.current
1660
1679
  };
1661
1680
  }, (cacheKeyParams) => {
1662
- const requestParams = getDifferentKeys(cacheKeyParams, cacheKeys);
1663
- return fetcher == null ? void 0 : fetcher({
1664
- ...params,
1665
- ...requestParams
1681
+ const requestParams = getDifferentKeys(cacheKeyParams, {
1682
+ type: keys.queryKey[0],
1683
+ ...keys.queryKey[2]
1666
1684
  });
1685
+ return fetcher == null ? void 0 : fetcher(requestParams);
1667
1686
  }, cachingSWRInfiniteOptions);
1668
1687
  const page = useMemo(() => {
1669
1688
  if (triggerInfinite) return size;
@@ -1802,37 +1821,73 @@ function useOrganization(params) {
1802
1821
  pageSize: invitationsSafeValues.pageSize,
1803
1822
  status: invitationsSafeValues.status
1804
1823
  };
1805
- const domains = usePagesOrInfinite({ ...domainParams }, organization == null ? void 0 : organization.getDomains, {
1806
- keepPreviousData: domainSafeValues.keepPreviousData,
1807
- infinite: domainSafeValues.infinite,
1808
- enabled: !!domainParams
1809
- }, {
1810
- type: "domains",
1811
- organizationId: organization == null ? void 0 : organization.id
1824
+ const domains = usePagesOrInfinite({
1825
+ fetcher: organization == null ? void 0 : organization.getDomains,
1826
+ config: {
1827
+ keepPreviousData: domainSafeValues.keepPreviousData,
1828
+ infinite: domainSafeValues.infinite,
1829
+ enabled: !!domainParams,
1830
+ isSignedIn: Boolean(organization),
1831
+ initialPage: domainSafeValues.initialPage,
1832
+ pageSize: domainSafeValues.pageSize
1833
+ },
1834
+ keys: createCacheKeys({
1835
+ stablePrefix: "domains",
1836
+ authenticated: Boolean(organization),
1837
+ tracked: { organizationId: organization == null ? void 0 : organization.id },
1838
+ untracked: { args: domainParams }
1839
+ })
1812
1840
  });
1813
- const membershipRequests = usePagesOrInfinite({ ...membershipRequestParams }, organization == null ? void 0 : organization.getMembershipRequests, {
1814
- keepPreviousData: membershipRequestSafeValues.keepPreviousData,
1815
- infinite: membershipRequestSafeValues.infinite,
1816
- enabled: !!membershipRequestParams
1817
- }, {
1818
- type: "membershipRequests",
1819
- organizationId: organization == null ? void 0 : organization.id
1841
+ const membershipRequests = usePagesOrInfinite({
1842
+ fetcher: organization == null ? void 0 : organization.getMembershipRequests,
1843
+ config: {
1844
+ keepPreviousData: membershipRequestSafeValues.keepPreviousData,
1845
+ infinite: membershipRequestSafeValues.infinite,
1846
+ enabled: !!membershipRequestParams,
1847
+ isSignedIn: Boolean(organization),
1848
+ initialPage: membershipRequestSafeValues.initialPage,
1849
+ pageSize: membershipRequestSafeValues.pageSize
1850
+ },
1851
+ keys: createCacheKeys({
1852
+ stablePrefix: "membershipRequests",
1853
+ authenticated: Boolean(organization),
1854
+ tracked: { organizationId: organization == null ? void 0 : organization.id },
1855
+ untracked: { args: membershipRequestParams }
1856
+ })
1820
1857
  });
1821
- const memberships = usePagesOrInfinite(membersParams || {}, organization == null ? void 0 : organization.getMemberships, {
1822
- keepPreviousData: membersSafeValues.keepPreviousData,
1823
- infinite: membersSafeValues.infinite,
1824
- enabled: !!membersParams
1825
- }, {
1826
- type: "members",
1827
- organizationId: organization == null ? void 0 : organization.id
1858
+ const memberships = usePagesOrInfinite({
1859
+ fetcher: organization == null ? void 0 : organization.getMemberships,
1860
+ config: {
1861
+ keepPreviousData: membersSafeValues.keepPreviousData,
1862
+ infinite: membersSafeValues.infinite,
1863
+ enabled: !!membersParams,
1864
+ isSignedIn: Boolean(organization),
1865
+ initialPage: membersSafeValues.initialPage,
1866
+ pageSize: membersSafeValues.pageSize
1867
+ },
1868
+ keys: createCacheKeys({
1869
+ stablePrefix: "members",
1870
+ authenticated: Boolean(organization),
1871
+ tracked: { organizationId: organization == null ? void 0 : organization.id },
1872
+ untracked: { args: membersParams }
1873
+ })
1828
1874
  });
1829
- const invitations = usePagesOrInfinite({ ...invitationsParams }, organization == null ? void 0 : organization.getInvitations, {
1830
- keepPreviousData: invitationsSafeValues.keepPreviousData,
1831
- infinite: invitationsSafeValues.infinite,
1832
- enabled: !!invitationsParams
1833
- }, {
1834
- type: "invitations",
1835
- organizationId: organization == null ? void 0 : organization.id
1875
+ const invitations = usePagesOrInfinite({
1876
+ fetcher: organization == null ? void 0 : organization.getInvitations,
1877
+ config: {
1878
+ keepPreviousData: invitationsSafeValues.keepPreviousData,
1879
+ infinite: invitationsSafeValues.infinite,
1880
+ enabled: !!invitationsParams,
1881
+ isSignedIn: Boolean(organization),
1882
+ initialPage: invitationsSafeValues.initialPage,
1883
+ pageSize: invitationsSafeValues.pageSize
1884
+ },
1885
+ keys: createCacheKeys({
1886
+ stablePrefix: "invitations",
1887
+ authenticated: Boolean(organization),
1888
+ tracked: { organizationId: organization == null ? void 0 : organization.id },
1889
+ untracked: { args: invitationsParams }
1890
+ })
1836
1891
  });
1837
1892
  if (organization === void 0) return {
1838
1893
  isLoaded: false,
@@ -1930,29 +1985,56 @@ function useOrganizationList(params) {
1930
1985
  status: userSuggestionsSafeValues.status
1931
1986
  };
1932
1987
  const isClerkLoaded = !!(clerk.loaded && user);
1933
- const memberships = usePagesOrInfinite(userMembershipsParams || {}, user == null ? void 0 : user.getOrganizationMemberships, {
1934
- keepPreviousData: userMembershipsSafeValues.keepPreviousData,
1935
- infinite: userMembershipsSafeValues.infinite,
1936
- enabled: !!userMembershipsParams
1937
- }, {
1938
- type: "userMemberships",
1939
- userId: user == null ? void 0 : user.id
1988
+ const memberships = usePagesOrInfinite({
1989
+ fetcher: user == null ? void 0 : user.getOrganizationMemberships,
1990
+ config: {
1991
+ keepPreviousData: userMembershipsSafeValues.keepPreviousData,
1992
+ infinite: userMembershipsSafeValues.infinite,
1993
+ enabled: !!userMembershipsParams,
1994
+ isSignedIn: Boolean(user),
1995
+ initialPage: userMembershipsSafeValues.initialPage,
1996
+ pageSize: userMembershipsSafeValues.pageSize
1997
+ },
1998
+ keys: createCacheKeys({
1999
+ stablePrefix: "userMemberships",
2000
+ authenticated: Boolean(user),
2001
+ tracked: { userId: user == null ? void 0 : user.id },
2002
+ untracked: { args: userMembershipsParams }
2003
+ })
1940
2004
  });
1941
- const invitations = usePagesOrInfinite({ ...userInvitationsParams }, user == null ? void 0 : user.getOrganizationInvitations, {
1942
- keepPreviousData: userInvitationsSafeValues.keepPreviousData,
1943
- infinite: userInvitationsSafeValues.infinite,
1944
- enabled: !!userInvitationsParams
1945
- }, {
1946
- type: "userInvitations",
1947
- userId: user == null ? void 0 : user.id
2005
+ const invitations = usePagesOrInfinite({
2006
+ fetcher: user == null ? void 0 : user.getOrganizationInvitations,
2007
+ config: {
2008
+ keepPreviousData: userInvitationsSafeValues.keepPreviousData,
2009
+ infinite: userInvitationsSafeValues.infinite,
2010
+ enabled: !!userInvitationsParams,
2011
+ isSignedIn: Boolean(user),
2012
+ initialPage: userInvitationsSafeValues.initialPage,
2013
+ pageSize: userInvitationsSafeValues.pageSize
2014
+ },
2015
+ keys: createCacheKeys({
2016
+ stablePrefix: "userInvitations",
2017
+ authenticated: Boolean(user),
2018
+ tracked: { userId: user == null ? void 0 : user.id },
2019
+ untracked: { args: userInvitationsParams }
2020
+ })
1948
2021
  });
1949
- const suggestions = usePagesOrInfinite({ ...userSuggestionsParams }, user == null ? void 0 : user.getOrganizationSuggestions, {
1950
- keepPreviousData: userSuggestionsSafeValues.keepPreviousData,
1951
- infinite: userSuggestionsSafeValues.infinite,
1952
- enabled: !!userSuggestionsParams
1953
- }, {
1954
- type: "userSuggestions",
1955
- userId: user == null ? void 0 : user.id
2022
+ const suggestions = usePagesOrInfinite({
2023
+ fetcher: user == null ? void 0 : user.getOrganizationSuggestions,
2024
+ config: {
2025
+ keepPreviousData: userSuggestionsSafeValues.keepPreviousData,
2026
+ infinite: userSuggestionsSafeValues.infinite,
2027
+ enabled: !!userSuggestionsParams,
2028
+ isSignedIn: Boolean(user),
2029
+ initialPage: userSuggestionsSafeValues.initialPage,
2030
+ pageSize: userSuggestionsSafeValues.pageSize
2031
+ },
2032
+ keys: createCacheKeys({
2033
+ stablePrefix: "userSuggestions",
2034
+ authenticated: Boolean(user),
2035
+ tracked: { userId: user == null ? void 0 : user.id },
2036
+ untracked: { args: userSuggestionsParams }
2037
+ })
1956
2038
  });
1957
2039
  if (!isClerkLoaded) return {
1958
2040
  isLoaded: false,
@@ -3562,7 +3644,7 @@ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError("Canno
3562
3644
  var __privateSet2 = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
3563
3645
  var __privateMethod2 = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
3564
3646
 
3565
- // ../shared/dist/runtime/loadClerkJsScript-C0HEgLSt.mjs
3647
+ // ../shared/dist/runtime/loadClerkJsScript-D0nQRX4_.mjs
3566
3648
  var { isDevOrStagingUrl } = createDevOrStagingUrlCache();
3567
3649
  var errorThrower2 = buildErrorThrower({ packageName: "@clerk/shared" });
3568
3650
  function setClerkJsLoadingErrorPackageName(packageName) {
@@ -4082,7 +4164,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
4082
4164
  }
4083
4165
  var SDK_METADATA = {
4084
4166
  name: "@clerk/clerk-react",
4085
- version: "5.56.0-canary.v20251115211334",
4167
+ version: "5.56.0-canary.v20251117130523",
4086
4168
  environment: process.env.NODE_ENV
4087
4169
  };
4088
4170
  var _status;
@@ -5455,5 +5537,5 @@ function ClerkProvider2(props) {
5455
5537
  var GoogleOneTap2 = () => null;
5456
5538
 
5457
5539
  export { APIKeys, AuthenticateWithRedirectCallback, ClerkDegraded, ClerkFailed, ClerkLoaded, ClerkLoading, ClerkProvider2 as ClerkProvider, CreateOrganization, GoogleOneTap2 as GoogleOneTap, OrganizationList, OrganizationProfile, OrganizationSwitcher, PricingTable, Protect, RedirectToCreateOrganization, RedirectToOrganizationProfile, RedirectToSignIn, RedirectToSignUp, RedirectToUserProfile, SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, SignUp, SignUpButton, SignedIn, SignedOut, UserAvatar, UserButton, UserProfile, Waitlist, setErrorThrowerOptions, useAuth, useClerk, useEmailLink, useOrganization, useOrganizationList, useReverification, useSession, useSessionList, useSignIn, useSignUp, useUser };
5458
- //# sourceMappingURL=chunk-KX3ZKDAK.js.map
5459
- //# sourceMappingURL=chunk-KX3ZKDAK.js.map
5540
+ //# sourceMappingURL=chunk-2YTDORR4.js.map
5541
+ //# sourceMappingURL=chunk-2YTDORR4.js.map