earth-map-3d-react 0.0.1
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/LICENSE +21 -0
- package/README.md +38 -0
- package/dist/earth-map-3d-react.es.js +54128 -0
- package/dist/index.d.ts +82 -0
- package/dist/lumera.svg +49 -0
- package/package.json +55 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { Vector3 } from 'three';
|
|
3
|
+
|
|
4
|
+
export declare interface AnimatedEdgeProps {
|
|
5
|
+
start: Vector3;
|
|
6
|
+
end: Vector3;
|
|
7
|
+
lineColor?: string;
|
|
8
|
+
lineOpacity?: number;
|
|
9
|
+
materialColor?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export declare interface CountryData {
|
|
13
|
+
code: string;
|
|
14
|
+
country: string;
|
|
15
|
+
count: number;
|
|
16
|
+
avgLat: number;
|
|
17
|
+
avgLng: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare interface CountryEdgeData {
|
|
21
|
+
fromCode: string;
|
|
22
|
+
toCode: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare interface EdgeData {
|
|
26
|
+
from: number;
|
|
27
|
+
to: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare interface FlagNodeProps {
|
|
31
|
+
position: Vector3;
|
|
32
|
+
country: string;
|
|
33
|
+
count: number;
|
|
34
|
+
countryCode: string;
|
|
35
|
+
badgeColor?: string;
|
|
36
|
+
badgeBg?: string;
|
|
37
|
+
countFont?: string;
|
|
38
|
+
countryFont?: string;
|
|
39
|
+
onFlagClick: (countryCode: string) => void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare interface IEarthScene {
|
|
43
|
+
countries: CountryData[];
|
|
44
|
+
countryEdges: CountryEdgeData[];
|
|
45
|
+
badgeColor?: string;
|
|
46
|
+
badgeBg?: string;
|
|
47
|
+
lineColor?: string;
|
|
48
|
+
lineOpacity?: number;
|
|
49
|
+
materialColor?: string;
|
|
50
|
+
countFont?: string;
|
|
51
|
+
countryFont?: string;
|
|
52
|
+
onFlagClick?: (countryCode: string) => void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export declare interface INetworkOverview {
|
|
56
|
+
countries: CountryData[];
|
|
57
|
+
countryEdges: CountryEdgeData[];
|
|
58
|
+
className?: string;
|
|
59
|
+
badgeColor?: string;
|
|
60
|
+
badgeBg?: string;
|
|
61
|
+
lineColor?: string;
|
|
62
|
+
lineOpacity?: number;
|
|
63
|
+
materialColor?: string;
|
|
64
|
+
fov?: number;
|
|
65
|
+
position?: [x: number, y: number, z: number];
|
|
66
|
+
countFont?: string;
|
|
67
|
+
countryFont?: string;
|
|
68
|
+
onFlagClick?: (countryCode: string) => void;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare function NetworkOverview({ countries, countryEdges, className, badgeColor, badgeBg, lineColor, lineOpacity, materialColor, fov, position, countFont, countryFont, onFlagClick, }: INetworkOverview): JSX.Element;
|
|
72
|
+
|
|
73
|
+
export declare interface NodeData {
|
|
74
|
+
id: number;
|
|
75
|
+
lat: number;
|
|
76
|
+
lng: number;
|
|
77
|
+
name: string;
|
|
78
|
+
country: string;
|
|
79
|
+
countryCode: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { }
|
package/dist/lumera.svg
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 250.9 250.9">
|
|
3
|
+
<!-- Generator: Adobe Illustrator 29.4.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 152) -->
|
|
4
|
+
<defs>
|
|
5
|
+
<style>
|
|
6
|
+
.st0 {
|
|
7
|
+
fill: url(#linear-gradient2);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.st1 {
|
|
11
|
+
fill: url(#linear-gradient1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.st2 {
|
|
15
|
+
fill: url(#linear-gradient3);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.st3 {
|
|
19
|
+
fill: url(#linear-gradient5);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.st4 {
|
|
23
|
+
fill: url(#linear-gradient4);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.st5 {
|
|
27
|
+
fill: url(#linear-gradient);
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
30
|
+
<linearGradient id="linear-gradient" x1="65.3" y1="279.7" x2="65.3" y2="2" gradientTransform="translate(0 280) scale(1 -1)" gradientUnits="userSpaceOnUse">
|
|
31
|
+
<stop offset="0" stop-color="#078a8a"/>
|
|
32
|
+
<stop offset=".5" stop-color="#47c78a"/>
|
|
33
|
+
</linearGradient>
|
|
34
|
+
<linearGradient id="linear-gradient1" x1="281.2" y1="32" x2="103.3" y2="36.6" gradientTransform="translate(0 280) scale(1 -1)" gradientUnits="userSpaceOnUse">
|
|
35
|
+
<stop offset=".5" stop-color="#47c78a"/>
|
|
36
|
+
<stop offset="1" stop-color="#078a8a"/>
|
|
37
|
+
</linearGradient>
|
|
38
|
+
<linearGradient id="linear-gradient2" x1="282.6" y1="52.3" x2="96.3" y2="57.3" xlink:href="#linear-gradient1"/>
|
|
39
|
+
<linearGradient id="linear-gradient3" x1="283" y1="73.2" x2="94.4" y2="78.3" xlink:href="#linear-gradient1"/>
|
|
40
|
+
<linearGradient id="linear-gradient4" x1="283" y1="94" x2="94.1" y2="99.2" xlink:href="#linear-gradient1"/>
|
|
41
|
+
<linearGradient id="linear-gradient5" x1="283" y1="114.9" x2="94.1" y2="120.1" xlink:href="#linear-gradient1"/>
|
|
42
|
+
</defs>
|
|
43
|
+
<path class="st5" d="M94,181.5V0h-10.5v177.7c0,31.7,3,63.4,26.2,71.8-37.5-7.1-36.7-45.7-36.7-78.6V0h-10.5v167.1c0,25.4,3.7,66.5,22,77.1-30.2-12.1-32.4-52.8-32.4-83.6V0h-10.5v156.8c0,19.7,1.3,53,17.2,75.1-30.2-26.5-27.6-55.5-27.6-81.8V0h-10.5v146.3c0,12.5-2.8,44.5,16.4,70.6-20.5-23.9-26.8-54.6-26.8-77.3V0H0v135.9C0,198.6,52.3,250.9,115,250.9h15.7c-26.2,0-36.6-7.8-36.6-69.4Z"/>
|
|
44
|
+
<path class="st1" d="M130.7,250.9h120.2v-10.5H103.3c5.9,8.6,14.8,10.5,27.4,10.5Z"/>
|
|
45
|
+
<path class="st0" d="M250.9,230v-10.5H96.3c.6,4,1.4,7.4,2.3,10.5h152.3Z"/>
|
|
46
|
+
<path class="st2" d="M250.9,209.1v-10.5H94.4c.2,3.7.4,7.2.7,10.5h155.9Z"/>
|
|
47
|
+
<path class="st4" d="M94.1,188.2h156.8v-10.5H94v3.8c0,2.3,0,4.5,0,6.6Z"/>
|
|
48
|
+
<rect class="st3" x="94" y="156.8" width="156.9" height="10.5"/>
|
|
49
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "earth-map-3d-react",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": ".",
|
|
5
|
+
"author": "Lumera Protocol",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "vite",
|
|
10
|
+
"build": "vite build",
|
|
11
|
+
"lint": "eslint .",
|
|
12
|
+
"preview": "vite preview"
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/earth-map-3d-react.umd.js",
|
|
15
|
+
"module": "./dist/earth-map-3d-react.es.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/earth-map-3d-react.es.js",
|
|
21
|
+
"require": "./dist/earth-map-3d-react.umd.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"package.json",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@react-three/drei": "^10.7.7",
|
|
31
|
+
"@react-three/fiber": "^9.4.2",
|
|
32
|
+
"@react-three/postprocessing": "^3.0.4",
|
|
33
|
+
"postprocessing": "^6.38.1",
|
|
34
|
+
"react": "^19.2.0",
|
|
35
|
+
"react-dom": "^19.2.0",
|
|
36
|
+
"three": "^0.182.0",
|
|
37
|
+
"zustand": "^5.0.9"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@eslint/js": "^9.39.1",
|
|
41
|
+
"@types/node": "^24.10.0",
|
|
42
|
+
"@types/react": "^19.2.2",
|
|
43
|
+
"@types/react-dom": "^19.2.2",
|
|
44
|
+
"@vitejs/plugin-react": "^5.1.0",
|
|
45
|
+
"eslint": "^9.39.1",
|
|
46
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
47
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
48
|
+
"globals": "^16.5.0",
|
|
49
|
+
"typescript": "~5.9.3",
|
|
50
|
+
"typescript-eslint": "^8.46.3",
|
|
51
|
+
"vite": "^7.2.2",
|
|
52
|
+
"vite-plugin-dts": "^4.5.4",
|
|
53
|
+
"vite-plugin-node-polyfills": "^0.24.0"
|
|
54
|
+
}
|
|
55
|
+
}
|