@orderly.network/hooks 1.5.13 → 2.0.0-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 +1371 -0
- package/dist/index.d.ts +1371 -0
- package/dist/index.js +12063 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +11937 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +33 -16
- package/esm/configProvider.d.ts +0 -24
- package/esm/configProvider.d.ts.map +0 -1
- package/esm/configProvider.js +0 -82
- package/esm/configProvider.js.map +0 -1
- package/esm/dataProvider.d.ts +0 -11
- package/esm/dataProvider.d.ts.map +0 -1
- package/esm/dataProvider.js +0 -37
- package/esm/dataProvider.js.map +0 -1
- package/esm/dev/proxyConfigStore.d.ts +0 -15
- package/esm/dev/proxyConfigStore.d.ts.map +0 -1
- package/esm/dev/proxyConfigStore.js +0 -41
- package/esm/dev/proxyConfigStore.js.map +0 -1
- package/esm/index.d.ts +0 -38
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js +0 -37
- package/esm/index.js.map +0 -1
- package/esm/middleware/signatureMiddleware.d.ts +0 -3
- package/esm/middleware/signatureMiddleware.d.ts.map +0 -1
- package/esm/middleware/signatureMiddleware.js +0 -34
- package/esm/middleware/signatureMiddleware.js.map +0 -1
- package/esm/orderly/orderbook.service.d.ts +0 -33
- package/esm/orderly/orderbook.service.d.ts.map +0 -1
- package/esm/orderly/orderbook.service.js +0 -129
- package/esm/orderly/orderbook.service.js.map +0 -1
- package/esm/orderly/orderlyHooks.d.ts +0 -36
- package/esm/orderly/orderlyHooks.d.ts.map +0 -1
- package/esm/orderly/orderlyHooks.js +0 -32
- package/esm/orderly/orderlyHooks.js.map +0 -1
- package/esm/orderly/useAccountInfo.d.ts +0 -3
- package/esm/orderly/useAccountInfo.d.ts.map +0 -1
- package/esm/orderly/useAccountInfo.js +0 -6
- package/esm/orderly/useAccountInfo.js.map +0 -1
- package/esm/orderly/useChain.d.ts +0 -6
- package/esm/orderly/useChain.d.ts.map +0 -1
- package/esm/orderly/useChain.js +0 -29
- package/esm/orderly/useChain.js.map +0 -1
- package/esm/orderly/useChains.d.ts +0 -33
- package/esm/orderly/useChains.d.ts.map +0 -1
- package/esm/orderly/useChains.js +0 -183
- package/esm/orderly/useChains.js.map +0 -1
- package/esm/orderly/useCollateral.d.ts +0 -15
- package/esm/orderly/useCollateral.d.ts.map +0 -1
- package/esm/orderly/useCollateral.js +0 -104
- package/esm/orderly/useCollateral.js.map +0 -1
- package/esm/orderly/useDeposit.d.ts +0 -38
- package/esm/orderly/useDeposit.d.ts.map +0 -1
- package/esm/orderly/useDeposit.js +0 -268
- package/esm/orderly/useDeposit.js.map +0 -1
- package/esm/orderly/useFundingRate.d.ts +0 -11
- package/esm/orderly/useFundingRate.d.ts.map +0 -1
- package/esm/orderly/useFundingRate.js +0 -41
- package/esm/orderly/useFundingRate.js.map +0 -1
- package/esm/orderly/useFundingRates.d.ts +0 -7
- package/esm/orderly/useFundingRates.d.ts.map +0 -1
- package/esm/orderly/useFundingRates.js +0 -22
- package/esm/orderly/useFundingRates.js.map +0 -1
- package/esm/orderly/useHoldingStream.d.ts +0 -7
- package/esm/orderly/useHoldingStream.d.ts.map +0 -1
- package/esm/orderly/useHoldingStream.js +0 -51
- package/esm/orderly/useHoldingStream.js.map +0 -1
- package/esm/orderly/useIndexPrice.d.ts +0 -2
- package/esm/orderly/useIndexPrice.d.ts.map +0 -1
- package/esm/orderly/useIndexPrice.js +0 -19
- package/esm/orderly/useIndexPrice.js.map +0 -1
- package/esm/orderly/useLeverage.d.ts +0 -2
- package/esm/orderly/useLeverage.d.ts.map +0 -1
- package/esm/orderly/useLeverage.js +0 -31
- package/esm/orderly/useLeverage.js.map +0 -1
- package/esm/orderly/useMaintenanceStatus.d.ts +0 -7
- package/esm/orderly/useMaintenanceStatus.d.ts.map +0 -1
- package/esm/orderly/useMaintenanceStatus.js +0 -61
- package/esm/orderly/useMaintenanceStatus.js.map +0 -1
- package/esm/orderly/useMarginRatio.d.ts +0 -7
- package/esm/orderly/useMarginRatio.d.ts.map +0 -1
- package/esm/orderly/useMarginRatio.js +0 -55
- package/esm/orderly/useMarginRatio.js.map +0 -1
- package/esm/orderly/useMarkPrice.d.ts +0 -4
- package/esm/orderly/useMarkPrice.d.ts.map +0 -1
- package/esm/orderly/useMarkPrice.js +0 -35
- package/esm/orderly/useMarkPrice.js.map +0 -1
- package/esm/orderly/useMarkPricesStream.d.ts +0 -2
- package/esm/orderly/useMarkPricesStream.d.ts.map +0 -1
- package/esm/orderly/useMarkPricesStream.js +0 -27
- package/esm/orderly/useMarkPricesStream.js.map +0 -1
- package/esm/orderly/useMarketTradeStream.d.ts +0 -9
- package/esm/orderly/useMarketTradeStream.d.ts.map +0 -1
- package/esm/orderly/useMarketTradeStream.js +0 -66
- package/esm/orderly/useMarketTradeStream.js.map +0 -1
- package/esm/orderly/useMarkets.d.ts +0 -36
- package/esm/orderly/useMarkets.d.ts.map +0 -1
- package/esm/orderly/useMarkets.js +0 -331
- package/esm/orderly/useMarkets.js.map +0 -1
- package/esm/orderly/useMarketsStream.d.ts +0 -5
- package/esm/orderly/useMarketsStream.d.ts.map +0 -1
- package/esm/orderly/useMarketsStream.js +0 -53
- package/esm/orderly/useMarketsStream.js.map +0 -1
- package/esm/orderly/useMaxQty.d.ts +0 -9
- package/esm/orderly/useMaxQty.d.ts.map +0 -1
- package/esm/orderly/useMaxQty.js +0 -109
- package/esm/orderly/useMaxQty.js.map +0 -1
- package/esm/orderly/useOpenInterest.d.ts +0 -2
- package/esm/orderly/useOpenInterest.d.ts.map +0 -1
- package/esm/orderly/useOpenInterest.js +0 -17
- package/esm/orderly/useOpenInterest.js.map +0 -1
- package/esm/orderly/useOrderEntry.d.ts +0 -63
- package/esm/orderly/useOrderEntry.d.ts.map +0 -1
- package/esm/orderly/useOrderEntry.js +0 -544
- package/esm/orderly/useOrderEntry.js.map +0 -1
- package/esm/orderly/useOrderEntryNext/index.d.ts +0 -1
- package/esm/orderly/useOrderEntryNext/index.d.ts.map +0 -1
- package/esm/orderly/useOrderEntryNext/index.js +0 -2
- package/esm/orderly/useOrderEntryNext/index.js.map +0 -1
- package/esm/orderly/useOrderStream/useOrderStream.d.ts +0 -55
- package/esm/orderly/useOrderStream/useOrderStream.d.ts.map +0 -1
- package/esm/orderly/useOrderStream/useOrderStream.js +0 -278
- package/esm/orderly/useOrderStream/useOrderStream.js.map +0 -1
- package/esm/orderly/useOrderbookStream.d.ts +0 -52
- package/esm/orderly/useOrderbookStream.d.ts.map +0 -1
- package/esm/orderly/useOrderbookStream.js +0 -367
- package/esm/orderly/useOrderbookStream.js.map +0 -1
- package/esm/orderly/usePositionStream/usePositionStream.d.ts +0 -42
- package/esm/orderly/usePositionStream/usePositionStream.d.ts.map +0 -1
- package/esm/orderly/usePositionStream/usePositionStream.js +0 -269
- package/esm/orderly/usePositionStream/usePositionStream.js.map +0 -1
- package/esm/orderly/usePositionStream/utils.d.ts +0 -8
- package/esm/orderly/usePositionStream/utils.d.ts.map +0 -1
- package/esm/orderly/usePositionStream/utils.js +0 -34
- package/esm/orderly/usePositionStream/utils.js.map +0 -1
- package/esm/orderly/usePrivateDataObserver.d.ts +0 -5
- package/esm/orderly/usePrivateDataObserver.d.ts.map +0 -1
- package/esm/orderly/usePrivateDataObserver.js +0 -130
- package/esm/orderly/usePrivateDataObserver.js.map +0 -1
- package/esm/orderly/useSettleSubscription.d.ts +0 -4
- package/esm/orderly/useSettleSubscription.d.ts.map +0 -1
- package/esm/orderly/useSettleSubscription.js +0 -22
- package/esm/orderly/useSettleSubscription.js.map +0 -1
- package/esm/orderly/useSymbolLeverage.d.ts +0 -2
- package/esm/orderly/useSymbolLeverage.d.ts.map +0 -1
- package/esm/orderly/useSymbolLeverage.js +0 -31
- package/esm/orderly/useSymbolLeverage.js.map +0 -1
- package/esm/orderly/useSymbolPriceRange.d.ts +0 -13
- package/esm/orderly/useSymbolPriceRange.d.ts.map +0 -1
- package/esm/orderly/useSymbolPriceRange.js +0 -45
- package/esm/orderly/useSymbolPriceRange.js.map +0 -1
- package/esm/orderly/useSymbolsInfo.d.ts +0 -7
- package/esm/orderly/useSymbolsInfo.d.ts.map +0 -1
- package/esm/orderly/useSymbolsInfo.js +0 -35
- package/esm/orderly/useSymbolsInfo.js.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/__test__/useTakeProfitAndStopLoss.test.d.ts +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/__test__/useTakeProfitAndStopLoss.test.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/__test__/utils.test.d.ts +0 -2
- package/esm/orderly/useTakeProfitAndStopLoss/__test__/utils.test.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/index.d.ts +0 -30
- package/esm/orderly/useTakeProfitAndStopLoss/index.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/index.js +0 -23
- package/esm/orderly/useTakeProfitAndStopLoss/index.js.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/useTPSL.d.ts +0 -57
- package/esm/orderly/useTakeProfitAndStopLoss/useTPSL.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/useTPSL.js +0 -211
- package/esm/orderly/useTakeProfitAndStopLoss/useTPSL.js.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/utils.d.ts +0 -70
- package/esm/orderly/useTakeProfitAndStopLoss/utils.d.ts.map +0 -1
- package/esm/orderly/useTakeProfitAndStopLoss/utils.js +0 -239
- package/esm/orderly/useTakeProfitAndStopLoss/utils.js.map +0 -1
- package/esm/orderly/useTickerStream.d.ts +0 -7
- package/esm/orderly/useTickerStream.d.ts.map +0 -1
- package/esm/orderly/useTickerStream.js +0 -83
- package/esm/orderly/useTickerStream.js.map +0 -1
- package/esm/orderly/useWalletSubscription.d.ts +0 -4
- package/esm/orderly/useWalletSubscription.d.ts.map +0 -1
- package/esm/orderly/useWalletSubscription.js +0 -22
- package/esm/orderly/useWalletSubscription.js.map +0 -1
- package/esm/orderly/useWithdraw.d.ts +0 -24
- package/esm/orderly/useWithdraw.d.ts.map +0 -1
- package/esm/orderly/useWithdraw.js +0 -111
- package/esm/orderly/useWithdraw.js.map +0 -1
- package/esm/orderlyContext.d.ts +0 -24
- package/esm/orderlyContext.d.ts.map +0 -1
- package/esm/orderlyContext.js +0 -6
- package/esm/orderlyContext.js.map +0 -1
- package/esm/referral/api.d.ts +0 -87
- package/esm/referral/api.d.ts.map +0 -1
- package/esm/referral/api.js +0 -3
- package/esm/referral/api.js.map +0 -1
- package/esm/referral/format.d.ts +0 -2
- package/esm/referral/format.d.ts.map +0 -1
- package/esm/referral/format.js +0 -8
- package/esm/referral/format.js.map +0 -1
- package/esm/referral/index.d.ts +0 -12
- package/esm/referral/index.d.ts.map +0 -1
- package/esm/referral/index.js +0 -13
- package/esm/referral/index.js.map +0 -1
- package/esm/referral/swr.d.ts +0 -7
- package/esm/referral/swr.d.ts.map +0 -1
- package/esm/referral/swr.js +0 -24
- package/esm/referral/swr.js.map +0 -1
- package/esm/referral/useCheckReferralCode.d.ts +0 -6
- package/esm/referral/useCheckReferralCode.d.ts.map +0 -1
- package/esm/referral/useCheckReferralCode.js +0 -18
- package/esm/referral/useCheckReferralCode.js.map +0 -1
- package/esm/referral/useCommission.d.ts +0 -4
- package/esm/referral/useCommission.d.ts.map +0 -1
- package/esm/referral/useCommission.js +0 -59
- package/esm/referral/useCommission.js.map +0 -1
- package/esm/referral/useDaily.d.ts +0 -9
- package/esm/referral/useDaily.d.ts.map +0 -1
- package/esm/referral/useDaily.js +0 -20
- package/esm/referral/useDaily.js.map +0 -1
- package/esm/referral/useDistribution.d.ts +0 -9
- package/esm/referral/useDistribution.d.ts.map +0 -1
- package/esm/referral/useDistribution.js +0 -53
- package/esm/referral/useDistribution.js.map +0 -1
- package/esm/referral/useGetReferralCode.d.ts +0 -6
- package/esm/referral/useGetReferralCode.d.ts.map +0 -1
- package/esm/referral/useGetReferralCode.js +0 -18
- package/esm/referral/useGetReferralCode.js.map +0 -1
- package/esm/referral/useRefereeHistory.d.ts +0 -9
- package/esm/referral/useRefereeHistory.d.ts.map +0 -1
- package/esm/referral/useRefereeHistory.js +0 -47
- package/esm/referral/useRefereeHistory.js.map +0 -1
- package/esm/referral/useRefereeInfo.d.ts +0 -9
- package/esm/referral/useRefereeInfo.d.ts.map +0 -1
- package/esm/referral/useRefereeInfo.js +0 -47
- package/esm/referral/useRefereeInfo.js.map +0 -1
- package/esm/referral/useRefereeRebateSummary.d.ts +0 -12
- package/esm/referral/useRefereeRebateSummary.d.ts.map +0 -1
- package/esm/referral/useRefereeRebateSummary.js +0 -31
- package/esm/referral/useRefereeRebateSummary.js.map +0 -1
- package/esm/referral/useReferralInfo.d.ts +0 -10
- package/esm/referral/useReferralInfo.d.ts.map +0 -1
- package/esm/referral/useReferralInfo.js +0 -56
- package/esm/referral/useReferralInfo.js.map +0 -1
- package/esm/referral/useReferralRebateSummary.d.ts +0 -9
- package/esm/referral/useReferralRebateSummary.d.ts.map +0 -1
- package/esm/referral/useReferralRebateSummary.js +0 -47
- package/esm/referral/useReferralRebateSummary.js.map +0 -1
- package/esm/services/dataCenter.d.ts +0 -2
- package/esm/services/dataCenter.d.ts.map +0 -1
- package/esm/services/dataCenter.js +0 -15
- package/esm/services/dataCenter.js.map +0 -1
- package/esm/services/orderCreator/__test__/limitOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/limitOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/orderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/orderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/stopLimitOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/stopLimitOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/stopMarketOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/stopMarketOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/tpslOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/tpslOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/__test__/tpslPositionOrderCreator.test.d.ts +0 -2
- package/esm/services/orderCreator/__test__/tpslPositionOrderCreator.test.d.ts.map +0 -1
- package/esm/services/orderCreator/baseAlgoCreator.d.ts +0 -22
- package/esm/services/orderCreator/baseAlgoCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/baseAlgoCreator.js +0 -57
- package/esm/services/orderCreator/baseAlgoCreator.js.map +0 -1
- package/esm/services/orderCreator/baseCreator.d.ts +0 -14
- package/esm/services/orderCreator/baseCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/baseCreator.js +0 -98
- package/esm/services/orderCreator/baseCreator.js.map +0 -1
- package/esm/services/orderCreator/factory.d.ts +0 -7
- package/esm/services/orderCreator/factory.d.ts.map +0 -1
- package/esm/services/orderCreator/factory.js +0 -45
- package/esm/services/orderCreator/factory.js.map +0 -1
- package/esm/services/orderCreator/fokCreator.d.ts +0 -4
- package/esm/services/orderCreator/fokCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/fokCreator.js +0 -5
- package/esm/services/orderCreator/fokCreator.js.map +0 -1
- package/esm/services/orderCreator/generalCreator.d.ts +0 -8
- package/esm/services/orderCreator/generalCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/generalCreator.js +0 -15
- package/esm/services/orderCreator/generalCreator.js.map +0 -1
- package/esm/services/orderCreator/interface.d.ts +0 -23
- package/esm/services/orderCreator/interface.d.ts.map +0 -1
- package/esm/services/orderCreator/interface.js +0 -3
- package/esm/services/orderCreator/interface.js.map +0 -1
- package/esm/services/orderCreator/iocCreator.d.ts +0 -4
- package/esm/services/orderCreator/iocCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/iocCreator.js +0 -5
- package/esm/services/orderCreator/iocCreator.js.map +0 -1
- package/esm/services/orderCreator/limitOrderCreator.d.ts +0 -8
- package/esm/services/orderCreator/limitOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/limitOrderCreator.js +0 -69
- package/esm/services/orderCreator/limitOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/marketOrderCreator.d.ts +0 -24
- package/esm/services/orderCreator/marketOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/marketOrderCreator.js +0 -18
- package/esm/services/orderCreator/marketOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/postOnlyCreator.d.ts +0 -4
- package/esm/services/orderCreator/postOnlyCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/postOnlyCreator.js +0 -5
- package/esm/services/orderCreator/postOnlyCreator.js.map +0 -1
- package/esm/services/orderCreator/stopLimitOrderCreator.d.ts +0 -11
- package/esm/services/orderCreator/stopLimitOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/stopLimitOrderCreator.js +0 -84
- package/esm/services/orderCreator/stopLimitOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/stopMarketOrderCreator.d.ts +0 -30
- package/esm/services/orderCreator/stopMarketOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/stopMarketOrderCreator.js +0 -46
- package/esm/services/orderCreator/stopMarketOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/tpslOrderCreator.d.ts +0 -32
- package/esm/services/orderCreator/tpslOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/tpslOrderCreator.js +0 -88
- package/esm/services/orderCreator/tpslOrderCreator.js.map +0 -1
- package/esm/services/orderCreator/tpslPositionOrderCreator.d.ts +0 -33
- package/esm/services/orderCreator/tpslPositionOrderCreator.d.ts.map +0 -1
- package/esm/services/orderCreator/tpslPositionOrderCreator.js +0 -74
- package/esm/services/orderCreator/tpslPositionOrderCreator.js.map +0 -1
- package/esm/services/orderMerge/algoOrderMergeHandler.d.ts +0 -10
- package/esm/services/orderMerge/algoOrderMergeHandler.d.ts.map +0 -1
- package/esm/services/orderMerge/algoOrderMergeHandler.js +0 -46
- package/esm/services/orderMerge/algoOrderMergeHandler.js.map +0 -1
- package/esm/services/orderMerge/baseMergeHandler.d.ts +0 -23
- package/esm/services/orderMerge/baseMergeHandler.d.ts.map +0 -1
- package/esm/services/orderMerge/baseMergeHandler.js +0 -160
- package/esm/services/orderMerge/baseMergeHandler.js.map +0 -1
- package/esm/services/orderMerge/interface.d.ts +0 -8
- package/esm/services/orderMerge/interface.d.ts.map +0 -1
- package/esm/services/orderMerge/interface.js +0 -3
- package/esm/services/orderMerge/interface.js.map +0 -1
- package/esm/services/orderMerge/regularOrderMergeHandler.d.ts +0 -9
- package/esm/services/orderMerge/regularOrderMergeHandler.d.ts.map +0 -1
- package/esm/services/orderMerge/regularOrderMergeHandler.js +0 -18
- package/esm/services/orderMerge/regularOrderMergeHandler.js.map +0 -1
- package/esm/services/painter/backgroundPaint.d.ts +0 -9
- package/esm/services/painter/backgroundPaint.d.ts.map +0 -1
- package/esm/services/painter/backgroundPaint.js +0 -38
- package/esm/services/painter/backgroundPaint.js.map +0 -1
- package/esm/services/painter/basePaint.d.ts +0 -104
- package/esm/services/painter/basePaint.d.ts.map +0 -1
- package/esm/services/painter/basePaint.js +0 -10
- package/esm/services/painter/basePaint.js.map +0 -1
- package/esm/services/painter/dataPaint.d.ts +0 -20
- package/esm/services/painter/dataPaint.d.ts.map +0 -1
- package/esm/services/painter/dataPaint.js +0 -315
- package/esm/services/painter/dataPaint.js.map +0 -1
- package/esm/services/painter/layout.config.d.ts +0 -3
- package/esm/services/painter/layout.config.d.ts.map +0 -1
- package/esm/services/painter/layout.config.js +0 -59
- package/esm/services/painter/layout.config.js.map +0 -1
- package/esm/services/painter/painter.d.ts +0 -14
- package/esm/services/painter/painter.d.ts.map +0 -1
- package/esm/services/painter/painter.js +0 -48
- package/esm/services/painter/painter.js.map +0 -1
- package/esm/services/painter/qrPaint.d.ts +0 -8
- package/esm/services/painter/qrPaint.d.ts.map +0 -1
- package/esm/services/painter/qrPaint.js +0 -39
- package/esm/services/painter/qrPaint.js.map +0 -1
- package/esm/services/painter/resource.d.ts +0 -7
- package/esm/services/painter/resource.d.ts.map +0 -1
- package/esm/services/painter/resource.js +0 -17
- package/esm/services/painter/resource.js.map +0 -1
- package/esm/statusProvider.d.ts +0 -8
- package/esm/statusProvider.d.ts.map +0 -1
- package/esm/statusProvider.js +0 -15
- package/esm/statusProvider.js.map +0 -1
- package/esm/unuse/apiPrefixMiddleware.d.ts +0 -3
- package/esm/unuse/apiPrefixMiddleware.d.ts.map +0 -1
- package/esm/unuse/apiPrefixMiddleware.js +0 -29
- package/esm/unuse/apiPrefixMiddleware.js.map +0 -1
- package/esm/unuse/fn.d.ts +0 -2
- package/esm/unuse/fn.d.ts.map +0 -1
- package/esm/unuse/fn.js +0 -8
- package/esm/unuse/fn.js.map +0 -1
- package/esm/unuse/useBalance.d.ts +0 -2
- package/esm/unuse/useBalance.d.ts.map +0 -1
- package/esm/unuse/useBalance.js +0 -14
- package/esm/unuse/useBalance.js.map +0 -1
- package/esm/unuse/useFetures.d.ts +0 -11
- package/esm/unuse/useFetures.d.ts.map +0 -1
- package/esm/unuse/useFetures.js +0 -47
- package/esm/unuse/useFetures.js.map +0 -1
- package/esm/unuse/useRunOnce.d.ts +0 -7
- package/esm/unuse/useRunOnce.d.ts.map +0 -1
- package/esm/unuse/useRunOnce.js +0 -20
- package/esm/unuse/useRunOnce.js.map +0 -1
- package/esm/unuse/useSyncEnd.d.ts +0 -2
- package/esm/unuse/useSyncEnd.d.ts.map +0 -1
- package/esm/unuse/useSyncEnd.js +0 -11
- package/esm/unuse/useSyncEnd.js.map +0 -1
- package/esm/unuse/useTokenInfo.d.ts +0 -7
- package/esm/unuse/useTokenInfo.d.ts.map +0 -1
- package/esm/unuse/useTokenInfo.js +0 -22
- package/esm/unuse/useTokenInfo.js.map +0 -1
- package/esm/unuse/useUnsettlementPnL.d.ts +0 -2
- package/esm/unuse/useUnsettlementPnL.d.ts.map +0 -1
- package/esm/unuse/useUnsettlementPnL.js +0 -24
- package/esm/unuse/useUnsettlementPnL.js.map +0 -1
- package/esm/useAccount.d.ts +0 -8
- package/esm/useAccount.d.ts.map +0 -1
- package/esm/useAccount.js +0 -56
- package/esm/useAccount.js.map +0 -1
- package/esm/useAccountInstance.d.ts +0 -3
- package/esm/useAccountInstance.d.ts.map +0 -1
- package/esm/useAccountInstance.js +0 -22
- package/esm/useAccountInstance.js.map +0 -1
- package/esm/useBoolean.d.ts +0 -6
- package/esm/useBoolean.d.ts.map +0 -1
- package/esm/useBoolean.js +0 -17
- package/esm/useBoolean.js.map +0 -1
- package/esm/useConfig.d.ts +0 -4
- package/esm/useConfig.d.ts.map +0 -1
- package/esm/useConfig.js +0 -14
- package/esm/useConfig.js.map +0 -1
- package/esm/useEventEmitter.d.ts +0 -3
- package/esm/useEventEmitter.d.ts.map +0 -1
- package/esm/useEventEmitter.js +0 -14
- package/esm/useEventEmitter.js.map +0 -1
- package/esm/useLazyQuery.d.ts +0 -13
- package/esm/useLazyQuery.d.ts.map +0 -1
- package/esm/useLazyQuery.js +0 -34
- package/esm/useLazyQuery.js.map +0 -1
- package/esm/useLocalStorage.d.ts +0 -2
- package/esm/useLocalStorage.d.ts.map +0 -1
- package/esm/useLocalStorage.js +0 -82
- package/esm/useLocalStorage.js.map +0 -1
- package/esm/useMediaQuery.d.ts +0 -2
- package/esm/useMediaQuery.d.ts.map +0 -1
- package/esm/useMediaQuery.js +0 -38
- package/esm/useMediaQuery.js.map +0 -1
- package/esm/useMutation.d.ts +0 -13
- package/esm/useMutation.d.ts.map +0 -1
- package/esm/useMutation.js +0 -81
- package/esm/useMutation.js.map +0 -1
- package/esm/useObserve.d.ts +0 -6
- package/esm/useObserve.d.ts.map +0 -1
- package/esm/useObserve.js +0 -8
- package/esm/useObserve.js.map +0 -1
- package/esm/useParamsCheck.d.ts +0 -4
- package/esm/useParamsCheck.d.ts.map +0 -1
- package/esm/useParamsCheck.js +0 -12
- package/esm/useParamsCheck.js.map +0 -1
- package/esm/usePoster.d.ts +0 -44
- package/esm/usePoster.d.ts.map +0 -1
- package/esm/usePoster.js +0 -140
- package/esm/usePoster.js.map +0 -1
- package/esm/usePreloadData.d.ts +0 -5
- package/esm/usePreloadData.d.ts.map +0 -1
- package/esm/usePreloadData.js +0 -38
- package/esm/usePreloadData.js.map +0 -1
- package/esm/usePrivateInfiniteQuery.d.ts +0 -5
- package/esm/usePrivateInfiniteQuery.d.ts.map +0 -1
- package/esm/usePrivateInfiniteQuery.js +0 -31
- package/esm/usePrivateInfiniteQuery.js.map +0 -1
- package/esm/usePrivateQuery.d.ts +0 -10
- package/esm/usePrivateQuery.d.ts.map +0 -1
- package/esm/usePrivateQuery.js +0 -33
- package/esm/usePrivateQuery.js.map +0 -1
- package/esm/useQuery.d.ts +0 -10
- package/esm/useQuery.d.ts.map +0 -1
- package/esm/useQuery.js +0 -21
- package/esm/useQuery.js.map +0 -1
- package/esm/useSessionStorage.d.ts +0 -2
- package/esm/useSessionStorage.d.ts.map +0 -1
- package/esm/useSessionStorage.js +0 -69
- package/esm/useSessionStorage.js.map +0 -1
- package/esm/useWS.d.ts +0 -3
- package/esm/useWS.d.ts.map +0 -1
- package/esm/useWS.js +0 -54
- package/esm/useWS.js.map +0 -1
- package/esm/useWsStatus.d.ts +0 -7
- package/esm/useWsStatus.d.ts.map +0 -1
- package/esm/useWsStatus.js +0 -41
- package/esm/useWsStatus.js.map +0 -1
- package/esm/utils/createGetter.d.ts +0 -11
- package/esm/utils/createGetter.d.ts.map +0 -1
- package/esm/utils/createGetter.js +0 -26
- package/esm/utils/createGetter.js.map +0 -1
- package/esm/utils/createOrder.d.ts +0 -2
- package/esm/utils/createOrder.d.ts.map +0 -1
- package/esm/utils/createOrder.js +0 -16
- package/esm/utils/createOrder.js.map +0 -1
- package/esm/utils/dev.d.ts +0 -2
- package/esm/utils/dev.d.ts.map +0 -1
- package/esm/utils/dev.js +0 -21
- package/esm/utils/dev.js.map +0 -1
- package/esm/utils/fetcher.d.ts +0 -6
- package/esm/utils/fetcher.d.ts.map +0 -1
- package/esm/utils/fetcher.js +0 -4
- package/esm/utils/fetcher.js.map +0 -1
- package/esm/utils/fokCreator.d.ts +0 -1
- package/esm/utils/fokCreator.d.ts.map +0 -1
- package/esm/utils/fokCreator.js +0 -2
- package/esm/utils/fokCreator.js.map +0 -1
- package/esm/utils/index.d.ts +0 -6
- package/esm/utils/index.d.ts.map +0 -1
- package/esm/utils/index.js +0 -7
- package/esm/utils/index.js.map +0 -1
- package/esm/utils/json.d.ts +0 -2
- package/esm/utils/json.d.ts.map +0 -1
- package/esm/utils/json.js +0 -9
- package/esm/utils/json.js.map +0 -1
- package/esm/utils/order.d.ts +0 -2
- package/esm/utils/order.d.ts.map +0 -1
- package/esm/utils/order.js +0 -3
- package/esm/utils/order.js.map +0 -1
- package/esm/utils/orderEntryHelper.d.ts +0 -26
- package/esm/utils/orderEntryHelper.d.ts.map +0 -1
- package/esm/utils/orderEntryHelper.js +0 -296
- package/esm/utils/orderEntryHelper.js.map +0 -1
- package/esm/utils/parseHolding.d.ts +0 -9
- package/esm/utils/parseHolding.d.ts.map +0 -1
- package/esm/utils/parseHolding.js +0 -25
- package/esm/utils/parseHolding.js.map +0 -1
- package/esm/utils/swr.d.ts +0 -12
- package/esm/utils/swr.d.ts.map +0 -1
- package/esm/utils/swr.js +0 -239
- package/esm/utils/swr.js.map +0 -1
- package/esm/utils/ws.d.ts +0 -2
- package/esm/utils/ws.d.ts.map +0 -1
- package/esm/utils/ws.js +0 -9
- package/esm/utils/ws.js.map +0 -1
- package/esm/version.d.ts +0 -10
- package/esm/version.d.ts.map +0 -1
- package/esm/version.js +0 -7
- package/esm/version.js.map +0 -1
- package/esm/walletConnectorContext.d.ts +0 -31
- package/esm/walletConnectorContext.d.ts.map +0 -1
- package/esm/walletConnectorContext.js +0 -7
- package/esm/walletConnectorContext.js.map +0 -1
- package/lib/configProvider.d.ts +0 -24
- package/lib/configProvider.d.ts.map +0 -1
- package/lib/configProvider.js +0 -136
- package/lib/configProvider.js.map +0 -1
- package/lib/dataProvider.d.ts +0 -11
- package/lib/dataProvider.d.ts.map +0 -1
- package/lib/dataProvider.js +0 -58
- package/lib/dataProvider.js.map +0 -1
- package/lib/dev/proxyConfigStore.d.ts +0 -15
- package/lib/dev/proxyConfigStore.d.ts.map +0 -1
- package/lib/dev/proxyConfigStore.js +0 -51
- package/lib/dev/proxyConfigStore.js.map +0 -1
- package/lib/index.d.ts +0 -38
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -202
- package/lib/index.js.map +0 -1
- package/lib/middleware/signatureMiddleware.d.ts +0 -3
- package/lib/middleware/signatureMiddleware.d.ts.map +0 -1
- package/lib/middleware/signatureMiddleware.js +0 -44
- package/lib/middleware/signatureMiddleware.js.map +0 -1
- package/lib/orderly/orderbook.service.d.ts +0 -33
- package/lib/orderly/orderbook.service.d.ts.map +0 -1
- package/lib/orderly/orderbook.service.js +0 -147
- package/lib/orderly/orderbook.service.js.map +0 -1
- package/lib/orderly/orderlyHooks.d.ts +0 -36
- package/lib/orderly/orderlyHooks.d.ts.map +0 -1
- package/lib/orderly/orderlyHooks.js +0 -137
- package/lib/orderly/orderlyHooks.js.map +0 -1
- package/lib/orderly/useAccountInfo.d.ts +0 -3
- package/lib/orderly/useAccountInfo.d.ts.map +0 -1
- package/lib/orderly/useAccountInfo.js +0 -16
- package/lib/orderly/useAccountInfo.js.map +0 -1
- package/lib/orderly/useChain.d.ts +0 -6
- package/lib/orderly/useChain.d.ts.map +0 -1
- package/lib/orderly/useChain.js +0 -39
- package/lib/orderly/useChain.js.map +0 -1
- package/lib/orderly/useChains.d.ts +0 -33
- package/lib/orderly/useChains.d.ts.map +0 -1
- package/lib/orderly/useChains.js +0 -209
- package/lib/orderly/useChains.js.map +0 -1
- package/lib/orderly/useCollateral.d.ts +0 -15
- package/lib/orderly/useCollateral.d.ts.map +0 -1
- package/lib/orderly/useCollateral.js +0 -114
- package/lib/orderly/useCollateral.js.map +0 -1
- package/lib/orderly/useDeposit.d.ts +0 -38
- package/lib/orderly/useDeposit.d.ts.map +0 -1
- package/lib/orderly/useDeposit.js +0 -278
- package/lib/orderly/useDeposit.js.map +0 -1
- package/lib/orderly/useFundingRate.d.ts +0 -11
- package/lib/orderly/useFundingRate.d.ts.map +0 -1
- package/lib/orderly/useFundingRate.js +0 -51
- package/lib/orderly/useFundingRate.js.map +0 -1
- package/lib/orderly/useFundingRates.d.ts +0 -7
- package/lib/orderly/useFundingRates.d.ts.map +0 -1
- package/lib/orderly/useFundingRates.js +0 -32
- package/lib/orderly/useFundingRates.js.map +0 -1
- package/lib/orderly/useHoldingStream.d.ts +0 -7
- package/lib/orderly/useHoldingStream.d.ts.map +0 -1
- package/lib/orderly/useHoldingStream.js +0 -66
- package/lib/orderly/useHoldingStream.js.map +0 -1
- package/lib/orderly/useIndexPrice.d.ts +0 -2
- package/lib/orderly/useIndexPrice.d.ts.map +0 -1
- package/lib/orderly/useIndexPrice.js +0 -34
- package/lib/orderly/useIndexPrice.js.map +0 -1
- package/lib/orderly/useLeverage.d.ts +0 -2
- package/lib/orderly/useLeverage.d.ts.map +0 -1
- package/lib/orderly/useLeverage.js +0 -41
- package/lib/orderly/useLeverage.js.map +0 -1
- package/lib/orderly/useMaintenanceStatus.d.ts +0 -7
- package/lib/orderly/useMaintenanceStatus.d.ts.map +0 -1
- package/lib/orderly/useMaintenanceStatus.js +0 -71
- package/lib/orderly/useMaintenanceStatus.js.map +0 -1
- package/lib/orderly/useMarginRatio.d.ts +0 -7
- package/lib/orderly/useMarginRatio.d.ts.map +0 -1
- package/lib/orderly/useMarginRatio.js +0 -65
- package/lib/orderly/useMarginRatio.js.map +0 -1
- package/lib/orderly/useMarkPrice.d.ts +0 -4
- package/lib/orderly/useMarkPrice.d.ts.map +0 -1
- package/lib/orderly/useMarkPrice.js +0 -44
- package/lib/orderly/useMarkPrice.js.map +0 -1
- package/lib/orderly/useMarkPricesStream.d.ts +0 -2
- package/lib/orderly/useMarkPricesStream.d.ts.map +0 -1
- package/lib/orderly/useMarkPricesStream.js +0 -42
- package/lib/orderly/useMarkPricesStream.js.map +0 -1
- package/lib/orderly/useMarketTradeStream.d.ts +0 -9
- package/lib/orderly/useMarketTradeStream.d.ts.map +0 -1
- package/lib/orderly/useMarketTradeStream.js +0 -76
- package/lib/orderly/useMarketTradeStream.js.map +0 -1
- package/lib/orderly/useMarkets.d.ts +0 -36
- package/lib/orderly/useMarkets.d.ts.map +0 -1
- package/lib/orderly/useMarkets.js +0 -349
- package/lib/orderly/useMarkets.js.map +0 -1
- package/lib/orderly/useMarketsStream.d.ts +0 -5
- package/lib/orderly/useMarketsStream.d.ts.map +0 -1
- package/lib/orderly/useMarketsStream.js +0 -68
- package/lib/orderly/useMarketsStream.js.map +0 -1
- package/lib/orderly/useMaxQty.d.ts +0 -9
- package/lib/orderly/useMaxQty.d.ts.map +0 -1
- package/lib/orderly/useMaxQty.js +0 -114
- package/lib/orderly/useMaxQty.js.map +0 -1
- package/lib/orderly/useOpenInterest.d.ts +0 -2
- package/lib/orderly/useOpenInterest.d.ts.map +0 -1
- package/lib/orderly/useOpenInterest.js +0 -32
- package/lib/orderly/useOpenInterest.js.map +0 -1
- package/lib/orderly/useOrderEntry.d.ts +0 -63
- package/lib/orderly/useOrderEntry.d.ts.map +0 -1
- package/lib/orderly/useOrderEntry.js +0 -553
- package/lib/orderly/useOrderEntry.js.map +0 -1
- package/lib/orderly/useOrderEntryNext/index.d.ts +0 -1
- package/lib/orderly/useOrderEntryNext/index.d.ts.map +0 -1
- package/lib/orderly/useOrderEntryNext/index.js +0 -3
- package/lib/orderly/useOrderEntryNext/index.js.map +0 -1
- package/lib/orderly/useOrderStream/useOrderStream.d.ts +0 -55
- package/lib/orderly/useOrderStream/useOrderStream.d.ts.map +0 -1
- package/lib/orderly/useOrderStream/useOrderStream.js +0 -292
- package/lib/orderly/useOrderStream/useOrderStream.js.map +0 -1
- package/lib/orderly/useOrderbookStream.d.ts +0 -52
- package/lib/orderly/useOrderbookStream.d.ts.map +0 -1
- package/lib/orderly/useOrderbookStream.js +0 -385
- package/lib/orderly/useOrderbookStream.js.map +0 -1
- package/lib/orderly/usePositionStream/usePositionStream.d.ts +0 -42
- package/lib/orderly/usePositionStream/usePositionStream.d.ts.map +0 -1
- package/lib/orderly/usePositionStream/usePositionStream.js +0 -287
- package/lib/orderly/usePositionStream/usePositionStream.js.map +0 -1
- package/lib/orderly/usePositionStream/utils.d.ts +0 -8
- package/lib/orderly/usePositionStream/utils.d.ts.map +0 -1
- package/lib/orderly/usePositionStream/utils.js +0 -55
- package/lib/orderly/usePositionStream/utils.js.map +0 -1
- package/lib/orderly/usePrivateDataObserver.d.ts +0 -5
- package/lib/orderly/usePrivateDataObserver.d.ts.map +0 -1
- package/lib/orderly/usePrivateDataObserver.js +0 -140
- package/lib/orderly/usePrivateDataObserver.js.map +0 -1
- package/lib/orderly/useSettleSubscription.d.ts +0 -4
- package/lib/orderly/useSettleSubscription.d.ts.map +0 -1
- package/lib/orderly/useSettleSubscription.js +0 -37
- package/lib/orderly/useSettleSubscription.js.map +0 -1
- package/lib/orderly/useSymbolLeverage.d.ts +0 -2
- package/lib/orderly/useSymbolLeverage.d.ts.map +0 -1
- package/lib/orderly/useSymbolLeverage.js +0 -41
- package/lib/orderly/useSymbolLeverage.js.map +0 -1
- package/lib/orderly/useSymbolPriceRange.d.ts +0 -13
- package/lib/orderly/useSymbolPriceRange.d.ts.map +0 -1
- package/lib/orderly/useSymbolPriceRange.js +0 -49
- package/lib/orderly/useSymbolPriceRange.js.map +0 -1
- package/lib/orderly/useSymbolsInfo.d.ts +0 -7
- package/lib/orderly/useSymbolsInfo.d.ts.map +0 -1
- package/lib/orderly/useSymbolsInfo.js +0 -45
- package/lib/orderly/useSymbolsInfo.js.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/__test__/useTakeProfitAndStopLoss.test.d.ts +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/__test__/useTakeProfitAndStopLoss.test.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/__test__/utils.test.d.ts +0 -2
- package/lib/orderly/useTakeProfitAndStopLoss/__test__/utils.test.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/index.d.ts +0 -30
- package/lib/orderly/useTakeProfitAndStopLoss/index.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/index.js +0 -33
- package/lib/orderly/useTakeProfitAndStopLoss/index.js.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/useTPSL.d.ts +0 -57
- package/lib/orderly/useTakeProfitAndStopLoss/useTPSL.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/useTPSL.js +0 -218
- package/lib/orderly/useTakeProfitAndStopLoss/useTPSL.js.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/utils.d.ts +0 -70
- package/lib/orderly/useTakeProfitAndStopLoss/utils.d.ts.map +0 -1
- package/lib/orderly/useTakeProfitAndStopLoss/utils.js +0 -254
- package/lib/orderly/useTakeProfitAndStopLoss/utils.js.map +0 -1
- package/lib/orderly/useTickerStream.d.ts +0 -7
- package/lib/orderly/useTickerStream.d.ts.map +0 -1
- package/lib/orderly/useTickerStream.js +0 -93
- package/lib/orderly/useTickerStream.js.map +0 -1
- package/lib/orderly/useWalletSubscription.d.ts +0 -4
- package/lib/orderly/useWalletSubscription.d.ts.map +0 -1
- package/lib/orderly/useWalletSubscription.js +0 -37
- package/lib/orderly/useWalletSubscription.js.map +0 -1
- package/lib/orderly/useWithdraw.d.ts +0 -24
- package/lib/orderly/useWithdraw.d.ts.map +0 -1
- package/lib/orderly/useWithdraw.js +0 -121
- package/lib/orderly/useWithdraw.js.map +0 -1
- package/lib/orderlyContext.d.ts +0 -24
- package/lib/orderlyContext.d.ts.map +0 -1
- package/lib/orderlyContext.js +0 -24
- package/lib/orderlyContext.js.map +0 -1
- package/lib/referral/api.d.ts +0 -87
- package/lib/referral/api.d.ts.map +0 -1
- package/lib/referral/api.js +0 -6
- package/lib/referral/api.js.map +0 -1
- package/lib/referral/format.d.ts +0 -2
- package/lib/referral/format.d.ts.map +0 -1
- package/lib/referral/format.js +0 -18
- package/lib/referral/format.js.map +0 -1
- package/lib/referral/index.d.ts +0 -12
- package/lib/referral/index.d.ts.map +0 -1
- package/lib/referral/index.js +0 -68
- package/lib/referral/index.js.map +0 -1
- package/lib/referral/swr.d.ts +0 -7
- package/lib/referral/swr.d.ts.map +0 -1
- package/lib/referral/swr.js +0 -34
- package/lib/referral/swr.js.map +0 -1
- package/lib/referral/useCheckReferralCode.d.ts +0 -6
- package/lib/referral/useCheckReferralCode.d.ts.map +0 -1
- package/lib/referral/useCheckReferralCode.js +0 -28
- package/lib/referral/useCheckReferralCode.js.map +0 -1
- package/lib/referral/useCommission.d.ts +0 -4
- package/lib/referral/useCommission.d.ts.map +0 -1
- package/lib/referral/useCommission.js +0 -69
- package/lib/referral/useCommission.js.map +0 -1
- package/lib/referral/useDaily.d.ts +0 -9
- package/lib/referral/useDaily.d.ts.map +0 -1
- package/lib/referral/useDaily.js +0 -30
- package/lib/referral/useDaily.js.map +0 -1
- package/lib/referral/useDistribution.d.ts +0 -9
- package/lib/referral/useDistribution.d.ts.map +0 -1
- package/lib/referral/useDistribution.js +0 -63
- package/lib/referral/useDistribution.js.map +0 -1
- package/lib/referral/useGetReferralCode.d.ts +0 -6
- package/lib/referral/useGetReferralCode.d.ts.map +0 -1
- package/lib/referral/useGetReferralCode.js +0 -28
- package/lib/referral/useGetReferralCode.js.map +0 -1
- package/lib/referral/useRefereeHistory.d.ts +0 -9
- package/lib/referral/useRefereeHistory.d.ts.map +0 -1
- package/lib/referral/useRefereeHistory.js +0 -57
- package/lib/referral/useRefereeHistory.js.map +0 -1
- package/lib/referral/useRefereeInfo.d.ts +0 -9
- package/lib/referral/useRefereeInfo.d.ts.map +0 -1
- package/lib/referral/useRefereeInfo.js +0 -57
- package/lib/referral/useRefereeInfo.js.map +0 -1
- package/lib/referral/useRefereeRebateSummary.d.ts +0 -12
- package/lib/referral/useRefereeRebateSummary.d.ts.map +0 -1
- package/lib/referral/useRefereeRebateSummary.js +0 -41
- package/lib/referral/useRefereeRebateSummary.js.map +0 -1
- package/lib/referral/useReferralInfo.d.ts +0 -10
- package/lib/referral/useReferralInfo.d.ts.map +0 -1
- package/lib/referral/useReferralInfo.js +0 -66
- package/lib/referral/useReferralInfo.js.map +0 -1
- package/lib/referral/useReferralRebateSummary.d.ts +0 -9
- package/lib/referral/useReferralRebateSummary.d.ts.map +0 -1
- package/lib/referral/useReferralRebateSummary.js +0 -57
- package/lib/referral/useReferralRebateSummary.js.map +0 -1
- package/lib/services/dataCenter.d.ts +0 -2
- package/lib/services/dataCenter.d.ts.map +0 -1
- package/lib/services/dataCenter.js +0 -19
- package/lib/services/dataCenter.js.map +0 -1
- package/lib/services/orderCreator/__test__/limitOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/limitOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/orderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/orderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/stopLimitOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/stopLimitOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/stopMarketOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/stopMarketOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/tpslOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/tpslOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/__test__/tpslPositionOrderCreator.test.d.ts +0 -2
- package/lib/services/orderCreator/__test__/tpslPositionOrderCreator.test.d.ts.map +0 -1
- package/lib/services/orderCreator/baseAlgoCreator.d.ts +0 -22
- package/lib/services/orderCreator/baseAlgoCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/baseAlgoCreator.js +0 -67
- package/lib/services/orderCreator/baseAlgoCreator.js.map +0 -1
- package/lib/services/orderCreator/baseCreator.d.ts +0 -14
- package/lib/services/orderCreator/baseCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/baseCreator.js +0 -108
- package/lib/services/orderCreator/baseCreator.js.map +0 -1
- package/lib/services/orderCreator/factory.d.ts +0 -7
- package/lib/services/orderCreator/factory.d.ts.map +0 -1
- package/lib/services/orderCreator/factory.js +0 -54
- package/lib/services/orderCreator/factory.js.map +0 -1
- package/lib/services/orderCreator/fokCreator.d.ts +0 -4
- package/lib/services/orderCreator/fokCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/fokCreator.js +0 -15
- package/lib/services/orderCreator/fokCreator.js.map +0 -1
- package/lib/services/orderCreator/generalCreator.d.ts +0 -8
- package/lib/services/orderCreator/generalCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/generalCreator.js +0 -25
- package/lib/services/orderCreator/generalCreator.js.map +0 -1
- package/lib/services/orderCreator/interface.d.ts +0 -23
- package/lib/services/orderCreator/interface.d.ts.map +0 -1
- package/lib/services/orderCreator/interface.js +0 -6
- package/lib/services/orderCreator/interface.js.map +0 -1
- package/lib/services/orderCreator/iocCreator.d.ts +0 -4
- package/lib/services/orderCreator/iocCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/iocCreator.js +0 -15
- package/lib/services/orderCreator/iocCreator.js.map +0 -1
- package/lib/services/orderCreator/limitOrderCreator.d.ts +0 -8
- package/lib/services/orderCreator/limitOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/limitOrderCreator.js +0 -79
- package/lib/services/orderCreator/limitOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/marketOrderCreator.d.ts +0 -24
- package/lib/services/orderCreator/marketOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/marketOrderCreator.js +0 -28
- package/lib/services/orderCreator/marketOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/postOnlyCreator.d.ts +0 -4
- package/lib/services/orderCreator/postOnlyCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/postOnlyCreator.js +0 -15
- package/lib/services/orderCreator/postOnlyCreator.js.map +0 -1
- package/lib/services/orderCreator/stopLimitOrderCreator.d.ts +0 -11
- package/lib/services/orderCreator/stopLimitOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/stopLimitOrderCreator.js +0 -93
- package/lib/services/orderCreator/stopLimitOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/stopMarketOrderCreator.d.ts +0 -30
- package/lib/services/orderCreator/stopMarketOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/stopMarketOrderCreator.js +0 -56
- package/lib/services/orderCreator/stopMarketOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/tpslOrderCreator.d.ts +0 -32
- package/lib/services/orderCreator/tpslOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/tpslOrderCreator.js +0 -94
- package/lib/services/orderCreator/tpslOrderCreator.js.map +0 -1
- package/lib/services/orderCreator/tpslPositionOrderCreator.d.ts +0 -33
- package/lib/services/orderCreator/tpslPositionOrderCreator.d.ts.map +0 -1
- package/lib/services/orderCreator/tpslPositionOrderCreator.js +0 -83
- package/lib/services/orderCreator/tpslPositionOrderCreator.js.map +0 -1
- package/lib/services/orderMerge/algoOrderMergeHandler.d.ts +0 -10
- package/lib/services/orderMerge/algoOrderMergeHandler.d.ts.map +0 -1
- package/lib/services/orderMerge/algoOrderMergeHandler.js +0 -56
- package/lib/services/orderMerge/algoOrderMergeHandler.js.map +0 -1
- package/lib/services/orderMerge/baseMergeHandler.d.ts +0 -23
- package/lib/services/orderMerge/baseMergeHandler.d.ts.map +0 -1
- package/lib/services/orderMerge/baseMergeHandler.js +0 -170
- package/lib/services/orderMerge/baseMergeHandler.js.map +0 -1
- package/lib/services/orderMerge/interface.d.ts +0 -8
- package/lib/services/orderMerge/interface.d.ts.map +0 -1
- package/lib/services/orderMerge/interface.js +0 -6
- package/lib/services/orderMerge/interface.js.map +0 -1
- package/lib/services/orderMerge/regularOrderMergeHandler.d.ts +0 -9
- package/lib/services/orderMerge/regularOrderMergeHandler.d.ts.map +0 -1
- package/lib/services/orderMerge/regularOrderMergeHandler.js +0 -28
- package/lib/services/orderMerge/regularOrderMergeHandler.js.map +0 -1
- package/lib/services/painter/backgroundPaint.d.ts +0 -9
- package/lib/services/painter/backgroundPaint.d.ts.map +0 -1
- package/lib/services/painter/backgroundPaint.js +0 -48
- package/lib/services/painter/backgroundPaint.js.map +0 -1
- package/lib/services/painter/basePaint.d.ts +0 -104
- package/lib/services/painter/basePaint.d.ts.map +0 -1
- package/lib/services/painter/basePaint.js +0 -20
- package/lib/services/painter/basePaint.js.map +0 -1
- package/lib/services/painter/dataPaint.d.ts +0 -20
- package/lib/services/painter/dataPaint.d.ts.map +0 -1
- package/lib/services/painter/dataPaint.js +0 -325
- package/lib/services/painter/dataPaint.js.map +0 -1
- package/lib/services/painter/layout.config.d.ts +0 -3
- package/lib/services/painter/layout.config.d.ts.map +0 -1
- package/lib/services/painter/layout.config.js +0 -69
- package/lib/services/painter/layout.config.js.map +0 -1
- package/lib/services/painter/painter.d.ts +0 -14
- package/lib/services/painter/painter.d.ts.map +0 -1
- package/lib/services/painter/painter.js +0 -58
- package/lib/services/painter/painter.js.map +0 -1
- package/lib/services/painter/qrPaint.d.ts +0 -8
- package/lib/services/painter/qrPaint.d.ts.map +0 -1
- package/lib/services/painter/qrPaint.js +0 -49
- package/lib/services/painter/qrPaint.js.map +0 -1
- package/lib/services/painter/resource.d.ts +0 -7
- package/lib/services/painter/resource.d.ts.map +0 -1
- package/lib/services/painter/resource.js +0 -27
- package/lib/services/painter/resource.js.map +0 -1
- package/lib/statusProvider.d.ts +0 -8
- package/lib/statusProvider.d.ts.map +0 -1
- package/lib/statusProvider.js +0 -33
- package/lib/statusProvider.js.map +0 -1
- package/lib/unuse/apiPrefixMiddleware.d.ts +0 -3
- package/lib/unuse/apiPrefixMiddleware.d.ts.map +0 -1
- package/lib/unuse/apiPrefixMiddleware.js +0 -39
- package/lib/unuse/apiPrefixMiddleware.js.map +0 -1
- package/lib/unuse/fn.d.ts +0 -2
- package/lib/unuse/fn.d.ts.map +0 -1
- package/lib/unuse/fn.js +0 -18
- package/lib/unuse/fn.js.map +0 -1
- package/lib/unuse/useBalance.d.ts +0 -2
- package/lib/unuse/useBalance.d.ts.map +0 -1
- package/lib/unuse/useBalance.js +0 -29
- package/lib/unuse/useBalance.js.map +0 -1
- package/lib/unuse/useFetures.d.ts +0 -11
- package/lib/unuse/useFetures.d.ts.map +0 -1
- package/lib/unuse/useFetures.js +0 -56
- package/lib/unuse/useFetures.js.map +0 -1
- package/lib/unuse/useRunOnce.d.ts +0 -7
- package/lib/unuse/useRunOnce.d.ts.map +0 -1
- package/lib/unuse/useRunOnce.js +0 -71
- package/lib/unuse/useRunOnce.js.map +0 -1
- package/lib/unuse/useSyncEnd.d.ts +0 -2
- package/lib/unuse/useSyncEnd.d.ts.map +0 -1
- package/lib/unuse/useSyncEnd.js +0 -21
- package/lib/unuse/useSyncEnd.js.map +0 -1
- package/lib/unuse/useTokenInfo.d.ts +0 -7
- package/lib/unuse/useTokenInfo.d.ts.map +0 -1
- package/lib/unuse/useTokenInfo.js +0 -32
- package/lib/unuse/useTokenInfo.js.map +0 -1
- package/lib/unuse/useUnsettlementPnL.d.ts +0 -2
- package/lib/unuse/useUnsettlementPnL.d.ts.map +0 -1
- package/lib/unuse/useUnsettlementPnL.js +0 -34
- package/lib/unuse/useUnsettlementPnL.js.map +0 -1
- package/lib/useAccount.d.ts +0 -8
- package/lib/useAccount.d.ts.map +0 -1
- package/lib/useAccount.js +0 -66
- package/lib/useAccount.js.map +0 -1
- package/lib/useAccountInstance.d.ts +0 -3
- package/lib/useAccountInstance.d.ts.map +0 -1
- package/lib/useAccountInstance.js +0 -37
- package/lib/useAccountInstance.js.map +0 -1
- package/lib/useBoolean.d.ts +0 -6
- package/lib/useBoolean.d.ts.map +0 -1
- package/lib/useBoolean.js +0 -27
- package/lib/useBoolean.js.map +0 -1
- package/lib/useConfig.d.ts +0 -4
- package/lib/useConfig.d.ts.map +0 -1
- package/lib/useConfig.js +0 -24
- package/lib/useConfig.js.map +0 -1
- package/lib/useEventEmitter.d.ts +0 -3
- package/lib/useEventEmitter.d.ts.map +0 -1
- package/lib/useEventEmitter.js +0 -29
- package/lib/useEventEmitter.js.map +0 -1
- package/lib/useLazyQuery.d.ts +0 -13
- package/lib/useLazyQuery.d.ts.map +0 -1
- package/lib/useLazyQuery.js +0 -44
- package/lib/useLazyQuery.js.map +0 -1
- package/lib/useLocalStorage.d.ts +0 -2
- package/lib/useLocalStorage.d.ts.map +0 -1
- package/lib/useLocalStorage.js +0 -92
- package/lib/useLocalStorage.js.map +0 -1
- package/lib/useMediaQuery.d.ts +0 -2
- package/lib/useMediaQuery.d.ts.map +0 -1
- package/lib/useMediaQuery.js +0 -48
- package/lib/useMediaQuery.js.map +0 -1
- package/lib/useMutation.d.ts +0 -13
- package/lib/useMutation.d.ts.map +0 -1
- package/lib/useMutation.js +0 -94
- package/lib/useMutation.js.map +0 -1
- package/lib/useObserve.d.ts +0 -6
- package/lib/useObserve.d.ts.map +0 -1
- package/lib/useObserve.js +0 -26
- package/lib/useObserve.js.map +0 -1
- package/lib/useParamsCheck.d.ts +0 -4
- package/lib/useParamsCheck.d.ts.map +0 -1
- package/lib/useParamsCheck.js +0 -22
- package/lib/useParamsCheck.js.map +0 -1
- package/lib/usePoster.d.ts +0 -44
- package/lib/usePoster.d.ts.map +0 -1
- package/lib/usePoster.js +0 -138
- package/lib/usePoster.js.map +0 -1
- package/lib/usePreloadData.d.ts +0 -5
- package/lib/usePreloadData.d.ts.map +0 -1
- package/lib/usePreloadData.js +0 -48
- package/lib/usePreloadData.js.map +0 -1
- package/lib/usePrivateInfiniteQuery.d.ts +0 -5
- package/lib/usePrivateInfiniteQuery.d.ts.map +0 -1
- package/lib/usePrivateInfiniteQuery.js +0 -46
- package/lib/usePrivateInfiniteQuery.js.map +0 -1
- package/lib/usePrivateQuery.d.ts +0 -10
- package/lib/usePrivateQuery.d.ts.map +0 -1
- package/lib/usePrivateQuery.js +0 -43
- package/lib/usePrivateQuery.js.map +0 -1
- package/lib/useQuery.d.ts +0 -10
- package/lib/useQuery.d.ts.map +0 -1
- package/lib/useQuery.js +0 -31
- package/lib/useQuery.js.map +0 -1
- package/lib/useSessionStorage.d.ts +0 -2
- package/lib/useSessionStorage.d.ts.map +0 -1
- package/lib/useSessionStorage.js +0 -79
- package/lib/useSessionStorage.js.map +0 -1
- package/lib/useWS.d.ts +0 -3
- package/lib/useWS.d.ts.map +0 -1
- package/lib/useWS.js +0 -69
- package/lib/useWS.js.map +0 -1
- package/lib/useWsStatus.d.ts +0 -7
- package/lib/useWsStatus.d.ts.map +0 -1
- package/lib/useWsStatus.js +0 -59
- package/lib/useWsStatus.js.map +0 -1
- package/lib/utils/createGetter.d.ts +0 -11
- package/lib/utils/createGetter.d.ts.map +0 -1
- package/lib/utils/createGetter.js +0 -35
- package/lib/utils/createGetter.js.map +0 -1
- package/lib/utils/createOrder.d.ts +0 -2
- package/lib/utils/createOrder.d.ts.map +0 -1
- package/lib/utils/createOrder.js +0 -26
- package/lib/utils/createOrder.js.map +0 -1
- package/lib/utils/dev.d.ts +0 -2
- package/lib/utils/dev.d.ts.map +0 -1
- package/lib/utils/dev.js +0 -25
- package/lib/utils/dev.js.map +0 -1
- package/lib/utils/fetcher.d.ts +0 -6
- package/lib/utils/fetcher.d.ts.map +0 -1
- package/lib/utils/fetcher.js +0 -14
- package/lib/utils/fetcher.js.map +0 -1
- package/lib/utils/fokCreator.d.ts +0 -1
- package/lib/utils/fokCreator.d.ts.map +0 -1
- package/lib/utils/fokCreator.js +0 -3
- package/lib/utils/fokCreator.js.map +0 -1
- package/lib/utils/index.d.ts +0 -6
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -39
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/json.d.ts +0 -2
- package/lib/utils/json.d.ts.map +0 -1
- package/lib/utils/json.js +0 -19
- package/lib/utils/json.js.map +0 -1
- package/lib/utils/order.d.ts +0 -2
- package/lib/utils/order.d.ts.map +0 -1
- package/lib/utils/order.js +0 -6
- package/lib/utils/order.js.map +0 -1
- package/lib/utils/orderEntryHelper.d.ts +0 -26
- package/lib/utils/orderEntryHelper.d.ts.map +0 -1
- package/lib/utils/orderEntryHelper.js +0 -320
- package/lib/utils/orderEntryHelper.js.map +0 -1
- package/lib/utils/parseHolding.d.ts +0 -9
- package/lib/utils/parseHolding.d.ts.map +0 -1
- package/lib/utils/parseHolding.js +0 -35
- package/lib/utils/parseHolding.js.map +0 -1
- package/lib/utils/swr.d.ts +0 -12
- package/lib/utils/swr.d.ts.map +0 -1
- package/lib/utils/swr.js +0 -262
- package/lib/utils/swr.js.map +0 -1
- package/lib/utils/ws.d.ts +0 -2
- package/lib/utils/ws.d.ts.map +0 -1
- package/lib/utils/ws.js +0 -19
- package/lib/utils/ws.js.map +0 -1
- package/lib/version.d.ts +0 -10
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js +0 -17
- package/lib/version.js.map +0 -1
- package/lib/walletConnectorContext.d.ts +0 -31
- package/lib/walletConnectorContext.d.ts.map +0 -1
- package/lib/walletConnectorContext.js +0 -25
- package/lib/walletConnectorContext.js.map +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useAccountInstance", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useAccountInstance;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _useconstant = /*#__PURE__*/ _interop_require_default(require("use-constant"));
|
|
12
|
-
const _core = require("@orderly.network/core");
|
|
13
|
-
const _react = require("react");
|
|
14
|
-
const _orderlyContext = require("./orderlyContext");
|
|
15
|
-
function _interop_require_default(obj) {
|
|
16
|
-
return obj && obj.__esModule ? obj : {
|
|
17
|
-
default: obj
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const useAccountInstance = ()=>{
|
|
21
|
-
const { configStore, keyStore, getWalletAdapter } = (0, _react.useContext)(_orderlyContext.OrderlyContext);
|
|
22
|
-
if (!configStore) throw new Error("configStore is not defined, please use OrderlyProvider");
|
|
23
|
-
if (!keyStore) {
|
|
24
|
-
throw new Error("keyStore is not defined, please use OrderlyProvider and provide keyStore");
|
|
25
|
-
}
|
|
26
|
-
const account = (0, _useconstant.default)(()=>{
|
|
27
|
-
let account = _core.SimpleDI.get("account");
|
|
28
|
-
if (!account) {
|
|
29
|
-
account = new _core.Account(configStore, keyStore, getWalletAdapter);
|
|
30
|
-
_core.SimpleDI.registerByName("account", account);
|
|
31
|
-
}
|
|
32
|
-
return account;
|
|
33
|
-
});
|
|
34
|
-
return account;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=useAccountInstance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useAccountInstance.ts"],"sourcesContent":["import useConstant from \"use-constant\";\nimport { Account, SimpleDI } from \"@orderly.network/core\";\nimport { useContext } from \"react\";\nimport { OrderlyContext } from \"./orderlyContext\";\n\nexport const useAccountInstance = (): Account => {\n const { configStore, keyStore, getWalletAdapter } =\n useContext(OrderlyContext);\n\n if (!configStore)\n throw new Error(\"configStore is not defined, please use OrderlyProvider\");\n\n if (!keyStore) {\n throw new Error(\n \"keyStore is not defined, please use OrderlyProvider and provide keyStore\"\n );\n }\n\n const account = useConstant(() => {\n let account = SimpleDI.get<Account>(\"account\");\n\n if (!account) {\n account = new Account(\n configStore,\n keyStore,\n\n getWalletAdapter\n // walletAdapter\n );\n\n SimpleDI.registerByName(\"account\", account);\n }\n return account;\n });\n\n return account;\n};\n"],"names":["useAccountInstance","configStore","keyStore","getWalletAdapter","useContext","OrderlyContext","Error","account","useConstant","SimpleDI","get","Account","registerByName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAKaA;;;eAAAA;;;oEALW;sBACU;uBACP;gCACI;;;;;;AAExB,MAAMA,qBAAqB;IAChC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,gBAAgB,EAAE,GAC/CC,IAAAA,iBAAU,EAACC,8BAAc;IAE3B,IAAI,CAACJ,aACH,MAAM,IAAIK,MAAM;IAElB,IAAI,CAACJ,UAAU;QACb,MAAM,IAAII,MACR;IAEJ;IAEA,MAAMC,UAAUC,IAAAA,oBAAW,EAAC;QAC1B,IAAID,UAAUE,cAAQ,CAACC,GAAG,CAAU;QAEpC,IAAI,CAACH,SAAS;YACZA,UAAU,IAAII,aAAO,CACnBV,aACAC,UAEAC;YAIFM,cAAQ,CAACG,cAAc,CAAC,WAAWL;QACrC;QACA,OAAOA;IACT;IAEA,OAAOA;AACT"}
|
package/lib/useBoolean.d.ts
DELETED
package/lib/useBoolean.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBoolean.d.ts","sourceRoot":"","sources":["../src/useBoolean.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;aAKV,MAAM,IAAI;cACT,MAAM,IAAI;YACZ,MAAM,IAAI;EAQrB,CAAC"}
|
package/lib/useBoolean.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useBoolean", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useBoolean;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _react = require("react");
|
|
12
|
-
const useBoolean = (initialValue = false)=>{
|
|
13
|
-
const [value, setValue] = (0, _react.useState)(initialValue);
|
|
14
|
-
const setTrue = (0, _react.useCallback)(()=>setValue(true), []);
|
|
15
|
-
const setFalse = (0, _react.useCallback)(()=>setValue(false), []);
|
|
16
|
-
const toggle = (0, _react.useCallback)(()=>setValue((v)=>!v), []);
|
|
17
|
-
return [
|
|
18
|
-
value,
|
|
19
|
-
{
|
|
20
|
-
setTrue,
|
|
21
|
-
setFalse,
|
|
22
|
-
toggle
|
|
23
|
-
}
|
|
24
|
-
];
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=useBoolean.js.map
|
package/lib/useBoolean.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useBoolean.ts"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\nexport const useBoolean = (\n initialValue = false\n): [\n boolean,\n {\n setTrue: () => void;\n setFalse: () => void;\n toggle: () => void;\n }\n] => {\n const [value, setValue] = useState(initialValue);\n const setTrue = useCallback(() => setValue(true), []);\n const setFalse = useCallback(() => setValue(false), []);\n const toggle = useCallback(() => setValue((v) => !v), []);\n return [value, { setTrue, setFalse, toggle }];\n};\n"],"names":["useBoolean","initialValue","value","setValue","useState","setTrue","useCallback","setFalse","toggle","v"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEaA;;;eAAAA;;;uBAFyB;AAE/B,MAAMA,aAAa,CACxBC,eAAe,KAAK;IASpB,MAAM,CAACC,OAAOC,SAAS,GAAGC,IAAAA,eAAQ,EAACH;IACnC,MAAMI,UAAUC,IAAAA,kBAAW,EAAC,IAAMH,SAAS,OAAO,EAAE;IACpD,MAAMI,WAAWD,IAAAA,kBAAW,EAAC,IAAMH,SAAS,QAAQ,EAAE;IACtD,MAAMK,SAASF,IAAAA,kBAAW,EAAC,IAAMH,SAAS,CAACM,IAAM,CAACA,IAAI,EAAE;IACxD,OAAO;QAACP;QAAO;YAAEG;YAASE;YAAUC;QAAO;KAAE;AAC/C"}
|
package/lib/useConfig.d.ts
DELETED
package/lib/useConfig.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../src/useConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEpE,wBAAgB,SAAS,IAAI,WAAW,CAAC;AACzC,wBAAgB,SAAS,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC"}
|
package/lib/useConfig.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useConfig", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useConfig;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _react = require("react");
|
|
12
|
-
const _orderlyContext = require("./orderlyContext");
|
|
13
|
-
function useConfig(key, defaultValue) {
|
|
14
|
-
const { configStore } = (0, _react.useContext)(_orderlyContext.OrderlyContext);
|
|
15
|
-
if (typeof key !== "undefined") {
|
|
16
|
-
if (typeof defaultValue !== "undefined") {
|
|
17
|
-
return configStore.getOr(key, defaultValue);
|
|
18
|
-
}
|
|
19
|
-
return configStore.get(key);
|
|
20
|
-
}
|
|
21
|
-
return configStore;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=useConfig.js.map
|
package/lib/useConfig.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useConfig.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport { OrderlyContext } from \"./orderlyContext\";\nimport { ConfigStore, type ConfigKey } from \"@orderly.network/core\";\n\nexport function useConfig(): ConfigStore;\nexport function useConfig<T = string>(key: ConfigKey, defaultValue?: T): T;\n\nexport function useConfig(key?: ConfigKey, defaultValue?: any) {\n const { configStore } = useContext(OrderlyContext);\n\n if (typeof key !== \"undefined\") {\n if (typeof defaultValue !== \"undefined\") {\n return configStore.getOr(key, defaultValue) as any;\n }\n return configStore.get(key);\n }\n\n return configStore;\n}\n"],"names":["useConfig","key","defaultValue","configStore","useContext","OrderlyContext","getOr","get"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOgBA;;;eAAAA;;;uBAPW;gCACI;AAMxB,SAASA,UAAUC,GAAe,EAAEC,YAAkB;IAC3D,MAAM,EAAEC,WAAW,EAAE,GAAGC,IAAAA,iBAAU,EAACC,8BAAc;IAEjD,IAAI,OAAOJ,QAAQ,aAAa;QAC9B,IAAI,OAAOC,iBAAiB,aAAa;YACvC,OAAOC,YAAYG,KAAK,CAACL,KAAKC;QAChC;QACA,OAAOC,YAAYI,GAAG,CAACN;IACzB;IAEA,OAAOE;AACT"}
|
package/lib/useEventEmitter.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useEventEmitter.d.ts","sourceRoot":"","sources":["../src/useEventEmitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAY,MAAM,uBAAuB,CAAC;AAE/D,eAAO,MAAM,eAAe,0CAW3B,CAAC"}
|
package/lib/useEventEmitter.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useEventEmitter", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useEventEmitter;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _useconstant = /*#__PURE__*/ _interop_require_default(require("use-constant"));
|
|
12
|
-
const _core = require("@orderly.network/core");
|
|
13
|
-
function _interop_require_default(obj) {
|
|
14
|
-
return obj && obj.__esModule ? obj : {
|
|
15
|
-
default: obj
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const useEventEmitter = ()=>{
|
|
19
|
-
return (0, _useconstant.default)(()=>{
|
|
20
|
-
let ee = _core.SimpleDI.get("EE");
|
|
21
|
-
if (!ee) {
|
|
22
|
-
ee = new _core.EventEmitter();
|
|
23
|
-
_core.SimpleDI.registerByName("EE", ee);
|
|
24
|
-
}
|
|
25
|
-
return ee;
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=useEventEmitter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useEventEmitter.ts"],"sourcesContent":["import useConstant from \"use-constant\";\nimport { EventEmitter, SimpleDI } from \"@orderly.network/core\";\n\nexport const useEventEmitter = () => {\n return useConstant(() => {\n let ee = SimpleDI.get<EventEmitter>(\"EE\");\n\n if (!ee) {\n ee = new EventEmitter();\n\n SimpleDI.registerByName(\"EE\", ee);\n }\n return ee;\n });\n};\n"],"names":["useEventEmitter","useConstant","ee","SimpleDI","get","EventEmitter","registerByName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGaA;;;eAAAA;;;oEAHW;sBACe;;;;;;AAEhC,MAAMA,kBAAkB;IAC7B,OAAOC,IAAAA,oBAAW,EAAC;QACjB,IAAIC,KAAKC,cAAQ,CAACC,GAAG,CAAe;QAEpC,IAAI,CAACF,IAAI;YACPA,KAAK,IAAIG,kBAAY;YAErBF,cAAQ,CAACG,cAAc,CAAC,MAAMJ;QAChC;QACA,OAAOA;IACT;AACF"}
|
package/lib/useLazyQuery.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import useSWR from "swr";
|
|
2
|
-
import { type SWRMutationConfiguration, SWRMutationResponse } from "swr/mutation";
|
|
3
|
-
/**
|
|
4
|
-
* useQuery
|
|
5
|
-
* @description for public api
|
|
6
|
-
* @param query
|
|
7
|
-
* @param options
|
|
8
|
-
*/
|
|
9
|
-
export declare const useLazyQuery: <T, R = any>(query: Parameters<typeof useSWR>["0"], options?: (SWRMutationConfiguration<any, any> & {
|
|
10
|
-
formatter?: ((data: any) => R) | undefined;
|
|
11
|
-
init?: RequestInit | undefined;
|
|
12
|
-
}) | undefined) => SWRMutationResponse;
|
|
13
|
-
//# sourceMappingURL=useLazyQuery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLazyQuery.d.ts","sourceRoot":"","sources":["../src/useLazyQuery.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,KAAK,CAAC;AAEzB,OAAuB,EACrB,KAAK,wBAAwB,EAC7B,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAGtB;;;;;GAKG;AACH,eAAO,MAAM,YAAY,sBAChB,WAAW,aAAa,CAAC,CAAC,GAAG,CAAC;wBAEhB,GAAG;;mBAGvB,mBAiCF,CAAC"}
|
package/lib/useLazyQuery.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useLazyQuery", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useLazyQuery;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _fetcher = require("./utils/fetcher");
|
|
12
|
-
const _mutation = /*#__PURE__*/ _interop_require_default(require("swr/mutation"));
|
|
13
|
-
const _useConfig = require("./useConfig");
|
|
14
|
-
function _interop_require_default(obj) {
|
|
15
|
-
return obj && obj.__esModule ? obj : {
|
|
16
|
-
default: obj
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
const useLazyQuery = (query, options)=>{
|
|
20
|
-
const apiBaseUrl = (0, _useConfig.useConfig)("apiBaseUrl");
|
|
21
|
-
const { formatter, init, ...swrOptions } = options || {};
|
|
22
|
-
// check the query is public api
|
|
23
|
-
// if (typeof query === "string" && !query.startsWith("/v1/public")) {
|
|
24
|
-
// throw new Error("useQuery is only for public api");
|
|
25
|
-
// }
|
|
26
|
-
if (typeof apiBaseUrl === "undefined") {
|
|
27
|
-
throw new Error("please add OrderlyConfigProvider to your app");
|
|
28
|
-
}
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
return (0, _mutation.default)(query, (url, options)=>{
|
|
31
|
-
url = url.startsWith("http") ? url : `${apiBaseUrl}${url}`;
|
|
32
|
-
if (options?.arg) {
|
|
33
|
-
// const searchParams = new URLSearchParams(init.arg);
|
|
34
|
-
// url = `${url}?${encodeURIComponent(searchParams.toString())}`;
|
|
35
|
-
const queryString = Object.entries(options.arg).map(([key, value])=>`${key}=${encodeURIComponent(value)}`).join("&");
|
|
36
|
-
url = `${url}?${queryString}`;
|
|
37
|
-
}
|
|
38
|
-
return (0, _fetcher.fetcher)(url, init, {
|
|
39
|
-
formatter
|
|
40
|
-
});
|
|
41
|
-
}, swrOptions);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=useLazyQuery.js.map
|
package/lib/useLazyQuery.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useLazyQuery.ts"],"sourcesContent":["import useSWR from \"swr\";\nimport { fetcher } from \"./utils/fetcher\";\nimport useSWRMutation, {\n type SWRMutationConfiguration,\n SWRMutationResponse,\n} from \"swr/mutation\";\nimport { useConfig } from \"./useConfig\";\n\n/**\n * useQuery\n * @description for public api\n * @param query\n * @param options\n */\nexport const useLazyQuery = <T, R = any>(\n query: Parameters<typeof useSWR>[\"0\"],\n options?: SWRMutationConfiguration<any, any> & {\n formatter?: (data: any) => R;\n init?: RequestInit;\n }\n): SWRMutationResponse => {\n const apiBaseUrl = useConfig(\"apiBaseUrl\");\n const { formatter, init, ...swrOptions } = options || {};\n // check the query is public api\n // if (typeof query === \"string\" && !query.startsWith(\"/v1/public\")) {\n // throw new Error(\"useQuery is only for public api\");\n // }\n\n if (typeof apiBaseUrl === \"undefined\") {\n throw new Error(\"please add OrderlyConfigProvider to your app\");\n }\n\n // @ts-ignore\n return useSWRMutation(\n query,\n (url: string, options: any) => {\n url = url.startsWith(\"http\") ? url : `${apiBaseUrl}${url}`;\n if (options?.arg) {\n // const searchParams = new URLSearchParams(init.arg);\n // url = `${url}?${encodeURIComponent(searchParams.toString())}`;\n const queryString = Object.entries(options.arg)\n .map(\n ([key, value]) => `${key}=${encodeURIComponent(value as string)}`\n )\n .join(\"&\");\n url = `${url}?${queryString}`;\n }\n return fetcher(url, init, {\n formatter,\n });\n },\n swrOptions\n );\n};\n"],"names":["useLazyQuery","query","options","apiBaseUrl","useConfig","formatter","init","swrOptions","Error","useSWRMutation","url","startsWith","arg","queryString","Object","entries","map","key","value","encodeURIComponent","join","fetcher"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;yBAbW;iEAIjB;2BACmB;;;;;;AAQnB,MAAMA,eAAe,CAC1BC,OACAC;IAKA,MAAMC,aAAaC,IAAAA,oBAAS,EAAC;IAC7B,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAE,GAAGC,YAAY,GAAGL,WAAW,CAAC;IACvD,gCAAgC;IAChC,sEAAsE;IACtE,wDAAwD;IACxD,IAAI;IAEJ,IAAI,OAAOC,eAAe,aAAa;QACrC,MAAM,IAAIK,MAAM;IAClB;IAEA,aAAa;IACb,OAAOC,IAAAA,iBAAc,EACnBR,OACA,CAACS,KAAaR;QACZQ,MAAMA,IAAIC,UAAU,CAAC,UAAUD,MAAM,CAAC,EAAEP,WAAW,EAAEO,IAAI,CAAC;QAC1D,IAAIR,SAASU,KAAK;YAChB,sDAAsD;YACtD,iEAAiE;YACjE,MAAMC,cAAcC,OAAOC,OAAO,CAACb,QAAQU,GAAG,EAC3CI,GAAG,CACF,CAAC,CAACC,KAAKC,MAAM,GAAK,CAAC,EAAED,IAAI,CAAC,EAAEE,mBAAmBD,OAAiB,CAAC,EAElEE,IAAI,CAAC;YACRV,MAAM,CAAC,EAAEA,IAAI,CAAC,EAAEG,YAAY,CAAC;QAC/B;QACA,OAAOQ,IAAAA,gBAAO,EAACX,KAAKJ,MAAM;YACxBD;QACF;IACF,GACAE;AAEJ"}
|
package/lib/useLocalStorage.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../src/useLocalStorage.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,GACd,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAoF3B"}
|
package/lib/useLocalStorage.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// https://usehooks-ts.com/react-hook/use-local-storage
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "useLocalStorage", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return useLocalStorage;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _react = require("react");
|
|
13
|
-
const _json = require("./utils/json");
|
|
14
|
-
function useLocalStorage(key, initialValue) {
|
|
15
|
-
// Get from local storage then
|
|
16
|
-
// parse stored json or return initialValue
|
|
17
|
-
const readValue = (0, _react.useCallback)(()=>{
|
|
18
|
-
// Prevent build error "window is undefined" but keeps working
|
|
19
|
-
if (typeof window === "undefined") {
|
|
20
|
-
return initialValue;
|
|
21
|
-
}
|
|
22
|
-
try {
|
|
23
|
-
const item = window.localStorage.getItem(key);
|
|
24
|
-
return item ? (0, _json.parseJSON)(item) : initialValue;
|
|
25
|
-
} catch (error) {
|
|
26
|
-
;
|
|
27
|
-
return initialValue;
|
|
28
|
-
}
|
|
29
|
-
}, [
|
|
30
|
-
initialValue,
|
|
31
|
-
key
|
|
32
|
-
]);
|
|
33
|
-
// State to store our value
|
|
34
|
-
// Pass initial state function to useState so logic is only executed once
|
|
35
|
-
const [storedValue, setStoredValue] = (0, _react.useState)(readValue);
|
|
36
|
-
// Return a wrapped version of useState's setter function that ...
|
|
37
|
-
// ... persists the new value to localStorage.
|
|
38
|
-
const setValue = (0, _react.useCallback)((value)=>{
|
|
39
|
-
// Prevent build error "window is undefined" but keeps working
|
|
40
|
-
if (typeof window === "undefined") {
|
|
41
|
-
;
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
// Allow value to be a function so we have the same API as useState
|
|
45
|
-
const newValue = value instanceof Function ? value(storedValue) : value;
|
|
46
|
-
// Save to local storage
|
|
47
|
-
window.localStorage.setItem(key, JSON.stringify(newValue));
|
|
48
|
-
// dispath event
|
|
49
|
-
window.dispatchEvent(new Event("storage"));
|
|
50
|
-
// Save state
|
|
51
|
-
setStoredValue(()=>newValue);
|
|
52
|
-
// We dispatch a custom event so every useLocalStorage hook are notified
|
|
53
|
-
// window.dispatchEvent(new Event('local-storage'))
|
|
54
|
-
} catch (error) {
|
|
55
|
-
;
|
|
56
|
-
}
|
|
57
|
-
}, [
|
|
58
|
-
storedValue
|
|
59
|
-
]);
|
|
60
|
-
(0, _react.useEffect)(()=>{
|
|
61
|
-
setStoredValue(readValue());
|
|
62
|
-
}, []);
|
|
63
|
-
// const handleStorageChange = useCallback(
|
|
64
|
-
// (event: StorageEvent | CustomEvent) => {
|
|
65
|
-
// if ((event as StorageEvent)?.key && (event as StorageEvent).key !== key) {
|
|
66
|
-
// return
|
|
67
|
-
// }
|
|
68
|
-
// setStoredValue(readValue())
|
|
69
|
-
// },
|
|
70
|
-
// [key, readValue],
|
|
71
|
-
// )
|
|
72
|
-
(0, _react.useEffect)(()=>{
|
|
73
|
-
const handleStorageChange = (event)=>{
|
|
74
|
-
if (event?.key && event.key !== key) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
setStoredValue(readValue());
|
|
78
|
-
};
|
|
79
|
-
window?.addEventListener?.("storage", handleStorageChange);
|
|
80
|
-
return ()=>{
|
|
81
|
-
window?.removeEventListener?.("storage", handleStorageChange);
|
|
82
|
-
};
|
|
83
|
-
}, [
|
|
84
|
-
key
|
|
85
|
-
]);
|
|
86
|
-
return [
|
|
87
|
-
storedValue,
|
|
88
|
-
setValue
|
|
89
|
-
];
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
//# sourceMappingURL=useLocalStorage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useLocalStorage.ts"],"sourcesContent":["// https://usehooks-ts.com/react-hook/use-local-storage\nimport { useCallback, useEffect, useState } from \"react\";\nimport { parseJSON } from \"./utils/json\";\n\nexport function useLocalStorage<T>(\n key: string,\n initialValue: T\n): [any, (value: T) => void] {\n // Get from local storage then\n // parse stored json or return initialValue\n const readValue = useCallback((): T => {\n // Prevent build error \"window is undefined\" but keeps working\n if (typeof window === \"undefined\") {\n return initialValue;\n }\n\n try {\n const item = window.localStorage.getItem(key);\n return item ? (parseJSON(item) as T) : initialValue;\n } catch (error) {\n console.warn(`Error reading localStorage key “${key}”:`, error);\n return initialValue;\n }\n }, [initialValue, key]);\n\n // State to store our value\n // Pass initial state function to useState so logic is only executed once\n const [storedValue, setStoredValue] = useState<T>(readValue);\n\n // Return a wrapped version of useState's setter function that ...\n // ... persists the new value to localStorage.\n const setValue: React.Dispatch<T> = useCallback(\n (value: T) => {\n // Prevent build error \"window is undefined\" but keeps working\n if (typeof window === \"undefined\") {\n console.warn(\n `Tried setting localStorage key “${key}” even though environment is not a client`\n );\n }\n\n try {\n // Allow value to be a function so we have the same API as useState\n const newValue = value instanceof Function ? value(storedValue) : value;\n\n // Save to local storage\n window.localStorage.setItem(key, JSON.stringify(newValue));\n // dispath event\n window.dispatchEvent(new Event(\"storage\"));\n\n // Save state\n setStoredValue(() => newValue);\n\n // We dispatch a custom event so every useLocalStorage hook are notified\n // window.dispatchEvent(new Event('local-storage'))\n } catch (error) {\n console.warn(`Error setting localStorage key “${key}”:`, error);\n }\n },\n [storedValue]\n );\n\n useEffect(() => {\n setStoredValue(readValue());\n }, []);\n\n // const handleStorageChange = useCallback(\n // (event: StorageEvent | CustomEvent) => {\n // if ((event as StorageEvent)?.key && (event as StorageEvent).key !== key) {\n // return\n // }\n // setStoredValue(readValue())\n // },\n // [key, readValue],\n // )\n\n useEffect(() => {\n const handleStorageChange = (event: StorageEvent | CustomEvent) => {\n if ((event as StorageEvent)?.key && (event as StorageEvent).key !== key) {\n return;\n }\n setStoredValue(readValue());\n };\n\n window?.addEventListener?.(\"storage\", handleStorageChange);\n\n return () => {\n window?.removeEventListener?.(\"storage\", handleStorageChange);\n };\n }, [key]);\n\n return [storedValue, setValue];\n}\n"],"names":["useLocalStorage","key","initialValue","readValue","useCallback","window","item","localStorage","getItem","parseJSON","error","storedValue","setStoredValue","useState","setValue","value","newValue","Function","setItem","JSON","stringify","dispatchEvent","Event","useEffect","handleStorageChange","event","addEventListener","removeEventListener"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,uDAAuD;;;;;+BAIvCA;;;eAAAA;;;uBAHiC;sBACvB;AAEnB,SAASA,gBACdC,GAAW,EACXC,YAAe;IAEf,8BAA8B;IAC9B,2CAA2C;IAC3C,MAAMC,YAAYC,IAAAA,kBAAW,EAAC;QAC5B,8DAA8D;QAC9D,IAAI,OAAOC,WAAW,aAAa;YACjC,OAAOH;QACT;QAEA,IAAI;YACF,MAAMI,OAAOD,OAAOE,YAAY,CAACC,OAAO,CAACP;YACzC,OAAOK,OAAQG,IAAAA,eAAS,EAACH,QAAcJ;QACzC,EAAE,OAAOQ,OAAO;;YAEd,OAAOR;QACT;IACF,GAAG;QAACA;QAAcD;KAAI;IAEtB,2BAA2B;IAC3B,yEAAyE;IACzE,MAAM,CAACU,aAAaC,eAAe,GAAGC,IAAAA,eAAQ,EAAIV;IAElD,kEAAkE;IAClE,8CAA8C;IAC9C,MAAMW,WAA8BV,IAAAA,kBAAW,EAC7C,CAACW;QACC,8DAA8D;QAC9D,IAAI,OAAOV,WAAW,aAAa;;QAInC;QAEA,IAAI;YACF,mEAAmE;YACnE,MAAMW,WAAWD,iBAAiBE,WAAWF,MAAMJ,eAAeI;YAElE,wBAAwB;YACxBV,OAAOE,YAAY,CAACW,OAAO,CAACjB,KAAKkB,KAAKC,SAAS,CAACJ;YAChD,gBAAgB;YAChBX,OAAOgB,aAAa,CAAC,IAAIC,MAAM;YAE/B,aAAa;YACbV,eAAe,IAAMI;QAErB,wEAAwE;QACxE,mDAAmD;QACrD,EAAE,OAAON,OAAO;;QAEhB;IACF,GACA;QAACC;KAAY;IAGfY,IAAAA,gBAAS,EAAC;QACRX,eAAeT;IACjB,GAAG,EAAE;IAEL,2CAA2C;IAC3C,6CAA6C;IAC7C,iFAAiF;IACjF,eAAe;IACf,QAAQ;IACR,kCAAkC;IAClC,OAAO;IACP,sBAAsB;IACtB,IAAI;IAEJoB,IAAAA,gBAAS,EAAC;QACR,MAAMC,sBAAsB,CAACC;YAC3B,IAAI,AAACA,OAAwBxB,OAAO,AAACwB,MAAuBxB,GAAG,KAAKA,KAAK;gBACvE;YACF;YACAW,eAAeT;QACjB;QAEAE,QAAQqB,mBAAmB,WAAWF;QAEtC,OAAO;YACLnB,QAAQsB,sBAAsB,WAAWH;QAC3C;IACF,GAAG;QAACvB;KAAI;IAER,OAAO;QAACU;QAAaG;KAAS;AAChC"}
|
package/lib/useMediaQuery.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../src/useMediaQuery.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAuCpD"}
|
package/lib/useMediaQuery.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useMediaQuery", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useMediaQuery;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _react = require("react");
|
|
12
|
-
function useMediaQuery(query) {
|
|
13
|
-
const getMatches = (query)=>{
|
|
14
|
-
// Prevents SSR issues
|
|
15
|
-
if (typeof window !== "undefined") {
|
|
16
|
-
return window.matchMedia(query).matches;
|
|
17
|
-
}
|
|
18
|
-
return false;
|
|
19
|
-
};
|
|
20
|
-
const [matches, setMatches] = (0, _react.useState)(getMatches(query));
|
|
21
|
-
function handleChange() {
|
|
22
|
-
setMatches(getMatches(query));
|
|
23
|
-
}
|
|
24
|
-
(0, _react.useEffect)(()=>{
|
|
25
|
-
const matchMedia = window?.matchMedia(query);
|
|
26
|
-
// Triggered at the first client-side load and if query changes
|
|
27
|
-
handleChange();
|
|
28
|
-
// Listen matchMedia
|
|
29
|
-
if (matchMedia?.addListener) {
|
|
30
|
-
matchMedia?.addListener(handleChange);
|
|
31
|
-
} else {
|
|
32
|
-
matchMedia?.addEventListener?.("change", handleChange);
|
|
33
|
-
}
|
|
34
|
-
return ()=>{
|
|
35
|
-
if (matchMedia?.removeListener) {
|
|
36
|
-
matchMedia?.removeListener(handleChange);
|
|
37
|
-
} else {
|
|
38
|
-
matchMedia?.removeEventListener?.("change", handleChange);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
|
-
}, [
|
|
43
|
-
query
|
|
44
|
-
]);
|
|
45
|
-
return matches;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//# sourceMappingURL=useMediaQuery.js.map
|
package/lib/useMediaQuery.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useMediaQuery.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nexport function useMediaQuery(query: string): boolean {\n const getMatches = (query: string): boolean => {\n // Prevents SSR issues\n if (typeof window !== \"undefined\") {\n return window.matchMedia(query).matches;\n }\n return false;\n };\n\n const [matches, setMatches] = useState<boolean>(getMatches(query));\n\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useEffect(() => {\n const matchMedia = window?.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n // Listen matchMedia\n if (matchMedia?.addListener) {\n matchMedia?.addListener(handleChange);\n } else {\n matchMedia?.addEventListener?.(\"change\", handleChange);\n }\n\n return () => {\n if (matchMedia?.removeListener) {\n matchMedia?.removeListener(handleChange);\n } else {\n matchMedia?.removeEventListener?.(\"change\", handleChange);\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [query]);\n\n return matches;\n}\n"],"names":["useMediaQuery","query","getMatches","window","matchMedia","matches","setMatches","useState","handleChange","useEffect","addListener","addEventListener","removeListener","removeEventListener"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;uBAFoB;AAE7B,SAASA,cAAcC,KAAa;IACzC,MAAMC,aAAa,CAACD;QAClB,sBAAsB;QACtB,IAAI,OAAOE,WAAW,aAAa;YACjC,OAAOA,OAAOC,UAAU,CAACH,OAAOI,OAAO;QACzC;QACA,OAAO;IACT;IAEA,MAAM,CAACA,SAASC,WAAW,GAAGC,IAAAA,eAAQ,EAAUL,WAAWD;IAE3D,SAASO;QACPF,WAAWJ,WAAWD;IACxB;IAEAQ,IAAAA,gBAAS,EAAC;QACR,MAAML,aAAaD,QAAQC,WAAWH;QAEtC,+DAA+D;QAC/DO;QAEA,oBAAoB;QACpB,IAAIJ,YAAYM,aAAa;YAC3BN,YAAYM,YAAYF;QAC1B,OAAO;YACLJ,YAAYO,mBAAmB,UAAUH;QAC3C;QAEA,OAAO;YACL,IAAIJ,YAAYQ,gBAAgB;gBAC9BR,YAAYQ,eAAeJ;YAC7B,OAAO;gBACLJ,YAAYS,sBAAsB,UAAUL;YAC9C;QACF;IACA,uDAAuD;IACzD,GAAG;QAACP;KAAM;IAEV,OAAOI;AACT"}
|
package/lib/useMutation.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type SWRMutationConfiguration } from "swr/mutation";
|
|
2
|
-
type HTTP_METHOD = "POST" | "PUT" | "DELETE";
|
|
3
|
-
/**
|
|
4
|
-
* This hook is used to execute API requests for data mutation, such as POST, DELETE, PUT, etc.
|
|
5
|
-
*/
|
|
6
|
-
export declare const useMutation: <T, E>(url: string, method?: HTTP_METHOD, options?: SWRMutationConfiguration<T, E> | undefined) => readonly [(data: Record<string, any> | null, params?: Record<string, any>, options?: SWRMutationConfiguration<T, E> | undefined) => Promise<any>, {
|
|
7
|
-
readonly data: any;
|
|
8
|
-
readonly error: E | undefined;
|
|
9
|
-
readonly reset: () => void;
|
|
10
|
-
readonly isMutating: boolean;
|
|
11
|
-
}];
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=useMutation.d.ts.map
|
package/lib/useMutation.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMutation.d.ts","sourceRoot":"","sources":["../src/useMutation.ts"],"names":[],"mappings":"AAAA,OAAuB,EAErB,KAAK,wBAAwB,EAE9B,MAAM,cAAc,CAAC;AAUtB,KAAK,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAmC7C;;GAEG;AACH,eAAO,MAAM,WAAW,cAKjB,MAAM,WAIH,WAAW,4EA6BX,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,WAIvB,OAAO,MAAM,EAAE,GAAG,CAAC,2DAE3B,QAAQ,GAAG,CAAC;;;;;EAsChB,CAAC"}
|
package/lib/useMutation.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useMutation", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useMutation;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _mutation = /*#__PURE__*/ _interop_require_default(require("swr/mutation"));
|
|
12
|
-
const _net = require("@orderly.network/net");
|
|
13
|
-
const _useAccountInstance = require("./useAccountInstance");
|
|
14
|
-
const _useConfig = require("./useConfig");
|
|
15
|
-
const _utils = require("@orderly.network/utils");
|
|
16
|
-
function _interop_require_default(obj) {
|
|
17
|
-
return obj && obj.__esModule ? obj : {
|
|
18
|
-
default: obj
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
const fetcher = (url, options)=>{
|
|
22
|
-
const init = {
|
|
23
|
-
method: options.arg.method,
|
|
24
|
-
headers: {
|
|
25
|
-
...options.arg.signature
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
if (options.arg.data) {
|
|
29
|
-
init.body = JSON.stringify(options.arg.data);
|
|
30
|
-
}
|
|
31
|
-
if (typeof options.arg.params === "object" && Object.keys(options.arg.params).length) {
|
|
32
|
-
let search = new URLSearchParams(options.arg.params);
|
|
33
|
-
url = `${url}?${search.toString()}`;
|
|
34
|
-
}
|
|
35
|
-
return (0, _net.mutate)(url, init);
|
|
36
|
-
};
|
|
37
|
-
const useMutation = (/**
|
|
38
|
-
* The URL to send the request to. If the URL does not start with "http",
|
|
39
|
-
* it will be prefixed with the API base URL.
|
|
40
|
-
*/ url, /**
|
|
41
|
-
* The HTTP method to use for the request. Defaults to "POST".
|
|
42
|
-
*/ method = "POST", /**
|
|
43
|
-
* The configuration object for the mutation.
|
|
44
|
-
* @see [useSWRMutation](https://swr.vercel.app/docs/mutation#api)
|
|
45
|
-
*
|
|
46
|
-
* @link https://swr.vercel.app/docs/mutation#api
|
|
47
|
-
*/ options)=>{
|
|
48
|
-
const apiBaseUrl = (0, _useConfig.useConfig)("apiBaseUrl");
|
|
49
|
-
let fullUrl = url;
|
|
50
|
-
if (!url.startsWith("http")) {
|
|
51
|
-
fullUrl = `${apiBaseUrl}${url}`;
|
|
52
|
-
}
|
|
53
|
-
const account = (0, _useAccountInstance.useAccountInstance)();
|
|
54
|
-
const signer = account.signer;
|
|
55
|
-
const { trigger, data, error, reset, isMutating } = (0, _mutation.default)(fullUrl, // method === "POST" ? fetcher : deleteFetcher,
|
|
56
|
-
fetcher, options);
|
|
57
|
-
const mutation = async (/**
|
|
58
|
-
* The data to send with the request.
|
|
59
|
-
*/ data, /**
|
|
60
|
-
* The query parameters to send with the request.
|
|
61
|
-
*/ params, options)=>{
|
|
62
|
-
let newUrl = url;
|
|
63
|
-
if (typeof params === "object" && Object.keys(params).length) {
|
|
64
|
-
let search = new URLSearchParams(params);
|
|
65
|
-
newUrl = `${url}?${search.toString()}`;
|
|
66
|
-
}
|
|
67
|
-
const payload = {
|
|
68
|
-
method,
|
|
69
|
-
url: newUrl,
|
|
70
|
-
data
|
|
71
|
-
};
|
|
72
|
-
const signature = await signer.sign(payload, (0, _utils.getTimestamp)());
|
|
73
|
-
return trigger({
|
|
74
|
-
data,
|
|
75
|
-
params,
|
|
76
|
-
method,
|
|
77
|
-
signature: {
|
|
78
|
-
...signature,
|
|
79
|
-
"orderly-account-id": account.accountId
|
|
80
|
-
}
|
|
81
|
-
}, options);
|
|
82
|
-
};
|
|
83
|
-
return [
|
|
84
|
-
mutation,
|
|
85
|
-
{
|
|
86
|
-
data,
|
|
87
|
-
error,
|
|
88
|
-
reset,
|
|
89
|
-
isMutating
|
|
90
|
-
}
|
|
91
|
-
];
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
//# sourceMappingURL=useMutation.js.map
|
package/lib/useMutation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useMutation.ts"],"sourcesContent":["import useSWRMutation, {\n TriggerWithOptionsArgs,\n type SWRMutationConfiguration,\n TriggerWithoutArgs,\n} from \"swr/mutation\";\nimport { mutate } from \"@orderly.network/net\";\nimport {\n type MessageFactor,\n type SignedMessagePayload,\n} from \"@orderly.network/core\";\nimport { useAccountInstance } from \"./useAccountInstance\";\nimport { useConfig } from \"./useConfig\";\nimport { getTimestamp } from \"@orderly.network/utils\";\n\ntype HTTP_METHOD = \"POST\" | \"PUT\" | \"DELETE\";\n\nconst fetcher = (\n url: string,\n options: {\n arg: {\n data?: any;\n params?: any;\n method: HTTP_METHOD;\n signature: SignedMessagePayload;\n };\n }\n) => {\n const init: RequestInit = {\n method: options.arg.method,\n headers: {\n ...options.arg.signature,\n },\n };\n\n if (options.arg.data) {\n init.body = JSON.stringify(options.arg.data);\n }\n\n if (\n typeof options.arg.params === \"object\" &&\n Object.keys(options.arg.params).length\n ) {\n let search = new URLSearchParams(options.arg.params);\n url = `${url}?${search.toString()}`;\n }\n\n return mutate(url, init);\n};\n\n/**\n * This hook is used to execute API requests for data mutation, such as POST, DELETE, PUT, etc.\n */\nexport const useMutation = <T, E>(\n /**\n * The URL to send the request to. If the URL does not start with \"http\",\n * it will be prefixed with the API base URL.\n */\n url: string,\n /**\n * The HTTP method to use for the request. Defaults to \"POST\".\n */\n method: HTTP_METHOD = \"POST\",\n /**\n * The configuration object for the mutation.\n * @see [useSWRMutation](https://swr.vercel.app/docs/mutation#api)\n *\n * @link https://swr.vercel.app/docs/mutation#api\n */\n options?: SWRMutationConfiguration<T, E>\n) => {\n const apiBaseUrl = useConfig(\"apiBaseUrl\");\n\n let fullUrl = url;\n if (!url.startsWith(\"http\")) {\n fullUrl = `${apiBaseUrl}${url}`;\n }\n\n const account = useAccountInstance();\n const signer = account.signer;\n const { trigger, data, error, reset, isMutating } = useSWRMutation(\n fullUrl,\n // method === \"POST\" ? fetcher : deleteFetcher,\n fetcher,\n options\n );\n\n const mutation = async (\n /**\n * The data to send with the request.\n */\n data: Record<string, any> | null,\n /**\n * The query parameters to send with the request.\n */\n params?: Record<string, any>,\n options?: SWRMutationConfiguration<T, E>\n ): Promise<any> => {\n let newUrl = url;\n if (typeof params === \"object\" && Object.keys(params).length) {\n let search = new URLSearchParams(params);\n newUrl = `${url}?${search.toString()}`;\n }\n\n const payload: MessageFactor = {\n method,\n url: newUrl,\n data,\n };\n\n const signature = await signer.sign(payload, getTimestamp());\n\n return trigger(\n {\n data,\n params,\n method,\n signature: {\n ...signature,\n \"orderly-account-id\": account.accountId,\n },\n },\n options\n );\n };\n\n return [\n mutation,\n {\n data,\n error,\n reset,\n isMutating,\n },\n ] as const;\n};\n"],"names":["useMutation","fetcher","url","options","init","method","arg","headers","signature","data","body","JSON","stringify","params","Object","keys","length","search","URLSearchParams","toString","mutate","apiBaseUrl","useConfig","fullUrl","startsWith","account","useAccountInstance","signer","trigger","error","reset","isMutating","useSWRMutation","mutation","newUrl","payload","sign","getTimestamp","accountId"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAoDaA;;;eAAAA;;;iEAhDN;qBACgB;oCAKY;2BACT;uBACG;;;;;;AAI7B,MAAMC,UAAU,CACdC,KACAC;IASA,MAAMC,OAAoB;QACxBC,QAAQF,QAAQG,GAAG,CAACD,MAAM;QAC1BE,SAAS;YACP,GAAGJ,QAAQG,GAAG,CAACE,SAAS;QAC1B;IACF;IAEA,IAAIL,QAAQG,GAAG,CAACG,IAAI,EAAE;QACpBL,KAAKM,IAAI,GAAGC,KAAKC,SAAS,CAACT,QAAQG,GAAG,CAACG,IAAI;IAC7C;IAEA,IACE,OAAON,QAAQG,GAAG,CAACO,MAAM,KAAK,YAC9BC,OAAOC,IAAI,CAACZ,QAAQG,GAAG,CAACO,MAAM,EAAEG,MAAM,EACtC;QACA,IAAIC,SAAS,IAAIC,gBAAgBf,QAAQG,GAAG,CAACO,MAAM;QACnDX,MAAM,CAAC,EAAEA,IAAI,CAAC,EAAEe,OAAOE,QAAQ,GAAG,CAAC;IACrC;IAEA,OAAOC,IAAAA,WAAM,EAAClB,KAAKE;AACrB;AAKO,MAAMJ,cAAc,CACzB;;;GAGC,GACDE,KACA;;GAEC,GACDG,SAAsB,MAAM,EAC5B;;;;;GAKC,GACDF;IAEA,MAAMkB,aAAaC,IAAAA,oBAAS,EAAC;IAE7B,IAAIC,UAAUrB;IACd,IAAI,CAACA,IAAIsB,UAAU,CAAC,SAAS;QAC3BD,UAAU,CAAC,EAAEF,WAAW,EAAEnB,IAAI,CAAC;IACjC;IAEA,MAAMuB,UAAUC,IAAAA,sCAAkB;IAClC,MAAMC,SAASF,QAAQE,MAAM;IAC7B,MAAM,EAAEC,OAAO,EAAEnB,IAAI,EAAEoB,KAAK,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGC,IAAAA,iBAAc,EAChET,SACA,+CAA+C;IAC/CtB,SACAE;IAGF,MAAM8B,WAAW,OACf;;KAEC,GACDxB,MACA;;KAEC,GACDI,QACAV;QAEA,IAAI+B,SAAShC;QACb,IAAI,OAAOW,WAAW,YAAYC,OAAOC,IAAI,CAACF,QAAQG,MAAM,EAAE;YAC5D,IAAIC,SAAS,IAAIC,gBAAgBL;YACjCqB,SAAS,CAAC,EAAEhC,IAAI,CAAC,EAAEe,OAAOE,QAAQ,GAAG,CAAC;QACxC;QAEA,MAAMgB,UAAyB;YAC7B9B;YACAH,KAAKgC;YACLzB;QACF;QAEA,MAAMD,YAAY,MAAMmB,OAAOS,IAAI,CAACD,SAASE,IAAAA,mBAAY;QAEzD,OAAOT,QACL;YACEnB;YACAI;YACAR;YACAG,WAAW;gBACT,GAAGA,SAAS;gBACZ,sBAAsBiB,QAAQa,SAAS;YACzC;QACF,GACAnC;IAEJ;IAEA,OAAO;QACL8B;QACA;YACExB;YACAoB;YACAC;YACAC;QACF;KACD;AACH"}
|
package/lib/useObserve.d.ts
DELETED
package/lib/useObserve.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useObserve.d.ts","sourceRoot":"","sources":["../src/useObserve.ts"],"names":[],"mappings":"AAEA,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,eAAO,MAAM,UAAU,WAChB,MAAM,wCAGQ,IAAI,CAAO,CAAC"}
|
package/lib/useObserve.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
Subjects: function() {
|
|
13
|
-
return Subjects;
|
|
14
|
-
},
|
|
15
|
-
useObserve: function() {
|
|
16
|
-
return useObserve;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var Subjects;
|
|
20
|
-
(function(Subjects) {
|
|
21
|
-
Subjects["Orders"] = "orders";
|
|
22
|
-
Subjects["Positions"] = "positions";
|
|
23
|
-
})(Subjects || (Subjects = {}));
|
|
24
|
-
const useObserve = (key, initialValue)=>{};
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=useObserve.js.map
|
package/lib/useObserve.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useObserve.ts"],"sourcesContent":["import { useState } from \"react\";\n\nexport enum Subjects {\n Orders = \"orders\",\n Positions = \"positions\",\n}\n\nexport const useObserve = <T>(\n key: string,\n initialValue: T\n // @ts-ignore\n): [T, (value: T) => void] => {};\n"],"names":["useObserve","Subjects","key","initialValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;;;;IAOaA,UAAU;eAAVA;;;;UALDC;;;GAAAA,aAAAA;AAKL,MAAMD,aAAa,CACxBE,KACAC,gBAE6B"}
|
package/lib/useParamsCheck.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useParamsCheck.d.ts","sourceRoot":"","sources":["../src/useParamsCheck.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,WAAY;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,SAc3D,CAAC"}
|
package/lib/useParamsCheck.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useParamsCheck", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useParamsCheck;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _react = require("react");
|
|
12
|
-
const useParamsCheck = (params)=>{
|
|
13
|
-
(0, _react.useEffect)(()=>{
|
|
14
|
-
if (!params.brokerId || params.brokerId === "orderly") {
|
|
15
|
-
;
|
|
16
|
-
}
|
|
17
|
-
}, [
|
|
18
|
-
params.brokerId
|
|
19
|
-
]);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=useParamsCheck.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/useParamsCheck.ts"],"sourcesContent":["import { useEffect } from \"react\";\n\nexport const useParamsCheck = (params: { brokerId?: string }) => {\n useEffect(() => {\n if (!params.brokerId || params.brokerId === \"orderly\") {\n console.warn(\n \"WARNING:\" +\n \"\\n\" +\n \"========================\" +\n \"\\n\" +\n \"[OrderlyConfigProvider]: please provide your brokerId\" +\n \"\\n\" +\n \"========================\"\n );\n }\n }, [params.brokerId]);\n};\n"],"names":["useParamsCheck","params","useEffect","brokerId"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEaA;;;eAAAA;;;uBAFa;AAEnB,MAAMA,iBAAiB,CAACC;IAC7BC,IAAAA,gBAAS,EAAC;QACR,IAAI,CAACD,OAAOE,QAAQ,IAAIF,OAAOE,QAAQ,KAAK,WAAW;;QAUvD;IACF,GAAG;QAACF,OAAOE,QAAQ;KAAC;AACtB"}
|