@statewalker/webrun-streams-signaling 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. package/README.md +35 -2
  2. package/package.json +7 -3
  3. package/LICENSE +0 -21
package/README.md CHANGED
@@ -99,7 +99,26 @@ await room.leave();
99
99
  - **`parseCompressedSignal(signal): { sessionId, role, description, candidates }`** — reverse of the above.
100
100
  - **`encodeSignal(signal): string`** / **`decodeSignal(encoded): CompressedSignal`** — URL-safe base64 (de)serialisation for QR strings.
101
101
 
102
- Types (`ByteChannel`-adjacent handshake shapes) are re-exported from `./types` — `SignalingTransport`, `SignalingMessage`, `RoomLike`, `RoomManagerOptions`, `WebRtcConnectionOptions`, `CompressedSignal`, `DEFAULT_ICE_SERVERS`, and more.
102
+ ### Types and constants
103
+
104
+ All re-exported from `./types` at the package root.
105
+
106
+ | Export | Kind | Purpose |
107
+ | --- | --- | --- |
108
+ | `SignalingTransport` | interface | The pluggable channel offers/answers travel over. |
109
+ | `SignalingMessage` | union | Offer / answer / ICE-candidate envelopes. |
110
+ | `SessionDescription` / `IceCandidate` | interface | Structural views of the WebRTC handshake payloads (no DOM types required). |
111
+ | `PeerRole` | `"initiator" \| "responder"` | Which side of the handshake this peer plays. |
112
+ | `ConnectionState` | union | Lifecycle state reported by `PeerConnection`. |
113
+ | `PeerConnectionEvents` | interface | The event callbacks `PeerConnection` accepts. |
114
+ | `WebRtcConnectionOptions` | interface | ICE configuration and the injected `rtc` factory. |
115
+ | `RtcPeerConnectionFactory` | type | `(config: RTCConfiguration) => RTCPeerConnection` — the injection seam that keeps native WebRTC out of the import graph. |
116
+ | `DEFAULT_ICE_SERVERS` | const | STUN servers used when none are supplied. |
117
+ | `CompressedSignal` | interface | The compact offer/answer shape behind the QR helpers. |
118
+ | `RoomLike` / `RoomParticipantLike` / `RoomLocalParticipantLike` | interface | Structural view of a LiveKit room, so `livekit-client` stays an optional peer dependency. |
119
+ | `RoomManagerOptions` | interface | Includes `roomFactory`, the injection point for the real `Room`. |
120
+ | `ParticipantInfo` | interface | Identity + metadata for a room participant. |
121
+ | `ROOM_EVENT` | const | Room event-name constants used by `RoomManager`. |
103
122
 
104
123
  ## Notes
105
124
 
@@ -108,6 +127,20 @@ Types (`ByteChannel`-adjacent handshake shapes) are re-exported from `./types`
108
127
  - **`peerjs` is not a dependency.** These helpers use native WebRTC; the peerjs byte transport lives in `@statewalker/webrun-streams-peerjs`.
109
128
  - Built red/green TDD.
110
129
 
130
+ ## Dependencies
131
+
132
+ | Dependency | Kind | Why |
133
+ | --- | --- | --- |
134
+ | [`@statewalker/webrun-streams`](../webrun-streams) | runtime | `ByteChannel`, and `emulateMux` for the transport built on top. |
135
+ | `livekit-client` | **peer, optional** (`^2.18.3`) | Only for `RoomManager`. Injected via `RoomManagerOptions.roomFactory`; the module itself keeps a structural `RoomLike` view, so the dependency is avoidable. |
136
+
137
+ Native WebRTC is likewise injected (the optional `rtc` factory, defaulting to
138
+ `new RTCPeerConnection`), which is why the test suite needs no vendor install.
139
+ `peerjs` is deliberately **not** a dependency — that transport lives in
140
+ [`@statewalker/webrun-streams-peerjs`](../webrun-streams-peerjs).
141
+
142
+ ESM only (`"type": "module"`).
143
+
111
144
  ## License
112
145
 
113
- MIT
146
+ MIT © statewalker — see [LICENSE](../../LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statewalker/webrun-streams-signaling",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Generic P2P signaling/connection-setup (PeerManager, QrSignaling, RoomManager) yielding webrun-streams ByteChannels",
@@ -16,14 +16,17 @@
16
16
  "directory": "packages/webrun-streams-signaling"
17
17
  },
18
18
  "exports": {
19
- ".": "./src/index.ts"
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js"
22
+ }
20
23
  },
21
24
  "files": [
22
25
  "dist",
23
26
  "src"
24
27
  ],
25
28
  "dependencies": {
26
- "@statewalker/webrun-streams": "0.1.1"
29
+ "@statewalker/webrun-streams": "0.2.0"
27
30
  },
28
31
  "peerDependencies": {
29
32
  "livekit-client": "^2.18.3"
@@ -45,6 +48,7 @@
45
48
  "publishConfig": {
46
49
  "access": "public"
47
50
  },
51
+ "types": "./dist/index.d.ts",
48
52
  "scripts": {
49
53
  "build": "rimraf dist && rolldown -c && tsc --emitDeclarationOnly --declaration",
50
54
  "test": "vitest run",
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022-2026 statewalker
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.