@clerk/chrome-extension 2.8.7-snapshot.v20251201171410 → 2.8.7
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 +28 -65
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/index.js +3 -42
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/esm/background/index.js +1 -1
- package/dist/esm/{chunk-M6OYY3XB.js → chunk-I7OL743L.js} +31 -68
- package/dist/esm/chunk-I7OL743L.js.map +1 -0
- package/dist/esm/{chunk-36FFBWFE.js → chunk-NDXFLDDE.js} +3 -3
- package/dist/esm/{chunk-36FFBWFE.js.map → chunk-NDXFLDDE.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-M6OYY3XB.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-NDXFLDDE.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-COubKXAN.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
|
}
|
|
@@ -1760,6 +1765,23 @@ var usePagesOrInfinite = (params) => {
|
|
|
1760
1765
|
setData: triggerInfinite ? (value) => swrInfiniteMutate(value, { revalidate: false }) : (value) => swrMutate(value, { revalidate: false })
|
|
1761
1766
|
};
|
|
1762
1767
|
};
|
|
1768
|
+
var useClerk = () => {
|
|
1769
|
+
useAssertWrappedByClerkProvider("useClerk");
|
|
1770
|
+
return useClerkInstanceContext();
|
|
1771
|
+
};
|
|
1772
|
+
function useAttemptToEnableOrganizations(caller) {
|
|
1773
|
+
const clerk = useClerk();
|
|
1774
|
+
const hasAttempted = useRef(false);
|
|
1775
|
+
useEffect(() => {
|
|
1776
|
+
var _a;
|
|
1777
|
+
if (hasAttempted.current) return;
|
|
1778
|
+
hasAttempted.current = true;
|
|
1779
|
+
(_a = clerk.__internal_attemptToEnableEnvironmentSetting) == null ? void 0 : _a.call(clerk, {
|
|
1780
|
+
for: "organizations",
|
|
1781
|
+
caller
|
|
1782
|
+
});
|
|
1783
|
+
}, [clerk, caller]);
|
|
1784
|
+
}
|
|
1763
1785
|
var undefinedPaginatedResource$1 = {
|
|
1764
1786
|
data: void 0,
|
|
1765
1787
|
count: void 0,
|
|
@@ -2133,10 +2155,6 @@ function useUser() {
|
|
|
2133
2155
|
user
|
|
2134
2156
|
};
|
|
2135
2157
|
}
|
|
2136
|
-
var useClerk = () => {
|
|
2137
|
-
useAssertWrappedByClerkProvider("useClerk");
|
|
2138
|
-
return useClerkInstanceContext();
|
|
2139
|
-
};
|
|
2140
2158
|
var isDeeplyEqual = dequal2;
|
|
2141
2159
|
var CLERK_API_REVERIFICATION_ERROR_CODE = "session_reverification_required";
|
|
2142
2160
|
async function resolveResult(result) {
|
|
@@ -2358,22 +2376,6 @@ var createElementComponent = (type, isServer) => {
|
|
|
2358
2376
|
createElementComponent("payment", typeof window === "undefined");
|
|
2359
2377
|
createContextAndHook("PaymentElementContext");
|
|
2360
2378
|
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
|
-
}
|
|
2377
2379
|
var errorThrower = buildErrorThrower({ packageName: "@clerk/clerk-react" });
|
|
2378
2380
|
function setErrorThrowerOptions(options) {
|
|
2379
2381
|
errorThrower.setMessages(options).setPackageName(options);
|
|
@@ -3664,27 +3666,6 @@ withClerk(
|
|
|
3664
3666
|
},
|
|
3665
3667
|
{ component: "TaskChooseOrganization", renderWhileLoading: true }
|
|
3666
3668
|
);
|
|
3667
|
-
withClerk(
|
|
3668
|
-
({ clerk, component, fallback, ...props }) => {
|
|
3669
|
-
const mountingStatus = useWaitForComponentMount(component);
|
|
3670
|
-
const shouldShowFallback = mountingStatus === "rendering" || !clerk.loaded;
|
|
3671
|
-
const rendererRootProps = {
|
|
3672
|
-
...shouldShowFallback && fallback && { style: { display: "none" } }
|
|
3673
|
-
};
|
|
3674
|
-
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, shouldShowFallback && fallback, clerk.loaded && /* @__PURE__ */ React7.createElement(
|
|
3675
|
-
ClerkHostRenderer,
|
|
3676
|
-
{
|
|
3677
|
-
component,
|
|
3678
|
-
mount: clerk.mountTaskResetPassword,
|
|
3679
|
-
unmount: clerk.unmountTaskResetPassword,
|
|
3680
|
-
updateProps: clerk.__unstable__updateProps,
|
|
3681
|
-
props,
|
|
3682
|
-
rootProps: rendererRootProps
|
|
3683
|
-
}
|
|
3684
|
-
));
|
|
3685
|
-
},
|
|
3686
|
-
{ component: "TaskResetPassword", renderWhileLoading: true }
|
|
3687
|
-
);
|
|
3688
3669
|
|
|
3689
3670
|
// ../react/dist/chunk-OANWQR3B.mjs
|
|
3690
3671
|
var __typeError = (msg) => {
|
|
@@ -3696,7 +3677,7 @@ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError("Canno
|
|
|
3696
3677
|
var __privateSet2 = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
3697
3678
|
var __privateMethod2 = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
3698
3679
|
|
|
3699
|
-
// ../shared/dist/runtime/loadClerkJsScript-
|
|
3680
|
+
// ../shared/dist/runtime/loadClerkJsScript-Bky__Ijz.mjs
|
|
3700
3681
|
var { isDevOrStagingUrl } = createDevOrStagingUrlCache();
|
|
3701
3682
|
var errorThrower2 = buildErrorThrower({ packageName: "@clerk/shared" });
|
|
3702
3683
|
function setClerkJsLoadingErrorPackageName(packageName) {
|
|
@@ -4216,7 +4197,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
|
|
|
4216
4197
|
}
|
|
4217
4198
|
var SDK_METADATA = {
|
|
4218
4199
|
name: "@clerk/clerk-react",
|
|
4219
|
-
version: "5.
|
|
4200
|
+
version: "5.57.1",
|
|
4220
4201
|
environment: process.env.NODE_ENV
|
|
4221
4202
|
};
|
|
4222
4203
|
var _status;
|
|
@@ -4259,7 +4240,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4259
4240
|
this.premountAPIKeysNodes = /* @__PURE__ */ new Map();
|
|
4260
4241
|
this.premountOAuthConsentNodes = /* @__PURE__ */ new Map();
|
|
4261
4242
|
this.premountTaskChooseOrganizationNodes = /* @__PURE__ */ new Map();
|
|
4262
|
-
this.premountTaskResetPasswordNodes = /* @__PURE__ */ new Map();
|
|
4263
4243
|
this.premountAddListenerCalls = /* @__PURE__ */ new Map();
|
|
4264
4244
|
this.loadedListeners = [];
|
|
4265
4245
|
__privateAdd2(this, _status, "loading");
|
|
@@ -4538,9 +4518,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4538
4518
|
this.premountTaskChooseOrganizationNodes.forEach((props, node) => {
|
|
4539
4519
|
clerkjs.mountTaskChooseOrganization(node, props);
|
|
4540
4520
|
});
|
|
4541
|
-
this.premountTaskResetPasswordNodes.forEach((props, node) => {
|
|
4542
|
-
clerkjs.mountTaskResetPassword(node, props);
|
|
4543
|
-
});
|
|
4544
4521
|
if (typeof this.clerkjs.status === "undefined") {
|
|
4545
4522
|
__privateGet2(this, _eventBus).emit(clerkEvents.Status, "ready");
|
|
4546
4523
|
}
|
|
@@ -4939,20 +4916,6 @@ var _IsomorphicClerk = class _IsomorphicClerk2 {
|
|
|
4939
4916
|
this.premountTaskChooseOrganizationNodes.delete(node);
|
|
4940
4917
|
}
|
|
4941
4918
|
};
|
|
4942
|
-
this.__experimental_mountTaskResetPassword = (node, props) => {
|
|
4943
|
-
if (this.clerkjs && this.loaded) {
|
|
4944
|
-
this.clerkjs.mountTaskResetPassword(node, props);
|
|
4945
|
-
} else {
|
|
4946
|
-
this.premountTaskResetPasswordNodes.set(node, props);
|
|
4947
|
-
}
|
|
4948
|
-
};
|
|
4949
|
-
this.unmountTaskResetPassword = (node) => {
|
|
4950
|
-
if (this.clerkjs && this.loaded) {
|
|
4951
|
-
this.clerkjs.unmountTaskResetPassword(node);
|
|
4952
|
-
} else {
|
|
4953
|
-
this.premountTaskResetPasswordNodes.delete(node);
|
|
4954
|
-
}
|
|
4955
|
-
};
|
|
4956
4919
|
this.addListener = (listener) => {
|
|
4957
4920
|
if (this.clerkjs) {
|
|
4958
4921
|
return this.clerkjs.addListener(listener);
|
|
@@ -5636,5 +5599,5 @@ function ClerkProvider2(props) {
|
|
|
5636
5599
|
var GoogleOneTap2 = () => null;
|
|
5637
5600
|
|
|
5638
5601
|
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 };
|
|
5639
|
-
//# sourceMappingURL=chunk-
|
|
5640
|
-
//# sourceMappingURL=chunk-
|
|
5602
|
+
//# sourceMappingURL=chunk-I7OL743L.js.map
|
|
5603
|
+
//# sourceMappingURL=chunk-I7OL743L.js.map
|