@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.
- package/dist/cjs/background/index.js +1 -1
- package/dist/cjs/index.js +21 -60
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/index.js +3 -33
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/esm/background/index.js +1 -1
- package/dist/esm/{chunk-HQXGLBVV.js → chunk-EHV6FOOF.js} +24 -63
- package/dist/esm/chunk-EHV6FOOF.js.map +1 -0
- package/dist/esm/{chunk-4B7GJGSR.js → chunk-RTWWOXVR.js} +3 -3
- package/dist/esm/{chunk-4B7GJGSR.js.map → chunk-RTWWOXVR.js.map} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/react/index.js +2 -2
- package/dist/types/internal/utils/errors.d.ts +1 -1
- package/package.json +4 -4
- package/dist/esm/chunk-HQXGLBVV.js.map +0 -1
|
@@ -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-RTWWOXVR.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';
|
|
@@ -178,13 +178,13 @@ var resolveAuthState = ({ authObject: { sessionId, sessionStatus, userId, actor,
|
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
-
// ../shared/dist/runtime/telemetry-
|
|
181
|
+
// ../shared/dist/runtime/telemetry-wqMDWlvR.mjs
|
|
182
182
|
var EVENT_METHOD_CALLED = "METHOD_CALLED";
|
|
183
|
-
var EVENT_SAMPLING_RATE$
|
|
183
|
+
var EVENT_SAMPLING_RATE$2 = 0.1;
|
|
184
184
|
function eventMethodCalled(method, payload) {
|
|
185
185
|
return {
|
|
186
186
|
event: EVENT_METHOD_CALLED,
|
|
187
|
-
eventSamplingRate: EVENT_SAMPLING_RATE$
|
|
187
|
+
eventSamplingRate: EVENT_SAMPLING_RATE$2,
|
|
188
188
|
payload: {
|
|
189
189
|
method,
|
|
190
190
|
...payload
|
|
@@ -222,6 +222,11 @@ var createDeferredPromise = () => {
|
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
224
|
|
|
225
|
+
// ../shared/dist/runtime/organization-D9SEGukq.mjs
|
|
226
|
+
function getCurrentOrganizationMembership(organizationMemberships, organizationId) {
|
|
227
|
+
return organizationMemberships.find((organizationMembership) => organizationMembership.organization.id === organizationId);
|
|
228
|
+
}
|
|
229
|
+
|
|
225
230
|
// ../../node_modules/.pnpm/swr@2.3.4_react@18.3.1/node_modules/swr/dist/_internal/events.mjs
|
|
226
231
|
var events_exports = {};
|
|
227
232
|
__export(events_exports, {
|
|
@@ -1526,7 +1531,7 @@ function dequal2(foo, bar) {
|
|
|
1526
1531
|
return foo !== foo && bar !== bar;
|
|
1527
1532
|
}
|
|
1528
1533
|
|
|
1529
|
-
// ../shared/dist/runtime/
|
|
1534
|
+
// ../shared/dist/runtime/react/index.mjs
|
|
1530
1535
|
function assertContextExists(contextVal, msgOrCtx) {
|
|
1531
1536
|
if (!contextVal) throw typeof msgOrCtx === "string" ? new Error(msgOrCtx) : /* @__PURE__ */ new Error(`${msgOrCtx.displayName} not found`);
|
|
1532
1537
|
}
|
|
@@ -1612,6 +1617,14 @@ function createCacheKeys(params) {
|
|
|
1612
1617
|
authenticated: params.authenticated
|
|
1613
1618
|
};
|
|
1614
1619
|
}
|
|
1620
|
+
function toSWRQuery(keys) {
|
|
1621
|
+
const { queryKey } = keys;
|
|
1622
|
+
return {
|
|
1623
|
+
type: queryKey[0],
|
|
1624
|
+
...queryKey[2],
|
|
1625
|
+
...queryKey[3].args
|
|
1626
|
+
};
|
|
1627
|
+
}
|
|
1615
1628
|
var useWithSafeValues = (params, defaultValues) => {
|
|
1616
1629
|
var _a, _b, _c;
|
|
1617
1630
|
const shouldUseDefaults = typeof params === "boolean" && params;
|
|
@@ -1660,9 +1673,7 @@ var usePagesOrInfinite = (params) => {
|
|
|
1660
1673
|
const keepPreviousData = (_f = config.keepPreviousData) != null ? _f : false;
|
|
1661
1674
|
const isSignedIn = config.isSignedIn;
|
|
1662
1675
|
const pagesCacheKey = {
|
|
1663
|
-
|
|
1664
|
-
...keys.queryKey[2],
|
|
1665
|
-
...keys.queryKey[3].args,
|
|
1676
|
+
...toSWRQuery(keys),
|
|
1666
1677
|
initialPage: paginatedPage,
|
|
1667
1678
|
pageSize: pageSizeRef.current
|
|
1668
1679
|
};
|
|
@@ -1681,9 +1692,7 @@ var usePagesOrInfinite = (params) => {
|
|
|
1681
1692
|
const { data: swrInfiniteData, isLoading: swrInfiniteIsLoading, isValidating: swrInfiniteIsValidating, error: swrInfiniteError, size, setSize, mutate: swrInfiniteMutate } = useSWRInfinite((pageIndex) => {
|
|
1682
1693
|
if (!triggerInfinite || !enabled || isSignedIn === false) return null;
|
|
1683
1694
|
return {
|
|
1684
|
-
|
|
1685
|
-
...keys.queryKey[2],
|
|
1686
|
-
...keys.queryKey[3].args,
|
|
1695
|
+
...toSWRQuery(keys),
|
|
1687
1696
|
initialPage: initialPageRef.current + pageIndex,
|
|
1688
1697
|
pageSize: pageSizeRef.current
|
|
1689
1698
|
};
|
|
@@ -1777,7 +1786,6 @@ function useOrganization(params) {
|
|
|
1777
1786
|
var _a;
|
|
1778
1787
|
const { domains: domainListParams, membershipRequests: membershipRequestsListParams, memberships: membersListParams, invitations: invitationsListParams } = params || {};
|
|
1779
1788
|
useAssertWrappedByClerkProvider("useOrganization");
|
|
1780
|
-
useAttemptToEnableOrganizations("useOrganization");
|
|
1781
1789
|
const { organization } = useOrganizationContext();
|
|
1782
1790
|
const session = useSessionContext();
|
|
1783
1791
|
const domainSafeValues = useWithSafeValues(domainListParams, {
|
|
@@ -1958,7 +1966,6 @@ function useOrganizationList(params) {
|
|
|
1958
1966
|
var _a;
|
|
1959
1967
|
const { userMemberships, userInvitations, userSuggestions } = params || {};
|
|
1960
1968
|
useAssertWrappedByClerkProvider("useOrganizationList");
|
|
1961
|
-
useAttemptToEnableOrganizations("useOrganizationList");
|
|
1962
1969
|
const userMembershipsSafeValues = useWithSafeValues(userMemberships, {
|
|
1963
1970
|
initialPage: 1,
|
|
1964
1971
|
pageSize: 10,
|
|
@@ -2352,25 +2359,8 @@ var createElementComponent = (type, isServer) => {
|
|
|
2352
2359
|
return Element;
|
|
2353
2360
|
};
|
|
2354
2361
|
createElementComponent("payment", typeof window === "undefined");
|
|
2355
|
-
createContextAndHook("StripeLibsContext");
|
|
2356
2362
|
createContextAndHook("PaymentElementContext");
|
|
2357
2363
|
createContextAndHook("StripeUtilsContext");
|
|
2358
|
-
function getCurrentOrganizationMembership(organizationMemberships, organizationId) {
|
|
2359
|
-
return organizationMemberships.find((organizationMembership) => organizationMembership.organization.id === organizationId);
|
|
2360
|
-
}
|
|
2361
|
-
function useAttemptToEnableOrganizations(caller) {
|
|
2362
|
-
const clerk = useClerk();
|
|
2363
|
-
const hasAttempted = useRef(false);
|
|
2364
|
-
useEffect(() => {
|
|
2365
|
-
var _a;
|
|
2366
|
-
if (hasAttempted.current || !clerk.loaded) return;
|
|
2367
|
-
hasAttempted.current = true;
|
|
2368
|
-
(_a = clerk.__internal_attemptToEnableEnvironmentSetting) == null ? void 0 : _a.call(clerk, {
|
|
2369
|
-
for: "organizations",
|
|
2370
|
-
caller
|
|
2371
|
-
});
|
|
2372
|
-
}, [clerk, caller]);
|
|
2373
|
-
}
|
|
2374
2364
|
var errorThrower = buildErrorThrower({ packageName: "@clerk/clerk-react" });
|
|
2375
2365
|
function setErrorThrowerOptions(options) {
|
|
2376
2366
|
errorThrower.setMessages(options).setPackageName(options);
|
|
@@ -3672,7 +3662,7 @@ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError("Canno
|
|
|
3672
3662
|
var __privateSet2 = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
3673
3663
|
var __privateMethod2 = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
3674
3664
|
|
|
3675
|
-
// ../shared/dist/runtime/loadClerkJsScript-
|
|
3665
|
+
// ../shared/dist/runtime/loadClerkJsScript-D3Ph42zd.mjs
|
|
3676
3666
|
var { isDevOrStagingUrl } = createDevOrStagingUrlCache();
|
|
3677
3667
|
var errorThrower2 = buildErrorThrower({ packageName: "@clerk/shared" });
|
|
3678
3668
|
function setClerkJsLoadingErrorPackageName(packageName) {
|
|
@@ -4192,7 +4182,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
|
|
|
4192
4182
|
}
|
|
4193
4183
|
var SDK_METADATA = {
|
|
4194
4184
|
name: "@clerk/clerk-react",
|
|
4195
|
-
version: "5.
|
|
4185
|
+
version: "5.56.3-canary.v20251121181637",
|
|
4196
4186
|
environment: process.env.NODE_ENV
|
|
4197
4187
|
};
|
|
4198
4188
|
var _status;
|
|
@@ -4210,7 +4200,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4210
4200
|
this.clerkjs = null;
|
|
4211
4201
|
this.preopenOneTap = null;
|
|
4212
4202
|
this.preopenUserVerification = null;
|
|
4213
|
-
this.preopenEnableOrganizationsPrompt = null;
|
|
4214
4203
|
this.preopenSignIn = null;
|
|
4215
4204
|
this.preopenCheckout = null;
|
|
4216
4205
|
this.preopenPlanDetails = null;
|
|
@@ -4477,9 +4466,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4477
4466
|
if (this.preOpenWaitlist !== null) {
|
|
4478
4467
|
clerkjs.openWaitlist(this.preOpenWaitlist);
|
|
4479
4468
|
}
|
|
4480
|
-
if (this.preopenEnableOrganizationsPrompt) {
|
|
4481
|
-
clerkjs.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt);
|
|
4482
|
-
}
|
|
4483
4469
|
this.premountSignInNodes.forEach((props, node) => {
|
|
4484
4470
|
clerkjs.mountSignIn(node, props);
|
|
4485
4471
|
});
|
|
@@ -4606,20 +4592,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4606
4592
|
this.preopenUserVerification = null;
|
|
4607
4593
|
}
|
|
4608
4594
|
};
|
|
4609
|
-
this.__internal_openEnableOrganizationsPrompt = (props) => {
|
|
4610
|
-
if (this.clerkjs && this.loaded) {
|
|
4611
|
-
this.clerkjs.__internal_openEnableOrganizationsPrompt(props);
|
|
4612
|
-
} else {
|
|
4613
|
-
this.preopenEnableOrganizationsPrompt = props;
|
|
4614
|
-
}
|
|
4615
|
-
};
|
|
4616
|
-
this.__internal_closeEnableOrganizationsPrompt = () => {
|
|
4617
|
-
if (this.clerkjs && this.loaded) {
|
|
4618
|
-
this.clerkjs.__internal_closeEnableOrganizationsPrompt();
|
|
4619
|
-
} else {
|
|
4620
|
-
this.preopenEnableOrganizationsPrompt = null;
|
|
4621
|
-
}
|
|
4622
|
-
};
|
|
4623
4595
|
this.openGoogleOneTap = (props) => {
|
|
4624
4596
|
if (this.clerkjs && this.loaded) {
|
|
4625
4597
|
this.clerkjs.openGoogleOneTap(props);
|
|
@@ -5211,17 +5183,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
5211
5183
|
this.premountMethodCalls.set("signOut", callback);
|
|
5212
5184
|
}
|
|
5213
5185
|
};
|
|
5214
|
-
this.__internal_attemptToEnableEnvironmentSetting = (options2) => {
|
|
5215
|
-
const callback = () => {
|
|
5216
|
-
var _a;
|
|
5217
|
-
return (_a = this.clerkjs) == null ? void 0 : _a.__internal_attemptToEnableEnvironmentSetting(options2);
|
|
5218
|
-
};
|
|
5219
|
-
if (this.clerkjs && this.loaded) {
|
|
5220
|
-
return callback();
|
|
5221
|
-
} else {
|
|
5222
|
-
this.premountMethodCalls.set("__internal_attemptToEnableEnvironmentSetting", callback);
|
|
5223
|
-
}
|
|
5224
|
-
};
|
|
5225
5186
|
const { Clerk = null, publishableKey } = options || {};
|
|
5226
5187
|
__privateSet2(this, _publishableKey, publishableKey);
|
|
5227
5188
|
__privateSet2(this, _proxyUrl, options == null ? void 0 : options.proxyUrl);
|
|
@@ -5594,5 +5555,5 @@ function ClerkProvider2(props) {
|
|
|
5594
5555
|
var GoogleOneTap2 = () => null;
|
|
5595
5556
|
|
|
5596
5557
|
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 };
|
|
5597
|
-
//# sourceMappingURL=chunk-
|
|
5598
|
-
//# sourceMappingURL=chunk-
|
|
5558
|
+
//# sourceMappingURL=chunk-EHV6FOOF.js.map
|
|
5559
|
+
//# sourceMappingURL=chunk-EHV6FOOF.js.map
|