自研、零运行时依赖、全 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.
下面不是截图——是一枚真的 <cmx-megasheet> 元素,铺着真数据、跑着真公式。试试点选、编辑、切主题。Not a screenshot — a real <cmx-megasheet> element with real data and live formulas. Try selecting, editing, and toggling the theme.
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.
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.
<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.
稀疏、不掺视图态的一份 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.
五层架构、六条不变式、公式引擎、IO 格式、M0–M26 全景路线图。Five-layer architecture, six invariants, formula engine, IO formats, the full M0–M26 roadmap.
安装、组件 API、公式语法、IO 读写、事件——附可现场编辑的 playground。Install, component API, formula syntax, IO, events — with a live editable playground.
26 个里程碑演示页,每页真元素铺真数据 + 真浏览器内自检断言。26 milestone demos — each a real element with real data and in-browser self-check assertions.