@flopay/react 0.5.11 → 0.5.13

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
@@ -576,4 +576,36 @@ interface FloPayAutomaticPaymentButtonProps extends Omit<React.ButtonHTMLAttribu
576
576
  }
577
577
  declare function FloPayAutomaticPaymentButton({ sessionId, createSession, paymentMethodId, checkoutMethod, clientId, items, subscriptions, account, successUrl, cancelUrl, couponCodes, tagsData, utmMetadata, billingApiUrl, locale, buttonsTheme, buttonsStyles: stylesOverride, onSuccess, onError, onDecline, children, disabled, type, style, ...buttonProps }: FloPayAutomaticPaymentButtonProps): react_jsx_runtime.JSX.Element;
578
578
 
579
- export { AddressElement, CardCvcElement, CardElement, CardExpiryElement, CardNumberElement, CheckoutForm, type CheckoutFormProps, type CheckoutFormRef, type CheckoutState, type ElementComponentProps, FloPayAutomaticPaymentButton, type FloPayAutomaticPaymentButtonProps, type FloPayAutomaticPaymentSuccessEvent, FloPayCheckout, type FloPayCheckoutProps, FloPayProvider, type FloPayProviderProps, PayPalButton, type PayPalButtonProps, PaymentElement, SplitCardForm, type SplitCardFormProps, type SplitCardFormRef, useCheckout, useElements, useFloPay, usePayPalFloPay };
579
+ interface InAppBrowserNoticeProps {
580
+ /** Custom message override. Defaults to a generic, non-platform-specific copy. */
581
+ message?: React.ReactNode;
582
+ /** Custom button label. Defaults to "Open in browser" / "Link copied". */
583
+ openButtonLabel?: string;
584
+ copiedButtonLabel?: string;
585
+ /** Custom CSS overrides for the container, message, and button. */
586
+ containerStyle?: React.CSSProperties;
587
+ buttonStyle?: React.CSSProperties;
588
+ /** Called when the user clicks the open-in-browser button. */
589
+ onOpenInBrowser?: (result: {
590
+ opened: boolean;
591
+ copied: boolean;
592
+ }) => void;
593
+ }
594
+ /**
595
+ * Non-disruptive notice rendered when PayPal and digital wallets fail to load
596
+ * — typically because the buyer is in an in-app browser (Instagram, Facebook,
597
+ * TikTok, etc.) or behind an ad-blocker. The card form remains fully
598
+ * functional; this notice just informs the buyer about the unavailable
599
+ * methods and offers a one-click attempt to relaunch in the device browser.
600
+ *
601
+ * The "Open in browser" button is best-effort:
602
+ * - Tries `window.open(url, '_blank')` first (works in some webviews).
603
+ * - Falls back to copying the URL to clipboard so the buyer can paste it
604
+ * into Safari/Chrome themselves.
605
+ *
606
+ * No reliable cross-platform JS API exists to *force* an in-app webview to
607
+ * defer to the system browser, so we don't pretend otherwise.
608
+ */
609
+ declare function InAppBrowserNotice({ message, openButtonLabel, copiedButtonLabel, containerStyle, buttonStyle, onOpenInBrowser, }: InAppBrowserNoticeProps): react_jsx_runtime.JSX.Element;
610
+
611
+ export { AddressElement, CardCvcElement, CardElement, CardExpiryElement, CardNumberElement, CheckoutForm, type CheckoutFormProps, type CheckoutFormRef, type CheckoutState, type ElementComponentProps, FloPayAutomaticPaymentButton, type FloPayAutomaticPaymentButtonProps, type FloPayAutomaticPaymentSuccessEvent, FloPayCheckout, type FloPayCheckoutProps, FloPayProvider, type FloPayProviderProps, InAppBrowserNotice, type InAppBrowserNoticeProps, PayPalButton, type PayPalButtonProps, PaymentElement, SplitCardForm, type SplitCardFormProps, type SplitCardFormRef, useCheckout, useElements, useFloPay, usePayPalFloPay };
package/dist/index.d.ts CHANGED
@@ -576,4 +576,36 @@ interface FloPayAutomaticPaymentButtonProps extends Omit<React.ButtonHTMLAttribu
576
576
  }
