@funkit/connect-rn 2.0.0 → 3.0.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 (78) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/index.d.ts +6 -2
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1988 -860
  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 +3 -0
  9. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  10. package/dist/src/flow/withdrawalFlowConfig.d.ts +68 -0
  11. package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -0
  12. package/dist/src/geo/useCheckoutBlocked.d.ts.map +1 -1
  13. package/dist/src/geo/useUserIpInfo.d.ts +2 -21
  14. package/dist/src/geo/useUserIpInfo.d.ts.map +1 -1
  15. package/dist/src/hooks/useScreenSize.d.ts +4 -0
  16. package/dist/src/hooks/useScreenSize.d.ts.map +1 -0
  17. package/dist/src/icons/FigmaSystemIcons.d.ts +1 -0
  18. package/dist/src/icons/FigmaSystemIcons.d.ts.map +1 -1
  19. package/dist/src/icons/FunIcon.d.ts.map +1 -1
  20. package/dist/src/icons/SourceTokenCluster.d.ts.map +1 -1
  21. package/dist/src/icons/StatusIcon.d.ts +2 -0
  22. package/dist/src/icons/StatusIcon.d.ts.map +1 -0
  23. package/dist/src/icons/TokenChainIcon.d.ts.map +1 -1
  24. package/dist/src/identity/IdentityContext.d.ts.map +1 -1
  25. package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
  26. package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
  27. package/dist/src/providers/useFunkitCheckout.d.ts +9 -3
  28. package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -1
  29. package/dist/src/screens/AvailableChainsScreen.d.ts +2 -1
  30. package/dist/src/screens/AvailableChainsScreen.d.ts.map +1 -1
  31. package/dist/src/screens/CheckoutBlockedScreen.d.ts.map +1 -1
  32. package/dist/src/screens/NetworkSelector.d.ts.map +1 -1
  33. package/dist/src/screens/QrCodeScreen.d.ts +10 -10
  34. package/dist/src/screens/QrCodeScreen.d.ts.map +1 -1
  35. package/dist/src/screens/SelectMethodScreen.d.ts.map +1 -1
  36. package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -1
  37. package/dist/src/screens/WithdrawMethodScreen.d.ts +30 -0
  38. package/dist/src/screens/WithdrawMethodScreen.d.ts.map +1 -0
  39. package/dist/src/statsig/useDynamicConfig.d.ts +6 -0
  40. package/dist/src/statsig/useDynamicConfig.d.ts.map +1 -0
  41. package/dist/src/swapped/SwappedScreen.d.ts +6 -14
  42. package/dist/src/swapped/SwappedScreen.d.ts.map +1 -1
  43. package/dist/src/swapped/SwappedScreenShell.d.ts +24 -0
  44. package/dist/src/swapped/SwappedScreenShell.d.ts.map +1 -0
  45. package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
  46. package/dist/src/swapped/SwappedWithdrawScreen.d.ts +20 -0
  47. package/dist/src/swapped/SwappedWithdrawScreen.d.ts.map +1 -0
  48. package/dist/src/swapped/buildSwappedTheme.d.ts +7 -4
  49. package/dist/src/swapped/buildSwappedTheme.d.ts.map +1 -1
  50. package/dist/src/swapped/webViewSwappedTransport.d.ts +8 -7
  51. package/dist/src/swapped/webViewSwappedTransport.d.ts.map +1 -1
  52. package/dist/src/theme/buildFunkitTheme.d.ts +192 -0
  53. package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -0
  54. package/dist/src/theme/restyle.d.ts +2818 -2224
  55. package/dist/src/theme/restyle.d.ts.map +1 -1
  56. package/dist/src/theme/themes.d.ts +34 -0
  57. package/dist/src/theme/themes.d.ts.map +1 -0
  58. package/dist/src/theme/toRestyleTheme.d.ts +257 -205
  59. package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
  60. package/dist/src/theme/tokens.d.ts +162 -139
  61. package/dist/src/theme/tokens.d.ts.map +1 -1
  62. package/dist/src/transfer/fops.d.ts +8 -0
  63. package/dist/src/transfer/fops.d.ts.map +1 -1
  64. package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts +11 -0
  65. package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts.map +1 -0
  66. package/dist/src/transfer/hooks/useFops.d.ts.map +1 -1
  67. package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
  68. package/dist/src/transfer/hooks/useUDAParams.d.ts +1 -1
  69. package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -1
  70. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts +39 -0
  71. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -0
  72. package/dist/src/utils/customers.d.ts +2 -0
  73. package/dist/src/utils/customers.d.ts.map +1 -0
  74. package/dist/src/withdrawal/publicClient.d.ts +10 -0
  75. package/dist/src/withdrawal/publicClient.d.ts.map +1 -0
  76. package/dist/src/withdrawal/useWithdrawalExecution.d.ts +21 -0
  77. package/dist/src/withdrawal/useWithdrawalExecution.d.ts.map +1 -0
  78. package/package.json +2 -2
