@netless/appliance-plugin 1.1.30 → 1.1.31

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.
@@ -1142,7 +1142,7 @@ function dg(r) {
1142
1142
  return lg(r, ug | hg);
1143
1143
  }
1144
1144
  var gg = dg;
1145
- const un = /* @__PURE__ */ Pn(gg), vr = "1.1.30", fg = "@netless/appliance-plugin", ji = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1145
+ const un = /* @__PURE__ */ Pn(gg), vr = "1.1.31", fg = "@netless/appliance-plugin", ji = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1146
1146
  if (typeof window < "u") {
1147
1147
  let r = window.__netlessUA || "";
1148
1148
  r += ` ${fg}@${vr}`, window.__netlessUA = r;
@@ -1205,7 +1205,7 @@ const Se = {
1205
1205
  },
1206
1206
  markmap: {
1207
1207
  enable: !0,
1208
- timeout: 2e4,
1208
+ timeout: 1e4,
1209
1209
  options: {
1210
1210
  autoFit: !0,
1211
1211
  duration: 0,
@@ -5033,7 +5033,7 @@ class tp extends ep {
5033
5033
  }
5034
5034
  async useBackgroundThread() {
5035
5035
  console.info("use background thread");
5036
- const { BackgroundThreadManagerImpl: e } = await import("./index-DsHBXq5c.mjs");
5036
+ const { BackgroundThreadManagerImpl: e } = await import("./index-CpRTvTdJ.mjs");
5037
5037
  this.backgroundThreadManager = new e(this);
5038
5038
  }
5039
5039
  async useMainThread() {
@@ -5042,7 +5042,7 @@ class tp extends ep {
5042
5042
  "set font faces in main thread success"
5043
5043
  );
5044
5044
  });
5045
- const { MainThreadManagerImpl: e } = await import("./index-GAInlqSm.mjs");
5045
+ const { MainThreadManagerImpl: e } = await import("./index-MwM-TUUF.mjs");
5046
5046
  this.mainThread = new e(this);
5047
5047
  }
5048
5048
  async on() {
@@ -5521,11 +5521,11 @@ class tp extends ep {
5521
5521
  isSync: p,
5522
5522
  viewId: f,
5523
5523
  scenePath: v
5524
- }), k && w === T.BackgroundSVG && h && this.markmapIdResolveMap.has(h.toString())) {
5524
+ }), console.log("markmapIdResolveMap====>FullWork===>000", h, w, k), w === T.BackgroundSVG && h && (console.log("markmapIdResolveMap====>FullWork", h), this.markmapIdResolveMap.has(h.toString()))) {
5525
5525
  const z = this.markmapIdResolveMap.get(
5526
5526
  h.toString()
5527
5527
  );
5528
- z != null && z.timer && (clearTimeout(z.timer), z.timer = void 0), z != null && z.resolve && z.resolve(h.toString()), this.markmapIdResolveMap.delete(h.toString());
5528
+ z != null && z.timer && (clearTimeout(z.timer), z.timer = void 0, console.log("markmapIdResolveMap====>clearTimeout", h.toString())), z != null && z.resolve && (z.resolve(h.toString()), console.log("markmapIdResolveMap====>resolve", h.toString())), console.log("markmapIdResolveMap====>delete", h.toString()), this.markmapIdResolveMap.delete(h.toString());
5529
5529
  }
