v1.0.0

v1.0.0 Release Notes

Released


v0.6.22 -> v1.0.0

Summary


Reworks the rendering core from whole-tree diffing into keyed, block-level partial updates, and stabilizes the public surface for a 1.0 release. Built-in visual effects and source obfuscation are dropped, and locale selection becomes explicit.
翻譯
將渲染核心由整棵樹比對改為以 key 識別的區塊級局部更新,並為 1.0 定版整理對外介面。內建視覺效果與原始碼混淆一併移除,語系選擇改為明確指定。

⚠️ Breaking Changes


Rendering switched from DOM diffing to keyed partial rendering


Before:
  1. <!-- loops matched by position; container children contain only rendered items -->
  2. <li :for="item in items">{{ item.name }}</li>

After:
  1. <!-- optional :key matches outer-loop items by identity; each top-level :for / :if block is delimited by comment nodes -->
  2. <li :for="item in items" :key="item.id">{{ item.name }}</li>

  • :model binds only top-level keys; a nested path such as form.name is no longer bound and logs [Invalid]
  • fragment() copies the root's child nodes excluding comment anchors
  • Top-level :for / :if blocks add comment nodes to the container's childNodes

Migration:
  1. // Old
  2. <input :model="form.name" />
  3. // New: bind a top-level key
  4. <input :model="formName" />
  5. // Old: code assuming childNodes holds only rendered items
  6. container.firstChild
  7. // New: skip comment anchors
  8. [...container.childNodes].filter((n) => n.nodeType !== 8)[0]

Built-in render effects and loading masks removed


Before:
  1. <img :lazyload="cover" :effect="circle" />
  2. <div :mask="true" effect="fade-in"></div>

After:
  1. <img :lazyload="cover" />

Migration:
  1. /* Old: QuickUI added fade-in / expand / loading-block classes automatically */
  2. /* New: provide the visuals with your own CSS */
  3. .card {
  4. animation: fade 0.3s;
  5. }

i18nLang removed; locale must be selected explicitly


Before:
  1. const app = new QUI({ id: "app", i18n: { zh: {...}, en: {...} }, i18nLang: "zh" });

After:
  1. const app = new QUI({ id: "app", i18n: { zh: {...}, en: {...} } });
  2. app.lang("zh");

  • No default locale: nothing is translated until lang() selects one
  • Missing translations render the raw i18n.xxx string instead of the bare key
  • lang() called before initialization is queued, and no longer logs a conflict

Migration:
  1. // Old
  2. new QUI({ id: "app", i18n, i18nLang: "zh" });
  3. // New (lang() returns nothing; keep the instance in a variable first)
  4. const app = new QUI({ id: "app", i18n });
  5. app.lang("zh");

QUI.body accessor removed


Before:
  1. app.body.classList.add("ready");

After:
  1. app.element.classList.add("ready");

Migration:
  1. // Old
  2. app.body;
  3. // New
  4. app.element;

翻譯
  • 渲染由 DOM diff 改為以 key 識別的局部渲染::model 僅支援頂層 key,巢狀路徑不再綁定;頂層 :for / :if 區塊會在容器 childNodes 加入註解節點;fragment() 不含註解錨點。
  • 移除內建渲染效果與載入遮罩(:effect、:animation、:mask),需自行以 CSS 實作。
  • 移除 i18nLang,改以 lang() 明確選擇語系;未選擇或缺少翻譯時顯示原始 i18n.xxx 字串。
  • 移除 QUI.body,改用 QUI.element。


Changes


BREAKING


  • Replace DOM diffing with keyed partial rendering and add :key for outer-loop item identity (@pardnchiu) [3290140, ce2eadd]
    • Track binding blocks and a dependency index so only affected blocks recompute
    • Restrict :model to top-level keys
    • Delimit top-level :for / :if blocks with comment nodes
  • Remove built-in render effects and loading masks, and unminify internal source (@pardnchiu) [52edcd3]
    • Drop :effect, :animation and :mask presets
    • Use native API names in src/ while dist/ stays minified
  • Require explicit locale selection through lang() and remove i18nLang (@pardnchiu) [30a9e76]
    • Queue lang() calls made before initialization
    • Show the raw i18n.xxx string when a translation is missing
  • Remove the QUI.body accessor in favor of QUI.element (@pardnchiu) [fdb03b1]

翻譯
  • 以 key 識別的局部渲染取代 DOM diff,並新增 :key
  • 移除內建渲染效果與載入遮罩,並還原內部原始碼的可讀性
  • 改為透過 lang() 明確選擇語系,移除 i18nLang
  • 移除 QUI.body,改用 QUI.element


FIX


  • Fix weekday formatting in dateFormat, HTML attribute bindings and template traversal (@pardnchiu) [ce2eadd]

翻譯
  • 修正 dateFormat 星期格式、HTML 屬性綁定與模板走訪問題


Scope


  • src/model/, src/function/, src/listener/, src/interface.ts — BREAKING, FIX
  • src/QuickUI.debug.js, dist/ — BREAKING, FIX
  • package.json — UPDATE
  • README.md, doc/ — DOC
  • .gitattributes, wiki-worker/ — CHORE



Generated by SKILL