@treyorr/voca-svelte 0.2.0 → 0.3.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.md CHANGED
@@ -43,11 +43,16 @@ This package provides **reactive Svelte 5 state** around the core `@treyorr/voca
43
43
  const client = await VocaClient.createRoom({
44
44
  serverUrl: SERVER_URL,
45
45
  apiKey: API_KEY,
46
+ password: 'secret123', // Optional: protect room with password
46
47
  });
47
48
  roomId = client.roomId;
48
49
 
49
50
  // Step 2: Create reactive VocaRoom and connect
50
- room = new VocaRoom(roomId, { serverUrl: SERVER_URL, apiKey: API_KEY });
51
+ room = new VocaRoom(roomId, {
52
+ serverUrl: SERVER_URL,
53
+ apiKey: API_KEY,
54
+ password: 'secret123', // Must match the password used to create room
55
+ });
51
56
  await room.connect();
52
57
  }
53
58
 
@@ -78,6 +83,7 @@ This package provides **reactive Svelte 5 state** around the core `@treyorr/voca
78
83
  const room = new VocaRoom(roomId, {
79
84
  serverUrl: 'https://voca.vc',
80
85
  apiKey: 'T8izjz8JpcWa3mtuhOFwprVk77uZKIzn',
86
+ password: 'secret123', // Required if room is password-protected
81
87
  });
82
88
 
83
89
  onMount(() => room.connect());
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Svelte 5 runes-based wrapper around @treyorr/voca-client SDK.
5
5
  */
6
- import { VocaClient, type ConnectionStatus, type Peer, type VocaConfig } from '@treyorr/voca-client';
7
- export { VocaClient };
6
+ import { VocaClient, validatePassword, type ConnectionStatus, type Peer, type VocaConfig } from '@treyorr/voca-client';
7
+ export { VocaClient, validatePassword };
8
8
  export type { ConnectionStatus, Peer, VocaConfig };
9
9
  export declare class VocaRoom {
10
10
  peers: Map<string, Peer>;
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Svelte 5 runes-based wrapper around @treyorr/voca-client SDK.
5
5
  */
6
- import { VocaClient } from '@treyorr/voca-client';
7
- export { VocaClient };
6
+ import { VocaClient, validatePassword } from '@treyorr/voca-client';
7
+ export { VocaClient, validatePassword };
8
8
  export class VocaRoom {
9
9
  constructor(roomId, config = {}) {
10
10
  // Reactive state
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treyorr/voca-svelte",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Svelte 5 Runes wrapper for Voca Client SDK",
5
5
  "svelte": "./dist/index.svelte.js",
6
6
  "types": "./dist/index.svelte.d.ts",
@@ -37,7 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@treyorr/voca-client": "^0.2.0"
40
+ "@treyorr/voca-client": "^0.3.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@sveltejs/package": "^2.3.7",