@directcryptopay/sdk 0.2.2 → 0.2.3

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 (228) hide show
  1. package/dist/ExchangeController-CPMQq6Q-.js +217 -0
  2. package/dist/HelpersUtil-DfMFC7Bf.js +120 -0
  3. package/dist/NavigationUtil-kj9LEOOd.js +8 -0
  4. package/dist/PhArrowCircleDown-lsK25DCk.js +73 -0
  5. package/dist/PhArrowClockwise-NeKHZ1co.js +73 -0
  6. package/dist/PhArrowDown-C9AkNvLs.js +73 -0
  7. package/dist/PhArrowLeft-RNfIQP1X.js +73 -0
  8. package/dist/PhArrowRight-DM1tna0G.js +73 -0
  9. package/dist/PhArrowSquareOut-S5XYbAZj.js +73 -0
  10. package/dist/PhArrowUp-DmktzOWy.js +73 -0
  11. package/dist/PhArrowUpRight-BkNeW_5i.js +73 -0
  12. package/dist/PhArrowsClockwise-CQ4pG76b.js +73 -0
  13. package/dist/PhArrowsDownUp-H6gxaNM6.js +73 -0
  14. package/dist/PhArrowsLeftRight-DZSsfMR6.js +73 -0
  15. package/dist/PhBank-4_9QzqIB.js +73 -0
  16. package/dist/PhBrowser-B-JSznId.js +73 -0
  17. package/dist/PhCaretDown-vV5oHMNi.js +73 -0
  18. package/dist/PhCaretLeft-BLo6Y_f4.js +73 -0
  19. package/dist/PhCaretRight-CqQN4TT3.js +73 -0
  20. package/dist/PhCaretUp-Df7UCAHy.js +73 -0
  21. package/dist/PhCheck-gtpfK4ed.js +73 -0
  22. package/dist/PhCircleHalf-Uq7dwDYw.js +73 -0
  23. package/dist/PhClock-SDCW-NmF.js +73 -0
  24. package/dist/PhCompass-B7hgtdx-.js +73 -0
  25. package/dist/PhCopy-BcnhyXCy.js +73 -0
  26. package/dist/PhCreditCard-BJjByVgu.js +73 -0
  27. package/dist/PhCurrencyDollar-B7ZXqXBy.js +73 -0
  28. package/dist/PhDesktop-B3VKPuJx.js +73 -0
  29. package/dist/PhDeviceMobile-Bnd0TYEH.js +73 -0
  30. package/dist/PhDotsThree-yyMWyZ-R.js +73 -0
  31. package/dist/PhEnvelope-67uzHbI9.js +73 -0
  32. package/dist/PhFunnelSimple-B-DCsloI.js +73 -0
  33. package/dist/PhGlobe-TMm_6qGk.js +73 -0
  34. package/dist/PhIdentificationCard-CePPD2xc.js +73 -0
  35. package/dist/PhImage-gY96WtHR.js +73 -0
  36. package/dist/PhInfo-DRQM_ZDP.js +73 -0
  37. package/dist/PhLightbulb-B0TxPfZ1.js +73 -0
  38. package/dist/PhMagnifyingGlass-B8si5_6W.js +73 -0
  39. package/dist/PhPaperPlaneRight-DVu5PLYd.js +73 -0
  40. package/dist/PhPlus-BfTsQnUz.js +73 -0
  41. package/dist/PhPower-CxYUGOWn.js +73 -0
  42. package/dist/PhPuzzlePiece-CQ4wh0gV.js +73 -0
  43. package/dist/PhQrCode-BuJ97NYJ.js +73 -0
  44. package/dist/PhQuestion-kJoP8Mja.js +73 -0
  45. package/dist/PhQuestionMark-C46ZkFpu.js +73 -0
  46. package/dist/PhSealCheck-Eh8jVqSN.js +73 -0
  47. package/dist/PhSignOut-jk97OSVt.js +73 -0
  48. package/dist/PhSpinner-CiYOhwMg.js +73 -0
  49. package/dist/PhTrash-pxerMqzd.js +73 -0
  50. package/dist/PhUser-BMg0VV4A.js +73 -0
  51. package/dist/PhVault-DYQvx5A-.js +73 -0
  52. package/dist/PhWarning-NLC5Mj87.js +73 -0
  53. package/dist/PhWarningCircle-Ch2jU9fA.js +73 -0
  54. package/dist/PhX-Bx4wpwm3.js +73 -0
  55. package/dist/SwapController-Cti0Cyxa.js +457 -0
  56. package/dist/{ccip-BIGqktC1.js → ccip-CKZd2XJ7.js} +4 -4
  57. package/dist/data-capture-7D5CL385.js +490 -0
  58. package/dist/dcp-sdk.umd.js +7400 -6589
  59. package/dist/email-AmK0INbZ.js +344 -0
  60. package/dist/embedded-wallet-Pn0I_XLn.js +820 -0
  61. package/dist/features-x8XNprEe.js +274 -0
  62. package/dist/{hashTypedData-ZH9ZnWu3.js → hashTypedData-B50-z0AA.js} +6 -6
  63. package/dist/if-defined-CdZSZ6UL.js +10 -0
  64. package/dist/index-4ewUtPPp.js +7981 -0
  65. package/dist/{index-D6h-qfpt.js → index-51l86yqx.js} +5 -5
  66. package/dist/index-B6K56LF_.js +85 -0
  67. package/dist/index-BAmv9PxJ.js +257 -0
  68. package/dist/index-BEswjY9r.js +117 -0
  69. package/dist/index-BSKRq56S.js +355 -0
  70. package/dist/index-BaygXQxx.js +172 -0
  71. package/dist/index-BcPxaHr5.js +118 -0
  72. package/dist/index-Bjt7nGaJ.js +199 -0
  73. package/dist/{index-D5r0iSq4.js → index-BkTSyAJb.js} +1 -1
  74. package/dist/index-Bmnl7l2U.js +555 -0
  75. package/dist/index-BvPvouSq.js +56 -0
  76. package/dist/index-C-6iznUO.js +174 -0
  77. package/dist/index-C4M5s_AM.js +228 -0
  78. package/dist/index-CEqcN8QP.js +1175 -0
  79. package/dist/{index-CPTcEPbD.js → index-CM3YaYca.js} +296 -298
  80. package/dist/{index-f3LXSfM5.js → index-CclBLA5r.js} +56 -142
  81. package/dist/index-ChTxJOiF.js +46 -0
  82. package/dist/index-CmAv0Tzr.js +86 -0
  83. package/dist/index-CmvoKY4x.js +125 -0
  84. package/dist/{index-BdSIrl-R.js → index-D7PmdQ9B.js} +578 -570
  85. package/dist/{index-DobBVPe4.js → index-D7k2Pc4e.js} +481 -236
  86. package/dist/index-D7lmgqUR.js +153 -0
  87. package/dist/index-DG_-qYze.js +107 -0
  88. package/dist/{index-Dy4NyE6l.js → index-DHot9Fdb.js} +7 -7
  89. package/dist/index-DV2LrPtU.js +123 -0
  90. package/dist/index-DYBaJQ2W.js +65 -0
  91. package/dist/{index-BJ7cbG3N.js → index-D_8VUmn1.js} +36688 -40208
  92. package/dist/index-D_gLn3rT.js +100 -0
  93. package/dist/index-DqcVUSC9.js +62 -0
  94. package/dist/index-I7VDqINw.js +128 -0
  95. package/dist/index-Oz72I9VP.js +209 -0
  96. package/dist/index-UclsHkJ0.js +118 -0
  97. package/dist/index-X8zir_1j.js +110 -0
  98. package/dist/index-XvlWKGCu.js +1281 -0
  99. package/dist/index-dO97xPlt.js +171 -0
  100. package/dist/{index-5mp7WkhV.js → index-uBeF6OAB.js} +2 -2
  101. package/dist/index-zeA_RiCV.js +159 -0
  102. package/dist/index.js +1 -1
  103. package/dist/{localBatchGatewayRequest-CjGcn5nM.js → localBatchGatewayRequest-BUZHGdjw.js} +1 -1
  104. package/dist/onramp-CdnBuF0r.js +855 -0
  105. package/dist/{parseSignature-S8VEpRHC.js → parseSignature-CcyTNGr4.js} +2312 -2313
  106. package/dist/pay-with-exchange-CSM6WCOV.js +525 -0
  107. package/dist/property-Bd8U3_QP.js +618 -0
  108. package/dist/receive-DooMu4Dx.js +232 -0
  109. package/dist/ref-CpgjXAw7.js +107 -0
  110. package/dist/send-3T7CyYic.js +1166 -0
  111. package/dist/socials-Dt-iHL17.js +620 -0
  112. package/dist/swaps-CjA9Es42.js +1760 -0
  113. package/dist/{transactions-DujFkB-M.js → transactions-nRm9DVzn.js} +10 -10
  114. package/dist/w3m-modal-NV25AXhM.js +1706 -0
  115. package/package.json +3 -3
  116. package/dist/ConstantsUtil-B-_-u8aQ.js +0 -6
  117. package/dist/add-sji6scSD.js +0 -19
  118. package/dist/all-wallets-B4H-890E.js +0 -10
  119. package/dist/app-store-Z433s97G.js +0 -21
  120. package/dist/apple-b8Lxj7nb.js +0 -22
  121. package/dist/arrow-bottom-M9oWWo_9.js +0 -12
  122. package/dist/arrow-bottom-circle-N9c4CXY1.js +0 -15
  123. package/dist/arrow-left-Dw8AKfwf.js +0 -12
  124. package/dist/arrow-right-DwLQZSC_.js +0 -12
  125. package/dist/arrow-top-zhUjkBe1.js +0 -12
  126. package/dist/bank-CbQdnILK.js +0 -18
  127. package/dist/browser-xAqNwt7z.js +0 -18
  128. package/dist/card-Dr1QBmWp.js +0 -18
  129. package/dist/checkmark-BhT1dTgG.js +0 -15
  130. package/dist/checkmark-bold-CPB29wqQ.js +0 -12
  131. package/dist/chevron-bottom-BhNyx2II.js +0 -12
  132. package/dist/chevron-left-CGuEjQlY.js +0 -12
  133. package/dist/chevron-right-CvIRRsqZ.js +0 -12
  134. package/dist/chevron-top-RSzCqjBd.js +0 -12
  135. package/dist/chrome-store-Cs8dAgs0.js +0 -65
  136. package/dist/clock-fhZO5otC.js +0 -12
  137. package/dist/close-BPuztrdR.js +0 -12
  138. package/dist/coinPlaceholder-C8X2i7Kh.js +0 -12
  139. package/dist/compass-WMc5huk0.js +0 -12
  140. package/dist/copy-DVAeT17y.js +0 -19
  141. package/dist/cursor-BJ4YLXfy.js +0 -7
  142. package/dist/cursor-transparent-DN2fLQN4.js +0 -16
  143. package/dist/desktop-6avxisBw.js +0 -13
  144. package/dist/disconnect-AReVI8Gk.js +0 -12
  145. package/dist/discord-CxrI30BZ.js +0 -21
  146. package/dist/email-B8dIIaay.js +0 -696
  147. package/dist/embedded-wallet-C_5hF7rM.js +0 -468
  148. package/dist/etherscan-BnAy8cIF.js +0 -10
  149. package/dist/exclamation-triangle-Bu7nHwx9.js +0 -8
  150. package/dist/extension-F0LIhvcf.js +0 -12
  151. package/dist/external-link-CP6phyaM.js +0 -12
  152. package/dist/facebook-BtQ-Io2y.js +0 -30
  153. package/dist/farcaster-BmaN1ugd.js +0 -16
  154. package/dist/filters-DpEwoOmy.js +0 -12
  155. package/dist/github-q7qO9V-b.js +0 -22
  156. package/dist/google-DH_ZE8bW.js +0 -22
  157. package/dist/help-circle-BAQVmKas.js +0 -16
  158. package/dist/id-Cj68Zwgo.js +0 -16
  159. package/dist/if-defined-CNte9B3N.js +0 -744
  160. package/dist/image-BKJDw6N-.js +0 -8
  161. package/dist/index-7toZMdtG.js +0 -573
  162. package/dist/index-B1uKzdvN.js +0 -170
  163. package/dist/index-BHFZVF-b.js +0 -257
  164. package/dist/index-BKwa5JSA.js +0 -559
  165. package/dist/index-BP4B9VUt.js +0 -54
  166. package/dist/index-BVdzXHpO.js +0 -181
  167. package/dist/index-BYND0GJ9.js +0 -146
  168. package/dist/index-BaJ0zEbh.js +0 -97
  169. package/dist/index-Bh0MPFwP.js +0 -58
  170. package/dist/index-Bsh7_qTp.js +0 -511
  171. package/dist/index-BwnXTNNg.js +0 -199
  172. package/dist/index-C0kPDbg_.js +0 -77
  173. package/dist/index-CKikVKe2.js +0 -75
  174. package/dist/index-ChVh0Hkp.js +0 -243
  175. package/dist/index-Cle_NnnS.js +0 -305
  176. package/dist/index-CmWdvIFT.js +0 -51
  177. package/dist/index-D2AMA8Bu.js +0 -65
  178. package/dist/index-DAUM8CO4.js +0 -65
  179. package/dist/index-DGjZW6uR.js +0 -78
  180. package/dist/index-DQe94z7X.js +0 -265
  181. package/dist/index-DTo6w99t.js +0 -7864
  182. package/dist/index-DYdXjap2.js +0 -320
  183. package/dist/index-DceCxNV5.js +0 -181
  184. package/dist/index-Uw9cSw0q.js +0 -294
  185. package/dist/index-qiuyrukh.js +0 -45
  186. package/dist/index-zddvaohA.js +0 -78
  187. package/dist/info-RfPsmroW.js +0 -7
  188. package/dist/info-circle-DFKHB_ZN.js +0 -16
  189. package/dist/lightbulb-B-Bykj9X.js +0 -7
  190. package/dist/mail-mBAgGuw5.js +0 -12
  191. package/dist/mobile-Dhh3ndkf.js +0 -13
  192. package/dist/more-D1h7UTvg.js +0 -15
  193. package/dist/network-placeholder-Dqynvc-t.js +0 -18
  194. package/dist/nftPlaceholder-Df7MW4MM.js +0 -12
  195. package/dist/off-BmG3cHTX.js +0 -12
  196. package/dist/onramp-C401Aenb.js +0 -1279
  197. package/dist/play-store-4q1fzL_P.js +0 -36
  198. package/dist/plus-603Gs3yG.js +0 -17
  199. package/dist/qr-code-Dgwhf6M1.js +0 -10
  200. package/dist/receive-CYXbbEUR.js +0 -186
  201. package/dist/recycle-horizontal-Bu8zZ563.js +0 -13
  202. package/dist/ref-DpmKRWBK.js +0 -41
  203. package/dist/refresh-BMZFu0mu.js +0 -12
  204. package/dist/reown-logo-BXph7ThY.js +0 -16
  205. package/dist/search-Cm_V42Y_.js +0 -12
  206. package/dist/secp256k1-C0iX1TUr.js +0 -1510
  207. package/dist/secp256k1-DOQBqE4Z.js +0 -1302
  208. package/dist/send-BSMYxDuP.js +0 -19
  209. package/dist/send-C8EeIzRB.js +0 -1038
  210. package/dist/socials-DQrHQajs.js +0 -574
  211. package/dist/swapHorizontal-98rnJewS.js +0 -12
  212. package/dist/swapHorizontalBold-C299FjEt.js +0 -12
  213. package/dist/swapHorizontalMedium-Cqm6i4WJ.js +0 -20
  214. package/dist/swapHorizontalRoundedBold-De7hFfqZ.js +0 -12
  215. package/dist/swapVertical-DSL75l8L.js +0 -12
  216. package/dist/swaps-BuTNp65Y.js +0 -1637
  217. package/dist/telegram-cJP7hgUb.js +0 -20
  218. package/dist/three-dots-DHnEh28O.js +0 -9
  219. package/dist/twitch-CR2iGcBo.js +0 -22
  220. package/dist/twitterIcon-E5TAQjOn.js +0 -10
  221. package/dist/verify-DEukUJp0.js +0 -12
  222. package/dist/verify-filled-BXsx1i_p.js +0 -12
  223. package/dist/w3m-modal-Bm7BqVng.js +0 -1037
  224. package/dist/wallet-CzyyvdrT.js +0 -12
  225. package/dist/wallet-placeholder-BrcmyGEe.js +0 -18
  226. package/dist/walletconnect-BSYogWiE.js +0 -36
  227. package/dist/warning-circle-Cgp2BW3m.js +0 -16
  228. package/dist/x-BJinLpTw.js +0 -16
