@liberfi.io/ui-predict 4.0.71 → 4.0.73

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 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, MarketDataCapability, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, Orderbook, 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 * as _tanstack_react_query from '@tanstack/react-query';
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.
@@ -152,7 +153,7 @@ interface EventsPageProps {
152
153
  marketDataCapability?: MarketDataCapability;
153
154
  getMarketDataEvent?: (event: PredictEvent) => PredictEvent | undefined;
154
155
  }
155
- declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, enableKalshi, lang, marketDataCapability, getMarketDataEvent, }: EventsPageProps): react_jsx_runtime.JSX.Element;
156
+ declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, onInsufficientBalance, enableKalshi, lang, marketDataCapability, getMarketDataEvent, }: EventsPageProps): react_jsx_runtime.JSX.Element;
156
157
 
157
158
  interface EventsWidgetProps {
158
159
  /** Category / tag selection from the categories widget. */
@@ -238,8 +239,7 @@ interface EventsSkeletonProps {
238
239
  count?: number;
239
240
  }
240
241
  declare function EventsSkeleton({ count }: EventsSkeletonProps): react_jsx_runtime.JSX.Element;
241
- interface EventsPageSkeletonProps extends EventsSkeletonProps {
242
- }
242
+ type EventsPageSkeletonProps = EventsSkeletonProps;
243
243
  declare function EventsPageSkeleton({ count, }: EventsPageSkeletonProps): react_jsx_runtime.JSX.Element;
244
244
 
245
245
  interface EventsHeroProps {
@@ -655,7 +655,7 @@ interface EventMarketDetailWidgetProps {
655
655
  */
656
656
  orderbook?: Orderbook | null;
657
657
  }
658
- declare function EventMarketDetailWidget({ market, outcome, onTradeAction, initialViewMode, className, oddsFormatter, enabled, orderbook: suppliedOrderbook, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
658
+ declare function EventMarketDetailWidget({ market, outcome, initialViewMode, className, oddsFormatter, enabled, orderbook: suppliedOrderbook, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
659
659
 
660
660
  interface EventPriceChartProps {
661
661
  event: PredictEvent;
@@ -771,6 +771,13 @@ interface CommentItemUIProps {
771
771
  */
772
772
  declare function CommentItemUI({ comment, anonymousLabel, isReply, }: CommentItemUIProps): react_jsx_runtime.JSX.Element;
773
773
 
774
+ type OrderIntentView = {
775
+ status: PredictionOrderIntentStatus;
776
+ canSubmit: boolean;
777
+ canCancel: boolean;
778
+ };
779
+ declare function orderIntentView(status: PredictionOrderIntentStatus): OrderIntentView;
780
+
774
781
  type PredictTradeModalParams = {
775
782
  event: PredictEvent;
776
783
  market: PredictMarket;
@@ -1192,6 +1199,8 @@ type SearchEventsButtonProps = {
1192
1199
  };
1193
1200
  declare function SearchEventsButton({ onSelectEvent, modalParams, className, }: SearchEventsButtonProps): react_jsx_runtime.JSX.Element;
1194
1201
 
1202
+ declare const PREDICT_SEARCH_HISTORY_KEY = "liberfi:predict_search_histories";
1203
+ declare function createPredictSearchHistoryStorage(): SearchHistoryStorage;
1195
1204
  declare function usePredictSearchHistory(): {
1196
1205
  histories: string[];
1197
1206
  addHistory: (keyword: string) => void;
@@ -1209,10 +1218,15 @@ declare function SearchHistoryUI({ histories, onSelect, onClear, className, }: S
1209
1218
  type SearchHistoryWidgetProps = {
1210
1219
  /** Callback when a history keyword is selected */
1211
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;
1212
1225
  className?: string;
1213
1226
  };
1214
- 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;
1215
1228
 
1229
+ type SearchNavigationKey = "ArrowDown" | "ArrowUp" | "Enter" | "Escape";
1216
1230
  type SearchInputUIProps = {
1217
1231
  /** Controlled input value */
1218
1232
  value: string;
@@ -1222,9 +1236,11 @@ type SearchInputUIProps = {
1222
1236
  onClear?: () => void;
1223
1237
  /** Called when Esc button is pressed */
1224
1238
  onEscape?: () => void;
1239
+ /** Forwards Arrow/Enter/Escape to the result-list navigation handle */
1240
+ onNavigateKey?: (key: SearchNavigationKey) => void;
1225
1241
  className?: string;
1226
1242
  };
1227
- 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;
1228
1244
 
1229
1245
  type SearchResultItemUIProps = {
1230
1246
  result: PredictSearchResult;
@@ -1235,9 +1251,11 @@ type SearchResultItemUIProps = {
1235
1251
  onSelect?: (result: PredictSearchResult) => void;
1236
1252
  /** Called when the row is hovered (for data prefetching). */
1237
1253
  onHover?: (result: PredictSearchResult) => void;
1254
+ highlighted?: boolean;
1255
+ actionRef?: Ref<HTMLElement>;
1238
1256
  className?: string;
1239
1257
  };
1240
- 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;
1241
1259
 
1242
1260
  interface UseSearchResultListScriptParams {
1243
1261
  keyword?: string;
@@ -1247,6 +1265,7 @@ interface UseSearchResultListScriptParams {
1247
1265
  }
1248
1266
  declare function useSearchResultListScript({ keyword, limit, source, }: UseSearchResultListScriptParams): {
1249
1267
  results: PredictSearchResult[];
1268
+ items: PredictSearchResult[];
1250
1269
  isLoading: boolean;
1251
1270
  isFetchingNextPage: boolean;
1252
1271
  hasNextPage: boolean;
@@ -1262,8 +1281,10 @@ type SearchResultListWidgetProps = {
1262
1281
  /** Called when a row is hovered (for data prefetching). */
1263
1282
  onHover?: (result: PredictSearchResult) => void;
1264
1283
  className?: string;
1284
+ navigationRef?: MutableRefObject<SearchKeyboardNavigation | null>;
1285
+ onEscape?: () => void;
1265
1286
  } & UseSearchResultListScriptParams;
1266
- 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;
1267
1288
 
1268
1289
  interface UseSearchScriptParams {
1269
1290
  /** Callback when the debounced keyword changes */
@@ -1272,7 +1293,7 @@ interface UseSearchScriptParams {
1272
1293
  declare function useSearchScript({ onKeywordChange }: UseSearchScriptParams): {
1273
1294
  text: string;
1274
1295
  keyword: string;
1275
- setText: (v: string) => void;
1296
+ setText: (value: string) => void;
1276
1297
  setKeyword: (value: string) => void;
1277
1298
  clearKeyword: () => void;
1278
1299
  };
@@ -1569,4 +1590,4 @@ type PredictWalletProviderProps = PropsWithChildren<{
1569
1590
  }>;
1570
1591
  declare function PredictWalletProvider({ pollingInterval, enabled, enableKalshi, children, }: PredictWalletProviderProps): react_jsx_runtime.JSX.Element;
1571
1592
 
1572
- 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 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 };
package/dist/index.d.ts 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, MarketDataCapability, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, Orderbook, 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 * as _tanstack_react_query from '@tanstack/react-query';
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.
@@ -152,7 +153,7 @@ interface EventsPageProps {
152
153
  marketDataCapability?: MarketDataCapability;
153
154
  getMarketDataEvent?: (event: PredictEvent) => PredictEvent | undefined;
154
155
  }
155
- declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, enableKalshi, lang, marketDataCapability, getMarketDataEvent, }: EventsPageProps): react_jsx_runtime.JSX.Element;
156
+ declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, onInsufficientBalance, enableKalshi, lang, marketDataCapability, getMarketDataEvent, }: EventsPageProps): react_jsx_runtime.JSX.Element;
156
157
 
157
158
  interface EventsWidgetProps {
158
159
  /** Category / tag selection from the categories widget. */
@@ -238,8 +239,7 @@ interface EventsSkeletonProps {
238
239
  count?: number;
239
240
  }
240
241
  declare function EventsSkeleton({ count }: EventsSkeletonProps): react_jsx_runtime.JSX.Element;
241
- interface EventsPageSkeletonProps extends EventsSkeletonProps {
242
- }
242
+ type EventsPageSkeletonProps = EventsSkeletonProps;
243
243
  declare function EventsPageSkeleton({ count, }: EventsPageSkeletonProps): react_jsx_runtime.JSX.Element;
244
244
 
245
245
  interface EventsHeroProps {
@@ -655,7 +655,7 @@ interface EventMarketDetailWidgetProps {
655
655
  */
656
656
  orderbook?: Orderbook | null;
657
657
  }
658
- declare function EventMarketDetailWidget({ market, outcome, onTradeAction, initialViewMode, className, oddsFormatter, enabled, orderbook: suppliedOrderbook, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
658
+ declare function EventMarketDetailWidget({ market, outcome, initialViewMode, className, oddsFormatter, enabled, orderbook: suppliedOrderbook, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
659
659
 
660
660
  interface EventPriceChartProps {
661
661
  event: PredictEvent;
@@ -771,6 +771,13 @@ interface CommentItemUIProps {
771
771
  */
772
772
  declare function CommentItemUI({ comment, anonymousLabel, isReply, }: CommentItemUIProps): react_jsx_runtime.JSX.Element;
773
773
 
774
+ type OrderIntentView = {
775
+ status: PredictionOrderIntentStatus;
776
+ canSubmit: boolean;
777
+ canCancel: boolean;
778
+ };
779
+ declare function orderIntentView(status: PredictionOrderIntentStatus): OrderIntentView;
780
+
774
781
  type PredictTradeModalParams = {
775
782
  event: PredictEvent;
776
783
  market: PredictMarket;
@@ -1192,6 +1199,8 @@ type SearchEventsButtonProps = {
1192
1199
  };
1193
1200
  declare function SearchEventsButton({ onSelectEvent, modalParams, className, }: SearchEventsButtonProps): react_jsx_runtime.JSX.Element;
1194
1201
 
1202
+ declare const PREDICT_SEARCH_HISTORY_KEY = "liberfi:predict_search_histories";
1203
+ declare function createPredictSearchHistoryStorage(): SearchHistoryStorage;
1195
1204
  declare function usePredictSearchHistory(): {
1196
1205
  histories: string[];
1197
1206
  addHistory: (keyword: string) => void;
@@ -1209,10 +1218,15 @@ declare function SearchHistoryUI({ histories, onSelect, onClear, className, }: S
1209
1218
  type SearchHistoryWidgetProps = {
1210
1219
  /** Callback when a history keyword is selected */
1211
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;
1212
1225
  className?: string;
1213
1226
  };
1214
- 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;
1215
1228
 
1229
+ type SearchNavigationKey = "ArrowDown" | "ArrowUp" | "Enter" | "Escape";
1216
1230
  type SearchInputUIProps = {
1217
1231
  /** Controlled input value */
1218
1232
  value: string;
@@ -1222,9 +1236,11 @@ type SearchInputUIProps = {
1222
1236
  onClear?: () => void;
1223
1237
  /** Called when Esc button is pressed */
1224
1238
  onEscape?: () => void;
1239
+ /** Forwards Arrow/Enter/Escape to the result-list navigation handle */
1240
+ onNavigateKey?: (key: SearchNavigationKey) => void;
1225
1241
  className?: string;
1226
1242
  };
1227
- 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;
1228
1244
 
1229
1245
  type SearchResultItemUIProps = {
1230
1246
  result: PredictSearchResult;
@@ -1235,9 +1251,11 @@ type SearchResultItemUIProps = {
1235
1251
  onSelect?: (result: PredictSearchResult) => void;
1236
1252
  /** Called when the row is hovered (for data prefetching). */
1237
1253
  onHover?: (result: PredictSearchResult) => void;
1254
+ highlighted?: boolean;
1255
+ actionRef?: Ref<HTMLElement>;
1238
1256
  className?: string;
1239
1257
  };
1240
- 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;
1241
1259
 
1242
1260
  interface UseSearchResultListScriptParams {
1243
1261
  keyword?: string;
@@ -1247,6 +1265,7 @@ interface UseSearchResultListScriptParams {
1247
1265
  }
1248
1266
  declare function useSearchResultListScript({ keyword, limit, source, }: UseSearchResultListScriptParams): {
1249
1267
  results: PredictSearchResult[];
1268
+ items: PredictSearchResult[];
1250
1269
  isLoading: boolean;
1251
1270
  isFetchingNextPage: boolean;
1252
1271
  hasNextPage: boolean;
@@ -1262,8 +1281,10 @@ type SearchResultListWidgetProps = {
1262
1281
  /** Called when a row is hovered (for data prefetching). */
1263
1282
  onHover?: (result: PredictSearchResult) => void;
1264
1283
  className?: string;
1284
+ navigationRef?: MutableRefObject<SearchKeyboardNavigation | null>;
1285
+ onEscape?: () => void;
1265
1286
  } & UseSearchResultListScriptParams;
1266
- 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;
1267
1288
 
1268
1289
  interface UseSearchScriptParams {
1269
1290
  /** Callback when the debounced keyword changes */
@@ -1272,7 +1293,7 @@ interface UseSearchScriptParams {
1272
1293
  declare function useSearchScript({ onKeywordChange }: UseSearchScriptParams): {
1273
1294
  text: string;
1274
1295
  keyword: string;
1275
- setText: (v: string) => void;
1296
+ setText: (value: string) => void;
1276
1297
  setKeyword: (value: string) => void;
1277
1298
  clearKeyword: () => void;
1278
1299
  };
@@ -1569,4 +1590,4 @@ type PredictWalletProviderProps = PropsWithChildren<{
1569
1590
  }>;
1570
1591
  declare function PredictWalletProvider({ pollingInterval, enabled, enableKalshi, children, }: PredictWalletProviderProps): react_jsx_runtime.JSX.Element;
1571
1592
 
1572
- 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 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 };