@wcstack/network 4.4.0 → 4.5.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
@@ -111,7 +111,7 @@ npm install @wcstack/network
111
111
  | `supported` | `wcs-network:change` | 実在する `navigator.connection` が見つかれば `true`、それ以外は `false`。 |
112
112
  | `offline` | `wcs-network:change` | `!navigator.onLine`。window の `online` / `offline` イベントで追う — `supported` に関わらずどのブラウザにもある。navigator が無ければ(SSR)`null`。ネットワークが要る操作を止めるのに束ねる(`data-wcs="offline: offline"` と `disabled: offline`)。`navigator.onLine` と同じく、`false` はネットワークがあることで、サーバーが応えることではない(`online` という名前にしないのは、`on` で始まる `data-wcs` の名前がイベントの束縛になるため)。 |
113
113
 
114
- 5 つすべては単一の `wcs-network:change` イベントから派生します(ネイティブ API が全フィールドを1つの `change` イベントで報告するのと同じく、スナップショット全体を1つのイベントにまとめて発火します)。また、`supported` が `true` の環境でも、ブラウザが該当フィールドを欠落または期待外の型で報告した場合、4 つのデータフィールドは個別に `null` へ正規化されます。
114
+ 6 つすべては単一の `wcs-network:change` イベントから派生します(ネイティブ API が全フィールドを1つの `change` イベントで報告するのと同じく、スナップショット全体を1つのイベントにまとめて発火します)。また、`supported` が `true` の環境でも、ブラウザが該当フィールドを欠落または期待外の型で報告した場合、4 つのデータフィールドは個別に `null` へ正規化されます。
115
115
 
116
116
  `downlinkMax` と接続種別(wifi/cellular等)の `type` は意図的に公開していません — 理由は `docs/network-tag-design.md` §2 を参照(実用上の使用例が乏しい、`type` はfingerprinting対策によりブラウザ間で信頼性が低い)。
117
117
 
package/README.md CHANGED
@@ -111,7 +111,7 @@ Every bound state path must be declared up front — binding an undeclared path
111
111
  | `supported` | `wcs-network:change` | `true` once a real `navigator.connection` was found; `false` otherwise. |
112
112
  | `offline` | `wcs-network:change` | `!navigator.onLine`, followed through the window's `online` / `offline` events — every browser has it, whatever `supported` says. `null` without a navigator (SSR). Bind it to disable what needs the network (`data-wcs="offline: offline"` + `disabled: offline`). Like `navigator.onLine`, `false` means a network is there, not that your server answers. (It is not called `online`: a `data-wcs` name starting with `on` is an event binding.) |
113
113
 
114
- All five derive from the single `wcs-network:change` event (a full snapshot dispatched together, mirroring how the native API reports all fields on one `change` event). The four data fields also normalize to `null` individually — even when `supported` is `true` — if the browser reports a field as missing or with an unexpected type.
114
+ All six derive from the single `wcs-network:change` event (a full snapshot dispatched together, mirroring how the native API reports all fields on one `change` event). The four data fields also normalize to `null` individually — even when `supported` is `true` — if the browser reports a field as missing or with an unexpected type.
115
115
 
116
116
  `downlinkMax` and connection `type` (wifi/cellular/…) are intentionally not surfaced — see `docs/network-tag-design.md` §2 for the rationale (low real-world utility, and `type` is unreliable across browsers for fingerprinting-mitigation reasons).
117
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wcstack/network",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "description": "Declarative Network Information component for Web Components. Framework-agnostic navigator.connection monitor via wc-bindable-protocol.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.esm.js",