@netless/app-slide 0.2.56 → 0.2.57
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 +5 -1
- package/dist/main.cjs.js +47 -47
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +16 -5
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +47 -47
- package/dist/main.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/SlideController/index.ts +15 -2
- package/src/index.ts +3 -0
package/dist/main.es.js
CHANGED
|
@@ -37399,7 +37399,8 @@ class SlideController {
|
|
|
37399
37399
|
onNavigate,
|
|
37400
37400
|
onError,
|
|
37401
37401
|
onRenderError,
|
|
37402
|
-
showRenderError
|
|
37402
|
+
showRenderError,
|
|
37403
|
+
invisibleBehavior
|
|
37403
37404
|
}) {
|
|
37404
37405
|
this.sideEffect = new SideEffectManager();
|
|
37405
37406
|
this.ready = false;
|
|
@@ -37472,7 +37473,11 @@ class SlideController {
|
|
|
37472
37473
|
this.isFrozen = true;
|
|
37473
37474
|
if (this.ready) {
|
|
37474
37475
|
log("[Slide] freeze", this.context.appId);
|
|
37475
|
-
this.
|
|
37476
|
+
if (this.invisibleBehavior === "frozen") {
|
|
37477
|
+
this.slide.frozen();
|
|
37478
|
+
} else {
|
|
37479
|
+
this.slide.pause();
|
|
37480
|
+
}
|
|
37476
37481
|
} else {
|
|
37477
37482
|
this._toFreeze = 1;
|
|
37478
37483
|
}
|
|
@@ -37483,7 +37488,11 @@ class SlideController {
|
|
|
37483
37488
|
this.isFrozen = false;
|
|
37484
37489
|
if (this.ready) {
|
|
37485
37490
|
log("[Slide] unfreeze", this.context.appId);
|
|
37486
|
-
this.
|
|
37491
|
+
if (this.invisibleBehavior === "frozen") {
|
|
37492
|
+
this.slide.release();
|
|
37493
|
+
} else {
|
|
37494
|
+
this.slide.resume();
|
|
37495
|
+
}
|
|
37487
37496
|
} else {
|
|
37488
37497
|
this._toFreeze = -1;
|
|
37489
37498
|
}
|
|
@@ -37500,6 +37509,7 @@ class SlideController {
|
|
|
37500
37509
|
}
|
|
37501
37510
|
}
|
|
37502
37511
|
};
|
|
37512
|
+
this.invisibleBehavior = invisibleBehavior != null ? invisibleBehavior : "frozen";
|
|
37503
37513
|
this.onRenderStart = onRenderStart;
|
|
37504
37514
|
this.onPageChanged = onPageChanged;
|
|
37505
37515
|
this.onTransitionStart = onTransitionStart;
|
|
@@ -39194,7 +39204,7 @@ class SlidePreviewer {
|
|
|
39194
39204
|
}
|
|
39195
39205
|
}
|
|
39196
39206
|
const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
|
|
39197
|
-
const version = "0.2.
|
|
39207
|
+
const version = "0.2.57";
|
|
39198
39208
|
const SlideApp = {
|
|
39199
39209
|
kind: "Slide",
|
|
39200
39210
|
setup(context) {
|
|
@@ -39245,7 +39255,8 @@ const SlideApp = {
|
|
|
39245
39255
|
onPageChanged,
|
|
39246
39256
|
onNavigate: options.onNavigate,
|
|
39247
39257
|
onRenderError: appOptions.onRenderError,
|
|
39248
|
-
showRenderError: appOptions.showRenderError
|
|
39258
|
+
showRenderError: appOptions.showRenderError,
|
|
39259
|
+
invisibleBehavior: appOptions.invisibleBehavior
|
|
39249
39260
|
}));
|
|
39250
39261
|
if (useFreezer)
|
|
39251
39262
|
apps.set(context.appId, slideController, box);
|