@funkit/connect 11.4.1 → 11.6.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 (46) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/clients/{chunk-5MY7WMEJ.js → chunk-3U55HYGJ.js} +2 -2
  3. package/dist/clients/{chunk-BPDLF2R6.js → chunk-DSZHYQPX.js} +1 -1
  4. package/dist/clients/{chunk-UK64SY6N.js → chunk-DUBZPIDN.js} +1 -1
  5. package/dist/clients/{chunk-YUZ3B2Q3.js → chunk-LYZLETOM.js} +1 -1
  6. package/dist/clients/{chunk-BB5FHA47.js → chunk-SX3CX34W.js} +11 -10
  7. package/dist/clients/{chunk-UMU5S2WF.js → chunk-UPB4JKJG.js} +2 -2
  8. package/dist/clients/chunk-WCQ6HJ27.js +13 -0
  9. package/dist/clients/{chunk-C45VNQXY.js → chunk-WNZ6QV5Q.js} +8 -8
  10. package/dist/clients/{chunk-MSLPLXR2.js → chunk-ZQZDPRWC.js} +1 -1
  11. package/dist/clients/fanatics.js +6 -6
  12. package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
  13. package/dist/clients/internal/nado/withdrawalConfig.d.ts +4 -9
  14. package/dist/clients/internal/nado/withdrawalConfig.js +3 -6
  15. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  16. package/dist/clients/internal/nado/withdrawalForm.css +38 -38
  17. package/dist/clients/internal/nado/withdrawalForm.js +9 -34
  18. package/dist/clients/internal/nado/withdrawalStatus.d.ts +1 -15
  19. package/dist/clients/internal/nado/withdrawalStatus.js +11 -57
  20. package/dist/clients/lighter.css +216 -216
  21. package/dist/clients/lighter.js +4 -3
  22. package/dist/clients/mallard.js +2 -2
  23. package/dist/clients/nado.d.ts +1 -1
  24. package/dist/clients/nado.js +11 -9
  25. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +216 -216
  26. package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +6 -6
  27. package/dist/clients/polymarket/index.css +216 -216
  28. package/dist/clients/polymarket/index.js +6 -6
  29. package/dist/components/FunAlert/FunAlert.d.ts +3 -1
  30. package/dist/consts/funkit.d.ts +2 -0
  31. package/dist/hooks/track/analytics/events.d.ts +21 -0
  32. package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +24 -1
  33. package/dist/hooks/useSwappedTheme.d.ts +3 -0
  34. package/dist/index.css +49 -49
  35. package/dist/index.js +12408 -12236
  36. package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +3 -1
  37. package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +3 -1
  38. package/dist/providers/FunkitProvider.d.ts +1 -0
  39. package/dist/shadow/adoptStyles.d.ts +5 -0
  40. package/dist/shadow-css.d.ts +1 -0
  41. package/dist/shadow-css.js +2 -0
  42. package/dist/utils/swapped.d.ts +8 -6
  43. package/dist/wallets/walletConnectors/index.js +25 -25
  44. package/package.json +9 -4
  45. package/shadow-css/package.json +3 -0
  46. package/dist/clients/chunk-TYG42JRZ.js +0 -40
@@ -2,14 +2,16 @@ import type { SwappedTheme } from '@funkit/connect-core';
2
2
  import type { ThemeVars } from '../css/sprinkles.css';
3
3
  export { getFormOfPaymentDisplayName, getSavedFormOfPaymentDisplayName, getSavedFormOfPaymentIcon, getSwappedIcon, getSwappedOrigin, isSavedFormOfPaymentType, isSwappedOrigin, SWAPPED_CARD_BRANDS, } from '@funkit/connect-core';
4
4
  export type { SwappedTheme };
