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

use-guide-tiny

v1.0.1

Published

#### Install >$ npm i useGuide_blade --save

Downloads

2

Readme

useGuide_blade 描述

Install

$ npm i useGuide_blade --save

userGuider

New user guide plugin use in web page. Totally DIY your guide content. Online Demo

Features

Easy | Configurable | Customize

Usage

import useGuide_blade from "useGuide_blade";

// your prepared guiders HTMLs may like this.

<div class="guider g1">
    <p>step1 hi,我移动到这里了!</p>
    <button class="next">下一步</button>
</div>

<div class="guider g2">
    <p>step2 hi,我移动到这里了!</p>
    <button class="back">上一步</button>
    <button class="next">下一步</button>
</div>

<div class="guider g3">
    <p>step3 hi,我移动到这里了!</p>
    <button class="back">上一步</button>
    <button class="next">完成</button>
</div>

// your JS may like this.

let guider = new guideQueue({
    autoPlay: {
        interval: 1000, 
        allowDisturb: false, 
        loop: 2, 
    },
    coverStyle: {
        'font-size': '20px'
    },
    onFinished: ()=>{
        console.log('finished')
    }
});

// add guiders on batch way
const tasks = [{
    targetEl: '.dashboard', //targe element of add a guider
    position: 'left', //in which position above the target element
    guideDom: document.querySelector('.g1'), //prepare the guider element
    backEl: '.back', // if not support this, use guider.back() to handle back move 
    nextEl: '.next', // if not support this, use guider.next() to handle next move 
    interval: 1000, // if support this, it can replace this.autoPlay.interval
}, {
    targetEl: '.safe_center',
    position: 'left',
    guideDom: document.querySelector('.g2'),
    backEl: '.back',
    nextEl: '.next',
}];

guider.mutilSub(tasks); // batch subscription guide content

// add guider on single way
guider.sub({
    targetEl: '#gotop', //targe and exist element to add a guider (.xxx or #xxx)
    position: 'right', //in which position above the target element
    guideDom: document.querySelector('.g3'), //prepare the guider element
    nextEl: '.nextbtn', // if not support this, use guider.next() to handle next move 
})

guider.play();

// you can call guider.destory() to exit guidpage earlier

Methods & Params

    interface autoPlayProps {
        interval: Number; // auto play interval time (ms)
        loop?: Number; //loop times 0-N 0 means no loop
        allowDisturb?: Boolean, //is allow user disturb auto paly status. if set true, after user click next/back, the autoplay will be closed.
    }

    interface guiderOptionsProps {
        autoPlay?: autoPlayProps; // what kind playing status would you like 
        coverStyle?: Object; // customize background cover styles
        onFinished?: Function; // on finished callback function
    }

    interface guideContentProps {
        targetEl: String; // targe element of add a guider (`.el` or`#el` are both ok.)
        position: String; // in which position above the target element
        guideDom: [DOM String]; // prepare the guider element
        backEl?: String; // if not support this, use guider.back() to handle back move 
        nextEl?: String; // if not support this, use guider.next() to handle next move 
    }

    let guider = new guiderQuene(guiderOptionsProps); // instantiate

    guider.mutilSub(guideContentProps); // batch subscription guide content
    guider.sub(guideContentProps); // single subscription guide content
    guider.back(); // play previous
    guider.next(); // play next
    guider.play(); // start playing guide contents
    guider.destory(); // destroy guider instance and exit guide page

Todo

multiple position ✅

use customize backgroundcover ✅

back page function ✅

support auto play ✅

on finished callback ✅

support customize styles

supoort scoped style area