@medialane/ui 0.404.0 → 0.406.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-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/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/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/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/i18n/catalog/pt.cjs +89 -1
- package/dist/i18n/catalog/pt.cjs.map +1 -1
- package/dist/i18n/catalog/pt.js +89 -1
- 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 +5 -5
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var security_headers_exports = {};
|
|
20
|
+
__export(security_headers_exports, {
|
|
21
|
+
securityHeaders: () => securityHeaders
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(security_headers_exports);
|
|
24
|
+
const BASE_DIRECTIVES = ["base-uri 'self'", "object-src 'none'", "form-action 'self'"];
|
|
25
|
+
function securityHeaders({ frameAncestors, permissions, reportOnly }) {
|
|
26
|
+
const enforced = [...BASE_DIRECTIVES, `frame-ancestors ${frameAncestors}`];
|
|
27
|
+
const headers = [
|
|
28
|
+
{ key: "X-Content-Type-Options", value: "nosniff" },
|
|
29
|
+
{ key: "X-Frame-Options", value: frameAncestors === "'self'" ? "SAMEORIGIN" : "DENY" },
|
|
30
|
+
{ key: "Content-Security-Policy", value: enforced.join("; ") },
|
|
31
|
+
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
|
|
32
|
+
{ key: "Permissions-Policy", value: permissions.map((feature) => `${feature}=()`).join(", ") },
|
|
33
|
+
{ key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains; preload" }
|
|
34
|
+
];
|
|
35
|
+
if (reportOnly) {
|
|
36
|
+
headers.push({
|
|
37
|
+
key: "Content-Security-Policy-Report-Only",
|
|
38
|
+
value: [
|
|
39
|
+
"default-src 'self'",
|
|
40
|
+
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com",
|
|
41
|
+
"style-src 'self' 'unsafe-inline'",
|
|
42
|
+
"img-src 'self' data: blob: https:",
|
|
43
|
+
"media-src 'self' data: blob: https:",
|
|
44
|
+
"font-src 'self' data:",
|
|
45
|
+
["connect-src 'self'", ...reportOnly.connectSrc].join(" "),
|
|
46
|
+
"worker-src 'self' blob:",
|
|
47
|
+
"frame-src 'self'",
|
|
48
|
+
...enforced
|
|
49
|
+
].join("; ")
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return headers;
|
|
53
|
+
}
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
securityHeaders
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=security-headers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/security-headers.ts"],"sourcesContent":["export interface SecurityHeaderOptions {\n /** Who may frame the app: \"'self'\" or \"'none'\". Also sets the matching X-Frame-Options. */\n frameAncestors: \"'self'\" | \"'none'\";\n /** Browser features the app turns off, e.g. [\"camera\", \"microphone\", \"geolocation\"]. */\n permissions: string[];\n /** When set, also sends the full policy as Content-Security-Policy-Report-Only with these extra connect-src origins. */\n reportOnly?: { connectSrc: string[] };\n}\n\nconst BASE_DIRECTIVES = [\"base-uri 'self'\", \"object-src 'none'\", \"form-action 'self'\"];\n\nexport function securityHeaders({ frameAncestors, permissions, reportOnly }: SecurityHeaderOptions): { key: string; value: string }[] {\n const enforced = [...BASE_DIRECTIVES, `frame-ancestors ${frameAncestors}`];\n const headers = [\n { key: \"X-Content-Type-Options\", value: \"nosniff\" },\n { key: \"X-Frame-Options\", value: frameAncestors === \"'self'\" ? \"SAMEORIGIN\" : \"DENY\" },\n { key: \"Content-Security-Policy\", value: enforced.join(\"; \") },\n { key: \"Referrer-Policy\", value: \"strict-origin-when-cross-origin\" },\n { key: \"Permissions-Policy\", value: permissions.map((feature) => `${feature}=()`).join(\", \") },\n { key: \"Strict-Transport-Security\", value: \"max-age=63072000; includeSubDomains; preload\" },\n ];\n if (reportOnly) {\n headers.push({\n key: \"Content-Security-Policy-Report-Only\",\n value: [\n \"default-src 'self'\",\n \"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com\",\n \"style-src 'self' 'unsafe-inline'\",\n \"img-src 'self' data: blob: https:\",\n \"media-src 'self' data: blob: https:\",\n \"font-src 'self' data:\",\n [\"connect-src 'self'\", ...reportOnly.connectSrc].join(\" \"),\n \"worker-src 'self' blob:\",\n \"frame-src 'self'\",\n ...enforced,\n ].join(\"; \"),\n });\n }\n return headers;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAM,kBAAkB,CAAC,mBAAmB,qBAAqB,oBAAoB;AAE9E,SAAS,gBAAgB,EAAE,gBAAgB,aAAa,WAAW,GAA4D;AACpI,QAAM,WAAW,CAAC,GAAG,iBAAiB,mBAAmB,cAAc,EAAE;AACzE,QAAM,UAAU;AAAA,IACd,EAAE,KAAK,0BAA0B,OAAO,UAAU;AAAA,IAClD,EAAE,KAAK,mBAAmB,OAAO,mBAAmB,WAAW,eAAe,OAAO;AAAA,IACrF,EAAE,KAAK,2BAA2B,OAAO,SAAS,KAAK,IAAI,EAAE;AAAA,IAC7D,EAAE,KAAK,mBAAmB,OAAO,kCAAkC;AAAA,IACnE,EAAE,KAAK,sBAAsB,OAAO,YAAY,IAAI,CAAC,YAAY,GAAG,OAAO,KAAK,EAAE,KAAK,IAAI,EAAE;AAAA,IAC7F,EAAE,KAAK,6BAA6B,OAAO,+CAA+C;AAAA,EAC5F;AACA,MAAI,YAAY;AACd,YAAQ,KAAK;AAAA,MACX,KAAK;AAAA,MACL,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,CAAC,sBAAsB,GAAG,WAAW,UAAU,EAAE,KAAK,GAAG;AAAA,QACzD;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACL,EAAE,KAAK,IAAI;AAAA,IACb,CAAC;AAAA,EACH;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface SecurityHeaderOptions {
|
|
2
|
+
/** Who may frame the app: "'self'" or "'none'". Also sets the matching X-Frame-Options. */
|
|
3
|
+
frameAncestors: "'self'" | "'none'";
|
|
4
|
+
/** Browser features the app turns off, e.g. ["camera", "microphone", "geolocation"]. */
|
|
5
|
+
permissions: string[];
|
|
6
|
+
/** When set, also sends the full policy as Content-Security-Policy-Report-Only with these extra connect-src origins. */
|
|
7
|
+
reportOnly?: {
|
|
8
|
+
connectSrc: string[];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare function securityHeaders({ frameAncestors, permissions, reportOnly }: SecurityHeaderOptions): {
|
|
12
|
+
key: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
|
|
16
|
+
export { type SecurityHeaderOptions, securityHeaders };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface SecurityHeaderOptions {
|
|
2
|
+
/** Who may frame the app: "'self'" or "'none'". Also sets the matching X-Frame-Options. */
|
|
3
|
+
frameAncestors: "'self'" | "'none'";
|
|
4
|
+
/** Browser features the app turns off, e.g. ["camera", "microphone", "geolocation"]. */
|
|
5
|
+
permissions: string[];
|
|
6
|
+
/** When set, also sends the full policy as Content-Security-Policy-Report-Only with these extra connect-src origins. */
|
|
7
|
+
reportOnly?: {
|
|
8
|
+
connectSrc: string[];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare function securityHeaders({ frameAncestors, permissions, reportOnly }: SecurityHeaderOptions): {
|
|
12
|
+
key: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
|
|
16
|
+
export { type SecurityHeaderOptions, securityHeaders };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const BASE_DIRECTIVES = ["base-uri 'self'", "object-src 'none'", "form-action 'self'"];
|
|
2
|
+
function securityHeaders({ frameAncestors, permissions, reportOnly }) {
|
|
3
|
+
const enforced = [...BASE_DIRECTIVES, `frame-ancestors ${frameAncestors}`];
|
|
4
|
+
const headers = [
|
|
5
|
+
{ key: "X-Content-Type-Options", value: "nosniff" },
|
|
6
|
+
{ key: "X-Frame-Options", value: frameAncestors === "'self'" ? "SAMEORIGIN" : "DENY" },
|
|
7
|
+
{ key: "Content-Security-Policy", value: enforced.join("; ") },
|
|
8
|
+
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
|
|
9
|
+
{ key: "Permissions-Policy", value: permissions.map((feature) => `${feature}=()`).join(", ") },
|
|
10
|
+
{ key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains; preload" }
|
|
11
|
+
];
|
|
12
|
+
if (reportOnly) {
|
|
13
|
+
headers.push({
|
|
14
|
+
key: "Content-Security-Policy-Report-Only",
|
|
15
|
+
value: [
|
|
16
|
+
"default-src 'self'",
|
|
17
|
+
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com",
|
|
18
|
+
"style-src 'self' 'unsafe-inline'",
|
|
19
|
+
"img-src 'self' data: blob: https:",
|
|
20
|
+
"media-src 'self' data: blob: https:",
|
|
21
|
+
"font-src 'self' data:",
|
|
22
|
+
["connect-src 'self'", ...reportOnly.connectSrc].join(" "),
|
|
23
|
+
"worker-src 'self' blob:",
|
|
24
|
+
"frame-src 'self'",
|
|
25
|
+
...enforced
|
|
26
|
+
].join("; ")
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return headers;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
securityHeaders
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=security-headers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/security-headers.ts"],"sourcesContent":["export interface SecurityHeaderOptions {\n /** Who may frame the app: \"'self'\" or \"'none'\". Also sets the matching X-Frame-Options. */\n frameAncestors: \"'self'\" | \"'none'\";\n /** Browser features the app turns off, e.g. [\"camera\", \"microphone\", \"geolocation\"]. */\n permissions: string[];\n /** When set, also sends the full policy as Content-Security-Policy-Report-Only with these extra connect-src origins. */\n reportOnly?: { connectSrc: string[] };\n}\n\nconst BASE_DIRECTIVES = [\"base-uri 'self'\", \"object-src 'none'\", \"form-action 'self'\"];\n\nexport function securityHeaders({ frameAncestors, permissions, reportOnly }: SecurityHeaderOptions): { key: string; value: string }[] {\n const enforced = [...BASE_DIRECTIVES, `frame-ancestors ${frameAncestors}`];\n const headers = [\n { key: \"X-Content-Type-Options\", value: \"nosniff\" },\n { key: \"X-Frame-Options\", value: frameAncestors === \"'self'\" ? \"SAMEORIGIN\" : \"DENY\" },\n { key: \"Content-Security-Policy\", value: enforced.join(\"; \") },\n { key: \"Referrer-Policy\", value: \"strict-origin-when-cross-origin\" },\n { key: \"Permissions-Policy\", value: permissions.map((feature) => `${feature}=()`).join(\", \") },\n { key: \"Strict-Transport-Security\", value: \"max-age=63072000; includeSubDomains; preload\" },\n ];\n if (reportOnly) {\n headers.push({\n key: \"Content-Security-Policy-Report-Only\",\n value: [\n \"default-src 'self'\",\n \"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com\",\n \"style-src 'self' 'unsafe-inline'\",\n \"img-src 'self' data: blob: https:\",\n \"media-src 'self' data: blob: https:\",\n \"font-src 'self' data:\",\n [\"connect-src 'self'\", ...reportOnly.connectSrc].join(\" \"),\n \"worker-src 'self' blob:\",\n \"frame-src 'self'\",\n ...enforced,\n ].join(\"; \"),\n });\n }\n return headers;\n}\n"],"mappings":"AASA,MAAM,kBAAkB,CAAC,mBAAmB,qBAAqB,oBAAoB;AAE9E,SAAS,gBAAgB,EAAE,gBAAgB,aAAa,WAAW,GAA4D;AACpI,QAAM,WAAW,CAAC,GAAG,iBAAiB,mBAAmB,cAAc,EAAE;AACzE,QAAM,UAAU;AAAA,IACd,EAAE,KAAK,0BAA0B,OAAO,UAAU;AAAA,IAClD,EAAE,KAAK,mBAAmB,OAAO,mBAAmB,WAAW,eAAe,OAAO;AAAA,IACrF,EAAE,KAAK,2BAA2B,OAAO,SAAS,KAAK,IAAI,EAAE;AAAA,IAC7D,EAAE,KAAK,mBAAmB,OAAO,kCAAkC;AAAA,IACnE,EAAE,KAAK,sBAAsB,OAAO,YAAY,IAAI,CAAC,YAAY,GAAG,OAAO,KAAK,EAAE,KAAK,IAAI,EAAE;AAAA,IAC7F,EAAE,KAAK,6BAA6B,OAAO,+CAA+C;AAAA,EAC5F;AACA,MAAI,YAAY;AACd,YAAQ,KAAK;AAAA,MACX,KAAK;AAAA,MACL,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,CAAC,sBAAsB,GAAG,WAAW,UAAU,EAAE,KAAK,GAAG;AAAA,QACzD;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACL,EAAE,KAAK,IAAI;AAAA,IACb,CAAC;AAAA,EACH;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var seo_exports = {};
|
|
20
|
+
__export(seo_exports, {
|
|
21
|
+
createSeo: () => createSeo,
|
|
22
|
+
truncateDescription: () => truncateDescription
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(seo_exports);
|
|
25
|
+
const defaultRobots = {
|
|
26
|
+
index: true,
|
|
27
|
+
follow: true,
|
|
28
|
+
googleBot: {
|
|
29
|
+
index: true,
|
|
30
|
+
follow: true,
|
|
31
|
+
"max-image-preview": "large",
|
|
32
|
+
"max-snippet": -1,
|
|
33
|
+
"max-video-preview": -1
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
function truncateDescription(value, max = 160) {
|
|
37
|
+
if (value.length <= max) return value;
|
|
38
|
+
return `${value.slice(0, Math.max(0, max - 1)).trimEnd()}\u2026`;
|
|
39
|
+
}
|
|
40
|
+
function createSeo({ appUrl }) {
|
|
41
|
+
const APP_URL = appUrl.replace(/\/$/, "");
|
|
42
|
+
function absoluteUrl(path = "/") {
|
|
43
|
+
if (/^https?:\/\//i.test(path)) return path;
|
|
44
|
+
const normalized = path.startsWith("/") ? path : `/${path}`;
|
|
45
|
+
return `${APP_URL}${normalized}`;
|
|
46
|
+
}
|
|
47
|
+
function socialImage(imageUrl, alt = "Medialane") {
|
|
48
|
+
const url = imageUrl || absoluteUrl("/og-image.jpg");
|
|
49
|
+
return { url, width: 1200, height: 630, alt };
|
|
50
|
+
}
|
|
51
|
+
function buildSocialMetadata(opts) {
|
|
52
|
+
const ogTitle = `${opts.title} | Medialane`;
|
|
53
|
+
const image = socialImage(opts.imageUrl, opts.imageAlt ?? opts.title);
|
|
54
|
+
return {
|
|
55
|
+
openGraph: {
|
|
56
|
+
type: "website",
|
|
57
|
+
title: ogTitle,
|
|
58
|
+
description: opts.description,
|
|
59
|
+
images: [image]
|
|
60
|
+
},
|
|
61
|
+
twitter: {
|
|
62
|
+
card: "summary_large_image",
|
|
63
|
+
title: ogTitle,
|
|
64
|
+
description: opts.description,
|
|
65
|
+
images: [image.url]
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function buildBreadcrumbJsonLd(items) {
|
|
70
|
+
return {
|
|
71
|
+
"@context": "https://schema.org",
|
|
72
|
+
"@type": "BreadcrumbList",
|
|
73
|
+
itemListElement: items.map((item, i) => ({
|
|
74
|
+
"@type": "ListItem",
|
|
75
|
+
position: i + 1,
|
|
76
|
+
name: item.name,
|
|
77
|
+
item: absoluteUrl(item.path)
|
|
78
|
+
}))
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function buildProductJsonLd(opts) {
|
|
82
|
+
return {
|
|
83
|
+
"@context": "https://schema.org",
|
|
84
|
+
"@type": "Product",
|
|
85
|
+
name: opts.name,
|
|
86
|
+
url: absoluteUrl(opts.path),
|
|
87
|
+
...opts.description && { description: opts.description },
|
|
88
|
+
...opts.image && { image: [opts.image] },
|
|
89
|
+
...opts.sku && { sku: opts.sku },
|
|
90
|
+
...opts.brand && { brand: { "@type": "Brand", name: opts.brand } }
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return { APP_URL, absoluteUrl, defaultRobots, truncateDescription, buildSocialMetadata, buildBreadcrumbJsonLd, buildProductJsonLd };
|
|
94
|
+
}
|
|
95
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
96
|
+
0 && (module.exports = {
|
|
97
|
+
createSeo,
|
|
98
|
+
truncateDescription
|
|
99
|
+
});
|
|
100
|
+
//# sourceMappingURL=seo.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/seo.ts"],"sourcesContent":["import type { Metadata } from \"next\";\n\nexport interface BreadcrumbItem {\n name: string;\n path: string;\n}\n\nconst defaultRobots: Metadata[\"robots\"] = {\n index: true,\n follow: true,\n googleBot: {\n index: true,\n follow: true,\n \"max-image-preview\": \"large\",\n \"max-snippet\": -1,\n \"max-video-preview\": -1,\n },\n};\n\nexport function truncateDescription(value: string, max = 160): string {\n if (value.length <= max) return value;\n return `${value.slice(0, Math.max(0, max - 1)).trimEnd()}…`;\n}\n\n/** SEO helpers bound to one app's public URL. */\nexport function createSeo({ appUrl }: { appUrl: string }) {\n const APP_URL = appUrl.replace(/\\/$/, \"\");\n\n function absoluteUrl(path = \"/\"): string {\n if (/^https?:\\/\\//i.test(path)) return path;\n const normalized = path.startsWith(\"/\") ? path : `/${path}`;\n return `${APP_URL}${normalized}`;\n }\n\n function socialImage(imageUrl?: string | null, alt = \"Medialane\") {\n const url = imageUrl || absoluteUrl(\"/og-image.jpg\");\n return { url, width: 1200, height: 630, alt };\n }\n\n function buildSocialMetadata(opts: {\n title: string;\n description: string;\n imageUrl?: string | null;\n imageAlt?: string;\n }): Pick<Metadata, \"openGraph\" | \"twitter\"> {\n const ogTitle = `${opts.title} | Medialane`;\n const image = socialImage(opts.imageUrl, opts.imageAlt ?? opts.title);\n\n return {\n openGraph: {\n type: \"website\",\n title: ogTitle,\n description: opts.description,\n images: [image],\n },\n twitter: {\n card: \"summary_large_image\",\n title: ogTitle,\n description: opts.description,\n images: [image.url],\n },\n };\n }\n\n function buildBreadcrumbJsonLd(items: BreadcrumbItem[]) {\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"BreadcrumbList\",\n itemListElement: items.map((item, i) => ({\n \"@type\": \"ListItem\",\n position: i + 1,\n name: item.name,\n item: absoluteUrl(item.path),\n })),\n };\n }\n\n function buildProductJsonLd(opts: {\n name: string;\n path: string;\n description?: string;\n image?: string;\n sku?: string;\n brand?: string;\n }) {\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n name: opts.name,\n url: absoluteUrl(opts.path),\n ...(opts.description && { description: opts.description }),\n ...(opts.image && { image: [opts.image] }),\n ...(opts.sku && { sku: opts.sku }),\n ...(opts.brand && { brand: { \"@type\": \"Brand\", name: opts.brand } }),\n };\n }\n\n return { APP_URL, absoluteUrl, defaultRobots, truncateDescription, buildSocialMetadata, buildBreadcrumbJsonLd, buildProductJsonLd };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,MAAM,gBAAoC;AAAA,EACxC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,qBAAqB;AAAA,IACrB,eAAe;AAAA,IACf,qBAAqB;AAAA,EACvB;AACF;AAEO,SAAS,oBAAoB,OAAe,MAAM,KAAa;AACpE,MAAI,MAAM,UAAU,IAAK,QAAO;AAChC,SAAO,GAAG,MAAM,MAAM,GAAG,KAAK,IAAI,GAAG,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC;AAC1D;AAGO,SAAS,UAAU,EAAE,OAAO,GAAuB;AACxD,QAAM,UAAU,OAAO,QAAQ,OAAO,EAAE;AAExC,WAAS,YAAY,OAAO,KAAa;AACvC,QAAI,gBAAgB,KAAK,IAAI,EAAG,QAAO;AACvC,UAAM,aAAa,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI,IAAI;AACzD,WAAO,GAAG,OAAO,GAAG,UAAU;AAAA,EAChC;AAEA,WAAS,YAAY,UAA0B,MAAM,aAAa;AAChE,UAAM,MAAM,YAAY,YAAY,eAAe;AACnD,WAAO,EAAE,KAAK,OAAO,MAAM,QAAQ,KAAK,IAAI;AAAA,EAC9C;AAEA,WAAS,oBAAoB,MAKe;AAC1C,UAAM,UAAU,GAAG,KAAK,KAAK;AAC7B,UAAM,QAAQ,YAAY,KAAK,UAAU,KAAK,YAAY,KAAK,KAAK;AAEpE,WAAO;AAAA,MACL,WAAW;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa,KAAK;AAAA,QAClB,QAAQ,CAAC,KAAK;AAAA,MAChB;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa,KAAK;AAAA,QAClB,QAAQ,CAAC,MAAM,GAAG;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AAEA,WAAS,sBAAsB,OAAyB;AACtD,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,iBAAiB,MAAM,IAAI,CAAC,MAAM,OAAO;AAAA,QACvC,SAAS;AAAA,QACT,UAAU,IAAI;AAAA,QACd,MAAM,KAAK;AAAA,QACX,MAAM,YAAY,KAAK,IAAI;AAAA,MAC7B,EAAE;AAAA,IACJ;AAAA,EACF;AAEA,WAAS,mBAAmB,MAOzB;AACD,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,MAAM,KAAK;AAAA,MACX,KAAK,YAAY,KAAK,IAAI;AAAA,MAC1B,GAAI,KAAK,eAAe,EAAE,aAAa,KAAK,YAAY;AAAA,MACxD,GAAI,KAAK,SAAS,EAAE,OAAO,CAAC,KAAK,KAAK,EAAE;AAAA,MACxC,GAAI,KAAK,OAAO,EAAE,KAAK,KAAK,IAAI;AAAA,MAChC,GAAI,KAAK,SAAS,EAAE,OAAO,EAAE,SAAS,SAAS,MAAM,KAAK,MAAM,EAAE;AAAA,IACpE;AAAA,EACF;AAEA,SAAO,EAAE,SAAS,aAAa,eAAe,qBAAqB,qBAAqB,uBAAuB,mBAAmB;AACpI;","names":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as next_dist_lib_metadata_types_metadata_types from 'next/dist/lib/metadata/types/metadata-types';
|
|
2
|
+
import { Metadata } from 'next';
|
|
3
|
+
|
|
4
|
+
interface BreadcrumbItem {
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
}
|
|
8
|
+
declare function truncateDescription(value: string, max?: number): string;
|
|
9
|
+
/** SEO helpers bound to one app's public URL. */
|
|
10
|
+
declare function createSeo({ appUrl }: {
|
|
11
|
+
appUrl: string;
|
|
12
|
+
}): {
|
|
13
|
+
APP_URL: string;
|
|
14
|
+
absoluteUrl: (path?: string) => string;
|
|
15
|
+
defaultRobots: string | next_dist_lib_metadata_types_metadata_types.Robots | null | undefined;
|
|
16
|
+
truncateDescription: typeof truncateDescription;
|
|
17
|
+
buildSocialMetadata: (opts: {
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
imageUrl?: string | null;
|
|
21
|
+
imageAlt?: string;
|
|
22
|
+
}) => Pick<Metadata, "openGraph" | "twitter">;
|
|
23
|
+
buildBreadcrumbJsonLd: (items: BreadcrumbItem[]) => {
|
|
24
|
+
"@context": string;
|
|
25
|
+
"@type": string;
|
|
26
|
+
itemListElement: {
|
|
27
|
+
"@type": string;
|
|
28
|
+
position: number;
|
|
29
|
+
name: string;
|
|
30
|
+
item: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
buildProductJsonLd: (opts: {
|
|
34
|
+
name: string;
|
|
35
|
+
path: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
image?: string;
|
|
38
|
+
sku?: string;
|
|
39
|
+
brand?: string;
|
|
40
|
+
}) => {
|
|
41
|
+
brand?: {
|
|
42
|
+
"@type": string;
|
|
43
|
+
name: string;
|
|
44
|
+
} | undefined;
|
|
45
|
+
sku?: string | undefined;
|
|
46
|
+
image?: string[] | undefined;
|
|
47
|
+
description?: string | undefined;
|
|
48
|
+
"@context": string;
|
|
49
|
+
"@type": string;
|
|
50
|
+
name: string;
|
|
51
|
+
url: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { type BreadcrumbItem, createSeo, truncateDescription };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as next_dist_lib_metadata_types_metadata_types from 'next/dist/lib/metadata/types/metadata-types';
|
|
2
|
+
import { Metadata } from 'next';
|
|
3
|
+
|
|
4
|
+
interface BreadcrumbItem {
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
}
|
|
8
|
+
declare function truncateDescription(value: string, max?: number): string;
|
|
9
|
+
/** SEO helpers bound to one app's public URL. */
|
|
10
|
+
declare function createSeo({ appUrl }: {
|
|
11
|
+
appUrl: string;
|
|
12
|
+
}): {
|
|
13
|
+
APP_URL: string;
|
|
14
|
+
absoluteUrl: (path?: string) => string;
|
|
15
|
+
defaultRobots: string | next_dist_lib_metadata_types_metadata_types.Robots | null | undefined;
|
|
16
|
+
truncateDescription: typeof truncateDescription;
|
|
17
|
+
buildSocialMetadata: (opts: {
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
imageUrl?: string | null;
|
|
21
|
+
imageAlt?: string;
|
|
22
|
+
}) => Pick<Metadata, "openGraph" | "twitter">;
|
|
23
|
+
buildBreadcrumbJsonLd: (items: BreadcrumbItem[]) => {
|
|
24
|
+
"@context": string;
|
|
25
|
+
"@type": string;
|
|
26
|
+
itemListElement: {
|
|
27
|
+
"@type": string;
|
|
28
|
+
position: number;
|
|
29
|
+
name: string;
|
|
30
|
+
item: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
buildProductJsonLd: (opts: {
|
|
34
|
+
name: string;
|
|
35
|
+
path: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
image?: string;
|
|
38
|
+
sku?: string;
|
|
39
|
+
brand?: string;
|
|
40
|
+
}) => {
|
|
41
|
+
brand?: {
|
|
42
|
+
"@type": string;
|
|
43
|
+
name: string;
|
|
44
|
+
} | undefined;
|
|
45
|
+
sku?: string | undefined;
|
|
46
|
+
image?: string[] | undefined;
|
|
47
|
+
description?: string | undefined;
|
|
48
|
+
"@context": string;
|
|
49
|
+
"@type": string;
|
|
50
|
+
name: string;
|
|
51
|
+
url: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { type BreadcrumbItem, createSeo, truncateDescription };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const defaultRobots = {
|
|
2
|
+
index: true,
|
|
3
|
+
follow: true,
|
|
4
|
+
googleBot: {
|
|
5
|
+
index: true,
|
|
6
|
+
follow: true,
|
|
7
|
+
"max-image-preview": "large",
|
|
8
|
+
"max-snippet": -1,
|
|
9
|
+
"max-video-preview": -1
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
function truncateDescription(value, max = 160) {
|
|
13
|
+
if (value.length <= max) return value;
|
|
14
|
+
return `${value.slice(0, Math.max(0, max - 1)).trimEnd()}\u2026`;
|
|
15
|
+
}
|
|
16
|
+
function createSeo({ appUrl }) {
|
|
17
|
+
const APP_URL = appUrl.replace(/\/$/, "");
|
|
18
|
+
function absoluteUrl(path = "/") {
|
|
19
|
+
if (/^https?:\/\//i.test(path)) return path;
|
|
20
|
+
const normalized = path.startsWith("/") ? path : `/${path}`;
|
|
21
|
+
return `${APP_URL}${normalized}`;
|
|
22
|
+
}
|
|
23
|
+
function socialImage(imageUrl, alt = "Medialane") {
|
|
24
|
+
const url = imageUrl || absoluteUrl("/og-image.jpg");
|
|
25
|
+
return { url, width: 1200, height: 630, alt };
|
|
26
|
+
}
|
|
27
|
+
function buildSocialMetadata(opts) {
|
|
28
|
+
const ogTitle = `${opts.title} | Medialane`;
|
|
29
|
+
const image = socialImage(opts.imageUrl, opts.imageAlt ?? opts.title);
|
|
30
|
+
return {
|
|
31
|
+
openGraph: {
|
|
32
|
+
type: "website",
|
|
33
|
+
title: ogTitle,
|
|
34
|
+
description: opts.description,
|
|
35
|
+
images: [image]
|
|
36
|
+
},
|
|
37
|
+
twitter: {
|
|
38
|
+
card: "summary_large_image",
|
|
39
|
+
title: ogTitle,
|
|
40
|
+
description: opts.description,
|
|
41
|
+
images: [image.url]
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function buildBreadcrumbJsonLd(items) {
|
|
46
|
+
return {
|
|
47
|
+
"@context": "https://schema.org",
|
|
48
|
+
"@type": "BreadcrumbList",
|
|
49
|
+
itemListElement: items.map((item, i) => ({
|
|
50
|
+
"@type": "ListItem",
|
|
51
|
+
position: i + 1,
|
|
52
|
+
name: item.name,
|
|
53
|
+
item: absoluteUrl(item.path)
|
|
54
|
+
}))
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function buildProductJsonLd(opts) {
|
|
58
|
+
return {
|
|
59
|
+
"@context": "https://schema.org",
|
|
60
|
+
"@type": "Product",
|
|
61
|
+
name: opts.name,
|
|
62
|
+
url: absoluteUrl(opts.path),
|
|
63
|
+
...opts.description && { description: opts.description },
|
|
64
|
+
...opts.image && { image: [opts.image] },
|
|
65
|
+
...opts.sku && { sku: opts.sku },
|
|
66
|
+
...opts.brand && { brand: { "@type": "Brand", name: opts.brand } }
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return { APP_URL, absoluteUrl, defaultRobots, truncateDescription, buildSocialMetadata, buildBreadcrumbJsonLd, buildProductJsonLd };
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
createSeo,
|
|
73
|
+
truncateDescription
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=seo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/seo.ts"],"sourcesContent":["import type { Metadata } from \"next\";\n\nexport interface BreadcrumbItem {\n name: string;\n path: string;\n}\n\nconst defaultRobots: Metadata[\"robots\"] = {\n index: true,\n follow: true,\n googleBot: {\n index: true,\n follow: true,\n \"max-image-preview\": \"large\",\n \"max-snippet\": -1,\n \"max-video-preview\": -1,\n },\n};\n\nexport function truncateDescription(value: string, max = 160): string {\n if (value.length <= max) return value;\n return `${value.slice(0, Math.max(0, max - 1)).trimEnd()}…`;\n}\n\n/** SEO helpers bound to one app's public URL. */\nexport function createSeo({ appUrl }: { appUrl: string }) {\n const APP_URL = appUrl.replace(/\\/$/, \"\");\n\n function absoluteUrl(path = \"/\"): string {\n if (/^https?:\\/\\//i.test(path)) return path;\n const normalized = path.startsWith(\"/\") ? path : `/${path}`;\n return `${APP_URL}${normalized}`;\n }\n\n function socialImage(imageUrl?: string | null, alt = \"Medialane\") {\n const url = imageUrl || absoluteUrl(\"/og-image.jpg\");\n return { url, width: 1200, height: 630, alt };\n }\n\n function buildSocialMetadata(opts: {\n title: string;\n description: string;\n imageUrl?: string | null;\n imageAlt?: string;\n }): Pick<Metadata, \"openGraph\" | \"twitter\"> {\n const ogTitle = `${opts.title} | Medialane`;\n const image = socialImage(opts.imageUrl, opts.imageAlt ?? opts.title);\n\n return {\n openGraph: {\n type: \"website\",\n title: ogTitle,\n description: opts.description,\n images: [image],\n },\n twitter: {\n card: \"summary_large_image\",\n title: ogTitle,\n description: opts.description,\n images: [image.url],\n },\n };\n }\n\n function buildBreadcrumbJsonLd(items: BreadcrumbItem[]) {\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"BreadcrumbList\",\n itemListElement: items.map((item, i) => ({\n \"@type\": \"ListItem\",\n position: i + 1,\n name: item.name,\n item: absoluteUrl(item.path),\n })),\n };\n }\n\n function buildProductJsonLd(opts: {\n name: string;\n path: string;\n description?: string;\n image?: string;\n sku?: string;\n brand?: string;\n }) {\n return {\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n name: opts.name,\n url: absoluteUrl(opts.path),\n ...(opts.description && { description: opts.description }),\n ...(opts.image && { image: [opts.image] }),\n ...(opts.sku && { sku: opts.sku }),\n ...(opts.brand && { brand: { \"@type\": \"Brand\", name: opts.brand } }),\n };\n }\n\n return { APP_URL, absoluteUrl, defaultRobots, truncateDescription, buildSocialMetadata, buildBreadcrumbJsonLd, buildProductJsonLd };\n}\n"],"mappings":"AAOA,MAAM,gBAAoC;AAAA,EACxC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,qBAAqB;AAAA,IACrB,eAAe;AAAA,IACf,qBAAqB;AAAA,EACvB;AACF;AAEO,SAAS,oBAAoB,OAAe,MAAM,KAAa;AACpE,MAAI,MAAM,UAAU,IAAK,QAAO;AAChC,SAAO,GAAG,MAAM,MAAM,GAAG,KAAK,IAAI,GAAG,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC;AAC1D;AAGO,SAAS,UAAU,EAAE,OAAO,GAAuB;AACxD,QAAM,UAAU,OAAO,QAAQ,OAAO,EAAE;AAExC,WAAS,YAAY,OAAO,KAAa;AACvC,QAAI,gBAAgB,KAAK,IAAI,EAAG,QAAO;AACvC,UAAM,aAAa,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI,IAAI;AACzD,WAAO,GAAG,OAAO,GAAG,UAAU;AAAA,EAChC;AAEA,WAAS,YAAY,UAA0B,MAAM,aAAa;AAChE,UAAM,MAAM,YAAY,YAAY,eAAe;AACnD,WAAO,EAAE,KAAK,OAAO,MAAM,QAAQ,KAAK,IAAI;AAAA,EAC9C;AAEA,WAAS,oBAAoB,MAKe;AAC1C,UAAM,UAAU,GAAG,KAAK,KAAK;AAC7B,UAAM,QAAQ,YAAY,KAAK,UAAU,KAAK,YAAY,KAAK,KAAK;AAEpE,WAAO;AAAA,MACL,WAAW;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa,KAAK;AAAA,QAClB,QAAQ,CAAC,KAAK;AAAA,MAChB;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa,KAAK;AAAA,QAClB,QAAQ,CAAC,MAAM,GAAG;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AAEA,WAAS,sBAAsB,OAAyB;AACtD,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,iBAAiB,MAAM,IAAI,CAAC,MAAM,OAAO;AAAA,QACvC,SAAS;AAAA,QACT,UAAU,IAAI;AAAA,QACd,MAAM,KAAK;AAAA,QACX,MAAM,YAAY,KAAK,IAAI;AAAA,MAC7B,EAAE;AAAA,IACJ;AAAA,EACF;AAEA,WAAS,mBAAmB,MAOzB;AACD,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,MAAM,KAAK;AAAA,MACX,KAAK,YAAY,KAAK,IAAI;AAAA,MAC1B,GAAI,KAAK,eAAe,EAAE,aAAa,KAAK,YAAY;AAAA,MACxD,GAAI,KAAK,SAAS,EAAE,OAAO,CAAC,KAAK,KAAK,EAAE;AAAA,MACxC,GAAI,KAAK,OAAO,EAAE,KAAK,KAAK,IAAI;AAAA,MAChC,GAAI,KAAK,SAAS,EAAE,OAAO,EAAE,SAAS,SAAS,MAAM,KAAK,MAAM,EAAE;AAAA,IACpE;AAAA,EACF;AAEA,SAAO,EAAE,SAAS,aAAa,eAAe,qBAAqB,qBAAqB,uBAAuB,mBAAmB;AACpI;","names":[]}
|
|
@@ -41,7 +41,7 @@ function useAccounts(search = "", ipType = "", limit = 24) {
|
|
|
41
41
|
const { data, error, isLoading, isValidating, setSize } = (0, import_infinite.default)(
|
|
42
42
|
(index) => [import_query_keys.QUERY_PREFIX.accountsPages, search, ipType, limit, index + 1],
|
|
43
43
|
([, query, type, pageSize, page]) => client.api.accounts.list({ search: query || void 0, ipType: type || void 0, page, limit: pageSize }),
|
|
44
|
-
{
|
|
44
|
+
{ revalidateFirstPage: false }
|
|
45
45
|
);
|
|
46
46
|
const accounts = data ? data.flatMap((page) => page.data) : EMPTY_ACCOUNTS;
|
|
47
47
|
const total = data?.[0]?.meta?.total ?? 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/use-accounts.ts"],"sourcesContent":["\"use client\";\n\nimport useSWRInfinite from \"swr/infinite\";\nimport type { ApiAccount } from \"@medialane/sdk\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport { QUERY_PREFIX } from \"./query-keys.js\";\n\nconst EMPTY_ACCOUNTS: ApiAccount[] = [];\n\nexport function useAccounts(search = \"\", ipType = \"\", limit = 24) {\n const client = useMedialaneClient();\n\n const { data, error, isLoading, isValidating, setSize } = useSWRInfinite(\n (index) => [QUERY_PREFIX.accountsPages, search, ipType, limit, index + 1] as const,\n ([, query, type, pageSize, page]) =>\n client.api.accounts.list({ search: query || undefined, ipType: type || undefined, page, limit: pageSize }),\n {
|
|
1
|
+
{"version":3,"sources":["../../src/utils/use-accounts.ts"],"sourcesContent":["\"use client\";\n\nimport useSWRInfinite from \"swr/infinite\";\nimport type { ApiAccount } from \"@medialane/sdk\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport { QUERY_PREFIX } from \"./query-keys.js\";\n\nconst EMPTY_ACCOUNTS: ApiAccount[] = [];\n\nexport function useAccounts(search = \"\", ipType = \"\", limit = 24) {\n const client = useMedialaneClient();\n\n const { data, error, isLoading, isValidating, setSize } = useSWRInfinite(\n (index) => [QUERY_PREFIX.accountsPages, search, ipType, limit, index + 1] as const,\n ([, query, type, pageSize, page]) =>\n client.api.accounts.list({ search: query || undefined, ipType: type || undefined, page, limit: pageSize }),\n { revalidateFirstPage: false },\n );\n\n const accounts = data ? data.flatMap((page) => page.data) : EMPTY_ACCOUNTS;\n const total = data?.[0]?.meta?.total ?? 0;\n\n return {\n accounts,\n total,\n isLoading,\n isLoadingMore: isValidating,\n hasMore: accounts.length < total,\n loadMore: () => void setSize((size) => size + 1),\n error,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAA2B;AAE3B,kCAAmC;AACnC,wBAA6B;AAE7B,MAAM,iBAA+B,CAAC;AAE/B,SAAS,YAAY,SAAS,IAAI,SAAS,IAAI,QAAQ,IAAI;AAChE,QAAM,aAAS,gDAAmB;AAElC,QAAM,EAAE,MAAM,OAAO,WAAW,cAAc,QAAQ,QAAI,gBAAAA;AAAA,IACxD,CAAC,UAAU,CAAC,+BAAa,eAAe,QAAQ,QAAQ,OAAO,QAAQ,CAAC;AAAA,IACxE,CAAC,CAAC,EAAE,OAAO,MAAM,UAAU,IAAI,MAC7B,OAAO,IAAI,SAAS,KAAK,EAAE,QAAQ,SAAS,QAAW,QAAQ,QAAQ,QAAW,MAAM,OAAO,SAAS,CAAC;AAAA,IAC3G,EAAE,qBAAqB,MAAM;AAAA,EAC/B;AAEA,QAAM,WAAW,OAAO,KAAK,QAAQ,CAAC,SAAS,KAAK,IAAI,IAAI;AAC5D,QAAM,QAAQ,OAAO,CAAC,GAAG,MAAM,SAAS;AAExC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,SAAS,SAAS,SAAS;AAAA,IAC3B,UAAU,MAAM,KAAK,QAAQ,CAAC,SAAS,OAAO,CAAC;AAAA,IAC/C;AAAA,EACF;AACF;","names":["useSWRInfinite"]}
|
|
@@ -8,7 +8,7 @@ function useAccounts(search = "", ipType = "", limit = 24) {
|
|
|
8
8
|
const { data, error, isLoading, isValidating, setSize } = useSWRInfinite(
|
|
9
9
|
(index) => [QUERY_PREFIX.accountsPages, search, ipType, limit, index + 1],
|
|
10
10
|
([, query, type, pageSize, page]) => client.api.accounts.list({ search: query || void 0, ipType: type || void 0, page, limit: pageSize }),
|
|
11
|
-
{
|
|
11
|
+
{ revalidateFirstPage: false }
|
|
12
12
|
);
|
|
13
13
|
const accounts = data ? data.flatMap((page) => page.data) : EMPTY_ACCOUNTS;
|
|
14
14
|
const total = data?.[0]?.meta?.total ?? 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/use-accounts.ts"],"sourcesContent":["\"use client\";\n\nimport useSWRInfinite from \"swr/infinite\";\nimport type { ApiAccount } from \"@medialane/sdk\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport { QUERY_PREFIX } from \"./query-keys.js\";\n\nconst EMPTY_ACCOUNTS: ApiAccount[] = [];\n\nexport function useAccounts(search = \"\", ipType = \"\", limit = 24) {\n const client = useMedialaneClient();\n\n const { data, error, isLoading, isValidating, setSize } = useSWRInfinite(\n (index) => [QUERY_PREFIX.accountsPages, search, ipType, limit, index + 1] as const,\n ([, query, type, pageSize, page]) =>\n client.api.accounts.list({ search: query || undefined, ipType: type || undefined, page, limit: pageSize }),\n {
|
|
1
|
+
{"version":3,"sources":["../../src/utils/use-accounts.ts"],"sourcesContent":["\"use client\";\n\nimport useSWRInfinite from \"swr/infinite\";\nimport type { ApiAccount } from \"@medialane/sdk\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport { QUERY_PREFIX } from \"./query-keys.js\";\n\nconst EMPTY_ACCOUNTS: ApiAccount[] = [];\n\nexport function useAccounts(search = \"\", ipType = \"\", limit = 24) {\n const client = useMedialaneClient();\n\n const { data, error, isLoading, isValidating, setSize } = useSWRInfinite(\n (index) => [QUERY_PREFIX.accountsPages, search, ipType, limit, index + 1] as const,\n ([, query, type, pageSize, page]) =>\n client.api.accounts.list({ search: query || undefined, ipType: type || undefined, page, limit: pageSize }),\n { revalidateFirstPage: false },\n );\n\n const accounts = data ? data.flatMap((page) => page.data) : EMPTY_ACCOUNTS;\n const total = data?.[0]?.meta?.total ?? 0;\n\n return {\n accounts,\n total,\n isLoading,\n isLoadingMore: isValidating,\n hasMore: accounts.length < total,\n loadMore: () => void setSize((size) => size + 1),\n error,\n };\n}\n"],"mappings":";AAEA,OAAO,oBAAoB;AAE3B,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAE7B,MAAM,iBAA+B,CAAC;AAE/B,SAAS,YAAY,SAAS,IAAI,SAAS,IAAI,QAAQ,IAAI;AAChE,QAAM,SAAS,mBAAmB;AAElC,QAAM,EAAE,MAAM,OAAO,WAAW,cAAc,QAAQ,IAAI;AAAA,IACxD,CAAC,UAAU,CAAC,aAAa,eAAe,QAAQ,QAAQ,OAAO,QAAQ,CAAC;AAAA,IACxE,CAAC,CAAC,EAAE,OAAO,MAAM,UAAU,IAAI,MAC7B,OAAO,IAAI,SAAS,KAAK,EAAE,QAAQ,SAAS,QAAW,QAAQ,QAAQ,QAAW,MAAM,OAAO,SAAS,CAAC;AAAA,IAC3G,EAAE,qBAAqB,MAAM;AAAA,EAC/B;AAEA,QAAM,WAAW,OAAO,KAAK,QAAQ,CAAC,SAAS,KAAK,IAAI,IAAI;AAC5D,QAAM,QAAQ,OAAO,CAAC,GAAG,MAAM,SAAS;AAExC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,SAAS,SAAS,SAAS;AAAA,IAC3B,UAAU,MAAM,KAAK,QAAQ,CAAC,SAAS,OAAO,CAAC;AAAA,IAC/C;AAAA,EACF;AACF;","names":[]}
|
|
@@ -40,8 +40,7 @@ function useActivities(query = {}) {
|
|
|
40
40
|
const key = JSON.stringify({ op: "activities", ...query });
|
|
41
41
|
const { data, error, isLoading, mutate } = (0, import_swr.default)(
|
|
42
42
|
key,
|
|
43
|
-
() => client.api.activity.list(query)
|
|
44
|
-
{ revalidateOnFocus: false }
|
|
43
|
+
() => client.api.activity.list(query)
|
|
45
44
|
);
|
|
46
45
|
return {
|
|
47
46
|
activities: data?.data ?? [],
|
|
@@ -55,8 +54,7 @@ function useActivitiesByAddress(address) {
|
|
|
55
54
|
const client = (0, import_use_medialane_client.useMedialaneClient)();
|
|
56
55
|
const { data, error, isLoading, mutate } = (0, import_swr.default)(
|
|
57
56
|
address ? `activities-${address}` : null,
|
|
58
|
-
() => client.api.activity.byAddress(address)
|
|
59
|
-
{ revalidateOnFocus: false }
|
|
57
|
+
() => client.api.activity.byAddress(address)
|
|
60
58
|
);
|
|
61
59
|
return { activities: data?.data ?? [], isLoading, error, mutate };
|
|
62
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/use-activities.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { ApiActivitiesQuery, ApiActivity, ApiResponse } from \"@medialane/sdk\";\n\nexport function useActivities( query: ApiActivitiesQuery = {}) {\n const client = useMedialaneClient();\n const key = JSON.stringify({ op: \"activities\", ...query });\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiActivity[]>>(\n key,\n () => client.api.activity.list(query)
|
|
1
|
+
{"version":3,"sources":["../../src/utils/use-activities.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { ApiActivitiesQuery, ApiActivity, ApiResponse } from \"@medialane/sdk\";\n\nexport function useActivities( query: ApiActivitiesQuery = {}) {\n const client = useMedialaneClient();\n const key = JSON.stringify({ op: \"activities\", ...query });\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiActivity[]>>(\n key,\n () => client.api.activity.list(query)\n );\n\n return {\n activities: data?.data ?? [],\n meta: data?.meta,\n isLoading,\n error,\n mutate,\n };\n}\n\nexport function useActivitiesByAddress( address: string | null) {\n const client = useMedialaneClient();\n\n const { data, error, isLoading, mutate } = useSWR(\n address ? `activities-${address}` : null,\n () => client.api.activity.byAddress(address!)\n );\n\n return { activities: data?.data ?? [], isLoading, error, mutate };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AACnB,kCAAmC;AAG5B,SAAS,cAAe,QAA4B,CAAC,GAAG;AAC7D,QAAM,aAAS,gDAAmB;AAClC,QAAM,MAAM,KAAK,UAAU,EAAE,IAAI,cAAc,GAAG,MAAM,CAAC;AAEzD,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC;AAAA,IACA,MAAM,OAAO,IAAI,SAAS,KAAK,KAAK;AAAA,EACtC;AAEA,SAAO;AAAA,IACL,YAAY,MAAM,QAAQ,CAAC;AAAA,IAC3B,MAAM,MAAM;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,uBAAwB,SAAwB;AAC9D,QAAM,aAAS,gDAAmB;AAElC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,UAAU,cAAc,OAAO,KAAK;AAAA,IACpC,MAAM,OAAO,IAAI,SAAS,UAAU,OAAQ;AAAA,EAC9C;AAEA,SAAO,EAAE,YAAY,MAAM,QAAQ,CAAC,GAAG,WAAW,OAAO,OAAO;AAClE;","names":["useSWR"]}
|
|
@@ -6,8 +6,7 @@ function useActivities(query = {}) {
|
|
|
6
6
|
const key = JSON.stringify({ op: "activities", ...query });
|
|
7
7
|
const { data, error, isLoading, mutate } = useSWR(
|
|
8
8
|
key,
|
|
9
|
-
() => client.api.activity.list(query)
|
|
10
|
-
{ revalidateOnFocus: false }
|
|
9
|
+
() => client.api.activity.list(query)
|
|
11
10
|
);
|
|
12
11
|
return {
|
|
13
12
|
activities: data?.data ?? [],
|
|
@@ -21,8 +20,7 @@ function useActivitiesByAddress(address) {
|
|
|
21
20
|
const client = useMedialaneClient();
|
|
22
21
|
const { data, error, isLoading, mutate } = useSWR(
|
|
23
22
|
address ? `activities-${address}` : null,
|
|
24
|
-
() => client.api.activity.byAddress(address)
|
|
25
|
-
{ revalidateOnFocus: false }
|
|
23
|
+
() => client.api.activity.byAddress(address)
|
|
26
24
|
);
|
|
27
25
|
return { activities: data?.data ?? [], isLoading, error, mutate };
|
|
28
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/use-activities.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { ApiActivitiesQuery, ApiActivity, ApiResponse } from \"@medialane/sdk\";\n\nexport function useActivities( query: ApiActivitiesQuery = {}) {\n const client = useMedialaneClient();\n const key = JSON.stringify({ op: \"activities\", ...query });\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiActivity[]>>(\n key,\n () => client.api.activity.list(query)
|
|
1
|
+
{"version":3,"sources":["../../src/utils/use-activities.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { ApiActivitiesQuery, ApiActivity, ApiResponse } from \"@medialane/sdk\";\n\nexport function useActivities( query: ApiActivitiesQuery = {}) {\n const client = useMedialaneClient();\n const key = JSON.stringify({ op: \"activities\", ...query });\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiActivity[]>>(\n key,\n () => client.api.activity.list(query)\n );\n\n return {\n activities: data?.data ?? [],\n meta: data?.meta,\n isLoading,\n error,\n mutate,\n };\n}\n\nexport function useActivitiesByAddress( address: string | null) {\n const client = useMedialaneClient();\n\n const { data, error, isLoading, mutate } = useSWR(\n address ? `activities-${address}` : null,\n () => client.api.activity.byAddress(address!)\n );\n\n return { activities: data?.data ?? [], isLoading, error, mutate };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AACnB,SAAS,0BAA0B;AAG5B,SAAS,cAAe,QAA4B,CAAC,GAAG;AAC7D,QAAM,SAAS,mBAAmB;AAClC,QAAM,MAAM,KAAK,UAAU,EAAE,IAAI,cAAc,GAAG,MAAM,CAAC;AAEzD,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,OAAO,IAAI,SAAS,KAAK,KAAK;AAAA,EACtC;AAEA,SAAO;AAAA,IACL,YAAY,MAAM,QAAQ,CAAC;AAAA,IAC3B,MAAM,MAAM;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,uBAAwB,SAAwB;AAC9D,QAAM,SAAS,mBAAmB;AAElC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,UAAU,cAAc,OAAO,KAAK;AAAA,IACpC,MAAM,OAAO,IAAI,SAAS,UAAU,OAAQ;AAAA,EAC9C;AAEA,SAAO,EAAE,YAAY,MAAM,QAAQ,CAAC,GAAG,WAAW,OAAO,OAAO;AAClE;","names":[]}
|
|
@@ -39,7 +39,7 @@ function useCoinGuarantees(coinAddress, enabled = true) {
|
|
|
39
39
|
const { data, error, isLoading } = (0, import_swr.default)(
|
|
40
40
|
coinAddress && enabled ? `coin-guarantees-${coinAddress}` : null,
|
|
41
41
|
() => getClient().api.chainReads.coinGuarantees(coinAddress),
|
|
42
|
-
{
|
|
42
|
+
{ shouldRetryOnError: false }
|
|
43
43
|
);
|
|
44
44
|
return { guarantees: data ?? null, isLoading, error };
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/use-coin-guarantees.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { CreatorCoinGuarantees } from \"@medialane/sdk/starknet\";\nimport { useMedialaneApp } from \"../components/medialane-app.js\";\n\nexport function useCoinGuarantees(coinAddress?: string | null, enabled = true) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading } = useSWR<CreatorCoinGuarantees | null>(\n coinAddress && enabled ? `coin-guarantees-${coinAddress}` : null,\n () => getClient().api.chainReads.coinGuarantees(coinAddress as string),\n {
|
|
1
|
+
{"version":3,"sources":["../../src/utils/use-coin-guarantees.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { CreatorCoinGuarantees } from \"@medialane/sdk/starknet\";\nimport { useMedialaneApp } from \"../components/medialane-app.js\";\n\nexport function useCoinGuarantees(coinAddress?: string | null, enabled = true) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading } = useSWR<CreatorCoinGuarantees | null>(\n coinAddress && enabled ? `coin-guarantees-${coinAddress}` : null,\n () => getClient().api.chainReads.coinGuarantees(coinAddress as string),\n { shouldRetryOnError: false }\n );\n\n return { guarantees: data ?? null, isLoading, error };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AAEnB,2BAAgC;AAEzB,SAAS,kBAAkB,aAA6B,UAAU,MAAM;AAC7E,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,QAAM,EAAE,MAAM,OAAO,UAAU,QAAI,WAAAA;AAAA,IACjC,eAAe,UAAU,mBAAmB,WAAW,KAAK;AAAA,IAC5D,MAAM,UAAU,EAAE,IAAI,WAAW,eAAe,WAAqB;AAAA,IACrE,EAAE,oBAAoB,MAAM;AAAA,EAC9B;AAEA,SAAO,EAAE,YAAY,QAAQ,MAAM,WAAW,MAAM;AACtD;","names":["useSWR"]}
|
|
@@ -6,7 +6,7 @@ function useCoinGuarantees(coinAddress, enabled = true) {
|
|
|
6
6
|
const { data, error, isLoading } = useSWR(
|
|
7
7
|
coinAddress && enabled ? `coin-guarantees-${coinAddress}` : null,
|
|
8
8
|
() => getClient().api.chainReads.coinGuarantees(coinAddress),
|
|
9
|
-
{
|
|
9
|
+
{ shouldRetryOnError: false }
|
|
10
10
|
);
|
|
11
11
|
return { guarantees: data ?? null, isLoading, error };
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/use-coin-guarantees.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { CreatorCoinGuarantees } from \"@medialane/sdk/starknet\";\nimport { useMedialaneApp } from \"../components/medialane-app.js\";\n\nexport function useCoinGuarantees(coinAddress?: string | null, enabled = true) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading } = useSWR<CreatorCoinGuarantees | null>(\n coinAddress && enabled ? `coin-guarantees-${coinAddress}` : null,\n () => getClient().api.chainReads.coinGuarantees(coinAddress as string),\n {
|
|
1
|
+
{"version":3,"sources":["../../src/utils/use-coin-guarantees.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { CreatorCoinGuarantees } from \"@medialane/sdk/starknet\";\nimport { useMedialaneApp } from \"../components/medialane-app.js\";\n\nexport function useCoinGuarantees(coinAddress?: string | null, enabled = true) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading } = useSWR<CreatorCoinGuarantees | null>(\n coinAddress && enabled ? `coin-guarantees-${coinAddress}` : null,\n () => getClient().api.chainReads.coinGuarantees(coinAddress as string),\n { shouldRetryOnError: false }\n );\n\n return { guarantees: data ?? null, isLoading, error };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AAEnB,SAAS,uBAAuB;AAEzB,SAAS,kBAAkB,aAA6B,UAAU,MAAM;AAC7E,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,QAAM,EAAE,MAAM,OAAO,UAAU,IAAI;AAAA,IACjC,eAAe,UAAU,mBAAmB,WAAW,KAAK;AAAA,IAC5D,MAAM,UAAU,EAAE,IAAI,WAAW,eAAe,WAAqB;AAAA,IACrE,EAAE,oBAAoB,MAAM;AAAA,EAC9B;AAEA,SAAO,EAAE,YAAY,QAAQ,MAAM,WAAW,MAAM;AACtD;","names":[]}
|
|
@@ -42,7 +42,7 @@ function useAllCoinPrices() {
|
|
|
42
42
|
const { data, isLoading } = (0, import_swr.default)(
|
|
43
43
|
"coin-prices",
|
|
44
44
|
async () => await client.api.coins.prices(),
|
|
45
|
-
{
|
|
45
|
+
{ shouldRetryOnError: false }
|
|
46
46
|
);
|
|
47
47
|
return { prices: data ?? null, isLoading };
|
|
48
48
|
}
|