@clerk/chrome-extension 2.8.3-canary.v20251118191127 → 2.8.3-snapshot.v20251119151755
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 +49 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/index.js +29 -3
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/esm/background/index.js +1 -1
- package/dist/esm/{chunk-7BLJRZEP.js → chunk-C5SIP2TE.js} +52 -14
- package/dist/esm/chunk-C5SIP2TE.js.map +1 -0
- package/dist/esm/{chunk-TO5NNKXK.js → chunk-FCYI4SSO.js} +3 -3
- package/dist/esm/{chunk-TO5NNKXK.js.map → chunk-FCYI4SSO.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-7BLJRZEP.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-FCYI4SSO.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-DoVTElgI.mjs
|
|
182
182
|
var EVENT_METHOD_CALLED = "METHOD_CALLED";
|
|
183
|
-
var EVENT_SAMPLING_RATE$
|
|
183
|
+
var EVENT_SAMPLING_RATE$3 = 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$3,
|
|
188
188
|
payload: {
|
|
189
189
|
method,
|
|
190
190
|
...payload
|
|
@@ -222,11 +222,6 @@ 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
|
-
|
|
230
225
|
// ../../node_modules/.pnpm/swr@2.3.4_react@18.3.1/node_modules/swr/dist/_internal/events.mjs
|
|
231
226
|
var events_exports = {};
|
|
232
227
|
__export(events_exports, {
|
|
@@ -1531,7 +1526,7 @@ function dequal2(foo, bar) {
|
|
|
1531
1526
|
return foo !== foo && bar !== bar;
|
|
1532
1527
|
}
|
|
1533
1528
|
|
|
1534
|
-
// ../shared/dist/runtime/
|
|
1529
|
+
// ../shared/dist/runtime/organization-oPqzCGOd.mjs
|
|
1535
1530
|
function assertContextExists(contextVal, msgOrCtx) {
|
|
1536
1531
|
if (!contextVal) throw typeof msgOrCtx === "string" ? new Error(msgOrCtx) : /* @__PURE__ */ new Error(`${msgOrCtx.displayName} not found`);
|
|
1537
1532
|
}
|
|
@@ -1782,6 +1777,7 @@ function useOrganization(params) {
|
|
|
1782
1777
|
var _a;
|
|
1783
1778
|
const { domains: domainListParams, membershipRequests: membershipRequestsListParams, memberships: membersListParams, invitations: invitationsListParams } = params || {};
|
|
1784
1779
|
useAssertWrappedByClerkProvider("useOrganization");
|
|
1780
|
+
useAttemptToEnableOrganizations("useOrganization");
|
|
1785
1781
|
const { organization } = useOrganizationContext();
|
|
1786
1782
|
const session = useSessionContext();
|
|
1787
1783
|
const domainSafeValues = useWithSafeValues(domainListParams, {
|
|
@@ -1962,6 +1958,7 @@ function useOrganizationList(params) {
|
|
|
1962
1958
|
var _a;
|
|
1963
1959
|
const { userMemberships, userInvitations, userSuggestions } = params || {};
|
|
1964
1960
|
useAssertWrappedByClerkProvider("useOrganizationList");
|
|
1961
|
+
useAttemptToEnableOrganizations("useOrganizationList");
|
|
1965
1962
|
const userMembershipsSafeValues = useWithSafeValues(userMemberships, {
|
|
1966
1963
|
initialPage: 1,
|
|
1967
1964
|
pageSize: 10,
|
|
@@ -2358,6 +2355,21 @@ createElementComponent("payment", typeof window === "undefined");
|
|
|
2358
2355
|
createContextAndHook("StripeLibsContext");
|
|
2359
2356
|
createContextAndHook("PaymentElementContext");
|
|
2360
2357
|
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
|
+
}
|
|
2361
2373
|
var errorThrower = buildErrorThrower({ packageName: "@clerk/clerk-react" });
|
|
2362
2374
|
function setErrorThrowerOptions(options) {
|
|
2363
2375
|
errorThrower.setMessages(options).setPackageName(options);
|
|
@@ -3659,7 +3671,7 @@ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError("Canno
|
|
|
3659
3671
|
var __privateSet2 = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
3660
3672
|
var __privateMethod2 = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
3661
3673
|
|
|
3662
|
-
// ../shared/dist/runtime/loadClerkJsScript-
|
|
3674
|
+
// ../shared/dist/runtime/loadClerkJsScript-CmxpG71G.mjs
|
|
3663
3675
|
var { isDevOrStagingUrl } = createDevOrStagingUrlCache();
|
|
3664
3676
|
var errorThrower2 = buildErrorThrower({ packageName: "@clerk/shared" });
|
|
3665
3677
|
function setClerkJsLoadingErrorPackageName(packageName) {
|
|
@@ -4179,7 +4191,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
|
|
|
4179
4191
|
}
|
|
4180
4192
|
var SDK_METADATA = {
|
|
4181
4193
|
name: "@clerk/clerk-react",
|
|
4182
|
-
version: "5.
|
|
4194
|
+
version: "5.57.0-snapshot.v20251119151755",
|
|
4183
4195
|
environment: process.env.NODE_ENV
|
|
4184
4196
|
};
|
|
4185
4197
|
var _status;
|
|
@@ -4197,6 +4209,7 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4197
4209
|
this.clerkjs = null;
|
|
4198
4210
|
this.preopenOneTap = null;
|
|
4199
4211
|
this.preopenUserVerification = null;
|
|
4212
|
+
this.preopenEnableOrganizationsPrompt = null;
|
|
4200
4213
|
this.preopenSignIn = null;
|
|
4201
4214
|
this.preopenCheckout = null;
|
|
4202
4215
|
this.preopenPlanDetails = null;
|
|
@@ -4589,6 +4602,20 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4589
4602
|
this.preopenUserVerification = null;
|
|
4590
4603
|
}
|
|
4591
4604
|
};
|
|
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
|
+
};
|
|
4592
4619
|
this.openGoogleOneTap = (props) => {
|
|
4593
4620
|
if (this.clerkjs && this.loaded) {
|
|
4594
4621
|
this.clerkjs.openGoogleOneTap(props);
|
|
@@ -5180,6 +5207,17 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
5180
5207
|
this.premountMethodCalls.set("signOut", callback);
|
|
5181
5208
|
}
|
|
5182
5209
|
};
|
|
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
|
+
};
|
|
5183
5221
|
const { Clerk = null, publishableKey } = options || {};
|
|
5184
5222
|
__privateSet2(this, _publishableKey, publishableKey);
|
|
5185
5223
|
__privateSet2(this, _proxyUrl, options == null ? void 0 : options.proxyUrl);
|
|
@@ -5552,5 +5590,5 @@ function ClerkProvider2(props) {
|
|
|
5552
5590
|
var GoogleOneTap2 = () => null;
|
|
5553
5591
|
|
|
5554
5592
|
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 };
|
|
5555
|
-
//# sourceMappingURL=chunk-
|
|
5556
|
-
//# sourceMappingURL=chunk-
|
|
5593
|
+
//# sourceMappingURL=chunk-C5SIP2TE.js.map
|
|
5594
|
+
//# sourceMappingURL=chunk-C5SIP2TE.js.map
|