* modifies prefetch to add the option to only prefetch certain pages on hover
* adds new pages to the test website to showcase prefetch-intent functionality
* adds tests to verify prefetch-intent behavior
* adds changelog
* waits until networkidle to check if the prefetching worked instead of waiting on a specific url load
* allows intentSelector to be either a string or array of strings
* Revert "allows intentSelector to be either a string or array of strings"
This reverts commit b0268eb0d5.
* fixes the multiple selector logic and adds tests
* updates docs to include new prefetch-intent integration
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/little-cars-exist.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Updated according to new configuration
Astro imports the `defineConfig` function from `astro/config`. The `integrations` key needs to be passed into the `defineConfig` function, but it is not shown in the README. Updated the README according to the CLI example.
* update alpine
* update image
* update lit
* update mdx
* update preact
* update prefetch
* update react
* update sitemap
* update solid
* update svelte
* update tailwind
* update turbolinks
* update vue
* chore: add changeset
* update image
* update svelte readme
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Integration README fixes
* More tweaks (mostly code backticks for filenames)
* Update changeset
* Few more tweaks
* Make sure code blocks all have a code language
* Use URLs of new docs pages for package homepage
* One more stray `<br>` 👢
* Standardise to `sh` instead of `shell`
* Adds a basic @astrojs/prefetch integration
* adding tests for custom selectors
* missed in last commit
* Adding a few docs, removing the option for `selectors` to be an element array
* adding an option for the concurrency limit
* fixing test for updated integration options
* Update packages/labs/prefetch/src/client.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* nit: removing the NodeJS.Timer type to allow typescript to infer the return
* updating docs for default selector with ~=
* Skip prefetching on 2G connections, or when data saver is enabled
* refactor: moving to packages/integrations, Astro Labs TBD down the road
* README typo fix
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>