{"_id":"leaflet-defaulticon-compatibility","_rev":"3-986134b7c62c2ec8507ed4a6354a4b0d","name":"leaflet-defaulticon-compatibility","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"leaflet-defaulticon-compatibility","version":"0.1.0","description":"Retrieve all Leaflet Default Icon options from CSS, in particular all icon images URL's, to improve compatibility with bundlers and frameworks that modify URL's in CSS.","main":"dist/leaflet-defaulticon-compatibility.js","module":"src/Icon.Default.compatibility.js","jsnext:main":"src/Icon.Default.compatibility.js","style":"dist/leaflet-defaulticon-compatibility.css","files":["dist/**/*"],"scripts":{"build":"rollup -c","test":"echo \"Error: no test specified\" && exit 1","webpack":"cd webpack-demo && npm run webpack"},"repository":{"type":"git","url":"git+https://github.com/ghybs/leaflet-defaulticon-compatibility.git"},"keywords":["leaflet","plugin","icon","compatibility"],"author":{"name":"Boris Seang"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/ghybs/leaflet-defaulticon-compatibility/issues"},"homepage":"https://github.com/ghybs/leaflet-defaulticon-compatibility#readme","devDependencies":{"rollup":"^0.60.7","rollup-plugin-copy":"^0.2.3","rollup-plugin-uglify":"^4.0.0"},"gitHead":"15853dcdb4ae78d7894bdb6a826088952fd3435f","_id":"leaflet-defaulticon-compatibility@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"ghybs","email":"ghybsy@gmail.com"},"dist":{"integrity":"sha512-2N9SEfRha6uDGOaJl5y+bM/yEQorG/dhunmcCP46oXPH6jcvatbbMNb+la/fSop3ccM0FUWrZtIBgdvWWvNQbQ==","shasum":"ae18f2cd9577cf46553c3e75364a024e4bb04178","tarball":"https://registry.npmjs.org/leaflet-defaulticon-compatibility/-/leaflet-defaulticon-compatibility-0.1.0.tgz","fileCount":12,"unpackedSize":22680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKOLXCRA9TVsSAnZWagAAtkUQAIW1RPEz5q6m9pPqmtlg\n5IFulv0aga1Aywglyvrx35Qf+nEgBXtm8nHW6mVKmdn25bWMJpBihp+s2FM1\nqDyuaLSKbrPLobDedqEjtrhkEzQqy/ksgwCPpfRPIbTcwc+RN0Uf+eaRrb/I\nrgy78gjX3/NRKXz+W0ulvi/4oOTX/Qc5br3qI5b31KjXbSdZGE4U9bCiVGxV\nC+hmZHvYNWXG/i34ym5kmBjl/Ka+ZjWUdEnc89bmL4jqfncD6ofvXlmpNmiJ\nJ7HOBXdST3fql+GG+F0Z1uftVkT2Ew6+U57IYIuHLrCFlk57AdkviZfjB5BM\n7iW1d2U0MaMNofhUgGeJ3XTS2qXCSBhwlo7TxMjRcTkZogM38JmWhlwdIIRW\nx9EI5wrx6gPHs9ah0oePrbVEGry32IxYYpinw94q2DHdR1D8tMzIVk9YTNV/\nRhCLAhAhmm+2Srd22O4b72nbQKUoZChHYIMIBhI4kwfa68AdALYeczFT8A7v\nj3NtLEr6x58iiVkMiAHvU9XS2b93bVwwI0GtGCczlbhkaRCbStliM8u1Q+jk\nnuFZdeRbOkLLUdDUYkNLqIeIcEA28AeAASPSDhVAquoyBx24YJZsyiNaXz2M\nvQnMw1IMGTx5M1oslsLbGW8rB140Kbqk4Lz0nyEznDbsErlfYmA5ZXGrQVxe\nUc/T\r\n=I2R0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHllIwNZgJc3bBs6g6lQWVRiizTaswFJOz1vOtqePSFrAiBlNI9NXkh2Pf6oTwggfeBF9iWeyJUAgtB5R2lKEu/VSQ=="}]},"maintainers":[{"name":"ghybs","email":"ghybsy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/leaflet-defaulticon-compatibility_0.1.0_1529406166290_0.17096473771812537"},"_hasShrinkwrap":false},"0.1.1":{"name":"leaflet-defaulticon-compatibility","version":"0.1.1","description":"Retrieve all Leaflet Default Icon options from CSS, in particular all icon images URL's, to improve compatibility with bundlers and frameworks that modify URL's in CSS.","main":"dist/leaflet-defaulticon-compatibility.js","module":"src/Icon.Default.compatibility.js","jsnext:main":"src/Icon.Default.compatibility.js","style":"dist/leaflet-defaulticon-compatibility.css","files":["dist/**/*"],"scripts":{"build":"rollup -c","test":"echo \"Error: no test specified\" && exit 1","webpack":"cd webpack-demo && npm run webpack"},"repository":{"type":"git","url":"git+https://github.com/ghybs/leaflet-defaulticon-compatibility.git"},"keywords":["leaflet","plugin","icon","compatibility"],"author":{"name":"Boris Seang"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/ghybs/leaflet-defaulticon-compatibility/issues"},"homepage":"https://github.com/ghybs/leaflet-defaulticon-compatibility#readme","devDependencies":{"rollup":"^0.60.7","rollup-plugin-copy":"^0.2.3","rollup-plugin-uglify":"^4.0.0"},"gitHead":"23ebe7654149e1b41c9904a62a6a93822896852e","_id":"leaflet-defaulticon-compatibility@0.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"ghybs","email":"ghybsy@gmail.com"},"dist":{"integrity":"sha512-vDBFdlUAwjSEGep9ih8kfJilf6yN8V9zTbF5NC/1ZwLeGko3RUQepspPnGCRMFV51dY3Lb3hziboicrFz+rxQA==","shasum":"ab72257b3da66fb48dab69a10c3824012a15a20a","tarball":"https://registry.npmjs.org/leaflet-defaulticon-compatibility/-/leaflet-defaulticon-compatibility-0.1.1.tgz","fileCount":12,"unpackedSize":22872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKQe6CRA9TVsSAnZWagAAtM0P/iVpiIGdIixrQqv6faFr\nHoRZ1kHc+YLJA5x5TYo+ALzO8ed2N7oOG0WVP6i3Cj7n31fNahPFNSvDd2XQ\n254FuEwlFxXz5YS3T6O6BsOYRTvuZ2HjV2q4QCxuHcWHTjrS4uxwROICIQhr\nb/HnW0GhSZHMTULmha1Mj+v+l6g3UcNCC4t82PbZ9Y0Hkz2LeGpxxHIKtjxx\nxWjNDlCpBhk6T3w5nWlR8XBlCeYBt3yzRVfodSxPxsZ/Sf6uteTbL14HU+x2\nNFVf7997Uu98KY3NYc1ecv9gaBAcLpTRH6+lz44yf+4Mqf1fTYqbzGsVjC8Z\nr+Ef+SK1avjl/XIWV5n+0BwYM2iB4Z4K0/wXQHFwIICghdQn9c6AtUzi75T6\n56Fty6F9f6SG7b6gqETC0YbRZbEG2R+hmmnykJ/N6cAOW6e4Ph3AjuzXejR9\nYO91D9SDAqLXTGzys7PXj4DXjinBcF8+pWQKOhZlb/ayzaUKYPtA1ulGQUNG\nAXBp5R5sxdSp7lzs9R363iFiCoUXPSJ45ncAqtZk94cgkCjG+8TCu4fILsai\n4DgyBF8MG22xqTrwqtsHMLAqetvk4pji9R8VLUYBQ2vsbTFPwsRfnwCi2iJG\nbXjZDGskTXbebYtR4BccWBjJUgWt0NqLMtb3vAel08WnT2wvUFW3dHt1mXvc\nU5xd\r\n=VhHU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAtEQLkmCr5XWB1ejkO18TXYgRVB4vfv5+uomOB0udRFAiEAvQ5CSXODgAQLZZy5NHkBO0c/eLeu/g26myjPnsIBRuo="}]},"maintainers":[{"name":"ghybs","email":"ghybsy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/leaflet-defaulticon-compatibility_0.1.1_1529415609882_0.5831127394277056"},"_hasShrinkwrap":false},"0.1.2":{"name":"leaflet-defaulticon-compatibility","version":"0.1.2","description":"Retrieve all Leaflet Default Icon options from CSS, in particular all icon images URL's, to improve compatibility with bundlers and frameworks that modify URL's in CSS.","main":"dist/leaflet-defaulticon-compatibility.js","module":"src/Icon.Default.compatibility.js","jsnext:main":"src/Icon.Default.compatibility.js","style":"dist/leaflet-defaulticon-compatibility.css","scripts":{"build":"rollup -c","test":"echo \"Error: no test specified\" && exit 1","webpack":"cd webpack-demo && npm run webpack"},"repository":{"type":"git","url":"git+https://github.com/ghybs/leaflet-defaulticon-compatibility.git"},"keywords":["leaflet","plugin","icon","compatibility"],"author":{"name":"Boris Seang"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/ghybs/leaflet-defaulticon-compatibility/issues"},"homepage":"https://github.com/ghybs/leaflet-defaulticon-compatibility#readme","devDependencies":{"rollup":"^0.60.7","rollup-plugin-copy":"^0.2.3","rollup-plugin-uglify":"^4.0.0"},"gitHead":"7795ef8ca9d1b677754676651ce94428ce854cd7","_id":"leaflet-defaulticon-compatibility@0.1.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-IrKagWxkTwzxUkFIumy/Zmo3ksjuAu3zEadtOuJcKzuXaD76Gwvg2Z1mLyx7y52ykOzM8rAH5ChBs4DnfdGa6Q==","shasum":"f5e1a5841aeab9d1682d17887348855a741b3c2a","tarball":"https://registry.npmjs.org/leaflet-defaulticon-compatibility/-/leaflet-defaulticon-compatibility-0.1.2.tgz","fileCount":13,"unpackedSize":27918,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICinw91U2ymlukUMdTr2rX1U6qWUwf1jZwMAC4on5Jt1AiBvKHPxzuy78ZHkp36Y8NAogBiby7IqWwMfz0chf8DoCA=="}]},"_npmUser":{"name":"ghybs","email":"ghybsy@gmail.com"},"directories":{},"maintainers":[{"name":"ghybs","email":"ghybsy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/leaflet-defaulticon-compatibility_0.1.2_1689526869376_0.020640494813638055"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-19T11:02:46.289Z","0.1.0":"2018-06-19T11:02:46.394Z","modified":"2023-07-16T17:01:09.786Z","0.1.1":"2018-06-19T13:40:09.982Z","0.1.2":"2023-07-16T17:01:09.641Z"},"maintainers":[{"name":"ghybs","email":"ghybsy@gmail.com"}],"description":"Retrieve all Leaflet Default Icon options from CSS, in particular all icon images URL's, to improve compatibility with bundlers and frameworks that modify URL's in CSS.","homepage":"https://github.com/ghybs/leaflet-defaulticon-compatibility#readme","keywords":["leaflet","plugin","icon","compatibility"],"repository":{"type":"git","url":"git+https://github.com/ghybs/leaflet-defaulticon-compatibility.git"},"author":{"name":"Boris Seang"},"bugs":{"url":"https://github.com/ghybs/leaflet-defaulticon-compatibility/issues"},"license":"BSD-2-Clause","readme":"# leaflet-defaulticon-compatibility\nRetrieve all Leaflet Default Icon options from CSS, in particular all icon images URL's, to improve compatibility with bundlers and frameworks that modify URL's in CSS. [Demo with webpack](https://ghybs.github.io/leaflet-defaulticon-compatibility/webpack-demo.html) (and [without this plugin](https://ghybs.github.io/leaflet-defaulticon-compatibility/webpack-demo.html?demo=no-plugin)).\n\n[![GitHub releases](https://img.shields.io/github/release/ghybs/leaflet-defaulticon-compatibility.svg?label=GitHub)](https://github.com/ghybs/leaflet-defaulticon-compatibility/releases)\n[![npm](https://img.shields.io/npm/v/leaflet-defaulticon-compatibility.svg)](https://www.npmjs.com/package/leaflet-defaulticon-compatibility)\n\nSize: < 2kB minified\n\nNote: here, \"_compatibility_\" does not refer to _browser_ compatibility, but with build engines and frameworks that modify URL's in CSS, which often conflicts with Leaflet built-in Default Icon images automatic management. See [issue Leaflet/Leaflet#4698](https://github.com/Leaflet/Leaflet/issues/4968) for more details.\n\n\n## Usage\n\n```bash\n$ npm install leaflet-defaulticon-compatibility --save\n```\n\nLoad this plugin CSS and JS files _after_ Leaflet CSS and JS. Then the Leaflet default icon should automatically work again, even if your build engine or framework modifies the URL's in CSS, typically:\n- webpack with [style-loader](https://github.com/webpack-contrib/style-loader) + [css-loader](https://github.com/webpack-contrib/css-loader) + [file-loader](https://github.com/webpack-contrib/file-loader) or [url-loader](https://github.com/webpack-contrib/url-loader)\n- Rails with [Asset Pipeline](http://guides.rubyonrails.org/asset_pipeline.html#what-is-fingerprinting-and-why-should-i-care-questionmark)\n- Django with [pipeline](https://github.com/jazzband/django-pipeline)\n\nFor example for webpack with style-loader + css-loader + file-loader:\n\n```javascript\nimport 'leaflet/dist/leaflet.css';\nimport 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.webpack.css'; // Re-uses images from ~leaflet package\nimport * as L from 'leaflet';\nimport 'leaflet-defaulticon-compatibility';\n```\n\n\n### CSS file\n\nThis plugin provides 2 similar CSS files:\n\n- `leaflet-defaulticon-compatibility.css`: use it by default.\n- `leaflet-defaulticon-compatibility.webpack.css`: alternative for webpack / bundlers that understand the `~leaflet` syntax to navigate to other packages in `node_modules`. This avoids duplicating the `images/marker-icon.png` file from `leaflet.css`, hence saving some bytes, especially when the images is inlined as DataURI/base64 (even though with gzip compression this should not be an issue).\n\n\n## Warning: Data URI (base64) images performance\n\nSome bundlers automatically replace `url(path)` in CSS by [Data URI](https://en.wikipedia.org/wiki/Data_URI_scheme) (aka base64-encoded) image (i.e. `url(data:image/png;base64,SOME_DATA)`). That is typically the case of webpack url-loader and Django pipeline.\n\nIf your map displays hundreds of Markers using this inlined image as icon, be aware that [it will affect the browser performance much more quickly than using a normal URL file](https://github.com/Leaflet/Leaflet/issues/4968#issuecomment-322422045).\n\n\n## Fix: Firefox high contrast (colours override) option\n\nThis plugin also fixes an edge case in Firefox when a user has [configured their browser](https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use#w_other-settings-for-colors) to _always_ override the websites colours.\n\nWhen [that option](https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use#w_other-settings-for-colors) is set to \"Always\" in Firefox preferences, all background images are removed. Therefore Leaflet can no longer detect the default icon images path that was clued through CSS `.leaflet-default-icon-path` class `background-image` rule.\n\nIn that case, this plugin will try to use the `cursor` rule instead which is not affected by Firefox colours override option. Therefore the plugin CSS duplicates the images path in both `background-image` and `cursor` rules.\n\nHowever, if you use this plugin to specify your own icon in CSS, make sure to still use `background-image` rule as the first mean to pass your images path, because [Internet Explorer always interpretes URL's in `cursor` rule as absolute](https://stackoverflow.com/questions/12454770/are-cursor-urls-relative-to-the-css-file#answer-12454924).\n\n\n## License\n[![license](https://img.shields.io/github/license/ghybs/leaflet-defaulticon-compatibility.svg)](LICENSE)\n\nleaflet-defaulticon-compatibility is distributed under the [BSD 2-clause \"Simplified\" License](http://choosealicense.com/licenses/bsd-2-clause/), like Leaflet.\n","readmeFilename":"README.md"}