@dxos/react-ui-geo 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
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 +112 -104
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +112 -104
- 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 +9 -3
- package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.stories.d.ts +10 -4
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Map/Map.d.ts +14 -4
- package/dist/types/src/components/Map/Map.d.ts.map +1 -1
- package/dist/types/src/components/Map/Map.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/context.d.ts +1 -3
- package/dist/types/src/hooks/context.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +4 -4
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -11
- package/src/components/Globe/Globe.stories.tsx +8 -8
- package/src/components/Globe/Globe.tsx +52 -26
- package/src/components/Map/Map.stories.tsx +9 -7
- package/src/components/Map/Map.tsx +70 -29
- package/src/components/Toolbar/Controls.tsx +4 -4
- package/src/hooks/context.tsx +5 -34
- package/src/translations.ts +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'leaflet/dist/leaflet.css';
|
|
2
2
|
import { type ControlPosition, type LatLngLiteral } from 'leaflet';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { type PropsWithChildren } from 'react';
|
|
4
4
|
import { type MapContainerProps } from 'react-leaflet';
|
|
5
5
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
6
6
|
import { type GeoMarker } from '../../types';
|
|
@@ -16,7 +16,8 @@ type MapContextValue = {
|
|
|
16
16
|
zoom: number;
|
|
17
17
|
}) => void;
|
|
18
18
|
};
|
|
19
|
-
type MapRootProps =
|
|
19
|
+
type MapRootProps = Pick<MapContextValue, 'onChange'>;
|
|
20
|
+
type MapContentProps = ThemedClassName<Omit<MapContainerProps, 'children'> & PropsWithChildren>;
|
|
20
21
|
type MapTilesProps = {};
|
|
21
22
|
type MapMarkersProps = {
|
|
22
23
|
markers?: GeoMarker[];
|
|
@@ -26,7 +27,16 @@ type MapControlProps = {
|
|
|
26
27
|
position?: ControlPosition;
|
|
27
28
|
} & Pick<ControlProps, 'onAction'>;
|
|
28
29
|
export declare const Map: {
|
|
29
|
-
Root: React.ForwardRefExoticComponent<Omit<
|
|
30
|
+
Root: React.ForwardRefExoticComponent<Omit<MapRootProps, "className"> & {
|
|
31
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
32
|
+
} & {
|
|
33
|
+
className?: string;
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
role?: string;
|
|
36
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
Content: React.ForwardRefExoticComponent<Omit<Omit<MapContainerProps, "children"> & {
|
|
38
|
+
children?: React.ReactNode | undefined;
|
|
39
|
+
}, "className"> & {
|
|
30
40
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
31
41
|
} & React.RefAttributes<MapController>>;
|
|
32
42
|
Tiles: {
|
|
@@ -40,5 +50,5 @@ export declare const Map: {
|
|
|
40
50
|
Zoom: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
|
|
41
51
|
Action: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
|
|
42
52
|
};
|
|
43
|
-
export { type MapController, type MapRootProps, type MapTilesProps, type MapMarkersProps, type MapControlProps };
|
|
53
|
+
export { type MapController, type MapRootProps, type MapContentProps, type MapTilesProps, type MapMarkersProps, type MapControlProps, };
|
|
44
54
|
//# sourceMappingURL=Map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.tsx"],"names":[],"mappings":"AAIA,OAAO,0BAA0B,CAAC;AAGlC,OAAU,EAAW,KAAK,eAAe,EAAqB,KAAK,aAAa,EAAgB,MAAM,SAAS,CAAC;AAChH,OAAO,
|
|
1
|
+
{"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.tsx"],"names":[],"mappings":"AAIA,OAAO,0BAA0B,CAAC;AAGlC,OAAU,EAAW,KAAK,eAAe,EAAqB,KAAK,aAAa,EAAgB,MAAM,SAAS,CAAC;AAChH,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAsD,MAAM,OAAO,CAAC;AAE1G,OAAO,EAAgB,KAAK,iBAAiB,EAAkD,MAAM,eAAe,CAAC;AAErH,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,gBAAgB,CAAC;AAG9E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAkB,KAAK,YAAY,EAAkC,MAAM,YAAY,CAAC;AAe/F,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,KAAK,IAAI,CAAC;CACjD,CAAC;AAMF,KAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAQF,KAAK,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AA6BtD,KAAK,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,iBAAiB,CAAC,CAAC;AAyEhG,KAAK,aAAa,GAAG,EAAE,CAAC;AAgExB,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAqFF,KAAK,eAAe,GAAG;IAAE,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAkBvF,eAAO,MAAM,GAAG;;;;;;;;;;;;;;iBAxKU,aAAa;;;;gCAmEI,eAAe;;;6CAqFQ,eAAe;+CAMZ,eAAe;CAiBnF,CAAC;AAEF,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Map.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAoB7C,QAAA,MAAM,IAAI;;eAEe,GAAG;0BAlBY;QAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAA;KAAE;;;;;CAwB5B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KA2BzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
import { type LatLngLiteral } from '../types';
|
|
3
3
|
export type Size = {
|
|
4
4
|
width: number;
|
|
@@ -20,7 +20,5 @@ export type GlobeContextType = {
|
|
|
20
20
|
setTranslation: Dispatch<SetStateAction<Point>>;
|
|
21
21
|
setRotation: Dispatch<SetStateAction<Vector>>;
|
|
22
22
|
};
|
|
23
|
-
export type GlobeContextProviderProps = PropsWithChildren<Partial<Pick<GlobeContextType, 'size' | 'center' | 'zoom' | 'translation' | 'rotation'>>>;
|
|
24
|
-
export declare const GlobeContextProvider: ({ children, size, center: centerProp, zoom: zoomProp, translation: translationProp, rotation: rotationProp, }: GlobeContextProviderProps) => React.JSX.Element;
|
|
25
23
|
export declare const useGlobeContext: () => GlobeContextType;
|
|
26
24
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/hooks/context.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/hooks/context.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAC;AAItF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,IAAI,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,KAAK,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;IACnD,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;CAC/C,CAAC;AAMF,eAAO,MAAM,eAAe,wBAE3B,CAAC"}
|
|
@@ -2,10 +2,10 @@ export declare const translationKey = "@dxos/react-ui-geo";
|
|
|
2
2
|
export declare const translations: [{
|
|
3
3
|
readonly 'en-US': {
|
|
4
4
|
readonly "@dxos/react-ui-geo": {
|
|
5
|
-
readonly 'zoom
|
|
6
|
-
readonly 'zoom
|
|
7
|
-
readonly 'start
|
|
8
|
-
readonly 'toggle
|
|
5
|
+
readonly 'zoom-in-icon.button': "Zoom in";
|
|
6
|
+
readonly 'zoom-out-icon.button': "Zoom out";
|
|
7
|
+
readonly 'start-icon.button': "Start";
|
|
8
|
+
readonly 'toggle-icon.button': "Toggle";
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
}];
|