@urun-sh/core 0.2.7 → 0.2.8

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.
@@ -1,10 +1,12 @@
1
- import { b as AppOptions, a as App$1, J as SessionPhase, Q as SessionStatus, A as AccessTokenOptions, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, F as Session$1, C as ChannelEndpoint, Z as TransportSession, c as AttachOptions, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, T as SessionStream$1, Y as StreamDataTransport, H as SessionDocumentImpl, X as StreamChunkOptions, g as ChunkReadable, P as Presence, j as DocConnector, v as RequestOptions, w as RequestStreamOptions, W as StoreOptions, V as Store, e as ChannelMultiplexer, I as SessionFailureKind } from './stream-data-B16nTnox.mjs';
2
- export { L as Layer, k as LayoutConfig, l as LayoutContext, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, B as RuntimeAvailability, S as SceneContext, E as SceneGraph, G as SessionDocument, K as SessionPhaseError, N as SessionPhaseName, U as SessionText, $ as TransportState, a3 as isPendingRecording, a4 as mediaRecorderChunkSource } from './stream-data-B16nTnox.mjs';
1
+ import { b as AppOptions, a as App$1, K as SessionPhase, T as SessionStatus, O as SessionPhaseName, A as AccessTokenOptions, y as RuntimeArtifact, z as RuntimeArtifactDownload, R as Recording, G as Session$1, C as ChannelEndpoint, _ as TransportSession, c as AttachOptions, v as RecordingsAccessor, B as RuntimeArtifactsAccessor, U as SessionStream$1, Z as StreamDataTransport, I as SessionDocumentImpl, Y as StreamChunkOptions, g as ChunkReadable, P as Presence, k as DocConnector, w as RequestOptions, x as RequestStreamOptions, X as StoreOptions, W as Store, e as ChannelMultiplexer, J as SessionFailureKind } from './stream-data-BS3Z4V1D.mjs';
2
+ export { L as Layer, l as LayoutConfig, m as LayoutContext, M as MediaChunkBinding, o as MediaChunkSource, p as MediaChunkSourceFactory, q as MediaRecorderChunkSourceOptions, r as PresenceState, s as RecordingBucket, t as RecordingLifecycle, u as RecordingStatus, E as RuntimeAvailability, S as SceneContext, F as SceneGraph, H as SessionDocument, N as SessionPhaseError, V as SessionText, a0 as TransportState, a4 as isPendingRecording, a5 as mediaRecorderChunkSource } from './stream-data-BS3Z4V1D.mjs';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
5
 
6
6
  declare function App(appId: string, options: AppOptions): App$1;
7
7
 
