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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-shine-api

v1.3.4

Published

react component which allows the selection of files from the SHINE API

Readme

react-shine-api

This is a react component that allows users to browse the SHINE API. It allows selection of files, and passes the selected files through to your app. View a demo here. This project was created using create-react-library

Installation

$ npm install --save react-shine-api

Usage

You will need to whitelist the IP address this app will be at with MPIWG before it will be allowed to connect to the SHINE API. To do this, please contact [email protected]

import React, { Component } from "react";
import ShineBrowser from "react-shine-api";

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      showShine: true
    };
  }

  close() {
    this.setState({ showShine: false });
  }

  handleFileUpload(files){
    console.log('Files: ', files);
  }

  render() {
    return (
      <div>
        <div style={{
            maxWidth: 1000,
            height: 700,
            margin: "auto",
            boxShadow: "0 .5rem 1rem rgba(0,0,0,.15)"
        }}>
          {this.state.showShine ? (
            <ShineBrowser
              styles={{
                primary: "#427af4"
              }}
              close={this.close.bind(this)}
              handleFileUpload={this.handleFileUpload.bind(this)}
            />
          ) : null}
        </div>
      </div>
    );
  }
}

Props for

| Props | | | ------ | ------ | | styles | customizable styles object (see below for details) | | close | optional. function that gets called when the user attempts to close the SHINE window. Setting this prop will display an X button in the upper corner | | handleFileUpload | function that is called when the user is ready to upload their files, once all the content for the files is ready. passes a files array (see below). |

File Array

An array of objects with the following structure

{
    id: "54d1dsf4-8bc9-4ee3-9abd-9256fe684cd",
    name: "孝義",
    parentUuid: "743711b7-c294-4619-90b3-963792248de4",
    uri: "https://urlname.com/4risesections/5379669",
    uuid: "54d174f4-8bc9-4ee3-9abd-924239e684cd",
    content: "all content comes through here as a string"
}

Styling

This component will take 100% height and width of its container. You can customize the styles by supplying the styles object detailed below to the component.

| Styles | | | ------ | ------ | | borderRadius | border-radius of buttons, boxes, inputs, etc. throughout the app | | primary | primary color used for buttons and actionable items throughout the app | | headerBG | main header background color | | lightBG | light background color | | text | main text color | | lightText | secondary text color | | fontFamily | font family used throughout - default is "Calibri" | | selectedItemsBackgroundColor | background color of the expandable header in the search screen |

Development

Run the below command to start the server for the react-shine-api module

$ cd react-shine-api
$ npm link
$ npm start

Next, (in a seperate terminal) run the below commands to start the example project that wraps the component. When you make changes, you will see them updated in this project.

$ cd react-shine-api/example
$ npm link react-shine-api
$ npm start

Deployment

rollup will automatically bundle the module and publish it on the below command

$ npm publish

License

This project is licensed under the MIT License - see the LICENSE.txt file for details