{"_id":"@drjume/pwacompat","_rev":"3-e458202ffe20f49850235a075f1c8664","name":"@drjume/pwacompat","dist-tags":{"latest":"2.1.2"},"versions":{"2.1.0":{"name":"@drjume/pwacompat","version":"2.1.0","description":"library to bring Web App Manifest contents to non-compliant browsers","main":"src/pwacompat.js","module":"src/pwacompat.js","jsnext:main":"src/pwacompat.js","repository":{"type":"git","url":"git+https://github.com/GoogleChrome/pwacompat.git"},"keywords":["pwa","compatibility","ios","homescreen","manifest"],"author":{"name":"The Chromium Authors"},"license":"Apache-2.0","bugs":{"url":"https://github.com/GoogleChrome/pwacompat/issues"},"homepage":"https://github.com/GoogleChrome/pwacompat","scripts":{"test":"headless-test src/test.js"},"devDependencies":{"chai":"^4.1.2","headless-test":"^1.0.2","mocha":"^5.2.0"},"resolutions":{"**/minimist":"^1.2.5"},"gitHead":"b3fb43913dd4f4564e65016b10cbd0a58dd376f4","_id":"@drjume/pwacompat@2.1.0","_nodeVersion":"16.13.2","_npmVersion":"8.3.1","dist":{"integrity":"sha512-MoUqOIz+dr20lCnPch2yk2SF1XKMqa020bxS+yNaNJ2JMGhkV9sacMoNZOJPcqbOQCLrlQeJCf7XzAi/wTRgzg==","shasum":"91a4ce26e4cfeab8dd9051851ba592aa4c532915","tarball":"https://registry.npmjs.org/@drjume/pwacompat/-/pwacompat-2.1.0.tgz","fileCount":21,"unpackedSize":108554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6BDACRA9TVsSAnZWagAAZM4P/jsSD+0TfaXeAJWNriCq\nQRuqlGHzZB/IwPZ6hx+RkV4vYvU1C7tnB82Wh6wPUodEeMC8DwFcqVVQ9OBm\ne3afRMLtSXQjSVSUYnLvEq4ZsVUvihm/Gz4qdiqnrQZ7CASG+p7bmIbKUc4d\nOZhMzrHNYXCXfZsimM1j7NxzgPOQGdx6W7AEcgGx69ItPXdpIkyFuGk+R1S/\nQr4gJKjY4OwajtK7PGb7daG5E++NH7zRHcTuVAowKUAseXdhGW6Kc/ZwnnnP\nC1qZy4wO/hdHZolOQAjXOKSBN+vPUznuUef2TOBnV1qJ51pEiWLxbY5Zn26J\ng4QTp/jJ+10rnQoKHLpqEOLVOGmAQ/1KP4EBNoxbCBLDhksFFaglrw7akFdN\n8KZ6CRMe0n/3gbDtA9OcfWdOuhtM/M+QYZ+mrz80MfH1TuZW92QLn907tHx4\nZ7JzRssIFAL3EQeQT651IGPm6/PrPB2GTLZEsQkw40lKirBE7tKSHXBFrglR\nPLj8lNSaXxV5SOFrCx2khXan7h1WYok4lXbl9SeHhAMFXNW8I0Tlf7b97+Q0\npDdPsw3N2YCz0qSG2XPQhBWK1aJRnI0ZclFLZ/fArMFl/bZ81aDIwsLfAjqz\nLlsa5+BSc44+c51yF5aQgE0+da4E6oqhANJADLqARIw8qEljwhqqcW4senrs\nUr3X\r\n=79wR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHyteH/U3n0kioM8/PaQ1cAVFsomh/jZyXX8TAucdcYAiEA6PqC0/v5/gU9q2a46S4Jfgs62qJU4W0NGU82WcgGSis="}]},"_npmUser":{"name":"drjume","email":"i@drju.me"},"directories":{},"maintainers":[{"name":"drjume","email":"i@drju.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pwacompat_2.1.0_1642598592792_0.8628614382223663"},"_hasShrinkwrap":false},"2.1.1":{"name":"@drjume/pwacompat","version":"2.1.1","description":"library to bring Web App Manifest contents to non-compliant browsers","main":"src/pwacompat.js","module":"src/pwacompat.js","jsnext:main":"src/pwacompat.js","repository":{"type":"git","url":"git+https://github.com/GoogleChrome/pwacompat.git"},"keywords":["pwa","compatibility","ios","homescreen","manifest"],"author":"The Chromium Authors","license":"Apache-2.0","bugs":{"url":"https://github.com/GoogleChrome/pwacompat/issues"},"homepage":"https://github.com/GoogleChrome/pwacompat","devDependencies":{"chai":"^4.1.2","headless-test":"^1.0.2","mocha":"^5.2.0"},"resolutions":{"**/minimist":"^1.2.5"},"scripts":{"test":"headless-test src/test.js"},"_id":"@drjume/pwacompat@2.1.1","_integrity":"sha512-91dYn26YDq57M5yT4OP2HtdFIJpbMMQAHGnYOBqEeK7HLfM8/sdBkaH9GMK6VfxkLwc5ZzINpPv1f/ncaNzqqg==","_resolved":"/Users/drjume/Desktop/Repos/pwacompat/drjume-pwacompat-2.1.1.tgz","_from":"file:drjume-pwacompat-2.1.1.tgz","_nodeVersion":"16.13.2","_npmVersion":"8.4.0","dist":{"integrity":"sha512-91dYn26YDq57M5yT4OP2HtdFIJpbMMQAHGnYOBqEeK7HLfM8/sdBkaH9GMK6VfxkLwc5ZzINpPv1f/ncaNzqqg==","shasum":"b9ff6c9fabef8ed1e5f4d114aadeef0c9f32723c","tarball":"https://registry.npmjs.org/@drjume/pwacompat/-/pwacompat-2.1.1.tgz","fileCount":21,"unpackedSize":116420,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/LtTCRA9TVsSAnZWagAAJGoQAJ/NNolitjw7Wq3GzyTu\n47NhLXZexmFMQD5f5pBAsSXjQ2z+B7Ldq8Ab07M3XIVCcD3rWLYX16nNEqGQ\nJAZQyfSLM9qQSFtsiwQKsRpfTUvYDfmoRc3weI9u4xmblArevI75NqWwDBBI\nQL1qi46WMyUn78nE0XpLGSL8wZCY77/4LgbopfZAfZ3HAEzPTkLQH7jZznjO\nBkps/lFpjKFV5ZB0AfmttDmx6XU1tY/UPdM+1GeXBjFa6oAnhMYTbowj8ToS\nCFNeismaoqjc6EKLxsP8u3TpB4E1APnawRCtipHFz2svIWTCr03hJsU9aZB1\nq6lbLYg3q0soYjVlQ/LIiY5c+ZNK6q0tUZuRiS/1KFMrby7k9FdH3tQJmIDe\nsUBLAmUMyWL8mPMPuwsRuRn8s9sftnICB9l3oIcEcA8CPy0HYQyTZPl4Jobs\nUPziuYiXvlIlz0LqjRpYAleCdHi8u5NSE4cKyTHPwTsJY1iK2Sv01XwSjY30\nRDsHAI/OrQ0W/zJ8RS1cG8eYTv0zr3PQNph5OzEVL2kBCj9T9dfaCWJuSUe7\nP0khAb64l6EutrLFwEXqDEq0sYnFQuUbdxsTrrUpTpDt++bX4YzZddKqL7kV\n/OCFHZ6L7yrjgRbU6DNnVRiPuoa2wF7tZTVxG+1yW/Y/c4T9/dCPgRYtd4a/\n/3Op\r\n=Buk9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOUqmbvV1EEMZIRij6mF6weqJFoQZAbRKgQBjkG2V0JQIhAOwq5RY+JaoKdhZY4gDxXzTQtQ65OiomT59fgpAPHgu9"}]},"_npmUser":{"name":"drjume","email":"i@drju.me"},"directories":{},"maintainers":[{"name":"drjume","email":"i@drju.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pwacompat_2.1.1_1643952979081_0.8364522848280589"},"_hasShrinkwrap":false},"2.1.2":{"name":"@drjume/pwacompat","version":"2.1.2","description":"library to bring Web App Manifest contents to non-compliant browsers","main":"src/pwacompat.js","module":"src/pwacompat.js","jsnext:main":"src/pwacompat.js","repository":{"type":"git","url":"git+https://github.com/GoogleChrome/pwacompat.git"},"keywords":["pwa","compatibility","ios","homescreen","manifest"],"author":"The Chromium Authors","license":"Apache-2.0","bugs":{"url":"https://github.com/GoogleChrome/pwacompat/issues"},"homepage":"https://github.com/GoogleChrome/pwacompat","devDependencies":{"chai":"^4.1.2","headless-test":"^1.0.2","mocha":"^5.2.0"},"resolutions":{"**/minimist":"^1.2.5"},"scripts":{"test":"headless-test src/test.js"},"_id":"@drjume/pwacompat@2.1.2","_integrity":"sha512-T7lfRTIcH935AA50yF92610fl9Hngl3sfM2WAogTM2XaYhht+0zGwxrLow4yaxuTtm408wwwTHByZ58DW3Ud4g==","_resolved":"/Users/drjume/Desktop/Repos/pwacompat/drjume-pwacompat-2.1.2.tgz","_from":"file:drjume-pwacompat-2.1.2.tgz","_nodeVersion":"16.14.0","_npmVersion":"8.5.1","dist":{"integrity":"sha512-T7lfRTIcH935AA50yF92610fl9Hngl3sfM2WAogTM2XaYhht+0zGwxrLow4yaxuTtm408wwwTHByZ58DW3Ud4g==","shasum":"60b200e29cc6a346dd830f563cd9b6b2891baced","tarball":"https://registry.npmjs.org/@drjume/pwacompat/-/pwacompat-2.1.2.tgz","fileCount":21,"unpackedSize":116560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEzNSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIaw/+KQu1iSKtHai5MgvzspCviz43+MToAhRBgtsUKQ4kKdUCjXX2\r\nCjDOYaLlIsdOccql1LSxQx0Gk0/Hj102Ue7YpId3vVeqxZS1p+20mJR+PQk6\r\nbcXF4vojPJvFRIVcXywVlALu50vczkc9RlbMXwUHpsu34u6PxDN1dLod+lZB\r\nsZ2JsfIYX/MAmuk3ghIZhEHG98BG5LNzkl5iXCnnnc/k2sJMkLoKsOjAIiMG\r\nEGio8d2ph4bZXkFHtfEiJLZNbJpQxx+TW8BySSwD7v4bSfOLX8W+qTKFCKP7\r\n3nc8zSF3zRV27CwuXk2poBvgEsx20TLIo0NUhIOvtzXDw4WSiBgNoX7ieGD8\r\nCvpY3Wb1P2wVnDy0DbyPsy1cOhSWWnbIUbgGq9d57WFZbSgmuKgPOmZkRfiM\r\nKwkTCTVBWrlJexLKWXCB6sd/E8eDyqxn5jyTmcbLBnDqeE1jRB3layCcPg89\r\nyC8ikey3gjVLDVbvw9jPibbnQJNVsh1mS6Ooo1gWqiJjDoygN0t/LegjsDlU\r\n4IFT+30NmTIQpGJ10zP3cB9pTR7eQwzOatj0N0LKtBxJ7UO9yS14XDoQ4Opx\r\nrVQ7II+3WO01jhgZuLGMeYhI6I7LDYYvthK5+WQZRrG3pP42b7O9/ou2YBqk\r\noQFs0PXRRZlT6wQG9R2xVhSe5oGvvbIyN64=\r\n=ZpJS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFg0IuPpBkHMuZQedTua/BSs69DYvOAb1Qb99gIQdmjAIgPah44HUoAXVJht/SBS4ioTio7256scklUzxzRZ8aL/w="}]},"_npmUser":{"name":"drjume","email":"i@drju.me"},"directories":{},"maintainers":[{"name":"drjume","email":"i@drju.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pwacompat_2.1.2_1645425490469_0.8960150721355828"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-19T13:23:12.749Z","2.1.0":"2022-01-19T13:23:12.979Z","modified":"2022-04-05T05:41:00.398Z","2.1.1":"2022-02-04T05:36:19.276Z","2.1.2":"2022-02-21T06:38:10.678Z"},"maintainers":[{"name":"drjume","email":"i@drju.me"}],"description":"library to bring Web App Manifest contents to non-compliant browsers","homepage":"https://github.com/GoogleChrome/pwacompat","keywords":["pwa","compatibility","ios","homescreen","manifest"],"repository":{"type":"git","url":"git+https://github.com/GoogleChrome/pwacompat.git"},"author":"The Chromium Authors","bugs":{"url":"https://github.com/GoogleChrome/pwacompat/issues"},"license":"Apache-2.0","readme":"[![Build Status](https://travis-ci.org/GoogleChromeLabs/pwacompat.svg?branch=master)](https://travis-ci.org/GoogleChromeLabs/pwacompat)\n\nPWACompat is a library that brings the [Web App Manifest](https://developers.google.com/web/fundamentals/web-app-manifest/) to non-compliant browsers for better [Progressive Web Apps](https://en.wikipedia.org/wiki/Progressive_Web_Apps).\nThis mostly means creating splash screens and icons for Mobile Safari, as well as supporting IE/Edge's Pinned Sites feature.\n\nSo, if you've created a `manifest.webmanifest` but want to have wide support everywhere else—through legacy HTML tags for icons and theming—look no further.\nWe recommend including it from a CDN to get the latest version, or [bundling it yourself](https://npmjs.com/package/pwacompat):\n\n```html\n<link rel=\"manifest\" href=\"manifest.webmanifest\" />\n<script async src=\"https://cdn.jsdelivr.net/npm/pwacompat\" crossorigin=\"anonymous\"></script>\n<!-- or another CDN -->\n<script async src=\"https://unpkg.com/pwacompat\" crossorigin=\"anonymous\"></script>\n```\n\nAnd you're done^! 🎉📄\n\nFor more on the Web App Manifest, read 📖 [how to add a Web App Manifest and mobile-proof your site](https://medium.com/dev-channel/how-to-add-a-web-app-manifest-and-mobile-proof-your-site-450e6e485638), watch 📹 [theming as part of The Standard](https://www.youtube.com/watch?v=5fEMTxpA6BA), or check out 📬 [the Web Fundamentals post on PWACompat](https://developers.google.com/web/updates/2018/07/pwacompat).\n\n<p align=\"center\">\n  <img src=\"https://storage.googleapis.com/hwhistlr.appspot.com/pwacompat-explainer.png\" height=\"256\" alt=\"PWACompat explainer\" /><br />\n  <small><em>PWACompat takes your regular manifest and enhances other browsers</em></small>\n</p>\n\n# ^Best Practice &amp; Caveats\n\nWhile PWACompat can generate most icons, meta tags etc that your PWA might need, it's best practice to include at least one `<link rel=\"icon\" ... />`.\nThis is standardized and older browsers, along with search engines, may use it from your page to display an icon.\nFor example:\n\n```html\n<link rel=\"manifest\" href=\"manifest.webmanifest\" />\n<script async src=\"path/to/pwacompat.min.js\"></script>\n<!-- include icon also from manifest -->\n<link rel=\"icon\" type=\"image/png\" href=\"res/icon-128.png\" sizes=\"128x128\" />\n```\n\nYou should also consider only loading PWACompat after your site is loaded, as adding your site to a homescreen is a pretty rare operation.\nThis is the approach taken on [v8.dev](https://github.com/v8/v8.dev/pull/310/files) and [Emojityper](https://github.com/emojityper/emojityper/blob/master/src/loader.js#L8).\n\n## iOS\n\nPWACompat looks for a viewport tag which includes `viewport-fit=cover`, such as `<meta name=\"viewport\" content=\"viewport-fit=cover\">`.\nIf this tag is detected, PWACompat will generate a meta tag that makes your PWA load in fullscreen mode—this is particularly useful for devices with a notch.\n\nYou can customize the generated splash screen's font by using a CSS Variable.\nFor example:\n\n```html\n<style>\n  link[rel=\"manifest\"] {\n     --pwacompat-splash-font: 24px Verdana;\n  }\n</style>\n```\n\nThis is set directly as a [canvas font](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font), so you must as a minimum include size _and_ family.\nThe default value is \"24px HelveticaNeue-CondensedBold\".\n\n⚠️ PWACompat won't wait for your fonts to load, so if you're using custom fonts, be sure to only load the library after they're ready.\n\n### Old Versions\n\nPrior [to iOS 12.2](https://twitter.com/mhartington/status/1089293403089784832), Mobile Safari opens external sites in the regular browser, meaning that flows like Oauth won't complete correctly.\nThis [isn't a problem with PWACompat](https://github.com/GoogleChromeLabs/pwacompat/issues/15), but is an issue with PWAs on iOS generally.\n\n## Session Storage\n\nPWACompat uses `window.sessionStorage` to cache your site's manifest (and on iOS, any updated icons and generated splash screens).\nThis expires after a user navigates away from your page or closes their tab.\n\n# Details\n\nWhat does PWACompat actually do?\nIf you provide a Web App Manifest, PWACompat will update your page and:\n\n* Create meta icon tags for all icons in the manifest (e.g., for a favicon, older browsers)\n* Create fallback meta tags for various browsers (e.g., iOS, WebKit/Chromium forks etc) describing how a PWA should open\n* Sets [the theme color](https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android) based on the manifest\n\nFor Safari, PWACompat also:\n\n* Sets `apple-mobile-web-app-capable` (opening without a browser chrome) for display modes `standalone`, `fullscreen` or `minimal-ui`\n* Creates `apple-touch-icon` images, adding the manifest background to transparent icons: otherwise, iOS renders transparency as black\n* Creates dynamic splash images, closely matching the splash images generated [for Chromium-based browsers](https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java?type=cs&q=webappsplash&sq=package:chromium&g=0&l=70)\n\nFor IE and Edge:\n\n* Adds meta tags for the [Pinned Sites](https://blogs.msdn.microsoft.com/jennifer/2011/04/20/ie-pinned-sites-part-1-what-are-pinned-sites/) feature\n\nFor PWAs on Windows with access to UWP APIs:\n\n* Sets the titlebar color\n\nDo you think PWACompat should support backfilling more HTML tags needed for older browsers?\n[Let us know!](https://github.com/GoogleChromeLabs/pwacompat/issues)\n\n## Demo\n\nFor a demo, try adding [Emojityper](https://emojityper.com/) or [the demo site](https://googlechromelabs.github.io/pwacompat/demo/) to an iOS home screen (to see splash screens and icons).\nYou can also install Emojityper from the [Microsoft Store](https://www.microsoft.com/p/emojityper/9np2xx3sxmct) (where the titlebar color is automatically set the manifest's `theme_color`).\n\n## Support\n\nThis is supported in most modern browsers (UC Browser, Safari, Firefox, Chrome, IE10+), and fails silenty when unsupported.\nMobile Safari benefits the most from PWACompat, as generating [a large number of splash screens](https://google.com/search?q=ios%20webapp%20splash%20screens) manually is a complex task.\n\n# Web App Manifest\n\nYour Web App Manifest is:\n\n* normally named `manifest.webmanifest` (although some folks name it `manifest.json`)\n* referenced from all pages on your site like `<link rel=\"manifest\" href=\"path/to/manifest.webmanifest\" />`\n* and should look a bit like this:\n\n```js\n{\n  \"name\": \"Always Be Progressive\",\n  \"short_name\": \"Progressive!\",\n  \"display\": \"browser\",\n  \"start_url\": \"/\",\n  \"background_color\": \"#102a48\",\n  \"icons\": [\n    {\n      \"src\": \"res/icon-256.png\",\n      \"sizes\": \"256x256\"\n    },\n    {\n      \"src\": \"res/icon-128.png\",\n      \"sizes\": \"128x128\"\n    }\n  ]\n}\n```\n\nFor more information on the Web App Manifest, and how e.g., modern browsers will prompt engaged users to install your site to their home screen, check out [Web Fundamentals](https://developers.google.com/web/fundamentals/web-app-manifest/).\nThere's also a number of [online generators](https://www.google.com/search?q=web+app+manifest+generator).\n\n# Release\n\nCompile code with [Closure Compiler](https://closure-compiler.appspot.com/home).\n\n```\n// ==ClosureCompiler==\n// @compilation_level ADVANCED_OPTIMIZATIONS\n// @output_file_name pwacompat.min.js\n// ==/ClosureCompiler==\n\n// code here\n```\n","readmeFilename":""}