@netless/slide 1.4.32-alpha.0 → 1.4.32
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/lib/AliTrackLogger.js +1 -1
- package/lib/PlayerController.js +1 -1
- package/lib/RenderingTaskManager.js +2 -2
- package/lib/Slide.d.ts +10 -1
- package/lib/Slide.js +16 -16
- package/lib/Slide.js.map +1 -0
- package/lib/global.js +1 -1
- package/lib/typeGuard/SyncEvent.d.ts +10 -0
- package/lib/typeGuard/SyncEvent.js +27 -0
- package/package.json +2 -2
- package/lib/LocalFileSystem.d.ts +0 -0
- package/lib/LocalFileSystem.js +0 -1
- package/lib/StateDriveSlide.d.ts +0 -237
- package/lib/StateDriveSlide.js +0 -664
- package/lib/SyncEventQueue.d.ts +0 -13
- package/lib/SyncEventQueue.js +0 -83
- package/lib/Ticker.d.ts +0 -2
- package/lib/Ticker.js +0 -2
- package/lib/waitUntil.d.ts +0 -2
- package/lib/waitUntil.js +0 -56
package/lib/AliTrackLogger.js
CHANGED
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
package/lib/PlayerController.js
CHANGED
|
@@ -41,7 +41,7 @@ var PlayerConfig = /** @class */ (function () {
|
|
|
41
41
|
Object.defineProperty(PlayerConfig.prototype, "size", {
|
|
42
42
|
get: function () {
|
|
43
43
|
var _a, _b;
|
|
44
|
-
return ((_a = this.player.view) === null || _a === void 0 ? void 0 : _a.width
|
|
44
|
+
return "".concat((_a = this.player.view) === null || _a === void 0 ? void 0 : _a.width, "*").concat((_b = this.player.view) === null || _b === void 0 ? void 0 : _b.height);
|
|
45
45
|
},
|
|
46
46
|
set: function (_) { },
|
|
47
47
|
enumerable: false,
|
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
|
@@ -95,7 +95,7 @@ var RenderingTaskManager = /** @class */ (function () {
|
|
|
95
95
|
_this.tasks.splice(selfIndex, 1);
|
|
96
96
|
_this.replaceIdleTask();
|
|
97
97
|
}
|
|
98
|
-
_this.eventHub.emit("task-end-"
|
|
98
|
+
_this.eventHub.emit("task-end-".concat(task.id));
|
|
99
99
|
});
|
|
100
100
|
this.eventHub.on("task-error", function (_a) {
|
|
101
101
|
var task = _a.task;
|
package/lib/Slide.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ export declare const SLIDE_EVENTS: {
|
|
|
130
130
|
readonly slideStepEnd: "slideEnd";
|
|
131
131
|
/** ppt There is no previous action triggered. **/
|
|
132
132
|
readonly slideStepStart: "slideStart";
|
|
133
|
+
readonly useraddLink: "useraddLink";
|
|
133
134
|
};
|
|
134
135
|
export interface ISlideRenderOptions {
|
|
135
136
|
/** Minimum expected rendering fps, default is 40 */
|
|
@@ -180,6 +181,11 @@ export interface INavigatorDelegate {
|
|
|
180
181
|
gotoPage?: (index: number) => void;
|
|
181
182
|
openUrl?: (url: string) => void;
|
|
182
183
|
}
|
|
184
|
+
export interface CustomLink {
|
|
185
|
+
pageIndex: number;
|
|
186
|
+
shapeId: string;
|
|
187
|
+
link: string;
|
|
188
|
+
}
|
|
183
189
|
export interface ISlideConfig {
|
|
184
190
|
/** canvas mount dom */
|
|
185
191
|
anchor: HTMLDivElement;
|
|
@@ -200,7 +206,7 @@ export interface ISlideConfig {
|
|
|
200
206
|
* "sync" Synchronization mode, only one person can operate ppt
|
|
201
207
|
* "local" Local mode, no synchronization events will be triggered
|
|
202
208
|
*/
|
|
203
|
-
mode: "interactive" | "sync" | "local";
|
|
209
|
+
mode: "interactive" | "sync" | "local" | "addLink";
|
|
204
210
|
/**
|
|
205
211
|
* Whether to enable global clicking, after turning on, as long as you click within the ppt viewport range,
|
|
206
212
|
* and do not trigger interactive elements inside ppt, it will trigger the next action.
|
|
@@ -267,6 +273,7 @@ export interface ISlideConfig {
|
|
|
267
273
|
enableWebAudio?: boolean;
|
|
268
274
|
skipActionWhenFrozen?: boolean;
|
|
269
275
|
enableAutoForward?: boolean;
|
|
276
|
+
customLinks?: CustomLink[];
|
|
270
277
|
}
|
|
271
278
|
interface MediaState {
|
|
272
279
|
type: "pause" | "play";
|
|
@@ -379,6 +386,8 @@ export interface SlideEventEmitter {
|
|
|
379
386
|
on(event: typeof SLIDE_EVENTS.slideStepEnd, listener: () => void): this;
|
|
380
387
|
emit(event: typeof SLIDE_EVENTS.slideStepStart): boolean;
|
|
381
388
|
on(event: typeof SLIDE_EVENTS.slideStepStart, listener: () => void): this;
|
|
389
|
+
emit(event: typeof SLIDE_EVENTS.useraddLink, taskId: string, pageIndex: number, shapeId: string): void;
|
|
390
|
+
on(event: typeof SLIDE_EVENTS.useraddLink, listener: (taskId: string, pageIndex: number, shapeId: string) => void): this;
|
|
382
391
|
}
|
|
383
392
|
export declare type TrackerEvent = {
|
|
384
393
|
name: string;
|