@lincle/react-native-base 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.
|
@@ -3,8 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const shared_1 = require("../../../../shared");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const react_native_reanimated_1 = require("react-native-reanimated");
|
|
6
7
|
const react_native_svg_1 = require("react-native-svg");
|
|
7
|
-
const
|
|
8
|
+
const AnimatedPath = (0, react_native_reanimated_1.createAnimatedComponent)(react_native_svg_1.Path);
|
|
9
|
+
const Path = ({ center = true, edgeId, isConnecting, line, markerEnd: givenMarkerEnd, markerStart: givenMarkerStart, source, target }) => {
|
|
10
|
+
const progress = (0, react_native_reanimated_1.useSharedValue)(0);
|
|
11
|
+
(0, react_1.useEffect)(() => {
|
|
12
|
+
progress.value = (0, react_native_reanimated_1.withRepeat)((0, react_native_reanimated_1.withTiming)(1, {
|
|
13
|
+
duration: 5000,
|
|
14
|
+
easing: react_native_reanimated_1.Easing.linear
|
|
15
|
+
}), -1, false, () => { }, react_native_reanimated_1.ReduceMotion.Never);
|
|
16
|
+
}, [
|
|
17
|
+
progress
|
|
18
|
+
]);
|
|
19
|
+
const animatedStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
20
|
+
return {
|
|
21
|
+
strokeDashoffset: 100 * (30 - progress.value)
|
|
22
|
+
};
|
|
23
|
+
});
|
|
8
24
|
const diagramId = (0, shared_1.useDiagramId)();
|
|
9
25
|
const updateEdge = (0, shared_1.useUpdateEdge)();
|
|
10
26
|
const origins = (0, react_1.useMemo)(() => {
|
|
@@ -51,7 +67,7 @@ const Path = ({ center = true, edgeId, line, markerEnd: givenMarkerEnd, markerSt
|
|
|
51
67
|
diagramId,
|
|
52
68
|
givenMarkerStart
|
|
53
69
|
]);
|
|
54
|
-
return ((0, jsx_runtime_1.jsxs)(react_native_svg_1.G, { children: [(0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { d: origins === null || origins === void 0 ? void 0 : origins.path, fill: 'transparent', id: diagramId + '1', opacity: 0, pointerEvents: 'box-none', stroke: 'black', strokeWidth: 30 }), (0, jsx_runtime_1.jsx)(
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)(react_native_svg_1.G, { children: [(0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { d: origins === null || origins === void 0 ? void 0 : origins.path, fill: 'transparent', id: diagramId + '1', opacity: 0, pointerEvents: 'box-none', stroke: 'black', strokeWidth: 30 }), (0, jsx_runtime_1.jsx)(AnimatedPath, { d: origins === null || origins === void 0 ? void 0 : origins.path, fill: 'transparent', id: diagramId + '2', markerEnd: markerEnd, markerStart: markerStart, pointerEvents: 'box-none', stroke: 'black', strokeDasharray: isConnecting ? '5 5' : undefined, style: isConnecting ? animatedStyle : undefined })] }));
|
|
55
71
|
};
|
|
56
72
|
Path.displayName = 'LinclePath';
|
|
57
73
|
exports.default = Path;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@lincle/react-native-base",
|
|
3
3
|
"title": "lincle react native base",
|
|
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": "A 'reactive' React node and edge generator",
|
|
8
8
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
@@ -43,35 +43,37 @@
|
|
|
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.
|
|
53
|
-
"@types/jest": "^
|
|
54
|
-
"@types/node": "^
|
|
55
|
-
"@types/react": "^19.
|
|
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
|
+
"@types/jest": "^30.0.0",
|
|
54
|
+
"@types/node": "^25.0.3",
|
|
55
|
+
"@types/react": "^19.2.7",
|
|
56
56
|
"@types/react-native": "^0.73.0",
|
|
57
57
|
"@types/react-test-renderer": "^19.1.0",
|
|
58
|
-
"cross-env": "^
|
|
59
|
-
"jest-environment-jsdom": "^
|
|
58
|
+
"cross-env": "^10.1.0",
|
|
59
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
60
60
|
"jest-environment-jsdom-global": "^4.0.0",
|
|
61
61
|
"ncp": "^2.0.0",
|
|
62
62
|
"npm-run-all": "^4.1.5",
|
|
63
|
-
"react": "^19.
|
|
64
|
-
"react-native": "^0.
|
|
65
|
-
"react-native-
|
|
66
|
-
"react-
|
|
67
|
-
"
|
|
63
|
+
"react": "^19.2.3",
|
|
64
|
+
"react-native": "^0.83.1",
|
|
65
|
+
"react-native-reanimated": "^4.2.1",
|
|
66
|
+
"react-native-svg": "^15.15.1",
|
|
67
|
+
"react-test-renderer": "^19.2.3",
|
|
68
|
+
"rimraf": "^6.1.2"
|
|
68
69
|
},
|
|
69
70
|
"dependencies": {
|
|
70
|
-
"@lincle/react-shared": "^0.4.0-next.
|
|
71
|
+
"@lincle/react-shared": "^0.4.0-next.17"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
74
|
"react": "^18.0.0 || ^19.0.0",
|
|
74
|
-
"react-native": "^0.
|
|
75
|
+
"react-native": "^0.83.0",
|
|
76
|
+
"react-native-reanimated": "^4.0.0",
|
|
75
77
|
"react-native-svg": "^15.0.0"
|
|
76
78
|
},
|
|
77
79
|
"keywords": [
|
|
@@ -89,5 +91,5 @@
|
|
|
89
91
|
"acyclical graph",
|
|
90
92
|
"cyclical graph"
|
|
91
93
|
],
|
|
92
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "25bbe98ceef3b13ee0ee23ea3b261d8a115c0771"
|
|
93
95
|
}
|