@netless/slide 1.4.61-beta.0 → 1.4.61

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/README.md CHANGED
@@ -4,6 +4,12 @@
4
4
 
5
5
  ## changelog
6
6
 
7
+ ### 1.4.61 (2026-09-23)
8
+ * 修复部分 PPT 中点击元素无法触发动画的问题
9
+ * 修复重复触发条件导致动画重复推进的问题
10
+ * 修复 PPT 冻结、恢复和销毁并发执行时的时序问题
11
+ * `frozen()`、`release()`、`destroy()` 支持返回 Promise,便于等待操作完成
12
+
7
13
  ### 1.4.60 (2026-09-21)
8
14
  * 新增 PPT 媒体权限回调和点击恢复接口:`onPptMediaPermissionRequest(callback)`、`playPptMedia()`
9
15
  * 修复部分移动浏览器中 PPT 音视频无法自动播放或恢复的问题
@@ -11,7 +11,6 @@ export declare class FrozenTaskManager {
11
11
  private isDestroy;
12
12
  private runningTask?;
13
13
  private schedule;
14
- private getRunningTask;
15
14
  addTask(type: "frozen" | "release", fn: () => Promise<void>): Promise<void>;
16
15
  destroy(): Promise<void>;
17
16
  }
@@ -23,21 +23,16 @@ var FrozenTaskManager = /** @class */ (function () {
23
23
  });
24
24
  };
25
25
  }
26
- FrozenTaskManager.prototype.getRunningTask = function () {
27
- var _a;
28
- return (_a = this.runningTask) !== null && _a !== void 0 ? _a : null;
29
- };
30
26
  FrozenTaskManager.prototype.addTask = function (type, fn) {
27
+ var _a;
31
28
  if (this.isDestroy) {
32
29
  return Promise.resolve();
33
30
  }
34
- var runningTask = this.getRunningTask();
35
- if (runningTask && type === runningTask.type) {
36
- return runningTask.promise;
37
- }
38
- var queuedTask = this.tasks.find(function (task) { return task.type === type; });
39
- if (queuedTask) {
40
- return queuedTask.promise;
31
+ // Only consecutive requests may share a task. An opposite queued
32
+ // request separates a new intent from the running task of the same type.
33
+ var lastTask = (_a = this.tasks[this.tasks.length - 1]) !== null && _a !== void 0 ? _a : this.runningTask;
34
+ if ((lastTask === null || lastTask === void 0 ? void 0 : lastTask.type) === type) {
35
+ return lastTask.promise;
41
36
  }
42
37
  var resolveTask;
43
38
  var rejectTask;