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

@webpros/360-advisor

v1.0.4

Published

Advisor Webcomponent

Downloads

2

Readme

360 Advisor

A WebComponent for displaying info texts from an api.

Install

As NPM Module

npm i @webpros/360-advisor

Or as vanilla JS script via the unpkg cdn

<script type="module" crossorigin src="https://unpkg.com/@webpros/[email protected]/dist/360advisor.js"></script>

Usage

The Advisor provides two elements that must be inserted into the document. The <advisor-element> should be placed in the footer area to display the API information.

The <advisor-trigger guide-id="GUIDEID" language="LANG"> element is the trigger element that can be wrapped around buttons or text elements. Important here is that this inner button element has no real function, it should only look good ;) Depending on guide-id, when you click on the element, the corresponding content is retrieved via the API and displayed in the advisor-element.

The language of the advisor can be selected via the language parameter, by default it is set to English.

Example

<body>
...
<main>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid aut, blanditiis consequuntur delectus excepturi facere ipsa maiores molestiae natus obcaecati recusandae reprehenderit rerum sed sint soluta vero voluptatem voluptatibus voluptatum.</p>
  <advisor-trigger guide-id="_demo.md.elements">
    <button>Click me to see the guide</button>
  </advisor-trigger>
  ...
</main>
<advisor-element></advisor-element>
</body>

Usage with Frontend Frameworks

Vue / Nuxt

So that Vue does not treat these elements as regular Vue components the tags must be ignored. The easiest way is to include the elements using plugin.

import Vue from 'vue'
import '@webpros/360-advisor'

Vue.config.ignoredElements = [
  'advisor-trigger',
  'advisor-element'
]

React / Next

Currently no findings.

Colors

The component's colors are declared via CSSVars and can thus be adjusted externally.

It is therefore necessary to declare the following CSS variables:

:root{
  --primaryColorRegular: #52bce5;
  --primaryColor400: #68caef;
  --primaryColor500: #3397be}