@funkit/connect-rn 2.1.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/dist/index.d.ts +6 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1433 -843
  5. package/dist/index.js.map +4 -4
  6. package/dist/src/flow/AddressCopiedToast.d.ts +4 -3
  7. package/dist/src/flow/AddressCopiedToast.d.ts.map +1 -1
  8. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  9. package/dist/src/geo/useCheckoutBlocked.d.ts.map +1 -1
  10. package/dist/src/geo/useUserIpInfo.d.ts +2 -21
  11. package/dist/src/geo/useUserIpInfo.d.ts.map +1 -1
  12. package/dist/src/history/useCheckoutsListenerByUserId.d.ts +19 -0
  13. package/dist/src/history/useCheckoutsListenerByUserId.d.ts.map +1 -0
  14. package/dist/src/history/useRecentDeposits.d.ts +36 -0
  15. package/dist/src/history/useRecentDeposits.d.ts.map +1 -0
  16. package/dist/src/icons/FunIcon.d.ts.map +1 -1
  17. package/dist/src/icons/PaymentBrandIcons.d.ts +9 -0
  18. package/dist/src/icons/PaymentBrandIcons.d.ts.map +1 -1
  19. package/dist/src/icons/PaymentMethodIcon.d.ts +5 -0
  20. package/dist/src/icons/PaymentMethodIcon.d.ts.map +1 -0
  21. package/dist/src/icons/QrChainCluster.d.ts.map +1 -1
  22. package/dist/src/icons/SourceTokenCluster.d.ts.map +1 -1
  23. package/dist/src/icons/StatusIcon.d.ts +2 -0
  24. package/dist/src/icons/StatusIcon.d.ts.map +1 -0
  25. package/dist/src/icons/TokenChainIcon.d.ts.map +1 -1
  26. package/dist/src/identity/IdentityContext.d.ts.map +1 -1
  27. package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
  28. package/dist/src/screens/AvailableChainsScreen.d.ts +3 -3
  29. package/dist/src/screens/AvailableChainsScreen.d.ts.map +1 -1
  30. package/dist/src/screens/CheckoutBlockedScreen.d.ts.map +1 -1
  31. package/dist/src/screens/NetworkSelector.d.ts.map +1 -1
  32. package/dist/src/screens/QrCodeScreen.d.ts.map +1 -1
  33. package/dist/src/screens/SelectMethodScreen.d.ts.map +1 -1
  34. package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -1
  35. package/dist/src/statsig/useDynamicConfig.d.ts +6 -0
  36. package/dist/src/statsig/useDynamicConfig.d.ts.map +1 -0
  37. package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
  38. package/dist/src/swapped/buildSwappedTheme.d.ts +7 -4
  39. package/dist/src/swapped/buildSwappedTheme.d.ts.map +1 -1
  40. package/dist/src/theme/buildFunkitTheme.d.ts +192 -0
  41. package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -0
  42. package/dist/src/theme/restyle.d.ts +2818 -2224
  43. package/dist/src/theme/restyle.d.ts.map +1 -1
  44. package/dist/src/theme/themes.d.ts +34 -0
  45. package/dist/src/theme/themes.d.ts.map +1 -0
  46. package/dist/src/theme/toRestyleTheme.d.ts +257 -205
  47. package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
  48. package/dist/src/theme/tokens.d.ts +162 -139
  49. package/dist/src/theme/tokens.d.ts.map +1 -1
  50. package/dist/src/transfer/fops.d.ts +0 -2
  51. package/dist/src/transfer/fops.d.ts.map +1 -1
  52. package/dist/src/transfer/hooks/useFops.d.ts.map +1 -1
  53. package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
  54. package/dist/src/transfer/hooks/useUDAParams.d.ts +1 -1
  55. package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -1
  56. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -1
  57. package/dist/src/utils/customers.d.ts +2 -0
  58. package/dist/src/utils/customers.d.ts.map +1 -0
  59. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,76 @@
