@netless/appliance-plugin 1.0.3 → 1.0.6
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/cdn/cdn.js +1 -1
- package/cdn/fullWorker-B41ROv.js +437 -0
- package/cdn/subWorker-D3x__X.js +437 -0
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/collector/utils/color.d.ts +1 -1
- package/dist/core/mainEngine.d.ts +2 -2
- package/dist/core/mainThread/subTopThread.d.ts +1 -1
- package/dist/core/msgEvent/setColor/forMain.d.ts +3 -1
- package/dist/core/tools/arrow.d.ts +2 -0
- package/dist/core/tools/ellipse.d.ts +2 -0
- package/dist/core/tools/polygon.d.ts +2 -0
- package/dist/core/tools/rectangle.d.ts +2 -0
- package/dist/core/tools/selector.d.ts +10 -0
- package/dist/core/tools/speechBalloon.d.ts +2 -1
- package/dist/core/tools/star.d.ts +2 -0
- package/dist/core/tools/straight.d.ts +2 -0
- package/dist/core/types.d.ts +1 -0
- package/dist/core/utils/spriteNode.d.ts +1 -1
- package/dist/core/worker/subWorkerTopLayer.d.ts +1 -1
- package/dist/displayer/floatBar/index.d.ts +2 -2
- package/dist/displayer/floatBar/resizable/index.d.ts +1 -1
- package/dist/displayer/types.d.ts +3 -2
- package/dist/fullWorker.js +108 -108
- package/dist/index-BUV3AIdR.js +1 -0
- package/dist/index-BwY-Y-lK.js +1 -0
- package/dist/{index-RCWmSJU4.mjs → index-DDd3tlz2.mjs} +3949 -3780
- package/dist/{index-RcUgPE7z.mjs → index-D_EDUBFF.mjs} +2233 -2128
- package/dist/plugin/baseApplianceManager.d.ts +0 -1
- package/dist/plugin/baseViewContainerManager.d.ts +0 -2
- package/dist/plugin/const.d.ts +3 -0
- package/dist/plugin/displayerView.d.ts +1 -1
- package/dist/plugin/single/applianceSingleManager.d.ts +0 -1
- package/dist/plugin/types.d.ts +16 -3
- package/dist/style.css +1 -1
- package/dist/subWorker.js +108 -108
- package/dist/undo/index.d.ts +0 -1
- package/package.json +6 -7
- package/cdn/fullWorker-uIttd_.js +0 -437
- package/cdn/subWorker-4wkCzC.js +0 -437
- package/dist/index-BdHH_zhp.js +0 -1
- package/dist/index-a-uKt6aD.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-BUV3AIdR.js");exports.ActiveContainerType=e.ActiveContainerType;exports.ApplianceMultiPlugin=e.ApplianceMultiPlugin;exports.ApplianceNames=e.ApplianceNames;exports.ApplianceSigleWrapper=e.ApplianceSigleWrapper;exports.ApplianceSinglePlugin=e.ApplianceSinglePlugin;exports.ECanvasContextType=e.ECanvasContextType;exports.ECanvasShowType=e.ECanvasShowType;exports.EDataType=e.EDataType;exports.EMatrixrRelationType=e.EMatrixrRelationType;exports.EPostMessageType=e.EPostMessageType;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.EvevtWorkState=e.EvevtWorkState;exports.EvevtWorkType=e.EvevtWorkType;exports.InternalMsgEmitterType=e.InternalMsgEmitterType;exports.ShapeType=e.ShapeType;exports.fullWorkerUrl=e.fullWorker;exports.subWorkerUrl=e.subWorker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a1 as s, W as p, Z as t, Y as l, X as r, a2 as n, a3 as y, j as E, N as i, h as T, E as o, l as v, f as g, a5 as S, K as c, a4 as k, k as W, a6 as u, a0 as A, $ as M, R as m, U as C } from "./index-DDd3tlz2.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as ActiveContainerType,
|
|
4
4
|
p as ApplianceMultiPlugin,
|
|
@@ -28,4 +28,4 @@ export declare function hexToRgba(hex: string, opacity?: number): string;
|
|
|
28
28
|
export declare function rgbToRgba(r: number, g: number, b: number, opacity?: number): string;
|
|
29
29
|
export declare function colorRGBA2Hex(color: string): [string, number];
|
|
30
30
|
export declare function colorRGBA2Array(color: string): [number, number, number, number];
|
|
31
|
-
export declare function isTransparent(color: string):
|
|
31
|
+
export declare function isTransparent(color: string): color is "transparent";
|
|
@@ -165,7 +165,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
165
165
|
/** 完整的绘制 */
|
|
166
166
|
isFullWork: boolean;
|
|
167
167
|
viewId: string;
|
|
168
|
-
opt?: BaseShapeOptions
|
|
168
|
+
opt?: BaseShapeOptions;
|
|
169
169
|
}>;
|
|
170
170
|
private correctStorage;
|
|
171
171
|
originalEventLintener(workState: EvevtWorkState, point: [number, number], viewId: string): Promise<void>;
|
|
@@ -207,6 +207,6 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
207
207
|
completeImageUpload(uuid: string, src: string): void;
|
|
208
208
|
getImagesInformation(scenePath: string): ImageInformation[];
|
|
209
209
|
setShapeSelectorByWorkId(workId: string, viewId: string): void;
|
|
210
|
-
blurSelector(viewId: string, scenePath: string): void;
|
|
210
|
+
blurSelector(viewId: string, scenePath: string, workId?: string): void;
|
|
211
211
|
consoleWorkerInfo(): void;
|
|
212
212
|
}
|
|
@@ -34,7 +34,7 @@ export declare class SubTopThreadImpl implements SubTopThread {
|
|
|
34
34
|
createLocalWork(data: IWorkerMessage): void;
|
|
35
35
|
getLocalWorkShape(workId: string): ILocalWorkItem | undefined;
|
|
36
36
|
createLocalWorkShape(workId: string, opt?: BaseShapeOptions): import("../tools").PencilShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools").StarShape | import("../tools/text").TextShape | import("../tools").SelectorShape | import("../tools").ImageShape | import("../tools").ArrowShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | undefined;
|
|
37
|
-
canUseTopLayer(toolsType: EToolsKey):
|
|
37
|
+
canUseTopLayer(toolsType: EToolsKey): toolsType is EToolsKey.LaserPen;
|
|
38
38
|
destroy(): void;
|
|
39
39
|
clearAll(): void;
|
|
40
40
|
consumeDraw(data: IWorkerMessage): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmitEventType } from "../../../plugin/types";
|
|
1
|
+
import { EStrokeType, EmitEventType } from "../../../plugin/types";
|
|
2
2
|
import { BaseMsgMethod } from "../base";
|
|
3
3
|
import { IworkId } from "../../types";
|
|
4
4
|
import { EvevtWorkState } from "../../enum";
|
|
@@ -8,6 +8,8 @@ export type SetColorNodeEmtData = {
|
|
|
8
8
|
fillColor?: string;
|
|
9
9
|
fontColor?: string;
|
|
10
10
|
fontBgColor?: string;
|
|
11
|
+
thickness?: number;
|
|
12
|
+
strokeType?: EStrokeType;
|
|
11
13
|
workState: EvevtWorkState;
|
|
12
14
|
viewId: string;
|
|
13
15
|
};
|
|
@@ -4,9 +4,11 @@ import { Point2d } from "../utils/primitives/Point2d";
|
|
|
4
4
|
import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
6
6
|
import { ShapeNodes } from "./utils";
|
|
7
|
+
import { EStrokeType } from "../../plugin/types";
|
|
7
8
|
export interface ArrowOptions extends BaseShapeOptions {
|
|
8
9
|
thickness: number;
|
|
9
10
|
strokeColor: string;
|
|
11
|
+
strokeType: EStrokeType;
|
|
10
12
|
}
|
|
11
13
|
export declare class ArrowShape extends BaseShapeTool {
|
|
12
14
|
readonly canRotate: boolean;
|
|
@@ -4,10 +4,12 @@ import { Point2d } from "../utils/primitives/Point2d";
|
|
|
4
4
|
import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
6
6
|
import { ShapeNodes } from "./utils";
|
|
7
|
+
import { EStrokeType } from "../../plugin/types";
|
|
7
8
|
export interface EllipseOptions extends BaseShapeOptions {
|
|
8
9
|
thickness: number;
|
|
9
10
|
strokeColor: string;
|
|
10
11
|
fillColor: string;
|
|
12
|
+
strokeType: EStrokeType;
|
|
11
13
|
}
|
|
12
14
|
export declare class EllipseShape extends BaseShapeTool {
|
|
13
15
|
readonly canRotate: boolean;
|
|
@@ -4,11 +4,13 @@ import { Point2d } from "../utils/primitives/Point2d";
|
|
|
4
4
|
import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
6
6
|
import { ShapeNodes } from "./utils";
|
|
7
|
+
import { EStrokeType } from "../../plugin/types";
|
|
7
8
|
export interface PolygonOptions extends BaseShapeOptions {
|
|
8
9
|
thickness: number;
|
|
9
10
|
vertices: number;
|
|
10
11
|
strokeColor: string;
|
|
11
12
|
fillColor: string;
|
|
13
|
+
strokeType: EStrokeType;
|
|
12
14
|
}
|
|
13
15
|
export declare class PolygonShape extends BaseShapeTool {
|
|
14
16
|
readonly canRotate: boolean;
|
|
@@ -4,10 +4,12 @@ import { Point2d } from "../utils/primitives/Point2d";
|
|
|
4
4
|
import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
6
6
|
import { ShapeNodes } from "./utils";
|
|
7
|
+
import { EStrokeType } from "../../plugin/types";
|
|
7
8
|
export interface RectangleOptions extends BaseShapeOptions {
|
|
8
9
|
thickness: number;
|
|
9
10
|
strokeColor: string;
|
|
10
11
|
fillColor: string;
|
|
12
|
+
strokeType: EStrokeType;
|
|
11
13
|
}
|
|
12
14
|
export declare class RectangleShape extends BaseShapeTool {
|
|
13
15
|
readonly canRotate: boolean;
|
|
@@ -8,6 +8,7 @@ import { TextOptions } from "../../component/textEditor/types";
|
|
|
8
8
|
import { LocalWorkForFullWorker } from "../worker/fullWorkerLocal";
|
|
9
9
|
import { ShapeOptType } from "../../displayer/types";
|
|
10
10
|
import type { SubLocalThread } from "../mainThread/subLocalThread";
|
|
11
|
+
import { EStrokeType } from "../../plugin";
|
|
11
12
|
export interface SelectorOptions extends BaseShapeOptions {
|
|
12
13
|
}
|
|
13
14
|
export declare class SelectorShape extends BaseShapeTool {
|
|
@@ -29,6 +30,9 @@ export declare class SelectorShape extends BaseShapeTool {
|
|
|
29
30
|
shapeOpt?: ShapeOptType;
|
|
30
31
|
textOpt?: TextOptions;
|
|
31
32
|
isLocked?: boolean;
|
|
33
|
+
thickness?: number;
|
|
34
|
+
strokeType?: EStrokeType;
|
|
35
|
+
useStroke?: boolean;
|
|
32
36
|
constructor(props: BaseShapeToolProps);
|
|
33
37
|
private computSelector;
|
|
34
38
|
private updateTempPoints;
|
|
@@ -62,6 +66,9 @@ export declare class SelectorShape extends BaseShapeTool {
|
|
|
62
66
|
isLocked: boolean | undefined;
|
|
63
67
|
toolsTypes: EToolsKey[] | undefined;
|
|
64
68
|
shapeOpt: ShapeOptType | undefined;
|
|
69
|
+
thickness: number | undefined;
|
|
70
|
+
useStroke: boolean | undefined;
|
|
71
|
+
strokeType: EStrokeType | undefined;
|
|
65
72
|
};
|
|
66
73
|
consumeAll(): {
|
|
67
74
|
workId: string;
|
|
@@ -85,6 +92,9 @@ export declare class SelectorShape extends BaseShapeTool {
|
|
|
85
92
|
isLocked: boolean | undefined;
|
|
86
93
|
toolsTypes: EToolsKey[] | undefined;
|
|
87
94
|
shapeOpt: ShapeOptType | undefined;
|
|
95
|
+
thickness: number | undefined;
|
|
96
|
+
useStroke: boolean | undefined;
|
|
97
|
+
strokeType: EStrokeType | undefined;
|
|
88
98
|
} | {
|
|
89
99
|
type: EPostMessageType;
|
|
90
100
|
};
|
|
@@ -3,13 +3,14 @@ import { EDataType, EPostMessageType, EScaleType, EToolsKey } from "../enum";
|
|
|
3
3
|
import { Point2d } from "../utils/primitives/Point2d";
|
|
4
4
|
import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
6
|
-
import
|
|
6
|
+
import { EStrokeType, SpeechBalloonPlacement } from "../../plugin/types";
|
|
7
7
|
import { ShapeNodes } from "./utils";
|
|
8
8
|
export interface SpeechBalloonOptions extends BaseShapeOptions {
|
|
9
9
|
thickness: number;
|
|
10
10
|
placement: SpeechBalloonPlacement;
|
|
11
11
|
strokeColor: string;
|
|
12
12
|
fillColor: string;
|
|
13
|
+
strokeType: EStrokeType;
|
|
13
14
|
}
|
|
14
15
|
export declare class SpeechBalloonShape extends BaseShapeTool {
|
|
15
16
|
readonly canRotate: boolean;
|
|
@@ -4,6 +4,7 @@ import { Point2d } from "../utils/primitives/Point2d";
|
|
|
4
4
|
import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
6
6
|
import { ShapeNodes } from "./utils";
|
|
7
|
+
import { EStrokeType } from "../../plugin/types";
|
|
7
8
|
export interface StarOptions extends BaseShapeOptions {
|
|
8
9
|
thickness: number;
|
|
9
10
|
vertices: number;
|
|
@@ -11,6 +12,7 @@ export interface StarOptions extends BaseShapeOptions {
|
|
|
11
12
|
innerRatio: number;
|
|
12
13
|
strokeColor: string;
|
|
13
14
|
fillColor: string;
|
|
15
|
+
strokeType: EStrokeType;
|
|
14
16
|
}
|
|
15
17
|
export declare class StarShape extends BaseShapeTool {
|
|
16
18
|
readonly canRotate: boolean;
|
|
@@ -4,9 +4,11 @@ import { Point2d } from "../utils/primitives/Point2d";
|
|
|
4
4
|
import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base";
|
|
5
5
|
import { VNodeManager } from "../vNodeManager";
|
|
6
6
|
import { ShapeNodes } from "./utils";
|
|
7
|
+
import { EStrokeType } from "../../plugin/types";
|
|
7
8
|
export interface StraightOptions extends BaseShapeOptions {
|
|
8
9
|
thickness: number;
|
|
9
10
|
strokeColor: string;
|
|
11
|
+
strokeType: EStrokeType;
|
|
10
12
|
}
|
|
11
13
|
export declare class StraightShape extends BaseShapeTool {
|
|
12
14
|
readonly canRotate: boolean;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Group, Node, Path } from "spritejs";
|
|
2
2
|
import { BaseNodeMapItem } from "../types";
|
|
3
3
|
export declare const isSealedGroup: (group: Group | Path | Node) => boolean;
|
|
4
|
-
export declare const isRenderNode: (param: Pick<BaseNodeMapItem,
|
|
4
|
+
export declare const isRenderNode: (param: Pick<BaseNodeMapItem, "isHid">) => boolean;
|
|
@@ -26,7 +26,7 @@ export declare class TopLayerWorkForSubWorker implements TopLayerWork {
|
|
|
26
26
|
private syncUnitTime;
|
|
27
27
|
protected animationId?: number | undefined;
|
|
28
28
|
constructor(opt: ISubWorkerInitOption);
|
|
29
|
-
canUseTopLayer(toolsType: EToolsKey):
|
|
29
|
+
canUseTopLayer(toolsType: EToolsKey): toolsType is EToolsKey.LaserPen;
|
|
30
30
|
getWorkShape(workId: string): ILocalWorkItem | undefined;
|
|
31
31
|
createWorkShape(workId: string, opt?: BaseShapeOptions): import("../tools").PencilShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools").StarShape | import("../tools/text").TextShape | import("../tools").SelectorShape | import("../tools").ImageShape | import("../tools").ArrowShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | undefined;
|
|
32
32
|
setWorkOptions(workId: string, opt: BaseShapeOptions): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextEditorInfo } from "../../component/textEditor";
|
|
3
3
|
export declare const FloatBar: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
4
|
-
editors?: Map<string, TextEditorInfo
|
|
5
|
-
activeTextId?: string
|
|
4
|
+
editors?: Map<string, TextEditorInfo>;
|
|
5
|
+
activeTextId?: string;
|
|
6
6
|
} & React.RefAttributes<HTMLDivElement>>>;
|
|
@@ -9,7 +9,7 @@ export declare const ResizableTwoBtn: (props: {
|
|
|
9
9
|
y: number;
|
|
10
10
|
};
|
|
11
11
|
pointMap: Map<string, [number, number][]>;
|
|
12
|
-
type:
|
|
12
|
+
type: "start" | "end";
|
|
13
13
|
}) => React.JSX.Element;
|
|
14
14
|
export declare const ResizableTwoBox: (props: {
|
|
15
15
|
className: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TextOptions } from "../component/textEditor";
|
|
3
2
|
import { EScaleType, EToolsKey } from "../core";
|
|
4
|
-
import { SpeechBalloonPlacement } from "../plugin/types";
|
|
3
|
+
import { EStrokeType, SpeechBalloonPlacement } from "../plugin/types";
|
|
5
4
|
export type Color = [number, number, number];
|
|
6
5
|
export type ShowFloatBarMsgValue = {
|
|
7
6
|
x: number;
|
|
@@ -27,6 +26,8 @@ export type ShowFloatBarMsgValue = {
|
|
|
27
26
|
points?: [number, number][];
|
|
28
27
|
shapeOpt?: ShapeOptType;
|
|
29
28
|
toolsTypes?: Array<EToolsKey>;
|
|
29
|
+
strokeType?: EStrokeType;
|
|
30
|
+
useStroke?: boolean;
|
|
30
31
|
};
|
|
31
32
|
export type SubButProps = {
|
|
32
33
|
open: boolean;
|