@vope/utils 1.4.20 → 1.4.21

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/cjs/index.js CHANGED
@@ -26,6 +26,7 @@ __export(src_exports, {
26
26
  MemoryPower: () => MemoryPower,
27
27
  MemorySimple: () => MemorySimple,
28
28
  Neo4j: () => Neo4j,
29
+ Neo4jAhchors: () => Neo4jAhchors,
29
30
  Subscriber: () => Subscriber,
30
31
  Union: () => Union,
31
32
  clamp: () => clamp,
@@ -591,16 +592,208 @@ var MemorySimple = class {
591
592
  }
592
593
  };
593
594
 
595
+ // src/rotate/rad.ts
596
+ var rotateRad = (from, rad, visit = [0, 0]) => {
597
+ const x = from[0] - visit[0];
598
+ const y = from[1] - visit[1];
599
+ return [
600
+ x * Math.cos(rad) + y * Math.sin(rad) + visit[0],
601
+ y * Math.cos(rad) - x * Math.sin(rad) + visit[1]
602
+ ];
603
+ };
604
+
605
+ // src/neo4j-anchors.ts
606
+ var Neo4jAhchors = class {
607
+ constructor(neo4j, config) {
608
+ this.neo4j = neo4j;
609
+ this.config = Object.assign({}, config);
610
+ }
611
+ config;
612
+ #anchors = {};
613
+ getDir(start, end) {
614
+ const { neo4j } = this;
615
+ return neo4j.dirKey({
616
+ [neo4j.sourceField]: start,
617
+ [neo4j.targetField]: end
618
+ });
619
+ }
620
+ /**
621
+ * 当图数据准备好后调用
622
+ */
623
+ read() {
624
+ const { neo4j } = this;
625
+ const { nodeField, edgeField, sourceField, targetField } = neo4j;
626
+ const anchors = {};
627
+ neo4j.nodes.forEach((node) => {
628
+ const nodeId = node[nodeField];
629
+ let count = 0;
630
+ [
631
+ neo4j.sources.get(nodeId),
632
+ neo4j.targets.get(nodeId)
633
+ ].forEach((list, i) => {
634
+ if (!list)
635
+ return;
636
+ let diffCount = 0;
637
+ let sameCount = 0;
638
+ list.forEach((edge) => {
639
+ const edgeId = edge[edgeField];
640
+ if (edge[sourceField] !== edge[targetField]) {
641
+ const anchor = anchors[edgeId] || (anchors[edgeId] = {});
642
+ anchor[i ? "target" : "source"] = count + diffCount++;
643
+ } else if (edgeId in anchors === false) {
644
+ anchors[edgeId] = {
645
+ source: sameCount,
646
+ target: sameCount++
647
+ };
648
+ }
649
+ });
650
+ count += diffCount;
651
+ });
652
+ });
653
+ this.#anchors = anchors;
654
+ }
655
+ calcPoints(edge, index, total, type) {
656
+ const { neo4j, config: { getBox, radOffsetRaidx = 0.3125 } } = this;
657
+ const source = getBox(edge[neo4j.sourceField]);
658
+ const target = getBox(edge[neo4j.targetField]);
659
+ const rad = Math.atan2(
660
+ (source.centerY - target.centerY) * type,
661
+ (source.centerX - target.centerX) * type
662
+ );
663
+ let point = rotateRad([0.5, 0], rad);
664
+ if (total !== 1) {
665
+ point = rotateRad(point, radOffsetRaidx * (total / 2 - 0.5 - index));
666
+ }
667
+ const [x, y] = point;
668
+ return [x + 0.5, 0.5 - y];
669
+ }
670
+ /**
671
+ * 获取指定节点上出入边连接点的坐标
672
+ */
673
+ getPoints(id) {
674
+ const { neo4j } = this;
675
+ const { dirs, edgeField, sourceField, targetField } = neo4j;
676
+ const anchors = this.#anchors;
677
+ const points = [];
678
+ const caches = {};
679
+ neo4j.sources.get(id)?.forEach((edge) => {
680
+ const source = edge[sourceField];
681
+ const target = edge[targetField];
682
+ const direct = this.getDir(source, target);
683
+ const invert = this.getDir(target, source);
684
+ if (direct in caches)
685
+ return;
686
+ const directs = dirs.get(direct) || [];
687
+ const inverts = dirs.get(invert) || [];
688
+ const directsLength = directs.length;
689
+ const invertsLength = inverts.length;
690
+ const total = directsLength + invertsLength;
691
+ directs.forEach((data, index) => {
692
+ points[anchors[data[edgeField]].source] = this.calcPoints(data, directsLength - 1 - index, total, -1);
693
+ });
694
+ caches[direct] = direct;
695
+ });
696
+ neo4j.targets.get(id)?.forEach((edge) => {
697
+ const source = edge[sourceField];
698
+ const target = edge[targetField];
699
+ const direct = this.getDir(source, target);
700
+ const invert = this.getDir(target, source);
701
+ if (direct in caches)
702
+ return;
703
+ const directs = neo4j.dirs.get(direct) || [];
704
+ const inverts = neo4j.dirs.get(invert) || [];
705
+ const directsLength = directs.length;
706
+ const invertsLength = inverts.length;
707
+ const total = directsLength + invertsLength;
708
+ directs.forEach((data, index) => {
709
+ points[anchors[data[edgeField]].target] = this.calcPoints(data, invertsLength + index, total, 1);
710
+ });
711
+ caches[direct] = direct;
712
+ });
713
+ return points;
714
+ }
715
+ /**
716
+ * 查找边连接点的位置
717
+ */
718
+ findAnchor(id) {
719
+ const anchor = this.#anchors[id] || {};
720
+ return {
721
+ source: anchor.source || 0,
722
+ target: anchor.target || 0
723
+ };
724
+ }
725
+ /**
726
+ * 获取指定边控制点距离两端点连线的距离(可理解为控制边的弯曲程度)
727
+ * @description 返回值是一个相对值,需要乘以一个基数值(基数值应为负值,如-30)
728
+ */
729
+ getOffset(id) {
730
+ const { neo4j } = this;
731
+ const edge = neo4j.edges.get(id);
732
+ if (!edge)
733
+ return -1;
734
+ const { dirs, edgeField, sourceField, targetField } = neo4j;
735
+ const source = edge[sourceField];
736
+ const target = edge[targetField];
737
+ const directs = dirs.get(this.getDir(source, target)) || [];
738
+ const inverts = dirs.get(this.getDir(target, source)) || [];
739
+ let count = 0;
740
+ let index = 0;
741
+ [directs, inverts].some((list) => {
742
+ const result = list.some((data, i) => {
743
+ if (data[edgeField] === id) {
744
+ index = i + count;
745
+ return true;
746
+ }
747
+ });
748
+ count += list.length;
749
+ return result;
750
+ });
751
+ const directsSize = directs.length;
752
+ const invertsSize = inverts.length;
753
+ const total = directsSize + invertsSize;
754
+ if (total === 1)
755
+ return -1;
756
+ if (directsSize === 0 || invertsSize === 0) {
757
+ return total / 2 - index - 0.5;
758
+ } else {
759
+ return Math.abs(directsSize - invertsSize) * (directsSize >= invertsSize ? 1 : -1) / 2 - index - 0.5;
760
+ }
761
+ }
762
+ /**
763
+ * 清理数据
764
+ */
765
+ clear() {
766
+ this.#anchors = {};
767
+ }
768
+ };
769
+
594
770
  // src/neo4j.ts
595
771
  var Neo4j = class {
596
- #nid;
772
+ #nPrimaryKey;
773
+ #ePrimaryKey;
597
774
  #sourceKey;
598
775
  #targetKey;
776
+ #dirKey;
599
777
  #nodes;
600
778
  #edges;
601
779
  #sources;
602
780
  #targets;
603
781
  #dirs;
782
+ get nodeField() {
783
+ return this.#nPrimaryKey;
784
+ }
785
+ get edgeField() {
786
+ return this.#ePrimaryKey;
787
+ }
788
+ get sourceField() {
789
+ return this.#sourceKey;
790
+ }
791
+ get targetField() {
792
+ return this.#targetKey;
793
+ }
794
+ get dirKey() {
795
+ return this.#dirKey;
796
+ }
604
797
  /**
605
798
  * 点视图
606
799
  */
@@ -626,13 +819,13 @@ var Neo4j = class {
626
819
  eid,
627
820
  sourceKey,
628
821
  targetKey,
629
- dir
822
+ dir = (edge) => edge[sourceKey] + "|" + edge[targetKey]
630
823
  }) {
631
- shield(this, "nodes", this.#nodes = new MemorySimple(this.#nid = nid));
632
- shield(this, "edges", this.#edges = new MemorySimple(eid));
824
+ shield(this, "nodes", this.#nodes = new MemorySimple(this.#nPrimaryKey = nid));
825
+ shield(this, "edges", this.#edges = new MemorySimple(this.#ePrimaryKey = eid));
633
826
  shield(this, "sources", this.#sources = new MemoryList(this.#sourceKey = sourceKey));
634
827
  shield(this, "targets", this.#targets = new MemoryList(this.#targetKey = targetKey));
635
- shield(this, "dirs", this.#dirs = new MemoryList(dir));
828
+ shield(this, "dirs", this.#dirs = new MemoryList(this.#dirKey = dir));
636
829
  nodeList.forEach((node) => this.node("add", node));
637
830
  edgeList.forEach((edge) => this.edge("add", edge));
638
831
  }
@@ -645,7 +838,7 @@ var Neo4j = class {
645
838
  if (!node)
646
839
  return [];
647
840
  nodes.delete(node);
648
- const id = node[this.#nid];
841
+ const id = node[this.#nPrimaryKey];
649
842
  const sourceKey = this.#sourceKey;
650
843
  const targetKey = this.#targetKey;
651
844
  const edges = this.#edges;
@@ -775,16 +968,6 @@ var parseNum = (num) => {
775
968
  }
776
969
  };
777
970
 
778
- // src/rotate/rad.ts
779
- var rotateRad = (from, rad, visit = [0, 0]) => {
780
- const x = from[0] - visit[0];
781
- const y = from[1] - visit[1];
782
- return [
783
- x * Math.cos(rad) + y * Math.sin(rad) + visit[0],
784
- y * Math.cos(rad) - x * Math.sin(rad) + visit[1]
785
- ];
786
- };
787
-
788
971
  // src/rotate/angle.ts
789
972
  var rotateAngle = (from, angle, visit) => rotateRad(from, angle / 180 * Math.PI, visit);
790
973
 
package/lib/index.js CHANGED
@@ -17,14 +17,15 @@ import { MemoryBasic } from "./memory/basic";
17
17
  import { MemoryList } from "./memory/list";
18
18
  import { MemoryPower } from "./memory/power";
19
19
  import { MemorySimple } from "./memory/simple";
20
- import { default as default2 } from "./neo4j";
20
+ import { default as default2 } from "./neo4j-anchors";
21
+ import { default as default3 } from "./neo4j";
21
22
  import { once } from "./once";
22
23
  import { parseNum } from "./parse/num";
23
24
  import { deconPowersSum } from "./power/decon";
24
25
  import { rotateAngle } from "./rotate/angle";
25
26
  import { rotateRad } from "./rotate/rad";
26
27
  import { css } from "./style/css";
27
- import { default as default3 } from "./subscriber";
28
+ import { default as default4 } from "./subscriber";
28
29
  import { FlexTable } from "./table/flex";
29
30
  import { Union } from "./union";
30
31
  import { joinPaths } from "./url/join";
@@ -36,8 +37,9 @@ export {
36
37
  MemoryList,
37
38
  MemoryPower,
38
39
  MemorySimple,
39
- default2 as Neo4j,
40
- default3 as Subscriber,
40
+ default3 as Neo4j,
41
+ default2 as Neo4jAhchors,
42
+ default4 as Subscriber,
41
43
  Union,
42
44
  clamp,
43
45
  classnames,
@@ -0,0 +1,167 @@
1
+ import { rotateRad } from "./rotate/rad";
2
+ class Neo4jAhchors {
3
+ constructor(neo4j, config) {
4
+ this.neo4j = neo4j;
5
+ this.config = Object.assign({}, config);
6
+ }
7
+ config;
8
+ #anchors = {};
9
+ getDir(start, end) {
10
+ const { neo4j } = this;
11
+ return neo4j.dirKey({
12
+ [neo4j.sourceField]: start,
13
+ [neo4j.targetField]: end
14
+ });
15
+ }
16
+ /**
17
+ * 当图数据准备好后调用
18
+ */
19
+ read() {
20
+ const { neo4j } = this;
21
+ const { nodeField, edgeField, sourceField, targetField } = neo4j;
22
+ const anchors = {};
23
+ neo4j.nodes.forEach((node) => {
24
+ const nodeId = node[nodeField];
25
+ let count = 0;
26
+ [
27
+ neo4j.sources.get(nodeId),
28
+ neo4j.targets.get(nodeId)
29
+ ].forEach((list, i) => {
30
+ if (!list)
31
+ return;
32
+ let diffCount = 0;
33
+ let sameCount = 0;
34
+ list.forEach((edge) => {
35
+ const edgeId = edge[edgeField];
36
+ if (edge[sourceField] !== edge[targetField]) {
37
+ const anchor = anchors[edgeId] || (anchors[edgeId] = {});
38
+ anchor[i ? "target" : "source"] = count + diffCount++;
39
+ } else if (edgeId in anchors === false) {
40
+ anchors[edgeId] = {
41
+ source: sameCount,
42
+ target: sameCount++
43
+ };
44
+ }
45
+ });
46
+ count += diffCount;
47
+ });
48
+ });
49
+ this.#anchors = anchors;
50
+ }
51
+ calcPoints(edge, index, total, type) {
52
+ const { neo4j, config: { getBox, radOffsetRaidx = 0.3125 } } = this;
53
+ const source = getBox(edge[neo4j.sourceField]);
54
+ const target = getBox(edge[neo4j.targetField]);
55
+ const rad = Math.atan2(
56
+ (source.centerY - target.centerY) * type,
57
+ (source.centerX - target.centerX) * type
58
+ );
59
+ let point = rotateRad([0.5, 0], rad);
60
+ if (total !== 1) {
61
+ point = rotateRad(point, radOffsetRaidx * (total / 2 - 0.5 - index));
62
+ }
63
+ const [x, y] = point;
64
+ return [x + 0.5, 0.5 - y];
65
+ }
66
+ /**
67
+ * 获取指定节点上出入边连接点的坐标
68
+ */
69
+ getPoints(id) {
70
+ const { neo4j } = this;
71
+ const { dirs, edgeField, sourceField, targetField } = neo4j;
72
+ const anchors = this.#anchors;
73
+ const points = [];
74
+ const caches = {};
75
+ neo4j.sources.get(id)?.forEach((edge) => {
76
+ const source = edge[sourceField];
77
+ const target = edge[targetField];
78
+ const direct = this.getDir(source, target);
79
+ const invert = this.getDir(target, source);
80
+ if (direct in caches)
81
+ return;
82
+ const directs = dirs.get(direct) || [];
83
+ const inverts = dirs.get(invert) || [];
84
+ const directsLength = directs.length;
85
+ const invertsLength = inverts.length;
86
+ const total = directsLength + invertsLength;
87
+ directs.forEach((data, index) => {
88
+ points[anchors[data[edgeField]].source] = this.calcPoints(data, directsLength - 1 - index, total, -1);
89
+ });
90
+ caches[direct] = direct;
91
+ });
92
+ neo4j.targets.get(id)?.forEach((edge) => {
93
+ const source = edge[sourceField];
94
+ const target = edge[targetField];
95
+ const direct = this.getDir(source, target);
96
+ const invert = this.getDir(target, source);
97
+ if (direct in caches)
98
+ return;
99
+ const directs = neo4j.dirs.get(direct) || [];
100
+ const inverts = neo4j.dirs.get(invert) || [];
101
+ const directsLength = directs.length;
102
+ const invertsLength = inverts.length;
103
+ const total = directsLength + invertsLength;
104
+ directs.forEach((data, index) => {
105
+ points[anchors[data[edgeField]].target] = this.calcPoints(data, invertsLength + index, total, 1);
106
+ });
107
+ caches[direct] = direct;
108
+ });
109
+ return points;
110
+ }
111
+ /**
112
+ * 查找边连接点的位置
113
+ */
114
+ findAnchor(id) {
115
+ const anchor = this.#anchors[id] || {};
116
+ return {
117
+ source: anchor.source || 0,
118
+ target: anchor.target || 0
119
+ };
120
+ }
121
+ /**
122
+ * 获取指定边控制点距离两端点连线的距离(可理解为控制边的弯曲程度)
123
+ * @description 返回值是一个相对值,需要乘以一个基数值(基数值应为负值,如-30)
124
+ */
125
+ getOffset(id) {
126
+ const { neo4j } = this;
127
+ const edge = neo4j.edges.get(id);
128
+ if (!edge)
129
+ return -1;
130
+ const { dirs, edgeField, sourceField, targetField } = neo4j;
131
+ const source = edge[sourceField];
132
+ const target = edge[targetField];
133
+ const directs = dirs.get(this.getDir(source, target)) || [];
134
+ const inverts = dirs.get(this.getDir(target, source)) || [];
135
+ let count = 0;
136
+ let index = 0;
137
+ [directs, inverts].some((list) => {
138
+ const result = list.some((data, i) => {
139
+ if (data[edgeField] === id) {
140
+ index = i + count;
141
+ return true;
142
+ }
143
+ });
144
+ count += list.length;
145
+ return result;
146
+ });
147
+ const directsSize = directs.length;
148
+ const invertsSize = inverts.length;
149
+ const total = directsSize + invertsSize;
150
+ if (total === 1)
151
+ return -1;
152
+ if (directsSize === 0 || invertsSize === 0) {
153
+ return total / 2 - index - 0.5;
154
+ } else {
155
+ return Math.abs(directsSize - invertsSize) * (directsSize >= invertsSize ? 1 : -1) / 2 - index - 0.5;
156
+ }
157
+ }
158
+ /**
159
+ * 清理数据
160
+ */
161
+ clear() {
162
+ this.#anchors = {};
163
+ }
164
+ }
165
+ export {
166
+ Neo4jAhchors as default
167
+ };
package/lib/neo4j.js CHANGED
@@ -2,14 +2,31 @@ import { hash8strings } from "./convert/strings";
2
2
  import { MemoryList } from "./memory/list";
3
3
  import { MemorySimple } from "./memory/simple";
4
4
  class Neo4j {
5
- #nid;
5
+ #nPrimaryKey;
6
+ #ePrimaryKey;
6
7
  #sourceKey;
7
8
  #targetKey;
9
+ #dirKey;
8
10
  #nodes;
9
11
  #edges;
10
12
  #sources;
11
13
  #targets;
12
14
  #dirs;
15
+ get nodeField() {
16
+ return this.#nPrimaryKey;
17
+ }
18
+ get edgeField() {
19
+ return this.#ePrimaryKey;
20
+ }
21
+ get sourceField() {
22
+ return this.#sourceKey;
23
+ }
24
+ get targetField() {
25
+ return this.#targetKey;
26
+ }
27
+ get dirKey() {
28
+ return this.#dirKey;
29
+ }
13
30
  /**
14
31
  * 点视图
15
32
  */
@@ -35,13 +52,13 @@ class Neo4j {
35
52
  eid,
36
53
  sourceKey,
37
54
  targetKey,
38
- dir
55
+ dir = (edge) => edge[sourceKey] + "|" + edge[targetKey]
39
56
  }) {
40
- shield(this, "nodes", this.#nodes = new MemorySimple(this.#nid = nid));
41
- shield(this, "edges", this.#edges = new MemorySimple(eid));
57
+ shield(this, "nodes", this.#nodes = new MemorySimple(this.#nPrimaryKey = nid));
58
+ shield(this, "edges", this.#edges = new MemorySimple(this.#ePrimaryKey = eid));
42
59
  shield(this, "sources", this.#sources = new MemoryList(this.#sourceKey = sourceKey));
43
60
  shield(this, "targets", this.#targets = new MemoryList(this.#targetKey = targetKey));
44
- shield(this, "dirs", this.#dirs = new MemoryList(dir));
61
+ shield(this, "dirs", this.#dirs = new MemoryList(this.#dirKey = dir));
45
62
  nodeList.forEach((node) => this.node("add", node));
46
63
  edgeList.forEach((edge) => this.edge("add", edge));
47
64
  }
@@ -54,7 +71,7 @@ class Neo4j {
54
71
  if (!node)
55
72
  return [];
56
73
  nodes.delete(node);
57
- const id = node[this.#nid];
74
+ const id = node[this.#nPrimaryKey];
58
75
  const sourceKey = this.#sourceKey;
59
76
  const targetKey = this.#targetKey;
60
77
  const edges = this.#edges;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vope/utils",
3
- "version": "1.4.20",
3
+ "version": "1.4.21",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
package/types/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export { MemoryBasic } from './memory/basic';
17
17
  export { MemoryList } from './memory/list';
18
18
  export { MemoryPower } from './memory/power';
19
19
  export { MemorySimple } from './memory/simple';
20
+ export { default as Neo4jAhchors } from './neo4j-anchors';
20
21
  export { default as Neo4j } from './neo4j';
21
22
  export { once } from './once';
22
23
  export { parseNum } from './parse/num';
@@ -0,0 +1,45 @@
1
+ import Neo4j from './neo4j';
2
+ interface IBox {
3
+ centerX: number;
4
+ centerY: number;
5
+ }
6
+ interface Config {
7
+ radOffsetRaidx?: number;
8
+ getBox(id: string): IBox;
9
+ }
10
+ /**
11
+ * 图布局之二阶贝塞尔曲线边锚点管理
12
+ */
13
+ export default class Neo4jAhchors<INode extends object, IEdge extends object> {
14
+ #private;
15
+ protected neo4j: Neo4j<INode, IEdge>;
16
+ protected config: Config;
17
+ constructor(neo4j: Neo4j<INode, IEdge>, config: Config);
18
+ protected getDir(start: string, end: string): string;
19
+ /**
20
+ * 当图数据准备好后调用
21
+ */
22
+ read(): void;
23
+ protected calcPoints(edge: IEdge, index: number, total: number, type: 1 | -1): number[];
24
+ /**
25
+ * 获取指定节点上出入边连接点的坐标
26
+ */
27
+ getPoints(id: string): number[][];
28
+ /**
29
+ * 查找边连接点的位置
30
+ */
31
+ findAnchor(id: string): {
32
+ source: number;
33
+ target: number;
34
+ };
35
+ /**
36
+ * 获取指定边控制点距离两端点连线的距离(可理解为控制边的弯曲程度)
37
+ * @description 返回值是一个相对值,需要乘以一个基数值(基数值应为负值,如-30)
38
+ */
39
+ getOffset(id: string): number;
40
+ /**
41
+ * 清理数据
42
+ */
43
+ clear(): void;
44
+ }
45
+ export {};
package/types/neo4j.d.ts CHANGED
@@ -3,17 +3,37 @@ import { GetGivenProps } from '@vope/types';
3
3
  import { MemoryList } from './memory/list';
4
4
  import { MemorySimple } from './memory/simple';
5
5
  interface Config<INode extends object, IEdge extends object> {
6
- nid: GetGivenProps<INode, string> & string;
7
- eid: GetGivenProps<IEdge, string> & string;
8
- sourceKey: GetGivenProps<IEdge, string> & string;
9
- targetKey: GetGivenProps<IEdge, string> & string;
10
- dir(edge: IEdge): string;
6
+ /**
7
+ * 点主键字段
8
+ */
9
+ nid: Extract<GetGivenProps<INode, string>, string>;
10
+ /**
11
+ * 边主键字段
12
+ */
13
+ eid: Extract<GetGivenProps<IEdge, string>, string>;
14
+ /**
15
+ * (边)出点字段
16
+ */
17
+ sourceKey: Extract<GetGivenProps<IEdge, string>, string>;
18
+ /**
19
+ * (边)入点字段
20
+ */
21
+ targetKey: Extract<GetGivenProps<IEdge, string>, string>;
22
+ /**
23
+ * (边)方向键
24
+ */
25
+ dir?(edge: IEdge): string;
11
26
  }
12
27
  /**
13
28
  * 图管理
14
29
  */
15
30
  export default class Neo4j<INode extends object, IEdge extends object> {
16
31
  #private;
32
+ get nodeField(): keyof INode;
33
+ get edgeField(): keyof IEdge;
34
+ get sourceField(): keyof IEdge;
35
+ get targetField(): keyof IEdge;
36
+ get dirKey(): (edge: IEdge) => string;
17
37
  /**
18
38
  * 点视图
19
39
  */
@@ -57,6 +77,6 @@ declare const shield_keys: {
57
77
  deleteType: number;
58
78
  };
59
79
  type Shield<T> = {
60
- [P in Exclude<keyof T, keyof typeof shield_keys>]: T[P] extends (...args: infer A) => infer B ? Equal<B, T> extends true ? (...args: A) => Shield<T> : T[P] : T[P];
80
+ [P in Exclude<keyof T, keyof typeof shield_keys>]: T[P] extends (...args: infer A) => infer B ? Equal<[B], [T]> extends true ? (...args: A) => Shield<T> : T[P] : T[P];
61
81
  };
62
82
  export {};