CMX PLATFORM · MEGASHEET

一张空白画布,
长成一整个电子表格
A blank canvas that grew
into an entire spreadsheet

自研、零运行时依赖、全 clean-room 的 TypeScript 电子表格引擎——一个 <cmx-megasheet> 自定义元素,自带画布渲染、公式引擎与 IO。ZIP、DEFLATE、XLSX、PDF、图表、公式求值,全部亲手写就。 A self-built, zero-runtime-dependency, fully clean-room TypeScript spreadsheet engine — one <cmx-megasheet> custom element with its own canvas renderer, formula engine and IO. ZIP, DEFLATE, XLSX, PDF, charts, formula evaluation — all handwritten.

26
里程碑 M0–M26milestones M0–M26
272
内置函数built-in functions
945
单元测试常绿unit tests, always green
0
运行时依赖runtime dependencies
能力总览

此刻就活在页面上Live on this page, right now

下面不是截图——是一枚真的 <cmx-megasheet> 元素,铺着真数据、跑着真公式。试试点选、编辑、切主题。Not a screenshot — a real <cmx-megasheet> element with real data and live formulas. Try selecting, editing, and toggling the theme.

<cmx-megasheet> · engine 7.5.2
信条CREED

为什么这样造Why build it this way

🧱

零依赖 · clean-roomZero deps · clean-room

dependencies: {}。ZIP/DEFLATE/XLSX/PDF/图表/公式引擎无一外借——不是不能用轮子,是想真正读懂每一个齿。dependencies: {}. ZIP/DEFLATE/XLSX/PDF/charts/formula engine — none borrowed. Not that wheels are off-limits; we wanted to understand every tooth.

🎯

画=点,是信仰Draw = hit, an article of faith

getCellRect(r,c)hitTest(x,y) 严格互逆,跨冻结、拆分、滚动、缩放恒成立。它一旦破,全盘皆输,所以它一次都没破过。getCellRect(r,c) and hitTest(x,y) are strict inverses across freeze/split/scroll/zoom. Break it and everything falls — so it never has.

🔌

消费方零改Consumers change nothing

<cmx-megasheet> 的公共门面稳如契约,宿主 designer.js 一个字节没动,就把脚下的内核换成了自研。The <cmx-megasheet> facade is a rock-solid contract — hosts like designer.js swapped to the in-house kernel without changing a byte.

📸

中性快照 · 单一事实源Neutral snapshot · single truth

稀疏、不掺视图态的一份 JSON;XLSX / CSV / 迁移格式都围着它双读双写,数据永远只有一个真身。A sparse, view-free JSON. XLSX / CSV / migration formats all read and write around it — the data has exactly one true form.