@plait/mind 0.70.0 → 0.71.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.
@@ -1,6 +1,7 @@
1
1
  import { MindLayoutType } from '@plait/layouts';
2
2
  import { PlaitBoard, PlaitElement, Point } from '@plait/core';
3
3
  import { BaseData, EmojiData, ImageData } from './element-data';
4
+ import { StrokeStyle } from '@plait/common';
4
5
  export interface MindElement<T = BaseData> extends PlaitElement {
5
6
  data: T;
6
7
  children: MindElement[];
@@ -12,6 +13,7 @@ export interface MindElement<T = BaseData> extends PlaitElement {
12
13
  fill?: string;
13
14
  strokeColor?: string;
14
15
  strokeWidth?: number;
16
+ strokeStyle?: StrokeStyle;
15
17
  shape?: MindElementShape;
16
18
  branchColor?: string;
17
19
  branchWidth?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/mind",
3
- "version": "0.70.0",
3
+ "version": "0.71.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
@@ -1,3 +1,4 @@
1
1
  import { PlaitBoard } from '@plait/core';
2
2
  import { MindNode } from '../../../interfaces/node';
3
- export declare function drawLink(board: PlaitBoard, parentNode: MindNode, node: MindNode, isHorizontal: boolean, needDrawUnderline?: boolean, defaultStroke?: string, defaultStrokeWidth?: number): SVGGElement;
3
+ import { StrokeStyle } from '@plait/common';
4
+ export declare function drawLink(board: PlaitBoard, parentNode: MindNode, node: MindNode, isHorizontal: boolean, needDrawUnderline?: boolean, defaultStrokeColor?: string, defaultStrokeWidth?: number, defaultStrokeStyle?: StrokeStyle): SVGGElement;
@@ -1,3 +1,4 @@
1
1
  import { MindNode } from '../../../interfaces/node';
2
2
  import { PlaitBoard } from '@plait/core';
3
- export declare function drawIndentedLink(board: PlaitBoard, parent: MindNode, child: MindNode, defaultStroke?: string | null, needDrawUnderline?: boolean, defaultStrokeWidth?: number): SVGGElement;
3
+ import { StrokeStyle } from '@plait/common';
4
+ export declare function drawIndentedLink(board: PlaitBoard, parent: MindNode, child: MindNode, needDrawUnderline?: boolean, defaultStrokeColor?: string | null, defaultStrokeWidth?: number, defaultStrokeStyle?: StrokeStyle): SVGGElement;
@@ -1,3 +1,4 @@
1
1
  import { MindNode } from '../../../interfaces/node';
2
2
  import { PlaitBoard } from '@plait/core';
3
- export declare function drawLogicLink(board: PlaitBoard, parent: MindNode, node: MindNode, isHorizontal: boolean, defaultStroke?: string | null, defaultStrokeWidth?: number): SVGGElement;
3
+ import { StrokeStyle } from '@plait/common';
4
+ export declare function drawLogicLink(board: PlaitBoard, parent: MindNode, node: MindNode, isHorizontal: boolean, defaultStrokeColor?: string | null, defaultStrokeWidth?: number, defaultStrokeStyle?: StrokeStyle): SVGGElement;
@@ -9,6 +9,7 @@ export interface InheritAttribute {
9
9
  fill?: string;
10
10
  strokeColor?: string;
11
11
  strokeWidth?: number;
12
+ strokeStyle?: number;
12
13
  shape?: MindElementShape;
13
14
  layout?: MindLayoutType;
14
15
  branchColor?: string;
@@ -7,8 +7,8 @@ import { MindThemeColor } from '../../interfaces/theme-color';
7
7
  export declare const getBranchColorByMindElement: (board: PlaitBoard, element: MindElement) => any;
8
8
  export declare const getBranchShapeByMindElement: (board: PlaitBoard, element: MindElement) => any;
9
9
  export declare const getBranchWidthByMindElement: (board: PlaitBoard, element: MindElement) => any;
10
- export declare const getAbstractBranchWidth: (board: PlaitBoard, element: MindElement) => number | undefined;
11
- export declare const getAbstractBranchColor: (board: PlaitBoard, element: MindElement) => string;
10
+ export declare const getAbstractBranchWidth: (board: PlaitBoard, element: MindElement) => number;
11
+ export declare const getAbstractBranchColor: (board: PlaitBoard, element: MindElement) => string | undefined;
12
12
  export declare const getNextBranchColor: (board: PlaitBoard, root: MindElement) => string;
13
13
  export declare const getDefaultBranchColor: (board: PlaitBoard, element: MindElement) => string;
14
14
  export declare const getDefaultBranchColorByIndex: (board: PlaitBoard, index: number) => string;
@@ -1,6 +1,8 @@
1
1
  import { PlaitBoard } from '@plait/core';
2
2
  import { MindElement, MindElementShape } from '../../interfaces/element';
3
- export declare const getStrokeByMindElement: (board: PlaitBoard, element: MindElement) => any;
3
+ import { StrokeStyle } from '@plait/common';
4
+ export declare const getStrokeColorByElement: (board: PlaitBoard, element: MindElement) => any;
5
+ export declare const getStrokeStyleByElement: (board: PlaitBoard, element: MindElement) => StrokeStyle;
4
6
  export declare const getStrokeWidthByElement: (board: PlaitBoard, element: MindElement) => number;
5
7
  export declare const getFillByElement: (board: PlaitBoard, element: MindElement) => string;
6
8
  export declare const getShapeByElement: (board: PlaitBoard, element: MindElement) => MindElementShape;