577
577
  declare function FloPayAutomaticPaymentButton({ sessionId, createSession, paymentMethodId, checkoutMethod, clientId, items, subscriptions, account, successUrl, cancelUrl, couponCodes, tagsData, utmMetadata, billingApiUrl, locale, buttonsTheme, buttonsStyles: stylesOverride, onSuccess, onError, onDecline, children, disabled, type, style, ...buttonProps }: FloPayAutomaticPaymentButtonProps): react_jsx_runtime.JSX.Element;
578
578
 
579
- export { AddressElement, CardCvcElement, CardElement, CardExpiryElement, CardNumberElement, CheckoutForm, type CheckoutFormProps, type CheckoutFormRef, type CheckoutState, type ElementComponentProps, FloPayAutomaticPaymentButton, type FloPayAutomaticPaymentButtonProps, type FloPayAutomaticPaymentSuccessEvent, FloPayCheckout, type FloPayCheckoutProps, FloPayProvider, type FloPayProviderProps, PayPalButton, type PayPalButtonProps, PaymentElement, SplitCardForm, type SplitCardFormProps, type SplitCardFormRef, useCheckout, useElements, useFloPay, usePayPalFloPay };
579
+ interface InAppBrowserNoticeProps {
580
+ /** Custom message override. Defaults to a generic, non-platform-specific copy. */
581
+ message?: React.ReactNode;
582
+ /** Custom button label. Defaults to "Open in browser" / "Link copied". */
583
+ openButtonLabel?: string;
584
+ copiedButtonLabel?: string;
585
+ /** Custom CSS overrides for the container, message, and button. */
586
+ containerStyle?: React.CSSProperties;
587
+ buttonStyle?: React.CSSProperties;
588
+ /** Called when the user clicks the open-in-browser button. */
589
+ onOpenInBrowser?: (result: {
590
+ opened: boolean;
591
+ copied: boolean;
592
+ }) => void;
593
+ }
594
+ /**
595
+ * Non-disruptive notice rendered when PayPal and digital wallets fail to load
596
+ * — typically because the buyer is in an in-app browser (Instagram, Facebook,
597
+ * TikTok, etc.) or behind an ad-blocker. The card form remains fully
598
+ * functional; this notice just informs the buyer about the unavailable
599
+ * methods and offers a one-click attempt to relaunch in the device browser.
600
+ *
601
+ * The "Open in browser" button is best-effort:
602
+ * - Tries `window.open(url, '_blank')` first (works in some webviews).
603
+ * - Falls back to copying the URL to clipboard so the buyer can paste it
604
+ * into Safari/Chrome themselves.
605
+ *
606
+ * No reliable cross-platform JS API exists to *force* an in-app webview to
607
+ * defer to the system browser, so we don't pretend otherwise.
608
+ */
609
+ declare function InAppBrowserNotice({ message, openButtonLabel, copiedButtonLabel, containerStyle, buttonStyle, onOpenInBrowser, }: InAppBrowserNoticeProps): react_jsx_runtime.JSX.Element;
610
+
611
+ export { AddressElement, CardCvcElement, CardElement, CardExpiryElement, CardNumberElement, CheckoutForm, type CheckoutFormProps, type CheckoutFormRef, type CheckoutState, type ElementComponentProps, FloPayAutomaticPaymentButton, type FloPayAutomaticPaymentButtonProps, type FloPayAutomaticPaymentSuccessEvent, FloPayCheckout, type FloPayCheckoutProps, FloPayProvider, type FloPayProviderProps, InAppBrowserNotice, type InAppBrowserNoticeProps, PayPalButton, type PayPalButtonProps, PaymentElement, SplitCardForm, type SplitCardFormProps, type SplitCardFormRef, useCheckout, useElements, useFloPay, usePayPalFloPay };