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

vuepik

v0.0.2

Published

A Vue 3 plugin for comprehensive image handling features, starting with an image selector and planned to include cropping, resizing, editing, gallery, lazy loading, carousel, zoom, annotations, and comparison.

Downloads

13

Readme

VUEPIK

A Vue 3 plugin for comprehensive image handling features, starting with an image selector and planned to include cropping, resizing, editing, gallery, lazy loading, carousel, zoom, annotations, and comparison.

Features

Current Features

  1. Image Selector
    • Single image selection.
    • Drag and drop functionality.
    • Image preview before uploading.
    • File size and type validation.

Planned Features

  1. Image Cropper

    • Crop images to specified aspect ratios.
    • Free-form cropping.
    • Zoom and rotate functionality.
    • Preview the cropped image.
  2. Image Resizer

    • Resize images to specific dimensions.
    • Maintain aspect ratio while resizing.
    • Compress images to reduce file size.
  3. Image Editor

    • Basic editing tools: brightness, contrast, saturation, and filters.
    • Drawing tools: pen, shapes, and text overlay.
    • Undo and redo functionality.
    • Save edited image.
  4. Image Gallery

    • Display a gallery of images with lightbox functionality.
    • Support for pagination and lazy loading.
    • Image sorting and filtering options.
  5. Image Lazy Loader

    • Lazy load images as they come into the viewport.
    • Placeholder image while loading.
    • Error handling for failed image loads.
  6. Image Carousel/Slider

    • Create responsive image carousels.
    • Customizable transition effects.
    • Auto-play and manual navigation options.
    • Thumbnail navigation.
  7. Image Zoom

    • Zoom in and out functionality on hover or click.
    • Magnifying glass effect.
  8. Image Annotations

    • Allow users to add annotations to images.
    • Save and edit annotations.
  9. Image Comparison Slider

    • Side-by-side comparison of images with a draggable slider.

Installation

You can install vuepik via npm:

npm install vuepik

Usage

Basic Setup

// main.ts or main.js
import { createApp } from 'vue';
import App from './App.vue';
import vuepik from 'vuepik';
import 'vuepik/style.css';

const app = createApp(App);
app.use(vuepik);
app.mount('#app');

Image Selector Component

<template>
  <div>
    <ImageSelector
      :src="initialImage"
      :supported-formats="['jpg', 'png', 'gif']"
      :max-size="5 * 1024 * 1024"
      @select="handleSelect"
      @reset="handleReset"
      @error="handleError"
    />
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

const initialImage = ref('https://example.com/initial-image.jpg');

const handleSelect = (file: File) => {
  console.log('Selected file:', file);
};

const handleReset = () => {
  console.log('Image reset');
};

const handleError = (error: string) => {
  console.error('Error:', error);
};
</script>

<style scoped>
/* Add your styles here */
</style>

Props

  • src: String (optional) - Initial image source URL.
  • supported-formats: Array (optional) - List of supported image formats.
  • max-size: Number (optional) - Maximum file size in bytes.
  • annotations: Boolean (optional) - Whether to show annotations information.

Events

  • @select: Emitted when an image is selected, returns the selected file.
  • @reset: Emitted when the selected image is reset.
  • @error: Emitted when there is an error, returns the error message.

Development

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Preview the Production Build

npm run preview

Contributing

Contributions are welcome! Please check the issues for new features or report any bugs you find.

License

MIT