1
1
  # @funkit/connect-rn
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 407d80a: feat(connect-rn): expose recent-deposits and checkouts-by-user history/polling hooks
8
+
9
+ ### Patch Changes
10
+
11
+ - 2a52f59: Leave a 50px gap below the payment-method list on the Add money / Withdraw sheets.
12
+ - b045af6: Fade the available-chains list edges when it overflows, hinting at off-screen rows.
13
+ - 409dca4: Match web for the payment-method rows: transparent theme-aware FOP icons, local
14
+ vector marks for saved cards, and shared display-name titles.
15
+ - 7a07ff1: Show the real card limit on payment-method rows instead of a placeholder.
16
+ - 22822f3: Tighten the deposit QR chain-icon cluster so it occludes fewer modules and the icons keep clean padding.
17
+ - 6ca6ea0: Render Visa, JCB, and UnionPay logos on saved cards instead of a generic glyph.
18
+ - 38c309b: Keep a 16px gap above the home indicator on the deposit and available-chains bottom buttons.
19
+ - Updated dependencies [3a2e779]
20
+ - Updated dependencies [8ac239a]
21
+ - @funkit/connect-core@2.2.0
22
+
23
+ ## 3.0.0
24
+
25
+ ### Major Changes
26
+
27
+ - 6fb8531: Rework the theme tokens to strictly mirror the Figma "Fun Variables" export.
28
+
29
+ `FunkitTokens` is now a nested tree matching Figma's variable groups
30
+ (`background` / `content` / `border` / `font` / `spacing` / `brand` / `button` /
31
+ `opacity`) instead of the previous flat groups, and only reflects states that
32
+ exist in the design (`default` / `pressed` / some `disabled`). The Restyle theme
33
+ no longer exposes a flat `colors` bucket — colors are read from the nested
34
+ groups via `useTheme()`.
35
+
36
+ **Breaking changes / migration:**
37
+
38
+ - **`FunkitColorTokens` is removed.** There is no flat color type or `colors`
39
+ bucket. Read colors from the nested groups, e.g. `theme.background.modal`,
40
+ `theme.content.elements.primary`, `theme.background.button.primary.default`.
41
+ - **`FunkitTokens` is restructured** into the nested Figma groups. Code that
42
+ built or spread `FunkitTokens` (e.g. `tokens.colors`, `tokens.radii`,
43
+ `tokens.sizes`, `tokens.fonts`) must move to the new shape
44
+ (`tokens.background`/`content`/`border.radius`/`button`/`font`, …).
45
+ - **`fonts` → `font`**, now split into `body` / `header` with Figma style-name
46
+ weights (`Regular` / `Medium`); `fontFamilyForWeight(family, styleName)`
47
+ replaces the old `(fonts, weight)` signature. New exports: `ButtonSurface`,
48
+ `FunkitFontStyleName`, `FONT_STYLE_CSS_WEIGHT`.
49
+ - Components should set colors via `style` from `useTheme()` rather than Restyle
50
+ color-string props (`backgroundColor="…"`), which no longer resolve.
51
+
52
+ ### Minor Changes
53
+
54
+ - 5867170: Add `lightTheme(override?)` / `darkTheme(override?)` theme factories and the
55
+ `FunkitTokensOverride` type, mirroring web's `@funkit/connect` theme API.
56
+ Consumers build a brand theme by passing a deep-partial override of the nested
57
+ `FunkitTokens` groups — deep-merged onto the built-in light/dark tokens — instead
58
+ of assembling a full token object by hand.
59
+
60
+ ### Patch Changes
61
+
62
+ - 20c27a4: Use the raw `externalUserId` as the Funkit `userId` for Mallard instead of pipe-joining it with the apiKey. Mallard supplies the wallet address as `externalUserId` and expects it passed through unprefixed.
63
+ - 30b1e1d: Fix the Add money list flashing crypto-only during Statsig init: `FunkitFlowProvider` now holds the skeleton on `useStatsigClient().isLoading`, since while Statsig initializes the `enableswappeddeposit` gate reads its `false` fallback (indistinguishable from a genuinely-off gate).
64
+ - a4a146d: `FunkitProvider`'s `debug` prop now defaults to `__DEV__`: React Native debug builds echo every log record to the console (Metro terminal) and run Statsig in the dev environment tier, matching the web SDK's `debug` semantics. Release builds are unchanged; pass `debug={false}` to force production behavior in a dev build.
65
+ - e0bcdb7: Resolve country-conditional Statsig variant configs against the user's IP country: new RN `useDynamicConfig` wrapper (mirroring the web SDK's) threads `alpha2` into core config resolution for all connect-rn call sites.
66
+ - dd503cd: Show the status icon on the unavailable / error message states, matching the
67
+ geo-blocked screen.
68
+ - dad6cb2: Move the duplicated Moonpay→ipapi IP-country lookup into a shared `useUserIpInfo` hook in `@funkit/connect-core`; web and RN keep thin wrappers injecting their `logger`, `enabled` gate, and `staleTime`. Public API and web behavior unchanged.
69
+ - Updated dependencies [0755d6b]
70
+ - Updated dependencies [96f35d1]
71
+ - Updated dependencies [dad6cb2]
72
+ - @funkit/connect-core@2.1.0
73
+
3
74
  ## 2.1.0
