haori 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ja.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Haori.js は、HTML 属性を中心にして動的な UI を実現する軽量なライブラリです。JavaScript をほとんど書かずに、データバインディング、条件分岐、繰り返し処理、フォームの双方向バインディング、サーバー通信などを HTML 属性で宣言できます。
4
4
 
5
- バージョン: 0.28.0
5
+ バージョン: 0.30.0
6
6
 
7
7
  ---
8
8
 
@@ -137,7 +137,7 @@ JS からバインドデータを読むには `Haori.Core.getBindingData(element
137
137
 
138
138
  `data-fetch` と `data-import` は、バインディング更新時に評価結果が変化した場合のみ自動で再評価されます。`data-fetch` は評価後の URL、HTTP メソッド、ヘッダー、body を含む実行シグネチャで比較し、`data-import` は評価後 URL で比較します。これらの属性値に未解決参照が 1 つでも含まれる場合、その時点では実行されず、後続のバインディング更新で参照が解決したときに初めて実行対象になります。
139
139
 
140
- `src` や `type="number"` の `value` のように、ブラウザが HTML 解析時に先に解釈する属性へテンプレート式を直接書くと、初期表示時に警告や不要なアクセスが発生することがあります。こうした属性は `data-attr-*` を使ってください。`data-attr-xxx` は対応する `xxx` 属性を更新します。加えて、入力欄の状態と DOM の食い違いを防ぐため、`value`(テキスト系入力)と `checked`(radio / checkbox)・`selected`(option)は DOM property(`input.value` / `element.checked` / `option.selected`)も同期します。ただし `value` は**フォーカス中(編集中)の入力には再適用しません**(未コミット入力の巻き戻し防止。コミット値は `change` で反映)。
140
+ `src` や `type="number"` の `value` のように、ブラウザが HTML 解析時に先に解釈する属性へテンプレート式を直接書くと、初期表示時に警告や不要なアクセスが発生することがあります。こうした属性は `data-attr-*` を使ってください。`data-attr-xxx` は対応する `xxx` 属性を更新します。加えて、入力欄の状態と DOM の食い違いを防ぐため、`value`(テキスト系入力)と `checked`(radio / checkbox)・`selected`(option)は DOM property(`input.value` / `element.checked` / `option.selected`)も同期します。ただし**フォーカス中(編集中)の入力**と、**`change` / `input` で確定した編集を抱えている入力**には再適用しません(利用者の入力を守るため)。確定した編集の印は、フェッチ応答の反映・`data-{event}-reset`・`Core.setBindingData()` などの明示的な値の供給で解除されます。
141
141
 
142
142
  詳しい使い方や多数のサンプルについては、公式ドキュメントを参照してください。
143
143
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Haori.js is a lightweight, HTML-first UI library that enables dynamic user interfaces primarily through HTML attributes. It lets you declare data bindings, conditional rendering, list rendering, form two-way binding, server fetches, and HTML imports without writing much JavaScript.
4
4
 
5
- Version: 0.28.0
5
+ Version: 0.30.0
6
6
 
7
7
  ---
8
8
 
@@ -137,7 +137,7 @@ Helpers for tests and debugging: `waitForRenders()` (also `Haori.waitForRenders(
137
137
 
138
138
  `data-fetch` and `data-import` are automatically re-evaluated only when their evaluated values change after a binding update. `data-fetch` compares a request signature composed of the resolved URL, HTTP method, headers, and body, while `data-import` compares only the resolved URL. If either attribute contains even one unresolved reference, it is treated as invalid for that evaluation cycle, is not executed, and becomes executable only after a later binding update resolves the reference.
139
139
 
140
- When the browser interprets an attribute during HTML parsing, such as `src` or `value` on `input type="number"`, writing template expressions directly in that attribute can cause warnings or unwanted requests before Haori runs. Use `data-attr-*` for those cases. `data-attr-xxx` updates the matching `xxx` attribute, and to keep input state consistent with the DOM it also synchronizes DOM properties for `value` (text inputs), `checked` (radio / checkbox) and `selected` (option). The `value` property is **not** re-applied to a focused (being-edited) input, so unsaved keystrokes are never rolled back; the committed value is reflected back on `change`.
140
+ When the browser interprets an attribute during HTML parsing, such as `src` or `value` on `input type="number"`, writing template expressions directly in that attribute can cause warnings or unwanted requests before Haori runs. Use `data-attr-*` for those cases. `data-attr-xxx` updates the matching `xxx` attribute, and to keep input state consistent with the DOM it also synchronizes DOM properties for `value` (text inputs), `checked` (radio / checkbox) and `selected` (option). These properties are **not** re-applied to a focused (being-edited) input, nor to an input that holds an edit committed through `change` / `input`, so user input is never rolled back. The committed-edit mark is cleared by an explicit supply of values (fetch response binding, `data-{event}-reset`, `data-{event}-copy`, `Core.setBindingData()`).
141
141
 
142
142
  For detailed usage and many examples, see the official documentation.
143
143