@wrenautomation/orrery

中文文档
0.30.6发布于 2026/11/03PolyForm-Strict-1.0.0TypeScriptES Module零依赖构建来源已验证

The logic of a map you fold: the fold tree, nested layout over any engine, and the glide between frames. No renderer, no framework.

原始使用文档

orrery

The logic of a map you fold. No renderer, no framework: each map draws its own frames.

  • tree: the fold tree. A depth cut, plus nodes opened or closed by hand. openSet, toggle, reveal, stepDepth, fullDepth.
  • nest: nested layout over an engine you pass (ELK, a grid, your own). Open containers are sized by their kids. Positions add up to the root. A cache re-lays only the changed path.
  • glide: the motion between two frames. Marks that stay slide, new ones grow out of an anchor, gone ones shrink into it. Marks says which elements are marks.

Depends on nothing. Runs in a browser: glide measures the DOM and uses the Web Animations API.

npm i @wrenautomation/orrery
import { nest, openSet } from "@wrenautomation/orrery";

const open = openSet(nodes, { depth: 1, open: { "pkg:core": true } });
const map = await nest({ nodes, root: "repo", open, size, pad, engine: myLayout });
// map.boxes: absolute, parents first. map.levels: each open container's own layout.

Used by kestrel's viewer and wren's metro map.

版本与发布记录

@wrenautomation/orrery 共发布 16 个版本,首次发布于 2026/10/29;过去 12 个月发布了 16 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.30.6latest2026/11/03今天
0.30.52026/11/03今天
0.30.42026/11/03今天
0.30.32026/11/03今天
0.30.22026/11/02今天
0.30.12026/11/02今天

关于 @wrenautomation/orrery 的常见问题

@wrenautomation/orrery 是什么?

折叠地图的逻辑:折叠树、任何引擎上的嵌套布局以及帧之间的滑动。没有渲染器,没有框架。

如何安装 @wrenautomation/orrery?

在项目目录运行 npm install @wrenautomation/orrery,或使用 pnpm add / yarn add / bun add。

@wrenautomation/orrery 支持 TypeScript 吗?

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

@wrenautomation/orrery 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@wrenautomation/orrery 可以商用吗?

@wrenautomation/orrery 使用 PolyForm-Strict-1.0.0 许可。声明的许可为 PolyForm-Strict-1.0.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@wrenautomation/orrery 还在维护吗?

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