@performant-software/geospatial 2.1.0-beta.12 → 2.1.0-beta.13
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/dist/index.cjs12.js +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs201.js +1 -1
- package/dist/index.cjs221.js +1 -1
- package/dist/index.cjs228.js +1 -1
- package/dist/index.cjs228.js.map +1 -1
- package/dist/index.cjs229.js +1 -1
- package/dist/index.cjs229.js.map +1 -1
- package/dist/index.cjs238.js +1 -1
- package/dist/index.cjs243.js +1 -1
- package/dist/index.cjs246.js +1 -1
- package/dist/index.cjs250.js +1 -1
- package/dist/index.cjs250.js.map +1 -1
- package/dist/index.cjs251.js +1 -1
- package/dist/index.cjs251.js.map +1 -1
- package/dist/index.cjs55.js +1 -1
- package/dist/index.cjs56.js +1 -1
- package/dist/index.cjs60.js +1 -1
- package/dist/index.cjs60.js.map +1 -1
- package/dist/index.cjs61.js +1 -1
- package/dist/index.cjs61.js.map +1 -1
- package/dist/index.cjs62.js +1 -1
- package/dist/index.cjs62.js.map +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs63.js.map +1 -1
- package/dist/index.cjs64.js +1 -1
- package/dist/index.cjs64.js.map +1 -1
- package/dist/index.cjs65.js +1 -1
- package/dist/index.cjs65.js.map +1 -1
- package/dist/index.cjs66.js +1 -1
- package/dist/index.cjs66.js.map +1 -1
- package/dist/index.cjs67.js +1 -1
- package/dist/index.cjs67.js.map +1 -1
- package/dist/index.cjs68.js +1 -1
- package/dist/index.cjs68.js.map +1 -1
- package/dist/index.cjs69.js +1 -1
- package/dist/index.cjs69.js.map +1 -1
- package/dist/index.cjs70.js +1 -1
- package/dist/index.cjs70.js.map +1 -1
- package/dist/index.cjs71.js +1 -1
- package/dist/index.cjs71.js.map +1 -1
- package/dist/index.cjs72.js +1 -1
- package/dist/index.cjs72.js.map +1 -1
- package/dist/index.cjs73.js +1 -1
- package/dist/index.cjs73.js.map +1 -1
- package/dist/index.es12.js +7 -7
- package/dist/index.es13.js +1 -1
- package/dist/index.es20.js +1 -1
- package/dist/index.es201.js +1 -1
- package/dist/index.es221.js +1 -1
- package/dist/index.es228.js +8 -3
- package/dist/index.es228.js.map +1 -1
- package/dist/index.es229.js +3 -8
- package/dist/index.es229.js.map +1 -1
- package/dist/index.es238.js +1 -1
- package/dist/index.es243.js +1 -1
- package/dist/index.es246.js +1 -1
- package/dist/index.es250.js +15 -4
- package/dist/index.es250.js.map +1 -1
- package/dist/index.es251.js +4 -15
- package/dist/index.es251.js.map +1 -1
- package/dist/index.es55.js +1 -1
- package/dist/index.es56.js +1 -1
- package/dist/index.es60.js +2 -28
- package/dist/index.es60.js.map +1 -1
- package/dist/index.es61.js +2 -55
- package/dist/index.es61.js.map +1 -1
- package/dist/index.es62.js +29 -47
- package/dist/index.es62.js.map +1 -1
- package/dist/index.es63.js +55 -37
- package/dist/index.es63.js.map +1 -1
- package/dist/index.es64.js +47 -11
- package/dist/index.es64.js.map +1 -1
- package/dist/index.es65.js +38 -11
- package/dist/index.es65.js.map +1 -1
- package/dist/index.es66.js +11 -29
- package/dist/index.es66.js.map +1 -1
- package/dist/index.es67.js +10 -10
- package/dist/index.es67.js.map +1 -1
- package/dist/index.es68.js +29 -13
- package/dist/index.es68.js.map +1 -1
- package/dist/index.es69.js +11 -52
- package/dist/index.es69.js.map +1 -1
- package/dist/index.es70.js +13 -66
- package/dist/index.es70.js.map +1 -1
- package/dist/index.es71.js +51 -4
- package/dist/index.es71.js.map +1 -1
- package/dist/index.es72.js +65 -2
- package/dist/index.es72.js.map +1 -1
- package/dist/index.es73.js +4 -2
- package/dist/index.es73.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs71.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs71.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/
|
|
1
|
+
{"version":3,"file":"index.cjs71.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/layer.js"],"sourcesContent":["import { useContext, useEffect, useMemo, useState, useRef } from 'react';\nimport { MapContext } from './map';\nimport assert from '../utils/assert';\nimport { deepEqual } from '../utils/deep-equal';\n/* eslint-disable complexity, max-statements */\nfunction updateLayer(map, id, props, prevProps) {\n assert(props.id === prevProps.id, 'layer id changed');\n assert(props.type === prevProps.type, 'layer type changed');\n if (props.type === 'custom' || prevProps.type === 'custom') {\n return;\n }\n const { layout = {}, paint = {}, filter, minzoom, maxzoom, beforeId } = props;\n if (beforeId !== prevProps.beforeId) {\n map.moveLayer(id, beforeId);\n }\n if (layout !== prevProps.layout) {\n const prevLayout = prevProps.layout || {};\n for (const key in layout) {\n if (!deepEqual(layout[key], prevLayout[key])) {\n map.setLayoutProperty(id, key, layout[key]);\n }\n }\n for (const key in prevLayout) {\n if (!layout.hasOwnProperty(key)) {\n map.setLayoutProperty(id, key, undefined);\n }\n }\n }\n if (paint !== prevProps.paint) {\n const prevPaint = prevProps.paint || {};\n for (const key in paint) {\n if (!deepEqual(paint[key], prevPaint[key])) {\n map.setPaintProperty(id, key, paint[key]);\n }\n }\n for (const key in prevPaint) {\n if (!paint.hasOwnProperty(key)) {\n map.setPaintProperty(id, key, undefined);\n }\n }\n }\n if (!deepEqual(filter, prevProps.filter)) {\n map.setFilter(id, filter);\n }\n if (minzoom !== prevProps.minzoom || maxzoom !== prevProps.maxzoom) {\n map.setLayerZoomRange(id, minzoom, maxzoom);\n }\n}\nfunction createLayer(map, id, props) {\n // @ts-ignore\n if (map.style && map.style._loaded && (!('source' in props) || map.getSource(props.source))) {\n const options = { ...props, id };\n delete options.beforeId;\n // @ts-ignore\n map.addLayer(options, props.beforeId);\n }\n}\n/* eslint-enable complexity, max-statements */\nlet layerCounter = 0;\nfunction Layer(props) {\n const map = useContext(MapContext).map.getMap();\n const propsRef = useRef(props);\n const [, setStyleLoaded] = useState(0);\n const id = useMemo(() => props.id || `jsx-layer-${layerCounter++}`, []);\n useEffect(() => {\n if (map) {\n const forceUpdate = () => setStyleLoaded(version => version + 1);\n map.on('styledata', forceUpdate);\n forceUpdate();\n return () => {\n map.off('styledata', forceUpdate);\n // @ts-ignore\n if (map.style && map.style._loaded && map.getLayer(id)) {\n map.removeLayer(id);\n }\n };\n }\n return undefined;\n }, [map]);\n // @ts-ignore\n const layer = map && map.style && map.getLayer(id);\n if (layer) {\n try {\n updateLayer(map, id, props, propsRef.current);\n }\n catch (error) {\n console.warn(error); // eslint-disable-line\n }\n }\n else {\n createLayer(map, id, props);\n }\n // Store last rendered props\n propsRef.current = props;\n return null;\n}\nexport default Layer;\n//# sourceMappingURL=layer.js.map"],"names":["updateLayer","map","id","props","prevProps","assert","layout","paint","filter","minzoom","maxzoom","beforeId","prevLayout","key","deepEqual","prevPaint","createLayer","options","layerCounter","Layer","useContext","MapContext","propsRef","useRef","setStyleLoaded","useState","useMemo","useEffect","forceUpdate","version","error"],"mappings":"kIAKA,SAASA,EAAYC,EAAKC,EAAIC,EAAOC,EAAW,CAG5C,GAFAC,EAAOF,EAAM,KAAOC,EAAU,GAAI,kBAAkB,EACpDC,EAAOF,EAAM,OAASC,EAAU,KAAM,oBAAoB,EACtDD,EAAM,OAAS,UAAYC,EAAU,OAAS,SAC9C,OAEE,KAAA,CAAE,OAAAE,EAAS,GAAI,MAAAC,EAAQ,CAAC,EAAG,OAAAC,EAAQ,QAAAC,EAAS,QAAAC,EAAS,SAAAC,CAAa,EAAAR,EAIpE,GAHAQ,IAAaP,EAAU,UACnBH,EAAA,UAAUC,EAAIS,CAAQ,EAE1BL,IAAWF,EAAU,OAAQ,CACvB,MAAAQ,EAAaR,EAAU,QAAU,GACvC,UAAWS,KAAOP,EACTQ,YAAUR,EAAOO,CAAG,EAAGD,EAAWC,CAAG,CAAC,GACvCZ,EAAI,kBAAkBC,EAAIW,EAAKP,EAAOO,CAAG,CAAC,EAGlD,UAAWA,KAAOD,EACTN,EAAO,eAAeO,CAAG,GACtBZ,EAAA,kBAAkBC,EAAIW,EAAK,MAAS,CAGpD,CACI,GAAAN,IAAUH,EAAU,MAAO,CACrB,MAAAW,EAAYX,EAAU,OAAS,GACrC,UAAWS,KAAON,EACTO,YAAUP,EAAMM,CAAG,EAAGE,EAAUF,CAAG,CAAC,GACrCZ,EAAI,iBAAiBC,EAAIW,EAAKN,EAAMM,CAAG,CAAC,EAGhD,UAAWA,KAAOE,EACTR,EAAM,eAAeM,CAAG,GACrBZ,EAAA,iBAAiBC,EAAIW,EAAK,MAAS,CAGnD,CACKC,EAAAA,UAAUN,EAAQJ,EAAU,MAAM,GAC/BH,EAAA,UAAUC,EAAIM,CAAM,GAExBC,IAAYL,EAAU,SAAWM,IAAYN,EAAU,UACnDH,EAAA,kBAAkBC,EAAIO,EAASC,CAAO,CAElD,CACA,SAASM,EAAYf,EAAKC,EAAIC,EAAO,CAEjC,GAAIF,EAAI,OAASA,EAAI,MAAM,UAAY,EAAE,WAAYE,IAAUF,EAAI,UAAUE,EAAM,MAAM,GAAI,CACzF,MAAMc,EAAU,CAAE,GAAGd,EAAO,GAAAD,CAAG,EAC/B,OAAOe,EAAQ,SAEXhB,EAAA,SAASgB,EAASd,EAAM,QAAQ,CACxC,CACJ,CAEA,IAAIe,EAAe,EACnB,SAASC,EAAMhB,EAAO,CAClB,MAAMF,EAAMmB,EAAAA,WAAWC,EAAAA,UAAU,EAAE,IAAI,OAAO,EACxCC,EAAWC,SAAOpB,CAAK,EACvB,EAAGqB,CAAc,EAAIC,WAAS,CAAC,EAC/BvB,EAAKwB,EAAAA,QAAQ,IAAMvB,EAAM,IAAM,aAAae,GAAc,GAAI,CAAA,CAAE,EAkBtE,GAjBAS,EAAAA,UAAU,IAAM,CACZ,GAAI1B,EAAK,CACL,MAAM2B,EAAc,IAAMJ,EAAeK,GAAWA,EAAU,CAAC,EAC3D5B,OAAAA,EAAA,GAAG,YAAa2B,CAAW,EACnBA,IACL,IAAM,CACL3B,EAAA,IAAI,YAAa2B,CAAW,EAE5B3B,EAAI,OAASA,EAAI,MAAM,SAAWA,EAAI,SAASC,CAAE,GACjDD,EAAI,YAAYC,CAAE,CACtB,CAER,CACO,EACR,CAACD,CAAG,CAAC,EAEMA,GAAOA,EAAI,OAASA,EAAI,SAASC,CAAE,EAEzC,GAAA,CACAF,EAAYC,EAAKC,EAAIC,EAAOmB,EAAS,OAAO,QAEzCQ,EAAO,CACV,QAAQ,KAAKA,CAAK,CACtB,MAGYd,EAAAf,EAAKC,EAAIC,CAAK,EAG9B,OAAAmB,EAAS,QAAUnB,EACZ,IACX","x_google_ignoreList":[0]}
|
package/dist/index.cjs72.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";const l=require("react"),f=require("./index.cjs63.js"),d=require("./index.cjs197.js"),y=require("./index.cjs196.js");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const S=g(l);let m=0;function b(t,e,n){if(t.style&&t.style._loaded){const o={...n};return delete o.id,delete o.children,t.addSource(e,o),t.getSource(e)}return null}function h(t,e,n){d(e.id===n.id,"source id changed"),d(e.type===n.type,"source type changed");let o="",c=0;for(const r in e)r!=="children"&&r!=="id"&&!y.deepEqual(n[r],e[r])&&(o=r,c++);if(!c)return;const a=e.type;if(a==="geojson")t.setData(e.data);else if(a==="image")t.updateImage({url:e.url,coordinates:e.coordinates});else if("setCoordinates"in t&&c===1&&o==="coordinates")t.setCoordinates(e.coordinates);else if("setUrl"in t)switch(o){case"url":t.setUrl(e.url);break;case"tiles":t.setTiles(e.tiles);break}else console.warn(`Unable to update <Source> prop: ${o}`)}function C(t){const e=l.useContext(f.MapContext).map.getMap(),n=l.useRef(t),[,o]=l.useState(0),c=l.useMemo(()=>t.id||`jsx-source-${m++}`,[]);l.useEffect(()=>{if(e){const r=()=>setTimeout(()=>o(i=>i+1),0);return e.on("styledata",r),r(),()=>{var i;if(e.off("styledata",r),e.style&&e.style._loaded&&e.getSource(c)){const u=(i=e.getStyle())===null||i===void 0?void 0:i.layers;if(u)for(const s of u)s.source===c&&e.removeLayer(s.id);e.removeSource(c)}}}},[e]);let a=e&&e.style&&e.getSource(c);return a?h(a,t,n.current):a=b(e,c,t),n.current=t,a&&S.Children.map(t.children,r=>r&&l.cloneElement(r,{source:c}))||null}module.exports=C;
|
|
2
2
|
//# sourceMappingURL=index.cjs72.js.map
|
package/dist/index.cjs72.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs72.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs72.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/source.js"],"sourcesContent":["import * as React from 'react';\nimport { useContext, useEffect, useMemo, useState, useRef } from 'react';\nimport { cloneElement } from 'react';\nimport { MapContext } from './map';\nimport assert from '../utils/assert';\nimport { deepEqual } from '../utils/deep-equal';\nlet sourceCounter = 0;\nfunction createSource(map, id, props) {\n // @ts-ignore\n if (map.style && map.style._loaded) {\n const options = { ...props };\n delete options.id;\n delete options.children;\n // @ts-ignore\n map.addSource(id, options);\n return map.getSource(id);\n }\n return null;\n}\n/* eslint-disable complexity */\nfunction updateSource(source, props, prevProps) {\n assert(props.id === prevProps.id, 'source id changed');\n assert(props.type === prevProps.type, 'source type changed');\n let changedKey = '';\n let changedKeyCount = 0;\n for (const key in props) {\n if (key !== 'children' && key !== 'id' && !deepEqual(prevProps[key], props[key])) {\n changedKey = key;\n changedKeyCount++;\n }\n }\n if (!changedKeyCount) {\n return;\n }\n const type = props.type;\n if (type === 'geojson') {\n source.setData(props.data);\n }\n else if (type === 'image') {\n source.updateImage({\n url: props.url,\n coordinates: props.coordinates\n });\n }\n else if ('setCoordinates' in source && changedKeyCount === 1 && changedKey === 'coordinates') {\n source.setCoordinates(props.coordinates);\n }\n else if ('setUrl' in source) {\n // Added in 1.12.0:\n // vectorTileSource.setTiles\n // vectorTileSource.setUrl\n switch (changedKey) {\n case 'url':\n source.setUrl(props.url);\n break;\n case 'tiles':\n source.setTiles(props.tiles);\n break;\n default:\n }\n }\n else {\n // eslint-disable-next-line\n console.warn(`Unable to update <Source> prop: ${changedKey}`);\n }\n}\n/* eslint-enable complexity */\nfunction Source(props) {\n const map = useContext(MapContext).map.getMap();\n const propsRef = useRef(props);\n const [, setStyleLoaded] = useState(0);\n const id = useMemo(() => props.id || `jsx-source-${sourceCounter++}`, []);\n useEffect(() => {\n if (map) {\n /* global setTimeout */\n const forceUpdate = () => setTimeout(() => setStyleLoaded(version => version + 1), 0);\n map.on('styledata', forceUpdate);\n forceUpdate();\n return () => {\n var _a;\n map.off('styledata', forceUpdate);\n // @ts-ignore\n if (map.style && map.style._loaded && map.getSource(id)) {\n // Parent effects are destroyed before child ones, see\n // https://github.com/facebook/react/issues/16728\n // Source can only be removed after all child layers are removed\n const allLayers = (_a = map.getStyle()) === null || _a === void 0 ? void 0 : _a.layers;\n if (allLayers) {\n for (const layer of allLayers) {\n // @ts-ignore (2339) source does not exist on all layer types\n if (layer.source === id) {\n map.removeLayer(layer.id);\n }\n }\n }\n map.removeSource(id);\n }\n };\n }\n return undefined;\n }, [map]);\n // @ts-ignore\n let source = map && map.style && map.getSource(id);\n if (source) {\n updateSource(source, props, propsRef.current);\n }\n else {\n source = createSource(map, id, props);\n }\n propsRef.current = props;\n return ((source &&\n React.Children.map(props.children, child => child &&\n cloneElement(child, {\n source: id\n }))) ||\n null);\n}\nexport default Source;\n//# sourceMappingURL=source.js.map"],"names":["sourceCounter","createSource","map","id","props","options","updateSource","source","prevProps","assert","changedKey","changedKeyCount","key","deepEqual","type","Source","useContext","MapContext","propsRef","useRef","setStyleLoaded","useState","useMemo","useEffect","forceUpdate","version","_a","allLayers","layer","React","child","cloneElement"],"mappings":"4ZAMA,IAAIA,EAAgB,EACpB,SAASC,EAAaC,EAAKC,EAAIC,EAAO,CAElC,GAAIF,EAAI,OAASA,EAAI,MAAM,QAAS,CAC1B,MAAAG,EAAU,CAAE,GAAGD,GACrB,cAAOC,EAAQ,GACf,OAAOA,EAAQ,SAEXH,EAAA,UAAUC,EAAIE,CAAO,EAClBH,EAAI,UAAUC,CAAE,CAC3B,CACO,OAAA,IACX,CAEA,SAASG,EAAaC,EAAQH,EAAOI,EAAW,CAC5CC,EAAOL,EAAM,KAAOI,EAAU,GAAI,mBAAmB,EACrDC,EAAOL,EAAM,OAASI,EAAU,KAAM,qBAAqB,EAC3D,IAAIE,EAAa,GACbC,EAAkB,EACtB,UAAWC,KAAOR,EACVQ,IAAQ,YAAcA,IAAQ,MAAQ,CAACC,EAAAA,UAAUL,EAAUI,CAAG,EAAGR,EAAMQ,CAAG,CAAC,IAC9DF,EAAAE,EACbD,KAGR,GAAI,CAACA,EACD,OAEJ,MAAMG,EAAOV,EAAM,KACnB,GAAIU,IAAS,UACFP,EAAA,QAAQH,EAAM,IAAI,UAEpBU,IAAS,QACdP,EAAO,YAAY,CACf,IAAKH,EAAM,IACX,YAAaA,EAAM,WAAA,CACtB,UAEI,mBAAoBG,GAAUI,IAAoB,GAAKD,IAAe,cACpEH,EAAA,eAAeH,EAAM,WAAW,UAElC,WAAYG,EAIjB,OAAQG,EAAY,CAChB,IAAK,MACMH,EAAA,OAAOH,EAAM,GAAG,EACvB,MACJ,IAAK,QACMG,EAAA,SAASH,EAAM,KAAK,EAC3B,KAER,MAIQ,QAAA,KAAK,mCAAmCM,CAAU,EAAE,CAEpE,CAEA,SAASK,EAAOX,EAAO,CACnB,MAAMF,EAAMc,EAAAA,WAAWC,EAAAA,UAAU,EAAE,IAAI,OAAO,EACxCC,EAAWC,SAAOf,CAAK,EACvB,EAAGgB,CAAc,EAAIC,WAAS,CAAC,EAC/BlB,EAAKmB,EAAAA,QAAQ,IAAMlB,EAAM,IAAM,cAAcJ,GAAe,GAAI,CAAA,CAAE,EACxEuB,EAAAA,UAAU,IAAM,CACZ,GAAIrB,EAAK,CAEC,MAAAsB,EAAc,IAAM,WAAW,IAAMJ,EAA0BK,GAAAA,EAAU,CAAC,EAAG,CAAC,EAChFvB,OAAAA,EAAA,GAAG,YAAasB,CAAW,EACnBA,IACL,IAAM,CACL,IAAAE,EAGA,GAFAxB,EAAA,IAAI,YAAasB,CAAW,EAE5BtB,EAAI,OAASA,EAAI,MAAM,SAAWA,EAAI,UAAUC,CAAE,EAAG,CAI/C,MAAAwB,GAAaD,EAAKxB,EAAI,SAAA,KAAgB,MAAQwB,IAAO,OAAS,OAASA,EAAG,OAChF,GAAIC,EACA,UAAWC,KAASD,EAEZC,EAAM,SAAWzB,GACbD,EAAA,YAAY0B,EAAM,EAAE,EAIpC1B,EAAI,aAAaC,CAAE,CACvB,CAAA,CAER,CACO,EACR,CAACD,CAAG,CAAC,EAER,IAAIK,EAASL,GAAOA,EAAI,OAASA,EAAI,UAAUC,CAAE,EACjD,OAAII,EACaD,EAAAC,EAAQH,EAAOc,EAAS,OAAO,EAGnCX,EAAAN,EAAaC,EAAKC,EAAIC,CAAK,EAExCc,EAAS,QAAUd,EACVG,GACLsB,EAAM,SAAS,IAAIzB,EAAM,SAAU0B,GAASA,GACxCC,EAAAA,aAAaD,EAAO,CAChB,OAAQ3B,CAAA,CACX,CAAC,GACN,IACR","x_google_ignoreList":[0]}
|
package/dist/index.cjs73.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react");require("./index.cjs63.js");function c(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=c(r),u=a.createContext(null);exports.MountedMapsContext=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs73.js.map
|
package/dist/index.cjs73.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs73.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs73.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/use-map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useCallback, useMemo, useContext } from 'react';\nimport { MapContext } from './map';\nexport const MountedMapsContext = React.createContext(null);\nexport const MapProvider = props => {\n const [maps, setMaps] = useState({});\n const onMapMount = useCallback((map, id = 'default') => {\n setMaps(currMaps => {\n if (id === 'current') {\n throw new Error(\"'current' cannot be used as map id\");\n }\n if (currMaps[id]) {\n throw new Error(`Multiple maps with the same id: ${id}`);\n }\n return { ...currMaps, [id]: map };\n });\n }, []);\n const onMapUnmount = useCallback((id = 'default') => {\n setMaps(currMaps => {\n if (currMaps[id]) {\n const nextMaps = { ...currMaps };\n delete nextMaps[id];\n return nextMaps;\n }\n return currMaps;\n });\n }, []);\n return (React.createElement(MountedMapsContext.Provider, { value: {\n maps,\n onMapMount,\n onMapUnmount\n } }, props.children));\n};\nexport function useMap() {\n var _a;\n const maps = (_a = useContext(MountedMapsContext)) === null || _a === void 0 ? void 0 : _a.maps;\n const currentMap = useContext(MapContext);\n const mapsWithCurrent = useMemo(() => {\n return { ...maps, current: currentMap === null || currentMap === void 0 ? void 0 : currentMap.map };\n }, [maps, currentMap]);\n return mapsWithCurrent;\n}\n//# sourceMappingURL=use-map.js.map"],"names":["MountedMapsContext","React"],"mappings":"+ZAGaA,EAAqBC,EAAM,cAAc,IAAI","x_google_ignoreList":[0]}
|
package/dist/index.es12.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as m from "react";
|
|
2
|
-
import p from "./index.
|
|
3
|
-
import "./index.es62.js";
|
|
4
|
-
import "./index.es63.js";
|
|
2
|
+
import p from "./index.es63.js";
|
|
5
3
|
import "./index.es64.js";
|
|
6
4
|
import "./index.es65.js";
|
|
7
5
|
import "./index.es66.js";
|
|
8
6
|
import "./index.es67.js";
|
|
9
7
|
import "./index.es68.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import "./index.es71.js";
|
|
13
|
-
|
|
8
|
+
import "./index.es69.js";
|
|
9
|
+
import "./index.es70.js";
|
|
10
|
+
import i from "./index.es71.js";
|
|
11
|
+
import a from "./index.es72.js";
|
|
12
|
+
import "./index.es73.js";
|
|
13
|
+
const e = import("./index.es62.js").then((r) => r.i), S = m.forwardRef(function(o, t) {
|
|
14
14
|
return p(o, t, e);
|
|
15
15
|
}), b = i, h = a;
|
|
16
16
|
export {
|
package/dist/index.es13.js
CHANGED
package/dist/index.es20.js
CHANGED
package/dist/index.es201.js
CHANGED
package/dist/index.es221.js
CHANGED
package/dist/index.es228.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { MAX_ARRAY_INDEX as o } from "./index.es18.js";
|
|
2
|
+
function u(e) {
|
|
3
|
+
return function(t) {
|
|
4
|
+
var r = e(t);
|
|
5
|
+
return typeof r == "number" && r >= 0 && r <= o;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
3
8
|
export {
|
|
4
|
-
|
|
9
|
+
u as default
|
|
5
10
|
};
|
|
6
11
|
//# sourceMappingURL=index.es228.js.map
|
package/dist/index.es228.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es228.js","sources":["../../../node_modules/underscore/modules/
|
|
1
|
+
{"version":3,"file":"index.es228.js","sources":["../../../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AACtB,QAAAC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EAAA;AAEnF;","x_google_ignoreList":[0]}
|
package/dist/index.es229.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
return function(t) {
|
|
4
|
-
var r = e(t);
|
|
5
|
-
return typeof r == "number" && r >= 0 && r <= o;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
1
|
+
import t from "./index.es199.js";
|
|
2
|
+
const a = t("Object");
|
|
8
3
|
export {
|
|
9
|
-
|
|
4
|
+
a as default
|
|
10
5
|
};
|
|
11
6
|
//# sourceMappingURL=index.es229.js.map
|
package/dist/index.es229.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es229.js","sources":["../../../node_modules/underscore/modules/
|
|
1
|
+
{"version":3,"file":"index.es229.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAeA,IAAAC,EAAU,QAAQ;","x_google_ignoreList":[0]}
|
package/dist/index.es238.js
CHANGED
package/dist/index.es243.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cartesian as Q, cartesianCross as T, cartesianDot as R, cartesianScale as g, cartesianAddInPlace as y, spherical as U } from "./index.es233.js";
|
|
2
2
|
import { circleStream as $ } from "./index.es232.js";
|
|
3
3
|
import { pi as v, cos as F, epsilon as x, abs as G, sqrt as b } from "./index.es234.js";
|
|
4
|
-
import J from "./index.
|
|
4
|
+
import J from "./index.es251.js";
|
|
5
5
|
import m from "./index.es252.js";
|
|
6
6
|
function fn(S, V) {
|
|
7
7
|
var A = F(S), C = A > 0, W = G(A) > x;
|
package/dist/index.es246.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c from "./index.es248.js";
|
|
2
|
-
import n from "./index.
|
|
2
|
+
import n from "./index.es250.js";
|
|
3
3
|
function S(l, a, r) {
|
|
4
4
|
var f = a[1][0] - a[0][0], m = a[1][1] - a[0][1], i = l.clipExtent && l.clipExtent();
|
|
5
5
|
l.scale(150).translate([0, 0]), i != null && l.clipExtent(null), c(r, l.stream(n));
|
package/dist/index.es250.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import r from "./index.es249.js";
|
|
2
|
+
var o = 1 / 0, f = o, t = -o, a = t, d = {
|
|
3
|
+
point: u,
|
|
4
|
+
lineStart: r,
|
|
5
|
+
lineEnd: r,
|
|
6
|
+
polygonStart: r,
|
|
7
|
+
polygonEnd: r,
|
|
8
|
+
result: function() {
|
|
9
|
+
var n = [[o, f], [t, a]];
|
|
10
|
+
return t = a = -(f = o = 1 / 0), n;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function u(n, i) {
|
|
14
|
+
n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
|
|
4
15
|
}
|
|
5
16
|
export {
|
|
6
|
-
|
|
17
|
+
d as default
|
|
7
18
|
};
|
|
8
19
|
//# sourceMappingURL=index.es250.js.map
|
package/dist/index.es250.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es250.js","sources":["../../../node_modules/d3-geo/src/
|
|
1
|
+
{"version":3,"file":"index.es250.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":";AAEA,IAAIA,IAAK,OACLC,IAAKD,GACLE,IAAK,CAACF,GACNG,IAAKD,GAELE,IAAe;AAAA,EACjB,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,SAASA;AAAA,EACT,cAAcA;AAAA,EACd,YAAYA;AAAA,EACZ,QAAQ,WAAW;AACb,QAAAC,IAAS,CAAC,CAACP,GAAIC,CAAE,GAAG,CAACC,GAAIC,CAAE,CAAC;AAC3B,WAAAD,IAAAC,IAAK,EAAEF,IAAKD,IAAK,QACfO;AAAA,EACT;AACF;AAEA,SAASF,EAAYG,GAAGC,GAAG;AACzB,EAAID,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM,IACbC,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM;AACnB;","x_google_ignoreList":[0]}
|
package/dist/index.es251.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import r from "./index.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
lineStart: r,
|
|
5
|
-
lineEnd: r,
|
|
6
|
-
polygonStart: r,
|
|
7
|
-
polygonEnd: r,
|
|
8
|
-
result: function() {
|
|
9
|
-
var n = [[o, f], [t, a]];
|
|
10
|
-
return t = a = -(f = o = 1 / 0), n;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
function u(n, i) {
|
|
14
|
-
n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
|
|
1
|
+
import { abs as n, epsilon as r } from "./index.es234.js";
|
|
2
|
+
function i(o, t) {
|
|
3
|
+
return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
|
|
15
4
|
}
|
|
16
5
|
export {
|
|
17
|
-
|
|
6
|
+
i as default
|
|
18
7
|
};
|
|
19
8
|
//# sourceMappingURL=index.es251.js.map
|
package/dist/index.es251.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es251.js","sources":["../../../node_modules/d3-geo/src/
|
|
1
|
+
{"version":3,"file":"index.es251.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":";AAEA,SAAAA,EAAwBC,GAAGC,GAAG;AAC5B,SAAOC,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE,KAAWD,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE;AAC1D;","x_google_ignoreList":[0]}
|
package/dist/index.es55.js
CHANGED
package/dist/index.es56.js
CHANGED
package/dist/index.es60.js
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function i(r, s) {
|
|
3
|
-
for (var o = 0; o < s.length; o++) {
|
|
4
|
-
const e = s[o];
|
|
5
|
-
if (typeof e != "string" && !Array.isArray(e)) {
|
|
6
|
-
for (const t in e)
|
|
7
|
-
if (t !== "default" && !(t in r)) {
|
|
8
|
-
const n = Object.getOwnPropertyDescriptor(e, t);
|
|
9
|
-
n && Object.defineProperty(r, t, n.get ? n : {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
get: () => e[t]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
-
}
|
|
18
|
-
var f = a.printMsg = function() {
|
|
19
|
-
console.log("This is a message from the demo package");
|
|
20
|
-
};
|
|
21
|
-
const p = /* @__PURE__ */ i({
|
|
22
|
-
__proto__: null,
|
|
23
|
-
default: a,
|
|
24
|
-
printMsg: f
|
|
25
|
-
}, [a]);
|
|
1
|
+
var r = {};
|
|
26
2
|
export {
|
|
27
|
-
|
|
28
|
-
p as i,
|
|
29
|
-
f as printMsg
|
|
3
|
+
r as __exports
|
|
30
4
|
};
|
|
31
5
|
//# sourceMappingURL=index.es60.js.map
|
package/dist/index.es60.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es60.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es60.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es61.js
CHANGED
|
@@ -1,58 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { useContext as b, useState as E, useRef as c, useEffect as x, useImperativeHandle as w, useMemo as y } from "react";
|
|
3
|
-
import { MountedMapsContext as L } from "./index.es71.js";
|
|
4
|
-
import m from "./index.es191.js";
|
|
5
|
-
import I from "./index.es192.js";
|
|
6
|
-
import C from "./index.es193.js";
|
|
7
|
-
import g from "./index.es194.js";
|
|
8
|
-
const R = l.createContext(null);
|
|
9
|
-
function A(e, f, d) {
|
|
10
|
-
const o = b(L), [i, p] = E(null), s = c(), { current: a } = c({ mapLib: null, map: null });
|
|
11
|
-
x(() => {
|
|
12
|
-
const v = e.mapLib;
|
|
13
|
-
let u = !0, n;
|
|
14
|
-
return Promise.resolve(v || d).then((r) => {
|
|
15
|
-
if (!u)
|
|
16
|
-
return;
|
|
17
|
-
if (!r)
|
|
18
|
-
throw new Error("Invalid mapLib");
|
|
19
|
-
const t = "Map" in r ? r : r.default;
|
|
20
|
-
if (!t.Map)
|
|
21
|
-
throw new Error("Invalid mapLib");
|
|
22
|
-
if (g(t, e), !t.supported || t.supported(e))
|
|
23
|
-
e.reuseMaps && (n = m.reuse(e, s.current)), n || (n = new m(t.Map, e, s.current)), a.map = I(n), a.mapLib = t, p(n), o == null || o.onMapMount(a.map, e.id);
|
|
24
|
-
else
|
|
25
|
-
throw new Error("Map is not supported by this browser");
|
|
26
|
-
}).catch((r) => {
|
|
27
|
-
const { onError: t } = e;
|
|
28
|
-
t ? t({
|
|
29
|
-
type: "error",
|
|
30
|
-
target: null,
|
|
31
|
-
originalEvent: null,
|
|
32
|
-
error: r
|
|
33
|
-
}) : console.error(r);
|
|
34
|
-
}), () => {
|
|
35
|
-
u = !1, n && (o == null || o.onMapUnmount(e.id), e.reuseMaps ? n.recycle() : n.destroy());
|
|
36
|
-
};
|
|
37
|
-
}, []), C(() => {
|
|
38
|
-
i && i.setProps(e);
|
|
39
|
-
}), w(f, () => a.map, [i]);
|
|
40
|
-
const M = y(() => ({
|
|
41
|
-
position: "relative",
|
|
42
|
-
width: "100%",
|
|
43
|
-
height: "100%",
|
|
44
|
-
...e.style
|
|
45
|
-
}), [e.style]), h = {
|
|
46
|
-
height: "100%"
|
|
47
|
-
};
|
|
48
|
-
return l.createElement("div", { id: e.id, ref: s, style: M }, i && l.createElement(
|
|
49
|
-
R.Provider,
|
|
50
|
-
{ value: a },
|
|
51
|
-
l.createElement("div", { "mapboxgl-children": "", style: h }, e.children)
|
|
52
|
-
));
|
|
53
|
-
}
|
|
1
|
+
var e = {};
|
|
54
2
|
export {
|
|
55
|
-
|
|
56
|
-
A as default
|
|
3
|
+
e as __exports
|
|
57
4
|
};
|
|
58
5
|
//# sourceMappingURL=index.es61.js.map
|
package/dist/index.es61.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es61.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es61.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es62.js
CHANGED
|
@@ -1,49 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
element: L ? document.createElement("div") : null
|
|
18
|
-
}, l = new b.Marker(_);
|
|
19
|
-
return l.setLngLat([o.longitude, o.latitude]), l.getElement().addEventListener("click", (a) => {
|
|
20
|
-
var n, e;
|
|
21
|
-
(e = (n = i.current.props).onClick) === null || e === void 0 || e.call(n, {
|
|
22
|
-
type: "click",
|
|
23
|
-
target: l,
|
|
24
|
-
originalEvent: a
|
|
25
|
-
});
|
|
26
|
-
}), l.on("dragstart", (a) => {
|
|
27
|
-
var n, e;
|
|
28
|
-
const r = a;
|
|
29
|
-
r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDragStart) === null || e === void 0 || e.call(n, r);
|
|
30
|
-
}), l.on("drag", (a) => {
|
|
31
|
-
var n, e;
|
|
32
|
-
const r = a;
|
|
33
|
-
r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDrag) === null || e === void 0 || e.call(n, r);
|
|
34
|
-
}), l.on("dragend", (a) => {
|
|
35
|
-
var n, e;
|
|
36
|
-
const r = a;
|
|
37
|
-
r.lngLat = t.getLngLat(), (e = (n = i.current.props).onDragEnd) === null || e === void 0 || e.call(n, r);
|
|
38
|
-
}), l;
|
|
39
|
-
}, []);
|
|
40
|
-
h(() => (t.addTo(R.getMap()), () => {
|
|
41
|
-
t.remove();
|
|
42
|
-
}), []);
|
|
43
|
-
const { longitude: c, latitude: s, offset: g, style: m, draggable: u = !1, popup: d = null, rotation: f = 0, rotationAlignment: v = "auto", pitchAlignment: p = "auto" } = o;
|
|
44
|
-
return h(() => {
|
|
45
|
-
x(t.getElement(), m);
|
|
46
|
-
}, [m]), y(E, () => t, []), (t.getLngLat().lng !== c || t.getLngLat().lat !== s) && t.setLngLat([c, s]), g && !S(t.getOffset(), g) && t.setOffset(g), t.isDraggable() !== u && t.setDraggable(u), t.getRotation() !== f && t.setRotation(f), t.getRotationAlignment() !== v && t.setRotationAlignment(v), t.getPitchAlignment() !== p && t.setPitchAlignment(p), t.getPopup() !== d && t.setPopup(d), w(o.children, t.getElement());
|
|
1
|
+
import { __exports as a } from "./index.es198.js";
|
|
2
|
+
function i(r, s) {
|
|
3
|
+
for (var o = 0; o < s.length; o++) {
|
|
4
|
+
const e = s[o];
|
|
5
|
+
if (typeof e != "string" && !Array.isArray(e)) {
|
|
6
|
+
for (const t in e)
|
|
7
|
+
if (t !== "default" && !(t in r)) {
|
|
8
|
+
const n = Object.getOwnPropertyDescriptor(e, t);
|
|
9
|
+
n && Object.defineProperty(r, t, n.get ? n : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => e[t]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
47
17
|
}
|
|
48
|
-
|
|
18
|
+
var f = a.printMsg = function() {
|
|
19
|
+
console.log("This is a message from the demo package");
|
|
20
|
+
};
|
|
21
|
+
const p = /* @__PURE__ */ i({
|
|
22
|
+
__proto__: null,
|
|
23
|
+
default: a,
|
|
24
|
+
printMsg: f
|
|
25
|
+
}, [a]);
|
|
26
|
+
export {
|
|
27
|
+
a as default,
|
|
28
|
+
p as i,
|
|
29
|
+
f as printMsg
|
|
30
|
+
};
|
|
49
31
|
//# sourceMappingURL=index.es62.js.map
|
package/dist/index.es62.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es62.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es62.js","sources":["../../../node_modules/mapbox-gl/index.js"],"sourcesContent":["exports.printMsg = function() {\r\n console.log(\"This is a message from the demo package\");\r\n }"],"names":["printMsg","mapboxGl"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAAC,EAAA,WAAmB,WAAW;AAC1B,UAAQ,IAAI,yCAAyC;AACvD;;;;;;","x_google_ignoreList":[0]}
|
package/dist/index.es63.js
CHANGED
|
@@ -1,40 +1,58 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { useContext as b, useState as E, useRef as c, useEffect as x, useImperativeHandle as w, useMemo as y } from "react";
|
|
3
|
+
import { MountedMapsContext as L } from "./index.es73.js";
|
|
4
|
+
import m from "./index.es191.js";
|
|
5
|
+
import I from "./index.es192.js";
|
|
6
|
+
import C from "./index.es193.js";
|
|
7
|
+
import g from "./index.es194.js";
|
|
8
|
+
const R = l.createContext(null);
|
|
9
|
+
function A(e, f, d) {
|
|
10
|
+
const o = b(L), [i, p] = E(null), s = c(), { current: a } = c({ mapLib: null, map: null });
|
|
11
|
+
x(() => {
|
|
12
|
+
const v = e.mapLib;
|
|
13
|
+
let u = !0, n;
|
|
14
|
+
return Promise.resolve(v || d).then((r) => {
|
|
15
|
+
if (!u)
|
|
16
|
+
return;
|
|
17
|
+
if (!r)
|
|
18
|
+
throw new Error("Invalid mapLib");
|
|
19
|
+
const t = "Map" in r ? r : r.default;
|
|
20
|
+
if (!t.Map)
|
|
21
|
+
throw new Error("Invalid mapLib");
|
|
22
|
+
if (g(t, e), !t.supported || t.supported(e))
|
|
23
|
+
e.reuseMaps && (n = m.reuse(e, s.current)), n || (n = new m(t.Map, e, s.current)), a.map = I(n), a.mapLib = t, p(n), o == null || o.onMapMount(a.map, e.id);
|
|
24
|
+
else
|
|
25
|
+
throw new Error("Map is not supported by this browser");
|
|
26
|
+
}).catch((r) => {
|
|
27
|
+
const { onError: t } = e;
|
|
28
|
+
t ? t({
|
|
29
|
+
type: "error",
|
|
30
|
+
target: null,
|
|
31
|
+
originalEvent: null,
|
|
32
|
+
error: r
|
|
33
|
+
}) : console.error(r);
|
|
34
|
+
}), () => {
|
|
35
|
+
u = !1, n && (o == null || o.onMapUnmount(e.id), e.reuseMaps ? n.recycle() : n.destroy());
|
|
26
36
|
};
|
|
27
|
-
}, []),
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
}, []), C(() => {
|
|
38
|
+
i && i.setProps(e);
|
|
39
|
+
}), w(f, () => a.map, [i]);
|
|
40
|
+
const M = y(() => ({
|
|
41
|
+
position: "relative",
|
|
42
|
+
width: "100%",
|
|
43
|
+
height: "100%",
|
|
44
|
+
...e.style
|
|
45
|
+
}), [e.style]), h = {
|
|
46
|
+
height: "100%"
|
|
47
|
+
};
|
|
48
|
+
return l.createElement("div", { id: e.id, ref: s, style: M }, i && l.createElement(
|
|
49
|
+
R.Provider,
|
|
50
|
+
{ value: a },
|
|
51
|
+
l.createElement("div", { "mapboxgl-children": "", style: h }, e.children)
|
|
52
|
+
));
|
|
38
53
|
}
|
|
39
|
-
|
|
54
|
+
export {
|
|
55
|
+
R as MapContext,
|
|
56
|
+
A as default
|
|
57
|
+
};
|
|
40
58
|
//# sourceMappingURL=index.es63.js.map
|