docs: 起步 Changelog

This commit is contained in:
2026-05-22 23:25:04 +08:00
parent 3e5e45fb89
commit bda7795c85
2 changed files with 4368 additions and 0 deletions
+4290
View File
File diff suppressed because it is too large Load Diff
+78
View File
@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="zh-Hant">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>cjk-autospace — Changelog</title>
<meta name="generated-at" content="2026-05-22">
<meta name="source" content="cjk-autospace · docs branch">
<!-- RUNTIME_CSS -->
</head>
<body>
<header class="page">
<div class="meta">
<h1>cjk-autospace — Changelog</h1>
<p class="subtitle">時間倒序。架構細節見同分支 <code>index.html</code></p>
<p class="timestamp"><time>2026-05-22</time> · <span>docs branch</span></p>
</div>
<div class="actions">
<!-- ACTIONS -->
</div>
</header>
<main>
<h2>2026-05-22 — 初始發布</h2>
<ul>
<li>工廠函式 <code>createCjkAutospace(options)</code>,回傳 <code>{ apply(root?) }</code>。Port 自 Pangu.js v7.2.1 規則表(MIT 授權),覆寫架構為雙 pass:
<ul>
<li><strong>Pass A — per-block Pangu on tag-stripped text</strong>:對每個 BLOCK 走 DFS 收集邏輯文本(樣式標籤透明、PILL 與子 BLOCK 中斷 run),整段套 <code>panguSpace</code>,把 MARK 反映射回 textNode/offset 並插入 <code>.cjk-autospace</code> marker span。</li>
<li><strong>Pass B — pill boundary, style-inline aware</strong>:對每個 PILL 透過樣式鏈遞迴找邏輯鄰字(<code>adjacentLogicalChar</code>),按 0/1/多+特殊規則處理空白。</li>
</ul>
</li>
<li>標籤三分類:STYLE_INLINES / PILL / BLOCK,皆可由消費端配置。</li>
<li>UMD-ish export:同時支援 ESM <code>import</code>、CommonJS <code>require</code>、browser global <code>globalThis.createCjkAutospace</code> 與 inline <code>&lt;script&gt;</code> 函式宣告形式。</li>
<li>TS 宣告:<code>cjk-autospace.d.ts</code> 提供完整 <code>CjkAutospaceOptions</code><code>CjkAutospaceInstance</code> 型別。</li>
<li>初始消費者:
<ul>
<li>Claude HTML 模板(<code>Base/templates/html/runtime/lib/cjk-autospace/</code>pillSelector <code>"code, kbd"</code></li>
<li>Peek.nvim Markdown 預覽 shim<code>Nvim/lua/user/lib/cjk-autospace/</code>pillSelector <code>"code, kbd, mark, samp"</code></li>
<li>cdrop<code>cdrop/web/src/lib/cjk-autospace/</code>pillSelector <code>"code, kbd, .cjk-pill"</code></li>
</ul>
</li>
<li>docs 分支:<code>index.html</code>(架構詳細文檔)+ <code>CHANGELOG.html</code>(本檔)。</li>
</ul>
<div class="callout info">
<span class="label">設計來源</span> 雙 pass 架構是原創設計,解決 Pangu.js 原版「text-node walker 看不到跨元素邊界」之問題(典型癥狀:<code>&lt;strong&gt;&lt;/strong&gt; Neovim</code> 此類邊界無法被識別)。
</div>
</main>
<footer class="page">
<p>cjk-autospace · docs branch · CHANGELOG</p>
</footer>
<!-- RUNTIME_SPRITE -->
<script type="text/markdown" id="md-source">
# cjk-autospace Changelog
## 2026-05-22 初始發布
- 工廠函式 createCjkAutospace(options)Port Pangu.js v7.2.1 規則表
- pass 架構
- Pass A per-block Pangu on tag-stripped text
- Pass B pill boundary, style-inline aware
- 標籤三分類STYLE_INLINES / PILL / BLOCK皆可配置
- UMD-ish export + TS 宣告
- 初始消費者Claude HTML 模板Peek.nvimcdrop
- docs 分支index.html架構+ CHANGELOG.html本檔
</script>
<!-- RUNTIME_JS -->
</body>
</html>