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

@ssjs/collective-look-widget

v0.1.74

Published

## Requirements

Readme

Collective Look Widget

Requirements

You will need to be on node version 8 to build and run this project.

While not a requirement, installing nvm will help you switch between different versions of node. The full instructions for installing nvm are here, or just run this script

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

Getting started

# If using nvm, run this to use the correct version of node
nvm use
npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Embedding

Embedding the widget is pretty simple

<div class="sc-look-widget" sc-widget-id="abc123"></div>
<script src="https://domain.com/path/to/build/output.js"></script>

Note that this widget is also backwards compatible with the previous embed format using data-options="{...}"

Encapsulation

This widget embeds a self-encapsulated Vue component into it's host page. Typically doing this would lead to all sorts of problems with the parent pages styles breaking our widget.

In order to get around this we do several things:

  • Reset styles with all: initial (with a polyfill for IE)
    • This means no styles inherit. This includes our own, so you must be explicit about all styles of all elements
    • This protects us from rules like img { float: left !important; }. Keep in mind we're on anyone's site, you never know what kind of crazy css they will have
  • Maximize specificity by postprocessing CSS to include !important with PostCSS Safe Important
    • This, combined with our @include scope mixin which increases our selector specificty via nested ID selectors, helps us ensure we override any other CSS on the page for our own content
  • Vue Scoped CSS
    • This simply ensures our styles don't affect the surrounding page or the wrong components
  • Class prefixing with .sc-*
    • This simply helps ensure we aren't affected by parent selectors. E.g. using class .loading would risk the parent page having such a class defined, but namespacing all classes prefixed with .sc- helps us ensure we don't inherit any styles we don't want to

Testing

The development page contains a bookmarklet in the lower right corner that you can drag to your bookmarks bar. Simply visit a page with a look widget and click on the bookmarklet to replace the existing one with the latest widget code from your local server

Some example URLs to use the bookmarklet on are:

  • https://gabbydalfen.com/shop-my-instagram-2/
  • http://www.obsessionsnow.com/shop-ig/
  • https://thevivaluxury.com/instagram-shop/
  • https://takeaim.nu/shop/

Creating new components

Use this boilerplate snippet for new vue components to ensure you set the right CSS scoping and encapsulation defaults

<template>
  <!-- Template here -->
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'

@Component
export default class NewComponent extends Vue {
  // Component logic here
}
</script>

<style scoped lang="scss">
@import '../scss/common.scss';

@include scope {
  /* Styles here */
}
</style>