@netless/app-slide 0.2.60 → 0.2.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-zh.md +1 -1
- package/README.md +3 -3
- package/dist/main.cjs.js +62 -62
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +27 -23
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +63 -63
- package/dist/main.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/SlideController/index.ts +5 -0
- package/src/SlideDocsViewer/index.ts +4 -1
package/dist/main.es.js
CHANGED
|
@@ -30411,18 +30411,18 @@ void main(void){
|
|
|
30411
30411
|
}
|
|
30412
30412
|
doRender() {
|
|
30413
30413
|
let t2 = false;
|
|
30414
|
-
const { lineWidth: e2, lineHeight: i2, baseLine: n2, isHorz: r2, underline: o2,
|
|
30415
|
-
let
|
|
30416
|
-
if (
|
|
30417
|
-
const t3 = new Jd(), [n3, o3] = fg(
|
|
30418
|
-
t3.beginFill(n3, o3), t3.drawRect(0, 0, r2 ?
|
|
30414
|
+
const { lineWidth: e2, lineHeight: i2, baseLine: n2, isHorz: r2, underline: o2, height: s2, width: a2, highlightColor: l2, x: h2, y: u2, content: c2, fillLineHeight: d2, fill: p2 } = this.json;
|
|
30415
|
+
let f2 = this.json.needFill !== false;
|
|
30416
|
+
if (p2 && p2.fill && p2.fill.fillType !== "solidFill" && (f2 = true), l2) {
|
|
30417
|
+
const t3 = new Jd(), [n3, o3] = fg(l2);
|
|
30418
|
+
t3.beginFill(n3, o3), t3.drawRect(0, 0, r2 ? a2 : e2, r2 ? i2 : s2), t3.endFill(), this.textureContainer.addChild(t3);
|
|
30419
30419
|
}
|
|
30420
30420
|
if (this.textGraphics.displayObject) {
|
|
30421
30421
|
const e3 = this.textGraphics.displayObject;
|
|
30422
|
-
if (r2 && (e3.position.y =
|
|
30422
|
+
if (r2 && (e3.position.y = u2 > 0 ? u2 : 0), f2) {
|
|
30423
30423
|
const i3 = this.textFill.displayObject;
|
|
30424
30424
|
if (i3)
|
|
30425
|
-
i3.mask = e3, i3.addChild(e3), i3.position.x = -
|
|
30425
|
+
i3.mask = e3, i3.addChild(e3), i3.position.x = -h2, e3.position.x += h2, t2 = true, this.textureContainer.addChild(i3);
|
|
30426
30426
|
else if (this.textFill.isSolidFill()) {
|
|
30427
30427
|
const i4 = new _g();
|
|
30428
30428
|
i4.color = this.textFill.getSolidFillColor(), e3.filters = [i4], t2 = true, this.textureContainer.addChild(e3);
|
|
@@ -30432,19 +30432,17 @@ void main(void){
|
|
|
30432
30432
|
}
|
|
30433
30433
|
if (this.strokeGraphics.displayObject) {
|
|
30434
30434
|
const e3 = this.strokeGraphics.displayObject;
|
|
30435
|
-
if (
|
|
30436
|
-
const
|
|
30437
|
-
if (
|
|
30438
|
-
|
|
30435
|
+
if (f2) {
|
|
30436
|
+
const i3 = this.strokeFill.displayObject;
|
|
30437
|
+
if (i3)
|
|
30438
|
+
i3.mask = e3, i3.addChild(e3), r2 ? i3.position.y = u2 > 0 ? u2 : 0 : i3.position.x = h2, this.textureContainer.addChild(i3);
|
|
30439
30439
|
else if (this.strokeFill.isSolidFill()) {
|
|
30440
|
-
r2 ? e3.position.y =
|
|
30441
|
-
const
|
|
30442
|
-
|
|
30440
|
+
r2 ? e3.position.y = u2 > 0 ? u2 : 0 : e3.position.x = h2;
|
|
30441
|
+
const i4 = new _g();
|
|
30442
|
+
i4.color = this.strokeFill.getSolidFillColor(), e3.filters = [i4], t2 = true, this.textureContainer.addChild(e3);
|
|
30443
30443
|
}
|
|
30444
30444
|
} else
|
|
30445
|
-
r2 ? e3.position.y =
|
|
30446
|
-
const i3 = s2 && f2 ? (s2.width - (f2 == null ? void 0 : f2.width)) / 4 : 0;
|
|
30447
|
-
e3.position.x -= i3;
|
|
30445
|
+
r2 ? e3.position.y = u2 > 0 ? u2 : 0 : e3.position.x = h2, this.textureContainer.addChild(e3);
|
|
30448
30446
|
}
|
|
30449
30447
|
if (this.underline && (this.underline.render(), this.underline.sprite)) {
|
|
30450
30448
|
r2 ? (this.underline.sprite.position.y = o2 ? o2 - i2 / 16 : n2, this.underline.sprite.position.x = 0) : (this.underline.sprite.position.x = 0, this.underline.sprite.position.y = 0);
|
|
@@ -30452,11 +30450,11 @@ void main(void){
|
|
|
30452
30450
|
t3 ? (t3.mask = this.underline.sprite, t3.addChild(this.underline.sprite), this.textureContainer.addChild(t3)) : this.textureContainer.addChild(this.underline.sprite);
|
|
30453
30451
|
}
|
|
30454
30452
|
if (t2) {
|
|
30455
|
-
const t3 = Vh.p.create({ width: r2 ?
|
|
30456
|
-
this.ctx.renderer.render(this.textureContainer, { renderTexture: t3 }), this.cacheSprite.texture = t3, r2 &&
|
|
30453
|
+
const t3 = Vh.p.create({ width: r2 ? a2 : e2, height: r2 ? Math.max(d2, i2) : s2, resolution: this.ctx.renderer.resolution });
|
|
30454
|
+
this.ctx.renderer.render(this.textureContainer, { renderTexture: t3 }), this.cacheSprite.texture = t3, r2 && u2 < 0 && (this.cacheSprite.position.y = u2), this.effectContainer.addChild(this.cacheSprite);
|
|
30457
30455
|
} else
|
|
30458
30456
|
this.effectContainer.addChild(this.textureContainer);
|
|
30459
|
-
this.container.name =
|
|
30457
|
+
this.container.name = c2;
|
|
30460
30458
|
}
|
|
30461
30459
|
destroy() {
|
|
30462
30460
|
this.textFill.destroy(), this.textGraphics.destroy(), this.strokeFill.destroy(), this.strokeGraphics.destroy(), this.cacheSprite.texture.destroy(true), this.cacheSprite.destroy(), this.textureContainer.destroy(), this.container.destroy();
|
|
@@ -36056,7 +36054,7 @@ void main(void){
|
|
|
36056
36054
|
}
|
|
36057
36055
|
var fT = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart" }, mT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, gT = "";
|
|
36058
36056
|
try {
|
|
36059
|
-
gT = "1.4.
|
|
36057
|
+
gT = "1.4.7";
|
|
36060
36058
|
} catch (t2) {
|
|
36061
36059
|
gT = "dev";
|
|
36062
36060
|
}
|
|
@@ -36461,7 +36459,7 @@ void main(void){
|
|
|
36461
36459
|
this.taskId = t3, (i3 = this.player) === null || i3 === void 0 || i3.setResourceData(t3, e3), this.__slideState.taskId = t3, this.__slideState.url = e3, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t3, url: e3 });
|
|
36462
36460
|
}, e2.prototype.setResourceList = function(t3, e3) {
|
|
36463
36461
|
var i3;
|
|
36464
|
-
this.taskId = t3, this.resourceList = e3, (i3 = this.player) === null || i3 === void 0 || i3.setResourceData(t3, "__internal__"), this.__slideState.taskId = t3, this.__slideState.url = "
|
|
36462
|
+
this.taskId = t3, this.resourceList = e3, (i3 = this.player) === null || i3 === void 0 || i3.setResourceData(t3, "__internal__"), this.__slideState.taskId = t3, this.__slideState.url = "__internal";
|
|
36465
36463
|
}, e2.prototype._renderSlide = function(t3) {
|
|
36466
36464
|
var e3;
|
|
36467
36465
|
return hT(this, void 0, void 0, function() {
|
|
@@ -37529,6 +37527,7 @@ class SlideController {
|
|
|
37529
37527
|
}
|
|
37530
37528
|
};
|
|
37531
37529
|
this.unfreeze = async () => {
|
|
37530
|
+
var _a;
|
|
37532
37531
|
if (!this.visible)
|
|
37533
37532
|
return;
|
|
37534
37533
|
this.isFrozen = false;
|
|
@@ -37539,6 +37538,11 @@ class SlideController {
|
|
|
37539
37538
|
} else {
|
|
37540
37539
|
this.slide.resume();
|
|
37541
37540
|
}
|
|
37541
|
+
const currentSlideIndex = (_a = this.context.storage.state.state) == null ? void 0 : _a.currentSlideIndex;
|
|
37542
|
+
if (currentSlideIndex) {
|
|
37543
|
+
log("[Slide] sync storage", currentSlideIndex);
|
|
37544
|
+
this.slide.setSlideState({ currentSlideIndex });
|
|
37545
|
+
}
|
|
37542
37546
|
} else {
|
|
37543
37547
|
this._toFreeze = -1;
|
|
37544
37548
|
}
|
|
@@ -39262,7 +39266,7 @@ class SlidePreviewer {
|
|
|
39262
39266
|
}
|
|
39263
39267
|
}
|
|
39264
39268
|
const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
|
|
39265
|
-
const version = "0.2.
|
|
39269
|
+
const version = "0.2.61";
|
|
39266
39270
|
const SlideApp = {
|
|
39267
39271
|
kind: "Slide",
|
|
39268
39272
|
setup(context) {
|