@dxos/react-ui-geo 0.7.5-labs.e27f9b9 → 0.7.5-labs.f5080a1
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,KAAoC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,KAAoC,MAAM,OAAO,CAAC;AAuNzD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,MAAM,yBAYlB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAclB,CAAC;AAqBF,eAAO,MAAM,QAAQ,yBAYpB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC;AAEF,eAAO,MAAM,MAAM,yBAElB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-geo",
|
|
3
|
-
"version": "0.7.5-labs.
|
|
3
|
+
"version": "0.7.5-labs.f5080a1",
|
|
4
4
|
"description": "Geo components.",
|
|
5
5
|
"homepage": "https://github.com/dxos",
|
|
6
6
|
"bugs": "https://github.com/dxos/issues",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"topojson-client": "^3.1.0",
|
|
45
45
|
"topojson-simplify": "^3.0.3",
|
|
46
46
|
"versor": "^0.2.0",
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
47
|
+
"@dxos/node-std": "0.7.5-labs.f5080a1",
|
|
48
|
+
"@dxos/debug": "0.7.5-labs.f5080a1",
|
|
49
|
+
"@dxos/util": "0.7.5-labs.f5080a1",
|
|
50
|
+
"@dxos/async": "0.7.5-labs.f5080a1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@react-three/drei": "^9.99.0",
|
|
@@ -67,15 +67,15 @@
|
|
|
67
67
|
"react": "~18.2.0",
|
|
68
68
|
"react-dom": "~18.2.0",
|
|
69
69
|
"three": "0.165.0",
|
|
70
|
-
"@dxos/react-ui": "0.7.5-labs.
|
|
71
|
-
"@dxos/react-ui-theme": "0.7.5-labs.
|
|
72
|
-
"@dxos/storybook-utils": "0.7.5-labs.
|
|
70
|
+
"@dxos/react-ui": "0.7.5-labs.f5080a1",
|
|
71
|
+
"@dxos/react-ui-theme": "0.7.5-labs.f5080a1",
|
|
72
|
+
"@dxos/storybook-utils": "0.7.5-labs.f5080a1"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"react": "~18.2.0",
|
|
76
76
|
"react-dom": "~18.2.0",
|
|
77
|
-
"@dxos/react-ui": "0.7.5-labs.
|
|
78
|
-
"@dxos/react-ui-theme": "0.7.5-labs.
|
|
77
|
+
"@dxos/react-ui": "0.7.5-labs.f5080a1",
|
|
78
|
+
"@dxos/react-ui-theme": "0.7.5-labs.f5080a1"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
@@ -18,19 +18,9 @@ import { useDrag, useGlobeZoomHandler, useSpinner, useTour, type Vector } from '
|
|
|
18
18
|
import { closestPoint, type LatLng, type StyleSet } from '../../util';
|
|
19
19
|
import { type ControlProps } from '../Toolbar';
|
|
20
20
|
|
|
21
|
-
// TODO(burdon):
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// TODO(burdon): Search flight information. Calendar (itinerary).
|
|
25
|
-
// TODO(burdon): Show MANY packets flowing across the network.
|
|
26
|
-
|
|
27
|
-
const useImportJson = (filename: string) => {
|
|
28
|
-
return useAsyncState(
|
|
29
|
-
// TODO(burdon): Configure vite plugins for experimental syntax.
|
|
30
|
-
// @babel/plugin-syntax-import-assertions
|
|
31
|
-
// @babel/plugin-syntax-import-attributes
|
|
32
|
-
async () => await import(filename), // { assert: { type: 'json' } }),
|
|
33
|
-
);
|
|
21
|
+
// TODO(burdon): Load from JSON at runtime?
|
|
22
|
+
const useTopology = () => {
|
|
23
|
+
return useAsyncState(async () => (await import('../../../data/countries-110m.ts')).default);
|
|
34
24
|
};
|
|
35
25
|
|
|
36
26
|
const defaultStyles: StyleSet = {
|
|
@@ -162,8 +152,7 @@ const Story = ({
|
|
|
162
152
|
objects: { dots: points },
|
|
163
153
|
} as any as Topology;
|
|
164
154
|
});
|
|
165
|
-
|
|
166
|
-
const [topology] = useAsyncState(async () => (await import('../../../data/countries-110m.ts')).default);
|
|
155
|
+
const [topology] = useTopology();
|
|
167
156
|
const [airports] = useAsyncState(async () => (await import('../../../data/airports.ts')).default);
|
|
168
157
|
const features = useMemo(() => {
|
|
169
158
|
return airports ? createTrip(airports, routes, (dots?.objects.dots as any)?.geometries[0].coordinates) : undefined;
|
|
@@ -242,8 +231,7 @@ const meta: Meta = {
|
|
|
242
231
|
export default meta;
|
|
243
232
|
|
|
244
233
|
export const Earth1 = () => {
|
|
245
|
-
|
|
246
|
-
const [topology] = useAsyncState(async () => (await import('../../../data/countries-110m.ts')).default);
|
|
234
|
+
const [topology] = useTopology();
|
|
247
235
|
const [controller, setController] = useState<GlobeController | null>();
|
|
248
236
|
const handleAction = useGlobeZoomHandler(controller);
|
|
249
237
|
useDrag(controller);
|
|
@@ -257,8 +245,7 @@ export const Earth1 = () => {
|
|
|
257
245
|
};
|
|
258
246
|
|
|
259
247
|
export const Earth2 = () => {
|
|
260
|
-
|
|
261
|
-
const [topology] = useAsyncState(async () => (await import('../../../data/countries-110m.ts')).default);
|
|
248
|
+
const [topology] = useTopology();
|
|
262
249
|
const [controller, setController] = useState<GlobeController | null>();
|
|
263
250
|
const handleAction = useGlobeZoomHandler(controller);
|
|
264
251
|
useDrag(controller);
|
|
@@ -293,8 +280,7 @@ const monochrome: StyleSet = {
|
|
|
293
280
|
};
|
|
294
281
|
|
|
295
282
|
export const Mercator = () => {
|
|
296
|
-
|
|
297
|
-
const [topology] = useAsyncState(async () => (await import('../../../data/countries-110m.ts')).default);
|
|
283
|
+
const [topology] = useTopology();
|
|
298
284
|
const [controller, setController] = useState<GlobeController | null>();
|
|
299
285
|
const handleAction = useGlobeZoomHandler(controller);
|
|
300
286
|
useDrag(controller);
|