New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@globalfishingwatch/layer-composer

Package Overview
Dependencies
Maintainers
2
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@globalfishingwatch/layer-composer - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

dist/index-db1fdf9a.js

2

dist/generators/index.js

@@ -1,2 +0,2 @@

import"../_tslib-c4bf2322.js";export{D as DEFAULT_BASEMAP_COLOR,a as HEATMAP_COLOR_RAMPS,H as HEATMAP_GEOM_TYPES,G as default}from"../index-f639cb33.js";import"../types/index.js";
import"../_tslib-c4bf2322.js";export{D as DEFAULT_BASEMAP_COLOR,a as HEATMAP_COLOR_RAMPS,H as HEATMAP_GEOM_TYPES,G as default}from"../index-db1fdf9a.js";import"../types/index.js";
//# sourceMappingURL=index.js.map

@@ -138,2 +138,3 @@ import { FeatureCollection } from 'geojson';

debug?: boolean;
colorRamp?: ColorRamps;
}

@@ -140,0 +141,0 @@ export declare type AnyGeneratorConfig = BackgroundGeneratorConfig | BasemapGeneratorConfig | GlGeneratorConfig | CartoPolygonsGeneratorConfig | TrackGeneratorConfig | VesselEventsGeneratorConfig | RulersGeneratorConfig | HeatmapGeneratorConfig | HeatmapAnimatedGeneratorConfig;

@@ -1,2 +0,2 @@

