doct-ui-auth-kit 1.0.27 → 1.0.28

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/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { jsx as V, Fragment as Jt } from "react/jsx-runtime";
2
+ import { jsx as H, Fragment as Jt } from "react/jsx-runtime";
3
3
  import { h as fe, A as ii, i as ai, u as oi, j as di, e as ui, L as li, g as si, f as ci, d as fi, c as $i, b as zt, k as pi, l as at, O as yi, S as gi } from "./welcome-signup-page-W45qOCrO.js";
4
- import { B as L1, D as D1, m as k1, E as j1, I as G1, a as U1, n as B1, M as W1, o as H1, p as V1, q as K1, R as Y1, W as q1, r as X1, s as Z1, t as J1, v as z1, w as Q1, x as es, y as ts, z as ns } from "./welcome-signup-page-W45qOCrO.js";
5
- import T, { createContext as mi, useContext as lr, useRef as se, useEffect as Ne, useCallback as ue, useMemo as Ve, useReducer as hi } from "react";
4
+ import { B as L1, D as D1, m as k1, E as j1, I as G1, a as U1, n as B1, M as W1, o as V1, p as H1, q as K1, R as Y1, W as q1, r as X1, s as Z1, t as J1, v as z1, w as Q1, x as es, y as ts, z as ns } from "./welcome-signup-page-W45qOCrO.js";
5
+ import T, { createContext as mi, useContext as lr, useRef as se, useEffect as Ne, useCallback as ue, useMemo as He, useReducer as hi } from "react";
6
6
  import { DoctCircularProgress as vi } from "docthub-core-components";
7
7
  import "react-icons/md";
8
8
  import "react-hook-form";
@@ -118,21 +118,21 @@ function Ni(e) {
118
118
  } = e;
119
119
  if (n === "") {
120
120
  let g;
121
- return t[0] !== r ? (g = /* @__PURE__ */ V(Jt, { children: r }), t[0] = r, t[1] = g) : g = t[1], g;
121
+ return t[0] !== r ? (g = /* @__PURE__ */ H(Jt, { children: r }), t[0] = r, t[1] = g) : g = t[1], g;
122
122
  }
123
123
  let y;
124
124
  t[2] !== n ? (y = Pi(n), t[2] = n, t[3] = y) : y = t[3];
125
125
  const c = y;
126
126
  if (!c) {
127
127
  let g;
128
- return t[4] !== r ? (g = /* @__PURE__ */ V(Jt, { children: r }), t[4] = r, t[5] = g) : g = t[5], g;
128
+ return t[4] !== r ? (g = /* @__PURE__ */ H(Jt, { children: r }), t[4] = r, t[5] = g) : g = t[5], g;
129
129
  }
130
130
  let f;
131
131
  t[6] !== s ? (f = s != null && {
132
132
  className: s
133
133
  }, t[6] = s, t[7] = f) : f = t[7];
134
134
  let p;
135
- return t[8] !== l || t[9] !== r || t[10] !== c.align || t[11] !== c.contentWidth || t[12] !== c.layoutType || t[13] !== c.maxWidth || t[14] !== c.variant || t[15] !== o || t[16] !== d || t[17] !== u || t[18] !== i || t[19] !== f || t[20] !== a ? (p = /* @__PURE__ */ V(ii, { layoutType: c.layoutType, variant: c.variant, maxWidth: c.maxWidth, contentWidth: c.contentWidth, align: c.align, logo: i, title: a, description: o, footer: d, header: u, backButton: l, ...f, children: r }), t[8] = l, t[9] = r, t[10] = c.align, t[11] = c.contentWidth, t[12] = c.layoutType, t[13] = c.maxWidth, t[14] = c.variant, t[15] = o, t[16] = d, t[17] = u, t[18] = i, t[19] = f, t[20] = a, t[21] = p) : p = t[21], p;
135
+ return t[8] !== l || t[9] !== r || t[10] !== c.align || t[11] !== c.contentWidth || t[12] !== c.layoutType || t[13] !== c.maxWidth || t[14] !== c.variant || t[15] !== o || t[16] !== d || t[17] !== u || t[18] !== i || t[19] !== f || t[20] !== a ? (p = /* @__PURE__ */ H(ii, { layoutType: c.layoutType, variant: c.variant, maxWidth: c.maxWidth, contentWidth: c.contentWidth, align: c.align, logo: i, title: a, description: o, footer: d, header: u, backButton: l, ...f, children: r }), t[8] = l, t[9] = r, t[10] = c.align, t[11] = c.contentWidth, t[12] = c.layoutType, t[13] = c.maxWidth, t[14] = c.variant, t[15] = o, t[16] = d, t[17] = u, t[18] = i, t[19] = f, t[20] = a, t[21] = p) : p = t[21], p;
136
136
  }
137
137
  const cr = {
138
138
  ...ai,
@@ -227,6 +227,9 @@ function Ti(e, t) {
227
227
  },
228
228
  ...t.prefilledFullName !== void 0 && {
229
229
  pendingFullName: t.prefilledFullName
230
+ },
231
+ ...t.signupOrigin !== void 0 && {
232
+ signupOrigin: t.signupOrigin
230
233
  }
231
234
  };
232
235
  case "SET_STEP_LINK_OR_MERGE":
@@ -482,7 +485,7 @@ function Fi(e, t) {
482
485
  function nn() {
483
486
  const e = fe.c(1);
484
487
  let t;
485
- return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ V("div", { className: "flex min-h-svh w-full items-center justify-center", children: /* @__PURE__ */ V(vi, { size: 32 }) }), e[0] = t) : t = e[0], t;
488
+ return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ H("div", { className: "flex min-h-svh w-full items-center justify-center", children: /* @__PURE__ */ H(vi, { size: 32 }) }), e[0] = t) : t = e[0], t;
486
489
  }
