@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.
- package/dist/cjs/background/index.js +1 -1
- package/dist/cjs/index.js +150 -68
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/index.js +2 -2
- package/dist/esm/background/index.js +1 -1
- package/dist/esm/{chunk-KX3ZKDAK.js → chunk-2YTDORR4.js} +153 -71
- package/dist/esm/chunk-2YTDORR4.js.map +1 -0
- package/dist/esm/{chunk-A3SWP7ED.js → chunk-NKKI3TVG.js} +3 -3
- package/dist/esm/{chunk-A3SWP7ED.js.map → chunk-NKKI3TVG.js.map} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/react/index.js +2 -2
- package/package.json +4 -4
- package/dist/esm/chunk-KX3ZKDAK.js.map +0 -1
package/dist/cjs/react/index.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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 { __export, buildErrorThrower, createDevOrStagingUrlCache, createClerkClient, isClerkAPIResponseError, ClerkRuntimeError, isPublishableKey } from './chunk-
|
|
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
|
|
1641
|
+
var usePagesOrInfinite = (params) => {
|
|
1625
1642
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
1626
|
-
const
|
|
1627
|
-
const
|
|
1628
|
-
const
|
|
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
|
-
|
|
1636
|
-
...
|
|
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
|
-
|
|
1645
|
-
|
|
1646
|
-
...
|
|
1647
|
-
|
|
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
|
-
|
|
1657
|
-
...
|
|
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,
|
|
1663
|
-
|
|
1664
|
-
...
|
|
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({
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
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({
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
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(
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
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({
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
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(
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
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({
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
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({
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
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-
|
|
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.
|
|
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-
|
|
5459
|
-
//# sourceMappingURL=chunk-
|
|
5540
|
+
//# sourceMappingURL=chunk-2YTDORR4.js.map
|
|
5541
|
+
//# sourceMappingURL=chunk-2YTDORR4.js.map
|