@netless/appliance-plugin 1.1.31 → 1.1.33-beta.0
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 +9 -6
- package/README.md +293 -32
- package/cdn/cdn.js +1 -1
- package/cdn/{fullWorker-8cQCRH.js → fullWorker-D5ZxtP.js} +98 -98
- package/cdn/{subWorker-Bj1Oy7.js → subWorker-DJi31K.js} +98 -98
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +13 -14
- package/dist/component/textEditor/types.d.ts +2 -2
- package/dist/core/enum.d.ts +1 -9
- package/dist/core/mainEngine.d.ts +7 -7
- package/dist/core/msgEvent/rotateNode/forMain.d.ts +2 -2
- package/dist/core/msgEvent/scaleNode/forMain.d.ts +2 -2
- package/dist/core/msgEvent/setColor/forMain.d.ts +2 -2
- package/dist/core/msgEvent/setPoint/forMain.d.ts +2 -2
- package/dist/core/msgEvent/translateNode/forMain.d.ts +2 -2
- package/dist/core/plugin.d.ts +2 -2
- package/dist/core/tools/arrow.d.ts +2 -2
- package/dist/core/tools/base.d.ts +2 -2
- package/dist/core/tools/ellipse.d.ts +2 -2
- package/dist/core/tools/pencil.d.ts +2 -2
- package/dist/core/tools/polygon.d.ts +2 -2
- package/dist/core/tools/rectangle.d.ts +2 -2
- package/dist/core/tools/speechBalloon.d.ts +2 -2
- package/dist/core/tools/star.d.ts +2 -2
- package/dist/core/tools/straight.d.ts +2 -2
- package/dist/core/tools/utils.d.ts +0 -3
- package/dist/core/types.d.ts +6 -6
- package/dist/core/worker/base.d.ts +2 -2
- package/dist/cursors/index.d.ts +3 -3
- package/dist/fullWorker.js +98 -98
- package/dist/{index-MwM-TUUF.mjs → index-C7U3tEJL.mjs} +80 -89
- package/dist/{index-DiHYEAGm.mjs → index-COnrz1Bl.mjs} +1029 -1031
- package/dist/index-CbCGd4f7.js +1 -0
- package/dist/{index-CpRTvTdJ.mjs → index-CxKr64Ya.mjs} +1 -1
- package/dist/index-ht-Ylmvp.js +1 -0
- package/dist/{index-XJ7wx0mr.js → index-u7Hv85FE.js} +1 -1
- package/dist/plugin/baseApplianceManager.d.ts +3 -3
- package/dist/plugin/types.d.ts +2 -3
- package/dist/subWorker.js +98 -98
- package/package.json +1 -1
- package/dist/index-D-zGeAx1.js +0 -1
- package/dist/index-OfIZzgAi.js +0 -1
package/dist/appliance-plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ht-Ylmvp.js");exports.ActiveContainerType=e.ActiveContainerType;exports.ApplianceMultiPlugin=e.ApplianceMultiPlugin;exports.ApplianceNames=e.ApplianceNames;exports.ApplianceSigleWrapper=e.ApplianceSigleWrapper;exports.ApplianceSinglePlugin=e.ApplianceSinglePlugin;exports.Cursor_Hover_Id=e.Cursor_Hover_Id;exports.ECanvasShowType=e.ECanvasShowType;exports.EDataType=e.EDataType;exports.EForceStopReason=e.EForceStopReason;exports.EImageType=e.EImageType;exports.EMatrixrRelationType=e.EMatrixrRelationType;exports.EOperationType=e.EOperationType;exports.EPostMessageType=e.EPostMessageType;exports.ERenderFilterType=e.ERenderFilterType;exports.ESVGType=e.ESVGType;exports.EScaleType=e.EScaleType;exports.EStrokeType=e.EStrokeType;exports.EToolsKey=e.EToolsKey;exports.ElayerType=e.ElayerType;exports.EmitEventType=e.EmitEventType;exports.EventMessageType=e.EventMessageType;exports.EventWorkState=e.EventWorkState;exports.InternalMsgEmitterType=e.InternalMsgEmitterType;exports.Main_View_Id=e.Main_View_Id;exports.Plugin=e.Plugin;exports.ShapeType=e.ShapeType;exports.Task_Time_Interval=e.Task_Time_Interval;exports.fullWorkerUrl=e.fullWorker;exports.subWorkerUrl=e.subWorker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { af as s, a9 as p, ac as r, ab as t, aa as i, a4 as l, Z as n, b as E, ag as T, t as o, j as y,
|
|
1
|
+
import { af as s, a9 as p, ac as r, ab as t, aa as i, a4 as l, Z as n, b as E, ag as T, t as o, j as y, aj as g, a as c, ak as S, d as u, u as v, w as k, c as m, ai as M, E as _, ah as d, v as A, ae as I, Y as P, al as W, ad as b, a6 as f, a7 as h, a8 as w } from "./index-COnrz1Bl.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as ActiveContainerType,
|
|
4
4
|
p as ApplianceMultiPlugin,
|
|
@@ -11,23 +11,22 @@ export {
|
|
|
11
11
|
T as EForceStopReason,
|
|
12
12
|
o as EImageType,
|
|
13
13
|
y as EMatrixrRelationType,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
g as EOperationType,
|
|
15
|
+
c as EPostMessageType,
|
|
16
|
+
S as ERenderFilterType,
|
|
17
|
+
u as ESVGType,
|
|
18
|
+
v as EScaleType,
|
|
19
19
|
k as EStrokeType,
|
|
20
20
|
m as EToolsKey,
|
|
21
21
|
M as ElayerType,
|
|
22
22
|
_ as EmitEventType,
|
|
23
23
|
d as EventMessageType,
|
|
24
|
-
A as
|
|
25
|
-
I as
|
|
26
|
-
W as InternalMsgEmitterType,
|
|
24
|
+
A as EventWorkState,
|
|
25
|
+
I as InternalMsgEmitterType,
|
|
27
26
|
P as Main_View_Id,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
W as Plugin,
|
|
28
|
+
b as ShapeType,
|
|
29
|
+
f as Task_Time_Interval,
|
|
30
|
+
h as fullWorkerUrl,
|
|
31
|
+
w as subWorkerUrl
|
|
33
32
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EDataType,
|
|
1
|
+
import { EDataType, EventWorkState, IUpdateNodeOpt } from "../../core";
|
|
2
2
|
import { BaseShapeOptions } from "../../core/tools";
|
|
3
3
|
export declare enum ETextEditorType {
|
|
4
4
|
Text = 1,
|
|
@@ -26,7 +26,7 @@ export interface TextOptions extends BaseShapeOptions {
|
|
|
26
26
|
boxPoint?: [number, number];
|
|
27
27
|
boxSize?: [number, number];
|
|
28
28
|
/** 状态 */
|
|
29
|
-
workState?:
|
|
29
|
+
workState?: EventWorkState;
|
|
30
30
|
/** 正在编辑的用户 */
|
|
31
31
|
uid?: string;
|
|
32
32
|
}
|
package/dist/core/enum.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export declare enum EDataType {
|
|
|
48
48
|
/** 来源于worker */
|
|
49
49
|
Worker = 3
|
|
50
50
|
}
|
|
51
|
-
export declare enum
|
|
51
|
+
export declare enum EventWorkState {
|
|
52
52
|
/** 等待 */
|
|
53
53
|
Pending = 0,
|
|
54
54
|
/** 开始 */
|
|
@@ -165,14 +165,6 @@ export declare enum EScaleType {
|
|
|
165
165
|
/** 等比例 */
|
|
166
166
|
proportional = 4
|
|
167
167
|
}
|
|
168
|
-
export declare enum EvevtWorkType {
|
|
169
|
-
Pending = 0,
|
|
170
|
-
Start = 1,
|
|
171
|
-
Doing = 2,
|
|
172
|
-
Done = 3,
|
|
173
|
-
/** 只读状态 */
|
|
174
|
-
Unwritable = 4
|
|
175
|
-
}
|
|
176
168
|
export declare enum EMatrixrRelationType {
|
|
177
169
|
/** 在内部, 无边界碰撞 */
|
|
178
170
|
inside = 0,
|
|
@@ -5,7 +5,7 @@ import { BaseNodeMapItem, IActiveToolsDataType, IActiveWorkDataType, ICameraOpt,
|
|
|
5
5
|
import { BaseSubWorkModuleProps } from "../plugin/types";
|
|
6
6
|
import type { ISVGMarkmapInformation, ISVGUrlInformation, IconifyInformation, ImageInformation, MarkmapId, _SetTrue } from "../plugin/types";
|
|
7
7
|
import { MethodBuilderMain } from "./msgEvent";
|
|
8
|
-
import {
|
|
8
|
+
import { EventWorkState } from "./enum";
|
|
9
9
|
import { BaseShapeOptions } from "./tools";
|
|
10
10
|
import { AppViewDisplayerManager, MainViewDisplayerManager } from "../plugin/baseViewContainerManager";
|
|
11
11
|
export declare abstract class MasterController {
|
|
@@ -24,7 +24,7 @@ export declare abstract class MasterController {
|
|
|
24
24
|
/** worker线程管理器 */
|
|
25
25
|
/** 本地原始点数据批任务数据池 */
|
|
26
26
|
protected abstract localPointsBatchData: Map<IworkId, {
|
|
27
|
-
state:
|
|
27
|
+
state: EventWorkState;
|
|
28
28
|
points: number[];
|
|
29
29
|
isFullWork: boolean;
|
|
30
30
|
viewId: string;
|
|
@@ -49,7 +49,7 @@ export declare abstract class MasterController {
|
|
|
49
49
|
/** 获取当前激活的工作任务id */
|
|
50
50
|
protected getWorkId(): IworkId | undefined;
|
|
51
51
|
/** 获取当前work的工作状态 */
|
|
52
|
-
get workState():
|
|
52
|
+
get workState(): EventWorkState;
|
|
53
53
|
/** 用于接收服务端同步的数据 */
|
|
54
54
|
abstract onServiceDerive(key: string, data: DiffOneData<BaseCollectorReducerAction | undefined>): void;
|
|
55
55
|
/** 消费批处理池数据 */
|
|
@@ -131,7 +131,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
131
131
|
private reRenders;
|
|
132
132
|
private localWorkViewId?;
|
|
133
133
|
protected localPointsBatchData: Map<IworkId, {
|
|
134
|
-
state:
|
|
134
|
+
state: EventWorkState;
|
|
135
135
|
points: number[];
|
|
136
136
|
/** 完整的绘制 */
|
|
137
137
|
isFullWork: boolean;
|
|
@@ -200,7 +200,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
200
200
|
get isBusy(): boolean;
|
|
201
201
|
getLockSentEventCursor(): boolean;
|
|
202
202
|
setLockSentEventCursor(bol: boolean): void;
|
|
203
|
-
getTasksqueueState():
|
|
203
|
+
getTasksqueueState(): EventWorkState.Doing | EventWorkState.Done;
|
|
204
204
|
setMaxDrawCount(num: number): void;
|
|
205
205
|
getFullWorkDrawCount(): number;
|
|
206
206
|
getMaxDrawCount(): number;
|
|
@@ -219,7 +219,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
219
219
|
private deleteLocalPoint;
|
|
220
220
|
private getLocalPointInfo;
|
|
221
221
|
getLocalPointsInfo(): Map<IworkId, {
|
|
222
|
-
state:
|
|
222
|
+
state: EventWorkState;
|
|
223
223
|
points: number[];
|
|
224
224
|
/** 完整的绘制 */
|
|
225
225
|
isFullWork: boolean;
|
|
@@ -227,7 +227,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
227
227
|
opt?: BaseShapeOptions;
|
|
228
228
|
}>;
|
|
229
229
|
private correctStorage;
|
|
230
|
-
originalEventLintener(workState:
|
|
230
|
+
originalEventLintener(workState: EventWorkState, point: [number, number], viewId: string): Promise<void>;
|
|
231
231
|
getLocalWorkViewId(): string | undefined;
|
|
232
232
|
setLocalWorkViewId(viewId?: string): void;
|
|
233
233
|
setCurrentToolsData(currentToolsData: IActiveToolsDataType): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { EmitEventType } from "../../../plugin/types";
|
|
2
2
|
import { BaseMsgMethod } from "../base";
|
|
3
3
|
import { IworkId } from "../../types";
|
|
4
|
-
import {
|
|
4
|
+
import { EventWorkState } from "../../enum";
|
|
5
5
|
export type RotateNodeEmtData = {
|
|
6
6
|
workIds: IworkId[];
|
|
7
7
|
angle: number;
|
|
8
|
-
workState:
|
|
8
|
+
workState: EventWorkState;
|
|
9
9
|
viewId: string;
|
|
10
10
|
};
|
|
11
11
|
export declare class RotateNodeMethod extends BaseMsgMethod {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { EmitEventType } from "../../../plugin/types";
|
|
2
2
|
import { BaseMsgMethod } from "../base";
|
|
3
3
|
import { IworkId } from "../../types";
|
|
4
|
-
import {
|
|
4
|
+
import { EventWorkState } from "../../enum";
|
|
5
5
|
import type { Direction } from "re-resizable/lib/resizer";
|
|
6
6
|
export type ScaleNodeEmtData = {
|
|
7
7
|
workIds: IworkId[];
|
|
8
|
-
workState:
|
|
8
|
+
workState: EventWorkState;
|
|
9
9
|
viewId: string;
|
|
10
10
|
originPoint: [number, number];
|
|
11
11
|
scenePoint: [number, number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EStrokeType, EmitEventType } from "../../../plugin/types";
|
|
2
2
|
import { BaseMsgMethod } from "../base";
|
|
3
3
|
import { IworkId } from "../../types";
|
|
4
|
-
import {
|
|
4
|
+
import { EventWorkState } from "../../enum";
|
|
5
5
|
export type SetColorNodeEmtData = {
|
|
6
6
|
workIds: IworkId[];
|
|
7
7
|
strokeColor?: string;
|
|
@@ -10,7 +10,7 @@ export type SetColorNodeEmtData = {
|
|
|
10
10
|
fontBgColor?: string;
|
|
11
11
|
thickness?: number;
|
|
12
12
|
strokeType?: EStrokeType;
|
|
13
|
-
workState:
|
|
13
|
+
workState: EventWorkState;
|
|
14
14
|
viewId: string;
|
|
15
15
|
};
|
|
16
16
|
export declare class SetColorNodeMethod extends BaseMsgMethod {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EmitEventType } from "../../../plugin/types";
|
|
2
2
|
import { BaseMsgMethod } from "../base";
|
|
3
3
|
import { IworkId } from "../../types";
|
|
4
|
-
import {
|
|
4
|
+
import { EventWorkState } from "../../enum";
|
|
5
5
|
export type SetPointEmtData = {
|
|
6
6
|
workId: IworkId;
|
|
7
|
-
workState:
|
|
7
|
+
workState: EventWorkState;
|
|
8
8
|
pointMap: Map<string, [number, number][]>;
|
|
9
9
|
viewId: string;
|
|
10
10
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { EmitEventType } from "../../../plugin/types";
|
|
2
2
|
import { BaseMsgMethod } from "../base";
|
|
3
3
|
import { IworkId } from "../../types";
|
|
4
|
-
import {
|
|
4
|
+
import { EventWorkState } from "../../enum";
|
|
5
5
|
export type TranslateNodeEmtData = {
|
|
6
6
|
workIds: IworkId[];
|
|
7
7
|
position: {
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
10
|
};
|
|
11
|
-
workState:
|
|
11
|
+
workState: EventWorkState;
|
|
12
12
|
viewId: string;
|
|
13
13
|
};
|
|
14
14
|
export declare class TranslateNodeMethod extends BaseMsgMethod {
|
package/dist/core/plugin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type EventEmitter2 from "eventemitter2";
|
|
2
2
|
import type { MasterControlForWorker } from "./mainEngine";
|
|
3
3
|
import type { ApplianceManagerLike, BaseSubWorkModuleProps } from "../plugin/types";
|
|
4
|
-
import { EToolsKey,
|
|
4
|
+
import { EToolsKey, EventWorkState } from "../core/enum";
|
|
5
5
|
export interface FloatBarOptions {
|
|
6
6
|
icon: string;
|
|
7
7
|
activeIcon: string;
|
|
@@ -18,7 +18,7 @@ export type PluginListener = {
|
|
|
18
18
|
/** 改变场景 */
|
|
19
19
|
sceneChange: (viewId: string, scenePath: string) => void;
|
|
20
20
|
/** 本地event事件 */
|
|
21
|
-
localEvent: (viewId: string, eventState:
|
|
21
|
+
localEvent: (viewId: string, eventState: EventWorkState, point: [number, number]) => void;
|
|
22
22
|
};
|
|
23
23
|
export type PluginEvent = keyof PluginListener;
|
|
24
24
|
export type PluginCallback<T extends PluginEvent> = PluginListener[T];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkerMessage, IRectType, IUpdateNodeOpt } from "../types";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { BaseConsumeResultType, BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
@@ -53,7 +53,7 @@ export declare class ArrowShape extends BaseShapeTool {
|
|
|
53
53
|
consumeService(props: {
|
|
54
54
|
op: number[];
|
|
55
55
|
isFullWork: boolean;
|
|
56
|
-
workState?:
|
|
56
|
+
workState?: EventWorkState;
|
|
57
57
|
}): IRectType | undefined;
|
|
58
58
|
clearTmpPoints(): void;
|
|
59
59
|
static updateNodeOpt(param: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { BaseNodeMapItem, IMainMessage, IRectType, IUpdateNodeOpt, IWorkerMessage } from "../types";
|
|
4
4
|
import { Group } from "spritejs";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
@@ -87,7 +87,7 @@ export declare abstract class BaseShapeTool {
|
|
|
87
87
|
op: number[];
|
|
88
88
|
isSimpleWorker?: boolean;
|
|
89
89
|
replaceId?: string;
|
|
90
|
-
workState?:
|
|
90
|
+
workState?: EventWorkState;
|
|
91
91
|
worker?: WorkThreadEngineForSimpleWorker | LocalWorkForFullWorker | WorkThreadEngineForFullWorker | WorkThreadEngineForSubWorker | SubLocalMainThreadImpl | SnapshotThreadImpl | SubServiceMainThreadImpl;
|
|
92
92
|
}): IRectType | undefined;
|
|
93
93
|
protected filterSamePoints(points: Point2d[], tolerance?: number): Point2d[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkerMessage, IRectType, IUpdateNodeOpt } from "../types";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { BaseConsumeResultType, BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
@@ -51,7 +51,7 @@ export declare class EllipseShape extends BaseShapeTool {
|
|
|
51
51
|
consumeService(props: {
|
|
52
52
|
op: number[];
|
|
53
53
|
isFullWork: boolean;
|
|
54
|
-
workState?:
|
|
54
|
+
workState?: EventWorkState;
|
|
55
55
|
}): IRectType | undefined;
|
|
56
56
|
clearTmpPoints(): void;
|
|
57
57
|
static updateNodeOpt(param: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { IWorkerMessage, IMainMessage, IRectType, IUpdateNodeOpt } from "../types";
|
|
5
5
|
import { EStrokeType } from "../../plugin/types";
|
|
@@ -76,7 +76,7 @@ export declare class PencilShape extends BaseShapeTool {
|
|
|
76
76
|
op: number[];
|
|
77
77
|
isFullWork?: boolean;
|
|
78
78
|
replaceId?: string;
|
|
79
|
-
workState?:
|
|
79
|
+
workState?: EventWorkState;
|
|
80
80
|
}): IRectType | undefined;
|
|
81
81
|
computPencilPoints(params: {
|
|
82
82
|
op: number[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkerMessage, IRectType, IUpdateNodeOpt } from "../types";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { BaseConsumeResultType, BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
@@ -53,7 +53,7 @@ export declare class PolygonShape extends BaseShapeTool {
|
|
|
53
53
|
consumeService(props: {
|
|
54
54
|
op: number[];
|
|
55
55
|
isFullWork: boolean;
|
|
56
|
-
workState?:
|
|
56
|
+
workState?: EventWorkState;
|
|
57
57
|
}): IRectType | undefined;
|
|
58
58
|
clearTmpPoints(): void;
|
|
59
59
|
static updateNodeOpt(param: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkerMessage, IRectType, IUpdateNodeOpt } from "../types";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { BaseConsumeResultType, BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
@@ -54,7 +54,7 @@ export declare class RectangleShape extends BaseShapeTool {
|
|
|
54
54
|
op: number[];
|
|
55
55
|
isFullWork: boolean;
|
|
56
56
|
replaceId?: string;
|
|
57
|
-
workState?:
|
|
57
|
+
workState?: EventWorkState;
|
|
58
58
|
}): IRectType | undefined;
|
|
59
59
|
clearTmpPoints(): void;
|
|
60
60
|
static updateNodeOpt(param: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkerMessage, IRectType, IUpdateNodeOpt } from "../types";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { BaseConsumeResultType, BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
@@ -55,7 +55,7 @@ export declare class SpeechBalloonShape extends BaseShapeTool {
|
|
|
55
55
|
consumeService(props: {
|
|
56
56
|
op: number[];
|
|
57
57
|
isFullWork: boolean;
|
|
58
|
-
workState?:
|
|
58
|
+
workState?: EventWorkState;
|
|
59
59
|
}): IRectType | undefined;
|
|
60
60
|
clearTmpPoints(): void;
|
|
61
61
|
static updateNodeOpt(param: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkerMessage, IRectType, IUpdateNodeOpt } from "../types";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { BaseConsumeResultType, BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
@@ -54,7 +54,7 @@ export declare class StarShape extends BaseShapeTool {
|
|
|
54
54
|
consumeService(props: {
|
|
55
55
|
op: number[];
|
|
56
56
|
isFullWork: boolean;
|
|
57
|
-
workState?:
|
|
57
|
+
workState?: EventWorkState;
|
|
58
58
|
}): IRectType | undefined;
|
|
59
59
|
clearTmpPoints(): void;
|
|
60
60
|
static updateNodeOpt(param: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkerMessage, IRectType, IUpdateNodeOpt } from "../types";
|
|
2
|
-
import { EDataType, EPostMessageType, EScaleType, EToolsKey,
|
|
2
|
+
import { EDataType, EPostMessageType, EScaleType, EToolsKey, EventWorkState } from "../enum";
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { BaseConsumeResultType, BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
@@ -54,7 +54,7 @@ export declare class StraightShape extends BaseShapeTool {
|
|
|
54
54
|
consumeService(props: {
|
|
55
55
|
op: number[];
|
|
56
56
|
isFullWork: boolean;
|
|
57
|
-
workState?:
|
|
57
|
+
workState?: EventWorkState;
|
|
58
58
|
}): IRectType | undefined;
|
|
59
59
|
clearTmpPoints(): void;
|
|
60
60
|
static updateNodeOpt(param: {
|
|
@@ -33,9 +33,6 @@ export interface CombineConsumeResult {
|
|
|
33
33
|
rect: IRectType | undefined;
|
|
34
34
|
consumeIndex: number;
|
|
35
35
|
}
|
|
36
|
-
export interface ShapeStateInfo {
|
|
37
|
-
willClear: boolean;
|
|
38
|
-
}
|
|
39
36
|
export declare function getShapeTools(toolsType: EToolsKey): typeof ArrowShape | typeof PencilShape | typeof StraightShape | typeof EllipseShape | typeof PolygonShape | typeof StarShape | typeof RectangleShape | typeof SpeechBalloonShape | typeof TextShape | typeof LaserPenShape | typeof EraserShape | typeof PencilEraserShape | typeof BitMapEraserShape | typeof SelectorShape | typeof ImageShape | typeof ISvgShadowShape | undefined;
|
|
40
37
|
export declare function getShapeInstance(param: {
|
|
41
38
|
workId: string;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseCollectorReducerAction, INormalPushMsg, ISerializableStorageData } from "../collector/types";
|
|
2
2
|
import type { ETextEditorType, FontStyleType, FontWeightType, TextOptions } from "../component/textEditor/types";
|
|
3
3
|
import type { EmitEventType } from "../plugin/types";
|
|
4
|
-
import type { ECanvasContextType, ECanvasShowType, EDataType, EPostMessageType, ESVGType, EScaleType, EToolsKey, ElayerType,
|
|
4
|
+
import type { ECanvasContextType, ECanvasShowType, EDataType, EPostMessageType, ESVGType, EScaleType, EToolsKey, ElayerType, EventWorkState } from "./enum";
|
|
5
5
|
import type { BaseShapeOptions, BaseShapeTool, ShapeOptions } from "./tools";
|
|
6
6
|
import type { SelectorShape } from "./tools";
|
|
7
7
|
import type { Direction } from "re-resizable/lib/resizer";
|
|
@@ -73,7 +73,7 @@ export interface IUpdateNodeOpt {
|
|
|
73
73
|
fontBgColor?: string;
|
|
74
74
|
isOpacity?: boolean;
|
|
75
75
|
pos?: [number, number];
|
|
76
|
-
workState?:
|
|
76
|
+
workState?: EventWorkState;
|
|
77
77
|
useAnimation?: boolean;
|
|
78
78
|
zIndex?: number;
|
|
79
79
|
zIndexForBackgroundSVG?: number;
|
|
@@ -102,7 +102,7 @@ export type IWorkerMessage = Omit<Partial<BaseCollectorReducerAction>, "op"> & {
|
|
|
102
102
|
msgType: EPostMessageType;
|
|
103
103
|
dataType: EDataType;
|
|
104
104
|
scenePath?: string;
|
|
105
|
-
workState?:
|
|
105
|
+
workState?: EventWorkState;
|
|
106
106
|
op?: number[];
|
|
107
107
|
offscreenCanvasOpt?: IOffscreenCanvasOptionType;
|
|
108
108
|
dpr?: number;
|
|
@@ -192,7 +192,7 @@ export interface IMainMessage extends INormalPushMsg {
|
|
|
192
192
|
scenePath?: string;
|
|
193
193
|
canvasWidth?: number;
|
|
194
194
|
canvasHeight?: number;
|
|
195
|
-
workState?:
|
|
195
|
+
workState?: EventWorkState;
|
|
196
196
|
canTextEdit?: boolean;
|
|
197
197
|
canRotate?: boolean;
|
|
198
198
|
canLock?: boolean;
|
|
@@ -282,7 +282,7 @@ export interface IActiveToolsDataType {
|
|
|
282
282
|
maxCombineEraserTime?: number;
|
|
283
283
|
}
|
|
284
284
|
export interface IActiveWorkDataType {
|
|
285
|
-
workState:
|
|
285
|
+
workState: EventWorkState;
|
|
286
286
|
toolsOpt?: ShapeOptions;
|
|
287
287
|
viewId?: string;
|
|
288
288
|
workId?: IworkId;
|
|
@@ -312,7 +312,7 @@ export type ILocalWorkItem = {
|
|
|
312
312
|
data?: IWorkerMessage;
|
|
313
313
|
result?: IMainMessage;
|
|
314
314
|
totalRect?: IRectType;
|
|
315
|
-
workState:
|
|
315
|
+
workState: EventWorkState;
|
|
316
316
|
isDel?: boolean;
|
|
317
317
|
willRefresh?: boolean;
|
|
318
318
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Group, Scene } from "spritejs";
|
|
2
2
|
import { IActiveToolsDataType, IActiveWorkDataType, IBatchMainMessage, ICameraOpt, ILayerOptionType, IOffscreenCanvasOptionType, IRectType, IWorkerMessage } from "../types";
|
|
3
3
|
import { VNodeManager } from "../vNodeManager";
|
|
4
|
-
import { type ECanvasContextType, ECanvasShowType, EDataType,
|
|
4
|
+
import { type ECanvasContextType, ECanvasShowType, EDataType, EventWorkState } from "../enum";
|
|
5
5
|
import { BaseShapeOptions, BaseShapeTool } from "../tools/base";
|
|
6
6
|
import { ServiceWorkForFullWorker } from "./fullWorkerService";
|
|
7
7
|
import { LocalWorkForFullWorker } from "./fullWorkerLocal";
|
|
@@ -51,7 +51,7 @@ export declare abstract class WorkThreadEngineBase {
|
|
|
51
51
|
protected protectedTask?: {
|
|
52
52
|
isProtected: boolean;
|
|
53
53
|
workName: EmitEventType;
|
|
54
|
-
workState:
|
|
54
|
+
workState: EventWorkState;
|
|
55
55
|
};
|
|
56
56
|
protected delayPostDoneResolve?: (bol: boolean) => void;
|
|
57
57
|
protected cacheImages: Map<string, {
|
package/dist/cursors/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventMessageType,
|
|
1
|
+
import { EventMessageType, EventWorkState, IMainMessage } from "../core";
|
|
2
2
|
import { BaseSubWorkModuleProps, Displayer, RoomMember } from "../plugin/types";
|
|
3
3
|
import { MemberDiff, RoomMemberManager } from "../members";
|
|
4
4
|
import type { BaseApplianceManager } from "../plugin/baseApplianceManager";
|
|
@@ -9,7 +9,7 @@ export declare enum CursorColloctSource {
|
|
|
9
9
|
}
|
|
10
10
|
export type IServiceDrawWorkItem = {
|
|
11
11
|
consumPoint: [number | undefined, number | undefined];
|
|
12
|
-
workState:
|
|
12
|
+
workState: EventWorkState;
|
|
13
13
|
viewId: string;
|
|
14
14
|
timestamp: number;
|
|
15
15
|
};
|
|
@@ -31,7 +31,7 @@ export type CursorInfo = {
|
|
|
31
31
|
export type CursorInfoMapItem = CursorInfo & {
|
|
32
32
|
timestamp: number;
|
|
33
33
|
type: CursorColloctSource;
|
|
34
|
-
workState?:
|
|
34
|
+
workState?: EventWorkState;
|
|
35
35
|
};
|
|
36
36
|
export declare abstract class CursorManager {
|
|
37
37
|
/** 内部消息管理器 */
|