npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@beyondnft/embeddable

v0.0.5

Published

Easily embed Dynamic NFTss in your website!

Downloads

3

Readme

BeyondNFT - Embeddable Dynamic NFTs

Easily embed Dynamic NFTss in your website!

This was developed for the Untitled NFT Hackaton while working on a safe and hopefully in the future standard way to create Dynamic NFTss.

Component

This exports an es module that you can bundle in your app or just include in your html see ./public/index.html.

It requires a target (the html element to which it should attach) and an object props :

parameters

target: HTMLElement props: object

  • contract (required): contract address
  • tokenId (required): tokenId
  • network (optional): network to request to. Good to make sure the ucrrent user is on the right chain.
  • resizable (optional): If you allow the widow to be resizable. default true
  • width (optional): width of the container. Default: 388px;
  • height (optional): width of the container. Default: 560px;

Usage

As a module from jsdeliver:

<div class="viewer"></div>
<script type="module">
  import Embeddable from 'https://cdn.jsdelivr.net/npm/@beyondnft/[email protected]/dist/embeddable.es.min.js';
  new Embeddable({
    target: document.querySelector('.viewer'),
    props: {
      contract: '0x60f80121c31a0d46b5279700f9df786054aa5ee5',
      tokenId: 49884,
      network: 'mainnet', // can be a number or a string (see src/conf/networks.js)
      resizable: false,
      width: '400px',
      height: '600px',
    },
  });
</script>

you can also find the UMD version (will set Embeddable globally): https://cdn.jsdelivr.net/npm/@beyondnft/[email protected]/dist/embeddable.umd.min.js

Development

Want to see how it works? Let's go!

  git clone https://github.com/BeyondNFT/embeddable.git embeddable-inft
  #or npx degit https://github.com/BeyondNFT/embeddable.git embeddable-inft
  cd embeddable-inft
  npm install
  npm run dev
  # open the url shown to you (probably http://localhost:3000)

There are two commands:

npm run dev

launches the dev mode. You can view the Embeddable work live at http://localhost:3000 (or any other address that the console gave you). Any change in the src files will be reflected automatically in the browser (the page will livereload).

npm run build

build the source. files are built in ./dist

Component is created with Svelte, because... what else?

Bundle is made using rollup, because i'm waiting for svelte@next before looking at Snowpack.