@netless/appliance-plugin 1.1.36-beta.1 → 1.1.36-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/READMA.zh-CN.md +60 -49
- package/README.md +92 -50
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/assets/{fullWorker-B_mvkoeW.js → fullWorker-C5kniG7M.js} +7 -7
- package/dist/assets/{subWorker-CRdsidWT.js → subWorker-Cps_t9fu.js} +7 -7
- package/dist/{bridge-enxPG6qf.js → bridge-DeN8jJgs.js} +1 -1
- package/dist/bridge-DvqpopG1.mjs +67 -0
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/component/textEditor/manager.d.ts +0 -1
- package/dist/fullWorker.js +2 -2
- package/dist/{index-D8SnD90W.mjs → index-B3MjbDsW.mjs} +1 -1
- package/dist/{index-2On9v0Ff.mjs → index-B7jKsOvs.mjs} +4089 -4324
- package/dist/{index-BZql6xgR.mjs → index-C-mmzWhD.mjs} +1 -1
- package/dist/{index-CcS9cKSp.js → index-C5LkBIDy.js} +1 -1
- package/dist/{index-D4z0hSjm.js → index-CGUukLaV.js} +1 -1
- package/dist/{index-Bm90lQii.js → index-CR9y5tMJ.js} +1 -1
- package/dist/{index-CIjmeY9J.js → index-ChEzLTlY.js} +1 -1
- package/dist/{index-K9QVPOhV.mjs → index-CobMH-xU.mjs} +14 -21
- package/dist/index-D9xjZ07S.js +1 -0
- package/dist/index-DJpL2E5_.js +1 -0
- package/dist/{index-DbI0V6BY.mjs → index-Dllr4Im3.mjs} +3937 -4172
- package/dist/{index-BrJL-fin.mjs → index-v6moTe3J.mjs} +14 -21
- package/dist/plugin/selectorApi.d.ts +4 -1
- package/dist/plugin/types.d.ts +8 -3
- package/dist/subWorker.js +2 -2
- package/dist/undo/index.d.ts +0 -1
- package/package.json +2 -4
- package/cdn/cdn.js +0 -1
- package/cdn/fullWorker-uAwmRi.js +0 -486
- package/cdn/subWorker-BVNpAC.js +0 -486
- package/dist/bridge-DYkH1J6p.mjs +0 -67
- package/dist/index-BSD0B_eV.js +0 -1
- package/dist/index-W9Jz9E04.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _t = Object.defineProperty;
|
|
2
2
|
var Vt = (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) => Vt(T, typeof i != "symbol" ? i + "" : i, e);
|
|
4
|
-
import { g as Je, i as et, _ as Pt, p as Se, e as Te, D as J, f as A, h as Re, j as Ve, k as se, P as E, l as W, c as k, s as qe, m as tt, n as Ne, o as st, r as qt, q as Ht, t as Me, u as U, a as w, b as x, v as O, w as G, x as ee, y as $, z as Ze, A as jt, B as Zt, C as Kt, F as Qt, G as Jt, H as es, I as ts, J as ss, K as X, L as os, M as ht, N as We, O as Wt, T as Be, Q as ye, R as is, U as Lt, W as rs, X as ns, Y as ce, Z as _, $ as ue, a0 as as, a1 as cs, a2 as ls, a3 as hs, a4 as be, a5 as ps, E as Y, a6 as pt, V as dt, S as ds } from "./index-
|
|
4
|
+
import { g as Je, i as et, _ as Pt, p as Se, e as Te, D as J, f as A, h as Re, j as Ve, k as se, P as E, l as W, c as k, s as qe, m as tt, n as Ne, o as st, r as qt, q as Ht, t as Me, u as U, a as w, b as x, v as O, w as G, x as ee, y as $, z as Ze, A as jt, B as Zt, C as Kt, F as Qt, G as Jt, H as es, I as ts, J as ss, K as X, L as os, M as ht, N as We, O as Wt, T as Be, Q as ye, R as is, U as Lt, W as rs, X as ns, Y as ce, Z as _, $ as ue, a0 as as, a1 as cs, a2 as ls, a3 as hs, a4 as be, a5 as ps, E as Y, a6 as pt, V as dt, S as ds } from "./index-Dllr4Im3.mjs";
|
|
5
5
|
import { Group as j, 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";
|
|
@@ -7448,37 +7448,30 @@ class no {
|
|
|
7448
7448
|
}
|
|
7449
7449
|
}
|
|
7450
7450
|
async consumeFull(i) {
|
|
7451
|
-
var s
|
|
7451
|
+
var s;
|
|
7452
7452
|
const e = this.setFullWork(i), t = i.ops && ye(i.ops);
|
|
7453
7453
|
if (e) {
|
|
7454
|
-
const
|
|
7455
|
-
|
|
7456
|
-
|
|
7454
|
+
const o = (s = i.workId) == null ? void 0 : s.toString();
|
|
7455
|
+
o && i.clearPreviewLocalWork && this.thread.localLayer.getElementsByName(o).forEach((n) => {
|
|
7456
|
+
n.remove(), V(n, this.thread.localLayer.parent);
|
|
7457
7457
|
}), e.toolsType === k.BackgroundSVG ? e.consumeService({
|
|
7458
7458
|
isFullWork: !0,
|
|
7459
|
-
replaceId:
|
|
7459
|
+
replaceId: o
|
|
7460
7460
|
}) : e.toolsType === k.Image ? await e.consumeServiceAsync({
|
|
7461
7461
|
isFullWork: !0,
|
|
7462
|
-
replaceId:
|
|
7462
|
+
replaceId: o,
|
|
7463
7463
|
worker: this
|
|
7464
7464
|
}) : e.toolsType === k.Text ? await e.consumeServiceAsync({
|
|
7465
7465
|
isFullWork: !0,
|
|
7466
|
-
replaceId:
|
|
7466
|
+
replaceId: o,
|
|
7467
7467
|
boxRect: this.thread.getSceneRect()
|
|
7468
7468
|
}) : e.consumeService({
|
|
7469
7469
|
op: t,
|
|
7470
7470
|
isFullWork: !0,
|
|
7471
|
-
replaceId:
|
|
7471
|
+
replaceId: o
|
|
7472
7472
|
}), i != null && i.updateNodeOpt && e.updataOptService(i.updateNodeOpt);
|
|
7473
|
-
const
|
|
7474
|
-
i.workId && this.workShapes.delete(i.workId.toString()), i.willSyncService &&
|
|
7475
|
-
target: "image-undo.mainThread.full.post",
|
|
7476
|
-
viewId: this.thread.viewId,
|
|
7477
|
-
workId: ((r = (o = i.workId) == null ? void 0 : o.toString) == null ? void 0 : r.call(o)) || i.workId,
|
|
7478
|
-
needUndoTicker: i.needUndoTicker,
|
|
7479
|
-
requestId: i.requestId,
|
|
7480
|
-
emitEventType: i.emitEventType
|
|
7481
|
-
}), a.push({
|
|
7473
|
+
const r = [];
|
|
7474
|
+
i.workId && this.workShapes.delete(i.workId.toString()), i.willSyncService && r.push({
|
|
7482
7475
|
opt: i.opt,
|
|
7483
7476
|
toolsType: i.toolsType,
|
|
7484
7477
|
type: w.FullWork,
|
|
@@ -7489,15 +7482,15 @@ class no {
|
|
|
7489
7482
|
needUndoTicker: i.needUndoTicker,
|
|
7490
7483
|
requestId: i.requestId,
|
|
7491
7484
|
emitEventType: i.emitEventType
|
|
7492
|
-
})
|
|
7485
|
+
}), i.isLockSentEventCursor && r.push({
|
|
7493
7486
|
type: w.None,
|
|
7494
7487
|
isLockSentEventCursor: !0
|
|
7495
|
-
}), i.needUndoTicker &&
|
|
7488
|
+
}), i.needUndoTicker && r.push({
|
|
7496
7489
|
type: w.None,
|
|
7497
7490
|
needUndoTicker: i.needUndoTicker,
|
|
7498
7491
|
emitEventType: i.emitEventType,
|
|
7499
7492
|
requestId: i.requestId
|
|
7500
|
-
}),
|
|
7493
|
+
}), r.length && (i.needUndoTicker, this.thread.post({ sp: r }));
|
|
7501
7494
|
}
|
|
7502
7495
|
}
|
|
7503
7496
|
async colloctEffectSelectWork(i) {
|
|
@@ -31,6 +31,9 @@ export declare class SelectorApiManager {
|
|
|
31
31
|
/** 同一次属性更新导致的几何变化做尾部合并,只派发最后一次 */
|
|
32
32
|
private pendingPropertyGeometryByKey;
|
|
33
33
|
constructor(control: BaseApplianceManager);
|
|
34
|
+
private formatFieldsFromChanges;
|
|
35
|
+
private hasShapeChanges;
|
|
36
|
+
private resolveShapeDispatchToolsTypes;
|
|
34
37
|
private cancelUndoTicker;
|
|
35
38
|
private resolveCancelableUndoTickerId;
|
|
36
39
|
private captureUndoTickerDuringDispatch;
|
|
@@ -123,7 +126,7 @@ export declare class SelectorApiManager {
|
|
|
123
126
|
}) => void;
|
|
124
127
|
/** 收集本次 selector 更新需要等待的内部 method ack */
|
|
125
128
|
private collectPendingMethods;
|
|
126
|
-
private
|
|
129
|
+
private hasApplicableChangesForToolsType;
|
|
127
130
|
private buildUpdatedElementValue;
|
|
128
131
|
private normalizeUpdateElementInfo;
|
|
129
132
|
/** 把 UpdateSelectedElementChanges 分发到对应的内部 method emit */
|
package/dist/plugin/types.d.ts
CHANGED
|
@@ -303,9 +303,9 @@ export interface AppliancePluginInstance {
|
|
|
303
303
|
insertBackgroundImage(viewId: string, imageInfo: ISVGUrlInformation): void;
|
|
304
304
|
/**
|
|
305
305
|
* 获取当前 selector 选中元素的快照。
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
* @param viewId 多白板下白板ID, 主白板ID为 `mainView`, 其他白板ID为 addApp() return 的 appID。省略时取当前 focuedView / mainView。
|
|
307
|
+
* @returns 当前选中态快照;若未选中任何元素则返回 `undefined`。
|
|
308
|
+
*/
|
|
309
309
|
getSelectedElements(viewId?: string): SelectedElementsSnapshot | undefined;
|
|
310
310
|
/**
|
|
311
311
|
* 判断某个属性字段是否属于指定 toolsType 的可编辑能力。
|
|
@@ -920,6 +920,11 @@ export type SelectorTransformChangeInfo = {
|
|
|
920
920
|
workState: EventWorkState;
|
|
921
921
|
};
|
|
922
922
|
export type UpdateSelectedElementChanges = {
|
|
923
|
+
/**
|
|
924
|
+
* Shape 参数更新时传给 SetShapeOpt 的真实教具类型。
|
|
925
|
+
* 例如更新 Star 的 shape.vertices 时传 EToolsKey.Star。
|
|
926
|
+
*/
|
|
927
|
+
toolsType?: EToolsKey;
|
|
923
928
|
strokeColor?: string;
|
|
924
929
|
fillColor?: string;
|
|
925
930
|
thickness?: number;
|