5
- export declare function resolveCssValue(value: string): string;
6
- export declare function resolveObjectCssVars<T extends object>(obj: T): T;
5
+ export declare function resolveCssValue(value: string, scope: Element | null): string;
6
+ export declare function resolveObjectCssVars<T extends object>(obj: T, scope: Element | null): T;
7
7
  /**
8
8
  * Builds the SwappedTheme payload from a ThemeVars object. Pure — it does not
9
- * touch the DOM, so it is safe to share across platforms. The returned values
10
- * may still contain `var(...)` / `calc(var(...))` references: web callers must
11
- * resolve them with {@link resolveObjectCssVars} before sending to the Swapped
12
- * embed; non-web callers must pass already-concrete values.
9
+ * touch the DOM, so it is safe to share across platforms.
10
+ *
11
+ * Pass an already-resolved theme: `topbarPaddingX` is composed as
12
+ * `calc(<token> + 6px)`, and {@link resolveCssValue} only matches values that
13
+ * are entirely a `var(...)` ref, so anything wrapped in `calc()` here can no
14
+ * longer be resolved afterwards. Web callers use {@link resolveObjectCssVars}.
13
15
  */
14
16
  export declare function buildSwappedTheme(theme: ThemeVars & {
15
17
  customFontFamily?: {
@@ -54,29 +54,32 @@ import {
54
54
  subWallet
55
55
  } from "./chunk-NR2OGDHQ.js";
56
56
  import {
57
- ledgerWallet
58
- } from "./chunk-RPV27V2Y.js";
57
+ metaMaskWallet
58
+ } from "./chunk-YO2K4MBH.js";
59
59
  import {
60
60
  mewWallet
61
61
  } from "./chunk-MQM45ADF.js";
62
62
  import {
63
63
  oktoWallet
64
64
  } from "./chunk-YWOVAU6O.js";
65
- import {
66
- omniWallet
67
- } from "./chunk-2CX7LX4J.js";
68
65
  import {
69
66
  okxWallet
70
67
  } from "./chunk-KI5Y2BBF.js";
68
+ import {
69
+ omniWallet
70
+ } from "./chunk-2CX7LX4J.js";
71
71
  import {
72
72
  oneInchWallet
73
73
  } from "./chunk-QG6ZHI7B.js";
74
+ import {
75
+ oneKeyWallet
76
+ } from "./chunk-WVT6BBJH.js";
74
77
  import {
75
78
  phantomWallet
76
79
  } from "./chunk-QY53O7WG.js";
77
80
  import {
78
- oneKeyWallet
79
- } from "./chunk-WVT6BBJH.js";
81
+ enkryptWallet
82
+ } from "./chunk-HBQK5RD5.js";
80
83
  import {
81
84
  frameWallet
82
85
  } from "./chunk-BU3ZAT5X.js";
@@ -87,20 +90,20 @@ import {
87
90
  gateWallet
88
91
  } from "./chunk-JPN6TWIT.js";
89
92
  import {
90
- coinbaseWallet
91
- } from "./chunk-2DLDAZRH.js";
93
+ imTokenWallet
94
+ } from "./chunk-WNAGGFMG.js";
92
95
  import {
93
96
  injectedWallet
94
97
  } from "./chunk-T6LGKC3F.js";
95
- import {
96
- imTokenWallet
97
- } from "./chunk-WNAGGFMG.js";
98
98
  import {
99
99
  kresusWallet
100
100
  } from "./chunk-RICTB3FA.js";
101
101
  import {
102
- metaMaskWallet
103
- } from "./chunk-YO2K4MBH.js";
102
+ ledgerWallet
103
+ } from "./chunk-RPV27V2Y.js";
104
+ import {
105
+ bybitWallet
106
+ } from "./chunk-OX37G4YT.js";
104
107
  import {
105
108
  clvWallet
106
109
  } from "./chunk-OEEGYENV.js";
@@ -108,8 +111,8 @@ import {
108
111
  coin98Wallet
109
112
  } from "./chunk-WAHGI5L7.js";
110
113
  import {
111
- bybitWallet
112
- } from "./chunk-OX37G4YT.js";
114
+ coinbaseWallet
115
+ } from "./chunk-2DLDAZRH.js";
113
116
  import {
114
117
  coreWallet
115
118
  } from "./chunk-4NV5BYRP.js";
