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

@onereach/or-browser

v0.0.47

Published

Vue component for browsing assets, items and files.

Downloads

894

Readme

@onereach/or-browser

🗂 Vue component for browsing assets, items and files.

Props

  • v-model: Object default: {}

    An object with data that the component will manipulate. Component will mutate this object if any operations allowed. Must have the following structure:

    {
      dir1: {
        subdir: {},
        file1: 'content of file 1',
        file2: 'content of file 2'
      },
      file3: 'content of file 3'
    }
  • selectedItems.sync: Array default: []

    An array of selected items. Works when enableSelection is true.

  • enableSelection: Boolean default: false

    Enables possibility to select items in component.

  • multipleSelect: Boolean default: false

    Whether or not user can select multiple items. Works when enableSelection is true.

  • loadingPaths: Array default: []

    Whether or not the directory is in loading state. Add path to show spinner in directory.

    Limit for number of selected items. Use 0 for unlimited number of selected items. Works when enableSelection and multipleSelect is true.

  • allowOperations: Object default:

 {
   copyPaste: true,
   createDirectory: true,
   createFile: true,
   delete: true,
 }

Note: this restriction will not affect the methods that calls from this.$refs[componentRef]

  • isPreviewLoading: Boolean default: false

    Whether or not the preview part of component is in loading state. Set to true show spinner and disable navigation.

  • rootLabel: String default: '.'

    Label for root directory item in list

Events

  • pathChange

    Emitted when browsing path changed.

    Handler called with new and old paths, e. g. { old: '/dir', new: '/dir/subdir' }

  • chevronClick

    Emitted when chevron near the directory clicked.

    Handler called with directory state and path, e. g. { path: '/dir', expanded: false }

  • fileClick

    Emitted when file clicked.

    Handler called with file content and path, e. g. { path: '/dir/file', content: 'some files' }

  • copy:

    Emitted when the copy operation performed.

  • paste:

    Emitted when the paste operation performed.

  • delete:

    Emitted when the delete operation performed.

  • cut:

    Emitted when the cut operation performed.

  • fileCreated:

    Emitted when user creates file

  • directoryCreated

    Emitted when user creates directory

  • fileEdited

    Emitted when the user edited file

Slots

  • previewer

    Holds previewer for files which represents files. Slot props contains content, which is currently selected item content and extension

Methods

  • resetPreview(): resets preview.
  • rename(path, newName): Renames file or directory
  • resetSelection(): Deselect all selected files.