487
490
  function Mi(e) {
488
491
  const t = fe.c(76);
@@ -531,7 +534,7 @@ function Mi(e) {
531
534
  switch (d.step) {
532
535
  case "CHECKING_SESSION": {
533
536
  let b;
534
- return t[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ V(nn, {}), t[14] = b) : b = t[14], b;
537
+ return t[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ H(nn, {}), t[14] = b) : b = t[14], b;
535
538
  }
536
539
  case "METHOD_SELECT": {
537
540
  const b = l?.google?.clientId, I = l?.apple?.clientId;
@@ -541,54 +544,54 @@ function Mi(e) {
541
544
  t[18] !== b || t[19] !== $ ? (L = b ? $ : Di, t[18] = b, t[19] = $, t[20] = L) : L = t[20];
542
545
  let B;
543
546
  t[21] !== I || t[22] !== m ? (B = I ? m : Li, t[21] = I, t[22] = m, t[23] = B) : B = t[23];
544
- let H;
545
- t[24] !== o ? (H = o != null && {
547
+ let V;
548
+ t[24] !== o ? (V = o != null && {
546
549
  onEnterpriseLogin: o
547
- }, t[24] = o, t[25] = H) : H = t[25];
550
+ }, t[24] = o, t[25] = V) : V = t[25];
548
551
  let q;
549
- return t[26] !== F || t[27] !== L || t[28] !== B || t[29] !== H || t[30] !== _ ? (q = /* @__PURE__ */ V($i, { onContinueWithMobile: _, onContinueWithEmail: F, onContinueWithGoogle: L, onContinueWithApple: B, ...H }), t[26] = F, t[27] = L, t[28] = B, t[29] = H, t[30] = _, t[31] = q) : q = t[31], q;
552
+ return t[26] !== F || t[27] !== L || t[28] !== B || t[29] !== V || t[30] !== _ ? (q = /* @__PURE__ */ H($i, { onContinueWithMobile: _, onContinueWithEmail: F, onContinueWithGoogle: L, onContinueWithApple: B, ...V }), t[26] = F, t[27] = L, t[28] = B, t[29] = V, t[30] = _, t[31] = q) : q = t[31], q;
550
553
  }
551
554
  case "PHONE_ENTRY": {
552
555
  let b;
553
- return t[32] !== u ? (b = /* @__PURE__ */ V(zt, { mode: "phone", layoutType: "withSlider", variant: "desktop", onBack: () => u.goBack(), onSubmit: (I) => u.submitIdentifier(I) }), t[32] = u, t[33] = b) : b = t[33], b;
556
+ return t[32] !== u ? (b = /* @__PURE__ */ H(zt, { mode: "phone", layoutType: "withSlider", variant: "desktop", onBack: () => u.goBack(), onSubmit: (I) => u.submitIdentifier(I) }), t[32] = u, t[33] = b) : b = t[33], b;
554
557
  }
555
558
  case "EMAIL_ENTRY": {
556
559
  let b;
557
- return t[34] !== u ? (b = /* @__PURE__ */ V(zt, { mode: "email", layoutType: "withSlider", variant: "desktop", onBack: () => u.goBack(), onSubmit: (I) => u.submitIdentifier(I) }), t[34] = u, t[35] = b) : b = t[35], b;
560
+ return t[34] !== u ? (b = /* @__PURE__ */ H(zt, { mode: "email", layoutType: "withSlider", variant: "desktop", onBack: () => u.goBack(), onSubmit: (I) => u.submitIdentifier(I) }), t[34] = u, t[35] = b) : b = t[35], b;
558
561
  }
559
562
  case "OTP_VERIFICATION": {
560
563
  const b = d.userType === "FOREIGN", I = b ? "standalone" : "withSlider", F = b ? "mobile" : "desktop";
561
564
  let _, L, B;
562
565
  t[36] !== u ? (B = () => u.goBack(), _ = (q) => u.verifyOtp(q), L = () => u.resendOtp(), t[36] = u, t[37] = _, t[38] = L, t[39] = B) : (_ = t[37], L = t[38], B = t[39]);
563
- let H;
564
- return t[40] !== b || t[41] !== I || t[42] !== d.identifierType || t[43] !== d.maskedRecipient || t[44] !== _ || t[45] !== L || t[46] !== B || t[47] !== a || t[48] !== F ? (H = /* @__PURE__ */ V(fi, { mode: d.identifierType, recipientDisplay: d.maskedRecipient, isForeignUser: b, layoutType: I, variant: F, onBack: B, submitApi: _, onResendCode: L, validate: a }), t[40] = b, t[41] = I, t[42] = d.identifierType, t[43] = d.maskedRecipient, t[44] = _, t[45] = L, t[46] = B, t[47] = a, t[48] = F, t[49] = H) : H = t[49], H;
566
+ let V;
567
+ return t[40] !== b || t[41] !== I || t[42] !== d.identifierType || t[43] !== d.maskedRecipient || t[44] !== _ || t[45] !== L || t[46] !== B || t[47] !== a || t[48] !== F ? (V = /* @__PURE__ */ H(fi, { mode: d.identifierType, recipientDisplay: d.maskedRecipient, isForeignUser: b, layoutType: I, variant: F, onBack: B, submitApi: _, onResendCode: L, validate: a }), t[40] = b, t[41] = I, t[42] = d.identifierType, t[43] = d.maskedRecipient, t[44] = _, t[45] = L, t[46] = B, t[47] = a, t[48] = F, t[49] = V) : V = t[49], V;
565
568
  }
566
569
  case "SIGNUP_DETAILS": {
567
- if (d.userType === "INDIAN" && d.signupCollectField === "phone" && d.identifierType === "email") {
570
+ if (d.userType === "INDIAN" && d.signupCollectField === "phone" && d.signupOrigin === "sso") {
568
571
  let _, L;
569
- t[50] !== u ? (L = (H) => u.submitSignupDetails({
570
- fullName: H.fullName,
571
- ...H.phone != null && {
572
- phone: H.phone
572
+ t[50] !== u ? (L = (V) => u.submitSignupDetails({
573
+ fullName: V.fullName,
574
+ ...V.phone != null && {
575
+ phone: V.phone
573
576
  },
574
- ...H.email != null && {
575
- email: H.email
577
+ ...V.email != null && {
578
+ email: V.email
576
579
  },
577
- ...H.countryCode != null && {
578
- countryCode: H.countryCode
580
+ ...V.countryCode != null && {
581
+ countryCode: V.countryCode
579
582
  }
580
- }), _ = (H) => u.skipSignupDetails(H), t[50] = u, t[51] = _, t[52] = L) : (_ = t[51], L = t[52]);
583
+ }), _ = (V) => u.skipSignupDetails(V), t[50] = u, t[51] = _, t[52] = L) : (_ = t[51], L = t[52]);
581
584
  let B;
582
- return t[53] !== d.pendingFullName || t[54] !== _ || t[55] !== L ? (B = /* @__PURE__ */ V(si, { fullName: d.pendingFullName, collectField: "phone", layoutType: "standalone", variant: "mobile", onSubmit: L, onSkip: _ }), t[53] = d.pendingFullName, t[54] = _, t[55] = L, t[56] = B) : B = t[56], B;
585
+ return t[53] !== d.pendingFullName || t[54] !== _ || t[55] !== L ? (B = /* @__PURE__ */ H(si, { fullName: d.pendingFullName, collectField: "phone", layoutType: "standalone", variant: "mobile", onSubmit: L, onSkip: _ }), t[53] = d.pendingFullName, t[54] = _, t[55] = L, t[56] = B) : B = t[56], B;
583
586
  }
584
587
  let I;
585
588
  t[57] !== u ? (I = (_) => u.submitSignupDetails(_), t[57] = u, t[58] = I) : I = t[58];
586
589
  let F;
587
- return t[59] !== d.identifierType || t[60] !== d.pendingPhone || t[61] !== d.signupCollectField || t[62] !== d.userType || t[63] !== I ? (F = /* @__PURE__ */ V(ci, { userType: d.userType, loginMethod: d.identifierType, signupCollectField: d.signupCollectField, pendingPhone: d.pendingPhone, layoutType: "standalone", variant: "mobile", onSubmit: I }), t[59] = d.identifierType, t[60] = d.pendingPhone, t[61] = d.signupCollectField, t[62] = d.userType, t[63] = I, t[64] = F) : F = t[64], F;
590
+ return t[59] !== d.identifierType || t[60] !== d.pendingPhone || t[61] !== d.signupCollectField || t[62] !== d.userType || t[63] !== I ? (F = /* @__PURE__ */ H(ci, { userType: d.userType, loginMethod: d.identifierType, signupCollectField: d.signupCollectField, pendingPhone: d.pendingPhone, layoutType: "standalone", variant: "mobile", onSubmit: I }), t[59] = d.identifierType, t[60] = d.pendingPhone, t[61] = d.signupCollectField, t[62] = d.userType, t[63] = I, t[64] = F) : F = t[64], F;
588
591
  }
589
592
  case "LINK_OR_MERGE": {
590
593
  let b;
591
- return t[65] !== u || t[66] !== d.linkOrMerge ? (b = d.linkOrMerge ? /* @__PURE__ */ V(li, { details: d.linkOrMerge, onBack: () => u.goBack(), onContinue: () => u.continueLinkOrMerge(), onVerify: (I) => u.verifyLinkOrMerge(I), onResendCode: () => {
594
+ return t[65] !== u || t[66] !== d.linkOrMerge ? (b = d.linkOrMerge ? /* @__PURE__ */ H(li, { details: d.linkOrMerge, onBack: () => u.goBack(), onContinue: () => u.continueLinkOrMerge(), onVerify: (I) => u.verifyLinkOrMerge(I), onResendCode: () => {
592
595
  u.continueLinkOrMerge();
593
596
  } }) : null, t[65] = u, t[66] = d.linkOrMerge, t[67] = b) : b = t[67], b;
594
597
  }
@@ -596,11 +599,11 @@ function Mi(e) {
596
599
  let b, I;
597
600
  t[68] !== u ? (I = () => u.continueWithLastMethod(), b = () => u.reset(), t[68] = u, t[69] = b, t[70] = I) : (b = t[69], I = t[70]);
598
601
  let F;
599
- return t[71] !== d.lastMethod || t[72] !== b || t[73] !== I ? (F = /* @__PURE__ */ V(ui, { lastUsedMethod: d.lastMethod, layoutType: "withSlider", variant: "desktop", onContinueWithLastMethod: I, onUseAnotherMethod: b }), t[71] = d.lastMethod, t[72] = b, t[73] = I, t[74] = F) : F = t[74], F;
602
+ return t[71] !== d.lastMethod || t[72] !== b || t[73] !== I ? (F = /* @__PURE__ */ H(ui, { lastUsedMethod: d.lastMethod, layoutType: "withSlider", variant: "desktop", onContinueWithLastMethod: I, onUseAnotherMethod: b }), t[71] = d.lastMethod, t[72] = b, t[73] = I, t[74] = F) : F = t[74], F;
600
603
  }
601
604
  case "PROVIDER_PENDING": {
602
605
  let b;
603
- return t[75] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ V(nn, {}), t[75] = b) : b = t[75], b;
606
+ return t[75] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ H(nn, {}), t[75] = b) : b = t[75], b;
604
607
  }
605
608
  case "AUTHENTICATED":
606
609
  return null;
@@ -721,7 +724,7 @@ function ji() {
721
724
  }
722
725
  }
723
726
  }
724
- var m = u, b = l, I = d, F = o, _ = t, L = s, B = r, H = p, q = f, te = n, $e = a, J = i, Z = y, oe = !1;
727
+ var m = u, b = l, I = d, F = o, _ = t, L = s, B = r, V = p, q = f, te = n, $e = a, J = i, Z = y, oe = !1;
725
728
  function De(P) {
726
729
  return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), v(P) || S(P) === u;
727
730
  }
@@ -761,7 +764,7 @@ function ji() {
761
764
  function X(P) {
762
765
  return S(P) === y;
763
766
  }
764
- U.AsyncMode = m, U.ConcurrentMode = b, U.ContextConsumer = I, U.ContextProvider = F, U.Element = _, U.ForwardRef = L, U.Fragment = B, U.Lazy = H, U.Memo = q, U.Portal = te, U.Profiler = $e, U.StrictMode = J, U.Suspense = Z, U.isAsyncMode = De, U.isConcurrentMode = v, U.isContextConsumer = N, U.isContextProvider = M, U.isElement = R, U.isForwardRef = A, U.isFragment = D, U.isLazy = w, U.isMemo = x, U.isPortal = k, U.isProfiler = W, U.isStrictMode = j, U.isSuspense = X, U.isValidElementType = E, U.typeOf = S;
767
+ U.AsyncMode = m, U.ConcurrentMode = b, U.ContextConsumer = I, U.ContextProvider = F, U.Element = _, U.ForwardRef = L, U.Fragment = B, U.Lazy = V, U.Memo = q, U.Portal = te, U.Profiler = $e, U.StrictMode = J, U.Suspense = Z, U.isAsyncMode = De, U.isConcurrentMode = v, U.isContextConsumer = N, U.isContextProvider = M, U.isElement = R, U.isForwardRef = A, U.isFragment = D, U.isLazy = w, U.isMemo = x, U.isPortal = k, U.isProfiler = W, U.isStrictMode = j, U.isSuspense = X, U.isValidElementType = E, U.typeOf = S;
765
768
  })()), U;
766
769
  }
767
770
  var on;
@@ -916,7 +919,7 @@ function Bi() {
916
919
  objectOf: F,
917
920
  oneOf: I,
918
921
  oneOfType: _,
919
- shape: H,
922
+ shape: V,
920
923
  exact: q
921
924
  };
922
925
  function p(v, N) {
@@ -1083,7 +1086,7 @@ function Bi() {
1083
1086
  (v || "React class") + ": " + N + " type `" + M + "." + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + A + "`."
1084
1087
  );
1085
1088
  }
1086
- function H(v) {
1089
+ function V(v) {
1087
1090
  function N(M, R, A, D, w) {
1088
1091
  var x = M[R], k = J(x);
1089
1092
  if (k !== "object")
@@ -1244,7 +1247,7 @@ function Wi() {
1244
1247
  }, ct;
1245
1248
  }
1246
1249
  var $n;
1247
- function Hi() {
1250
+ function Vi() {
1248
1251
  if ($n) return je.exports;
1249
1252
  if ($n = 1, process.env.NODE_ENV !== "production") {
1250
1253
  var e = pr(), t = !0;
@@ -1253,8 +1256,8 @@ function Hi() {
1253
1256
  je.exports = /* @__PURE__ */ Wi()();
1254
1257
  return je.exports;
1255
1258
  }
1256
- var Vi = /* @__PURE__ */ Hi();
1257
- const h = /* @__PURE__ */ sr(Vi);
1259
+ var Hi = /* @__PURE__ */ Vi();
1260
+ const h = /* @__PURE__ */ sr(Hi);
1258
1261
  var ft = { exports: {} };
1259
1262
  var pn;
1260
1263
  function Ki() {
@@ -2225,7 +2228,7 @@ function Ga(e, t, n) {
2225
2228
  var r = new K(n);
2226
2229
  return r.selectNumberingPlan(t), r.numberingPlan.possibleLengths().indexOf(e.length) >= 0;
2227
2230
  }
2228
- var Wt = 2, Ua = 17, Ba = 3, Y = "0-90-9٠-٩۰-۹", Wa = "-‐-―−ー-", Ha = "//", Va = "..", Ka = "  ­​⁠ ", Ya = "()()[]\\[\\]", qa = "~⁓∼~", ee = "".concat(Wa).concat(Ha).concat(Va).concat(Ka).concat(Ya).concat(qa), nt = "++", Xa = new RegExp("([" + Y + "])");
2231
+ var Wt = 2, Ua = 17, Ba = 3, Y = "0-90-9٠-٩۰-۹", Wa = "-‐-―−ー-", Va = "//", Ha = "..", Ka = "  ­​⁠ ", Ya = "()()[]\\[\\]", qa = "~⁓∼~", ee = "".concat(Wa).concat(Va).concat(Ha).concat(Ka).concat(Ya).concat(qa), nt = "++", Xa = new RegExp("([" + Y + "])");
2229
2232
  function Cr(e, t, n, r) {
2230
2233
  if (t) {
2231
2234
  var i = new K(r);
@@ -2307,7 +2310,7 @@ function Pr(e, t) {
2307
2310
  return o;
2308
2311
  }
2309
2312
  }
2310
- function Ht(e, t) {
2313
+ function Vt(e, t) {
2311
2314
  var n = t.nationalNumber, r = t.metadata, i = r.getCountryCodesForCallingCode(e);
2312
2315
  if (i)
2313
2316
  return i.length === 1 ? i[0] : Pr(n, {
@@ -2322,7 +2325,7 @@ function Ct(e, t, n) {
2322
2325
  return {
2323
2326
  nationalNumber: e
2324
2327
  };
2325
- if (n.numberingPlan.possibleLengths() && (t || (t = Ht(n.numberingPlan.callingCode(), {
2328
+ if (n.numberingPlan.possibleLengths() && (t || (t = Vt(n.numberingPlan.callingCode(), {
2326
2329
  nationalNumber: a,
2327
2330
  metadata: n
2328
2331
  })), !Qa(a, t, n)))
@@ -2362,7 +2365,7 @@ function Nr(e, t, n, r, i) {
2362
2365
  number: e
2363
2366
  };
2364
2367
  }
2365
- function Vt(e, t, n, r, i) {
2368
+ function Ht(e, t, n, r, i) {
2366
2369
  if (!e)
2367
2370
  return {};
2368
2371
  var a;
@@ -2622,7 +2625,7 @@ var Ar = /* @__PURE__ */ (function() {
2622
2625
  var i = t;
2623
2626
  if (!Eo.test(i))
2624
2627
  throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
2625
- var a = Vt(i, void 0, void 0, void 0, r), o = a.countryCallingCode, d = a.number;
2628
+ var a = Ht(i, void 0, void 0, void 0, r), o = a.countryCallingCode, d = a.number;
2626
2629
  if (n = d, t = o, !n)
2627
2630
  throw new Error("Invalid `number` argument passed: too short");
2628
2631
  }
@@ -2976,7 +2979,7 @@ function wr(e, t, n) {
2976
2979
  }
2977
2980
  return _r(e);
2978
2981
  }
2979
- var Rr = "+", jo = "[\\-\\.\\(\\)]?", xn = "([" + Y + "]|" + jo + ")", Go = "^\\" + Rr + xn + "*[" + Y + "]" + xn + "*$", Uo = new RegExp(Go, "g"), St = Y, Bo = "[" + St + "]+((\\-)*[" + St + "])*", Wo = "a-zA-Z", Ho = "[" + Wo + "]+((\\-)*[" + St + "])*", Vo = "^(" + Bo + "\\.)*" + Ho + "\\.?$", Ko = new RegExp(Vo, "g"), Fn = "tel:", Tt = ";phone-context=", Yo = ";isub=";
2982
+ var Rr = "+", jo = "[\\-\\.\\(\\)]?", xn = "([" + Y + "]|" + jo + ")", Go = "^\\" + Rr + xn + "*[" + Y + "]" + xn + "*$", Uo = new RegExp(Go, "g"), St = Y, Bo = "[" + St + "]+((\\-)*[" + St + "])*", Wo = "a-zA-Z", Vo = "[" + Wo + "]+((\\-)*[" + St + "])*", Ho = "^(" + Bo + "\\.)*" + Vo + "\\.?$", Ko = new RegExp(Ho, "g"), Fn = "tel:", Tt = ";phone-context=", Yo = ";isub=";
2980
2983
  function qo(e) {
2981
2984
  var t = e.indexOf(Tt);
2982
2985
  if (t < 0)
@@ -3088,7 +3091,7 @@ function rd(e, t, n) {
3088
3091
  return n && (r.ext = n), r;
3089
3092
  }
3090
3093
  function id(e, t, n, r) {
3091
- var i = Vt(Et(e), void 0, t, n, r.metadata), a = i.countryCallingCodeSource, o = i.countryCallingCode, d = i.number, u;
3094
+ var i = Ht(Et(e), void 0, t, n, r.metadata), a = i.countryCallingCodeSource, o = i.countryCallingCode, d = i.number, u;
3092
3095
  if (o)
3093
3096
  r.selectNumberingPlan(o);
3094
3097
  else if (d && (t || n))
@@ -3099,7 +3102,7 @@ function id(e, t, n, r) {
3099
3102
  countryCallingCodeSource: a,
3100
3103
  countryCallingCode: o
3101
3104
  };
3102
- var l = Ct(Et(d), u, r), s = l.nationalNumber, y = l.carrierCode, c = Ht(o, {
3105
+ var l = Ct(Et(d), u, r), s = l.nationalNumber, y = l.carrierCode, c = Vt(o, {
3103
3106
  nationalNumber: s,
3104
3107
  metadata: r
3105
3108
  });
@@ -3459,7 +3462,7 @@ function Un(e, t) {
3459
3462
  return r;
3460
3463
  }
3461
3464
  var Q = "x", yt = new RegExp(Q);
3462
- function He(e, t) {
3465
+ function Ve(e, t) {
3463
3466
  if (t < 1)
3464
3467
  return "";
3465
3468
  for (var n = ""; t > 1; )
@@ -3607,9 +3610,9 @@ var Bd = /* @__PURE__ */ (function() {
3607
3610
  value: function(n) {
3608
3611
  if (!n)
3609
3612
  throw new Error("Pattern is required");
3610
- var r = n.match(Vd);
3613
+ var r = n.match(Hd);
3611
3614
  if (!r) {
3612
- if (Hd.test(n))
3615
+ if (Vd.test(n))
3613
3616
  throw new Error("Illegal characters found in a pattern: ".concat(n));
3614
3617
  this.getContext().instructions = this.getContext().instructions.concat(n.split(""));
3615
3618
  return;
@@ -3678,14 +3681,14 @@ function Wd(e) {
3678
3681
  }
3679
3682
  return t;
3680
3683
  }
3681
- var Hd = /[\(\)\[\]\?\:\|]/, Vd = new RegExp(
3684
+ var Vd = /[\(\)\[\]\?\:\|]/, Hd = new RegExp(
3682
3685
  // any of:
3683
3686
  "(\\||\\(\\?\\:|\\)|\\[|\\])"
3684
3687
  );
3685
3688
  function gt(e) {
3686
3689
  return e.length === 1 ? e[0] : e;
3687
3690
  }
3688
- function Hn(e, t) {
3691
+ function Vn(e, t) {
3689
3692
  var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
3690
3693
  if (n) return (n = n.call(e)).next.bind(n);
3691
3694
  if (Array.isArray(e) || (n = Kd(e)) || t) {
@@ -3700,12 +3703,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3700
3703
  }
3701
3704
  function Kd(e, t) {
3702
3705
  if (e) {
3703
- if (typeof e == "string") return Vn(e, t);
3706
+ if (typeof e == "string") return Hn(e, t);
3704
3707
  var n = {}.toString.call(e).slice(8, -1);
3705
- return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Vn(e, t) : void 0;
3708
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Hn(e, t) : void 0;
3706
3709
  }
3707
3710
  }
3708
- function Vn(e, t) {
3711
+ function Hn(e, t) {
3709
3712
  (t == null || t > e.length) && (t = e.length);
3710
3713
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
3711
3714
  return r;
@@ -3812,7 +3815,7 @@ function Ot(e, t, n) {
3812
3815
  }
3813
3816
  switch (t.op) {
3814
3817
  case "|":
3815
- for (var u, l = Hn(t.args), s; !(s = l()).done; ) {
3818
+ for (var u, l = Vn(t.args), s; !(s = l()).done; ) {
3816
3819
  var y = s.value, c = Ot(e, y, n);
3817
3820
  if (c) {
3818
3821
  if (c.overflow)
@@ -3834,7 +3837,7 @@ function Ot(e, t, n) {
3834
3837
  // matchedChars: ...
3835
3838
  } : void 0;
3836
3839
  case "[]":
3837
- for (var f = Hn(t.args), p; !(p = f()).done; ) {
3840
+ for (var f = Vn(t.args), p; !(p = f()).done; ) {
3838
3841
  var g = p.value;
3839
3842
  if (e[0] === g)
3840
3843
  return e.length === 1 ? {
@@ -3912,7 +3915,7 @@ function iu(e, t) {
3912
3915
  }
3913
3916
  return String(e);
3914
3917
  }
3915
- var It = "9", au = 15, ou = He(It, au), du = /[- ]/, uu = function() {
3918
+ var It = "9", au = 15, ou = Ve(It, au), du = /[- ]/, uu = function() {
3916
3919
  return /\[([^\[\]])*\]/g;
3917
3920
  }, lu = function() {
3918
3921
  return /\d(?=[^,}][^,}])/g;
@@ -4052,7 +4055,7 @@ var It = "9", au = 15, ou = He(It, au), du = /[- ]/, uu = function() {
4052
4055
  }, {
4053
4056
  key: "setNationalNumberTemplate",
4054
4057
  value: function(n, r) {
4055
- this.nationalNumberTemplate = n, this.populatedNationalNumberTemplate = n, this.populatedNationalNumberTemplatePosition = -1, r.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(r).replace(/[\d\+]/g, Q) + He(Q, r.callingCode.length) + " " + n : this.template = n;
4058
+ this.nationalNumberTemplate = n, this.populatedNationalNumberTemplate = n, this.populatedNationalNumberTemplatePosition = -1, r.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(r).replace(/[\d\+]/g, Q) + Ve(Q, r.callingCode.length) + " " + n : this.template = n;
4056
4059
  }
4057
4060
  /**
4058
4061
  * Generates formatting template for a national phone number,
@@ -4081,7 +4084,7 @@ var It = "9", au = 15, ou = He(It, au), du = /[- ]/, uu = function() {
4081
4084
  c = c.replace(/\d/, Q), g--;
4082
4085
  }
4083
4086
  var $ = l.replace(new RegExp(u), c).replace(new RegExp(It, "g"), Q);
4084
- return f || (d ? $ = He(Q, d.length) + " " + $ : o && ($ = He(Q, o.length) + this.getSeparatorAfterNationalPrefix(n) + $)), a && ($ = Er($)), $;
4087
+ return f || (d ? $ = Ve(Q, d.length) + " " + $ : o && ($ = Ve(Q, o.length) + this.getSeparatorAfterNationalPrefix(n) + $)), a && ($ = Er($)), $;
4085
4088
  }
4086
4089
  }
4087
4090
  }, {
@@ -4223,7 +4226,7 @@ var Cu = "[" + ee + Y + "]+", Pu = new RegExp("^" + Cu + "$", "i"), Nu = "(?:["
4223
4226
  }, {
4224
4227
  key: "extractCountryCallingCode",
4225
4228
  value: function(n) {
4226
- var r = Vt("+" + n.getDigitsWithoutInternationalPrefix(), n.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), i = r.countryCallingCode, a = r.number;
4229
+ var r = Ht("+" + n.getDigitsWithoutInternationalPrefix(), n.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), i = r.countryCallingCode, a = r.number;
4227
4230
  if (i)
4228
4231
  return n.setCallingCode(i), n.update({
4229
4232
  nationalSignificantNumber: a
@@ -4600,7 +4603,7 @@ var Pe = /* @__PURE__ */ (function() {
4600
4603
  }, {
4601
4604
  key: "determineTheCountry",
4602
4605
  value: function() {
4603
- this.state.setCountry(Ht(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {
4606
+ this.state.setCountry(Vt(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {
4604
4607
  nationalNumber: this.state.nationalSignificantNumber,
4605
4608
  metadata: this.metadata
4606
4609
  }));
@@ -4739,7 +4742,7 @@ function Uu(e, t, n) {
4739
4742
  function Lr(e) {
4740
4743
  var t = e.onKeyDown, n = e.inputFormat;
4741
4744
  return ue(function(r) {
4742
- if (r.keyCode === Wu && n === "INTERNATIONAL" && r.target instanceof HTMLInputElement && Bu(r.target) === Hu.length) {
4745
+ if (r.keyCode === Wu && n === "INTERNATIONAL" && r.target instanceof HTMLInputElement && Bu(r.target) === Vu.length) {
4743
4746
  r.preventDefault();
4744
4747
  return;
4745
4748
  }
@@ -4749,7 +4752,7 @@ function Lr(e) {
4749
4752
  function Bu(e) {
4750
4753
  return e.selectionStart;
4751
4754
  }
4752
- var Wu = 8, Hu = "+", Vu = ["onKeyDown", "country", "inputFormat", "metadata", "international", "withCountryCallingCode"];
4755
+ var Wu = 8, Vu = "+", Hu = ["onKeyDown", "country", "inputFormat", "metadata", "international", "withCountryCallingCode"];
4753
4756
  function _t() {
4754
4757
  return _t = Object.assign ? Object.assign.bind() : function(e) {
4755
4758
  for (var t = 1; t < arguments.length; t++) {
@@ -4781,7 +4784,7 @@ function qu(e) {
4781
4784
  function t(n, r) {
4782
4785
  var i = n.onKeyDown, a = n.country, o = n.inputFormat, d = n.metadata, u = d === void 0 ? e : d;
4783
4786
  n.international, n.withCountryCallingCode;
4784
- var l = Ku(n, Vu), s = ue(function(c) {
4787
+ var l = Ku(n, Hu), s = ue(function(c) {
4785
4788
  var f = new Pe(a, u), p = Mr({
4786
4789
  inputFormat: o,
4787
4790
  country: a,
@@ -5012,7 +5015,7 @@ function kr(e) {
5012
5015
  var l = u.target.value;
5013
5016
  n(l === "ZZ" ? void 0 : l);
5014
5017
  }, [n]);
5015
- return Ve(function() {
5018
+ return He(function() {
5016
5019
  return Gr(r, t);
5017
5020
  }, [r, t]), /* @__PURE__ */ T.createElement("select", Ze({}, o, {
5018
5021
  disabled: i || a,
@@ -5062,7 +5065,7 @@ var dl = {
5062
5065
  function jr(e) {
5063
5066
  var t = e.value, n = e.options, r = e.className, i = e.iconComponent;
5064
5067
  e.getIconAspectRatio;
5065
- var a = e.arrowComponent, o = a === void 0 ? ul : a, d = e.unicodeFlags, u = Dr(e, rl), l = Ve(function() {
5068
+ var a = e.arrowComponent, o = a === void 0 ? ul : a, d = e.unicodeFlags, u = Dr(e, rl), l = He(function() {
5066
5069
  return Gr(n, t);
5067
5070
  }, [n, t]);
5068
5071
  return /* @__PURE__ */ T.createElement("div", {
@@ -5355,7 +5358,7 @@ function Cl(e, t) {
5355
5358
  function it(e, t) {
5356
5359
  return hr(e, t) ? !0 : (console.error("Country not found: ".concat(e)), !1);
5357
5360
  }
5358
- function Hr(e, t) {
5361
+ function Vr(e, t) {
5359
5362
  return e && (e = e.filter(function(n) {
5360
5363
  return it(n, t);
5361
5364
  }), e.length === 0 && (e = void 0)), e;
@@ -5388,7 +5391,7 @@ function El(e, t) {
5388
5391
  i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
5389
5392
  return n;
5390
5393
  }
5391
- function Vr(e) {
5394
+ function Hr(e) {
5392
5395
  var t = e.flags, n = e.flagUrl, r = e.flagComponent, i = e.internationalIcon;
5393
5396
  function a(o) {
5394
5397
  var d = o.country, u = o.label, l = o.aspectRatio, s = Nl(o, Pl), y = i === rt ? l : void 0;
@@ -5415,7 +5418,7 @@ function Vr(e) {
5415
5418
  aspectRatio: h.number
5416
5419
  }, a;
5417
5420
  }
5418
- Vr({
5421
+ Hr({
5419
5422
  // Must be equal to `defaultProps.flagUrl` in `./PhoneInputWithCountry.js`.
5420
5423
  flagUrl: "https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",
5421
5424
  flagComponent: Yt,
@@ -5745,7 +5748,7 @@ function Bl(e, t, n) {
5745
5748
  var m, b;
5746
5749
  if (o) {
5747
5750
  o && Wr(o), m = qr(o, r);
5748
- var I = Hr(i, r);
5751
+ var I = Vr(i, r);
5749
5752
  m && m.country ? (!I || I.indexOf(m.country) >= 0) && (b = m.country) : (b = Xr(o, {
5750
5753
  country: void 0,
5751
5754
  countries: I,
@@ -5819,9 +5822,9 @@ function ve() {
5819
5822
  return e;
5820
5823
  }, ve.apply(this, arguments);
5821
5824
  }
5822
- function Hl(e, t) {
5825
+ function Vl(e, t) {
5823
5826
  if (e == null) return {};
5824
- var n = Vl(e, t), r, i;
5827
+ var n = Hl(e, t), r, i;
5825
5828
  if (Object.getOwnPropertySymbols) {
5826
5829
  var a = Object.getOwnPropertySymbols(e);
5827
5830
  for (i = 0; i < a.length; i++)
@@ -5829,7 +5832,7 @@ function Hl(e, t) {
5829
5832
  }
5830
5833
  return n;
5831
5834
  }
5832
- function Vl(e, t) {
5835
+ function Hl(e, t) {
5833
5836
  if (e == null) return {};
5834
5837
  var n = {}, r = Object.keys(e), i, a;
5835
5838
  for (a = 0; a < r.length; a++)
@@ -5933,9 +5936,9 @@ var Ql = /* @__PURE__ */ (function(e) {
5933
5936
  S(L);
5934
5937
  });
5935
5938
  }), z(r, "onChange", function($) {
5936
- var C = r.props, O = C.defaultCountry, E = C.onChange, S = C.addInternationalOption, m = C.international, b = C.limitMaxLength, I = C.countryCallingCodeEditable, F = C.metadata, _ = r.state, L = _.countries, B = _.phoneDigits, H = _.country, q = _.latestCountrySelectedByUser, te = Ml($, {
5939
+ var C = r.props, O = C.defaultCountry, E = C.onChange, S = C.addInternationalOption, m = C.international, b = C.limitMaxLength, I = C.countryCallingCodeEditable, F = C.metadata, _ = r.state, L = _.countries, B = _.phoneDigits, V = _.country, q = _.latestCountrySelectedByUser, te = Ml($, {
5937
5940
  prevPhoneDigits: B,
5938
- country: H,
5941
+ country: V,
5939
5942
  countryRequired: !S,
5940
5943
  defaultCountry: O,
5941
5944
  latestCountrySelectedByUser: q,
@@ -5997,9 +6000,9 @@ var Ql = /* @__PURE__ */ (function(e) {
5997
6000
  var i = r.props, a = i.value;
5998
6001
  i.labels;
5999
6002
  var o = i.international, d = i.addInternationalOption, u = i.displayInitialValueAsLocalNumber, l = i.initialValueFormat, s = i.metadata, y = r.props, c = y.defaultCountry, f = y.countries;
6000
- c && (r.isCountrySupportedWithError(c) || (c = void 0)), a && Wr(a), f = Hr(f, s);
6003
+ c && (r.isCountrySupportedWithError(c) || (c = void 0)), a && Wr(a), f = Vr(f, s);
6001
6004
  var p = qr(a, s);
6002
- r.CountryIcon = Vr(r.props);
6005
+ r.CountryIcon = Hr(r.props);
6003
6006
  var g = Al({
6004
6007
  value: a,
6005
6008
  phoneNumber: p,
@@ -6103,7 +6106,7 @@ var Ql = /* @__PURE__ */ (function(e) {
6103
6106
  r.flags, r.flagComponent, r.flagUrl, r.addInternationalOption, r.internationalIcon, r.displayInitialValueAsLocalNumber, r.initialValueFormat, r.onCountryChange, r.limitMaxLength, r.countryCallingCodeEditable, r.focusInputOnCountrySelection, r.reset;
6104
6107
  var O = r.metadata, E = r.international;
6105
6108
  r.locales;
6106
- var S = Hl(r, Wl), m = this.state, b = m.country, I = m.countries, F = m.phoneDigits, _ = m.isFocused, L = c ? Xu : el, B = this.getCountrySelectOptions({
6109
+ var S = Vl(r, Wl), m = this.state, b = m.country, I = m.countries, F = m.phoneDigits, _ = m.isFocused, L = c ? Xu : el, B = this.getCountrySelectOptions({
6107
6110
  countries: I
6108
6111
  });
6109
6112
  return /* @__PURE__ */ T.createElement(g, ve({
@@ -7119,7 +7122,7 @@ function v1({
7119
7122
  });
7120
7123
  });
7121
7124
  }, [i.step, r]);
7122
- const d = Ve(() => {
7125
+ const d = He(() => {
7123
7126
  const l = () => n.current.apiAdapter, s = (c) => n.current.onAuthError?.(c), y = (c, f) => {
7124
7127
  const p = f1(c, f);
7125
7128
  if (!p) return !1;
@@ -7512,7 +7515,11 @@ function v1({
7512
7515
  f.isNewUser && a({
7513
7516
  type: "SET_STEP_SIGNUP_DETAILS",
7514
7517
  userType: "INDIAN",
7515
- signupCollectField: "email"
7518
+ signupCollectField: "phone",
7519
+ signupOrigin: "sso",
7520
+ identifierType: "email",
7521
+ identifierValue: f.prefilledEmail ?? "",
7522
+ prefilledFullName: f.prefilledFullName ?? ""
7516
7523
  });
7517
7524
  }).catch(() => s({
7518
7525
  code: "PROVIDER_AUTH_FAILED"
@@ -7605,29 +7612,29 @@ function v1({
7605
7612
  });
7606
7613
  }
7607
7614
  };
7608
- }, [i.identifierType, i.identifierValue, i.step, i.lastMethod, i.userType, i.pendingFullName, i.pendingEmail, i.pendingPhone, i.linkOrMerge, o]), u = Ve(() => ({
7615
+ }, [i.identifierType, i.identifierValue, i.step, i.lastMethod, i.userType, i.pendingFullName, i.pendingEmail, i.pendingPhone, i.linkOrMerge, o]), u = He(() => ({
7609
7616
  state: i,
7610
7617
  actions: d,
7611
7618
  session: i.step === "AUTHENTICATED" ? i.session : null,
7612
7619
  isLoading: i.step === "CHECKING_SESSION",
7613
7620
  providerConfig: e.providers
7614
7621
  }), [i, d, e.providers]);
7615
- return /* @__PURE__ */ V(Gt.Provider, { value: u, children: t });
7622
+ return /* @__PURE__ */ H(Gt.Provider, { value: u, children: t });
7616
7623
  }
7617
7624
  function b1() {
7618
7625
  const e = fe.c(1);
7619
7626
  let t;
7620
- return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ V(Mi, {}), e[0] = t) : t = e[0], t;
7627
+ return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ H(Mi, {}), e[0] = t) : t = e[0], t;
7621
7628
  }
7622
7629
  function C1(e) {
7623
7630
  const t = fe.c(2);
7624
7631
  let n;
7625
- return t[0] !== e ? (n = /* @__PURE__ */ V(cr.Preset, { preset: "signup", children: /* @__PURE__ */ V(gi, { ...e }) }), t[0] = e, t[1] = n) : n = t[1], n;
7632
+ return t[0] !== e ? (n = /* @__PURE__ */ H(cr.Preset, { preset: "signup", children: /* @__PURE__ */ H(gi, { ...e }) }), t[0] = e, t[1] = n) : n = t[1], n;
7626
7633
  }
7627
7634
  function P1(e) {
7628
7635
  const t = fe.c(2);
7629
7636
  let n;
7630
- return t[0] !== e ? (n = /* @__PURE__ */ V(cr.Preset, { preset: "verification", children: /* @__PURE__ */ V(yi, { ...e }) }), t[0] = e, t[1] = n) : n = t[1], n;
7637
+ return t[0] !== e ? (n = /* @__PURE__ */ H(cr.Preset, { preset: "verification", children: /* @__PURE__ */ H(yi, { ...e }) }), t[0] = e, t[1] = n) : n = t[1], n;
7631
7638
  }
7632
7639
  const x1 = {
7633
7640
  Provider: v1,
@@ -7654,10 +7661,10 @@ export {
7654
7661
  B1 as MainLayout,
7655
7662
  W1 as MainLogin,
7656
7663
  $i as MainLoginPage,
7657
- H1 as OTP_LENGTH,
7664
+ V1 as OTP_LENGTH,
7658
7665
  yi as OtpVerification,
7659
7666
  fi as OtpVerificationPage,
7660
- V1 as RESEND_COOLDOWN_EMAIL_SECONDS,
7667
+ H1 as RESEND_COOLDOWN_EMAIL_SECONDS,
7661
7668
  K1 as RESEND_COOLDOWN_PHONE_SECONDS,
7662
7669
  Y1 as RepeatLogin,
7663
7670
  ui as RepeatLoginPage,
@@ -1,6 +1,6 @@
1
1
  import type { WelcomeSignupPageFullProps } from '../../types';
2
2
  /**
3
- * Welcome signup page for Indian users who verified email and are adding a phone.
3
+ * Welcome signup page for new SSO users (Google/Apple) adding an optional phone.
4
4
  * Matches the Figma "Welcome to Docthub using email" responsive layout.
5
5
  */
6
6
  export declare function WelcomeSignupPage(props: Readonly<WelcomeSignupPageFullProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import type { WelcomeSignupPageProps } from '../../types';
2
2
  /**
3
- * Welcome signup form shown after email login when collecting a phone number.
3
+ * Welcome signup form shown after SSO signup when optionally collecting a phone number.
4
4
  * Displays the user's name with an edit sheet and a phone input.
5
5
  */
6
6
  export declare function WelcomeSignup(props: Readonly<WelcomeSignupPageProps>): import("react/jsx-runtime").JSX.Element;
@@ -49,6 +49,10 @@ export interface VerifyOtpResponse {
49
49
  isNewUser: boolean;
50
50
  /** When isNewUser and conflict (e.g. email already linked), masked linked identifier. */
51
51
  conflict?: AuthError;
52
+ /** Name from verify-otp / SSO for new-user profile completion. */
53
+ prefilledFullName?: string;
54
+ /** Verified email from SSO for new-user profile completion. */
55
+ prefilledEmail?: string;
52
56
  }
53
57
  /** Input for completeProfile (new users). */
54
58
  export interface CompleteProfileParams {
@@ -60,6 +60,8 @@ export interface AuthFlowState {
60
60
  maskedRecipient: string;
61
61
  /** For SIGNUP_DETAILS (Indian): which field to collect (phone or email). */
62
62
  signupCollectField: IdentifierType;
63
+ /** When set to `sso`, SIGNUP_DETAILS uses the optional WelcomeSignup phone step. */
64
+ signupOrigin?: 'sso';
63
65
  /** For REPEAT_LOGIN: last used method label. */
64
66
  lastMethod: string;
65
67
  /** Set when step is AUTHENTICATED. */
@@ -109,6 +111,8 @@ export type AuthFlowAction = {
109
111
  maskedRecipient?: string;
110
112
  /** Prefilled name for welcome signup variant. */
111
113
  prefilledFullName?: string;
114
+ /** When `sso`, show WelcomeSignupPage (optional phone) instead of SignupPage. */
115
+ signupOrigin?: 'sso';
112
116
  } | ({
113
117
  type: 'SET_STEP_LINK_OR_MERGE';
114
118
  } & LinkOrMergeSetupPayload) | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doct-ui-auth-kit",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Composable React auth SDK – layouts, login/signup/OTP pages, SSO provider, and auth flow hooks for Docthub",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",