@netless/appliance-plugin 1.1.38-beta.1 → 1.1.38-beta.2

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.
@@ -1,7 +1,7 @@
1
1
  var jo = Object.defineProperty;
2
2
  var Eo = (o, n, e) => n in o ? jo(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
3
3
  var m = (o, n, e) => Eo(o, typeof n != "symbol" ? n + "" : n, e);
4
- import { g as zo, P as Lo } from "./bridge-8hheCrpO.mjs";
4
+ import { g as zo, P as Lo } from "./bridge-DriJmXUc.mjs";
5
5
  import "spritejs";
6
6
  import { compress as Po, decompress as Ro } from "lz-string";
7
7
  import "clipper-lib";
@@ -1141,7 +1141,7 @@ function hf(o) {
1141
1141
  return cf(o, lf | uf);
1142
1142
  }
1143
1143
  var df = hf;
1144
- const Dn = /* @__PURE__ */ fr(df), lo = "1.1.38-beta.1", gf = "@netless/appliance-plugin", hi = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1144
+ const Dn = /* @__PURE__ */ fr(df), lo = "1.1.38-beta.2", gf = "@netless/appliance-plugin", hi = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1145
1145
  if (typeof window < "u") {
1146
1146
  let o = window.__netlessUA || "";
1147
1147
  o += ` ${gf}@${lo}`, window.__netlessUA = o;
@@ -6509,12 +6509,12 @@ class em extends _y {
6509
6509
  }
6510
6510
  async useBackgroundThread() {
6511
6511
  this.Logger.info("[Appliance]: use background thread");
6512
- const { BackgroundThreadManagerImpl: e } = await import("./index-BULYNDpO.mjs");
6512
+ const { BackgroundThreadManagerImpl: e } = await import("./index-yvXpy4Qn.mjs");
6513
6513
  this.backgroundThreadManager = new e(this);
6514
6514
  }
6515
6515
  async useMainThread() {
6516
6516
  this.Logger.info("[Appliance]: no OffscreenCanvas");
6517
- const { MainThreadManagerImpl: e } = await import("./index-cAAZZmgn.mjs");
6517
+ const { MainThreadManagerImpl: e } = await import("./index-DJnJIbsl.mjs");
6518
6518
  this.mainThread = new e(this);
6519
6519
  }
6520
6520
  async on() {
@@ -7824,34 +7824,28 @@ class em extends _y {
7824
7824
  }
7825
7825
  }
7826
7826
  post(e) {
7827
- const t = [...e].filter(
7828
- (r) => r.msgType !== B.CursorHover
7829
- );
7830
- if (t.length && console.log(
7831
- "post===>",
7832
- t.map((r) => ({ msgType: r.msgType, toolsType: r == null ? void 0 : r.toolsType }))
7833
- ), this.control.isUseBackgroundThread) {
7827
+ if (this.control.isUseBackgroundThread) {
7834
7828
  if (!this.backgroundThreadManager) {
7835
- let i = [];
7836
- i = ce([...e]), setTimeout(() => {
7837
- for (const s of i)
7838
- this.taskBatchData.add(s);
7829
+ let r = [];
7830
+ r = ce([...e]), setTimeout(() => {
7831
+ for (const i of r)
7832
+ this.taskBatchData.add(i);
7839
7833
  }, 0);
7840
7834
  return;
7841
7835
  }
7842
- const r = /* @__PURE__ */ new Set();
7843
- for (const i of e.values()) {
7844
- const s = i.msgType;
7845
- (s === B.Init || s === B.Clear || s === B.Destroy || s === B.Console || i.isRunBackgroundThread) && r.add(i);
7836
+ const t = /* @__PURE__ */ new Set();
7837
+ for (const r of e.values()) {
7838
+ const i = r.msgType;
7839
+ (i === B.Init || i === B.Clear || i === B.Destroy || i === B.Console || r.isRunBackgroundThread) && t.add(r);
7846
7840
  }
7847
- r.size && this.backgroundThreadManager.consume(r);
7841
+ t.size && this.backgroundThreadManager.consume(t);
7848
7842
  }
7849
7843
  if (!this.control.hasOffscreenCanvas) {
7850
7844
  if (!this.mainThread) {
7851
- let r = [];
7852
- r = ce([...e]), setTimeout(() => {
7853
- for (const i of r)
7854
- this.taskBatchData.add(i);
7845
+ let t = [];
7846
+ t = ce([...e]), setTimeout(() => {
7847
+ for (const r of t)
7848
+ this.taskBatchData.add(r);
7855
7849
  }, 0);
7856
7850
  return;
7857
7851
  }
@@ -1,7 +1,7 @@
1
1
  var _t = Object.defineProperty;
2
2
  var qt = (T, i, e) => i in T ? _t(T, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[i] = e;
3
3
  var y = (T, i, e) => qt(T, typeof i != "symbol" ? i + "" : i, e);
4
- import { e as Je, i as et, _ as Pt, p as Se, f as Te, D as J, h as F, j as Re, k as qe, l as se, P as E, m as W, c as k, s as Ve, n as tt, o as Ne, q as st, r as Vt, t as Ht, u as Me, v as z, a as w, b as x, w as O, x as G, y as ee, z as $, A as Ze, B as jt, C as Zt, F as Kt, G as Qt, H as Jt, I as es, J as ts, K as ss, L as X, M as os, N as ht, O as We, Q as Wt, T as Be, R as ye, U as is, W as Lt, X as rs, Y as ns, Z as ce, $ as q, a0 as ue, a1 as as, a2 as cs, a3 as ls, a4 as hs, a5 as be, a6 as ps, E as Y, a7 as pt, V as dt, S as ds } from "./index-BkG3emHj.mjs";
4
+ import { e as Je, i as et, _ as Pt, p as Se, f as Te, D as J, h as F, j as Re, k as qe, l as se, P as E, m as W, c as k, s as Ve, n as tt, o as Ne, q as st, r as Vt, t as Ht, u as Me, v as z, a as w, b as x, w as O, x as G, y as ee, z as $, A as Ze, B as jt, C as Zt, F as Kt, G as Qt, H as Jt, I as es, J as ts, K as ss, L as X, M as os, N as ht, O as We, Q as Wt, T as Be, R as ye, U as is, W as Lt, X as rs, Y as ns, Z as ce, $ as q, a0 as ue, a1 as as, a2 as cs, a3 as ls, a4 as hs, a5 as be, a6 as ps, E as Y, a7 as pt, V as dt, S as ds } from "./index-CnJJTu0m.mjs";
5
5
  import { Group as Z, Path as we, Sprite as Ct, Rect as Ke, Polyline as he, Ellipse as us, Label as fs, Scene as ot, Layer as ms } from "spritejs";
6
6
  import ie from "clipper-lib";
7
7
  import it from "lineclip";