First release

This commit is contained in:
Owen Quinlan 2021-07-02 19:29:34 +10:00
commit fa6c85266e
2339 changed files with 761050 additions and 0 deletions

296
node_modules/quicklink/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,296 @@
## 2.2.0 (2021-06-18)
This release includes support for a new `threshold` option [PR](https://github.com/GoogleChromeLabs/quicklink/pull/214) to allow users select the % of link areas that entered the viewport before prefetching. This can reduce the number of links to prefetch at a time, and ultimately reduce the impact on CDNs and servers.
Thanks to [@verlock](https://github.com/verlok) from YNAP for this contribution.
* Added `threshold` option to allow users select the % of link areas that entered the viewport before ([d3746e1](https://github.com/GoogleChromeLabs/quicklink/commit/d3746e1)), closes [#214](https://github.com/GoogleChromeLabs/quicklink/issues/214)
* Add Magento Quicklink module (Readme + Site) (#216) ([c77e057](https://github.com/GoogleChromeLabs/quicklink/commit/c77e057)), closes [#216](https://github.com/GoogleChromeLabs/quicklink/issues/216)
* Instructions to debug Quicklink ([2b3dc21](https://github.com/GoogleChromeLabs/quicklink/commit/2b3dc21))
## 2.1.0 (2021-02-07)
* [docs] Add React SPA demos to repo and site (#179) ([179cb56](https://github.com/GoogleChromeLabs/quicklink/commit/179cb56)), closes [#179](https://github.com/GoogleChromeLabs/quicklink/issues/179)
* [docs] drop highlightjs reference and link up prism styles ([b91872b](https://github.com/GoogleChromeLabs/quicklink/commit/b91872b))
* [docs] Fix quicklink logo ([25829de](https://github.com/GoogleChromeLabs/quicklink/commit/25829de))
* [docs] minor tweak to header text ([cd31382](https://github.com/GoogleChromeLabs/quicklink/commit/cd31382))
* [docs] refactor api docs syntax highlighting ([59f7eca](https://github.com/GoogleChromeLabs/quicklink/commit/59f7eca))
* [docs] refactor copy-snippets syntax highlighting ([5445a8b](https://github.com/GoogleChromeLabs/quicklink/commit/5445a8b))
* [docs] refactor measure docs syntax highlighting ([eaa87ac](https://github.com/GoogleChromeLabs/quicklink/commit/eaa87ac))
* [docs] refactor over-prefetching docs syntax highlighting ([6ec1287](https://github.com/GoogleChromeLabs/quicklink/commit/6ec1287))
* [docs] refactor react docs syntax highlighting ([ba5984d](https://github.com/GoogleChromeLabs/quicklink/commit/ba5984d))
* [docs] refactor usage docs syntax highlighting ([25367f4](https://github.com/GoogleChromeLabs/quicklink/commit/25367f4))
* [docs] remainder of syntax highlighting fixes ([cf32a85](https://github.com/GoogleChromeLabs/quicklink/commit/cf32a85))
* [docs] remove highlightjs ([7ff8c8f](https://github.com/GoogleChromeLabs/quicklink/commit/7ff8c8f))
* [docs] Update CHANGELOG ([c4a4726](https://github.com/GoogleChromeLabs/quicklink/commit/c4a4726))
* [docs] various style theme improvements ([06786fb](https://github.com/GoogleChromeLabs/quicklink/commit/06786fb))
* [feat] (options): Add a `hrefFn` option to build the URL to prefetch. (#201) ([ee072d4](https://github.com/GoogleChromeLabs/quicklink/commit/ee072d4)), closes [#201](https://github.com/GoogleChromeLabs/quicklink/issues/201)
* [feat] `delay` option to reduce impact on CDNs and servers [alternative without data-attributes] (#2 ([5cdf569](https://github.com/GoogleChromeLabs/quicklink/commit/5cdf569)), closes [#217](https://github.com/GoogleChromeLabs/quicklink/issues/217)
* [infra] add eleventy syntax highlighting ([b48f80d](https://github.com/GoogleChromeLabs/quicklink/commit/b48f80d))
* [infra] Add site to firebase hosting config ([fe43486](https://github.com/GoogleChromeLabs/quicklink/commit/fe43486))
* [infra] bump version to 2.1.0 ([81232e8](https://github.com/GoogleChromeLabs/quicklink/commit/81232e8))
* Added Ray-Ban and Oakley from Luxxotica to trustedByLogos section (#202) ([b4494b0](https://github.com/GoogleChromeLabs/quicklink/commit/b4494b0)), closes [#202](https://github.com/GoogleChromeLabs/quicklink/issues/202)
* Correct typo, duplicate "passing" (#185) ([932f655](https://github.com/GoogleChromeLabs/quicklink/commit/932f655)), closes [#185](https://github.com/GoogleChromeLabs/quicklink/issues/185)
* Fix issues typo in 'network-idle.js' (#218) ([534e7b3](https://github.com/GoogleChromeLabs/quicklink/commit/534e7b3)), closes [#218](https://github.com/GoogleChromeLabs/quicklink/issues/218)
* New demo page (#205) ([5205d62](https://github.com/GoogleChromeLabs/quicklink/commit/5205d62)), closes [#205](https://github.com/GoogleChromeLabs/quicklink/issues/205)
* update homepage url in package.json (#184) ([172275b](https://github.com/GoogleChromeLabs/quicklink/commit/172275b)), closes [#184](https://github.com/GoogleChromeLabs/quicklink/issues/184)
* Updating broken link ([224df77](https://github.com/GoogleChromeLabs/quicklink/commit/224df77))
* Fix: Cannot read property 'then' of undefined (#188) ([a8872b8](https://github.com/GoogleChromeLabs/quicklink/commit/a8872b8)), closes [#188](https://github.com/GoogleChromeLabs/quicklink/issues/188)
* chore(deps): bump http-proxy from 1.18.0 to 1.18.1 (#200) ([0aa5157](https://github.com/GoogleChromeLabs/quicklink/commit/0aa5157)), closes [#200](https://github.com/GoogleChromeLabs/quicklink/issues/200)
## 2.0.0 (2020-05-07)
* [infra] Add site updates for 2.0.0 (#178) ([8aa512b](https://github.com/GoogleChromeLabs/quicklink/commit/8aa512b)), closes [#178](https://github.com/GoogleChromeLabs/quicklink/issues/178)
* [infra] Bump versions to 2.0.0 ([08d9a39](https://github.com/GoogleChromeLabs/quicklink/commit/08d9a39))
* 2.0.0 ([735caf6](https://github.com/GoogleChromeLabs/quicklink/commit/735caf6))
## 2.0.0-beta (2020-04-24)
* [core] Adds withQuicklink HOC (#172) ([89cd6a9](https://github.com/GoogleChromeLabs/quicklink/commit/89cd6a9)), closes [#172](https://github.com/GoogleChromeLabs/quicklink/issues/172) [#175](https://github.com/GoogleChromeLabs/quicklink/issues/175) [#176](https://github.com/GoogleChromeLabs/quicklink/issues/176) [#177](https://github.com/GoogleChromeLabs/quicklink/issues/177)
* [core] Introduce prefetch chunks build (#171) ([301aedb](https://github.com/GoogleChromeLabs/quicklink/commit/301aedb)), closes [#171](https://github.com/GoogleChromeLabs/quicklink/issues/171) [#168](https://github.com/GoogleChromeLabs/quicklink/issues/168) [#169](https://github.com/GoogleChromeLabs/quicklink/issues/169)
* [docs] Add initial site ([e934a2b](https://github.com/GoogleChromeLabs/quicklink/commit/e934a2b))
* [docs] Add notes on double-keyed caching ([03d3c97](https://github.com/GoogleChromeLabs/quicklink/commit/03d3c97))
* [docs] Added Newegg to trustedByLogos section (#153) ([453a661](https://github.com/GoogleChromeLabs/quicklink/commit/453a661)), closes [#153](https://github.com/GoogleChromeLabs/quicklink/issues/153)
* [docs] Bugfix/syntax highlighting site (#147) ([0f644e7](https://github.com/GoogleChromeLabs/quicklink/commit/0f644e7)), closes [#147](https://github.com/GoogleChromeLabs/quicklink/issues/147)
* [docs] Compress site resources w/ImageOptim ([179e18e](https://github.com/GoogleChromeLabs/quicklink/commit/179e18e))
* [docs] Measuring impact of QuickLink in sites guide (#146) ([2ce99e3](https://github.com/GoogleChromeLabs/quicklink/commit/2ce99e3)), closes [#146](https://github.com/GoogleChromeLabs/quicklink/issues/146)
* [docs] New section "Quicklink extension" for home page. (#150) ([468c231](https://github.com/GoogleChromeLabs/quicklink/commit/468c231)), closes [#150](https://github.com/GoogleChromeLabs/quicklink/issues/150)
* [docs] Over-prefetching section for home page (#148) ([75aa643](https://github.com/GoogleChromeLabs/quicklink/commit/75aa643)), closes [#148](https://github.com/GoogleChromeLabs/quicklink/issues/148)
* [docs] Update the Angular logo (#158) ([836f170](https://github.com/GoogleChromeLabs/quicklink/commit/836f170)), closes [#158](https://github.com/GoogleChromeLabs/quicklink/issues/158)
* [infra] Add firebase deployment ([89ab866](https://github.com/GoogleChromeLabs/quicklink/commit/89ab866))
* [infra] Fix tests (#142) ([6644860](https://github.com/GoogleChromeLabs/quicklink/commit/6644860)), closes [#142](https://github.com/GoogleChromeLabs/quicklink/issues/142)
* [infra] Publish dist directory (#98) ([9cdf06f](https://github.com/GoogleChromeLabs/quicklink/commit/9cdf06f)), closes [#98](https://github.com/GoogleChromeLabs/quicklink/issues/98)
* 2.0.0-beta ([185d1e8](https://github.com/GoogleChromeLabs/quicklink/commit/185d1e8))
* Add support for Quicklink 2.0.0-alpha ([7c7c917](https://github.com/GoogleChromeLabs/quicklink/commit/7c7c917))
* Add twitter metadata ([74d3224](https://github.com/GoogleChromeLabs/quicklink/commit/74d3224))
* Adding SPA section to README.md ([ea3229a](https://github.com/GoogleChromeLabs/quicklink/commit/ea3229a))
* Fix typo on README (#127) ([5acb27e](https://github.com/GoogleChromeLabs/quicklink/commit/5acb27e)), closes [#127](https://github.com/GoogleChromeLabs/quicklink/issues/127)
* package.json: bump version to 2.0.0-alpha ([d5d5ca5](https://github.com/GoogleChromeLabs/quicklink/commit/d5d5ca5))
* Updates to initial site (#144) ([3f796f6](https://github.com/GoogleChromeLabs/quicklink/commit/3f796f6)), closes [#144](https://github.com/GoogleChromeLabs/quicklink/issues/144)
* chore(deps): bump acorn from 6.4.0 to 6.4.1 (#167) ([8b62949](https://github.com/GoogleChromeLabs/quicklink/commit/8b62949)), closes [#167](https://github.com/GoogleChromeLabs/quicklink/issues/167)
## 2.0.0-alpha (2019-09-25)
* (docs) update to remove TODOs from README ([8cd1183](https://github.com/GoogleChromeLabs/quicklink/commit/8cd1183))
* Update docs with ad-related considerations (#122) ([7ac672f](https://github.com/GoogleChromeLabs/quicklink/commit/7ac672f)), closes [#122](https://github.com/GoogleChromeLabs/quicklink/issues/122)
* Major: Rework exports; Add `throttle` and `limit` options (#120) ([4044de0](https://github.com/GoogleChromeLabs/quicklink/commit/4044de0)), closes [#120](https://github.com/GoogleChromeLabs/quicklink/issues/120) [#1](https://github.com/GoogleChromeLabs/quicklink/issues/1)
## <small>1.0.1 (2019-08-17)</small>
* (demo) Introduce new demos for basic + workbox usage ([9eb7fa0](https://github.com/GoogleChromeLabs/quicklink/commit/9eb7fa0))
* (demos) Add new demos to README ([85729aa](https://github.com/GoogleChromeLabs/quicklink/commit/85729aa))
* (docs) Update README: note on session stitching ([ba9795c](https://github.com/GoogleChromeLabs/quicklink/commit/ba9795c))
* (infra) Bump version to 1.0.1 ([d75188d](https://github.com/GoogleChromeLabs/quicklink/commit/d75188d))
* A few quick size optimizations ([201c217](https://github.com/GoogleChromeLabs/quicklink/commit/201c217))
* Add homepage and bugs links to package.json (#116) ([002645b](https://github.com/GoogleChromeLabs/quicklink/commit/002645b)), closes [#116](https://github.com/GoogleChromeLabs/quicklink/issues/116)
* Add note to README about Drupal module. ([d94ff80](https://github.com/GoogleChromeLabs/quicklink/commit/d94ff80))
* Check if `requestIdleCallback` exists in `window` (#112) ([089da91](https://github.com/GoogleChromeLabs/quicklink/commit/089da91)), closes [#112](https://github.com/GoogleChromeLabs/quicklink/issues/112)
* Create .editorconfig (#61) ([beae09b](https://github.com/GoogleChromeLabs/quicklink/commit/beae09b)), closes [#61](https://github.com/GoogleChromeLabs/quicklink/issues/61)
* Fail silently, dont throw an error, when IntersectionObserver isnt available (#113) ([32e5b61](https://github.com/GoogleChromeLabs/quicklink/commit/32e5b61)), closes [#113](https://github.com/GoogleChromeLabs/quicklink/issues/113)
* Fix ES Module import syntax ([a2b90ff](https://github.com/GoogleChromeLabs/quicklink/commit/a2b90ff))
* GitHub Issue Templates (#109) ([2e6401e](https://github.com/GoogleChromeLabs/quicklink/commit/2e6401e)), closes [#109](https://github.com/GoogleChromeLabs/quicklink/issues/109)
* HTML formatting tidy for Tests & Demos (#114) ([f4aef2e](https://github.com/GoogleChromeLabs/quicklink/commit/f4aef2e)), closes [#114](https://github.com/GoogleChromeLabs/quicklink/issues/114)
* HTTPS link to gruntjs.com (#100) ([47f49e7](https://github.com/GoogleChromeLabs/quicklink/commit/47f49e7)), closes [#100](https://github.com/GoogleChromeLabs/quicklink/issues/100)
* HTTPS link to nodejs.org (#110) ([cf9551e](https://github.com/GoogleChromeLabs/quicklink/commit/cf9551e)), closes [#110](https://github.com/GoogleChromeLabs/quicklink/issues/110)
* Mention instant.page as a related project ([0bc8aec](https://github.com/GoogleChromeLabs/quicklink/commit/0bc8aec))
* Mention Safari ≥ 12.1 working without polyfills (#111) ([b01e5bb](https://github.com/GoogleChromeLabs/quicklink/commit/b01e5bb)), closes [#111](https://github.com/GoogleChromeLabs/quicklink/issues/111)
* remove extraneous full stops / periods from comment (#105) ([23737af](https://github.com/GoogleChromeLabs/quicklink/commit/23737af)), closes [#105](https://github.com/GoogleChromeLabs/quicklink/issues/105)
* remove unneeded type="text/css" from demo (#106) ([4dc74f1](https://github.com/GoogleChromeLabs/quicklink/commit/4dc74f1)), closes [#106](https://github.com/GoogleChromeLabs/quicklink/issues/106)
* remove unneeded type="text/css" from demo page (#104) ([24919bd](https://github.com/GoogleChromeLabs/quicklink/commit/24919bd)), closes [#104](https://github.com/GoogleChromeLabs/quicklink/issues/104)
* Update link to Gatsby with Guess.js (#108) ([dc02d33](https://github.com/GoogleChromeLabs/quicklink/commit/dc02d33)), closes [#108](https://github.com/GoogleChromeLabs/quicklink/issues/108)
* Update microbundle to fix "missing JSX plugin" issue ([8f5cf22](https://github.com/GoogleChromeLabs/quicklink/commit/8f5cf22))
* Update repo path in package.json ([45e9bbd](https://github.com/GoogleChromeLabs/quicklink/commit/45e9bbd))
* Update the Readme and add a mention of the WordPress plugin ([0f15f45](https://github.com/GoogleChromeLabs/quicklink/commit/0f15f45))
* Use latest version of polyfill.io JS (#92) ([b15c8ba](https://github.com/GoogleChromeLabs/quicklink/commit/b15c8ba)), closes [#92](https://github.com/GoogleChromeLabs/quicklink/issues/92)
* fix: Attempt to address build issues (Travis) ([9755280](https://github.com/GoogleChromeLabs/quicklink/commit/9755280))
* fix: stop observing links once prefetched; ([ce0011c](https://github.com/GoogleChromeLabs/quicklink/commit/ce0011c))
* fix(README): use UMD file for <script> tags ([e735eb7](https://github.com/GoogleChromeLabs/quicklink/commit/e735eb7))
* docs(browser-support): add note for IE9-10 users (#67) ([aa40490](https://github.com/GoogleChromeLabs/quicklink/commit/aa40490)), closes [#67](https://github.com/GoogleChromeLabs/quicklink/issues/67)
* docs(README): add simplified Chinese version for README.md (#36) ([a3e0221](https://github.com/GoogleChromeLabs/quicklink/commit/a3e0221)), closes [#36](https://github.com/GoogleChromeLabs/quicklink/issues/36)
* docs(README): add URL fragments note about ignores (#52, #49) ([c28c002](https://github.com/GoogleChromeLabs/quicklink/commit/c28c002)), closes [#52](https://github.com/GoogleChromeLabs/quicklink/issues/52) [#49](https://github.com/GoogleChromeLabs/quicklink/issues/49)
* docs(README): address feedback (ignores) ([95ee730](https://github.com/GoogleChromeLabs/quicklink/commit/95ee730))
* docs(README): formatting -> recipe headings ([0073e2a](https://github.com/GoogleChromeLabs/quicklink/commit/0073e2a))
* docs(translated README): link to zh-CN MDN docs ([409cb2c](https://github.com/GoogleChromeLabs/quicklink/commit/409cb2c))
* ci: update Yarn with the recommended official commands ([1a92452](https://github.com/GoogleChromeLabs/quicklink/commit/1a92452))
* ci: use Yarn for all scripts ([4477ec6](https://github.com/GoogleChromeLabs/quicklink/commit/4477ec6))
* chore(release): add conventional-changelog-cli & changelog ([532b985](https://github.com/GoogleChromeLabs/quicklink/commit/532b985))
## 1.0.0 (2018-12-14)
* release(package.json): bump to 1.0.0 ([bd82a6c](https://github.com/GoogleChromeLabs/quicklink/commit/bd82a6c))
* infra(prefetch.mjs): add jsdoc for third-arg to prefetcher ([c5ed343](https://github.com/GoogleChromeLabs/quicklink/commit/c5ed343))
* infra(tests): fix linting for spec ([ba74f11](https://github.com/GoogleChromeLabs/quicklink/commit/ba74f11))
* docs: clarify Network Information API browser support ([ac5f7d9](https://github.com/GoogleChromeLabs/quicklink/commit/ac5f7d9))
* docs: describe “ignores” & add recipe ([26a126c](https://github.com/GoogleChromeLabs/quicklink/commit/26a126c))
* docs: describe new opts w/ recipes ([d2a7870](https://github.com/GoogleChromeLabs/quicklink/commit/d2a7870))
* docs(README.md): clarify layered support ([0025caa](https://github.com/GoogleChromeLabs/quicklink/commit/0025caa))
* test: add “ignores” suite ([b89faf0](https://github.com/GoogleChromeLabs/quicklink/commit/b89faf0))
* test: add origins & sameOrigin suites ([21f601b](https://github.com/GoogleChromeLabs/quicklink/commit/21f601b))
* fix: add "unpkg" entry ([3a0d97c](https://github.com/GoogleChromeLabs/quicklink/commit/3a0d97c))
* fix: drop `sameOrigin` but move to same origin default; ([11af301](https://github.com/GoogleChromeLabs/quicklink/commit/11af301))
* fix: remove `typeof document` check; ([c578c32](https://github.com/GoogleChromeLabs/quicklink/commit/c578c32))
* fix: rename “filter” -> “ignores” ([a1544da](https://github.com/GoogleChromeLabs/quicklink/commit/a1544da))
* fix: retain RegExp caller context ([53f5169](https://github.com/GoogleChromeLabs/quicklink/commit/53f5169))
* fix: revert `options` inlining; ([194881f](https://github.com/GoogleChromeLabs/quicklink/commit/194881f))
* feat: add “opt.origins” for inspecting before queue; ([1074d46](https://github.com/GoogleChromeLabs/quicklink/commit/1074d46))
* feat: add flexible `filter` option; ([4e64ca1](https://github.com/GoogleChromeLabs/quicklink/commit/4e64ca1))
* feat: add option to restrict same origin; ([2a31aee](https://github.com/GoogleChromeLabs/quicklink/commit/2a31aee))
* feat(index.mjs): normalize URLs being prefetched (#27) ([1da37f4](https://github.com/GoogleChromeLabs/quicklink/commit/1da37f4)), closes [#27](https://github.com/GoogleChromeLabs/quicklink/issues/27)
* add test & recipe for all origins ([ab6375a](https://github.com/GoogleChromeLabs/quicklink/commit/ab6375a))
* fixed polyfilling ([92e11ed](https://github.com/GoogleChromeLabs/quicklink/commit/92e11ed))
* new URL(...): add location.href as second parameter ([d8ed5f9](https://github.com/GoogleChromeLabs/quicklink/commit/d8ed5f9))
* tests(test-static-url-list): expand prefetch URL paths ([3027c72](https://github.com/GoogleChromeLabs/quicklink/commit/3027c72))
* golf: compress `support` helper; ([9df00ff](https://github.com/GoogleChromeLabs/quicklink/commit/9df00ff))
* golf: inline `options.priority` default; ([36cc199](https://github.com/GoogleChromeLabs/quicklink/commit/36cc199))
* golf: inline `options` defaults; ([fe5f735](https://github.com/GoogleChromeLabs/quicklink/commit/fe5f735))
* golf: inline `withCredentials` assignment; ([1c94262](https://github.com/GoogleChromeLabs/quicklink/commit/1c94262))
* golf: only use `document.head` for append; ([189984a](https://github.com/GoogleChromeLabs/quicklink/commit/189984a))
* golf: save `navigator.connection` to var; ([5f95309](https://github.com/GoogleChromeLabs/quicklink/commit/5f95309))
## <small>0.1.2 (2018-12-12)</small>
* release(package.json): bump release ([de41a3c](https://github.com/GoogleChromeLabs/quicklink/commit/de41a3c))
* Fix wrong operator precedence: negation vs 'in' ([c2864b0](https://github.com/GoogleChromeLabs/quicklink/commit/c2864b0))
* fixes #5: localize and fix network-idle-callback deps ([807e8ad](https://github.com/GoogleChromeLabs/quicklink/commit/807e8ad)), closes [#5](https://github.com/GoogleChromeLabs/quicklink/issues/5)
* docs(README.md): add demo details (for #12) ([842f92a](https://github.com/GoogleChromeLabs/quicklink/commit/842f92a)), closes [#12](https://github.com/GoogleChromeLabs/quicklink/issues/12)
* docs(README.md): minor clean-up of demo text ([4c03801](https://github.com/GoogleChromeLabs/quicklink/commit/4c03801))
* docs(readme): correct a small typo ([93814e2](https://github.com/GoogleChromeLabs/quicklink/commit/93814e2))
## <small>0.1.1 (2018-12-12)</small>
* release(package.json): bump version ([25b7cc7](https://github.com/GoogleChromeLabs/quicklink/commit/25b7cc7))
* Readme: Fix Guessjs website link ([0a32e19](https://github.com/GoogleChromeLabs/quicklink/commit/0a32e19))
* fix: amend incorrect `querySelector` call ([e330066](https://github.com/GoogleChromeLabs/quicklink/commit/e330066))
## 0.1.0 (2018-12-11)
* 0.1.0 ([a76eade](https://github.com/GoogleChromeLabs/quicklink/commit/a76eade))
* Clean up promises ([e4923ee](https://github.com/GoogleChromeLabs/quicklink/commit/e4923ee))
* feat(prefetch links scrolling into viewport) for #6 ([d1e825d](https://github.com/GoogleChromeLabs/quicklink/commit/d1e825d)), closes [#6](https://github.com/GoogleChromeLabs/quicklink/issues/6)
* fix typo~ ([0c791bf](https://github.com/GoogleChromeLabs/quicklink/commit/0c791bf))
* Improve basic demo ([04fa0d0](https://github.com/GoogleChromeLabs/quicklink/commit/04fa0d0))
* infra(lint-fixes) for index and prefetch ([c8c47f8](https://github.com/GoogleChromeLabs/quicklink/commit/c8c47f8))
* Make it proper IUU ([e6ffca9](https://github.com/GoogleChromeLabs/quicklink/commit/e6ffca9))
* Revert logic changes, but keep refactors ([a9d2216](https://github.com/GoogleChromeLabs/quicklink/commit/a9d2216))
* revert multi-if statement ([cbe616a](https://github.com/GoogleChromeLabs/quicklink/commit/cbe616a))
* docs(CONTRIBUTING.md): add contribution guidelines ([4a3da7b](https://github.com/GoogleChromeLabs/quicklink/commit/4a3da7b))
* docs(README): add link to gatsby guess plugin + prefetch notes ([d67a31a](https://github.com/GoogleChromeLabs/quicklink/commit/d67a31a))
* docs(README): add logo and badges ([ec2b87c](https://github.com/GoogleChromeLabs/quicklink/commit/ec2b87c))
* docs(README): changes for new boolean priority ([7ba57a6](https://github.com/GoogleChromeLabs/quicklink/commit/7ba57a6))
* docs(README): fix references to GoogleChomeLabs ([9056abe](https://github.com/GoogleChromeLabs/quicklink/commit/9056abe))
* docs(README): minor tweaks ([2c04988](https://github.com/GoogleChromeLabs/quicklink/commit/2c04988))
* release(package.json): bump due to priority now being Boolean ([d3c3806](https://github.com/GoogleChromeLabs/quicklink/commit/d3c3806))
* release(package.json): bump version ([5064745](https://github.com/GoogleChromeLabs/quicklink/commit/5064745))
* infra(eslint): bump to ecma 9 ([6336333](https://github.com/GoogleChromeLabs/quicklink/commit/6336333))
* infra(linting): fix linting issues from #15 ([e6c90d8](https://github.com/GoogleChromeLabs/quicklink/commit/e6c90d8)), closes [#15](https://github.com/GoogleChromeLabs/quicklink/issues/15)
* infra(tests): add test for links scrolled into viewport ([7b7e5ff](https://github.com/GoogleChromeLabs/quicklink/commit/7b7e5ff))
* infra(tests): minor rename ([62b60cd](https://github.com/GoogleChromeLabs/quicklink/commit/62b60cd))
* infra(travis): attempt to fix server perms ([fdbabff](https://github.com/GoogleChromeLabs/quicklink/commit/fdbabff))
* infra(travis): config for tests ([2f0631b](https://github.com/GoogleChromeLabs/quicklink/commit/2f0631b))
* infra(travis): revert ports ([972eacc](https://github.com/GoogleChromeLabs/quicklink/commit/972eacc))
* fix: match long ternary style ([06a9a0a](https://github.com/GoogleChromeLabs/quicklink/commit/06a9a0a))
* fix: move puppeteer to devdeps ([d98cec8](https://github.com/GoogleChromeLabs/quicklink/commit/d98cec8))
* golf: assert against `Map.get` existence; ([2cd1daf](https://github.com/GoogleChromeLabs/quicklink/commit/2cd1daf))
* golf: combine `nav.connection` if-statements; ([34e9718](https://github.com/GoogleChromeLabs/quicklink/commit/34e9718))
* golf: hoist shared “prefetcher” helper; ([2a5f63b](https://github.com/GoogleChromeLabs/quicklink/commit/2a5f63b))
* golf: inline `isIntersecting` filter; ([1037e38](https://github.com/GoogleChromeLabs/quicklink/commit/1037e38))
* golf: observe link & update Map in same loop; ([47b370d](https://github.com/GoogleChromeLabs/quicklink/commit/47b370d))
* golf: remove `return` within observer; ([0e569a3](https://github.com/GoogleChromeLabs/quicklink/commit/0e569a3))
* golf: remove duplicate `typeof document` check; ([1662c0c](https://github.com/GoogleChromeLabs/quicklink/commit/1662c0c))
* golf: skip `setAttribute` & assign directly; ([f7cb14e](https://github.com/GoogleChromeLabs/quicklink/commit/f7cb14e))
* golf: use `Array.from` to gather URL values; ([5def7dd](https://github.com/GoogleChromeLabs/quicklink/commit/5def7dd))
* golf: use `doc.head` & `doc.querySelector`; ([53b7d15](https://github.com/GoogleChromeLabs/quicklink/commit/53b7d15))
* golf: use Object.assign for defaults; ([11c4369](https://github.com/GoogleChromeLabs/quicklink/commit/11c4369))
* golf: use Promise instead of AsyncFunction; ([84a0468](https://github.com/GoogleChromeLabs/quicklink/commit/84a0468))
* golf: use Set & share `prefetch` caller; ([d221c51](https://github.com/GoogleChromeLabs/quicklink/commit/d221c51))
* golf: use ternary within prefetch functions; ([be441dc](https://github.com/GoogleChromeLabs/quicklink/commit/be441dc))
* golf(breaking): use Boolean for `priority` option; ([e478a47](https://github.com/GoogleChromeLabs/quicklink/commit/e478a47))
## <small>0.0.3 (2018-12-05)</small>
* release(package.json) bump to 0.0.3 ([2d46f53](https://github.com/GoogleChromeLabs/quicklink/commit/2d46f53))
* Docs(README): add browser support and typo fix ([d2e18ad](https://github.com/GoogleChromeLabs/quicklink/commit/d2e18ad))
* Docs(README): minor revisions (why, support, projects) ([59d23d4](https://github.com/GoogleChromeLabs/quicklink/commit/59d23d4))
* docs(prefetch): add missing jsdoc comments ([cada9d4](https://github.com/GoogleChromeLabs/quicklink/commit/cada9d4))
* docs(README.md): link to APIs used ([a9af442](https://github.com/GoogleChromeLabs/quicklink/commit/a9af442))
* docs(README): add note about timeoutFn ([46b0874](https://github.com/GoogleChromeLabs/quicklink/commit/46b0874))
* docs(README): add notes on unpkg and initializing ([3609ac9](https://github.com/GoogleChromeLabs/quicklink/commit/3609ac9))
* docs(README): add why and related projects. ([8799aca](https://github.com/GoogleChromeLabs/quicklink/commit/8799aca))
* docs(README): further revisions to browser support ([2e49f1f](https://github.com/GoogleChromeLabs/quicklink/commit/2e49f1f))
* refactor(index.mjs): fix timeoutFn fallbacks ([bfa8917](https://github.com/GoogleChromeLabs/quicklink/commit/bfa8917))
* feat(bundlesize): add initial setup ([61012b4](https://github.com/GoogleChromeLabs/quicklink/commit/61012b4))
* demos(basic.html): add simplest usage demo ([e51781b](https://github.com/GoogleChromeLabs/quicklink/commit/e51781b))
* demos(network-idle): add network-idle-callback demo ([d4ae22d](https://github.com/GoogleChromeLabs/quicklink/commit/d4ae22d))
* core(index.mjs): add support for timeoutFn ([524b72e](https://github.com/GoogleChromeLabs/quicklink/commit/524b72e))
* infra(package.json): server->start, add demos to linting ([783a1b5](https://github.com/GoogleChromeLabs/quicklink/commit/783a1b5))
## <small>0.0.2 (2018-11-27)</small>
* 0.0.1 ([cddf434](https://github.com/GoogleChromeLabs/quicklink/commit/cddf434))
* 0.0.2 ([eb5c15e](https://github.com/GoogleChromeLabs/quicklink/commit/eb5c15e))
* Drop private ([fadf8b3](https://github.com/GoogleChromeLabs/quicklink/commit/fadf8b3))
* fix test typos ([f3f3f9b](https://github.com/GoogleChromeLabs/quicklink/commit/f3f3f9b))
* release(pkg.json): bump ([200d528](https://github.com/GoogleChromeLabs/quicklink/commit/200d528))
* tests(bootstrap): extend timeout to 20000 ([e5bf3f3](https://github.com/GoogleChromeLabs/quicklink/commit/e5bf3f3))
* docs(README): add API, polyfills, expand recipes ([9205c20](https://github.com/GoogleChromeLabs/quicklink/commit/9205c20))
* docs(README): add installation instructions, some better jobs. ([b2ffa41](https://github.com/GoogleChromeLabs/quicklink/commit/b2ffa41))
* docs(README): fix typo ([43306cf](https://github.com/GoogleChromeLabs/quicklink/commit/43306cf))
* docs(README): minor tweaks. ([baa9ec0](https://github.com/GoogleChromeLabs/quicklink/commit/baa9ec0))
* feat(index.mjs): add support for rIC timeout customisation ([18bea81](https://github.com/GoogleChromeLabs/quicklink/commit/18bea81))
* feat(tests refactoring): add mocha, chai tests with puppeteer ([d0b8911](https://github.com/GoogleChromeLabs/quicklink/commit/d0b8911))
* feat(tests): add initial testing ([fd81b71](https://github.com/GoogleChromeLabs/quicklink/commit/fd81b71))
* feat(tests): improve test coverage ([3ee52bd](https://github.com/GoogleChromeLabs/quicklink/commit/3ee52bd))
* feat(tests): move /demo to tests directory ([9d8ff74](https://github.com/GoogleChromeLabs/quicklink/commit/9d8ff74))
## <small>0.0.1 (2018-11-24)</small>
* (tidy) clean-up demo directory ([dc6bc58](https://github.com/GoogleChromeLabs/quicklink/commit/dc6bc58))
* (tidy) index.mjs: JSDoc comments ([e0d0afe](https://github.com/GoogleChromeLabs/quicklink/commit/e0d0afe))
* 0.0.1 ([9ad703b](https://github.com/GoogleChromeLabs/quicklink/commit/9ad703b))
* Add babelrc and travis configuration ([d417c9c](https://github.com/GoogleChromeLabs/quicklink/commit/d417c9c))
* Add demo directory ([67784f7](https://github.com/GoogleChromeLabs/quicklink/commit/67784f7))
* Add dist to gitignore ([3eb7f8c](https://github.com/GoogleChromeLabs/quicklink/commit/3eb7f8c))
* Add handling for effectiveconnectiontype ([47dbaf5](https://github.com/GoogleChromeLabs/quicklink/commit/47dbaf5))
* Add microbundle and configuration to package ([6571ff0](https://github.com/GoogleChromeLabs/quicklink/commit/6571ff0))
* Add package.json ([fd6149b](https://github.com/GoogleChromeLabs/quicklink/commit/fd6149b))
* Add saveData handling ([32902a7](https://github.com/GoogleChromeLabs/quicklink/commit/32902a7))
* Adds index: initial implementation ([ce0aa40](https://github.com/GoogleChromeLabs/quicklink/commit/ce0aa40))
* Clean-up source ([ecbd70f](https://github.com/GoogleChromeLabs/quicklink/commit/ecbd70f))
* clean(index, prefetch): move connection logic to prefetcher ([a7cafa4](https://github.com/GoogleChromeLabs/quicklink/commit/a7cafa4))
* clean(index.mjs, prefetch.mjs) move prefetching logic to one place ([6e5d9fb](https://github.com/GoogleChromeLabs/quicklink/commit/6e5d9fb))
* clean(src/index.mjs, src/prefetch.mjs): further reshuffling ([9fe6036](https://github.com/GoogleChromeLabs/quicklink/commit/9fe6036))
* docs(pkg, README): more tweaks. ([c1e66c5](https://github.com/GoogleChromeLabs/quicklink/commit/c1e66c5))
* feat(index, prefetch) Add support for higher prio fetches ([c4fb77a](https://github.com/GoogleChromeLabs/quicklink/commit/c4fb77a))
* fix(demo/index.html): Reference UMD build ([6e7a838](https://github.com/GoogleChromeLabs/quicklink/commit/6e7a838))
* Initial commit ([869ce69](https://github.com/GoogleChromeLabs/quicklink/commit/869ce69))
* Lots of ESLint fixes ([5d0af3d](https://github.com/GoogleChromeLabs/quicklink/commit/5d0af3d))
* minor(index, prefetch): renaming ([2c03bba](https://github.com/GoogleChromeLabs/quicklink/commit/2c03bba))
* tidy(demo/index.html): drop unused script reference ([4aecc0f](https://github.com/GoogleChromeLabs/quicklink/commit/4aecc0f))
* docs(package.json): get consistent with description ([c2f00ed](https://github.com/GoogleChromeLabs/quicklink/commit/c2f00ed))
* docs(README): add how it works, usage and recipes. ([0a26a65](https://github.com/GoogleChromeLabs/quicklink/commit/0a26a65))
* fix(src): Add license headers ([adf645e](https://github.com/GoogleChromeLabs/quicklink/commit/adf645e))

201
node_modules/quicklink/LICENSE generated vendored Normal file
View file

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

447
node_modules/quicklink/README.md generated vendored Normal file
View file

@ -0,0 +1,447 @@
<p align="center">
<img src="https://i.imgur.com/NVRZLHv.png" width="640" alt="quicklink">
<br>
<a href="https://www.npmjs.org/package/quicklink"><img src="https://img.shields.io/npm/v/quicklink.svg?style=flat" alt="npm"></a>
<a href="https://unpkg.com/quicklink"><img src="https://img.badgesize.io/https://unpkg.com/quicklink/dist/quicklink.js?compression=gzip" alt="gzip size"></a>
<a href="https://www.npmjs.com/package/quicklink"><img src="https://img.shields.io/npm/dt/quicklink.svg" alt="downloads" ></a>
<a href="https://travis-ci.org/GoogleChromeLabs/quicklink"><img src="https://travis-ci.org/GoogleChromeLabs/quicklink.svg?branch=master" alt="travis"></a>
</p>
# quicklink
> Faster subsequent page-loads by prefetching in-viewport links during idle time
## How it works
Quicklink attempts to make navigations to subsequent pages load faster. It:
* **Detects links within the viewport** (using [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API))
* **Waits until the browser is idle** (using [requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback))
* **Checks if the user isn't on a slow connection** (using `navigator.connection.effectiveType`) or has data-saver enabled (using `navigator.connection.saveData`)
* **Prefetches URLs to the links** (using [`<link rel=prefetch>`](https://www.w3.org/TR/resource-hints/#prefetch) or XHR). Provides some control over the request priority (can switch to `fetch()` if supported).
## Why
This project aims to be a drop-in solution for sites to prefetch links based on what is in the user's viewport. It also aims to be small (**< 1KB minified/gzipped**).
## Multi page apps
### Installation
For use with [node](https://nodejs.org) and [npm](https://npmjs.com):
```sh
npm install --save quicklink
```
You can also grab `quicklink` from [unpkg.com/quicklink](https://unpkg.com/quicklink).
### Usage
Once initialized, `quicklink` will automatically prefetch URLs for links that are in-viewport during idle time.
Quickstart:
```html
<!-- Include quicklink from dist -->
<script src="dist/quicklink.umd.js"></script>
<!-- Initialize (you can do this whenever you want) -->
<script>
quicklink.listen();
</script>
```
For example, you can initialize after the `load` event fires:
```html
<script>
window.addEventListener('load', () =>{
quicklink.listen();
});
</script>
```
ES Module import:
```js
import { listen, prefetch } from "quicklink";
```
## Single page apps (React)
### Installation
First, install the packages with [node](https://nodejs.org) and [npm](https://npmjs.com):
```sh
npm install quicklink webpack-route-manifest --save-dev
```
Then, configure Webpack route manifest into your project, as explained [here](https://github.com/lukeed/webpack-route-manifest).
This will generate a map of routes and chunks called `rmanifest.json`. It can be obtained at:
* URL: `site_url/rmanifest.json`
* Window object: `window.__rmanifest`
### Usage
Import `quicklink` React HOC where want to add prefetching functionality.
Wrap your routes with the `withQuicklink()` HOC.
Example:
```sh
import { withQuicklink } from 'quicklink/dist/react/hoc.js';
const options = {
origins: []
};
<Suspense fallback={<div>Loading...</div>}>
<Route path="/" exact component={withQuicklink(Home, options)} />
<Route path="/blog" exact component={withQuicklink(Blog, options)} />
<Route path="/blog/:title" component={withQuicklink(Article, options)} />
<Route path="/about" exact component={withQuicklink(About, options)} />
</Suspense>
```
## API
### quicklink.listen(options)
Returns: `Function`
A "reset" function is returned, which will empty the active `IntersectionObserver` and the cache of URLs that have already been prefetched. This can be used between page navigations and/or when significant DOM changes have occurred.
#### options.delay
Type: `Number`<br>
Default: `0`
The _amount of time_ each link needs to stay inside the viewport before being prefetched, in milliseconds.
#### options.el
Type: `HTMLElement`<br>
Default: `document.body`
The DOM element to observe for in-viewport links to prefetch.
#### options.limit
Type: `Number`<br>
Default: `Infinity`
The _total_ requests that can be prefetched while observing the `options.el` container.
#### options.threshold
Type: `Number`<br>
Default: `0`
The _area percentage_ of each link that must have entered the viewport to be fetched, in its decimal form (e.g. 0.25 = 25%).
#### options.throttle
Type: `Number`<br>
Default: `Infinity`
The _concurrency limit_ for simultaneous requests while observing the `options.el` container.
#### options.timeout
Type: `Number`<br>
Default: `2000`
The `requestIdleCallback` timeout, in milliseconds.
> **Note:** The browser must be idle for the configured duration before prefetching.
#### options.timeoutFn
Type: `Function`<br>
Default: `requestIdleCallback`
A function used for specifying a `timeout` delay.<br>
This can be swapped out for a custom function like [networkIdleCallback](https://github.com/pastelsky/network-idle-callback) (see demos).
By default, this uses [`requestIdleCallback`](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback) or the embedded polyfill.
#### options.priority
Type: `Boolean`<br>
Default: `false`
Whether or not the URLs within the `options.el` container should be treated as high priority.
When `true`, quicklink will attempt to use the `fetch()` API if supported (rather than `link[rel=prefetch]`).
#### options.origins
Type: `Array<String>`<br>
Default: `[location.hostname]`
A static array of URL hostnames that are allowed to be prefetched.<br>
Defaults to the same domain origin, which prevents _any_ cross-origin requests.
**Important:** An empty array (`[]`) allows ***all origins*** to be prefetched.
#### options.ignores
Type: `RegExp` or `Function` or `Array`<br>
Default: `[]`
Determine if a URL should be prefetched.
When a `RegExp` tests positive, a `Function` returns `true`, or an `Array` contains the string, then the URL is _not_ prefetched.
> **Note:** An `Array` may contain `String`, `RegExp`, or `Function` values.
> **Important:** This logic is executed _after_ origin matching!
#### options.onError
Type: `Function`<br>
Default: None
An optional error handler that will receive any errors from prefetched requests.<br>
By default, these errors are silently ignored.
#### options.hrefFn
Type: `Function`<br>
Default: None
An optional function to generate the URL to prefetch. It receives an [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) as the argument.
### quicklink.prefetch(urls, isPriority)
Returns: `Promise`
The `urls` provided are always passed through `Promise.all`, which means the result will always resolve to an Array.
> **Important:** You much `catch` you own request error(s).
#### urls
Type: `String` or `Array<String>`<br>
Required: `true`
One or many URLs to be prefetched.
> **Note:** Each `url` value is resolved from the current location.
#### isPriority
Type: `Boolean`<br>
Default: `false`
Whether or not the URL(s) should be treated as "high priority" targets.<br>
By default, calls to `prefetch()` are low priority.
> **Note:** This behaves identically to `listen()`'s `priority` option.
## Polyfills
`quicklink`:
* Includes a very small fallback for [requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback)
* Requires `IntersectionObserver` to be supported (see [CanIUse](https://caniuse.com/#feat=intersectionobserver)). We recommend conditionally polyfilling this feature with a service like Polyfill.io:
```html
<script src="https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver"></script>
```
Alternatively, see the [Intersection Observer polyfill](https://github.com/w3c/IntersectionObserver/tree/master/polyfill).
## Recipes
### Set a custom timeout for prefetching resources
Defaults to 2 seconds (via `requestIdleCallback`). Here we override it to 4 seconds:
```js
quicklink.listen({
timeout: 4000
});
```
### Set the DOM element to observe for in-viewport links
Defaults to `document` otherwise.
```js
quicklink.listen({
el: document.getElementById('carousel')
});
```
### Programmatically `prefetch()` URLs
If you would prefer to provide a static list of URLs to be prefetched, instead of detecting those in-viewport, customizing URLs is supported.
```js
// Single URL
quicklink.prefetch('2.html');
// Multiple URLs
quicklink.prefetch(['2.html', '3.html', '4.js']);
// Multiple URLs, with high priority
// Note: Can also be use with single URL!
quicklink.prefetch(['2.html', '3.html', '4.js'], true);
```
### Set the request priority for prefetches while scrolling
Defaults to low-priority (`rel=prefetch` or XHR). For high-priority (`priority: true`), attempts to use `fetch()` or falls back to XHR.
> **Note:** This runs `prefetch(..., true)` with URLs found within the `options.el` container.
```js
quicklink.listen({ priority: true });
```
### Specify a custom list of allowed origins
Provide a list of hostnames that should be prefetch-able. Only the same origin is allowed by default.
> **Important:** You must also include your own hostname!
```js
quicklink.listen({
origins: [
// add mine
'my-website.com',
'api.my-website.com',
// add third-parties
'other-website.com',
'example.com',
// ...
]
});
```
### Allow all origins
Enables all cross-origin requests to be made.
> **Note:** You may run into [CORB](https://chromium.googlesource.com/chromium/src/+/master/services/network/cross_origin_read_blocking_explainer.md) and [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues!
```js
quicklink.listen({
origins: true,
// or
origins: []
});
```
### Custom Ignore Patterns
These filters run _after_ the `origins` matching has run. Ignores can be useful for avoiding large file downloads or for responding to DOM attributes dynamically.
```js
// Same-origin restraint is enabled by default.
//
// This example will ignore all requests to:
// - all "/api/*" pathnames
// - all ".zip" extensions
// - all <a> tags with "noprefetch" attribute
//
quicklink.listen({
ignores: [
/\/api\/?/,
uri => uri.includes('.zip'),
(uri, elem) => elem.hasAttribute('noprefetch')
]
});
```
You may also wish to ignore prefetches to URLs which contain a URL fragment (e.g. `index.html#top`). This can be useful if you (1) are using anchors to headings in a page or (2) have URL fragments setup for a single-page application, and which to avoid firing prefetches for similar URLs.
Using `ignores` this can be achieved as follows:
```js
quicklink.listen({
ignores: [
uri => uri.includes('#')
// or RegExp: /#(.+)/
// or element matching: (uri, elem) => !!elem.hash
]
});
```
### Custom URL to prefetch via hrefFn callback
The hrefFn method allows to build the URL to prefetch (e.g. API endpoint) on the fly instead of the prefetching the `href` attribute URL.
```js
quicklink.listen({
hrefFn: function(element) {
return element.href.replace('html','json');
}
});
```
## Browser Support
The prefetching provided by `quicklink` can be viewed as a [progressive enhancement](https://www.smashingmagazine.com/2009/04/progressive-enhancement-what-it-is-and-how-to-use-it/). Cross-browser support is as follows:
* Without polyfills: Chrome, Safari ≥ 12.1, Firefox, Edge, Opera, Android Browser, Samsung Internet.
* With [Intersection Observer polyfill](https://github.com/w3c/IntersectionObserver/tree/master/polyfill) ~6KB gzipped/minified: Safari ≤ 12.0, IE11
* With the above and a [Set()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) and [Array.from](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) polyfill: IE9 and IE10. [Core.js](https://github.com/zloirock/core-js) provides both `Set()` and `Array.from()` shims. Projects like [es6-shim](https://github.com/paulmillr/es6-shim/blob/master/README.md) are an alternative you can consider.
Certain features have layered support:
* The [Network Information API](https://wicg.github.io/netinfo/), which is used to check if the user has a slow effective connection type (via `navigator.connection.effectiveType`) is only available in [Chrome 61+ and Opera 57+](https://caniuse.com/#feat=netinfo)
* If opting for `{priority: true}` and the [Fetch API](https://fetch.spec.whatwg.org/) isn't available, XHR will be used instead.
## Using the prefetcher directly
A `prefetch` method can be individually imported for use in other projects.<br>
This method includes the logic to respect Data Saver and 2G connections. It also issues requests thru `fetch()`, XHRs, or `link[rel=prefetch]` depending on (a) the `isPriority` value and (b) the current browser's support.
After installing `quicklink` as a dependency, you can use it as follows:
```html
<script type="module">
import { prefetch } from 'quicklink';
prefetch(['1.html', '2.html']).catch(err => {
// Handle own errors
});
</script>
```
## Demo
### Glitch demos
* [Using Quicklink in a multi-page site](https://github.com/GoogleChromeLabs/quicklink/tree/master/demos/news)
* [Using Quicklink with Service Workers (via Workbox)](https://github.com/GoogleChromeLabs/quicklink/tree/master/demos/news-workbox)
* [Using Quicklink to prefetch API calls instead of `href` attribute](https://github.com/GoogleChromeLabs/quicklink/tree/master/demos/hrefFn)
### Research
Here's a [WebPageTest run](https://www.webpagetest.org/video/view.php?id=181212_4c294265117680f2636676721cc886613fe2eede&data=1) for our [demo](https://keyword-2-ecd7b.firebaseapp.com/) improving page-load performance by up to 4 seconds via quicklink's prefetching. A [video](https://youtu.be/rQ75YEbJicw) comparison of the before/after prefetching is on YouTube.
For demo purposes, we deployed a version of the [Google Blog](https://blog.google) on
Firebase hosting. We then deployed another version of it, adding quicklink to the homepage and benchmarked navigating from the homepage to an article that was
automatically prefetched. The prefetched version loaded faster.
Please note: this is by no means an exhaustive benchmark of the pros and cons of in-viewport link prefetching. Just a demo of the potential improvements the approach can offer. Your own mileage may heavily vary.
## Additional notes
### Session Stitching
Cross-origin prefetching (e.g a.com/foo.html prefetches b.com/bar.html) has a number of limitations. One such limitation is with session-stitching. b.com may expect a.com's navigation requests to include session information (e.g a temporary ID - e.g b.com/bar.html?hash=<>&timestamp=<>), where this information is used to customize the experience or log information to analytics. If session-stitching requires a timestamp in the URL, what is prefetched and stored in the HTTP cache may not be the same as the one the user ultimately navigates to. This introduces a challenge as it can result in double prefetches.
To workaround this problem, you can consider passing along session information via the [ping attribute](https://caniuse.com/#feat=ping) (separately) so the origin can stitch a session together asynchronously.
### Ad-related considerations
Sites that rely on ads as a source of monetization should not prefetch ad-links, to avoid unintentionally counting clicks against those ad placements, which can lead to inflated Ad CTR (click-through-rate).
Ads appear on sites mostly in two ways:
- **Inside iframes:** By default, most ad-servers render ads within iframes. In these cases, those ad-links won't be prefetched by Quicklink, unless a developer explicitly passes in the URL of an ads iframe. The reason is that the library look-up for in-viewport elements is restricted to those of the top-level origin.
- **Outside iframes:**: In cases when the site shows same-origin ads, displayed in the top-level document (e.g. by hosting the ads themselves and by displaying the ads in the page directly), the developer needs to explicitly tell Quicklink to avoid prefetching these links. This can be achieved by passing the URL or subpath of the ad-link, or the element containing it to the [custom ignore patterns list](https://github.com/GoogleChromeLabs/quicklink#custom-ignore-patterns).
## Related projects
* Using [Gatsby](https://gatsbyjs.org)? You already get most of this for free baked in. It uses `Intersection Observer` to prefetch all of the links that are in view and provided heavy inspiration for this project.
* Want a more data-driven approach? See [Guess.js](https://guess-js.github.io). It uses analytics and machine-learning to prefetch resources based on how users navigate your site. It also has plugins for [Webpack](https://www.npmjs.com/package/guess-webpack) and [Gatsby](https://www.gatsbyjs.org/docs/optimizing-site-performance-with-guessjs/).
* WordPress users can now get quicklink as a [WordPress Plugin from the plugin repository](https://wordpress.org/plugins/quicklink/).
* Drupal users can install the [Quicklink Drupal module](https://www.drupal.org/project/quicklink).
* Magento 2 users can install the [Quicklink Magento 2 module](https://marketplace.magento.com/rafaelcg-magento2-quicklink.html).
* Want less aggressive prefetching? [instant.page](https://instant.page/) prefetches on mouseover and touchstart, right before a click.
## License
Licensed under the Apache-2.0 license.

1
node_modules/quicklink/dist/quicklink.js generated vendored Normal file
View file

@ -0,0 +1 @@
function e(e){return new Promise(function(n,t,r){(r=new XMLHttpRequest).open("GET",e,r.withCredentials=!0),r.onload=function(){200===r.status?n():t()},r.send()})}var n,t=(n=document.createElement("link")).relList&&n.relList.supports&&n.relList.supports("prefetch")?function(e){return new Promise(function(n,t,r){(r=document.createElement("link")).rel="prefetch",r.href=e,r.onload=n,r.onerror=t,document.head.appendChild(r)})}:e,r=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},o=new Set;function i(n,r,i){if(i=navigator.connection){if(i.saveData)return Promise.reject(new Error("Cannot prefetch, Save-Data is enabled"));if(/2g/.test(i.effectiveType))return Promise.reject(new Error("Cannot prefetch, network conditions are poor"))}return Promise.all([].concat(n).map(function(n){if(!o.has(n))return o.add(n),(r?function(n){return window.fetch?fetch(n,{credentials:"include"}):e(n)}:t)(new URL(n,location.href).toString())}))}exports.listen=function(e){if(e||(e={}),window.IntersectionObserver){var n=function(e){e=e||1;var n=[],t=0;function r(){t<e&&n.length>0&&(n.shift()(),t++)}return[function(e){n.push(e)>1||r()},function(){t--,r()}]}(e.throttle||1/0),t=n[0],c=n[1],u=e.limit||1/0,f=e.origins||[location.hostname],s=e.ignores||[],a=e.delay||0,l=[],h=e.timeoutFn||r,d="function"==typeof e.hrefFn&&e.hrefFn,m=new IntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting)l.push((n=n.target).href),function(e,n){n?setTimeout(e,n):e()}(function(){-1!==l.indexOf(n.href)&&(m.unobserve(n),o.size<u&&t(function(){i(d?d(n):n.href,e.priority).then(c).catch(function(n){c(),e.onError&&e.onError(n)})}))},a);else{var r=l.indexOf((n=n.target).href);r>-1&&l.splice(r)}})},{threshold:e.threshold||0});return h(function(){(e.el||document).querySelectorAll("a").forEach(function(e){f.length&&!f.includes(e.hostname)||function e(n,t){return Array.isArray(t)?t.some(function(t){return e(n,t)}):(t.test||t).call(t,n.href,n)}(e,s)||m.observe(e)})},{timeout:e.timeout||2e3}),function(){o.clear(),m.disconnect()}}},exports.prefetch=i;

1
node_modules/quicklink/dist/quicklink.mjs generated vendored Normal file
View file

@ -0,0 +1 @@
function e(e){return new Promise(function(n,t,r){(r=new XMLHttpRequest).open("GET",e,r.withCredentials=!0),r.onload=function(){200===r.status?n():t()},r.send()})}var n,t=(n=document.createElement("link")).relList&&n.relList.supports&&n.relList.supports("prefetch")?function(e){return new Promise(function(n,t,r){(r=document.createElement("link")).rel="prefetch",r.href=e,r.onload=n,r.onerror=t,document.head.appendChild(r)})}:e,r=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},o=new Set;function i(e){if(e||(e={}),window.IntersectionObserver){var n=function(e){e=e||1;var n=[],t=0;function r(){t<e&&n.length>0&&(n.shift()(),t++)}return[function(e){n.push(e)>1||r()},function(){t--,r()}]}(e.throttle||1/0),t=n[0],i=n[1],u=e.limit||1/0,f=e.origins||[location.hostname],a=e.ignores||[],s=e.delay||0,l=[],h=e.timeoutFn||r,d="function"==typeof e.hrefFn&&e.hrefFn,m=new IntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting)l.push((n=n.target).href),function(e,n){n?setTimeout(e,n):e()}(function(){-1!==l.indexOf(n.href)&&(m.unobserve(n),o.size<u&&t(function(){c(d?d(n):n.href,e.priority).then(i).catch(function(n){i(),e.onError&&e.onError(n)})}))},s);else{var r=l.indexOf((n=n.target).href);r>-1&&l.splice(r)}})},{threshold:e.threshold||0});return h(function(){(e.el||document).querySelectorAll("a").forEach(function(e){f.length&&!f.includes(e.hostname)||function e(n,t){return Array.isArray(t)?t.some(function(t){return e(n,t)}):(t.test||t).call(t,n.href,n)}(e,a)||m.observe(e)})},{timeout:e.timeout||2e3}),function(){o.clear(),m.disconnect()}}}function c(n,r,i){if(i=navigator.connection){if(i.saveData)return Promise.reject(new Error("Cannot prefetch, Save-Data is enabled"));if(/2g/.test(i.effectiveType))return Promise.reject(new Error("Cannot prefetch, network conditions are poor"))}return Promise.all([].concat(n).map(function(n){if(!o.has(n))return o.add(n),(r?function(n){return window.fetch?fetch(n,{credentials:"include"}):e(n)}:t)(new URL(n,location.href).toString())}))}export{i as listen,c as prefetch};

1
node_modules/quicklink/dist/quicklink.modern.js generated vendored Normal file
View file

@ -0,0 +1 @@
function e(e){return new Promise((t,n,r)=>{(r=new XMLHttpRequest).open("GET",e,r.withCredentials=!0),r.onload=()=>{200===r.status?t():n()},r.send()})}function t(t){return window.fetch?fetch(t,{credentials:"include"}):e(t)}const n=(r=document.createElement("link")).relList&&r.relList.supports&&r.relList.supports("prefetch")?function(e){return new Promise((t,n,r)=>{(r=document.createElement("link")).rel="prefetch",r.href=e,r.onload=t,r.onerror=n,document.head.appendChild(r)})}:e;var r;const o=window.requestIdleCallback||function(e){const t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i=new Set;function c(e){if(e||(e={}),!window.IntersectionObserver)return;const[t,n]=function(e){e=e||1;var t=[],n=0;function r(){n<e&&t.length>0&&(t.shift()(),n++)}return[function(e){t.push(e)>1||r()},function(){n--,r()}]}(e.throttle||1/0),r=e.limit||1/0,c=e.origins||[location.hostname],a=e.ignores||[],u=e.delay||0,f=[],l=e.timeoutFn||o,h="function"==typeof e.hrefFn&&e.hrefFn,d=new IntersectionObserver(o=>{o.forEach(o=>{if(o.isIntersecting)f.push((o=o.target).href),((e,t)=>{t?setTimeout(e,t):e()})(()=>{-1!==f.indexOf(o.href)&&(d.unobserve(o),i.size<r&&t(()=>{s(h?h(o):o.href,e.priority).then(n).catch(t=>{n(),e.onError&&e.onError(t)})}))},u);else{const e=f.indexOf((o=o.target).href);e>-1&&f.splice(e)}})});return l(()=>{(e.el||document).querySelectorAll("a").forEach(e=>{c.length&&!c.includes(e.hostname)||function e(t,n){return Array.isArray(n)?n.some(n=>e(t,n)):(n.test||n).call(n,t.href,t)}(e,a)||d.observe(e)})},{timeout:e.timeout||2e3}),function(){i.clear(),d.disconnect()}}function s(e,r,o){if(o=navigator.connection){if(o.saveData)return Promise.reject(new Error("Cannot prefetch, Save-Data is enabled"));if(/2g/.test(o.effectiveType))return Promise.reject(new Error("Cannot prefetch, network conditions are poor"))}return Promise.all([].concat(e).map(e=>{if(!i.has(e))return i.add(e),(r?t:n)(new URL(e,location.href).toString())}))}export{c as listen,s as prefetch};

1
node_modules/quicklink/dist/quicklink.umd.js generated vendored Normal file
View file

@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.quicklink={})}(this,function(e){function n(e){return new Promise(function(n,t,r){(r=new XMLHttpRequest).open("GET",e,r.withCredentials=!0),r.onload=function(){200===r.status?n():t()},r.send()})}var t,r=(t=document.createElement("link")).relList&&t.relList.supports&&t.relList.supports("prefetch")?function(e){return new Promise(function(n,t,r){(r=document.createElement("link")).rel="prefetch",r.href=e,r.onload=n,r.onerror=t,document.head.appendChild(r)})}:n,o=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},i=new Set;function c(e,t,o){if(o=navigator.connection){if(o.saveData)return Promise.reject(new Error("Cannot prefetch, Save-Data is enabled"));if(/2g/.test(o.effectiveType))return Promise.reject(new Error("Cannot prefetch, network conditions are poor"))}return Promise.all([].concat(e).map(function(e){if(!i.has(e))return i.add(e),(t?function(e){return window.fetch?fetch(e,{credentials:"include"}):n(e)}:r)(new URL(e,location.href).toString())}))}e.listen=function(e){if(e||(e={}),window.IntersectionObserver){var n=function(e){e=e||1;var n=[],t=0;function r(){t<e&&n.length>0&&(n.shift()(),t++)}return[function(e){n.push(e)>1||r()},function(){t--,r()}]}(e.throttle||1/0),t=n[0],r=n[1],f=e.limit||1/0,u=e.origins||[location.hostname],s=e.ignores||[],a=e.delay||0,l=[],h=e.timeoutFn||o,d="function"==typeof e.hrefFn&&e.hrefFn,m=new IntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting)l.push((n=n.target).href),function(e,n){n?setTimeout(e,n):e()}(function(){-1!==l.indexOf(n.href)&&(m.unobserve(n),i.size<f&&t(function(){c(d?d(n):n.href,e.priority).then(r).catch(function(n){r(),e.onError&&e.onError(n)})}))},a);else{var o=l.indexOf((n=n.target).href);o>-1&&l.splice(o)}})},{threshold:e.threshold||0});return h(function(){(e.el||document).querySelectorAll("a").forEach(function(e){u.length&&!u.includes(e.hostname)||function e(n,t){return Array.isArray(t)?t.some(function(t){return e(n,t)}):(t.test||t).call(t,n.href,n)}(e,s)||m.observe(e)})},{timeout:e.timeout||2e3}),function(){i.clear(),m.disconnect()}}},e.prefetch=c});

120
node_modules/quicklink/dist/react/hoc.js generated vendored Normal file
View file

@ -0,0 +1,120 @@
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.withQuicklink = void 0;
var _react = _interopRequireWildcard(require("react"));
var _routeManifest = _interopRequireDefault(require("route-manifest"));
var _quicklink = require("./quicklink");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var useIntersect = function useIntersect() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref$root = _ref.root,
root = _ref$root === void 0 ? null : _ref$root,
rootMargin = _ref.rootMargin,
_ref$threshold = _ref.threshold,
threshold = _ref$threshold === void 0 ? 0 : _ref$threshold;
var _useState = (0, _react.useState)({}),
_useState2 = _slicedToArray(_useState, 2),
entry = _useState2[0],
updateEntry = _useState2[1];
var _useState3 = (0, _react.useState)(null),
_useState4 = _slicedToArray(_useState3, 2),
node = _useState4[0],
setNode = _useState4[1];
var observer = (0, _react.useRef)(null);
(0, _react.useEffect)(function () {
if (observer.current) observer.current.disconnect();
observer.current = new window.IntersectionObserver(function (_ref2) {
var _ref3 = _slicedToArray(_ref2, 1),
entry = _ref3[0];
return updateEntry(entry);
}, {
root: root,
rootMargin: rootMargin,
threshold: threshold
});
var currentObserver = observer.current;
if (node) currentObserver.observe(node);
return function () {
return currentObserver.disconnect();
};
}, [node, root, rootMargin, threshold]);
return [setNode, entry];
};
var __defaultAccessor = function __defaultAccessor(mix) {
return mix && mix.href || mix || '';
};
var prefetchChunks = function prefetchChunks(entry, prefetchHandler) {
var accessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : __defaultAccessor;
var _rmanifest = (0, _routeManifest["default"])(window.__rmanifest, entry.pathname),
files = _rmanifest.files;
var chunkURLs = files.map(accessor).filter(Boolean);
if (chunkURLs.length) {
prefetchHandler(chunkURLs);
} else {
// also prefetch regular links in-viewport
prefetchHandler(entry.href);
}
};
var withQuicklink = function withQuicklink(Component) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return function (props) {
var _useIntersect = useIntersect({
root: document.body.parentElement
}),
_useIntersect2 = _slicedToArray(_useIntersect, 2),
ref = _useIntersect2[0],
entry = _useIntersect2[1];
var intersectionRatio = entry.intersectionRatio;
(0, _react.useEffect)(function () {
options.prefetchChunks = prefetchChunks;
if (intersectionRatio > 0) {
(0, _quicklink.listen)(options);
}
}, [intersectionRatio]);
return /*#__PURE__*/_react["default"].createElement("div", {
ref: ref
}, /*#__PURE__*/_react["default"].createElement(Component, props));
};
};
exports.withQuicklink = withQuicklink;
//# sourceMappingURL=hoc.js.map

1
node_modules/quicklink/dist/react/hoc.js.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"sources":["../../src/react-chunks.js"],"names":[],"mappings":";;;;;;;;;AAgBA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;AAEA,IAAM,YAAY,GAAG,SAAf,YAAe,GAAqD;AAAA,iFAAP,EAAO;AAAA,uBAAlD,IAAkD;AAAA,MAAlD,IAAkD,0BAA3C,IAA2C;AAAA,MAArC,UAAqC,QAArC,UAAqC;AAAA,4BAAzB,SAAyB;AAAA,MAAzB,SAAyB,+BAAb,CAAa;;AAAA,kBAC3C,qBAAS,EAAT,CAD2C;AAAA;AAAA,MACjE,KADiE;AAAA,MAC1D,WAD0D;;AAAA,mBAEhD,qBAAS,IAAT,CAFgD;AAAA;AAAA,MAEjE,IAFiE;AAAA,MAE3D,OAF2D;;AAGxE,MAAM,QAAQ,GAAG,mBAAO,IAAP,CAAjB;AAEA,wBAAU,YAAM;AACd,QAAI,QAAQ,CAAC,OAAb,EAAsB,QAAQ,CAAC,OAAT,CAAiB,UAAjB;AACtB,IAAA,QAAQ,CAAC,OAAT,GAAmB,IAAI,MAAM,CAAC,oBAAX,CACjB;AAAA;AAAA,UAAE,KAAF;;AAAA,aAAa,WAAW,CAAC,KAAD,CAAxB;AAAA,KADiB,EAEjB;AACE,MAAA,IAAI,EAAJ,IADF;AAEE,MAAA,UAAU,EAAV,UAFF;AAGE,MAAA,SAAS,EAAT;AAHF,KAFiB,CAAnB;AAFc,QAWG,eAXH,GAWuB,QAXvB,CAWN,OAXM;AAYd,QAAI,IAAJ,EAAU,eAAe,CAAC,OAAhB,CAAwB,IAAxB;AAEV,WAAO;AAAA,aAAM,eAAe,CAAC,UAAhB,EAAN;AAAA,KAAP;AACD,GAfD,EAeG,CAAC,IAAD,EAAO,IAAP,EAAa,UAAb,EAAyB,SAAzB,CAfH;AAiBA,SAAO,CAAC,OAAD,EAAU,KAAV,CAAP;AACD,CAvBD;;AAyBA,IAAM,iBAAiB,GAAG,SAApB,iBAAoB,CAAA,GAAG,EAAI;AAC/B,SAAQ,GAAG,IAAI,GAAG,CAAC,IAAZ,IAAqB,GAArB,IAA4B,EAAnC;AACD,CAFD;;AAIA,IAAM,cAAc,GAAG,SAAjB,cAAiB,CAAC,KAAD,EAAQ,eAAR,EAA0D;AAAA,MAAjC,QAAiC,uEAAtB,iBAAsB;;AAAA,mBAC7D,+BAAU,MAAM,CAAC,WAAjB,EAA8B,KAAK,CAAC,QAApC,CAD6D;AAAA,MACvE,KADuE,cACvE,KADuE;;AAE/E,MAAM,SAAS,GAAG,KAAK,CAAC,GAAN,CAAU,QAAV,EAAoB,MAApB,CAA2B,OAA3B,CAAlB;;AACA,MAAI,SAAS,CAAC,MAAd,EAAsB;AACpB,IAAA,eAAe,CAAC,SAAD,CAAf;AACD,GAFD,MAEO;AACL;AACA,IAAA,eAAe,CAAC,KAAK,CAAC,IAAP,CAAf;AACD;AACF,CATD;;AAWA,IAAM,aAAa,GAAG,SAAhB,aAAgB,CAAC,SAAD,EAA6B;AAAA,MAAjB,OAAiB,uEAAP,EAAO;AACjD,SAAO,UAAA,KAAK,EAAI;AAAA,wBACK,YAAY,CAAC;AAAC,MAAA,IAAI,EAAE,QAAQ,CAAC,IAAT,CAAc;AAArB,KAAD,CADjB;AAAA;AAAA,QACT,GADS;AAAA,QACJ,KADI;;AAEd,QAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAhC;AAEF,0BAAU,YAAM;AACZ,MAAA,OAAO,CAAC,cAAR,GAAyB,cAAzB;;AAEA,UAAI,iBAAiB,GAAG,CAAxB,EAA2B;AACzB,+BAAO,OAAP;AACD;AACF,KANH,EAMK,CAAC,iBAAD,CANL;AAQA,wBACC;AAAK,MAAA,GAAG,EAAE;AAAV,oBACK,gCAAC,SAAD,EAAe,KAAf,CADL,CADD;AAKA,GAjBA;AAkBD,CAnBD","file":"hoc.js","sourcesContent":["/*\n * Copyright 2019-2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport rmanifest from 'route-manifest';\nimport { listen } from './quicklink';\n\nconst useIntersect = ({ root = null, rootMargin, threshold = 0 } = {}) => {\n const [entry, updateEntry] = useState({});\n const [node, setNode] = useState(null);\n const observer = useRef(null);\n\n useEffect(() => {\n if (observer.current) observer.current.disconnect();\n observer.current = new window.IntersectionObserver(\n ([entry]) => updateEntry(entry),\n {\n root,\n rootMargin,\n threshold\n }\n );\n\n const { current: currentObserver } = observer;\n if (node) currentObserver.observe(node);\n\n return () => currentObserver.disconnect();\n }, [node, root, rootMargin, threshold]);\n\n return [setNode, entry];\n};\n\nconst __defaultAccessor = mix => {\n return (mix && mix.href) || mix || '';\n};\n\nconst prefetchChunks = (entry, prefetchHandler, accessor = __defaultAccessor) => {\n const { files } = rmanifest(window.__rmanifest, entry.pathname);\n const chunkURLs = files.map(accessor).filter(Boolean);\n if (chunkURLs.length) {\n prefetchHandler(chunkURLs);\n } else {\n // also prefetch regular links in-viewport\n prefetchHandler(entry.href);\n }\n};\n\nconst withQuicklink = (Component, options = {}) => {\n return props => {\n\t\tconst [ref, entry] = useIntersect({root: document.body.parentElement});\n const intersectionRatio = entry.intersectionRatio;\n \n\t\tuseEffect(() => {\n options.prefetchChunks = prefetchChunks;\n\n if (intersectionRatio > 0) {\n listen(options);\n }\n }, [intersectionRatio]); \n\t\t\n\t\treturn (\n\t\t\t<div ref={ref}>\n <Component {...props} />\n\t\t\t</div>\n\t\t);\n\t};\n};\n\nexport {\n withQuicklink\n};\n"]}

1
node_modules/quicklink/dist/react/quicklink.js generated vendored Normal file
View file

@ -0,0 +1 @@
function e(e){return new Promise(function(n,t,r){(r=new XMLHttpRequest).open("GET",e,r.withCredentials=!0),r.onload=function(){200===r.status?n():t()},r.send()})}var n,t=(n=document.createElement("link")).relList&&n.relList.supports&&n.relList.supports("prefetch")?function(e){return new Promise(function(n,t,r){(r=document.createElement("link")).rel="prefetch",r.href=e,r.onload=n,r.onerror=t,document.head.appendChild(r)})}:e,r=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},o=new Set;function i(n,r,i){if(i=navigator.connection){if(i.saveData)return Promise.reject(new Error("Cannot prefetch, Save-Data is enabled"));if(/2g/.test(i.effectiveType))return Promise.reject(new Error("Cannot prefetch, network conditions are poor"))}return Promise.all([].concat(n).map(function(n){if(!o.has(n))return o.add(n),(r?function(n){return window.fetch?fetch(n,{credentials:"include"}):e(n)}:t)(new URL(n,location.href).toString())}))}exports.listen=function(e){if(e||(e={}),window.IntersectionObserver){var n=function(e){e=e||1;var n=[],t=0;function r(){t<e&&n.length>0&&(n.shift()(),t++)}return[function(e){n.push(e)>1||r()},function(){t--,r()}]}(e.throttle||1/0),t=n[0],c=n[1],u=e.limit||1/0,a=e.origins||[location.hostname],s=e.ignores||[],f=e.timeoutFn||r,l=e.prefetchChunks,h=function(n){i(n,e.priority).then(c).catch(function(n){c(),e.onError&&e.onError(n)})},d=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting&&(d.unobserve(e=e.target),o.size<u&&t(function(){l?l(e,h):h(e.href)}))})});return f(function(){(e.el||document).querySelectorAll("a").forEach(function(e){a.length&&!a.includes(e.hostname)||function e(n,t){return Array.isArray(t)?t.some(function(t){return e(n,t)}):(t.test||t).call(t,n.href,n)}(e,s)||d.observe(e)})},{timeout:e.timeout||2e3}),function(){o.clear(),d.disconnect()}}},exports.prefetch=i;

1
node_modules/quicklink/dist/react/quicklink.mjs generated vendored Normal file
View file

@ -0,0 +1 @@
function e(e){return new Promise(function(n,t,r){(r=new XMLHttpRequest).open("GET",e,r.withCredentials=!0),r.onload=function(){200===r.status?n():t()},r.send()})}var n,t=(n=document.createElement("link")).relList&&n.relList.supports&&n.relList.supports("prefetch")?function(e){return new Promise(function(n,t,r){(r=document.createElement("link")).rel="prefetch",r.href=e,r.onload=n,r.onerror=t,document.head.appendChild(r)})}:e,r=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},o=new Set;function i(e){if(e||(e={}),window.IntersectionObserver){var n=function(e){e=e||1;var n=[],t=0;function r(){t<e&&n.length>0&&(n.shift()(),t++)}return[function(e){n.push(e)>1||r()},function(){t--,r()}]}(e.throttle||1/0),t=n[0],i=n[1],u=e.limit||1/0,a=e.origins||[location.hostname],f=e.ignores||[],s=e.timeoutFn||r,l=e.prefetchChunks,h=function(n){c(n,e.priority).then(i).catch(function(n){i(),e.onError&&e.onError(n)})},d=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting&&(d.unobserve(e=e.target),o.size<u&&t(function(){l?l(e,h):h(e.href)}))})});return s(function(){(e.el||document).querySelectorAll("a").forEach(function(e){a.length&&!a.includes(e.hostname)||function e(n,t){return Array.isArray(t)?t.some(function(t){return e(n,t)}):(t.test||t).call(t,n.href,n)}(e,f)||d.observe(e)})},{timeout:e.timeout||2e3}),function(){o.clear(),d.disconnect()}}}function c(n,r,i){if(i=navigator.connection){if(i.saveData)return Promise.reject(new Error("Cannot prefetch, Save-Data is enabled"));if(/2g/.test(i.effectiveType))return Promise.reject(new Error("Cannot prefetch, network conditions are poor"))}return Promise.all([].concat(n).map(function(n){if(!o.has(n))return o.add(n),(r?function(n){return window.fetch?fetch(n,{credentials:"include"}):e(n)}:t)(new URL(n,location.href).toString())}))}export{i as listen,c as prefetch};

View file

@ -0,0 +1 @@
function e(e){return new Promise((t,n,r)=>{(r=new XMLHttpRequest).open("GET",e,r.withCredentials=!0),r.onload=()=>{200===r.status?t():n()},r.send()})}function t(t){return window.fetch?fetch(t,{credentials:"include"}):e(t)}const n=(r=document.createElement("link")).relList&&r.relList.supports&&r.relList.supports("prefetch")?function(e){return new Promise((t,n,r)=>{(r=document.createElement("link")).rel="prefetch",r.href=e,r.onload=t,r.onerror=n,document.head.appendChild(r)})}:e;var r;const o=window.requestIdleCallback||function(e){const t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i=new Set;function c(e){if(e||(e={}),!window.IntersectionObserver)return;const[t,n]=function(e){e=e||1;var t=[],n=0;function r(){n<e&&t.length>0&&(t.shift()(),n++)}return[function(e){t.push(e)>1||r()},function(){n--,r()}]}(e.throttle||1/0),r=e.limit||1/0,c=e.origins||[location.hostname],a=e.ignores||[],u=e.timeoutFn||o,f=e.prefetchChunks,l=t=>{s(t,e.priority).then(n).catch(t=>{n(),e.onError&&e.onError(t)})},h=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(h.unobserve(e=e.target),i.size<r&&t(()=>{f?f(e,l):l(e.href)}))})});return u(()=>{(e.el||document).querySelectorAll("a").forEach(e=>{c.length&&!c.includes(e.hostname)||function e(t,n){return Array.isArray(n)?n.some(n=>e(t,n)):(n.test||n).call(n,t.href,t)}(e,a)||h.observe(e)})},{timeout:e.timeout||2e3}),function(){i.clear(),h.disconnect()}}function s(e,r,o){if(o=navigator.connection){if(o.saveData)return Promise.reject(new Error("Cannot prefetch, Save-Data is enabled"));if(/2g/.test(o.effectiveType))return Promise.reject(new Error("Cannot prefetch, network conditions are poor"))}return Promise.all([].concat(e).map(e=>{if(!i.has(e))return i.add(e),(r?t:n)(new URL(e,location.href).toString())}))}export{c as listen,s as prefetch};

1
node_modules/quicklink/dist/react/quicklink.umd.js generated vendored Normal file
View file

@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.quicklink={})}(this,function(e){function n(e){return new Promise(function(n,t,r){(r=new XMLHttpRequest).open("GET",e,r.withCredentials=!0),r.onload=function(){200===r.status?n():t()},r.send()})}var t,r=(t=document.createElement("link")).relList&&t.relList.supports&&t.relList.supports("prefetch")?function(e){return new Promise(function(n,t,r){(r=document.createElement("link")).rel="prefetch",r.href=e,r.onload=n,r.onerror=t,document.head.appendChild(r)})}:n,o=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},i=new Set;function c(e,t,o){if(o=navigator.connection){if(o.saveData)return Promise.reject(new Error("Cannot prefetch, Save-Data is enabled"));if(/2g/.test(o.effectiveType))return Promise.reject(new Error("Cannot prefetch, network conditions are poor"))}return Promise.all([].concat(e).map(function(e){if(!i.has(e))return i.add(e),(t?function(e){return window.fetch?fetch(e,{credentials:"include"}):n(e)}:r)(new URL(e,location.href).toString())}))}e.listen=function(e){if(e||(e={}),window.IntersectionObserver){var n=function(e){e=e||1;var n=[],t=0;function r(){t<e&&n.length>0&&(n.shift()(),t++)}return[function(e){n.push(e)>1||r()},function(){t--,r()}]}(e.throttle||1/0),t=n[0],r=n[1],u=e.limit||1/0,f=e.origins||[location.hostname],a=e.ignores||[],s=e.timeoutFn||o,l=e.prefetchChunks,d=function(n){c(n,e.priority).then(r).catch(function(n){r(),e.onError&&e.onError(n)})},h=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting&&(h.unobserve(e=e.target),i.size<u&&t(function(){l?l(e,d):d(e.href)}))})});return s(function(){(e.el||document).querySelectorAll("a").forEach(function(e){f.length&&!f.includes(e.hostname)||function e(n,t){return Array.isArray(t)?t.some(function(t){return e(n,t)}):(t.test||t).call(t,n.href,n)}(e,a)||h.observe(e)})},{timeout:e.timeout||2e3}),function(){i.clear(),h.disconnect()}}},e.prefetch=c});

109
node_modules/quicklink/package.json generated vendored Normal file
View file

@ -0,0 +1,109 @@
{
"_args": [
[
"quicklink@2.2.0",
"F:\\Documents\\websites\\BMM"
]
],
"_from": "quicklink@2.2.0",
"_id": "quicklink@2.2.0",
"_inBundle": false,
"_integrity": "sha512-tfleXCZvxDppyZFqSDsbkS5aKemtA0ealvguxjp3tzXHMo+pzxrWtOh+6dnYK/mXzEYM1QiNhGttcS/W/T3JXA==",
"_location": "/quicklink",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "quicklink@2.2.0",
"name": "quicklink",
"escapedName": "quicklink",
"rawSpec": "2.2.0",
"saveSpec": null,
"fetchSpec": "2.2.0"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/quicklink/-/quicklink-2.2.0.tgz",
"_spec": "2.2.0",
"_where": "F:\\Documents\\websites\\BMM",
"author": {
"name": "addyosmani",
"email": "addyosmani@gmail.com"
},
"bugs": {
"url": "https://github.com/GoogleChromeLabs/quicklink/issues"
},
"bundlesize": [
{
"path": "./dist/*.js",
"maxSize": "2 kB"
}
],
"dependencies": {
"route-manifest": "^1.0.0",
"throttles": "^1.0.0"
},
"description": "Faster subsequent page-loads by prefetching in-viewport links during idle time",
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/preset-react": "^7.9.4",
"bundlesize": "^0.18.0",
"chai": "^4.2.0",
"conventional-changelog-cli": "^2.0.11",
"cross-var": "^1.1.0",
"eslint": "^6.7.1",
"eslint-config-google": "^0.14.0",
"http-server": "^0.12.0",
"lodash": "^4.17.11",
"microbundle": "0.11.0",
"mocha": "^6.2.2",
"puppeteer": "^2.0.0",
"react": "^16.12.0",
"react-dom": "^16.12.0"
},
"files": [
"dist"
],
"homepage": "https://getquick.link/",
"jsnext:main": "dist/quicklink.mjs",
"keywords": [
"prefetch",
"performance",
"fetch",
"intersectionobserver",
"background",
"speed"
],
"license": "Apache-2.0",
"main": "dist/quicklink.js",
"module": "dist/quicklink.mjs",
"name": "quicklink",
"peerDependencies": {
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/GoogleChromeLabs/quicklink.git"
},
"scripts": {
"build": "microbundle src/index.mjs --no-sourcemap --external none",
"build-all": "yarn run build && yarn run build-plugin && yarn run build-react-chunks",
"build-plugin": "microbundle src/chunks.mjs --no-sourcemap --external none -o dist/react",
"build-react-chunks": "babel src/react-chunks.js --out-file dist/react/hoc.js",
"bundlesize": "bundlesize",
"changelog": "yarn conventional-changelog -i CHANGELOG.md -s -r 0",
"lint": "eslint src/*.mjs test/*.js demos/*.js",
"lint-fix": "eslint src/*.mjs test/*.js --fix demos/*.js",
"prepare": "yarn run -s build",
"release": "cross-var yarn run build-all -s && cross-var git commit -am $npm_package_version && cross-var git tag $npm_package_version && git push && git push --tags",
"start": "http-server .",
"test": "yarn run build-all && mocha test/bootstrap.js --recursive test"
},
"umd:main": "dist/quicklink.umd.js",
"unpkg": "dist/quicklink.umd.js",
"version": "2.2.0"
}