@netless/app-slide 0.2.4 → 0.2.5

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/typings.d.ts CHANGED
@@ -15,5 +15,3 @@ export declare type MagixPayload = {
15
15
  export declare type MagixEvents = {
16
16
  [SLIDE_EVENTS.syncDispatch]: MagixPayload;
17
17
  };
18
- export interface A {
19
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/app-slide",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "devDependencies": {
13
13
  "@netless/app-shared": "0.1.2",
14
- "@netless/slide": "^0.5.10",
14
+ "@netless/slide": "^0.5.13",
15
15
  "@types/color-string": "^1.5.2",
16
16
  "color-string": "^1.9.1",
17
17
  "side-effect-manager": "^1.1.1",
@@ -264,6 +264,13 @@ export class SlideController {
264
264
  transactionBgColor: options.bgColor || cachedGetBgColor(anchor),
265
265
  maxResolutionLevel: options.maxResolutionLevel,
266
266
  },
267
+ fixedFrameSize: options.fixedFrameSize,
268
+ loaderDelegate: options.loaderDelegate,
269
+ navigatorDelegate: options.navigatorDelegate,
270
+ resourceTimeout: options.resourceTimeout,
271
+ rtcAudio: options.rtcAudio,
272
+ useLocalCache: options.useLocalCache,
273
+ logger: options.logger,
267
274
  timestamp: this.timestamp,
268
275
  });
269
276
  if (import.meta.env.DEV) {
package/src/index.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import type { NetlessApp } from "@netless/window-manager";
2
2
  import type { RoomState } from "white-web-sdk";
3
- import type { Slide } from "@netless/slide";
3
+ import type { ISlideConfig } from "@netless/slide";
4
4
  import type { MountSlideOptions } from "./SlideDocsViewer";
5
5
  import type { Attributes, MagixEvents } from "./typings";
6
6
  import type { AddHooks, FreezableSlide } from "./utils/freezer";
7
7
 
8
+ import { Slide } from "@netless/slide";
8
9
  import { SideEffectManager } from "side-effect-manager";
9
10
  import {
10
11
  DefaultUrl,
@@ -21,12 +22,25 @@ export type { PreviewParams } from "./SlidePreviewer";
21
22
  export { SlidePreviewer, default as previewSlide } from "./SlidePreviewer";
22
23
 
23
24
  export type { Attributes, AddHooks, FreezableSlide };
25
+ export { Slide };
26
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ export const usePlugin: (plugin: any) => any = /* @__PURE__ */ Slide.usePlugin.bind(Slide);
24
28
 
25
29
  export const version = __APP_VERSION__;
26
30
 
27
31
  export { DefaultUrl, apps, FreezerLength, addHooks };
28
32
 
29
- export interface AppOptions {
33
+ export interface AppOptions
34
+ extends Pick<
35
+ ISlideConfig,
36
+ | "rtcAudio"
37
+ | "useLocalCache"
38
+ | "resourceTimeout"
39
+ | "loaderDelegate"
40
+ | "navigatorDelegate"
41
+ | "fixedFrameSize"
42
+ | "logger"
43
+ > {
30
44
  /** show debug controller */
31
45
  debug?: boolean;
32
46
  /** scale */
@@ -45,6 +59,12 @@ export interface AppOptions {
45
59
  maxResolutionLevel?: number;
46
60
  }
47
61
 
62
+ export interface ILogger {
63
+ info?(msg: string): void;
64
+ error?(msg: string): void;
65
+ warn?(msg: string): void;
66
+ }
67
+
48
68
  export interface Controller {
49
69
  slide: () => Slide | undefined;
50
70
  position: () => [page: number, pageCount: number] | undefined;
package/src/typings.ts CHANGED
@@ -19,5 +19,3 @@ export type MagixPayload = {
19
19
  export type MagixEvents = {
20
20
  [SLIDE_EVENTS.syncDispatch]: MagixPayload;
21
21
  };
22
-
23
- export interface A {}