@wcstack/websocket 1.31.0 → 1.32.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 +4 -0
- package/README.md +4 -0
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -675,6 +675,10 @@ bootstrapWebSocket({
|
|
|
675
675
|
- 自動再接続は異常切断時のみ発動(コード 1000 以外)
|
|
676
676
|
- **`errorInfo` タクソノミ**: `error` に現れるのと同じ失敗を、シリアライズ可能な `WcsIoErrorInfo`(安定した `code` / `phase` / `recoverable`)に分類する**追加的な**バインド可能出力(`wcs-ws:error-info-changed`)です。`error` の形状は変えません。`url` を指定しない `connect()` は `invalid-argument`(phase `start`、回復不可)、open 前の `send()` は `invalid-state`(phase `execute`、回復不可——先に connect が必要)、`new WebSocket()` の構築例外またはプラットフォームの `error` Event は `connection-error`(phase `execute`、**`recoverable: true`**——接続エラーは通常一過性で、再接続で回復しうる)です。`errorInfo` は `error` と同じタイミングで遷移し(`error` と共にクリアされる)ます。共有の `WcsIoErrorInfo` 型と `WCS_WEBSOCKET_ERROR_CODE` 定数は export 済みです。
|
|
677
677
|
|
|
678
|
+
## アクセシビリティ
|
|
679
|
+
|
|
680
|
+
**WCAG 2.2.2 Pause, Stop, Hide(一時停止・停止・非表示)**: 見えるコンテンツを書き換え続けるライブフィードには、ユーザーが使える一時停止が要る。部品はこのタグに揃っている — `close` でストリームが止まり、`connect` で再開する — ので、基準のコストはそこへ配線した可視のトグル 1 つ。一時停止では*更新*を止め、読むために止めた内容を消さないこと。追記型のメッセージログにはコンテナへの `role="log"`([`examples/websocket-chat`](https://github.com/wcstack/wcstack/tree/main/examples/websocket-chat) と同様)で、新着がスクリーンリーダーに polite に読まれる。
|
|
681
|
+
|
|
678
682
|
## ライセンス
|
|
679
683
|
|
|
680
684
|
MIT
|
package/README.md
CHANGED
|
@@ -678,6 +678,10 @@ bootstrapWebSocket({
|
|
|
678
678
|
- Auto-reconnect only fires on abnormal close (code other than 1000)
|
|
679
679
|
- **`errorInfo` taxonomy**: an **additive** bindable output (`wcs-ws:error-info-changed`) that classifies the same failure surfaced on `error` into a serializable `WcsIoErrorInfo` with a stable `code` / `phase` / `recoverable`, without changing the `error` shape. A `connect()` with no `url` is `invalid-argument` (phase `start`, not recoverable); a `send()` before the socket is open is `invalid-state` (phase `execute`, not recoverable — connect first); a `new WebSocket()` construction exception or the platform `error` Event is `connection-error` (phase `execute`, **`recoverable: true`** — connection errors are usually transient and a reconnect can recover). `errorInfo` transitions exactly when `error` does (cleared to `null` alongside it). The shared `WcsIoErrorInfo` type and the `WCS_WEBSOCKET_ERROR_CODE` constants are exported.
|
|
680
680
|
|
|
681
|
+
## Accessibility
|
|
682
|
+
|
|
683
|
+
**WCAG 2.2.2 Pause, Stop, Hide**: a live feed that keeps rewriting visible content needs a user-reachable pause. The parts are already on this tag — `close` stops the stream, `connect` resumes it — so the criterion costs one visible toggle wired to those commands. When pausing, stop the *updates* without wiping what the user paused to read. For an appending message log, `role="log"` on the container (as in [`examples/websocket-chat`](https://github.com/wcstack/wcstack/tree/main/examples/websocket-chat)) lets screen readers announce new messages politely.
|
|
684
|
+
|
|
681
685
|
## License
|
|
682
686
|
|
|
683
687
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wcstack/websocket",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "Declarative WebSocket component for Web Components. Framework-agnostic real-time communication via wc-bindable-protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.esm.js",
|