@medialane/ui 0.404.0 → 0.407.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/components/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/account-page.cjs +3 -1
- package/dist/components/account-page.cjs.map +1 -1
- package/dist/components/account-page.d.cts +2 -2
- package/dist/components/account-page.d.ts +2 -2
- package/dist/components/account-page.js +3 -1
- package/dist/components/account-page.js.map +1 -1
- package/dist/components/asset-page.cjs +2 -1
- package/dist/components/asset-page.cjs.map +1 -1
- package/dist/components/asset-page.d.cts +1 -1
- package/dist/components/asset-page.d.ts +1 -1
- package/dist/components/asset-page.js +2 -1
- package/dist/components/asset-page.js.map +1 -1
- package/dist/components/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/claim/claim-collection-panel.cjs +210 -0
- package/dist/components/claim/claim-collection-panel.cjs.map +1 -0
- package/dist/components/claim/claim-collection-panel.d.cts +8 -0
- package/dist/components/claim/claim-collection-panel.d.ts +8 -0
- package/dist/components/claim/claim-collection-panel.js +176 -0
- package/dist/components/claim/claim-collection-panel.js.map +1 -0
- package/dist/components/coin-row.cjs +1 -1
- package/dist/components/coin-row.cjs.map +1 -1
- package/dist/components/coin-row.js +1 -1
- package/dist/components/coin-row.js.map +1 -1
- package/dist/components/coins-explorer.cjs +2 -2
- package/dist/components/coins-explorer.cjs.map +1 -1
- package/dist/components/coins-explorer.js +2 -2
- package/dist/components/coins-explorer.js.map +1 -1
- package/dist/components/collection-page.cjs +5 -2
- package/dist/components/collection-page.cjs.map +1 -1
- package/dist/components/collection-page.d.cts +2 -2
- package/dist/components/collection-page.d.ts +2 -2
- package/dist/components/collection-page.js +5 -2
- package/dist/components/collection-page.js.map +1 -1
- package/dist/components/collection-showcase.cjs +3 -3
- package/dist/components/collection-showcase.cjs.map +1 -1
- package/dist/components/collection-showcase.js +4 -4
- package/dist/components/collection-showcase.js.map +1 -1
- package/dist/components/collections-page.cjs +1 -1
- package/dist/components/collections-page.cjs.map +1 -1
- package/dist/components/collections-page.js +1 -1
- package/dist/components/collections-page.js.map +1 -1
- package/dist/components/creator-page.cjs +3 -1
- package/dist/components/creator-page.cjs.map +1 -1
- package/dist/components/creator-page.d.cts +2 -2
- package/dist/components/creator-page.d.ts +2 -2
- package/dist/components/creator-page.js +3 -1
- package/dist/components/creator-page.js.map +1 -1
- package/dist/components/discover-page.cjs +2 -1
- package/dist/components/discover-page.cjs.map +1 -1
- package/dist/components/discover-page.d.cts +1 -1
- package/dist/components/discover-page.d.ts +1 -1
- package/dist/components/discover-page.js +2 -1
- package/dist/components/discover-page.js.map +1 -1
- package/dist/components/external-link-field.cjs.map +1 -1
- package/dist/components/external-link-field.d.cts +1 -2
- package/dist/components/external-link-field.d.ts +1 -2
- package/dist/components/external-link-field.js.map +1 -1
- package/dist/components/fast-mint/fast-mint.d.cts +2 -2
- package/dist/components/fast-mint/fast-mint.d.ts +2 -2
- package/dist/components/floating-comments-button.cjs +2 -2
- package/dist/components/floating-comments-button.cjs.map +1 -1
- package/dist/components/floating-comments-button.js +3 -3
- package/dist/components/floating-comments-button.js.map +1 -1
- package/dist/components/home-page.cjs +2 -1
- package/dist/components/home-page.cjs.map +1 -1
- package/dist/components/home-page.d.cts +1 -1
- package/dist/components/home-page.d.ts +1 -1
- package/dist/components/home-page.js +2 -1
- package/dist/components/home-page.js.map +1 -1
- package/dist/components/ip-type-page.cjs +2 -1
- package/dist/components/ip-type-page.cjs.map +1 -1
- package/dist/components/ip-type-page.d.cts +1 -1
- package/dist/components/ip-type-page.d.ts +1 -1
- package/dist/components/ip-type-page.js +2 -1
- package/dist/components/ip-type-page.js.map +1 -1
- package/dist/components/launchpad/coin-create.cjs +2 -2
- package/dist/components/launchpad/coin-create.cjs.map +1 -1
- package/dist/components/launchpad/coin-create.js +2 -2
- package/dist/components/launchpad/coin-create.js.map +1 -1
- package/dist/components/launchpad/edition-mint-schema.cjs +1 -1
- package/dist/components/launchpad/edition-mint-schema.cjs.map +1 -1
- package/dist/components/launchpad/edition-mint-schema.d.cts +31 -35
- package/dist/components/launchpad/edition-mint-schema.d.ts +31 -35
- package/dist/components/launchpad/edition-mint-schema.js +1 -1
- package/dist/components/launchpad/edition-mint-schema.js.map +1 -1
- package/dist/components/launchpad/pop-create-fields.cjs.map +1 -1
- package/dist/components/launchpad/pop-create-fields.d.cts +3 -3
- package/dist/components/launchpad/pop-create-fields.d.ts +3 -3
- package/dist/components/launchpad/pop-create-fields.js.map +1 -1
- package/dist/components/launchpad/pop-create-schema.cjs.map +1 -1
- package/dist/components/launchpad/pop-create-schema.d.cts +6 -32
- package/dist/components/launchpad/pop-create-schema.d.ts +6 -32
- package/dist/components/launchpad/pop-create-schema.js.map +1 -1
- package/dist/components/launchpad/pop-create.cjs.map +1 -1
- package/dist/components/launchpad/pop-create.js.map +1 -1
- package/dist/components/launchpad/single-edition-mint.cjs +1 -1
- package/dist/components/launchpad/single-edition-mint.cjs.map +1 -1
- package/dist/components/launchpad/single-edition-mint.js +1 -1
- package/dist/components/launchpad/single-edition-mint.js.map +1 -1
- package/dist/components/launchpad/tier-mint-form.cjs +1 -1
- package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
- package/dist/components/launchpad/tier-mint-form.js +1 -1
- package/dist/components/launchpad/tier-mint-form.js.map +1 -1
- package/dist/components/launchpad-services.cjs +2 -2
- package/dist/components/launchpad-services.cjs.map +1 -1
- package/dist/components/launchpad-services.js +3 -3
- package/dist/components/launchpad-services.js.map +1 -1
- package/dist/components/lazy-panel.cjs +60 -0
- package/dist/components/lazy-panel.cjs.map +1 -0
- package/dist/components/lazy-panel.d.cts +14 -0
- package/dist/components/lazy-panel.d.ts +14 -0
- package/dist/components/lazy-panel.js +26 -0
- package/dist/components/lazy-panel.js.map +1 -0
- package/dist/components/listings-grid.cjs +9 -1
- package/dist/components/listings-grid.cjs.map +1 -1
- package/dist/components/listings-grid.d.cts +3 -2
- package/dist/components/listings-grid.d.ts +3 -2
- package/dist/components/listings-grid.js +9 -1
- package/dist/components/listings-grid.js.map +1 -1
- package/dist/components/markdown-renderer.cjs +49 -0
- package/dist/components/markdown-renderer.cjs.map +1 -0
- package/dist/components/markdown-renderer.d.cts +7 -0
- package/dist/components/markdown-renderer.d.ts +7 -0
- package/dist/components/markdown-renderer.js +19 -0
- package/dist/components/markdown-renderer.js.map +1 -0
- package/dist/components/markdown-text.cjs +3 -11
- package/dist/components/markdown-text.cjs.map +1 -1
- package/dist/components/markdown-text.js +3 -11
- package/dist/components/markdown-text.js.map +1 -1
- package/dist/components/marketplace/accept-offer-dialog.cjs +180 -0
- package/dist/components/marketplace/accept-offer-dialog.cjs.map +1 -0
- package/dist/components/marketplace/accept-offer-dialog.d.cts +17 -0
- package/dist/components/marketplace/accept-offer-dialog.d.ts +17 -0
- package/dist/components/marketplace/accept-offer-dialog.js +156 -0
- package/dist/components/marketplace/accept-offer-dialog.js.map +1 -0
- package/dist/components/marketplace/approve-mint-flow.cjs +85 -0
- package/dist/components/marketplace/approve-mint-flow.cjs.map +1 -0
- package/dist/components/marketplace/approve-mint-flow.d.cts +12 -0
- package/dist/components/marketplace/approve-mint-flow.d.ts +12 -0
- package/dist/components/marketplace/approve-mint-flow.js +61 -0
- package/dist/components/marketplace/approve-mint-flow.js.map +1 -0
- package/dist/components/marketplace/asset-market-actions.cjs +175 -0
- package/dist/components/marketplace/asset-market-actions.cjs.map +1 -0
- package/dist/components/marketplace/asset-market-actions.d.cts +9 -0
- package/dist/components/marketplace/asset-market-actions.d.ts +9 -0
- package/dist/components/marketplace/asset-market-actions.js +151 -0
- package/dist/components/marketplace/asset-market-actions.js.map +1 -0
- package/dist/components/marketplace/cancel-order-dialog.cjs +82 -0
- package/dist/components/marketplace/cancel-order-dialog.cjs.map +1 -0
- package/dist/components/marketplace/cancel-order-dialog.d.cts +17 -0
- package/dist/components/marketplace/cancel-order-dialog.d.ts +17 -0
- package/dist/components/marketplace/cancel-order-dialog.js +58 -0
- package/dist/components/marketplace/cancel-order-dialog.js.map +1 -0
- package/dist/components/marketplace/counter-offer-dialog.cjs +236 -0
- package/dist/components/marketplace/counter-offer-dialog.cjs.map +1 -0
- package/dist/components/marketplace/counter-offer-dialog.d.cts +16 -0
- package/dist/components/marketplace/counter-offer-dialog.d.ts +16 -0
- package/dist/components/marketplace/counter-offer-dialog.js +212 -0
- package/dist/components/marketplace/counter-offer-dialog.js.map +1 -0
- package/dist/components/marketplace/dialog-frame.cjs +65 -0
- package/dist/components/marketplace/dialog-frame.cjs.map +1 -0
- package/dist/components/marketplace/dialog-frame.d.cts +22 -0
- package/dist/components/marketplace/dialog-frame.d.ts +22 -0
- package/dist/components/marketplace/dialog-frame.js +38 -0
- package/dist/components/marketplace/dialog-frame.js.map +1 -0
- package/dist/components/marketplace/lazy-dialogs.cjs +66 -0
- package/dist/components/marketplace/lazy-dialogs.cjs.map +1 -0
- package/dist/components/marketplace/lazy-dialogs.d.cts +25 -0
- package/dist/components/marketplace/lazy-dialogs.d.ts +25 -0
- package/dist/components/marketplace/lazy-dialogs.js +26 -0
- package/dist/components/marketplace/lazy-dialogs.js.map +1 -0
- package/dist/components/marketplace/listing-dialog.cjs +183 -0
- package/dist/components/marketplace/listing-dialog.cjs.map +1 -0
- package/dist/components/marketplace/listing-dialog.d.cts +16 -0
- package/dist/components/marketplace/listing-dialog.d.ts +16 -0
- package/dist/components/marketplace/listing-dialog.js +159 -0
- package/dist/components/marketplace/listing-dialog.js.map +1 -0
- package/dist/components/marketplace/market-actions.cjs +59 -0
- package/dist/components/marketplace/market-actions.cjs.map +1 -0
- package/dist/components/marketplace/market-actions.d.cts +9 -0
- package/dist/components/marketplace/market-actions.d.ts +9 -0
- package/dist/components/marketplace/market-actions.js +35 -0
- package/dist/components/marketplace/market-actions.js.map +1 -0
- package/dist/components/marketplace/offer-dialog.cjs +194 -0
- package/dist/components/marketplace/offer-dialog.cjs.map +1 -0
- package/dist/components/marketplace/offer-dialog.d.cts +14 -0
- package/dist/components/marketplace/offer-dialog.d.ts +14 -0
- package/dist/components/marketplace/offer-dialog.js +170 -0
- package/dist/components/marketplace/offer-dialog.js.map +1 -0
- package/dist/components/marketplace/portfolio-actions.cjs +287 -0
- package/dist/components/marketplace/portfolio-actions.cjs.map +1 -0
- package/dist/components/marketplace/portfolio-actions.d.cts +16 -0
- package/dist/components/marketplace/portfolio-actions.d.ts +16 -0
- package/dist/components/marketplace/portfolio-actions.js +249 -0
- package/dist/components/marketplace/portfolio-actions.js.map +1 -0
- package/dist/components/marketplace/purchase-dialog.cjs +174 -0
- package/dist/components/marketplace/purchase-dialog.cjs.map +1 -0
- package/dist/components/marketplace/purchase-dialog.d.cts +12 -0
- package/dist/components/marketplace/purchase-dialog.d.ts +12 -0
- package/dist/components/marketplace/purchase-dialog.js +150 -0
- package/dist/components/marketplace/purchase-dialog.js.map +1 -0
- package/dist/components/marketplace/transfer-asset-dialog.cjs +74 -0
- package/dist/components/marketplace/transfer-asset-dialog.cjs.map +1 -0
- package/dist/components/marketplace/transfer-asset-dialog.d.cts +16 -0
- package/dist/components/marketplace/transfer-asset-dialog.d.ts +16 -0
- package/dist/components/marketplace/transfer-asset-dialog.js +50 -0
- package/dist/components/marketplace/transfer-asset-dialog.js.map +1 -0
- package/dist/components/marketplace-dialog-primitives.cjs +2 -2
- package/dist/components/marketplace-dialog-primitives.cjs.map +1 -1
- package/dist/components/marketplace-dialog-primitives.d.cts +9 -4
- package/dist/components/marketplace-dialog-primitives.d.ts +9 -4
- package/dist/components/marketplace-dialog-primitives.js +2 -2
- package/dist/components/marketplace-dialog-primitives.js.map +1 -1
- package/dist/components/media-wallet/media-wallet-overlay.cjs +3 -64
- package/dist/components/media-wallet/media-wallet-overlay.cjs.map +1 -1
- package/dist/components/media-wallet/media-wallet-overlay.js +4 -65
- package/dist/components/media-wallet/media-wallet-overlay.js.map +1 -1
- package/dist/components/media-wallet/media-wallet-panel.cjs +102 -0
- package/dist/components/media-wallet/media-wallet-panel.cjs.map +1 -0
- package/dist/components/media-wallet/media-wallet-panel.d.cts +14 -0
- package/dist/components/media-wallet/media-wallet-panel.d.ts +14 -0
- package/dist/components/media-wallet/media-wallet-panel.js +72 -0
- package/dist/components/media-wallet/media-wallet-panel.js.map +1 -0
- package/dist/components/media-wallet/success-dialog.cjs +1 -1
- package/dist/components/media-wallet/success-dialog.cjs.map +1 -1
- package/dist/components/media-wallet/success-dialog.js +1 -1
- package/dist/components/media-wallet/success-dialog.js.map +1 -1
- package/dist/components/medialane-app.cjs +24 -1
- package/dist/components/medialane-app.cjs.map +1 -1
- package/dist/components/medialane-app.d.cts +7 -1
- package/dist/components/medialane-app.d.ts +7 -1
- package/dist/components/medialane-app.js +13 -1
- package/dist/components/medialane-app.js.map +1 -1
- package/dist/components/motion-features.cjs +26 -0
- package/dist/components/motion-features.cjs.map +1 -0
- package/dist/components/motion-features.d.cts +2 -0
- package/dist/components/motion-features.d.ts +2 -0
- package/dist/components/motion-features.js +6 -0
- package/dist/components/motion-features.js.map +1 -0
- package/dist/components/motion-primitives.cjs +6 -6
- package/dist/components/motion-primitives.cjs.map +1 -1
- package/dist/components/motion-primitives.js +7 -7
- package/dist/components/motion-primitives.js.map +1 -1
- package/dist/components/nav-account-panel.cjs +75 -0
- package/dist/components/nav-account-panel.cjs.map +1 -0
- package/dist/components/nav-account-panel.d.cts +11 -0
- package/dist/components/nav-account-panel.d.ts +11 -0
- package/dist/components/nav-account-panel.js +55 -0
- package/dist/components/nav-account-panel.js.map +1 -0
- package/dist/components/nav-command-dialog.cjs +325 -0
- package/dist/components/nav-command-dialog.cjs.map +1 -0
- package/dist/components/nav-command-dialog.d.cts +11 -0
- package/dist/components/nav-command-dialog.d.ts +11 -0
- package/dist/components/nav-command-dialog.js +295 -0
- package/dist/components/nav-command-dialog.js.map +1 -0
- package/dist/components/nav-command-match.cjs +46 -0
- package/dist/components/nav-command-match.cjs.map +1 -0
- package/dist/components/nav-command-match.d.cts +9 -0
- package/dist/components/nav-command-match.d.ts +9 -0
- package/dist/components/nav-command-match.js +20 -0
- package/dist/components/nav-command-match.js.map +1 -0
- package/dist/components/nav-command-menu.cjs +5 -302
- package/dist/components/nav-command-menu.cjs.map +1 -1
- package/dist/components/nav-command-menu.d.cts +2 -4
- package/dist/components/nav-command-menu.d.ts +2 -4
- package/dist/components/nav-command-menu.js +5 -300
- package/dist/components/nav-command-menu.js.map +1 -1
- package/dist/components/nav-shell.cjs +3 -46
- package/dist/components/nav-shell.cjs.map +1 -1
- package/dist/components/nav-shell.js +4 -47
- package/dist/components/nav-shell.js.map +1 -1
- package/dist/components/portfolio-assets.cjs +2 -1
- package/dist/components/portfolio-assets.cjs.map +1 -1
- package/dist/components/portfolio-assets.d.cts +1 -1
- package/dist/components/portfolio-assets.d.ts +1 -1
- package/dist/components/portfolio-assets.js +2 -1
- package/dist/components/portfolio-assets.js.map +1 -1
- package/dist/components/portfolio-licensing-page.cjs +166 -0
- package/dist/components/portfolio-licensing-page.cjs.map +1 -0
- package/dist/components/portfolio-licensing-page.d.cts +5 -0
- package/dist/components/portfolio-licensing-page.d.ts +5 -0
- package/dist/components/portfolio-licensing-page.js +132 -0
- package/dist/components/portfolio-licensing-page.js.map +1 -0
- package/dist/components/portfolio-orders.cjs +8 -1
- package/dist/components/portfolio-orders.cjs.map +1 -1
- package/dist/components/portfolio-orders.d.cts +1 -1
- package/dist/components/portfolio-orders.d.ts +1 -1
- package/dist/components/portfolio-orders.js +8 -1
- package/dist/components/portfolio-orders.js.map +1 -1
- package/dist/components/rewards/rewards-dashboard.cjs +2 -2
- package/dist/components/rewards/rewards-dashboard.cjs.map +1 -1
- package/dist/components/rewards/rewards-dashboard.js +2 -2
- package/dist/components/rewards/rewards-dashboard.js.map +1 -1
- package/dist/data/launchpad-services.cjs +2 -2
- package/dist/data/launchpad-services.cjs.map +1 -1
- package/dist/data/launchpad-services.js +2 -2
- package/dist/data/launchpad-services.js.map +1 -1
- package/dist/data/nav-commands.cjs +1 -1
- package/dist/data/nav-commands.cjs.map +1 -1
- package/dist/data/nav-commands.js +1 -1
- package/dist/data/nav-commands.js.map +1 -1
- package/dist/i18n/catalog/pt.cjs +93 -7
- package/dist/i18n/catalog/pt.cjs.map +1 -1
- package/dist/i18n/catalog/pt.js +93 -7
- package/dist/i18n/catalog/pt.js.map +1 -1
- package/dist/index.cjs +121 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +82 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/app-client.cjs +60 -0
- package/dist/utils/app-client.cjs.map +1 -0
- package/dist/utils/app-client.d.cts +19 -0
- package/dist/utils/app-client.d.ts +19 -0
- package/dist/utils/app-client.js +38 -0
- package/dist/utils/app-client.js.map +1 -0
- package/dist/utils/duration-options.cjs +46 -0
- package/dist/utils/duration-options.cjs.map +1 -0
- package/dist/utils/duration-options.d.cts +40 -0
- package/dist/utils/duration-options.d.ts +40 -0
- package/dist/utils/duration-options.js +21 -0
- package/dist/utils/duration-options.js.map +1 -0
- package/dist/utils/launchpad-rules.d.cts +1 -1
- package/dist/utils/launchpad-rules.d.ts +1 -1
- package/dist/utils/marketplace/intents.cjs +178 -0
- package/dist/utils/marketplace/intents.cjs.map +1 -0
- package/dist/utils/marketplace/intents.d.cts +74 -0
- package/dist/utils/marketplace/intents.d.ts +74 -0
- package/dist/utils/marketplace/intents.js +148 -0
- package/dist/utils/marketplace/intents.js.map +1 -0
- package/dist/utils/marketplace/remix-approval.cjs +93 -0
- package/dist/utils/marketplace/remix-approval.cjs.map +1 -0
- package/dist/utils/marketplace/remix-approval.d.cts +26 -0
- package/dist/utils/marketplace/remix-approval.d.ts +26 -0
- package/dist/utils/marketplace/remix-approval.js +69 -0
- package/dist/utils/marketplace/remix-approval.js.map +1 -0
- package/dist/utils/marketplace/swap-intent.cjs +46 -0
- package/dist/utils/marketplace/swap-intent.cjs.map +1 -0
- package/dist/utils/marketplace/swap-intent.d.cts +18 -0
- package/dist/utils/marketplace/swap-intent.d.ts +18 -0
- package/dist/utils/marketplace/swap-intent.js +22 -0
- package/dist/utils/marketplace/swap-intent.js.map +1 -0
- package/dist/utils/marketplace/token-standard.cjs +46 -0
- package/dist/utils/marketplace/token-standard.cjs.map +1 -0
- package/dist/utils/marketplace/token-standard.d.cts +13 -0
- package/dist/utils/marketplace/token-standard.d.ts +13 -0
- package/dist/utils/marketplace/token-standard.js +20 -0
- package/dist/utils/marketplace/token-standard.js.map +1 -0
- package/dist/utils/marketplace/use-accept-offer.cjs +103 -0
- package/dist/utils/marketplace/use-accept-offer.cjs.map +1 -0
- package/dist/utils/marketplace/use-accept-offer.d.cts +132 -0
- package/dist/utils/marketplace/use-accept-offer.d.ts +132 -0
- package/dist/utils/marketplace/use-accept-offer.js +79 -0
- package/dist/utils/marketplace/use-accept-offer.js.map +1 -0
- package/dist/utils/marketplace/use-cancel-order.cjs +67 -0
- package/dist/utils/marketplace/use-cancel-order.cjs.map +1 -0
- package/dist/utils/marketplace/use-cancel-order.d.cts +74 -0
- package/dist/utils/marketplace/use-cancel-order.d.ts +74 -0
- package/dist/utils/marketplace/use-cancel-order.js +43 -0
- package/dist/utils/marketplace/use-cancel-order.js.map +1 -0
- package/dist/utils/marketplace/use-marketplace-transaction.cjs +80 -0
- package/dist/utils/marketplace/use-marketplace-transaction.cjs.map +1 -0
- package/dist/utils/marketplace/use-marketplace-transaction.d.cts +21 -0
- package/dist/utils/marketplace/use-marketplace-transaction.d.ts +21 -0
- package/dist/utils/marketplace/use-marketplace-transaction.js +55 -0
- package/dist/utils/marketplace/use-marketplace-transaction.js.map +1 -0
- package/dist/utils/marketplace/use-resolved-token-standard.cjs +40 -0
- package/dist/utils/marketplace/use-resolved-token-standard.cjs.map +1 -0
- package/dist/utils/marketplace/use-resolved-token-standard.d.cts +9 -0
- package/dist/utils/marketplace/use-resolved-token-standard.d.ts +9 -0
- package/dist/utils/marketplace/use-resolved-token-standard.js +16 -0
- package/dist/utils/marketplace/use-resolved-token-standard.js.map +1 -0
- package/dist/utils/media-wallet/confetti.cjs +6 -6
- package/dist/utils/media-wallet/confetti.cjs.map +1 -1
- package/dist/utils/media-wallet/confetti.d.cts +1 -1
- package/dist/utils/media-wallet/confetti.d.ts +1 -1
- package/dist/utils/media-wallet/confetti.js +2 -2
- package/dist/utils/media-wallet/confetti.js.map +1 -1
- package/dist/utils/media-wallet/use-erc20-balance.cjs +0 -1
- package/dist/utils/media-wallet/use-erc20-balance.cjs.map +1 -1
- package/dist/utils/media-wallet/use-erc20-balance.d.cts +1 -1
- package/dist/utils/media-wallet/use-erc20-balance.d.ts +1 -1
- package/dist/utils/media-wallet/use-erc20-balance.js +0 -1
- package/dist/utils/media-wallet/use-erc20-balance.js.map +1 -1
- package/dist/utils/order-form.d.cts +5 -23
- package/dist/utils/order-form.d.ts +5 -23
- package/dist/utils/security-headers.cjs +58 -0
- package/dist/utils/security-headers.cjs.map +1 -0
- package/dist/utils/security-headers.d.cts +16 -0
- package/dist/utils/security-headers.d.ts +16 -0
- package/dist/utils/security-headers.js +34 -0
- package/dist/utils/security-headers.js.map +1 -0
- package/dist/utils/seo.cjs +100 -0
- package/dist/utils/seo.cjs.map +1 -0
- package/dist/utils/seo.d.cts +55 -0
- package/dist/utils/seo.d.ts +55 -0
- package/dist/utils/seo.js +75 -0
- package/dist/utils/seo.js.map +1 -0
- package/dist/utils/use-accounts.cjs +1 -1
- package/dist/utils/use-accounts.cjs.map +1 -1
- package/dist/utils/use-accounts.js +1 -1
- package/dist/utils/use-accounts.js.map +1 -1
- package/dist/utils/use-activities.cjs +2 -4
- package/dist/utils/use-activities.cjs.map +1 -1
- package/dist/utils/use-activities.js +2 -4
- package/dist/utils/use-activities.js.map +1 -1
- package/dist/utils/use-coin-guarantees.cjs +1 -1
- package/dist/utils/use-coin-guarantees.cjs.map +1 -1
- package/dist/utils/use-coin-guarantees.js +1 -1
- package/dist/utils/use-coin-guarantees.js.map +1 -1
- package/dist/utils/use-coin-price.cjs +1 -1
- package/dist/utils/use-coin-price.cjs.map +1 -1
- package/dist/utils/use-coin-price.js +1 -1
- package/dist/utils/use-coin-price.js.map +1 -1
- package/dist/utils/use-coin-supply.cjs +1 -1
- package/dist/utils/use-coin-supply.cjs.map +1 -1
- package/dist/utils/use-coin-supply.js +1 -1
- package/dist/utils/use-coin-supply.js.map +1 -1
- package/dist/utils/use-collections.cjs +3 -6
- package/dist/utils/use-collections.cjs.map +1 -1
- package/dist/utils/use-collections.js +3 -6
- package/dist/utils/use-collections.js.map +1 -1
- package/dist/utils/use-comments.cjs +1 -1
- package/dist/utils/use-comments.cjs.map +1 -1
- package/dist/utils/use-comments.js +1 -1
- package/dist/utils/use-comments.js.map +1 -1
- package/dist/utils/use-confetti.cjs +1 -1
- package/dist/utils/use-confetti.cjs.map +1 -1
- package/dist/utils/use-confetti.js +1 -1
- package/dist/utils/use-confetti.js.map +1 -1
- package/dist/utils/use-drops.cjs +2 -2
- package/dist/utils/use-drops.cjs.map +1 -1
- package/dist/utils/use-drops.js +2 -2
- package/dist/utils/use-drops.js.map +1 -1
- package/dist/utils/use-full-token-data.cjs +1 -1
- package/dist/utils/use-full-token-data.cjs.map +1 -1
- package/dist/utils/use-full-token-data.js +1 -1
- package/dist/utils/use-full-token-data.js.map +1 -1
- package/dist/utils/use-gated-content.cjs +56 -0
- package/dist/utils/use-gated-content.cjs.map +1 -0
- package/dist/utils/use-gated-content.d.cts +7 -0
- package/dist/utils/use-gated-content.d.ts +7 -0
- package/dist/utils/use-gated-content.js +22 -0
- package/dist/utils/use-gated-content.js.map +1 -0
- package/dist/utils/use-my-remix-offers.cjs +0 -1
- package/dist/utils/use-my-remix-offers.cjs.map +1 -1
- package/dist/utils/use-my-remix-offers.js +0 -1
- package/dist/utils/use-my-remix-offers.js.map +1 -1
- package/dist/utils/use-my-username-claim.cjs +52 -0
- package/dist/utils/use-my-username-claim.cjs.map +1 -0
- package/dist/utils/use-my-username-claim.d.cts +15 -0
- package/dist/utils/use-my-username-claim.d.ts +15 -0
- package/dist/utils/use-my-username-claim.js +18 -0
- package/dist/utils/use-my-username-claim.js.map +1 -0
- package/dist/utils/use-orders.cjs +7 -9
- package/dist/utils/use-orders.cjs.map +1 -1
- package/dist/utils/use-orders.js +7 -9
- package/dist/utils/use-orders.js.map +1 -1
- package/dist/utils/use-platform-stats.cjs +1 -1
- package/dist/utils/use-platform-stats.cjs.map +1 -1
- package/dist/utils/use-platform-stats.js +1 -1
- package/dist/utils/use-platform-stats.js.map +1 -1
- package/dist/utils/use-pop.cjs +3 -5
- package/dist/utils/use-pop.cjs.map +1 -1
- package/dist/utils/use-pop.js +3 -5
- package/dist/utils/use-pop.js.map +1 -1
- package/dist/utils/use-profiles.cjs +3 -4
- package/dist/utils/use-profiles.cjs.map +1 -1
- package/dist/utils/use-profiles.js +3 -4
- package/dist/utils/use-profiles.js.map +1 -1
- package/dist/utils/use-remix-offers.cjs +1 -2
- package/dist/utils/use-remix-offers.cjs.map +1 -1
- package/dist/utils/use-remix-offers.js +1 -2
- package/dist/utils/use-remix-offers.js.map +1 -1
- package/dist/utils/use-rewards.cjs +5 -5
- package/dist/utils/use-rewards.cjs.map +1 -1
- package/dist/utils/use-rewards.js +5 -5
- package/dist/utils/use-rewards.js.map +1 -1
- package/dist/utils/use-search.cjs +1 -1
- package/dist/utils/use-search.cjs.map +1 -1
- package/dist/utils/use-search.js +1 -1
- package/dist/utils/use-search.js.map +1 -1
- package/dist/utils/use-sponsorship.cjs +6 -12
- package/dist/utils/use-sponsorship.cjs.map +1 -1
- package/dist/utils/use-sponsorship.js +6 -12
- package/dist/utils/use-sponsorship.js.map +1 -1
- package/dist/utils/use-swap-quote.cjs +0 -1
- package/dist/utils/use-swap-quote.cjs.map +1 -1
- package/dist/utils/use-swap-quote.js +0 -1
- package/dist/utils/use-swap-quote.js.map +1 -1
- package/dist/utils/use-tiers.cjs +6 -7
- package/dist/utils/use-tiers.cjs.map +1 -1
- package/dist/utils/use-tiers.js +6 -7
- package/dist/utils/use-tiers.js.map +1 -1
- package/dist/utils/use-tokens-by-ip-type.cjs +1 -2
- package/dist/utils/use-tokens-by-ip-type.cjs.map +1 -1
- package/dist/utils/use-tokens-by-ip-type.js +1 -2
- package/dist/utils/use-tokens-by-ip-type.js.map +1 -1
- package/dist/utils/use-tokens.cjs +4 -7
- package/dist/utils/use-tokens.cjs.map +1 -1
- package/dist/utils/use-tokens.js +4 -7
- package/dist/utils/use-tokens.js.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { TransactionPhase } from '../use-transaction.js';
|
|
2
|
+
import { ApiOrder } from '@medialane/sdk';
|
|
3
|
+
import '@medialane/sdk/starknet';
|
|
4
|
+
import '../../components/fast-mint/types.js';
|
|
5
|
+
import 'starknet';
|
|
6
|
+
|
|
7
|
+
interface UseCancelOrderOptions {
|
|
8
|
+
onSuccess?: () => void;
|
|
9
|
+
tokenStandard?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function useCancelOrder({ onSuccess, tokenStandard }: UseCancelOrderOptions): {
|
|
12
|
+
order: {
|
|
13
|
+
id: string;
|
|
14
|
+
chain: string;
|
|
15
|
+
orderHash: string;
|
|
16
|
+
offerer: string;
|
|
17
|
+
offer: {
|
|
18
|
+
itemType: string;
|
|
19
|
+
token: string;
|
|
20
|
+
identifier: string;
|
|
21
|
+
startAmount: string;
|
|
22
|
+
endAmount: string;
|
|
23
|
+
};
|
|
24
|
+
consideration: {
|
|
25
|
+
itemType: string;
|
|
26
|
+
token: string;
|
|
27
|
+
identifier: string;
|
|
28
|
+
startAmount: string;
|
|
29
|
+
endAmount: string;
|
|
30
|
+
recipient: string;
|
|
31
|
+
};
|
|
32
|
+
startTime: string;
|
|
33
|
+
endTime: string;
|
|
34
|
+
status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
|
|
35
|
+
fulfiller: string | null;
|
|
36
|
+
nftContract: string | null;
|
|
37
|
+
nftTokenId: string | null;
|
|
38
|
+
price: {
|
|
39
|
+
raw: string | null;
|
|
40
|
+
formatted: string | null;
|
|
41
|
+
currency: string | null;
|
|
42
|
+
decimals: number;
|
|
43
|
+
};
|
|
44
|
+
txHash: {
|
|
45
|
+
created: string | null;
|
|
46
|
+
fulfilled: string | null;
|
|
47
|
+
cancelled: string | null;
|
|
48
|
+
};
|
|
49
|
+
createdBlockNumber: string;
|
|
50
|
+
remainingAmount: string | null;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
token: {
|
|
54
|
+
name: string | null;
|
|
55
|
+
image: string | null;
|
|
56
|
+
description: string | null;
|
|
57
|
+
animationUrl: string | null;
|
|
58
|
+
} | null;
|
|
59
|
+
parentOrderHash?: string | null | undefined;
|
|
60
|
+
counterOfferMessage?: string | null | undefined;
|
|
61
|
+
hasActiveCounterOffer?: boolean | undefined;
|
|
62
|
+
} | null;
|
|
63
|
+
select: (next: ApiOrder) => void;
|
|
64
|
+
confirm: () => void;
|
|
65
|
+
dismiss: () => void;
|
|
66
|
+
phase: TransactionPhase;
|
|
67
|
+
busy: boolean;
|
|
68
|
+
txHash: string | null;
|
|
69
|
+
error: string | null;
|
|
70
|
+
retryable: boolean;
|
|
71
|
+
};
|
|
72
|
+
type CancelOrderHook = ReturnType<typeof useCancelOrder>;
|
|
73
|
+
|
|
74
|
+
export { type CancelOrderHook, useCancelOrder };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMarketplaceTransaction } from "./use-marketplace-transaction.js";
|
|
3
|
+
import { cancelOrder } from "./intents.js";
|
|
4
|
+
import { orderNftStandard } from "./token-standard.js";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
function useCancelOrder({ onSuccess, tokenStandard }) {
|
|
7
|
+
const tx = useMarketplaceTransaction();
|
|
8
|
+
const [order, setOrder] = useState(null);
|
|
9
|
+
const select = (next) => {
|
|
10
|
+
tx.reset();
|
|
11
|
+
setOrder(next);
|
|
12
|
+
};
|
|
13
|
+
const confirm = () => {
|
|
14
|
+
if (!order) return;
|
|
15
|
+
const target = order;
|
|
16
|
+
void tx.start((ctx) => cancelOrder(ctx, {
|
|
17
|
+
orderHash: target.orderHash,
|
|
18
|
+
tokenStandard: tokenStandard ?? orderNftStandard(target)
|
|
19
|
+
})).then((ok) => {
|
|
20
|
+
if (ok) onSuccess?.();
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const dismiss = () => {
|
|
24
|
+
if (tx.busy) return;
|
|
25
|
+
tx.reset();
|
|
26
|
+
setOrder(null);
|
|
27
|
+
};
|
|
28
|
+
return {
|
|
29
|
+
order,
|
|
30
|
+
select,
|
|
31
|
+
confirm,
|
|
32
|
+
dismiss,
|
|
33
|
+
phase: tx.phase,
|
|
34
|
+
busy: tx.busy,
|
|
35
|
+
txHash: tx.txHash,
|
|
36
|
+
error: tx.error,
|
|
37
|
+
retryable: tx.retryable
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
useCancelOrder
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=use-cancel-order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/marketplace/use-cancel-order.ts"],"sourcesContent":["\"use client\";\n\nimport { useMarketplaceTransaction } from \"./use-marketplace-transaction.js\";\nimport { cancelOrder } from \"./intents.js\";\nimport { orderNftStandard } from \"./token-standard.js\";\nimport { useState } from \"react\";\nimport type { ApiOrder } from \"@medialane/sdk\";\n\ninterface UseCancelOrderOptions {\n onSuccess?: () => void;\n tokenStandard?: string;\n}\n\nexport function useCancelOrder({ onSuccess, tokenStandard }: UseCancelOrderOptions) {\n const tx = useMarketplaceTransaction();\n const [order, setOrder] = useState<ApiOrder | null>(null);\n\n const select = (next: ApiOrder) => {\n tx.reset();\n setOrder(next);\n };\n\n const confirm = () => {\n if (!order) return;\n const target = order;\n void tx\n .start((ctx) => cancelOrder(ctx, {\n orderHash: target.orderHash,\n tokenStandard: tokenStandard ?? orderNftStandard(target),\n }))\n .then((ok) => { if (ok) onSuccess?.(); });\n };\n\n const dismiss = () => {\n if (tx.busy) return;\n tx.reset();\n setOrder(null);\n };\n\n return {\n order,\n select,\n confirm,\n dismiss,\n phase: tx.phase,\n busy: tx.busy,\n txHash: tx.txHash,\n error: tx.error,\n retryable: tx.retryable,\n };\n}\n\nexport type CancelOrderHook = ReturnType<typeof useCancelOrder>;\n"],"mappings":";AAEA,SAAS,iCAAiC;AAC1C,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AAQlB,SAAS,eAAe,EAAE,WAAW,cAAc,GAA0B;AAClF,QAAM,KAAK,0BAA0B;AACrC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA0B,IAAI;AAExD,QAAM,SAAS,CAAC,SAAmB;AACjC,OAAG,MAAM;AACT,aAAS,IAAI;AAAA,EACf;AAEA,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,MAAO;AACZ,UAAM,SAAS;AACf,SAAK,GACF,MAAM,CAAC,QAAQ,YAAY,KAAK;AAAA,MAC/B,WAAW,OAAO;AAAA,MAClB,eAAe,iBAAiB,iBAAiB,MAAM;AAAA,IACzD,CAAC,CAAC,EACD,KAAK,CAAC,OAAO;AAAE,UAAI,GAAI,aAAY;AAAA,IAAG,CAAC;AAAA,EAC5C;AAEA,QAAM,UAAU,MAAM;AACpB,QAAI,GAAG,KAAM;AACb,OAAG,MAAM;AACT,aAAS,IAAI;AAAA,EACf;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,GAAG;AAAA,IACV,MAAM,GAAG;AAAA,IACT,QAAQ,GAAG;AAAA,IACX,OAAO,GAAG;AAAA,IACV,WAAW,GAAG;AAAA,EAChB;AACF;","names":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var use_marketplace_transaction_exports = {};
|
|
21
|
+
__export(use_marketplace_transaction_exports, {
|
|
22
|
+
isMarketplaceKey: () => isMarketplaceKey,
|
|
23
|
+
useMarketplaceTransaction: () => useMarketplaceTransaction
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(use_marketplace_transaction_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_swr = require("swr");
|
|
28
|
+
var import_use_transaction = require("../use-transaction.js");
|
|
29
|
+
var import_use_medialane_client = require("../use-medialane-client.js");
|
|
30
|
+
var import_query_keys = require("../query-keys.js");
|
|
31
|
+
const MARKETPLACE_PREFIXES = [
|
|
32
|
+
import_query_keys.QUERY_PREFIX.order,
|
|
33
|
+
import_query_keys.QUERY_PREFIX.listings,
|
|
34
|
+
import_query_keys.QUERY_PREFIX.userOrders,
|
|
35
|
+
import_query_keys.QUERY_PREFIX.token,
|
|
36
|
+
import_query_keys.QUERY_PREFIX.tokensOwned,
|
|
37
|
+
import_query_keys.QUERY_PREFIX.counterOffers
|
|
38
|
+
].map((prefix) => `${prefix}-`);
|
|
39
|
+
function isMarketplaceKey(key) {
|
|
40
|
+
if (typeof key !== "string") return false;
|
|
41
|
+
return key.includes(`"op":"${import_query_keys.QUERY_PREFIX.orders}"`) || MARKETPLACE_PREFIXES.some((prefix) => key.startsWith(prefix));
|
|
42
|
+
}
|
|
43
|
+
function useInvalidateMarketplace() {
|
|
44
|
+
const { mutate } = (0, import_swr.useSWRConfig)();
|
|
45
|
+
return (0, import_react.useCallback)(() => {
|
|
46
|
+
void mutate(isMarketplaceKey);
|
|
47
|
+
}, [mutate]);
|
|
48
|
+
}
|
|
49
|
+
function useMarketplaceTransaction(useTx = import_use_transaction.useTransaction) {
|
|
50
|
+
const tx = useTx();
|
|
51
|
+
const client = (0, import_use_medialane_client.useMedialaneClient)();
|
|
52
|
+
const invalidate = useInvalidateMarketplace();
|
|
53
|
+
const { run } = tx;
|
|
54
|
+
const start = (0, import_react.useCallback)(
|
|
55
|
+
async (work) => {
|
|
56
|
+
const ok = await run(async (signer) => {
|
|
57
|
+
await work({ client, signer });
|
|
58
|
+
});
|
|
59
|
+
invalidate();
|
|
60
|
+
return ok;
|
|
61
|
+
},
|
|
62
|
+
[run, client, invalidate]
|
|
63
|
+
);
|
|
64
|
+
return {
|
|
65
|
+
phase: tx.phase,
|
|
66
|
+
busy: (0, import_use_transaction.isBusyPhase)(tx.phase),
|
|
67
|
+
txHash: tx.txHash,
|
|
68
|
+
error: tx.error,
|
|
69
|
+
retryable: tx.retryable,
|
|
70
|
+
failedAfterSubmit: tx.phase === "error" && tx.txHash !== null,
|
|
71
|
+
start,
|
|
72
|
+
reset: tx.reset
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
+
0 && (module.exports = {
|
|
77
|
+
isMarketplaceKey,
|
|
78
|
+
useMarketplaceTransaction
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=use-marketplace-transaction.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/marketplace/use-marketplace-transaction.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback } from \"react\";\nimport { useSWRConfig } from \"swr\";\nimport { isBusyPhase, useTransaction } from \"../use-transaction.js\";\nimport { useMedialaneClient } from \"../use-medialane-client.js\";\nimport { QUERY_PREFIX } from \"../query-keys.js\";\nimport type { MarketplaceContext } from \"./intents.js\";\n\nconst MARKETPLACE_PREFIXES = [\n QUERY_PREFIX.order,\n QUERY_PREFIX.listings,\n QUERY_PREFIX.userOrders,\n QUERY_PREFIX.token,\n QUERY_PREFIX.tokensOwned,\n QUERY_PREFIX.counterOffers,\n].map((prefix) => `${prefix}-`);\n\nexport function isMarketplaceKey(key: unknown): boolean {\n if (typeof key !== \"string\") return false;\n return key.includes(`\"op\":\"${QUERY_PREFIX.orders}\"`) || MARKETPLACE_PREFIXES.some((prefix) => key.startsWith(prefix));\n}\n\nfunction useInvalidateMarketplace(): () => void {\n const { mutate } = useSWRConfig();\n return useCallback(() => {\n void mutate(isMarketplaceKey);\n }, [mutate]);\n}\n\ntype TransactionHook = () => Pick<ReturnType<typeof useTransaction>, \"phase\" | \"txHash\" | \"error\" | \"retryable\" | \"run\" | \"reset\">;\n\nexport function useMarketplaceTransaction(useTx: TransactionHook = useTransaction) {\n const tx = useTx();\n const client = useMedialaneClient();\n const invalidate = useInvalidateMarketplace();\n const { run } = tx;\n\n const start = useCallback(\n async (work: (ctx: MarketplaceContext) => Promise<unknown>): Promise<boolean> => {\n const ok = await run(async (signer) => {\n await work({ client, signer });\n });\n invalidate();\n return ok;\n },\n [run, client, invalidate],\n );\n\n return {\n phase: tx.phase,\n busy: isBusyPhase(tx.phase),\n txHash: tx.txHash,\n error: tx.error,\n retryable: tx.retryable,\n failedAfterSubmit: tx.phase === \"error\" && tx.txHash !== null,\n start,\n reset: tx.reset,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA4B;AAC5B,iBAA6B;AAC7B,6BAA4C;AAC5C,kCAAmC;AACnC,wBAA6B;AAG7B,MAAM,uBAAuB;AAAA,EAC3B,+BAAa;AAAA,EACb,+BAAa;AAAA,EACb,+BAAa;AAAA,EACb,+BAAa;AAAA,EACb,+BAAa;AAAA,EACb,+BAAa;AACf,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,GAAG;AAEvB,SAAS,iBAAiB,KAAuB;AACtD,MAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,SAAO,IAAI,SAAS,SAAS,+BAAa,MAAM,GAAG,KAAK,qBAAqB,KAAK,CAAC,WAAW,IAAI,WAAW,MAAM,CAAC;AACtH;AAEA,SAAS,2BAAuC;AAC9C,QAAM,EAAE,OAAO,QAAI,yBAAa;AAChC,aAAO,0BAAY,MAAM;AACvB,SAAK,OAAO,gBAAgB;AAAA,EAC9B,GAAG,CAAC,MAAM,CAAC;AACb;AAIO,SAAS,0BAA0B,QAAyB,uCAAgB;AACjF,QAAM,KAAK,MAAM;AACjB,QAAM,aAAS,gDAAmB;AAClC,QAAM,aAAa,yBAAyB;AAC5C,QAAM,EAAE,IAAI,IAAI;AAEhB,QAAM,YAAQ;AAAA,IACZ,OAAO,SAA0E;AAC/E,YAAM,KAAK,MAAM,IAAI,OAAO,WAAW;AACrC,cAAM,KAAK,EAAE,QAAQ,OAAO,CAAC;AAAA,MAC/B,CAAC;AACD,iBAAW;AACX,aAAO;AAAA,IACT;AAAA,IACA,CAAC,KAAK,QAAQ,UAAU;AAAA,EAC1B;AAEA,SAAO;AAAA,IACL,OAAO,GAAG;AAAA,IACV,UAAM,oCAAY,GAAG,KAAK;AAAA,IAC1B,QAAQ,GAAG;AAAA,IACX,OAAO,GAAG;AAAA,IACV,WAAW,GAAG;AAAA,IACd,mBAAmB,GAAG,UAAU,WAAW,GAAG,WAAW;AAAA,IACzD;AAAA,IACA,OAAO,GAAG;AAAA,EACZ;AACF;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useTransaction, TransactionPhase } from '../use-transaction.cjs';
|
|
2
|
+
import { MarketplaceContext } from './intents.cjs';
|
|
3
|
+
import '@medialane/sdk/starknet';
|
|
4
|
+
import '../../components/fast-mint/types.cjs';
|
|
5
|
+
import 'starknet';
|
|
6
|
+
import '@medialane/sdk';
|
|
7
|
+
|
|
8
|
+
declare function isMarketplaceKey(key: unknown): boolean;
|
|
9
|
+
type TransactionHook = () => Pick<ReturnType<typeof useTransaction>, "phase" | "txHash" | "error" | "retryable" | "run" | "reset">;
|
|
10
|
+
declare function useMarketplaceTransaction(useTx?: TransactionHook): {
|
|
11
|
+
phase: TransactionPhase;
|
|
12
|
+
busy: boolean;
|
|
13
|
+
txHash: string | null;
|
|
14
|
+
error: string | null;
|
|
15
|
+
retryable: boolean;
|
|
16
|
+
failedAfterSubmit: boolean;
|
|
17
|
+
start: (work: (ctx: MarketplaceContext) => Promise<unknown>) => Promise<boolean>;
|
|
18
|
+
reset: () => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { isMarketplaceKey, useMarketplaceTransaction };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useTransaction, TransactionPhase } from '../use-transaction.js';
|
|
2
|
+
import { MarketplaceContext } from './intents.js';
|
|
3
|
+
import '@medialane/sdk/starknet';
|
|
4
|
+
import '../../components/fast-mint/types.js';
|
|
5
|
+
import 'starknet';
|
|
6
|
+
import '@medialane/sdk';
|
|
7
|
+
|
|
8
|
+
declare function isMarketplaceKey(key: unknown): boolean;
|
|
9
|
+
type TransactionHook = () => Pick<ReturnType<typeof useTransaction>, "phase" | "txHash" | "error" | "retryable" | "run" | "reset">;
|
|
10
|
+
declare function useMarketplaceTransaction(useTx?: TransactionHook): {
|
|
11
|
+
phase: TransactionPhase;
|
|
12
|
+
busy: boolean;
|
|
13
|
+
txHash: string | null;
|
|
14
|
+
error: string | null;
|
|
15
|
+
retryable: boolean;
|
|
16
|
+
failedAfterSubmit: boolean;
|
|
17
|
+
start: (work: (ctx: MarketplaceContext) => Promise<unknown>) => Promise<boolean>;
|
|
18
|
+
reset: () => void;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { isMarketplaceKey, useMarketplaceTransaction };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useSWRConfig } from "swr";
|
|
4
|
+
import { isBusyPhase, useTransaction } from "../use-transaction.js";
|
|
5
|
+
import { useMedialaneClient } from "../use-medialane-client.js";
|
|
6
|
+
import { QUERY_PREFIX } from "../query-keys.js";
|
|
7
|
+
const MARKETPLACE_PREFIXES = [
|
|
8
|
+
QUERY_PREFIX.order,
|
|
9
|
+
QUERY_PREFIX.listings,
|
|
10
|
+
QUERY_PREFIX.userOrders,
|
|
11
|
+
QUERY_PREFIX.token,
|
|
12
|
+
QUERY_PREFIX.tokensOwned,
|
|
13
|
+
QUERY_PREFIX.counterOffers
|
|
14
|
+
].map((prefix) => `${prefix}-`);
|
|
15
|
+
function isMarketplaceKey(key) {
|
|
16
|
+
if (typeof key !== "string") return false;
|
|
17
|
+
return key.includes(`"op":"${QUERY_PREFIX.orders}"`) || MARKETPLACE_PREFIXES.some((prefix) => key.startsWith(prefix));
|
|
18
|
+
}
|
|
19
|
+
function useInvalidateMarketplace() {
|
|
20
|
+
const { mutate } = useSWRConfig();
|
|
21
|
+
return useCallback(() => {
|
|
22
|
+
void mutate(isMarketplaceKey);
|
|
23
|
+
}, [mutate]);
|
|
24
|
+
}
|
|
25
|
+
function useMarketplaceTransaction(useTx = useTransaction) {
|
|
26
|
+
const tx = useTx();
|
|
27
|
+
const client = useMedialaneClient();
|
|
28
|
+
const invalidate = useInvalidateMarketplace();
|
|
29
|
+
const { run } = tx;
|
|
30
|
+
const start = useCallback(
|
|
31
|
+
async (work) => {
|
|
32
|
+
const ok = await run(async (signer) => {
|
|
33
|
+
await work({ client, signer });
|
|
34
|
+
});
|
|
35
|
+
invalidate();
|
|
36
|
+
return ok;
|
|
37
|
+
},
|
|
38
|
+
[run, client, invalidate]
|
|
39
|
+
);
|
|
40
|
+
return {
|
|
41
|
+
phase: tx.phase,
|
|
42
|
+
busy: isBusyPhase(tx.phase),
|
|
43
|
+
txHash: tx.txHash,
|
|
44
|
+
error: tx.error,
|
|
45
|
+
retryable: tx.retryable,
|
|
46
|
+
failedAfterSubmit: tx.phase === "error" && tx.txHash !== null,
|
|
47
|
+
start,
|
|
48
|
+
reset: tx.reset
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
isMarketplaceKey,
|
|
53
|
+
useMarketplaceTransaction
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=use-marketplace-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/marketplace/use-marketplace-transaction.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback } from \"react\";\nimport { useSWRConfig } from \"swr\";\nimport { isBusyPhase, useTransaction } from \"../use-transaction.js\";\nimport { useMedialaneClient } from \"../use-medialane-client.js\";\nimport { QUERY_PREFIX } from \"../query-keys.js\";\nimport type { MarketplaceContext } from \"./intents.js\";\n\nconst MARKETPLACE_PREFIXES = [\n QUERY_PREFIX.order,\n QUERY_PREFIX.listings,\n QUERY_PREFIX.userOrders,\n QUERY_PREFIX.token,\n QUERY_PREFIX.tokensOwned,\n QUERY_PREFIX.counterOffers,\n].map((prefix) => `${prefix}-`);\n\nexport function isMarketplaceKey(key: unknown): boolean {\n if (typeof key !== \"string\") return false;\n return key.includes(`\"op\":\"${QUERY_PREFIX.orders}\"`) || MARKETPLACE_PREFIXES.some((prefix) => key.startsWith(prefix));\n}\n\nfunction useInvalidateMarketplace(): () => void {\n const { mutate } = useSWRConfig();\n return useCallback(() => {\n void mutate(isMarketplaceKey);\n }, [mutate]);\n}\n\ntype TransactionHook = () => Pick<ReturnType<typeof useTransaction>, \"phase\" | \"txHash\" | \"error\" | \"retryable\" | \"run\" | \"reset\">;\n\nexport function useMarketplaceTransaction(useTx: TransactionHook = useTransaction) {\n const tx = useTx();\n const client = useMedialaneClient();\n const invalidate = useInvalidateMarketplace();\n const { run } = tx;\n\n const start = useCallback(\n async (work: (ctx: MarketplaceContext) => Promise<unknown>): Promise<boolean> => {\n const ok = await run(async (signer) => {\n await work({ client, signer });\n });\n invalidate();\n return ok;\n },\n [run, client, invalidate],\n );\n\n return {\n phase: tx.phase,\n busy: isBusyPhase(tx.phase),\n txHash: tx.txHash,\n error: tx.error,\n retryable: tx.retryable,\n failedAfterSubmit: tx.phase === \"error\" && tx.txHash !== null,\n start,\n reset: tx.reset,\n };\n}\n"],"mappings":";AAEA,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,aAAa,sBAAsB;AAC5C,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAG7B,MAAM,uBAAuB;AAAA,EAC3B,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AACf,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM,GAAG;AAEvB,SAAS,iBAAiB,KAAuB;AACtD,MAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,SAAO,IAAI,SAAS,SAAS,aAAa,MAAM,GAAG,KAAK,qBAAqB,KAAK,CAAC,WAAW,IAAI,WAAW,MAAM,CAAC;AACtH;AAEA,SAAS,2BAAuC;AAC9C,QAAM,EAAE,OAAO,IAAI,aAAa;AAChC,SAAO,YAAY,MAAM;AACvB,SAAK,OAAO,gBAAgB;AAAA,EAC9B,GAAG,CAAC,MAAM,CAAC;AACb;AAIO,SAAS,0BAA0B,QAAyB,gBAAgB;AACjF,QAAM,KAAK,MAAM;AACjB,QAAM,SAAS,mBAAmB;AAClC,QAAM,aAAa,yBAAyB;AAC5C,QAAM,EAAE,IAAI,IAAI;AAEhB,QAAM,QAAQ;AAAA,IACZ,OAAO,SAA0E;AAC/E,YAAM,KAAK,MAAM,IAAI,OAAO,WAAW;AACrC,cAAM,KAAK,EAAE,QAAQ,OAAO,CAAC;AAAA,MAC/B,CAAC;AACD,iBAAW;AACX,aAAO;AAAA,IACT;AAAA,IACA,CAAC,KAAK,QAAQ,UAAU;AAAA,EAC1B;AAEA,SAAO;AAAA,IACL,OAAO,GAAG;AAAA,IACV,MAAM,YAAY,GAAG,KAAK;AAAA,IAC1B,QAAQ,GAAG;AAAA,IACX,OAAO,GAAG;AAAA,IACV,WAAW,GAAG;AAAA,IACd,mBAAmB,GAAG,UAAU,WAAW,GAAG,WAAW;AAAA,IACzD;AAAA,IACA,OAAO,GAAG;AAAA,EACZ;AACF;","names":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var use_resolved_token_standard_exports = {};
|
|
21
|
+
__export(use_resolved_token_standard_exports, {
|
|
22
|
+
useResolvedTokenStandard: () => useResolvedTokenStandard
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(use_resolved_token_standard_exports);
|
|
25
|
+
var import_use_collections = require("../use-collections.js");
|
|
26
|
+
var import_token_standard = require("./token-standard.js");
|
|
27
|
+
function useResolvedTokenStandard(contractAddress, tokenStandard) {
|
|
28
|
+
const needsFetch = tokenStandard == null;
|
|
29
|
+
const { collection, isLoading } = (0, import_use_collections.useCollection)(needsFetch ? contractAddress : null);
|
|
30
|
+
return {
|
|
31
|
+
tokenStandard: (0, import_token_standard.resolveTokenStandard)(tokenStandard, collection?.standard),
|
|
32
|
+
collectionStandard: collection?.standard,
|
|
33
|
+
isResolving: needsFetch && isLoading
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
useResolvedTokenStandard
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=use-resolved-token-standard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/marketplace/use-resolved-token-standard.ts"],"sourcesContent":["\"use client\";\n\nimport { useCollection } from \"../use-collections.js\";\nimport { resolveTokenStandard, type TokenStandard } from \"./token-standard.js\";\n\n\nexport function useResolvedTokenStandard(\n contractAddress: string | null,\n tokenStandard?: string | null\n): {\n tokenStandard: TokenStandard;\n collectionStandard: string | null | undefined;\n isResolving: boolean;\n} {\n\n const needsFetch = tokenStandard == null;\n const { collection, isLoading } = useCollection(needsFetch ? contractAddress : null);\n return {\n tokenStandard: resolveTokenStandard(tokenStandard, collection?.standard),\n collectionStandard: collection?.standard,\n isResolving: needsFetch && isLoading,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,6BAA8B;AAC9B,4BAAyD;AAGlD,SAAS,yBACd,iBACA,eAKA;AAEA,QAAM,aAAa,iBAAiB;AACpC,QAAM,EAAE,YAAY,UAAU,QAAI,sCAAc,aAAa,kBAAkB,IAAI;AACnF,SAAO;AAAA,IACL,mBAAe,4CAAqB,eAAe,YAAY,QAAQ;AAAA,IACvE,oBAAoB,YAAY;AAAA,IAChC,aAAa,cAAc;AAAA,EAC7B;AACF;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenStandard } from './token-standard.cjs';
|
|
2
|
+
|
|
3
|
+
declare function useResolvedTokenStandard(contractAddress: string | null, tokenStandard?: string | null): {
|
|
4
|
+
tokenStandard: TokenStandard;
|
|
5
|
+
collectionStandard: string | null | undefined;
|
|
6
|
+
isResolving: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { useResolvedTokenStandard };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenStandard } from './token-standard.js';
|
|
2
|
+
|
|
3
|
+
declare function useResolvedTokenStandard(contractAddress: string | null, tokenStandard?: string | null): {
|
|
4
|
+
tokenStandard: TokenStandard;
|
|
5
|
+
collectionStandard: string | null | undefined;
|
|
6
|
+
isResolving: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { useResolvedTokenStandard };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCollection } from "../use-collections.js";
|
|
3
|
+
import { resolveTokenStandard } from "./token-standard.js";
|
|
4
|
+
function useResolvedTokenStandard(contractAddress, tokenStandard) {
|
|
5
|
+
const needsFetch = tokenStandard == null;
|
|
6
|
+
const { collection, isLoading } = useCollection(needsFetch ? contractAddress : null);
|
|
7
|
+
return {
|
|
8
|
+
tokenStandard: resolveTokenStandard(tokenStandard, collection?.standard),
|
|
9
|
+
collectionStandard: collection?.standard,
|
|
10
|
+
isResolving: needsFetch && isLoading
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
useResolvedTokenStandard
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-resolved-token-standard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/marketplace/use-resolved-token-standard.ts"],"sourcesContent":["\"use client\";\n\nimport { useCollection } from \"../use-collections.js\";\nimport { resolveTokenStandard, type TokenStandard } from \"./token-standard.js\";\n\n\nexport function useResolvedTokenStandard(\n contractAddress: string | null,\n tokenStandard?: string | null\n): {\n tokenStandard: TokenStandard;\n collectionStandard: string | null | undefined;\n isResolving: boolean;\n} {\n\n const needsFetch = tokenStandard == null;\n const { collection, isLoading } = useCollection(needsFetch ? contractAddress : null);\n return {\n tokenStandard: resolveTokenStandard(tokenStandard, collection?.standard),\n collectionStandard: collection?.standard,\n isResolving: needsFetch && isLoading,\n };\n}\n"],"mappings":";AAEA,SAAS,qBAAqB;AAC9B,SAAS,4BAAgD;AAGlD,SAAS,yBACd,iBACA,eAKA;AAEA,QAAM,aAAa,iBAAiB;AACpC,QAAM,EAAE,YAAY,UAAU,IAAI,cAAc,aAAa,kBAAkB,IAAI;AACnF,SAAO;AAAA,IACL,eAAe,qBAAqB,eAAe,YAAY,QAAQ;AAAA,IACvE,oBAAoB,YAAY;AAAA,IAChC,aAAa,cAAc;AAAA,EAC7B;AACF;","names":[]}
|
|
@@ -31,17 +31,17 @@ __export(confetti_exports, {
|
|
|
31
31
|
fireConfetti: () => fireConfetti
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(confetti_exports);
|
|
34
|
-
|
|
35
|
-
function fireConfetti() {
|
|
34
|
+
async function fireConfetti() {
|
|
36
35
|
if (typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
36
|
+
const { default: confetti } = await import("canvas-confetti");
|
|
37
37
|
const defaults = { zIndex: 9999, colors: ["#3b7bff", "#8a5cf6", "#f6608f", "#fb8b46", "#5b4ce6"] };
|
|
38
|
-
(
|
|
38
|
+
confetti({ ...defaults, particleCount: 80, spread: 70, origin: { y: 0.6 } });
|
|
39
39
|
setTimeout(() => {
|
|
40
|
-
(
|
|
41
|
-
(
|
|
40
|
+
confetti({ ...defaults, particleCount: 60, angle: 60, spread: 55, origin: { x: 0, y: 0.65 } });
|
|
41
|
+
confetti({ ...defaults, particleCount: 60, angle: 120, spread: 55, origin: { x: 1, y: 0.65 } });
|
|
42
42
|
}, 150);
|
|
43
43
|
setTimeout(() => {
|
|
44
|
-
(
|
|
44
|
+
confetti({ ...defaults, particleCount: 40, spread: 100, decay: 0.91, scalar: 0.8, origin: { y: 0.55 } });
|
|
45
45
|
}, 350);
|
|
46
46
|
}
|
|
47
47
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/media-wallet/confetti.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/media-wallet/confetti.ts"],"sourcesContent":["export async function fireConfetti(): Promise<void> {\n if (typeof window !== \"undefined\" && window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches) return;\n\n const { default: confetti } = await import(\"canvas-confetti\");\n const defaults = { zIndex: 9999, colors: [\"#3b7bff\", \"#8a5cf6\", \"#f6608f\", \"#fb8b46\", \"#5b4ce6\"] };\n\n confetti({ ...defaults, particleCount: 80, spread: 70, origin: { y: 0.6 } });\n\n setTimeout(() => {\n confetti({ ...defaults, particleCount: 60, angle: 60, spread: 55, origin: { x: 0, y: 0.65 } });\n confetti({ ...defaults, particleCount: 60, angle: 120, spread: 55, origin: { x: 1, y: 0.65 } });\n }, 150);\n\n setTimeout(() => {\n confetti({ ...defaults, particleCount: 40, spread: 100, decay: 0.91, scalar: 0.8, origin: { y: 0.55 } });\n }, 350);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAsB,eAA8B;AAClD,MAAI,OAAO,WAAW,eAAe,OAAO,aAAa,kCAAkC,EAAE,QAAS;AAEtG,QAAM,EAAE,SAAS,SAAS,IAAI,MAAM,OAAO,iBAAiB;AAC5D,QAAM,WAAW,EAAE,QAAQ,MAAM,QAAQ,CAAC,WAAW,WAAW,WAAW,WAAW,SAAS,EAAE;AAEjG,WAAS,EAAE,GAAG,UAAU,eAAe,IAAI,QAAQ,IAAI,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC;AAE3E,aAAW,MAAM;AACf,aAAS,EAAE,GAAG,UAAU,eAAe,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,EAAE,GAAG,GAAG,GAAG,KAAK,EAAE,CAAC;AAC7F,aAAS,EAAE,GAAG,UAAU,eAAe,IAAI,OAAO,KAAK,QAAQ,IAAI,QAAQ,EAAE,GAAG,GAAG,GAAG,KAAK,EAAE,CAAC;AAAA,EAChG,GAAG,GAAG;AAEN,aAAW,MAAM;AACf,aAAS,EAAE,GAAG,UAAU,eAAe,IAAI,QAAQ,KAAK,OAAO,MAAM,QAAQ,KAAK,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC;AAAA,EACzG,GAAG,GAAG;AACR;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
function fireConfetti() {
|
|
1
|
+
async function fireConfetti() {
|
|
3
2
|
if (typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
3
|
+
const { default: confetti } = await import("canvas-confetti");
|
|
4
4
|
const defaults = { zIndex: 9999, colors: ["#3b7bff", "#8a5cf6", "#f6608f", "#fb8b46", "#5b4ce6"] };
|
|
5
5
|
confetti({ ...defaults, particleCount: 80, spread: 70, origin: { y: 0.6 } });
|
|
6
6
|
setTimeout(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/media-wallet/confetti.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/media-wallet/confetti.ts"],"sourcesContent":["export async function fireConfetti(): Promise<void> {\n if (typeof window !== \"undefined\" && window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches) return;\n\n const { default: confetti } = await import(\"canvas-confetti\");\n const defaults = { zIndex: 9999, colors: [\"#3b7bff\", \"#8a5cf6\", \"#f6608f\", \"#fb8b46\", \"#5b4ce6\"] };\n\n confetti({ ...defaults, particleCount: 80, spread: 70, origin: { y: 0.6 } });\n\n setTimeout(() => {\n confetti({ ...defaults, particleCount: 60, angle: 60, spread: 55, origin: { x: 0, y: 0.65 } });\n confetti({ ...defaults, particleCount: 60, angle: 120, spread: 55, origin: { x: 1, y: 0.65 } });\n }, 150);\n\n setTimeout(() => {\n confetti({ ...defaults, particleCount: 40, spread: 100, decay: 0.91, scalar: 0.8, origin: { y: 0.55 } });\n }, 350);\n}\n"],"mappings":"AAAA,eAAsB,eAA8B;AAClD,MAAI,OAAO,WAAW,eAAe,OAAO,aAAa,kCAAkC,EAAE,QAAS;AAEtG,QAAM,EAAE,SAAS,SAAS,IAAI,MAAM,OAAO,iBAAiB;AAC5D,QAAM,WAAW,EAAE,QAAQ,MAAM,QAAQ,CAAC,WAAW,WAAW,WAAW,WAAW,SAAS,EAAE;AAEjG,WAAS,EAAE,GAAG,UAAU,eAAe,IAAI,QAAQ,IAAI,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC;AAE3E,aAAW,MAAM;AACf,aAAS,EAAE,GAAG,UAAU,eAAe,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,EAAE,GAAG,GAAG,GAAG,KAAK,EAAE,CAAC;AAC7F,aAAS,EAAE,GAAG,UAAU,eAAe,IAAI,OAAO,KAAK,QAAQ,IAAI,QAAQ,EAAE,GAAG,GAAG,GAAG,KAAK,EAAE,CAAC;AAAA,EAChG,GAAG,GAAG;AAEN,aAAW,MAAM;AACf,aAAS,EAAE,GAAG,UAAU,eAAe,IAAI,QAAQ,KAAK,OAAO,MAAM,QAAQ,KAAK,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC;AAAA,EACzG,GAAG,GAAG;AACR;","names":[]}
|
|
@@ -45,7 +45,6 @@ function useErc20Balance(tokenAddress, holderAddress) {
|
|
|
45
45
|
([, addr, holder]) => (0, import_starknet.erc20Balance)(getClient().provider, addr, holder),
|
|
46
46
|
{
|
|
47
47
|
refreshInterval: 3e4,
|
|
48
|
-
revalidateOnFocus: false,
|
|
49
48
|
shouldRetryOnError: false,
|
|
50
49
|
onError: () => {
|
|
51
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/media-wallet/use-erc20-balance.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { getListableTokens, parseAmount } from \"@medialane/sdk\";\nimport { erc20Balance } from \"@medialane/sdk/starknet\";\nimport { useMedialaneApp } from \"../../components/medialane-app.js\";\n\nexport function useErc20Balance( tokenAddress: string | null, holderAddress: string | null) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading } = useSWR(\n tokenAddress && holderAddress ? [\"erc20-balance\", tokenAddress, holderAddress] : null,\n ([, addr, holder]) => erc20Balance(getClient().provider, addr, holder),\n {\n refreshInterval: 30_000,\n
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/media-wallet/use-erc20-balance.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { getListableTokens, parseAmount } from \"@medialane/sdk\";\nimport { erc20Balance } from \"@medialane/sdk/starknet\";\nimport { useMedialaneApp } from \"../../components/medialane-app.js\";\n\nexport function useErc20Balance( tokenAddress: string | null, holderAddress: string | null) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading } = useSWR(\n tokenAddress && holderAddress ? [\"erc20-balance\", tokenAddress, holderAddress] : null,\n ([, addr, holder]) => erc20Balance(getClient().provider, addr, holder),\n {\n refreshInterval: 30_000,\n shouldRetryOnError: false,\n onError: () => {},\n }\n );\n return { rawBalance: data ?? null, isLoading, error };\n}\n\nexport function useTokenBalance( symbol: string | null, holderAddress: string | null) {\n const token = symbol ? getListableTokens().find((t) => t.symbol === symbol) ?? null : null;\n const { rawBalance, isLoading, error } = useErc20Balance(token?.address ?? null, holderAddress);\n return { rawBalance, isLoading, error, decimals: token?.decimals ?? 18 };\n}\n\nexport function hasSufficientBalance(\n rawBalance: bigint | null,\n requiredHuman: string,\n decimals: number\n): boolean | null {\n if (rawBalance === null) return null;\n const n = parseFloat(requiredHuman);\n if (!requiredHuman || isNaN(n) || n <= 0) return null;\n const required = BigInt(parseAmount(requiredHuman, decimals));\n return rawBalance >= required;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AACnB,iBAA+C;AAC/C,sBAA6B;AAC7B,2BAAgC;AAEzB,SAAS,gBAAiB,cAA6B,eAA8B;AAC1F,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,QAAM,EAAE,MAAM,OAAO,UAAU,QAAI,WAAAA;AAAA,IACjC,gBAAgB,gBAAgB,CAAC,iBAAiB,cAAc,aAAa,IAAI;AAAA,IACjF,CAAC,CAAC,EAAE,MAAM,MAAM,UAAM,8BAAa,UAAU,EAAE,UAAU,MAAM,MAAM;AAAA,IACrE;AAAA,MACE,iBAAiB;AAAA,MACjB,oBAAoB;AAAA,MACpB,SAAS,MAAM;AAAA,MAAC;AAAA,IAClB;AAAA,EACF;AACA,SAAO,EAAE,YAAY,QAAQ,MAAM,WAAW,MAAM;AACtD;AAEO,SAAS,gBAAiB,QAAuB,eAA8B;AACpF,QAAM,QAAQ,aAAS,8BAAkB,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW,MAAM,KAAK,OAAO;AACtF,QAAM,EAAE,YAAY,WAAW,MAAM,IAAI,gBAAgB,OAAO,WAAW,MAAM,aAAa;AAC9F,SAAO,EAAE,YAAY,WAAW,OAAO,UAAU,OAAO,YAAY,GAAG;AACzE;AAEO,SAAS,qBACd,YACA,eACA,UACgB;AAChB,MAAI,eAAe,KAAM,QAAO;AAChC,QAAM,IAAI,WAAW,aAAa;AAClC,MAAI,CAAC,iBAAiB,MAAM,CAAC,KAAK,KAAK,EAAG,QAAO;AACjD,QAAM,WAAW,WAAO,wBAAY,eAAe,QAAQ,CAAC;AAC5D,SAAO,cAAc;AACvB;","names":["useSWR"]}
|
|
@@ -7,7 +7,7 @@ declare function useTokenBalance(symbol: string | null, holderAddress: string |
|
|
|
7
7
|
rawBalance: bigint | null;
|
|
8
8
|
isLoading: boolean;
|
|
9
9
|
error: any;
|
|
10
|
-
decimals:
|
|
10
|
+
decimals: 8 | 6 | 18;
|
|
11
11
|
};
|
|
12
12
|
declare function hasSufficientBalance(rawBalance: bigint | null, requiredHuman: string, decimals: number): boolean | null;
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ declare function useTokenBalance(symbol: string | null, holderAddress: string |
|
|
|
7
7
|
rawBalance: bigint | null;
|
|
8
8
|
isLoading: boolean;
|
|
9
9
|
error: any;
|
|
10
|
-
decimals:
|
|
10
|
+
decimals: 8 | 6 | 18;
|
|
11
11
|
};
|
|
12
12
|
declare function hasSufficientBalance(rawBalance: bigint | null, requiredHuman: string, decimals: number): boolean | null;
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/media-wallet/use-erc20-balance.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { getListableTokens, parseAmount } from \"@medialane/sdk\";\nimport { erc20Balance } from \"@medialane/sdk/starknet\";\nimport { useMedialaneApp } from \"../../components/medialane-app.js\";\n\nexport function useErc20Balance( tokenAddress: string | null, holderAddress: string | null) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading } = useSWR(\n tokenAddress && holderAddress ? [\"erc20-balance\", tokenAddress, holderAddress] : null,\n ([, addr, holder]) => erc20Balance(getClient().provider, addr, holder),\n {\n refreshInterval: 30_000,\n
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/media-wallet/use-erc20-balance.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { getListableTokens, parseAmount } from \"@medialane/sdk\";\nimport { erc20Balance } from \"@medialane/sdk/starknet\";\nimport { useMedialaneApp } from \"../../components/medialane-app.js\";\n\nexport function useErc20Balance( tokenAddress: string | null, holderAddress: string | null) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading } = useSWR(\n tokenAddress && holderAddress ? [\"erc20-balance\", tokenAddress, holderAddress] : null,\n ([, addr, holder]) => erc20Balance(getClient().provider, addr, holder),\n {\n refreshInterval: 30_000,\n shouldRetryOnError: false,\n onError: () => {},\n }\n );\n return { rawBalance: data ?? null, isLoading, error };\n}\n\nexport function useTokenBalance( symbol: string | null, holderAddress: string | null) {\n const token = symbol ? getListableTokens().find((t) => t.symbol === symbol) ?? null : null;\n const { rawBalance, isLoading, error } = useErc20Balance(token?.address ?? null, holderAddress);\n return { rawBalance, isLoading, error, decimals: token?.decimals ?? 18 };\n}\n\nexport function hasSufficientBalance(\n rawBalance: bigint | null,\n requiredHuman: string,\n decimals: number\n): boolean | null {\n if (rawBalance === null) return null;\n const n = parseFloat(requiredHuman);\n if (!requiredHuman || isNaN(n) || n <= 0) return null;\n const required = BigInt(parseAmount(requiredHuman, decimals));\n return rawBalance >= required;\n}\n"],"mappings":";AAEA,OAAO,YAAY;AACnB,SAAS,mBAAmB,mBAAmB;AAC/C,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAEzB,SAAS,gBAAiB,cAA6B,eAA8B;AAC1F,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,QAAM,EAAE,MAAM,OAAO,UAAU,IAAI;AAAA,IACjC,gBAAgB,gBAAgB,CAAC,iBAAiB,cAAc,aAAa,IAAI;AAAA,IACjF,CAAC,CAAC,EAAE,MAAM,MAAM,MAAM,aAAa,UAAU,EAAE,UAAU,MAAM,MAAM;AAAA,IACrE;AAAA,MACE,iBAAiB;AAAA,MACjB,oBAAoB;AAAA,MACpB,SAAS,MAAM;AAAA,MAAC;AAAA,IAClB;AAAA,EACF;AACA,SAAO,EAAE,YAAY,QAAQ,MAAM,WAAW,MAAM;AACtD;AAEO,SAAS,gBAAiB,QAAuB,eAA8B;AACpF,QAAM,QAAQ,SAAS,kBAAkB,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW,MAAM,KAAK,OAAO;AACtF,QAAM,EAAE,YAAY,WAAW,MAAM,IAAI,gBAAgB,OAAO,WAAW,MAAM,aAAa;AAC9F,SAAO,EAAE,YAAY,WAAW,OAAO,UAAU,OAAO,YAAY,GAAG;AACzE;AAEO,SAAS,qBACd,YACA,eACA,UACgB;AAChB,MAAI,eAAe,KAAM,QAAO;AAChC,QAAM,IAAI,WAAW,aAAa;AAClC,MAAI,CAAC,iBAAiB,MAAM,CAAC,KAAK,KAAK,EAAG,QAAO;AACjD,QAAM,WAAW,OAAO,YAAY,eAAe,QAAQ,CAAC;AAC5D,SAAO,cAAc;AACvB;","names":[]}
|
|
@@ -2,34 +2,16 @@ import * as z from 'zod';
|
|
|
2
2
|
|
|
3
3
|
declare const LISTABLE_CURRENCIES: string[];
|
|
4
4
|
declare const orderFormSchema: z.ZodObject<{
|
|
5
|
-
price: z.
|
|
6
|
-
currency: z.
|
|
5
|
+
price: z.ZodString;
|
|
6
|
+
currency: z.ZodString;
|
|
7
7
|
durationSeconds: z.ZodNumber;
|
|
8
8
|
amount: z.ZodOptional<z.ZodString>;
|
|
9
|
-
},
|
|
10
|
-
price: string;
|
|
11
|
-
currency: string;
|
|
12
|
-
durationSeconds: number;
|
|
13
|
-
amount?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
price: string;
|
|
16
|
-
currency: string;
|
|
17
|
-
durationSeconds: number;
|
|
18
|
-
amount?: string | undefined;
|
|
19
|
-
}>;
|
|
9
|
+
}, z.core.$strip>;
|
|
20
10
|
type OrderFormValues = z.infer<typeof orderFormSchema>;
|
|
21
11
|
declare const counterOfferFormSchema: z.ZodObject<{
|
|
22
|
-
price: z.
|
|
12
|
+
price: z.ZodString;
|
|
23
13
|
durationSeconds: z.ZodNumber;
|
|
24
14
|
message: z.ZodOptional<z.ZodString>;
|
|
25
|
-
},
|
|
26
|
-
price: string;
|
|
27
|
-
durationSeconds: number;
|
|
28
|
-
message?: string | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
price: string;
|
|
31
|
-
durationSeconds: number;
|
|
32
|
-
message?: string | undefined;
|
|
33
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
34
16
|
|
|
35
17
|
export { LISTABLE_CURRENCIES, type OrderFormValues, counterOfferFormSchema, orderFormSchema };
|
|
@@ -2,34 +2,16 @@ import * as z from 'zod';
|
|
|
2
2
|
|
|
3
3
|
declare const LISTABLE_CURRENCIES: string[];
|
|
4
4
|
declare const orderFormSchema: z.ZodObject<{
|
|
5
|
-
price: z.
|
|
6
|
-
currency: z.
|
|
5
|
+
price: z.ZodString;
|
|
6
|
+
currency: z.ZodString;
|
|
7
7
|
durationSeconds: z.ZodNumber;
|
|
8
8
|
amount: z.ZodOptional<z.ZodString>;
|
|
9
|
-
},
|
|
10
|
-
price: string;
|
|
11
|
-
currency: string;
|
|
12
|
-
durationSeconds: number;
|
|
13
|
-
amount?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
price: string;
|
|
16
|
-
currency: string;
|
|
17
|
-
durationSeconds: number;
|
|
18
|
-
amount?: string | undefined;
|
|
19
|
-
}>;
|
|
9
|
+
}, z.core.$strip>;
|
|
20
10
|
type OrderFormValues = z.infer<typeof orderFormSchema>;
|
|
21
11
|
declare const counterOfferFormSchema: z.ZodObject<{
|
|
22
|
-
price: z.
|
|
12
|
+
price: z.ZodString;
|
|
23
13
|
durationSeconds: z.ZodNumber;
|
|
24
14
|
message: z.ZodOptional<z.ZodString>;
|
|
25
|
-
},
|
|
26
|
-
price: string;
|
|
27
|
-
durationSeconds: number;
|
|
28
|
-
message?: string | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
price: string;
|
|
31
|
-
durationSeconds: number;
|
|
32
|
-
message?: string | undefined;
|
|
33
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
34
16
|
|
|
35
17
|
export { LISTABLE_CURRENCIES, type OrderFormValues, counterOfferFormSchema, orderFormSchema };
|