@abbox/inspector

中文文档
0.4.25发布于 2026/11/07Apache-2.0TypeScriptESM + CJS近 30 天下载 3905

Runtime visual inspection for React/Next.js previews with source-backed element selection.

原始使用文档
文档目录6 节
  1. Local development
  2. Example preview (port 5174)
  3. With Abbox Viewer
  4. Package exports
  5. Instrumentation
  6. Onlook

abbox-inspector

Runtime visual inspection for instrumented React/Next.js previews. Used by Abbox Viewer (Live Preview workspace) and embeddable in authorized preview apps.

Local development

cd abbox-inspector
npm install
npm run ci

Example preview (port 5174)

npm run example:dev

With Abbox Viewer

# terminal 1
cd abbox-inspector && npm run example:dev

# terminal 2
cd abbox-viewer && npm install && npm run dev

Load compiler + interpreter JSON in the viewer, open Live Preview, enable Inspect, click elements in the iframe.

Query parameters on the preview URL:

  • abboxSession — must match the viewer session id (default local-dev)
  • abboxHostOrigin — viewer origin allowed to control inspect mode

Package exports

ImportPurpose
abbox-inspectorProtocol, host/client bridges, IR match helpers, Babel plugin
abbox-inspector/runtimebootstrapInspectorPreview() for preview apps
abbox-inspector/viteOptional Vite transform plugin

Instrumentation

Build-time Babel plugin adds data-abbox-src="relative/path.tsx:line:column" to JSX opening tags. Paths are relative to the project root; no absolute filesystem paths are emitted.

Onlook

Onlook was reviewed for overlay and instrumentation patterns. This package is a small standalone implementation (Apache-2.0); no code was copied wholesale.

See docs/architecture.md and docs/integration.md.

版本与发布记录

@abbox/inspector 共发布 27 个版本,首次发布于 2026/10/23;过去 12 个月发布了 27 个版本。

版本发布日期距今
0.4.25latest2026/11/07今天
0.4.242026/11/07今天
0.4.232026/11/071 天前
0.4.222026/11/062 天前
0.4.212026/11/052 天前
0.4.202026/11/043 天前

关于 @abbox/inspector 的常见问题

@abbox/inspector 是什么?

Runtime visual inspection for React/Next.js previews with source-backed element selection.

如何安装 @abbox/inspector?

在项目目录运行 npm install @abbox/inspector,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:next(>=14.0.0)、react(>=18)、babel-loader(^9.2.1 || ^10.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@abbox/inspector 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@abbox/inspector 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@abbox/inspector 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.12。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@abbox/inspector 可以商用吗?

@abbox/inspector 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@abbox/inspector 的下载量有多少?

根据 npm 官方下载统计,@abbox/inspector 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,905 次,日均约 130 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@abbox/inspector 还在维护吗?

最新版本 0.4.25 发布于 2026/11/07(今天);至今共发布 27 个版本,其中过去 12 个月发布了 27 个;首次发布于 2026/10/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。