@urun-sh/core 0.1.39 → 0.1.41

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 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-Cpxx3zGY.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-Cpxx3zGY.mjs';
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-CI8aVD2U.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-CI8aVD2U.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,6 +68,7 @@ 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;
@@ -78,6 +85,8 @@ declare class SessionStream implements SessionStream$1 {
78
85
  private _laneUnsubs;
79
86
 
80
87
  private _laneSeen;
88
+
89
+ private _replay;
81
90
  private _disposed;
82
91
  constructor(_name: string, _transport: TransportSession,
83
92
 
@@ -167,6 +176,12 @@ declare class RequestTimeoutError extends RequestError {
167
176
  constructor(timeoutMs: number, requestId?: string);
168
177
  }
169
178
 
179
+ declare class RequestDocSyncError extends RequestError {
180
+
181
+ readonly timeoutMs: number;
182
+ constructor(timeoutMs: number, requestId?: string);
183
+ }
184
+
170
185
  declare class RequestAbortError extends RequestError {
171
186
  constructor(requestId?: string);
172
187
  }
@@ -175,4 +190,4 @@ declare class RequestCancelledError extends RequestError {
175
190
  constructor(requestId?: string);
176
191
  }
177
192
 
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 };
193
+ 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, 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-Cpxx3zGY.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-Cpxx3zGY.js';
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-CI8aVD2U.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-CI8aVD2U.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,6 +68,7 @@ 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;
@@ -78,6 +85,8 @@ declare class SessionStream implements SessionStream$1 {
78
85
  private _laneUnsubs;
79
86
 
80
87
  private _laneSeen;
88
+
89
+ private _replay;
81
90
  private _disposed;
82
91
  constructor(_name: string, _transport: TransportSession,
83
92
 
@@ -167,6 +176,12 @@ declare class RequestTimeoutError extends RequestError {
167
176
  constructor(timeoutMs: number, requestId?: string);
168
177
  }
169
178
 
179
+ declare class RequestDocSyncError extends RequestError {
180
+
181
+ readonly timeoutMs: number;
182
+ constructor(timeoutMs: number, requestId?: string);
183
+ }
184
+
170
185
  declare class RequestAbortError extends RequestError {
171
186
  constructor(requestId?: string);
172
187
  }
@@ -175,4 +190,4 @@ declare class RequestCancelledError extends RequestError {
175
190
  constructor(requestId?: string);
176
191
  }
177
192
 
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 };
193
+ 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, type VideoStreamOptions, createStore, videoStream };