@0xsequence/marketplace-sdk 0.7.0 → 0.8.1
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/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.changeset/seven-doors-taste.md +5 -0
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-MPBN3E54.js → chunk-2VHHJNXY.js} +3 -3
- package/dist/{chunk-FBUMNJQ4.js → chunk-3II5GLHE.js} +2 -2
- package/dist/chunk-3JU7SQVE.js +182 -0
- package/dist/chunk-3JU7SQVE.js.map +1 -0
- package/dist/{chunk-XTGMMNV5.js → chunk-A5ACY5YV.js} +2 -2
- package/dist/chunk-ABSYNRT5.js +128 -0
- package/dist/chunk-ABSYNRT5.js.map +1 -0
- package/dist/{chunk-XNA64MZQ.js → chunk-BCO4CYE4.js} +2 -2
- package/dist/{chunk-HTFORA4Q.js → chunk-BN36GABQ.js} +1883 -1010
- package/dist/chunk-BN36GABQ.js.map +1 -0
- package/dist/{chunk-4XK7XNJ7.js → chunk-BNAUZXPV.js} +73 -2
- package/dist/chunk-BNAUZXPV.js.map +1 -0
- package/dist/{chunk-Q5URKSC4.js → chunk-FMEEJFAF.js} +1 -1
- package/dist/{chunk-BBASZVT3.js → chunk-GBQVYNCD.js} +5 -6
- package/dist/chunk-GBQVYNCD.js.map +1 -0
- package/dist/{chunk-3AKOPSON.js → chunk-IZ44XPBH.js} +2 -9
- package/dist/chunk-IZ44XPBH.js.map +1 -0
- package/dist/{chunk-EAJ5K7QV.js → chunk-Q5RKAMYF.js} +3 -4
- package/dist/chunk-Q5RKAMYF.js.map +1 -0
- package/dist/{chunk-RBEPPVLT.js → chunk-X3QNSQER.js} +145 -355
- package/dist/chunk-X3QNSQER.js.map +1 -0
- package/dist/{index-CzTANLaA.d.ts → index-CnaFSNE9.d.ts} +6 -7
- package/dist/index.css +113 -31
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.js +4 -4
- package/dist/listCollectibles-B0tbqnRd.d.ts +155 -0
- package/dist/react/_internal/api/index.d.ts +28 -2
- package/dist/react/_internal/api/index.js +3 -1
- package/dist/react/_internal/databeat/index.js +10 -9
- package/dist/react/_internal/index.d.ts +2 -3
- package/dist/react/_internal/index.js +4 -4
- package/dist/react/_internal/wagmi/index.js +2 -2
- package/dist/react/hooks/index.d.ts +259 -674
- package/dist/react/hooks/index.js +11 -20
- package/dist/react/hooks/options/index.d.ts +1 -2
- package/dist/react/hooks/options/index.js +4 -4
- package/dist/react/index.d.ts +7 -7
- package/dist/react/index.js +15 -24
- package/dist/react/queries/index.d.ts +25 -0
- package/dist/react/queries/index.js +48 -0
- package/dist/react/queries/index.js.map +1 -0
- package/dist/react/ssr/index.js +3 -3
- package/dist/react/ui/components/collectible-card/index.d.ts +1 -6
- package/dist/react/ui/components/collectible-card/index.js +13 -12
- package/dist/react/ui/components/marketplace-logos/index.js +1 -1
- package/dist/react/ui/icons/index.js +6 -6
- package/dist/react/ui/index.d.ts +18 -22
- package/dist/react/ui/index.js +13 -12
- package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +6 -11
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +10 -9
- package/dist/types/index.js +2 -2
- package/dist/{types-Ct1uCT3M.d.ts → types-o_pKUpQG.d.ts} +2 -5
- package/dist/utils/index.d.ts +1 -5
- package/dist/utils/index.js +4 -4
- package/package.json +22 -16
- package/src/react/_internal/api/__mocks__/indexer.msw.ts +3 -1
- package/src/react/_internal/api/__mocks__/marketplace.msw.ts +1 -1
- package/src/react/_internal/api/__mocks__/metadata.msw.ts +14 -12
- package/src/react/_internal/api/index.ts +1 -0
- package/src/react/_internal/api/laos-api.ts +103 -0
- package/src/react/_internal/api/zod-schema.ts +3 -3
- package/src/react/_internal/types.ts +1 -10
- package/src/react/_internal/wallet/__tests__/wallet.test.ts +43 -0
- package/src/react/_internal/wallet/useWallet.ts +6 -3
- package/src/react/hooks/__tests__/useAutoSelectFeeOption.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCancelOrder.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCancelTransactionSteps.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCollectible.test.tsx +2 -2
- package/src/react/hooks/__tests__/useCollection.test.tsx +2 -2
- package/src/react/hooks/__tests__/useComparePrices.test.tsx +1 -1
- package/src/react/hooks/__tests__/useConvertPriceToUSD.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCountListingsForCollectible.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCountOfCollectables.test.tsx +2 -2
- package/src/react/hooks/__tests__/useCountOffersForCollectible.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCurrencies.test.tsx +2 -2
- package/src/react/hooks/__tests__/useCurrency.test.tsx +2 -2
- package/src/react/hooks/__tests__/useFilters.test.tsx +2 -2
- package/src/react/hooks/__tests__/useFloorOrder.test.tsx +2 -2
- package/src/react/hooks/__tests__/useGenerateCancelTransaction.test.tsx +1 -1
- package/src/react/hooks/__tests__/useGenerateListingTransaction.test.tsx +1 -1
- package/src/react/hooks/__tests__/useGenerateOfferTransaction.test.tsx +1 -1
- package/src/react/hooks/__tests__/useGenerateSellTransaction.test.tsx +1 -1
- package/src/react/hooks/__tests__/useListCollectibleActivities.test.tsx +2 -2
- package/src/react/hooks/__tests__/useListCollectibles.test.tsx +3 -2
- package/src/react/hooks/__tests__/useListCollectiblesPaginated.test.tsx +1 -1
- package/src/react/hooks/__tests__/useListCollectionActivities.test.tsx +1 -1
- package/src/react/hooks/__tests__/useListListingsForCollectible.test.tsx +1 -1
- package/src/react/hooks/__tests__/useListOffersForCollectible.test.tsx +1 -1
- package/src/react/hooks/__tests__/useLowestListing.test.tsx +1 -1
- package/src/react/hooks/__tests__/useRoyalty.test.tsx +1 -2
- package/src/react/hooks/index.ts +0 -1
- package/src/react/hooks/options/collectionOptions.ts +2 -3
- package/src/react/hooks/useAutoSelectFeeOption.tsx +1 -1
- package/src/react/hooks/useCancelOrder.tsx +3 -3
- package/src/react/hooks/useCancelTransactionSteps.tsx +1 -1
- package/src/react/hooks/useCheckoutOptions.tsx +1 -2
- package/src/react/hooks/useCollectible.tsx +2 -3
- package/src/react/hooks/useCollectionBalanceDetails.tsx +1 -2
- package/src/react/hooks/useComparePrices.tsx +2 -9
- package/src/react/hooks/useConvertPriceToUSD.tsx +1 -4
- package/src/react/hooks/useCountListingsForCollectible.tsx +1 -2
- package/src/react/hooks/useCountOfCollectables.tsx +1 -2
- package/src/react/hooks/useCountOffersForCollectible.tsx +1 -2
- package/src/react/hooks/useCurrencies.tsx +1 -4
- package/src/react/hooks/useCurrency.tsx +3 -8
- package/src/react/hooks/useFilters.tsx +5 -4
- package/src/react/hooks/useFloorOrder.tsx +1 -2
- package/src/react/hooks/useGenerateCancelTransaction.tsx +3 -6
- package/src/react/hooks/useGenerateListingTransaction.tsx +2 -3
- package/src/react/hooks/useGenerateOfferTransaction.tsx +2 -3
- package/src/react/hooks/useGenerateSellTransaction.tsx +3 -6
- package/src/react/hooks/useHighestOffer.tsx +1 -1
- package/src/react/hooks/useListCollectibles.tsx +33 -61
- package/src/react/hooks/useListCollectiblesPaginated.tsx +2 -6
- package/src/react/hooks/useListListingsForCollectible.tsx +1 -2
- package/src/react/hooks/useListOffersForCollectible.tsx +1 -2
- package/src/react/hooks/useLowestListing.tsx +1 -2
- package/src/react/hooks/useRoyalty.tsx +3 -8
- package/src/react/hooks/useTransferTokens.tsx +2 -2
- package/src/react/queries/balanceOfCollectible.ts +9 -32
- package/src/react/queries/getTokenSupplies.ts +38 -0
- package/src/react/queries/index.ts +5 -0
- package/src/react/queries/listCollectibles.ts +96 -0
- package/src/react/ui/components/_internals/action-button/ActionButton.tsx +1 -1
- package/src/react/ui/components/_internals/action-button/__tests__/ActionButton.test.tsx +1 -1
- package/src/react/ui/components/_internals/action-button/components/NonOwnerActions.tsx +4 -3
- package/src/react/ui/components/_internals/action-button/components/OwnerActions.tsx +1 -1
- package/src/react/ui/components/collectible-card/CollectibleCard.tsx +2 -3
- package/src/react/ui/components/collectible-card/__tests__/CollectibleCard.test.tsx +1 -1
- package/src/react/ui/modals/BuyModal/ERC1155QuantityModal.tsx +127 -0
- package/src/react/ui/modals/BuyModal/Modal.tsx +70 -85
- package/src/react/ui/modals/BuyModal/__tests__/Modal.test.tsx +85 -226
- package/src/react/ui/modals/BuyModal/__tests__/Modal1155.test.tsx +140 -0
- package/src/react/ui/modals/BuyModal/__tests__/store.test.ts +67 -76
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useCheckoutOptions.test.tsx +1 -60
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useFees.test.tsx +1 -1
- package/src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts +29 -13
- package/src/react/ui/modals/BuyModal/hooks/useLoadData.ts +26 -21
- package/src/react/ui/modals/BuyModal/hooks/usePaymentModalParams.ts +200 -0
- package/src/react/ui/modals/BuyModal/index.tsx +4 -14
- package/src/react/ui/modals/BuyModal/store.ts +71 -76
- package/src/react/ui/modals/CreateListingModal/Modal.tsx +71 -7
- package/src/react/ui/modals/CreateListingModal/__tests__/Modal.test.tsx +2 -2
- package/src/react/ui/modals/CreateListingModal/hooks/useCreateListing.tsx +1 -1
- package/src/react/ui/modals/CreateListingModal/hooks/useGetTokenApproval.ts +1 -1
- package/src/react/ui/modals/CreateListingModal/hooks/useTransactionSteps.tsx +9 -5
- package/src/react/ui/modals/CreateListingModal/store.ts +7 -2
- package/src/react/ui/modals/MakeOfferModal/Modal.tsx +103 -6
- package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +1 -1
- package/src/react/ui/modals/MakeOfferModal/hooks/useGetTokenApproval.tsx +1 -1
- package/src/react/ui/modals/MakeOfferModal/hooks/useMakeOffer.tsx +1 -1
- package/src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx +8 -4
- package/src/react/ui/modals/MakeOfferModal/store.ts +5 -3
- package/src/react/ui/modals/SellModal/Modal.tsx +76 -4
- package/src/react/ui/modals/SellModal/__tests__/Modal.test.tsx +1 -1
- package/src/react/ui/modals/SellModal/hooks/useGetTokenApproval.tsx +1 -1
- package/src/react/ui/modals/SellModal/hooks/useSell.tsx +1 -1
- package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +16 -8
- package/src/react/ui/modals/SellModal/store.ts +5 -3
- package/src/react/ui/modals/TransferModal/_store.ts +15 -3
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/TokenQuantityInput.tsx +58 -0
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/TransferButton.tsx +56 -0
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/WalletAddressInput.tsx +50 -0
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +94 -66
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/useHandleTransfer.tsx +22 -14
- package/src/react/ui/modals/TransferModal/index.tsx +72 -38
- package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +43 -42
- package/src/react/ui/modals/_internal/components/actionModal/store.ts +1 -2
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +2 -2
- package/src/react/ui/modals/_internal/components/expirationDateSelect/index.tsx +9 -1
- package/src/react/ui/modals/_internal/components/floorPriceText/index.tsx +27 -12
- package/src/react/ui/modals/_internal/components/priceInput/__tests__/index.test.tsx +1 -1
- package/src/react/ui/modals/_internal/components/priceInput/index.tsx +19 -3
- package/src/react/ui/modals/_internal/components/quantityInput/index.tsx +3 -0
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/_components/ActionButtons.tsx +60 -0
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/_components/BalanceIndicator.tsx +30 -0
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/index.tsx +126 -0
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/store.ts +25 -0
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/useWaasFeeOptionManager.tsx +74 -0
- package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +1 -2
- package/src/react/ui/modals/_internal/components/switchChainModal/store.ts +1 -2
- package/src/react/ui/modals/_internal/components/tokenPreview/index.tsx +1 -1
- package/src/react/ui/modals/_internal/components/transaction-footer/index.tsx +4 -7
- package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +1 -1
- package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +1 -1
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/TransactionStatusModal.test.tsx +1 -1
- package/src/react/ui/modals/_internal/components/transactionStatusModal/hooks/useTransactionStatus.ts +1 -1
- package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +6 -1
- package/src/react/ui/modals/_internal/components/transactionStatusModal/store.ts +2 -2
- package/src/react/ui/modals/_internal/components/waasFeeOptionsSelect/WaasFeeOptionsSelect.tsx +10 -31
- package/src/react/ui/modals/_internal/hooks/useSelectWaasFeeOptions.ts +53 -0
- package/src/react/ui/modals/_internal/types.ts +2 -1
- package/src/types/waas-types.ts +38 -0
- package/src/utils/network.ts +2 -4
- package/test/const.ts +1 -1
- package/test/setup.ts +10 -0
- package/test/test-utils.tsx +31 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/chunk-3AKOPSON.js.map +0 -1
- package/dist/chunk-4XK7XNJ7.js.map +0 -1
- package/dist/chunk-BBASZVT3.js.map +0 -1
- package/dist/chunk-EAJ5K7QV.js.map +0 -1
- package/dist/chunk-HTFORA4Q.js.map +0 -1
- package/dist/chunk-OFY7OFTL.js +0 -458
- package/dist/chunk-OFY7OFTL.js.map +0 -1
- package/dist/chunk-RBEPPVLT.js.map +0 -1
- package/src/react/hooks/__tests__/useGenerateBuyTransaction.test.tsx +0 -172
- package/src/react/hooks/useGenerateBuyTransaction.tsx +0 -80
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useBuyCollectable.test.tsx +0 -349
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useLoadData.test.tsx +0 -185
- package/src/react/ui/modals/BuyModal/hooks/useBuyCollectable.ts +0 -170
- package/src/react/ui/modals/BuyModal/modals/CheckoutModal.tsx +0 -47
- package/src/react/ui/modals/BuyModal/modals/Modal1155.tsx +0 -140
- package/src/react/ui/modals/BuyModal/modals/__tests__/CheckoutModal.test.tsx +0 -162
- package/src/react/ui/modals/BuyModal/modals/__tests__/Modal1155.test.tsx +0 -327
- package/src/react/ui/modals/_internal/components/waasFeeOptionsBox/index.tsx +0 -124
- package/src/react/ui/modals/_internal/components/waasFeeOptionsBox/store.ts +0 -12
- /package/dist/{chunk-MPBN3E54.js.map → chunk-2VHHJNXY.js.map} +0 -0
- /package/dist/{chunk-FBUMNJQ4.js.map → chunk-3II5GLHE.js.map} +0 -0
- /package/dist/{chunk-XTGMMNV5.js.map → chunk-A5ACY5YV.js.map} +0 -0
- /package/dist/{chunk-XNA64MZQ.js.map → chunk-BCO4CYE4.js.map} +0 -0
- /package/dist/{chunk-Q5URKSC4.js.map → chunk-FMEEJFAF.js.map} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
UseGenerateBuyTransactionArgsSchema,
|
|
3
2
|
checkoutOptionsOptions,
|
|
4
3
|
collectibleOptions,
|
|
5
4
|
collectionBalanceDetailsOptions,
|
|
@@ -14,16 +13,13 @@ import {
|
|
|
14
13
|
currenciesOptions,
|
|
15
14
|
currencyOptions,
|
|
16
15
|
fetchFilters,
|
|
17
|
-
fetchGenerateBuyTransaction,
|
|
18
16
|
filtersOptions,
|
|
19
17
|
floorOrderOptions,
|
|
20
|
-
generateBuyTransactionOptions,
|
|
21
18
|
generateCancelTransaction,
|
|
22
19
|
generateListingTransaction,
|
|
23
20
|
generateOfferTransaction,
|
|
24
21
|
generateSellTransaction,
|
|
25
22
|
listCollectibleActivitiesOptions,
|
|
26
|
-
listCollectiblesOptions,
|
|
27
23
|
listCollectiblesPaginatedOptions,
|
|
28
24
|
listCollectionActivitiesOptions,
|
|
29
25
|
listCollectionsOptions,
|
|
@@ -49,7 +45,6 @@ import {
|
|
|
49
45
|
useCurrency,
|
|
50
46
|
useFilters,
|
|
51
47
|
useFloorOrder,
|
|
52
|
-
useGenerateBuyTransaction,
|
|
53
48
|
useGenerateCancelTransaction,
|
|
54
49
|
useGenerateListingTransaction,
|
|
55
50
|
useGenerateOfferTransaction,
|
|
@@ -67,22 +62,22 @@ import {
|
|
|
67
62
|
useMarketplaceConfig,
|
|
68
63
|
useRoyalty,
|
|
69
64
|
useTransferTokens
|
|
70
|
-
} from "../../chunk-
|
|
71
|
-
import "../../chunk-
|
|
72
|
-
import
|
|
65
|
+
} from "../../chunk-X3QNSQER.js";
|
|
66
|
+
import "../../chunk-GBQVYNCD.js";
|
|
67
|
+
import {
|
|
68
|
+
marketplaceConfigOptions
|
|
69
|
+
} from "../../chunk-3II5GLHE.js";
|
|
70
|
+
import "../../chunk-BCO4CYE4.js";
|
|
73
71
|
import "../../chunk-Y63BOO6M.js";
|
|
74
|
-
import "../../chunk-
|
|
75
|
-
import "../../chunk-
|
|
72
|
+
import "../../chunk-Q5RKAMYF.js";
|
|
73
|
+
import "../../chunk-FMEEJFAF.js";
|
|
76
74
|
import "../../chunk-UISBTKFF.js";
|
|
77
75
|
import "../../chunk-XX4EVWBF.js";
|
|
78
76
|
import "../../chunk-FUM4OGOQ.js";
|
|
79
|
-
import
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
import "../../chunk-3AKOPSON.js";
|
|
83
|
-
import "../../chunk-4XK7XNJ7.js";
|
|
77
|
+
import "../../chunk-3JU7SQVE.js";
|
|
78
|
+
import "../../chunk-IZ44XPBH.js";
|
|
79
|
+
import "../../chunk-BNAUZXPV.js";
|
|
84
80
|
export {
|
|
85
|
-
UseGenerateBuyTransactionArgsSchema,
|
|
86
81
|
checkoutOptionsOptions,
|
|
87
82
|
collectibleOptions,
|
|
88
83
|
collectionBalanceDetailsOptions,
|
|
@@ -97,16 +92,13 @@ export {
|
|
|
97
92
|
currenciesOptions,
|
|
98
93
|
currencyOptions,
|
|
99
94
|
fetchFilters,
|
|
100
|
-
fetchGenerateBuyTransaction,
|
|
101
95
|
filtersOptions,
|
|
102
96
|
floorOrderOptions,
|
|
103
|
-
generateBuyTransactionOptions,
|
|
104
97
|
generateCancelTransaction,
|
|
105
98
|
generateListingTransaction,
|
|
106
99
|
generateOfferTransaction,
|
|
107
100
|
generateSellTransaction,
|
|
108
101
|
listCollectibleActivitiesOptions,
|
|
109
|
-
listCollectiblesOptions,
|
|
110
102
|
listCollectiblesPaginatedOptions,
|
|
111
103
|
listCollectionActivitiesOptions,
|
|
112
104
|
listCollectionsOptions,
|
|
@@ -133,7 +125,6 @@ export {
|
|
|
133
125
|
useCurrency,
|
|
134
126
|
useFilters,
|
|
135
127
|
useFloorOrder,
|
|
136
|
-
useGenerateBuyTransaction,
|
|
137
128
|
useGenerateCancelTransaction,
|
|
138
129
|
useGenerateListingTransaction,
|
|
139
130
|
useGenerateOfferTransaction,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export { c as collectionOptions, f as fetchCollection, m as marketplaceConfigOptions } from '../../../index-
|
|
1
|
+
export { c as collectionOptions, f as fetchCollection, m as marketplaceConfigOptions } from '../../../index-CnaFSNE9.js';
|
|
2
2
|
import '@tanstack/react-query';
|
|
3
3
|
import '@0xsequence/metadata';
|
|
4
|
-
import '@0xsequence/network';
|
|
5
4
|
import 'zod';
|
|
6
5
|
import '../../../sdk-config-DIzJk_tI.js';
|
|
7
6
|
import '../../../builder-types-QlHwc9bI.js';
|
|
@@ -2,12 +2,12 @@ import "../../../chunk-JKCF7HEA.js";
|
|
|
2
2
|
import {
|
|
3
3
|
collectionOptions,
|
|
4
4
|
fetchCollection
|
|
5
|
-
} from "../../../chunk-
|
|
5
|
+
} from "../../../chunk-GBQVYNCD.js";
|
|
6
6
|
import {
|
|
7
7
|
marketplaceConfigOptions
|
|
8
|
-
} from "../../../chunk-
|
|
9
|
-
import "../../../chunk-
|
|
10
|
-
import "../../../chunk-
|
|
8
|
+
} from "../../../chunk-3II5GLHE.js";
|
|
9
|
+
import "../../../chunk-IZ44XPBH.js";
|
|
10
|
+
import "../../../chunk-BNAUZXPV.js";
|
|
11
11
|
export {
|
|
12
12
|
collectionOptions,
|
|
13
13
|
fetchCollection,
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
3
|
import { S as SdkConfig } from '../sdk-config-DIzJk_tI.js';
|
|
4
|
-
export { CollectionBalanceFilter, CreateReqWithDateExpiry, GenerateListingTransactionProps, GenerateOfferTransactionProps, TransactionStep, TransferTokensParams, UseCheckoutOptionsArgs, UseCheckoutOptionsReturn, UseCollectibleArgs, UseCollectibleReturn, UseCollectionBalanceDetailsArgs, UseComparePricesReturn, UseContOfCollectableReturn, UseConvertPriceToUSDArgs, UseConvertPriceToUSDReturn, UseCountListingsForCollectibleArgs, UseCountListingsForCollectibleReturn, UseCountOfCollectablesArgs, UseCountOffersForCollectibleArgs, UseCountOffersForCollectibleReturn, UseCurrenciesReturn, UseCurrencyReturn, UseFilterReturn, UseFiltersArgs, UseFloorOrderArgs, UseFloorOrderReturn,
|
|
5
|
-
export { U as UseCollectionArgs, a as UseCollectionReturn, c as collectionOptions, f as fetchCollection, m as marketplaceConfigOptions, u as useCollection } from '../index-
|
|
4
|
+
export { CollectionBalanceFilter, CreateReqWithDateExpiry, GenerateListingTransactionProps, GenerateOfferTransactionProps, TransactionStep, TransferTokensParams, UseCheckoutOptionsArgs, UseCheckoutOptionsReturn, UseCollectibleArgs, UseCollectibleReturn, UseCollectionBalanceDetailsArgs, UseComparePricesReturn, UseContOfCollectableReturn, UseConvertPriceToUSDArgs, UseConvertPriceToUSDReturn, UseCountListingsForCollectibleArgs, UseCountListingsForCollectibleReturn, UseCountOfCollectablesArgs, UseCountOffersForCollectibleArgs, UseCountOffersForCollectibleReturn, UseCurrenciesReturn, UseCurrencyReturn, UseFilterReturn, UseFiltersArgs, UseFloorOrderArgs, UseFloorOrderReturn, UseGenerateListingTransactionArgs, UseGenerateOfferTransactionArgs, UseHighestOfferArgs, UseListCollectibleActivitiesArgs, UseListCollectibleActivitiesReturn, UseListCollectiblesPaginatedArgs, UseListCollectiblesPaginatedReturn, UseListCollectionActivitiesArgs, UseListCollectionActivitiesReturn, UseListCollectionsArgs, UseListCollectionsReturn, UseListListingsForCollectibleReturn, UseListOffersForCollectibleReturn, UseLowestListingArgs, UseLowestListingReturn, checkoutOptionsOptions, collectibleOptions, collectionBalanceDetailsOptions, collectionDetailsOptions, collectionDetailsPollingOptions, comparePricesOptions, convertPriceToUSD, convertPriceToUSDOptions, countListingsForCollectibleOptions, countOfCollectablesOptions, countOffersForCollectibleOptions, currenciesOptions, currencyOptions, fetchFilters, filtersOptions, floorOrderOptions, generateCancelTransaction, generateListingTransaction, generateOfferTransaction, generateSellTransaction, listCollectibleActivitiesOptions, listCollectiblesPaginatedOptions, listCollectionActivitiesOptions, listCollectionsOptions, listListingsForCollectibleOptions, listOffersForCollectibleOptions, lowestListingOptions, useAutoSelectFeeOption, useBalanceOfCollectible, useCancelOrder, useCheckoutOptions, useCollectible, useCollectionBalanceDetails, useCollectionDetails, useCollectionDetailsPolling, useComparePrices, useConfig, useConvertPriceToUSD, useCountListingsForCollectible, useCountOfCollectables, useCountOffersForCollectible, useCurrencies, useCurrency, useFilters, useFloorOrder, useGenerateCancelTransaction, useGenerateListingTransaction, useGenerateOfferTransaction, useGenerateSellTransaction, useHighestOffer, useListBalances, useListCollectibleActivities, useListCollectibles, useListCollectiblesPaginated, useListCollectionActivities, useListCollections, useListListingsForCollectible, useListOffersForCollectible, useLowestListing, useMarketplaceConfig, useRoyalty, useTransferTokens } from './hooks/index.js';
|
|
5
|
+
export { U as UseCollectionArgs, a as UseCollectionReturn, c as collectionOptions, f as fetchCollection, m as marketplaceConfigOptions, u as useCollection } from '../index-CnaFSNE9.js';
|
|
6
6
|
export { g as getQueryClient } from '../get-query-client-D46hbjk6.js';
|
|
7
7
|
export { c as createWagmiConfig } from '../create-config-ClkUr27C.js';
|
|
8
8
|
export { ModalProvider, useBuyModal, useCreateListingModal, useMakeOfferModal, useSellModal, useSuccessfulPurchaseModal, useTransferModal } from './ui/index.js';
|
|
9
9
|
export { CollectibleCard } from './ui/components/collectible-card/index.js';
|
|
10
10
|
import '@tanstack/react-query';
|
|
11
11
|
import '@0xsequence/indexer';
|
|
12
|
+
import '../listCollectibles-B0tbqnRd.js';
|
|
12
13
|
import 'viem';
|
|
13
14
|
import 'wagmi/query';
|
|
14
|
-
import '@0xsequence/network';
|
|
15
|
-
import 'zod';
|
|
16
15
|
import '../marketplace.gen-BTHxxhG2.js';
|
|
16
|
+
import 'zod';
|
|
17
17
|
import '@0xsequence/metadata';
|
|
18
18
|
import '../services-ybGoDJd9.js';
|
|
19
19
|
import '../builder-types-QlHwc9bI.js';
|
|
20
|
-
import '../types-
|
|
20
|
+
import '../types-o_pKUpQG.js';
|
|
21
21
|
import 'wagmi';
|
|
22
22
|
import '@0xsequence/design-system';
|
|
23
23
|
|
|
24
|
-
declare const MarketplaceSdkContext:
|
|
24
|
+
declare const MarketplaceSdkContext: React$1.Context<SdkConfig>;
|
|
25
25
|
type MarketplaceSdkProviderProps = {
|
|
26
26
|
config: SdkConfig;
|
|
27
27
|
children: React.ReactNode;
|
package/dist/react/index.js
CHANGED
|
@@ -7,16 +7,15 @@ import {
|
|
|
7
7
|
useSellModal,
|
|
8
8
|
useSuccessfulPurchaseModal,
|
|
9
9
|
useTransferModal
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-BN36GABQ.js";
|
|
11
|
+
import "../chunk-ABSYNRT5.js";
|
|
12
|
+
import "../chunk-A5ACY5YV.js";
|
|
13
13
|
import "../chunk-JKCF7HEA.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-2VHHJNXY.js";
|
|
15
15
|
import {
|
|
16
16
|
MarketplaceProvider,
|
|
17
17
|
MarketplaceQueryClientProvider,
|
|
18
18
|
MarketplaceSdkContext,
|
|
19
|
-
UseGenerateBuyTransactionArgsSchema,
|
|
20
19
|
checkoutOptionsOptions,
|
|
21
20
|
collectibleOptions,
|
|
22
21
|
collectionBalanceDetailsOptions,
|
|
@@ -31,16 +30,13 @@ import {
|
|
|
31
30
|
currenciesOptions,
|
|
32
31
|
currencyOptions,
|
|
33
32
|
fetchFilters,
|
|
34
|
-
fetchGenerateBuyTransaction,
|
|
35
33
|
filtersOptions,
|
|
36
34
|
floorOrderOptions,
|
|
37
|
-
generateBuyTransactionOptions,
|
|
38
35
|
generateCancelTransaction,
|
|
39
36
|
generateListingTransaction,
|
|
40
37
|
generateOfferTransaction,
|
|
41
38
|
generateSellTransaction,
|
|
42
39
|
listCollectibleActivitiesOptions,
|
|
43
|
-
listCollectiblesOptions,
|
|
44
40
|
listCollectiblesPaginatedOptions,
|
|
45
41
|
listCollectionActivitiesOptions,
|
|
46
42
|
listCollectionsOptions,
|
|
@@ -66,7 +62,6 @@ import {
|
|
|
66
62
|
useCurrency,
|
|
67
63
|
useFilters,
|
|
68
64
|
useFloorOrder,
|
|
69
|
-
useGenerateBuyTransaction,
|
|
70
65
|
useGenerateCancelTransaction,
|
|
71
66
|
useGenerateListingTransaction,
|
|
72
67
|
useGenerateOfferTransaction,
|
|
@@ -84,34 +79,34 @@ import {
|
|
|
84
79
|
useMarketplaceConfig,
|
|
85
80
|
useRoyalty,
|
|
86
81
|
useTransferTokens
|
|
87
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-X3QNSQER.js";
|
|
88
83
|
import {
|
|
89
84
|
collectionOptions,
|
|
90
85
|
fetchCollection
|
|
91
|
-
} from "../chunk-
|
|
92
|
-
import
|
|
86
|
+
} from "../chunk-GBQVYNCD.js";
|
|
87
|
+
import {
|
|
88
|
+
marketplaceConfigOptions
|
|
89
|
+
} from "../chunk-3II5GLHE.js";
|
|
90
|
+
import "../chunk-BCO4CYE4.js";
|
|
93
91
|
import "../chunk-Y63BOO6M.js";
|
|
94
|
-
import "../chunk-
|
|
95
|
-
import "../chunk-
|
|
92
|
+
import "../chunk-Q5RKAMYF.js";
|
|
93
|
+
import "../chunk-FMEEJFAF.js";
|
|
96
94
|
import "../chunk-UISBTKFF.js";
|
|
97
95
|
import "../chunk-XX4EVWBF.js";
|
|
98
96
|
import "../chunk-FUM4OGOQ.js";
|
|
99
|
-
import
|
|
100
|
-
marketplaceConfigOptions
|
|
101
|
-
} from "../chunk-FBUMNJQ4.js";
|
|
97
|
+
import "../chunk-3JU7SQVE.js";
|
|
102
98
|
import {
|
|
103
99
|
createWagmiConfig
|
|
104
|
-
} from "../chunk-
|
|
100
|
+
} from "../chunk-IZ44XPBH.js";
|
|
105
101
|
import {
|
|
106
102
|
getQueryClient
|
|
107
|
-
} from "../chunk-
|
|
103
|
+
} from "../chunk-BNAUZXPV.js";
|
|
108
104
|
export {
|
|
109
105
|
CollectibleCard,
|
|
110
106
|
MarketplaceProvider,
|
|
111
107
|
MarketplaceQueryClientProvider,
|
|
112
108
|
MarketplaceSdkContext,
|
|
113
109
|
ModalProvider,
|
|
114
|
-
UseGenerateBuyTransactionArgsSchema,
|
|
115
110
|
checkoutOptionsOptions,
|
|
116
111
|
collectibleOptions,
|
|
117
112
|
collectionBalanceDetailsOptions,
|
|
@@ -129,17 +124,14 @@ export {
|
|
|
129
124
|
currencyOptions,
|
|
130
125
|
fetchCollection,
|
|
131
126
|
fetchFilters,
|
|
132
|
-
fetchGenerateBuyTransaction,
|
|
133
127
|
filtersOptions,
|
|
134
128
|
floorOrderOptions,
|
|
135
|
-
generateBuyTransactionOptions,
|
|
136
129
|
generateCancelTransaction,
|
|
137
130
|
generateListingTransaction,
|
|
138
131
|
generateOfferTransaction,
|
|
139
132
|
generateSellTransaction,
|
|
140
133
|
getQueryClient,
|
|
141
134
|
listCollectibleActivitiesOptions,
|
|
142
|
-
listCollectiblesOptions,
|
|
143
135
|
listCollectiblesPaginatedOptions,
|
|
144
136
|
listCollectionActivitiesOptions,
|
|
145
137
|
listCollectionsOptions,
|
|
@@ -168,7 +160,6 @@ export {
|
|
|
168
160
|
useCurrency,
|
|
169
161
|
useFilters,
|
|
170
162
|
useFloorOrder,
|
|
171
|
-
useGenerateBuyTransaction,
|
|
172
163
|
useGenerateCancelTransaction,
|
|
173
164
|
useGenerateListingTransaction,
|
|
174
165
|
useGenerateOfferTransaction,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { O as Order, U as UseBalanceOfCollectibleArgs, d as UseHighestOfferArgs, g as UseListBalancesArgs, a as UseListCollectiblesArgs, b as balanceOfCollectibleOptions, f as fetchBalanceOfCollectible, i as fetchBalances, c as fetchCollectibles, e as fetchHighestOffer, h as highestOfferOptions, j as listBalancesOptions, l as listCollectiblesOptions } from '../../listCollectibles-B0tbqnRd.js';
|
|
2
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
|
+
import * as _0xsequence_indexer from '@0xsequence/indexer';
|
|
4
|
+
import { S as SdkConfig } from '../../sdk-config-DIzJk_tI.js';
|
|
5
|
+
import 'viem';
|
|
6
|
+
import 'wagmi/query';
|
|
7
|
+
import '../../marketplace.gen-BTHxxhG2.js';
|
|
8
|
+
|
|
9
|
+
type UseGetTokenSuppliesArgs = {
|
|
10
|
+
chainId: number;
|
|
11
|
+
contractAddress: string;
|
|
12
|
+
tokenId: string;
|
|
13
|
+
isLaos721?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare function getTokenSupplies(args: UseGetTokenSuppliesArgs, config: SdkConfig): Promise<_0xsequence_indexer.GetTokenSuppliesReturn>;
|
|
16
|
+
declare function getTokenSuppliesOptions(args: UseGetTokenSuppliesArgs, config: SdkConfig): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<_0xsequence_indexer.GetTokenSuppliesReturn, Error, _0xsequence_indexer.GetTokenSuppliesReturn, (string | UseGetTokenSuppliesArgs)[]>, "queryFn"> & {
|
|
17
|
+
queryFn?: _tanstack_react_query.QueryFunction<_0xsequence_indexer.GetTokenSuppliesReturn, (string | UseGetTokenSuppliesArgs)[], never> | undefined;
|
|
18
|
+
} & {
|
|
19
|
+
queryKey: (string | UseGetTokenSuppliesArgs)[] & {
|
|
20
|
+
[dataTagSymbol]: _0xsequence_indexer.GetTokenSuppliesReturn;
|
|
21
|
+
[dataTagErrorSymbol]: Error;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { type UseGetTokenSuppliesArgs, getTokenSupplies, getTokenSuppliesOptions };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
balanceOfCollectibleOptions,
|
|
3
|
+
fetchBalanceOfCollectible,
|
|
4
|
+
fetchBalances,
|
|
5
|
+
fetchCollectibles,
|
|
6
|
+
fetchHighestOffer,
|
|
7
|
+
highestOfferOptions,
|
|
8
|
+
listBalancesOptions,
|
|
9
|
+
listCollectiblesOptions
|
|
10
|
+
} from "../../chunk-3JU7SQVE.js";
|
|
11
|
+
import "../../chunk-IZ44XPBH.js";
|
|
12
|
+
import {
|
|
13
|
+
LaosAPI,
|
|
14
|
+
getIndexerClient
|
|
15
|
+
} from "../../chunk-BNAUZXPV.js";
|
|
16
|
+
|
|
17
|
+
// src/react/queries/getTokenSupplies.ts
|
|
18
|
+
import { queryOptions } from "@tanstack/react-query";
|
|
19
|
+
async function getTokenSupplies(args, config) {
|
|
20
|
+
if (args.isLaos721) {
|
|
21
|
+
const laosApi = new LaosAPI();
|
|
22
|
+
return laosApi.getTokenSupplies({
|
|
23
|
+
chainId: args.chainId.toString(),
|
|
24
|
+
contractAddress: args.contractAddress
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const indexerClient = getIndexerClient(args.chainId, config);
|
|
28
|
+
return await indexerClient.getTokenSupplies(args);
|
|
29
|
+
}
|
|
30
|
+
function getTokenSuppliesOptions(args, config) {
|
|
31
|
+
return queryOptions({
|
|
32
|
+
queryKey: ["getTokenSupplies", args],
|
|
33
|
+
queryFn: () => getTokenSupplies(args, config)
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
balanceOfCollectibleOptions,
|
|
38
|
+
fetchBalanceOfCollectible,
|
|
39
|
+
fetchBalances,
|
|
40
|
+
fetchCollectibles,
|
|
41
|
+
fetchHighestOffer,
|
|
42
|
+
getTokenSupplies,
|
|
43
|
+
getTokenSuppliesOptions,
|
|
44
|
+
highestOfferOptions,
|
|
45
|
+
listBalancesOptions,
|
|
46
|
+
listCollectiblesOptions
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/react/queries/getTokenSupplies.ts"],"sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport type { SdkConfig } from '../../types';\n//TODO: This is not complete, there is no hook for this,\n// add it if we need it in the future\nimport { LaosAPI, getIndexerClient } from '../_internal';\n\nexport type UseGetTokenSuppliesArgs = {\n\tchainId: number;\n\tcontractAddress: string;\n\ttokenId: string;\n\tisLaos721?: boolean;\n};\n\nexport async function getTokenSupplies(\n\targs: UseGetTokenSuppliesArgs,\n\tconfig: SdkConfig,\n) {\n\tif (args.isLaos721) {\n\t\tconst laosApi = new LaosAPI();\n\t\treturn laosApi.getTokenSupplies({\n\t\t\tchainId: args.chainId.toString(),\n\t\t\tcontractAddress: args.contractAddress,\n\t\t});\n\t}\n\n\tconst indexerClient = getIndexerClient(args.chainId, config);\n\treturn await indexerClient.getTokenSupplies(args);\n}\n\nexport function getTokenSuppliesOptions(\n\targs: UseGetTokenSuppliesArgs,\n\tconfig: SdkConfig,\n) {\n\treturn queryOptions({\n\t\tqueryKey: ['getTokenSupplies', args],\n\t\tqueryFn: () => getTokenSupplies(args, config),\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,oBAAoB;AAa7B,eAAsB,iBACrB,MACA,QACC;AACD,MAAI,KAAK,WAAW;AACnB,UAAM,UAAU,IAAI,QAAQ;AAC5B,WAAO,QAAQ,iBAAiB;AAAA,MAC/B,SAAS,KAAK,QAAQ,SAAS;AAAA,MAC/B,iBAAiB,KAAK;AAAA,IACvB,CAAC;AAAA,EACF;AAEA,QAAM,gBAAgB,iBAAiB,KAAK,SAAS,MAAM;AAC3D,SAAO,MAAM,cAAc,iBAAiB,IAAI;AACjD;AAEO,SAAS,wBACf,MACA,QACC;AACD,SAAO,aAAa;AAAA,IACnB,UAAU,CAAC,oBAAoB,IAAI;AAAA,IACnC,SAAS,MAAM,iBAAiB,MAAM,MAAM;AAAA,EAC7C,CAAC;AACF;","names":[]}
|
package/dist/react/ssr/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
marketplaceConfigOptions
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-3II5GLHE.js";
|
|
4
4
|
import {
|
|
5
5
|
createWagmiConfig
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
} from "../../chunk-IZ44XPBH.js";
|
|
7
|
+
import "../../chunk-BNAUZXPV.js";
|
|
8
8
|
|
|
9
9
|
// src/react/ssr/create-ssr-client.ts
|
|
10
10
|
import { cookieToInitialState } from "wagmi";
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Hex } from 'viem';
|
|
3
|
-
import { c as ChainId } from '../../../../types-Ct1uCT3M.js';
|
|
4
3
|
import { O as OrderbookKind, C as ContractType, o as CollectibleOrder, m as Order } from '../../../../marketplace.gen-BTHxxhG2.js';
|
|
5
|
-
import '@0xsequence/network';
|
|
6
|
-
import 'zod';
|
|
7
|
-
import '../../../../sdk-config-DIzJk_tI.js';
|
|
8
|
-
import '../../../../builder-types-QlHwc9bI.js';
|
|
9
4
|
|
|
10
5
|
declare enum CollectibleCardAction {
|
|
11
6
|
BUY = "Buy",
|
|
@@ -17,7 +12,7 @@ declare enum CollectibleCardAction {
|
|
|
17
12
|
|
|
18
13
|
type CollectibleCardProps = {
|
|
19
14
|
collectibleId: string;
|
|
20
|
-
chainId:
|
|
15
|
+
chainId: number;
|
|
21
16
|
collectionAddress: Hex;
|
|
22
17
|
orderbookKind?: OrderbookKind;
|
|
23
18
|
collectionType?: ContractType;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CollectibleCard
|
|
3
|
-
} from "../../../../chunk-
|
|
4
|
-
import "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-BN36GABQ.js";
|
|
4
|
+
import "../../../../chunk-ABSYNRT5.js";
|
|
5
|
+
import "../../../../chunk-A5ACY5YV.js";
|
|
6
6
|
import "../../../../chunk-JKCF7HEA.js";
|
|
7
|
-
import "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
9
|
-
import "../../../../chunk-
|
|
10
|
-
import "../../../../chunk-
|
|
7
|
+
import "../../../../chunk-2VHHJNXY.js";
|
|
8
|
+
import "../../../../chunk-X3QNSQER.js";
|
|
9
|
+
import "../../../../chunk-GBQVYNCD.js";
|
|
10
|
+
import "../../../../chunk-3II5GLHE.js";
|
|
11
|
+
import "../../../../chunk-BCO4CYE4.js";
|
|
11
12
|
import "../../../../chunk-Y63BOO6M.js";
|
|
12
|
-
import "../../../../chunk-
|
|
13
|
-
import "../../../../chunk-
|
|
13
|
+
import "../../../../chunk-Q5RKAMYF.js";
|
|
14
|
+
import "../../../../chunk-FMEEJFAF.js";
|
|
14
15
|
import "../../../../chunk-UISBTKFF.js";
|
|
15
16
|
import "../../../../chunk-XX4EVWBF.js";
|
|
16
17
|
import "../../../../chunk-FUM4OGOQ.js";
|
|
17
|
-
import "../../../../chunk-
|
|
18
|
-
import "../../../../chunk-
|
|
19
|
-
import "../../../../chunk-
|
|
18
|
+
import "../../../../chunk-3JU7SQVE.js";
|
|
19
|
+
import "../../../../chunk-IZ44XPBH.js";
|
|
20
|
+
import "../../../../chunk-BNAUZXPV.js";
|
|
20
21
|
export {
|
|
21
22
|
CollectibleCard
|
|
22
23
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../../chunk-
|
|
2
|
-
import "../../../chunk-
|
|
3
|
-
import "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
1
|
+
import "../../../chunk-2VHHJNXY.js";
|
|
2
|
+
import "../../../chunk-BCO4CYE4.js";
|
|
3
|
+
import "../../../chunk-Q5RKAMYF.js";
|
|
4
|
+
import "../../../chunk-FMEEJFAF.js";
|
|
5
5
|
import "../../../chunk-UISBTKFF.js";
|
|
6
6
|
import "../../../chunk-XX4EVWBF.js";
|
|
7
7
|
import "../../../chunk-FUM4OGOQ.js";
|
|
8
|
-
import "../../../chunk-
|
|
9
|
-
import "../../../chunk-
|
|
8
|
+
import "../../../chunk-IZ44XPBH.js";
|
|
9
|
+
import "../../../chunk-BNAUZXPV.js";
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/dist/react/ui/index.d.ts
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Hash, Hex } from 'viem';
|
|
3
|
-
import { O as OrderbookKind, h as TokenMetadata, m as Order } from '../../marketplace.gen-BTHxxhG2.js';
|
|
2
|
+
import { Hash, Hex, Address } from 'viem';
|
|
3
|
+
import { O as OrderbookKind, h as TokenMetadata, m as Order, M as MarketplaceKind, z as Step } from '../../marketplace.gen-BTHxxhG2.js';
|
|
4
4
|
import { IconProps } from '@0xsequence/design-system';
|
|
5
5
|
import { ComponentType } from 'react';
|
|
6
6
|
export { CollectibleCard } from './components/collectible-card/index.js';
|
|
7
|
-
import '../../types-Ct1uCT3M.js';
|
|
8
|
-
import '@0xsequence/network';
|
|
9
|
-
import 'zod';
|
|
10
|
-
import '../../sdk-config-DIzJk_tI.js';
|
|
11
|
-
import '../../builder-types-QlHwc9bI.js';
|
|
12
7
|
|
|
13
8
|
declare const ModalProvider: () => react_jsx_runtime.JSX.Element;
|
|
14
9
|
|
|
@@ -18,11 +13,12 @@ type ModalCallbacks = {
|
|
|
18
13
|
orderId?: string;
|
|
19
14
|
}) => void;
|
|
20
15
|
onError?: (error: Error) => void;
|
|
16
|
+
onBuyAtFloorPrice?: () => void;
|
|
21
17
|
};
|
|
22
18
|
|
|
23
19
|
type OpenCreateListingModalArgs = {
|
|
24
20
|
collectionAddress: Hex;
|
|
25
|
-
chainId:
|
|
21
|
+
chainId: number;
|
|
26
22
|
collectibleId: string;
|
|
27
23
|
orderbookKind?: OrderbookKind;
|
|
28
24
|
callbacks?: ModalCallbacks;
|
|
@@ -36,7 +32,7 @@ declare const useCreateListingModal: (callbacks?: ModalCallbacks) => {
|
|
|
36
32
|
|
|
37
33
|
type OpenMakeOfferModalArgs = {
|
|
38
34
|
collectionAddress: Hex;
|
|
39
|
-
chainId:
|
|
35
|
+
chainId: number;
|
|
40
36
|
collectibleId: string;
|
|
41
37
|
orderbookKind?: OrderbookKind;
|
|
42
38
|
callbacks?: ModalCallbacks;
|
|
@@ -75,9 +71,9 @@ declare const useSuccessfulPurchaseModal: (callbacks?: ModalCallbacks) => {
|
|
|
75
71
|
};
|
|
76
72
|
|
|
77
73
|
type ShowTransferModalArgs = {
|
|
78
|
-
collectionAddress:
|
|
74
|
+
collectionAddress: Address;
|
|
79
75
|
collectibleId: string;
|
|
80
|
-
chainId:
|
|
76
|
+
chainId: number;
|
|
81
77
|
callbacks?: ModalCallbacks;
|
|
82
78
|
};
|
|
83
79
|
declare const useTransferModal: () => {
|
|
@@ -89,7 +85,7 @@ declare const useTransferModal: () => {
|
|
|
89
85
|
|
|
90
86
|
type OpenSellModalArgs = {
|
|
91
87
|
collectionAddress: Hex;
|
|
92
|
-
chainId:
|
|
88
|
+
chainId: number;
|
|
93
89
|
tokenId: string;
|
|
94
90
|
order: Order;
|
|
95
91
|
callbacks?: ModalCallbacks;
|
|
@@ -101,18 +97,18 @@ declare const useSellModal: (callbacks?: ModalCallbacks) => {
|
|
|
101
97
|
close: () => void;
|
|
102
98
|
};
|
|
103
99
|
|
|
104
|
-
type
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}) => void;
|
|
100
|
+
type BuyModalProps = {
|
|
101
|
+
orderId: string;
|
|
102
|
+
chainId: number;
|
|
103
|
+
collectionAddress: Address;
|
|
104
|
+
collectibleId: string;
|
|
105
|
+
marketplace: MarketplaceKind;
|
|
106
|
+
customCreditCardProviderCallback?: (buyStep: Step) => void;
|
|
107
|
+
skipNativeBalanceCheck?: boolean;
|
|
113
108
|
};
|
|
109
|
+
|
|
114
110
|
declare const useBuyModal: (callbacks?: ModalCallbacks) => {
|
|
115
|
-
show: (args:
|
|
111
|
+
show: (args: BuyModalProps) => void;
|
|
116
112
|
close: () => void;
|
|
117
113
|
};
|
|
118
114
|
|
package/dist/react/ui/index.js
CHANGED
|
@@ -7,23 +7,24 @@ import {
|
|
|
7
7
|
useSellModal,
|
|
8
8
|
useSuccessfulPurchaseModal,
|
|
9
9
|
useTransferModal
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-BN36GABQ.js";
|
|
11
|
+
import "../../chunk-ABSYNRT5.js";
|
|
12
|
+
import "../../chunk-A5ACY5YV.js";
|
|
13
13
|
import "../../chunk-JKCF7HEA.js";
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-2VHHJNXY.js";
|
|
15
|
+
import "../../chunk-X3QNSQER.js";
|
|
16
|
+
import "../../chunk-GBQVYNCD.js";
|
|
17
|
+
import "../../chunk-3II5GLHE.js";
|
|
18
|
+
import "../../chunk-BCO4CYE4.js";
|
|
18
19
|
import "../../chunk-Y63BOO6M.js";
|
|
19
|
-
import "../../chunk-
|
|
20
|
-
import "../../chunk-
|
|
20
|
+
import "../../chunk-Q5RKAMYF.js";
|
|
21
|
+
import "../../chunk-FMEEJFAF.js";
|
|
21
22
|
import "../../chunk-UISBTKFF.js";
|
|
22
23
|
import "../../chunk-XX4EVWBF.js";
|
|
23
24
|
import "../../chunk-FUM4OGOQ.js";
|
|
24
|
-
import "../../chunk-
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
25
|
+
import "../../chunk-3JU7SQVE.js";
|
|
26
|
+
import "../../chunk-IZ44XPBH.js";
|
|
27
|
+
import "../../chunk-BNAUZXPV.js";
|
|
27
28
|
export {
|
|
28
29
|
CollectibleCard,
|
|
29
30
|
ModalProvider,
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import React__default, { ComponentProps } from 'react';
|
|
3
3
|
import { Button } from '@0xsequence/design-system';
|
|
4
4
|
import { Observable } from '@legendapp/state';
|
|
5
5
|
import { Address } from 'viem';
|
|
6
|
-
import { c as ChainId } from '../../../../../../types-Ct1uCT3M.js';
|
|
7
|
-
import '@0xsequence/network';
|
|
8
|
-
import 'zod';
|
|
9
|
-
import '../../../../../../marketplace.gen-BTHxxhG2.js';
|
|
10
|
-
import '../../../../../../sdk-config-DIzJk_tI.js';
|
|
11
|
-
import '../../../../../../builder-types-QlHwc9bI.js';
|
|
12
6
|
|
|
13
7
|
interface ActionModalProps {
|
|
14
8
|
isOpen: boolean;
|
|
15
9
|
onClose: () => void;
|
|
16
10
|
title: string;
|
|
17
|
-
children:
|
|
11
|
+
children: React__default.ReactNode;
|
|
18
12
|
ctas: {
|
|
19
|
-
label:
|
|
13
|
+
label: React__default.ReactNode;
|
|
20
14
|
onClick: (() => Promise<void>) | (() => void);
|
|
21
15
|
pending?: boolean;
|
|
22
16
|
disabled?: boolean;
|
|
@@ -28,12 +22,13 @@ interface ActionModalProps {
|
|
|
28
22
|
modalLoading?: boolean;
|
|
29
23
|
spinnerContainerClassname?: string;
|
|
30
24
|
disableAnimation?: boolean;
|
|
25
|
+
hideCtas?: boolean;
|
|
31
26
|
}
|
|
32
|
-
declare const ActionModal: ({ isOpen, onClose, title, children, ctas, chainId, disableAnimation, modalLoading, spinnerContainerClassname, }: ActionModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
27
|
+
declare const ActionModal: ({ isOpen, onClose, title, children, ctas, chainId, disableAnimation, modalLoading, spinnerContainerClassname, hideCtas, }: ActionModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
33
28
|
|
|
34
29
|
interface ActionModalState {
|
|
35
30
|
isOpen: boolean;
|
|
36
|
-
chainId:
|
|
31
|
+
chainId: number | null;
|
|
37
32
|
collectionAddress: Address | null;
|
|
38
33
|
}
|
|
39
34
|
declare function createActionModalStore(): Observable<ActionModalState>;
|