@clerk/elements 0.22.2 → 0.22.3-snapshot.v20241216151446

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.
@@ -1334,8 +1334,9 @@ var Submit = RadixSubmit;
1334
1334
  Submit.displayName = DISPLAY_NAME8;
1335
1335
 
1336
1336
  // src/react/common/connections.tsx
1337
+ import { useClerk as useClerk4 } from "@clerk/shared/react";
1337
1338
  import { Slot as Slot3 } from "@radix-ui/react-slot";
1338
- import { createContext as createContext6, useContext as useContext6 } from "react";
1339
+ import { createContext as createContext6, useContext as useContext6, useEffect as useEffect5 } from "react";
1339
1340
 
1340
1341
  // src/react/hooks/use-active-tags.hook.ts
1341
1342
  import { useSelector } from "@xstate/react";
@@ -1507,9 +1508,13 @@ var useConnectionContext = () => {
1507
1508
  return ctx;
1508
1509
  };
1509
1510
  function Connection({ asChild, name, ...rest }) {
1511
+ const clerk = useClerk4();
1510
1512
  const signInRef = SignInRouterCtx.useActorRef(true);
1511
1513
  const signUpRef = SignUpRouterCtx.useActorRef(true);
1512
1514
  const provider = useThirdPartyProvider(signInRef || signUpRef, name);
1515
+ useEffect5(() => {
1516
+ void clerk.__internal_warmupDependencies();
1517
+ }, [clerk]);
1513
1518
  if (!provider) {
1514
1519
  return null;
1515
1520
  }
@@ -1538,7 +1543,7 @@ function Icon({ asChild, ...rest }) {
1538
1543
  }
1539
1544
 
1540
1545
  // src/react/common/loading.tsx
1541
- import { useClerk as useClerk6 } from "@clerk/shared/react";
1546
+ import { useClerk as useClerk7 } from "@clerk/shared/react";
1542
1547
  import { eventComponentMounted as eventComponentMounted4 } from "@clerk/shared/telemetry";
1543
1548
  import { useSelector as useSelector5 } from "@xstate/react";
1544
1549
 
@@ -1558,7 +1563,7 @@ function useLoading(actor) {
1558
1563
  }
1559
1564
 
1560
1565
  // src/react/sign-in/step.tsx
1561
- import { useClerk as useClerk4 } from "@clerk/shared/react";
1566
+ import { useClerk as useClerk5 } from "@clerk/shared/react";
1562
1567
  import { eventComponentMounted as eventComponentMounted2 } from "@clerk/shared/telemetry";
1563
1568
 
1564
1569
  // src/react/sign-in/choose-session/choose-session.tsx
@@ -3634,7 +3639,7 @@ function SignInStartInner(props) {
3634
3639
 
3635
3640
  // src/react/sign-in/verifications.tsx
3636
3641
  import { useSelector as useSelector4 } from "@xstate/react";
3637
- import { useCallback as useCallback6, useEffect as useEffect5 } from "react";
3642
+ import { useCallback as useCallback6, useEffect as useEffect6 } from "react";
3638
3643
 
3639
3644
  // src/internals/machines/utils/strategies.ts
3640
3645
  var matchStrategy = (current, desired) => {
@@ -3682,7 +3687,7 @@ function useFactorCtx() {
3682
3687
  function SignInStrategy({ children, name }) {
3683
3688
  const { active } = useStrategy(name);
3684
3689
  const factorCtx = useFactorCtx();
3685
- useEffect5(() => {
3690
+ useEffect6(() => {
3686
3691
  if (factorCtx) {
3687
3692
  factorCtx.send({ type: "STRATEGY.REGISTER", factor: name });
3688
3693
  }
@@ -3755,7 +3760,7 @@ var SIGN_IN_STEPS = {
3755
3760
  };
3756
3761
  function SignInStep(props) {
3757
3762
  var _a;
3758
- const clerk = useClerk4();
3763
+ const clerk = useClerk5();
3759
3764
  (_a = clerk.telemetry) == null ? void 0 : _a.record(eventComponentMounted2("Elements_SignInStep", { name: props.name }));
3760
3765
  switch (props.name) {
3761
3766
  case SIGN_IN_STEPS.start:
@@ -3778,7 +3783,7 @@ function SignInStep(props) {
3778
3783
  }
3779
3784
 
3780
3785
  // src/react/sign-up/step.tsx
3781
- import { useClerk as useClerk5 } from "@clerk/shared/react";
3786
+ import { useClerk as useClerk6 } from "@clerk/shared/react";
3782
3787
  import { eventComponentMounted as eventComponentMounted3 } from "@clerk/shared/telemetry";
3783
3788
 
3784
3789
  // src/react/sign-up/continue.tsx
@@ -3884,7 +3889,7 @@ var SIGN_UP_STEPS = {
3884
3889
  };
3885
3890
  function SignUpStep(props) {
3886
3891
  var _a;
3887
- const clerk = useClerk5();
3892
+ const clerk = useClerk6();
3888
3893
  (_a = clerk.telemetry) == null ? void 0 : _a.record(eventComponentMounted3("Elements_SignUpStep", { name: props.name }));
3889
3894
  switch (props.name) {
3890
3895
  case SIGN_UP_STEPS.start:
@@ -3945,7 +3950,7 @@ function isSignUpScope(scope) {
3945
3950
  }
3946
3951
  function Loading({ children, scope }) {
3947
3952
  var _a;
3948
- const clerk = useClerk6();
3953
+ const clerk = useClerk7();
3949
3954
  (_a = clerk.telemetry) == null ? void 0 : _a.record(eventComponentMounted4("Elements_Loading", { scope: scope != null ? scope : false }));
3950
3955
  const signInRouterRef = SignInRouterCtx.useActorRef(true);
3951
3956
  const signUpRouterRef = SignUpRouterCtx.useActorRef(true);
@@ -4018,7 +4023,7 @@ function SignUpLoading({ children, scope, routerRef }) {
4018
4023
  }
4019
4024
 
4020
4025
  // src/react/common/link.tsx
4021
- import { useClerk as useClerk7 } from "@clerk/shared/react";
4026
+ import { useClerk as useClerk8 } from "@clerk/shared/react";
4022
4027
  import { useClerkRouter } from "@clerk/shared/router";
4023
4028
  import { jsx as jsx20 } from "react/jsx-runtime";
4024
4029
  var paths = {
@@ -4027,7 +4032,7 @@ var paths = {
4027
4032
  };
4028
4033
  function Link({ navigate, children, ...rest }) {
4029
4034
  const router = useClerkRouter();
4030
- const clerk = useClerk7();
4035
+ const clerk = useClerk8();
4031
4036
  const destinationUrl = router.makeDestinationUrlWithPreservedQueryParameters(
4032
4037
  clerk.__internal_getOption(paths[navigate])
4033
4038
  );
@@ -4109,4 +4114,4 @@ export {
4109
4114
  Loading,
4110
4115
  Link
4111
4116
  };
4112
- //# sourceMappingURL=chunk-7B3IWWWL.mjs.map
4117
+ //# sourceMappingURL=chunk-IU2WDNS3.mjs.map