@performant-software/geospatial 3.0.6-beta.2 → 3.0.6-beta.3
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.cjs14.js +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs199.js +1 -1
- package/dist/index.cjs209.js +1 -1
- package/dist/index.cjs210.js +1 -1
- package/dist/index.cjs211.js +1 -1
- package/dist/index.cjs229.js +1 -1
- package/dist/index.cjs234.js +1 -1
- package/dist/index.cjs234.js.map +1 -1
- package/dist/index.cjs235.js +1 -1
- package/dist/index.cjs235.js.map +1 -1
- package/dist/index.cjs237.js +1 -1
- package/dist/index.cjs237.js.map +1 -1
- package/dist/index.cjs238.js +1 -1
- package/dist/index.cjs238.js.map +1 -1
- package/dist/index.cjs246.js +1 -1
- package/dist/index.cjs251.js +1 -1
- package/dist/index.cjs254.js +1 -1
- package/dist/index.cjs258.js +1 -1
- package/dist/index.cjs258.js.map +1 -1
- package/dist/index.cjs259.js +1 -1
- package/dist/index.cjs259.js.map +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs64.js +1 -1
- package/dist/index.cjs77.js +1 -1
- package/dist/index.cjs77.js.map +1 -1
- package/dist/index.cjs78.js +1 -1
- package/dist/index.cjs78.js.map +1 -1
- package/dist/index.cjs79.js +1 -1
- package/dist/index.cjs79.js.map +1 -1
- package/dist/index.cjs80.js +1 -1
- package/dist/index.cjs80.js.map +1 -1
- package/dist/index.cjs81.js +1 -1
- package/dist/index.cjs81.js.map +1 -1
- package/dist/index.es14.js +1 -1
- package/dist/index.es15.js +3 -3
- package/dist/index.es19.js +1 -1
- package/dist/index.es199.js +2 -2
- package/dist/index.es209.js +1 -1
- package/dist/index.es210.js +1 -1
- package/dist/index.es211.js +1 -1
- package/dist/index.es229.js +1 -1
- package/dist/index.es234.js +44 -6
- package/dist/index.es234.js.map +1 -1
- package/dist/index.es235.js +22 -5
- package/dist/index.es235.js.map +1 -1
- package/dist/index.es237.js +6 -44
- package/dist/index.es237.js.map +1 -1
- package/dist/index.es238.js +5 -22
- package/dist/index.es238.js.map +1 -1
- package/dist/index.es246.js +1 -1
- package/dist/index.es251.js +1 -1
- package/dist/index.es254.js +1 -1
- package/dist/index.es258.js +4 -15
- package/dist/index.es258.js.map +1 -1
- package/dist/index.es259.js +15 -4
- package/dist/index.es259.js.map +1 -1
- package/dist/index.es61.js +2 -2
- package/dist/index.es63.js +1 -1
- package/dist/index.es64.js +1 -1
- package/dist/index.es67.js +2 -2
- package/dist/index.es77.js +2 -28
- package/dist/index.es77.js.map +1 -1
- package/dist/index.es78.js +2 -51
- package/dist/index.es78.js.map +1 -1
- package/dist/index.es79.js +25 -62
- package/dist/index.es79.js.map +1 -1
- package/dist/index.es80.js +51 -2
- package/dist/index.es80.js.map +1 -1
- package/dist/index.es81.js +65 -2
- package/dist/index.es81.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs199.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const d=require("./index.
|
|
1
|
+
"use strict";const d=require("./index.cjs234.js"),p=require("./index.cjs235.js"),u=require("./index.cjs204.js"),_={version:8,sources:{},layers:[]},v={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},f={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},g={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},y=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],S=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class m{constructor(e,o,n){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=t=>{const r=this.props[g[t.type]];r?r(t):t.type==="error"&&console.error(t.error)},this._onPointerEvent=t=>{(t.type==="mousemove"||t.type==="mouseout")&&this._updateHover(t);const r=this.props[v[t.type]];r&&(this.props.interactiveLayerIds&&t.type!=="mouseover"&&t.type!=="mouseout"&&(t.features=this._hoveredFeatures||this._queryRenderedFeatures(t.point)),r(t),delete t.features)},this._onCameraEvent=t=>{if(!this._internalUpdate){const r=this.props[f[t.type]];r&&r(t)}t.type in this._deferredEvents&&(this._deferredEvents[t.type]=!1)},this._MapClass=e,this.props=o,this._initialize(n)}get map(){return this._map}get transform(){return this._renderTransform}setProps(e){const o=this.props;this.props=e;const n=this._updateSettings(e,o);n&&this._createShadowTransform(this._map);const t=this._updateSize(e),r=this._updateViewState(e,!0);this._updateStyle(e,o),this._updateStyleComponents(e,o),this._updateHandlers(e,o),(n||t||r&&!this._map.isMoving())&&this.redraw()}static reuse(e,o){const n=m.savedMaps.pop();if(!n)return null;const t=n.map,r=t.getContainer();for(o.className=r.className;r.childNodes.length>0;)o.appendChild(r.childNodes[0]);t._container=o;const s=t._resizeObserver;s&&(s.disconnect(),s.observe(o)),n.setProps({...e,styleDiffing:!1}),t.resize();const{initialViewState:i}=e;return i&&(i.bounds?t.fitBounds(i.bounds,{...i.fitBoundsOptions,duration:0}):n._updateViewState(i,!1)),t.isStyleLoaded()?t.fire("load"):t.once("styledata",()=>t.fire("load")),t._update(),n}_initialize(e){const{props:o}=this,{mapStyle:n=_}=o,t={...o,...o.initialViewState,accessToken:o.mapboxAccessToken||E()||null,container:e,style:p.normalizeStyle(n)},r=t.initialViewState||t.viewState||t;if(Object.assign(t,{center:[r.longitude||0,r.latitude||0],zoom:r.zoom||0,pitch:r.pitch||0,bearing:r.bearing||0}),o.gl){const a=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=a,o.gl)}const s=new this._MapClass(t);r.padding&&s.setPadding(r.padding),o.cursor&&(s.getCanvas().style.cursor=o.cursor),this._createShadowTransform(s);const i=s._render;s._render=a=>{this._inRender=!0,i.call(s,a),this._inRender=!1};const c=s._renderTaskQueue.run;s._renderTaskQueue.run=a=>{c.call(s._renderTaskQueue,a),this._onBeforeRepaint()},s.on("render",()=>this._onAfterRepaint());const h=s.fire;s.fire=this._fireEvent.bind(this,h),s.on("resize",()=>{this._renderTransform.resize(s.transform.width,s.transform.height)}),s.on("styledata",()=>{this._updateStyleComponents(this.props,{}),d.syncProjection(s.transform,this._renderTransform)}),s.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const a in v)s.on(a,this._onPointerEvent);for(const a in f)s.on(a,this._onCameraEvent);for(const a in g)s.on(a,this._onEvent);this._map=s}recycle(){const o=this.map.getContainer().querySelector("[mapboxgl-children]");o==null||o.remove(),m.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const e=this._map;!this._inRender&&e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}_createShadowTransform(e){const o=d.cloneTransform(e.transform);e.painter.transform=o,this._renderTransform=o}_updateSize(e){const{viewState:o}=e;if(o){const n=this._map;if(o.width!==n.transform.width||o.height!==n.transform.height)return n.resize(),!0}return!1}_updateViewState(e,o){if(this._internalUpdate)return!1;const n=this._map,t=this._renderTransform,{zoom:r,pitch:s,bearing:i}=t,c=n.isMoving();c&&(t.cameraElevationReference="sea");const h=d.applyViewStateToTransform(t,{...d.transformToViewState(n.transform),...e});if(c&&(t.cameraElevationReference="ground"),h&&o){const a=this._deferredEvents;a.move=!0,a.zoom||(a.zoom=r!==t.zoom),a.rotate||(a.rotate=i!==t.bearing),a.pitch||(a.pitch=s!==t.pitch)}return c||d.applyViewStateToTransform(n.transform,e),h}_updateSettings(e,o){const n=this._map;let t=!1;for(const r of y)if(r in e&&!u.deepEqual(e[r],o[r])){t=!0;const s=n[`set${r[0].toUpperCase()}${r.slice(1)}`];s==null||s.call(n,e[r])}return t}_updateStyle(e,o){if(e.cursor!==o.cursor&&(this._map.getCanvas().style.cursor=e.cursor||""),e.mapStyle!==o.mapStyle){const{mapStyle:n=_,styleDiffing:t=!0}=e,r={diff:t};return"localIdeographFontFamily"in e&&(r.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(p.normalizeStyle(n),r),!0}return!1}_updateStyleComponents(e,o){const n=this._map;let t=!1;return n.isStyleLoaded()&&("light"in e&&n.setLight&&!u.deepEqual(e.light,o.light)&&(t=!0,n.setLight(e.light)),"fog"in e&&n.setFog&&!u.deepEqual(e.fog,o.fog)&&(t=!0,n.setFog(e.fog)),"terrain"in e&&n.setTerrain&&!u.deepEqual(e.terrain,o.terrain)&&(!e.terrain||n.getSource(e.terrain.source))&&(t=!0,n.setTerrain(e.terrain))),t}_updateHandlers(e,o){var n,t;const r=this._map;let s=!1;for(const i of S){const c=(n=e[i])!==null&&n!==void 0?n:!0,h=(t=o[i])!==null&&t!==void 0?t:!0;u.deepEqual(c,h)||(s=!0,c?r[i].enable(c):r[i].disable())}return s}_queryRenderedFeatures(e){const o=this._map,n=o.transform,{interactiveLayerIds:t=[]}=this.props;try{return o.transform=this._renderTransform,o.queryRenderedFeatures(e,{layers:t.filter(o.getLayer.bind(o))})}catch{return[]}finally{o.transform=n}}_updateHover(e){var o;const{props:n}=this;if(n.interactiveLayerIds&&(n.onMouseMove||n.onMouseEnter||n.onMouseLeave)){const r=e.type,s=((o=this._hoveredFeatures)===null||o===void 0?void 0:o.length)>0,i=this._queryRenderedFeatures(e.point),c=i.length>0;!c&&s&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=i,c&&!s&&(e.type="mouseenter",this._onPointerEvent(e)),e.type=r}else this._hoveredFeatures=null}_fireEvent(e,o,n){const t=this._map,r=t.transform,s=typeof o=="string"?o:o.type;return s==="move"&&this._updateViewState(this.props,!1),s in f&&(typeof o=="object"&&(o.viewState=d.transformToViewState(r)),this._map.isMoving())?(t.transform=this._renderTransform,e.call(t,o,n),t.transform=r,t):(e.call(t,o,n),t)}_onBeforeRepaint(){const e=this._map;this._internalUpdate=!0;for(const n in this._deferredEvents)this._deferredEvents[n]&&e.fire(n);this._internalUpdate=!1;const o=this._map.transform;e.transform=this._renderTransform,this._onAfterRepaint=()=>{d.syncProjection(this._renderTransform,o),e.transform=o}}}m.savedMaps=[];function E(){let l=null;if(typeof location<"u"){const e=/access_token=([^&\/]*)/.exec(location.search);l=e&&e[1]}try{l=l||process.env.MapboxAccessToken}catch{}try{l=l||process.env.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return l}module.exports=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs199.js.map
|
package/dist/index.cjs209.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./index.
|
|
1
|
+
"use strict";const e=require("./index.cjs237.js"),t=require("./index.cjs211.js"),r=e(t);module.exports=r;
|
|
2
2
|
//# sourceMappingURL=index.cjs209.js.map
|
package/dist/index.cjs210.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("./index.
|
|
1
|
+
"use strict";const t=require("./index.cjs238.js"),e=t("length");module.exports=e;
|
|
2
2
|
//# sourceMappingURL=index.cjs210.js.map
|
package/dist/index.cjs211.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("./index.
|
|
1
|
+
"use strict";const t=require("./index.cjs238.js"),e=t("byteLength");module.exports=e;
|
|
2
2
|
//# sourceMappingURL=index.cjs211.js.map
|
package/dist/index.cjs229.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./index.
|
|
1
|
+
"use strict";const e=require("./index.cjs237.js"),r=require("./index.cjs210.js"),t=e(r);module.exports=t;
|
|
2
2
|
//# sourceMappingURL=index.cjs229.js.map
|
package/dist/index.cjs234.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index.cjs204.js");function a(n){const i=n.clone();return i.pixelsToGLUnits=n.pixelsToGLUnits,i}function r(n,i){if(!n.getProjection)return;const e=n.getProjection(),o=i.getProjection();c.deepEqual(e,o)||i.setProjection(e)}function s(n){return{longitude:n.center.lng,latitude:n.center.lat,zoom:n.zoom,pitch:n.pitch,bearing:n.bearing,padding:n.padding}}function d(n,i){const e=i.viewState||i;let o=!1;if("longitude"in e&&"latitude"in e){const t=n.center;n.center=new t.constructor(e.longitude,e.latitude),o=o||t!==n.center}if("zoom"in e){const t=n.zoom;n.zoom=e.zoom,o=o||t!==n.zoom}if("bearing"in e){const t=n.bearing;n.bearing=e.bearing,o=o||t!==n.bearing}if("pitch"in e){const t=n.pitch;n.pitch=e.pitch,o=o||t!==n.pitch}return e.padding&&!n.isPaddingEqual(e.padding)&&(o=!0,n.padding=e.padding),o}exports.applyViewStateToTransform=d;exports.cloneTransform=a;exports.syncProjection=r;exports.transformToViewState=s;
|
|
2
2
|
//# sourceMappingURL=index.cjs234.js.map
|
package/dist/index.cjs234.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs234.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.cjs234.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/transform.js"],"sourcesContent":["import { deepEqual } from './deep-equal';\n/**\n * Make a copy of a transform\n * @param tr\n */\nexport function cloneTransform(tr) {\n const newTransform = tr.clone();\n // Work around mapbox bug - this value is not assigned in clone(), only in resize()\n newTransform.pixelsToGLUnits = tr.pixelsToGLUnits;\n return newTransform;\n}\n/**\n * Copy projection from one transform to another. This only applies to mapbox-gl transforms\n * @param src the transform to copy projection settings from\n * @param dest to transform to copy projection settings to\n */\nexport function syncProjection(src, dest) {\n if (!src.getProjection) {\n return;\n }\n const srcProjection = src.getProjection();\n const destProjection = dest.getProjection();\n if (!deepEqual(srcProjection, destProjection)) {\n dest.setProjection(srcProjection);\n }\n}\n/**\n * Capture a transform's current state\n * @param transform\n * @returns descriptor of the view state\n */\nexport function transformToViewState(tr) {\n return {\n longitude: tr.center.lng,\n latitude: tr.center.lat,\n zoom: tr.zoom,\n pitch: tr.pitch,\n bearing: tr.bearing,\n padding: tr.padding\n };\n}\n/* eslint-disable complexity */\n/**\n * Mutate a transform to match the given view state\n * @param transform\n * @param viewState\n * @returns true if the transform has changed\n */\nexport function applyViewStateToTransform(tr, props) {\n const v = props.viewState || props;\n let changed = false;\n if ('longitude' in v && 'latitude' in v) {\n const center = tr.center;\n // @ts-ignore\n tr.center = new center.constructor(v.longitude, v.latitude);\n changed = changed || center !== tr.center;\n }\n if ('zoom' in v) {\n const zoom = tr.zoom;\n tr.zoom = v.zoom;\n changed = changed || zoom !== tr.zoom;\n }\n if ('bearing' in v) {\n const bearing = tr.bearing;\n tr.bearing = v.bearing;\n changed = changed || bearing !== tr.bearing;\n }\n if ('pitch' in v) {\n const pitch = tr.pitch;\n tr.pitch = v.pitch;\n changed = changed || pitch !== tr.pitch;\n }\n if (v.padding && !tr.isPaddingEqual(v.padding)) {\n changed = true;\n tr.padding = v.padding;\n }\n return changed;\n}\n//# sourceMappingURL=transform.js.map"],"names":["cloneTransform","tr","newTransform","syncProjection","src","dest","srcProjection","destProjection","deepEqual","transformToViewState","applyViewStateToTransform","props","v","changed","center","zoom","bearing","pitch"],"mappings":"qHAKO,SAASA,EAAeC,EAAI,CACzB,MAAAC,EAAeD,EAAG,QAExB,OAAAC,EAAa,gBAAkBD,EAAG,gBAC3BC,CACX,CAMgB,SAAAC,EAAeC,EAAKC,EAAM,CAClC,GAAA,CAACD,EAAI,cACL,OAEE,MAAAE,EAAgBF,EAAI,gBACpBG,EAAiBF,EAAK,gBACvBG,EAAA,UAAUF,EAAeC,CAAc,GACxCF,EAAK,cAAcC,CAAa,CAExC,CAMO,SAASG,EAAqBR,EAAI,CAC9B,MAAA,CACH,UAAWA,EAAG,OAAO,IACrB,SAAUA,EAAG,OAAO,IACpB,KAAMA,EAAG,KACT,MAAOA,EAAG,MACV,QAASA,EAAG,QACZ,QAASA,EAAG,OAAA,CAEpB,CAQgB,SAAAS,EAA0BT,EAAIU,EAAO,CAC3C,MAAAC,EAAID,EAAM,WAAaA,EAC7B,IAAIE,EAAU,GACV,GAAA,cAAeD,GAAK,aAAcA,EAAG,CACrC,MAAME,EAASb,EAAG,OAElBA,EAAG,OAAS,IAAIa,EAAO,YAAYF,EAAE,UAAWA,EAAE,QAAQ,EAChDC,EAAAA,GAAWC,IAAWb,EAAG,MACvC,CACA,GAAI,SAAUW,EAAG,CACb,MAAMG,EAAOd,EAAG,KAChBA,EAAG,KAAOW,EAAE,KACFC,EAAAA,GAAWE,IAASd,EAAG,IACrC,CACA,GAAI,YAAaW,EAAG,CAChB,MAAMI,EAAUf,EAAG,QACnBA,EAAG,QAAUW,EAAE,QACLC,EAAAA,GAAWG,IAAYf,EAAG,OACxC,CACA,GAAI,UAAWW,EAAG,CACd,MAAMK,EAAQhB,EAAG,MACjBA,EAAG,MAAQW,EAAE,MACHC,EAAAA,GAAWI,IAAUhB,EAAG,KACtC,CACA,OAAIW,EAAE,SAAW,CAACX,EAAG,eAAeW,EAAE,OAAO,IAC/BC,EAAA,GACVZ,EAAG,QAAUW,EAAE,SAEZC,CACX","x_google_ignoreList":[0]}
|
package/dist/index.cjs235.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function c(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const r of e.layers)t[r.id]=r;const f=e.layers.map(r=>{let n=null;"interactive"in r&&(n=Object.assign({},r),delete n.interactive);const o=t[r.ref];if(o){n=n||Object.assign({},r),delete n.ref;for(const i of a)i in o&&(n[i]=o[i])}return n||r});return{...e,layers:f}}exports.normalizeStyle=c;
|
|
2
2
|
//# sourceMappingURL=index.cjs235.js.map
|
package/dist/index.cjs235.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs235.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.cjs235.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"names":["refProps","normalizeStyle","style","layerIndex","layer","layers","normalizedLayer","layerRef","propName"],"mappings":"gFAAA,MAAMA,EAAW,CAAC,OAAQ,SAAU,eAAgB,UAAW,UAAW,SAAU,QAAQ,EAIrF,SAASC,EAAeC,EAAO,CAClC,GAAI,CAACA,EACM,OAAA,KAQP,GANA,OAAOA,GAAU,WAGjB,SAAUA,IACVA,EAAQA,EAAM,QAEd,CAACA,EAAM,QACA,OAAAA,EAEX,MAAMC,EAAa,CAAA,EACR,UAAAC,KAASF,EAAM,OACXC,EAAAC,EAAM,EAAE,EAAIA,EAE3B,MAAMC,EAASH,EAAM,OAAO,IAAaE,GAAA,CACrC,IAAIE,EAAkB,KAClB,gBAAiBF,IACjBE,EAAkB,OAAO,OAAO,CAAC,EAAGF,CAAK,EAGzC,OAAOE,EAAgB,aAIrB,MAAAC,EAAWJ,EAAWC,EAAM,GAAG,EACrC,GAAIG,EAAU,CACVD,EAAkBA,GAAmB,OAAO,OAAO,GAAIF,CAAK,EAE5D,OAAOE,EAAgB,IAEvB,UAAWE,KAAYR,EACfQ,KAAYD,IACID,EAAAE,CAAQ,EAAID,EAASC,CAAQ,EAGzD,CACA,OAAOF,GAAmBF,CAAA,CAC7B,EAEM,MAAA,CAAE,GAAGF,EAAO,OAAAG,EACvB","x_google_ignoreList":[0]}
|
package/dist/index.cjs237.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const n=require("./index.cjs24.js");function u(r){return function(t){var e=r(t);return typeof e=="number"&&e>=0&&e<=n.MAX_ARRAY_INDEX}}module.exports=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs237.js.map
|
package/dist/index.cjs237.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs237.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.cjs237.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":"iDAGA,SAAwBA,EAAwBC,EAAiB,CAC/D,OAAO,SAASC,EAAY,CACtB,IAAAC,EAAeF,EAAgBC,CAAU,EAC7C,OAAO,OAAOC,GAAgB,UAAYA,GAAgB,GAAKA,GAAgBC,iBAAA,CAEnF","x_google_ignoreList":[0]}
|
package/dist/index.cjs238.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";function n(t){return function(r){return r==null?void 0:r[t]}}module.exports=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs238.js.map
|
package/dist/index.cjs238.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs238.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.cjs238.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"aACA,SAAwBA,EAAgBC,EAAK,CAC3C,OAAO,SAASC,EAAK,CACnB,OAAOA,GAAO,KAAO,OAASA,EAAID,CAAG,CAAA,CAEzC","x_google_ignoreList":[0]}
|
package/dist/index.cjs246.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const A=require("./index.
|
|
1
|
+
"use strict";const A=require("./index.cjs258.js");function d(h,v,f,o){this.x=h,this.z=v,this.o=f,this.e=o,this.v=!1,this.n=this.p=null}function B(h,v,f,o,n){var x=[],s=[],l,z;if(h.forEach(function(w){if(!((g=w.length-1)<=0)){var g,u=w[0],q=w[g],t;if(A(u,q)){for(n.lineStart(),l=0;l<g;++l)n.point((u=w[l])[0],u[1]);n.lineEnd();return}x.push(t=new d(u,w,null,!0)),s.push(t.o=new d(u,null,t,!1)),x.push(t=new d(q,w,null,!1)),s.push(t.o=new d(q,null,t,!0))}}),!!x.length){for(s.sort(v),P(x),P(s),l=0,z=s.length;l<z;++l)s[l].e=f=!f;for(var k=x[0],p,E;;){for(var i=k,e=!0;i.v;)if((i=i.n)===k)return;p=i.z,n.lineStart();do{if(i.v=i.o.v=!0,i.e){if(e)for(l=0,z=p.length;l<z;++l)n.point((E=p[l])[0],E[1]);else o(i.x,i.n.x,1,n);i=i.n}else{if(e)for(p=i.p.z,l=p.length-1;l>=0;--l)n.point((E=p[l])[0],E[1]);else o(i.x,i.p.x,-1,n);i=i.p}i=i.o,p=i.z,e=!e}while(!i.v);n.lineEnd()}}}function P(h){if(v=h.length){for(var v,f=0,o=h[0],n;++f<v;)o.n=n=h[f],n.p=o,o=n;o.n=n=h[0],n.p=o}}module.exports=B;
|
|
2
2
|
//# sourceMappingURL=index.cjs246.js.map
|
package/dist/index.cjs251.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("./index.cjs241.js"),Q=require("./index.cjs240.js"),e=require("./index.cjs242.js"),j=require("./index.
|
|
1
|
+
"use strict";const t=require("./index.cjs241.js"),Q=require("./index.cjs240.js"),e=require("./index.cjs242.js"),j=require("./index.cjs258.js"),T=require("./index.cjs260.js");function U(d,G){var D=e.cos(d),x=D>0,J=e.abs(D)>e.epsilon;function K(n,i,o,r){Q.circleStream(r,d,G,o,n,i)}function L(n,i){return e.cos(n)*e.cos(i)>D}function M(n){var i,o,r,C,u;return{lineStart:function(){C=r=!1,u=1},point:function(s,v){var c=[s,v],a,l=L(s,v),z=x?l?0:k(s,v):l?k(s+(s<0?e.pi:-e.pi),v):0;if(!i&&(C=r=l)&&n.lineStart(),l!==r&&(a=h(i,c),(!a||j(i,a)||j(c,a))&&(c[0]+=e.epsilon,c[1]+=e.epsilon,l=L(c[0],c[1]))),l!==r)u=0,l?(n.lineStart(),a=h(c,i),n.point(a[0],a[1])):(a=h(i,c),n.point(a[0],a[1]),n.lineEnd()),i=a;else if(J&&i&&x^l){var p;!(z&o)&&(p=h(c,i,!0))&&(u=0,x?(n.lineStart(),n.point(p[0][0],p[0][1]),n.point(p[1][0],p[1][1]),n.lineEnd()):(n.point(p[1][0],p[1][1]),n.lineEnd(),n.lineStart(),n.point(p[0][0],p[0][1])))}l&&(!i||!j(i,c))&&n.point(c[0],c[1]),i=c,r=l,o=z},lineEnd:function(){r&&n.lineEnd(),i=null},clean:function(){return u|(C&&r)<<1}}}function h(n,i,o){var r=t.cartesian(n),C=t.cartesian(i),u=[1,0,0],s=t.cartesianCross(r,C),v=t.cartesianDot(s,s),c=s[0],a=v-c*c;if(!a)return!o&&n;var l=D*v/a,z=-D*c/a,p=t.cartesianCross(u,s),S=t.cartesianScale(u,l),N=t.cartesianScale(s,z);t.cartesianAddInPlace(S,N);var I=p,B=t.cartesianDot(S,I),R=t.cartesianDot(I,I),w=B*B-R*(t.cartesianDot(S,S)-1);if(!(w<0)){var y=e.sqrt(w),f=t.cartesianScale(I,(-B-y)/R);if(t.cartesianAddInPlace(f,S),f=t.spherical(f),!o)return f;var q=n[0],P=i[0],E=n[1],A=i[1],H;P<q&&(H=q,q=P,P=H);var b=P-q,g=e.abs(b-e.pi)<e.epsilon,O=g||b<e.epsilon;if(!g&&A<E&&(H=E,E=A,A=H),O?g?E+A>0^f[1]<(e.abs(f[0]-q)<e.epsilon?E:A):E<=f[1]&&f[1]<=A:b>e.pi^(q<=f[0]&&f[0]<=P)){var F=t.cartesianScale(I,(-B+y)/R);return t.cartesianAddInPlace(F,S),[f,t.spherical(F)]}}}function k(n,i){var o=x?d:e.pi-d,r=0;return n<-o?r|=1:n>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}return T(L,M,K,x?[0,-d]:[-e.pi,d-e.pi])}module.exports=U;
|
|
2
2
|
//# sourceMappingURL=index.cjs251.js.map
|
package/dist/index.cjs254.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index.cjs256.js"),s=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index.cjs256.js"),s=require("./index.cjs259.js");function f(t,l,u){var e=l[1][0]-l[0][0],n=l[1][1]-l[0][1],a=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),a!=null&&t.clipExtent(null),b(u,t.stream(s));var i=s.result(),r=Math.min(e/(i[1][0]-i[0][0]),n/(i[1][1]-i[0][1])),c=+l[0][0]+(e-r*(i[1][0]+i[0][0]))/2,E=+l[0][1]+(n-r*(i[1][1]+i[0][1]))/2;return a!=null&&t.clipExtent(a),t.scale(r*150).translate([c,E])}function m(t,l,u){return f(t,[[0,0],l],u)}exports.fitExtent=f;exports.fitSize=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs254.js.map
|
package/dist/index.cjs258.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const s=require("./index.cjs242.js");function n(t,e){return s.abs(t[0]-e[0])<s.epsilon&&s.abs(t[1]-e[1])<s.epsilon}module.exports=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs258.js.map
|
package/dist/index.cjs258.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs258.js","sources":["../../../node_modules/d3-geo/src/
|
|
1
|
+
{"version":3,"file":"index.cjs258.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":"kDAEA,SAAAA,EAAwBC,EAAGC,EAAG,CAC5B,OAAOC,EAAAA,IAAIF,EAAE,CAAC,EAAIC,EAAE,CAAC,CAAC,EAAIE,EAAAA,SAAWD,EAAAA,IAAIF,EAAE,CAAC,EAAIC,EAAE,CAAC,CAAC,EAAIE,SAC1D","x_google_ignoreList":[0]}
|
package/dist/index.cjs259.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("./index.cjs257.js");var t=1/0,e=t,i=-t,u=i,f={point:s,lineStart:r,lineEnd:r,polygonStart:r,polygonEnd:r,result:function(){var n=[[t,e],[i,u]];return i=u=-(e=t=1/0),n}};function s(n,o){n<t&&(t=n),n>i&&(i=n),o<e&&(e=o),o>u&&(u=o)}module.exports=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs259.js.map
|
package/dist/index.cjs259.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs259.js","sources":["../../../node_modules/d3-geo/src/
|
|
1
|
+
{"version":3,"file":"index.cjs259.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":"kDAEA,IAAIA,EAAK,IACLC,EAAKD,EACLE,EAAK,CAACF,EACNG,EAAKD,EAELE,EAAe,CACjB,MAAOC,EACP,UAAWC,EACX,QAASA,EACT,aAAcA,EACd,WAAYA,EACZ,OAAQ,UAAW,CACb,IAAAC,EAAS,CAAC,CAACP,EAAIC,CAAE,EAAG,CAACC,EAAIC,CAAE,CAAC,EAC3B,OAAAD,EAAAC,EAAK,EAAEF,EAAKD,EAAK,KACfO,CACT,CACF,EAEA,SAASF,EAAYG,EAAGC,EAAG,CACrBD,EAAIR,IAASA,EAAAQ,GACbA,EAAIN,IAASA,EAAAM,GACbC,EAAIR,IAASA,EAAAQ,GACbA,EAAIN,IAASA,EAAAM,EACnB","x_google_ignoreList":[0]}
|
package/dist/index.cjs63.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.cjs77.js"),R=require("react");var p;function a(){if(p)return t.__exports;p=1;/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
package/dist/index.cjs64.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("./index.cjs78.js"),tr=require("react");var he;function ar(){if(he)return R.__exports;he=1;/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
package/dist/index.cjs77.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
|
2
2
|
//# sourceMappingURL=index.cjs77.js.map
|
package/dist/index.cjs77.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs77.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.cjs77.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.cjs78.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
|
2
2
|
//# sourceMappingURL=index.cjs78.js.map
|
package/dist/index.cjs78.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs78.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.cjs78.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.cjs79.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./index.cjs206.js");function u(o,i){for(var n=0;n<i.length;n++){const e=i[n];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in o)){const s=Object.getOwnPropertyDescriptor(e,t);s&&Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var a=r.__exports.printMsg=function(){console.log("This is a message from the demo package")};const c=u({__proto__:null,default:r.__exports,printMsg:a},[r.__exports]);exports.default=r.__exports;exports.index=c;exports.printMsg=a;
|
|
2
2
|
//# sourceMappingURL=index.cjs79.js.map
|
package/dist/index.cjs79.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs79.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.cjs79.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":"ueAAA,IAAAA,EAAAC,EAAAA,UAAA,SAAmB,UAAW,CAC1B,QAAQ,IAAI,yCAAyC,CACvD","x_google_ignoreList":[0]}
|
package/dist/index.cjs80.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const u=require("react"),m=require("./index.cjs68.js"),L=require("./index.cjs205.js"),s=require("./index.cjs204.js");function q(t,e,a,o){if(L(a.id===o.id,"layer id changed"),L(a.type===o.type,"layer type changed"),a.type==="custom"||o.type==="custom")return;const{layout:r={},paint:i={},filter:y,minzoom:f,maxzoom:l,beforeId:d}=a;if(d!==o.beforeId&&t.moveLayer(e,d),r!==o.layout){const c=o.layout||{};for(const n in r)s.deepEqual(r[n],c[n])||t.setLayoutProperty(e,n,r[n]);for(const n in c)r.hasOwnProperty(n)||t.setLayoutProperty(e,n,void 0)}if(i!==o.paint){const c=o.paint||{};for(const n in i)s.deepEqual(i[n],c[n])||t.setPaintProperty(e,n,i[n]);for(const n in c)i.hasOwnProperty(n)||t.setPaintProperty(e,n,void 0)}s.deepEqual(y,o.filter)||t.setFilter(e,y),(f!==o.minzoom||l!==o.maxzoom)&&t.setLayerZoomRange(e,f,l)}function g(t,e,a){if(t.style&&t.style._loaded&&(!("source"in a)||t.getSource(a.source))){const o={...a,id:e};delete o.beforeId,t.addLayer(o,a.beforeId)}}let x=0;function h(t){const e=u.useContext(m.MapContext).map.getMap(),a=u.useRef(t),[,o]=u.useState(0),r=u.useMemo(()=>t.id||`jsx-layer-${x++}`,[]);if(u.useEffect(()=>{if(e){const y=()=>o(f=>f+1);return e.on("styledata",y),y(),()=>{e.off("styledata",y),e.style&&e.style._loaded&&e.getLayer(r)&&e.removeLayer(r)}}},[e]),e&&e.style&&e.getLayer(r))try{q(e,r,t,a.current)}catch(y){console.warn(y)}else g(e,r,t);return a.current=t,null}module.exports=h;
|
|
2
2
|
//# sourceMappingURL=index.cjs80.js.map
|
package/dist/index.cjs80.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs80.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs80.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.cjs81.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";const l=require("react"),f=require("./index.cjs68.js"),d=require("./index.cjs205.js"),y=require("./index.cjs204.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.cjs81.js.map
|
package/dist/index.cjs81.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs81.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs81.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.es14.js
CHANGED
package/dist/index.es15.js
CHANGED
|
@@ -7,13 +7,13 @@ import "./index.es72.js";
|
|
|
7
7
|
import "./index.es73.js";
|
|
8
8
|
import m from "./index.es74.js";
|
|
9
9
|
import "./index.es75.js";
|
|
10
|
-
import a from "./index.
|
|
11
|
-
import n from "./index.
|
|
10
|
+
import a from "./index.es80.js";
|
|
11
|
+
import n from "./index.es81.js";
|
|
12
12
|
import { useMap as e } from "./index.es76.js";
|
|
13
13
|
function C() {
|
|
14
14
|
return e();
|
|
15
15
|
}
|
|
16
|
-
const f = import("./index.
|
|
16
|
+
const f = import("./index.es79.js").then((o) => o.i), N = i.forwardRef(function(r, t) {
|
|
17
17
|
return p(r, t, f);
|
|
18
18
|
}), R = m, S = a, b = n;
|
|
19
19
|
export {
|
package/dist/index.es19.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { commonjsGlobal as nd, getDefaultExportFromCjs as od } from "./index.es60.js";
|
|
2
|
-
import { __module as lu } from "./index.
|
|
2
|
+
import { __module as lu } from "./index.es61.js";
|
|
3
3
|
function ld(an, vl) {
|
|
4
4
|
for (var Ur = 0; Ur < vl.length; Ur++) {
|
|
5
5
|
const cr = vl[Ur];
|
package/dist/index.es199.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { syncProjection as f, cloneTransform as T, applyViewStateToTransform as p, transformToViewState as _ } from "./index.
|
|
2
|
-
import { normalizeStyle as v } from "./index.
|
|
1
|
+
import { syncProjection as f, cloneTransform as T, applyViewStateToTransform as p, transformToViewState as _ } from "./index.es234.js";
|
|
2
|
+
import { normalizeStyle as v } from "./index.es235.js";
|
|
3
3
|
import { deepEqual as h } from "./index.es204.js";
|
|
4
4
|
const g = { version: 8, sources: {}, layers: [] }, y = {
|
|
5
5
|
mousedown: "onMouseDown",
|
package/dist/index.es209.js
CHANGED
package/dist/index.es210.js
CHANGED
package/dist/index.es211.js
CHANGED
package/dist/index.es229.js
CHANGED
package/dist/index.es234.js
CHANGED
|
@@ -1,11 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { deepEqual as c } from "./index.es204.js";
|
|
2
|
+
function g(n) {
|
|
3
|
+
const o = n.clone();
|
|
4
|
+
return o.pixelsToGLUnits = n.pixelsToGLUnits, o;
|
|
5
|
+
}
|
|
6
|
+
function r(n, o) {
|
|
7
|
+
if (!n.getProjection)
|
|
8
|
+
return;
|
|
9
|
+
const i = n.getProjection(), e = o.getProjection();
|
|
10
|
+
c(i, e) || o.setProjection(i);
|
|
11
|
+
}
|
|
12
|
+
function d(n) {
|
|
13
|
+
return {
|
|
14
|
+
longitude: n.center.lng,
|
|
15
|
+
latitude: n.center.lat,
|
|
16
|
+
zoom: n.zoom,
|
|
17
|
+
pitch: n.pitch,
|
|
18
|
+
bearing: n.bearing,
|
|
19
|
+
padding: n.padding
|
|
6
20
|
};
|
|
7
21
|
}
|
|
22
|
+
function s(n, o) {
|
|
23
|
+
const i = o.viewState || o;
|
|
24
|
+
let e = !1;
|
|
25
|
+
if ("longitude" in i && "latitude" in i) {
|
|
26
|
+
const t = n.center;
|
|
27
|
+
n.center = new t.constructor(i.longitude, i.latitude), e = e || t !== n.center;
|
|
28
|
+
}
|
|
29
|
+
if ("zoom" in i) {
|
|
30
|
+
const t = n.zoom;
|
|
31
|
+
n.zoom = i.zoom, e = e || t !== n.zoom;
|
|
32
|
+
}
|
|
33
|
+
if ("bearing" in i) {
|
|
34
|
+
const t = n.bearing;
|
|
35
|
+
n.bearing = i.bearing, e = e || t !== n.bearing;
|
|
36
|
+
}
|
|
37
|
+
if ("pitch" in i) {
|
|
38
|
+
const t = n.pitch;
|
|
39
|
+
n.pitch = i.pitch, e = e || t !== n.pitch;
|
|
40
|
+
}
|
|
41
|
+
return i.padding && !n.isPaddingEqual(i.padding) && (e = !0, n.padding = i.padding), e;
|
|
42
|
+
}
|
|
8
43
|
export {
|
|
9
|
-
|
|
44
|
+
s as applyViewStateToTransform,
|
|
45
|
+
g as cloneTransform,
|
|
46
|
+
r as syncProjection,
|
|
47
|
+
d as transformToViewState
|
|
10
48
|
};
|
|
11
49
|
//# sourceMappingURL=index.es234.js.map
|
package/dist/index.es234.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es234.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es234.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/transform.js"],"sourcesContent":["import { deepEqual } from './deep-equal';\n/**\n * Make a copy of a transform\n * @param tr\n */\nexport function cloneTransform(tr) {\n const newTransform = tr.clone();\n // Work around mapbox bug - this value is not assigned in clone(), only in resize()\n newTransform.pixelsToGLUnits = tr.pixelsToGLUnits;\n return newTransform;\n}\n/**\n * Copy projection from one transform to another. This only applies to mapbox-gl transforms\n * @param src the transform to copy projection settings from\n * @param dest to transform to copy projection settings to\n */\nexport function syncProjection(src, dest) {\n if (!src.getProjection) {\n return;\n }\n const srcProjection = src.getProjection();\n const destProjection = dest.getProjection();\n if (!deepEqual(srcProjection, destProjection)) {\n dest.setProjection(srcProjection);\n }\n}\n/**\n * Capture a transform's current state\n * @param transform\n * @returns descriptor of the view state\n */\nexport function transformToViewState(tr) {\n return {\n longitude: tr.center.lng,\n latitude: tr.center.lat,\n zoom: tr.zoom,\n pitch: tr.pitch,\n bearing: tr.bearing,\n padding: tr.padding\n };\n}\n/* eslint-disable complexity */\n/**\n * Mutate a transform to match the given view state\n * @param transform\n * @param viewState\n * @returns true if the transform has changed\n */\nexport function applyViewStateToTransform(tr, props) {\n const v = props.viewState || props;\n let changed = false;\n if ('longitude' in v && 'latitude' in v) {\n const center = tr.center;\n // @ts-ignore\n tr.center = new center.constructor(v.longitude, v.latitude);\n changed = changed || center !== tr.center;\n }\n if ('zoom' in v) {\n const zoom = tr.zoom;\n tr.zoom = v.zoom;\n changed = changed || zoom !== tr.zoom;\n }\n if ('bearing' in v) {\n const bearing = tr.bearing;\n tr.bearing = v.bearing;\n changed = changed || bearing !== tr.bearing;\n }\n if ('pitch' in v) {\n const pitch = tr.pitch;\n tr.pitch = v.pitch;\n changed = changed || pitch !== tr.pitch;\n }\n if (v.padding && !tr.isPaddingEqual(v.padding)) {\n changed = true;\n tr.padding = v.padding;\n }\n return changed;\n}\n//# sourceMappingURL=transform.js.map"],"names":["cloneTransform","tr","newTransform","syncProjection","src","dest","srcProjection","destProjection","deepEqual","transformToViewState","applyViewStateToTransform","props","v","changed","center","zoom","bearing","pitch"],"mappings":";AAKO,SAASA,EAAeC,GAAI;AACzB,QAAAC,IAAeD,EAAG;AAExB,SAAAC,EAAa,kBAAkBD,EAAG,iBAC3BC;AACX;AAMgB,SAAAC,EAAeC,GAAKC,GAAM;AAClC,MAAA,CAACD,EAAI;AACL;AAEE,QAAAE,IAAgBF,EAAI,iBACpBG,IAAiBF,EAAK;AAC5B,EAAKG,EAAUF,GAAeC,CAAc,KACxCF,EAAK,cAAcC,CAAa;AAExC;AAMO,SAASG,EAAqBR,GAAI;AAC9B,SAAA;AAAA,IACH,WAAWA,EAAG,OAAO;AAAA,IACrB,UAAUA,EAAG,OAAO;AAAA,IACpB,MAAMA,EAAG;AAAA,IACT,OAAOA,EAAG;AAAA,IACV,SAASA,EAAG;AAAA,IACZ,SAASA,EAAG;AAAA,EAAA;AAEpB;AAQgB,SAAAS,EAA0BT,GAAIU,GAAO;AAC3C,QAAAC,IAAID,EAAM,aAAaA;AAC7B,MAAIE,IAAU;AACV,MAAA,eAAeD,KAAK,cAAcA,GAAG;AACrC,UAAME,IAASb,EAAG;AAElB,IAAAA,EAAG,SAAS,IAAIa,EAAO,YAAYF,EAAE,WAAWA,EAAE,QAAQ,GAChDC,IAAAA,KAAWC,MAAWb,EAAG;AAAA,EACvC;AACA,MAAI,UAAUW,GAAG;AACb,UAAMG,IAAOd,EAAG;AAChB,IAAAA,EAAG,OAAOW,EAAE,MACFC,IAAAA,KAAWE,MAASd,EAAG;AAAA,EACrC;AACA,MAAI,aAAaW,GAAG;AAChB,UAAMI,IAAUf,EAAG;AACnB,IAAAA,EAAG,UAAUW,EAAE,SACLC,IAAAA,KAAWG,MAAYf,EAAG;AAAA,EACxC;AACA,MAAI,WAAWW,GAAG;AACd,UAAMK,IAAQhB,EAAG;AACjB,IAAAA,EAAG,QAAQW,EAAE,OACHC,IAAAA,KAAWI,MAAUhB,EAAG;AAAA,EACtC;AACA,SAAIW,EAAE,WAAW,CAACX,EAAG,eAAeW,EAAE,OAAO,MAC/BC,IAAA,IACVZ,EAAG,UAAUW,EAAE,UAEZC;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es235.js
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const a = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
|
|
2
|
+
function c(r) {
|
|
3
|
+
if (!r)
|
|
4
|
+
return null;
|
|
5
|
+
if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
|
|
6
|
+
return r;
|
|
7
|
+
const t = {};
|
|
8
|
+
for (const e of r.layers)
|
|
9
|
+
t[e.id] = e;
|
|
10
|
+
const f = r.layers.map((e) => {
|
|
11
|
+
let n = null;
|
|
12
|
+
"interactive" in e && (n = Object.assign({}, e), delete n.interactive);
|
|
13
|
+
const o = t[e.ref];
|
|
14
|
+
if (o) {
|
|
15
|
+
n = n || Object.assign({}, e), delete n.ref;
|
|
16
|
+
for (const i of a)
|
|
17
|
+
i in o && (n[i] = o[i]);
|
|
18
|
+
}
|
|
19
|
+
return n || e;
|
|
20
|
+
});
|
|
21
|
+
return { ...r, layers: f };
|
|
5
22
|
}
|
|
6
23
|
export {
|
|
7
|
-
|
|
24
|
+
c as normalizeStyle
|
|
8
25
|
};
|
|
9
26
|
//# sourceMappingURL=index.es235.js.map
|
package/dist/index.es235.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es235.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es235.js","sources":["../../../node_modules/react-map-gl/dist/esm/utils/style-utils.js"],"sourcesContent":["const refProps = ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n// Prepare a map style object for diffing\n// If immutable - convert to plain object\n// Work around some issues in older styles that would fail Mapbox's diffing\nexport function normalizeStyle(style) {\n if (!style) {\n return null;\n }\n if (typeof style === 'string') {\n return style;\n }\n if ('toJS' in style) {\n style = style.toJS();\n }\n if (!style.layers) {\n return style;\n }\n const layerIndex = {};\n for (const layer of style.layers) {\n layerIndex[layer.id] = layer;\n }\n const layers = style.layers.map(layer => {\n let normalizedLayer = null;\n if ('interactive' in layer) {\n normalizedLayer = Object.assign({}, layer);\n // Breaks style diffing :(\n // @ts-ignore legacy field not typed\n delete normalizedLayer.interactive;\n }\n // Style diffing doesn't work with refs so expand them out manually before diffing.\n // @ts-ignore legacy field not typed\n const layerRef = layerIndex[layer.ref];\n if (layerRef) {\n normalizedLayer = normalizedLayer || Object.assign({}, layer);\n // @ts-ignore\n delete normalizedLayer.ref;\n // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/deref.js\n for (const propName of refProps) {\n if (propName in layerRef) {\n normalizedLayer[propName] = layerRef[propName];\n }\n }\n }\n return normalizedLayer || layer;\n });\n // Do not mutate the style object provided by the user\n return { ...style, layers };\n}\n//# sourceMappingURL=style-utils.js.map"],"names":["refProps","normalizeStyle","style","layerIndex","layer","layers","normalizedLayer","layerRef","propName"],"mappings":"AAAA,MAAMA,IAAW,CAAC,QAAQ,UAAU,gBAAgB,WAAW,WAAW,UAAU,QAAQ;AAIrF,SAASC,EAAeC,GAAO;AAClC,MAAI,CAACA;AACM,WAAA;AAQP,MANA,OAAOA,KAAU,aAGjB,UAAUA,MACVA,IAAQA,EAAM,SAEd,CAACA,EAAM;AACA,WAAAA;AAEX,QAAMC,IAAa,CAAA;AACR,aAAAC,KAASF,EAAM;AACX,IAAAC,EAAAC,EAAM,EAAE,IAAIA;AAE3B,QAAMC,IAASH,EAAM,OAAO,IAAI,CAASE,MAAA;AACrC,QAAIE,IAAkB;AACtB,IAAI,iBAAiBF,MACjBE,IAAkB,OAAO,OAAO,CAAC,GAAGF,CAAK,GAGzC,OAAOE,EAAgB;AAIrB,UAAAC,IAAWJ,EAAWC,EAAM,GAAG;AACrC,QAAIG,GAAU;AACV,MAAAD,IAAkBA,KAAmB,OAAO,OAAO,IAAIF,CAAK,GAE5D,OAAOE,EAAgB;AAEvB,iBAAWE,KAAYR;AACnB,QAAIQ,KAAYD,MACID,EAAAE,CAAQ,IAAID,EAASC,CAAQ;AAAA,IAGzD;AACA,WAAOF,KAAmBF;AAAA,EAAA,CAC7B;AAEM,SAAA,EAAE,GAAGF,GAAO,QAAAG;AACvB;","x_google_ignoreList":[0]}
|