@agg-build/ui 4.2.0 → 4.4.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 +21 -16
- package/dist/{chunk-DNPDXL2D.mjs → chunk-64BBTXFE.mjs} +333 -102
- package/dist/{chunk-WDCH4RRS.mjs → chunk-6STRIKUA.mjs} +1 -1
- package/dist/{chunk-FTL25XKE.mjs → chunk-734VTGCV.mjs} +1 -1
- package/dist/{chunk-QW7VFURU.mjs → chunk-N7UPPT5J.mjs} +53 -3
- package/dist/{chunk-6X6Y4INU.mjs → chunk-UCU2XCV5.mjs} +2 -2
- package/dist/{chunk-GNEFI4SO.mjs → chunk-V5CRUO6S.mjs} +637 -380
- package/dist/{chunk-UDBHAZJJ.mjs → chunk-WW5QKNIM.mjs} +270 -123
- package/dist/events.js +1061 -645
- package/dist/events.mjs +6 -4
- package/dist/index.js +2923 -2251
- package/dist/index.mjs +12 -8
- package/dist/modals.js +9 -2
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +2391 -1721
- package/dist/pages.mjs +8 -6
- package/dist/primitives.js +30 -3
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +330 -99
- package/dist/trading.mjs +4 -4
- package/dist/types/events/index.d.mts +1 -0
- package/dist/types/events/index.d.ts +1 -0
- package/dist/types/events/item-details/event-list-item-details-market-selector.d.mts +4 -1
- package/dist/types/events/item-details/event-list-item-details-market-selector.d.ts +4 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +25 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +25 -1
- package/dist/types/events/item-details/index.d.mts +1 -1
- package/dist/types/events/item-details/index.d.ts +1 -1
- package/dist/types/events/market-details/index.d.mts +1 -1
- package/dist/types/events/market-details/index.d.ts +1 -1
- package/dist/types/events/market-details/market-details.types.d.mts +4 -0
- package/dist/types/events/market-details/market-details.types.d.ts +4 -0
- package/dist/types/events/shared/format-event-title.d.mts +9 -1
- package/dist/types/events/shared/format-event-title.d.ts +9 -1
- package/dist/types/events/shared/format-sports-event-time.d.mts +2 -0
- package/dist/types/events/shared/format-sports-event-time.d.ts +2 -0
- package/dist/types/events/shared/sports-live-score.d.mts +10 -0
- package/dist/types/events/shared/sports-live-score.d.ts +10 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +4 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +4 -0
- package/dist/types/pages/event-market/index.d.mts +1 -0
- package/dist/types/pages/event-market/index.d.ts +1 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +5 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +5 -0
- package/dist/types/pages/user-profile/components/open-order-row.d.mts +1 -0
- package/dist/types/pages/user-profile/components/open-order-row.d.ts +1 -0
- package/dist/types/pages/user-profile/components/positions-activity.d.mts +1 -1
- package/dist/types/pages/user-profile/components/positions-activity.d.ts +1 -1
- package/dist/types/pages/user-profile/user-profile.types.d.mts +1 -1
- package/dist/types/pages/user-profile/user-profile.types.d.ts +1 -1
- package/dist/types/trading/place-order/index.d.mts +1 -1
- package/dist/types/trading/place-order/index.d.ts +1 -1
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +13 -1
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +13 -1
- package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +2 -1
- package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +2 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +9 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +9 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +6 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +6 -0
- package/package.json +3 -3
- /package/dist/{chunk-KHHFHXXD.mjs → chunk-JH4B3ZHQ.mjs} +0 -0
package/README.md
CHANGED
|
@@ -41,8 +41,9 @@ dependency.
|
|
|
41
41
|
|
|
42
42
|
```tsx
|
|
43
43
|
import "@agg-build/ui/styles.css";
|
|
44
|
-
import {
|
|
44
|
+
import { QueryClient, QueryClientProvider } from "@agg-build/hooks";
|
|
45
45
|
import { createAggClient } from "@agg-build/sdk";
|
|
46
|
+
import { AggProvider } from "@agg-build/ui";
|
|
46
47
|
import { HomePage } from "@agg-build/ui/pages";
|
|
47
48
|
|
|
48
49
|
const client = createAggClient({
|
|
@@ -50,18 +51,21 @@ const client = createAggClient({
|
|
|
50
51
|
appId: "your-app-id",
|
|
51
52
|
wsUrl: "wss://ws.agg.market",
|
|
52
53
|
});
|
|
54
|
+
const queryClient = new QueryClient();
|
|
53
55
|
|
|
54
56
|
export default function App() {
|
|
55
57
|
return (
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
<QueryClientProvider client={queryClient}>
|
|
59
|
+
<AggProvider
|
|
60
|
+
client={client}
|
|
61
|
+
config={{
|
|
62
|
+
general: { locale: "en-US", theme: "dark" },
|
|
63
|
+
features: { enableAnimations: true, enableLiveUpdates: true, showFeesBreakdown: true },
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
<HomePage withHeader />
|
|
67
|
+
</AggProvider>
|
|
68
|
+
</QueryClientProvider>
|
|
65
69
|
);
|
|
66
70
|
}
|
|
67
71
|
```
|
|
@@ -74,8 +78,9 @@ Import the default theme once at your app entrypoint:
|
|
|
74
78
|
import "@agg-build/ui/styles.css";
|
|
75
79
|
```
|
|
76
80
|
|
|
77
|
-
|
|
78
|
-
`
|
|
81
|
+
The UI-level `AggProvider` adds AGG's toast surface to the hooks provider. It still requires the
|
|
82
|
+
same `client` prop and `QueryClientProvider` ancestor shown above. Override theme tokens with CSS
|
|
83
|
+
variables on the `.agg-root` container (automatically applied by `AggProvider`):
|
|
79
84
|
|
|
80
85
|
```css
|
|
81
86
|
.agg-root {
|
|
@@ -103,11 +108,11 @@ const inter = Inter({
|
|
|
103
108
|
export default function App() {
|
|
104
109
|
return (
|
|
105
110
|
<div className={inter.variable}>
|
|
106
|
-
<
|
|
107
|
-
<
|
|
111
|
+
<QueryClientProvider client={queryClient}>
|
|
112
|
+
<AggProvider client={client}>
|
|
108
113
|
<AggApp />
|
|
109
|
-
</
|
|
110
|
-
</
|
|
114
|
+
</AggProvider>
|
|
115
|
+
</QueryClientProvider>
|
|
111
116
|
</div>
|
|
112
117
|
);
|
|
113
118
|
}
|