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

slate-portive

v2.1.0

Published

Hosted images and file attachments for Slate with image resizing.

Downloads

8

Readme

Slate Portive

Upload Images and Attachments Plugin for Slate

Add beautiful and intuitive images and attachments to Slate with support for paste, drag and drop and <input type="file"> uploads.

Image Features

  • Images uploaded directly to hosted server

  • Images are proportionately resized by dragging a resize bar

  • Images are resized on the server for faster downloads and reduced bandwidth

  • Uses HTML srcSet to deliver higher resolution images to displays with higher DPI (e.g. high resolution images will be delivered at 2x the resolution if possible)

  • Shows the width/height while dragging for precise resizing

  • While images are uploading, a live progress bar is shown

  • The progress bar is not part of Slate's edit history which means undo won't undo progress bar movement

  • Uses a CDN for fast performance

  • Specify default max width/height for initial view (e.g. you can default to a preview with a width of 320px or go full width)

  • Images are just a Slate Element that you define. Just add the <HostedImage> component inside it where you want the image to be shown. Because it's just a Slate element you can do all the following:

    • You can choose to display image as block or inline image.
    • You can choose to make it a void blocks (no editable inner content) or support editable content like an editable caption.
    • You have full control over how it displays (e.g. rounded edges, drop shadows, outlines)
  • Coming Soon:

    • Image presets. Specify preset sizes for thumbnail, preview and full if you desire
    • Image imports. When a user pastes the URL of an image, it automatically uploads the image to the editor.
    • Sharpening. Enable additional image processing like sharpening for low DPI displays. Sharpening is probably not required for high DPI displays.

Attachment Features

  • Default implementation shows attachment block with filename, file size (friendly format like 12KB) and the progress bar

  • Supports progress bar while uploading on custom attachments with a <ProgressBar> Component

  • Fully customizable to display aspects like size of file, original filename and who uploaded the attachment.

General Features

  • Has an async save method that ensures that all the images and attachments have finished uploading with an optional timeout. If the timeout is reached first, will return the document without the completed uploaded.

  • Uses a secret API key just for you that gives you control over who can upload, how much and for how long giving you secure control over uploading.

  • Coming Soon:

    • Tag file uploads, for example with a userId or a projectId
    • Limit file uploads based on tags and customize message when a limit is exceeded. For example, user johndoe can upload up to 1 GB and then he is shown a message and given a link to the upgrade page.