@lincle/react-native-minimap 0.4.0-next.12 → 0.4.0-next.13
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/dist/MiniMapNode/index.js +2 -2
- package/dist/MiniMapPlain/index.js +1 -1
- package/dist/MiniMapSvg/index.js +7 -4
- package/dist/types.d.ts +12 -12
- package/package.json +104 -104
|
@@ -5,8 +5,8 @@ import { useMemo } from 'react';
|
|
|
5
5
|
const MiniMapNode = ({ height, shape, width, x, y }) => {
|
|
6
6
|
const daShape = useMemo(() => {
|
|
7
7
|
return (shape === 'oval' ?
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
_jsx(Ellipse, { height: height, width: width, x: x, y: y }) :
|
|
9
|
+
_jsx(Rectangle, { height: height, width: width, x: x, y: y }));
|
|
10
10
|
}, [
|
|
11
11
|
height,
|
|
12
12
|
shape,
|
|
@@ -48,7 +48,7 @@ const MiniMap = ({ gutter, height: givenMapWidth, lincleHeight = 0, lincleWidth
|
|
|
48
48
|
return lincleWidth === 0 ||
|
|
49
49
|
lincleHeight === 0 ?
|
|
50
50
|
null :
|
|
51
|
-
|
|
51
|
+
_jsxs(View, { style: viewStyle, children: [_jsx(BlurView, { blurAmount: 5, blurType: 'light', overlayColor: '', style: blurStyle }), _jsx(MiniMapSvg, { gutter: gutter, height: height, lincleHeight: lincleHeight, lincleWidth: lincleWidth, node: node, width: width })] });
|
|
52
52
|
};
|
|
53
53
|
MiniMap.displayName = displayName;
|
|
54
54
|
export default memo(MiniMap);
|
package/dist/MiniMapSvg/index.js
CHANGED
|
@@ -111,11 +111,14 @@ const MiniMapSvg = ({ gutter: givenGutter = 8, height: mapHeight = 0, lincleHeig
|
|
|
111
111
|
const Nodes = nodes ?
|
|
112
112
|
Object.keys(nodes).map((nodeId) => {
|
|
113
113
|
const node = nodes[nodeId];
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
if (node) {
|
|
115
|
+
return nodeFunction ?
|
|
116
116
|
nodeFunction(node) :
|
|
117
|
-
(_jsx(Node, { height: node.height, shape: node.shape, width: node.width, x: node.x, y: node.y }, node.id))
|
|
118
|
-
|
|
117
|
+
(_jsx(Node, { height: node.height, shape: node.shape, width: node.width, x: node.x, y: node.y }, node.id));
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
119
122
|
}) :
|
|
120
123
|
null;
|
|
121
124
|
const d = useMemo(() => {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { type Dimensions, type Shape } from '@lincle/react-shared';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
3
|
import { type ViewStyle } from 'react-native';
|
|
4
|
+
export type MiniMapNodeProps = {
|
|
5
|
+
readonly height: number;
|
|
6
|
+
readonly shape?: Shape;
|
|
7
|
+
readonly width: number;
|
|
8
|
+
readonly x: number;
|
|
9
|
+
readonly y: number;
|
|
10
|
+
};
|
|
11
|
+
export type MiniMapPlainProps = MiniMapProps & {
|
|
12
|
+
readonly lincleHeight: number;
|
|
13
|
+
readonly lincleWidth: number;
|
|
14
|
+
readonly style?: ViewStyle;
|
|
15
|
+
};
|
|
4
16
|
export type MiniMapProps = {
|
|
5
17
|
readonly gutter?: number;
|
|
6
18
|
readonly height?: number;
|
|
@@ -8,20 +20,8 @@ export type MiniMapProps = {
|
|
|
8
20
|
readonly style?: ViewStyle;
|
|
9
21
|
readonly width?: number;
|
|
10
22
|
};
|
|
11
|
-
export type MiniMapPlainProps = MiniMapProps & {
|
|
12
|
-
readonly lincleHeight: number;
|
|
13
|
-
readonly lincleWidth: number;
|
|
14
|
-
readonly style?: ViewStyle;
|
|
15
|
-
};
|
|
16
23
|
export type MiniMapSvgProps = MiniMapProps & {
|
|
17
24
|
readonly lincleHeight: number;
|
|
18
25
|
readonly lincleWidth: number;
|
|
19
26
|
readonly style?: ViewStyle;
|
|
20
27
|
};
|
|
21
|
-
export type MiniMapNodeProps = {
|
|
22
|
-
readonly height: number;
|
|
23
|
-
readonly shape?: Shape;
|
|
24
|
-
readonly width: number;
|
|
25
|
-
readonly x: number;
|
|
26
|
-
readonly y: number;
|
|
27
|
-
};
|
package/package.json
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
2
|
+
"name": "@lincle/react-native-minimap",
|
|
3
|
+
"title": "lincle react native minimap",
|
|
4
|
+
"license": "LGPL-3.0-or-later",
|
|
5
|
+
"version": "0.4.0-next.13",
|
|
6
|
+
"private": false,
|
|
7
|
+
"description": "A 'reactive' React node and edge generator",
|
|
8
|
+
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
9
|
+
"contributors": [
|
|
10
|
+
{
|
|
11
|
+
"name": "Connor Schlesiger",
|
|
12
|
+
"email": "connor@schlesiger.ca",
|
|
13
|
+
"position": "Initial and Lead Developer"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"main": "dist/index.js",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/",
|
|
20
|
+
"COPYING.md",
|
|
21
|
+
"COPYING.LESSER.md"
|
|
22
|
+
],
|
|
23
|
+
"homepage": "https://gitlab.com/digested/lincle/tree/master/packages/react-native-minimap/",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://gitlab.com/digested/lincle.git"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://gitlab.com/digested/lincle/issues"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "run-s clean:dist build:prod",
|
|
33
|
+
"build:prod": "tsc -p ./tsconfig.json",
|
|
34
|
+
"build:watch": "run-s clean:dist build:prod build:watch:tsc",
|
|
35
|
+
"build:watch:tsc": "tsc -p ./tsconfig.json --watch --pretty --preserveWatchOutput",
|
|
36
|
+
"----------------------------------------------------------------": "",
|
|
37
|
+
"build:prod:config": "",
|
|
38
|
+
"---------------------------------------------------------------": "",
|
|
39
|
+
"lint": "run-p lint:es",
|
|
40
|
+
"lint:es": "eslint",
|
|
41
|
+
"clean": "run-s clean:dist clean:node_modules",
|
|
42
|
+
"clean:node_modules": "rimraf node_modules yarn.lock package-lock.json",
|
|
43
|
+
"clean:dist": "rimraf dist"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@digest/eslint-config-jest": "^4.13.0",
|
|
47
|
+
"@digest/eslint-config-react": "^4.13.0",
|
|
48
|
+
"@digest/eslint-config-typescript": "^4.13.0",
|
|
49
|
+
"@digest/jest-junit": "^4.13.0",
|
|
50
|
+
"@digest/jest-react": "^4.13.0",
|
|
51
|
+
"@digest/jest-typescript": "^4.13.0",
|
|
52
|
+
"@digest/typescript": "^4.13.0",
|
|
53
|
+
"@openspacelabs/react-native-zoomable-view": "^2.1.6",
|
|
54
|
+
"@react-native-community/blur": "^4.4.1",
|
|
55
|
+
"@types/jest": "^29.5.14",
|
|
56
|
+
"@types/node": "^22.10.1",
|
|
57
|
+
"@types/react": "^18.3.12",
|
|
58
|
+
"@types/react-native": "^0.73.0",
|
|
59
|
+
"@types/react-test-renderer": "^18.3.0",
|
|
60
|
+
"cross-env": "^7.0.3",
|
|
61
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
62
|
+
"jest-environment-jsdom-global": "^4.0.0",
|
|
63
|
+
"ncp": "^2.0.0",
|
|
64
|
+
"npm-run-all": "^4.1.5",
|
|
65
|
+
"react": "^18.3.1",
|
|
66
|
+
"react-native": "^0.76.3",
|
|
67
|
+
"react-native-draggable": "^3.3.0",
|
|
68
|
+
"react-native-reanimated": "^3.16.3",
|
|
69
|
+
"react-native-svg": "^15.9.0",
|
|
70
|
+
"react-test-renderer": "^18.3.1",
|
|
71
|
+
"rimraf": "^6.0.1"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"@lincle/react-native-interactive": "^0.4.0-next.13",
|
|
75
|
+
"@lincle/react-shared": "^0.4.0-next.13"
|
|
76
|
+
},
|
|
77
|
+
"peerDependencies": {
|
|
78
|
+
"@openspacelabs/react-native-zoomable-view": "^2.1.0",
|
|
79
|
+
"@react-native-community/blur": "^4.0.0",
|
|
80
|
+
"react": "^18.0.0",
|
|
81
|
+
"react-native": "^0.76.0",
|
|
82
|
+
"react-native-draggable": "^3.3.0",
|
|
83
|
+
"react-native-reanimated": "^3.0.0",
|
|
84
|
+
"react-native-svg": "^15.0.0"
|
|
85
|
+
},
|
|
86
|
+
"keywords": [
|
|
87
|
+
"library",
|
|
88
|
+
"lincle",
|
|
89
|
+
"typescript",
|
|
90
|
+
"react",
|
|
91
|
+
"reactjs",
|
|
92
|
+
"react-dom",
|
|
93
|
+
"react-native",
|
|
94
|
+
"reactive",
|
|
95
|
+
"react-draggable",
|
|
96
|
+
"interactive",
|
|
97
|
+
"graph",
|
|
98
|
+
"diagram",
|
|
99
|
+
"dag",
|
|
100
|
+
"acyclical graph",
|
|
101
|
+
"cyclical graph",
|
|
102
|
+
"dragndrop",
|
|
103
|
+
"drag"
|
|
104
|
+
],
|
|
105
|
+
"gitHead": "84d45ca98dd0d6589c697cc7457a897fa777340f"
|
|
106
106
|
}
|