@dxos/react-ui-geo 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
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/lib/browser/index.mjs +3 -3
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +3 -3
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.stories.d.ts +3 -3
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Map/Map.d.ts +1 -1
- package/dist/types/src/components/Map/Map.d.ts.map +1 -1
- package/dist/types/src/components/Map/Map.stories.d.ts +2 -2
- package/dist/types/src/components/Map/Map.stories.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/src/components/Globe/Globe.stories.tsx +2 -2
- package/src/components/Globe/Globe.tsx +4 -4
- package/src/components/Map/Map.stories.tsx +3 -3
- package/src/components/Map/Map.tsx +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-geo",
|
|
3
|
-
"version": "0.9.1-
|
|
3
|
+
"version": "0.9.1-staging.ee54ba693a",
|
|
4
4
|
"description": "Geo components.",
|
|
5
5
|
"homepage": "https://github.com/dxos",
|
|
6
6
|
"bugs": "https://github.com/dxos/issues",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"topojson-client": "^3.1.0",
|
|
56
56
|
"topojson-simplify": "^3.0.3",
|
|
57
57
|
"versor": "^0.2.0",
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/util": "0.9.1-
|
|
61
|
-
"@dxos/node-std": "0.9.1-
|
|
62
|
-
"@dxos/
|
|
58
|
+
"@dxos/async": "0.9.1-staging.ee54ba693a",
|
|
59
|
+
"@dxos/debug": "0.9.1-staging.ee54ba693a",
|
|
60
|
+
"@dxos/util": "0.9.1-staging.ee54ba693a",
|
|
61
|
+
"@dxos/node-std": "0.9.1-staging.ee54ba693a",
|
|
62
|
+
"@dxos/log": "0.9.1-staging.ee54ba693a"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@react-three/drei": "^10.7.7",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@types/d3": "^7.4.3",
|
|
68
68
|
"@types/geojson": "^7946.0.14",
|
|
69
69
|
"@types/leaflet": "^1.9.16",
|
|
70
|
-
"@types/react": "~19.2.
|
|
70
|
+
"@types/react": "~19.2.17",
|
|
71
71
|
"@types/react-dom": "~19.2.3",
|
|
72
72
|
"@types/three": "0.165.0",
|
|
73
73
|
"@types/topojson-client": "^3.1.4",
|
|
@@ -76,18 +76,18 @@
|
|
|
76
76
|
"JSONStream": "^1.3.5",
|
|
77
77
|
"geojson2h3": "^1.2.0",
|
|
78
78
|
"leva": "^0.10.1",
|
|
79
|
-
"react": "~19.2.
|
|
80
|
-
"react-dom": "~19.2.
|
|
79
|
+
"react": "~19.2.7",
|
|
80
|
+
"react-dom": "~19.2.7",
|
|
81
81
|
"three": "^0.178.0",
|
|
82
|
-
"@dxos/ui
|
|
83
|
-
"@dxos/storybook-utils": "0.9.1-
|
|
84
|
-
"@dxos/
|
|
82
|
+
"@dxos/react-ui": "0.9.1-staging.ee54ba693a",
|
|
83
|
+
"@dxos/storybook-utils": "0.9.1-staging.ee54ba693a",
|
|
84
|
+
"@dxos/ui-theme": "0.9.1-staging.ee54ba693a"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"react": "~19.2.
|
|
88
|
-
"react-dom": "~19.2.
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/ui
|
|
87
|
+
"react": "~19.2.7",
|
|
88
|
+
"react-dom": "~19.2.7",
|
|
89
|
+
"@dxos/ui-theme": "0.9.1-staging.ee54ba693a",
|
|
90
|
+
"@dxos/react-ui": "0.9.1-staging.ee54ba693a"
|
|
91
91
|
},
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|
|
@@ -125,7 +125,7 @@ const createTrip = (
|
|
|
125
125
|
);
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
type
|
|
128
|
+
type StoryArgs = Pick<GlobeRootProps, 'zoom' | 'translation' | 'rotation'> &
|
|
129
129
|
Pick<GlobeCanvasProps, 'projection' | 'styles'> & {
|
|
130
130
|
drag?: boolean;
|
|
131
131
|
spin?: boolean;
|
|
@@ -149,7 +149,7 @@ const DefaultStory = ({
|
|
|
149
149
|
lockTilt = false,
|
|
150
150
|
mode,
|
|
151
151
|
level = '110m',
|
|
152
|
-
}:
|
|
152
|
+
}: StoryArgs) => {
|
|
153
153
|
const [controller, setController] = useState<GlobeController | null>(null);
|
|
154
154
|
const [dots] = useAsyncState(async () => {
|
|
155
155
|
const points = (await import('../../../data/countries-dots-3.ts')).default;
|
|
@@ -30,8 +30,8 @@ import { useResizeDetector } from 'react-resize-detector';
|
|
|
30
30
|
import { type Topology } from 'topojson-specification';
|
|
31
31
|
|
|
32
32
|
import {
|
|
33
|
-
type ThemeMode,
|
|
34
33
|
type ThemedClassName,
|
|
34
|
+
type ThemeMode,
|
|
35
35
|
useComposedRefs,
|
|
36
36
|
useControlledState,
|
|
37
37
|
useDynamicRef,
|
|
@@ -111,8 +111,8 @@ const defaultStyles: Record<ThemeMode, StyleSet> = {
|
|
|
111
111
|
export type ProjectionType = 'orthographic' | 'mercator' | 'transverse-mercator';
|
|
112
112
|
|
|
113
113
|
const projectionMap: Record<ProjectionType, () => GeoProjection> = {
|
|
114
|
-
orthographic: geoOrthographic,
|
|
115
|
-
mercator: geoMercator,
|
|
114
|
+
'orthographic': geoOrthographic,
|
|
115
|
+
'mercator': geoMercator,
|
|
116
116
|
'transverse-mercator': geoTransverseMercator,
|
|
117
117
|
};
|
|
118
118
|
|
|
@@ -460,4 +460,4 @@ export const Globe = {
|
|
|
460
460
|
Panel: GlobePanel,
|
|
461
461
|
};
|
|
462
462
|
|
|
463
|
-
export type { GlobeRootProps, GlobeViewportProps
|
|
463
|
+
export type { GlobeCanvasProps, GlobeRootProps, GlobeViewportProps };
|
|
@@ -10,11 +10,11 @@ import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
|
10
10
|
|
|
11
11
|
import { useMapZoomHandler } from '../../hooks';
|
|
12
12
|
import { type GeoMarker } from '../../types';
|
|
13
|
-
import { Map, MapMarkersProps, MapTilesProps
|
|
13
|
+
import { Map, type MapController, MapMarkersProps, MapTilesProps } from './Map';
|
|
14
14
|
|
|
15
|
-
type
|
|
15
|
+
type StoryArgs = Pick<MapTilesProps, 'url'> & Pick<MapMarkersProps, 'markers'>;
|
|
16
16
|
|
|
17
|
-
const DefaultStory = ({ url: urlProp, markers = [] }:
|
|
17
|
+
const DefaultStory = ({ url: urlProp, markers = [] }: StoryArgs) => {
|
|
18
18
|
const [controller, setController] = useState<MapController>();
|
|
19
19
|
const [key, setKey] = useState('');
|
|
20
20
|
// Substitute the `${key}` placeholder in a keyed tile URL (e.g. MapTiler); undefined → default OSM tiles.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import 'leaflet/dist/leaflet.css';
|
|
6
6
|
|
|
7
7
|
import { createContext } from '@radix-ui/react-context';
|
|
8
|
-
import L, { Control, type ControlPosition, DomEvent, DomUtil, type LatLngLiteral,
|
|
8
|
+
import L, { Control, type ControlPosition, DomEvent, DomUtil, type LatLngLiteral, latLngBounds, point } from 'leaflet';
|
|
9
9
|
import React, {
|
|
10
10
|
type PropsWithChildren,
|
|
11
11
|
forwardRef,
|
|
@@ -533,10 +533,10 @@ export const Map = {
|
|
|
533
533
|
|
|
534
534
|
export {
|
|
535
535
|
type MapController,
|
|
536
|
+
type MapControlProps,
|
|
537
|
+
type MapLinesProps,
|
|
538
|
+
type MapMarkersProps,
|
|
536
539
|
type MapRootProps,
|
|
537
|
-
type MapViewportProps,
|
|
538
540
|
type MapTilesProps,
|
|
539
|
-
type
|
|
540
|
-
type MapLinesProps,
|
|
541
|
-
type MapControlProps,
|
|
541
|
+
type MapViewportProps,
|
|
542
542
|
};
|