@agg-market/ui 8.0.0 → 10.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/dist/{chunk-SBLIHCN2.mjs → chunk-55YYUTBK.mjs} +807 -358
- package/dist/{chunk-JE4MV5RL.mjs → chunk-5G4T5R2H.mjs} +6 -2
- package/dist/{chunk-TLFRGJ5B.mjs → chunk-GYOCLZGH.mjs} +564 -414
- package/dist/{chunk-KRCRD4AJ.mjs → chunk-RYQSVETG.mjs} +212 -174
- package/dist/{chunk-WKY3IN52.mjs → chunk-XP7DREIX.mjs} +54 -15
- package/dist/events.js +604 -421
- package/dist/events.mjs +6 -4
- package/dist/index.js +1616 -948
- package/dist/index.mjs +10 -6
- package/dist/modals.js +1185 -374
- package/dist/modals.mjs +4 -2
- package/dist/pages.js +1434 -1005
- package/dist/pages.mjs +4 -4
- package/dist/primitives.js +53 -14
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +20 -4
- package/dist/trading.mjs +2 -2
- package/dist/types/events/item/event-list-item.types.d.mts +6 -4
- package/dist/types/events/item/event-list-item.types.d.ts +6 -4
- package/dist/types/events/item/event-list-item.utils.d.mts +5 -5
- package/dist/types/events/item/event-list-item.utils.d.ts +5 -5
- package/dist/types/events/item/index.d.mts +1 -1
- package/dist/types/events/item/index.d.ts +1 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +3 -5
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +3 -5
- package/dist/types/events/item-details/event-list-item-details.utils.d.mts +42 -3
- package/dist/types/events/item-details/event-list-item-details.utils.d.ts +42 -3
- package/dist/types/events/list/event-list.types.d.mts +6 -5
- package/dist/types/events/list/event-list.types.d.ts +6 -5
- package/dist/types/events/list/event-list.utils.d.mts +5 -5
- package/dist/types/events/list/event-list.utils.d.ts +5 -5
- package/dist/types/events/list/index.d.mts +1 -1
- package/dist/types/events/list/index.d.ts +1 -1
- package/dist/types/events/market-details/index.d.mts +6 -2
- package/dist/types/events/market-details/index.d.ts +6 -2
- package/dist/types/events/market-details/market-details.types.d.mts +35 -9
- package/dist/types/events/market-details/market-details.types.d.ts +35 -9
- package/dist/types/events/market-details/market-details.utils.d.mts +28 -12
- package/dist/types/events/market-details/market-details.utils.d.ts +28 -12
- package/dist/types/modals/index.d.mts +1 -0
- package/dist/types/modals/index.d.ts +1 -0
- package/dist/types/onramp/index.d.mts +6 -0
- package/dist/types/onramp/index.d.ts +6 -0
- package/dist/types/onramp/onramp-modal.constants.d.mts +9 -0
- package/dist/types/onramp/onramp-modal.constants.d.ts +9 -0
- package/dist/types/onramp/onramp-modal.types.d.mts +64 -0
- package/dist/types/onramp/onramp-modal.types.d.ts +64 -0
- package/dist/types/onramp/steps/quote-card.d.mts +8 -0
- package/dist/types/onramp/steps/quote-card.d.ts +8 -0
- package/dist/types/onramp/steps/quote-form.d.mts +12 -0
- package/dist/types/onramp/steps/quote-form.d.ts +12 -0
- package/dist/types/onramp/steps/quote-selection.d.mts +14 -0
- package/dist/types/onramp/steps/quote-selection.d.ts +14 -0
- package/dist/types/onramp/steps/widget.d.mts +7 -0
- package/dist/types/onramp/steps/widget.d.ts +7 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +4 -2
- package/dist/types/pages/event-market/event-market.types.d.ts +4 -2
- package/dist/types/pages/home/home.constants.d.mts +1 -3
- package/dist/types/pages/home/home.constants.d.ts +1 -3
- package/dist/types/pages/home/home.types.d.mts +0 -2
- package/dist/types/pages/home/home.types.d.ts +0 -2
- package/dist/types/pages/home/home.utils.d.mts +4 -0
- package/dist/types/pages/home/home.utils.d.ts +4 -0
- package/dist/types/pages/home/index.d.mts +1 -1
- package/dist/types/pages/home/index.d.ts +1 -1
- package/dist/types/primitives/chart/index.d.mts +18 -1
- package/dist/types/primitives/chart/index.d.ts +18 -1
- package/dist/types/primitives/venue-logo/index.d.mts +1 -1
- package/dist/types/primitives/venue-logo/index.d.ts +1 -1
- package/dist/types/trading/types.d.mts +2 -2
- package/dist/types/trading/types.d.ts +2 -2
- package/package.json +3 -3
|
@@ -758,7 +758,7 @@ var SwitchButton = ({
|
|
|
758
758
|
"div",
|
|
759
759
|
{
|
|
760
760
|
className: cn(
|
|
761
|
-
"group/agg-switch",
|
|
761
|
+
"group/agg-switch min-w-fit",
|
|
762
762
|
"inline-flex min-w-0 rounded-agg-full bg-agg-secondary-hover font-agg-sans",
|
|
763
763
|
getMotionClassName(enableAnimations, "transition-background duration-200 ease-in-out"),
|
|
764
764
|
"cursor-pointer hover:bg-agg-tertiary",
|
|
@@ -804,6 +804,7 @@ var SwitchButton = ({
|
|
|
804
804
|
tabIndex: isActive ? 0 : -1,
|
|
805
805
|
disabled: option.disabled,
|
|
806
806
|
className: cn(
|
|
807
|
+
"whitespace-nowrap",
|
|
807
808
|
"relative z-10 min-w-0 rounded-agg-full px-5 py-1.5 font-agg-sans text-agg-base leading-agg-6 text-agg-foreground",
|
|
808
809
|
getMotionClassName(
|
|
809
810
|
enableAnimations,
|
|
@@ -1075,11 +1076,16 @@ var LineChart = ({
|
|
|
1075
1076
|
isLoading = false,
|
|
1076
1077
|
chartType = "line",
|
|
1077
1078
|
showSeriesControls = true,
|
|
1078
|
-
renderSeriesControls
|
|
1079
|
+
renderSeriesControls,
|
|
1080
|
+
liveCandle: liveForming,
|
|
1081
|
+
lineData,
|
|
1082
|
+
lineValue,
|
|
1083
|
+
live
|
|
1079
1084
|
}) => {
|
|
1080
1085
|
var _a, _b;
|
|
1081
1086
|
const labels = useLabels6();
|
|
1082
|
-
const { theme } = useSdkUiConfig5();
|
|
1087
|
+
const { theme, enableGradients, enableLiveUpdates } = useSdkUiConfig5();
|
|
1088
|
+
const isLive = enableLiveUpdates && (live != null ? live : true);
|
|
1083
1089
|
const normalizedSeries = useMemo2(() => {
|
|
1084
1090
|
return normalizeSeries(series);
|
|
1085
1091
|
}, [series]);
|
|
@@ -1102,7 +1108,19 @@ var LineChart = ({
|
|
|
1102
1108
|
if (!primarySeries) {
|
|
1103
1109
|
return [];
|
|
1104
1110
|
}
|
|
1105
|
-
|
|
1111
|
+
const points = toLivelinePoints(primarySeries.points);
|
|
1112
|
+
if (points.length < 3) {
|
|
1113
|
+
return [
|
|
1114
|
+
...points,
|
|
1115
|
+
...points.map((point) => __spreadProps(__spreadValues({}, point), {
|
|
1116
|
+
time: point.time + 1500
|
|
1117
|
+
})),
|
|
1118
|
+
...points.map((point) => __spreadProps(__spreadValues({}, point), {
|
|
1119
|
+
time: point.time + 3e3
|
|
1120
|
+
}))
|
|
1121
|
+
];
|
|
1122
|
+
}
|
|
1123
|
+
return points;
|
|
1106
1124
|
}, [primarySeries]);
|
|
1107
1125
|
const primaryCandles = useMemo2(() => {
|
|
1108
1126
|
if (!primarySeries) {
|
|
@@ -1136,7 +1154,7 @@ var LineChart = ({
|
|
|
1136
1154
|
const timeFormatter = useMemo2(() => {
|
|
1137
1155
|
return resolveTimeFormatter(windowSeconds);
|
|
1138
1156
|
}, [windowSeconds]);
|
|
1139
|
-
const seriesControls = showSeriesControls
|
|
1157
|
+
const seriesControls = showSeriesControls ? (_a = renderSeriesControls == null ? void 0 : renderSeriesControls({
|
|
1140
1158
|
series: normalizedSeries,
|
|
1141
1159
|
activeSeriesId,
|
|
1142
1160
|
handleSeriesChange
|
|
@@ -1169,13 +1187,17 @@ var LineChart = ({
|
|
|
1169
1187
|
series: livelineSeries,
|
|
1170
1188
|
color: (_b = primarySeries == null ? void 0 : primarySeries.color) != null ? _b : "var(--agg-color-primary)",
|
|
1171
1189
|
theme: livelineTheme,
|
|
1190
|
+
fill: enableGradients,
|
|
1172
1191
|
grid: true,
|
|
1173
|
-
momentum:
|
|
1174
|
-
pulse:
|
|
1192
|
+
momentum: isLive,
|
|
1193
|
+
pulse: isLive,
|
|
1175
1194
|
window: windowSeconds,
|
|
1176
1195
|
mode: chartType === "candlestick" ? "candle" : "line",
|
|
1177
1196
|
candles: chartType === "candlestick" ? primaryCandles : void 0,
|
|
1178
1197
|
candleWidth: chartType === "candlestick" ? candleWidth : void 0,
|
|
1198
|
+
liveCandle: chartType === "candlestick" ? liveForming : void 0,
|
|
1199
|
+
lineData,
|
|
1200
|
+
lineValue,
|
|
1179
1201
|
formatValue: defaultValueFormatter,
|
|
1180
1202
|
formatTime: timeFormatter,
|
|
1181
1203
|
padding: {
|
|
@@ -1184,7 +1206,8 @@ var LineChart = ({
|
|
|
1184
1206
|
bottom: 28,
|
|
1185
1207
|
left: 12
|
|
1186
1208
|
},
|
|
1187
|
-
loading: isLoading
|
|
1209
|
+
loading: isLoading,
|
|
1210
|
+
lineWidth: 1
|
|
1188
1211
|
}
|
|
1189
1212
|
)
|
|
1190
1213
|
}
|
|
@@ -3086,7 +3109,7 @@ var NumberValue = ({
|
|
|
3086
3109
|
NumberValue.displayName = "NumberValue";
|
|
3087
3110
|
|
|
3088
3111
|
// src/primitives/venue-logo/index.tsx
|
|
3089
|
-
import { useLabels as useLabels8 } from "@agg-market/hooks";
|
|
3112
|
+
import { useAggUiConfig, useLabels as useLabels8 } from "@agg-market/hooks";
|
|
3090
3113
|
|
|
3091
3114
|
// src/primitives/remote-image/index.tsx
|
|
3092
3115
|
import { useRef, useState as useState3 } from "react";
|
|
@@ -3488,9 +3511,12 @@ var VenueLogo = ({
|
|
|
3488
3511
|
title
|
|
3489
3512
|
}) => {
|
|
3490
3513
|
var _a;
|
|
3514
|
+
const { showVenueLogo = true } = useAggUiConfig();
|
|
3491
3515
|
const labels = useLabels8();
|
|
3492
3516
|
const sizeClass = sizeClasses2[size];
|
|
3493
3517
|
const resolvedLabel = (_a = ariaLabel != null ? ariaLabel : labels.venues[venue]) != null ? _a : venueLogoLabels[venue];
|
|
3518
|
+
if (!showVenueLogo)
|
|
3519
|
+
return null;
|
|
3494
3520
|
if (variant === "logo") {
|
|
3495
3521
|
return /* @__PURE__ */ jsx74(
|
|
3496
3522
|
RemoteImage,
|
|
@@ -3564,9 +3590,9 @@ function Badge({
|
|
|
3564
3590
|
)
|
|
3565
3591
|
}, onClick && { onClick }), {
|
|
3566
3592
|
children: [
|
|
3567
|
-
prefix ? /* @__PURE__ */ jsx75("span", { className: classNames == null ? void 0 : classNames.prefix, children: prefix }) : null,
|
|
3593
|
+
prefix ? /* @__PURE__ */ jsx75("span", { className: cn(classNames == null ? void 0 : classNames.prefix, "empty:hidden"), children: prefix }) : null,
|
|
3568
3594
|
/* @__PURE__ */ jsx75("span", { className: cn("truncate", classNames == null ? void 0 : classNames.text), children: text }),
|
|
3569
|
-
suffix ? /* @__PURE__ */ jsx75("span", { className: classNames == null ? void 0 : classNames.suffix, children: suffix }) : null
|
|
3595
|
+
suffix ? /* @__PURE__ */ jsx75("span", { className: cn(classNames == null ? void 0 : classNames.suffix, "empty:hidden"), children: suffix }) : null
|
|
3570
3596
|
]
|
|
3571
3597
|
})
|
|
3572
3598
|
);
|
|
@@ -4072,7 +4098,11 @@ var StateMessage = ({
|
|
|
4072
4098
|
size: "large",
|
|
4073
4099
|
className: "text-agg-base leading-agg-6",
|
|
4074
4100
|
"aria-label": actionLabel,
|
|
4075
|
-
onClick:
|
|
4101
|
+
onClick: (e) => {
|
|
4102
|
+
e.stopPropagation();
|
|
4103
|
+
e.preventDefault();
|
|
4104
|
+
onAction == null ? void 0 : onAction();
|
|
4105
|
+
},
|
|
4076
4106
|
children: actionLabel
|
|
4077
4107
|
}
|
|
4078
4108
|
) : null
|
|
@@ -4124,7 +4154,7 @@ var getTabButtonClassName = ({
|
|
|
4124
4154
|
return cn(
|
|
4125
4155
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
4126
4156
|
"relative inline-flex h-full shrink-0 items-center justify-center gap-2 font-agg-sans",
|
|
4127
|
-
isBarVariant ? "hover:text-agg-foreground hover:bg-agg-secondary-hover" : "hover:text-agg-foreground hover:font-bold",
|
|
4157
|
+
isBarVariant ? "hover:text-agg-foreground hover:bg-agg-secondary-hover" : "hover:text-agg-foreground hover:font-agg-bold",
|
|
4128
4158
|
getMotionClassName(
|
|
4129
4159
|
enableAnimations,
|
|
4130
4160
|
"transition-[colors] duration-300 ease-in-out motion-reduce:transition-none"
|
|
@@ -4550,8 +4580,17 @@ var Tabs = ({
|
|
|
4550
4580
|
)
|
|
4551
4581
|
}
|
|
4552
4582
|
) }) : null,
|
|
4553
|
-
item.icon ? /* @__PURE__ */ jsx80("span", { className: "relative z-10 inline-flex shrink-0 items-center justify-center", children: item.icon }) : null,
|
|
4554
|
-
/* @__PURE__ */ jsx80(
|
|
4583
|
+
item.icon ? /* @__PURE__ */ jsx80("span", { className: "relative z-10 inline-flex shrink-0 items-center justify-center empty:hidden", children: item.icon }) : null,
|
|
4584
|
+
/* @__PURE__ */ jsx80(
|
|
4585
|
+
"span",
|
|
4586
|
+
{
|
|
4587
|
+
className: cn(
|
|
4588
|
+
"relative z-10 truncate whitespace-nowrap [&::first-letter]:uppercase"
|
|
4589
|
+
),
|
|
4590
|
+
"data-text": item.label,
|
|
4591
|
+
children: item.label
|
|
4592
|
+
}
|
|
4593
|
+
)
|
|
4555
4594
|
]
|
|
4556
4595
|
},
|
|
4557
4596
|
item.value
|