@mapcomponents/react-maplibre 1.2.0 → 1.3.0

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.
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ declare const storyoptions: {
3
+ title: string;
4
+ component: {
5
+ (props: import("./MlComponentTemplate").MlComponentTemplateProps): React.JSX.Element;
6
+ defaultProps: {
7
+ mapId: undefined;
8
+ };
9
+ };
10
+ argTypes: {};
11
+ decorators: import("@storybook/react/*").Decorator[];
12
+ };
13
+ export default storyoptions;
14
+ export declare const ExampleConfig: any;
@@ -1,34 +1,29 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export interface MlMarkerProps {
3
- /**
4
- * Id of the target MapLibre instance in mapContext
5
- */
3
+ /** ID of the map to add the marker to */
6
4
  mapId?: string;
7
- /**
8
- * The layerId of an existing layer this layer should be rendered visually beneath
9
- * https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
10
- */
5
+ /** Layer ID before which to insert the marker */
11
6
  insertBeforeLayer?: string;
12
- /**
13
- * Longitude of the marker position
14
- */
7
+ /** Longitude of the marker position */
15
8
  lng: number;
16
- /**
17
- * Latitude of the marker position
18
- */
9
+ /** Latitude of the marker position */
19
10
  lat: number;
20
- /**
21
- * Content of the description popup
22
- */
11
+ /** HTML content for the marker popup */
23
12
  content?: string;
13
+ /** CSS properties to apply to the marker dot */
14
+ markerStyle?: React.CSSProperties;
15
+ /** CSS properties to apply to the content container */
16
+ containerStyle?: React.CSSProperties;
17
+ /** CSS properties to apply to the iframe element */
18
+ iframeStyle?: React.CSSProperties;
19
+ /** CSS properties to apply to the body of the iframe */
20
+ iframeBodyStyle?: React.CSSProperties;
21
+ /** Offset in pixels between the marker and its content */
22
+ contentOffset?: number;
23
+ /** Whether mouse events pass through the marker content */
24
+ passEventsThrough?: boolean;
25
+ /** Anchor position of the marker relative to its coordinates */
26
+ anchor?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
24
27
  }
25
- /**
26
- * Adds a marker to the map and displays the contents of the "content" property in an iframe next to it
27
- */
28
- declare const MlMarker: {
29
- (props: MlMarkerProps): React.JSX.Element;
30
- defaultProps: {
31
- mapId: undefined;
32
- };
33
- };
28
+ declare const MlMarker: ({ passEventsThrough, contentOffset, ...props }: MlMarkerProps) => React.ReactPortal | null;
34
29
  export default MlMarker;
