@netless/appliance-plugin 1.1.22 → 1.1.24

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 sg(o) {
1142
1142
  return ng(o, og | rg);
1143
1143
  }
1144
1144
  var ag = sg;
1145
- const ri = /* @__PURE__ */ Di(ag), yo = "1.1.22", cg = "@netless/appliance-plugin", Tn = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1145
+ const ri = /* @__PURE__ */ Di(ag), yo = "1.1.24", cg = "@netless/appliance-plugin", Tn = typeof OffscreenCanvas == "function" ? "worker" : "mainThread";
1146
1146
  if (typeof window < "u") {
1147
1147
  let o = window.__netlessUA || "";
1148
1148
  o += ` ${cg}@${yo}`, window.__netlessUA = o;
@@ -1642,11 +1642,22 @@ class Jg {
1642
1642
  ));
1643
1643
  }
1644
1644
  unActive(i) {
1645
+ var t;
1645
1646
  const e = this.editors.get(i);
1646
- e && e.viewId && (e.opt.workState = x.Done, e.opt.uid = void 0, e.canWorker = !0, e.canSync = !0, this.editors.set(i, e), this.activeId = void 0, this.control.viewContainerManager.updateTextEditorInfo(
1647
- e.viewId,
1648
- this.activeId
1649
- ));
1647
+ if (e && e.viewId) {
1648
+ e.opt.workState = x.Done, e.opt.uid = void 0, e.canWorker = !0, e.canSync = !0, this.editors.set(i, e), this.activeId = void 0;
1649
+ const n = (t = this.control.viewContainerManager.getView(
1650
+ e.viewId
1651
+ )) == null ? void 0 : t.container;
1652
+ if (n) {
1653
+ const r = CSS.escape(i), s = n.querySelector(`.editor-box #${r}`);
1654
+ s && s.blur();
1655
+ }
1656
+ this.control.viewContainerManager.updateTextEditorInfo(
1657
+ e.viewId,
1658
+ this.activeId
1659
+ );
1660
+ }
1650
1661
  }
1651
1662
  createTextForMasterController(i, e) {
1652
1663
  var s;
@@ -2309,7 +2320,10 @@ const Fe = class Fe extends kf {
2309
2320
  ));
2310
2321
  }
2311
2322
  }
2312
- Object.keys(a).length > 0 && e(a), this.control.worker.publicMsgEmitter.emit("syncStorageChange", this.serviceStorage);
2323
+ Object.keys(a).length > 0 && e(a), this.control.worker.publicMsgEmitter.emit(
2324
+ "syncStorageChange",
2325
+ this.serviceStorage
2326
+ );
2313
2327
  });
2314
2328
  }
2315
2329
  removeStorageStateListener() {
@@ -4776,7 +4790,7 @@ class Jf extends Gf {
4776
4790
  "set font faces in main thread success"
4777
4791
  );
4778
4792
  });
4779
- const { MainThreadManagerImpl: e } = await import("./index-BVzr2LGs.mjs");
4793
+ const { MainThreadManagerImpl: e } = await import("./index-BH_o7eOU.mjs");
4780
4794
  this.mainThread = new e(this);
4781
4795
  }
