@agg-market/ui 9.0.0 → 11.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-6CRY27SQ.mjs → chunk-2KGE5AJQ.mjs} +670 -659
- package/dist/{chunk-N7U7QCSB.mjs → chunk-5FSWOXEG.mjs} +807 -358
- package/dist/{chunk-HJ4UPYM7.mjs → chunk-HMUMJUIL.mjs} +539 -405
- package/dist/{chunk-3G7C6WEC.mjs → chunk-IUJXJEDQ.mjs} +1340 -664
- package/dist/{chunk-3U4VHAP6.mjs → chunk-UONHGMFI.mjs} +12 -4
- package/dist/events.js +1267 -1035
- package/dist/events.mjs +6 -4
- package/dist/index.js +4443 -3205
- package/dist/index.mjs +18 -7
- package/dist/modals.js +1207 -379
- package/dist/modals.mjs +4 -2
- package/dist/pages.js +2942 -1689
- package/dist/pages.mjs +4 -4
- package/dist/primitives.js +1317 -657
- package/dist/primitives.mjs +5 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +274 -190
- package/dist/trading.mjs +2 -2
- package/dist/types/events/item/event-list-item.types.d.mts +1 -2
- package/dist/types/events/item/event-list-item.types.d.ts +1 -2
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +1 -4
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +1 -4
- 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 +3 -2
- package/dist/types/events/list/event-list.types.d.ts +3 -2
- 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 +7 -3
- package/dist/types/events/market-details/index.d.ts +7 -3
- package/dist/types/events/market-details/market-details.types.d.mts +30 -10
- package/dist/types/events/market-details/market-details.types.d.ts +30 -10
- package/dist/types/events/market-details/market-details.utils.d.mts +15 -10
- package/dist/types/events/market-details/market-details.utils.d.ts +15 -10
- package/dist/types/modals/index.d.mts +1 -0
- package/dist/types/modals/index.d.ts +1 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +2 -0
- 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/agg-logo/index.d.mts +6 -0
- package/dist/types/primitives/agg-logo/index.d.ts +6 -0
- package/dist/types/primitives/chart/index.d.mts +9 -1
- package/dist/types/primitives/chart/index.d.ts +9 -1
- package/dist/types/primitives/header/agg-logo.d.mts +2 -0
- package/dist/types/primitives/header/agg-logo.d.ts +2 -0
- package/dist/types/primitives/header/header.constants.d.mts +3 -0
- package/dist/types/primitives/header/header.constants.d.ts +3 -0
- package/dist/types/primitives/header/header.types.d.mts +28 -0
- package/dist/types/primitives/header/header.types.d.ts +28 -0
- package/dist/types/primitives/header/index.d.mts +7 -0
- package/dist/types/primitives/header/index.d.ts +7 -0
- package/dist/types/primitives/index.d.mts +2 -0
- package/dist/types/primitives/index.d.ts +2 -0
- package/dist/types/primitives/search/index.d.mts +1 -1
- package/dist/types/primitives/search/index.d.ts +1 -1
- package/dist/types/primitives/search/search.types.d.mts +9 -59
- package/dist/types/primitives/search/search.types.d.ts +9 -59
- package/dist/types/primitives/search/search.utils.d.mts +4 -0
- package/dist/types/primitives/search/search.utils.d.ts +4 -0
- package/dist/types/primitives/skeleton/skeleton.types.d.mts +1 -0
- package/dist/types/primitives/skeleton/skeleton.types.d.ts +1 -0
- package/dist/types/primitives/skeleton/views/search-skeleton-view.d.mts +5 -0
- package/dist/types/primitives/skeleton/views/search-skeleton-view.d.ts +5 -0
- 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 +4 -4
|
@@ -15,7 +15,6 @@ export type HomePageEventSectionItem = {
|
|
|
15
15
|
maxItemsPerRow?: EventListProps["maxItemsPerRow"];
|
|
16
16
|
limit?: EventListProps["limit"];
|
|
17
17
|
maxVisibleItems?: EventListProps["maxVisibleItems"];
|
|
18
|
-
showVenueLogo?: EventListProps["showVenueLogo"];
|
|
19
18
|
search?: EventListProps["search"];
|
|
20
19
|
categoryIds?: EventListProps["categoryIds"];
|
|
21
20
|
};
|
|
@@ -31,7 +30,6 @@ export type HomePageProps = {
|
|
|
31
30
|
onTabChange?: (value: HomePageTabValue) => void;
|
|
32
31
|
eventSectionItems?: HomePageEventSectionItem[];
|
|
33
32
|
classNames?: HomePageClassNames;
|
|
34
|
-
useCategoriesTabs?: boolean;
|
|
35
33
|
categoriesLimit?: number;
|
|
36
34
|
allCategoryTabLabel?: string;
|
|
37
35
|
};
|
|
@@ -15,7 +15,6 @@ export type HomePageEventSectionItem = {
|
|
|
15
15
|
maxItemsPerRow?: EventListProps["maxItemsPerRow"];
|
|
16
16
|
limit?: EventListProps["limit"];
|
|
17
17
|
maxVisibleItems?: EventListProps["maxVisibleItems"];
|
|
18
|
-
showVenueLogo?: EventListProps["showVenueLogo"];
|
|
19
18
|
search?: EventListProps["search"];
|
|
20
19
|
categoryIds?: EventListProps["categoryIds"];
|
|
21
20
|
};
|
|
@@ -31,7 +30,6 @@ export type HomePageProps = {
|
|
|
31
30
|
onTabChange?: (value: HomePageTabValue) => void;
|
|
32
31
|
eventSectionItems?: HomePageEventSectionItem[];
|
|
33
32
|
classNames?: HomePageClassNames;
|
|
34
|
-
useCategoriesTabs?: boolean;
|
|
35
33
|
categoriesLimit?: number;
|
|
36
34
|
allCategoryTabLabel?: string;
|
|
37
35
|
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { HomePageCategory, HomePageTab, HomePageTabValue } from "./home.types";
|
|
2
|
+
/**
|
|
3
|
+
* Build category tabs from API-returned categories.
|
|
4
|
+
* Preserves the order returned by the API — no hardcoded ordering.
|
|
5
|
+
*/
|
|
2
6
|
export declare const resolveCategoryTabs: (categories: HomePageCategory[], allCategoryTabLabel: string) => HomePageTab[];
|
|
3
7
|
export declare const resolveInitialTabValue: (tabs: HomePageTab[], defaultActiveTab: HomePageTabValue | undefined) => HomePageTabValue;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { HomePageCategory, HomePageTab, HomePageTabValue } from "./home.types";
|
|
2
|
+
/**
|
|
3
|
+
* Build category tabs from API-returned categories.
|
|
4
|
+
* Preserves the order returned by the API — no hardcoded ordering.
|
|
5
|
+
*/
|
|
2
6
|
export declare const resolveCategoryTabs: (categories: HomePageCategory[], allCategoryTabLabel: string) => HomePageTab[];
|
|
3
7
|
export declare const resolveInitialTabValue: (tabs: HomePageTab[], defaultActiveTab: HomePageTabValue | undefined) => HomePageTabValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HomePageProps } from "./home.types";
|
|
2
2
|
export type { HomePageCategory, HomePageClassNames, HomePageEventSectionItem, HomePageProps, HomePageTab, HomePageTabValue, } from "./home.types";
|
|
3
3
|
export declare const HomePage: {
|
|
4
|
-
({ tabs, defaultActiveTab, onTabChange, eventSectionItems, classNames,
|
|
4
|
+
({ tabs, defaultActiveTab, onTabChange, eventSectionItems, classNames, categoriesLimit, allCategoryTabLabel, }: HomePageProps): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HomePageProps } from "./home.types";
|
|
2
2
|
export type { HomePageCategory, HomePageClassNames, HomePageEventSectionItem, HomePageProps, HomePageTab, HomePageTabValue, } from "./home.types";
|
|
3
3
|
export declare const HomePage: {
|
|
4
|
-
({ tabs, defaultActiveTab, onTabChange, eventSectionItems, classNames,
|
|
4
|
+
({ tabs, defaultActiveTab, onTabChange, eventSectionItems, classNames, categoriesLimit, allCategoryTabLabel, }: HomePageProps): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -22,13 +22,21 @@ export type LineChartSeriesControlsRenderProps = {
|
|
|
22
22
|
handleSeriesChange: (seriesId: string) => void;
|
|
23
23
|
};
|
|
24
24
|
export type LineChartProps = {
|
|
25
|
+
/** Series to display on the chart */
|
|
25
26
|
series: LineChartSeries[];
|
|
27
|
+
/** Height of the chart */
|
|
26
28
|
height?: number;
|
|
29
|
+
/** Width of the chart */
|
|
27
30
|
width?: number | string;
|
|
31
|
+
/** Class names for the chart */
|
|
28
32
|
classNames?: LineChartClassNames;
|
|
33
|
+
/** Whether the chart is loading */
|
|
29
34
|
isLoading?: boolean;
|
|
35
|
+
/** Type of chart to display (line or candlestick) */
|
|
30
36
|
chartType?: LineChartType;
|
|
37
|
+
/** Whether to show series controls */
|
|
31
38
|
showSeriesControls?: boolean;
|
|
39
|
+
/** Render series controls */
|
|
32
40
|
renderSeriesControls?: (props: LineChartSeriesControlsRenderProps) => ReactNode;
|
|
33
41
|
/** Live forming candle (updates in real-time, not yet closed). */
|
|
34
42
|
liveCandle?: CandlePoint;
|
|
@@ -36,7 +44,7 @@ export type LineChartProps = {
|
|
|
36
44
|
lineData?: LivelinePoint[];
|
|
37
45
|
/** Live line overlay current value. */
|
|
38
46
|
lineValue?: number;
|
|
39
|
-
/**
|
|
47
|
+
/** Whether live effects (momentum, pulse) should be active. Defaults to global enableLiveUpdates. */
|
|
40
48
|
live?: boolean;
|
|
41
49
|
};
|
|
42
50
|
export type LineChartClassNames = {
|
|
@@ -22,13 +22,21 @@ export type LineChartSeriesControlsRenderProps = {
|
|
|
22
22
|
handleSeriesChange: (seriesId: string) => void;
|
|
23
23
|
};
|
|
24
24
|
export type LineChartProps = {
|
|
25
|
+
/** Series to display on the chart */
|
|
25
26
|
series: LineChartSeries[];
|
|
27
|
+
/** Height of the chart */
|
|
26
28
|
height?: number;
|
|
29
|
+
/** Width of the chart */
|
|
27
30
|
width?: number | string;
|
|
31
|
+
/** Class names for the chart */
|
|
28
32
|
classNames?: LineChartClassNames;
|
|
33
|
+
/** Whether the chart is loading */
|
|
29
34
|
isLoading?: boolean;
|
|
35
|
+
/** Type of chart to display (line or candlestick) */
|
|
30
36
|
chartType?: LineChartType;
|
|
37
|
+
/** Whether to show series controls */
|
|
31
38
|
showSeriesControls?: boolean;
|
|
39
|
+
/** Render series controls */
|
|
32
40
|
renderSeriesControls?: (props: LineChartSeriesControlsRenderProps) => ReactNode;
|
|
33
41
|
/** Live forming candle (updates in real-time, not yet closed). */
|
|
34
42
|
liveCandle?: CandlePoint;
|
|
@@ -36,7 +44,7 @@ export type LineChartProps = {
|
|
|
36
44
|
lineData?: LivelinePoint[];
|
|
37
45
|
/** Live line overlay current value. */
|
|
38
46
|
lineValue?: number;
|
|
39
|
-
/**
|
|
47
|
+
/** Whether live effects (momentum, pulse) should be active. Defaults to global enableLiveUpdates. */
|
|
40
48
|
live?: boolean;
|
|
41
49
|
};
|
|
42
50
|
export type LineChartClassNames = {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { SearchProps } from "../search";
|
|
3
|
+
export type HeaderClassNames = {
|
|
4
|
+
root?: string;
|
|
5
|
+
inner?: string;
|
|
6
|
+
leftSection?: string;
|
|
7
|
+
centerSection?: string;
|
|
8
|
+
rightSection?: string;
|
|
9
|
+
logoWrapper?: string;
|
|
10
|
+
logoElement?: string;
|
|
11
|
+
};
|
|
12
|
+
export type HeaderLogoProps = {
|
|
13
|
+
src: string;
|
|
14
|
+
alt: string;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
};
|
|
18
|
+
export type HeaderProps = {
|
|
19
|
+
logo?: ReactNode | HeaderLogoProps;
|
|
20
|
+
logoHref?: string;
|
|
21
|
+
search?: ReactNode;
|
|
22
|
+
searchProps?: SearchProps;
|
|
23
|
+
actions?: ReactNode;
|
|
24
|
+
classNames?: HeaderClassNames;
|
|
25
|
+
sticky?: boolean;
|
|
26
|
+
"aria-label"?: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const isHeaderLogoProps: (value: unknown) => value is HeaderLogoProps;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { SearchProps } from "../search";
|
|
3
|
+
export type HeaderClassNames = {
|
|
4
|
+
root?: string;
|
|
5
|
+
inner?: string;
|
|
6
|
+
leftSection?: string;
|
|
7
|
+
centerSection?: string;
|
|
8
|
+
rightSection?: string;
|
|
9
|
+
logoWrapper?: string;
|
|
10
|
+
logoElement?: string;
|
|
11
|
+
};
|
|
12
|
+
export type HeaderLogoProps = {
|
|
13
|
+
src: string;
|
|
14
|
+
alt: string;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
};
|
|
18
|
+
export type HeaderProps = {
|
|
19
|
+
logo?: ReactNode | HeaderLogoProps;
|
|
20
|
+
logoHref?: string;
|
|
21
|
+
search?: ReactNode;
|
|
22
|
+
searchProps?: SearchProps;
|
|
23
|
+
actions?: ReactNode;
|
|
24
|
+
classNames?: HeaderClassNames;
|
|
25
|
+
sticky?: boolean;
|
|
26
|
+
"aria-label"?: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const isHeaderLogoProps: (value: unknown) => value is HeaderLogoProps;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { HeaderProps } from "./header.types";
|
|
3
|
+
export type { HeaderClassNames, HeaderLogoProps, HeaderProps } from "./header.types";
|
|
4
|
+
export declare const Header: {
|
|
5
|
+
({ logo, logoHref, search, searchProps, actions, classNames, sticky, "aria-label": ariaLabel, }: HeaderProps): JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { HeaderProps } from "./header.types";
|
|
3
|
+
export type { HeaderClassNames, HeaderLogoProps, HeaderProps } from "./header.types";
|
|
4
|
+
export declare const Header: {
|
|
5
|
+
({ logo, logoHref, search, searchProps, actions, classNames, sticky, "aria-label": ariaLabel, }: HeaderProps): JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./button";
|
|
2
2
|
export * from "./skeleton";
|
|
3
3
|
export * from "./switch-button";
|
|
4
|
+
export * from "./agg-logo";
|
|
4
5
|
export * from "./hello-world";
|
|
5
6
|
export * from "./card";
|
|
6
7
|
export * from "./chart";
|
|
@@ -17,3 +18,4 @@ export * from "./state-message";
|
|
|
17
18
|
export * from "./tabs";
|
|
18
19
|
export * from "./modal";
|
|
19
20
|
export * from "./remote-image";
|
|
21
|
+
export * from "./header";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./button";
|
|
2
2
|
export * from "./skeleton";
|
|
3
3
|
export * from "./switch-button";
|
|
4
|
+
export * from "./agg-logo";
|
|
4
5
|
export * from "./hello-world";
|
|
5
6
|
export * from "./card";
|
|
6
7
|
export * from "./chart";
|
|
@@ -17,3 +18,4 @@ export * from "./state-message";
|
|
|
17
18
|
export * from "./tabs";
|
|
18
19
|
export * from "./modal";
|
|
19
20
|
export * from "./remote-image";
|
|
21
|
+
export * from "./header";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SearchProps } from "./search.types";
|
|
2
2
|
export type { SearchClassNames, SearchInputProps, SearchProps, SearchResultItem, } from "./search.types";
|
|
3
3
|
export declare const Search: {
|
|
4
|
-
({
|
|
4
|
+
({ limit, venues, categoryIds, matchStatus, status, classNames, inputProps, }: SearchProps): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SearchProps } from "./search.types";
|
|
2
2
|
export type { SearchClassNames, SearchInputProps, SearchProps, SearchResultItem, } from "./search.types";
|
|
3
3
|
export declare const Search: {
|
|
4
|
-
({
|
|
4
|
+
({ limit, venues, categoryIds, matchStatus, status, classNames, inputProps, }: SearchProps): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,66 +1,15 @@
|
|
|
1
1
|
import type { InputHTMLAttributes } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { UseVenueEventsOptions } from "@agg-market/hooks";
|
|
3
3
|
import type { VenueLogoName } from "../venue-logo";
|
|
4
|
-
export declare const searchResultItemSchema: z.ZodObject<{
|
|
5
|
-
id: z.ZodString;
|
|
6
|
-
title: z.ZodString;
|
|
7
|
-
thumbnailSrc: z.ZodString;
|
|
8
|
-
thumbnailAlt: z.ZodOptional<z.ZodString>;
|
|
9
|
-
venue: z.ZodType<any, z.ZodTypeDef, any>;
|
|
10
|
-
valueLabel: z.ZodString;
|
|
11
|
-
contextLabel: z.ZodString;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
id?: unknown;
|
|
15
|
-
title?: unknown;
|
|
16
|
-
thumbnailSrc?: unknown;
|
|
17
|
-
thumbnailAlt?: unknown;
|
|
18
|
-
venue?: unknown;
|
|
19
|
-
valueLabel?: unknown;
|
|
20
|
-
contextLabel?: unknown;
|
|
21
|
-
}, {
|
|
22
|
-
[x: string]: any;
|
|
23
|
-
id?: unknown;
|
|
24
|
-
title?: unknown;
|
|
25
|
-
thumbnailSrc?: unknown;
|
|
26
|
-
thumbnailAlt?: unknown;
|
|
27
|
-
venue?: unknown;
|
|
28
|
-
valueLabel?: unknown;
|
|
29
|
-
contextLabel?: unknown;
|
|
30
|
-
}>;
|
|
31
|
-
export declare const searchResultItemsSchema: z.ZodArray<z.ZodObject<{
|
|
32
|
-
id: z.ZodString;
|
|
33
|
-
title: z.ZodString;
|
|
34
|
-
thumbnailSrc: z.ZodString;
|
|
35
|
-
thumbnailAlt: z.ZodOptional<z.ZodString>;
|
|
36
|
-
venue: z.ZodType<any, z.ZodTypeDef, any>;
|
|
37
|
-
valueLabel: z.ZodString;
|
|
38
|
-
contextLabel: z.ZodString;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
[x: string]: any;
|
|
41
|
-
id?: unknown;
|
|
42
|
-
title?: unknown;
|
|
43
|
-
thumbnailSrc?: unknown;
|
|
44
|
-
thumbnailAlt?: unknown;
|
|
45
|
-
venue?: unknown;
|
|
46
|
-
valueLabel?: unknown;
|
|
47
|
-
contextLabel?: unknown;
|
|
48
|
-
}, {
|
|
49
|
-
[x: string]: any;
|
|
50
|
-
id?: unknown;
|
|
51
|
-
title?: unknown;
|
|
52
|
-
thumbnailSrc?: unknown;
|
|
53
|
-
thumbnailAlt?: unknown;
|
|
54
|
-
venue?: unknown;
|
|
55
|
-
valueLabel?: unknown;
|
|
56
|
-
contextLabel?: unknown;
|
|
57
|
-
}>, "many">;
|
|
58
4
|
export type SearchResultItem = {
|
|
59
5
|
id: string;
|
|
60
6
|
title: string;
|
|
61
7
|
thumbnailSrc: string;
|
|
62
8
|
thumbnailAlt?: string;
|
|
63
9
|
venue: VenueLogoName;
|
|
10
|
+
visibleVenues: VenueLogoName[];
|
|
11
|
+
marketSummaryLabel: string;
|
|
12
|
+
volumeLabel: string;
|
|
64
13
|
valueLabel: string;
|
|
65
14
|
contextLabel: string;
|
|
66
15
|
};
|
|
@@ -87,10 +36,11 @@ export type SearchClassNames = {
|
|
|
87
36
|
};
|
|
88
37
|
export type SearchInputProps = Pick<InputHTMLAttributes<HTMLInputElement>, "id" | "name" | "autoComplete" | "autoFocus" | "disabled" | "readOnly" | "required" | "maxLength" | "inputMode" | "onBlur" | "onFocus" | "onKeyDown" | "onKeyUp" | "onKeyPress" | "tabIndex" | "enterKeyHint" | "aria-describedby">;
|
|
89
38
|
export type SearchProps = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
39
|
+
limit?: UseVenueEventsOptions["limit"];
|
|
40
|
+
venues?: UseVenueEventsOptions["venues"];
|
|
41
|
+
categoryIds?: UseVenueEventsOptions["categoryIds"];
|
|
42
|
+
matchStatus?: UseVenueEventsOptions["matchStatus"];
|
|
43
|
+
status?: UseVenueEventsOptions["status"];
|
|
94
44
|
classNames?: SearchClassNames;
|
|
95
45
|
inputProps?: SearchInputProps;
|
|
96
46
|
};
|
|
@@ -1,66 +1,15 @@
|
|
|
1
1
|
import type { InputHTMLAttributes } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { UseVenueEventsOptions } from "@agg-market/hooks";
|
|
3
3
|
import type { VenueLogoName } from "../venue-logo";
|
|
4
|
-
export declare const searchResultItemSchema: z.ZodObject<{
|
|
5
|
-
id: z.ZodString;
|
|
6
|
-
title: z.ZodString;
|
|
7
|
-
thumbnailSrc: z.ZodString;
|
|
8
|
-
thumbnailAlt: z.ZodOptional<z.ZodString>;
|
|
9
|
-
venue: z.ZodType<any, z.ZodTypeDef, any>;
|
|
10
|
-
valueLabel: z.ZodString;
|
|
11
|
-
contextLabel: z.ZodString;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
id?: unknown;
|
|
15
|
-
title?: unknown;
|
|
16
|
-
thumbnailSrc?: unknown;
|
|
17
|
-
thumbnailAlt?: unknown;
|
|
18
|
-
venue?: unknown;
|
|
19
|
-
valueLabel?: unknown;
|
|
20
|
-
contextLabel?: unknown;
|
|
21
|
-
}, {
|
|
22
|
-
[x: string]: any;
|
|
23
|
-
id?: unknown;
|
|
24
|
-
title?: unknown;
|
|
25
|
-
thumbnailSrc?: unknown;
|
|
26
|
-
thumbnailAlt?: unknown;
|
|
27
|
-
venue?: unknown;
|
|
28
|
-
valueLabel?: unknown;
|
|
29
|
-
contextLabel?: unknown;
|
|
30
|
-
}>;
|
|
31
|
-
export declare const searchResultItemsSchema: z.ZodArray<z.ZodObject<{
|
|
32
|
-
id: z.ZodString;
|
|
33
|
-
title: z.ZodString;
|
|
34
|
-
thumbnailSrc: z.ZodString;
|
|
35
|
-
thumbnailAlt: z.ZodOptional<z.ZodString>;
|
|
36
|
-
venue: z.ZodType<any, z.ZodTypeDef, any>;
|
|
37
|
-
valueLabel: z.ZodString;
|
|
38
|
-
contextLabel: z.ZodString;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
[x: string]: any;
|
|
41
|
-
id?: unknown;
|
|
42
|
-
title?: unknown;
|
|
43
|
-
thumbnailSrc?: unknown;
|
|
44
|
-
thumbnailAlt?: unknown;
|
|
45
|
-
venue?: unknown;
|
|
46
|
-
valueLabel?: unknown;
|
|
47
|
-
contextLabel?: unknown;
|
|
48
|
-
}, {
|
|
49
|
-
[x: string]: any;
|
|
50
|
-
id?: unknown;
|
|
51
|
-
title?: unknown;
|
|
52
|
-
thumbnailSrc?: unknown;
|
|
53
|
-
thumbnailAlt?: unknown;
|
|
54
|
-
venue?: unknown;
|
|
55
|
-
valueLabel?: unknown;
|
|
56
|
-
contextLabel?: unknown;
|
|
57
|
-
}>, "many">;
|
|
58
4
|
export type SearchResultItem = {
|
|
59
5
|
id: string;
|
|
60
6
|
title: string;
|
|
61
7
|
thumbnailSrc: string;
|
|
62
8
|
thumbnailAlt?: string;
|
|
63
9
|
venue: VenueLogoName;
|
|
10
|
+
visibleVenues: VenueLogoName[];
|
|
11
|
+
marketSummaryLabel: string;
|
|
12
|
+
volumeLabel: string;
|
|
64
13
|
valueLabel: string;
|
|
65
14
|
contextLabel: string;
|
|
66
15
|
};
|
|
@@ -87,10 +36,11 @@ export type SearchClassNames = {
|
|
|
87
36
|
};
|
|
88
37
|
export type SearchInputProps = Pick<InputHTMLAttributes<HTMLInputElement>, "id" | "name" | "autoComplete" | "autoFocus" | "disabled" | "readOnly" | "required" | "maxLength" | "inputMode" | "onBlur" | "onFocus" | "onKeyDown" | "onKeyUp" | "onKeyPress" | "tabIndex" | "enterKeyHint" | "aria-describedby">;
|
|
89
38
|
export type SearchProps = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
39
|
+
limit?: UseVenueEventsOptions["limit"];
|
|
40
|
+
venues?: UseVenueEventsOptions["venues"];
|
|
41
|
+
categoryIds?: UseVenueEventsOptions["categoryIds"];
|
|
42
|
+
matchStatus?: UseVenueEventsOptions["matchStatus"];
|
|
43
|
+
status?: UseVenueEventsOptions["status"];
|
|
94
44
|
classNames?: SearchClassNames;
|
|
95
45
|
inputProps?: SearchInputProps;
|
|
96
46
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AggUiLabels } from "@agg-market/hooks";
|
|
2
|
+
import type { VenueEventWithMarkets } from "../../events/item";
|
|
3
|
+
import type { SearchResultItem } from "./search.types";
|
|
4
|
+
export declare const mapVenueEventToSearchResult: (event: VenueEventWithMarkets, labels: AggUiLabels, formatPercent: (value: number) => string, formatCompactCurrency: (value: number) => string) => SearchResultItem | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AggUiLabels } from "@agg-market/hooks";
|
|
2
|
+
import type { VenueEventWithMarkets } from "../../events/item";
|
|
3
|
+
import type { SearchResultItem } from "./search.types";
|
|
4
|
+
export declare const mapVenueEventToSearchResult: (event: VenueEventWithMarkets, labels: AggUiLabels, formatPercent: (value: number) => string, formatCompactCurrency: (value: number) => string) => SearchResultItem | null;
|
|
@@ -6,6 +6,7 @@ export declare const skeletonViews: {
|
|
|
6
6
|
readonly eventList: "event-list";
|
|
7
7
|
readonly settlement: "settlement";
|
|
8
8
|
readonly placeOrder: "place-order";
|
|
9
|
+
readonly search: "search";
|
|
9
10
|
};
|
|
10
11
|
export type SkeletonView = (typeof skeletonViews)[keyof typeof skeletonViews];
|
|
11
12
|
export type SkeletonProps = {
|
|
@@ -6,6 +6,7 @@ export declare const skeletonViews: {
|
|
|
6
6
|
readonly eventList: "event-list";
|
|
7
7
|
readonly settlement: "settlement";
|
|
8
8
|
readonly placeOrder: "place-order";
|
|
9
|
+
readonly search: "search";
|
|
9
10
|
};
|
|
10
11
|
export type SkeletonView = (typeof skeletonViews)[keyof typeof skeletonViews];
|
|
11
12
|
export type SkeletonProps = {
|
|
@@ -3,6 +3,6 @@ import type { VenueLogoProps } from "./venue-logo.types";
|
|
|
3
3
|
export { venueLogoNames };
|
|
4
4
|
export type { VenueLogoName, VenueLogoVariant, VenueLogoProps } from "./venue-logo.types";
|
|
5
5
|
export declare const VenueLogo: {
|
|
6
|
-
({ venue, variant, isColor, isMonochromatic, color, size, className, ariaLabel, title, }: VenueLogoProps): JSX.Element;
|
|
6
|
+
({ venue, variant, isColor, isMonochromatic, color, size, className, ariaLabel, title, }: VenueLogoProps): JSX.Element | null;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
@@ -3,6 +3,6 @@ import type { VenueLogoProps } from "./venue-logo.types";
|
|
|
3
3
|
export { venueLogoNames };
|
|
4
4
|
export type { VenueLogoName, VenueLogoVariant, VenueLogoProps } from "./venue-logo.types";
|
|
5
5
|
export declare const VenueLogo: {
|
|
6
|
-
({ venue, variant, isColor, isMonochromatic, color, size, className, ariaLabel, title, }: VenueLogoProps): JSX.Element;
|
|
6
|
+
({ venue, variant, isColor, isMonochromatic, color, size, className, ariaLabel, title, }: VenueLogoProps): JSX.Element | null;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
@@ -40,25 +40,25 @@ export declare const settlementViewModelSchema: z.ZodObject<{
|
|
|
40
40
|
}>, "many">;
|
|
41
41
|
defaultExpandedVenue: z.ZodOptional<z.ZodNullable<z.ZodEnum<["polymarket", "kalshi", "opinion", "probable"]>>>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
question: string;
|
|
44
43
|
venues: {
|
|
45
44
|
venue: "probable" | "kalshi" | "polymarket" | "opinion";
|
|
46
45
|
description: string;
|
|
47
46
|
label?: string | undefined;
|
|
48
47
|
showMoreLabel?: string | undefined;
|
|
49
48
|
}[];
|
|
49
|
+
question: string;
|
|
50
50
|
sectionLabel: string;
|
|
51
51
|
differencesTitle: string;
|
|
52
52
|
differences: string[];
|
|
53
53
|
defaultExpandedVenue?: "probable" | "kalshi" | "polymarket" | "opinion" | null | undefined;
|
|
54
54
|
}, {
|
|
55
|
-
question: string;
|
|
56
55
|
venues: {
|
|
57
56
|
venue: "probable" | "kalshi" | "polymarket" | "opinion";
|
|
58
57
|
description: string;
|
|
59
58
|
label?: string | undefined;
|
|
60
59
|
showMoreLabel?: string | undefined;
|
|
61
60
|
}[];
|
|
61
|
+
question: string;
|
|
62
62
|
sectionLabel: string;
|
|
63
63
|
differencesTitle: string;
|
|
64
64
|
differences: string[];
|
|
@@ -40,25 +40,25 @@ export declare const settlementViewModelSchema: z.ZodObject<{
|
|
|
40
40
|
}>, "many">;
|
|
41
41
|
defaultExpandedVenue: z.ZodOptional<z.ZodNullable<z.ZodEnum<["polymarket", "kalshi", "opinion", "probable"]>>>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
question: string;
|
|
44
43
|
venues: {
|
|
45
44
|
venue: "probable" | "kalshi" | "polymarket" | "opinion";
|
|
46
45
|
description: string;
|
|
47
46
|
label?: string | undefined;
|
|
48
47
|
showMoreLabel?: string | undefined;
|
|
49
48
|
}[];
|
|
49
|
+
question: string;
|
|
50
50
|
sectionLabel: string;
|
|
51
51
|
differencesTitle: string;
|
|
52
52
|
differences: string[];
|
|
53
53
|
defaultExpandedVenue?: "probable" | "kalshi" | "polymarket" | "opinion" | null | undefined;
|
|
54
54
|
}, {
|
|
55
|
-
question: string;
|
|
56
55
|
venues: {
|
|
57
56
|
venue: "probable" | "kalshi" | "polymarket" | "opinion";
|
|
58
57
|
description: string;
|
|
59
58
|
label?: string | undefined;
|
|
60
59
|
showMoreLabel?: string | undefined;
|
|
61
60
|
}[];
|
|
61
|
+
question: string;
|
|
62
62
|
sectionLabel: string;
|
|
63
63
|
differencesTitle: string;
|
|
64
64
|
differences: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-market/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"react": "^18.0.0 || ^19.0.0",
|
|
83
83
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
84
|
-
"@agg-market/hooks": "
|
|
84
|
+
"@agg-market/hooks": "11.0.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
88
87
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
88
|
+
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
89
89
|
"dayjs": "^1.11.19",
|
|
90
|
-
"liveline": "^0.0.
|
|
90
|
+
"liveline": "^0.0.7",
|
|
91
91
|
"zod": "^3.24.1"
|
|
92
92
|
},
|
|
93
93
|
"publishConfig": {
|