@@ -0,0 +1,171 @@
1
+ import { c_ as h, cX as p, cM as c, cY as a, cF as x, d3 as b, cE as g, d4 as v, d0 as C, cU as m, cV as _, cW as $ } from "./index-D_8VUmn1.js";
2
+ import { c as w, r as T } from "./index-CEqcN8QP.js";
3
+ import "./index-X8zir_1j.js";
4
+ const R = h``;
5
+ var O = function(n, e, r, o) {
6
+ var i = arguments.length, t = i < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, r) : o, s;
7
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") t = Reflect.decorate(n, e, r, o);
8
+ else for (var l = n.length - 1; l >= 0; l--) (s = n[l]) && (t = (i < 3 ? s(t) : i > 3 ? s(e, r, t) : s(e, r)) || t);
9
+ return i > 3 && t && Object.defineProperty(e, r, t), t;
10
+ };
11
+ let f = class extends p {
12
+ render() {
13
+ const { termsConditionsUrl: e, privacyPolicyUrl: r } = c.state;
14
+ return !e && !r ? null : a`
15
+ <wui-flex
16
+ .padding=${["4", "3", "3", "3"]}
17
+ flexDirection="column"
18
+ alignItems="center"
19
+ justifyContent="center"
20
+ gap="3"
21
+ >
22
+ <wui-text color="secondary" variant="md-regular" align="center">
23
+ We work with the best providers to give you the lowest fees and best support. More options
24
+ coming soon!
25
+ </wui-text>
26
+
27
+ ${this.howDoesItWorkTemplate()}
28
+ </wui-flex>
29
+ `;
30
+ }
31
+ howDoesItWorkTemplate() {
32
+ return a` <wui-link @click=${this.onWhatIsBuy.bind(this)}>
33
+ <wui-icon size="xs" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon>
34
+ How does it work?
35
+ </wui-link>`;
36
+ }
37
+ onWhatIsBuy() {
38
+ x.sendEvent({
39
+ type: "track",
40
+ event: "SELECT_WHAT_IS_A_BUY",
41
+ properties: {
42
+ isSmartAccount: b(g.state.activeChain) === v.ACCOUNT_TYPES.SMART_ACCOUNT
43
+ }
44
+ }), C.push("WhatIsABuy");
45
+ }
46
+ };
47
+ f.styles = [R];
48
+ f = O([
49
+ w("w3m-onramp-providers-footer")
50
+ ], f);
51
+ const P = "https://reown.com", U = m`
52
+ .reown-logo {
53
+ height: 24px;
54
+ }
55
+
56
+ a {
57
+ text-decoration: none;
58
+ cursor: pointer;
59
+ color: ${({ tokens: n }) => n.theme.textSecondary};
60
+ }
61
+
62
+ a:hover {
63
+ opacity: 0.9;
64
+ }
65
+ `;
66
+ var W = function(n, e, r, o) {
67
+ var i = arguments.length, t = i < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, r) : o, s;
68
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") t = Reflect.decorate(n, e, r, o);
69
+ else for (var l = n.length - 1; l >= 0; l--) (s = n[l]) && (t = (i < 3 ? s(t) : i > 3 ? s(e, r, t) : s(e, r)) || t);
70
+ return i > 3 && t && Object.defineProperty(e, r, t), t;
71
+ };
72
+ let d = class extends p {
73
+ render() {
74
+ return a`
75
+ <a
76
+ data-testid="ux-branding-reown"
77
+ href=${P}
78
+ rel="noreferrer"
79
+ target="_blank"
80
+ style="text-decoration: none;"
81
+ >
82
+ <wui-flex
83
+ justifyContent="center"
84
+ alignItems="center"
85
+ gap="1"
86
+ .padding=${["01", "0", "3", "0"]}
87
+ >
88
+ <wui-text variant="sm-regular" color="inherit"> UX by </wui-text>
89
+ <wui-icon name="reown" size="inherit" class="reown-logo"></wui-icon>
90
+ </wui-flex>
91
+ </a>
92
+ `;
93
+ }
94
+ };
95
+ d.styles = [_, $, U];
96
+ d = W([
97
+ w("wui-ux-by-reown")
98
+ ], d);
99
+ const B = m`
100
+ :host wui-ux-by-reown {
101
+ padding-top: 0;
102
+ }
103
+
104
+ :host wui-ux-by-reown.branding-only {
105
+ padding-top: ${({ spacing: n }) => n[3]};
106
+ }
107
+
108
+ a {
109
+ text-decoration: none;
110
+ color: ${({ tokens: n }) => n.core.textAccentPrimary};
111
+ font-weight: 500;
112
+ }
113
+ `;
114
+ var y = function(n, e, r, o) {
115
+ var i = arguments.length, t = i < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, r) : o, s;
116
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") t = Reflect.decorate(n, e, r, o);
117
+ else for (var l = n.length - 1; l >= 0; l--) (s = n[l]) && (t = (i < 3 ? s(t) : i > 3 ? s(e, r, t) : s(e, r)) || t);
118
+ return i > 3 && t && Object.defineProperty(e, r, t), t;
119
+ };
120
+ let u = class extends p {
121
+ constructor() {
122
+ super(), this.unsubscribe = [], this.remoteFeatures = c.state.remoteFeatures, this.unsubscribe.push(c.subscribeKey("remoteFeatures", (e) => this.remoteFeatures = e));
123
+ }
124
+ disconnectedCallback() {
125
+ this.unsubscribe.forEach((e) => e());
126
+ }
127
+ render() {
128
+ var t;
129
+ const { termsConditionsUrl: e, privacyPolicyUrl: r } = c.state, o = (t = c.state.features) == null ? void 0 : t.legalCheckbox;
130
+ return !e && !r || o ? a`
131
+ <wui-flex flexDirection="column"> ${this.reownBrandingTemplate(!0)} </wui-flex>
132
+ ` : a`
133
+ <wui-flex flexDirection="column">
134
+ <wui-flex .padding=${["4", "3", "3", "3"]} justifyContent="center">
135
+ <wui-text color="secondary" variant="md-regular" align="center">
136
+ By connecting your wallet, you agree to our <br />
137
+ ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}
138
+ </wui-text>
139
+ </wui-flex>
140
+ ${this.reownBrandingTemplate()}
141
+ </wui-flex>
142
+ `;
143
+ }
144
+ andTemplate() {
145
+ const { termsConditionsUrl: e, privacyPolicyUrl: r } = c.state;
146
+ return e && r ? "and" : "";
147
+ }
148
+ termsTemplate() {
149
+ const { termsConditionsUrl: e } = c.state;
150
+ return e ? a`<a href=${e} target="_blank" rel="noopener noreferrer"
151
+ >Terms of Service</a
152
+ >` : null;
153
+ }
154
+ privacyTemplate() {
155
+ const { privacyPolicyUrl: e } = c.state;
156
+ return e ? a`<a href=${e} target="_blank" rel="noopener noreferrer"
157
+ >Privacy Policy</a
158
+ >` : null;
159
+ }
160
+ reownBrandingTemplate(e = !1) {
161
+ var r;
162
+ return (r = this.remoteFeatures) != null && r.reownBranding ? e ? a`<wui-ux-by-reown class="branding-only"></wui-ux-by-reown>` : a`<wui-ux-by-reown></wui-ux-by-reown>` : null;
163
+ }
164
+ };
165
+ u.styles = [B];
166
+ y([
167
+ T()
168
+ ], u.prototype, "remoteFeatures", void 0);
169
+ u = y([
170
+ w("w3m-legal-footer")
171
+ ], u);
@@ -1,6 +1,6 @@
1
1
  import { r as T } from "./index-C1QEJL-2.js";
