@liberfi.io/ui-predict 4.0.57 → 4.0.59
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 +18 -6
- package/dist/index.d.ts +18 -6
- 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 +15 -15
package/dist/index.d.mts
CHANGED
|
@@ -146,8 +146,10 @@ interface EventsPageProps {
|
|
|
146
146
|
* hidden. Defaults to true.
|
|
147
147
|
*/
|
|
148
148
|
enableKalshi?: boolean;
|
|
149
|
+
/** Resolved API language for localized event payloads. */
|
|
150
|
+
lang?: string;
|
|
149
151
|
}
|
|
150
|
-
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, enableKalshi, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
152
|
+
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, enableKalshi, lang, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
151
153
|
|
|
152
154
|
interface EventsWidgetProps {
|
|
153
155
|
/** Category / tag selection from the categories widget. */
|
|
@@ -175,6 +177,8 @@ interface EventsWidgetProps {
|
|
|
175
177
|
minLiquidity?: string;
|
|
176
178
|
/** Max markets per event (sorted by volume DESC). Default: 3. */
|
|
177
179
|
markets_limit?: number;
|
|
180
|
+
/** Resolved API language for localized event payloads. */
|
|
181
|
+
lang?: string;
|
|
178
182
|
/** Callback when an event card is selected */
|
|
179
183
|
onSelect?: (event: PredictEvent) => void;
|
|
180
184
|
/** Callback when an outcome button (yes/no) is pressed */
|
|
@@ -186,7 +190,7 @@ interface EventsWidgetProps {
|
|
|
186
190
|
/** Called when a card is hovered (for data prefetching). */
|
|
187
191
|
onHover?: (event: PredictEvent) => void;
|
|
188
192
|
}
|
|
189
|
-
declare function EventsWidget({ tagSlugSelection, limit, status, sort_by, sort_asc, source, with_markets, timeRemaining, minVolume, minLiquidity, markets_limit, onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, }: EventsWidgetProps): react_jsx_runtime.JSX.Element;
|
|
193
|
+
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;
|
|
190
194
|
|
|
191
195
|
/** Parameters for useEventsInfinite */
|
|
192
196
|
type UseEventsInfiniteParams = ResolveEventsParamsInput;
|
|
@@ -794,6 +798,8 @@ interface TradeFormUIProps {
|
|
|
794
798
|
customDurationUnit: DurationUnit;
|
|
795
799
|
/** Optional formatter for display-only odds/price labels. Defaults to cents/probability text. */
|
|
796
800
|
oddsFormatter?: OddsFormatter;
|
|
801
|
+
/** Optional display labels for binary outcomes. Defaults to localized Yes/No. */
|
|
802
|
+
outcomeLabels?: Partial<Record<TradeOutcome, string>>;
|
|
797
803
|
onOutcomeChange: (outcome: TradeOutcome) => void;
|
|
798
804
|
onOrderTypeChange: (type: OrderType) => void;
|
|
799
805
|
onQuantityChange: (quantity: number) => void;
|
|
@@ -804,7 +810,7 @@ interface TradeFormUIProps {
|
|
|
804
810
|
onCustomDurationUnitChange: (u: DurationUnit) => void;
|
|
805
811
|
onSubmit: () => void;
|
|
806
812
|
}
|
|
807
|
-
declare function TradeFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, shares, effectivePrice, potentialProfit, potentialPayout, estimatedCost, estimatedFee, usdcBalance, isBalanceLoading, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, isInsufficientBalance, onInsufficientBalance, supportsLimitOrder, maxBuyAmount, kycRequired, needsKyc, needsSetup, kycUrl, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
813
|
+
declare function TradeFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, shares, effectivePrice, potentialProfit, potentialPayout, estimatedCost, estimatedFee, usdcBalance, isBalanceLoading, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, isInsufficientBalance, onInsufficientBalance, supportsLimitOrder, maxBuyAmount, kycRequired, needsKyc, needsSetup, kycUrl, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, outcomeLabels, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
808
814
|
|
|
809
815
|
interface TradeFormWidgetProps {
|
|
810
816
|
event?: PredictEvent;
|
|
@@ -827,8 +833,10 @@ interface TradeFormWidgetProps {
|
|
|
827
833
|
onOutcomeChange?: (outcome: TradeOutcome) => void;
|
|
828
834
|
/** Optional formatter for display-only odds/price labels. */
|
|
829
835
|
oddsFormatter?: OddsFormatter;
|
|
836
|
+
/** Optional display labels for binary outcomes. Defaults to localized Yes/No. */
|
|
837
|
+
outcomeLabels?: Partial<Record<TradeOutcome, string>>;
|
|
830
838
|
}
|
|
831
|
-
declare function TradeFormWidget({ event, market, variant, initialOutcome, chain, slippageBps, onInsufficientBalance, onOutcomeChange, oddsFormatter, }: TradeFormWidgetProps): react_jsx_runtime.JSX.Element;
|
|
839
|
+
declare function TradeFormWidget({ event, market, variant, initialOutcome, chain, slippageBps, onInsufficientBalance, onOutcomeChange, oddsFormatter, outcomeLabels, }: TradeFormWidgetProps): react_jsx_runtime.JSX.Element;
|
|
832
840
|
|
|
833
841
|
interface TradeResultToastMessages {
|
|
834
842
|
submitted: string;
|
|
@@ -986,6 +994,8 @@ interface SellFormUIProps {
|
|
|
986
994
|
customDurationUnit: DurationUnit;
|
|
987
995
|
/** Optional formatter for display-only odds/price labels. Defaults to cents/probability text. */
|
|
988
996
|
oddsFormatter?: OddsFormatter;
|
|
997
|
+
/** Optional display labels for binary outcomes. Defaults to localized Yes/No. */
|
|
998
|
+
outcomeLabels?: Partial<Record<TradeOutcome, string>>;
|
|
989
999
|
onOutcomeChange: (outcome: TradeOutcome) => void;
|
|
990
1000
|
onOrderTypeChange: (type: OrderType) => void;
|
|
991
1001
|
onQuantityChange: (quantity: number) => void;
|
|
@@ -997,7 +1007,7 @@ interface SellFormUIProps {
|
|
|
997
1007
|
onCustomDurationUnitChange: (u: DurationUnit) => void;
|
|
998
1008
|
onSubmit: () => void;
|
|
999
1009
|
}
|
|
1000
|
-
declare function SellFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, effectivePrice, grossReturn, estimatedFee, estimatedReturn, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, supportsLimitOrder, kycRequired, needsKyc, needsSetup, onSetupRequired, kycUrl, totalShares, activeOrderShares, availableShares, isAvailableLoading, precision, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onSellAll, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: SellFormUIProps): react_jsx_runtime.JSX.Element;
|
|
1010
|
+
declare function SellFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, effectivePrice, grossReturn, estimatedFee, estimatedReturn, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, supportsLimitOrder, kycRequired, needsKyc, needsSetup, onSetupRequired, kycUrl, totalShares, activeOrderShares, availableShares, isAvailableLoading, precision, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, outcomeLabels, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onSellAll, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: SellFormUIProps): react_jsx_runtime.JSX.Element;
|
|
1001
1011
|
|
|
1002
1012
|
interface SellFormWidgetProps {
|
|
1003
1013
|
event?: PredictEvent;
|
|
@@ -1027,8 +1037,10 @@ interface SellFormWidgetProps {
|
|
|
1027
1037
|
onSuccess?: () => void;
|
|
1028
1038
|
/** Optional formatter for display-only odds/price labels. */
|
|
1029
1039
|
oddsFormatter?: OddsFormatter;
|
|
1040
|
+
/** Optional display labels for binary outcomes. Defaults to localized Yes/No. */
|
|
1041
|
+
outcomeLabels?: Partial<Record<TradeOutcome, string>>;
|
|
1030
1042
|
}
|
|
1031
|
-
declare function SellFormWidget({ event, market, variant, initialOutcome, initialPositionSide, chain, slippageBps, onOutcomeChange, onSetupRequired, onSuccess, oddsFormatter, }: SellFormWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1043
|
+
declare function SellFormWidget({ event, market, variant, initialOutcome, initialPositionSide, chain, slippageBps, onOutcomeChange, onSetupRequired, onSuccess, oddsFormatter, outcomeLabels, }: SellFormWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1032
1044
|
|
|
1033
1045
|
type PredictRedeemModalParams = {
|
|
1034
1046
|
event: PredictEvent;
|
package/dist/index.d.ts
CHANGED
|
@@ -146,8 +146,10 @@ interface EventsPageProps {
|
|
|
146
146
|
* hidden. Defaults to true.
|
|
147
147
|
*/
|
|
148
148
|
enableKalshi?: boolean;
|
|
149
|
+
/** Resolved API language for localized event payloads. */
|
|
150
|
+
lang?: string;
|
|
149
151
|
}
|
|
150
|
-
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, enableKalshi, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
152
|
+
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, enableKalshi, lang, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
151
153
|
|
|
152
154
|
interface EventsWidgetProps {
|
|
153
155
|
/** Category / tag selection from the categories widget. */
|
|
@@ -175,6 +177,8 @@ interface EventsWidgetProps {
|
|
|
175
177
|
minLiquidity?: string;
|
|
176
178
|
/** Max markets per event (sorted by volume DESC). Default: 3. */
|
|
177
179
|
markets_limit?: number;
|
|
180
|
+
/** Resolved API language for localized event payloads. */
|
|
181
|
+
lang?: string;
|
|
178
182
|
/** Callback when an event card is selected */
|
|
179
183
|
onSelect?: (event: PredictEvent) => void;
|
|
180
184
|
/** Callback when an outcome button (yes/no) is pressed */
|
|
@@ -186,7 +190,7 @@ interface EventsWidgetProps {
|
|
|
186
190
|
/** Called when a card is hovered (for data prefetching). */
|
|
187
191
|
onHover?: (event: PredictEvent) => void;
|
|
188
192
|
}
|
|
189
|
-
declare function EventsWidget({ tagSlugSelection, limit, status, sort_by, sort_asc, source, with_markets, timeRemaining, minVolume, minLiquidity, markets_limit, onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, }: EventsWidgetProps): react_jsx_runtime.JSX.Element;
|
|
193
|
+
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;
|
|
190
194
|
|
|
191
195
|
/** Parameters for useEventsInfinite */
|
|
192
196
|
type UseEventsInfiniteParams = ResolveEventsParamsInput;
|
|
@@ -794,6 +798,8 @@ interface TradeFormUIProps {
|
|
|
794
798
|
customDurationUnit: DurationUnit;
|
|
795
799
|
/** Optional formatter for display-only odds/price labels. Defaults to cents/probability text. */
|
|
796
800
|
oddsFormatter?: OddsFormatter;
|
|
801
|
+
/** Optional display labels for binary outcomes. Defaults to localized Yes/No. */
|
|
802
|
+
outcomeLabels?: Partial<Record<TradeOutcome, string>>;
|
|
797
803
|
onOutcomeChange: (outcome: TradeOutcome) => void;
|
|
798
804
|
onOrderTypeChange: (type: OrderType) => void;
|
|
799
805
|
onQuantityChange: (quantity: number) => void;
|
|
@@ -804,7 +810,7 @@ interface TradeFormUIProps {
|
|
|
804
810
|
onCustomDurationUnitChange: (u: DurationUnit) => void;
|
|
805
811
|
onSubmit: () => void;
|
|
806
812
|
}
|
|
807
|
-
declare function TradeFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, shares, effectivePrice, potentialProfit, potentialPayout, estimatedCost, estimatedFee, usdcBalance, isBalanceLoading, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, isInsufficientBalance, onInsufficientBalance, supportsLimitOrder, maxBuyAmount, kycRequired, needsKyc, needsSetup, kycUrl, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
813
|
+
declare function TradeFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, shares, effectivePrice, potentialProfit, potentialPayout, estimatedCost, estimatedFee, usdcBalance, isBalanceLoading, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, isInsufficientBalance, onInsufficientBalance, supportsLimitOrder, maxBuyAmount, kycRequired, needsKyc, needsSetup, kycUrl, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, outcomeLabels, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
808
814
|
|
|
809
815
|
interface TradeFormWidgetProps {
|
|
810
816
|
event?: PredictEvent;
|
|
@@ -827,8 +833,10 @@ interface TradeFormWidgetProps {
|
|
|
827
833
|
onOutcomeChange?: (outcome: TradeOutcome) => void;
|
|
828
834
|
/** Optional formatter for display-only odds/price labels. */
|
|
829
835
|
oddsFormatter?: OddsFormatter;
|
|
836
|
+
/** Optional display labels for binary outcomes. Defaults to localized Yes/No. */
|
|
837
|
+
outcomeLabels?: Partial<Record<TradeOutcome, string>>;
|
|
830
838
|
}
|
|
831
|
-
declare function TradeFormWidget({ event, market, variant, initialOutcome, chain, slippageBps, onInsufficientBalance, onOutcomeChange, oddsFormatter, }: TradeFormWidgetProps): react_jsx_runtime.JSX.Element;
|
|
839
|
+
declare function TradeFormWidget({ event, market, variant, initialOutcome, chain, slippageBps, onInsufficientBalance, onOutcomeChange, oddsFormatter, outcomeLabels, }: TradeFormWidgetProps): react_jsx_runtime.JSX.Element;
|
|
832
840
|
|
|
833
841
|
interface TradeResultToastMessages {
|
|
834
842
|
submitted: string;
|
|
@@ -986,6 +994,8 @@ interface SellFormUIProps {
|
|
|
986
994
|
customDurationUnit: DurationUnit;
|
|
987
995
|
/** Optional formatter for display-only odds/price labels. Defaults to cents/probability text. */
|
|
988
996
|
oddsFormatter?: OddsFormatter;
|
|
997
|
+
/** Optional display labels for binary outcomes. Defaults to localized Yes/No. */
|
|
998
|
+
outcomeLabels?: Partial<Record<TradeOutcome, string>>;
|
|
989
999
|
onOutcomeChange: (outcome: TradeOutcome) => void;
|
|
990
1000
|
onOrderTypeChange: (type: OrderType) => void;
|
|
991
1001
|
onQuantityChange: (quantity: number) => void;
|
|
@@ -997,7 +1007,7 @@ interface SellFormUIProps {
|
|
|
997
1007
|
onCustomDurationUnitChange: (u: DurationUnit) => void;
|
|
998
1008
|
onSubmit: () => void;
|
|
999
1009
|
}
|
|
1000
|
-
declare function SellFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, effectivePrice, grossReturn, estimatedFee, estimatedReturn, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, supportsLimitOrder, kycRequired, needsKyc, needsSetup, onSetupRequired, kycUrl, totalShares, activeOrderShares, availableShares, isAvailableLoading, precision, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onSellAll, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: SellFormUIProps): react_jsx_runtime.JSX.Element;
|
|
1010
|
+
declare function SellFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, effectivePrice, grossReturn, estimatedFee, estimatedReturn, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, supportsLimitOrder, kycRequired, needsKyc, needsSetup, onSetupRequired, kycUrl, totalShares, activeOrderShares, availableShares, isAvailableLoading, precision, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, outcomeLabels, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onSellAll, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: SellFormUIProps): react_jsx_runtime.JSX.Element;
|
|
1001
1011
|
|
|
1002
1012
|
interface SellFormWidgetProps {
|
|
1003
1013
|
event?: PredictEvent;
|
|
@@ -1027,8 +1037,10 @@ interface SellFormWidgetProps {
|
|
|
1027
1037
|
onSuccess?: () => void;
|
|
1028
1038
|
/** Optional formatter for display-only odds/price labels. */
|
|
1029
1039
|
oddsFormatter?: OddsFormatter;
|
|
1040
|
+
/** Optional display labels for binary outcomes. Defaults to localized Yes/No. */
|
|
1041
|
+
outcomeLabels?: Partial<Record<TradeOutcome, string>>;
|
|
1030
1042
|
}
|
|
1031
|
-
declare function SellFormWidget({ event, market, variant, initialOutcome, initialPositionSide, chain, slippageBps, onOutcomeChange, onSetupRequired, onSuccess, oddsFormatter, }: SellFormWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1043
|
+
declare function SellFormWidget({ event, market, variant, initialOutcome, initialPositionSide, chain, slippageBps, onOutcomeChange, onSetupRequired, onSuccess, oddsFormatter, outcomeLabels, }: SellFormWidgetProps): react_jsx_runtime.JSX.Element;
|
|
1032
1044
|
|
|
1033
1045
|
type PredictRedeemModalParams = {
|
|
1034
1046
|
event: PredictEvent;
|