@@ -119,24 +122,21 @@ import {
119
122
  import {
120
123
  desigWallet
121
124
  } from "./chunk-FW3WZETT.js";
122
- import {
123
- enkryptWallet
124
- } from "./chunk-HBQK5RD5.js";
125
125
  import {
126
126
  foxWallet
127
127
  } from "./chunk-GUQM4QSL.js";
128
- import {
129
- bitgetWallet
130
- } from "./chunk-TKB2OY6G.js";
131
128
  import {
132
129
  argentWallet
133
130
  } from "./chunk-NTMBEOR2.js";
134
- import {
135
- bitskiWallet
136
- } from "./chunk-7HRFUZFX.js";
137
131
  import {
138
132
  bifrostWallet
139
133
  } from "./chunk-IULPZP2Q.js";
134
+ import {
135
+ bitgetWallet
136
+ } from "./chunk-TKB2OY6G.js";
137
+ import {
138
+ bitskiWallet
139
+ } from "./chunk-7HRFUZFX.js";
140
140
  import {
141
141
  bitverseWallet
142
142
  } from "./chunk-NSK6A7TI.js";
package/package.json CHANGED
@@ -1,17 +1,22 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "11.4.1",
3
+ "version": "11.6.0",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
7
7
  "styles.css",
8
8
  "wallets",
9
+ "shadow-css",
9
10
  "CHANGELOG.md"
10
11
  ],
11
12
  "type": "module",
12
13
  "exports": {
13
14
  ".": "./dist/index.js",
14
15
  "./styles.css": "./dist/index.css",
16
+ "./shadow-css": {
17
+ "types": "./dist/shadow-css.d.ts",
18
+ "default": "./dist/shadow-css.js"
19
+ },
15
20
  "./wallets": "./dist/wallets/walletConnectors/index.js",
16
21
  "./clients/internal/*": null,
17
22
  "./clients/*": "./dist/clients/*.js",
@@ -106,10 +111,10 @@
106
111
  "ua-parser-js": "^1.0.37",
107
112
  "use-debounce": "^10.0.5",
108
113
  "uuid": "^11.1.1",
109
- "@funkit/api-base": "7.1.1",
114
+ "@funkit/api-base": "7.2.0",
110
115
  "@funkit/chains": "2.2.0",
111
- "@funkit/connect-core": "4.0.0",
112
- "@funkit/fun-relay": "2.13.0",
116
+ "@funkit/connect-core": "4.1.1",
117
+ "@funkit/fun-relay": "2.14.1",
113
118
  "@funkit/utils": "4.0.1"
114
119
  },
115
120
  "repository": {
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../dist/shadow-css.js"
3
+ }
@@ -1,40 +0,0 @@
1
- "use client";
2
- import {
3
- isCustomWithdrawalConfig
4
- } from "./chunk-B7UU2ETA.js";
5
- import {
6
- logger
7
- } from "./chunk-AHYOV7AV.js";
8
-
9
- // src/clients/internal/nado/withdrawalConfig.ts
10
- import {
11
- buildNadoSubaccountId
12
- } from "@funkit/connect-core/clients/nado";
13
- var HEX_SHAPED_SUBACCOUNT_NAME = /^(?:[0-9a-f]{2})+$/i;
14
- function isNadoWithdrawalConfig(config) {
15
- return !!config && isCustomWithdrawalConfig(config) && config.customerConfig?.customerName === "nado";
16
- }
17
- function resolveNadoSubaccount(walletAddress, subaccountName) {
18
- if (!walletAddress) {
19
- return void 0;
20
- }
21
- if (subaccountName && HEX_SHAPED_SUBACCOUNT_NAME.test(subaccountName)) {
22
- logger.warn("nado:withdrawal:hexShapedSubaccountName", {
23
- name: subaccountName
24
- });
25
- }
26
- try {
27
- return buildNadoSubaccountId(walletAddress, subaccountName);
28
- } catch (err) {
29
- const error = err instanceof Error ? err : new Error(String(err));
30
- logger.error("nado:withdrawal:invalidSubaccountName", error, {
31
- name: subaccountName
32
- });
33
- return void 0;
34
- }
35
- }
36
-
37
- export {
38
- isNadoWithdrawalConfig,
39
- resolveNadoSubaccount
40
- };