@@ -9,6 +9,7 @@ declare function featureEditorStyle(): ({
9
9
  'line-color'?: undefined;
10
10
  'line-width'?: undefined;
11
11
  'line-dasharray'?: undefined;
12
+ 'line-opacity'?: undefined;
12
13
  'circle-radius'?: undefined;
13
14
  'circle-color'?: undefined;
14
15
  'circle-stroke-color'?: undefined;
@@ -31,6 +32,7 @@ declare function featureEditorStyle(): ({
31
32
  'fill-outline-color'?: undefined;
32
33
  'fill-opacity'?: undefined;
33
34
  'line-dasharray'?: undefined;
35
+ 'line-opacity'?: undefined;
34
36
  'circle-radius'?: undefined;
35
37
  'circle-color'?: undefined;
36
38
  'circle-stroke-color'?: undefined;
@@ -52,6 +54,29 @@ declare function featureEditorStyle(): ({
52
54
  'fill-color'?: undefined;
53
55
  'fill-outline-color'?: undefined;
54
56
  'fill-opacity'?: undefined;
57
+ 'line-opacity'?: undefined;
58
+ 'circle-radius'?: undefined;
59
+ 'circle-color'?: undefined;
60
+ 'circle-stroke-color'?: undefined;
61
+ 'circle-stroke-width'?: undefined;
62
+ 'circle-opacity'?: undefined;
63
+ };
64
+ } | {
65
+ id: string;
66
+ type: string;
67
+ filter: (string | string[])[];
68
+ layout: {
69
+ 'line-cap': string;
70
+ 'line-join': string;
71
+ };
72
+ paint: {
73
+ 'line-color': string;
74
+ 'line-width': number;
75
+ 'line-opacity': number;
76
+ 'fill-color'?: undefined;
77
+ 'fill-outline-color'?: undefined;
78
+ 'fill-opacity'?: undefined;
79
+ 'line-dasharray'?: undefined;
55
80
  'circle-radius'?: undefined;
56
81
  'circle-color'?: undefined;
57
82
  'circle-stroke-color'?: undefined;
@@ -73,6 +98,7 @@ declare function featureEditorStyle(): ({
73
98
  'line-color'?: undefined;
74
99
  'line-width'?: undefined;
75
100
  'line-dasharray'?: undefined;
101
+ 'line-opacity'?: undefined;
76
102
  'circle-opacity'?: undefined;
77
103
  };
78
104
  layout?: undefined;
@@ -89,6 +115,7 @@ declare function featureEditorStyle(): ({
89
115
  'line-color'?: undefined;
90
116
  'line-width'?: undefined;
91
117
  'line-dasharray'?: undefined;
118
+ 'line-opacity'?: undefined;
92
119
  'circle-stroke-color'?: undefined;
93
120
  'circle-stroke-width'?: undefined;
94
121
  'circle-opacity'?: undefined;
@@ -108,6 +135,7 @@ declare function featureEditorStyle(): ({
108
135
  'line-color'?: undefined;
109
136
  'line-width'?: undefined;
110
137
  'line-dasharray'?: undefined;
138
+ 'line-opacity'?: undefined;
111
139
  'circle-stroke-color'?: undefined;
112
140
  'circle-stroke-width'?: undefined;
113
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapcomponents/react-maplibre",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "main": "dist/index.cjs.js",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.esm.js",
@@ -28,14 +28,14 @@
28
28
  "@emotion/react": "^11.14.0",
29
29
  "@emotion/styled": "^11.14.0",
30
30
  "@eslint/eslintrc": "^3.3.1",
31
- "@eslint/js": "^9.23.0",
31
+ "@eslint/js": "^9.24.0",
32
32
  "@mapbox/mapbox-gl-draw": "1.4.3",
33
33
  "@mapbox/mapbox-gl-sync-move": "^0.3.1",
34
- "@mui/icons-material": "^7.0.0",
35
- "@mui/material": "^7.0.0",
34
+ "@mui/icons-material": "^7.0.1",
35
+ "@mui/material": "^7.0.1",
36
36
  "@reduxjs/toolkit": "^2.6.1",
37
37
  "@rollup/plugin-json": "^6.1.0",
38
- "@storybook/theming": "^8.6.11",
38
+ "@storybook/theming": "^8.6.12",
39
39
  "@testing-library/dom": "^10.4.0",
40
40
  "@tmcw/togeojson": "^7.0.0",
41
41
  "@turf/turf": "^7.2.0",
@@ -56,7 +56,7 @@
56
56
  "react-redux": "^9.2.0",
57
57
  "redux": "^5.0.1",
58
58
  "redux-thunk": "^3.1.0",
59
- "three": "^0.174.0",
59
+ "three": "^0.175.0",
60
60
  "topojson-client": "^3.1.0",
61
61
  "uuid": "^11.1.0",
62
62
  "wms-capabilities": "^0.6.0"
@@ -68,17 +68,17 @@
68
68
  "@rollup/plugin-babel": "^6.0.4",
69
69
  "@rollup/plugin-commonjs": "^28.0.3",
70
70
  "@rollup/plugin-url": "^8.0.2",
71
- "@storybook/addon-actions": "^8.6.11",
72
- "@storybook/addon-docs": "^8.6.11",
73
- "@storybook/addon-essentials": "^8.6.11",
74
- "@storybook/addon-links": "^8.6.11",
71
+ "@storybook/addon-actions": "^8.6.12",
72
+ "@storybook/addon-docs": "^8.6.12",
73
+ "@storybook/addon-essentials": "^8.6.12",
74
+ "@storybook/addon-links": "^8.6.12",
75
75
  "@storybook/addons": "^7.6.17",
76
- "@storybook/node-logger": "^8.6.11",
77
- "@storybook/react": "^8.6.11",
78
- "@storybook/react-webpack5": "^8.6.11",
79
- "@storybook/test": "^8.6.11",
76
+ "@storybook/node-logger": "^8.6.12",
77
+ "@storybook/react": "^8.6.12",
78
+ "@storybook/react-webpack5": "^8.6.12",
79
+ "@storybook/test": "^8.6.12",
80
80
  "@storybook/testing-react": "^2.0.1",
81
- "@testing-library/react": "^16.2.0",
81
+ "@testing-library/react": "^16.3.0",
82
82
  "@types/chai": "^5.2.1",
83
83
  "@types/elasticlunr": "^0.9.5",
84
84
  "@types/enzyme": "^3.10.18",
@@ -89,13 +89,13 @@
89
89
  "@types/mapbox__vector-tile": "^2.0.0",
90
90
  "@types/mocha": "^10.0.10",
91
91
  "@types/pako": "^2.0.3",
92
- "@types/react": "^19.0.12",
93
- "@types/react-dom": "^19.0.4",
92
+ "@types/react": "^19.1.0",
93
+ "@types/react-dom": "^19.1.1",
94
94
  "@types/sql.js": "^1.4.9",
95
- "@types/three": "^0.174.0",
95
+ "@types/three": "^0.175.0",
96
96
  "@types/uuid": "^10.0.0",
97
- "@typescript-eslint/eslint-plugin": "^8.28.0",
98
- "@typescript-eslint/parser": "^8.28.0",
97
+ "@typescript-eslint/eslint-plugin": "^8.29.0",
98
+ "@typescript-eslint/parser": "^8.29.0",
99
99
  "avj": "^0.0.0",
100
100
  "babel-jest": "^29.7.0",
101
101
  "babel-loader": "^10.0.0",
@@ -105,9 +105,9 @@
105
105
  "chai": "^5.2.0",
106
106
  "cypress": "^14.2.1",
107
107
  "elasticlunr": "^0.9.5",
108
- "eslint": "^9.23.0",
108
+ "eslint": "^9.24.0",
109
109
  "eslint-config-prettier": "^10.1.1",
110
- "eslint-plugin-react": "^7.37.4",
110
+ "eslint-plugin-react": "^7.37.5",
111
111
  "eslint-plugin-storybook": "^0.12.0",
112
112
  "glob": "^11.0.1",
113
113
  "jest": "29.7.0",
@@ -120,25 +120,25 @@
120
120
  "node-fetch": "^3.3.2",
121
121
  "postcss": "^8.5.3",
122
122
  "prettier": "3.5.3",
123
- "react": "^19.0.0",
123
+ "react": "^19.1.0",
124
124
  "react-app-polyfill": "^3.0.0",
125
125
  "react-dev-utils": "^12.0.1",
126
- "react-dom": "^19.0.0",
126
+ "react-dom": "^19.1.0",
127
127
  "react-draggable": "^4.4.6",
128
128
  "react-i18next": "^15.4.1",
129
- "rollup": "^4.37.0",
129
+ "rollup": "^4.39.0",
130
130
  "rollup-plugin-delete": "^3.0.1",
131
131
  "rollup-plugin-import-css": "^3.5.8",
132
132
  "rollup-plugin-node-externals": "^8.0.0",
133
133
  "rollup-plugin-typescript2": "^0.36.0",
134
134
  "showdown": "^2.1.0",
135
135
  "sql.js": "^1.13.0",
136
- "storybook": "^8.6.11",
136
+ "storybook": "^8.6.12",
137
137
  "storybook-source-link": "^4.0.1",
138
- "ts-jest": "^29.3.0",
138
+ "ts-jest": "^29.3.1",
139
139
  "ts-loader": "^9.5.2",
140
140
  "ts-node": "^10.9.2",
141
- "typescript": "^5.8.2"
141
+ "typescript": "^5.8.3"
142
142
  },
143
143
  "jest": {
144
144
  "roots": [
@@ -167,7 +167,7 @@
167
167
  "^.+\\.svg$": "<rootDir>/config/jest/fileTransform.js"
168
168
  },
169
169
  "transformIgnorePatterns": [
170
- "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$",
170
+ "[/\\\\]node_modules[/\\\\](?!three/examples/jsm/).+\\.(js|jsx|mjs|cjs|ts|tsx)$",
171
171
  "^.+\\.module\\.(css|sass|scss)$"
172
172
  ],
173
173
  "modulePaths": [],