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

@channek/project-format

v0.1.0

Published

.channek 工程格式:有理时间、编辑操作与文档 schema(脊柱·零运行时依赖)

Readme

@channek/project-format

Channek 工程文件(.channek)的格式脊柱:类型 + 有理时间 + 编辑操作 + 读写校验迁移。 零运行时依赖。

npm i @channek/project-format

它解决什么

一份时间轴工程要被多方读写——界面、引擎、AI、导出——只要各自平行定义一份 clip / track / 时间结构,它们就会慢慢漂开,而漂开的症状是「导出与预览对不上」这种最难查的 bug。 这个包是那份唯一定义。

import { parseProject, serializeProject, validateProject } from '@channek/project-format';

const project = parseProject(await readFile('demo.channek', 'utf8'));
const issues = validateProject(project);   // 空数组 = 合法
await writeFile('demo.channek', serializeProject(project));

时间一律是有理数,不是浮点秒

import type { RationalTime } from '@channek/project-format';

const t: RationalTime = { value: 1001, rate: 30000 };   // 恰好 1 帧 @ 29.97fps

浮点秒在 29.97 这类非整数帧率下会累积漂移,剪 20 分钟的片子足以让末尾差出一帧;而「差一帧」 在时间轴上就是黑场或错帧。工程文件里不出现浮点秒,也不出现裸帧号——裸帧号换个帧率就失真。 time.js 里有配套的 TimeRange 与换算工具。

改文档只有一条路:编辑操作

不要直接 mutate 解析出来的对象。所有改动都表达成 EditOperation 打进 reducer—— 每次编辑因此天然可撤销、可预览、可审计,人手拖拽与 AI 工具调用走的是同一条路。

版本迁移

import { upgradeProject, downgradeProject } from '@channek/project-format';

旧版本文件读进来先 upgradeProject 升到当前 schema。parseProject 会替你做这件事; 单独导出它是为了让你能在迁移前后做对比。

稳定性

0.x 阶段 API 可能有破坏性变更,升级前看 CHANGELOG。破坏性变更只在次版本号上发生 (0.1.x → 0.2.0),补丁号恒向后兼容。

许可

Apache-2.0。本许可只覆盖这个包——Channek 应用本体、引擎与编辑模型不在其列。