@coinflowlabs/vue 1.17.0 → 1.18.1

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.
@@ -10,7 +10,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
10
10
  }, {
11
11
  sendMessage(message: string): void;
12
12
  handleIframeMessages({ data, origin }: {
13
- data: string;
13
+ data: unknown;
14
14
  origin: string;
15
15
  }): void;
16
16
  listenForMessage(isResponseValid: (response: string) => boolean): Promise<string>;
@@ -385,7 +385,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
385
385
  }, {
386
386
  sendMessage(message: string): void;
387
387
  handleIframeMessages({ data, origin }: {
388
- data: string;
388
+ data: unknown;
389
389
  origin: string;
390
390
  }): void;
391
391
  listenForMessage(isResponseValid: (response: string) => boolean): Promise<string>;
@@ -30,6 +30,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
30
30
  lat: number;
31
31
  lng: number;
32
32
  };
33
+ appReturnUrl?: string;
33
34
  merchantId: string;
34
35
  env?: import('..').CoinflowEnvs;
35
36
  loaderBackground?: string;
@@ -38,6 +39,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
38
39
  theme?: import('..').MerchantTheme;
39
40
  wallet: import('..').SolanaWallet;
40
41
  connection: import('@solana/web3.js').Connection;
42
+ ownerOverride?: string;
41
43
  } | {
42
44
  walletPubkey: string | null | undefined;
43
45
  route: string;
@@ -61,6 +63,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
61
63
  lat: number;
62
64
  lng: number;
63
65
  };
66
+ appReturnUrl?: string;
64
67
  merchantId: string;
65
68
  env?: import('..').CoinflowEnvs;
66
69
  loaderBackground?: string;
@@ -92,6 +95,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
92
95
  lat: number;
93
96
  lng: number;
94
97
  };
98
+ appReturnUrl?: string;
95
99
  merchantId: string;
96
100
  env?: import('..').CoinflowEnvs;
97
101
  loaderBackground?: string;
@@ -123,6 +127,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
123
127
  lat: number;
124
128
  lng: number;
125
129
  };
130
+ appReturnUrl?: string;
126
131
  merchantId: string;
127
132
  env?: import('..').CoinflowEnvs;
128
133
  loaderBackground?: string;
@@ -154,6 +159,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
154
159
  lat: number;
155
160
  lng: number;
156
161
  };
162
+ appReturnUrl?: string;
157
163
  merchantId: string;
158
164
  env?: import('..').CoinflowEnvs;
159
165
  loaderBackground?: string;
@@ -185,6 +191,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
185
191
  lat: number;
186
192
  lng: number;
187
193
  };
194
+ appReturnUrl?: string;
188
195
  merchantId: string;
189
196
  env?: import('..').CoinflowEnvs;
190
197
  loaderBackground?: string;
@@ -215,6 +222,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
215
222
  lat: number;
216
223
  lng: number;
217
224
  };
225
+ appReturnUrl?: string;
218
226
  merchantId: string;
219
227
  env?: import('..').CoinflowEnvs;
220
228
  loaderBackground?: string;
@@ -246,6 +254,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
246
254
  lat: number;
247
255
  lng: number;
248
256
  };
257
+ appReturnUrl?: string;
249
258
  merchantId: string;
250
259
  env?: import('..').CoinflowEnvs;
251
260
  loaderBackground?: string;
