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

@actview/core

v1.0.36

Published

Readme

@actview/core

ActView 框架内核 —— 响应式系统 + DOM 渲染器 + 组件运行时,零依赖。

@actview/core 承载框架的全部运行时能力:响应式(ref/reactive/computed/watch/EffectScope)、VNode → DOM 渲染器(patch 算法)、组件体系(defineComponent/createApp)、生命周期与内置组件(Transition/KeepAlive/ErrorBoundary/Suspense/Teleport)、SSR 序列化(renderToString)。

核心功能

  • 响应式系统reactive/ref/computed/watch/effectScope + 微任务调度批处理(queueJob/nextTick
  • 渲染器:VNode 树 → 真实 DOM(挂载/更新/卸载、keyed diff、事件与属性 patch)
  • 组件体系defineComponentcreateApp、props 全量进 setup(React 语义,用户显式 {...props} 透传)
  • 生命周期与组合式 APIonMounted/onUpdated/onBeforeUnmount/onUnmountedprovide/useInjectsgetCurrentScope
  • 内置组件TransitionKeepAliveErrorBoundarySuspenseTeleportlazy
  • SSRrenderToString(VNode → HTML 字符串,构建期/SSR 前置,无 DOM 依赖)

安装

pnpm add @actview/core

快速开始

import { createApp, reactive, defineComponent } from '@actview/core'

function App(props: { title: string }) {
  const state = reactive({ count: 0 })
  return (
    <div onClick={() => state.count++}>
      {props.title}: {state.count}
    </div>
  )
}

createApp(<App title="hello" />).mount('#app')

API

响应式

| 导出 | 说明 | |---|---| | reactive / shallowReactive / readonly / markRaw | 对象响应式代理 | | ref / isRef / unref / toRef / toRefs | ref 相关 | | computed | 计算属性(类型:ComputedRef/WritableComputedRef/ComputedOptions) | | watch / watchEffect | 侦听器 | | EffectScope / getCurrentScope | 作用域批量管理 effect 生命周期 | | nextTick | 等待本轮调度 flush 完成 |

内部引擎(ReactiveEffecttrack/triggerqueueJobrunEffectpauseTracking 等)由 reactivity/ 导出,属实现细节,一般不需要直接使用。

组件 / 渲染

| 导出 | 说明 | |---|---| | createApp | 应用入口(app.mount) | | defineComponent | 组件定义包装器(产物 { __setup },props 全量进 setup) | | onMounted / onUpdated / onBeforeUnmount / onUnmounted | 生命周期钩子 | | provide / useInjects | 依赖注入 | | Transition / KeepAlive / ErrorBoundary / Suspense / Teleport / lazy | 内置组件 | | renderToString | VNode → HTML 字符串 | | 类型:App / SetupContext / ComponentOptions / ComponentInstance / VNode | 常用类型 |

内部结构

src/
  reactivity/    响应式引擎(reactive-system/effectScope)+ 公开 API(ref/reactive/computed/watch)
  runtime/       渲染与组件运行时(renderer/mountComponent/lifecycle/component/内置组件/renderToString)
  vnode.ts       core 自持的 VNode 类型体系(与 @actview/jsx 结构兼容)

依赖方向:reactivity ← runtime(单向),runtime/ 内无模块环。

依赖关系

  • 运行时依赖:无(零依赖;VNode 类型自持,不依赖 @actview/jsx
  • 被依赖方actview 聚合包、@actview/router

开发

pnpm build   # tsup 打包 dist
pnpm test    # 走根目录 vitest(scripts/** 集成测试,含 verify/scoped/acceptance 场景)

License

MIT