@agg-market/ui 0.0.1 → 0.0.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 (60) hide show
  1. package/dist/{chunk-CB2MLGCJ.mjs → chunk-2NCBX6XI.mjs} +5 -1
  2. package/dist/{chunk-7CD7GIZC.mjs → chunk-764YUN2J.mjs} +7 -1
  3. package/dist/{chunk-2PGUPOXY.mjs → chunk-A4QJAOZW.mjs} +9 -5
  4. package/dist/{chunk-765JPQDG.mjs → chunk-FYV3MDIL.mjs} +1 -1
  5. package/dist/{chunk-H7P6DIX4.mjs → chunk-JQ4FUHXE.mjs} +1 -1
  6. package/dist/event-list-item.mjs +1 -1
  7. package/dist/event-list.mjs +2 -2
  8. package/dist/event-market-page.d.mts +1 -1
  9. package/dist/event-market-page.d.ts +1 -1
  10. package/dist/event-market-page.js +8 -4
  11. package/dist/event-market-page.mjs +2 -2
  12. package/dist/home-page.mjs +3 -3
  13. package/dist/index.d.mts +3 -3
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.js +8 -4
  16. package/dist/index.mjs +5 -5
  17. package/dist/market-details.mjs +1 -1
  18. package/dist/place-order.d.mts +1 -1
  19. package/dist/place-order.d.ts +1 -1
  20. package/dist/search.d.mts +3 -21
  21. package/dist/search.d.ts +3 -21
  22. package/dist/settlement.d.mts +1 -1
  23. package/dist/settlement.d.ts +1 -1
  24. package/dist/{types-8VUuQVZq.d.ts → types-C5JigCSX.d.mts} +22 -22
  25. package/dist/{types-8VUuQVZq.d.mts → types-C5JigCSX.d.ts} +22 -22
  26. package/package.json +235 -101
  27. package/dist/chunk-3DV3D2LH.mjs +0 -155
  28. package/dist/chunk-44UEI6KD.mjs +0 -280
  29. package/dist/chunk-4ADCXJE6.mjs +0 -297
  30. package/dist/chunk-4GSXVVSA.mjs +0 -64
  31. package/dist/chunk-4XWCYUV3.mjs +0 -355
  32. package/dist/chunk-6RRBINER.mjs +0 -50
  33. package/dist/chunk-AOFP74IB.mjs +0 -850
  34. package/dist/chunk-DBD5GHHD.mjs +0 -147
  35. package/dist/chunk-FUJQIYOF.mjs +0 -37
  36. package/dist/chunk-GPBLZGJ2.mjs +0 -136
  37. package/dist/chunk-H4LELROL.mjs +0 -262
  38. package/dist/chunk-H7YEBGYY.mjs +0 -42
  39. package/dist/chunk-HJOBAMDU.mjs +0 -142
  40. package/dist/chunk-IJG5I642.mjs +0 -462
  41. package/dist/chunk-KBRLFTJT.mjs +0 -741
  42. package/dist/chunk-L6E6Q4C4.mjs +0 -217
  43. package/dist/chunk-M23S2DVV.mjs +0 -581
  44. package/dist/chunk-MRHSN2B7.mjs +0 -279
  45. package/dist/chunk-MXWRCVRJ.mjs +0 -285
  46. package/dist/chunk-NNSY462N.mjs +0 -212
  47. package/dist/chunk-P5PFQX75.mjs +0 -31
  48. package/dist/chunk-P674XRDY.mjs +0 -481
  49. package/dist/chunk-V5WIYMKS.mjs +0 -25
  50. package/dist/chunk-VAZE267Q.mjs +0 -82
  51. package/dist/chunk-VLIJ7PQK.mjs +0 -792
  52. package/dist/chunk-WIWJ6DIE.mjs +0 -323
  53. package/dist/event-list-item-details.types-CxWr4Qn1.d.ts +0 -53
  54. package/dist/event-list-item-details.types-DRi99PZq.d.mts +0 -53
  55. package/dist/event-list-item.types-B1490EQm.d.mts +0 -46
  56. package/dist/event-list-item.types-B1490EQm.d.ts +0 -46
  57. package/dist/event-list.types-Bpp6Vn-t.d.mts +0 -13
  58. package/dist/event-list.types-Bpp6Vn-t.d.ts +0 -13
  59. package/dist/venue-logo.types-4hmCg3D3.d.ts +0 -17
  60. package/dist/venue-logo.types-QNDwiQ77.d.mts +0 -17