@@ -280,7 +289,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
280
289
  }, {
281
290
  sendMessage(message: string): void;
282
291
  handleIframeMessages({ data, origin }: {
283
- data: string;
292
+ data: unknown;
284
293
  origin: string;
285
294
  }): void;
286
295
  listenForMessage(isResponseValid: (response: string) => boolean): Promise<string>;
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { CoinflowEnvs, MerchantTheme } from '../../lib/common';
2
+ import { CardFormVariant, CoinflowEnvs, MerchantTheme } from '../../lib/common';
3
3
  export interface CardFormV2TokenResponse {
4
4
  token: string;
5
5
  expMonth?: string;
@@ -14,7 +14,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
14
14
  merchantId: string;
15
15
  env?: CoinflowEnvs;
16
16
  theme?: MerchantTheme;
17
- variant: "card-form" | "card-number-form" | "cvv-form";
17
+ variant: CardFormVariant;
18
18
  token?: string;
19
19
  onLoad?: () => void;
20
20
  }>;
@@ -28,13 +28,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
28
28
  merchantId: string;
29
29
  env?: CoinflowEnvs;
30
30
  theme?: MerchantTheme;
31
- variant: "card-form" | "card-number-form" | "cvv-form";
31
+ variant: CardFormVariant;
32
32
  token?: string;
33
33
  onLoad?: () => void;
34
34
  }>;
35
35
  required: true;
36
36
  };
37
37
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
38
+ wrapperRef: HTMLDivElement;
38
39
  iframeRef: HTMLIFrameElement;
39
- }, HTMLIFrameElement>;
40
+ }, HTMLDivElement>;
40
41
  export default _default;
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ declare const CoinflowCardForm: import('vue').DefineComponent<import('vue').Extr
16
16
  merchantId: string;
17
17
  env?: import('.').CoinflowEnvs;
18
18
  theme?: import('.').MerchantTheme;
19
- variant: "card-form" | "card-number-form" | "cvv-form";
19
+ variant: import('.').CardFormVariant;
20
20
  token?: string;
21
21
  onLoad?: () => void;
22
22
  }>;
@@ -30,15 +30,16 @@ declare const CoinflowCardForm: import('vue').DefineComponent<import('vue').Extr
30
30
  merchantId: string;
31
31
  env?: import('.').CoinflowEnvs;
32
32
  theme?: import('.').MerchantTheme;
33
- variant: "card-form" | "card-number-form" | "cvv-form";
33
+ variant: import('.').CardFormVariant;
34
34
  token?: string;
35
35
  onLoad?: () => void;
36
36
  }>;
37
37
  required: true;
38
38
  };
39
39
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
40
+ wrapperRef: HTMLDivElement;
40
41
  iframeRef: HTMLIFrameElement;
41
- }, HTMLIFrameElement>;
42
+ }, HTMLDivElement>;
42
43
  /** @deprecated Use CoinflowCardForm instead */
43
44
  declare const CoinflowLegacyCardNumberInput: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
