@netless/appliance-plugin 1.1.44-beta.0 → 1.1.44

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.
Files changed (64) hide show
  1. package/dist/appliance-plugin.js +1 -1
  2. package/dist/appliance-plugin.mjs +12 -12
  3. package/dist/{bridge-CskJoX5M.js → bridge-B7BW1lpB.js} +1 -1
  4. package/dist/{bridge-rKHCYJ6m.mjs → bridge-DQud78k4.mjs} +1 -1
  5. package/dist/bridge.js +1 -1
  6. package/dist/bridge.mjs +1 -1
  7. package/dist/collector/types.d.ts +0 -3
  8. package/dist/component/textEditor/types.d.ts +0 -5
  9. package/dist/core/mainThread/base.d.ts +5 -1
  10. package/dist/core/mainThread/snapshotThread.d.ts +2 -3
  11. package/dist/core/mainThread/subLocalThread.d.ts +2 -5
  12. package/dist/core/mainThread/subServiceThread.d.ts +2 -1
  13. package/dist/core/mainThread/subTopThread.d.ts +2 -2
  14. package/dist/core/tools/arrow.d.ts +1 -423
  15. package/dist/core/tools/base.d.ts +2 -444
  16. package/dist/core/tools/ellipse.d.ts +1 -423
  17. package/dist/core/tools/eraser.d.ts +2 -846
  18. package/dist/core/tools/eraserFaces.d.ts +0 -2
  19. package/dist/core/tools/image.d.ts +1 -0
  20. package/dist/core/tools/laserPen.d.ts +2 -846
  21. package/dist/core/tools/pencil.d.ts +2 -848
  22. package/dist/core/tools/pencilEraser.d.ts +4 -1692
  23. package/dist/core/tools/pencilEraserBitMap.d.ts +5 -2115
  24. package/dist/core/tools/polygon.d.ts +1 -423
  25. package/dist/core/tools/rectangle.d.ts +1 -423
  26. package/dist/core/tools/selector.d.ts +7 -2121
  27. package/dist/core/tools/speechBalloon.d.ts +1 -423
  28. package/dist/core/tools/star.d.ts +1 -423
  29. package/dist/core/tools/straight.d.ts +1 -423
  30. package/dist/core/tools/text.d.ts +3 -3
  31. package/dist/core/tools/utils.d.ts +2 -2
  32. package/dist/core/types.d.ts +0 -9
  33. package/dist/core/utils/index.d.ts +0 -2
  34. package/dist/core/utils/serviceImageRecovery.d.ts +9 -0
  35. package/dist/core/vNodeManager.d.ts +1 -1
  36. package/dist/core/worker/base.d.ts +6 -2
  37. package/dist/core/worker/fullWorkerLocal.d.ts +0 -1
  38. package/dist/core/worker/fullWorkerService.d.ts +4 -2
  39. package/dist/core/worker/simpleWorker.d.ts +2 -2
  40. package/dist/core/worker/subWorkerTopLayer.d.ts +2 -2
  41. package/dist/fullWorker.js +148 -149
  42. package/dist/{index-Ca2t53R7.mjs → index-4ZI3GxVI.mjs} +1 -1
  43. package/dist/{index-ZMuKk-bl.js → index-AJCkfnUu.js} +1 -1
  44. package/dist/{index-ConirzkM.mjs → index-B8Ls8sf_.mjs} +1 -1
  45. package/dist/{index-BbBSxLGe.mjs → index-BBtV40zU.mjs} +563 -490
  46. package/dist/{index-C-tBYq0K.js → index-BOzOWS7h.js} +1 -1
  47. package/dist/index-BQiBrpib.js +1 -0
  48. package/dist/index-BYriQtGa.js +1 -0
  49. package/dist/{index-_3yxgNoj.mjs → index-C2tUvh2a.mjs} +11964 -12224
  50. package/dist/{index-DWevrjrE.mjs → index-DSFxl2wM.mjs} +11917 -12168
  51. package/dist/index-DnJkIouU.js +570 -0
  52. package/dist/index-DptnZ-h8.js +570 -0
  53. package/dist/{index-LcCU1tMV.mjs → index-ZUpKkvbD.mjs} +563 -490
  54. package/dist/subWorker.js +132 -133
  55. package/package.json +3 -4
  56. package/dist/core/utils/affineMatrix.d.ts +0 -33
  57. package/dist/core/utils/fontFamily.d.ts +0 -8
  58. package/dist/core/utils/selectorMatrix.d.ts +0 -4
  59. package/dist/core/utils/selectorRefresh.d.ts +0 -8
  60. package/dist/core/utils/textRaster.d.ts +0 -2
  61. package/dist/index-B0SB7Efu.js +0 -570
  62. package/dist/index-BIVRfc_x.js +0 -570
  63. package/dist/index-Bzg5OMdP.js +0 -1
  64. package/dist/index-CsNG_bzI.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BIVRfc_x.js");exports.ActiveContainerType=e.ActiveContainerType;exports.ApplianceMultiPlugin=e.ApplianceMultiPlugin;exports.ApplianceNames=e.ApplianceNames;exports.AppliancePluginCursorNames=e.AppliancePluginCursorNames;exports.ApplianceSigleWrapper=e.ApplianceSigleWrapper;exports.ApplianceSinglePlugin=e.ApplianceSinglePlugin;exports.Camera_Ack_Slow_Timeout=e.Camera_Ack_Slow_Timeout;exports.Camera_Transport_Fallback_Timeout=e.Camera_Transport_Fallback_Timeout;exports.Camera_Update_Business_Timeout=e.Camera_Update_Business_Timeout;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.EvevtWorkState=e.EventWorkState;exports.FontFaceFallbackBlacklistLevel=e.FontFaceFallbackBlacklistLevel;exports.InternalMsgEmitterType=e.InternalMsgEmitterType;exports.Main_View_Id=e.Main_View_Id;exports.Plugin=e.Plugin;exports.Renderer_Business_Default_Timeout=e.Renderer_Business_Default_Timeout;exports.ShapeType=e.ShapeType;exports.Task_Time_Interval=e.Task_Time_Interval;exports.WorkerCanvasContextBlacklistLevel=e.WorkerCanvasContextBlacklistLevel;exports.WorkerMaskTextureFormatBlacklistLevel=e.WorkerMaskTextureFormatBlacklistLevel;exports.WorkerMaskTextureUploadBlacklistLevel=e.WorkerMaskTextureUploadBlacklistLevel;exports.WorkerRenderModeBlacklistLevel=e.WorkerRenderModeBlacklistLevel;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DnJkIouU.js");exports.ActiveContainerType=e.ActiveContainerType;exports.ApplianceMultiPlugin=e.ApplianceMultiPlugin;exports.ApplianceNames=e.ApplianceNames;exports.AppliancePluginCursorNames=e.AppliancePluginCursorNames;exports.ApplianceSigleWrapper=e.ApplianceSigleWrapper;exports.ApplianceSinglePlugin=e.ApplianceSinglePlugin;exports.Camera_Ack_Slow_Timeout=e.Camera_Ack_Slow_Timeout;exports.Camera_Transport_Fallback_Timeout=e.Camera_Transport_Fallback_Timeout;exports.Camera_Update_Business_Timeout=e.Camera_Update_Business_Timeout;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.EvevtWorkState=e.EventWorkState;exports.FontFaceFallbackBlacklistLevel=e.FontFaceFallbackBlacklistLevel;exports.InternalMsgEmitterType=e.InternalMsgEmitterType;exports.Main_View_Id=e.Main_View_Id;exports.Plugin=e.Plugin;exports.Renderer_Business_Default_Timeout=e.Renderer_Business_Default_Timeout;exports.ShapeType=e.ShapeType;exports.Task_Time_Interval=e.Task_Time_Interval;exports.WorkerCanvasContextBlacklistLevel=e.WorkerCanvasContextBlacklistLevel;exports.WorkerMaskTextureFormatBlacklistLevel=e.WorkerMaskTextureFormatBlacklistLevel;exports.WorkerMaskTextureUploadBlacklistLevel=e.WorkerMaskTextureUploadBlacklistLevel;exports.WorkerRenderModeBlacklistLevel=e.WorkerRenderModeBlacklistLevel;
