@netless/app-slide 0.0.56 → 0.1.0
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/SlideController/index.d.ts +2 -4
- package/dist/index.d.ts +16 -2
- package/dist/main.cjs.js +92 -92
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +224 -209
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +133 -133
- package/dist/main.iife.js.map +1 -1
- package/dist/typings.d.ts +5 -0
- package/package.json +2 -2
- package/src/SlideController/index.ts +20 -38
- package/src/index.ts +69 -8
- package/src/typings.ts +6 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AppContext } from "@netless/window-manager";
|
|
2
|
-
import type { Attributes } from "../typings";
|
|
2
|
+
import type { Attributes, MagixEvents } from "../typings";
|
|
3
3
|
import { Slide } from "@netless/slide";
|
|
4
4
|
export { syncSceneWithSlide, createDocsViewerPages } from "./helpers";
|
|
5
5
|
export declare const DefaultUrl = "https://convertcdn.netless.link/dynamicConvert";
|
|
6
6
|
export declare const MaxPollCount = 40;
|
|
7
7
|
export declare const EmptyAttributes: Attributes;
|
|
8
8
|
export interface SlideControllerOptions {
|
|
9
|
-
context: AppContext<Attributes>;
|
|
9
|
+
context: AppContext<Attributes, MagixEvents>;
|
|
10
10
|
anchor: HTMLDivElement;
|
|
11
11
|
onPageChanged: (page: number) => void;
|
|
12
12
|
onTransitionStart: () => void;
|
|
@@ -18,7 +18,6 @@ export interface SlideControllerOptions {
|
|
|
18
18
|
export declare class SlideController {
|
|
19
19
|
readonly context: SlideControllerOptions["context"];
|
|
20
20
|
readonly slide: Slide;
|
|
21
|
-
private readonly channel;
|
|
22
21
|
private readonly room?;
|
|
23
22
|
private readonly player?;
|
|
24
23
|
private readonly sideEffect;
|
|
@@ -39,7 +38,6 @@ export declare class SlideController {
|
|
|
39
38
|
private magixEventListener;
|
|
40
39
|
private syncStateOnce;
|
|
41
40
|
private onStateChange;
|
|
42
|
-
private onSeeked;
|
|
43
41
|
private pollCount;
|
|
44
42
|
private pollReadyState;
|
|
45
43
|
private _pageCount;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NetlessApp } from "@netless/window-manager";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Slide } from "@netless/slide";
|
|
3
|
+
import type { Attributes, MagixEvents } from "./typings";
|
|
3
4
|
import type { AddHooks, FreezableSlide } from "./utils/freezer";
|
|
4
5
|
import { DefaultUrl } from "./SlideController";
|
|
5
6
|
import { apps, FreezerLength, addHooks } from "./utils/freezer";
|
|
@@ -8,5 +9,18 @@ export { SlidePreviewer, default as previewSlide } from "./SlidePreviewer";
|
|
|
8
9
|
export type { Attributes, AddHooks, FreezableSlide };
|
|
9
10
|
export declare const version: string;
|
|
10
11
|
export { DefaultUrl, apps, FreezerLength, addHooks };
|
|
11
|
-
|
|
12
|
+
export interface AppOptions {
|
|
13
|
+
debug?: boolean;
|
|
14
|
+
resolution?: number;
|
|
15
|
+
bgColor?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface Controller {
|
|
18
|
+
slide: () => Slide | undefined;
|
|
19
|
+
position: () => [page: number, pageCount: number] | undefined;
|
|
20
|
+
nextStep: () => boolean;
|
|
21
|
+
prevStep: () => boolean;
|
|
22
|
+
nextPage: () => boolean;
|
|
23
|
+
prevPage: () => boolean;
|
|
24
|
+
}
|
|
25
|
+
declare const SlideApp: NetlessApp<Attributes, MagixEvents, AppOptions, Controller>;
|
|
12
26
|
export default SlideApp;
|