2
- import { bk as y } from "./index-BJ7cbG3N.js";
3
- import { h as k, e as I } from "./hashTypedData-ZH9ZnWu3.js";
2
+ import { bk as y } from "./index-D_8VUmn1.js";
3
+ import { h as k, e as I } from "./hashTypedData-B50-z0AA.js";
4
4
  const q = () => "9.1.0", v = (t) => t.toString(16).padStart(2, "0"), C = (t) => {
5
5
  const e = new Uint8Array(t / 2);
6
6
  return window.crypto.getRandomValues(e), Array.from(e, v).join("");
@@ -0,0 +1,159 @@
1
+ import { c$ as d, cC as h, cR as f, cS as g, cU as w, cX as b, cY as y } from "./index-D_8VUmn1.js";
2
+ import { r as m, c as x } from "./index-CEqcN8QP.js";
3
+ const o = h({
4
+ message: "",
5
+ open: !1,
6
+ triggerRect: {
7
+ width: 0,
8
+ height: 0,
9
+ top: 0,
10
+ left: 0
11
+ },
12
+ variant: "shade"
13
+ }), v = {
14
+ state: o,
15
+ subscribe(t) {
16
+ return g(o, () => t(o));
17
+ },
18
+ subscribeKey(t, e) {
19
+ return f(o, t, e);
20
+ },
21
+ showTooltip({ message: t, triggerRect: e, variant: i }) {
22
+ o.open = !0, o.message = t, o.triggerRect = e, o.variant = i;
23
+ },
24
+ hide() {
25
+ o.open = !1, o.message = "", o.triggerRect = {
26
+ width: 0,
27
+ height: 0,
28
+ top: 0,
29
+ left: 0
30
+ };
31
+ }
32
+ }, s = d(v), $ = w`
33
+ :host {
34
+ pointer-events: none;
35
+ }
36
+
37
+ :host > wui-flex {
38
+ display: var(--w3m-tooltip-display);
39
+ opacity: var(--w3m-tooltip-opacity);
40
+ padding: 9px ${({ spacing: t }) => t[3]} 10px ${({ spacing: t }) => t[3]};
41
+ border-radius: ${({ borderRadius: t }) => t[3]};
42
+ color: ${({ tokens: t }) => t.theme.backgroundPrimary};
43
+ position: absolute;
44
+ top: var(--w3m-tooltip-top);
45
+ left: var(--w3m-tooltip-left);
46
+ transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px));
47
+ max-width: calc(var(--apkt-modal-width) - ${({ spacing: t }) => t[5]});
48
+ transition: opacity ${({ durations: t }) => t.lg}
49
+ ${({ easings: t }) => t["ease-out-power-2"]};
50
+ will-change: opacity;
51
+ opacity: 0;
52
+ animation-duration: ${({ durations: t }) => t.xl};
53
+ animation-timing-function: ${({ easings: t }) => t["ease-out-power-2"]};
54
+ animation-name: fade-in;
55
+ animation-fill-mode: forwards;
56
+ }
57
+
58
+ :host([data-variant='shade']) > wui-flex {
59
+ background-color: ${({ tokens: t }) => t.theme.foregroundPrimary};
60
+ }
61
+
62
+ :host([data-variant='shade']) > wui-flex > wui-text {
63
+ color: ${({ tokens: t }) => t.theme.textSecondary};
64
+ }
65
+
66
+ :host([data-variant='fill']) > wui-flex {
67
+ background-color: ${({ tokens: t }) => t.theme.textPrimary};
68
+ border: none;
69
+ }
70
+
71
+ wui-icon {
72
+ position: absolute;
73
+ width: 12px !important;
74
+ height: 4px !important;
75
+ color: ${({ tokens: t }) => t.theme.foregroundPrimary};
76
+ }
77
+
78
+ wui-icon[data-placement='top'] {
79
+ bottom: 0px;
80
+ left: 50%;
81
+ transform: translate(-50%, 95%);
82
+ }
83
+
84
+ wui-icon[data-placement='bottom'] {
85
+ top: 0;
86
+ left: 50%;
87
+ transform: translate(-50%, -95%) rotate(180deg);
88
+ }
89
+
90
+ wui-icon[data-placement='right'] {
91
+ top: 50%;
92
+ left: 0;
93
+ transform: translate(-65%, -50%) rotate(90deg);
94
+ }
95
+
96
+ wui-icon[data-placement='left'] {
97
+ top: 50%;
98
+ right: 0%;
99
+ transform: translate(65%, -50%) rotate(270deg);
100
+ }
101
+
102
+ @keyframes fade-in {
103
+ from {
104
+ opacity: 0;
105
+ }
106
+ to {
107
+ opacity: 1;
108
+ }
109
+ }
110
+ `;
111
+ var n = function(t, e, i, p) {
112
+ var c = arguments.length, a = c < 3 ? e : p === null ? p = Object.getOwnPropertyDescriptor(e, i) : p, l;
113
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(t, e, i, p);
114
+ else for (var u = t.length - 1; u >= 0; u--) (l = t[u]) && (a = (c < 3 ? l(a) : c > 3 ? l(e, i, a) : l(e, i)) || a);
115
+ return c > 3 && a && Object.defineProperty(e, i, a), a;
116
+ };
117
+ let r = class extends b {
118
+ constructor() {
119
+ super(), this.unsubscribe = [], this.open = s.state.open, this.message = s.state.message, this.triggerRect = s.state.triggerRect, this.variant = s.state.variant, this.unsubscribe.push(s.subscribe((e) => {
120
+ this.open = e.open, this.message = e.message, this.triggerRect = e.triggerRect, this.variant = e.variant;
121
+ }));
122
+ }
123
+ disconnectedCallback() {
124
+ this.unsubscribe.forEach((e) => e());
125
+ }
126
+ render() {
127
+ this.dataset.variant = this.variant;
128
+ const e = this.triggerRect.top, i = this.triggerRect.left;
129
+ return this.style.cssText = `
130
+ --w3m-tooltip-top: ${e}px;
131
+ --w3m-tooltip-left: ${i}px;
132
+ --w3m-tooltip-parent-width: ${this.triggerRect.width / 2}px;
133
+ --w3m-tooltip-display: ${this.open ? "flex" : "none"};
134
+ --w3m-tooltip-opacity: ${this.open ? 1 : 0};
135
+ `, y`<wui-flex>
136
+ <wui-icon data-placement="top" size="inherit" name="cursor"></wui-icon>
137
+ <wui-text color="primary" variant="sm-regular">${this.message}</wui-text>
138
+ </wui-flex>`;
139
+ }
140
+ };
141
+ r.styles = [$];
142
+ n([
143
+ m()
144
+ ], r.prototype, "open", void 0);
145
+ n([
146
+ m()
147
+ ], r.prototype, "message", void 0);
148
+ n([
149
+ m()
150
+ ], r.prototype, "triggerRect", void 0);
151
+ n([
152
+ m()
153
+ ], r.prototype, "variant", void 0);
154
+ r = n([
155
+ x("w3m-tooltip")
156
+ ], r);
157
+ export {
158
+ s as T
159
+ };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { fq as r } from "./index-BJ7cbG3N.js";
1
+ import { fx as r } from "./index-D_8VUmn1.js";
2
2
  export {
3
3
  r as DCP
4
4
  };
@@ -1,4 +1,4 @@
1
- import { bJ as l, ck as p, d2 as w, R as y, be as A, bl as g, K as b, J as F, bi as E, bD as N, P as h, Q as P, Z as R, d3 as f, d4 as I } from "./index-BJ7cbG3N.js";
1
+ import { bJ as l, ck as p, dj as w, R as y, be as A, bl as g, K as b, J as F, bi as E, bD as N, P as h, Q as P, Z as R, dk as f, dl as I } from "./index-D_8VUmn1.js";
2
2
  function q(n) {
3
3
  const { abi: r, data: a } = n, e = l(a, 0, 4), t = r.find((o) => o.type === "function" && e === p(w(o)));
4
4
  if (!t)