8
+ declare function isWakingPhase(phase: SessionPhase | SessionPhaseName | null | undefined): boolean;
9
+
8
10
  interface PhaseObservable {
9
11
 
10
12
  readonly phase: SessionPhase;
@@ -227,6 +229,10 @@ declare class Session implements Session$1 {
227
229
  private _recordingsAccessor;
228
230
 
229
231
  private _artifactsAccessor;
232
+
233
+ private _recoveryHooks;
234
+
235
+ private _lifecycleUnsub;
230
236
  constructor(sessionId: string, multiplexer: ChannelEndpoint, transport: TransportSession, recordingsAuth?: RecordingsClientOptions, artifactsAuth?: RuntimeArtifactsClientOptions);
231
237
  private _wireControlDocIncarnation;
232
238
 
@@ -273,9 +279,17 @@ declare class Session implements Session$1 {
273
279
  requestStream(payload: unknown, options?: RequestStreamOptions): AsyncIterable<string>;
274
280
 
275
281
  complete(payload: unknown, options?: RequestStreamOptions): Promise<unknown>;
282
+
283
+ recover(): void;
284
+
285
+ onRecovery(hook: () => void): () => void;
276
286
  disconnect(): void;
277
287
  }
278
288
 
289
+ declare const FOREGROUND_COALESCE_MS = 250;
290
+
291
+ declare function observePageLifecycle(onForeground: () => void): () => void;
292
+
279
293
  declare function createStore(options: StoreOptions): Store & {
280
294
  _getInternals(): {
281
295
  multiplexer: ChannelMultiplexer;
@@ -359,4 +373,4 @@ declare class SessionAllocationError extends Error {
359
373
  });
360
374
  }
361
375
 
362
- export { App, App$1 as AppInterface, AppOptions, AttachOptions, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, InvalidDurationError, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionStatus, SessionStream$1 as SessionStream, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, type WhenLiveOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, isDurationString, normalizeRetention, sessionFailureFromMediaError, videoStream, whenLive };
376
+ export { App, App$1 as AppInterface, AppOptions, AttachOptions, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, FOREGROUND_COALESCE_MS, InvalidDurationError, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, type WhenLiveOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, isDurationString, isWakingPhase, normalizeRetention, observePageLifecycle, sessionFailureFromMediaError, videoStream, whenLive };
@@ -1,10 +1,12 @@
1
- import { b as AppOptions, a as App$1, J as SessionPhase, Q as SessionStatus, A as AccessTokenOptions, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, F as Session$1, C as ChannelEndpoint, Z as TransportSession, c as AttachOptions, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, T as SessionStream$1, Y as StreamDataTransport, H as SessionDocumentImpl, X as StreamChunkOptions, g as ChunkReadable, P as Presence, j as DocConnector, v as RequestOptions, w as RequestStreamOptions, W as StoreOptions, V as Store, e as ChannelMultiplexer, I as SessionFailureKind } from './stream-data-B16nTnox.js';
2
- export { L as Layer, k as LayoutConfig, l as LayoutContext, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, B as RuntimeAvailability, S as SceneContext, E as SceneGraph, G as SessionDocument, K as SessionPhaseError, N as SessionPhaseName, U as SessionText, $ as TransportState, a3 as isPendingRecording, a4 as mediaRecorderChunkSource } from './stream-data-B16nTnox.js';
1
+ import { b as AppOptions, a as App$1, K as SessionPhase, T as SessionStatus, O as SessionPhaseName, A as AccessTokenOptions, y as RuntimeArtifact, z as RuntimeArtifactDownload, R as Recording, G as Session$1, C as ChannelEndpoint, _ as TransportSession, c as AttachOptions, v as RecordingsAccessor, B as RuntimeArtifactsAccessor, U as SessionStream$1, Z as StreamDataTransport, I as SessionDocumentImpl, Y as StreamChunkOptions, g as ChunkReadable, P as Presence, k as DocConnector, w as RequestOptions, x as RequestStreamOptions, X as StoreOptions, W as Store, e as ChannelMultiplexer, J as SessionFailureKind } from './stream-data-BS3Z4V1D.js';
2
+ export { L as Layer, l as LayoutConfig, m as LayoutContext, M as MediaChunkBinding, o as MediaChunkSource, p as MediaChunkSourceFactory, q as MediaRecorderChunkSourceOptions, r as PresenceState, s as RecordingBucket, t as RecordingLifecycle, u as RecordingStatus, E as RuntimeAvailability, S as SceneContext, F as SceneGraph, H as SessionDocument, N as SessionPhaseError, V as SessionText, a0 as TransportState, a4 as isPendingRecording, a5 as mediaRecorderChunkSource } from './stream-data-BS3Z4V1D.js';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
5
 
6
6
  declare function App(appId: string, options: AppOptions): App$1;
7
7
 
8
+ declare function isWakingPhase(phase: SessionPhase | SessionPhaseName | null | undefined): boolean;
9
+
8
10
  interface PhaseObservable {
9
11
 
10
12
  readonly phase: SessionPhase;
@@ -227,6 +229,10 @@ declare class Session implements Session$1 {
227
229
  private _recordingsAccessor;
228
230
 
229
231
  private _artifactsAccessor;
232
+
233
+ private _recoveryHooks;
234
+
235
+ private _lifecycleUnsub;
230
236
  constructor(sessionId: string, multiplexer: ChannelEndpoint, transport: TransportSession, recordingsAuth?: RecordingsClientOptions, artifactsAuth?: RuntimeArtifactsClientOptions);
231
237
  private _wireControlDocIncarnation;
232
238
 
@@ -273,9 +279,17 @@ declare class Session implements Session$1 {
273
279
  requestStream(payload: unknown, options?: RequestStreamOptions): AsyncIterable<string>;
274
280
 
275
281
  complete(payload: unknown, options?: RequestStreamOptions): Promise<unknown>;
282
+
283
+ recover(): void;
284
+
285
+ onRecovery(hook: () => void): () => void;
276
286
  disconnect(): void;
277
287
  }
278
288
 
289
+ declare const FOREGROUND_COALESCE_MS = 250;
290
+
291
+ declare function observePageLifecycle(onForeground: () => void): () => void;
292
+
279
293
  declare function createStore(options: StoreOptions): Store & {
280
294
  _getInternals(): {
281
295
  multiplexer: ChannelMultiplexer;
@@ -359,4 +373,4 @@ declare class SessionAllocationError extends Error {
359
373
  });
360
374
  }
361
375
 
362
- export { App, App$1 as AppInterface, AppOptions, AttachOptions, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, InvalidDurationError, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionStatus, SessionStream$1 as SessionStream, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, type WhenLiveOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, isDurationString, normalizeRetention, sessionFailureFromMediaError, videoStream, whenLive };
376
+ export { App, App$1 as AppInterface, AppOptions, AttachOptions, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, FOREGROUND_COALESCE_MS, InvalidDurationError, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, type WhenLiveOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, isDurationString, isWakingPhase, normalizeRetention, observePageLifecycle, sessionFailureFromMediaError, videoStream, whenLive };