@nextgis/react-ngw-leaflet 1.19.5 → 2.0.0-alpha.1

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/README.md CHANGED
@@ -4,12 +4,25 @@
4
4
 
5
5
  Plugin to integrate NGW maps into react with leaflet adapter
6
6
 
7
- ```html
7
+ ```jsx
8
+ import React from 'react';
9
+ import { render } from 'react-dom';
10
+ import ReactNgwMap from '@nextgis/react-ngw-leaflet';
8
11
 
12
+ function App() {
13
+ return (
14
+ <ReactNgwMap
15
+ baseUrl="https://demo.nextgis.com"
16
+ resources={[{ resource: 6118, id: 'webmap', fit: true }]}
17
+ />
18
+ );
19
+ }
20
+
21
+ render(<App />, document.getElementById('app'));
9
22
  ```
10
23
 
11
24
  ## Commercial support
12
25
 
13
26
  Need to fix a bug or add a feature to `@nextgis/react-ngw-leaflet`? We provide custom development and support for this software. [Contact us](http://nextgis.com/contact/) to discuss options!
14
27
 
15
- [![http://nextgis.com](https://nextgis.ru/img/nextgis.png)](http://nextgis.com)
28
+ [![http://nextgis.com](https://nextgis.com/img/nextgis.png)](http://nextgis.com)
package/lib/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { FunctionComponentElement } from 'react';
2
- import type { Map as Map_2 } from 'leaflet';
3
- import type { MapContainerProps } from '@nextgis/react-ngw-map';
4
- import { ReactNgwMapProps } from '@nextgis/react-ngw-map';
5
-
6
- declare function ReactNgwLeaflet<Props extends MapContainerProps = MapContainerProps<Map_2>>(props: Props): FunctionComponentElement<ReactNgwMapProps>;
7
- export default ReactNgwLeaflet;
8
-
9
- export { }
1
+ import * as react from 'react';
2
+ import * as _nextgis_react_ngw_map from '@nextgis/react-ngw-map';
3
+ import { MapContainerProps } from '@nextgis/react-ngw-map';
4
+ import { Map } from 'leaflet';
5
+
6
+ declare function ReactNgwLeaflet<Props extends MapContainerProps = MapContainerProps<Map>>(props: Props): react.FunctionComponentElement<_nextgis_react_ngw_map.ReactNgwMapProps>;
7
+
8
+ export { ReactNgwLeaflet as default };
@@ -1,22 +1,41 @@
1
- /** Bundle of @nextgis/react-ngw-leaflet; version: 1.19.5; author: NextGIS */
2
- import { createElement } from 'react';
3
- import { Icon } from 'leaflet';
1
+ /** Bundle of @nextgis/react-ngw-leaflet; version: 2.0.0-alpha.1; author: NextGIS */
4
2
  import MapAdapter from '@nextgis/leaflet-map-adapter';
5
3
  import { ReactNgwMap } from '@nextgis/react-ngw-map';
4
+ import { Icon } from 'leaflet';
5
+ import { createElement } from 'react';
6
6
  import 'leaflet/dist/leaflet.css';
7
7
  import iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';
8
8
  import iconUrl from 'leaflet/dist/images/marker-icon.png';
9
9
  import shadowUrl from 'leaflet/dist/images/marker-shadow.png';
10
10
 
11
+ var __defProp = Object.defineProperty;
12
+ var __defProps = Object.defineProperties;
13
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
14
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
17
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18
+ var __spreadValues = (a, b) => {
19
+ for (var prop in b || (b = {}))
20
+ if (__hasOwnProp.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ if (__getOwnPropSymbols)
23
+ for (var prop of __getOwnPropSymbols(b)) {
24
+ if (__propIsEnum.call(b, prop))
25
+ __defNormalProp(a, prop, b[prop]);
26
+ }
27
+ return a;
28
+ };
29
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11
30
  delete Icon.Default.prototype._getIconUrl;
12
31
  Icon.Default.mergeOptions({
13
- iconRetinaUrl: iconRetinaUrl,
14
- iconUrl: iconUrl,
15
- shadowUrl: shadowUrl,
32
+ iconRetinaUrl,
33
+ iconUrl,
34
+ shadowUrl
16
35
  });
17
36
  function ReactNgwLeaflet(props) {
18
- const p = { ...props, mapAdapter: new MapAdapter() };
19
- return createElement(ReactNgwMap, p);
37
+ const p = __spreadProps(__spreadValues({}, props), { mapAdapter: new MapAdapter() });
38
+ return createElement(ReactNgwMap, p);
20
39
  }
21
40
 
22
41
  export { ReactNgwLeaflet as default };
@@ -1 +1 @@
1
- {"version":3,"file":"react-ngw-leaflet.esm-bundler.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["import { createElement } from 'react';\nimport { Icon } from 'leaflet';\n\nimport MapAdapter from '@nextgis/leaflet-map-adapter';\nimport { ReactNgwMap } from '@nextgis/react-ngw-map';\n\nimport 'leaflet/dist/leaflet.css';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport type { Map } from 'leaflet';\nimport type { MapContainerProps } from '@nextgis/react-ngw-map';\n\ndelete (Icon.Default as any).prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\nexport function ReactNgwLeaflet<\n Props extends MapContainerProps = MapContainerProps<Map>,\n>(props: Props) {\n const p = { ...props, mapAdapter: new MapAdapter() };\n return createElement(ReactNgwMap, p);\n}\n"],"names":[],"mappings":";;;;;;;;;;AAcA,OAAQ,IAAI,CAAC,OAAe,CAAC,SAAS,CAAC,WAAW,CAAC;AAEnD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;AACxB,IAAA,aAAa,EAAE,aAAa;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,SAAS,EAAE,SAAS;AACrB,CAAA,CAAC,CAAC;AAEG,SAAU,eAAe,CAE7B,KAAY,EAAA;AACZ,IAAA,MAAM,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,IAAI,UAAU,EAAE,EAAE,CAAC;AACrD,IAAA,OAAO,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"react-ngw-leaflet.esm-bundler.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["/* eslint-disable import/order */\nimport MapAdapter from '@nextgis/leaflet-map-adapter';\nimport { ReactNgwMap } from '@nextgis/react-ngw-map';\nimport { Icon } from 'leaflet';\nimport { createElement } from 'react';\n\nimport type { MapContainerProps } from '@nextgis/react-ngw-map';\nimport type { Map } from 'leaflet';\n\nimport 'leaflet/dist/leaflet.css';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\ndelete (Icon.Default as any).prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\nexport function ReactNgwLeaflet<\n Props extends MapContainerProps = MapContainerProps<Map>,\n>(props: Props) {\n const p = { ...props, mapAdapter: new MapAdapter() };\n return createElement(ReactNgwMap, p);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,OAAQ,IAAA,CAAK,QAAgB,SAAU,CAAA,WAAA,CAAA;AAEvC,IAAA,CAAK,QAAQ,YAAa,CAAA;AAAA,EACxB,aAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AACF,CAAC,CAAA,CAAA;AAEM,SAAS,gBAEd,KAAc,EAAA;AACd,EAAA,MAAM,IAAI,aAAK,CAAA,cAAA,CAAA,EAAA,EAAA,KAAA,CAAA,EAAL,EAAY,UAAY,EAAA,IAAI,YAAa,EAAA,CAAA,CAAA;AACnD,EAAO,OAAA,aAAA,CAAc,aAAa,CAAC,CAAA,CAAA;AACrC;;;;"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"react";import{Icon as t}from"leaflet";import r from"@nextgis/leaflet-map-adapter";import{ReactNgwMap as a}from"@nextgis/react-ngw-map";import"leaflet/dist/leaflet.css";import o from"leaflet/dist/images/marker-icon-2x.png";import m from"leaflet/dist/images/marker-icon.png";import i from"leaflet/dist/images/marker-shadow.png";function l(t){const o={...t,mapAdapter:new r};return e(a,o)}delete t.Default.prototype._getIconUrl,t.Default.mergeOptions({iconRetinaUrl:o,iconUrl:m,shadowUrl:i});export{l as default};
1
+ import e from"@nextgis/leaflet-map-adapter";import{ReactNgwMap as r}from"@nextgis/react-ngw-map";import{Icon as t}from"leaflet";import{createElement as o}from"react";import"leaflet/dist/leaflet.css";import a from"leaflet/dist/images/marker-icon-2x.png";import i from"leaflet/dist/images/marker-icon.png";import l from"leaflet/dist/images/marker-shadow.png";var p=Object.defineProperty,n=Object.defineProperties,m=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,g=(e,r,t)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;function d(t){const a=(i=((e,r)=>{for(var t in r||(r={}))s.call(r,t)&&g(e,t,r[t]);if(f)for(var t of f(r))c.call(r,t)&&g(e,t,r[t]);return e})({},t),l={mapAdapter:new e},n(i,m(l)));var i,l;return o(r,a)}delete t.Default.prototype._getIconUrl,t.Default.mergeOptions({iconRetinaUrl:a,iconUrl:i,shadowUrl:l});export{d as default};
2
2
  //# sourceMappingURL=react-ngw-leaflet.esm-bundler.prod.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-ngw-leaflet.esm-bundler.prod.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["import { createElement } from 'react';\nimport { Icon } from 'leaflet';\n\nimport MapAdapter from '@nextgis/leaflet-map-adapter';\nimport { ReactNgwMap } from '@nextgis/react-ngw-map';\n\nimport 'leaflet/dist/leaflet.css';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport type { Map } from 'leaflet';\nimport type { MapContainerProps } from '@nextgis/react-ngw-map';\n\ndelete (Icon.Default as any).prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\nexport function ReactNgwLeaflet<\n Props extends MapContainerProps = MapContainerProps<Map>,\n>(props: Props) {\n const p = { ...props, mapAdapter: new MapAdapter() };\n return createElement(ReactNgwMap, p);\n}\n"],"names":["ReactNgwLeaflet","props","p","mapAdapter","MapAdapter","createElement","ReactNgwMap","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl"],"mappings":"qWAsBM,SAAUA,EAEdC,GACA,MAAMC,EAAI,IAAKD,EAAOE,WAAY,IAAIC,GACtC,OAAOC,EAAcC,EAAaJ,EACpC,QAbQK,EAAKC,QAAgBC,UAAUC,YAEvCH,EAAKC,QAAQG,aAAa,CACxBC,cAAeA,EACfC,QAASA,EACTC,UAAWA"}
1
+ {"version":3,"file":"react-ngw-leaflet.esm-bundler.prod.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["/* eslint-disable import/order */\nimport MapAdapter from '@nextgis/leaflet-map-adapter';\nimport { ReactNgwMap } from '@nextgis/react-ngw-map';\nimport { Icon } from 'leaflet';\nimport { createElement } from 'react';\n\nimport type { MapContainerProps } from '@nextgis/react-ngw-map';\nimport type { Map } from 'leaflet';\n\nimport 'leaflet/dist/leaflet.css';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\ndelete (Icon.Default as any).prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\nexport function ReactNgwLeaflet<\n Props extends MapContainerProps = MapContainerProps<Map>,\n>(props: Props) {\n const p = { ...props, mapAdapter: new MapAdapter() };\n return createElement(ReactNgwMap, p);\n}\n"],"names":["ReactNgwLeaflet","props","p","__spreadValues","mapAdapter","MapAdapter","createElement","ReactNgwMap","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl"],"mappings":"2nBAsBO,SAASA,EAEdC,GACA,MAAMC,wHAASC,CAAA,GAAAF,KAAL,CAAYG,WAAY,IAAIC,sBAC/B,OAAAC,EAAcC,EAAaL,EACpC,QAbQM,EAAKC,QAAgBC,UAAUC,YAEvCH,EAAKC,QAAQG,aAAa,CACxBC,gBACAC,UACAC"}
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@nextgis/react-ngw-leaflet",
3
- "version": "1.19.5",
3
+ "version": "2.0.0-alpha.1",
4
4
  "description": "React NGW map component for leaflet",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/react-ngw-leaflet.esm-bundler.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "dependencies": {
9
- "@nextgis/leaflet-map-adapter": "^1.19.5",
10
- "@nextgis/react-ngw-map": "^1.19.3"
9
+ "@nextgis/leaflet-map-adapter": "^2.0.0-alpha.1",
10
+ "@nextgis/react-ngw-map": "^2.0.0-alpha.1"
11
11
  },
12
12
  "devDependencies": {
13
- "@nextgis/build-tools": "^1.19.0"
13
+ "@nextgis/build-tools": "^2.0.0-alpha.1"
14
14
  },
15
15
  "buildOptions": {
16
16
  "name": "ReactNgwLeaflet",
@@ -44,5 +44,5 @@
44
44
  "bugs": {
45
45
  "url": "https://github.com/nextgis/nextgis_frontend/issues"
46
46
  },
47
- "gitHead": "d29f78caa02893976ff7a9aef6d1b1b52766c958"
47
+ "gitHead": "710eda7c06979514022f2e37ddb09f1d5d14cf9e"
48
48
  }