import{_ as e,a as r}from"./_tslib-c4bf2322.js";import{f as o,l as n,G as i}from"./index-f639cb33.js";export{t as Generators}from"./index-f639cb33.js";import"./types/index.js";export{c as convertLegacyGroups,s as sort}from"./sort-219c5279.js";var a={version:8,glyphs:"https://raw.githubusercontent.com/GlobalFishingWatch/map-gl-glyphs/master/_output/{fontstack}/{range}.pbf?raw=true",sprite:"https://raw.githubusercontent.com/GlobalFishingWatch/map-gl-sprites/master/out/sprites"},l=function(){function t(t){var s=this;this._getGeneratorSources=function(e){return Object.fromEntries(e.filter((function(e){return e.sources&&e.sources.length})).map((function(e){return[e.id,e.sources]})))},this._getGeneratorLayers=function(e){return Object.fromEntries(e.filter((function(e){return e.layers&&e.layers.length})).map((function(e){return[e.id,e.layers]})))},this._applyGenericStyle=function(t,r){var s=e({},r);return s.layers=s.layers.map((function(r){var s=e({},r);if(s.layout||(s.layout={}),s.paint||(s.paint={}),void 0!==t.visible&&null!==t.visible&&(s.layout.visibility=!0===t.visible?"visible":"none"),void 0!==t.opacity&&null!==t.opacity&&"symbol"!==s.type){var o=s.type+"-opacity",n=s.paint[o]||1;s.paint[o]=n*t.opacity}return s})),s},this._getGlobalConfig=function(t){if(!t)return{};var r=e({},t);return r.zoom&&(r.zoomLoadLevel=Math.floor(r.zoom)),r},this._getGeneratorStyles=function(t,r){if(!s.generators[t.type])throw new Error("There is no generator loaded for the config: "+t.type+"}");var o=e(e({},s._getGlobalConfig(r)),t),n=s.generators[o.type];return s._applyGenericStyle(o,n.getStyle(o))},this.getGLStyle=function(e,t){if(!e)return console.warn("No layers passed to layer manager"),{style:s._getStyleJson()};var o=[],n=e.map((function(e){var n=s._getGeneratorStyles(e,t),i=n.promise,a=n.promises,l=r(n,["promise","promises"]),u=[];return i?u=[i]:a&&(u=a),o=o.concat(u),l})),i=s._getGeneratorSources(n),a=s._getGeneratorLayers(n);s.latestGenerated={sourcesStyle:i,layersStyle:a};var l=o.map((function(e){return e.then((function(e){var t=e.id,r=e.sources,o=e.layers,n=s.latestGenerated,i=n.sourcesStyle,a=n.layersStyle;return i[t]=r,a[t]=o,{style:s._getStyleJson(i,a),layer:e}})).catch((function(e){return console.warn(e),{style:s._getStyleJson(i,a)}}))}));return{style:s._getStyleJson(i,a),promises:l}},this.version=t&&t.version||a.version,this.glyphs=t&&t.glyphs||a.glyphs,this.sprite=t&&t.sprite||a.sprite,this.generators=t&&t.generators||i,this.latestGenerated={sourcesStyle:{},layersStyle:{}}}return t.prototype._getStyleJson=function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),{version:this.version,glyphs:this.glyphs,sprite:this.sprite,sources:o(e),layers:n(t)}},t}();export default l;export{a as DEFAULT_CONFIG};
import{_ as e,a as r}from"./_tslib-c4bf2322.js";import{f as o,l as n,G as i}from"./index-db1fdf9a.js";export{t as Generators}from"./index-db1fdf9a.js";import"./types/index.js";export{c as convertLegacyGroups,s as sort}from"./sort-219c5279.js";var a={version:8,glyphs:"https://raw.githubusercontent.com/GlobalFishingWatch/map-gl-glyphs/master/_output/{fontstack}/{range}.pbf?raw=true",sprite:"https://raw.githubusercontent.com/GlobalFishingWatch/map-gl-sprites/master/out/sprites"},l=function(){function t(t){var s=this;this._getGeneratorSources=function(e){return Object.fromEntries(e.filter((function(e){return e.sources&&e.sources.length})).map((function(e){return[e.id,e.sources]})))},this._getGeneratorLayers=function(e){return Object.fromEntries(e.filter((function(e){return e.layers&&e.layers.length})).map((function(e){return[e.id,e.layers]})))},this._applyGenericStyle=function(t,r){var s=e({},r);return s.layers=s.layers.map((function(r){var s=e({},r);if(s.layout||(s.layout={}),s.paint||(s.paint={}),void 0!==t.visible&&null!==t.visible&&(s.layout.visibility=!0===t.visible?"visible":"none"),void 0!==t.opacity&&null!==t.opacity&&"symbol"!==s.type){var o=s.type+"-opacity",n=s.paint[o]||1;s.paint[o]=n*t.opacity}return s})),s},this._getGlobalConfig=function(t){if(!t)return{};var r=e({},t);return r.zoom&&(r.zoomLoadLevel=Math.floor(r.zoom)),r},this._getGeneratorStyles=function(t,r){if(!s.generators[t.type])throw new Error("There is no generator loaded for the config: "+t.type+"}");var o=e(e({},s._getGlobalConfig(r)),t),n=s.generators[o.type];return s._applyGenericStyle(o,n.getStyle(o))},this.getGLStyle=function(e,t){if(!e)return console.warn("No layers passed to layer manager"),{style:s._getStyleJson()};var o=[],n=e.map((function(e){var n=s._getGeneratorStyles(e,t),i=n.promise,a=n.promises,l=r(n,["promise","promises"]),u=[];return i?u=[i]:a&&(u=a),o=o.concat(u),l})),i=s._getGeneratorSources(n),a=s._getGeneratorLayers(n);s.latestGenerated={sourcesStyle:i,layersStyle:a};var l=o.map((function(e){return e.then((function(e){var t=e.id,r=e.sources,o=e.layers,n=s.latestGenerated,i=n.sourcesStyle,a=n.layersStyle;return i[t]=r,a[t]=o,{style:s._getStyleJson(i,a),layer:e}})).catch((function(e){return console.warn(e),{style:s._getStyleJson(i,a)}}))}));return{style:s._getStyleJson(i,a),promises:l}},this.version=t&&t.version||a.version,this.glyphs=t&&t.glyphs||a.glyphs,this.sprite=t&&t.sprite||a.sprite,this.generators=t&&t.generators||i,this.latestGenerated={sourcesStyle:{},layersStyle:{}}}return t.prototype._getStyleJson=function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),{version:this.version,glyphs:this.glyphs,sprite:this.sprite,sources:o(e),layers:n(t)}},t}();export default l;export{a as DEFAULT_CONFIG};
//# sourceMappingURL=index.js.map
{
"name": "@globalfishingwatch/layer-composer",
"version": "2.4.1",
"version": "2.4.2",
"description": "",

@@ -5,0 +5,0 @@ "author": "satellitestudio <contact@satellitestud.io>",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc