@liberfi.io/ui-predict 4.0.29 → 4.0.31

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
@@ -480,13 +480,21 @@ interface EventDetailSkeletonProps {
480
480
  declare function EventDetailSkeleton({ marketCount, showBack, }: EventDetailSkeletonProps): react_jsx_runtime.JSX.Element;
481
481
  declare function TradeFormSkeleton(): react_jsx_runtime.JSX.Element;
482
482
 
483
+ type ViewMode = "depth" | "table";
483
484
  interface EventMarketDetailWidgetProps {
484
485
  market: PredictMarket;
485
486
  /** Which outcome's orderbook to display; defaults to "yes". */
486
487
  outcome?: TradeOutcome;
487
488
  onTradeAction?: (market: PredictMarket, outcome: TradeOutcome, side: TradeSide) => void;
489
+ /** Initial view: "depth" (horizontal chart) or "table" (vertical ladder). Defaults to "depth". */
490
+ initialViewMode?: ViewMode;
491
+ /**
492
+ * Optional class for the outer container. Overrides the default fixed
493
+ * `h-[262px]` so the widget can fill a flexible parent (e.g. `h-full`).
494
+ */
495
+ className?: string;
488
496
  }
489
- declare function EventMarketDetailWidget({ market, outcome, onTradeAction, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
497
+ declare function EventMarketDetailWidget({ market, outcome, onTradeAction, initialViewMode, className, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
490
498
 
491
499
  interface EventPriceChartProps {
492
500
  event: PredictEvent;
@@ -495,6 +503,12 @@ interface EventPriceChartProps {
495
503
  className?: string;
496
504
  /** Event total volume (shown in chart footer bar alongside interval switcher) */
497
505
  volume?: number;
506
+ /**
507
+ * When true, the chart plot area grows to fill the outer container height
508
+ * (with a sensible minimum) instead of using a fixed 300px height. Useful for
509
+ * equal-height row layouts. Defaults to false (fixed 300px).
510
+ */
511
+ fillHeight?: boolean;
498
512
  }
499
513
  declare function EventPriceChart(props: EventPriceChartProps): react_jsx_runtime.JSX.Element;
500
514
 
package/dist/index.d.ts CHANGED
@@ -480,13 +480,21 @@ interface EventDetailSkeletonProps {
480
480
  declare function EventDetailSkeleton({ marketCount, showBack, }: EventDetailSkeletonProps): react_jsx_runtime.JSX.Element;
481
481
  declare function TradeFormSkeleton(): react_jsx_runtime.JSX.Element;
482
482
 
483
+ type ViewMode = "depth" | "table";
483
484
  interface EventMarketDetailWidgetProps {
484
485
  market: PredictMarket;
485
486
  /** Which outcome's orderbook to display; defaults to "yes". */
486
487
  outcome?: TradeOutcome;
487
488
  onTradeAction?: (market: PredictMarket, outcome: TradeOutcome, side: TradeSide) => void;
489
+ /** Initial view: "depth" (horizontal chart) or "table" (vertical ladder). Defaults to "depth". */
490
+ initialViewMode?: ViewMode;
491
+ /**
492
+ * Optional class for the outer container. Overrides the default fixed
493
+ * `h-[262px]` so the widget can fill a flexible parent (e.g. `h-full`).
494
+ */
495
+ className?: string;
488
496
  }
489
- declare function EventMarketDetailWidget({ market, outcome, onTradeAction, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
497
+ declare function EventMarketDetailWidget({ market, outcome, onTradeAction, initialViewMode, className, }: EventMarketDetailWidgetProps): react_jsx_runtime.JSX.Element;
490
498
 
491
499
  interface EventPriceChartProps {
492
500
  event: PredictEvent;
@@ -495,6 +503,12 @@ interface EventPriceChartProps {
495
503
  className?: string;
496
504
  /** Event total volume (shown in chart footer bar alongside interval switcher) */
497
505
  volume?: number;
506
+ /**
507
+ * When true, the chart plot area grows to fill the outer container height
508
+ * (with a sensible minimum) instead of using a fixed 300px height. Useful for
509
+ * equal-height row layouts. Defaults to false (fixed 300px).
510
+ */
511
+ fillHeight?: boolean;
498
512
  }
499
513
  declare function EventPriceChart(props: EventPriceChartProps): react_jsx_runtime.JSX.Element;
500
514