4782
4796
  async on() {
@@ -1,7 +1,7 @@
1
1
  var _e = Object.defineProperty;
2
2
  var $e = (S, i, t) => i in S ? _e(S, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : S[i] = t;
3
3
  var y = (S, i, t) => $e(S, typeof i != "symbol" ? i + "" : i, t);
4
- import { g as Kt, _ as ve, i as Vt, p as kt, a as St, D as J, c as E, b as Rt, E as $t, d as st, P as O, V as I, s as Qt, e as Jt, f as Nt, h as Te, r as Ge, j as He, k as v, l as Gt, m as X, n as w, o as D, q as A, t as U, u as tt, v as $, w as jt, x as qe, y as je, z as Ze, A as Ke, B as Ve, C as Qe, F as Je, G as ts, S as _, H as es, I as ae, J as Wt, K as Pe, T as At, L as yt, M as ss, N as Ie, O as os, Q as is, R as ct, U as G, W as ut, X as rs, Y as ns, Z as as, $ as cs, a0 as bt, a1 as ls, a2 as z, a3 as ce, a4 as le, a5 as hs } from "./index-CkmP0UxK.mjs";
4
+ import { g as Kt, _ as ve, i as Vt, p as kt, a as St, D as J, c as E, b as Rt, E as $t, d as st, P as O, V as I, s as Qt, e as Jt, f as Nt, h as Te, r as Ge, j as He, k as v, l as Gt, m as X, n as w, o as D, q as A, t as U, u as tt, v as $, w as jt, x as qe, y as je, z as Ze, A as Ke, B as Ve, C as Qe, F as Je, G as ts, S as _, H as es, I as ae, J as Wt, K as Pe, T as At, L as yt, M as ss, N as Ie, O as os, Q as is, R as ct, U as G, W as ut, X as rs, Y as ns, Z as as, $ as cs, a0 as bt, a1 as ls, a2 as z, a3 as ce, a4 as le, a5 as hs } from "./index-B0SzWigt.mjs";
5
5
  import { Group as K, Path as wt, Sprite as We, Rect as he, Polyline as ht, Ellipse as ps, Label as ds, Scene as te, Layer as us } from "spritejs";
6
6
  import rt from "clipper-lib";
7
7
  import ee from "lineclip";
@@ -819,7 +819,13 @@ class be extends b {
819
819
  pos: M,
820
820
  d: Y,
821
821
  fillColor: l === U.Stroke || j ? h : void 0,
822
- lineDash: j ? void 0 : l === U.Dotted ? [k && k[0] || 1, (k && k[1] || 2) * p] : l === U.LongDotted ? [(k && k[0] || 1) * p, (k && k[1] || 2) * p] : void 0,
822
+ lineDash: j ? void 0 : l === U.Dotted ? [
823
+ k && k[0] || 1,
824
+ (k && k[1] || 2) * p
825
+ ] : l === U.LongDotted ? [
826
+ (k && k[0] || 1) * p,
827
+ (k && k[1] || 2) * p
828
+ ] : void 0,
823
829
  strokeColor: h,
824
830
  lineCap: j ? void 0 : P,
825
831
  lineWidth: l === U.Stroke || j ? 0 : p
@@ -1163,7 +1169,13 @@ class Re extends b {
1163
1169
  const g = {
1164
1170
  name: o == null ? void 0 : o.toString(),
1165
1171
  opacity: 1,
1166
- lineDash: h === U.Dotted ? [l && l[0] || 1, (l && l[1] || 2) * c] : h === U.LongDotted ? [(l && l[0] || 1) * c, (l && l[1] || 2) * c] : void 0,
1172
+ lineDash: h === U.Dotted ? [
1173
+ l && l[0] || 1,
1174
+ (l && l[1] || 2) * c
1175
+ ] : h === U.LongDotted ? [
1176
+ (l && l[0] || 1) * c,
1177
+ (l && l[1] || 2) * c
1178
+ ] : void 0,
1167
1179
  strokeColor: a,
1168
1180
  lineCap: p,
1169
1181
  lineWidth: c,
@@ -2396,7 +2408,13 @@ class xe extends b {
2396
2408
  pos: [k[0] - W[0], k[1] - W[1]],
2397
2409
  fillColor: r,
2398
2410
  strokeColor: r,
2399
- lineDash: p === U.Dotted ? [u && u[0] || 1, (u && u[1] || 2) * n] : p === U.LongDotted ? [(u && u[0] || 1) * n, (u && u[1] || 2) * n] : void 0,
2411
+ lineDash: p === U.Dotted ? [
2412
+ u && u[0] || 1,
2413
+ (u && u[1] || 2) * n
2414
+ ] : p === U.LongDotted ? [
2415
+ (u && u[0] || 1) * n,
2416
+ (u && u[1] || 2) * n
2417
+ ] : void 0,
2400
2418
  lineCap: p === U.Normal ? void 0 : m,
2401
2419
  lineWidth: n,
2402
2420
  normalize: !1
@@ -2645,7 +2663,13 @@ class De extends b {
2645
2663
  strokeColor: n,
2646
2664
  normalize: !0,
2647
2665
  lineCap: g,
2648
- lineDash: u === U.Dotted ? [f && f[0] || 1, (f && f[1] || 2) * c] : u === U.LongDotted ? [(f && f[0] || 1) * c, (f && f[1] || 2) * c] : void 0
2666
+ lineDash: u === U.Dotted ? [
2667
+ f && f[0] || 1,
2668
+ (f && f[1] || 2) * c
2669
+ ] : u === U.LongDotted ? [
2670
+ (f && f[0] || 1) * c,
2671
+ (f && f[1] || 2) * c
2672
+ ] : void 0
2649
2673
  }, R = {
2650
2674
  name: e,
2651
2675
  id: e,
@@ -2898,7 +2922,13 @@ class Me extends b {
2898
2922
  fillColor: h !== "transparent" && h || void 0,
2899
2923
  strokeColor: c,
2900
2924
  lineCap: P,
2901
- lineDash: f === U.Dotted ? [k && k[0] || 1, (k && k[1] || 2) * l] : f === U.LongDotted ? [(k && k[0] || 1) * l, (k && k[1] || 2) * l] : void 0
2925
+ lineDash: f === U.Dotted ? [
2926
+ k && k[0] || 1,
2927
+ (k && k[1] || 2) * l
2928
+ ] : f === U.LongDotted ? [
2929
+ (k && k[0] || 1) * l,
2930
+ (k && k[1] || 2) * l
2931
+ ] : void 0
2902
2932
  };
2903
2933
  let M = {
2904
2934
  x: Math.floor(
@@ -3141,7 +3171,13 @@ class Oe extends b {
3141
3171
  strokeColor: n,
3142
3172
  normalize: !0,
3143
3173
  lineCap: T,
3144
- lineDash: g === U.Dotted ? [k && k[0] || 1, (k && k[1] || 2) * c] : g === U.LongDotted ? [(k && k[0] || 1) * c, (k && k[1] || 2) * c] : void 0
3174
+ lineDash: g === U.Dotted ? [
3175
+ k && k[0] || 1,
3176
+ (k && k[1] || 2) * c
3177
+ ] : g === U.LongDotted ? [
3178
+ (k && k[0] || 1) * c,
3179
+ (k && k[1] || 2) * c
3180
+ ] : void 0
3145
3181
  }, M = {
3146
3182
  name: e,
3147
3183
  id: e,
@@ -3378,7 +3414,13 @@ class Ae extends b {
3378
3414
  strokeColor: n,
3379
3415
  normalize: !0,
3380
3416
  lineCap: g,
3381
- lineDash: m === U.Dotted ? [P && P[0] || 1, (P && P[1] || 2) * c] : m === U.LongDotted ? [(P && P[0] || 1) * c, (P && P[1] || 2) * c] : void 0
3417
+ lineDash: m === U.Dotted ? [
3418
+ P && P[0] || 1,
3419
+ (P && P[1] || 2) * c
3420
+ ] : m === U.LongDotted ? [
3421
+ (P && P[0] || 1) * c,
3422
+ (P && P[1] || 2) * c
3423
+ ] : void 0
3382
3424
  }, W = {
3383
3425
  name: e,
3384
3426
  id: e,
@@ -3672,7 +3714,13 @@ class Ee extends b {
3672
3714
  className: `${k[0]},${k[1]}`,
3673
3715
  close: !0,
3674
3716
  lineCap: g,
3675
- lineDash: u === U.Dotted ? [f && f[0] || 1, (f && f[1] || 2) * a] : u === U.LongDotted ? [(f && f[0] || 1) * a, (f && f[1] || 2) * a] : void 0
3717
+ lineDash: u === U.Dotted ? [
3718
+ f && f[0] || 1,
3719
+ (f && f[1] || 2) * a
3720
+ ] : u === U.LongDotted ? [
3721
+ (f && f[0] || 1) * a,
3722
+ (f && f[1] || 2) * a
3723
+ ] : void 0
3676
3724
  }, C = {
3677
3725
  name: e,
3678
3726
  id: e,
@@ -4241,7 +4289,13 @@ class Be extends b {
4241
4289
  d: P,
4242
4290
  fillColor: r,
4243
4291
  strokeColor: r,
4244
- lineDash: T ? void 0 : p === U.Dotted ? [m && m[0] || 1, (m && m[1] || 2) * n] : p === U.LongDotted ? [(m && m[0] || 1) * n, (m && m[1] || 2) * n] : void 0,
4292
+ lineDash: T ? void 0 : p === U.Dotted ? [
4293
+ m && m[0] || 1,
4294
+ (m && m[1] || 2) * n
4295
+ ] : p === U.LongDotted ? [
4296
+ (m && m[0] || 1) * n,
4297
+ (m && m[1] || 2) * n
4298
+ ] : void 0,
4245
4299
  lineCap: T ? void 0 : u,
4246
4300
  lineWidth: p === U.Normal || T ? 0 : n
4247
4301
  };