@@ -1,481 +0,0 @@
1
- import {
2
- Card
3
- } from "./chunk-P5PFQX75.mjs";
4
- import {
5
- cn,
6
- getMotionClassName
7
- } from "./chunk-GC3QIIH7.mjs";
8
-
9
- // src/primitives/skeleton/views/event-list-skeleton-view.tsx
10
- import { useLabels as useLabels2 } from "@agg/hooks";
11
-
12
- // src/primitives/skeleton/skeleton-block.tsx
13
- import { useSdkUiConfig } from "@agg/hooks";
14
- import { jsx } from "react/jsx-runtime";
15
- var SkeletonBlock = ({ className }) => {
16
- const { enableAnimations } = useSdkUiConfig();
17
- return /* @__PURE__ */ jsx(
18
- "div",
19
- {
20
- "aria-hidden": true,
21
- className: cn(
22
- "bg-agg-separator",
23
- getMotionClassName(enableAnimations, "animate-pulse"),
24
- className
25
- )
26
- }
27
- );
28
- };
29
- SkeletonBlock.displayName = "SkeletonBlock";
30
-
31
- // src/primitives/skeleton/views/event-list-item-skeleton-view.tsx
32
- import { useLabels } from "@agg/hooks";
33
-
34
- // src/events/item/event-list-item.constants.ts
35
- var baseCardClassName = "gap-3 overflow-hidden p-5 w-full";
36
-
37
- // src/primitives/skeleton/views/event-list-item-skeleton-view.tsx
38
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
39
- var EventListItemSkeletonView = ({
40
- className,
41
- ariaLabel,
42
- isStandalone = false
43
- }) => {
44
- const labels = useLabels();
45
- return /* @__PURE__ */ jsxs(
46
- Card,
47
- {
48
- className: cn(baseCardClassName, className),
49
- role: isStandalone ? "status" : void 0,
50
- "aria-label": isStandalone ? ariaLabel != null ? ariaLabel : labels.eventItem.loading : void 0,
51
- "aria-busy": isStandalone || void 0,
52
- "aria-hidden": isStandalone ? void 0 : true,
53
- children: [
54
- /* @__PURE__ */ jsxs("div", { className: "flex w-full items-start gap-3", children: [
55
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "h-10 w-10 rounded-agg-lg" }),
56
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-2", children: [
57
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm" }),
58
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "h-5 w-[68%] rounded-agg-sm" })
59
- ] })
60
- ] }),
61
- /* @__PURE__ */ jsx2("div", { className: "flex flex-col gap-3", children: [0, 1].map((index) => /* @__PURE__ */ jsxs(
62
- "div",
63
- {
64
- className: "grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3",
65
- children: [
66
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
67
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
68
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "h-9 w-[101px] rounded-agg-full" })
69
- ]
70
- },
71
- index
72
- )) }),
73
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 text-agg-muted-foreground", children: [
74
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
75
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" }),
76
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
77
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
78
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
79
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "size-3 rounded-agg-full" })
80
- ] })
81
- ] }),
82
- /* @__PURE__ */ jsx2(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" })
83
- ] })
84
- ]
85
- }
86
- );
87
- };
88
- EventListItemSkeletonView.displayName = "EventListItemSkeletonView";
89
-
90
- // src/primitives/skeleton/views/event-list-skeleton-view.tsx
91
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
92
- var EventListSkeletonView = ({ className, ariaLabel }) => {
93
- const labels = useLabels2();
94
- return /* @__PURE__ */ jsxs2(
95
- "section",
96
- {
97
- className: cn("flex w-full flex-col gap-5", className),
98
- role: "status",
99
- "aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
100
- "aria-busy": true,
101
- children: [
102
- /* @__PURE__ */ jsxs2("header", { className: "flex w-full flex-col items-start justify-between gap-2 md:flex-row md:flex-nowrap md:items-center md:gap-4", children: [
103
- /* @__PURE__ */ jsx3(SkeletonBlock, { className: "h-7 w-40 rounded-agg-sm" }),
104
- /* @__PURE__ */ jsxs2("div", { className: "flex max-w-full gap-2", children: [
105
- /* @__PURE__ */ jsx3(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
106
- /* @__PURE__ */ jsx3(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
107
- /* @__PURE__ */ jsx3(SkeletonBlock, { className: "h-10 w-24 rounded-agg-full" })
108
- ] })
109
- ] }),
110
- /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-1 gap-5 md:grid-cols-3", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsx3(
111
- EventListItemSkeletonView,
112
- {
113
- isStandalone: false,
114
- className: "w-full min-w-0 max-w-none"
115
- },
116
- index
117
- )) })
118
- ]
119
- }
120
- );
121
- };
122
- EventListSkeletonView.displayName = "EventListSkeletonView";
123
-
124
- // src/primitives/skeleton/views/event-list-item-details-skeleton-view.tsx
125
- import { useLabels as useLabels3 } from "@agg/hooks";
126
-
127
- // src/events/item-details/event-list-item-details.constants.ts
128
- var detailsBaseCardClassName = "w-full overflow-hidden gap-6 p-5 md:gap-8 md:p-10";
129
- var eventListItemDetailsTimeRanges = [
130
- "1H",
131
- "6H",
132
- "1D",
133
- "1W",
134
- "1M",
135
- "ALL"
136
- ];
137
- var lineColorByVenue = {
138
- polymarket: "#2e5cff",
139
- kalshi: "#00d295",
140
- probable: "#f05923",
141
- opinion: "#020205"
142
- };
143
- var fallbackLineColors = ["#2e5cff", "#00d295", "#f05923", "#020205"];
144
-
145
- // src/primitives/skeleton/views/event-list-item-details-skeleton-view.tsx
146
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
147
- var EventListItemDetailsSkeletonView = ({
148
- className,
149
- ariaLabel
150
- }) => {
151
- const labels = useLabels3();
152
- return /* @__PURE__ */ jsxs3(
153
- Card,
154
- {
155
- className: cn(detailsBaseCardClassName, className),
156
- role: "status",
157
- "aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
158
- "aria-busy": true,
159
- children: [
160
- /* @__PURE__ */ jsxs3("div", { className: "flex w-full items-start gap-3 md:gap-4", children: [
161
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "size-10 rounded-agg-lg md:size-[60px]" }),
162
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col gap-2", children: [
163
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm md:h-7 md:w-[55%]" }),
164
- /* @__PURE__ */ jsxs3("div", { className: "flex gap-2 overflow-hidden", children: [
165
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
166
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
167
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" })
168
- ] })
169
- ] })
170
- ] }),
171
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-4", children: [
172
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-10 w-full rounded-agg-full md:w-[220px]" }),
173
- /* @__PURE__ */ jsxs3("div", { className: "flex gap-2 overflow-hidden", children: [
174
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
175
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
176
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
177
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" })
178
- ] })
179
- ] }),
180
- /* @__PURE__ */ jsx4("div", { className: "h-[300px] w-full rounded-agg-xl", children: /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-full w-full rounded-agg-xl" }) }),
181
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
182
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
183
- /* @__PURE__ */ jsx4(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
184
- ] })
185
- ]
186
- }
187
- );
188
- };
189
- EventListItemDetailsSkeletonView.displayName = "EventListItemDetailsSkeletonView";
190
-
191
- // src/primitives/skeleton/views/market-details-skeleton-view.tsx
192
- import { useLabels as useLabels4 } from "@agg/hooks";
193
-
194
- // src/events/market-details/market-details.constants.ts
195
- var marketDetailsBaseCardClassName = "w-full overflow-hidden rounded-agg-lg border border-agg-separator bg-agg-secondary text-agg-foreground shadow-none hover:shadow-none";
196
- var getMarketDetailsTabs = (labels) => {
197
- return [
198
- { value: "order-book", label: labels.marketDetails.tabs.orderBook },
199
- { value: "graph", label: labels.marketDetails.tabs.graph }
200
- ];
201
- };
202
- var marketDetailsDefaultIsOpened = false;
203
- var orderBookRowLimitDefault = 4;
204
-
205
- // src/primitives/skeleton/views/market-details-skeleton-view.tsx
206
- import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
207
- var MarketDetailsSkeletonView = ({
208
- className,
209
- ariaLabel,
210
- isDetailed
211
- }) => {
212
- const labels = useLabels4();
213
- return /* @__PURE__ */ jsxs4(
214
- Card,
215
- {
216
- className: cn(marketDetailsBaseCardClassName, className),
217
- role: "status",
218
- "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
219
- "aria-busy": true,
220
- children: [
221
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-3 p-4 md:px-5 md:py-4", children: [
222
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between gap-4", children: [
223
- /* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
224
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
225
- /* @__PURE__ */ jsxs4("div", { className: "flex min-w-0 flex-col gap-2", children: [
226
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-6 w-40 rounded-agg-sm" }),
227
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
228
- ] })
229
- ] }),
230
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-8 w-16 rounded-agg-sm" })
231
- ] }),
232
- /* @__PURE__ */ jsxs4("div", { className: "flex gap-2", children: [
233
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" }),
234
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" })
235
- ] })
236
- ] }),
237
- isDetailed ? /* @__PURE__ */ jsxs4(Fragment, { children: [
238
- /* @__PURE__ */ jsx5("div", { className: "h-px w-full bg-agg-separator" }),
239
- /* @__PURE__ */ jsx5("div", { className: "flex h-14 items-end", children: /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-full w-full rounded-none" }) }),
240
- /* @__PURE__ */ jsx5("div", { className: "h-px w-full bg-agg-separator" }),
241
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-4 p-5", children: [
242
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-3", children: [
243
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
244
- [0, 1, 2, 3].map((index) => /* @__PURE__ */ jsxs4(
245
- "div",
246
- {
247
- className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
248
- children: [
249
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
250
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
251
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
252
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-2 rounded-agg-full" })
253
- ]
254
- },
255
- `ask-${index}`
256
- ))
257
- ] }),
258
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-3", children: [
259
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
260
- [0, 1, 2, 3].map((index) => /* @__PURE__ */ jsxs4(
261
- "div",
262
- {
263
- className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
264
- children: [
265
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
266
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
267
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
268
- /* @__PURE__ */ jsx5(SkeletonBlock, { className: "h-2 rounded-agg-full" })
269
- ]
270
- },
271
- `bid-${index}`
272
- ))
273
- ] })
274
- ] })
275
- ] }) : null
276
- ]
277
- }
278
- );
279
- };
280
- MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
281
-
282
- // src/primitives/skeleton/views/place-order-skeleton-view.tsx
283
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
284
- var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
285
- var ContentBody = () => {
286
- return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-6 p-5", children: [
287
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2", children: [
288
- /* @__PURE__ */ jsxs5("div", { className: "flex items-start justify-between gap-5", children: [
289
- /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
290
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-12 w-12 shrink-0 rounded-agg-lg" }),
291
- /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
292
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-5 w-[92%] rounded-agg-sm" }),
293
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-5 w-[80%] rounded-agg-sm" })
294
- ] })
295
- ] }),
296
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-6 w-6 rounded-agg-sm" })
297
- ] }),
298
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-5 w-28 rounded-agg-sm" })
299
- ] }),
300
- /* @__PURE__ */ jsx6("div", { className: "flex h-11 items-end border-b border-agg-separator", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-8", children: [
301
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2", children: [
302
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" }),
303
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-[3px] w-12 rounded-t-agg-sm" })
304
- ] }),
305
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
306
- ] }) }),
307
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-4", children: [
308
- /* @__PURE__ */ jsxs5("div", { className: "flex gap-2", children: [
309
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" }),
310
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" })
311
- ] }),
312
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between gap-4", children: [
313
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2", children: [
314
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
315
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
316
- ] }),
317
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-9 w-28 rounded-agg-sm" })
318
- ] })
319
- ] }),
320
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2", children: [
321
- /* @__PURE__ */ jsx6("div", { className: "rounded-agg-lg border border-agg-trade-highlight-border bg-agg-trade-highlight-surface p-3", children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-3", children: [
322
- [0, 1].map((index) => /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-3", children: [
323
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between gap-4", children: [
324
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
325
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
326
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" })
327
- ] }),
328
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
329
- ] }),
330
- index === 0 ? /* @__PURE__ */ jsx6("div", { className: "h-px w-full bg-agg-trade-highlight-border" }) : null
331
- ] }, `place-order-route-${index}`)),
332
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "mx-auto h-5 w-40 rounded-agg-sm" })
333
- ] }) }),
334
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" })
335
- ] }),
336
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between gap-4", children: [
337
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2", children: [
338
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
339
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-4 w-24 rounded-agg-sm" })
340
- ] }),
341
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-9 w-36 rounded-agg-sm" })
342
- ] }),
343
- /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-4 w-[88%] self-center rounded-agg-sm" })
344
- ] });
345
- };
346
- var PlaceOrderSkeletonView = ({
347
- className,
348
- ariaLabel
349
- }) => {
350
- return /* @__PURE__ */ jsx6(
351
- "div",
352
- {
353
- className: cn("w-full", className),
354
- role: "status",
355
- "aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
356
- "aria-busy": true,
357
- children: /* @__PURE__ */ jsx6("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ jsxs5(
358
- Card,
359
- {
360
- className: cn(
361
- placeOrderCardClassName,
362
- "w-full max-w-[400px] rounded-t-agg-xl rounded-b-none border-b-0"
363
- ),
364
- children: [
365
- /* @__PURE__ */ jsx6(ContentBody, {}),
366
- /* @__PURE__ */ jsx6("div", { className: "border-t border-agg-separator bg-agg-secondary p-4", children: /* @__PURE__ */ jsx6(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }) })
367
- ]
368
- }
369
- ) })
370
- }
371
- );
372
- };
373
- PlaceOrderSkeletonView.displayName = "PlaceOrderSkeletonView";
374
-
375
- // src/primitives/skeleton/views/settlement-skeleton-view.tsx
376
- import { useLabels as useLabels5 } from "@agg/hooks";
377
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
378
- var SettlementSkeletonView = ({
379
- className,
380
- ariaLabel
381
- }) => {
382
- const labels = useLabels5();
383
- return /* @__PURE__ */ jsxs6(
384
- Card,
385
- {
386
- className: cn(
387
- "gap-5 rounded-agg-xl border border-agg-separator bg-agg-secondary p-5 shadow-none hover:shadow-none",
388
- className
389
- ),
390
- role: "status",
391
- "aria-label": ariaLabel != null ? ariaLabel : labels.trading.settlementLoading,
392
- "aria-busy": true,
393
- children: [
394
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1 md:flex-row md:items-center md:justify-between md:gap-4", children: [
395
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" }),
396
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-5 w-full max-w-80 rounded-agg-sm" })
397
- ] }),
398
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
399
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-5 w-52 rounded-agg-sm" }),
400
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
401
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-[88%] rounded-agg-sm" }),
402
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-[84%] rounded-agg-sm" }),
403
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-[80%] rounded-agg-sm" }),
404
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-[74%] rounded-agg-sm" })
405
- ] })
406
- ] }),
407
- /* @__PURE__ */ jsx7("div", { className: "h-px w-full bg-agg-separator" }),
408
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-3", children: [
409
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
410
- /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
411
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
412
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
413
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
414
- ] }),
415
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2 pl-6", children: [
416
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-full rounded-agg-sm" }),
417
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-[92%] rounded-agg-sm" }),
418
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-[34%] rounded-agg-sm" })
419
- ] })
420
- ] }),
421
- [0, 1, 2].map((index) => /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
422
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
423
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-5 w-20 rounded-agg-sm" }),
424
- /* @__PURE__ */ jsx7(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
425
- ] }, `settlement-venue-${index}`))
426
- ] })
427
- ]
428
- }
429
- );
430
- };
431
- SettlementSkeletonView.displayName = "SettlementSkeletonView";
432
-
433
- // src/primitives/skeleton/skeleton.types.ts
434
- var skeletonViews = {
435
- eventListItem: "event-list-item",
436
- eventListItemDetails: "event-list-item-details",
437
- marketDetailsMinified: "market-details-minified",
438
- marketDetailsDetailed: "market-details-detailed",
439
- eventList: "event-list",
440
- settlement: "settlement",
441
- placeOrder: "place-order"
442
- };
443
-
444
- // src/primitives/skeleton/index.tsx
445
- import { jsx as jsx8 } from "react/jsx-runtime";
446
- var Skeleton = ({ view, className, ariaLabel }) => {
447
- if (view === skeletonViews.eventListItem) {
448
- return /* @__PURE__ */ jsx8(EventListItemSkeletonView, { className, ariaLabel, isStandalone: true });
449
- }
450
- if (view === skeletonViews.eventListItemDetails) {
451
- return /* @__PURE__ */ jsx8(EventListItemDetailsSkeletonView, { className, ariaLabel });
452
- }
453
- if (view === skeletonViews.marketDetailsMinified) {
454
- return /* @__PURE__ */ jsx8(MarketDetailsSkeletonView, { className, ariaLabel, isDetailed: false });
455
- }
456
- if (view === skeletonViews.marketDetailsDetailed) {
457
- return /* @__PURE__ */ jsx8(MarketDetailsSkeletonView, { className, ariaLabel, isDetailed: true });
458
- }
459
- if (view === skeletonViews.settlement) {
460
- return /* @__PURE__ */ jsx8(SettlementSkeletonView, { className, ariaLabel });
461
- }
462
- if (view === skeletonViews.placeOrder) {
463
- return /* @__PURE__ */ jsx8(PlaceOrderSkeletonView, { className, ariaLabel });
464
- }
465
- return /* @__PURE__ */ jsx8(EventListSkeletonView, { className, ariaLabel });
466
- };
467
- Skeleton.displayName = "Skeleton";
468
-
469
- export {
470
- baseCardClassName,
471
- detailsBaseCardClassName,
472
- eventListItemDetailsTimeRanges,
473
- lineColorByVenue,
474
- fallbackLineColors,
475
- marketDetailsBaseCardClassName,
476
- getMarketDetailsTabs,
477
- marketDetailsDefaultIsOpened,
478
- orderBookRowLimitDefault,
479
- skeletonViews,
480
- Skeleton
481
- };
@@ -1,25 +0,0 @@
1
- import {
2
- Typography
3
- } from "./chunk-DQ6XFBYJ.mjs";
4
-
5
- // src/primitives/hello-world.tsx
6
- import { useHello } from "@agg/hooks";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- function HelloWorld() {
9
- const { data, error, isLoading } = useHello();
10
- if (isLoading) {
11
- return /* @__PURE__ */ jsx(Typography, { variant: "body", children: "Loading..." });
12
- }
13
- if (error) {
14
- return /* @__PURE__ */ jsxs(Typography, { variant: "body", children: [
15
- "Error: ",
16
- error.message
17
- ] });
18
- }
19
- return /* @__PURE__ */ jsx(Typography, { variant: "body", children: data == null ? void 0 : data.message });
20
- }
21
- HelloWorld.displayName = "HelloWorld";
22
-
23
- export {
24
- HelloWorld
25
- };
@@ -1,82 +0,0 @@
1
- import {
2
- iconSizeClasses
3
- } from "./chunk-C4OI72SM.mjs";
4
- import {
5
- cn
6
- } from "./chunk-GC3QIIH7.mjs";
7
-
8
- // src/primitives/loading-icon/index.tsx
9
- import { useLabels, useSdkUiConfig } from "@agg/hooks";
10
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
- var LoadingIcon = ({
12
- size = "m",
13
- className,
14
- ariaLabel
15
- }) => {
16
- const labels = useLabels();
17
- const { enableAnimations } = useSdkUiConfig();
18
- return /* @__PURE__ */ jsx(
19
- "span",
20
- {
21
- role: "status",
22
- "aria-label": ariaLabel != null ? ariaLabel : labels.common.loading,
23
- className: cn(
24
- "inline-grid place-items-center text-agg-primary will-change-transform",
25
- className
26
- ),
27
- children: /* @__PURE__ */ jsx("span", { className: "inline-grid place-items-center", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 44 44", className: cn("block", iconSizeClasses[size]), children: /* @__PURE__ */ jsxs("g", { children: [
28
- enableAnimations ? /* @__PURE__ */ jsx(
29
- "animateTransform",
30
- {
31
- attributeName: "transform",
32
- attributeType: "XML",
33
- type: "rotate",
34
- from: "0 22 22",
35
- to: "360 22 22",
36
- dur: "1.4s",
37
- repeatCount: "indefinite"
38
- }
39
- ) : null,
40
- /* @__PURE__ */ jsx(
41
- "circle",
42
- {
43
- cx: "22",
44
- cy: "22",
45
- r: "16",
46
- fill: "none",
47
- stroke: "currentColor",
48
- strokeWidth: "6",
49
- strokeLinecap: "round",
50
- strokeDasharray: "60 100",
51
- strokeDashoffset: "0",
52
- children: enableAnimations ? /* @__PURE__ */ jsxs(Fragment, { children: [
53
- /* @__PURE__ */ jsx(
54
- "animate",
55
- {
56
- attributeName: "stroke-dasharray",
57
- values: "1 100;60 100;1 100",
58
- dur: "1.2s",
59
- repeatCount: "indefinite"
60
- }
61
- ),
62
- /* @__PURE__ */ jsx(
63
- "animate",
64
- {
65
- attributeName: "stroke-dashoffset",
66
- values: "0;-25;-100",
67
- dur: "1.2s",
68
- repeatCount: "indefinite"
69
- }
70
- )
71
- ] }) : null
72
- }
73
- )
74
- ] }) }) })
75
- }
76
- );
77
- };
78
- LoadingIcon.displayName = "LoadingIcon";
79
-
80
- export {
81
- LoadingIcon
82
- };