@netless/app-presentation 0.1.12 → 0.1.13-beta.1

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.ts CHANGED
@@ -218,7 +218,10 @@ declare class Preload implements IDisposable {
218
218
  readonly preloadMap: Map<number, IPreloadMapValue>;
219
219
  touchIndex: number;
220
220
  preloadSize: number;
221
+ paused: boolean;
221
222
  constructor(pages: PresentationPage[]);
223
+ pause(): void;
224
+ resume(index?: number): void;
222
225
  touch(index: number, force?: boolean): void;
223
226
  private createLink;
224
227
  private destroySomeLink;
@@ -420,6 +423,17 @@ interface PresentationAppOptions {
420
423
  goToPageByClick?: boolean;
421
424
  /** useClipView is used to set the presentation use clip view, it will be used in the presentation, and the presentation will be use clip view when the app is initialized */
422
425
  useClipView?: boolean;
426
+ /**
427
+ * Max time (ms) `setup()` waits for the first visible page image to load
428
+ * before resolving anyway. Default: 5_000.
429
+ */
430
+ setupReadyTimeout?: number;
431
+ /**
432
+ * Blur thumbnail degradation keeps cached (focused-lost) presentations on
433
+ * the low-res `previewURL` thumbnail to save memory. Enabled by default in
434
+ * maximized/minimized states; set `true` to disable it.
435
+ */
436
+ disableBlurThumbnailDegradation?: boolean;
423
437
  }
424
438
  interface PresentationController {
425
439
  readonly app: Presentation;
@@ -469,8 +483,10 @@ interface PresentationController {
469
483
  /** screenshot the current page */
470
484
  screenshotCurrentPageAsync: (context: CanvasRenderingContext2D, width?: number, height?: number) => Promise<void>;
471
485
  }
472
- declare const NetlessAppPresentation: NetlessApp<PresentationAttributes, {}, PresentationAppOptions, PresentationController>;
473
- type RegisterFn = typeof WindowManager["register"];
486
+ declare const NetlessAppPresentation: NetlessApp<PresentationAttributes, {}, PresentationAppOptions, PresentationController> & {
487
+ teardown(context: AppContext): void;
488
+ };
489
+ type RegisterFn = (typeof WindowManager)["register"];
474
490
  interface InstallOptions {
475
491
  /**
476
492
  * Register as another "kind", to hijack existing apps.