44
45
  args: {
@@ -4,6 +4,10 @@ import { GiftCardCartItem } from './types/giftCardCartItem';
4
4
  import { nftCartItem } from './types/nftCartItem';
5
5
  import { CryptoCartItem } from './types/cryptoCartItem';
6
6
  import { MoneyTopUpCartItem } from './types/moneyTopUpCartItem';
7
+ import { TravelCartItem } from './types/travelCartItem';
8
+ import { FlightTicketCartItem } from './types/flightTicketCartItem';
9
+ import { FlightUpgradeCartItem } from './types/flightUpgradeCartItem';
10
+ import { LodgingCartItem } from './types/lodgingCartItem';
7
11
  export declare enum WithdrawCategory {
8
12
  USER = "user",
9
13
  BUSINESS = "business",
@@ -20,7 +24,8 @@ export declare enum WithdrawSpeed {
20
24
  VENMO = "venmo",
21
25
  PAYPAL = "paypal",
22
26
  WIRE = "wire",
23
- INTERAC = "interac"
27
+ INTERAC = "interac",
28
+ SWIFT = "swift"
24
29
  }
25
30
  export declare enum SettlementType {
26
31
  Credits = "Credits",
@@ -244,11 +249,11 @@ export declare enum ChargebackProtectionAccountType {
244
249
  PRIVATE = "private",
245
250
  BUSINESS = "business"
246
251
  }
247
- export type CartItemClassOmitted = NftCartItemClassOmitted | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
252
+ export type CartItemClassOmitted = NftCartItemClassOmitted | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem | TravelCartItem | FlightTicketCartItem | FlightUpgradeCartItem | LodgingCartItem;
248
253
  export type ChargebackProtectionItem = CartItemClassOmitted;
249
254
  export type NftCartItemClassOmitted = Omit<nftCartItem, 'sellingPrice' | 'itemClass'>;
250
255
  export type Cart = CartItem[];
251
- export type CartItem = Omit<nftCartItem, 'listPrice' | 'sellingPrice'> | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
256
+ export type CartItem = Omit<nftCartItem, 'listPrice' | 'sellingPrice'> | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem | TravelCartItem | FlightTicketCartItem | FlightUpgradeCartItem | LodgingCartItem;
252
257
  export declare enum ThreeDsChallengePreference {
253
258
  NoPreference = "NoPreference",
254
259
  Frictionless = "Frictionless",
@@ -382,6 +387,13 @@ export interface WithGeo {
382
387
  lat: number;
383
388
  lng: number;
384
389
  };
390
+ /**
391
+ * Deep link (custom scheme or universal link) that reopens the host app.
392
+ * Used by browser-handoff checkouts (e.g. Venmo on React Native) so the
393
+ * standalone checkout page can route the customer back into the app after
394
+ * the payment app returns them to the browser.
395
+ */
396
+ appReturnUrl?: string;
385
397
  }
386
398
  /**
387
399
  * Used for Account Funding Transactions
@@ -483,12 +495,22 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
483
495
  lat: number;
484
496
  lng: number;
485
497
  };
498
+ /**
499
+ * Deep link (custom scheme or universal link) that reopens the host app.
500
+ * Used by browser-handoff flows on React Native — Venmo checkout and the
501
+ * "Log in with PayPal" payout flow — so the standalone page routes the user
502
+ * back into the app after the payment/login app returns them to the browser.
503
+ * When omitted, PayPal linking still completes via polling but the user must
504
+ * switch back to the app manually.
505
+ */
506
+ appReturnUrl?: string;
486
507
  }
487
508
  export type WalletTypes = SolanaWallet | EthWallet | StellarWallet;
488
509
  export interface SolanaWalletProps {
489
510
  wallet: SolanaWallet;
490
511
  connection: Connection;
491
512
  blockchain: 'solana';
513
+ ownerOverride?: string;
492
514
  }
493
515
  export type CoinflowSolanaWithdrawProps = CoinflowCommonWithdrawProps & SolanaWalletProps;
494
516
  interface EvmWalletProps {
@@ -652,6 +674,7 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' |
652
674
  disableGooglePay?: boolean;
653
675
  theme?: MerchantTheme;
654
676
  usePermit?: boolean;
677
+ ownerOverride?: string;
655
678
  handleHeightChangeId: string | number;
656
679
  }
657
680
  export interface CoinflowIntentsIFrameProps {
@@ -7,7 +7,7 @@ export declare class CoinflowUtils {
7
7
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
8
8
  static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
9
9
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
10
- static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, depositAmounts, baseUrl, }: CoinflowIFrameProps & {
10
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, appReturnUrl, depositAmounts, ownerOverride, baseUrl, }: CoinflowIFrameProps & {
11
11
  baseUrl?: string;
12
12
  } & WithGeo): string;
13
13
  static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Single source of truth for the card-entry responsive layout.
3
+ *
4
+ * The real card-entry form (`UnifiedCardEntry` in the core-flows app) and the
5
+ * React/Vue/Angular skeleton loaders all render the same grid. Historically the
6
+ * form drove the inline↔two-row switch from JS (a ResizeObserver toggling React
7
+ * state) while the skeletons hard-coded their own guesses, so the two drifted.
8
+ *
9
+ * This module defines the grid templates and the breakpoint ONCE, as pure data
10
+ * plus a CSS builder, so every consumer reflows at exactly the same width via a
11
+ * CSS container query — no JS width measurement, nothing to keep in sync.
12
+ */
13
+ export type CardEntryInputName = 'card-number' | 'expiration' | 'cvv';
14
+ /**
15
+ * Minimum width (px) each field needs before the row is too cramped and the
16
+ * layout drops to two rows. Mirrors the real form's field sizing.
17
+ */
18
+ export declare const CARD_ENTRY_MIN_WIDTHS: Record<CardEntryInputName, number>;
19
+ /** Notional gap (px) between fields, summed into the reflow breakpoint. */
20
+ export declare const CARD_ENTRY_SLOT_GAP_PX = 8;
21
+ /** Field row height — matches the real form's `3rem` grid rows. */
22
+ export declare const CARD_ENTRY_ROW_HEIGHT = "3rem";
23
+ export declare const CARD_ENTRY_ROW_HEIGHT_PX = 48;
24
+ /** 1px accent line between rows / between exp & cvv in the two-row layout. */
25
+ export declare const CARD_ENTRY_DIVIDER_PX = 1;
26
+ /**
27
+ * The form draws its fields inside a 1px border, so the query container (the
28
+ * full iframe width) is 2px wider than the field row that `minRowWidth`
29
+ * describes. The breakpoint bakes this in so form and skeleton flip together.
30
+ */
31
+ export declare const CARD_ENTRY_BORDER_PX = 1;
32
+ /**
33
+ * The form insets its box by this much on every side (Tailwind `m-0.5`) so the
34
+ * focus ring has room and isn't clipped at the iframe edge. It adds to the box's
35
+ * rendered height, so the skeleton's height guess includes it to avoid a jump
36
+ * when the loaded form replaces the skeleton.
37
+ */
38
+ export declare const CARD_ENTRY_MARGIN_PX = 2;
39
+ export type CardEntryConfig = {
40
+ /** Mounted fields, in DOM/visual order. */
41
+ inputs: CardEntryInputName[];
42
+ /** Whether the animated card-brand icon renders left of the PAN slot. */
43
+ hasIcon?: boolean;
44
+ /** Whether the layout may drop to two rows when narrow (default true). */
45
+ allowTwoRow?: boolean;
46
+ };
47
+ export type CardEntryDivider = {
48
+ area: string;
49
+ orientation: 'v' | 'h';
50
+ };
51
+ export type CardEntryLayout = {
52
+ /** grid-template for the wide (inline) layout. */
53
+ inline: string;
54
+ /** grid-template for the narrow (two-row) layout, or null if it never reflows. */
55
+ twoRow: string | null;
56
+ /**
57
+ * Container width (px) below which the two-row layout applies, measured on the
58
+ * query container (full iframe width, incl. the form's border). Null when the
59
+ * config never reflows.
60
+ */
61
+ breakpointPx: number | null;
62
+ /** grid-area names that hold a field, in DOM order (same in both layouts). */
63
+ fieldAreas: string[];
64
+ /** Whether an `icon` area is present (both layouts). */
65
+ hasIconArea: boolean;
66
+ /** Accent-line elements shown only in the two-row layout. */
67
+ twoRowDividers: CardEntryDivider[];
68
+ };
69
+ /** Resolve the full layout (templates + breakpoint + areas) for a config. */
70
+ export declare function buildCardEntryLayout({ inputs, hasIcon, allowTwoRow, }: CardEntryConfig): CardEntryLayout;
71
+ /**
72
+ * Container-query CSS that switches `gridSelector` between the inline and
73
+ * two-row templates at the layout's breakpoint. The element matched by
74
+ * `gridSelector` must be a descendant of a `container-type: inline-size`
75
+ * ancestor named `containerName`.
76
+ *
77
+ * `extraBaseRules` are emitted before the `@container` block (e.g. the default
78
+ * hidden state of two-row-only dividers); `extraCompactRules` are emitted inside
79
+ * it (e.g. revealing those dividers / hiding wide-only chrome). Keeping the base
80
+ * state first ensures the compact rules win when the query matches.
81
+ */
82
+ export declare function buildCardEntryGridCss({ gridSelector, layout, containerName, extraBaseRules, extraCompactRules, }: {
83
+ gridSelector: string;
84
+ layout: CardEntryLayout;
85
+ containerName?: string;
86
+ extraBaseRules?: string;
87
+ extraCompactRules?: string;
88
+ }): string;
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Framework-agnostic definitions for the V2 card-form skeleton loader.
3
+ *
4
+ * The React, Vue, and Angular libraries all render the same skeleton while the
5
+ * card-form iframe loads. The grid templates and breakpoint come from the shared
6
+ * {@link buildCardEntryLayout} — the SAME source of truth the real form uses —
7
+ * so the skeleton reflows at exactly the width the loaded form does. Only the
8
+ * box styling and per-framework wiring live here.
9
+ */
10
+ export type CardFormVariant = 'card-form' | 'card-number-form' | 'cvv-form';
11
+ export declare const INLINE_SKELETON_HEIGHT_PX: number;
12
+ /** Two-row layouts are a second field row plus the 1px divider taller. */
13
+ export declare const COMPACT_SKELETON_HEIGHT_PX: number;
14
+ export type SkeletonLayout = {
15
+ /** Single-row grid used at the iframe's default (wide) width. */
16
+ inline: string;
17
+ /** Two-row grid applied below `compactMaxWidthPx`; omitted when it never reflows. */
18
+ compact?: string;
19
+ /** Container width (px) below which the two-row grid applies. */
20
+ compactMaxWidthPx?: number;
21
+ /** grid-area names to render one skeleton box for, in DOM order (same in both layouts). */
22
+ areas: string[];
23
+ };
24
+ export declare const SKELETON_LAYOUTS: Record<CardFormVariant, SkeletonLayout>;
25
+ /** Name of the shared pulse keyframes; referenced by the box `animation`. */
26
+ export declare const SKELETON_PULSE_ANIMATION_NAME = "coinflow-card-form-skeleton-pulse";
27
+ /**
28
+ * Duration (ms) of the skeleton's opacity fade-out. Matches the `opacity 300ms`
29
+ * transition each renderer applies. Renderers unmount the skeleton on
30
+ * `transitionend`, but that event can be skipped (reduced-motion, an ancestor
31
+ * `display:none`, or opacity already 0) — so they also use this as a fallback
32
+ * timeout to force the unmount and avoid a stuck (invisible) skeleton.
33
+ */
34
+ export declare const SKELETON_FADE_MS = 300;
35
+ /**
36
+ * Whether the given container width would trigger the variant's two-row layout.
37
+ * Mirrors the real form's container query (`width < breakpoint`). Variants
38
+ * without a two-row layout never reflow.
39
+ */
40
+ export declare function shouldStackSkeleton({ variant, width, }: {
41
+ variant: CardFormVariant;
42
+ width: number;
43
+ }): boolean;
44
+ /**
45
+ * Height to guess before the iframe reports its real height. The two-row layout
46
+ * is a field row plus divider taller than the inline one.
47
+ */
48
+ export declare function guessSkeletonHeightPx({ variant, width, }: {
49
+ variant: CardFormVariant;
50
+ width: number;
51
+ }): number;
52
+ /**
53
+ * The `grid-template` to apply for the given container width. Frameworks that
54
+ * drive the layout from JS (Vue, Angular) call this from their resize observer;
55
+ * React instead injects a CSS container query via {@link buildSkeletonCss}.
56
+ */
57
+ export declare function getSkeletonGridTemplate({ variant, width, }: {
58
+ variant: CardFormVariant;
59
+ width: number;
60
+ }): string;
61
+ /** Stable class name for a variant's skeleton grid element. */
62
+ export declare function getSkeletonGridClass(variant: CardFormVariant): string;
63
+ /**
64
+ * CSS (keyframes + grid + container-query breakpoint) for the container-query
65
+ * driven renderer used by React, where the skeleton root is a query container.
66
+ */
67
+ export declare function buildSkeletonCss(variant: CardFormVariant): string;
68
+ /**
69
+ * Padding (px) to inset the skeleton grid by, applied on the skeleton root. It
70
+ * equals the form's own chrome — its `m-0.5` margin plus 1px border — so the
71
+ * boxes land in the same area the real fields will, and the grid fills the root
72
+ * exactly (no dead space that would make the boxes look too short).
73
+ */
74
+ export declare const SKELETON_ROOT_PADDING_PX: number;
75
+ /**
76
+ * Inline style for each skeleton box, MINUS the `background` — the fill color is
77
+ * theme-dependent (see {@link getSkeletonColors}) so each renderer merges it in.
78
+ * A hairline margin keeps a subtle gap between boxes while letting them fill
79
+ * nearly the full field height (the root padding handles the outer inset). Uses
80
+ * string units so it renders identically in React, Vue, and Angular.
81
+ */
82
+ export declare const SKELETON_BOX_STYLE: {
83
+ readonly minWidth: "0";
84
+ readonly margin: "1px";
85
+ readonly borderRadius: "4px";
86
+ readonly opacity: "1";
87
+ readonly animation: "coinflow-card-form-skeleton-pulse 1.5s ease-in-out infinite";
88
+ };
89
+ export type SkeletonColors = {
90
+ /** Faint backdrop behind the boxes. */
91
+ backdrop: string;
92
+ /** Box fill. */
93
+ box: string;
94
+ };
95
+ /**
96
+ * Best-effort skeleton palette. The skeleton renders in the SDK (parent), so it
97
+ * can't see the form's resolved colors — it only has the optional `theme` the
98
+ * integrator passed. When `theme.background` is a parseable color we tint the
99
+ * skeleton light-on-dark or dark-on-light to match; otherwise we fall back to a
100
+ * neutral mid-grey that stays visible on any surface.
101
+ */
102
+ export declare function getSkeletonColors(theme?: {
103
+ background?: string;
104
+ }): SkeletonColors;
@@ -4,11 +4,17 @@ export * from './CoinflowLibMessageHandlers';
4
4
  export * from './EventBus';
5
5
  export * from './card-form/TokenEx';
6
6
  export * from './card-form/tokenexHelpers';
7
+ export * from './card-form/cardEntryLayout';
8
+ export * from './card-form/cardFormSkeleton';
7
9
  export * from './types/Subtotal';
8
10
  export * from './types/AnyObject';
9
11
  export * from './types/giftCardCartItem';
10
12
  export * from './types/nftCartItem';
11
13
  export * from './types/cryptoCartItem';
14
+ export * from './types/travelCartItem';
15
+ export * from './types/flightTicketCartItem';
16
+ export * from './types/flightUpgradeCartItem';
17
+ export * from './types/lodgingCartItem';
12
18
  export * from './CoinflowPurchaseProtectionHeaders';
13
19
  export * from './CoinflowProtectionInit';
14
20
  export { default as getForterToken, captureForterToken, awaitForterToken, } from './Forter';
@@ -0,0 +1,49 @@
1
+ import { CurrencyAmount, RecipientInfo } from './CartitemCommon';
2
+ import { AnyObject } from './AnyObject';
3
+ import { TravelFirstFlight, TravelTrip } from './travelCartItem';
4
+ /**
5
+ * Represents a flight ticket item in a shopping cart
6
+ */
7
+ export interface FlightTicketCartItem {
8
+ /**
9
+ * Denotes the cart item class. The item schema is chosen based on this value.
10
+ * Allowed value: flightTicket
11
+ * Example: flightTicket
12
+ */
13
+ itemClass: 'flightTicket';
14
+ /**
15
+ * The cart items's unique ID
16
+ * Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
17
+ */
18
+ id?: string;
19
+ /**
20
+ * Any additional product data which can be provided, e.g. description, link to image, etc
21
+ * Example: {"any":"data","description":"This is the product description"}
22
+ */
23
+ rawProductData?: AnyObject;
24
+ /**
25
+ * The item's selling price
26
+ */
27
+ sellingPrice: CurrencyAmount;
28
+ /**
29
+ * The item's list price
30
+ */
31
+ listPrice?: CurrencyAmount;
32
+ /**
33
+ * The user's personal info
34
+ */
35
+ recipientInfo?: RecipientInfo;
36
+ /**
37
+ * The flight ticket's PNR code
38
+ * Example: X36Q9C
39
+ */
40
+ pnr: string;
41
+ /**
42
+ * The trip details of the flight ticket
43
+ */
44
+ trip: TravelTrip;
45
+ /**
46
+ * The first flight details of the trip
47
+ */
48
+ firstFlight: TravelFirstFlight;
49
+ }
@@ -0,0 +1,49 @@
1
+ import { CurrencyAmount, RecipientInfo } from './CartitemCommon';
2
+ import { AnyObject } from './AnyObject';
3
+ /**
4
+ * Represents a flight upgrade item in a shopping cart
5
+ */
6
+ export interface FlightUpgradeCartItem {
7
+ /**
8
+ * Denotes the cart item class. The item schema is chosen based on this value.
9
+ * Allowed value: flightUpgrade
10
+ * Example: flightUpgrade
11
+ */
12
+ itemClass: 'flightUpgrade';
13
+ /**
14
+ * The cart items's unique ID
15
+ * Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
16
+ */
17
+ id?: string;
18
+ /**
19
+ * Any additional product data which can be provided, e.g. description, link to image, etc
20
+ * Example: {"any":"data","description":"This is the product description"}
21
+ */
22
+ rawProductData?: AnyObject;
23
+ /**
24
+ * The item's selling price
25
+ */
26
+ sellingPrice: CurrencyAmount;
27
+ /**
28
+ * The item's list price
29
+ */
30
+ listPrice?: CurrencyAmount;
31
+ /**
32
+ * The user's personal info
33
+ */
34
+ recipientInfo?: RecipientInfo;
35
+ /**
36
+ * The flight ticket's PNR code
37
+ * Example: X36Q9C
38
+ */
39
+ pnr?: string;
40
+ /**
41
+ * The type of upgrade
42
+ * Example: changes
43
+ */
44
+ upgradeType: 'changes' | 'fareIncrease' | 'baggage' | 'seats' | 'insurance' | 'other';
45
+ /**
46
+ * The upgrade description, required when the upgrade type is `other`
47
+ */
48
+ description?: string;
49
+ }
@@ -0,0 +1,37 @@
1
+ import { CurrencyAmount, RecipientInfo } from './CartitemCommon';
2
+ import { AnyObject } from './AnyObject';
3
+ import { TravelLodging } from './travelCartItem';
4
+ /**
5
+ * Represents a lodging reservation item in a shopping cart.
6
+ * The reservation fields are flattened at the top level of the item.
7
+ */
8
+ export interface LodgingCartItem extends TravelLodging {
9
+ /**
10
+ * Denotes the cart item class. The item schema is chosen based on this value.
11
+ * Allowed value: lodging
12
+ * Example: lodging
13
+ */
14
+ itemClass: 'lodging';
15
+ /**
16
+ * The cart items's unique ID
17
+ * Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
18
+ */
19
+ id?: string;
20
+ /**
21
+ * Any additional product data which can be provided, e.g. description, link to image, etc
22
+ * Example: {"any":"data","description":"This is the product description"}
23
+ */
24
+ rawProductData?: AnyObject;
25
+ /**
26
+ * The item's selling price
27
+ */
28
+ sellingPrice: CurrencyAmount;
29
+ /**
30
+ * The item's list price
31
+ */
32
+ listPrice?: CurrencyAmount;
33
+ /**
34
+ * The user's personal info
35
+ */
36
+ recipientInfo?: RecipientInfo;
37
+ }