@clerk/chrome-extension 2.8.5-canary.v20251124122304 → 2.8.5-snapshot.v20251124170822
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 +53 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/index.js +32 -3
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/esm/background/index.js +1 -1
- package/dist/esm/{chunk-XZUKB27X.js → chunk-25MLZTN3.js} +56 -14
- package/dist/esm/chunk-25MLZTN3.js.map +1 -0
- package/dist/esm/{chunk-MU7WEWE6.js → chunk-V4AKEJ6V.js} +3 -3
- package/dist/esm/{chunk-MU7WEWE6.js.map → chunk-V4AKEJ6V.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-XZUKB27X.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-V4AKEJ6V.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-DsA9O7QJ.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
|
}
|
|
@@ -1786,6 +1781,7 @@ function useOrganization(params) {
|
|
|
1786
1781
|
var _a;
|
|
1787
1782
|
const { domains: domainListParams, membershipRequests: membershipRequestsListParams, memberships: membersListParams, invitations: invitationsListParams } = params || {};
|
|
1788
1783
|
useAssertWrappedByClerkProvider("useOrganization");
|
|
1784
|
+
useAttemptToEnableOrganizations("useOrganization");
|
|
1789
1785
|
const { organization } = useOrganizationContext();
|
|
1790
1786
|
const session = useSessionContext();
|
|
1791
1787
|
const domainSafeValues = useWithSafeValues(domainListParams, {
|
|
@@ -1966,6 +1962,7 @@ function useOrganizationList(params) {
|
|
|
1966
1962
|
var _a;
|
|
1967
1963
|
const { userMemberships, userInvitations, userSuggestions } = params || {};
|
|
1968
1964
|
useAssertWrappedByClerkProvider("useOrganizationList");
|
|
1965
|
+
useAttemptToEnableOrganizations("useOrganizationList");
|
|
1969
1966
|
const userMembershipsSafeValues = useWithSafeValues(userMemberships, {
|
|
1970
1967
|
initialPage: 1,
|
|
1971
1968
|
pageSize: 10,
|
|
@@ -2361,6 +2358,22 @@ var createElementComponent = (type, isServer) => {
|
|
|
2361
2358
|
createElementComponent("payment", typeof window === "undefined");
|
|
2362
2359
|
createContextAndHook("PaymentElementContext");
|
|
2363
2360
|
createContextAndHook("StripeUtilsContext");
|
|
2361
|
+
function getCurrentOrganizationMembership(organizationMemberships, organizationId) {
|
|
2362
|
+
return organizationMemberships.find((organizationMembership) => organizationMembership.organization.id === organizationId);
|
|
2363
|
+
}
|
|
2364
|
+
function useAttemptToEnableOrganizations(caller) {
|
|
2365
|
+
const clerk = useClerk();
|
|
2366
|
+
const hasAttempted = useRef(false);
|
|
2367
|
+
useEffect(() => {
|
|
2368
|
+
var _a;
|
|
2369
|
+
if (hasAttempted.current) return;
|
|
2370
|
+
hasAttempted.current = true;
|
|
2371
|
+
(_a = clerk.__internal_attemptToEnableEnvironmentSetting) == null ? void 0 : _a.call(clerk, {
|
|
2372
|
+
for: "organizations",
|
|
2373
|
+
caller
|
|
2374
|
+
});
|
|
2375
|
+
}, [clerk, caller]);
|
|
2376
|
+
}
|
|
2364
2377
|
var errorThrower = buildErrorThrower({ packageName: "@clerk/clerk-react" });
|
|
2365
2378
|
function setErrorThrowerOptions(options) {
|
|
2366
2379
|
errorThrower.setMessages(options).setPackageName(options);
|
|
@@ -3662,7 +3675,7 @@ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError("Canno
|
|
|
3662
3675
|
var __privateSet2 = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
3663
3676
|
var __privateMethod2 = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
3664
3677
|
|
|
3665
|
-
// ../shared/dist/runtime/loadClerkJsScript-
|
|
3678
|
+
// ../shared/dist/runtime/loadClerkJsScript-CQSn0fIm.mjs
|
|
3666
3679
|
var { isDevOrStagingUrl } = createDevOrStagingUrlCache();
|
|
3667
3680
|
var errorThrower2 = buildErrorThrower({ packageName: "@clerk/shared" });
|
|
3668
3681
|
function setClerkJsLoadingErrorPackageName(packageName) {
|
|
@@ -4182,7 +4195,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
|
|
|
4182
4195
|
}
|
|
4183
4196
|
var SDK_METADATA = {
|
|
4184
4197
|
name: "@clerk/clerk-react",
|
|
4185
|
-
version: "5.
|
|
4198
|
+
version: "5.57.0-snapshot.v20251124170822",
|
|
4186
4199
|
environment: process.env.NODE_ENV
|
|
4187
4200
|
};
|
|
4188
4201
|
var _status;
|
|
@@ -4200,6 +4213,7 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4200
4213
|
this.clerkjs = null;
|
|
4201
4214
|
this.preopenOneTap = null;
|
|
4202
4215
|
this.preopenUserVerification = null;
|
|
4216
|
+
this.preopenEnableOrganizationsPrompt = null;
|
|
4203
4217
|
this.preopenSignIn = null;
|
|
4204
4218
|
this.preopenCheckout = null;
|
|
4205
4219
|
this.preopenPlanDetails = null;
|
|
@@ -4466,6 +4480,9 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4466
4480
|
if (this.preOpenWaitlist !== null) {
|
|
4467
4481
|
clerkjs.openWaitlist(this.preOpenWaitlist);
|
|
4468
4482
|
}
|
|
4483
|
+
if (this.preopenEnableOrganizationsPrompt) {
|
|
4484
|
+
clerkjs.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt);
|
|
4485
|
+
}
|
|
4469
4486
|
this.premountSignInNodes.forEach((props, node) => {
|
|
4470
4487
|
clerkjs.mountSignIn(node, props);
|
|
4471
4488
|
});
|
|
@@ -4592,6 +4609,20 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4592
4609
|
this.preopenUserVerification = null;
|
|
4593
4610
|
}
|
|
4594
4611
|
};
|
|
4612
|
+
this.__internal_openEnableOrganizationsPrompt = (props) => {
|
|
4613
|
+
if (this.clerkjs && this.loaded) {
|
|
4614
|
+
this.clerkjs.__internal_openEnableOrganizationsPrompt(props);
|
|
4615
|
+
} else {
|
|
4616
|
+
this.preopenEnableOrganizationsPrompt = props;
|
|
4617
|
+
}
|
|
4618
|
+
};
|
|
4619
|
+
this.__internal_closeEnableOrganizationsPrompt = () => {
|
|
4620
|
+
if (this.clerkjs && this.loaded) {
|
|
4621
|
+
this.clerkjs.__internal_closeEnableOrganizationsPrompt();
|
|
4622
|
+
} else {
|
|
4623
|
+
this.preopenEnableOrganizationsPrompt = null;
|
|
4624
|
+
}
|
|
4625
|
+
};
|
|
4595
4626
|
this.openGoogleOneTap = (props) => {
|
|
4596
4627
|
if (this.clerkjs && this.loaded) {
|
|
4597
4628
|
this.clerkjs.openGoogleOneTap(props);
|
|
@@ -5183,6 +5214,17 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
5183
5214
|
this.premountMethodCalls.set("signOut", callback);
|
|
5184
5215
|
}
|
|
5185
5216
|
};
|
|
5217
|
+
this.__internal_attemptToEnableEnvironmentSetting = (options2) => {
|
|
5218
|
+
const callback = () => {
|
|
5219
|
+
var _a;
|
|
5220
|
+
return (_a = this.clerkjs) == null ? void 0 : _a.__internal_attemptToEnableEnvironmentSetting(options2);
|
|
5221
|
+
};
|
|
5222
|
+
if (this.clerkjs && this.loaded) {
|
|
5223
|
+
return callback();
|
|
5224
|
+
} else {
|
|
5225
|
+
this.premountMethodCalls.set("__internal_attemptToEnableEnvironmentSetting", callback);
|
|
5226
|
+
}
|
|
5227
|
+
};
|
|
5186
5228
|
const { Clerk = null, publishableKey } = options || {};
|
|
5187
5229
|
__privateSet2(this, _publishableKey, publishableKey);
|
|
5188
5230
|
__privateSet2(this, _proxyUrl, options == null ? void 0 : options.proxyUrl);
|
|
@@ -5555,5 +5597,5 @@ function ClerkProvider2(props) {
|
|
|
5555
5597
|
var GoogleOneTap2 = () => null;
|
|
5556
5598
|
|
|
5557
5599
|
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 };
|
|
5558
|
-
//# sourceMappingURL=chunk-
|
|
5559
|
-
//# sourceMappingURL=chunk-
|
|
5600
|
+
//# sourceMappingURL=chunk-25MLZTN3.js.map
|
|
5601
|
+
//# sourceMappingURL=chunk-25MLZTN3.js.map
|