@netless/app-slide 0.2.59 → 0.2.60

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/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, 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);
30414
+ const { lineWidth: e2, lineHeight: i2, baseLine: n2, isHorz: r2, underline: o2, stroke: s2, height: a2, width: l2, highlightColor: h2, x: u2, y: c2, content: d2, fillLineHeight: p2, fill: f2 } = this.json;
30415
+ let m2 = this.json.needFill !== false;
30416
+ if (f2 && f2.fill && f2.fill.fillType !== "solidFill" && (m2 = true), h2) {
30417
+ const t3 = new Jd(), [n3, o3] = fg(h2);
30418
+ t3.beginFill(n3, o3), t3.drawRect(0, 0, r2 ? l2 : e2, r2 ? i2 : a2), 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 = u2 > 0 ? u2 : 0), f2) {
30422
+ if (r2 && (e3.position.y = c2 > 0 ? c2 : 0), m2) {
30423
30423
  const i3 = this.textFill.displayObject;
30424
30424
  if (i3)
30425
- i3.mask = e3, i3.addChild(e3), i3.position.x = -h2, e3.position.x += h2, t2 = true, this.textureContainer.addChild(i3);
30425
+ i3.mask = e3, i3.addChild(e3), i3.position.x = -u2, e3.position.x += u2, 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,17 +30432,19 @@ void main(void){
30432
30432
  }
30433
30433
  if (this.strokeGraphics.displayObject) {
30434
30434
  const e3 = this.strokeGraphics.displayObject;
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);
30435
+ if (m2) {
30436
+ const i4 = this.strokeFill.displayObject;
30437
+ if (i4)
30438
+ i4.mask = e3, i4.addChild(e3), r2 ? i4.position.y = c2 > 0 ? c2 : 0 : i4.position.x = u2, this.textureContainer.addChild(i4);
30439
30439
  else if (this.strokeFill.isSolidFill()) {
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);
30440
+ r2 ? e3.position.y = Math.max(c2, 0) : e3.position.x = u2;
30441
+ const i5 = new _g();
30442
+ i5.color = this.strokeFill.getSolidFillColor(), e3.filters = [i5], t2 = true, this.textureContainer.addChild(e3);
30443
30443
  }
30444
30444
  } else
30445
- r2 ? e3.position.y = u2 > 0 ? u2 : 0 : e3.position.x = h2, this.textureContainer.addChild(e3);
30445
+ r2 ? e3.position.y = c2 > 0 ? c2 : 0 : e3.position.x = u2, this.textureContainer.addChild(e3);
30446
+ const i3 = s2 && f2 ? (s2.width - (f2 == null ? void 0 : f2.width)) / 4 : 0;
30447
+ e3.position.x -= i3;
30446
30448
  }
30447
30449
  if (this.underline && (this.underline.render(), this.underline.sprite)) {
30448
30450
  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);
@@ -30450,11 +30452,11 @@ void main(void){
30450
30452
  t3 ? (t3.mask = this.underline.sprite, t3.addChild(this.underline.sprite), this.textureContainer.addChild(t3)) : this.textureContainer.addChild(this.underline.sprite);
30451
30453
  }
30452
30454
  if (t2) {
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);
30455
+ const t3 = Vh.p.create({ width: r2 ? l2 : e2, height: r2 ? Math.max(p2, i2) : a2, resolution: this.ctx.renderer.resolution });
30456
+ this.ctx.renderer.render(this.textureContainer, { renderTexture: t3 }), this.cacheSprite.texture = t3, r2 && c2 < 0 && (this.cacheSprite.position.y = c2), this.effectContainer.addChild(this.cacheSprite);
30455
30457
  } else
30456
30458
  this.effectContainer.addChild(this.textureContainer);
30457
- this.container.name = c2;
30459
+ this.container.name = d2;
30458
30460
  }
30459
30461
  destroy() {
30460
30462
  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();
@@ -36054,7 +36056,7 @@ void main(void){
36054
36056
  }
36055
36057
  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 = "";
36056
36058
  try {
36057
- gT = "1.4.7";
36059
+ gT = "1.4.8";
36058
36060
  } catch (t2) {
36059
36061
  gT = "dev";
36060
36062
  }
@@ -36459,7 +36461,7 @@ void main(void){
36459
36461
  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 });
36460
36462
  }, e2.prototype.setResourceList = function(t3, e3) {
36461
36463
  var i3;
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";
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 = "__internal__";
36463
36465
  }, e2.prototype._renderSlide = function(t3) {
36464
36466
  var e3;
36465
36467
  return hT(this, void 0, void 0, function() {
@@ -39260,7 +39262,7 @@ class SlidePreviewer {
39260
39262
  }
39261
39263
  }
39262
39264
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
39263
- const version = "0.2.59";
39265
+ const version = "0.2.60";
39264
39266
  const SlideApp = {
39265
39267
  kind: "Slide",
39266
39268
  setup(context) {