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

vue-girder-slicer-cli-ui

v0.0.9

Published

This is a vue based component library to interface with the girder slicer CLI plugin. https://github.com/girder/slicer_cli_web

Downloads

170

Readme

Girder Slicer UI

This is a vue based component library to interface with the girder slicer CLI plugin. https://github.com/girder/slicer_cli_web

This Vue component library can be used with the above plugin to list and set values for slicer CLI plugins.

GirderSlicerTasksIntegrated.vue

This is a single component that provies a listing of the tasks as well as an interface to set the paramemter values.

Customization

apiURL

The URL of the base girder instance that contains the slicer cli plugin. This defaults to the current host /api/v1

filter

A filter function that can be used to remove tasks from the listing. This will be run on every task that is returned from the /slicer_cli_web/cli endpoint. It takes a function of the type (item: SlicerTask) => boolean where returning true will display the task and returning false will filter out the task.

export interface SlicerTask {
    _id: string;
    description: string;
    image: string;
    name: string;
    type: string;
}

defaults

A function that iterates through every task parameter and enables setting default values. (item: XMLParameters) => undefined | null | XMLParameters

export interface XMLParameters {
  type: ParamSlicerType;
  slicerType: ParamGUIType;
  title: string;
  description: string;
  channel?: 'input' | 'output';
  id: string;
  value?: XMLBaseValue;
  values?: XMLBaseValue[];
  constraints?: {min?: XMLBaseValue; max?: XMLBaseValue; step?: XMLBaseValue};
  defaultValue?: XMLBaseValue;
  // Extra
  fileValue?: {
    girderId: string; // item/folder Id for the selected item
    name: string; //File Name for display purposes
    parentId: string; // Parent folder to open when using DataBrowser
    regExp?: boolean | undefined; // When selecting multiple the regExp pattern
    fileId?: string | undefined; // fileId used
  }; // Added to handle files
  required?: boolean;
  extensions?: string | undefined;
  reference?: string | undefined;
  defaultNameMatch?: string | undefined;
  defaultPathMatch?: string | undefined;
  defaultRelativePath?: string | undefined;
  multiple?: boolean;
  datalist?: boolean;
  shapes?: string | undefined;
  error?: string | undefined; // Used to display errors
}

You can take the XMLParameter information and set a default fileValue or default value | values to indicate what it should be. I.E:

(item: XMLParamemters) => {
    if (item.channel == 'input' and item.type === 'file') {
        const updatedItem = {...item}
        item.fileValue = {
          fileId: '6433f9123b271b58c749ddbc',
          girderId: '6433f9123b271b58c749ddbb',
          name: 'SampleVideo.mp4',
          parentId: '6433f9113b271b58c749ddb6',
          regExp: false,
        }
    }
}

This is used to set default values.

Color Customization

There are some global css variables that are used to set the colors used in the system:

  :root {
    --gsu-color-primary: #90CAF9; /* Primary color */
    --gsu-color-secondary: #9FA8DA; /* Secondary color */
    --gsu-color-link: #2c7596; /* Link color */
    --gsu-color-text: #FFFFFF; /* Text color */
    --gsu-color-muted-text: #B0BEC5; /* Muted text color */
    --gsu-color-background: rgb(39, 39, 39);/* Background color */
    --gsu-color-border: rgba(255,255,255,0.3);
    --gsu-background-muted: #212121; /* Muted background color */
    --gsu-color-highlight: #717171bb; /* Highlighted color */
    --gsu-color-selected: #A5D6A7; /* Selected color */
  }

This default view mimics a vuetify dark theme but not completely. These variables can be modified to change the visual styling of the system.