@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.
- package/README.md +17 -2
- package/dist/{chunk-LMOJKJOY.mjs → chunk-6I474QXG.mjs} +319 -199
- package/dist/{chunk-5ZKPBMRK.mjs → chunk-AVHMI47G.mjs} +18 -20
- package/dist/{chunk-ADGL6RFX.mjs → chunk-EEQPPN7N.mjs} +1 -1
- package/dist/{chunk-UBBOLLOS.mjs → chunk-EERL6BZF.mjs} +2 -4
- package/dist/{chunk-G6YKGVQR.mjs → chunk-KQKLLL4D.mjs} +15 -54
- package/dist/{chunk-2ICOSP7N.mjs → chunk-L5U7RGJV.mjs} +5 -5
- package/dist/{chunk-HI4EEDN5.mjs → chunk-MUB7NYWZ.mjs} +799 -228
- package/dist/chunk-OAJBTVZT.mjs +119 -0
- package/dist/{chunk-JE3Z52FD.mjs → chunk-OVQVAUAI.mjs} +110 -35
- package/dist/{chunk-CN7GI2RJ.mjs → chunk-ZYUJ7YEJ.mjs} +68 -8
- package/dist/events.js +1364 -771
- package/dist/events.mjs +4 -5
- package/dist/index.js +2353 -1541
- package/dist/index.mjs +597 -19
- package/dist/modals.js +1058 -651
- package/dist/modals.mjs +3 -4
- package/dist/pages.js +1717 -1055
- package/dist/pages.mjs +7 -7
- package/dist/primitives.js +936 -336
- package/dist/primitives.mjs +25 -11
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +994 -512
- package/dist/trading.mjs +4 -4
- package/dist/types/auth/connect-button-view/connect-button-view.constants.d.mts +31 -0
- package/dist/types/auth/connect-button-view/connect-button-view.constants.d.ts +31 -0
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +83 -0
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +83 -0
- package/dist/types/auth/connect-button-view/index.d.mts +7 -0
- package/dist/types/auth/connect-button-view/index.d.ts +7 -0
- package/dist/types/auth/index.d.mts +1 -1
- package/dist/types/auth/index.d.ts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/primitives/chart/chart-type-switch.d.mts +10 -0
- package/dist/types/primitives/chart/chart-type-switch.d.ts +10 -0
- package/dist/types/primitives/chart/index.d.mts +7 -1
- package/dist/types/primitives/chart/index.d.ts +7 -1
- package/dist/types/primitives/icon/index.d.mts +8 -1
- package/dist/types/primitives/icon/index.d.ts +8 -1
- package/dist/types/primitives/icon/registry.d.mts +28 -0
- package/dist/types/primitives/icon/registry.d.ts +28 -0
- package/dist/types/primitives/icon/svg/apple.d.mts +5 -0
- package/dist/types/primitives/icon/svg/apple.d.ts +5 -0
- package/dist/types/primitives/icon/svg/chart-candlestick.d.mts +5 -0
- package/dist/types/primitives/icon/svg/chart-candlestick.d.ts +5 -0
- package/dist/types/primitives/icon/svg/chart-line.d.mts +5 -0
- package/dist/types/primitives/icon/svg/chart-line.d.ts +5 -0
- package/dist/types/primitives/icon/svg/error-filled.d.mts +5 -0
- package/dist/types/primitives/icon/svg/error-filled.d.ts +5 -0
- package/dist/types/primitives/icon/svg/ethereum.d.mts +5 -0
- package/dist/types/primitives/icon/svg/ethereum.d.ts +5 -0
- package/dist/types/primitives/icon/svg/google.d.mts +5 -0
- package/dist/types/primitives/icon/svg/google.d.ts +5 -0
- package/dist/types/primitives/icon/svg/solana.d.mts +5 -0
- package/dist/types/primitives/icon/svg/solana.d.ts +5 -0
- package/dist/types/primitives/index.d.mts +1 -0
- package/dist/types/primitives/index.d.ts +1 -0
- package/dist/types/primitives/inline-alert/index.d.mts +16 -0
- package/dist/types/primitives/inline-alert/index.d.ts +16 -0
- package/dist/types/primitives/venue-logo/svg/logo-limitless.d.mts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-limitless.d.ts +5 -0
- package/dist/types/primitives/venue-logo/venue-logo.types.d.mts +1 -1
- package/dist/types/primitives/venue-logo/venue-logo.types.d.ts +1 -1
- package/dist/types/trading/types.d.mts +26 -26
- package/dist/types/trading/types.d.ts +26 -26
- package/package.json +3 -15
- package/dist/auth.d.mts +0 -1
- package/dist/auth.d.ts +0 -1
- package/dist/auth.js +0 -2290
- package/dist/auth.mjs +0 -8
- package/dist/chunk-INRG3D4M.mjs +0 -450
- package/dist/chunk-MHCHR65A.mjs +0 -165
- package/dist/chunk-PASXFYKQ.mjs +0 -81
- package/dist/types/auth/connect-button/connect-button.constants.d.mts +0 -10
- package/dist/types/auth/connect-button/connect-button.constants.d.ts +0 -10
- package/dist/types/auth/connect-button/connect-button.types.d.mts +0 -33
- package/dist/types/auth/connect-button/connect-button.types.d.ts +0 -33
- package/dist/types/auth/connect-button/index.d.mts +0 -7
- package/dist/types/auth/connect-button/index.d.ts +0 -7
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Modal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
Select
|
|
6
|
-
} from "./chunk-MHCHR65A.mjs";
|
|
3
|
+
} from "./chunk-EEQPPN7N.mjs";
|
|
7
4
|
import {
|
|
8
5
|
BankIcon,
|
|
9
6
|
BestPricesIcon,
|
|
@@ -21,6 +18,7 @@ import {
|
|
|
21
18
|
LinkAccountsIcon,
|
|
22
19
|
PlaySquareIcon,
|
|
23
20
|
ProfileIcon,
|
|
21
|
+
Select,
|
|
24
22
|
StayInControlIcon,
|
|
25
23
|
VenueLogo,
|
|
26
24
|
WalletIcon,
|
|
@@ -31,7 +29,7 @@ import {
|
|
|
31
29
|
formatAmountDisplay,
|
|
32
30
|
formatCompactUsd,
|
|
33
31
|
venueLogoLabels
|
|
34
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-MUB7NYWZ.mjs";
|
|
35
33
|
|
|
36
34
|
// src/deposit/index.tsx
|
|
37
35
|
import { useState as useState3 } from "react";
|
|
@@ -51,9 +49,9 @@ var VenueRow = ({ venue, onSelect }) => {
|
|
|
51
49
|
{
|
|
52
50
|
className: cn(
|
|
53
51
|
"flex items-center gap-3 sm:gap-4",
|
|
54
|
-
"rounded-xl border border-separator",
|
|
52
|
+
"rounded-xl border border-agg-separator",
|
|
55
53
|
"p-3 sm:p-4",
|
|
56
|
-
"hover:bg-secondary-hover transition-colors cursor-pointer"
|
|
54
|
+
"hover:bg-agg-secondary-hover transition-colors cursor-pointer"
|
|
57
55
|
),
|
|
58
56
|
role: "button",
|
|
59
57
|
tabIndex: 0,
|
|
@@ -121,9 +119,9 @@ var DepositMethodCard = ({
|
|
|
121
119
|
{
|
|
122
120
|
className: cn(
|
|
123
121
|
"flex items-center gap-3 sm:gap-4",
|
|
124
|
-
"rounded-xl border border-separator",
|
|
122
|
+
"rounded-xl border border-agg-separator",
|
|
125
123
|
"p-3 sm:p-4",
|
|
126
|
-
"hover:bg-secondary-hover transition-colors cursor-pointer"
|
|
124
|
+
"hover:bg-agg-secondary-hover transition-colors cursor-pointer"
|
|
127
125
|
),
|
|
128
126
|
role: "button",
|
|
129
127
|
tabIndex: 0,
|
|
@@ -135,7 +133,7 @@ var DepositMethodCard = ({
|
|
|
135
133
|
}
|
|
136
134
|
},
|
|
137
135
|
children: [
|
|
138
|
-
/* @__PURE__ */ jsx2("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-secondary-hover", children: icon }),
|
|
136
|
+
/* @__PURE__ */ jsx2("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-agg-secondary-hover", children: icon }),
|
|
139
137
|
/* @__PURE__ */ jsxs2("div", { className: "flex-1 min-w-0", children: [
|
|
140
138
|
/* @__PURE__ */ jsx2("p", { className: "agg-type-body-strong text-agg-foreground", children: title }),
|
|
141
139
|
/* @__PURE__ */ jsx2("p", { className: "agg-type-label text-agg-muted-foreground", children: description })
|
|
@@ -296,9 +294,9 @@ var CardDepositStep = ({
|
|
|
296
294
|
{
|
|
297
295
|
className: cn(
|
|
298
296
|
"flex items-center gap-3",
|
|
299
|
-
"rounded-xl border border-separator",
|
|
297
|
+
"rounded-xl border border-agg-separator",
|
|
300
298
|
"p-3 sm:p-4",
|
|
301
|
-
"hover:bg-secondary-hover transition-colors cursor-pointer"
|
|
299
|
+
"hover:bg-agg-secondary-hover transition-colors cursor-pointer"
|
|
302
300
|
),
|
|
303
301
|
role: "button",
|
|
304
302
|
tabIndex: 0,
|
|
@@ -467,7 +465,7 @@ var CryptoTransferStep = ({
|
|
|
467
465
|
{
|
|
468
466
|
className: cn(
|
|
469
467
|
"flex items-center gap-2",
|
|
470
|
-
"rounded border border-separator bg-secondary",
|
|
468
|
+
"rounded border border-agg-separator bg-agg-secondary",
|
|
471
469
|
"h-10 px-3"
|
|
472
470
|
),
|
|
473
471
|
children: [
|
|
@@ -499,7 +497,7 @@ var KalshiStepCard = ({
|
|
|
499
497
|
title,
|
|
500
498
|
description,
|
|
501
499
|
children
|
|
502
|
-
}) => /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2 rounded-xl bg-secondary-hover p-4", children: [
|
|
500
|
+
}) => /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2 rounded-xl bg-agg-secondary-hover p-4", children: [
|
|
503
501
|
/* @__PURE__ */ jsxs5("p", { className: "agg-type-caption-caps text-agg-muted-foreground", children: [
|
|
504
502
|
"Step ",
|
|
505
503
|
step
|
|
@@ -689,10 +687,10 @@ var VenueRow2 = ({ venue, onSelect }) => {
|
|
|
689
687
|
{
|
|
690
688
|
className: cn(
|
|
691
689
|
"flex items-center gap-3 sm:gap-4",
|
|
692
|
-
"rounded-xl border border-separator",
|
|
690
|
+
"rounded-xl border border-agg-separator",
|
|
693
691
|
"p-3 sm:p-4",
|
|
694
692
|
"transition-colors",
|
|
695
|
-
isDisabled ? "opacity-50 cursor-not-allowed" : "hover:bg-secondary-hover cursor-pointer"
|
|
693
|
+
isDisabled ? "opacity-50 cursor-not-allowed" : "hover:bg-agg-secondary-hover cursor-pointer"
|
|
696
694
|
),
|
|
697
695
|
role: "button",
|
|
698
696
|
tabIndex: isDisabled ? -1 : 0,
|
|
@@ -756,9 +754,9 @@ var WithdrawMethodCard = ({
|
|
|
756
754
|
{
|
|
757
755
|
className: cn(
|
|
758
756
|
"flex items-center gap-3 sm:gap-4",
|
|
759
|
-
"rounded-xl border border-separator",
|
|
757
|
+
"rounded-xl border border-agg-separator",
|
|
760
758
|
"p-3 sm:p-4",
|
|
761
|
-
"hover:bg-secondary-hover transition-colors cursor-pointer"
|
|
759
|
+
"hover:bg-agg-secondary-hover transition-colors cursor-pointer"
|
|
762
760
|
),
|
|
763
761
|
role: "button",
|
|
764
762
|
tabIndex: 0,
|
|
@@ -770,7 +768,7 @@ var WithdrawMethodCard = ({
|
|
|
770
768
|
}
|
|
771
769
|
},
|
|
772
770
|
children: [
|
|
773
|
-
/* @__PURE__ */ jsx8("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-secondary-hover", children: icon }),
|
|
771
|
+
/* @__PURE__ */ jsx8("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-agg-secondary-hover", children: icon }),
|
|
774
772
|
/* @__PURE__ */ jsxs8("div", { className: "flex-1 min-w-0", children: [
|
|
775
773
|
/* @__PURE__ */ jsx8("p", { className: "agg-type-body-strong text-agg-foreground", children: title }),
|
|
776
774
|
/* @__PURE__ */ jsx8("p", { className: "agg-type-label text-agg-muted-foreground", children: description })
|
|
@@ -955,7 +953,7 @@ var KalshiStepCard2 = ({
|
|
|
955
953
|
title,
|
|
956
954
|
description,
|
|
957
955
|
children
|
|
958
|
-
}) => /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-2 rounded-xl bg-secondary-hover p-4", children: [
|
|
956
|
+
}) => /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-2 rounded-xl bg-agg-secondary-hover p-4", children: [
|
|
959
957
|
/* @__PURE__ */ jsxs10("p", { className: "agg-type-caption-caps text-agg-muted-foreground", children: [
|
|
960
958
|
"Step ",
|
|
961
959
|
step
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Select
|
|
3
|
-
} from "./chunk-MHCHR65A.mjs";
|
|
4
|
-
import {
|
|
2
|
+
Select,
|
|
5
3
|
__objRest,
|
|
6
4
|
__spreadProps,
|
|
7
5
|
__spreadValues,
|
|
8
6
|
cn,
|
|
9
7
|
getMotionClassName,
|
|
10
8
|
getScrollBehavior
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MUB7NYWZ.mjs";
|
|
12
10
|
|
|
13
11
|
// src/primitives/card/index.tsx
|
|
14
12
|
import { useSdkUiConfig } from "@agg-market/hooks";
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
InlineAlert
|
|
3
|
+
} from "./chunk-OAJBTVZT.mjs";
|
|
1
4
|
import {
|
|
2
5
|
Card,
|
|
3
6
|
Skeleton,
|
|
4
7
|
Tabs,
|
|
5
8
|
skeletonViews
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EERL6BZF.mjs";
|
|
7
10
|
import {
|
|
8
11
|
Button,
|
|
9
12
|
Icon,
|
|
@@ -13,7 +16,7 @@ import {
|
|
|
13
16
|
cn,
|
|
14
17
|
formatUsd,
|
|
15
18
|
getMotionClassName
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MUB7NYWZ.mjs";
|
|
17
20
|
|
|
18
21
|
// src/trading/utils.ts
|
|
19
22
|
import { resolveAggUiLabels } from "@agg-market/hooks";
|
|
@@ -66,38 +69,6 @@ var getTradingSlippageLabel = (value) => {
|
|
|
66
69
|
import { useEffect, useMemo, useState } from "react";
|
|
67
70
|
import { useLabels, useSdkUiConfig } from "@agg-market/hooks";
|
|
68
71
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
69
|
-
var WarningFilledIcon = ({ className }) => {
|
|
70
|
-
return /* @__PURE__ */ jsxs(
|
|
71
|
-
"svg",
|
|
72
|
-
{
|
|
73
|
-
viewBox: "0 0 16 16",
|
|
74
|
-
fill: "none",
|
|
75
|
-
className: cn("text-agg-warning", className),
|
|
76
|
-
"aria-hidden": "true",
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ jsx("path", { d: "M8 1.33301L15.3333 14.6663H0.666656L8 1.33301Z", fill: "currentColor" }),
|
|
79
|
-
/* @__PURE__ */ jsx("path", { d: "M8 5.33301V8.66634", stroke: "white", strokeWidth: "1.4", strokeLinecap: "round" }),
|
|
80
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "11.1667", r: "0.833333", fill: "white" })
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
var ErrorFilledIcon = ({ className }) => {
|
|
86
|
-
return /* @__PURE__ */ jsxs(
|
|
87
|
-
"svg",
|
|
88
|
-
{
|
|
89
|
-
viewBox: "0 0 16 16",
|
|
90
|
-
fill: "none",
|
|
91
|
-
className: cn("text-agg-error", className),
|
|
92
|
-
"aria-hidden": "true",
|
|
93
|
-
children: [
|
|
94
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "8", fill: "currentColor" }),
|
|
95
|
-
/* @__PURE__ */ jsx("path", { d: "M8 4.16699V8.50033", stroke: "white", strokeWidth: "1.4", strokeLinecap: "round" }),
|
|
96
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "11.167", r: "0.833333", fill: "white" })
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
72
|
var getPlaceOrderContainerClassName = () => {
|
|
102
73
|
return "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
|
|
103
74
|
};
|
|
@@ -140,27 +111,17 @@ var getStatusContent = ({
|
|
|
140
111
|
if (!status || status.placement !== placement)
|
|
141
112
|
return null;
|
|
142
113
|
if (status.tone === "warning") {
|
|
143
|
-
return /* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */ jsx(WarningFilledIcon, { className: "h-4 w-4 shrink-0" }),
|
|
145
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: status.message })
|
|
146
|
-
] });
|
|
114
|
+
return /* @__PURE__ */ jsx(InlineAlert, { tone: "warning", message: status.message });
|
|
147
115
|
}
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
className: "shrink-0 text-agg-sm font-agg-bold leading-agg-5 text-agg-primary",
|
|
158
|
-
"aria-label": status.actionLabel,
|
|
159
|
-
onClick: onStatusAction,
|
|
160
|
-
children: status.actionLabel
|
|
161
|
-
}
|
|
162
|
-
) : null
|
|
163
|
-
] });
|
|
116
|
+
return /* @__PURE__ */ jsx(
|
|
117
|
+
InlineAlert,
|
|
118
|
+
{
|
|
119
|
+
tone: "error",
|
|
120
|
+
message: status.message,
|
|
121
|
+
actionLabel: status.actionLabel,
|
|
122
|
+
onAction: status.actionLabel ? onStatusAction : void 0
|
|
123
|
+
}
|
|
124
|
+
);
|
|
164
125
|
};
|
|
165
126
|
var PlaceOrder = ({
|
|
166
127
|
title,
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
EventListItemDetails,
|
|
4
4
|
MarketDetails,
|
|
5
5
|
isErrorWithStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6I474QXG.mjs";
|
|
7
7
|
import {
|
|
8
8
|
StateMessage,
|
|
9
9
|
Typography
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZYUJ7YEJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
PlaceOrder,
|
|
13
13
|
Settlement
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KQKLLL4D.mjs";
|
|
15
15
|
import {
|
|
16
16
|
Card,
|
|
17
17
|
Tabs
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EERL6BZF.mjs";
|
|
19
19
|
import {
|
|
20
20
|
Button,
|
|
21
21
|
Icon,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
__spreadProps,
|
|
24
24
|
__spreadValues,
|
|
25
25
|
cn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MUB7NYWZ.mjs";
|
|
27
27
|
|
|
28
28
|
// src/pages/home/index.tsx
|
|
29
29
|
import { useEffect, useMemo, useState } from "react";
|