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

@beibei3030630/sa-guide-sdk

v1.3.70

Published

System Assistant smart guide embedding SDK for web applications

Readme

sa-guide-sdk

系统智能指引嵌入 SDK(浏览器端),用于在业务系统中展示首次访问引导、多步骤操作指引等。

当前版本:1.3.70(SDK 主版本 v1)

安装

npm install @beibei3030630/[email protected]

Nuxt + Arktos(推荐)

只需在 nuxt.config.js 配置模块与两项业务参数。模块会自动复制浏览器资源、在客户端启动 SDK,并从 Arktos 当前用户读取工号和姓名:

export default {
  modules: ['@beibei3030630/sa-guide-sdk/nuxt'],
  saGuide: {
    apiBase: 'http://sa.example.com/system-assistant',
    appKey: 'ehr',
  },
}

快速接入

方式 A:unpkg / jsDelivr CDN(推荐)

<script src="https://unpkg.com/@beibei3030630/[email protected]/dist/v1/bootstrap.js"></script>
<script>
  window.SA_API_BASE = 'https://api.example.com/system-assistant';
  window.SA_APP_KEY = 'your_app_key';
  window.SA_EMP_CODE = '800451';
  SystemAssistantBootstrap.start();
</script>

方式 B:拷贝到静态目录(Vite / Webpack)

node_modules/@beibei3030630/sa-guide-sdk/dist/v1/ 下所有文件复制到项目的 public/sa-guide-sdk/

<script src="/sa-guide-sdk/bootstrap.js"></script>
<script>
  window.SA_API_BASE = 'https://api.example.com/system-assistant';
  window.SA_APP_KEY = 'your_app_key';
  SystemAssistantBootstrap.start();
</script>

Vite 示例(vite-plugin-static-copy):

import { viteStaticCopy } from 'vite-plugin-static-copy'

export default {
  plugins: [
    viteStaticCopy({
      targets: [{ src: 'node_modules/@beibei3030630/sa-guide-sdk/dist/v1/*', dest: 'sa-guide-sdk' }],
    }),
  ],
}

方式 C:手动加载核心 SDK

若已自行加载样式与渲染器,可直接引 sdk.js

<script src="/sa-guide-sdk/guide-popup-styles.js"></script>
<script src="/sa-guide-sdk/guide-renderer.js"></script>
<script src="/sa-guide-sdk/sdk.js"></script>
<script>
  SystemAssistant.bootstrap({
    appKey: 'your_app_key',
    apiBase: 'https://api.example.com/system-assistant',
    watchIframe: true,
  });
</script>

配置项

| 全局变量 / 参数 | 说明 | |----------------|------| | SA_API_BASE | 指引 API 根地址,如 https://api.example.com/system-assistant | | SA_APP_KEY | 应用标识(必填) | | SA_EMP_CODE | 员工工号 | | SA_USER_NAME | 用户姓名 | | SA_SDK_BASE | SDK 脚本目录(可选,默认从 bootstrap.js 所在 URL 推断) | | SA_WATCH_IFRAME | 是否监听 iframe 弹窗,默认 true |

SystemAssistantBootstrap.start(config) 也支持同名 camelCase 字段覆盖全局变量。

包内容

dist/v1/
├── bootstrap.js           # 推荐入口
├── guide-popup-styles.js  # 14 种弹出样式
├── guide-renderer.js      # 多布局渲染器
└── sdk.js                 # 运行时核心

发布(维护者)

源码位于 packages/sa-guide-sdk/src/v1/locator/ / snapshot/ / shared/ 分目录,sdk.js 由 concat 生成;SSOT 版本见本目录 package.json):

cd packages/sa-guide-sdk

# 1. 更新 package.json version
# 2. 同步常量、拼接 sdk.js、拷贝 dist
npm run build

# 3. 登录 npmjs.com 并发布
npm login
npm publish

布局说明见 docs/SDK_LAYOUT.md

许可证

MIT