@mapcomponents/react-maplibre 0.1.83 → 0.1.85

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 (25) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +1 -1
  3. package/dist/components/MlFeatureEditor/MlFeatureEditor.stories.d.ts +14 -14
  4. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +3 -2
  5. package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +1 -1
  6. package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +27 -19
  7. package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +13 -13
  8. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.d.ts +1 -1
  9. package/dist/components/MlWmsLoader/utils/WMSLinks.d.ts +1 -0
  10. package/dist/decorators/GeoJsonMapDecorator.d.ts +2 -0
  11. package/dist/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +88 -0
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.esm.js +439 -162
  14. package/dist/index.esm.js.map +1 -1
  15. package/dist/ui_components/LayerList/LayerList.d.ts +3 -3
  16. package/dist/ui_components/LayerList/LayerListFolder.d.ts +4 -4
  17. package/dist/ui_components/LayerList/LayerListItem.d.ts +3 -3
  18. package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +1 -1
  19. package/dist/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +24 -4
  20. package/dist/ui_components/LayerList/util/LayerPropertyForm.d.ts +4 -4
  21. package/dist/ui_components/LayerList/util/input/ColorPicker.d.ts +4 -4
  22. package/dist/ui_components/UploadButton.d.ts +1 -0
  23. package/package.json +2 -2
  24. package/dist/components/MlNavigationTools/MlNavigationTools.cy.d.ts +0 -1
  25. /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;
@@ -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.83",
3
+ "version": "0.1.85",
4
4
  "main": "dist/index.esm.js",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.esm.js",
@@ -22,7 +22,7 @@
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",