@agg-market/ui 6.0.0 → 7.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 (81) hide show
  1. package/README.md +17 -2
  2. package/dist/{chunk-LMOJKJOY.mjs → chunk-6I474QXG.mjs} +319 -199
  3. package/dist/{chunk-5ZKPBMRK.mjs → chunk-AVHMI47G.mjs} +18 -20
  4. package/dist/{chunk-ADGL6RFX.mjs → chunk-EEQPPN7N.mjs} +1 -1
  5. package/dist/{chunk-UBBOLLOS.mjs → chunk-EERL6BZF.mjs} +2 -4
  6. package/dist/{chunk-G6YKGVQR.mjs → chunk-KQKLLL4D.mjs} +15 -54
  7. package/dist/{chunk-2ICOSP7N.mjs → chunk-L5U7RGJV.mjs} +5 -5
  8. package/dist/{chunk-HI4EEDN5.mjs → chunk-MUB7NYWZ.mjs} +799 -228
  9. package/dist/chunk-OAJBTVZT.mjs +119 -0
  10. package/dist/{chunk-JE3Z52FD.mjs → chunk-OVQVAUAI.mjs} +110 -35
  11. package/dist/{chunk-CN7GI2RJ.mjs → chunk-ZYUJ7YEJ.mjs} +68 -8
  12. package/dist/events.js +1364 -771
  13. package/dist/events.mjs +4 -5
  14. package/dist/index.js +2353 -1541
  15. package/dist/index.mjs +597 -19
  16. package/dist/modals.js +1058 -651
  17. package/dist/modals.mjs +3 -4
  18. package/dist/pages.js +1717 -1055
  19. package/dist/pages.mjs +7 -7
  20. package/dist/primitives.js +936 -336
  21. package/dist/primitives.mjs +25 -11
  22. package/dist/styles.css +1 -1
  23. package/dist/tailwind.css +1 -1
  24. package/dist/trading.js +994 -512
  25. package/dist/trading.mjs +4 -4
  26. package/dist/types/auth/connect-button-view/connect-button-view.constants.d.mts +31 -0
  27. package/dist/types/auth/connect-button-view/connect-button-view.constants.d.ts +31 -0
  28. package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +83 -0
  29. package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +83 -0
  30. package/dist/types/auth/connect-button-view/index.d.mts +7 -0
  31. package/dist/types/auth/connect-button-view/index.d.ts +7 -0
  32. package/dist/types/auth/index.d.mts +1 -1
  33. package/dist/types/auth/index.d.ts +1 -1
  34. package/dist/types/index.d.mts +1 -1
  35. package/dist/types/index.d.ts +1 -1
  36. package/dist/types/primitives/chart/chart-type-switch.d.mts +10 -0
  37. package/dist/types/primitives/chart/chart-type-switch.d.ts +10 -0
  38. package/dist/types/primitives/chart/index.d.mts +7 -1
  39. package/dist/types/primitives/chart/index.d.ts +7 -1
  40. package/dist/types/primitives/icon/index.d.mts +8 -1
  41. package/dist/types/primitives/icon/index.d.ts +8 -1
  42. package/dist/types/primitives/icon/registry.d.mts +28 -0
  43. package/dist/types/primitives/icon/registry.d.ts +28 -0
  44. package/dist/types/primitives/icon/svg/apple.d.mts +5 -0
  45. package/dist/types/primitives/icon/svg/apple.d.ts +5 -0
  46. package/dist/types/primitives/icon/svg/chart-candlestick.d.mts +5 -0
  47. package/dist/types/primitives/icon/svg/chart-candlestick.d.ts +5 -0
  48. package/dist/types/primitives/icon/svg/chart-line.d.mts +5 -0
  49. package/dist/types/primitives/icon/svg/chart-line.d.ts +5 -0
  50. package/dist/types/primitives/icon/svg/error-filled.d.mts +5 -0
  51. package/dist/types/primitives/icon/svg/error-filled.d.ts +5 -0
  52. package/dist/types/primitives/icon/svg/ethereum.d.mts +5 -0
  53. package/dist/types/primitives/icon/svg/ethereum.d.ts +5 -0
  54. package/dist/types/primitives/icon/svg/google.d.mts +5 -0
  55. package/dist/types/primitives/icon/svg/google.d.ts +5 -0
  56. package/dist/types/primitives/icon/svg/solana.d.mts +5 -0
  57. package/dist/types/primitives/icon/svg/solana.d.ts +5 -0
  58. package/dist/types/primitives/index.d.mts +1 -0
  59. package/dist/types/primitives/index.d.ts +1 -0
  60. package/dist/types/primitives/inline-alert/index.d.mts +16 -0
  61. package/dist/types/primitives/inline-alert/index.d.ts +16 -0
  62. package/dist/types/primitives/venue-logo/svg/logo-limitless.d.mts +5 -0
  63. package/dist/types/primitives/venue-logo/svg/logo-limitless.d.ts +5 -0
  64. package/dist/types/primitives/venue-logo/venue-logo.types.d.mts +1 -1
  65. package/dist/types/primitives/venue-logo/venue-logo.types.d.ts +1 -1
  66. package/dist/types/trading/types.d.mts +26 -26
  67. package/dist/types/trading/types.d.ts +26 -26
  68. package/package.json +3 -15
  69. package/dist/auth.d.mts +0 -1
  70. package/dist/auth.d.ts +0 -1
  71. package/dist/auth.js +0 -2290
  72. package/dist/auth.mjs +0 -8
  73. package/dist/chunk-INRG3D4M.mjs +0 -450
  74. package/dist/chunk-MHCHR65A.mjs +0 -165
  75. package/dist/chunk-PASXFYKQ.mjs +0 -81
  76. package/dist/types/auth/connect-button/connect-button.constants.d.mts +0 -10
  77. package/dist/types/auth/connect-button/connect-button.constants.d.ts +0 -10
  78. package/dist/types/auth/connect-button/connect-button.types.d.mts +0 -33
  79. package/dist/types/auth/connect-button/connect-button.types.d.ts +0 -33
  80. package/dist/types/auth/connect-button/index.d.mts +0 -7
  81. package/dist/types/auth/connect-button/index.d.ts +0 -7
