@zoralabs/nft-components
Advanced tools
Comparing version 0.1.5-pre5 to 0.1.6
@@ -15,4 +15,4 @@ "use strict"; | ||
return (jsx_runtime_1.jsx("div", Object.assign({}, getStyles("auctionHouseList"), { children: data && | ||
data.map((auction) => (jsx_runtime_1.jsx(NFTPreview_1.NFTPreview, { id: auction.tokenId, onClick: onClick ? (evt) => onClick(evt, auction) : undefined }, auction.id))) }), void 0)); | ||
data.map((auction) => (jsx_runtime_1.jsx(NFTPreview_1.NFTPreview, { id: auction.tokenId, contract: auction.tokenContract, onClick: onClick ? (evt) => onClick(evt, auction) : undefined }, auction.id))) }), void 0)); | ||
}; | ||
exports.AuctionHouseList = AuctionHouseList; |
@@ -9,4 +9,4 @@ "use strict"; | ||
const ButtonComponent = href ? "a" : "button"; | ||
return (jsx_runtime_1.jsx(ButtonComponent, Object.assign({ onClick: onClick, href: href, target: href ? '_blank' : undefined }, getStyles("button", { primary }), { children: children }), void 0)); | ||
return (jsx_runtime_1.jsx(ButtonComponent, Object.assign({ onClick: onClick, href: href, target: href ? "_blank" : undefined }, getStyles("button", { primary }), { children: children }), void 0)); | ||
}; | ||
exports.Button = Button; |
@@ -54,4 +54,4 @@ "use strict"; | ||
}, ""); | ||
return jsx_runtime_1.jsx(react_1.Fragment, { children: timeString || '0s' }, void 0); | ||
return jsx_runtime_1.jsx(react_1.Fragment, { children: timeString || "0s" }, void 0); | ||
}; | ||
exports.CountdownDisplay = CountdownDisplay; |
@@ -10,9 +10,9 @@ "use strict"; | ||
previewCard: { | ||
width: '330px', | ||
height: '330px', | ||
width: "330px", | ||
height: "330px", | ||
background: "white", | ||
}, | ||
nftProposalCard: { | ||
mediaWidth: '160px', | ||
mediaHeight: '160px', | ||
mediaWidth: "160px", | ||
mediaHeight: "160px", | ||
}, | ||
@@ -19,0 +19,0 @@ /** |
@@ -107,3 +107,3 @@ "use strict"; | ||
return (jsx_runtime_1.jsx(MediaLoader_1.MediaLoader, Object.assign({ getStyles: getStyles, loading: loading, error: error }, { children: jsx_runtime_1.jsxs("div", Object.assign({ ref: wrapper }, getStyles("mediaAudioWrapper"), { children: [!loading && (jsx_runtime_1.jsxs(react_1.Fragment, { children: [jsx_runtime_1.jsx("button", Object.assign({ "aria-live": "polite", onClick: togglePlay, title: playingText }, getStyles("mediaPlayButton", { playing }), { children: playingText }), void 0), | ||
jsx_runtime_1.jsx("div", Object.assign({}, getStyles("mediaAudioWaveform"), { children: jsx_runtime_1.jsx(FakeWaveformCanvas, { uri: uri || '', audioRef: audioRef }, void 0) }), void 0)] }, void 0)), | ||
jsx_runtime_1.jsx("div", Object.assign({}, getStyles("mediaAudioWaveform"), { children: jsx_runtime_1.jsx(FakeWaveformCanvas, { uri: uri || "", audioRef: audioRef }, void 0) }), void 0)] }, void 0)), | ||
jsx_runtime_1.jsx("audio", Object.assign({ loop: true, ref: audioRef, preload: "auto", playsInline: true, onPlay: () => setPlaying(true), onPause: () => setPlaying(false) }, props, { onLoadedData: props.onLoad, onCanPlayThrough: props.onLoad, onLoad: undefined }), void 0)] }), void 0) }), void 0)); | ||
@@ -110,0 +110,0 @@ }); |
@@ -9,2 +9,2 @@ import { Audio } from "./Audio"; | ||
export declare const MediaRendererDefaults: import("./RendererConfig").RendererConfig[]; | ||
export { Text, HTML, Image, Video, Audio, Model, Unknown, }; | ||
export { Text, HTML, Image, Video, Audio, Model, Unknown }; |
@@ -18,2 +18,10 @@ "use strict"; | ||
Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return Video_1.Video; } }); | ||
exports.MediaRendererDefaults = [Model_1.Model, Audio_1.Audio, Text_1.Text, HTML_1.HTML, Image_1.Image, Video_1.Video, Unknown_1.Unknown]; | ||
exports.MediaRendererDefaults = [ | ||
Model_1.Model, | ||
Audio_1.Audio, | ||
Text_1.Text, | ||
HTML_1.HTML, | ||
Image_1.Image, | ||
Video_1.Video, | ||
Unknown_1.Unknown, | ||
]; |
@@ -22,3 +22,3 @@ "use strict"; | ||
: ((_c = request.media.content) === null || _c === void 0 ? void 0 : _c.uri) || ((_d = request.media.animation) === null || _d === void 0 ? void 0 : _d.uri); | ||
const { props: mediaProps, loading, error } = MediaLoader_1.useMediaObjectProps({ | ||
const { props: mediaProps, loading, error, } = MediaLoader_1.useMediaObjectProps({ | ||
uri, | ||
@@ -25,0 +25,0 @@ request, |
@@ -17,3 +17,3 @@ "use strict"; | ||
const NFTFullPage = ({ children, config, ...wrapperProps }) => { | ||
const a11yIdPrefix = useA11yIdPrefix_1.useA11yIdPrefix('media'); | ||
const a11yIdPrefix = useA11yIdPrefix_1.useA11yIdPrefix("media"); | ||
const { getStyles } = useMediaContext_1.useMediaContext(); | ||
@@ -20,0 +20,0 @@ const allowOffer = config === null || config === void 0 ? void 0 : config.allowOffer; |
@@ -16,3 +16,3 @@ "use strict"; | ||
return { | ||
media: (jsx_runtime_1.jsx(MediaObject_1.MediaObject, { contentURI: data && 'zoraNFT' in data ? data.zoraNFT.contentURI : undefined, metadata: metadata }, void 0)), | ||
media: (jsx_runtime_1.jsx(MediaObject_1.MediaObject, { contentURI: data && "zoraNFT" in data ? data.zoraNFT.contentURI : undefined, metadata: metadata }, void 0)), | ||
title: metadata.name, | ||
@@ -19,0 +19,0 @@ }; |
@@ -13,5 +13,5 @@ "use strict"; | ||
const auctionStatus = (_a = nft.data) === null || _a === void 0 ? void 0 : _a.pricing.status; | ||
const LinkComponent = href ? 'a' : 'button'; | ||
const LinkComponent = href ? "a" : "button"; | ||
return (jsx_runtime_1.jsxs("div", Object.assign({}, getStyles("cardOuter", { hasClickEvent: !!onClick, auctionStatus }), { children: [(href || onClick) && (jsx_runtime_1.jsx(LinkComponent, Object.assign({}, getStyles("cardLink"), { href: href, onClick: onClick }, { children: "View NFT" }), void 0)), children] }), void 0)); | ||
}; | ||
exports.MediaThumbnailWrapper = MediaThumbnailWrapper; |
@@ -20,3 +20,5 @@ "use strict"; | ||
const pricing = data === null || data === void 0 ? void 0 : data.pricing; | ||
if (pricing && !pricing.reserve && pricing.status === nft_hooks_1.AuctionStateInfo.NO_PRICING) { | ||
if (pricing && | ||
!pricing.reserve && | ||
pricing.status === nft_hooks_1.AuctionStateInfo.NO_PRICING) { | ||
return (jsx_runtime_1.jsxs("div", Object.assign({}, getStyles("cardAuctionPricing", { type: "unknown" }), { children: [jsx_runtime_1.jsx("div", Object.assign({}, getStyles("textSubdued"), { children: getString("RESERVE_PRICE") }), void 0), | ||
@@ -23,0 +25,0 @@ jsx_runtime_1.jsx("div", Object.assign({}, getStyles("pricingAmount"), { children: getString("NO_PRICING_PLACEHOLDER") }), void 0), |
{ | ||
"name": "@zoralabs/nft-components", | ||
"version": "0.1.5-pre5", | ||
"version": "0.1.6", | ||
"description": "NFT Media Rendering Components", | ||
@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208367
4692