5530
5530
  this.willSelectorWorkId && h && h.toString() === this.willSelectorWorkId && this.control.runEffectWork(() => {
5531
5531
  this.setShapeSelectorByWorkId(
@@ -6538,46 +6538,47 @@ class tp extends ep {
6538
6538
  throw new Error("data must be markdown string");
6539
6539
  const o = i == null ? void 0 : i.focusScenePath;
6540
6540
  if (e && o) {
6541
- if ((s = this.collector) != null && s.hasId(e, o, t.uuid))
6541
+ const a = t.uuid.toString();
6542
+ if ((s = this.collector) != null && s.hasId(e, o, a))
6542
6543
  throw new Error(
6543
6544
  "instertBackgroundMarkMap svgInfo.uuid is already exist"
6544
6545
  );
6545
- if (this.markmapIdResolveMap.has(t.uuid))
6546
+ if (this.markmapIdResolveMap.has(a))
6546
6547
  throw new Error(
6547
6548
  "instertBackgroundMarkMap svgInfo.uuid is already resolving"
6548
6549
  );
6549
- const a = this.now;
6550
+ const c = this.now;
6550
6551
  ke.InternalMsgEmitter.emit(
6551
6552
  "addUndoTicker",
6552
- a,
6553
+ c,
6553
6554
  e
6554
6555
  );
6555
- const c = { ...t, type: $t.markmap };
6556
- return this.zIndexNodeMethod && (this.zIndexNodeMethod.addMaxLayerForBackgroundSVG(e), c.zIndex = this.zIndexNodeMethod.getMaxZIndexForBackgroundSVG(e)), this.taskBatchData.add({
6556
+ const l = { ...t, type: $t.markmap };
6557
+ return this.zIndexNodeMethod && (this.zIndexNodeMethod.addMaxLayerForBackgroundSVG(e), l.zIndex = this.zIndexNodeMethod.getMaxZIndexForBackgroundSVG(e)), this.taskBatchData.add({
6557
6558
  msgType: R.FullWork,
6558
6559
  dataType: q.Local,
6559
6560
  toolsType: T.BackgroundSVG,
6560
- workId: t.uuid,
6561
- opt: c,
6561
+ workId: a,
6562
+ opt: l,
6562
6563
  viewId: e,
6563
6564
  willRefresh: !0,
6564
6565
  willSyncService: !0,
6565
- needUndoTicker: a,
6566
+ needUndoTicker: c,
6566
6567
  isRunBackgroundThread: !0
6567
- }), this.runAnimation(), new Promise((l, h) => {
6568
- this.markmapIdResolveMap.set(t.uuid, {
6569
- resolve: l,
6568
+ }), this.runAnimation(), new Promise((h, u) => {
6569
+ this.markmapIdResolveMap.set(a, {
6570
+ resolve: h,
6570
6571
  timer: setTimeout(() => {
6571
- const u = this.markmapIdResolveMap.get(t.uuid);
6572
- u != null && u.timer && (u.timer = void 0), h(t.uuid);
6572
+ const g = this.markmapIdResolveMap.get(a);
6573
+ g != null && g.timer && (g.timer = void 0), console.log("markmapIdResolveMap====>timeout", a), u(a);
6573
6574
  }, this.control.pluginOptions.extras.markmap.timeout)
6574
- });
6575
- }).then((l) => {
6576
- if (l)
6577
- return this.markmapIdResolveMap.delete(t.uuid), l;
6578
- }).catch((l) => {
6579
- throw this.markmapIdResolveMap.delete(l), new Error(
6580
- `instertBackgroundMarkMap svgInfo.uuid ${t.uuid} insert timeout`
6575
+ }), console.log("markmapIdResolveMap====>set", a);
6576
+ }).then((h) => {
6577
+ if (console.log("markmapIdResolveMap====>then", h), h)
6578
+ return this.markmapIdResolveMap.delete(h), h;
6579
+ }).catch((h) => {
6580
+ throw console.log("markmapIdResolveMap====>error", h), this.markmapIdResolveMap.delete(h), new Error(
6581
+ `instertBackgroundMarkMap svgInfo.uuid ${h} insert timeout`
6581
6582
  );
6582
6583
  });
6583
6584
  }
@@ -13352,7 +13353,19 @@ class qn extends m.Component {
13352
13353
  className: De.SnapshotBox,
13353
13354
  ref: this.props.refs.snapshotContainerRef
13354
13355
  }
13355
- ) || null, /* @__PURE__ */ m.createElement(
13356
+ ) || null, this.props.mananger.control.isUseBackgroundThread && !!this.props.refs.backgroundContainerRef && /* @__PURE__ */ m.createElement("div", { className: De.BackgroundBox }, /* @__PURE__ */ m.createElement(
13357
+ "div",
13358
+ {
13359
+ className: De.BackgroundSvgBox,
13360
+ ref: this.props.refs.backgroundContainerRef
13361
+ }
13362
+ ), !!this.props.refs.backgroundSnapshotContainerRef && /* @__PURE__ */ m.createElement("div", { className: De.BackgroundSnapshotBox }, /* @__PURE__ */ m.createElement(
13363
+ "div",
13364
+ {
13365
+ className: De.BackgroundSnapshotContent,
13366
+ ref: this.props.refs.backgroundSnapshotContainerRef
13367
+ }
13368
+ ))) || null, /* @__PURE__ */ m.createElement(
13356
13369
  Te.Provider,
13357
13370
  {
13358
13371
  value: {
@@ -13403,19 +13416,7 @@ class qn extends m.Component {
13403
13416
  active: this.state.activeMiniMapViewId,
13404
13417
  miniMapManager: this.props.mananger.control.miniMapManager
13405
13418
  }
13406
- ), this.props.mananger.control.isUseBackgroundThread && !!this.props.refs.backgroundContainerRef && /* @__PURE__ */ m.createElement("div", { className: De.BackgroundBox }, /* @__PURE__ */ m.createElement(
13407
- "div",
13408
- {
13409
- className: De.BackgroundSvgBox,
13410
- ref: this.props.refs.backgroundContainerRef
13411
- }
13412
- ), !!this.props.refs.backgroundSnapshotContainerRef && /* @__PURE__ */ m.createElement("div", { className: De.BackgroundSnapshotBox }, /* @__PURE__ */ m.createElement(
13413
- "div",
13414
- {
13415
- className: De.BackgroundSnapshotContent,
13416
- ref: this.props.refs.backgroundSnapshotContainerRef
13417
- }
13418
- ))) || null);
13419
+ ));
13419
13420
  }
13420
13421
  }
13421
13422
  class vy extends br {