@lydianpay/sdk-web 3.8.0 → 3.10.0

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.
Files changed (25) hide show
  1. package/README.md +5 -4
  2. package/dist/chunks/{index-ENtoRsTd.js → index-6NJ8eaaA.js} +15 -11
  3. package/dist/chunks/{index-D83gDNdH.js → index-CKnuB_nz.js} +1 -1
  4. package/dist/chunks/{metamask-sdk-Bb7iLFk7.js → metamask-sdk-D7OTwvM8.js} +1 -1
  5. package/dist/chunks/{mountEngine-DuZ1RYGk.js → mountEngine-D78kQHoa.js} +8637 -8431
  6. package/dist/lydian.js +1 -1
  7. package/dist/types/.tsbuildinfo +1 -1
  8. package/dist/types/types.d.ts +1 -0
  9. package/dist/types/ui/brandingHelpers.d.ts +1 -0
  10. package/dist/types/ui/flowConfig.d.ts +1 -0
  11. package/dist/types/ui/react/CopyField.d.ts +2 -1
  12. package/dist/types/ui/react/ScanToPayScreen/CopyRow.d.ts +9 -0
  13. package/dist/types/ui/react/ScanToPayScreen/ScanActionButtons.d.ts +7 -0
  14. package/dist/types/ui/react/ScanToPayScreen/ScanNotices.d.ts +6 -0
  15. package/dist/types/ui/react/ScanToPayScreen/ScanPaymentDetails.d.ts +5 -0
  16. package/dist/types/ui/react/ScanToPayScreen/ScanQrCode.d.ts +5 -0
  17. package/dist/types/ui/react/ScanToPayScreen/ScanToPayEmbeddedLayout.d.ts +3 -0
  18. package/dist/types/ui/react/ScanToPayScreen/ScanToPayModalLayout.d.ts +3 -0
  19. package/dist/types/ui/react/ScanToPayScreen/UnderpaidDetails.d.ts +5 -0
  20. package/dist/types/ui/react/ScanToPayScreen/scanToPayLayoutProps.d.ts +10 -0
  21. package/dist/types/ui/react/ScanToPayScreen/useScanToPayState.d.ts +9 -0
  22. package/dist/types/ui/react/checkoutActions.d.ts +4 -1
  23. package/dist/types/ui/react/checkoutStore.d.ts +1 -0
  24. package/package.json +1 -1
  25. /package/dist/types/ui/react/{ScanToPayScreen.d.ts → ScanToPayScreen/ScanToPayScreen.d.ts} +0 -0
@@ -321,6 +321,7 @@ export type CheckoutFlow = {
321
321
  assetFirst?: boolean;
322
322
  hideNoWalletOption?: boolean;
323
323
  showApprovalPage?: boolean;
324
+ hideChangePaymentMethod?: boolean;
324
325
  };
