@liberfi.io/ui-predict 4.0.70 → 4.0.72
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/index.d.mts +116 -63
- package/dist/index.d.ts +116 -63
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -17
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _liberfi_io_react_predict from '@liberfi.io/react-predict';
|
|
3
|
-
import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ListCandlesticksParams, Candlestick, PredictComment, PredictPosition, PredictSearchResult, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup, PolymarketWalletKind } from '@liberfi.io/react-predict';
|
|
3
|
+
import { EventSortField, ProviderSource, PredictEvent, PredictMarket, MarketDataCapability, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, Orderbook, ListCandlesticksParams, Candlestick, PredictComment, PredictionOrderIntentStatus, PredictPosition, PredictSearchResult, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup, PolymarketWalletKind } from '@liberfi.io/react-predict';
|
|
4
4
|
export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowKYCStatus, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, MatchConfidenceTier, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchMarketFlat, MatchMarketPage, MatchMarketParams, MatchSortField, MatchStatus, MatchesParams, MatchesStats, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, PolymarketRedeemInput, PolymarketRedeemResponse, PositionValue, PositionValueError, PositionValueResponse, PositionsResponse, PredictClient, PredictContext, PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictPosition, PredictProvider, PredictProviderProps, PredictSearchParams, PredictSearchResponse, PredictSearchResult, PredictSearchResultType, PredictTag, PredictTrade, PredictWsClient, PriceHistoryParams, PriceHistoryRange, PriceHistoryResponse, PricePoint, ProviderMeta, ProviderSource, ResolveEventsParamsInput, SettlementSource, SimilarEventsParams, TradeType, createPredictClient, createPredictWsClient, eventStatsQueryKey, fetchMatchMarketsPage, fetchMatchesPage, fetchPredictSearch, matchMarketsQueryKey, matchQueryKey, matchesQueryKey, predictSearchQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfinitePredictSearch, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrders, usePositionValue, usePositionValueMulti, usePositions, usePredictClient, usePredictSearch, usePriceHistory, useRedeemPosition, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
|
|
5
5
|
import { LinkComponentType } from '@liberfi.io/ui';
|
|
6
|
-
import
|
|
6
|
+
import { SearchHistoryStorage, SearchKeyboardNavigation } from '@liberfi.io/ui/search';
|
|
7
7
|
import * as react from 'react';
|
|
8
|
-
import { ReactNode, PropsWithChildren } from 'react';
|
|
8
|
+
import { Ref, MutableRefObject, ReactNode, PropsWithChildren } from 'react';
|
|
9
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* A single category entry in the static navigation model.
|
|
@@ -149,8 +150,10 @@ interface EventsPageProps {
|
|
|
149
150
|
enableKalshi?: boolean;
|
|
150
151
|
/** Resolved API language for localized event payloads. */
|
|
151
152
|
lang?: string;
|
|
153
|
+
marketDataCapability?: MarketDataCapability;
|
|
154
|
+
getMarketDataEvent?: (event: PredictEvent) => PredictEvent | undefined;
|
|
152
155
|
}
|
|
153
|
-
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover,
|
|
156
|
+
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, onInsufficientBalance, enableKalshi, lang, marketDataCapability, getMarketDataEvent, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
154
157
|
|
|
155
158
|
interface EventsWidgetProps {
|
|
156
159
|
/** Category / tag selection from the categories widget. */
|
|
@@ -190,8 +193,10 @@ interface EventsWidgetProps {
|
|
|
190
193
|
LinkComponent?: LinkComponentType;
|
|
191
194
|
/** Called when a card is hovered (for data prefetching). */
|
|
192
195
|
onHover?: (event: PredictEvent) => void;
|
|
196
|
+
marketDataCapability?: MarketDataCapability;
|
|
197
|
+
getMarketDataEvent?: (event: PredictEvent) => PredictEvent | undefined;
|
|
193
198
|
}
|
|
194
|
-
declare function EventsWidget({ tagSlugSelection, limit, status, sort_by, sort_asc, source, with_markets, timeRemaining, minVolume, minLiquidity, markets_limit, lang, onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, }: EventsWidgetProps): react_jsx_runtime.JSX.Element;
|
|
199
|
+
declare function EventsWidget({ tagSlugSelection, limit, status, sort_by, sort_asc, source, with_markets, timeRemaining, minVolume, minLiquidity, markets_limit, lang, onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, marketDataCapability, getMarketDataEvent, }: EventsWidgetProps): react_jsx_runtime.JSX.Element;
|
|
195
200
|
|
|
196
201
|
/** Parameters for useEventsInfinite */
|
|
197
202
|
type UseEventsInfiniteParams = ResolveEventsParamsInput;
|
|
@@ -225,15 +230,16 @@ type EventsUIProps = {
|
|
|
225
230
|
getEventHref?: (event: PredictEvent) => string;
|
|
226
231
|
LinkComponent?: LinkComponentType;
|
|
227
232
|
onHover?: (event: PredictEvent) => void;
|
|
233
|
+
marketDataCapability?: MarketDataCapability;
|
|
234
|
+
getMarketDataEvent?: (event: PredictEvent) => PredictEvent | undefined;
|
|
228
235
|
};
|
|
229
|
-
declare function EventsUI({ events, hasMore, isFetchingMore, onFetchMore, onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, }: EventsUIProps): react_jsx_runtime.JSX.Element;
|
|
236
|
+
declare function EventsUI({ events, hasMore, isFetchingMore, onFetchMore, onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, marketDataCapability, getMarketDataEvent, }: EventsUIProps): react_jsx_runtime.JSX.Element;
|
|
230
237
|
|
|
231
238
|
interface EventsSkeletonProps {
|
|
232
239
|
count?: number;
|
|
233
240
|
}
|
|
234
241
|
declare function EventsSkeleton({ count }: EventsSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
235
|
-
|
|
236
|
-
}
|
|
242
|
+
type EventsPageSkeletonProps = EventsSkeletonProps;
|
|
237
243
|
declare function EventsPageSkeleton({ count, }: EventsPageSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
238
244
|
|
|
239
245
|
interface EventsHeroProps {
|
|
@@ -251,54 +257,10 @@ type EventItemProps = {
|
|
|
251
257
|
onSelectOutcome?: (event: PredictEvent, market: PredictMarket, side: "yes" | "no") => void;
|
|
252
258
|
/** Called when the card is hovered (for data prefetching). */
|
|
253
259
|
onHover?: (event: PredictEvent) => void;
|
|
260
|
+
marketDataCapability?: MarketDataCapability;
|
|
261
|
+
marketDataEvent?: PredictEvent;
|
|
254
262
|
};
|
|
255
|
-
declare function EventItem({ event, href, LinkComponent, onSelect, onSelectOutcome, onHover, }: EventItemProps): react_jsx_runtime.JSX.Element;
|
|
256
|
-
|
|
257
|
-
interface EventDetailPageProps {
|
|
258
|
-
/** Event slug (canonical business key). */
|
|
259
|
-
eventSlug: string;
|
|
260
|
-
/** Upstream provider (`"kalshi"` or `"polymarket"`). Required by prediction-server. */
|
|
261
|
-
source?: ProviderSource;
|
|
262
|
-
/** Chain network for trading (default: 'solana'). */
|
|
263
|
-
chain?: string;
|
|
264
|
-
/** Resolved API language for localized event payloads. */
|
|
265
|
-
lang?: string;
|
|
266
|
-
/** Connected wallet address for user activity (positions/orders/trades). */
|
|
267
|
-
walletAddress?: string;
|
|
268
|
-
/** Callback when a similar event card is clicked. Receives the clicked event. */
|
|
269
|
-
onSimilarEventClick?: (event: PredictEvent) => void;
|
|
270
|
-
/** Called when a similar event card is hovered (for data prefetching). */
|
|
271
|
-
onSimilarEventHover?: (event: PredictEvent) => void;
|
|
272
|
-
/** Navigation callback — if provided, a "Back" button is shown at the top. */
|
|
273
|
-
onBack?: () => void;
|
|
274
|
-
/**
|
|
275
|
-
* Custom render for the user activity section (positions / orders / history).
|
|
276
|
-
* When provided, replaces the built-in `UserActivitySection`.
|
|
277
|
-
*/
|
|
278
|
-
renderActivitySection?: (props: {
|
|
279
|
-
event: PredictEvent;
|
|
280
|
-
walletAddress?: string;
|
|
281
|
-
}) => React.ReactNode;
|
|
282
|
-
/**
|
|
283
|
-
* Forwarded to the inline TradeFormWidget and the mobile trade modal:
|
|
284
|
-
* invoked when the user attempts to buy with an amount exceeding the
|
|
285
|
-
* available USDC balance for the market's source. Use this to open a Fund
|
|
286
|
-
* Wallet / deposit flow.
|
|
287
|
-
*/
|
|
288
|
-
onInsufficientBalance?: (source: ProviderSource) => void;
|
|
289
|
-
/**
|
|
290
|
-
* Forwarded to the inline SellFormWidget and the mobile sell modal: invoked
|
|
291
|
-
* when the user attempts to sell while the Polymarket account still needs
|
|
292
|
-
* setup (deploy + approve). Use this to open the account setup modal.
|
|
293
|
-
*/
|
|
294
|
-
onSetupRequired?: () => void;
|
|
295
|
-
/**
|
|
296
|
-
* Maximum tolerated slippage for market orders, in basis points
|
|
297
|
-
* (100 = 1%). Forwarded to both buy and sell forms. Defaults to 100 bps.
|
|
298
|
-
*/
|
|
299
|
-
slippageBps?: number;
|
|
300
|
-
}
|
|
301
|
-
declare function EventDetailPage({ eventSlug, source, chain, lang, walletAddress, onSimilarEventClick, onSimilarEventHover, onBack, renderActivitySection, onInsufficientBalance, onSetupRequired, slippageBps, }: EventDetailPageProps): react_jsx_runtime.JSX.Element;
|
|
263
|
+
declare function EventItem({ event, href, LinkComponent, onSelect, onSelectOutcome, onHover, marketDataCapability, marketDataEvent, }: EventItemProps): react_jsx_runtime.JSX.Element;
|
|
302
264
|
|
|
303
265
|
type TradeOutcome = "yes" | "no";
|
|
304
266
|
type TradeSide = "buy" | "sell";
|
|
@@ -400,6 +362,65 @@ declare function parsePolymarketError(raw: string, t: (...args: any[]) => string
|
|
|
400
362
|
declare function formatShares(size: number, maxDecimals?: number): string;
|
|
401
363
|
declare function fireCelebration(): void;
|
|
402
364
|
|
|
365
|
+
interface EventMarketDataBookSelection {
|
|
366
|
+
marketSlug: string;
|
|
367
|
+
outcomeKey: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
interface EventDetailPageProps {
|
|
371
|
+
/** Event slug (canonical business key). */
|
|
372
|
+
eventSlug: string;
|
|
373
|
+
/** Upstream provider (`"kalshi"` or `"polymarket"`). Required by prediction-server. */
|
|
374
|
+
source?: ProviderSource;
|
|
375
|
+
/** Chain network for trading (default: 'solana'). */
|
|
376
|
+
chain?: string;
|
|
377
|
+
/** Resolved API language for localized event payloads. */
|
|
378
|
+
lang?: string;
|
|
379
|
+
/** Connected wallet address for user activity (positions/orders/trades). */
|
|
380
|
+
walletAddress?: string;
|
|
381
|
+
/** Callback when a similar event card is clicked. Receives the clicked event. */
|
|
382
|
+
onSimilarEventClick?: (event: PredictEvent) => void;
|
|
383
|
+
/** Called when a similar event card is hovered (for data prefetching). */
|
|
384
|
+
onSimilarEventHover?: (event: PredictEvent) => void;
|
|
385
|
+
/** Navigation callback — if provided, a "Back" button is shown at the top. */
|
|
386
|
+
onBack?: () => void;
|
|
387
|
+
/**
|
|
388
|
+
* Custom render for the user activity section (positions / orders / history).
|
|
389
|
+
* When provided, replaces the built-in `UserActivitySection`.
|
|
390
|
+
*/
|
|
391
|
+
renderActivitySection?: (props: {
|
|
392
|
+
event: PredictEvent;
|
|
393
|
+
walletAddress?: string;
|
|
394
|
+
}) => React.ReactNode;
|
|
395
|
+
/**
|
|
396
|
+
* Forwarded to the inline TradeFormWidget and the mobile trade modal:
|
|
397
|
+
* invoked when the user attempts to buy with an amount exceeding the
|
|
398
|
+
* available USDC balance for the market's source. Use this to open a Fund
|
|
399
|
+
* Wallet / deposit flow.
|
|
400
|
+
*/
|
|
401
|
+
onInsufficientBalance?: (source: ProviderSource) => void;
|
|
402
|
+
/**
|
|
403
|
+
* Forwarded to the inline SellFormWidget and the mobile sell modal: invoked
|
|
404
|
+
* when the user attempts to sell while the Polymarket account still needs
|
|
405
|
+
* setup (deploy + approve). Use this to open the account setup modal.
|
|
406
|
+
*/
|
|
407
|
+
onSetupRequired?: () => void;
|
|
408
|
+
/**
|
|
409
|
+
* Maximum tolerated slippage for market orders, in basis points
|
|
410
|
+
* (100 = 1%). Forwarded to both buy and sell forms. Defaults to 100 bps.
|
|
411
|
+
*/
|
|
412
|
+
slippageBps?: number;
|
|
413
|
+
/** Explicitly selects the mutually exclusive market-data-v1 UI branch. */
|
|
414
|
+
marketDataCapability?: MarketDataCapability;
|
|
415
|
+
/** Event with validated Initial Quote/live components merged by the SDK owner. */
|
|
416
|
+
marketDataEvent?: PredictEvent;
|
|
417
|
+
/** Provider-neutral plural/live books keyed by `${marketSlug}:${outcome}`. */
|
|
418
|
+
marketDataOrderbooks?: ReadonlyMap<string, Orderbook | null>;
|
|
419
|
+
/** Requests atomic replacement of the optional detail Book subscription. */
|
|
420
|
+
onMarketDataBookSelectionChange?: (selection: EventMarketDataBookSelection | null) => void;
|
|
421
|
+
}
|
|
422
|
+
declare function EventDetailPage({ eventSlug, source, chain, lang, walletAddress, onSimilarEventClick, onSimilarEventHover, onBack, renderActivitySection, onInsufficientBalance, onSetupRequired, slippageBps, marketDataCapability, marketDataEvent, marketDataOrderbooks, onMarketDataBookSelectionChange, }: EventDetailPageProps): react_jsx_runtime.JSX.Element;
|
|
423
|
+
|
|
403
424
|
interface UseTradeFormParams {
|
|
404
425
|
market: PredictMarket;
|
|
405
426
|
chain?: string;
|
|
@@ -496,11 +517,14 @@ interface EventOrderbookQuote {
|
|
|
496
517
|
|
|
497
518
|
interface EventDetailUIProps {
|
|
498
519
|
event: PredictEvent;
|
|
520
|
+
marketDataEnabled?: boolean;
|
|
521
|
+
marketDataOrderbooks?: ReadonlyMap<string, Orderbook | null>;
|
|
522
|
+
onMarketDataBookSelectionChange?: (selection: EventMarketDataBookSelection | null) => void;
|
|
499
523
|
orderbookQuotes?: Map<string, EventOrderbookQuote>;
|
|
500
524
|
/** Callback when a trade action is triggered */
|
|
501
525
|
onTradeAction?: (market: PredictMarket, outcome: TradeOutcome, side: TradeSide) => void;
|
|
502
526
|
}
|
|
503
|
-
declare function EventDetailUI({ event, orderbookQuotes, onTradeAction, }: EventDetailUIProps): react_jsx_runtime.JSX.Element;
|
|
527
|
+
declare function EventDetailUI({ event, marketDataEnabled, marketDataOrderbooks, onMarketDataBookSelectionChange, orderbookQuotes, onTradeAction, }: EventDetailUIProps): react_jsx_runtime.JSX.Element;
|
|
504
528
|
|
|
505
529
|
interface EventDetailWidgetProps {
|
|
506
530
|
/** Event slug (canonical business key). */
|
|
@@ -623,11 +647,19 @@ interface EventMarketDetailWidgetProps {
|
|
|
623
647
|
className?: string;
|
|
624
648
|
/** Optional formatter for display-only orderbook price labels. */
|
|
625
649
|
oddsFormatter?: OddsFormatter;
|
|
650
|
+
/** Disables the legacy orderbook request and subscription when false. */
|
|
651
|
+
enabled?: boolean;
|
|
652
|
+
/**
|
|
653
|
+
* Provider-neutral market-data-v1 book. `undefined` uses the legacy hook,
|
|
654
|
+
* while `null` renders an explicitly unavailable book.
|
|
655
|
+
*/
|
|
656
|
+
orderbook?: Orderbook | null;
|
|
626
657
|
}
|
|
627
|
-
declare function EventMarketDetailWidget({ market, outcome,
|
|
658
|
+
declare function EventMarketDetailWidget({ market, outcome, initialViewMode, className, oddsFormatter, enabled, orderbook: suppliedOrderbook, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
|
|
628
659
|
|
|
629
660
|
interface EventPriceChartProps {
|
|
630
661
|
event: PredictEvent;
|
|
662
|
+
marketDataEnabled?: boolean;
|
|
631
663
|
isLoading?: boolean;
|
|
632
664
|
/** Optional CSS class for the outer container */
|
|
633
665
|
className?: string;
|
|
@@ -739,6 +771,13 @@ interface CommentItemUIProps {
|
|
|
739
771
|
*/
|
|
740
772
|
declare function CommentItemUI({ comment, anonymousLabel, isReply, }: CommentItemUIProps): react_jsx_runtime.JSX.Element;
|
|
741
773
|
|
|
774
|
+
type OrderIntentView = {
|
|
775
|
+
status: PredictionOrderIntentStatus;
|
|
776
|
+
canSubmit: boolean;
|
|
777
|
+
canCancel: boolean;
|
|
778
|
+
};
|
|
779
|
+
declare function orderIntentView(status: PredictionOrderIntentStatus): OrderIntentView;
|
|
780
|
+
|
|
742
781
|
type PredictTradeModalParams = {
|
|
743
782
|
event: PredictEvent;
|
|
744
783
|
market: PredictMarket;
|
|
@@ -1160,6 +1199,8 @@ type SearchEventsButtonProps = {
|
|
|
1160
1199
|
};
|
|
1161
1200
|
declare function SearchEventsButton({ onSelectEvent, modalParams, className, }: SearchEventsButtonProps): react_jsx_runtime.JSX.Element;
|
|
1162
1201
|
|
|
1202
|
+
declare const PREDICT_SEARCH_HISTORY_KEY = "liberfi:predict_search_histories";
|
|
1203
|
+
declare function createPredictSearchHistoryStorage(): SearchHistoryStorage;
|
|
1163
1204
|
declare function usePredictSearchHistory(): {
|
|
1164
1205
|
histories: string[];
|
|
1165
1206
|
addHistory: (keyword: string) => void;
|
|
@@ -1177,10 +1218,15 @@ declare function SearchHistoryUI({ histories, onSelect, onClear, className, }: S
|
|
|
1177
1218
|
type SearchHistoryWidgetProps = {
|
|
1178
1219
|
/** Callback when a history keyword is selected */
|
|
1179
1220
|
onSelect?: (keyword: string) => void;
|
|
1221
|
+
/** Optional snapshot from a shared search controller */
|
|
1222
|
+
histories?: readonly string[];
|
|
1223
|
+
/** Optional clear handler from a shared search controller */
|
|
1224
|
+
onClear?: () => void;
|
|
1180
1225
|
className?: string;
|
|
1181
1226
|
};
|
|
1182
|
-
declare function SearchHistoryWidget({ onSelect, className, }: SearchHistoryWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1227
|
+
declare function SearchHistoryWidget({ onSelect, histories: historiesProp, onClear, className, }: SearchHistoryWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1183
1228
|
|
|
1229
|
+
type SearchNavigationKey = "ArrowDown" | "ArrowUp" | "Enter" | "Escape";
|
|
1184
1230
|
type SearchInputUIProps = {
|
|
1185
1231
|
/** Controlled input value */
|
|
1186
1232
|
value: string;
|
|
@@ -1190,9 +1236,11 @@ type SearchInputUIProps = {
|
|
|
1190
1236
|
onClear?: () => void;
|
|
1191
1237
|
/** Called when Esc button is pressed */
|
|
1192
1238
|
onEscape?: () => void;
|
|
1239
|
+
/** Forwards Arrow/Enter/Escape to the result-list navigation handle */
|
|
1240
|
+
onNavigateKey?: (key: SearchNavigationKey) => void;
|
|
1193
1241
|
className?: string;
|
|
1194
1242
|
};
|
|
1195
|
-
declare function SearchInputUI({ value, onValueChange, onClear, onEscape, className, }: SearchInputUIProps): react_jsx_runtime.JSX.Element;
|
|
1243
|
+
declare function SearchInputUI({ value, onValueChange, onClear, onEscape, onNavigateKey, className, }: SearchInputUIProps): react_jsx_runtime.JSX.Element;
|
|
1196
1244
|
|
|
1197
1245
|
type SearchResultItemUIProps = {
|
|
1198
1246
|
result: PredictSearchResult;
|
|
@@ -1203,9 +1251,11 @@ type SearchResultItemUIProps = {
|
|
|
1203
1251
|
onSelect?: (result: PredictSearchResult) => void;
|
|
1204
1252
|
/** Called when the row is hovered (for data prefetching). */
|
|
1205
1253
|
onHover?: (result: PredictSearchResult) => void;
|
|
1254
|
+
highlighted?: boolean;
|
|
1255
|
+
actionRef?: Ref<HTMLElement>;
|
|
1206
1256
|
className?: string;
|
|
1207
1257
|
};
|
|
1208
|
-
declare function SearchResultItemUI({ result, href, LinkComponent, onSelect, onHover, className, }: SearchResultItemUIProps): react_jsx_runtime.JSX.Element;
|
|
1258
|
+
declare function SearchResultItemUI({ result, href, LinkComponent, onSelect, onHover, highlighted, actionRef, className, }: SearchResultItemUIProps): react_jsx_runtime.JSX.Element;
|
|
1209
1259
|
|
|
1210
1260
|
interface UseSearchResultListScriptParams {
|
|
1211
1261
|
keyword?: string;
|
|
@@ -1215,6 +1265,7 @@ interface UseSearchResultListScriptParams {
|
|
|
1215
1265
|
}
|
|
1216
1266
|
declare function useSearchResultListScript({ keyword, limit, source, }: UseSearchResultListScriptParams): {
|
|
1217
1267
|
results: PredictSearchResult[];
|
|
1268
|
+
items: PredictSearchResult[];
|
|
1218
1269
|
isLoading: boolean;
|
|
1219
1270
|
isFetchingNextPage: boolean;
|
|
1220
1271
|
hasNextPage: boolean;
|
|
@@ -1230,8 +1281,10 @@ type SearchResultListWidgetProps = {
|
|
|
1230
1281
|
/** Called when a row is hovered (for data prefetching). */
|
|
1231
1282
|
onHover?: (result: PredictSearchResult) => void;
|
|
1232
1283
|
className?: string;
|
|
1284
|
+
navigationRef?: MutableRefObject<SearchKeyboardNavigation | null>;
|
|
1285
|
+
onEscape?: () => void;
|
|
1233
1286
|
} & UseSearchResultListScriptParams;
|
|
1234
|
-
declare function SearchResultListWidget({ onSelect, getEventHref, LinkComponent, onHover, className, ...scriptParams }: SearchResultListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1287
|
+
declare function SearchResultListWidget({ onSelect, getEventHref, LinkComponent, onHover, className, navigationRef, onEscape, ...scriptParams }: SearchResultListWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1235
1288
|
|
|
1236
1289
|
interface UseSearchScriptParams {
|
|
1237
1290
|
/** Callback when the debounced keyword changes */
|
|
@@ -1240,7 +1293,7 @@ interface UseSearchScriptParams {
|
|
|
1240
1293
|
declare function useSearchScript({ onKeywordChange }: UseSearchScriptParams): {
|
|
1241
1294
|
text: string;
|
|
1242
1295
|
keyword: string;
|
|
1243
|
-
setText: (
|
|
1296
|
+
setText: (value: string) => void;
|
|
1244
1297
|
setKeyword: (value: string) => void;
|
|
1245
1298
|
clearKeyword: () => void;
|
|
1246
1299
|
};
|
|
@@ -1537,4 +1590,4 @@ type PredictWalletProviderProps = PropsWithChildren<{
|
|
|
1537
1590
|
}>;
|
|
1538
1591
|
declare function PredictWalletProvider({ pollingInterval, enabled, enableKalshi, children, }: PredictWalletProviderProps): react_jsx_runtime.JSX.Element;
|
|
1539
1592
|
|
|
1540
|
-
export { CHART_RANGE_DURATION, CHART_RANGE_FIDELITY_MINUTES, CHART_RANGE_PERIOD, CHART_RANGE_SAMPLE_INTERVAL, CandlestickPeriod, type CandlestickPeriodType, CategoriesSkeleton, CategoriesUI, type CategoriesUIProps, CategoriesWidget, type CategoriesWidgetProps, type CategoryItem, type CategoryListItem, type CategoryTagItem, ChartRange, type ChartRangeType, CommentItemUI, type CommentItemUIProps, type ComputeMaxBuyAmountParams, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, type DurationUnit, type EstimatePolymarketBuyFeeParams, type EstimatePolymarketSellFeeParams, EventCommentsWidget, type EventCommentsWidgetProps, EventDetailPage, type EventDetailPageProps, EventDetailSkeleton, type EventDetailSkeletonProps, EventDetailUI, type EventDetailUIProps, EventDetailWidget, type EventDetailWidgetProps, EventItem, type EventItemProps, EventMarketDepthChartUI, type EventMarketDepthChartUIProps, EventMarketDetailWidget, type EventMarketDetailWidgetProps, EventPriceChart, type EventPriceChartProps, type EventsFilterState, EventsFilterUI, type EventsFilterUIProps, EventsHero, type EventsHeroProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, type ExpirationPreset, KycModal, type KycModalProps, MAX_PRICE_HISTORY_MARKETS, MatchGroupCard, type MatchGroupCardProps, MatchMarketCard, type MatchMarketCardProps, MatchesFilterBar, type MatchesFilterBarProps, MatchesHero, type MatchesHeroProps, type MatchesHeroStats, MatchesPage, type MatchesPageProps, MatchesStatsBar, type MatchesStatsBarProps, MatchesWidget, type MatchesWidgetProps, type MatchesWidgetRef, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_MIN_USDC, ORDER_PRICE_STEP, type OddsFormatter, type OrderType, POLYMARKET_BUILDER_TAKER_FEE_BPS, POLYMARKET_SPORTS_TAKER_FEE_BPS, PREDICT_REDEEM_MODAL_ID, PREDICT_SEARCH_MODAL_ID, PREDICT_SELL_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictRedeemModal, type PredictRedeemModalParams, type PredictRedeemModalResult, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictSellModal, type PredictSellModalParams, type PredictSellModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, RedeemFormWidget, type RedeemFormWidgetProps, SORT_PRESETS, STATIC_CATEGORIES, SearchEventsButton, type SearchEventsButtonProps, SearchHistoryUI, type SearchHistoryUIProps, SearchHistoryWidget, type SearchHistoryWidgetProps, SearchInputUI, type SearchInputUIProps, SearchResultItemUI, type SearchResultItemUIProps, SearchResultListWidget, type SearchResultListWidgetProps, SearchWidget, type SearchWidgetProps, SellFormUI, type SellFormUIProps, SellFormWidget, type SellFormWidgetProps, SetupModal, type SetupModalProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, SourceBadge, type SourceBadgeProps, SpreadIndicator, type SpreadIndicatorProps, type TagItem, type TagSlugSelection, TradeFormSkeleton, TradeFormUI, type TradeFormUIProps, type TradeFormValidation, TradeFormWidget, type TradeFormWidgetProps, type TradeOutcome, type TradeResultToastController, type TradeResultToastMessages, type TradeSide, type UseEventDetailParams, type UseEventsInfiniteParams, type UseEventsInfiniteResult, type UseSearchResultListScriptParams, type UseSearchScriptParams, type UseSellFormParams, type UseSellFormResult, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, computeMaxBuyAmount, countActiveFilters, createTradeResultToast, estimatePolymarketBuyFee, estimatePolymarketSellFee, fireCelebration, floorToDecimals, formatKMB, formatShares, getSourceMeta, parsePolymarketError, polymarketFeeFactor, resolveExpiration, resolvePolymarketDisplayFeeRateBps, roundToTickSize, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useSellForm, useTradeForm };
|
|
1593
|
+
export { CHART_RANGE_DURATION, CHART_RANGE_FIDELITY_MINUTES, CHART_RANGE_PERIOD, CHART_RANGE_SAMPLE_INTERVAL, CandlestickPeriod, type CandlestickPeriodType, CategoriesSkeleton, CategoriesUI, type CategoriesUIProps, CategoriesWidget, type CategoriesWidgetProps, type CategoryItem, type CategoryListItem, type CategoryTagItem, ChartRange, type ChartRangeType, CommentItemUI, type CommentItemUIProps, type ComputeMaxBuyAmountParams, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, type DurationUnit, type EstimatePolymarketBuyFeeParams, type EstimatePolymarketSellFeeParams, EventCommentsWidget, type EventCommentsWidgetProps, EventDetailPage, type EventDetailPageProps, EventDetailSkeleton, type EventDetailSkeletonProps, EventDetailUI, type EventDetailUIProps, EventDetailWidget, type EventDetailWidgetProps, EventItem, type EventItemProps, type EventMarketDataBookSelection, EventMarketDepthChartUI, type EventMarketDepthChartUIProps, EventMarketDetailWidget, type EventMarketDetailWidgetProps, EventPriceChart, type EventPriceChartProps, type EventsFilterState, EventsFilterUI, type EventsFilterUIProps, EventsHero, type EventsHeroProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, type ExpirationPreset, KycModal, type KycModalProps, MAX_PRICE_HISTORY_MARKETS, MatchGroupCard, type MatchGroupCardProps, MatchMarketCard, type MatchMarketCardProps, MatchesFilterBar, type MatchesFilterBarProps, MatchesHero, type MatchesHeroProps, type MatchesHeroStats, MatchesPage, type MatchesPageProps, MatchesStatsBar, type MatchesStatsBarProps, MatchesWidget, type MatchesWidgetProps, type MatchesWidgetRef, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_MIN_USDC, ORDER_PRICE_STEP, type OddsFormatter, type OrderIntentView, type OrderType, POLYMARKET_BUILDER_TAKER_FEE_BPS, POLYMARKET_SPORTS_TAKER_FEE_BPS, PREDICT_REDEEM_MODAL_ID, PREDICT_SEARCH_HISTORY_KEY, PREDICT_SEARCH_MODAL_ID, PREDICT_SELL_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictRedeemModal, type PredictRedeemModalParams, type PredictRedeemModalResult, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictSellModal, type PredictSellModalParams, type PredictSellModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, RedeemFormWidget, type RedeemFormWidgetProps, SORT_PRESETS, STATIC_CATEGORIES, SearchEventsButton, type SearchEventsButtonProps, SearchHistoryUI, type SearchHistoryUIProps, SearchHistoryWidget, type SearchHistoryWidgetProps, SearchInputUI, type SearchInputUIProps, type SearchNavigationKey, SearchResultItemUI, type SearchResultItemUIProps, SearchResultListWidget, type SearchResultListWidgetProps, SearchWidget, type SearchWidgetProps, SellFormUI, type SellFormUIProps, SellFormWidget, type SellFormWidgetProps, SetupModal, type SetupModalProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, SourceBadge, type SourceBadgeProps, SpreadIndicator, type SpreadIndicatorProps, type TagItem, type TagSlugSelection, TradeFormSkeleton, TradeFormUI, type TradeFormUIProps, type TradeFormValidation, TradeFormWidget, type TradeFormWidgetProps, type TradeOutcome, type TradeResultToastController, type TradeResultToastMessages, type TradeSide, type UseEventDetailParams, type UseEventsInfiniteParams, type UseEventsInfiniteResult, type UseSearchResultListScriptParams, type UseSearchScriptParams, type UseSellFormParams, type UseSellFormResult, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, computeMaxBuyAmount, countActiveFilters, createPredictSearchHistoryStorage, createTradeResultToast, estimatePolymarketBuyFee, estimatePolymarketSellFee, fireCelebration, floorToDecimals, formatKMB, formatShares, getSourceMeta, orderIntentView, parsePolymarketError, polymarketFeeFactor, resolveExpiration, resolvePolymarketDisplayFeeRateBps, roundToTickSize, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useSellForm, useTradeForm };
|