@liberfi.io/ui-predict 4.0.55 → 4.0.57

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
@@ -853,6 +853,11 @@ type PredictSellModalParams = {
853
853
  event: PredictEvent;
854
854
  market: PredictMarket;
855
855
  initialOutcome?: TradeOutcome;
856
+ /**
857
+ * Original position side from the portfolio API. Some sports markets expose
858
+ * team keys (for example "france") while the tradable outcome remains YES/NO.
859
+ */
860
+ initialPositionSide?: string;
856
861
  chain?: string;
857
862
  /** Forwarded slippage tolerance (basis points). */
858
863
  slippageBps?: number;
@@ -873,6 +878,11 @@ interface UseSellFormParams {
873
878
  chain?: string;
874
879
  /** Fixed outcome — the sell form doesn't offer a YES/NO toggle. */
875
880
  initialOutcome?: TradeOutcome;
881
+ /**
882
+ * Original position side from the portfolio API. Some sports markets expose
883
+ * provider-specific side keys while the tradable outcome remains YES/NO.
884
+ */
885
+ initialPositionSide?: string;
876
886
  /**
877
887
  * Maximum tolerated slippage between best-of-book and the worst price
878
888
  * walked into when filling a market sell, in basis points (100 = 1%).
@@ -935,7 +945,7 @@ interface UseSellFormResult {
935
945
  setCustomDurationUnit: (u: DurationUnit) => void;
936
946
  submit: () => void;
937
947
  }
938
- declare function useSellForm({ market, initialOutcome, slippageBps, onSuccess, }: UseSellFormParams): UseSellFormResult;
948
+ declare function useSellForm({ market, initialOutcome, initialPositionSide, slippageBps, onSuccess, }: UseSellFormParams): UseSellFormResult;
939
949
 
940
950
  interface SellFormUIProps {
941
951
  event?: StandardEvent;
@@ -994,6 +1004,11 @@ interface SellFormWidgetProps {
994
1004
  market: PredictMarket;
995
1005
  variant?: "bordered" | "flat";
996
1006
  initialOutcome?: TradeOutcome;
1007
+ /**
1008
+ * Original position side from the portfolio API. Used to match portfolio
1009
+ * positions whose provider side is not literally YES/NO.
1010
+ */
1011
+ initialPositionSide?: string;
997
1012
  chain?: string;
998
1013
  /**
999
1014
  * Maximum tolerated slippage (basis points) when filling a market sell.
@@ -1013,7 +1028,7 @@ interface SellFormWidgetProps {
1013
1028
  /** Optional formatter for display-only odds/price labels. */
1014
1029
  oddsFormatter?: OddsFormatter;
1015
1030
  }
1016
- declare function SellFormWidget({ event, market, variant, initialOutcome, chain, slippageBps, onOutcomeChange, onSetupRequired, onSuccess, oddsFormatter, }: SellFormWidgetProps): react_jsx_runtime.JSX.Element;
1031
+ declare function SellFormWidget({ event, market, variant, initialOutcome, initialPositionSide, chain, slippageBps, onOutcomeChange, onSetupRequired, onSuccess, oddsFormatter, }: SellFormWidgetProps): react_jsx_runtime.JSX.Element;
1017
1032
 
1018
1033
  type PredictRedeemModalParams = {
1019
1034
  event: PredictEvent;
package/dist/index.d.ts CHANGED
@@ -853,6 +853,11 @@ type PredictSellModalParams = {
853
853
  event: PredictEvent;
854
854
  market: PredictMarket;
855
855
  initialOutcome?: TradeOutcome;
856
+ /**
857
+ * Original position side from the portfolio API. Some sports markets expose
858
+ * team keys (for example "france") while the tradable outcome remains YES/NO.
859
+ */
860
+ initialPositionSide?: string;
856
861
  chain?: string;
857
862
  /** Forwarded slippage tolerance (basis points). */
858
863
  slippageBps?: number;
@@ -873,6 +878,11 @@ interface UseSellFormParams {
873
878
  chain?: string;
874
879
  /** Fixed outcome — the sell form doesn't offer a YES/NO toggle. */
875
880
  initialOutcome?: TradeOutcome;
881
+ /**
882
+ * Original position side from the portfolio API. Some sports markets expose
883
+ * provider-specific side keys while the tradable outcome remains YES/NO.
884
+ */
885
+ initialPositionSide?: string;
876
886
  /**
877
887
  * Maximum tolerated slippage between best-of-book and the worst price
878
888
  * walked into when filling a market sell, in basis points (100 = 1%).
@@ -935,7 +945,7 @@ interface UseSellFormResult {
935
945
  setCustomDurationUnit: (u: DurationUnit) => void;
936
946
  submit: () => void;
937
947
  }
938
- declare function useSellForm({ market, initialOutcome, slippageBps, onSuccess, }: UseSellFormParams): UseSellFormResult;
948
+ declare function useSellForm({ market, initialOutcome, initialPositionSide, slippageBps, onSuccess, }: UseSellFormParams): UseSellFormResult;
939
949
 
940
950
  interface SellFormUIProps {
941
951
  event?: StandardEvent;
@@ -994,6 +1004,11 @@ interface SellFormWidgetProps {
994
1004
  market: PredictMarket;
995
1005
  variant?: "bordered" | "flat";
996
1006
  initialOutcome?: TradeOutcome;
1007
+ /**
1008
+ * Original position side from the portfolio API. Used to match portfolio
1009
+ * positions whose provider side is not literally YES/NO.
1010
+ */
1011
+ initialPositionSide?: string;
997
1012
  chain?: string;
998
1013
  /**
999
1014
  * Maximum tolerated slippage (basis points) when filling a market sell.
@@ -1013,7 +1028,7 @@ interface SellFormWidgetProps {
1013
1028
  /** Optional formatter for display-only odds/price labels. */
1014
1029
  oddsFormatter?: OddsFormatter;
1015
1030
  }
1016
- declare function SellFormWidget({ event, market, variant, initialOutcome, chain, slippageBps, onOutcomeChange, onSetupRequired, onSuccess, oddsFormatter, }: SellFormWidgetProps): react_jsx_runtime.JSX.Element;
1031
+ declare function SellFormWidget({ event, market, variant, initialOutcome, initialPositionSide, chain, slippageBps, onOutcomeChange, onSetupRequired, onSuccess, oddsFormatter, }: SellFormWidgetProps): react_jsx_runtime.JSX.Element;
1017
1032
 
1018
1033
  type PredictRedeemModalParams = {
1019
1034
  event: PredictEvent;