@netless/appliance-plugin 1.0.2 → 1.0.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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Dmq7rqSP.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-a-uKt6aD.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 { $ as s, R as p, X as t, W as l, U as r, a0 as n, a1 as y, l as E, K as i, k as T, E as o, n as v, j as g, a3 as S, I as c, a2 as k, m as W, a4 as m, Z as u, Y as A, O as M, Q as C } from "./index-DmkMw23K.mjs";
1
+ import { W as s, L as p, Q as t, O as l, N as r, X as n, Y as y, j as E, G as i, h as T, E as o, l as v, f as g, $ as S, B as c, Z as k, k as W, a0 as u, U as A, R as M, J as m, K as C } from "./index-RCWmSJU4.mjs";
2
2
  export {
3
3
  s as ActiveContainerType,
4
4
  p as ApplianceMultiPlugin,
@@ -17,9 +17,9 @@ export {
17
17
  c as EmitEventType,
18
18
  k as EventMessageType,
19
19
  W as EvevtWorkState,
20
- m as EvevtWorkType,
21
- u as InternalMsgEmitterType,
22
- A as ShapeType,
23
- M as fullWorkerUrl,
20
+ u as EvevtWorkType,
21
+ A as InternalMsgEmitterType,
22
+ M as ShapeType,
23
+ m as fullWorkerUrl,
24
24
  C as subWorkerUrl
25
25
  };
@@ -1,21 +1,21 @@
1
1
  import { EmitEventType } from "../../../plugin/types";
2
2
  import { BaseMsgMethod } from "../base";
3
- import { IRectType, IworkId } from "../../types";
3
+ import { IworkId } from "../../types";
4
4
  import { EvevtWorkState } from "../../enum";
5
5
  import type { Direction } from "re-resizable/lib/resizer";
6
6
  export type ScaleNodeEmtData = {
7
7
  workIds: IworkId[];
8
8
  workState: EvevtWorkState;
9
- box: IRectType;
10
9
  viewId: string;
11
- dir?: Direction;
12
- reverseY?: boolean;
13
- reverseX?: boolean;
10
+ originPoint: [number, number];
11
+ scenePoint: [number, number];
12
+ dir: Direction;
13
+ scale?: [number, number];
14
+ translate?: [number, number];
14
15
  };
15
16
  export declare class ScaleNodeMethod extends BaseMsgMethod {
16
17
  protected lastEmtData?: ScaleNodeEmtData;
17
18
  readonly emitEventType: EmitEventType;
18
- private targetBox;
19
19
  private targetText;
20
20
  private cacheTextInfo;
21
21
  private setTextStyle;
@@ -14,7 +14,6 @@ export type TranslateNodeEmtData = {
14
14
  export declare class TranslateNodeMethod extends BaseMsgMethod {
15
15
  protected lastEmtData?: TranslateNodeEmtData;
16
16
  readonly emitEventType: EmitEventType;
17
- private undoTickerId?;
18
17
  private cachePosition;
19
18
  collect(data: TranslateNodeEmtData, isSync?: boolean): void;
20
19
  }
@@ -12,7 +12,6 @@ export interface SelectorOptions extends BaseShapeOptions {
12
12
  }
13
13
  export declare class SelectorShape extends BaseShapeTool {
14
14
  readonly toolsType: EToolsKey;
15
- static selectorId: string;
16
15
  static selectorBorderId: string;
17
16
  protected tmpPoints: Array<Point2d>;
18
17
  protected workOptions: BaseShapeOptions;
@@ -32,7 +32,7 @@ export interface CombineConsumeResult {
32
32
  export interface ShapeStateInfo {
33
33
  willClear: boolean;
34
34
  }
35
- export declare function getShapeTools(toolsType: EToolsKey): typeof PencilShape | typeof LaserPenShape | typeof EraserShape | typeof StarShape | typeof TextShape | typeof SelectorShape | typeof ArrowShape | typeof StraightShape | typeof EllipseShape | typeof PolygonShape | typeof RectangleShape | typeof SpeechBalloonShape | typeof ImageShape | undefined;
35
+ export declare function getShapeTools(toolsType: EToolsKey): typeof PencilShape | typeof LaserPenShape | typeof EraserShape | typeof StarShape | typeof TextShape | typeof ArrowShape | typeof StraightShape | typeof EllipseShape | typeof PolygonShape | typeof RectangleShape | typeof SpeechBalloonShape | typeof SelectorShape | typeof ImageShape | undefined;
36
36
  export declare function getShapeInstance(param: {
37
37
  workId: string;
38
38
  toolsType: EToolsKey;
@@ -72,8 +72,6 @@ export interface IUpdateNodeOpt {
72
72
  angle?: number;
73
73
  centralPoint?: [number, number];
74
74
  selectScale?: number[];
75
- boxScale?: [number, number];
76
- boxTranslate?: [number, number];
77
75
  bold?: FontWeightType;
78
76
  italic?: FontStyleType;
79
77
  underline?: boolean;
@@ -50,10 +50,16 @@ export declare function getRectScaleed(rect: IRectType, scale: [number, number])
50
50
  w: number;
51
51
  h: number;
52
52
  };
53
- export declare function getScalePoints(points: Vec2d[], originPos: Vec2d, scale: [number, number]): Vec2d[];
53
+ export declare function getRectScaleWPoint(rect: IRectType, scale: [number, number], point: [number, number]): {
54
+ x: number;
55
+ y: number;
56
+ w: number;
57
+ h: number;
58
+ };
59
+ export declare function getScalePoints(points: Vec2d[], scale: [number, number], originPos: Vec2d): Vec2d[];
54
60
  export declare function getRotatePoints(points: Vec2d[], originPos: Vec2d, angle: number): Vec2d[];
55
61
  export declare function rotatePoints(points: number[], originPos: [number, number], angle: number): void;
56
- export declare function scalePoints(points: number[], originPos: [number, number], scale: [number, number]): void;
62
+ export declare function scalePoints(points: number[], originPos: [number, number], scale: [number, number], transition?: [number, number]): void;
57
63
  export declare function getNodeRect(key: string, layer?: Group, safeBorderPadding?: number): IRectType | undefined;
58
64
  export declare function isIntersectForPoint(point: [number, number], rect: IRectType): boolean;
59
65
  export declare const getLineSegIntersection: (p1: [number, number], p2: [number, number], p3: [number, number], p4: [number, number]) => [number, number] | null;
@@ -30,6 +30,7 @@ export declare class VNodeManager {
30
30
  updateLowLevelNodesRect(): void;
31
31
  clearHighLevelIds(): void;
32
32
  combineIntersectRect(rect: IRectType): IRectType;
33
+ setTargetAssignKeys(keys: Array<string>): number;
33
34
  setTarget(): number;
34
35
  getLastTarget(): Map<string, BaseNodeMapItem>;
35
36
  deleteLastTarget(): void;
@@ -2,5 +2,5 @@ import React from "react";
2
2
  import { ApplianceViewManagerLike } from "../../plugin/types";
3
3
  export declare const Del: (props: {
4
4
  workIds?: string[];
5
- maranger: ApplianceViewManagerLike;
5
+ mananger: ApplianceViewManagerLike;
6
6
  }) => React.JSX.Element;
@@ -2,6 +2,6 @@ import React from "react";
2
2
  import { ApplianceViewManagerLike } from "../../plugin/types";
3
3
  export declare const LockBtn: (props: {
4
4
  workIds?: string[];
5
- maranger: ApplianceViewManagerLike;
5
+ mananger: ApplianceViewManagerLike;
6
6
  islocked?: boolean;
7
7
  }) => React.JSX.Element;