package/dist/index.mjs CHANGED
@@ -1,26 +1,21 @@
1
1
  import {
2
2
  HelloWorld,
3
+ LoadingIcon,
3
4
  NumberValue,
4
5
  Search
5
- } from "./chunk-JE3Z52FD.mjs";
6
- import {
7
- ConnectButton
8
- } from "./chunk-INRG3D4M.mjs";
9
- import {
10
- LoadingIcon
11
- } from "./chunk-PASXFYKQ.mjs";
6
+ } from "./chunk-OVQVAUAI.mjs";
12
7
  import "./chunk-KZOQW6NT.mjs";
13
8
  import {
14
9
  EventMarketPage,
15
10
  HomePage,
16
11
  UserProfilePage
17
- } from "./chunk-2ICOSP7N.mjs";
12
+ } from "./chunk-L5U7RGJV.mjs";
18
13
  import {
19
14
  EventList,
20
15
  EventListItem,
21
16
  EventListItemDetails,
22
17
  MarketDetails
23
- } from "./chunk-LMOJKJOY.mjs";
18
+ } from "./chunk-6I474QXG.mjs";
24
19
  import {
25
20
  Badge,
26
21
  LineChart,
@@ -29,7 +24,7 @@ import {
29
24
  Typography,
30
25
  badgeSizes,
31
26
  typographyVariants
32
- } from "./chunk-CN7GI2RJ.mjs";
27
+ } from "./chunk-ZYUJ7YEJ.mjs";
33
28
  import {
34
29
  ConnectAccountsStep,
35
30
  ConnectKalshiModal,
@@ -40,10 +35,10 @@ import {
40
35
  ProfileModal,
41
36
  ProfileSetupStep,
42
37
  WithdrawModal
43
- } from "./chunk-5ZKPBMRK.mjs";
38
+ } from "./chunk-AVHMI47G.mjs";
44
39
  import {
45
40
  Modal
46
- } from "./chunk-ADGL6RFX.mjs";
41
+ } from "./chunk-EEQPPN7N.mjs";
47
42
  import {
48
43
  placeOrderMetricSchema,
49
44
  placeOrderOutcomeSchema,
@@ -75,24 +70,27 @@ import {
75
70
  getTradingSlippageLabel,
76
71
  getTradingValueLabel,
77
72
  getTradingVenueLabel
78
- } from "./chunk-G6YKGVQR.mjs";
73
+ } from "./chunk-KQKLLL4D.mjs";
74
+ import {
75
+ InlineAlert
76
+ } from "./chunk-OAJBTVZT.mjs";
79
77
  import {
80
78
  Card,
81
79
  Skeleton,
82
80
  Tabs,
83
81
  skeletonViews
84
- } from "./chunk-UBBOLLOS.mjs";
85
- import {
86
- Select
87
- } from "./chunk-MHCHR65A.mjs";
82
+ } from "./chunk-EERL6BZF.mjs";
88
83
  import {
89
84
  AGG_ROOT_CLASS_NAME,
85
+ AppleIcon,
90
86
  ArrowTrendUpIcon,
91
87
  ArrowsToDotIcon,
92
88
  BankIcon,
93
89
  BestPricesIcon,
94
90
  BoltIcon,
95
91
  Button,
92
+ ChartCandlestickIcon,
93
+ ChartLineIcon,
96
94
  CheckCircleIcon,
97
95
  ChevronDownIcon,
98
96
  ChevronLeftIcon,
@@ -106,7 +104,10 @@ import {
106
104
  DocumentIcon,
107
105
  DotsHorizontalIcon,
108
106
  DownloadIcon,
107
+ ErrorFilledIcon,
108
+ EthereumIcon,
109
109
  ExternalLinkIcon,
110
+ GoogleIcon,
110
111
  Icon,
111
112
  InfoIcon,
112
113
  LinkAccountsIcon,
@@ -115,7 +116,9 @@ import {
115
116
  ProfileIcon,
116
117
  RevenueAltIcon,
117
118
  SearchIcon,
119
+ Select,
118
120
  ShieldTrustIcon,
121
+ SolanaIcon,
119
122
  StayInControlIcon,
120
123
  TriangleDownIcon,
121
124
  TriangleUpFilledIcon,
@@ -126,6 +129,8 @@ import {
126
129
  WalletIcon,
127
130
  WarningFilledIcon,
128
131
  WarningIcon,
132
+ __spreadProps,
133
+ __spreadValues,
129
134
  cn,
130
135
  formatAmountDisplay,
131
136
  formatCompactUsd,
@@ -138,17 +143,586 @@ import {
138
143
  shortenAddress,
139
144
  toDate,
140
145
  venueLogoNames
141
- } from "./chunk-HI4EEDN5.mjs";
146
+ } from "./chunk-MUB7NYWZ.mjs";
147
+
148
+ // src/auth/connect-button-view/index.tsx
149
+ import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
150
+ import { useLabels, useSdkUiConfig } from "@agg-market/hooks";
151
+
152
+ // src/auth/connect-button-view/connect-button-view.constants.ts
153
+ var connectButtonContainerClassName = cn(
154
+ "inline-flex flex-col items-start gap-2 font-agg-sans"
155
+ );
156
+ var authNoticeClassName = cn("text-agg-xs leading-agg-4 text-agg-muted-foreground");
157
+ var authErrorClassName = cn("text-agg-sm leading-agg-5 text-red-500");
158
+ var authModalContainerClassName = cn("max-w-[400px] rounded-[24px]");
159
+ var authModalBodyClassName = cn("px-8 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-6");
160
+ var authSectionClassName = cn("flex w-full flex-col gap-5");
161
+ var authSectionHeadingClassName = cn(
162
+ "text-center text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground"
163
+ );
164
+ var authMethodsListClassName = cn("flex w-full flex-col gap-6 pt-2");
165
+ var authInputFormClassName = cn("flex w-full flex-col gap-3");
166
+ var authInputFieldClassName = cn(
167
+ "h-10 w-full rounded-[4px] border border-agg-separator bg-agg-secondary px-4 text-agg-base leading-agg-6 text-agg-foreground outline-none",
168
+ "placeholder:text-agg-muted-foreground focus:border-agg-separator focus-visible:ring-2 focus-visible:ring-agg-primary-hover focus-visible:ring-offset-2 focus-visible:ring-offset-agg-secondary",
169
+ "disabled:cursor-not-allowed disabled:text-agg-muted-foreground"
170
+ );
171
+ var authPrimaryActionClassName = cn("h-10 w-full");
172
+ var authMethodGridClassName = cn(
173
+ "grid w-full gap-3 [grid-template-columns:repeat(auto-fit,minmax(0,1fr))]",
174
+ "[&>*]:w-full [&>*]:mx-auto"
175
+ );
176
+ var authWalletMethodGridClassName = cn("flex w-full flex-col gap-2");
177
+ var authSocialButtonClassName = cn(
178
+ "cursor-pointer! hover:cursor-pointer hover:bg-agg-secondary-hover",
179
+ "flex h-[60px] items-center justify-center rounded-xl border border-agg-separator bg-agg-secondary text-agg-foreground",
180
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary-hover focus-visible:ring-offset-2 focus-visible:ring-offset-agg-secondary",
181
+ "disabled:cursor-not-allowed disabled:text-agg-muted-foreground"
182
+ );
183
+ var authWalletButtonClassName = cn(
184
+ "cursor-pointer! hover:cursor-pointer hover:bg-agg-secondary-hover",
185
+ "flex h-12 items-center justify-center gap-2 rounded-agg-full border border-agg-separator bg-agg-secondary px-4 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground",
186
+ "hover:bg-agg-secondary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary-hover focus-visible:ring-offset-2 focus-visible:ring-offset-agg-secondary",
187
+ "disabled:cursor-not-allowed disabled:text-agg-muted-foreground"
188
+ );
189
+ var authWalletIconGroupClassName = cn("flex items-center justify-center -space-x-2");
190
+ var authHelperTextClassName = cn(
191
+ "text-center text-agg-xs leading-agg-4 text-agg-muted-foreground"
192
+ );
193
+ var authHelperLinkClassName = cn("underline underline-offset-2 decoration-current");
194
+ var authDividerClassName = cn("flex w-full items-center gap-3");
195
+ var authDividerLineClassName = cn("h-px flex-1 bg-agg-separator");
196
+ var authDividerLabelClassName = cn(
197
+ "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground"
198
+ );
199
+ var authLegalTextClassName = cn(
200
+ "text-center text-agg-xs leading-agg-4 text-agg-muted-foreground"
201
+ );
202
+ var connectedButtonsRowClassName = cn("inline-flex h-10 items-center gap-2");
203
+ var connectedBalanceChipClassName = cn(
204
+ "inline-flex h-10 items-center gap-3 rounded-agg-full border border-agg-separator bg-agg-secondary pl-1 pr-12 font-agg-sans"
205
+ );
206
+ var connectedProfileChipClassName = cn(
207
+ "-ml-12",
208
+ "inline-flex h-10 items-center gap-3 rounded-agg-full border border-agg-separator bg-agg-secondary pl-2 pr-3 font-agg-sans",
209
+ "cursor-pointer hover:bg-agg-secondary-hover",
210
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary-hover focus-visible:ring-offset-2 focus-visible:ring-offset-agg-secondary"
211
+ );
212
+ var profileMenuContentClassName = cn(
213
+ "z-50 w-64 overflow-hidden rounded-agg-xl font-agg-sans",
214
+ "border border-agg-separator bg-agg-secondary",
215
+ "shadow-agg-popover"
216
+ );
217
+ var profileMenuSectionClassName = cn("flex w-full flex-col gap-5 px-5 py-5");
218
+ var profileMenuSeparatorClassName = cn("h-px w-full bg-agg-separator");
219
+ var profileMenuActionItemClassName = cn(
220
+ "flex w-full items-center gap-3 px-5 py-4 font-agg-sans text-agg-sm leading-agg-5 text-agg-foreground",
221
+ "outline-none",
222
+ "hover:bg-agg-secondary-hover focus:bg-agg-secondary-hover"
223
+ );
224
+ var avatarRootClassName = cn(
225
+ "inline-flex size-6 shrink-0 items-center justify-center rounded-agg-full bg-agg-separator"
226
+ );
227
+ var avatarIconClassName = cn("h-[66%] w-[66%] text-agg-muted-foreground");
228
+
229
+ // src/auth/connect-button-view/index.tsx
230
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
231
+ var WalletAvatar = ({ className }) => {
232
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn(avatarRootClassName, className), children: /* @__PURE__ */ jsx(Icon, { className: avatarIconClassName, name: "wallet-avatar" }) });
233
+ };
234
+ var venueLogoNameSet = /* @__PURE__ */ new Set([
235
+ "kalshi",
236
+ "opinion",
237
+ "polymarket",
238
+ "probable"
239
+ ]);
240
+ var toVenueLogoName = (value) => {
241
+ if (!venueLogoNameSet.has(value))
242
+ return null;
243
+ return value;
244
+ };
245
+ var AuthMethodActionButton = ({
246
+ activeMethodId,
247
+ className,
248
+ disabled,
249
+ method,
250
+ onSelect,
251
+ renderLabel = true
252
+ }) => {
253
+ var _a;
254
+ const labels = useLabels();
255
+ const isMethodLoading = activeMethodId === method.id;
256
+ const isMethodDisabled = disabled || !method.isAvailable || activeMethodId !== null && !isMethodLoading;
257
+ return /* @__PURE__ */ jsxs(
258
+ "button",
259
+ {
260
+ type: "button",
261
+ className,
262
+ disabled: isMethodDisabled,
263
+ "aria-busy": isMethodLoading || void 0,
264
+ "aria-label": labels.auth.signInWithMethod(method.label),
265
+ onClick: () => onSelect(method.id),
266
+ children: [
267
+ isMethodLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : /* @__PURE__ */ jsx(
268
+ Icon,
269
+ {
270
+ name: (_a = method.iconName) != null ? _a : "profile",
271
+ size: "medium",
272
+ className: renderLabel ? void 0 : "h-6 w-6 text-agg-foreground",
273
+ title: renderLabel ? void 0 : method.label
274
+ }
275
+ ),
276
+ renderLabel ? /* @__PURE__ */ jsx("span", { children: labels.auth.connect(method.label) }) : null
277
+ ]
278
+ }
279
+ );
280
+ };
281
+ var UnauthenticatedConnectView = ({
282
+ activeMethodId,
283
+ buttonProps,
284
+ classNames,
285
+ disabled,
286
+ emailMethod,
287
+ emailError,
288
+ emailValue,
289
+ errorMessage,
290
+ isBusy,
291
+ isChooserOpen,
292
+ notice,
293
+ onChooserOpenChange,
294
+ onEmailChange,
295
+ onEmailSubmit,
296
+ onMethodSelect,
297
+ socialMethods,
298
+ walletMethods
299
+ }) => {
300
+ var _a, _b, _c, _d, _e;
301
+ const labels = useLabels();
302
+ const hasConfiguredMethods = emailMethod !== null || socialMethods.length > 0 || walletMethods.length > 0;
303
+ const showWalletDivider = walletMethods.length > 0 && (emailMethod !== null || socialMethods.length > 0);
304
+ return /* @__PURE__ */ jsxs("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: [
305
+ /* @__PURE__ */ jsx(
306
+ Button,
307
+ __spreadProps(__spreadValues({
308
+ variant: "primary",
309
+ size: "large",
310
+ className: classNames == null ? void 0 : classNames.connectButton,
311
+ onClick: () => onChooserOpenChange(true),
312
+ disabled: disabled || !hasConfiguredMethods,
313
+ "aria-label": labels.auth.connect()
314
+ }, buttonProps), {
315
+ children: labels.auth.connect()
316
+ })
317
+ ),
318
+ notice ? /* @__PURE__ */ jsx("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: notice }) : null,
319
+ /* @__PURE__ */ jsx(Modal, { open: isChooserOpen, onOpenChange: onChooserOpenChange, children: /* @__PURE__ */ jsxs(
320
+ Modal.Container,
321
+ {
322
+ maxWidth: "400px",
323
+ classNames: {
324
+ container: cn(authModalContainerClassName, classNames == null ? void 0 : classNames.authModalContent)
325
+ },
326
+ "aria-label": labels.auth.signIn,
327
+ children: [
328
+ /* @__PURE__ */ jsx(
329
+ Modal.Header,
330
+ {
331
+ title: labels.auth.signIn,
332
+ hideBorder: true,
333
+ classNames: {
334
+ container: "px-8 py-6",
335
+ title: "text-agg-2xl leading-agg-8",
336
+ titleContainer: "max-w-none"
337
+ }
338
+ }
339
+ ),
340
+ /* @__PURE__ */ jsx(Modal.Body, { classNames: { root: authModalBodyClassName }, children: /* @__PURE__ */ jsxs("div", { className: authMethodsListClassName, children: [
341
+ emailMethod ? /* @__PURE__ */ jsxs(
342
+ "form",
343
+ {
344
+ className: authSectionClassName,
345
+ onSubmit: (event) => {
346
+ event.preventDefault();
347
+ onEmailSubmit();
348
+ },
349
+ children: [
350
+ /* @__PURE__ */ jsxs("div", { className: authInputFormClassName, children: [
351
+ /* @__PURE__ */ jsx(
352
+ "input",
353
+ {
354
+ id: "agg-auth-email",
355
+ type: "email",
356
+ value: emailValue,
357
+ onChange: (event) => onEmailChange(event.target.value),
358
+ placeholder: (_b = (_a = emailMethod.input) == null ? void 0 : _a.placeholder) != null ? _b : labels.auth.emailAddress,
359
+ className: cn(authInputFieldClassName, classNames == null ? void 0 : classNames.authFormField),
360
+ autoFocus: true,
361
+ "aria-label": labels.auth.emailAddress,
362
+ disabled: disabled || isBusy || !emailMethod.isAvailable
363
+ }
364
+ ),
365
+ /* @__PURE__ */ jsx(
366
+ Button,
367
+ {
368
+ type: "submit",
369
+ variant: "secondary",
370
+ size: "large",
371
+ className: authPrimaryActionClassName,
372
+ isLoading: activeMethodId === emailMethod.id,
373
+ disabled: disabled || isBusy || !emailMethod.isAvailable,
374
+ children: (_d = (_c = emailMethod.input) == null ? void 0 : _c.submitLabel) != null ? _d : labels.auth.continue
375
+ }
376
+ )
377
+ ] }),
378
+ emailMethod.isAvailable && ((_e = emailMethod.input) == null ? void 0 : _e.helperText) ? /* @__PURE__ */ jsx("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: emailMethod.input.helperText }) : null,
379
+ !emailMethod.isAvailable ? /* @__PURE__ */ jsx(
380
+ InlineAlert,
381
+ {
382
+ tone: "warning",
383
+ variant: "surface",
384
+ message: labels.auth.emailUnavailable,
385
+ className: classNames == null ? void 0 : classNames.authError
386
+ }
387
+ ) : null,
388
+ emailError ? /* @__PURE__ */ jsx(
389
+ InlineAlert,
390
+ {
391
+ tone: "error",
392
+ title: labels.common.errorPrefix,
393
+ message: emailError,
394
+ className: classNames == null ? void 0 : classNames.authError
395
+ }
396
+ ) : null
397
+ ]
398
+ }
399
+ ) : null,
400
+ socialMethods.length > 0 ? /* @__PURE__ */ jsxs("div", { className: authSectionClassName, children: [
401
+ /* @__PURE__ */ jsx("div", { className: cn(authMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: socialMethods.map((method) => /* @__PURE__ */ jsx(
402
+ AuthMethodActionButton,
403
+ {
404
+ activeMethodId,
405
+ className: cn(authSocialButtonClassName, classNames == null ? void 0 : classNames.authMethodButton),
406
+ disabled: disabled || isBusy,
407
+ method,
408
+ onSelect: onMethodSelect,
409
+ renderLabel: false
410
+ },
411
+ method.id
412
+ )) }),
413
+ /* @__PURE__ */ jsxs("p", { className: authHelperTextClassName, children: [
414
+ labels.auth.socialWalletNotice,
415
+ " ",
416
+ /* @__PURE__ */ jsx("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.learnMore })
417
+ ] })
418
+ ] }) : null,
419
+ showWalletDivider ? /* @__PURE__ */ jsxs("div", { className: authDividerClassName, children: [
420
+ /* @__PURE__ */ jsx("div", { className: authDividerLineClassName }),
421
+ /* @__PURE__ */ jsx("span", { className: authDividerLabelClassName, children: labels.auth.dividerOr }),
422
+ /* @__PURE__ */ jsx("div", { className: authDividerLineClassName })
423
+ ] }) : null,
424
+ walletMethods.length > 0 ? /* @__PURE__ */ jsx("div", { className: authSectionClassName, children: /* @__PURE__ */ jsx("div", { className: cn(authWalletMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: walletMethods.map((method) => /* @__PURE__ */ jsx(
425
+ AuthMethodActionButton,
426
+ {
427
+ activeMethodId,
428
+ className: cn(authWalletButtonClassName, classNames == null ? void 0 : classNames.authMethodButton),
429
+ disabled: disabled || isBusy,
430
+ method,
431
+ onSelect: onMethodSelect
432
+ },
433
+ method.id
434
+ )) }) }) : null,
435
+ /* @__PURE__ */ jsxs("p", { className: authLegalTextClassName, children: [
436
+ labels.auth.legalNoticePrefix,
437
+ " ",
438
+ /* @__PURE__ */ jsx("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.terms }),
439
+ " ",
440
+ labels.auth.legalNoticeSeparator,
441
+ " ",
442
+ /* @__PURE__ */ jsx("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.privacyPolicy }),
443
+ "."
444
+ ] }),
445
+ errorMessage ? /* @__PURE__ */ jsx(
446
+ InlineAlert,
447
+ {
448
+ tone: "error",
449
+ title: labels.common.errorPrefix,
450
+ message: errorMessage,
451
+ className: classNames == null ? void 0 : classNames.authError
452
+ }
453
+ ) : null
454
+ ] }) })
455
+ ]
456
+ }
457
+ ) })
458
+ ] });
459
+ };
460
+ var AuthConnectButtonView = ({
461
+ activeMethodId,
462
+ addressLabel,
463
+ balanceRows,
464
+ buttonProps,
465
+ classNames,
466
+ disabled,
467
+ emailMethod,
468
+ emailError,
469
+ emailValue,
470
+ errorMessage,
471
+ isAuthenticated,
472
+ isBalanceLoading,
473
+ isBusy,
474
+ isChooserOpen,
475
+ isProfileMenuOpen,
476
+ notice,
477
+ onChooserOpenChange,
478
+ onDepositClick,
479
+ onDisconnectClick,
480
+ onEmailChange,
481
+ onEmailSubmit,
482
+ onMethodSelect,
483
+ onProfileClick,
484
+ onProfileMenuOpenChange,
485
+ socialMethods,
486
+ onViewAllBalancesClick,
487
+ onWithdrawClick,
488
+ profileLabel,
489
+ totalBalance,
490
+ walletMethods
491
+ }) => {
492
+ const labels = useLabels();
493
+ const { enableAnimations, rootClassName } = useSdkUiConfig();
494
+ const resolvedProfileLabel = profileLabel || labels.auth.myProfile;
495
+ const dropdownMenuItemClassName = cn(
496
+ "cursor-pointer",
497
+ profileMenuActionItemClassName,
498
+ enableAnimations ? "transition-colors" : null,
499
+ disabled ? "pointer-events-none opacity-50" : null,
500
+ classNames == null ? void 0 : classNames.profileMenuActionItem
501
+ );
502
+ if (!isAuthenticated) {
503
+ return /* @__PURE__ */ jsx(
504
+ UnauthenticatedConnectView,
505
+ {
506
+ activeMethodId,
507
+ buttonProps,
508
+ classNames,
509
+ disabled,
510
+ emailMethod,
511
+ emailError,
512
+ emailValue,
513
+ errorMessage,
514
+ isBusy,
515
+ isChooserOpen,
516
+ notice,
517
+ onChooserOpenChange,
518
+ onEmailChange,
519
+ onEmailSubmit,
520
+ onMethodSelect,
521
+ socialMethods,
522
+ walletMethods
523
+ }
524
+ );
525
+ }
526
+ return /* @__PURE__ */ jsx("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ jsxs("div", { className: cn(connectedButtonsRowClassName, classNames == null ? void 0 : classNames.connectedRow), children: [
527
+ /* @__PURE__ */ jsxs("div", { className: cn(connectedBalanceChipClassName, classNames == null ? void 0 : classNames.balanceChip), children: [
528
+ /* @__PURE__ */ jsx(
529
+ Button,
530
+ {
531
+ variant: "primary",
532
+ size: "small",
533
+ className: cn("h-6 px-3 text-agg-xs leading-agg-4", classNames == null ? void 0 : classNames.depositButton),
534
+ onClick: onDepositClick,
535
+ disabled,
536
+ "aria-label": labels.auth.deposit,
537
+ children: labels.auth.deposit
538
+ }
539
+ ),
540
+ /* @__PURE__ */ jsx("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
541
+ ] }),
542
+ /* @__PURE__ */ jsxs(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
543
+ /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
544
+ "button",
545
+ {
546
+ type: "button",
547
+ className: cn(
548
+ connectedProfileChipClassName,
549
+ enableAnimations ? "transition-colors" : null,
550
+ classNames == null ? void 0 : classNames.profileTrigger
551
+ ),
552
+ disabled,
553
+ "aria-label": labels.auth.walletMenuFor(resolvedProfileLabel),
554
+ children: [
555
+ /* @__PURE__ */ jsx(WalletAvatar, {}),
556
+ /* @__PURE__ */ jsx(
557
+ "span",
558
+ {
559
+ className: cn(
560
+ "agg-type-body-strong text-agg-foreground",
561
+ classNames == null ? void 0 : classNames.profileTriggerLabel
562
+ ),
563
+ children: resolvedProfileLabel
564
+ }
565
+ ),
566
+ /* @__PURE__ */ jsx(
567
+ Icon,
568
+ {
569
+ name: isProfileMenuOpen ? "chevron-up" : "chevron-down",
570
+ size: "small",
571
+ className: "h-3.5 w-3.5 text-agg-foreground",
572
+ "aria-hidden": "true"
573
+ }
574
+ )
575
+ ]
576
+ }
577
+ ) }),
578
+ /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsxs(
579
+ DropdownMenu.Content,
580
+ {
581
+ className: cn(
582
+ AGG_ROOT_CLASS_NAME,
583
+ rootClassName,
584
+ profileMenuContentClassName,
585
+ classNames == null ? void 0 : classNames.profileMenuContent
586
+ ),
587
+ "data-agg-animations": enableAnimations ? "true" : "false",
588
+ sideOffset: 4,
589
+ align: "end",
590
+ children: [
591
+ /* @__PURE__ */ jsx(
592
+ "button",
593
+ {
594
+ type: "button",
595
+ className: cn(
596
+ profileMenuSectionClassName,
597
+ "cursor-pointer",
598
+ classNames == null ? void 0 : classNames.profileMenuSection
599
+ ),
600
+ onClick: onProfileClick,
601
+ disabled,
602
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
603
+ /* @__PURE__ */ jsx(WalletAvatar, { className: "size-11" }),
604
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-0.5", children: [
605
+ /* @__PURE__ */ jsx("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground", children: resolvedProfileLabel }),
606
+ addressLabel ? /* @__PURE__ */ jsx("p", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground", children: addressLabel }) : null
607
+ ] })
608
+ ] })
609
+ }
610
+ ),
611
+ /* @__PURE__ */ jsx(
612
+ "div",
613
+ {
614
+ className: cn(profileMenuSeparatorClassName, classNames == null ? void 0 : classNames.profileMenuSeparator)
615
+ }
616
+ ),
617
+ /* @__PURE__ */ jsx("div", { className: cn(profileMenuSectionClassName, classNames == null ? void 0 : classNames.profileMenuSection), children: isBalanceLoading ? /* @__PURE__ */ jsxs("p", { className: "flex flex-col gap-2 items-center justify-center text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground", children: [
618
+ /* @__PURE__ */ jsx(LoadingIcon, {}),
619
+ labels.auth.loadingBalances
620
+ ] }) : balanceRows.length === 0 ? /* @__PURE__ */ jsxs("p", { className: "flex flex-col gap-2 items-center justify-center text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground", children: [
621
+ /* @__PURE__ */ jsx(Icon, { name: "warning", className: "text-agg-primary" }),
622
+ labels.auth.noBalances
623
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
624
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center justify-between", children: [
625
+ /* @__PURE__ */ jsx("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 tracking-agg-normal text-agg-muted-foreground", children: labels.auth.balances }),
626
+ /* @__PURE__ */ jsx(
627
+ Button,
628
+ {
629
+ variant: "tertiary",
630
+ size: "small",
631
+ className: "h-6 px-3 text-agg-xs leading-agg-4",
632
+ onClick: onViewAllBalancesClick,
633
+ children: labels.auth.viewAll
634
+ }
635
+ )
636
+ ] }),
637
+ balanceRows.map((row) => {
638
+ var _a;
639
+ const venueLogoName = toVenueLogoName(row.venueKey);
640
+ return /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center justify-between", children: [
641
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
642
+ venueLogoName ? /* @__PURE__ */ jsx(VenueLogo, { venue: venueLogoName, size: "small" }) : null,
643
+ /* @__PURE__ */ jsx("p", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground", children: (_a = labels.venues[row.venueKey]) != null ? _a : row.venueKey })
644
+ ] }),
645
+ /* @__PURE__ */ jsx("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: formatUsd(row.balance) })
646
+ ] }, row.key);
647
+ })
648
+ ] }) }),
649
+ /* @__PURE__ */ jsx(
650
+ "div",
651
+ {
652
+ className: cn(profileMenuSeparatorClassName, classNames == null ? void 0 : classNames.profileMenuSeparator)
653
+ }
654
+ ),
655
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col py-2", children: [
656
+ /* @__PURE__ */ jsxs(
657
+ DropdownMenu.Item,
658
+ {
659
+ className: dropdownMenuItemClassName,
660
+ onSelect: onProfileClick,
661
+ disabled,
662
+ children: [
663
+ /* @__PURE__ */ jsx(Icon, { name: "profile", size: "small", className: "text-agg-foreground" }),
664
+ /* @__PURE__ */ jsx("span", { children: labels.auth.myProfile })
665
+ ]
666
+ }
667
+ ),
668
+ /* @__PURE__ */ jsxs(
669
+ DropdownMenu.Item,
670
+ {
671
+ className: dropdownMenuItemClassName,
672
+ onSelect: onDepositClick,
673
+ disabled,
674
+ children: [
675
+ /* @__PURE__ */ jsx(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
676
+ /* @__PURE__ */ jsx("span", { children: labels.auth.deposit })
677
+ ]
678
+ }
679
+ ),
680
+ /* @__PURE__ */ jsxs(
681
+ DropdownMenu.Item,
682
+ {
683
+ className: dropdownMenuItemClassName,
684
+ onSelect: onWithdrawClick,
685
+ disabled,
686
+ children: [
687
+ /* @__PURE__ */ jsx(Icon, { name: "upload", size: "small", className: "text-agg-foreground" }),
688
+ /* @__PURE__ */ jsx("span", { children: labels.auth.withdraw })
689
+ ]
690
+ }
691
+ ),
692
+ /* @__PURE__ */ jsxs(
693
+ DropdownMenu.Item,
694
+ {
695
+ className: dropdownMenuItemClassName,
696
+ onSelect: onDisconnectClick,
697
+ disabled,
698
+ children: [
699
+ /* @__PURE__ */ jsx(Icon, { name: "disconnect", size: "small", className: "text-agg-foreground" }),
700
+ /* @__PURE__ */ jsx("span", { children: labels.auth.disconnect })
701
+ ]
702
+ }
703
+ )
704
+ ] })
705
+ ]
706
+ }
707
+ ) })
708
+ ] })
709
+ ] }) });
710
+ };
711
+ AuthConnectButtonView.displayName = "AuthConnectButtonView";
142
712
  export {
143
713
  AGG_ROOT_CLASS_NAME,
714
+ AppleIcon,
144
715
  ArrowTrendUpIcon,
145
716
  ArrowsToDotIcon,
717
+ AuthConnectButtonView,
146
718
  Badge,
147
719
  BankIcon,
148
720
  BestPricesIcon,
149
721
  BoltIcon,
150
722
  Button,
151
723
  Card,
724
+ ChartCandlestickIcon,
725
+ ChartLineIcon,
152
726
  CheckCircleIcon,
153
727
  ChevronDownIcon,
154
728
  ChevronLeftIcon,
@@ -156,7 +730,6 @@ export {
156
730
  ChevronUpIcon,
157
731
  CloseIcon,
158
732
  ConnectAccountsStep,
159
- ConnectButton,
160
733
  ConnectKalshiModal,
161
734
  ConnectOnchainModal,
162
735
  CopyIcon,
@@ -167,16 +740,20 @@ export {
167
740
  DocumentIcon,
168
741
  DotsHorizontalIcon,
169
742
  DownloadIcon,
743
+ ErrorFilledIcon,
744
+ EthereumIcon,
170
745
  EventList,
171
746
  EventListItem,
172
747
  EventListItemDetails,
173
748
  EventMarketPage,
174
749
  ExternalLinkIcon,
750
+ GoogleIcon,
175
751
  HelloWorld,
176
752
  HomePage,
177
753
  HowItWorksStep,
178
754
  Icon,
179
755
  InfoIcon,
756
+ InlineAlert,
180
757
  LineChart,
181
758
  LinkAccountsIcon,
182
759
  LoadingIcon,
@@ -197,6 +774,7 @@ export {
197
774
  Settlement,
198
775
  ShieldTrustIcon,
199
776
  Skeleton,
777
+ SolanaIcon,
200
778
  StateMessage,
201
779
  StayInControlIcon,
202
780
  SwitchButton,