haori 0.69.0 → 0.70.1

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.69.0
5
+ バージョン: 0.70.1
6
6
 
7
7
  ---
8
8
 
@@ -167,7 +167,7 @@ JS からバインドデータを読むには `Haori.Core.getBindingData(element
167
167
 
168
168
  開発モードは `<script src="haori.js" data-dev>` で強制でき、**ローカルホストでは既定で有効**です。開発モードの診断は再描画のコストに乗るため、ローカルで本番相当の性能を測る場合は `data-dev="false"` を指定して無効化してください。
169
169
 
170
- `data-fetch` と `data-import` は、バインディング更新時に評価結果が変化した場合のみ自動で再評価されます。`data-fetch` は評価後の URL、HTTP メソッド、ヘッダー、body を含む実行シグネチャで比較し、`data-import` は評価後 URL で比較します。これらの属性値に未解決参照が 1 つでも含まれる場合、その時点では実行されず、後続のバインディング更新で参照が解決したときに初めて実行対象になります。
170
+ `data-fetch` と `data-import` は、バインディング更新時に評価結果が変化した場合のみ自動で再評価されます。`data-fetch` は評価後の URL、HTTP メソッド、ヘッダー、body を含む実行シグネチャで比較し、`data-import` は評価後 URL で比較します。これらの属性値に未解決参照が 1 つでも含まれる場合、その時点では実行されず、後続のバインディング更新で参照が解決したときに初めて実行対象になります。`data-{event}-refetch` は、手続きのバインドの後に対象の要素で同じ条件の自動の取得が走った場合は取り直しません(条件を変えて押しても取得は 1 回です)。
171
171
 
172
172
  `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()` などの明示的な値の供給で解除されます。
173
173
 
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.69.0
5
+ Version: 0.70.1
6
6
 
7
7
  ---
8
8
 
@@ -169,7 +169,7 @@ Helpers for tests and debugging: `waitForRenders()` (also `Haori.waitForRenders(
169
169
 
170
170
  Dev mode can be forced with `<script src="haori.js" data-dev>` and is **enabled by default on localhost**. Its diagnostics add to render cost, so pass `data-dev="false"` when measuring production-like performance locally.
171
171
 
172
- `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.
172
+ `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. `data-{event}-refetch` skips an element whose automatic fetch already ran with the same signature after the procedure's bind (changing the condition and clicking still fetches once).
173
173
 
174
174
  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()`).
175
175