@netless/appliance-plugin 1.1.39 → 1.1.41
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/README.md +31 -0
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/{bridge-CYWXPQ84.mjs → bridge-BNKS_R2l.mjs} +1 -1
- package/dist/{bridge-CHAFBa3k.js → bridge-BxkfdTkq.js} +1 -1
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/component/backgroundImageLoadCoordinator.d.ts +61 -0
- package/dist/component/svg/base.d.ts +2 -0
- package/dist/component/svg/svgElemt.d.ts +3 -1
- package/dist/component/svg/types.d.ts +2 -0
- package/dist/component/textEditor/utils.d.ts +1 -0
- package/dist/core/currentSceneGuard.d.ts +14 -0
- package/dist/core/initReadyBarrier.d.ts +8 -0
- package/dist/core/mainEngine.d.ts +4 -2
- package/dist/core/mainThread/base.d.ts +4 -3
- package/dist/core/mainThread/lifecycle.d.ts +14 -0
- package/dist/core/mainThread/snapshotThread.d.ts +3 -3
- package/dist/core/mainThread/subLocalThread.d.ts +1 -1
- package/dist/core/mainThread/subServiceThread.d.ts +1 -1
- package/dist/fullWorker.js +78 -78
- package/dist/{index-C7gY405v.mjs → index-Bellzj9L.mjs} +234 -210
- package/dist/{index-CcC63woo.js → index-BoGQFZPO.js} +1 -1
- package/dist/index-BpI4eSla.js +1 -0
- package/dist/{index-b8vebU--.mjs → index-BwKNcV3h.mjs} +95 -70
- package/dist/{index-BZgfPcL0.js → index-C4uTXXaR.js} +1 -1
- package/dist/{index-CYV4mPpp.mjs → index-COQOIflN.mjs} +13078 -12701
- package/dist/index-DjDB-MYx.js +570 -0
- package/dist/{index-CR1hkggk.mjs → index-Doaj3rDL.mjs} +95 -70
- package/dist/index-DrGUJkFH.js +570 -0
- package/dist/index-SwxjyKCD.js +1 -0
- package/dist/{index-cYVyBD7Q.mjs → index-WMF2MmW5.mjs} +10376 -9964
- package/dist/{index-C8KlJXk3.mjs → index-z4Oul31S.mjs} +221 -201
- package/dist/plugin/backgroundImageQuery.d.ts +4 -0
- package/dist/plugin/baseApplianceManager.d.ts +4 -0
- package/dist/plugin/sceneChangeProgress.d.ts +7 -0
- package/dist/plugin/types.d.ts +26 -1
- package/dist/subWorker.js +77 -77
- package/package.json +10 -5
- package/dist/index-BPWZCEwU.js +0 -1
- package/dist/index-YgdyZP_3.js +0 -1
- package/dist/index-dVlV22UP.js +0 -570
- package/dist/index-gq2ek7io.js +0 -570
package/README.md
CHANGED
|
@@ -789,6 +789,37 @@ plugin.insertBackgroundImage(viewId, {
|
|
|
789
789
|
})
|
|
790
790
|
```
|
|
791
791
|
|
|
792
|
+
##### Query Background Image
|
|
793
|
+
|
|
794
|
+
Query whether an appliance background image with the exact persisted URL exists
|
|
795
|
+
in a specific view and scene. This API does not depend on the internally
|
|
796
|
+
generated UUID.
|
|
797
|
+
|
|
798
|
+
```ts
|
|
799
|
+
const exists = plugin.hasBackgroundImage({
|
|
800
|
+
viewId: 'mainView',
|
|
801
|
+
scenePath: '/init',
|
|
802
|
+
imageUrl: 'https://example.com/background.png',
|
|
803
|
+
sources: ['appliance'],
|
|
804
|
+
});
|
|
805
|
+
|
|
806
|
+
if (!exists) {
|
|
807
|
+
plugin.insertBackgroundImage('mainView', {
|
|
808
|
+
src: 'https://example.com/background.png',
|
|
809
|
+
uuid: `background-image-${Date.now()}`,
|
|
810
|
+
centerX: 0,
|
|
811
|
+
centerY: 0,
|
|
812
|
+
width: 200,
|
|
813
|
+
height: 200,
|
|
814
|
+
locked: true,
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
`imageUrl` is compared with the stored original `src` using strict string
|
|
820
|
+
equality, including query parameters and fragments. The appliance provider only
|
|
821
|
+
participates when `sources` contains `"appliance"`.
|
|
822
|
+
|
|
792
823
|
##### Handwriting graphics automatic association function:`autoDraw`, need to combine [@netless/appliance-extend-auto-draw-plugin](https://www.npmjs.com/package/@netless/appliance-extend-auto-draw-plugin)
|
|
793
824
|
```js
|
|
794
825
|
export interface AutoDrawOptions {
|
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-DrGUJkFH.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.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.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.WorkerCanvasContextBlacklistLevel=e.WorkerCanvasContextBlacklistLevel;exports.WorkerImageBitmapFeatureBlacklistLevel=e.WorkerImageBitmapFeatureBlacklistLevel;exports.WorkerMaskTextureFormatBlacklistLevel=e.WorkerMaskTextureFormatBlacklistLevel;exports.WorkerMaskTextureUploadBlacklistLevel=e.WorkerMaskTextureUploadBlacklistLevel;exports.WorkerRenderModeBlacklistLevel=e.WorkerRenderModeBlacklistLevel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as s, J as r, K as t, L as l, N as p, P as i, C as n, p as o, b as T, Q as E, w as y, z as k, R as v, a as c, U as g, d as u, W as m, X as S, c as M, Y as W, E as d, Z as C, e as I, e as _, _ as A, u as B, $ as L, a0 as P, T as x, a1 as R, a2 as F, a3 as w, a4 as N, a5 as h } from "./index-
|
|
1
|
+
import { I as s, J as r, K as t, L as l, N as p, P as i, C as n, p as o, b as T, Q as E, w as y, z as k, R as v, a as c, U as g, d as u, W as m, X as S, c as M, Y as W, E as d, Z as C, e as I, e as _, _ as A, u as B, $ as L, a0 as P, T as x, a1 as R, a2 as F, a3 as w, a4 as N, a5 as h } from "./index-WMF2MmW5.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as ActiveContainerType,
|
|
4
4
|
r as ApplianceMultiPlugin,
|
|
@@ -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-
|
|
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-DjDB-MYx.js")).then(e=>e.index)}exports.Plugin=h;exports.PluginManager=g;exports.getWhiteWebSdkBridgeRuntime=u;exports.loadAppliancePluginBridge=a;
|
package/dist/bridge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bridge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bridge-BxkfdTkq.js");exports.Plugin=e.Plugin;exports.loadAppliancePluginBridge=e.loadAppliancePluginBridge;
|
package/dist/bridge.mjs
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export type BackgroundImageSource = "appliance" | "whiteSdk";
|
|
2
|
+
export interface BackgroundImageLoadOptions {
|
|
3
|
+
maxRetries?: number;
|
|
4
|
+
timeoutMs?: number;
|
|
5
|
+
retryIntervalMs?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface BackgroundImageLoadEvent {
|
|
8
|
+
name: "backgroundImageLoad";
|
|
9
|
+
state: "success" | "failed" | "cancelled";
|
|
10
|
+
source: BackgroundImageSource;
|
|
11
|
+
resourceId: string;
|
|
12
|
+
resourceUrl: string;
|
|
13
|
+
viewId: string;
|
|
14
|
+
scenePath: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ReloadBackgroundImageParams {
|
|
17
|
+
source: BackgroundImageSource;
|
|
18
|
+
viewId: string;
|
|
19
|
+
scenePath?: string;
|
|
20
|
+
url?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ReloadBackgroundImageResult {
|
|
23
|
+
accepted: boolean;
|
|
24
|
+
reloadedCount: number;
|
|
25
|
+
reason?: "viewNotFound" | "sceneNotFocused" | "resourceNotFound" | "alreadyLoading";
|
|
26
|
+
}
|
|
27
|
+
export interface BackgroundImageLoadTask {
|
|
28
|
+
viewId: string;
|
|
29
|
+
scenePath: string;
|
|
30
|
+
resourceId: string;
|
|
31
|
+
src: string;
|
|
32
|
+
image: HTMLImageElement;
|
|
33
|
+
isActive: () => boolean;
|
|
34
|
+
onReloadUrl?: (url: string) => void;
|
|
35
|
+
}
|
|
36
|
+
export declare function normalizeBackgroundImageLoadOptions(options?: BackgroundImageLoadOptions): Required<BackgroundImageLoadOptions>;
|
|
37
|
+
export declare class BackgroundImageLoadCoordinator {
|
|
38
|
+
private readonly onEvent?;
|
|
39
|
+
private readonly tasks;
|
|
40
|
+
private readonly failedTasks;
|
|
41
|
+
private readonly options;
|
|
42
|
+
private readonly queue;
|
|
43
|
+
private activeAttempts;
|
|
44
|
+
private readonly maxActiveAttempts;
|
|
45
|
+
constructor(options?: BackgroundImageLoadOptions, onEvent?: ((event: BackgroundImageLoadEvent) => void) | undefined);
|
|
46
|
+
load(task: BackgroundImageLoadTask): Promise<void>;
|
|
47
|
+
cancelByViewScene(viewId: string, scenePath?: string): void;
|
|
48
|
+
cancelResource(viewId: string, scenePath: string, resourceId: string): void;
|
|
49
|
+
cancelAll(): void;
|
|
50
|
+
reload(params: ReloadBackgroundImageParams & {
|
|
51
|
+
scenePath: string;
|
|
52
|
+
}): ReloadBackgroundImageResult;
|
|
53
|
+
private keyOf;
|
|
54
|
+
private attempt;
|
|
55
|
+
private enqueue;
|
|
56
|
+
private drain;
|
|
57
|
+
private loadImage;
|
|
58
|
+
private canRun;
|
|
59
|
+
private cancel;
|
|
60
|
+
private emit;
|
|
61
|
+
}
|
|
@@ -27,4 +27,6 @@ export declare function getShapeInstanceForBackgroundThread(param: {
|
|
|
27
27
|
toolsOpt: ISVGOptions;
|
|
28
28
|
vNodes: VBackgroundNodeManager;
|
|
29
29
|
manager: BackgroundThreadEngineImpl | BackgroundSnapshotThreadImpl;
|
|
30
|
+
scenePath: string;
|
|
31
|
+
trackBackgroundImageLoad?: boolean;
|
|
30
32
|
}): ISvgElement | undefined;
|
|
@@ -14,9 +14,11 @@ export declare class ISvgElement {
|
|
|
14
14
|
private isDestroyed;
|
|
15
15
|
private element;
|
|
16
16
|
readonly manager: BackgroundThreadEngineImpl | BackgroundSnapshotThreadImpl;
|
|
17
|
+
readonly scenePath: string;
|
|
18
|
+
private readonly trackBackgroundImageLoad;
|
|
19
|
+
private reloadSourceUrl?;
|
|
17
20
|
get fullLayer(): HTMLDivElement;
|
|
18
21
|
get collector(): Collector | undefined;
|
|
19
|
-
get scenePath(): string | undefined;
|
|
20
22
|
constructor(props: ISVGElementToolProps);
|
|
21
23
|
init(): Promise<void>;
|
|
22
24
|
private createElement;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EToolsKey } from "../../core";
|
|
2
2
|
import { ETextEditorType } from "./types";
|
|
3
3
|
export declare function getTextEditorType(toolsKey: EToolsKey): ETextEditorType | undefined;
|
|
4
|
+
export declare function hasTextContent(value?: string): boolean;
|
|
4
5
|
export declare function escapeCSS(id: string): string;
|
|
5
6
|
export declare function ensureTextEditorCursorTarget(currentDiv: HTMLDivElement): Text | ChildNode;
|
|
6
7
|
export declare function setTextEditorSelectionToEnd(sel: Selection, currentDiv: HTMLDivElement): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CurrentScenePathGetter = (viewId: string) => string | undefined;
|
|
2
|
+
export declare function isCurrentViewScene(viewId: string, scenePath: string | undefined, getCurrentScenePath: CurrentScenePathGetter): boolean;
|
|
3
|
+
export declare function shouldDispatchSceneTask(task: {
|
|
4
|
+
isService: boolean;
|
|
5
|
+
isAllViews: boolean;
|
|
6
|
+
viewId?: string;
|
|
7
|
+
scenePath?: string;
|
|
8
|
+
}, getCurrentScenePath: CurrentScenePathGetter): boolean;
|
|
9
|
+
export declare function getViewTaskDispatchState(task: {
|
|
10
|
+
isService: boolean;
|
|
11
|
+
isAllViews: boolean;
|
|
12
|
+
viewId?: string;
|
|
13
|
+
scenePath?: string;
|
|
14
|
+
}, isViewInitAck: (viewId: string) => boolean, getCurrentScenePath: CurrentScenePathGetter): "dispatch" | "pending" | "discard";
|
|
@@ -194,6 +194,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
194
194
|
private readonly fontFaceManager;
|
|
195
195
|
private isLocalWorkActive;
|
|
196
196
|
private hasMainViewInitAck;
|
|
197
|
+
private readonly mainViewInitReady;
|
|
197
198
|
private serviceSyncReadyViews;
|
|
198
199
|
private mainViewInitAckCallbacks;
|
|
199
200
|
private readonly initAckedViewIds;
|
|
@@ -212,13 +213,14 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
212
213
|
get Logger(): import("..").Logger;
|
|
213
214
|
afterMainViewInitAck(callback: () => void): void;
|
|
214
215
|
get isMainViewInitAck(): boolean;
|
|
216
|
+
waitForMainViewInitAck(timeoutMs?: number): Promise<"ready" | "cancelled" | "timeout">;
|
|
215
217
|
isViewInitAck(viewId: string): boolean;
|
|
216
218
|
private ackMainViewInit;
|
|
217
219
|
private flushPendingTransportInitMessages;
|
|
218
220
|
private getPendingInitMessageKey;
|
|
219
221
|
private pullLatestServiceDataAfterInit;
|
|
220
222
|
private assertMarkmapRuntimeRegistered;
|
|
221
|
-
destroy(): void;
|
|
223
|
+
destroy(preserveInitReady?: boolean): void;
|
|
222
224
|
private get consumeCount();
|
|
223
225
|
private set consumeCount(value);
|
|
224
226
|
private acceptConsumeAck;
|
|
@@ -397,7 +399,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
397
399
|
blurCursor(viewId: string): void;
|
|
398
400
|
sendCursorEvent(p: [number | undefined, number | undefined], viewId: string): void;
|
|
399
401
|
getBoundingRect(scenePath: string): Promise<IRectType> | undefined;
|
|
400
|
-
getSnapshot(scenePath: string, width?: number, height?: number, camera?: Pick<ICameraOpt, "centerX" | "centerY" | "scale">): Promise<(
|
|
402
|
+
getSnapshot(scenePath: string, width?: number, height?: number, camera?: Pick<ICameraOpt, "centerX" | "centerY" | "scale">): Promise<(HTMLImageElement | ImageBitmap | null)[]> | undefined;
|
|
401
403
|
queryTaskBatchData(query: IqueryTask): IWorkerMessage[];
|
|
402
404
|
insertIconify(viewId: string, iconifyInfo: IconifyInformation & {
|
|
403
405
|
strokeColor?: string;
|
|
@@ -62,13 +62,14 @@ export declare class MainThreadEngineImpl implements MainThreadEngine {
|
|
|
62
62
|
private debounceUpdateCameraId?;
|
|
63
63
|
private debounceUpdateCache;
|
|
64
64
|
private mainThreadPostId?;
|
|
65
|
+
private destroyed;
|
|
65
66
|
private combinePostMsg;
|
|
66
67
|
private methodBuilder;
|
|
67
68
|
private cacheImages;
|
|
68
69
|
private imageResolveMap;
|
|
69
70
|
constructor(viewId: string, opt: IMainThreadInitOption);
|
|
70
|
-
getCachedImages(imageSrc: string):
|
|
71
|
-
getCachedImagesByWorkId(workId: string):
|
|
71
|
+
getCachedImages(imageSrc: string): HTMLImageElement | ImageBitmap | undefined;
|
|
72
|
+
getCachedImagesByWorkId(workId: string): HTMLImageElement | ImageBitmap | undefined;
|
|
72
73
|
deleteCachedImagesByWorkId(workId: string): void;
|
|
73
74
|
clearCacheImages(): void;
|
|
74
75
|
clearImageResolveMap(): void;
|
|
@@ -76,7 +77,7 @@ export declare class MainThreadEngineImpl implements MainThreadEngine {
|
|
|
76
77
|
updateDpr(dpr: number): void;
|
|
77
78
|
on(msg: IWorkerMessage): Promise<void>;
|
|
78
79
|
private getIconSize;
|
|
79
|
-
loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<
|
|
80
|
+
loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<HTMLImageElement | ImageBitmap | undefined>;
|
|
80
81
|
private removeNode;
|
|
81
82
|
consumeFull(type: EDataType, data: IWorkerMessage): Promise<void>;
|
|
82
83
|
setCameraOpt(cameraOpt: ICameraOpt): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type Destroyable = {
|
|
2
|
+
destroy(): void;
|
|
3
|
+
};
|
|
4
|
+
type Removable = {
|
|
5
|
+
parent?: unknown;
|
|
6
|
+
remove(): void;
|
|
7
|
+
};
|
|
8
|
+
export declare function destroyMainThreadResources({ subThreads, layers, scene, removeLayerTexture, }: {
|
|
9
|
+
subThreads: Destroyable[];
|
|
10
|
+
layers: Removable[];
|
|
11
|
+
scene: Pick<Removable, "remove">;
|
|
12
|
+
removeLayerTexture: (layer: Removable, parent: unknown) => void;
|
|
13
|
+
}): void;
|
|
14
|
+
export {};
|
|
@@ -18,15 +18,15 @@ export declare class SnapshotThreadImpl {
|
|
|
18
18
|
private cacheImages;
|
|
19
19
|
private imageResolveMap;
|
|
20
20
|
constructor(viewId: string, opt: IMainThreadInitOption);
|
|
21
|
-
getCachedImages(imageSrc: string):
|
|
22
|
-
getCachedImagesByWorkId(workId: string):
|
|
21
|
+
getCachedImages(imageSrc: string): HTMLImageElement | ImageBitmap | undefined;
|
|
22
|
+
getCachedImagesByWorkId(workId: string): HTMLImageElement | ImageBitmap | undefined;
|
|
23
23
|
deleteCachedImagesByWorkId(workId: string): void;
|
|
24
24
|
clearCacheImages(): void;
|
|
25
25
|
clearImageResolveMap(): void;
|
|
26
26
|
post(msg: Omit<IBatchMainMessage, "render">): void;
|
|
27
27
|
on(msg: IWorkerMessage): Promise<void>;
|
|
28
28
|
private getIconSize;
|
|
29
|
-
loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<
|
|
29
|
+
loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<HTMLImageElement | ImageBitmap | undefined>;
|
|
30
30
|
createWorkShapeNode(opt: IActiveToolsDataType & {
|
|
31
31
|
workId: string;
|
|
32
32
|
}): 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;
|
|
@@ -71,7 +71,7 @@ export declare class SubLocalMainThreadImpl implements SubLocalThread {
|
|
|
71
71
|
private combineDrawActiveId?;
|
|
72
72
|
private readonly eraserBatchScheduler;
|
|
73
73
|
constructor(opt: ISubThreadInitOption);
|
|
74
|
-
loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<
|
|
74
|
+
loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<HTMLImageElement | ImageBitmap | undefined>;
|
|
75
75
|
createLocalWork(data: IWorkerMessage): void;
|
|
76
76
|
updateSelector(params: IUpdateSelectorPropsType & {
|
|
77
77
|
callback?: ((props: {
|
|
@@ -22,7 +22,7 @@ export declare class SubServiceMainThreadImpl implements SubServiceThread {
|
|
|
22
22
|
private animationId?;
|
|
23
23
|
private syncUnitTime;
|
|
24
24
|
constructor(opt: ISubThreadInitOption);
|
|
25
|
-
loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<
|
|
25
|
+
loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<HTMLImageElement | ImageBitmap | undefined>;
|
|
26
26
|
destroy(): void;
|
|
27
27
|
clearAll(): void;
|
|
28
28
|
private runEffect;
|