@clerk/chrome-extension 2.8.4-snapshot.v20251121134419 → 2.8.4
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 +11 -53
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/index.js +3 -32
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/esm/background/index.js +1 -1
- package/dist/esm/{chunk-HQXGLBVV.js → chunk-7DDXO5XR.js} +14 -56
- package/dist/esm/chunk-7DDXO5XR.js.map +1 -0
- package/dist/esm/{chunk-4B7GJGSR.js → chunk-SDPVSHXQ.js} +3 -3
- package/dist/esm/{chunk-4B7GJGSR.js.map → chunk-SDPVSHXQ.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-SDPVSHXQ.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
|
}
|
|
@@ -1777,7 +1782,6 @@ function useOrganization(params) {
|
|
|
1777
1782
|
var _a;
|
|
1778
1783
|
const { domains: domainListParams, membershipRequests: membershipRequestsListParams, memberships: membersListParams, invitations: invitationsListParams } = params || {};
|
|
1779
1784
|
useAssertWrappedByClerkProvider("useOrganization");
|
|
1780
|
-
useAttemptToEnableOrganizations("useOrganization");
|
|
1781
1785
|
const { organization } = useOrganizationContext();
|
|
1782
1786
|
const session = useSessionContext();
|
|
1783
1787
|
const domainSafeValues = useWithSafeValues(domainListParams, {
|
|
@@ -1958,7 +1962,6 @@ function useOrganizationList(params) {
|
|
|
1958
1962
|
var _a;
|
|
1959
1963
|
const { userMemberships, userInvitations, userSuggestions } = params || {};
|
|
1960
1964
|
useAssertWrappedByClerkProvider("useOrganizationList");
|
|
1961
|
-
useAttemptToEnableOrganizations("useOrganizationList");
|
|
1962
1965
|
const userMembershipsSafeValues = useWithSafeValues(userMemberships, {
|
|
1963
1966
|
initialPage: 1,
|
|
1964
1967
|
pageSize: 10,
|
|
@@ -2355,22 +2358,6 @@ createElementComponent("payment", typeof window === "undefined");
|
|
|
2355
2358
|
createContextAndHook("StripeLibsContext");
|
|
2356
2359
|
createContextAndHook("PaymentElementContext");
|
|
2357
2360
|
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
2361
|
var errorThrower = buildErrorThrower({ packageName: "@clerk/clerk-react" });
|
|
2375
2362
|
function setErrorThrowerOptions(options) {
|
|
2376
2363
|
errorThrower.setMessages(options).setPackageName(options);
|
|
@@ -3672,7 +3659,7 @@ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError("Canno
|
|
|
3672
3659
|
var __privateSet2 = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
3673
3660
|
var __privateMethod2 = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
3674
3661
|
|
|
3675
|
-
// ../shared/dist/runtime/loadClerkJsScript-
|
|
3662
|
+
// ../shared/dist/runtime/loadClerkJsScript-VXxafQD6.mjs
|
|
3676
3663
|
var { isDevOrStagingUrl } = createDevOrStagingUrlCache();
|
|
3677
3664
|
var errorThrower2 = buildErrorThrower({ packageName: "@clerk/shared" });
|
|
3678
3665
|
function setClerkJsLoadingErrorPackageName(packageName) {
|
|
@@ -4192,7 +4179,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
|
|
|
4192
4179
|
}
|
|
4193
4180
|
var SDK_METADATA = {
|
|
4194
4181
|
name: "@clerk/clerk-react",
|
|
4195
|
-
version: "5.
|
|
4182
|
+
version: "5.56.2",
|
|
4196
4183
|
environment: process.env.NODE_ENV
|
|
4197
4184
|
};
|
|
4198
4185
|
var _status;
|
|
@@ -4210,7 +4197,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4210
4197
|
this.clerkjs = null;
|
|
4211
4198
|
this.preopenOneTap = null;
|
|
4212
4199
|
this.preopenUserVerification = null;
|
|
4213
|
-
this.preopenEnableOrganizationsPrompt = null;
|
|
4214
4200
|
this.preopenSignIn = null;
|
|
4215
4201
|
this.preopenCheckout = null;
|
|
4216
4202
|
this.preopenPlanDetails = null;
|
|
@@ -4477,9 +4463,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4477
4463
|
if (this.preOpenWaitlist !== null) {
|
|
4478
4464
|
clerkjs.openWaitlist(this.preOpenWaitlist);
|
|
4479
4465
|
}
|
|
4480
|
-
if (this.preopenEnableOrganizationsPrompt) {
|
|
4481
|
-
clerkjs.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt);
|
|
4482
|
-
}
|
|
4483
4466
|
this.premountSignInNodes.forEach((props, node) => {
|
|
4484
4467
|
clerkjs.mountSignIn(node, props);
|
|
4485
4468
|
});
|
|
@@ -4606,20 +4589,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4606
4589
|
this.preopenUserVerification = null;
|
|
4607
4590
|
}
|
|
4608
4591
|
};
|
|
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
4592
|
this.openGoogleOneTap = (props) => {
|
|
4624
4593
|
if (this.clerkjs && this.loaded) {
|
|
4625
4594
|
this.clerkjs.openGoogleOneTap(props);
|
|
@@ -5211,17 +5180,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
5211
5180
|
this.premountMethodCalls.set("signOut", callback);
|
|
5212
5181
|
}
|
|
5213
5182
|
};
|
|
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
5183
|
const { Clerk = null, publishableKey } = options || {};
|
|
5226
5184
|
__privateSet2(this, _publishableKey, publishableKey);
|
|
5227
5185
|
__privateSet2(this, _proxyUrl, options == null ? void 0 : options.proxyUrl);
|
|
@@ -5594,5 +5552,5 @@ function ClerkProvider2(props) {
|
|
|
5594
5552
|
var GoogleOneTap2 = () => null;
|
|
5595
5553
|
|
|
5596
5554
|
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-
|
|
5555
|
+
//# sourceMappingURL=chunk-7DDXO5XR.js.map
|
|
5556
|
+
//# sourceMappingURL=chunk-7DDXO5XR.js.map
|