@funkit/connect-rn 9.5.0 → 9.6.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{chunk-FAEJVOAC.js → chunk-M53J24WI.js} +2 -1
  3. package/dist/chunk-M53J24WI.js.map +7 -0
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +6715 -6142
  7. package/dist/index.js.map +4 -4
  8. package/dist/preview.js +16 -1
  9. package/dist/preview.js.map +2 -2
  10. package/dist/src/fiat/FiatCountrySheet.d.ts +2 -0
  11. package/dist/src/fiat/FiatCountrySheet.d.ts.map +1 -1
  12. package/dist/src/fiat/providers/stripe/stripeCheckout.d.ts +1 -0
  13. package/dist/src/fiat/providers/stripe/stripeCheckout.d.ts.map +1 -1
  14. package/dist/src/fiat/providers/stripe/stripeErrorDetail.d.ts.map +1 -1
  15. package/dist/src/flow/DepositFlowContent.d.ts +3 -1
  16. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
  17. package/dist/src/flow/Drawer.d.ts +8 -3
  18. package/dist/src/flow/Drawer.d.ts.map +1 -1
  19. package/dist/src/flow/FiatDepositAmountStep.d.ts +4 -2
  20. package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
  21. package/dist/src/flow/FlowSheet.d.ts +3 -1
  22. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  23. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  24. package/dist/src/flow/PaymentMethodPickerSheet.d.ts +25 -0
  25. package/dist/src/flow/PaymentMethodPickerSheet.d.ts.map +1 -0
  26. package/dist/src/flow/PaymentMethodRows.d.ts +11 -0
  27. package/dist/src/flow/PaymentMethodRows.d.ts.map +1 -0
  28. package/dist/src/flow/depositFlowConfig.d.ts +99 -1
  29. package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
  30. package/dist/src/flow/sheetSizing.d.ts +16 -4
  31. package/dist/src/flow/sheetSizing.d.ts.map +1 -1
  32. package/dist/src/preview/PreviewPaymentMethodPicker.d.ts +4 -0
  33. package/dist/src/preview/PreviewPaymentMethodPicker.d.ts.map +1 -0
  34. package/dist/src/preview/flowPreview.d.ts +3 -0
  35. package/dist/src/preview/flowPreview.d.ts.map +1 -1
  36. package/dist/src/preview/scenarioCatalog.d.ts +6 -0
  37. package/dist/src/preview/scenarioCatalog.d.ts.map +1 -1
  38. package/dist/src/preview/scenarios.d.ts.map +1 -1
  39. package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -1
  40. package/package.json +3 -3
  41. package/dist/chunk-FAEJVOAC.js.map +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"FiatCountrySheet.d.ts","sourceRoot":"","sources":["../../../src/fiat/FiatCountrySheet.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAsB1D,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,mBAAmB,CAAA;AACrE,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAA;AAEzB,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;IAC/B,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;CAC1C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE,qBAAqB,+BAyBvB;AAED,6DAA6D;AAC7D,wBAAgB,eAAe,CAC7B,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,aAAa,CAAC,+BAgB7D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE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B,+BAYA;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAA;IAChC,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,GACZ,EAAE,mBAAmB,+BAsLrB;AAkOD,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,QAAgB,CAAA"}
@@ -24,5 +24,6 @@ export declare function matchStripeCheckoutParams(surface: Surface): StripeCheck
24
24
  * the first secret it receives.
25
25
  */
26
26
  export declare function stripeCheckoutAdapter(stripe: StripeOnrampClient, requestClientSecret: CheckoutClientSecretRequest): SurfaceAdapter;
27
+ export declare function performStripeCheckout(stripe: StripeOnrampClient, params: StripeCheckoutParams, requestClientSecret: CheckoutClientSecretRequest): Promise<void>;
27
28
  export {};
28
29
  //# sourceMappingURL=stripeCheckout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripeCheckout.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripeCheckout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAKnD,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAA;AAEhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGxD,UAAU,oBAAoB;IAC5B,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,wEAAwE;AACxE,MAAM,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE;IACjD,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;CACxB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAErB,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,GACf,oBAAoB,GAAG,SAAS,CAqBlC;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,kBAAkB,EAC1B,mBAAmB,EAAE,2BAA2B,GAC/C,cAAc,CAkBhB"}
