@urun-sh/core 0.1.39 → 0.1.42
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/dist/index.d.mts +39 -4
- package/dist/index.d.ts +39 -4
- package/dist/index.js +43 -43
- package/dist/index.mjs +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/{transport-Cpxx3zGY.d.mts → transport-BWNRIdMX.d.mts} +10 -0
- package/dist/{transport-Cpxx3zGY.d.ts → transport-BWNRIdMX.d.ts} +10 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AppOptions, A as App$1, k as SessionDocument, p as SessionText, j as Session$1, C as ChannelEndpoint, T as TransportSession, b as AttachOptions, l as SessionPhase, o as SessionStream$1, R as RequestOptions, h as RequestStreamOptions, r as StoreOptions, q as Store, d as ChannelMultiplexer } from './transport-
|
|
2
|
-
export { L as Layer, f as LayoutConfig, g as LayoutContext, S as SceneContext, i as SceneGraph, m as SessionPhaseName, t as TransportState } from './transport-
|
|
1
|
+
import { a as AppOptions, A as App$1, k as SessionDocument, p as SessionText, j as Session$1, C as ChannelEndpoint, T as TransportSession, b as AttachOptions, l as SessionPhase, o as SessionStream$1, R as RequestOptions, h as RequestStreamOptions, r as StoreOptions, q as Store, d as ChannelMultiplexer } from './transport-BWNRIdMX.mjs';
|
|
2
|
+
export { L as Layer, f as LayoutConfig, g as LayoutContext, S as SceneContext, i as SceneGraph, m as SessionPhaseName, t as TransportState } from './transport-BWNRIdMX.mjs';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
|
|
5
5
|
declare function App(appId: string, options: AppOptions): App$1;
|
|
@@ -28,6 +28,8 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
28
28
|
|
|
29
29
|
private _pendingPatches;
|
|
30
30
|
|
|
31
|
+
private _syncWaiters;
|
|
32
|
+
|
|
31
33
|
private _texts;
|
|
32
34
|
private _observer;
|
|
33
35
|
private _updateHandler;
|
|
@@ -35,6 +37,10 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
35
37
|
|
|
36
38
|
setSessionId(sessionId: string): void;
|
|
37
39
|
|
|
40
|
+
get synced(): boolean;
|
|
41
|
+
|
|
42
|
+
onSynced(handler: () => void): () => void;
|
|
43
|
+
|
|
38
44
|
set(patch: Record<string, unknown>): void;
|
|
39
45
|
get(path?: string, defaultValue?: unknown): unknown;
|
|
40
46
|
on(event: 'change', handler: (snap: Record<string, unknown>) => void): () => void;
|
|
@@ -62,11 +68,14 @@ declare class SessionTextImpl implements SessionText {
|
|
|
62
68
|
dispose(): void;
|
|
63
69
|
}
|
|
64
70
|
|
|
71
|
+
declare const DEFAULT_DOC_SYNC_TIMEOUT_MS = 30000;
|
|
65
72
|
declare class SessionStream implements SessionStream$1 {
|
|
66
73
|
private _name;
|
|
67
74
|
private _transport;
|
|
68
75
|
|
|
69
76
|
private _laneDoc?;
|
|
77
|
+
|
|
78
|
+
private _controlDoc?;
|
|
70
79
|
private _track;
|
|
71
80
|
private _handlers;
|
|
72
81
|
private _unsubscribeTransport;
|
|
@@ -78,10 +87,14 @@ declare class SessionStream implements SessionStream$1 {
|
|
|
78
87
|
private _laneUnsubs;
|
|
79
88
|
|
|
80
89
|
private _laneSeen;
|
|
90
|
+
|
|
91
|
+
private _replay;
|
|
81
92
|
private _disposed;
|
|
82
93
|
constructor(_name: string, _transport: TransportSession,
|
|
83
94
|
|
|
84
|
-
_laneDoc?: ((key: string) => SessionDocumentImpl) | undefined
|
|
95
|
+
_laneDoc?: ((key: string) => SessionDocumentImpl) | undefined,
|
|
96
|
+
|
|
97
|
+
_controlDoc?: (() => SessionDocumentImpl) | undefined);
|
|
85
98
|
|
|
86
99
|
messages(): AsyncIterable<unknown>;
|
|
87
100
|
|
|
@@ -89,9 +102,15 @@ declare class SessionStream implements SessionStream$1 {
|
|
|
89
102
|
|
|
90
103
|
private _drainLane;
|
|
91
104
|
get track(): MediaStreamTrack | null;
|
|
105
|
+
|
|
106
|
+
private _claimBrowserProducer;
|
|
92
107
|
attach(track: MediaStreamTrack): Promise<void>;
|
|
93
108
|
|
|
94
109
|
attachVideo(track: MediaStreamTrack): Promise<void>;
|
|
110
|
+
|
|
111
|
+
emit(payload: unknown, options?: {
|
|
112
|
+
to?: string;
|
|
113
|
+
}): Promise<void>;
|
|
95
114
|
detach(): Promise<void>;
|
|
96
115
|
|
|
97
116
|
detachVideo(): Promise<void>;
|
|
@@ -167,6 +186,22 @@ declare class RequestTimeoutError extends RequestError {
|
|
|
167
186
|
constructor(timeoutMs: number, requestId?: string);
|
|
168
187
|
}
|
|
169
188
|
|
|
189
|
+
declare class RequestDocSyncError extends RequestError {
|
|
190
|
+
|
|
191
|
+
readonly timeoutMs: number;
|
|
192
|
+
constructor(timeoutMs: number, requestId?: string);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
declare class StreamDirectionConflict extends Error {
|
|
196
|
+
|
|
197
|
+
readonly stream: string;
|
|
198
|
+
|
|
199
|
+
readonly owner: 'runtime' | 'browser';
|
|
200
|
+
|
|
201
|
+
readonly attempted: 'runtime' | 'browser';
|
|
202
|
+
constructor(stream: string, owner: 'runtime' | 'browser', attempted: 'runtime' | 'browser');
|
|
203
|
+
}
|
|
204
|
+
|
|
170
205
|
declare class RequestAbortError extends RequestError {
|
|
171
206
|
constructor(requestId?: string);
|
|
172
207
|
}
|
|
@@ -175,4 +210,4 @@ declare class RequestCancelledError extends RequestError {
|
|
|
175
210
|
constructor(requestId?: string);
|
|
176
211
|
}
|
|
177
212
|
|
|
178
|
-
export { App, App$1 as AppInterface, AppOptions, AttachOptions, RequestAbortError, RequestCancelledError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, Session, SessionDocument, Session$1 as SessionInterface, SessionPhase, SessionStream$1 as SessionStream, SessionText, Store, StoreOptions, type VideoStreamOptions, createStore, videoStream };
|
|
213
|
+
export { App, App$1 as AppInterface, AppOptions, AttachOptions, DEFAULT_DOC_SYNC_TIMEOUT_MS, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, Session, SessionDocument, Session$1 as SessionInterface, SessionPhase, SessionStream$1 as SessionStream, SessionText, Store, StoreOptions, StreamDirectionConflict, type VideoStreamOptions, createStore, videoStream };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AppOptions, A as App$1, k as SessionDocument, p as SessionText, j as Session$1, C as ChannelEndpoint, T as TransportSession, b as AttachOptions, l as SessionPhase, o as SessionStream$1, R as RequestOptions, h as RequestStreamOptions, r as StoreOptions, q as Store, d as ChannelMultiplexer } from './transport-
|
|
2
|
-
export { L as Layer, f as LayoutConfig, g as LayoutContext, S as SceneContext, i as SceneGraph, m as SessionPhaseName, t as TransportState } from './transport-
|
|
1
|
+
import { a as AppOptions, A as App$1, k as SessionDocument, p as SessionText, j as Session$1, C as ChannelEndpoint, T as TransportSession, b as AttachOptions, l as SessionPhase, o as SessionStream$1, R as RequestOptions, h as RequestStreamOptions, r as StoreOptions, q as Store, d as ChannelMultiplexer } from './transport-BWNRIdMX.js';
|
|
2
|
+
export { L as Layer, f as LayoutConfig, g as LayoutContext, S as SceneContext, i as SceneGraph, m as SessionPhaseName, t as TransportState } from './transport-BWNRIdMX.js';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
|
|
5
5
|
declare function App(appId: string, options: AppOptions): App$1;
|
|
@@ -28,6 +28,8 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
28
28
|
|
|
29
29
|
private _pendingPatches;
|
|
30
30
|
|
|
31
|
+
private _syncWaiters;
|
|
32
|
+
|
|
31
33
|
private _texts;
|
|
32
34
|
private _observer;
|
|
33
35
|
private _updateHandler;
|
|
@@ -35,6 +37,10 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
35
37
|
|
|
36
38
|
setSessionId(sessionId: string): void;
|
|
37
39
|
|
|
40
|
+
get synced(): boolean;
|
|
41
|
+
|
|
42
|
+
onSynced(handler: () => void): () => void;
|
|
43
|
+
|
|
38
44
|
set(patch: Record<string, unknown>): void;
|
|
39
45
|
get(path?: string, defaultValue?: unknown): unknown;
|
|
40
46
|
on(event: 'change', handler: (snap: Record<string, unknown>) => void): () => void;
|
|
@@ -62,11 +68,14 @@ declare class SessionTextImpl implements SessionText {
|
|
|
62
68
|
dispose(): void;
|
|
63
69
|
}
|
|
64
70
|
|
|
71
|
+
declare const DEFAULT_DOC_SYNC_TIMEOUT_MS = 30000;
|
|
65
72
|
declare class SessionStream implements SessionStream$1 {
|
|
66
73
|
private _name;
|
|
67
74
|
private _transport;
|
|
68
75
|
|
|
69
76
|
private _laneDoc?;
|
|
77
|
+
|
|
78
|
+
private _controlDoc?;
|
|
70
79
|
private _track;
|
|
71
80
|
private _handlers;
|
|
72
81
|
private _unsubscribeTransport;
|
|
@@ -78,10 +87,14 @@ declare class SessionStream implements SessionStream$1 {
|
|
|
78
87
|
private _laneUnsubs;
|
|
79
88
|
|
|
80
89
|
private _laneSeen;
|
|
90
|
+
|
|
91
|
+
private _replay;
|
|
81
92
|
private _disposed;
|
|
82
93
|
constructor(_name: string, _transport: TransportSession,
|
|
83
94
|
|
|
84
|
-
_laneDoc?: ((key: string) => SessionDocumentImpl) | undefined
|
|
95
|
+
_laneDoc?: ((key: string) => SessionDocumentImpl) | undefined,
|
|
96
|
+
|
|
97
|
+
_controlDoc?: (() => SessionDocumentImpl) | undefined);
|
|
85
98
|
|
|
86
99
|
messages(): AsyncIterable<unknown>;
|
|
87
100
|
|
|
@@ -89,9 +102,15 @@ declare class SessionStream implements SessionStream$1 {
|
|
|
89
102
|
|
|
90
103
|
private _drainLane;
|
|
91
104
|
get track(): MediaStreamTrack | null;
|
|
105
|
+
|
|
106
|
+
private _claimBrowserProducer;
|
|
92
107
|
attach(track: MediaStreamTrack): Promise<void>;
|
|
93
108
|
|
|
94
109
|
attachVideo(track: MediaStreamTrack): Promise<void>;
|
|
110
|
+
|
|
111
|
+
emit(payload: unknown, options?: {
|
|
112
|
+
to?: string;
|
|
113
|
+
}): Promise<void>;
|
|
95
114
|
detach(): Promise<void>;
|
|
96
115
|
|
|
97
116
|
detachVideo(): Promise<void>;
|
|
@@ -167,6 +186,22 @@ declare class RequestTimeoutError extends RequestError {
|
|
|
167
186
|
constructor(timeoutMs: number, requestId?: string);
|
|
168
187
|
}
|
|
169
188
|
|
|
189
|
+
declare class RequestDocSyncError extends RequestError {
|
|
190
|
+
|
|
191
|
+
readonly timeoutMs: number;
|
|
192
|
+
constructor(timeoutMs: number, requestId?: string);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
declare class StreamDirectionConflict extends Error {
|
|
196
|
+
|
|
197
|
+
readonly stream: string;
|
|
198
|
+
|
|
199
|
+
readonly owner: 'runtime' | 'browser';
|
|
200
|
+
|
|
201
|
+
readonly attempted: 'runtime' | 'browser';
|
|
202
|
+
constructor(stream: string, owner: 'runtime' | 'browser', attempted: 'runtime' | 'browser');
|
|
203
|
+
}
|
|
204
|
+
|
|
170
205
|
declare class RequestAbortError extends RequestError {
|
|
171
206
|
constructor(requestId?: string);
|
|
172
207
|
}
|
|
@@ -175,4 +210,4 @@ declare class RequestCancelledError extends RequestError {
|
|
|
175
210
|
constructor(requestId?: string);
|
|
176
211
|
}
|
|
177
212
|
|
|
178
|
-
export { App, App$1 as AppInterface, AppOptions, AttachOptions, RequestAbortError, RequestCancelledError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, Session, SessionDocument, Session$1 as SessionInterface, SessionPhase, SessionStream$1 as SessionStream, SessionText, Store, StoreOptions, type VideoStreamOptions, createStore, videoStream };
|
|
213
|
+
export { App, App$1 as AppInterface, AppOptions, AttachOptions, DEFAULT_DOC_SYNC_TIMEOUT_MS, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, Session, SessionDocument, Session$1 as SessionInterface, SessionPhase, SessionStream$1 as SessionStream, SessionText, Store, StoreOptions, StreamDirectionConflict, type VideoStreamOptions, createStore, videoStream };
|