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

@eightfeet/walle

v1.3.3

Published

```javascript import { /** * * 地址弹窗 * @class AddressModal * @extends {Modal} */ AddressModal, /** * 中奖结果弹窗 * @class ResultModal * @extends {Modal}

Downloads

6

Readme

瓦力

    import {
        /**
         *
         * 地址弹窗
         * @class AddressModal
         * @extends {Modal}
         */
        AddressModal,
        /**
         * 中奖结果弹窗
         * @class ResultModal
         * @extends {Modal}
         */
        ResultModal,
        /**
         * 弱提示
         * @class Msg
         * @extends {Message}
         */
        Msg,
        /**
         * 消息弹窗
         * @class NoticeModal
         * @extends {Modal}
         */
        NoticeModal,
        Loading,
        AddressPicker,
        validate,
        Message,
        Modal,
        htmlFactory: {
            createDom, // createDom: (dom: HTMLElement, target: string, parentId: any, emBase: any) => Promise<any>
            removeDom, // removeDom: (target: string) => Promise<any>
            combineDomByClass, // combineDomByClass: (dom: any, classes: any) => Promise<any>
            inlineStyle // inlineStyle: (style: any) => any
        },
        tools: {
            isPC, // isPC: boolean
            isObject, // isObject: (value: any) => boolean
            countDown, // countDown: (times: any, callback: any) => void
            dormancyFor, // dormancyFor: (time: any) => Promise<any>
            fixpx, // fixpx: (px: any) => string | 0
            setEmBase // setEmBase: (dom: HTMLElement, emBase: any) => void
        },
        regionsDataFormat: {
            formatWheelsData, // formatWheelsData: (data: any) => { id: string; value: any; childs: any[]; }[]
            getPositionByDefaultValue //  getPositionByDefaultValue: (defaultData: any, wheels: any) => number[]
        },
        webAnimation: {
            onceTransitionEnd, // onceTransitionEnd: (element: any, options?: {}) => Promise<any>
            onceAnimationEnd // onceAnimationEnd: (element: any, options?: {}) => Promise<any>
        }
    } from '@eightfeet/walle';


    // 收获地址模块
    const address = new AddressModal({
        AddressModalTheme: window.themedata.AddressModalTheme, // 弹窗皮肤
        outerFrameId: 'wrap', // 弹窗所属父级ID
        MessageTheme: window.themedata.MessageTheme,
        playerPhone: 13111121112,
        receiverInfo: {
        idCard: 123123123123123123,
        address: '省市区详细地址',
        regionName: ['广东省','广州市','天河区'],
        region: ['15', '1513', '151315'],
        receiverPhone: 13555555555,
        receiverName: 'name'
        },
        cardIdRequest: 1, // 1 隐藏身份证,2 验证身份证,3 身份证为空时不验证有填写时验证,4 不验证身份证
        checkVerificationCode: () => new Promise((resolve, reject) => {
        resolve();
        })
    });

    // 活动失败弹窗
    const falied = new ResultModal({
        style: window.themedata.FailedModalTheme, 
        modalTitle: '很遗憾', 
        onCancel: () => console.log('关闭失败弹窗'), 
        onEnsure: (prize) => console.log('确定失败弹窗', prize),
        submitText: '知道了', 
        outerFrameId: 'wrap', // 弹窗所属父级ID
    });

    // 活动获奖弹窗
    const success = new ResultModal({
        style: window.themedata.SuccessModalTheme, 
        modalTitle: '恭喜您', 
        onCancel: () => console.log('关闭成功弹窗'), 
        onEnsure: (prize) => console.log('确定成功弹窗', prize),
        submitText: '知道了', 
        outerFrameId: 'wrap', // 弹窗所属父级ID
    });

    // 消息弹窗
    const notice = new NoticeModal(window.themedata.NoticeModalTheme, 'wrap');

    // 弱提示
    const message = new Msg(window.themedata.MessageTheme, 'wrap');
    <body>
    <div id="wrap">
    </div>
    <button onclick="address.showModal(data => console.log('提交地址弹窗', data), 
      () => console.log('关闭地址弹窗'));">
      填写收货人地址
    </button>
    <button onclick="falied.showModal({
      prizeName: '谢谢参与', 
      prizeAlias: '别名', 
      awardMsg: '获奖感言', 
      prizeImg: '奖品图片', 
      memo: '奖品备注'}).then(() => console.log('falied Go!'));">
        失败弹窗模块
    </button>
    <button onclick="success.showModal({
      prizeName: '蛋白粉', 
      prizeAlias: '别名', 
      awardMsg: '获奖感言', 
      prizeImg: '奖品图片', 
      memo: '奖品备注'}).then(() => console.log('success Go!'));">
        成功弹窗模块
    </button>
    <button onclick="notice.showModal({
        title: '对不起', 
        content: '文本内容',
      }, () => console.log('关闭消息弹窗')).then(() => console.log('notice Go!'));">
        消息弹窗
    </button>
    <button onclick="message.create('这是弱提示!');">
      弱提示
    </button>
  </body>