@swype-org/react-sdk 0.1.221 → 0.1.222

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.d.cts CHANGED
@@ -507,7 +507,6 @@ interface BlinkPaymentProps {
507
507
  merchantName?: string;
508
508
  onBack?: () => void;
509
509
  onDismiss?: () => void;
510
- autoCloseSeconds?: number;
511
510
  }
512
511
  declare function BlinkPayment(props: BlinkPaymentProps): react_jsx_runtime.JSX.Element;
513
512
 
package/dist/index.d.ts CHANGED
@@ -507,7 +507,6 @@ interface BlinkPaymentProps {
507
507
  merchantName?: string;
508
508
  onBack?: () => void;
509
509
  onDismiss?: () => void;
510
- autoCloseSeconds?: number;
511
510
  }
512
511
  declare function BlinkPayment(props: BlinkPaymentProps): react_jsx_runtime.JSX.Element;
513
512
 
package/dist/index.js CHANGED
@@ -4485,41 +4485,14 @@ function SuccessScreen({
4485
4485
  onLogout,
4486
4486
  onIncreaseLimits,
4487
4487
  onManageAccount,
4488
- onPreauthorize,
4489
- autoCloseSeconds
4488
+ onPreauthorize
4490
4489
  }) {
4491
4490
  const { tokens } = useBlinkConfig();
4492
- const effectiveAutoClose = succeeded ? autoCloseSeconds : void 0;
4493
- const [countdown, setCountdown] = useState(effectiveAutoClose ?? 0);
4494
- const doneCalledRef = useRef(false);
4495
- const handleDone = useCallback(() => {
4496
- if (doneCalledRef.current) return;
4497
- doneCalledRef.current = true;
4498
- onDone();
4499
- }, [onDone]);
4500
- useEffect(() => {
4501
- if (!effectiveAutoClose || effectiveAutoClose <= 0) return;
4502
- const intervalId = window.setInterval(() => {
4503
- setCountdown((prev) => {
4504
- if (prev <= 1) {
4505
- window.clearInterval(intervalId);
4506
- return 0;
4507
- }
4508
- return prev - 1;
4509
- });
4510
- }, 1e3);
4511
- return () => window.clearInterval(intervalId);
4512
- }, [effectiveAutoClose]);
4513
- useEffect(() => {
4514
- if (effectiveAutoClose && countdown === 0) {
4515
- handleDone();
4516
- }
4517
- }, [effectiveAutoClose, countdown, handleDone]);
4518
4491
  return /* @__PURE__ */ jsxs(
4519
4492
  ScreenLayout,
4520
4493
  {
4521
4494
  footer: /* @__PURE__ */ jsxs(Fragment, { children: [
4522
- /* @__PURE__ */ jsx(PrimaryButton, { onClick: handleDone, children: succeeded ? "Done" : "Try again" }),
4495
+ /* @__PURE__ */ jsx(PrimaryButton, { onClick: onDone, children: succeeded ? "Done" : "Try again" }),
4523
4496
  succeeded && onPreauthorize && /* @__PURE__ */ jsx(
4524
4497
  "button",
4525
4498
  {
@@ -4529,11 +4502,6 @@ function SuccessScreen({
4529
4502
  children: "Preauthorize future transfers"
4530
4503
  }
4531
4504
  ),
4532
- effectiveAutoClose != null && effectiveAutoClose > 0 && /* @__PURE__ */ jsxs("p", { style: countdownStyle(tokens.textMuted), children: [
4533
- "Returning to app in ",
4534
- countdown,
4535
- "s\u2026"
4536
- ] }),
4537
4505
  onManageAccount && /* @__PURE__ */ jsx("button", { type: "button", onClick: onManageAccount, style: manageStyle(tokens.textMuted), children: "Manage Blink account \u2192" }),
4538
4506
  /* @__PURE__ */ jsx(PoweredByFooter, {})
4539
4507
  ] }),
@@ -4671,12 +4639,6 @@ var preauthorizeStyle = (accentColor, borderColor) => ({
4671
4639
  cursor: "pointer",
4672
4640
  fontFamily: "inherit"
4673
4641
  });
4674
- var countdownStyle = (color) => ({
4675
- fontSize: "0.82rem",
4676
- color,
4677
- margin: "10px 0 0",
4678
- textAlign: "center"
4679
- });
4680
4642
  var manageStyle = (color) => ({
4681
4643
  background: "transparent",
4682
4644
  border: "none",
@@ -5872,7 +5834,6 @@ function StepRendererContent({
5872
5834
  merchantName,
5873
5835
  onBack,
5874
5836
  onDismiss,
5875
- autoCloseSeconds,
5876
5837
  depositAmount,
5877
5838
  handlers
5878
5839
  }) {
@@ -6149,8 +6110,7 @@ function StepRendererContent({
6149
6110
  })() : void 0,
6150
6111
  onDone: onDismiss ?? handlers.onNewPayment,
6151
6112
  onLogout: handlers.onLogout,
6152
- onPreauthorize: state.isGuestFlow ? handlers.onPreauthorize : void 0,
6153
- autoCloseSeconds
6113
+ onPreauthorize: state.isGuestFlow ? handlers.onPreauthorize : void 0
6154
6114
  }
6155
6115
  );
6156
6116
  }
@@ -8426,8 +8386,7 @@ function BlinkPaymentInner({
8426
8386
  merchantAuthorization,
8427
8387
  merchantName,
8428
8388
  onBack,
8429
- onDismiss,
8430
- autoCloseSeconds
8389
+ onDismiss
8431
8390
  }) {
8432
8391
  const { apiBaseUrl, depositAmount } = useBlinkConfig();
8433
8392
  const { ready, authenticated, logout, getAccessToken } = usePrivy();
@@ -8683,7 +8642,6 @@ function BlinkPaymentInner({
8683
8642
  merchantName,
8684
8643
  onBack,
8685
8644
  onDismiss,
8686
- autoCloseSeconds,
8687
8645
  depositAmount,
8688
8646
  handlers
8689
8647
  }