325
326
  export type CheckoutConfig = {
326
327
  logoURL?: string;
@@ -1,2 +1,3 @@
1
1
  export declare const resolveLogoUrl: (logoUrl?: string) => string;
2
2
  export declare const sanitizeTermNotice: (rawHtml: string) => string;
3
+ export declare const termNoticeLinkHref: (termNoticeHtml: string) => string | null;
@@ -4,5 +4,6 @@ export type CheckoutFlowSettings = {
4
4
  assetFirst: boolean;
5
5
  showApprovalPage: boolean;
6
6
  hideOtherWallets: boolean;
7
+ hideChangePaymentMethod: boolean;
7
8
  };
8
9
  export declare function resolveFlow(accountFlow?: CheckoutFlow, embedFlow?: InitFlowOptions): CheckoutFlowSettings;
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
- export declare function CopyButton({ label, copyLabel, buttonClass, feedbackClass, }: {
2
+ export declare function CopyButton({ label, copyLabel, text, buttonClass, feedbackClass, }: {
3
3
  label: string;
4
4
  copyLabel?: string;
5
+ text?: string;
5
6
  buttonClass?: string;
6
7
  feedbackClass?: string;
7
8
  }): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export default function CopyRow({ label, valueId, value, copyValue, valueClass, children, }: {
3
+ label: string;
4
+ valueId: string;
5
+ value: string;
6
+ copyValue?: string;
7
+ valueClass: string;
8
+ children?: React.ReactNode;
9
+ }): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export default function ScanActionButtons({ className, buttonClass, onDownloadQr, onChangeCoin, }: {
3
+ className?: string;
4
+ buttonClass?: string;
5
+ onDownloadQr: () => void;
6
+ onChangeCoin: () => void;
7
+ }): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export default function ScanNotices({ underpaid, qrMissing, slotClass, }: {
3
+ underpaid: boolean;
4
+ qrMissing: boolean;
5
+ slotClass?: string;
6
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import type { ScanToPayView } from '../../scanToPayView';
3
+ export default function ScanPaymentDetails({ view }: {
4
+ view: ScanToPayView;
5
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export default function ScanQrCode({ qrRef, linkClass, }: {
3
+ qrRef: React.RefObject<HTMLDivElement | null>;
4
+ linkClass?: string;
5
+ }): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import type { ScanToPayLayoutProps } from './scanToPayLayoutProps';
3
+ export default function ScanToPayEmbeddedLayout({ view, underpaid, termNoticeHtml, openInWalletLabel, qrRef, onDownloadQr, }: ScanToPayLayoutProps): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import type { ScanToPayLayoutProps } from './scanToPayLayoutProps';
3
+ export default function ScanToPayModalLayout({ view, underpaid, termNoticeHtml, openInWalletLabel, qrRef, onDownloadQr, }: ScanToPayLayoutProps): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import type { UnderpaidView } from '../../scanToPayView';
3
+ export default function UnderpaidDetails({ underpaid }: {
4
+ underpaid: UnderpaidView;
5
+ }): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type * as React from 'react';
2
+ import type { ScanToPayView, UnderpaidView } from '../../scanToPayView';
3
+ export interface ScanToPayLayoutProps {
4
+ view: ScanToPayView;
5
+ underpaid: UnderpaidView | null;
6
+ termNoticeHtml: string;
7
+ openInWalletLabel: string;
8
+ qrRef: React.RefObject<HTMLDivElement | null>;
9
+ onDownloadQr: () => void;
10
+ }
@@ -0,0 +1,9 @@
1
+ export declare function useScanToPayState(): {
2
+ view: import("../../scanToPayView").ScanToPayView;
3
+ underpaid: import("../../scanToPayView").UnderpaidView | null;
4
+ termNoticeHtml: string;
5
+ isEmbedded: boolean;
6
+ openInWalletLabel: string;
7
+ qrData: string | null;
8
+ qrCenterImage: string;
9
+ };
@@ -111,5 +111,8 @@ export type CheckoutAction = {
111
111
  logoUrl: string | null;
112
112
  logoAlt: string;
113
113
  termNoticeHtml: string;
114
+ } | {
115
+ type: 'mode/applied';
116
+ isEmbedded: boolean;
114
117
  };
115
- export declare const PRESERVED_ON_RESET: readonly ["brandLogoUrl", "brandLogoAlt", "termNoticeHtml", "session", "flowOverride", "walletConnectFlow", "assetFirstFlow", "hideOtherWallets", "showApprovalPage", "restoreDialogSession", "kycStepSession", "kycFormSession"];
118
+ export declare const PRESERVED_ON_RESET: readonly ["brandLogoUrl", "brandLogoAlt", "termNoticeHtml", "session", "flowOverride", "isEmbedded", "walletConnectFlow", "assetFirstFlow", "hideOtherWallets", "showApprovalPage", "restoreDialogSession", "kycStepSession", "kycFormSession"];
@@ -31,6 +31,7 @@ export interface CheckoutState {
31
31
  isCheckoutSettled: boolean;
32
32
  /** The embed's `flow` option. Kept so the reducer can derive the flags below. */
33
33
  flowOverride: InitFlowOptions | null;
34
+ isEmbedded: boolean;
34
35
  /**
35
36
  * Whether the wrong-network banner currently on screen is ours. Lives here so
36
37
  * clearing the banner clears it in the same transition — drifting apart is its
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lydianpay/sdk-web",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "description": "Drop-in crypto payment checkout for the web — a <lydian-checkout> web component and window.Lydian API across 20+ chains and major stablecoins.",
5
5
  "license": "MIT",
6
6
  "repository": {