@clerk/elements 0.22.23 → 0.23.0-canary.v20250218210704
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/{chunk-XRRYXWPN.mjs → chunk-K3SISR4Y.mjs} +2 -2
- package/dist/{chunk-CE6AJZKX.mjs → chunk-NVFZDCOQ.mjs} +5 -5
- package/dist/chunk-NVFZDCOQ.mjs.map +1 -0
- package/dist/react/common/index.mjs +1 -1
- package/dist/react/sign-in/index.js +4 -4
- package/dist/react/sign-in/index.js.map +1 -1
- package/dist/react/sign-in/index.mjs +2 -2
- package/dist/react/sign-up/index.mjs +2 -2
- package/package.json +4 -4
- package/dist/chunk-CE6AJZKX.mjs.map +0 -1
- /package/dist/{chunk-XRRYXWPN.mjs.map → chunk-K3SISR4Y.mjs.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__privateAdd,
|
|
4
4
|
__privateGet,
|
|
5
5
|
__privateSet
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NVFZDCOQ.mjs";
|
|
7
7
|
|
|
8
8
|
// src/react/router/virtual.ts
|
|
9
9
|
import { useSyncExternalStore } from "react";
|
|
@@ -131,4 +131,4 @@ export {
|
|
|
131
131
|
useClerkRouter,
|
|
132
132
|
ClerkHostRouterContext
|
|
133
133
|
};
|
|
134
|
-
//# sourceMappingURL=chunk-
|
|
134
|
+
//# sourceMappingURL=chunk-K3SISR4Y.mjs.map
|
|
@@ -1578,13 +1578,13 @@ function useSignInChooseSessionIsActive() {
|
|
|
1578
1578
|
const routerRef = SignInRouterCtx.useActorRef();
|
|
1579
1579
|
return useActiveTags(routerRef, "step:choose-session");
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function useSignInSessionList(params) {
|
|
1582
1582
|
const { omitCurrent = true } = params || {};
|
|
1583
1583
|
return SignInRouterCtx.useSelector((state) => {
|
|
1584
1584
|
var _a, _b, _c, _d;
|
|
1585
|
-
const
|
|
1585
|
+
const signedInSessions = ((_b = (_a = state.context.clerk) == null ? void 0 : _a.client) == null ? void 0 : _b.signedInSessions) || [];
|
|
1586
1586
|
const currentSessionId = (_d = (_c = state.context.clerk) == null ? void 0 : _c.session) == null ? void 0 : _d.id;
|
|
1587
|
-
const filteredSessions = omitCurrent ?
|
|
1587
|
+
const filteredSessions = omitCurrent ? signedInSessions.filter((s) => s.id !== currentSessionId) : signedInSessions;
|
|
1588
1588
|
return filteredSessions.map((s) => ({
|
|
1589
1589
|
id: s.id,
|
|
1590
1590
|
...s.publicUserData
|
|
@@ -1601,7 +1601,7 @@ function SignInChooseSession({ asChild, children, ...props }) {
|
|
|
1601
1601
|
return activeState ? /* @__PURE__ */ jsx8(SignInChooseSessionCtx.Provider, { children: /* @__PURE__ */ jsx8(Comp, { ...props, children }) }) : null;
|
|
1602
1602
|
}
|
|
1603
1603
|
function SignInSessionList({ asChild, children, includeCurrentSession, ...props }) {
|
|
1604
|
-
const sessions =
|
|
1604
|
+
const sessions = useSignInSessionList({ omitCurrent: !includeCurrentSession });
|
|
1605
1605
|
if (!children || !(sessions == null ? void 0 : sessions.length)) {
|
|
1606
1606
|
return null;
|
|
1607
1607
|
}
|
|
@@ -4099,4 +4099,4 @@ export {
|
|
|
4099
4099
|
Loading,
|
|
4100
4100
|
Link
|
|
4101
4101
|
};
|
|
4102
|
-
//# sourceMappingURL=chunk-
|
|
4102
|
+
//# sourceMappingURL=chunk-NVFZDCOQ.mjs.map
|