@logicflow/core 1.2.10 → 1.2.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicflow/core",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "LogicFlow core, to quickly build flowchart editor",
5
5
  "main": "dist/entry.js",
6
6
  "module": "dist/logic-flow.js",
@@ -8,7 +8,7 @@
8
8
  "sideEffects": true,
9
9
  "jsdelivr": "dist/logic-flow.min.js",
10
10
  "license": "Apache-2.0",
11
- "homepage": "https://docs.logic-flow.cn",
11
+ "homepage": "https://site.logic-flow.cn",
12
12
  "types": "types/index.d.ts",
13
13
  "repository": {
14
14
  "type": "git",
@@ -11,6 +11,12 @@ import SnaplineModel from './model/SnaplineModel';
11
11
  import { EditConfigInterface } from './model/EditConfigModel';
12
12
  import { Theme } from './constant/DefaultTheme';
13
13
  import { EventType } from './constant/constant';
14
+ declare const pluginFlag: unique symbol;
15
+ declare type ExtensionMapValueType = {
16
+ extension: Extension;
17
+ props?: any;
18
+ [pluginFlag]: symbol;
19
+ };
14
20
  declare type GraphConfigModel = {
15
21
  nodes: _Model.BaseNodeModel[];
16
22
  edges: _Model.BaseEdgeModel[];
@@ -50,7 +56,7 @@ export default class LogicFlow {
50
56
  /**
51
57
  * 全局配置的插件,所有的LogicFlow示例都会使用
52
58
  */
53
- static extensions: Map<string, Extension>;
59
+ static extensions: Map<string, ExtensionMapValueType>;
54
60
  /**
55
61
  * 插件扩展方法
56
62
  * @example
@@ -495,7 +501,7 @@ export default class LogicFlow {
495
501
  * 重复添加插件的时候,把上一次添加的插件的销毁。
496
502
  * @param plugin 插件
497
503
  */
498
- static use(extension: Extension): void;
504
+ static use(extension: Extension, props?: any): void;
499
505
  private initContainer;
500
506
  private installPlugins;
501
507
  /**
@@ -302,6 +302,7 @@ export declare type ExtensionOptions = {
302
302
  lf: LogicFlow;
303
303
  LogicFlow: LogicFlowConstructor;
304
304
  options: Record<string, any>;
305
+ props?: any;
305
306
  };
306
307
  export interface ExtensionConstructor {
307
308
  pluginName: string;
@@ -86,7 +86,7 @@ export declare type IBezierPoints = {
86
86
  end: Point;
87
87
  };
88
88
  export declare const getBezierPoints: (path: string) => Point[];
89
- export declare const getEndTangent: (path: string) => Point[];
89
+ export declare const getEndTangent: (pointsList: any, offset: any) => Point[];
90
90
  /**
91
91
  * 获取移动边后,文本位置距离边上的最近的一点
92
92
  * @param point 边上文本的位置
@@ -1,7 +1,4 @@
1
1
  import { Point, Vector } from '../type/index';
2
- export declare function sampleCubic(p1: Point, cp1: Point, cp2: Point, p2: Point): {
3
- x: number;
4
- y: number;
5
- };
2
+ export declare function sampleCubic(p1: Point, cp1: Point, cp2: Point, p2: Point, offset: number): Point;
6
3
  export declare function getThetaOfVector(v: Vector): number;
7
4
  export declare function degrees(radians: number): number;
@@ -1,4 +0,0 @@
1
- export { action, observable, computed, makeObservable, configure, toJS, isObservable, } from 'mobx';
2
- export declare function observer<P>(props: P): any;
3
- export type { IReactionDisposer, IReactionPublic, IReactionOptions } from 'mobx';
4
- export * as mobx from 'mobx';
@@ -1,4 +0,0 @@
1
- import { DirectionVector2, Point } from '../type';
2
- export declare const getDirectionVector: (point1: Point, point2: Point) => DirectionVector2;
3
- export declare const isSameDirection: (v1: DirectionVector2, v2: DirectionVector2) => boolean;
4
- export declare const isContraryDirection: (v1: DirectionVector2, v2: DirectionVector2) => boolean;
@@ -1 +0,0 @@
1
- export default function Rect(props: any): void;
@@ -1,4 +0,0 @@
1
- import { h, Component } from 'preact';
2
- export default class TransfromGraph extends Component {
3
- render(): h.JSX.Element;
4
- }