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 🙏

© 2026 – Pkg Stats / Ryan Hefner

yahoo-pixelframe-uploader

v1.0.8

Published

<yahoo-pixelframe-uploader /> is a images / video uploader. It's a none UI web component. That means developers could design the whole stuff through <yahoo-pixelframe-uploader /> dispatch custom events.

Readme

yahoo-pixelframe-uploader

DeepScan grade

<yahoo-pixelframe-uploader /> is a images / video uploader. It's a none UI web component. That means developers could design the whole stuff through <yahoo-pixelframe-uploader /> dispatch custom events.

Users could picked image / video files through the following methods.

  • pick from file picker window.
  • drag & drop files into drop zone
  • direct copy / paste files which from file system or web page.

<yahoo-pixelframe-uploader />

Basic Usage

<yahoo-pixelframe-uploader /> is a web component. All we need to do is put the required script into your HTML document. Then follow <yahoo-pixelframe-uploader />'s html structure and everything will be all set.

  • Required Script
<script 
  type="module"
  src="https://unpkg.com/yahoo-pixelframe-uploader/mjs/wc-yahoo-pixelframe-uploader.js">
</script>
  • Structure

Put <yahoo-pixelframe-uploader /> into HTML document.

<yahoo-pixelframe-uploader>
  <script type="application/json">
    {
      "multiple": true,
      "accept": ".jpg,.jpeg,.png,.gif,.webp,.avif,.mov,.mp4,.ogg,.webm",
      "imagelimitation": {
        "minwidth": 100,
        "minheight": 100,
        "size": 52428800
      },
      "videolimitation": {
        "minwidth": 100,
        "minheight": 100,
        "size": 314572800,
        "duration": 3600
      },
      "maximagecount": 5,
      "maxvideocount": 5,
      "webservice": {
        "token": {
          "url": "https://trendr-apac.media.yahoo.com/api/pixelframe/v1/aws/resources/s3/credentials?role=content-upload"
        },
        "upload": {
          "urls": {
            "video": "https://trendr-apac.media.yahoo.com/api/pixelframe/v1/videos/upload",
            "image": "https://trendr-apac.media.yahoo.com/api/pixelframe/v1/images/upload"
          },
          "params": {
            "targetType": "rating",
            "targetId": "auction2",
            "appName": "auction",
            "resizingProfile": "bid_seller_logo",
            "transcodingProfile": "auction"
          }
        }
      }
    }
  </script>

  <button
    type="button"
    class="buttons"
    slot="trigger"
  >
    UPLOAD
  </button>
</yahoo-pixelframe-uploader>

Remember set clickable content inside <yahoo-pixelframe-uploader /> as its child and set attribute "slot" as "trigger". It will turn on file picker window when user tapped.

JavaScript Instantiation

<yahoo-pixelframe-uploader /> could also use JavaScript to create DOM element. Here comes some examples.

<script type="module">
import { YahooPixelframeUploader } from 'https://unpkg.com/yahoo-pixelframe-uploader/mjs/wc-yahoo-pixelframe-uploader.js';

//use DOM api
const nodeA = document.createElement('yahoo-pixelframe-uploader');
document.body.appendChild(nodeA);
nodeA.multiple = true;
nodeA.maximagecount = 10;
nodeA.maxvideocount = 5;

// new instance with Class
const nodeB = new YahooPixelframeUploader();
document.body.appendChild(nodeB);
nodeB.multiple = false;

// new instance with Class & default config
const config = {
  "multiple": true,
  "accept": ".jpg,.jpeg,.png,.gif,.webp,.avif,.mov,.mp4,.ogg,.webm",
  "imagelimitation": {
    "minwidth": 100,
    "minheight": 100,
    "size": 52428800
  },
  "videolimitation": {
    "minwidth": 100,
    "minheight": 100,
    "size": 314572800,
    "duration": 3600
  },
  "maximagecount": 2,
  "maxvideocount": 1,
  "webservice": {
    "token": {
      "url": "https://trendr-apac.media.yahoo.com/api/pixelframe/v1/aws/resources/s3/credentials?role=content-upload"
    },
    "upload": {
      "urls": {
        "video": "https://trendr-apac.media.yahoo.com/api/pixelframe/v1/videos/upload",
        "image": "https://trendr-apac.media.yahoo.com/api/pixelframe/v1/images/upload"
      },
      "params": {
        "targetType": "rating",
        "targetId": "auction2",
        "appName": "auction",
        "resizingProfile": "bid_seller_logo",
        "transcodingProfile": "auction"
      }
    }
  }
};
const nodeC = new YahooPixelframeUploader(config);
document.body.appendChild(nodeC);
</script>

Style Customization

<yahoo-pixelframe-uploader /> is a none UI web componentom. Clients need to setup UI by themselves. So there will be no CSS hook to style it.

Attributes

<yahoo-pixelframe-uploader /> supports some attributes to let it become more convenience & useful.

  • multiple

Set multiple or not. This should be boolean string. User could pick multi-files once multiple set.

