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

v3.2.1

Published

ActView v2:Vue 引擎 + React 语义 JSX(运行时基于 vue 官方包,JSX 由 @actview/plugin-jsx 编译)

Readme

actview

ActView v2 — Vue 引擎 + React 语义 JSX

运行时基于 vue 官方包(零自研):响应式 / 调度 / patch / diff / 内置组件 / SSR 全部复用。JSX 语法层面对齐 React:className / htmlFor / onChange 语义、{} 表达式、受控组件、props.children 直读。

核心功能

  • vue 运行时 re-export:响应式(ref / reactive / computed / watch / effectScope)、组件(defineComponent / createApp / h)、生命周期、内置组件(KeepAlive / Teleport / Suspense / Transition / TransitionGroup)
  • defineComponent 桥接(React 对齐):props 读不到时从 attrs 兜底(React 风格任意 props 可读);props.children 渲染期读取 = 子内容值(React 语义,非渲染期读取返回 undefined 并提示——判断有无子内容用 props.slots.default != null);props.slots.default() 具名插槽/显式调用(render 期);createVNode 包装:<p {...props}> 展开的 children 键自动抽进第三参(React 对齐);桥接虚拟键(children/slots)不参与展开/遍历;有 props 声明时自动落根(inheritAttrs 开启,未消费 attrs 透传到根元素 + scoped data-v 生效),无声明时保持不透传(React 语义,避免 props 污染 DOM)
  • createContext:React 语义(.Provider / .use()),基于 vue provide/inject
  • JSX 类型层:全局 IntrinsicElements 完整标签表(React 语义属性)+ vue 组件兼容;组件 props 严格检查(未声明 prop 报错)

安装

pnpm add actview vue
pnpm add -D @actview/plugin-vite

vite.config.ts:

import { defineConfig } from 'vite'
import { actviewJsxPlugin } from '@actview/plugin-vite'

export default defineConfig({
  plugins: [actviewJsxPlugin()],
})

tsconfig.json:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "actview"
  }
}

快速开始

import { createApp, ref } from 'actview'

// 函数组件:编译期自动包 defineComponent(React 函数组件语义)
function App() {
  const count = ref(0)
  return () => (
    <button className="c" onClick={() => count.value++}>
      {count.value}
    </button>
  )
}

createApp(App).mount('#app')

JSX 由 @actview/plugin-jsx 编译(Babel 直出 createVNode):

  • className → class、htmlFor → for、onChange → onInput(text-like input/textarea)
  • dangerouslySetInnerHTML={{ __html }} → innerHTML
  • v-model / v-show 等 Vue 指令属性可直接使用
  • props.children 桥接:组件内直接读 props.children(React 语义)

生态复用(不重复造轮子)

| 需求 | 方案 | |---|---| | 路由 | vue-router | | 状态管理 | pinia | | 测试 | @testing-library/vue | | devtools | vue devtools(浏览器插件) | | hooks | vue 原语(ref / computed / watch 内联组合) |

API(re-export 自 vue)

| 分组 | 导出 | |---|---| | 应用 | createApp | | 组件 | defineComponent(桥接版)/ h / createVNode / mergeProps / defineAsyncComponent | | 响应式 | ref / reactive / computed / watch / watchEffect / customRef / proxyRefs / effectScope / nextTick | | 生命周期 | onMounted / onUpdated / onBeforeUnmount / onUnmounted / onErrorCaptured / onServerPrefetch | | 依赖注入 | provide / inject / createContext | | 内置组件 | KeepAlive / Teleport / Suspense / Transition / TransitionGroup / Fragment / Text | | 其他 | useId / useTemplateRef / useAttrs / useSlots / version |

License

MIT