@lincle/react-shared 0.4.0-next.16 → 0.4.0-next.17
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,5 +1,5 @@
|
|
|
1
1
|
import { type GraphContextProps } from '../Contexts/GraphContext';
|
|
2
2
|
import { type FunctionComponent, type PropsWithChildren } from 'react';
|
|
3
3
|
declare const GraphProvider: FunctionComponent<GraphProviderProps>;
|
|
4
|
-
export type GraphProviderProps = PropsWithChildren<Omit<GraphContextProps
|
|
4
|
+
export type GraphProviderProps = PropsWithChildren<Omit<Partial<GraphContextProps>, 'edgeSubscriber' | 'id' | 'nodePositions'> & Required<Pick<GraphContextProps, 'id'>>>;
|
|
5
5
|
export { GraphProvider };
|
package/dist/types.d.ts
CHANGED
|
@@ -113,12 +113,12 @@ class NodePositions {
|
|
|
113
113
|
this.debounceUpdates[node.id](node);
|
|
114
114
|
};
|
|
115
115
|
this.getBottom = (node) => {
|
|
116
|
+
var _a;
|
|
116
117
|
const nodeY = node.y + node.height;
|
|
117
118
|
const bottomNodeY = this.bottom ?
|
|
118
119
|
this.bottom.y + this.bottom.height :
|
|
119
120
|
undefined;
|
|
120
|
-
if (this.bottom
|
|
121
|
-
this.bottom.id === node.id) {
|
|
121
|
+
if (((_a = this.bottom) === null || _a === void 0 ? void 0 : _a.id) === node.id) {
|
|
122
122
|
if (!bottomNodeY ||
|
|
123
123
|
nodeY < bottomNodeY) {
|
|
124
124
|
this.bottom = node;
|
|
@@ -139,8 +139,8 @@ class NodePositions {
|
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
this.getLeft = (node) => {
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
var _a;
|
|
143
|
+
if (((_a = this.left) === null || _a === void 0 ? void 0 : _a.id) === node.id) {
|
|
144
144
|
if (node.x > this.left.x) {
|
|
145
145
|
this.left = node;
|
|
146
146
|
for (const id of Object.keys(this.nodes)) {
|
|
@@ -159,12 +159,12 @@ class NodePositions {
|
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
this.getRight = (node) => {
|
|
162
|
+
var _a;
|
|
162
163
|
const nodeX = node.x + node.width;
|
|
163
164
|
const rightNodeX = this.right ?
|
|
164
165
|
this.right.x + this.right.width :
|
|
165
166
|
undefined;
|
|
166
|
-
if (this.right
|
|
167
|
-
this.right.id === node.id) {
|
|
167
|
+
if (((_a = this.right) === null || _a === void 0 ? void 0 : _a.id) === node.id) {
|
|
168
168
|
if (!rightNodeX ||
|
|
169
169
|
nodeX < rightNodeX) {
|
|
170
170
|
this.right = node;
|
|
@@ -191,8 +191,8 @@ class NodePositions {
|
|
|
191
191
|
this.getLeft(node);
|
|
192
192
|
};
|
|
193
193
|
this.getTop = (node) => {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
var _a;
|
|
195
|
+
if (((_a = this.top) === null || _a === void 0 ? void 0 : _a.id) === node.id) {
|
|
196
196
|
if (node.y > this.top.y) {
|
|
197
197
|
this.top = node;
|
|
198
198
|
for (const id of Object.keys(this.nodes)) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@lincle/react-shared",
|
|
3
3
|
"title": "lincle react shared",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
|
-
"version": "0.4.0-next.
|
|
5
|
+
"version": "0.4.0-next.17",
|
|
6
6
|
"private": false,
|
|
7
7
|
"description": "Shared library for @lincle",
|
|
8
8
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
@@ -43,29 +43,29 @@
|
|
|
43
43
|
"clean:dist": "rimraf dist"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@digest/eslint-config-jest": "^4.14.
|
|
47
|
-
"@digest/eslint-config-react": "^4.14.
|
|
48
|
-
"@digest/eslint-config-typescript": "^4.14.
|
|
49
|
-
"@digest/jest-junit": "^4.14.
|
|
50
|
-
"@digest/jest-react": "^4.14.
|
|
51
|
-
"@digest/jest-typescript": "^4.14.
|
|
52
|
-
"@digest/typescript": "^4.14.
|
|
46
|
+
"@digest/eslint-config-jest": "^4.14.9",
|
|
47
|
+
"@digest/eslint-config-react": "^4.14.9",
|
|
48
|
+
"@digest/eslint-config-typescript": "^4.14.9",
|
|
49
|
+
"@digest/jest-junit": "^4.14.9",
|
|
50
|
+
"@digest/jest-react": "^4.14.9",
|
|
51
|
+
"@digest/jest-typescript": "^4.14.9",
|
|
52
|
+
"@digest/typescript": "^4.14.9",
|
|
53
53
|
"@types/bezier-js": "^4.1.3",
|
|
54
|
-
"@types/jest": "^
|
|
54
|
+
"@types/jest": "^30.0.0",
|
|
55
55
|
"@types/lodash.debounce": "^4.0.9",
|
|
56
56
|
"@types/lodash.throttle": "^4.1.9",
|
|
57
|
-
"@types/node": "^
|
|
58
|
-
"@types/react": "^19.
|
|
59
|
-
"@types/react-dom": "^19.
|
|
57
|
+
"@types/node": "^25.0.3",
|
|
58
|
+
"@types/react": "^19.2.7",
|
|
59
|
+
"@types/react-dom": "^19.2.3",
|
|
60
60
|
"@types/react-test-renderer": "^19.1.0",
|
|
61
|
-
"cross-env": "^
|
|
62
|
-
"jest-environment-jsdom": "^
|
|
61
|
+
"cross-env": "^10.1.0",
|
|
62
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
63
63
|
"jest-environment-jsdom-global": "^4.0.0",
|
|
64
64
|
"ncp": "^2.0.0",
|
|
65
65
|
"npm-run-all": "^4.1.5",
|
|
66
|
-
"react": "^19.
|
|
67
|
-
"react-test-renderer": "^19.
|
|
68
|
-
"rimraf": "^6.
|
|
66
|
+
"react": "^19.2.3",
|
|
67
|
+
"react-test-renderer": "^19.2.3",
|
|
68
|
+
"rimraf": "^6.1.2"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"bezier-js": "^6.1.4",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"acyclical graph",
|
|
89
89
|
"cyclical graph"
|
|
90
90
|
],
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "25bbe98ceef3b13ee0ee23ea3b261d8a115c0771"
|
|
92
92
|
}
|