@dxos/react-ui-geo 0.7.5-main.e9bb01b → 0.7.5-main.ff8607b

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;AAiOzD,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"}
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-main.e9bb01b",
3
+ "version": "0.7.5-main.ff8607b",
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/async": "0.7.5-main.e9bb01b",
48
- "@dxos/debug": "0.7.5-main.e9bb01b",
49
- "@dxos/node-std": "0.7.5-main.e9bb01b",
50
- "@dxos/util": "0.7.5-main.e9bb01b"
47
+ "@dxos/async": "0.7.5-main.ff8607b",
48
+ "@dxos/debug": "0.7.5-main.ff8607b",
49
+ "@dxos/node-std": "0.7.5-main.ff8607b",
50
+ "@dxos/util": "0.7.5-main.ff8607b"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@react-three/drei": "^9.112.0",
@@ -67,15 +67,15 @@
67
67
  "react": "~18.2.0",
68
68
  "react-dom": "~18.2.0",
69
69
  "three": "^0.168.0",
70
- "@dxos/react-ui": "0.7.5-main.e9bb01b",
71
- "@dxos/react-ui-theme": "0.7.5-main.e9bb01b",
72
- "@dxos/storybook-utils": "0.7.5-main.e9bb01b"
70
+ "@dxos/react-ui": "0.7.5-main.ff8607b",
71
+ "@dxos/react-ui-theme": "0.7.5-main.ff8607b",
72
+ "@dxos/storybook-utils": "0.7.5-main.ff8607b"
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-main.e9bb01b",
78
- "@dxos/react-ui-theme": "0.7.5-main.e9bb01b"
77
+ "@dxos/react-ui": "0.7.5-main.ff8607b",
78
+ "@dxos/react-ui-theme": "0.7.5-main.ff8607b"
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): Local script (e.g., plot on chart) vs. remote functions.
22
- // TODO(burdon): Add charts to sheet.
23
- // TODO(burdon): Able to script (e.g., list of cities from named range).
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,7 +152,7 @@ const Story = ({
162
152
  objects: { dots: points },
163
153
  } as any as Topology;
164
154
  });
165
- const [topology] = useImportJson('../../../data/raw/countries-110m.json');
155
+ const [topology] = useTopology();
166
156
  const [airports] = useAsyncState(async () => (await import('../../../data/airports.ts')).default);
167
157
  const features = useMemo(() => {
168
158
  return airports ? createTrip(airports, routes, (dots?.objects.dots as any)?.geometries[0].coordinates) : undefined;
@@ -241,7 +231,7 @@ const meta: Meta = {
241
231
  export default meta;
242
232
 
243
233
  export const Earth1 = () => {
244
- const [topology] = useImportJson('../../../data/raw/countries-110m.json');
234
+ const [topology] = useTopology();
245
235
  const [controller, setController] = useState<GlobeController | null>();
246
236
  const handleAction = useGlobeZoomHandler(controller);
247
237
  useDrag(controller);
@@ -255,7 +245,7 @@ export const Earth1 = () => {
255
245
  };
256
246
 
257
247
  export const Earth2 = () => {
258
- const [topology] = useImportJson('../../../data/raw/countries-110m.json');
248
+ const [topology] = useTopology();
259
249
  const [controller, setController] = useState<GlobeController | null>();
260
250
  const handleAction = useGlobeZoomHandler(controller);
261
251
  useDrag(controller);
@@ -290,7 +280,7 @@ const monochrome: StyleSet = {
290
280
  };
291
281
 
292
282
  export const Mercator = () => {
293
- const [topology] = useImportJson('../../../data/raw/countries-110m.json');
283
+ const [topology] = useTopology();
294
284
  const [controller, setController] = useState<GlobeController | null>();
295
285
  const handleAction = useGlobeZoomHandler(controller);
296
286
  useDrag(controller);