@netless/app-slide 0.2.72-alpha.0 → 0.2.73
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 +16 -3
- package/dist/main.cjs.js +188 -188
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +444 -410
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +129 -129
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/SlideController/index.ts +2 -1
- package/src/SlideDocsViewer/index.ts +9 -0
- package/src/index.ts +11 -0
package/dist/index.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ declare const SLIDE_EVENTS: {
|
|
|
146
146
|
readonly slideStepEnd: "slideEnd";
|
|
147
147
|
/** ppt There is no previous action triggered. **/
|
|
148
148
|
readonly slideStepStart: "slideStart";
|
|
149
|
+
readonly useraddLink: "useraddLink";
|
|
149
150
|
};
|
|
150
151
|
interface ISlideRenderOptions {
|
|
151
152
|
/** Minimum expected rendering fps, default is 40 */
|
|
@@ -196,6 +197,11 @@ interface INavigatorDelegate {
|
|
|
196
197
|
gotoPage?: (index: number) => void;
|
|
197
198
|
openUrl?: (url: string) => void;
|
|
198
199
|
}
|
|
200
|
+
interface CustomLink {
|
|
201
|
+
pageIndex: number;
|
|
202
|
+
shapeId: string;
|
|
203
|
+
link: string;
|
|
204
|
+
}
|
|
199
205
|
interface ISlideConfig {
|
|
200
206
|
/** canvas mount dom */
|
|
201
207
|
anchor: HTMLDivElement;
|
|
@@ -216,7 +222,7 @@ interface ISlideConfig {
|
|
|
216
222
|
* "sync" Synchronization mode, only one person can operate ppt
|
|
217
223
|
* "local" Local mode, no synchronization events will be triggered
|
|
218
224
|
*/
|
|
219
|
-
mode: "interactive" | "sync" | "local";
|
|
225
|
+
mode: "interactive" | "sync" | "local" | "addLink";
|
|
220
226
|
/**
|
|
221
227
|
* Whether to enable global clicking, after turning on, as long as you click within the ppt viewport range,
|
|
222
228
|
* and do not trigger interactive elements inside ppt, it will trigger the next action.
|
|
@@ -283,6 +289,7 @@ interface ISlideConfig {
|
|
|
283
289
|
enableWebAudio?: boolean;
|
|
284
290
|
skipActionWhenFrozen?: boolean;
|
|
285
291
|
enableAutoForward?: boolean;
|
|
292
|
+
customLinks?: CustomLink[];
|
|
286
293
|
}
|
|
287
294
|
interface MediaState {
|
|
288
295
|
type: "pause" | "play";
|
|
@@ -395,6 +402,8 @@ interface SlideEventEmitter {
|
|
|
395
402
|
on(event: typeof SLIDE_EVENTS.slideStepEnd, listener: () => void): this;
|
|
396
403
|
emit(event: typeof SLIDE_EVENTS.slideStepStart): boolean;
|
|
397
404
|
on(event: typeof SLIDE_EVENTS.slideStepStart, listener: () => void): this;
|
|
405
|
+
emit(event: typeof SLIDE_EVENTS.useraddLink, taskId: string, pageIndex: number, shapeId: string): void;
|
|
406
|
+
on(event: typeof SLIDE_EVENTS.useraddLink, listener: (taskId: string, pageIndex: number, shapeId: string) => void): this;
|
|
398
407
|
}
|
|
399
408
|
declare type TrackerEvent = {
|
|
400
409
|
name: string;
|
|
@@ -429,7 +438,6 @@ declare class Slide extends Slide_base {
|
|
|
429
438
|
static volumeAdjuster: VolumeAdjuster;
|
|
430
439
|
private iosResetCache;
|
|
431
440
|
private iosNewPlayer?;
|
|
432
|
-
private needClearCacheImage;
|
|
433
441
|
private version?;
|
|
434
442
|
private __slideState;
|
|
435
443
|
private userInputTime;
|
|
@@ -980,10 +988,12 @@ declare class SlideDocsViewer {
|
|
|
980
988
|
private readonly baseScenePath;
|
|
981
989
|
private readonly appId;
|
|
982
990
|
private isViewMounted;
|
|
991
|
+
private justSildeReadonly;
|
|
983
992
|
constructor({ context, box, view, mountSlideController, mountWhiteboard, baseScenePath, appId, urlInterrupter, onPagesReady, onNavigate, }: SlideDocsViewerConfig);
|
|
984
993
|
$slide: HTMLDivElement;
|
|
985
994
|
$whiteboardView: HTMLDivElement;
|
|
986
995
|
$overlay: HTMLDivElement;
|
|
996
|
+
setJustSildeReadonly(justSildeReadonly: boolean): void;
|
|
987
997
|
render(): void;
|
|
988
998
|
protected renderOverlay(): HTMLDivElement;
|
|
989
999
|
protected renderSlideContainer(): HTMLDivElement;
|
|
@@ -1071,7 +1081,7 @@ declare class SlidePreviewer {
|
|
|
1071
1081
|
declare const usePlugin: (plugin: any) => any;
|
|
1072
1082
|
declare const version: string;
|
|
1073
1083
|
|
|
1074
|
-
interface AppOptions extends Pick<ISlideConfig, "rtcAudio" | "useLocalCache" | "resourceTimeout" | "loaderDelegate" | "urlInterrupter" | "navigatorDelegate" | "fixedFrameSize" | "logger" | "enableGlobalClick"> {
|
|
1084
|
+
interface AppOptions extends Pick<ISlideConfig, "rtcAudio" | "useLocalCache" | "resourceTimeout" | "loaderDelegate" | "urlInterrupter" | "navigatorDelegate" | "fixedFrameSize" | "logger" | "enableGlobalClick" | "customLinks"> {
|
|
1075
1085
|
/** show debug controller */
|
|
1076
1086
|
debug?: boolean;
|
|
1077
1087
|
/** scale */
|
|
@@ -1098,6 +1108,8 @@ interface AppOptions extends Pick<ISlideConfig, "rtcAudio" | "useLocalCache" | "
|
|
|
1098
1108
|
showRenderError?: boolean;
|
|
1099
1109
|
/** Specify the behavior after hiding the slide; Freeze will destroy the slide and replace it with a snapshot, while Pause simply pauses the slide @default: 'frozen' */
|
|
1100
1110
|
invisibleBehavior?: "frozen" | "pause";
|
|
1111
|
+
/** just readonly, no operate silder */
|
|
1112
|
+
justSildeReadonly?: true;
|
|
1101
1113
|
}
|
|
1102
1114
|
interface ILogger {
|
|
1103
1115
|
info?(msg: string): void;
|
|
@@ -1114,6 +1126,7 @@ interface AppResult {
|
|
|
1114
1126
|
nextPage: () => boolean;
|
|
1115
1127
|
prevPage: () => boolean;
|
|
1116
1128
|
jumpToPage: (page: number) => boolean;
|
|
1129
|
+
setSildeReadonly: (bol: boolean) => void;
|
|
1117
1130
|
}
|
|
1118
1131
|
declare const SlideApp: NetlessApp<Attributes, MagixEvents, AppOptions, AppResult>;
|
|
1119
1132
|
|