@@ -1,9 +1,9 @@
1
- import { _ as s, $ as t, a0 as l, a1 as r, a2 as i, a3 as p, a4 as o, a5 as n, a6 as T, C as E, s as c, b as k, a7 as _, I as y, L as m, a8 as u, a as v, a9 as g, d as S, aa as d, ab as C, c as M, ac as A, E as B, ad as F, e as W, e as I, ae as L, af as x, z as P, ag as R, ah as b, ai as f, T as h, aj as w, ak as D, al as N, am as U } from "./index-DWevrjrE.mjs";
1
+ import { Y as s, Z as t, _ as r, $ as l, a0 as i, a1 as p, a2 as o, a3 as n, a4 as T, C as E, s as c, b as k, a5 as y, A as _, K as u, a6 as m, a as v, a7 as g, d as S, a8 as d, a9 as C, c as M, aa as A, E as B, ab as F, e as W, e as x, ac as I, ad as L, y as P, ae as R, af as b, ag as f, T as h, ah as w, ai as D, aj as K, ak as N } from "./index-DSFxl2wM.mjs";
2
2
  export {
3
3
  s as ActiveContainerType,
4
4
  t as ApplianceMultiPlugin,
5
- l as ApplianceNames,
6
- r as AppliancePluginCursorNames,
5
+ r as ApplianceNames,
6
+ l as AppliancePluginCursorNames,
7
7
  i as ApplianceSigleWrapper,
8
8
  p as ApplianceSinglePlugin,
9
9
  o as Camera_Ack_Slow_Timeout,
@@ -12,10 +12,10 @@ export {
12
12
  E as Cursor_Hover_Id,
13
13
  c as ECanvasShowType,
14
14
  k as EDataType,
15
- _ as EForceStopReason,
16
- y as EImageType,
17
- m as EMatrixrRelationType,
18
- u as EOperationType,
15
+ y as EForceStopReason,
16
+ _ as EImageType,
17
+ u as EMatrixrRelationType,
18
+ m as EOperationType,
19
19
  v as EPostMessageType,
20
20
  g as ERenderFilterType,
21
21
  S as ESVGType,
@@ -26,9 +26,9 @@ export {
26
26
  B as EmitEventType,
27
27
  F as EventMessageType,
28
28
  W as EventWorkState,
29
- I as EvevtWorkState,
30
- L as FontFaceFallbackBlacklistLevel,
31
- x as InternalMsgEmitterType,
29
+ x as EvevtWorkState,
30
+ I as FontFaceFallbackBlacklistLevel,
31
+ L as InternalMsgEmitterType,
32
32
  P as Main_View_Id,
33
33
  R as Plugin,
34
34
  b as Renderer_Business_Default_Timeout,
@@ -36,6 +36,6 @@ export {
36
36
  h as Task_Time_Interval,
37
37
  w as WorkerCanvasContextBlacklistLevel,
38
38
  D as WorkerMaskTextureFormatBlacklistLevel,
39
- N as WorkerMaskTextureUploadBlacklistLevel,
40
- U as WorkerRenderModeBlacklistLevel
39
+ K as WorkerMaskTextureUploadBlacklistLevel,
40
+ N as WorkerRenderModeBlacklistLevel
41
41
  };
@@ -1 +1 @@
1
- "use strict";var l=Object.defineProperty;var o=(i,e,t)=>e in i?l(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var n=(i,e,t)=>o(i,typeof e!="symbol"?e+"":e,t);let r;function c(i){r=i}function u(){if(!r)throw new Error("[@netless/appliance-plugin/bridge] white-web-sdk runtime has not been bound yet.");return r}class h{constructor(){n(this,"control");n(this,"_listeners",{})}_inject(e){this.control=e}_onEvent(e,t){this._listeners[e]&&this._listeners[e](...t)}callbacks(e,t){this._listeners[e]=t}removeCallback(e){delete this._listeners[e]}}class g{constructor(e){n(this,"control");n(this,"worker");n(this,"publicMsgEmitter");n(this,"plugins",new Map);const{control:t,publicMsgEmitter:s}=e;this.control=t,this.publicMsgEmitter=s,this.worker=t.worker}use(e){this.plugins.set(e.kind,e),e._inject(this.control),e.onCreate()}destroy(){this.plugins.forEach(e=>{this.plugins.delete(e.kind),e.onDestroy()})}dispatchPluginEvent(e,...t){this.plugins.forEach(s=>{s._onEvent(e,t)})}}async function a(i){return c(i),Promise.resolve().then(()=>require("./index-B0SB7Efu.js")).then(e=>e.index)}exports.Plugin=h;exports.PluginManager=g;exports.getWhiteWebSdkBridgeRuntime=u;exports.loadAppliancePluginBridge=a;
1
+ "use strict";var l=Object.defineProperty;var o=(i,e,t)=>e in i?l(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var n=(i,e,t)=>o(i,typeof e!="symbol"?e+"":e,t);let r;function c(i){r=i}function u(){if(!r)throw new Error("[@netless/appliance-plugin/bridge] white-web-sdk runtime has not been bound yet.");return r}class h{constructor(){n(this,"control");n(this,"_listeners",{})}_inject(e){this.control=e}_onEvent(e,t){this._listeners[e]&&this._listeners[e](...t)}callbacks(e,t){this._listeners[e]=t}removeCallback(e){delete this._listeners[e]}}class g{constructor(e){n(this,"control");n(this,"worker");n(this,"publicMsgEmitter");n(this,"plugins",new Map);const{control:t,publicMsgEmitter:s}=e;this.control=t,this.publicMsgEmitter=s,this.worker=t.worker}use(e){this.plugins.set(e.kind,e),e._inject(this.control),e.onCreate()}destroy(){this.plugins.forEach(e=>{this.plugins.delete(e.kind),e.onDestroy()})}dispatchPluginEvent(e,...t){this.plugins.forEach(s=>{s._onEvent(e,t)})}}async function a(i){return c(i),Promise.resolve().then(()=>require("./index-DptnZ-h8.js")).then(e=>e.index)}exports.Plugin=h;exports.PluginManager=g;exports.getWhiteWebSdkBridgeRuntime=u;exports.loadAppliancePluginBridge=a;
@@ -54,7 +54,7 @@ class g {
54
54
  }
55
55
  }
56
56
  async function d(i) {
57
- return c(i), import("./index-_3yxgNoj.mjs").then((t) => t.$);
57
+ return c(i), import("./index-C2tUvh2a.mjs").then((t) => t.Z);
58
58
  }
59
59
  export {
60
60
  g as P,
package/dist/bridge.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bridge-CskJoX5M.js");exports.Plugin=e.Plugin;exports.loadAppliancePluginBridge=e.loadAppliancePluginBridge;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bridge-B7BW1lpB.js");exports.Plugin=e.Plugin;exports.loadAppliancePluginBridge=e.loadAppliancePluginBridge;
package/dist/bridge.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as i, l as e } from "./bridge-rKHCYJ6m.mjs";
1
+ import { a as i, l as e } from "./bridge-DQud78k4.mjs";
2
2
  export {
3
3
  i as Plugin,
4
4
  e as loadAppliancePluginBridge
@@ -1,7 +1,6 @@
1
1
  import type { EPostMessageType, EToolsKey, EventMessageType, EventWorkState } from "../core/enum";
2
2
  import type { ShapeOptions } from "../core/tools";
3
3
  import type { IUpdateNodeOpt, IworkId } from "../core/types";
4
- import type { AffineMatrix } from "../core/utils/affineMatrix";
5
4
  import type { _ObjectTrue, EmitEventType } from "../plugin/types";
6
5
  export declare type DiffOneView<ISerializableStorageViewData> = {
7
6
  oldValue?: ISerializableStorageViewData;
@@ -66,8 +65,6 @@ export interface INormalPushMsg {
66
65
  requestId?: string;
67
66
  /** selector 事件专用:当前选中操作的生命周期 */
68
67
  workState?: EventWorkState;
69
- /** Live selector transform for the text editor overlay. */
70
- previewMatrix?: AffineMatrix;
71
68
  }
72
69
  export interface INormalStorageData {
73
70
  [key: string]: IStorageValueItem | undefined;
@@ -1,6 +1,5 @@
1
1
  import { EDataType, EventWorkState, IUpdateNodeOpt } from "../../core";
2
2
  import { BaseShapeOptions } from "../../core/tools";
3
- import type { AffineMatrix } from "../../core/utils/affineMatrix";
4
3
  import type { EmitEventType } from "../../plugin/types";
5
4
  export declare enum ETextEditorType {
6
5
  Text = 1,
@@ -10,8 +9,6 @@ export type VerticalAlignType = "top" | "middle" | "bottom";
10
9
  export type TextAlignType = "left" | "center" | "right";
11
10
  export type FontWeightType = "bold" | "normal";
12
11
  export type FontStyleType = "italic" | "normal";
13
- export declare const TextDefaultLineHeightRatio = 1.2;
14
- export declare function getTextLineHeight(fontSize: number, lineHeight?: number): number;
15
12
  export interface TextOptions extends BaseShapeOptions {
16
13
  fontColor: string;
17
14
  fontSize: number;
@@ -50,8 +47,6 @@ export type TextEditorInfo = {
50
47
  canSync?: boolean;
51
48
  dataType?: EDataType;
52
49
  translate?: [number, number];
53
- /** Selector gesture transform, used only for the live DOM preview. */
54
- previewMatrix?: AffineMatrix;
55
50
  justLocal?: boolean;
56
51
  updateNodeOpt?: IUpdateNodeOpt;
57
52
  requestId?: string;
@@ -7,6 +7,7 @@ import { EDataType } from "../enum";
7
7
  import { SubTopThread } from "./subTopThread";
8
8
  import { SubLocalThread } from "./subLocalThread";
9
9
  import { SubServiceThread } from "./subServiceThread";
10
+ import { ImageOptions } from "../tools/image";
10
11
  import type { MainThreadRenderMode } from "../../plugin/renderingCompatibility";
11
12
  export type ICanvasOptionType = IOffscreenCanvasOptionType;
12
13
  export interface IMainThreadInitOption {
@@ -80,6 +81,7 @@ export declare class MainThreadEngineImpl implements MainThreadEngine {
80
81
  private imageResolveMap;
81
82
  constructor(viewId: string, opt: IMainThreadInitOption);
82
83
  getCachedImages(imageSrc: string): HTMLImageElement | ImageBitmap | undefined;
84
+ getImageSourceKey(opt: ImageOptions): string | undefined;
83
85
  getCachedImagesByWorkId(workId: string): HTMLImageElement | ImageBitmap | undefined;
84
86
  deleteCachedImagesByWorkId(workId: string): void;
85
87
  clearCacheImages(): void;
@@ -93,7 +95,9 @@ export declare class MainThreadEngineImpl implements MainThreadEngine {
93
95
  updateDpr(dpr: number): void;
94
96
  on(msg: IWorkerMessage): Promise<void>;
95
97
  private getIconSize;
96
- loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId" | "requestId">): Promise<HTMLImageElement | ImageBitmap | undefined>;
98
+ loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId" | "requestId"> & {
99
+ timeoutMs?: number;
100
+ }): Promise<HTMLImageElement | ImageBitmap | undefined>;
97
101
  private removeNode;
98
102
  consumeFull(type: EDataType, data: IWorkerMessage): Promise<void>;
99
103
  setCameraOpt(cameraOpt: ICameraOpt): void;
@@ -2,7 +2,7 @@ import { Group } from "spritejs";
2
2
  import { IMainThreadInitOption } from "./base";
3
3
  import { MasterControlForWorker } from "../mainEngine";
4
4
  import { IActiveToolsDataType, IBatchMainMessage, ICameraOpt, IRectType, IWorkerMessage } from "../types";
5
- import { BaseShapeTool } from "../tools/base";
5
+ import type { BaseShapeTool } from "../tools/base";
6
6
  import type { ImageShape } from "../tools/image";
7
7
  import { TextShape } from "../tools/text";
8
8
  import { ISvgShadowShape } from "../tools/shadowSvg";
@@ -37,10 +37,9 @@ export declare class SnapshotThreadImpl {
37
37
  loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId" | "requestId">): Promise<HTMLImageElement | ImageBitmap | undefined>;
38
38
  createWorkShapeNode(opt: IActiveToolsDataType & {
39
39
  workId: string;
40
- }): TextShape | import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools/pencilEraser").PencilEraserShape | import("../tools").BitMapEraserShape | import("../tools").SelectorShape | ImageShape | ISvgShadowShape | undefined;
40
+ }): TextShape | import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools").BitMapEraserShape | import("../tools/pencilEraser").PencilEraserShape | import("../tools").SelectorShape | ImageShape | ISvgShadowShape | undefined;
41
41
  setFullWork(data: Pick<IWorkerMessage, "workId" | "opt" | "toolsType">): BaseShapeTool | undefined;
42
42
  runFullWork(data: IWorkerMessage): Promise<IRectType | undefined>;
43
- private syncMatrixRect;
44
43
  private getSnapshot;
45
44
  private getSceneRect;
46
45
  private getRectImageBitmap;
@@ -1,6 +1,5 @@
1
1
  import { IActiveToolsDataType, IWorkerMessage, IMainMessage, IUpdateSelectorPropsType, IBatchMainMessage, BaseNodeMapItem } from "../types";
2
- import type { BaseShapeOptions, SelectorShape, ImageShape, ShapeToolsClass } from "../tools";
3
- import { BaseShapeTool } from "../tools/base";
2
+ import type { BaseShapeTool, BaseShapeOptions, SelectorShape, ImageShape, ShapeToolsClass } from "../tools";
4
3
  import { MainThreadEngineImpl, ISubThreadInitOption } from "./base";
5
4
  import { VNodeManager } from "../vNodeManager";
6
5
  import { EToolsKey } from "../enum";
@@ -53,7 +52,6 @@ export interface SubLocalThread {
53
52
  opt: BaseShapeOptions;
54
53
  toolsType: EToolsKey;
55
54
  ops?: string;
56
- previewMatrix?: BaseNodeMapItem["previewMatrix"];
57
55
  }>;
58
56
  smoothSync?: boolean;
59
57
  }) => void;
@@ -91,7 +89,6 @@ export declare class SubLocalMainThreadImpl implements SubLocalThread {
91
89
  opt: BaseShapeOptions;
92
90
  toolsType: EToolsKey;
93
91
  ops?: string | undefined;
94
- previewMatrix?: BaseNodeMapItem["previewMatrix"];
95
92
  }>;
96
93
  smoothSync?: boolean;
97
94
  }) => void) | undefined;
@@ -132,5 +129,5 @@ export declare class SubLocalMainThreadImpl implements SubLocalThread {
132
129
  setWorkOptions(workId: string, opt: BaseShapeOptions): void;
133
130
  createWorkShapeNode(opt: IActiveToolsDataType & {
134
131
  workId: string;
135
- }): TextShape | import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools").LaserPenShape | import("../tools").EraserShape | PencilEraserShape | BitMapEraserShape | SelectorShape | ImageShape | ISvgShadowShape | undefined;
132
+ }): TextShape | import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools").LaserPenShape | import("../tools").EraserShape | BitMapEraserShape | PencilEraserShape | SelectorShape | ImageShape | ISvgShadowShape | undefined;
136
133
  }
@@ -22,6 +22,8 @@ export declare class SubServiceMainThreadImpl implements SubServiceThread {
22
22
  private syncUnitTime;
23
23
  private readonly animationScheduler;
24
24
  private readonly effectScheduler;
25
+ private readonly imageRecovery;
26
+ private readonly readyImages;
25
27
  constructor(opt: ISubThreadInitOption);
26
28
  loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId" | "requestId">): Promise<HTMLImageElement | ImageBitmap | undefined>;
27
29
  destroy(): void;
@@ -38,7 +40,6 @@ export declare class SubServiceMainThreadImpl implements SubServiceThread {
38
40
  private runAnimation;
39
41
  flush(): Promise<void>;
40
42
  private hasDiffData;
41
- private syncMatrixRect;
42
43
  private activeWorkShape;
43
44
  private removeNode;
44
45
  private removeSelectWork;
@@ -33,7 +33,7 @@ export declare class SubTopThreadImpl implements SubTopThread {
33
33
  constructor(opt: ISubThreadInitOption);
34
34
  createLocalWork(data: IWorkerMessage): void;
35
35
  getLocalWorkShape(workId: string): ILocalWorkItem | undefined;
36
- createLocalWorkShape(workId: string, opt?: BaseShapeOptions): import("../tools/text").TextShape | import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools/pencilEraser").PencilEraserShape | import("../tools").BitMapEraserShape | import("../tools").SelectorShape | import("../tools").ImageShape | import("../tools/shadowSvg").ISvgShadowShape | undefined;
36
+ createLocalWorkShape(workId: string, opt?: BaseShapeOptions): import("../tools/text").TextShape | import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools").BitMapEraserShape | import("../tools/pencilEraser").PencilEraserShape | import("../tools").SelectorShape | import("../tools").ImageShape | import("../tools/shadowSvg").ISvgShadowShape | undefined;
37
37
  canUseTopLayer(toolsType: EToolsKey): toolsType is EToolsKey.LaserPen;
38
38
  destroy(): void;
39
39
  clearAll(): void;
@@ -42,7 +42,7 @@ export declare class SubTopThreadImpl implements SubTopThread {
42
42
  getToolsOpt(): IActiveToolsDataType | undefined;
43
43
  createWorkShapeNode(opt: IActiveToolsDataType & {
44
44
  workId: string;
45
- }): import("../tools/text").TextShape | import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools/pencilEraser").PencilEraserShape | import("../tools").BitMapEraserShape | import("../tools").SelectorShape | import("../tools").ImageShape | import("../tools/shadowSvg").ISvgShadowShape | undefined;
45
+ }): import("../tools/text").TextShape | import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools").BitMapEraserShape | import("../tools/pencilEraser").PencilEraserShape | import("../tools").SelectorShape | import("../tools").ImageShape | import("../tools/shadowSvg").ISvgShadowShape | undefined;
46
46
  private setNodeKey;
47
47
  private activeServiceWorkShape;
48
48
  private computNextAnimationIndex;