@@ -0,0 +1,192 @@
1
+ import { type FunkitTokens } from './tokens';
2
+ /**
3
+ * Projects the nested Fun Variables {@link FunkitTokens} onto the object
4
+ * `@shopify/restyle`'s `createTheme` consumes — kept as a pure function (no
5
+ * Restyle import) so tests can build the theme without pulling Restyle's
6
+ * react-native Flow source into the node env.
7
+ *
8
+ * The design deliberately DOESN'T use Restyle's `colors` prop system: `colors`
9
+ * is empty and components read colors straight from the Figma-shaped groups
10
+ * (`theme.background.button.primary.default`, `theme.content.elements.primary`,
11
+ * …) via `useTheme()`, so the theme stays a faithful mirror of Figma. Only the
12
+ * non-color numeric buckets Restyle genuinely needs (`spacing`, `borderRadii`,
13
+ * `borderWidths`, `sizes`, `breakpoints`) are projected onto its reserved keys.
14
+ */
15
+ export declare function buildFunkitTheme(tokens: FunkitTokens): {
16
+ colors: {};
17
+ background: {
18
+ modal: string;
19
+ secondary: string;
20
+ button: {
21
+ primary: import("./tokens").ButtonSurface;
22
+ secondary: import("./tokens").ButtonSurface;
23
+ tertiary: import("./tokens").ButtonSurface;
24
+ icon: import("./tokens").ButtonSurface;
25
+ destructive: import("./tokens").ButtonSurface & {
26
+ disabled: string;
27
+ };
28
+ };
29
+ pill: {
30
+ default: string;
31
+ pressed: string;
32
+ disabled: string;
33
+ };
34
+ };
35
+ content: {
36
+ elements: {
37
+ primary: string;
38
+ secondary: string;
39
+ success: string;
40
+ error: string;
41
+ hyperlink: string;
42
+ warning: string;
43
+ };
44
+ button: {
45
+ primary: {
46
+ default: string;
47
+ loadingAlpha: string;
48
+ };
49
+ secondary: {
50
+ default: string;
51
+ loadingAlpha: string;
52
+ };
53
+ tertiary: {
54
+ default: string;
55
+ };
56
+ icon: {
57
+ default: string;
58
+ };
59
+ destructive: {
60
+ default: string;
61
+ loadingAlpha: string;
62
+ };
63
+ };
64
+ };
65
+ border: {
66
+ radius: {
67
+ modal: number;
68
+ element: number;
69
+ elementInner: number;
70
+ button: number;
71
+ };
72
+ modal: {
73
+ default: string;
74
+ weight: number;
75
+ };
76
+ elements: {
77
+ default: {
78
+ color: string;
79
+ weight: number;
80
+ };
81
+ selected: {
82
+ color: string;
83
+ weight: number;
84
+ };
85
+ };
86
+ button: {
87
+ primary: string;
88
+ secondary: string;
89
+ weight: number;
90
+ };
91
+ };
92
+ brand: {
93
+ primary: string;
94
+ };
95
+ opacity: {
96
+ disabled: number;
97
+ };
98
+ font: import("./tokens").FunkitFontTokens;
99
+ spacing: {
100
+ none: number;
101
+ elementsHorizontal: number;
102
+ modalHorizontal: number;
103
+ };
104
+ borderRadii: {
105
+ modal: number;
106
+ element: number;
107
+ elementInner: number;
108
+ button: number;
109
+ rounded: number;
110
+ };
111
+ borderWidths: {
112
+ modal: number;
113
+ elementsDefault: number;
114
+ elementsSelected: number;
115
+ button: number;
116
+ };
117
+ sizes: {
118
+ topBar: number;
119
+ buttonHeight: number;
120
+ buttonXs: number;
121
+ buttonSm: number;
122
+ buttonMd: number;
123
+ buttonLg: number;
124
+ iconXs: number;
125
+ iconSm: number;
126
+ iconMd: number;
127
+ iconLg: number;
128
+ };
129
+ breakpoints: {
130
+ phone: number;
131
+ tablet: number;
132
+ };
133
+ textVariants: {
134
+ defaults: {
135
+ fontSize: number;
136
+ lineHeight: number;
137
+ fontFamily: string;
138
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
139
+ };
140
+ body: {
141
+ fontSize: number;
142
+ lineHeight: number;
143
+ fontFamily: string;
144
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
145
+ };
146
+ bodyMedium: {
147
+ fontSize: number;
148
+ lineHeight: number;
149
+ fontFamily: string;
150
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
151
+ };
152
+ detail: {
153
+ fontSize: number;
154
+ lineHeight: number;
155
+ fontFamily: string;
156
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
157
+ };
158
+ headerTitle: {
159
+ fontSize: number;
160
+ textAlign: "auto" | "left" | "right" | "center" | "justify" | undefined;
161
+ fontFamily: string;
162
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
163
+ };
164
+ headerSubtitle: {
165
+ fontSize: number;
166
+ textAlign: "auto" | "left" | "right" | "center" | "justify" | undefined;
167
+ fontFamily: string;
168
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
169
+ };
170
+ amountInput: {
171
+ fontSize: number;
172
+ fontFamily: string;
173
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
174
+ };
175
+ amountSummary: {
176
+ fontSize: number;
177
+ fontFamily: string;
178
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
179
+ };
180
+ };
181
+ textWeights: {
182
+ base: {
183
+ fontFamily: string;
184
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
185
+ };
186
+ medium: {
187
+ fontFamily: string;
188
+ fontWeight: "medium" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
189
+ };
190
+ };
191
+ };
192
+ //# sourceMappingURL=buildFunkitTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildFunkitTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/buildFunkitTheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,UAAU,CAAA;AAYjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4GpD"}