@clerk/chrome-extension 2.8.3-snapshot.v20251120182959 → 2.8.3
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 -49
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/index.js +3 -29
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/esm/background/index.js +1 -1
- package/dist/esm/{chunk-M6BEX3OU.js → chunk-REBCG4WV.js} +14 -52
- package/dist/esm/chunk-REBCG4WV.js.map +1 -0
- package/dist/esm/{chunk-JL62M3KX.js → chunk-V5AP3EFO.js} +3 -3
- package/dist/esm/{chunk-JL62M3KX.js.map → chunk-V5AP3EFO.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-M6BEX3OU.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-V5AP3EFO.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,21 +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
|
-
if (hasAttempted.current) return;
|
|
2366
|
-
hasAttempted.current = true;
|
|
2367
|
-
clerk.__internal_attemptToEnableEnvironmentSetting({
|
|
2368
|
-
for: "organizations",
|
|
2369
|
-
caller
|
|
2370
|
-
});
|
|
2371
|
-
}, [clerk, caller]);
|
|
2372
|
-
}
|
|
2373
2361
|
var errorThrower = buildErrorThrower({ packageName: "@clerk/clerk-react" });
|
|
2374
2362
|
function setErrorThrowerOptions(options) {
|
|
2375
2363
|
errorThrower.setMessages(options).setPackageName(options);
|
|
@@ -3671,7 +3659,7 @@ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError("Canno
|
|
|
3671
3659
|
var __privateSet2 = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
3672
3660
|
var __privateMethod2 = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
3673
3661
|
|
|
3674
|
-
// ../shared/dist/runtime/loadClerkJsScript-
|
|
3662
|
+
// ../shared/dist/runtime/loadClerkJsScript-BctCAY1Y.mjs
|
|
3675
3663
|
var { isDevOrStagingUrl } = createDevOrStagingUrlCache();
|
|
3676
3664
|
var errorThrower2 = buildErrorThrower({ packageName: "@clerk/shared" });
|
|
3677
3665
|
function setClerkJsLoadingErrorPackageName(packageName) {
|
|
@@ -4191,7 +4179,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
|
|
|
4191
4179
|
}
|
|
4192
4180
|
var SDK_METADATA = {
|
|
4193
4181
|
name: "@clerk/clerk-react",
|
|
4194
|
-
version: "5.
|
|
4182
|
+
version: "5.56.1",
|
|
4195
4183
|
environment: process.env.NODE_ENV
|
|
4196
4184
|
};
|
|
4197
4185
|
var _status;
|
|
@@ -4209,7 +4197,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4209
4197
|
this.clerkjs = null;
|
|
4210
4198
|
this.preopenOneTap = null;
|
|
4211
4199
|
this.preopenUserVerification = null;
|
|
4212
|
-
this.preopenEnableOrganizationsPrompt = null;
|
|
4213
4200
|
this.preopenSignIn = null;
|
|
4214
4201
|
this.preopenCheckout = null;
|
|
4215
4202
|
this.preopenPlanDetails = null;
|
|
@@ -4602,20 +4589,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4602
4589
|
this.preopenUserVerification = null;
|
|
4603
4590
|
}
|
|
4604
4591
|
};
|
|
4605
|
-
this.__internal_openEnableOrganizationsPrompt = (props) => {
|
|
4606
|
-
if (this.clerkjs && this.loaded) {
|
|
4607
|
-
this.clerkjs.__internal_openEnableOrganizationsPrompt(props);
|
|
4608
|
-
} else {
|
|
4609
|
-
this.preopenEnableOrganizationsPrompt = props;
|
|
4610
|
-
}
|
|
4611
|
-
};
|
|
4612
|
-
this.__internal_closeEnableOrganizationsPrompt = () => {
|
|
4613
|
-
if (this.clerkjs && this.loaded) {
|
|
4614
|
-
this.clerkjs.__internal_closeEnableOrganizationsPrompt();
|
|
4615
|
-
} else {
|
|
4616
|
-
this.preopenEnableOrganizationsPrompt = null;
|
|
4617
|
-
}
|
|
4618
|
-
};
|
|
4619
4592
|
this.openGoogleOneTap = (props) => {
|
|
4620
4593
|
if (this.clerkjs && this.loaded) {
|
|
4621
4594
|
this.clerkjs.openGoogleOneTap(props);
|
|
@@ -5207,17 +5180,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
5207
5180
|
this.premountMethodCalls.set("signOut", callback);
|
|
5208
5181
|
}
|
|
5209
5182
|
};
|
|
5210
|
-
this.__internal_attemptToEnableEnvironmentSetting = (options2) => {
|
|
5211
|
-
const callback = () => {
|
|
5212
|
-
var _a;
|
|
5213
|
-
return (_a = this.clerkjs) == null ? void 0 : _a.__internal_attemptToEnableEnvironmentSetting(options2);
|
|
5214
|
-
};
|
|
5215
|
-
if (this.clerkjs && this.loaded) {
|
|
5216
|
-
return callback();
|
|
5217
|
-
} else {
|
|
5218
|
-
this.premountMethodCalls.set("__internal_attemptToEnableEnvironmentSetting", callback);
|
|
5219
|
-
}
|
|
5220
|
-
};
|
|
5221
5183
|
const { Clerk = null, publishableKey } = options || {};
|
|
5222
5184
|
__privateSet2(this, _publishableKey, publishableKey);
|
|
5223
5185
|
__privateSet2(this, _proxyUrl, options == null ? void 0 : options.proxyUrl);
|
|
@@ -5590,5 +5552,5 @@ function ClerkProvider2(props) {
|
|
|
5590
5552
|
var GoogleOneTap2 = () => null;
|
|
5591
5553
|
|
|
5592
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 };
|
|
5593
|
-
//# sourceMappingURL=chunk-
|
|
5594
|
-
//# sourceMappingURL=chunk-
|
|
5555
|
+
//# sourceMappingURL=chunk-REBCG4WV.js.map
|
|
5556
|
+
//# sourceMappingURL=chunk-REBCG4WV.js.map
|