@netless/appliance-plugin 1.1.43-beta.1 → 1.1.43-beta.3
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/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/{bridge-CDqtVTPN.js → bridge-CjP_hVOP.js} +1 -1
- package/dist/{bridge-nmqVpnZ5.mjs → bridge-DDjnM21Q.mjs} +1 -1
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/core/mainEngine.d.ts +1 -0
- package/dist/core/mainThread/subLocalThread.d.ts +3 -1
- package/dist/core/worker/fullWorkerLocal.d.ts +2 -1
- package/dist/fullWorker.js +25 -25
- package/dist/{index-BJOPyRJn.js → index-0kVavCij.js} +1 -1
- package/dist/{index-DhCFlEfW.mjs → index-9PPheeLn.mjs} +9048 -9033
- package/dist/{index-B44o9ggV.mjs → index-BJ0z6a4a.mjs} +30 -15
- package/dist/{index-Cjaia8CY.mjs → index-CWYxJZvD.mjs} +58 -46
- package/dist/{index-DDd-30M7.js → index-CfY3_e4d.js} +1 -1
- package/dist/index-CnrGW2oH.js +1 -0
- package/dist/{index-BF310Wzc.mjs → index-D0sxmVc0.mjs} +1 -1
- package/dist/index-DvSdT6k5.js +1 -0
- package/dist/{index-DdbAM7Xi.mjs → index-DvrjPbBe.mjs} +58 -46
- package/dist/{index-mcBiJOLo.mjs → index-NA6eaAqy.mjs} +1 -1
- package/dist/index-S6ml0iJb.js +570 -0
- package/dist/{index-Cu0f4kha.js → index-bu6U96S2.js} +1 -1
- package/dist/subWorker.js +2 -2
- package/package.json +1 -1
- package/dist/index-BiqhUSZ0.js +0 -570
- package/dist/index-o1TaWHww.js +0 -1
- package/dist/index-puxStU6w.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ye = Object.defineProperty;
|
|
2
2
|
var we = (M, e, t) => e in M ? ye(M, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : M[e] = t;
|
|
3
3
|
var u = (M, e, t) => we(M, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { D as K, e as b, c as m, r as $, b as R, f as Z, t as V, a as h, h as de, M as ve, i as D, j, k as ke, C as H, l as z, m as Se, n as te, o as Ie, p as se, q as ge, s as Te, u as re, v as ie, w as Y, x as _, E as N, y as ee, z as Q, A as We, B as Re, F as Ee, G as be, H as Le, I as pe, J as ue, T as oe, K as ae, L as Ce, N as Ne, P as fe, Q as me, R as ne, U as
|
|
4
|
+
import { D as K, e as b, c as m, r as $, b as R, f as Z, t as V, a as h, h as de, M as ve, i as D, j, k as ke, C as H, l as z, m as Se, n as te, o as Ie, p as se, q as ge, s as Te, u as re, v as ie, w as Y, x as _, E as N, y as ee, z as Q, A as We, B as Re, F as Ee, G as be, H as Le, I as pe, J as ue, T as oe, K as ae, L as Ce, N as Ne, P as fe, Q as me, R as ne, U as Be, S as ce, W as q, X as Oe, V as he, Y as De } from "./index-9PPheeLn.mjs";
|
|
5
5
|
import { cloneDeep as J, xor as Me, isNumber as G, isEqual as le } from "lodash";
|
|
6
6
|
import "clipper-lib";
|
|
7
7
|
import "lineclip";
|
|
@@ -699,6 +699,18 @@ class Ae {
|
|
|
699
699
|
const t = this.workShapes.get(e);
|
|
700
700
|
(t == null ? void 0 : t.toolsType) === m.BitMapEraser && (t.clearTmpPoints(), this.workShapes.delete(e), this.combineDrawActiveId === e && (this.combineDrawActiveId = void 0), this.drawWorkActiveId === e && (this.drawWorkActiveId = void 0), this.bitmapEraserRenderQueue = Promise.resolve());
|
|
701
701
|
}
|
|
702
|
+
publishBitmapEraserBeforeImages(e, t) {
|
|
703
|
+
t.size && this.thread.post({
|
|
704
|
+
sp: [
|
|
705
|
+
{
|
|
706
|
+
type: h.None,
|
|
707
|
+
viewId: this.thread.viewId,
|
|
708
|
+
eraseTxnId: e,
|
|
709
|
+
eraseTxnBeforeImages: new Map(t)
|
|
710
|
+
}
|
|
711
|
+
]
|
|
712
|
+
});
|
|
713
|
+
}
|
|
702
714
|
async drawBitMapEraserFull(e, t, s, r) {
|
|
703
715
|
const {
|
|
704
716
|
willUpdateNodes: i,
|
|
@@ -1271,9 +1283,9 @@ class Fe {
|
|
|
1271
1283
|
(r = k.node) == null || r.consumeService({
|
|
1272
1284
|
isFullWork: !0,
|
|
1273
1285
|
replaceId: E
|
|
1274
|
-
}), this.selectorWorkShapes.forEach((
|
|
1286
|
+
}), this.selectorWorkShapes.forEach((B, O) => {
|
|
1275
1287
|
var P;
|
|
1276
|
-
(P =
|
|
1288
|
+
(P = B.selectIds) != null && P.includes(E) && (this.willRunEffectSelectorIds.add(O), this.runEffect());
|
|
1277
1289
|
}), this.workShapes.delete(E);
|
|
1278
1290
|
break;
|
|
1279
1291
|
}
|
|
@@ -1281,9 +1293,9 @@ class Fe {
|
|
|
1281
1293
|
await ((i = k.node) == null ? void 0 : i.consumeServiceAsync({
|
|
1282
1294
|
isFullWork: !0,
|
|
1283
1295
|
worker: this
|
|
1284
|
-
})), this.selectorWorkShapes.forEach((
|
|
1296
|
+
})), this.selectorWorkShapes.forEach((B, O) => {
|
|
1285
1297
|
var P;
|
|
1286
|
-
(P =
|
|
1298
|
+
(P = B.selectIds) != null && P.includes(E) && (this.willRunEffectSelectorIds.add(O), this.runEffect());
|
|
1287
1299
|
}), this.workShapes.delete(E);
|
|
1288
1300
|
break;
|
|
1289
1301
|
}
|
|
@@ -1292,9 +1304,9 @@ class Fe {
|
|
|
1292
1304
|
isFullWork: !0,
|
|
1293
1305
|
replaceId: E,
|
|
1294
1306
|
boxRect: this.thread.getSceneRect()
|
|
1295
|
-
})), this.selectorWorkShapes.forEach((
|
|
1307
|
+
})), this.selectorWorkShapes.forEach((B, O) => {
|
|
1296
1308
|
var P;
|
|
1297
|
-
(P =
|
|
1309
|
+
(P = B.selectIds) != null && P.includes(E) && (this.willRunEffectSelectorIds.add(O), this.runEffect());
|
|
1298
1310
|
}), k.refreshTextRender && k.requestId && s.push({
|
|
1299
1311
|
type: h.RefreshTextRender,
|
|
1300
1312
|
requestId: k.requestId,
|
|
@@ -1310,20 +1322,20 @@ class Fe {
|
|
|
1310
1322
|
case m.Star:
|
|
1311
1323
|
case m.Polygon:
|
|
1312
1324
|
case m.SpeechBalloon: {
|
|
1313
|
-
const
|
|
1325
|
+
const B = !!k.ops;
|
|
1314
1326
|
if ((n = k.animationWorkData) != null && n.length) {
|
|
1315
|
-
const
|
|
1327
|
+
const O = k.oldRect;
|
|
1316
1328
|
(c = k.node) == null || c.consumeService({
|
|
1317
1329
|
op: k.animationWorkData,
|
|
1318
|
-
isFullWork:
|
|
1319
|
-
}),
|
|
1330
|
+
isFullWork: B
|
|
1331
|
+
}), B && (this.selectorWorkShapes.forEach((P, F) => {
|
|
1320
1332
|
var U;
|
|
1321
1333
|
(U = P.selectIds) != null && U.includes(E) && (this.willRunEffectSelectorIds.add(F), this.runEffect());
|
|
1322
1334
|
}), (d = k.node) == null || d.clearTmpPoints(), this.workShapes.delete(E)), k.isEnableCursor ? t.set(E, {
|
|
1323
1335
|
cursorTool: _(k.toolsType),
|
|
1324
|
-
workState:
|
|
1336
|
+
workState: O ? k.ops ? b.Done : b.Doing : b.Start,
|
|
1325
1337
|
op: k.animationWorkData.slice(-3, -1)
|
|
1326
|
-
}) :
|
|
1338
|
+
}) : B && !k.useAnimation && ((l = k.updateNodeOpt) != null && l.useAnimation) && t.set(E, {
|
|
1327
1339
|
cursorTool: _(k.toolsType),
|
|
1328
1340
|
workState: b.Done,
|
|
1329
1341
|
op: k.animationWorkData.slice(-3, -1),
|
|
@@ -1339,22 +1351,22 @@ class Fe {
|
|
|
1339
1351
|
(y = k.node) == null || y.clearTmpPoints(), this.workShapes.delete(E);
|
|
1340
1352
|
break;
|
|
1341
1353
|
}
|
|
1342
|
-
const
|
|
1354
|
+
const B = 3, O = this.computNextAnimationIndex(
|
|
1343
1355
|
k,
|
|
1344
|
-
O
|
|
1345
|
-
), P = k.isDiff ? 0 : Math.max(0, (k.animationIndex || 0) - O), F = (k.animationWorkData || []).slice(
|
|
1346
|
-
P,
|
|
1347
1356
|
B
|
|
1357
|
+
), P = k.isDiff ? 0 : Math.max(0, (k.animationIndex || 0) - B), F = (k.animationWorkData || []).slice(
|
|
1358
|
+
P,
|
|
1359
|
+
O
|
|
1348
1360
|
), U = (T = (v = k.node) == null ? void 0 : v.getWorkId()) == null ? void 0 : T.toString();
|
|
1349
|
-
if ((k.animationIndex || 0) <
|
|
1361
|
+
if ((k.animationIndex || 0) < O || k.isDiff) {
|
|
1350
1362
|
if ((C = k.node) == null || C.consumeService({
|
|
1351
1363
|
op: F,
|
|
1352
1364
|
isFullWork: !1
|
|
1353
|
-
}), k.animationIndex =
|
|
1365
|
+
}), k.animationIndex = O, k.isDiff && (k.isDiff = !1), F.length && k.isEnableCursor) {
|
|
1354
1366
|
const X = F.slice(-3, -1);
|
|
1355
1367
|
t.set(E, {
|
|
1356
1368
|
cursorTool: _(k.toolsType),
|
|
1357
|
-
workState: P === 0 ? b.Start :
|
|
1369
|
+
workState: P === 0 ? b.Start : O === ((L = k.animationWorkData) == null ? void 0 : L.length) ? b.Done : b.Doing,
|
|
1358
1370
|
op: X
|
|
1359
1371
|
});
|
|
1360
1372
|
}
|
|
@@ -1371,24 +1383,24 @@ class Fe {
|
|
|
1371
1383
|
break;
|
|
1372
1384
|
}
|
|
1373
1385
|
} else {
|
|
1374
|
-
const
|
|
1386
|
+
const B = !!k.ops;
|
|
1375
1387
|
if ((f = k.node) == null || f.consumeService({
|
|
1376
1388
|
op: k.animationWorkData || [],
|
|
1377
|
-
isFullWork:
|
|
1389
|
+
isFullWork: B,
|
|
1378
1390
|
replaceId: E
|
|
1379
|
-
}), (w = k.node) == null || w.updataOptService(k.updateNodeOpt),
|
|
1391
|
+
}), (w = k.node) == null || w.updataOptService(k.updateNodeOpt), B) {
|
|
1380
1392
|
if (!k.isEnableCursor && ((S = k.updateNodeOpt) != null && S.useAnimation) && ((I = k.animationWorkData) != null && I.length)) {
|
|
1381
|
-
const
|
|
1393
|
+
const O = k.animationWorkData.slice(-3, -1);
|
|
1382
1394
|
t.set(E, {
|
|
1383
1395
|
cursorTool: _(k.toolsType),
|
|
1384
1396
|
workState: b.Done,
|
|
1385
|
-
op:
|
|
1397
|
+
op: O,
|
|
1386
1398
|
uid: (W = k.updateNodeOpt) == null ? void 0 : W.uid
|
|
1387
1399
|
});
|
|
1388
1400
|
}
|
|
1389
|
-
this.selectorWorkShapes.forEach((
|
|
1401
|
+
this.selectorWorkShapes.forEach((O, P) => {
|
|
1390
1402
|
var F;
|
|
1391
|
-
(F =
|
|
1403
|
+
(F = O.selectIds) != null && F.includes(E) && (this.willRunEffectSelectorIds.add(P), this.runEffect());
|
|
1392
1404
|
}), (g = k.node) == null || g.clearTmpPoints(), this.workShapes.delete(E);
|
|
1393
1405
|
}
|
|
1394
1406
|
}
|
|
@@ -2978,9 +2990,9 @@ class je {
|
|
|
2978
2990
|
for (const [T, C] of f.entries()) {
|
|
2979
2991
|
const L = this.vNodes.get(T);
|
|
2980
2992
|
if (L) {
|
|
2981
|
-
const A = C, E = L.rect, k = this.getSceneRect(),
|
|
2993
|
+
const A = C, E = L.rect, k = this.getSceneRect(), B = ae(A, k), O = ae(E, k);
|
|
2982
2994
|
let P = c;
|
|
2983
|
-
(
|
|
2995
|
+
(B !== O || A.w !== E.w || A.h !== E.h || O === Ce.intersect) && (P = !0);
|
|
2984
2996
|
const { toolsType: F, opt: U } = L, X = U.eraserlines && U.eraserlines.length > 0 || !!U.eraserFaces;
|
|
2985
2997
|
(P || p && X) && (F === m.Text || X) && this.debounceUpdateCache.add(T);
|
|
2986
2998
|
}
|
|
@@ -3008,17 +3020,17 @@ class je {
|
|
|
3008
3020
|
if (!v()) return;
|
|
3009
3021
|
const C = [];
|
|
3010
3022
|
for (const E of this.debounceUpdateCache.values()) {
|
|
3011
|
-
const k = (T = this.fullLayer) == null ? void 0 : T.getElementsByName(E)[0],
|
|
3012
|
-
if (
|
|
3013
|
-
const { toolsType:
|
|
3014
|
-
if (k ||
|
|
3023
|
+
const k = (T = this.fullLayer) == null ? void 0 : T.getElementsByName(E)[0], B = this.vNodes.get(E);
|
|
3024
|
+
if (B) {
|
|
3025
|
+
const { toolsType: O, opt: P } = B;
|
|
3026
|
+
if (k || O !== m.Text) {
|
|
3015
3027
|
const F = this.localWork.setFullWork({
|
|
3016
|
-
toolsType:
|
|
3028
|
+
toolsType: O,
|
|
3017
3029
|
opt: P,
|
|
3018
3030
|
workId: E
|
|
3019
3031
|
});
|
|
3020
3032
|
if (F) {
|
|
3021
|
-
if (
|
|
3033
|
+
if (O === m.Text)
|
|
3022
3034
|
C.push(
|
|
3023
3035
|
F.consumeServiceAsync({
|
|
3024
3036
|
isFullWork: !0,
|
|
@@ -3029,7 +3041,7 @@ class je {
|
|
|
3029
3041
|
);
|
|
3030
3042
|
else if (P.eraserlines && P.eraserlines.length > 0 || P.eraserFaces) {
|
|
3031
3043
|
const U = F.consumeService({
|
|
3032
|
-
op:
|
|
3044
|
+
op: B.op,
|
|
3033
3045
|
isFullWork: !0,
|
|
3034
3046
|
replaceId: E,
|
|
3035
3047
|
workState: b.Done
|
|
@@ -3603,7 +3615,7 @@ class Je {
|
|
|
3603
3615
|
for (const r of s.sp) {
|
|
3604
3616
|
let i = !1;
|
|
3605
3617
|
for (const o of e)
|
|
3606
|
-
if (
|
|
3618
|
+
if (Be(r, o)) {
|
|
3607
3619
|
i = !0;
|
|
3608
3620
|
break;
|
|
3609
3621
|
}
|
|
@@ -3756,7 +3768,7 @@ class ht {
|
|
|
3756
3768
|
consumeWorkId: p
|
|
3757
3769
|
} = e;
|
|
3758
3770
|
if (c && q(i)) {
|
|
3759
|
-
const f =
|
|
3771
|
+
const f = Oe(
|
|
3760
3772
|
o,
|
|
3761
3773
|
a,
|
|
3762
3774
|
"mainThread"
|
|
@@ -3911,7 +3923,7 @@ class ht {
|
|
|
3911
3923
|
if (o === h.Init) {
|
|
3912
3924
|
const g = i.viewGeneration ?? (this.viewGenerationById.get(a) || 0) + 1;
|
|
3913
3925
|
await this.enqueueViewTask(a, async () => {
|
|
3914
|
-
var E, k,
|
|
3926
|
+
var E, k, B;
|
|
3915
3927
|
const y = this.viewGenerationById.get(a);
|
|
3916
3928
|
if (y !== void 0 && g < y)
|
|
3917
3929
|
return;
|
|
@@ -3932,11 +3944,11 @@ class ht {
|
|
|
3932
3944
|
canvasOpt: p,
|
|
3933
3945
|
viewOwner: v,
|
|
3934
3946
|
viewGeneration: g,
|
|
3935
|
-
mainThreadRenderMode: ((
|
|
3936
|
-
post: (
|
|
3937
|
-
...
|
|
3938
|
-
viewId:
|
|
3939
|
-
viewGeneration:
|
|
3947
|
+
mainThreadRenderMode: ((B = (k = this.master.control) == null ? void 0 : k.renderingCompatibilityDecision) == null ? void 0 : B.mainThreadRenderMode) ?? "normal",
|
|
3948
|
+
post: (O) => this.post({
|
|
3949
|
+
...O,
|
|
3950
|
+
viewId: O.viewId || a,
|
|
3951
|
+
viewGeneration: O.viewGeneration ?? g,
|
|
3940
3952
|
viewOwner: v
|
|
3941
3953
|
})
|
|
3942
3954
|
});
|
|
@@ -3983,9 +3995,9 @@ class ht {
|
|
|
3983
3995
|
surface: L
|
|
3984
3996
|
}), k.on(i).then(() => {
|
|
3985
3997
|
this.disposeSnapshotThread(T, k);
|
|
3986
|
-
}).catch((
|
|
3998
|
+
}).catch((B) => {
|
|
3987
3999
|
this.master.Logger.error(
|
|
3988
|
-
`[Appliance]: snapshot render failed; viewId=${a}; error=${
|
|
4000
|
+
`[Appliance]: snapshot render failed; viewId=${a}; error=${B instanceof Error ? B.message : String(B)}`
|
|
3989
4001
|
), this.disposeSnapshotThread(T, k);
|
|
3990
4002
|
});
|
|
3991
4003
|
continue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var A = Object.defineProperty;
|
|
2
2
|
var x = (n, e, t) => e in n ? A(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var c = (n, e, t) => x(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { E as b, a as l, b as C, c as v, d as L, O as $, V as B, S as V } from "./index-
|
|
4
|
+
import { E as b, a as l, b as C, c as v, d as L, O as $, V as B, S as V } from "./index-BJ0z6a4a.mjs";
|
|
5
5
|
import { isEqual as T, isString as U, clone as D, throttle as H } from "lodash";
|
|
6
6
|
import "white-web-sdk";
|
|
7
7
|
import "clipper-lib";
|