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

@pixx.io/jsdk

v0.4.7

Published

This Library helps you to integrate pixx.io DAM Features to your application.

Readme

PIXXIO JSDK

This Library support your integration of pixx.io DAM into your application.

SETUP

NPM

just install the package via npm install @pixx.io/jsdk and import it in your application via ESM:

import '@pixx.io/jsdk/build/pixxio.jsdk.css'; /* CSS stuff is needed */
import PIXXIO from '@pixx.io/jsdk';

/* or */
const PIXXIO = require('@pixx.io/jsdk')

Or simply integrate it

Just integrate it via unpkg.com:

USAGE

First you have to initialize the PIXXIO Class with your APPKEY and your APPURL (the URL to your pixx.io installation. e.g. https://demo.pixxio.media)

const p = new PIXXIO({
  appKey: string,
  appUrl: string,
  modal: boolean,
  element: HTMLElement,
  language: string,
  askForProxy: boolean
})

Options

  • appKey: Your system Application Key.
  • appUrl: Your pixx.io system URL. (Mediaspace) If the appUrl is not set, the user will be requested to set the mediaspace on the login screen.
  • refreshToken: If you know your refresh token, you can define it here. If a refreshToken and an appUrl is set the login step is skipped.
  • element: if element is set, then this element will be used as root element for the pixxio selector. Otherwise an own element is created and added to the body.
  • modal: if modal is set to false. the selector won't open as an overlay. default true
  • language: currently supported are german de and english en
  • askForProxy: if its true it shows the advanced settings at the login screen to enter proxy configurations. The JSDK does not use this information but it stores for you and you can ask for proxy settings be calling the method getProxyConfiguration()
  • compact: shows the interface as compact version. just necessary elements. default false

Events

  • authState: returns an object { login: boolean } everytime the state is changed

Methods

getMedia()

Opens a File Selector and returns a Promise. If the promise is resolved, you will recieve an array of selected files.

p.getMedia({
  max: 10
}).then((files) => {
  /** do whatever you want **/
});

Options

  • max : a number which sets the maximum of selected files. If 0 the maximum has no effect. default 0
  • allowTypes: define the file extensions which are allowed to select. For example ['jpg', 'png'] default: []
  • allowFormats: define download formats which are allowed to select. For original or preview use the keys: preview, original the other system configured formats can be defined by id. So for example ['preview', 123, 321] default: null
  • additionalResponseFields: is an array of responseFields. the possible fields are described in the official pixx.io API.
  • showFileType: shows the file type as tag in the file list. default false
  • showFileSize: shows the file size as tag in the file list. default false
  • showSubject: shows the subject under the file item as caption. default true
  • showFileName: shows the file name under the file item as caption. default false

Returns

an array of files like this:

[
  {
    id: '...', // mediaspace file id
    url: '...',
    thumbnail: '...',
    file: {...}
  }, 
  ...
]

pushMedia()

Uploads a given File to pixx.io

p.pushMedia({
  file: File(binary)
}).then(() => {
  /** do whatever you want **/
}).catch(() => {
  /** upload failed **/
});

Options

  • file : File binary
  • you can chain other options directly (like directory or keywords). For those check the API documentation of pixx.io

bulkMainVersionCheck(ids: number[])

returns an array of ids and mainVersion boolean to check if a file has changed

p.bulkMainVersionCheck([5555,5551,5553]).then(() => {
  /** do whatever you want **/
}).catch(() => {
  /** check failed **/
});

Returns

[
  { "id": 5555, "isMainVersion": false, "mainVersion": 5556, "originalFileURL": "..." },
  ...
]

getProxyConfiguration()

returns the entered configuration during login

p.getProxyConfiguration(); 

Returns

{
  "protocol": "",
  "host": "",
  "port": "",
  "auth": {
    "username": "",
    "password": ""
  }
}

forceLogout

forces the logout of the pixx.io mediaspace

p.forceLogout()