@mapcomponents/react-maplibre 0.1.84 → 0.1.86

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +0 -2
  3. package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +0 -2
  4. package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +1 -1
  5. package/dist/components/MlFeatureEditor/MlFeatureEditor.stories.d.ts +14 -14
  6. package/dist/components/MlFollowGps/MlFollowGps.d.ts +0 -1
  7. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +1 -1
  8. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +3 -2
  9. package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +1 -1
  10. package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +27 -19
  11. package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +13 -13
  12. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +1 -1
  13. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.d.ts +1 -1
  14. package/dist/components/MlWmsLoader/utils/WMSLinks.d.ts +1 -0
  15. package/dist/decorators/GeoJsonMapDecorator.d.ts +2 -0
  16. package/dist/hooks/useAddImage/useAddImage.d.ts +20 -0
  17. package/dist/hooks/useAddImage/useAddImage.stories.d.ts +14 -0
  18. package/dist/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +88 -0
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.esm.js +604 -284
  21. package/dist/index.esm.js.map +1 -1
  22. package/dist/ui_components/LayerList/LayerList.d.ts +3 -3
  23. package/dist/ui_components/LayerList/LayerListFolder.d.ts +4 -4
  24. package/dist/ui_components/LayerList/LayerListItem.d.ts +3 -3
  25. package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +1 -1
  26. package/dist/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +24 -4
  27. package/dist/ui_components/LayerList/util/LayerPropertyForm.d.ts +4 -4
  28. package/dist/ui_components/LayerList/util/input/ColorPicker.d.ts +4 -4
  29. package/dist/ui_components/MapcomponentsTheme.d.ts +8 -0
  30. package/dist/ui_components/UploadButton.d.ts +1 -0
  31. package/package.json +5 -6
  32. /package/dist/hooks/{useFeatureEditor.d.ts → useFeatureEditor/useFeatureEditor.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- type Props = {
2
+ interface LayerListProps {
3
3
  mapId?: string;
4
4
  children?: JSX.Element | JSX.Element[];
5
- };
6
- declare function LayerList(props: Props): JSX.Element;
5
+ }
6
+ declare function LayerList(props: LayerListProps): JSX.Element;
7
7
  export default LayerList;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- type Props = {
2
+ interface LayerListFolderProps {
3
3
  visible: boolean;
4
4
  name?: string;
5
5
  children: JSX.Element | JSX.Element[];
6
6
  setVisible?: (visible: boolean | ((val: unknown) => boolean)) => void;
7
- };
8
- export default function LayerListFolder({ visible, name, children, setVisible }: Props): JSX.Element;
9
- export {};
7
+ }
8
+ declare function LayerListFolder({ visible, name, children, setVisible }: LayerListFolderProps): JSX.Element;
9
+ export default LayerListFolder;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { SxProps } from '@mui/material';
3
- type Props = {
3
+ interface LayerListItemProps {
4
4
  layerComponent: JSX.Element;
5
5
  visible: boolean;
6
6
  configurable: boolean;
@@ -11,8 +11,8 @@ type Props = {
11
11
  showDeleteButton?: boolean;
12
12
  listItemSx?: SxProps;
13
13
  buttons?: JSX.Element;
14
- };
15
- declare function LayerListItem({ layerComponent, visible, type, name, description, configurable, setLayerState, ...props }: Props): JSX.Element;
14
+ }
15
+ declare function LayerListItem({ layerComponent, visible, type, name, description, configurable, setLayerState, ...props }: LayerListItemProps): JSX.Element;
16
16
  declare namespace LayerListItem {
17
17
  var defaultProps: {
18
18
  type: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { LayerConfig } from 'src/contexts/LayerContext';
2
+ import { LayerConfig } from '../../contexts/LayerContext';
3
3
  export interface LayerListItemFactoryProps {
4
4
  mapId?: string;
5
5
  layers: LayerConfig[];
@@ -1,13 +1,33 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { MlVectorTileLayerProps } from '../../../components/MlVectorTileLayer/MlVectorTileLayer';
3
- type Props = {
3
+ export declare const ListItemStyled: import("@emotion/styled").StyledComponent<{
4
+ button?: false | undefined;
5
+ } & import("@mui/material").ListItemBaseProps & {
6
+ components?: {
7
+ Root?: React.ElementType<any> | undefined;
8
+ } | undefined;
9
+ componentsProps?: {
10
+ root?: (React.HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides) | undefined;
11
+ } | undefined;
12
+ slotProps?: {
13
+ root?: (React.HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides) | undefined;
14
+ } | undefined;
15
+ slots?: {
16
+ root?: React.ElementType<any> | undefined;
17
+ } | undefined;
18
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof React.LiHTMLAttributes<HTMLLIElement>> & {
19
+ ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
20
+ }, "className" | "style" | "classes" | "button" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "ContainerComponent" | "ContainerProps" | "dense" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "selected" | "components" | "componentsProps" | "slotProps" | "slots"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
21
+ export declare const CheckboxListItemIcon: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemIconProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
22
+ export declare const CheckboxStyled: import("@emotion/styled").StyledComponent<import("@mui/material").CheckboxProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
23
+ interface LayerListItemVectorLayerProps {
4
24
  id: string;
5
25
  configurable?: boolean;
6
26
  vtProps: MlVectorTileLayerProps;
7
27
  setVtProps: ((state: unknown) => void) | undefined;
8
28
  visibleMaster?: boolean;
9
- };
10
- declare function LayerListItemVectorLayer({ configurable, vtProps, setVtProps, id, ...props }: Props): JSX.Element;
29
+ }
30
+ declare function LayerListItemVectorLayer({ configurable, vtProps, setVtProps, id, ...props }: LayerListItemVectorLayerProps): JSX.Element;
11
31
  declare namespace LayerListItemVectorLayer {
12
32
  var defaultProps: {
13
33
  configurable: boolean;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { CircleLayerSpecification, FillLayerSpecification, LineLayerSpecification } from 'maplibre-gl';
3
3
  export type paintPropsType = CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
4
- type Props = {
4
+ interface LayerPropertyFormProps {
5
5
  paintProps: paintPropsType;
6
6
  setPaintProps: (paintProps: paintPropsType | ((current: paintPropsType) => paintPropsType)) => void;
7
7
  layerType: string;
8
- };
9
- export default function LayerPropertyForm({ paintProps, setPaintProps }: Props): JSX.Element;
10
- export {};
8
+ }
9
+ declare function LayerPropertyForm({ paintProps, setPaintProps }: LayerPropertyFormProps): JSX.Element;
10
+ export default LayerPropertyForm;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { paintPropsType } from '../LayerPropertyForm';
3
- type Props = {
3
+ interface PaintPropsColorPickerProps {
4
4
  key: string;
5
5
  value: string;
6
6
  propKey: string;
7
7
  setPaintProps: (paintProps: paintPropsType | ((current: paintPropsType) => paintPropsType)) => void;
8
- };
9
- export default function PaintPropsColorPicker({ propKey, value, setPaintProps }: Props): JSX.Element;
10
- export {};
8
+ }
9
+ declare function PaintPropsColorPicker({ propKey, value, setPaintProps }: PaintPropsColorPickerProps): JSX.Element;
10
+ export default PaintPropsColorPicker;
@@ -7,9 +7,17 @@ declare module '@mui/material' {
7
7
  navColor: string;
8
8
  navHover: string;
9
9
  };
10
+ GPS: {
11
+ GPSActiveColor: string;
12
+ GPSInactiveColor: string;
13
+ GPSActiveBackgroundColor: string;
14
+ };
10
15
  compass: {
11
16
  compColor: string;
12
17
  compHover: string;
18
+ compStroke: string;
19
+ compNorth: string;
20
+ compSouth: string;
13
21
  };
14
22
  }
15
23
  }
@@ -2,6 +2,7 @@
2
2
  type Props = {
3
3
  setData: (data: string) => void;
4
4
  buttonComponent: any;
5
+ accept?: string;
5
6
  };
6
7
  export default function UploadButton(props: Props): JSX.Element;
7
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapcomponents/react-maplibre",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
4
4
  "main": "dist/index.esm.js",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.esm.js",
@@ -22,12 +22,13 @@
22
22
  "@emotion/css": "^11.10.5",
23
23
  "@emotion/react": "^11.10.8",
24
24
  "@emotion/styled": "^11.10.8",
25
- "@mapbox/mapbox-gl-draw": "^1.4.0",
25
+ "@mapbox/mapbox-gl-draw": "^1.4.2",
26
26
  "@mapbox/mapbox-gl-sync-move": "^0.3.1",
27
27
  "@mui/icons-material": "^5.11.0",
28
28
  "@mui/material": "^5.12.3",
29
29
  "@turf/turf": "^6.5.0",
30
30
  "@types/react-color": "^3.0.6",
31
+ "@xmldom/xmldom": "^0.8.10",
31
32
  "d3": "^7.8.2",
32
33
  "jspdf": "^2.5.1",
33
34
  "maplibre-gl": "^2.4.0",
@@ -37,8 +38,7 @@
37
38
  "three": "^0.149.0",
38
39
  "traverse": "^0.6.7",
39
40
  "uuid": "^9.0.0",
40
- "wms-capabilities": "^0.6.0",
41
- "xmldom": "^0.6.0"
41
+ "wms-capabilities": "^0.6.0"
42
42
  },
43
43
  "peerDependencies": {},
44
44
  "devDependencies": {
@@ -115,8 +115,7 @@
115
115
  "sql.js": "^1.8.0",
116
116
  "storybook-source-link": "^2.0.4",
117
117
  "ts-jest": "^29.0.5",
118
- "typescript": "^4.9.4",
119
- "xmldom": "^0.6.0"
118
+ "typescript": "^4.9.4"
120
119
  },
121
120
  "jest": {
122
121
  "roots": [