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

@shenyin/embedded-call-widget

v3.1.6

Published

```bash npm install @shenyin/embedded-call-widget ```

Downloads

4,074

Readme

@shenyin/embedded-call-widget

安装

npm install @shenyin/embedded-call-widget

ESM

适用于 Vue / React / 现代 bundler;默认不需要传 runtimeUrl

import { createCallButton } from '@shenyin/embedded-call-widget'

createCallButton({
  mount: '#call-button',
  apiBaseUrl: 'https://your-gateway.example/proxy/',
  siteKey: 'your-site-key',
  text: '值班员',
  callerInfo: { nickname: '访客示例', stStatus: '状态示例' },
  advanced: {
    visitorBusinessKey: 'your-visitor-business-key'
  }
})

IIFE

适用于 script / CDN / 自托管静态资源;默认按脚本相对路径推断 runtime。

<div id="call-button"></div>
<script src="https://cdn.jsdelivr.net/npm/@shenyin/[email protected]/embedded-call-widget.iife.js"></script>
<script>
  EmbeddedCallWidget.createCallButton({
    mount: '#call-button',
    apiBaseUrl: 'https://your-gateway.example/proxy/',
    siteKey: 'your-site-key',
    text: '值班员',
    callerInfo: { nickname: '访客示例', stStatus: '状态示例' },
    advanced: {
      visitorBusinessKey: 'your-visitor-business-key'
    }
  })
</script>

参数

  • 必填:mountapiBaseUrlsiteKey
  • 可选:textcallerInfobusinessKeyadvanced.visitorBusinessKeydisplayNameruntimeUrlruntimeModuleLoadertransportBaseUrlaccessTokendebugdraggable
  • text:访客主动拨打面板中的呼叫对象名,默认 值班员
  • draggable:是否允许电话图标在屏幕范围内拖动,默认 true;若 mount 元素没有有效定位,电话图标会默认以内联样式固定在页面右上角:position: fixed; top: 4px; right: 18px; z-index: 888;
  • callerInfo:平台端展示的访客补充信息,形如 { nickname: '访客示例', stStatus: '状态示例' }
  • 回调:onStateChangeonStandbyReadyonIncomingCallonCallAnsweredonCallRejectedonCallMissed
  • runtimeUrl:主要给 IIFE / CDN / 自托管静态资源ESM import 误传时默认忽略
  • 若站点启用了接入令牌,正式接入应由代理层注入 X-Embedded-Call-Access-Token;不要把 token 明文写进初始化配置
  • 默认普通模式:挂载后只显示电话图标,后台自动准备待机能力
  • 调试模式门禁:只有 debug=true 且真实链路中的 X-Embedded-Call-Access-Token 已通过服务端校验时,才展示调试面板