@mapcomponents/react-maplibre 0.1.73 → 0.1.74

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 (41) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +1 -1
  3. package/dist/components/MlOrderLayers/MlOrderLayers.d.ts +21 -0
  4. package/dist/components/MlOrderLayers/MlOrderLayers.stories.d.ts +15 -0
  5. package/dist/components/MlTemporalController/MlTemporalController.d.ts +175 -0
  6. package/dist/components/MlTemporalController/MlTemporalController.stories.d.ts +32 -0
  7. package/dist/components/MlTemporalController/utils/MlTemporalControllerLabels.d.ts +20 -0
  8. package/dist/components/MlTemporalController/utils/TemporalControllerPlayer.d.ts +21 -0
  9. package/dist/components/MlTemporalController/utils/paintPicker.d.ts +59 -0
  10. package/dist/components/MlTemporalController/utils/useFilterData.d.ts +14 -0
  11. package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +22 -4
  12. package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +5 -0
  13. package/dist/contexts/LayerContext.d.ts +43 -0
  14. package/dist/hooks/useLayer.d.ts +5 -3
  15. package/dist/hooks/useLayerContext.d.ts +2 -0
  16. package/dist/index.d.ts +20 -0
  17. package/dist/index.esm.js +13849 -147
  18. package/dist/index.esm.js.map +1 -1
  19. package/dist/omt_styles/config.d.ts +7 -0
  20. package/dist/omt_styles/gruvbox.d.ts +2420 -0
  21. package/dist/omt_styles/medieval_kingdom.d.ts +2420 -0
  22. package/dist/omt_styles/monokai.d.ts +2420 -0
  23. package/dist/omt_styles/oceanic_next.d.ts +2420 -0
  24. package/dist/omt_styles/solarized.d.ts +2420 -0
  25. package/dist/ui_components/AddLayerButton/AddLayerButton.d.ts +12 -0
  26. package/dist/ui_components/AddLayerButton/AddLayerButton.stories.d.ts +13 -0
  27. package/dist/ui_components/AddLayerButton/AddLayerPopup.d.ts +13 -0
  28. package/dist/ui_components/AddLayerButton/LayerConfigForms/GeoJsonLayerForm.d.ts +8 -0
  29. package/dist/ui_components/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +9 -0
  30. package/dist/ui_components/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +9 -0
  31. package/dist/ui_components/ConfirmDialog.d.ts +16 -0
  32. package/dist/ui_components/LayerList/LayerList.d.ts +3 -2
  33. package/dist/ui_components/LayerList/LayerList.stories.d.ts +1 -0
  34. package/dist/ui_components/LayerList/LayerListItem.d.ts +3 -1
  35. package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +15 -0
  36. package/dist/ui_components/MapcomponentsTheme.d.ts +6 -1
  37. package/dist/ui_components/SelectStyleButton/SelectStyleButton.d.ts +17 -0
  38. package/dist/ui_components/SelectStyleButton/SelectStyleButton.stories.d.ts +15 -0
  39. package/dist/ui_components/SelectStyleButton/SelectStylePopup.d.ts +13 -0
  40. package/dist/ui_components/Sidebar.d.ts +1 -1
  41. package/package.json +2 -2
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { SxProps } from '@mui/material';
3
+ import { LayerConfig } from '../../contexts/LayerContext';
4
+ export interface AddLayerButtonProps {
5
+ sx?: SxProps;
6
+ onComplete?: (config: LayerConfig) => void;
7
+ }
8
+ declare const AddLayerButton: {
9
+ (props: AddLayerButtonProps): JSX.Element;
10
+ defaultProps: {};
11
+ };
12
+ export default AddLayerButton;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ declare const storyoptions: {
3
+ title: string;
4
+ component: {
5
+ (props: import("./AddLayerButton").AddLayerButtonProps): JSX.Element;
6
+ defaultProps: {};
7
+ };
8
+ argTypes: {};
9
+ decorators: ((Story: any, context: any) => JSX.Element)[];
10
+ };
11
+ export default storyoptions;
12
+ export declare const FolderExample: any;
13
+ export declare const StyleJsonExample: any;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { LayerConfig } from 'src/contexts/LayerContext';
3
+ export interface AddLayerPopupProps {
4
+ open: boolean;
5
+ setOpen: (open: boolean) => void;
6
+ onChange?: (config: LayerConfig) => void;
7
+ onComplete?: (config: LayerConfig) => void;
8
+ }
9
+ declare const AddLayerPopup: {
10
+ (props: AddLayerPopupProps): JSX.Element;
11
+ defaultProps: {};
12
+ };
13
+ export default AddLayerPopup;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { MlGeoJsonLayerProps } from 'src/components/MlGeoJsonLayer/MlGeoJsonLayer';
3
+ export interface GeoJsonLayerFormProps {
4
+ config?: MlGeoJsonLayerProps;
5
+ onSubmit: (config: MlGeoJsonLayerProps) => void;
6
+ onCancel: () => void;
7
+ }
8
+ export default function GeoJsonLayerForm(props: GeoJsonLayerFormProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface LayerTypeFormProps {
3
+ onSelect: (type: string) => void;
4
+ }
5
+ declare const LayerTypeForm: {
6
+ (props: LayerTypeFormProps): JSX.Element;
7
+ defaultProps: {};
8
+ };
9
+ export default LayerTypeForm;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface WmsLayerConfig {
3
+ url: string;
4
+ }
5
+ export interface WmsLayerFormProps {
6
+ onSubmit: (config: WmsLayerConfig) => void;
7
+ onCancel: () => void;
8
+ }
9
+ export default function WmsLayerForm(props: WmsLayerFormProps): JSX.Element;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export interface ConfirmDialogProps {
3
+ open: boolean;
4
+ title: string;
5
+ text: string;
6
+ onConfirm: () => void;
7
+ onCancel: () => void;
8
+ }
9
+ declare function ConfirmDialog(props: ConfirmDialogProps): JSX.Element;
10
+ declare namespace ConfirmDialog {
11
+ var defaultProps: {
12
+ title: string;
13
+ text: string;
14
+ };
15
+ }
16
+ export default ConfirmDialog;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  type Props = {
3
- children: JSX.Element | JSX.Element[];
3
+ mapId?: string;
4
+ children?: JSX.Element | JSX.Element[];
4
5
  };
5
- declare function LayerList({ children }: Props): JSX.Element;
6
+ declare function LayerList(props: Props): JSX.Element;
6
7
  export default LayerList;
@@ -9,6 +9,7 @@ declare const storyoptions: {
9
9
  export default storyoptions;
10
10
  export declare const FolderExample: any;
11
11
  export declare const VectortileExample: any;
12
+ export declare const StyleJsonExample: any;
12
13
  export declare const WmsLayerExample: any;
13
14
  export declare const GeoJsonLayerExample: any;
14
15
  export declare const ConfigurableExample: any;
@@ -7,12 +7,14 @@ type Props = {
7
7
  name: string;
8
8
  description?: string;
9
9
  setLayerState?: (state: unknown) => void;
10
+ showDeleteButton?: boolean;
10
11
  };
11
- declare function LayerListItem({ layerComponent, visible, type, name, description, configurable, setLayerState, }: Props): JSX.Element;
12
+ declare function LayerListItem({ layerComponent, visible, type, name, description, configurable, setLayerState, ...props }: Props): JSX.Element;
12
13
  declare namespace LayerListItem {
13
14
  var defaultProps: {
14
15
  type: string;
15
16
  visible: boolean;
17
+ showDeleteButton: boolean;
16
18
  };
17
19
  }
18
20
  export default LayerListItem;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { LayerConfig } from 'src/contexts/LayerContext';
3
+ export interface LayerListItemFactoryProps {
4
+ mapId?: string;
5
+ layers: LayerConfig[];
6
+ setLayers?: (layers: LayerConfig[] | ((state: LayerConfig[]) => LayerConfig[])) => void;
7
+ insertBeforeLayer?: string;
8
+ }
9
+ declare function LayerListItemFactory(props: LayerListItemFactoryProps): JSX.Element;
10
+ declare namespace LayerListItemFactory {
11
+ var defaultProps: {
12
+ mapId: undefined;
13
+ };
14
+ }
15
+ export default LayerListItemFactory;
@@ -3,5 +3,10 @@ declare module '@mui/material/Button' {
3
3
  navtools: true;
4
4
  }
5
5
  }
6
- declare const getTheme: (mode: 'light' | 'dark') => import("@mui/material/styles").Theme;
6
+ declare module '@mui/material' {
7
+ interface ListItemTextProps {
8
+ variant?: "layerlist";
9
+ }
10
+ }
11
+ declare const getTheme: (mode: 'light' | 'dark') => import("@mui/material").Theme;
7
12
  export default getTheme;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { SxProps } from '@mui/material';
3
+ import { StyleSpecification } from 'maplibre-gl';
4
+ export interface SelectStyleButtonProps {
5
+ sx?: SxProps;
6
+ onComplete?: (config: StyleSpecification[]) => void;
7
+ styles?: StyleSpecification[];
8
+ defaultStyles?: boolean;
9
+ }
10
+ declare const SelectStyleButton: {
11
+ (props: SelectStyleButtonProps): JSX.Element;
12
+ defaultProps: {
13
+ style: never[];
14
+ defaultStyles: boolean;
15
+ };
16
+ };
17
+ export default SelectStyleButton;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ declare const storyoptions: {
3
+ title: string;
4
+ component: {
5
+ (props: import("../SelectStyleButton/SelectStyleButton").SelectStyleButtonProps): JSX.Element;
6
+ defaultProps: {
7
+ style: never[];
8
+ defaultStyles: boolean;
9
+ };
10
+ };
11
+ argTypes: {};
12
+ decorators: ((Story: any, context: any) => JSX.Element)[];
13
+ };
14
+ export default storyoptions;
15
+ export declare const SelectStyleButtonExample: any;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { StyleSpecification } from 'maplibre-gl';
3
+ export interface SelectStylePopupProps {
4
+ open: boolean;
5
+ setOpen: (open: boolean) => void;
6
+ styles?: StyleSpecification[];
7
+ onSelect?: (style: StyleSpecification) => void;
8
+ }
9
+ declare const SelectStylePopup: {
10
+ (props: SelectStylePopupProps): JSX.Element;
11
+ defaultProps: {};
12
+ };
13
+ export default SelectStylePopup;
@@ -8,5 +8,5 @@ interface SidebarProps {
8
8
  setOpen?: (val: boolean) => void;
9
9
  name?: string;
10
10
  }
11
- export default function Sidebar({ drawerPaperProps, drawerHeaderProps, ...props }: SidebarProps & DrawerProps): JSX.Element;
11
+ export default function Sidebar({ drawerPaperProps, drawerHeaderProps, setOpen, ...props }: SidebarProps & DrawerProps): JSX.Element;
12
12
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mapcomponents/react-maplibre",
3
- "version": "0.1.73",
4
- "main": "index.js",
3
+ "version": "0.1.74",
4
+ "main": "dist/index.esm.js",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.esm.js",
7
7
  "source": "src/index.ts",