<yahoo-pixelframe-uploader multiple>
  ...
</yahoo-pixelframe-uploader>
  • accept

Set accept. Same as input[accept]. Developers could set this to filter files by type.

<yahoo-pixelframe-uploader accept=".jpg,.jpeg,.png,.gif,.webp,.avif,.mov,.mp4,.ogg,.webm">
  ...
</yahoo-pixelframe-uploader>
  • imagelimitation

Set imagelimitation. This should be JSON boolean string. <yahoo-pixelframe-uploader /> will check image specs by this setting.

minwidth:image width must bigger than this.
minheight:image height must bigger than this.
size:image file size must under this.

<yahoo-pixelframe-uploader imagelimitation='{"minwidth":100,"minheight":100,"size":52428800}'>
  ...
</yahoo-pixelframe-uploader>
  • videolimitation

Set videolimitation. This should be JSON boolean string. <yahoo-pixelframe-uploader /> will check video specs by this setting.

minwidth:video width must bigger than this.
minheight:video height must bigger than this.
size:video file size must under this.
duration:video duration must smaller than this.

<yahoo-pixelframe-uploader videolimitation='{"minwidth":100,"minheight":100,"size":314572800,"duration":3600}'>
  ...
</yahoo-pixelframe-uploader>
  • maximagecount

Set maximagecount. <yahoo-pixelframe-uploader /> will restrict image count which user picked each time.

<yahoo-pixelframe-uploader maximagecount="2">
  ...
</yahoo-pixelframe-uploader>
  • maxvideocount

Set maxvideocount. <yahoo-pixelframe-uploader /> will restrict video count which user picked each time.

<yahoo-pixelframe-uploader maxvideocount="1">
  ...
</yahoo-pixelframe-uploader>
  • webservice

Set webservice config. Web developers could set fetch config for "token" or "upload" web service.

token:Set url for token fetching.
upload:Set urls and params for upload fetching.

<yahoo-pixelframe-uploader webservice='{"token":{"url":"https://trendr-apac.media.yahoo.com/api/pixelframe/v1/aws/resources/s3/credentials?role=content-upload"},"upload":{"urls":{"video":"https://trendr-apac.media.yahoo.com/api/pixelframe/v1/videos/upload","image":"https://trendr-apac.media.yahoo.com/api/pixelframe/v1/images/upload"},"params":{"targetType":"rating","targetId":"auction2","appName":"auction","resizingProfile":"bid_seller_logo","transcodingProfile":"auction"}}}'>
  ...
</yahoo-pixelframe-uploader>

Property

| Property Name | Type | Description | | ----------- | ----------- | ----------- | | multiple | Boolean | Getter / Setter <yahoo-pixelframe-uploader />'s multiple state. | | accept | String | Getter / Setter <yahoo-pixelframe-uploader />'s accept. | | imagelimitation | Object | Getter / Setter <yahoo-pixelframe-uploader />'s imagelimitation. <yahoo-pixelframe-uploader /> will check image specs by this setting. | | videolimitation | Object | Getter / Setter <yahoo-pixelframe-uploader />'s videolimitation. <yahoo-pixelframe-uploader /> will check video specs by this setting. | | maximagecount | Integer | Getter / Setter <yahoo-pixelframe-uploader />'s maximagecount. <yahoo-pixelframe-uploader /> will restrict image count which user picked each time. | | maxvideocount | Integer | Getter / Setter <yahoo-pixelframe-uploader />'s maxvideocount. <yahoo-pixelframe-uploader /> will restrict video count which user picked each time. | | webservice | Object | Getter / Setter <yahoo-pixelframe-uploader />'s webservice. Web developers could set fetch config for "token" or "upload" web service. <yahoo-pixelframe-uploader /> will restrict video count which user picked each time. | | processing | Boolean | Getter <yahoo-pixelframe-uploader />'s processing state. |

Events

| Event Signature | Description | | ----------- | ----------- | | yahoo-pixelframe-uploader-pick | Fired when <yahoo-pixelframe-uploader /> user picked image / video files. Developers could gather picked information through event.detail. | | yahoo-pixelframe-uploader-error | Fired when <yahoo-pixelframe-uploader /> error occured. Developers could gather information through event.detail. | | yahoo-pixelframe-uploader-process-start | Fired when <yahoo-pixelframe-uploader /> upload process start. | | yahoo-pixelframe-uploader-process-end | Fired when <yahoo-pixelframe-uploader /> upload process end. | | yahoo-pixelframe-uploader-progress | Fired when <yahoo-pixelframe-uploader /> upload processing. Developers could gather id & progress through event.detail to setup each unit's progress status. | | yahoo-pixelframe-uploader-done | Fired when <yahoo-pixelframe-uploader /> finished all upload procerss. Developers could gather results through event.detail. |

Mathod

| Mathod Signature | Description | | ----------- | ----------- | | passFiles(files) | Pass files which user picked to <yahoo-pixelframe-uploader />. (files should be blob format). |

Reference