1
+ {"version":3,"file":"stripeCheckout.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripeCheckout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAKnD,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAA;AAEhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGxD,UAAU,oBAAoB;IAC5B,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,wEAAwE;AACxE,MAAM,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE;IACjD,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;CACxB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAErB,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,GACf,oBAAoB,GAAG,SAAS,CAqBlC;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,kBAAkB,EAC1B,mBAAmB,EAAE,2BAA2B,GAC/C,cAAc,CAkBhB;AAgED,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,oBAAoB,EAC5B,mBAAmB,EAAE,2BAA2B,GAC/C,OAAO,CAAC,IAAI,CAAC,CAqDf"}
@@ -1 +1 @@
1
- {"version":3,"file":"stripeErrorDetail.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripeErrorDetail.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkCzE"}
1
+ {"version":3,"file":"stripeErrorDetail.d.ts","sourceRoot":"","sources":["../../../../../src/fiat/providers/stripe/stripeErrorDetail.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqCzE"}
@@ -7,13 +7,15 @@ import type { FlowNav, FlowScreen } from './FunkitFlowProvider';
7
7
  * with the resolved data. Kept separate from the provider so its
8
8
  * hooks run only while the modal is open (it isn't mounted when closed).
9
9
  */
10
- export declare function FlowContent({ checkoutId, clientMetadata, config, current, nav, onCopySuccess, callbacks, }: {
10
+ export declare function FlowContent({ checkoutId, clientMetadata, config, current, nav, onCopySuccess, onLeaveFlow, callbacks, }: {
11
11
  checkoutId: string;
12
12
  clientMetadata: DepositClientMetadata | undefined;
13
13
  config: DepositFlowConfig;
14
14
  current: FlowScreen | undefined;
15
15
  nav: FlowNav;
16
16
  onCopySuccess: (label?: string) => void;
17
+ /** Closes the flow once its sheet has animated away. */
18
+ onLeaveFlow: () => Promise<boolean>;
17
19
  callbacks: DepositFlowCallbacks;
18
20
  }): ReactNode;
19
21
  //# sourceMappingURL=DepositFlowContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DepositFlowContent.d.ts","sourceRoot":"","sources":["../../../src/flow/DepositFlowContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAuEd,OAAO,KAAK,EAEV,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAoB5B,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AA2G/D;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,cAAc,EACd,MAAM,EACN,OAAO,EACP,GAAG,EACH,aAAa,EACb,SAAS,GACV,EAAE;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACjD,MAAM,EAAE,iBAAiB,CAAA;IACzB,OAAO,EAAE,UAAU,GAAG,SAAS,CAAA;IAC/B,GAAG,EAAE,OAAO,CAAA;IACZ,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,SAAS,EAAE,oBAAoB,CAAA;CAChC,GAAG,SAAS,CAunBZ"}
1
+ {"version":3,"file":"DepositFlowContent.d.ts","sourceRoot":"","sources":["../../../src/flow/DepositFlowContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAuEd,OAAO,KAAK,EAEV,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAoB5B,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AA2G/D;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,cAAc,EACd,MAAM,EACN,OAAO,EACP,GAAG,EACH,aAAa,EACb,WAAW,EACX,SAAS,GACV,EAAE;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACjD,MAAM,EAAE,iBAAiB,CAAA;IACzB,OAAO,EAAE,UAAU,GAAG,SAAS,CAAA;IAC/B,GAAG,EAAE,OAAO,CAAA;IACZ,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,wDAAwD;IACxD,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACnC,SAAS,EAAE,oBAAoB,CAAA;CAChC,GAAG,SAAS,CAwnBZ"}
@@ -7,10 +7,15 @@ export interface DrawerProps<TScreen extends string> {
7
7
  * Stand at the full drawer height rather than sizing to the content: the
8
8
  * window below the status bar, or, opened from another drawer, that
9
9
  * drawer's height less `NESTED_DRAWER_INSET`. A drawer whose content scrolls
10
- * has to take a fixed detent, because a gorhom scrollable reports only its
11
- * own height (see `sheetSizing`).
10
+ * takes this or `maxHeight` (see `sheetSizing`).
12
11
  */
13
12
  fullHeight?: boolean;
13
+ /**
14
+ * Size to the content up to this height instead, for content that is itself
15
+ * a gorhom scrollable: it reports its content height to the drawer, and a
16
+ * longer list scrolls under the cap. Takes precedence over `fullHeight`.
17
+ */
18
+ maxHeight?: number;
14
19
  /**
15
20
  * A plain panel in place of the glass: pure white or pure black, so nothing
16
21
  * of the step behind it reads through. What a drawer holding a whole answer
@@ -66,5 +71,5 @@ export interface DrawerProps<TScreen extends string> {
66
71
  * fee breakdown does); the gesture, the grabber and the backdrop are the
67
72
  * drawer's.
68
73
  */
69
- export declare function Drawer<TScreen extends string>({ sheet, fullHeight, solid, header, grabber, grabberColor, background, inset, dim, dismissable, onSettle, children, }: DrawerProps<TScreen>): import("react").JSX.Element;
74
+ export declare function Drawer<TScreen extends string>({ sheet, fullHeight, maxHeight, solid, header, grabber, grabberColor, background, inset, dim, dismissable, onSettle, children, }: DrawerProps<TScreen>): import("react").JSX.Element;
70
75
  //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/flow/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAGhC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAEL,KAAK,EAAE,EACP,KAAK,SAAS,EAIf,MAAM,OAAO,CAAA;AAWd,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,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W,WAAW,CAAC,OAAO,SAAS,MAAM;IACjD,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iFAAiF;IACjF,UAAU,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,CAAA;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,OAAO,SAAS,MAAM,EAAE,EAC7C,KAAK,EACL,UAAkB,EAClB,SAAS,EACT,KAAa,EACb,MAAM,EACN,OAAc,EACd,YAAY,EACZ,UAAU,EACV,KAAK,EACL,GAAG,EACH,WAAkB,EAClB,QAAQ,EACR,QAAQ,GACT,EAAE,WAAW,CAAC,OAAO,CAAC,+BAuJtB"}
@@ -1,5 +1,5 @@
1
1
  import type { DepositAmountEntryConfig, DepositCheckoutConfig, DepositClientMetadata, DepositFlowCallbacks, DepositInitialAmount, FiatRailConfig } from './depositFlowConfig';
2
- export declare function FiatDepositAmountStep({ config, fiat, checkoutConfig, targetAssetTicker, dynamicRoutingId, depositAddressOverride, checkoutId, clientMetadata, initialAmount, lockAmount, callbacks, onCloseFlow, }: {
2
+ export declare function FiatDepositAmountStep({ config, fiat, checkoutConfig, targetAssetTicker, dynamicRoutingId, depositAddressOverride, checkoutId, clientMetadata, initialAmount, lockAmount, callbacks, onCloseFlow, onLeaveFlow, }: {
3
3
  config: DepositAmountEntryConfig;
4
4
  fiat: FiatRailConfig;
5
5
  checkoutConfig: DepositCheckoutConfig | undefined;
@@ -15,7 +15,9 @@ export declare function FiatDepositAmountStep({ config, fiat, checkoutConfig, ta
15
15
  initialAmount?: DepositInitialAmount;
16
16
  /** Locks the prefilled amount against numpad and quick-amount edits. */
17
17
  lockAmount?: boolean;
18
- callbacks: Pick<DepositFlowCallbacks, 'onDepositSubmitted' | 'onDepositError' | 'onPaymentMethodPress'>;
18
+ callbacks: Pick<DepositFlowCallbacks, 'onDepositSubmitted' | 'onDepositError' | 'onPaymentMethodPress' | 'paymentMethodPicker' | 'renderPaymentMethodPicker'>;
19
19
  onCloseFlow: () => void;
20
+ /** Closes the flow once its sheet has animated away. */
21
+ onLeaveFlow: () => Promise<boolean>;
20
22
  }): import("react").JSX.Element;
21
23
  //# sourceMappingURL=FiatDepositAmountStep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FiatDepositAmountStep.d.ts","sourceRoot":"","sources":["../../../src/flow/FiatDepositAmountStep.tsx"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACf,MAAM,qBAAqB,CAAA;AAkE5B,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,IAAI,EACJ,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,aAAa,EACb,UAAU,EACV,SAAS,EACT,WAAW,GACZ,EAAE;IACD,MAAM,EAAE,wBAAwB,CAAA;IAChC,IAAI,EAAE,cAAc,CAAA;IACpB,cAAc,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACjD,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,mEAAmE;IACnE,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACjD;;OAEG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,IAAI,CACb,oBAAoB,EACpB,oBAAoB,GAAG,gBAAgB,GAAG,sBAAsB,CACjE,CAAA;IACD,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,+BA6JA"}
1
+ {"version":3,"file":"FiatDepositAmountStep.d.ts","sourceRoot":"","sources":["../../../src/flow/FiatDepositAmountStep.tsx"],"names":[],"mappings":"AAwGA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACf,MAAM,qBAAqB,CAAA;AAkE5B,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,IAAI,EACJ,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,aAAa,EACb,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,GACZ,EAAE;IACD,MAAM,EAAE,wBAAwB,CAAA;IAChC,IAAI,EAAE,cAAc,CAAA;IACpB,cAAc,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACjD,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,mEAAmE;IACnE,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,qBAAqB,GAAG,SAAS,CAAA;IACjD;;OAEG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,IAAI,CACb,oBAAoB,EAClB,oBAAoB,GACpB,gBAAgB,GAChB,sBAAsB,GACtB,qBAAqB,GACrB,2BAA2B,CAC9B,CAAA;IACD,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,wDAAwD;IACxD,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CACpC,+BAqKA"}
@@ -45,6 +45,8 @@ export interface FlowSheetProps {
45
45
  * identity.
46
46
  */
47
47
  insetDetents?: number[];
48
+ /** Keep one surface while the amount step resizes into an inset confirmation. */
49
+ resizeInPlace?: boolean;
48
50
  /**
49
51
  * Draw the sheet as bare material rather than a panel — the V2 deposit
50
52
  * surface, which the design lays over the host app. See
@@ -59,7 +61,7 @@ export interface FlowSheetProps {
59
61
  onIndexChange?: (index: number) => void;
60
62
  controlRef?: Ref<FlowSheetControl>;
61
63
  }
62
- export declare function FlowSheet({ isOpen, session, onClose, content, children, keyboardAvoidEnabled, enableSwipeToDismiss, dismissLocked, fullHeight, insetDetents, glass, hidden, animateTransitions, onIndexChange, controlRef, }: FlowSheetProps): import("react").JSX.Element;
64
+ export declare function FlowSheet({ isOpen, session, onClose, content, children, keyboardAvoidEnabled, enableSwipeToDismiss, dismissLocked, fullHeight, insetDetents, resizeInPlace, glass, hidden, animateTransitions, onIndexChange, controlRef, }: FlowSheetProps): import("react").JSX.Element;
63
65
  /**
64
66
  * Sheet surface for the flow modal. gorhom sizes the sheet body to its content,
65
67
  * so a flat background fills only the content area; over-dragging the sheet
@@ -1 +1 @@
1
- {"version":3,"file":"FlowSheet.d.ts","sourceRoot":"","sources":["../../../src/flow/FlowSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAMhC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,GAAG,EAKT,MAAM,OAAO,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AAU,EAAE,UAAU,GAAG,IAAI,CAAA;CAC9B;AAID,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IACjC,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,6EAA6E;IAC7E,KAAK,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IAC9B;;;;OAIG;IACH,KAAK,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,eAAwC,EACxC,kBAA8C,EAC9C,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,YAAY,GACb,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,uEAAuE;IACvE,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,eAAe,CAAA;IACpC,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,oBAAoB,CAAA;IACzC,6EAA6E;IAC7E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;CACzC,+BAwfA;AA+OD,wBAAgB,aAAa,IAAI,sBAAsB,CAMtD"}
@@ -0,0 +1,25 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { DepositFlowCallbacks } from './depositFlowConfig';
3
+ type PressPaymentMethod = NonNullable<DepositFlowCallbacks['onPaymentMethodPress']>;
4
+ /**
5
+ * The payment-method row's press, and the drawer presenting the host's methods
6
+ * as rows, or the host's own picker, when the host supplies either. `onPress`
7
+ * is `undefined` when the host answers the press no way, which leaves the row
8
+ * unpressable.
9
+ */
10
+ export declare function usePaymentMethodPickerSheet({ methodPicker, renderPicker, onPaymentMethodPress, onLeaveFlow, checkoutId, }: {
11
+ methodPicker: DepositFlowCallbacks['paymentMethodPicker'];
12
+ renderPicker: DepositFlowCallbacks['renderPaymentMethodPicker'];
13
+ onPaymentMethodPress: DepositFlowCallbacks['onPaymentMethodPress'];
14
+ /**
15
+ * Closes the flow once its sheet has animated away; `false` when it refused,
16
+ * or when the host's `onClose` opened another flow before returning.
17
+ */
18
+ onLeaveFlow: () => Promise<boolean>;
19
+ checkoutId: string;
20
+ }): {
21
+ onPress: PressPaymentMethod | undefined;
22
+ sheet: ReactNode;
23
+ };
24
+ export {};
25
+ //# sourceMappingURL=PaymentMethodPickerSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentMethodPickerSheet.d.ts","sourceRoot":"","sources":["../../../src/flow/PaymentMethodPickerSheet.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAcd,OAAO,KAAK,EACV,oBAAoB,EAKrB,MAAM,qBAAqB,CAAA;AAI5B,KAAK,kBAAkB,GAAG,WAAW,CACnC,oBAAoB,CAAC,sBAAsB,CAAC,CAC7C,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,UAAU,GACX,EAAE;IACD,YAAY,EAAE,oBAAoB,CAAC,qBAAqB,CAAC,CAAA;IACzD,YAAY,EAAE,oBAAoB,CAAC,2BAA2B,CAAC,CAAA;IAC/D,oBAAoB,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAA;IAClE;;;OAGG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACnC,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG;IAAE,OAAO,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CA8MhE"}
@@ -0,0 +1,11 @@
1
+ import type { PaymentMethodRow } from './depositFlowConfig';
2
+ /**
3
+ * The host's payment methods as the flow draws them: grouped cards, ruled
4
+ * between rows, under a heading for each run of rows sharing a section. The
5
+ * geometry is the country list's (2184:14277), so the two drawers read alike.
6
+ */
7
+ export declare function PaymentMethodRows({ options, onSelect, }: {
8
+ options: readonly PaymentMethodRow[];
9
+ onSelect: (option: PaymentMethodRow) => void;
10
+ }): import("react").JSX.Element;
11
+ //# sourceMappingURL=PaymentMethodRows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentMethodRows.d.ts","sourceRoot":"","sources":["../../../src/flow/PaymentMethodRows.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACpC,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAA;CAC7C,+BAoDA"}
@@ -297,6 +297,71 @@ export interface DepositFlowConfig {
297
297
  */
298
298
  lockAmount?: boolean;
299
299
  }
300
+ /** What {@link DepositFlowCallbacks.renderPaymentMethodPicker} draws with. */
301
+ export interface PaymentMethodPicker {
302
+ /** As {@link DepositFlowCallbacks.onPaymentMethodPress} receives it. */
303
+ amount: DepositInitialAmount | undefined;
304
+ /** Closes the drawer, back to the amount screen as the user left it. */
305
+ stay: () => void;
306
+ /**
307
+ * Ends the deposit so the host can take the user to a payment method the
308
+ * flow does not offer. The sheet animates away and `onClose` fires; then
309
+ * `then` runs, which is where the host navigates. Resolves `true` after
310
+ * `then`, or `false` without running it when the flow refused to close or
311
+ * `onClose` opened another flow before returning, which `then` would
312
+ * navigate under.
313
+ */
314
+ leave: (then?: () => void) => Promise<boolean>;
315
+ }
316
+ /**
317
+ * What choosing a {@link PaymentMethodRow} does. `'stay'` closes the drawer,
318
+ * back to the amount screen as the user left it. `{ afterClose }` ends the
319
+ * deposit: the sheet animates away and `onClose` fires, then `afterClose`
320
+ * runs, which is where the host navigates. When the flow refuses to close, or
321
+ * `onClose` opened another flow before returning, `afterClose` is skipped and
322
+ * {@link PaymentMethodPickerConfig.onLeaveRefused} runs instead.
323
+ */
324
+ export type PaymentMethodSelection = 'stay' | {
325
+ afterClose: () => void;
326
+ };
327
+ /** One row of the drawer {@link PaymentMethodPickerConfig} describes. */
328
+ export interface PaymentMethodRow {
329
+ /** Unique within the list; the row's key and its `testID` suffix. */
330
+ id: string;
331
+ label: string;
332
+ /** Drawn before the label at its own size; the row is 52pt high. */
333
+ icon?: ReactNode;
334
+ /** Drawn at the row's end: a tag, a check, a chevron. */
335
+ trailing?: ReactNode;
336
+ /** A heading drawn above each run of consecutive rows that share it. */
337
+ section?: string;
338
+ /**
339
+ * Answered synchronously. A throw, a promise, or anything but the two
340
+ * {@link PaymentMethodSelection} shapes is logged and treated as `'stay'`.
341
+ */
342
+ onSelect: () => PaymentMethodSelection;
343
+ }
344
+ /**
345
+ * The host's payment methods, drawn by the flow as rows in a drawer over the
346
+ * amount screen. An object, so presentation options can join `methods` later
347
+ * without a breaking change.
348
+ */
349
+ export interface PaymentMethodPickerConfig {
350
+ /**
351
+ * Called each time the user presses the payment method, with what
352
+ * {@link DepositFlowCallbacks.onPaymentMethodPress} would receive. Read from
353
+ * the latest render of `useFunkitCheckout`, not the one `beginDeposit` ran
354
+ * in, so rows built from the host's current state are current. A throw or
355
+ * an empty list is logged and the drawer does not open.
356
+ */
357
+ methods: (amount: DepositInitialAmount | undefined) => PaymentMethodRow[];
358
+ /**
359
+ * A row answered `{ afterClose }` but the flow did not end: it refused to
360
+ * close, or `onClose` opened another flow before returning. `afterClose` was
361
+ * skipped. Undo here whatever the host set up for leaving.
362
+ */
363
+ onLeaveRefused?: () => void;
364
+ }
300
365
  /** Lifecycle callbacks passed to `useFunkitCheckout`. */
301
366
  export interface DepositFlowCallbacks {
302
367
  onOpen?: () => void;
@@ -307,9 +372,42 @@ export interface DepositFlowCallbacks {
307
372
  * draws the method as a pressable row; the flow stays open, so the host can
308
373
  * present its own method choice over it. `amount` is what the user has
309
374
  * typed, in the currency it will be quoted in; it is absent while nothing
310
- * quotable is entered or that currency is still unknown.
375
+ * quotable is entered or that currency is still unknown. Set at most one of
376
+ * this, {@link paymentMethodPicker} and {@link renderPaymentMethodPicker}:
377
+ * `beginDeposit` throws `misconfigured` otherwise.
378
+ * @deprecated Use {@link paymentMethodPicker}, which presents the host's
379
+ * methods inside the flow's sheet and keeps the session and amount.
311
380
  */
312
381
  onPaymentMethodPress?: (amount: DepositInitialAmount | undefined) => void;
382
+ /**
383
+ * The host's payment methods, which the flow draws as rows in a drawer over
384
+ * the amount screen when the user presses the payment method. Supplying this
385
+ * draws the method as a pressable row. Swiping the drawer away stays. A row
386
+ * leaves the flow only through `onSelect`'s `afterClose`, which runs once the
387
+ * sheet is off screen and `onClose` has fired, so nothing the host navigates
388
+ * to can land under the sheet. Prefer this to
389
+ * {@link renderPaymentMethodPicker}.
390
+ */
391
+ paymentMethodPicker?: PaymentMethodPickerConfig;
392
+ /**
393
+ * The host's payment-method choice, which the flow presents in a drawer over
394
+ * the amount screen when the user presses the payment method. Supplying this
395
+ * draws the method as a pressable row. The drawer supplies the title, scroll
396
+ * and safe-area padding; render rows only. Swiping it away is `stay()`.
397
+ * - Never navigate from inside the picker: a route pushed while the sheet is
398
+ * up presents over a modal that is still presented. Leave with
399
+ * `leave(then)` and navigate in `then`.
400
+ * - It renders where `FunkitProvider` is mounted, not where `beginDeposit`
401
+ * was called. Context from providers inside a screen or route beside it is
402
+ * absent there; pass that state in as props.
403
+ * - It is read when `beginDeposit` runs and kept for the session. Read state
404
+ * that changes while the flow is open with hooks inside the component you
405
+ * return, not from this function's closure.
406
+ * - A throw inside it, or returning `undefined`, is logged and closes the
407
+ * drawer. Return `null` to draw nothing.
408
+ * {@link paymentMethodPicker} closes the first three by construction.
409
+ */
410
+ renderPaymentMethodPicker?: (picker: PaymentMethodPicker) => ReactNode;
313
411
  /**
314
412
  * The deposit is on its way and the SDK is finished with it: the flow has
315
413
  * closed and its confirmation is up. `orderId` is the provider's; `method`
@@ -1 +1 @@
1
- {"version":3,"file":"depositFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/depositFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,YAAY,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,GAAG,MAAM,EAAE,CAAA;IACjC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC;AAED;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,GACrD,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,2BAA2B,EAC3B,aAAa,CACd,GAAG;IACF,WAAW,EAAE,OAAO,GAAG,aAAa,CAAA;CACrC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAA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AAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B;;;;;;;;;;OAUG;IACH,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,GAAG,SAAS,KAAK,IAAI,CAAA;IACzE;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,yBAAyB,CAAA;IAC/C;;;;;;;;;;;;;;;;;OAiBG;IACH,yBAAyB,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,SAAS,CAAA;IACtE;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IAC7E;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IACjD;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7C"}
@@ -1,17 +1,29 @@
1
1
  export type SheetDetent = number | `${number}%`;
2
2
  /**
3
- * Sizing props for a `BottomSheetModal`; `topInset` stays with the caller. A
4
- * gorhom scrollable reports only its own height, so a screen with one can't be
5
- * measured — it takes the fixed `detent` and sizes itself.
3
+ * Sizing props for a `BottomSheetModal`; `topInset` stays with the caller.
4
+ * - Neither: sized to a `BottomSheetView`'s measured content.
5
+ * - `detent`: a fixed height the screen sizes itself to.
6
+ * - `maxContentHeight`: sized to a gorhom scrollable's content, up to this
7
+ * height. Since gorhom 5.2 a scrollable reports its content height to the
8
+ * sheet (`useBottomSheetContentSizeSetter`), so a short list sizes to its
9
+ * rows and a long one scrolls under the cap. The scrollable must be the
10
+ * content itself, not inside a `BottomSheetView`, whose measure would race it.
6
11
  */
7
- export declare function sheetSizing({ detent }: {
12
+ export declare function sheetSizing({ detent, maxContentHeight, }: {
8
13
  detent?: SheetDetent;
14
+ maxContentHeight?: number;
9
15
  }): {
10
16
  enableDynamicSizing: boolean;
17
+ maxDynamicContentSize: number;
18
+ snapPoints?: undefined;
19
+ } | {
20
+ enableDynamicSizing: boolean;
21
+ maxDynamicContentSize?: undefined;
11
22
  snapPoints?: undefined;
12
23
  } | {
13
24
  enableDynamicSizing: boolean;
14
25
  snapPoints: SheetDetent[];
26
+ maxDynamicContentSize?: undefined;
15
27
  };
16
28
  /**
17
29
  * Sizing props for a sheet resting at fixed heights, `gap` clear of the screen's
@@ -1 +1 @@
1
- {"version":3,"file":"sheetSizing.d.ts","sourceRoot":"","sources":["../../../src/flow/sheetSizing.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,GAAG,MAAM,GAAG,CAAA;AAK/C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE;;;;;;EAU/D;AAKD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM;;;EAO9D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAC3C,MAAM,EAAE;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACjE,MAAM,CAOR;AAID;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,IAAI,QAE5D"}
1
+ {"version":3,"file":"sheetSizing.d.ts","sourceRoot":"","sources":["../../../src/flow/sheetSizing.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,GAAG,MAAM,GAAG,CAAA;AAK/C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,gBAAgB,GACjB,EAAE;IACD,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;;;;;;;;;;;;EAgBA;AAKD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM;;;EAO9D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAC3C,MAAM,EAAE;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACjE,MAAM,CAOR;AAID;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,IAAI,QAE5D"}
@@ -0,0 +1,4 @@
1
+ import type { PaymentMethodRow } from '../flow/depositFlowConfig';
2
+ /** Stands in for a host's own methods, so a preview without one still opens the drawer. */
3
+ export declare const PREVIEW_PAYMENT_METHODS: PaymentMethodRow[];
4
+ //# sourceMappingURL=PreviewPaymentMethodPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreviewPaymentMethodPicker.d.ts","sourceRoot":"","sources":["../../../src/preview/PreviewPaymentMethodPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAEjE,2FAA2F;AAC3F,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,EAcrD,CAAA"}
@@ -41,6 +41,8 @@ export interface FiatPreviewSeed {
41
41
  depositMatch?: DepositMatchTerms;
42
42
  /** The pay sheet already took the payment, so the seeded order is one the buyer just paid for. */
43
43
  paymentCaptured?: boolean;
44
+ /** The payment-method picker open over the amount; a stand-in when the host supplies none. */
45
+ paymentMethodPicker?: boolean;
44
46
  }
45
47
  export interface DepositPreviewSeed {
46
48
  /**
@@ -137,6 +139,7 @@ export declare const SEED: {
137
139
  fiatAccountIneligible: (p: ActivePreview) => boolean | undefined;
138
140
  fiatDepositMatch: (p: ActivePreview) => DepositMatchTerms | undefined;
139
141
  fiatPaymentCaptured: (p: ActivePreview) => boolean | undefined;
142
+ fiatPaymentMethodPicker: (p: ActivePreview) => boolean | undefined;
140
143
  kycCompletion: (p: ActivePreview) => KycCompletion | undefined;
141
144
  identityPage: (p: ActivePreview) => "form" | "consent" | undefined;
142
145
  identitySection: (p: ActivePreview) => KycSection | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"flowPreview.d.ts","sourceRoot":"","sources":["../../../src/preview/flowPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EAMpB,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAElE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,kFAAkF;IAClF,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gGAAgG;IAChG,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,UAAU,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43
  readonly requires: "fiatRail";
44
44
  readonly touches: readonly [...string[], "fiat/depositMatch.ts", "flow/DepositMatchSheet.tsx", "screens/DepositMatchScreen.tsx"];
45
45
  };
46
+ readonly 'fiat.amount.paymentMethodPicker': {
47
+ readonly title: "Amount entry, the host's payment-method picker open";
48
+ readonly flow: "deposit";
49
+ readonly requires: "fiatRail";
50
+ readonly touches: readonly [...string[], "flow/PaymentMethodPickerSheet.tsx", "flow/PaymentMethodRows.tsx", "preview/PreviewPaymentMethodPicker.tsx"];
51
+ };
46
52
  readonly 'fiat.amount.empty': {
47
53
  readonly title: "Amount entry, empty";
48
54
  readonly flow: "deposit";
@@ -1 +1 @@
1
- {"version":3,"file":"scenarioCatalog.d.ts","sourceRoot":"","sources":["../../../src/preview/scenarioCatalog.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,YAAY,CAAA;AAElD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAC1B,UAAU,GACV,eAAe,GACf,qBAAqB,GACrB,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,CAAA;AAEzB,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,WAAW,CAAA;IACjB,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,oFAAoF;IACpF,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAC3B;AAwCD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,GAAE,uBAA4B;2BAQ5D,iBAAiB;8BAKjB,oBAAoB;;;;;EAMhC"}
1
+ {"version":3,"file":"useFunkitCheckout.d.ts","sourceRoot":"","sources":["../../../src/providers/useFunkitCheckout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,2BAA2B,CAAA;AAGlC,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,8BAA8B,CAAA;AAErC,mFAAmF;AACnF,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,GACxD,uBAAuB,CAAA;AAEzB;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,GAAE,uBAA4B;2BAc5D,iBAAiB;8BAYjB,oBAAoB;;;;;EAMhC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect-rn",
3
- "version": "9.5.0",
3
+ "version": "9.6.1",
4
4
  "description": "React Native bindings for @funkit/connect. Re-exports the headless @funkit/connect-core logic; the RN platform halves (Restyle theme, WebView Swapped transport, Transfer/Swapped screens, logging) land in later releases.",
5
5
  "files": [
6
6
  "dist",
@@ -54,9 +54,9 @@
54
54
  "libphonenumber-js": "1.13.6",
55
55
  "qrcode": "1.5.4",
56
56
  "react-i18next": "12.3.1",
57
- "@funkit/api-base": "9.1.0",
57
+ "@funkit/api-base": "9.1.1",
58
58
  "@funkit/chains": "2.6.0",
59
- "@funkit/connect-core": "10.0.0",
59
+ "@funkit/connect-core": "10.0.1",
60
60
  "@funkit/utils": "5.1.0"
61
61
  },
62
62
  "peerDependencies": {
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/preview/flowPreview.tsx", "../src/fiat/legalLinks.ts", "../src/fiat/formLayout.ts", "../src/fiat/keyboardReturnKey.ts", "../src/fiat/postalCodeCountries.ts"],
4
- "sourcesContent": ["import type { FiatStepResponse } from '@funkit/connect-core'\nimport {\n type Dispatch,\n type ReactNode,\n type SetStateAction,\n createContext,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react'\n\nimport type { KycCompletion } from '../fiat/kyc/useKycCompletion'\nimport type { KycSection } from '../fiat/formLayout'\nimport type { FlowScreen } from '../flow/FunkitFlowProvider'\nimport type { DepositMatchTerms } from '../flow/depositFlowConfig'\n\n/**\n * Where the fiat session opens. Each field seeds one piece of state a user would otherwise reach\n * by tapping through, so any screen of the rail is one seed away.\n */\nexport interface FiatPreviewSeed {\n /** The step response the session opens on, as if the backend had just sent it. */\n step?: FiatStepResponse\n /** The amount entry's value. */\n amount?: string\n /** Presses the entry CTA once it is ready: opens the contact round, or the KYC options card. */\n pressEntry?: boolean\n /** An identity round's consent intro, or its form open at a section. */\n identity?: { page: 'consent' } | { page: 'form'; section?: KycSection }\n /** Past the document-capture intro, onto the provider's own surface. */\n documentStarted?: boolean\n /** The provider asked for its capture again after the buyer finished one. */\n captureReissued?: boolean\n /** The acknowledgement a finished identity form shows before its verdict. */\n kycCompletion?: KycCompletion\n /** A provider surface that failed, as the adapter reports it. */\n surfaceFailure?: { code: string; detail?: string }\n /** Submits the seeded step's CTA with this id on open \u2014 how a failed send is reached. */\n submitOnOpen?: string\n /** The host's identity minter refused this account. */\n accountIneligible?: boolean\n /** Turns the deposit-match preview on, as the host's internal flag does. */\n depositMatch?: DepositMatchTerms\n /** The pay sheet already took the payment, so the seeded order is one the buyer just paid for. */\n paymentCaptured?: boolean\n}\n\nexport interface DepositPreviewSeed {\n /**\n * The screen the flow opens on; defaults to the root `beginDeposit` picks.\n * Transfer opens above it; a crypto page opens above the pages before it.\n */\n screen?: Extract<\n FlowScreen,\n | 'depositAmount'\n | 'addMoney'\n | 'transfer'\n | 'cryptoToken'\n | 'cryptoNetwork'\n | 'cryptoAddress'\n | 'cryptoLearnMore'\n >\n fiat?: FiatPreviewSeed\n /** The deposit chain, by id, as if picked from the Crypto row \u2014 Transfer needs one. */\n chainId?: string\n /** A locked deposit's source token, by symbol, as if picked with `chainId` \u2014 its Transfer needs both. */\n sourceSymbol?: string\n /** The V2 crypto currency page's search, open on this query (`''` for an empty field). */\n tokenQuery?: string\n /** The V2 crypto address page's address, tapped open to its full length. */\n addressExpanded?: boolean\n}\n\ntype WithdrawalStackScreen = Extract<\n FlowScreen,\n | 'withdrawMethod'\n | 'withdrawAmount'\n | 'withdrawAddress'\n | 'withdrawReceiveToken'\n>\n\n/** The submitted withdrawal the completion screen reports on. */\nexport interface WithdrawalPreviewCompletion {\n txHash: `0x${string}`\n amountLabel: string\n usdLabel?: string\n tokenLabel?: string\n}\n\ninterface WithdrawalPreviewFields {\n /** The payout method picked on the list, by `WithdrawalMethodOption.id`. */\n methodId?: string\n amount?: string\n recipient?: string\n /** The paste-panel address field, open for editing (its tail gives way to the address start). */\n addressFocused?: boolean\n /** The retryable error that replaces every screen after a failed execution. */\n executionError?: boolean\n}\n\n/**\n * The withdrawal flow's opening state. The type rules out the stacks that render nothing: an\n * empty one, and a completion screen with no withdrawal to report.\n */\nexport type WithdrawalPreviewSeed = WithdrawalPreviewFields &\n (\n | {\n /** The screens on the stack, root first; defaults to the payout-method list. */\n stack?: [WithdrawalStackScreen, ...WithdrawalStackScreen[]]\n complete?: undefined\n }\n | { stack: ['withdrawComplete']; complete: WithdrawalPreviewCompletion }\n )\n\n/**\n * A state to open the SDK's flow at, for hosted previews and QA builds.\n * - Consumed by the next matching `begin*` only; closing and reopening starts clean.\n * - Never set in production: every read falls back to the flow's own start.\n */\nexport interface FlowPreviewSeed {\n deposit?: DepositPreviewSeed\n withdrawal?: WithdrawalPreviewSeed\n}\n\nconst HostPreviewContext = createContext<FlowPreviewSeed | undefined>(undefined)\n\n/**\n * Opens the next `beginDeposit` / `beginWithdrawal` below it at `seed`.\n * - Mount it above `<FunkitProvider>`.\n * - Memoize `seed`: a new object is a new preview, so one built inline reopens every flow seeded.\n */\nexport function FunkitFlowPreview({\n seed,\n children,\n}: {\n seed: FlowPreviewSeed | undefined\n children: ReactNode\n}) {\n return (\n <HostPreviewContext.Provider value={seed}>\n {children}\n </HostPreviewContext.Provider>\n )\n}\n\n/** The seed a host mounted; read by the flow provider when a flow opens. */\nexport function useHostFlowPreview(): FlowPreviewSeed | undefined {\n return useContext(HostPreviewContext)\n}\n\n/** The seeds of the flow session a host preview opened; empty everywhere else. */\nexport interface ActivePreview {\n deposit?: DepositPreviewSeed\n withdrawal?: WithdrawalPreviewSeed\n}\n\nconst NO_PREVIEW: ActivePreview = {}\nconst ActivePreviewContext = createContext<ActivePreview>(NO_PREVIEW)\n\n/** Scopes a consumed seed to the one flow session it opened. */\nexport function ActiveFlowPreview({\n deposit,\n withdrawal,\n children,\n}: {\n deposit?: DepositPreviewSeed\n withdrawal?: WithdrawalPreviewSeed\n children: ReactNode\n}) {\n // The value names the session: readers are tracked against it.\n const preview = useMemo(\n () =>\n deposit === undefined && withdrawal === undefined\n ? NO_PREVIEW\n : { deposit, withdrawal },\n [deposit, withdrawal],\n )\n return (\n <ActivePreviewContext.Provider value={preview}>\n {children}\n </ActivePreviewContext.Provider>\n )\n}\n\n/** Reads one seed value out of the session's preview. */\nexport type PreviewPick<T> = (preview: ActivePreview) => T | undefined\n\n/**\n * Every seed value a flow reads, one reader each. Readers are tracked by identity, so each is\n * declared once here rather than inline where it is read.\n */\nexport const SEED = {\n fiatAmount: (p) => p.deposit?.fiat?.amount,\n fiatStep: (p) => p.deposit?.fiat?.step,\n fiatPressEntry: (p) => p.deposit?.fiat?.pressEntry,\n fiatSubmitOnOpen: (p) => p.deposit?.fiat?.submitOnOpen,\n fiatSurfaceFailure: (p) => p.deposit?.fiat?.surfaceFailure,\n fiatAccountIneligible: (p) => p.deposit?.fiat?.accountIneligible,\n fiatDepositMatch: (p) => p.deposit?.fiat?.depositMatch,\n fiatPaymentCaptured: (p) => p.deposit?.fiat?.paymentCaptured,\n kycCompletion: (p) => p.deposit?.fiat?.kycCompletion,\n identityPage: (p) => p.deposit?.fiat?.identity?.page,\n identitySection: (p) => {\n const identity = p.deposit?.fiat?.identity\n return identity?.page === 'form' ? identity.section : undefined\n },\n documentStarted: (p) => p.deposit?.fiat?.documentStarted,\n fiatCaptureReissued: (p) => p.deposit?.fiat?.captureReissued,\n depositChainId: (p) => p.deposit?.chainId,\n depositSourceSymbol: (p) => p.deposit?.sourceSymbol,\n cryptoTokenQuery: (p) => p.deposit?.tokenQuery,\n cryptoAddressExpanded: (p) => p.deposit?.addressExpanded,\n withdrawalMethodId: (p) => p.withdrawal?.methodId,\n withdrawalAmount: (p) => p.withdrawal?.amount,\n withdrawalRecipient: (p) => p.withdrawal?.recipient,\n withdrawalAddressFocused: (p) => p.withdrawal?.addressFocused,\n withdrawalComplete: (p) => p.withdrawal?.complete,\n withdrawalExecutionError: (p) => p.withdrawal?.executionError,\n} satisfies Record<string, PreviewPick<unknown>>\n\nconst readers = new WeakMap<ActivePreview, Set<PreviewPick<unknown>>>()\n\n/**\n * The seed value for the first mount that reads it; `undefined` for every mount after.\n * - A later mount of the same reader is the user moving on (a new round, a return to the entry),\n * so a seed never re-applies after the state it describes.\n * - Marked read on commit, so Strict Mode's double render still sees it.\n */\nexport function useSeed<T>(pick: PreviewPick<T>): T | undefined {\n const preview = useContext(ActivePreviewContext)\n const [seed] = useState(() =>\n readers.get(preview)?.has(pick) === true ? undefined : pick(preview),\n )\n useEffect(() => {\n if (preview === NO_PREVIEW) {\n return\n }\n const read = readers.get(preview) ?? new Set()\n read.add(pick)\n readers.set(preview, read)\n }, [preview, pick])\n return seed\n}\n\n/**\n * `useState` whose initial value a host preview may seed; production always starts at `initial`.\n * `fromSeed` shapes a seed value into the state when the two differ.\n */\nexport function useSeededState<T>(\n pick: PreviewPick<T>,\n initial: T,\n): [T, Dispatch<SetStateAction<T>>]\nexport function useSeededState<S, T>(\n pick: PreviewPick<S>,\n initial: T,\n fromSeed: (seed: S) => T,\n): [T, Dispatch<SetStateAction<T>>]\nexport function useSeededState<S, T>(\n pick: PreviewPick<S>,\n initial: T,\n fromSeed?: (seed: S) => T,\n): [T, Dispatch<SetStateAction<T>>] {\n const seed = useSeed(pick)\n return useState<T>(() => {\n if (seed === undefined) {\n return initial\n }\n return fromSeed === undefined ? (seed as unknown as T) : fromSeed(seed)\n })\n}\n", "import type { FiatProvider, KYCProvider } from '@funkit/connect-core'\n\n/**\n * The documents the identity step points at.\n *\n * Held together because two screens link them, and a provider change is one\n * edit rather than a hunt through the copy.\n */\n\n/** Fun's own policy, linked from the consent the buyer has to give. */\nexport const PRIVACY_POLICY_URL = 'https://fun.xyz/privacy'\n\n/**\n * Bumped whenever the consent copy changes, and logged and recorded with every\n * consent, so a record can be matched to the words the buyer actually read.\n * The backend must publish the same revision (`FUN_KYC_CONSENT_TERMS`).\n */\nexport const CONSENT_COPY_VERSION = 'fun-kyc-consent-2026-09-11'\n\n/** Persona's policy, linked from MoonPay's sharing disclosure (`MOONPAY_SHARING_CONSENT_VERSION`). */\nexport const PERSONA_PRIVACY_POLICY_URL =\n 'https://withpersona.com/legal/privacy-policy'\n\n/**\n * The terms of the provider that settles the order, keyed by the provider the\n * round names.\n *\n * Only verified URLs belong here. A provider absent from the map is named in\n * the copy without a link and logged (`kyc_provider_terms_url_missing`) \u2014 it\n * is never guessed, and never falls back to another provider's terms.\n */\nconst PROVIDER_TERMS_URLS: Partial<Record<FiatProvider, string>> = {\n BANXA: 'https://banxa.com/terms-of-use/',\n}\n\n/** How each provider writes its own name; the enum is upper-case. */\nconst PROVIDER_NAMES: Partial<Record<FiatProvider, string>> = {\n BANXA: 'Banxa',\n TRANSAK: 'Transak',\n}\n\n/** The identity vendors, which settle no orders and so are kept apart. */\nconst KYC_PROVIDER_NAMES: Partial<Record<KYCProvider, string>> = {\n SUMSUB: 'Sumsub',\n}\n\n/** Title-cases an upper-case enum member for a provider with no name on record. */\nconst titleCase = (value: string) =>\n value.charAt(0) + value.slice(1).toLowerCase()\n\n/** The provider's terms, or `undefined` when none is on record for it. */\nexport function providerTermsUrl(\n provider: FiatProvider | undefined,\n): string | undefined {\n return provider === undefined ? undefined : PROVIDER_TERMS_URLS[provider]\n}\n\n/**\n * The provider's name as the copy should print it. `fallback` is what a\n * screen drawn with no round to name one says instead.\n */\nexport function providerDisplayName(\n provider: FiatProvider | undefined,\n fallback: string,\n): string {\n if (provider === undefined) {\n return fallback\n }\n return PROVIDER_NAMES[provider] ?? titleCase(provider)\n}\n\n/**\n * The identity vendor's name as the copy should print it. Separate from the\n * settling provider: the two enums name different things and never mix.\n */\nexport function kycProviderDisplayName(\n provider: KYCProvider | undefined,\n fallback: string,\n): string {\n if (provider === undefined) {\n return fallback\n }\n return KYC_PROVIDER_NAMES[provider] ?? titleCase(provider)\n}\n", "import type { FormField, KycFieldId } from '@funkit/connect-core'\nimport { isValueField } from '@funkit/connect-core'\nimport { Platform, type TextInputProps } from 'react-native'\n\nimport { PADS_WITHOUT_RETURN_KEY } from './keyboardReturnKey'\nimport { type PostalCodeForm, postalCodeForm } from './postalCodeCountries'\n\n/**\n * The pages the US form is drawn as, in the order the design steps them.\n *\n * Figma \"EDIT: KYC Enhancements\": 1508:2616 (name), 1844:17471 (date of\n * birth), 1631:7256 (address), 1631:7883 (SSN). `DETAILS` is not a frame \u2014 it\n * is where a field the design never drew goes, so a form the server words its\n * own way still renders.\n */\nexport type KycSection =\n | 'NAME'\n | 'DOB'\n | 'NATIONALITY'\n | 'COUNTRY'\n | 'ADDRESS'\n | 'SSN'\n | 'PHONE'\n | 'OCCUPATION'\n | 'EMPLOYMENT'\n | 'PURPOSE'\n | 'SOURCE_OF_WEALTH'\n | 'INCOME'\n | 'NET_WORTH'\n | 'ACTIVITY'\n | 'DETAILS'\n\nexport interface KycSectionPage {\n section: KycSection\n /** Drawn as one card with a rule between rows, rather than loose boxes. */\n grouped: boolean\n /** Fields sharing a row sit side by side, as the design pairs them. */\n rows: FormField[][]\n}\n\n/**\n * The questionnaire answers this build draws a page for. The contract types a\n * questionnaire id as a template; any other lands in `DETAILS`.\n */\nexport const GROSS_ANNUAL_INCOME =\n 'QUESTIONNAIRE_RESPONSE:customerDueDiligence:grossAnnualIncome'\nexport const EXPECTED_AMOUNT_PER_MONTH =\n 'QUESTIONNAIRE_RESPONSE:customerDueDiligence:expectedTransactionAmountPerMonth'\nexport const TRANSACTIONS_PER_MONTH =\n 'QUESTIONNAIRE_RESPONSE:customerDueDiligence:transactionFrequencyPerMonth'\nexport const NET_WORTH = 'QUESTIONNAIRE_RESPONSE:enhancedDueDiligence:netWorth'\n\n/**\n * - `FormField` has no currency key, so a figure's reporting currency rides its\n * label as a trailing \" (XXX)\".\n * - Any other label names no currency.\n */\nconst LABELLED_CURRENCY = / \\(([A-Z]{3})\\)$/\n\nexport function fieldCurrency(field: FormField): string | undefined {\n return LABELLED_CURRENCY.exec(field.labelFallback)?.[1]\n}\n\n/** The label without its currency, for a field whose caption already names it. */\nexport function withoutLabelledCurrency(field: FormField): FormField {\n return {\n ...field,\n labelFallback: field.labelFallback.replace(LABELLED_CURRENCY, ''),\n }\n}\n\n/**\n * Which page a field belongs to, by id.\n *\n * The contract closes the id set, so these are the canonical names and there\n * is no second spelling to carry. An id with no page here lands in `DETAILS`\n * rather than being refused: the server owns the list, and a form is not\n * undrawable just because it asks for something the frames do not group.\n */\nconst SECTION_BY_ID: Readonly<Partial<Record<KycFieldId, KycSection>>> = {\n // 1508:2616 \u2014 \"First name\", \"M.I.\", \"Last Name\".\n LEGAL_FIRST_NAME: 'NAME',\n LEGAL_MIDDLE_NAME: 'NAME',\n LEGAL_LAST_NAME: 'NAME',\n // 1844:17471 \u2014 its own page, asked for on its own over the date picker.\n DATE_OF_BIRTH: 'DOB',\n NATIONALITY: 'NATIONALITY',\n // 1631:7256 \u2014 \"Address\", \"Apartment, suite, etc.\", \"City\", \"State\", \"ZIP code\".\n RESIDENTIAL_ADDRESS_LINE_1: 'ADDRESS',\n RESIDENTIAL_ADDRESS_LINE_2: 'ADDRESS',\n RESIDENTIAL_ADDRESS_CITY: 'ADDRESS',\n RESIDENTIAL_ADDRESS_REGION: 'ADDRESS',\n RESIDENTIAL_ADDRESS_POSTAL_CODE: 'ADDRESS',\n RESIDENTIAL_ADDRESS_COUNTRY: 'COUNTRY',\n // 1631:7883 \u2014 \"SSN\".\n TAX_IDENTIFIER: 'SSN',\n TAX_RESIDENCE_COUNTRY: 'COUNTRY',\n OCCUPATION_TITLE: 'OCCUPATION',\n OCCUPATION_INDUSTRY: 'OCCUPATION',\n PURPOSE_OF_TRANSACTION: 'PURPOSE',\n PURPOSE_OF_SERVICE: 'PURPOSE',\n // MoonPay's customer due diligence round, asked after the SSN.\n PHONE_NUMBER: 'PHONE',\n EMPLOYMENT_STATUS: 'EMPLOYMENT',\n SOURCE_OF_WEALTH_DECLARATION: 'SOURCE_OF_WEALTH',\n [GROSS_ANNUAL_INCOME]: 'INCOME',\n [EXPECTED_AMOUNT_PER_MONTH]: 'ACTIVITY',\n [TRANSACTIONS_PER_MONTH]: 'ACTIVITY',\n [NET_WORTH]: 'NET_WORTH',\n}\n\n/**\n * The keyboard a typed field raises. The SSN page is drawn over a number pad\n * (1631:7883) and the due-diligence figures over the pads that fit them;\n * every other page in the form is drawn over letters.\n */\nconst KEYBOARD_BY_ID: Readonly<\n Partial<Record<KycFieldId, TextInputProps['keyboardType']>>\n> = {\n PHONE_NUMBER: 'phone-pad',\n [GROSS_ANNUAL_INCOME]: 'decimal-pad',\n [EXPECTED_AMOUNT_PER_MONTH]: 'decimal-pad',\n [TRANSACTIONS_PER_MONTH]: 'number-pad',\n [NET_WORTH]: 'decimal-pad',\n}\n\n/**\n * Field types a page can draw. A date and a country are typed into the same\n * filled box as any other answer; a hosted step is an errand the user runs\n * elsewhere and a document streams to an endpoint this build has not\n * installed, so neither has a box to draw.\n */\nconst DRAWN_TYPES = new Set(['TEXT', 'SELECT', 'DATE', 'COUNTRY'])\n\n/** One card ruled between its rows (1631:7256, \"address\"). */\nconst GROUPED_SECTIONS = new Set<KycSection>(['ADDRESS'])\n\n/**\n * The order 1508:2616 \u2192 1844:17471 \u2192 1631:7256 \u2192 1631:7883 walks, anything\n * else trailing.\n */\nconst SECTION_ORDER: readonly KycSection[] = [\n 'NAME',\n 'DOB',\n 'NATIONALITY',\n 'COUNTRY',\n 'ADDRESS',\n 'SSN',\n 'PHONE',\n 'OCCUPATION',\n 'EMPLOYMENT',\n 'PURPOSE',\n 'SOURCE_OF_WEALTH',\n 'INCOME',\n 'NET_WORTH',\n 'ACTIVITY',\n 'DETAILS',\n]\n\n/**\n * The page's field a date picker can answer, when that is the whole page.\n *\n * A picker takes the keyboard's slot, so it can only be offered on a page\n * with nothing else to type: a date beside two names would leave one of the\n * two controls covering the other. Anywhere else the date is typed.\n */\nconst IDENTITY_SECTIONS: ReadonlySet<KycSection> = new Set<KycSection>([\n 'NAME',\n 'DOB',\n 'NATIONALITY',\n 'COUNTRY',\n 'ADDRESS',\n 'SSN',\n])\n\n/**\n * The server owns the field list, so an id this build does not know is not\n * identity: only the frames that collect who someone is qualify.\n */\nexport function isIdentityField(field: FormField): boolean {\n const section = SECTION_BY_ID[field.id]\n return section !== undefined && IDENTITY_SECTIONS.has(section)\n}\n\n/**\n * The pages that draw their answers on the page rather than behind a chooser\n * (2475:8992).\n *\n * Named, not inferred from the field's type: `DETAILS` also collects a\n * `SELECT`, but it holds whatever the server asks for that no frame drew, and\n * a list of unknown length is what the chooser's sheet is for.\n */\nconst INLINE_CHOICE_SECTIONS: ReadonlySet<KycSection> = new Set<KycSection>([\n 'OCCUPATION',\n 'EMPLOYMENT',\n 'PURPOSE',\n 'SOURCE_OF_WEALTH',\n])\n\nexport function isInlineChoiceSection(section: KycSection): boolean {\n return INLINE_CHOICE_SECTIONS.has(section)\n}\n\nexport function pickedDateField(page: KycSectionPage): FormField | undefined {\n const fields = page.rows.flat()\n const only = fields.length === 1 ? fields[0] : undefined\n return only?.type === 'DATE' ? only : undefined\n}\n\n/**\n * Whether the field is typed into, and so takes a turn in the return-key\n * chain. A choice is not.\n */\nexport function isFocusableField(field: FormField): boolean {\n return field.type === 'TEXT' || field.type === 'DATE'\n}\n\n/** Pages whose keyboards read \"next\" on the field that tries the page too (1950:2055, 1951:9265). */\nconst NEXT_TO_TRY_SECTIONS: ReadonlySet<KycSection> = new Set<KycSection>([\n 'NAME',\n 'ADDRESS',\n])\n\nexport interface ReturnHop {\n label: 'next' | 'done'\n /** Absent where the return key tries the page instead. */\n to?: FormField\n}\n\n/**\n * Where a typed field's return key goes: the next required typed field.\n *\n * - An optional line is stepped over (2334:7164) but still hands on when the\n * user taps into it.\n */\nexport function returnHop(\n section: KycSection,\n typedFields: readonly FormField[],\n fieldId: string,\n): ReturnHop | undefined {\n const at = typedFields.findIndex((field) => field.id === fieldId)\n if (at < 0) {\n return undefined\n }\n const to = typedFields.slice(at + 1).find((field) => field.required)\n if (to !== undefined) {\n return { label: 'next', to }\n }\n return { label: NEXT_TO_TRY_SECTIONS.has(section) ? 'next' : 'done' }\n}\n\n/**\n * - Digits alone take the number pad, whose missing return key the page\n * answers with Continue (`isDigitsField`).\n * - A hyphen or space needs iOS's digits-first keyboard, which can type it;\n * Android has none, so it keeps letters.\n */\nconst POSTAL_CODE_KEYBOARD: Readonly<\n Record<PostalCodeForm, TextInputProps['keyboardType']>\n> = {\n digits: 'number-pad',\n separated: Platform.OS === 'ios' ? 'numbers-and-punctuation' : undefined,\n}\n\n/**\n * The country a field's keyboard and choices follow.\n *\n * - The tax ID takes the tax residence's, which also names it in the heading.\n * - Every other field takes the address's.\n */\nexport function fieldCountry(\n field: FormField,\n countries: { address?: string; taxResidence?: string },\n): string | undefined {\n return field.id === 'TAX_IDENTIFIER'\n ? countries.taxResidence\n : countries.address\n}\n\n/** `country` is the field's own, from `fieldCountry`. */\nexport function fieldKeyboardType(\n field: FormField,\n country?: string,\n): TextInputProps['keyboardType'] | undefined {\n if (field.type !== 'TEXT') {\n return undefined\n }\n if (field.id === 'RESIDENTIAL_ADDRESS_POSTAL_CODE') {\n const form = postalCodeForm(country)\n return form === undefined ? undefined : POSTAL_CODE_KEYBOARD[form]\n }\n if (field.id === 'TAX_IDENTIFIER') {\n return taxIdentifierKeyboard(country)\n }\n return KEYBOARD_BY_ID[field.id]\n}\n\nconst DIGIT_TAX_IDENTIFIER_COUNTRIES: ReadonlySet<string> = new Set([\n 'US',\n 'BR',\n])\n\nfunction taxIdentifierKeyboard(\n country: string | undefined,\n): TextInputProps['keyboardType'] | undefined {\n if (\n country === undefined ||\n DIGIT_TAX_IDENTIFIER_COUNTRIES.has(country.toUpperCase())\n ) {\n return 'number-pad'\n }\n return undefined\n}\n\n/** Whether the field raises a pad rather than letters, and so has no return key. */\nexport function isDigitsField(field: FormField, country?: string): boolean {\n const keyboardType = fieldKeyboardType(field, country)\n return keyboardType !== undefined && PADS_WITHOUT_RETURN_KEY.has(keyboardType)\n}\n\n/** Whether the field is drawn at a fixed width rather than growing to fill. */\nexport function isFixedWidthField(field: FormField): boolean {\n return field.id === 'LEGAL_MIDDLE_NAME'\n}\n\n/**\n * The form's fields that no page draws.\n *\n * Type only: an unknown id has a page (`DETAILS`), so refusing one would\n * reject a whole form over a field the screens can draw perfectly well. A\n * form with any of these cannot be completed here, so the caller shows its\n * unsupported state rather than a form missing a field the server requires.\n */\nexport function unsupportedFields(fields: readonly FormField[]): FormField[] {\n return fields.filter((field) => !DRAWN_TYPES.has(field.type))\n}\n\n/**\n * Splits a form into the pages the design steps through.\n *\n * Pages keep the design's order; fields keep the server's, so a page that\n * gains a field it already draws renders it without a client release. A page\n * with no fields is not a page.\n */\nexport function sectionPages(fields: readonly FormField[]): KycSectionPage[] {\n const bySection = new Map<KycSection, FormField[]>()\n for (const field of fields) {\n if (!DRAWN_TYPES.has(field.type)) {\n continue\n }\n // A state the provider does not require is not asked: European\n // addresses have none, and the design draws no row for it.\n if (field.id === 'RESIDENTIAL_ADDRESS_REGION' && !field.required) {\n continue\n }\n const section = SECTION_BY_ID[field.id] ?? 'DETAILS'\n const collected = bySection.get(section) ?? []\n collected.push(field)\n bySection.set(section, collected)\n }\n\n return SECTION_ORDER.flatMap<KycSectionPage>((section) => {\n const collected = bySection.get(section)\n if (collected === undefined) {\n return []\n }\n if (isInlineChoiceSection(section) || section === 'DETAILS') {\n return collected.map((field) => ({\n section,\n grouped: false,\n rows: [[field]],\n }))\n }\n return [\n {\n section,\n grouped: GROUPED_SECTIONS.has(section),\n rows:\n section === 'ADDRESS'\n ? addressRows(collected)\n : collected.map((field) => [field]),\n },\n ]\n })\n}\n\n/**\n * The address card as the design lays it out for the country (1631:7256):\n * the street, the apartment line, then the city with the state and ZIP paired\n * under it \u2014 or, where the provider asks for no state, the postal code paired\n * before the city, as a European address reads. A field the design does not\n * place trails on its own row.\n */\nfunction addressRows(fields: readonly FormField[]): FormField[][] {\n const byId = new Map(fields.map((field) => [field.id, field]))\n const take = (id: KycFieldId) => {\n const field = byId.get(id)\n byId.delete(id)\n return field\n }\n const line1 = take('RESIDENTIAL_ADDRESS_LINE_1')\n const line2 = take('RESIDENTIAL_ADDRESS_LINE_2')\n const city = take('RESIDENTIAL_ADDRESS_CITY')\n const region = take('RESIDENTIAL_ADDRESS_REGION')\n const postal = take('RESIDENTIAL_ADDRESS_POSTAL_CODE')\n const rows: (FormField | undefined)[][] = [[line1], [line2]]\n if (region === undefined) {\n rows.push([postal, city])\n } else {\n rows.push([city], [region, postal])\n }\n return [...rows, ...[...byId.values()].map((field) => [field])]\n .map((row) => row.filter((field) => field !== undefined))\n .filter((row) => row.length > 0)\n}\n", "import type { TextInputProps } from 'react-native'\n\n/**\n * Keyboards with no return key. iOS draws a floating button of its own when\n * one of these is asked for a return key, and it lands over the screen's\n * bottom-right \u2014 where the advance control already is.\n */\nexport const PADS_WITHOUT_RETURN_KEY = new Set<TextInputProps['keyboardType']>([\n 'number-pad',\n 'numeric',\n 'decimal-pad',\n 'phone-pad',\n])\n", "/**\n * How a country writes its postal codes, where Google's address metadata\n * (libaddressinput, chromium-i18n.appspot.com/ssl-address/data) and\n * `postcode-validator` agree. Anywhere they disagree is on neither list, so\n * the keyboard stays letters (`postalCodeCountries.drift.test.ts`).\n *\n * - `digits`: codes are written as digits alone. The US ZIP+4 extension and\n * FR's space are optional, and neither is how the post office writes them.\n * - `separated`: digits the country writes split by a hyphen or space\n * (`12345-678`, `123 45`), which a number pad cannot type.\n * - A country whose codes carry any letter (GB, CA, NL, IE, AR, MT, LV\u2026), or\n * that has no postal code, is on neither list.\n */\nexport type PostalCodeForm = 'digits' | 'separated'\n\nconst codes = (list: string): ReadonlySet<string> =>\n new Set(list.trim().split(/\\s+/))\n\nconst DIGIT_COUNTRIES = codes(`\n AF AL AM AS AT AU AX AZ BA BD BE BG BH BL BT BY CC CH CL CN CO CU CV\n CX CY DE DK DO DZ EC EE EG EH ES ET FI FM FO FR GE GF GL GN GP GT GU\n GW HM HN HR HT HU ID IL IN IQ IS IT JO KE KG KH KR KW KZ LA LI LK LR\n LS LT LU MA MC MD ME MF MG MH MK MM MN MP MQ MV MX MY MZ NA NC NE NF\n NG NO NP NZ PF PG PH PK PM PR PW PY RE RO RS RU SA SD SG SI SJ SM SN\n TH TJ TM TN TR TW TZ UA UM US UY UZ VA VE VI VN WF XK YT ZA ZM\n`)\n\nconst SEPARATED_COUNTRIES = codes(`\n BR CR CZ GR IR JP LB PL PT SE SK\n`)\n\nexport function postalCodeForm(\n alpha2: string | undefined,\n): PostalCodeForm | undefined {\n const code = alpha2?.toUpperCase()\n if (code === undefined) {\n return undefined\n }\n if (DIGIT_COUNTRIES.has(code)) {\n return 'digits'\n }\n return SEPARATED_COUNTRIES.has(code) ? 'separated' : undefined\n}\n"],
5
- "mappings": ";AACA;AAAA,EAIE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkIH;AAfJ,IAAM,qBAAqB,cAA2C,MAAS;AAOxE,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AACF,GAGG;AACD,SACE,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,MACjC,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