@reearth/core 0.0.7-alpha.10 → 0.0.7-alpha.12
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/core.js +9587 -9581
- package/dist/core.umd.cjs +73 -73
- package/package.json +17 -2
- package/src/engines/Cesium/Feature/utils.tsx +9 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reearth/core",
|
|
3
|
-
"version": "0.0.7-alpha.
|
|
3
|
+
"version": "0.0.7-alpha.12",
|
|
4
4
|
"author": "Re:Earth contributors <community@reearth.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "A library that abstracts a map engine as one common API.",
|
|
@@ -32,6 +32,13 @@
|
|
|
32
32
|
"react-dom": "^18.2.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@radix-ui/react-checkbox": "1.1.1",
|
|
36
|
+
"@radix-ui/react-select": "2.1.1",
|
|
37
|
+
"@radix-ui/react-separator": "1.1.0",
|
|
38
|
+
"@radix-ui/react-switch": "1.1.0",
|
|
39
|
+
"@radix-ui/react-dialog": "1.1.1",
|
|
40
|
+
"@radix-ui/react-icons": "1.3.0",
|
|
41
|
+
"@radix-ui/react-slot": "1.1.0",
|
|
35
42
|
"@reearth/cesium-mvt-imagery-provider": "1.5.4",
|
|
36
43
|
"@rot1024/use-transition": "1.0.0",
|
|
37
44
|
"@seznam/compose-react-refs": "1.0.6",
|
|
@@ -61,8 +68,11 @@
|
|
|
61
68
|
"react-error-boundary": "4.0.11",
|
|
62
69
|
"react-nl2br": "1.0.4",
|
|
63
70
|
"react-use": "17.5.0",
|
|
64
|
-
"resium": "1.18.
|
|
71
|
+
"resium": "1.18.2",
|
|
65
72
|
"suspend-react": "0.1.3",
|
|
73
|
+
"tailwind-merge": "2.5.2",
|
|
74
|
+
"tailwindcss": "3.4.10",
|
|
75
|
+
"tailwindcss-animate": "1.0.7",
|
|
66
76
|
"tiny-invariant": "1.3.3",
|
|
67
77
|
"use-callback-ref": "1.3.2",
|
|
68
78
|
"use-custom-compare": "1.4.0",
|
|
@@ -91,17 +101,22 @@
|
|
|
91
101
|
"@types/pbf": "3.0.5",
|
|
92
102
|
"@types/react": "18.3.0",
|
|
93
103
|
"@types/react-dom": "18.3.0",
|
|
104
|
+
"@types/scheduler": "0.23.0",
|
|
94
105
|
"@types/uuid": "9.0.8",
|
|
95
106
|
"@typescript-eslint/eslint-plugin": "7.2.0",
|
|
96
107
|
"@typescript-eslint/parser": "7.2.0",
|
|
97
108
|
"@vitejs/plugin-react": "4.2.1",
|
|
109
|
+
"autoprefixer": "10.4.20",
|
|
98
110
|
"cesium": "1.118.0",
|
|
111
|
+
"class-variance-authority": "0.7.0",
|
|
112
|
+
"clsx": "2.1.1",
|
|
99
113
|
"eslint": "8.57.0",
|
|
100
114
|
"eslint-config-reearth": "0.3.0",
|
|
101
115
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
102
116
|
"eslint-plugin-react-refresh": "0.4.6",
|
|
103
117
|
"eslint-plugin-storybook": "0.8.0",
|
|
104
118
|
"jsdom": "22.1.0",
|
|
119
|
+
"postcss": "8.4.41",
|
|
105
120
|
"prettier": "3.2.5",
|
|
106
121
|
"react": "18.2.0",
|
|
107
122
|
"react-dom": "18.2.0",
|
|
@@ -23,9 +23,10 @@ import {
|
|
|
23
23
|
ComponentType,
|
|
24
24
|
ForwardedRef,
|
|
25
25
|
forwardRef,
|
|
26
|
+
useCallback,
|
|
26
27
|
useLayoutEffect,
|
|
27
28
|
useMemo,
|
|
28
|
-
|
|
29
|
+
useState,
|
|
29
30
|
} from "react";
|
|
30
31
|
import { type CesiumComponentRef, Entity } from "resium";
|
|
31
32
|
|
|
@@ -86,10 +87,11 @@ function EntityExtComponent(
|
|
|
86
87
|
}: ComponentProps<typeof Entity> & Tag,
|
|
87
88
|
ref: ForwardedRef<CesiumComponentRef<CesiumEntity>>,
|
|
88
89
|
) {
|
|
89
|
-
const
|
|
90
|
+
const [entity, setEntity] = useState<CesiumComponentRef<CesiumEntity> | null>(null);
|
|
90
91
|
|
|
91
92
|
useLayoutEffect(() => {
|
|
92
|
-
|
|
93
|
+
if (!entity?.cesiumElement) return;
|
|
94
|
+
attachTag(entity.cesiumElement, {
|
|
93
95
|
layerId: layerId || props.id,
|
|
94
96
|
featureId,
|
|
95
97
|
draggable,
|
|
@@ -105,10 +107,12 @@ function EntityExtComponent(
|
|
|
105
107
|
props.id,
|
|
106
108
|
unselectable,
|
|
107
109
|
hideIndicator,
|
|
108
|
-
|
|
110
|
+
entity,
|
|
109
111
|
]);
|
|
110
112
|
|
|
111
|
-
|
|
113
|
+
const handleRef = useCallback((r: CesiumComponentRef<CesiumEntity>) => setEntity(r), []);
|
|
114
|
+
|
|
115
|
+
return <Entity ref={composeRefs(ref, handleRef)} {...props} />;
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
export function attachTag(
|