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

@proteus-vue/runtime

v0.3.0-beta.28

Published

Proteus 运行时:setData 桥接(批量 + 深层 diff)/ 页面生命周期 / store 桥 / app 骨架模板

Readme

@proteus-vue/runtime

Proteus 运行时——setData 桥接(批量 + 深层 diff)/ 页面生命周期 / store 桥 / Pinia 多端工厂 / 应用生命周期编排 / app 骨架。

导出

| API | 说明 | |-----|------| | createPage / createComponent / onLoad / onReady / onUnload | 页面/组件生命周期(MP 编译期映射 Page()/Component(),Web 端对应 Vue 钩子) | | setDataBridge | setData 桥接:批量合并 + 深层 diff(对齐小程序 setData 语义,Web 端模拟) | | createStore / connectPageStore | 轻量 store 桥(页面数据 → 组件数据流) | | createWebPinia / createMpPinia / createAppPinia / createSsrPinia | Pinia 多端工厂:平台标记注入 + 持久化(Web LocalStorage / MP storage / SSR 内存) | | createPersistedStatePlugin / persisted / createPersistence | Pinia 持久化(社区兼容 + 自研轻量两层) | | registerProvide / readInject / subscribeProvide / provideCount / nextPageId / destroyPage | 跨页面 provide/inject 通道 | | defineApp / LifecycleOrchestrator / PHASE_ORDER | 应用生命周期编排:bootstrap → coreReady → navigationReady → interactive 阶段化启动 + 超时降级 + trace(lifecycle-plan B1/B2) | | setDataBridge 等 | 见上 |

子路径

| 子路径 | 说明 | |--------|------| | @proteus-vue/runtime/style-safety | 样式安全(平台样式差异防护) |

使用

import { createWebPinia, defineApp } from '@proteus-vue/runtime'
import { createApp } from 'vue'
import App from './App.vue'

defineApp({
  bootstrap(ctx) { console.log('[lifecycle] bootstrap', ctx.platform) },
  async coreReady(ctx) {
    // 核心服务就绪(API 客户端 / token 刷新)
  },
  interactive() {
    const app = createApp(App)
    app.use(createWebPinia()).mount('#app')
  },
}).run({ launchType: 'cold' })

小程序端 main.mp.ts 走极简模式(插件直出 app.js,骨架自动生成),详见 examples。

设计要点

  • setData 桥接是双端数据一致性的核心:批量合并减少通信次数,深层 diff 只传变化路径
  • Pinia 持久化声明式(persisted),平台差异收敛在工厂内部