@nextgis/react-ngw-leaflet 4.0.0-alpha.8 → 4.0.0-rc.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
@@ -2,7 +2,8 @@
2
2
 
3
3
  ![size](https://img.shields.io/bundlephobia/minzip/@nextgis/react-ngw-leaflet) ![version](https://img.shields.io/npm/v/@nextgis/react-ngw-leaflet)
4
4
 
5
- Plugin to integrate NGW maps into React with leaflet adapter
5
+ Ready-to-use React component for a Leaflet-based NextGIS Web map. It configures
6
+ the Leaflet adapter for the common component from `@nextgis/react-ngw-map`.
6
7
 
7
8
  ## Installation
8
9
 
@@ -12,9 +13,8 @@ npm install leaflet @nextgis/react-ngw-leaflet
12
13
 
13
14
  ## Usage
14
15
 
15
- ```jsx
16
- import React from 'react';
17
- import { render } from 'react-dom';
16
+ ```tsx
17
+ import { createRoot } from 'react-dom/client';
18
18
  import ReactNgwMap from '@nextgis/react-ngw-leaflet';
19
19
 
20
20
  function App() {
@@ -22,13 +22,20 @@ function App() {
22
22
  <ReactNgwMap
23
23
  baseUrl="https://demo.nextgis.com"
24
24
  resources={[{ resource: 6118, id: 'webmap', fit: true }]}
25
+ style={{ width: '100%', height: '100%' }}
25
26
  />
26
27
  );
27
28
  }
28
29
 
29
- render(<App />, document.getElementById('app'));
30
+ createRoot(document.getElementById('app')!).render(<App />);
30
31
  ```
31
32
 
33
+ The component accepts the common `ReactNgwMap` props, including
34
+ `whenCreated`, `placeholder`, and `children`.
35
+
36
+ See the [API Documentation](https://code-api.nextgis.com/modules/_nextgis_react-ngw-leaflet.html)
37
+ and the [package architecture guide](../../docs/PACKAGES.md).
38
+
32
39
  ## Commercial support
33
40
 
34
41
  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!
@@ -1,9 +1,10 @@
1
- /** Bundle of @nextgis/react-ngw-leaflet; version: 4.0.0-alpha.8; author: NextGIS */
1
+ /** Bundle of @nextgis/react-ngw-leaflet; version: 4.0.0-rc.1; author: NextGIS */
2
2
  import MapAdapter from '@nextgis/leaflet-map-adapter';
3
3
  import { ReactNgwMap } from '@nextgis/react-ngw-map';
4
4
  import { Icon } from 'leaflet';
5
5
  import { createElement } from 'react';
6
6
  import 'leaflet/dist/leaflet.css';
7
+ import '@nextgis/leaflet-map-adapter/lib/leaflet-map-adapter.css';
7
8
  import iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';
8
9
  import iconUrl from 'leaflet/dist/images/marker-icon.png';
9
10
  import shadowUrl from 'leaflet/dist/images/marker-shadow.png';
@@ -1 +1 @@
1
- {"version":3,"file":"react-ngw-leaflet.esm-bundler.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/imports */\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,SAAA,CAAU,WAAA;AAEvC,IAAA,CAAK,QAAQ,YAAA,CAAa;AAAA,EACxB,aAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAC,CAAA;AAEM,SAAS,gBAEd,KAAA,EAAc;AACd,EAAA,MAAM,IAAI,aAAA,CAAA,cAAA,CAAA,EAAA,EAAK,KAAA,CAAA,EAAL,EAAY,UAAA,EAAY,IAAI,YAAW,EAAE,CAAA;AACnD,EAAA,OAAO,aAAA,CAAc,aAAa,CAAC,CAAA;AACrC;;;;"}
1
+ {"version":3,"file":"react-ngw-leaflet.esm-bundler.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/imports */\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 '@nextgis/leaflet-map-adapter/lib/leaflet-map-adapter.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,OAAQ,IAAA,CAAK,QAAgB,SAAA,CAAU,WAAA;AAEvC,IAAA,CAAK,QAAQ,YAAA,CAAa;AAAA,EACxB,aAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAC,CAAA;AAEM,SAAS,gBAEd,KAAA,EAAc;AACd,EAAA,MAAM,IAAI,aAAA,CAAA,cAAA,CAAA,EAAA,EAAK,KAAA,CAAA,EAAL,EAAY,UAAA,EAAY,IAAI,YAAW,EAAE,CAAA;AACnD,EAAA,OAAO,aAAA,CAAc,aAAa,CAAC,CAAA;AACrC;;;;"}
@@ -1,2 +1,2 @@
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};
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 a}from"react";import"leaflet/dist/leaflet.css";import"@nextgis/leaflet-map-adapter/lib/leaflet-map-adapter.css";import o from"leaflet/dist/images/marker-icon-2x.png";import l from"leaflet/dist/images/marker-icon.png";import p from"leaflet/dist/images/marker-shadow.png";var i=Object.defineProperty,m=Object.defineProperties,n=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,g=(e,r,t)=>r in e?i(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;function d(t){const o=(l=((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),p={mapAdapter:new e},m(l,n(p)));var l,p;return a(r,o)}delete t.Default.prototype._getIconUrl,t.Default.mergeOptions({iconRetinaUrl:o,iconUrl:l,shadowUrl:p});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":["/* eslint-disable simple-import-sort/imports */\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,wHAAIC,CAAA,CAAA,EAAKF,KAAL,CAAYG,WAAY,IAAIC,sBACtC,OAAOC,EAAcC,EAAaL,EACpC,QAbQM,EAAKC,QAAgBC,UAAUC,YAEvCH,EAAKC,QAAQG,aAAa,CACxBC,gBACAC,UACAC"}
1
+ {"version":3,"file":"react-ngw-leaflet.esm-bundler.prod.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/imports */\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 '@nextgis/leaflet-map-adapter/lib/leaflet-map-adapter.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":"4rBAuBO,SAASA,EAEdC,GACA,MAAMC,wHAAIC,CAAA,CAAA,EAAKF,KAAL,CAAYG,WAAY,IAAIC,sBACtC,OAAOC,EAAcC,EAAaL,EACpC,QAbQM,EAAKC,QAAgBC,UAAUC,YAEvCH,EAAKC,QAAQG,aAAa,CACxBC,gBACAC,UACAC"}
package/package.json CHANGED
@@ -1,16 +1,20 @@
1
1
  {
2
2
  "name": "@nextgis/react-ngw-leaflet",
3
- "version": "4.0.0-alpha.8",
3
+ "version": "4.0.0-rc.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": "4.0.0-alpha.8",
10
- "@nextgis/react-ngw-map": "4.0.0-alpha.8"
9
+ "@nextgis/leaflet-map-adapter": "4.0.0-rc.1",
10
+ "@nextgis/react-ngw-map": "4.0.0-rc.1"
11
+ },
12
+ "peerDependencies": {
13
+ "react": "*",
14
+ "react-dom": "*"
11
15
  },
12
16
  "devDependencies": {
13
- "@nextgis/build-tools": "4.0.0-alpha.8"
17
+ "@nextgis/build-tools": "4.0.0-rc.1"
14
18
  },
15
19
  "buildOptions": {
16
20
  "name": "ReactNgwLeaflet",
@@ -44,5 +48,5 @@
44
48
  "bugs": {
45
49
  "url": "https://github.com/nextgis/nextgis_frontend/issues"
46
50
  },
47
- "gitHead": "bbdf70dca7a0505a19fdb9e57a16ff3caba162cd"
51
+ "gitHead": "94243822e6a037c9107afa652b0c8999074f07e3"
48
52
  }