@orderly.network/ui-positions 2.8.5 → 2.8.6-alpha.0
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 +76 -1
- package/dist/index.d.ts +76 -1
- package/dist/index.js +601 -103
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +517 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
package/dist/index.d.mts
CHANGED
|
@@ -191,6 +191,81 @@ type CloseAllPositionsWidgetProps = Pick<CloseAllPositionsProps, "className" | "
|
|
|
191
191
|
};
|
|
192
192
|
declare const CloseAllPositionsWidget: React.FC<CloseAllPositionsWidgetProps>;
|
|
193
193
|
|
|
194
|
+
interface UseReversePositionScriptOptions {
|
|
195
|
+
position: API.PositionExt | API.PositionTPSLExt;
|
|
196
|
+
onSuccess?: () => void;
|
|
197
|
+
onError?: (error: any) => void;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Hook for managing reverse position enabled state
|
|
201
|
+
* Separates desktop and mobile preferences internally
|
|
202
|
+
*/
|
|
203
|
+
declare const useReversePositionEnabled: () => {
|
|
204
|
+
isEnabled: any;
|
|
205
|
+
setEnabled: (enabled: boolean) => void;
|
|
206
|
+
};
|
|
207
|
+
declare const useReversePositionScript: (options?: UseReversePositionScriptOptions) => {
|
|
208
|
+
isEnabled: any;
|
|
209
|
+
setEnabled: (enabled: boolean) => void;
|
|
210
|
+
reversePosition: () => Promise<boolean>;
|
|
211
|
+
isReversing: boolean;
|
|
212
|
+
displayInfo: {
|
|
213
|
+
symbol: string;
|
|
214
|
+
base: string;
|
|
215
|
+
quote: string;
|
|
216
|
+
baseDp: number;
|
|
217
|
+
quoteDp: number;
|
|
218
|
+
positionQty: string;
|
|
219
|
+
reverseQty: string;
|
|
220
|
+
markPrice: string;
|
|
221
|
+
leverage: number;
|
|
222
|
+
isLong: boolean;
|
|
223
|
+
} | null;
|
|
224
|
+
positionQty: number;
|
|
225
|
+
reverseQty: number;
|
|
226
|
+
isLong: boolean;
|
|
227
|
+
};
|
|
228
|
+
type ReversePositionState = ReturnType<typeof useReversePositionScript>;
|
|
229
|
+
|
|
230
|
+
type ReversePositionProps = ReversePositionState & {
|
|
231
|
+
className?: string;
|
|
232
|
+
style?: React.CSSProperties;
|
|
233
|
+
onConfirm?: () => Promise<void>;
|
|
234
|
+
onCancel?: () => void;
|
|
235
|
+
};
|
|
236
|
+
declare const ReversePosition: FC<ReversePositionProps>;
|
|
237
|
+
|
|
238
|
+
type ReversePositionWidgetProps = {
|
|
239
|
+
position: API.PositionExt | API.PositionTPSLExt;
|
|
240
|
+
close?: () => void;
|
|
241
|
+
resolve?: (value?: any) => void;
|
|
242
|
+
reject?: (reason?: any) => void;
|
|
243
|
+
};
|
|
244
|
+
declare const ReversePositionWidget: React.FC<ReversePositionWidgetProps>;
|
|
245
|
+
declare const ReversePositionDialogId = "ReversePositionDialogId";
|
|
246
|
+
|
|
247
|
+
interface OrderInfoCardProps {
|
|
248
|
+
/** Order title */
|
|
249
|
+
title: string;
|
|
250
|
+
/** Order side */
|
|
251
|
+
side: OrderSide;
|
|
252
|
+
/** Leverage multiplier */
|
|
253
|
+
leverage: number;
|
|
254
|
+
/** Quantity */
|
|
255
|
+
qty: string;
|
|
256
|
+
/** Base decimal places */
|
|
257
|
+
baseDp: number;
|
|
258
|
+
/** Price label, defaults to "Market" */
|
|
259
|
+
estLiqPrice?: React.ReactNode;
|
|
260
|
+
/** Custom class name */
|
|
261
|
+
className?: string;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Order info card component
|
|
265
|
+
* Displays detailed order information including title, side, leverage, quantity, and price
|
|
266
|
+
*/
|
|
267
|
+
declare const OrderInfoCard: FC<OrderInfoCardProps>;
|
|
268
|
+
|
|
194
269
|
declare const MarketCloseConfirmID = "MarketCloseConfirmID";
|
|
195
270
|
|
|
196
|
-
export { CloseAllPositions, type CloseAllPositionsProps, type CloseAllPositionsState, CloseAllPositionsWidget, CombinePositionsWidget, FundingFeeButton, FundingFeeHistoryUI, Liquidation, LiquidationWidget, MarketCloseConfirmID, MobileLiquidation, MobileLiquidationWidget, MobilePositionHistory, MobilePositionHistoryWidget, MobilePositionsWidget, PositionHistory, PositionHistoryWidget, type PositionsProps, PositionsTabName, PositionsWidget, type SortType, sortList, useCloseAllPositionsScript, useLiquidationScript, usePositionHistoryScript, usePositionsRowContext, useSort, useTabSort };
|
|
271
|
+
export { CloseAllPositions, type CloseAllPositionsProps, type CloseAllPositionsState, CloseAllPositionsWidget, CombinePositionsWidget, FundingFeeButton, FundingFeeHistoryUI, Liquidation, LiquidationWidget, MarketCloseConfirmID, MobileLiquidation, MobileLiquidationWidget, MobilePositionHistory, MobilePositionHistoryWidget, MobilePositionsWidget, OrderInfoCard, type OrderInfoCardProps, PositionHistory, PositionHistoryWidget, type PositionsProps, PositionsTabName, PositionsWidget, ReversePosition, ReversePositionDialogId, type ReversePositionProps, type ReversePositionState, ReversePositionWidget, type ReversePositionWidgetProps, type SortType, sortList, useCloseAllPositionsScript, useLiquidationScript, usePositionHistoryScript, usePositionsRowContext, useReversePositionEnabled, useReversePositionScript, useSort, useTabSort };
|
package/dist/index.d.ts
CHANGED
|
@@ -191,6 +191,81 @@ type CloseAllPositionsWidgetProps = Pick<CloseAllPositionsProps, "className" | "
|
|
|
191
191
|
};
|
|
192
192
|
declare const CloseAllPositionsWidget: React.FC<CloseAllPositionsWidgetProps>;
|
|
193
193
|
|
|
194
|
+
interface UseReversePositionScriptOptions {
|
|
195
|
+
position: API.PositionExt | API.PositionTPSLExt;
|
|
196
|
+
onSuccess?: () => void;
|
|
197
|
+
onError?: (error: any) => void;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Hook for managing reverse position enabled state
|
|
201
|
+
* Separates desktop and mobile preferences internally
|
|
202
|
+
*/
|
|
203
|
+
declare const useReversePositionEnabled: () => {
|
|
204
|
+
isEnabled: any;
|
|
205
|
+
setEnabled: (enabled: boolean) => void;
|
|
206
|
+
};
|
|
207
|
+
declare const useReversePositionScript: (options?: UseReversePositionScriptOptions) => {
|
|
208
|
+
isEnabled: any;
|
|
209
|
+
setEnabled: (enabled: boolean) => void;
|
|
210
|
+
reversePosition: () => Promise<boolean>;
|
|
211
|
+
isReversing: boolean;
|
|
212
|
+
displayInfo: {
|
|
213
|
+
symbol: string;
|
|
214
|
+
base: string;
|
|
215
|
+
quote: string;
|
|
216
|
+
baseDp: number;
|
|
217
|
+
quoteDp: number;
|
|
218
|
+
positionQty: string;
|
|
219
|
+
reverseQty: string;
|
|
220
|
+
markPrice: string;
|
|
221
|
+
leverage: number;
|
|
222
|
+
isLong: boolean;
|
|
223
|
+
} | null;
|
|
224
|
+
positionQty: number;
|
|
225
|
+
reverseQty: number;
|
|
226
|
+
isLong: boolean;
|
|
227
|
+
};
|
|
228
|
+
type ReversePositionState = ReturnType<typeof useReversePositionScript>;
|
|
229
|
+
|
|
230
|
+
type ReversePositionProps = ReversePositionState & {
|
|
231
|
+
className?: string;
|
|
232
|
+
style?: React.CSSProperties;
|
|
233
|
+
onConfirm?: () => Promise<void>;
|
|
234
|
+
onCancel?: () => void;
|
|
235
|
+
};
|
|
236
|
+
declare const ReversePosition: FC<ReversePositionProps>;
|
|
237
|
+
|
|
238
|
+
type ReversePositionWidgetProps = {
|
|
239
|
+
position: API.PositionExt | API.PositionTPSLExt;
|
|
240
|
+
close?: () => void;
|
|
241
|
+
resolve?: (value?: any) => void;
|
|
242
|
+
reject?: (reason?: any) => void;
|
|
243
|
+
};
|
|
244
|
+
declare const ReversePositionWidget: React.FC<ReversePositionWidgetProps>;
|
|
245
|
+
declare const ReversePositionDialogId = "ReversePositionDialogId";
|
|
246
|
+
|
|
247
|
+
interface OrderInfoCardProps {
|
|
248
|
+
/** Order title */
|
|
249
|
+
title: string;
|
|
250
|
+
/** Order side */
|
|
251
|
+
side: OrderSide;
|
|
252
|
+
/** Leverage multiplier */
|
|
253
|
+
leverage: number;
|
|
254
|
+
/** Quantity */
|
|
255
|
+
qty: string;
|
|
256
|
+
/** Base decimal places */
|
|
257
|
+
baseDp: number;
|
|
258
|
+
/** Price label, defaults to "Market" */
|
|
259
|
+
estLiqPrice?: React.ReactNode;
|
|
260
|
+
/** Custom class name */
|
|
261
|
+
className?: string;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Order info card component
|
|
265
|
+
* Displays detailed order information including title, side, leverage, quantity, and price
|
|
266
|
+
*/
|
|
267
|
+
declare const OrderInfoCard: FC<OrderInfoCardProps>;
|
|
268
|
+
|
|
194
269
|
declare const MarketCloseConfirmID = "MarketCloseConfirmID";
|
|
195
270
|
|
|
196
|
-
export { CloseAllPositions, type CloseAllPositionsProps, type CloseAllPositionsState, CloseAllPositionsWidget, CombinePositionsWidget, FundingFeeButton, FundingFeeHistoryUI, Liquidation, LiquidationWidget, MarketCloseConfirmID, MobileLiquidation, MobileLiquidationWidget, MobilePositionHistory, MobilePositionHistoryWidget, MobilePositionsWidget, PositionHistory, PositionHistoryWidget, type PositionsProps, PositionsTabName, PositionsWidget, type SortType, sortList, useCloseAllPositionsScript, useLiquidationScript, usePositionHistoryScript, usePositionsRowContext, useSort, useTabSort };
|
|
271
|
+
export { CloseAllPositions, type CloseAllPositionsProps, type CloseAllPositionsState, CloseAllPositionsWidget, CombinePositionsWidget, FundingFeeButton, FundingFeeHistoryUI, Liquidation, LiquidationWidget, MarketCloseConfirmID, MobileLiquidation, MobileLiquidationWidget, MobilePositionHistory, MobilePositionHistoryWidget, MobilePositionsWidget, OrderInfoCard, type OrderInfoCardProps, PositionHistory, PositionHistoryWidget, type PositionsProps, PositionsTabName, PositionsWidget, ReversePosition, ReversePositionDialogId, type ReversePositionProps, type ReversePositionState, ReversePositionWidget, type ReversePositionWidgetProps, type SortType, sortList, useCloseAllPositionsScript, useLiquidationScript, usePositionHistoryScript, usePositionsRowContext, useReversePositionEnabled, useReversePositionScript, useSort, useTabSort };
|