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

@capacitor-community/photoviewer

v3.0.6

Published

PhotoViewer table images with fullscreen and sharing capabilities

Downloads

4,258

Readme

Maintainers

| Maintainer | GitHub | Social | | ----------------- | ----------------------------------------- | ------ | | Quéau Jean Pierre | jepiqueau | |

CAPACITOR 5 (Master)

For more info on releases:

Browser Support

The plugin follows the guidelines from the Capacitor Team,

meaning that it will not work in IE11 without additional JavaScript transformations, e.g. with Babel.

Installation

npm install @capacitor-community/photoviewer
npx cap sync

Since version 3.0.4, modify the capacitor.config.ts to add the image location to save the image downloaded from an HTTP request to the internal disk.

const config: CapacitorConfig = {
  ...
  plugins: {
    PhotoViewer: {
      iosImageLocation: 'Library/Images',
      androidImageLocation: 'Files/Images',
    }
  }
  ...
};

export default config;

iOS

  • in Xcode, open Info.plist and add a new Information Property like Privacy - Photo Library Usage Description and set a value to We need to write photos. This is required to have the Shareof images and the create Movie working.

Android

  • on the res project folder open the file_paths.xml file and add
    <files-path name="files" path="."/>
  • open the build.gradle (Project:android) and make sure that kotlin is declared
...
buildscript {
    ext.kotlin_version = '1.8.20'
    dependencies {
        ...
        classpath 'com.android.tools.build:gradle:8.0.0'
        classpath 'com.google.gms:google-services:4.3.15'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
...
  • open the build.gradle (Module: android.app) and do the following

    • after apply plugin: 'com.android.application' add

      apply plugin: 'kotlin-android'
      apply plugin: 'kotlin-kapt'
    • in the android block add

      buildFeatures {
          dataBinding = true
      }
    • in the repositories block add

      maven { url 'https://jitpack.io' }
    • in the dependencies block add

      implementation "androidx.core:core-ktx:1.10.0"
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  • Now run Sync Project with Gradle Files and you are ready.

Web, PWA

The plugin works with the companion Stencil component jeep-photoviewer. It is mandatory to install it

npm install --save-dev jeep-photoviewer@latest

Build your App

When your app is ready

npm run build
npx cap copy
npx cap copy web
npx cap open android   // Android
npx cap open ios       // iOS
npm run serve          // Web

Supported methods

| Name | Android | iOS | Electron | Web | | :-------------------------- | :------ | :-- | :------- | :-- | | echo | ✅ | ✅ | ❌ | ✅ | | show | ✅ | ✅ | ❌ | ✅ | | saveImageFromHttpToInternal | ❌ | ✅ | ❌ | ❌ | | getInternalImagePaths | ❌ | ✅ | ❌ | ❌ |

Documentation

API_Documentation

Applications demonstrating the use of the plugin

Ionic/Angular

Ionic/Vue

React

Usage

iOS and Android

  • In Gallery mode (Image Array with more than one Image):
    • make a tap will select the image and go fullscreen
    • In Fulscreen
      • tap will hide the share and exit buttons and open the window for other gestures.
      • double tap to zoom in and out
      • pinch with your two fingers
      • tap will show the share and exit buttons and leave the window for other gestures.
      • double tap will hide the buttons and zoom in straightforward (iOS only)
  • In One Image mode (Image Array with one Image only):
    • pinch-zoom and pan with your two fingers
    • double-tap to zoom directly to the maximum zoom

Dependencies

The Android code is using MikeOrtiz/TouchImageView allowing for the zooming in picture (https://github.com/MikeOrtiz/TouchImageView)

The iOS code is using SDWebImage for http async image downloader (https://github.com/SDWebImage/SDWebImage) and ISVImageScrollView for the pinch-zoom and pan in picture (https://github.com/yuriiik/ISVImageScrollView)

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!