4
75
 
5
76
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  export type { CheckoutTokenTransferConfig, SwappedSellOrderData, WithdrawalClient, WithdrawalTransaction, } from '@funkit/connect-core';
2
2
  export { darkTokens, fontFamilyForWeight, lightTokens, } from './src/theme/tokens';
3
- export type { FunkitColorTokens, FunkitFontTokens, FunkitFontWeight, FunkitTokens, } from './src/theme/tokens';
3
+ export type { ButtonSurface, FunkitFontStyleName, FunkitFontTokens, FunkitFontWeight, FunkitTokens, } from './src/theme/tokens';
4
4
  export { defaultDarkTheme, defaultLightTheme, toRestyleTheme, } from './src/theme/toRestyleTheme';
5
5
  export type { FunkitTheme } from './src/theme/toRestyleTheme';
6
+ export { darkTheme, lightTheme } from './src/theme/themes';
7
+ export type { FunkitTokensOverride } from './src/theme/themes';
6
8
  export { normalizeColorScheme, resolveColorScheme, useColorScheme, } from './src/theme/useColorScheme';
7
9
  export type { ColorScheme, SystemColorScheme } from './src/theme/useColorScheme';
8
10
  export { useFunkitTheme } from './src/theme/useFunkitTheme';
@@ -18,6 +20,9 @@ export type { FunkitProviderProps } from './src/providers/FunkitProvider';
18
20
  export type { FunkitConfig } from './src/identity/IdentityContext';
19
21
  export { useFunkitCheckout } from './src/providers/useFunkitCheckout';
20
22
  export type { FunkitCheckoutCallbacks } from './src/providers/useFunkitCheckout';
23
+ export { useFunkitRecentDeposits } from './src/history/useRecentDeposits';
24
+ export { useCheckoutsListenerByUserId } from './src/history/useCheckoutsListenerByUserId';
25
+ export type { PurifiedCheckoutHistoryItem } from '@funkit/connect-core';
21
26
  export type { DepositFlowCallbacks, DepositFlowConfig, DynamicTargetAssetCandidate, } from './src/flow/depositFlowConfig';
22
27
  export type { WithdrawalFlowCallbacks, WithdrawalFlowConfig, WithdrawalToken, } from './src/flow/withdrawalFlowConfig';
23
28
  export type { PaymentMethodOption, ReceiveTokenOption, } from './src/screens/SelectMethodScreen';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAkBA,YAAY,EACV,2BAA2B,EAC3B,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,WAAW,GACZ,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,GACf,MAAM,4BAA4B,CAAA;AACnC,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAG7D,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACf,MAAM,4BAA4B,CAAA;AACnC,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAGhF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAGhE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAKpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,YAAY,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAG5E,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,iCAAiC,CAAA;AACxC,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAG/E,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,YAAY,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAIzE,YAAY,EA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