* Update Picture.astro
the image variable of getPicture contains a width and height property, which we usually require. In this case, the image is wrapped in a picture tag and the img tag itself should not have a width and height property as this will break the responsiveness of the image provided by the picture tag.
* added changeset
* fixing SSG picture tests that were expecting img dimensions
Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
* WIP: adding a service built on @squoosh/lib
* WIP: investigating memory leaks in Squoosh
* WIP: vendoring Squoosh to work with our build
* chore: a bit of cleanup and a small perf gain
* removing a few unused deps
* fix: removing temp .only() in sharp test
* hooking up the last build steps to copy over .wasm files
* removing the duplicated lib/*.wasm files
* defaulting to Sharp for the initial @next release
* make sure pnpm always runs the postbuild script
* removing a few node dependencies
* refactor: move the copy .wasm build step out of the SSR bundle
* linter fixes
* fixing lock file
* chore: add TEMP changeset
* fix built wasm location for SSG builds
* Revert "defaulting to Sharp for the initial @next release"
This reverts commit 1a8d4f7f60.
* removing sharp dependency
* Revert "fix built wasm location for SSG builds"
This reverts commit 446b80bb53.
* chore: update lockfile
* fixing up image tests for the wasm loader
* updating the README for squoosh
* parallel wasm builds
* refactor: a bit of house keeping
* perf: allow a thread for each output encoding format
* fix: dev broke with the shift to wasm workers
* adds a new `astro:build:generated` hook for SSG builds
* fix: typo + calling cleanup methods in wasm codecs
* adding @astrojs/webapi for the TransformStream polyfill
* Revert "adding @astrojs/webapi for the TransformStream polyfill"
This reverts commit 39e5b845a5.
* perf: using sharp for most of the CI tests
* chore: update lockfile
* removing hard-coded squoosh imports
* fix: adding sharp to rollup externals
* test: using dev for the squoosh tests
* fix: updating the build output dir for wasm filles in SSG builds
* updating the changeset with migration details
* Revert "adds a new `astro:build:generated` hook for SSG builds"
This reverts commit 59b5fec7be.
* nit: adding comments for the wasm file copy
* chore: fix eslint warning
* docs: add MDXLayoutProps to README
* chore: changeset
* nit: remove "if you understand this diff"
* nit: AdD tYpE sAfEtY
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/integrations/mdx/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Revert "Update preact example to match @astrojs/preact ranges (#4840)"
This reverts commit d650a1161a.
* Revert "[ci] format"
This reverts commit e3c78c5b16.
* Revert "Support shared signals in Preact islands (#4763)"
This reverts commit 5e46be5468.
* Support signals in Preact islands
* Add a changeset
* Only add signals if we need them
* Refactor signal logic into its own module
* Keep track of the signals used
* Update peer dep
* Create leaders-of-the-free-world.md
Update: `@astrojs/tailwindcss` project with `tailwindcss` as a `peer-dependency`
* Removed tailwindcss as 'dependency'
* Update `pnpm-lock` with changes to deps
* Update .changeset/leaders-of-the-free-world.md
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* docs: add section on .mdx file support in VS Code
* Update packages/integrations/mdx/README.md
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* fix: use while instead of "for await" in react integration
* fix: cast HTML to string to fix other integrations
* docs: add comment on encode(String(html))
* chore: changeset
Co-authored-by: bholmesdev <hey@bholmes.dev>
* Added `background` option and prop.
This optional color specifies which background to use when removing the
alpha channel if the output format doesn't support transparency.
* Modified existing tests
* Fixed wrong dimensions in tests
* Fixing a few instances of jpeg vs jpg
* Added color checking
* working on the tests
* tests are now passing
* Adding tests
* Added tests for background color
* no need to test with subpath
* Added fixture
* Renamed test fixture for background-color
* skipping test until fixed
* Typo
* Working on tests
* tests are passing
* Updated readme and added changeset
* Updated lockfile
* Updated lockfile
* Updated lockfile
Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
* update adapter READMES to include astro add
* missing space
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* feat(image): throw if no `alt` is provided
* chore: add changeset
* docs(image): update README
* updated alt text stuff throughout
* fixing with-mdx test suite
* warn for missing alt text, will throw an error in a future release
* final README tweaks
Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* WIP: simplifying the use of `fs` vs. the vite plugin
* removing a few node deps (etag and node:path)
* adding ts defs for sharp
* using the same mime package as astro's core App
* fixing file URL support in windows
* using file URLs when loading local image metadata
* fixing a bug in the etag helper
* Windows compat
* splitting out dev & build tests
* why do these suites fail in parallel?
* one last windows compat case
* Adding tests for treating /public images the same as remote URLs
* a couple fixes for Astro's `base` config
* adding base path tests for SSR
* fixing a bad merge, lost the kleur dependency
* adding a test suite for images + MDX
* chore: add changeset
* simplifying the with-mdx tests
* bugfix: don't duplicate the period when using existing file extensions
* let Vite cache the image loader service
* adding some docs for using /public images
* fixing changeset
* Update packages/integrations/image/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/image/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* nit: minor README syntax tweaks
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Add custom components to mdx integration guide
* Update packages/integrations/mdx/README.md
Co-authored-by: Ben Holmes <hey@bholmes.dev>
* Update packages/integrations/mdx/README.md
Co-authored-by: Ben Holmes <hey@bholmes.dev>
* Update packages/integrations/mdx/README.md
Co-authored-by: Ben Holmes <hey@bholmes.dev>
* Update packages/integrations/mdx/README.md
Co-authored-by: Ben Holmes <hey@bholmes.dev>
* Incorporate Sarah and Ben's Feedback
* Fix what would be an ugly background lol
* Sarah taking liberty of removing double text
* Add changeset
Co-authored-by: Ben Holmes <hey@bholmes.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* fix: SSG builds should remove query params when building local image files
* chore: add changeset
* handling an edge case related to stripping extensions from a filename
* add: @apply exceptions for component frameworks
Some frameworks, specifically Vue, will not recognize global @layer directives in a global stylesheet because of how Vue's build system works. Instead, prefer to add a plugin to your Tailwind config. #2660, #3073
* Update README.md
* Update README.md
* Don’t use Buffer.byteLength() as Deno can’t use it
* Add changeset
* Add tests for Markdown & MDX with Deno
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* Use passive listeners in prefetch
Without passive=true, Lighthouse complains about not using passive listeners to improve scrolling performance.
* Create cold-shoes-drum.md
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
As I learned from a support Thread on Discord, the tagName convention was dropped during the beta period. Instead you need to export the class and use it in astro file.
I updated the code samples on this page accordingly.
* Update README.md
Added missing subtitle for `formats` prop of the <Picture> component
* Create fast-drinks-visit.md
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
* fix: enable @astrojs/image to be used inside of non-vite contexts
* chore: add changeset
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* fixing SSR local file resolution path on windows
* chore: add changeset
* nit: fixing typo in image README file
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* fix(#4135): handle edge case in jsx-runtime
* test: add mdx test case
* chore: fix utils reference
* test: fix mdx escape test
Co-authored-by: Nate Moore <nate@astro.build>
[This page](https://docs.astro.build/en/guides/integrations-guide/) is autogenerated based on the packages in this repo and said packages' tags. Removing the renderer tag here should stop it from appearing in the UI Framework category.
* Upgrade @astrojs/prism to a real package, fix component import not working
* Remove `@astrojs/prism` as a dependency of `astro`
* Update lock file
* Refactor to multiple files
* Oops, can't have astro imports run inside node
* Follow Nate's suggestion on being minors instead of patchs
* Update lockfile
* 4078 breaking test
* Use Vite for loading the config
* Try it
* Fallback to loading with Vite only when needed
* Remove console.error
* Remove extra console.log
* Add a changeset
* Use middlewareMode
* Prevent hydration scripts from being rendered in the wrong order
* Remove comment
* Update jsx
* Remove promise for stop
* Try skipping lit tests
* Stringify these chunks too
* Unskip lit
* WIP: moving to a static .d.ts types file
* fixing named exports for getImage and getPicture
* removing the exports.astro map for now
* WIP: adding readme docs for component attributes
* Adding docs for getImage and getPicture
* leaning fully on TSC to build .d.ts files
* finally found the solution for proper ESM import types
* adding a note to the README for tsconfig updates
* chore: add changesets
* typo
* docs: removing the "Images in Markdown" example
* removing the need for publishing src to NPM
* fix: make type re-export explicit
* updating image module defs to match InputFormat
* using astro syntax highlighting for README code blocks
* nit: missing backtick in README
* make sure Astro component directives aren't recommended twice
* Start of work on astroConfig.mode === 'server'
* Add tests and more
* adapter -> deploy in some places
* Add fallback for `adapter` config
* Update more tests
* Update image tests
* Fix clientAddress test
* Updates based on PR review
* Add a changeset
* Update integrations tests + readme
* Oops
* Remove old option
* Rename `mode` to `output`
* Update Node adapter test
* Update test
* fred pass
* fred pass
* fred pass
* fix test
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
* fix: SSR builds were hitting an undefined error and skipping the step for copying original assets
* chore: update lockfile
* chore: adding better error validation to getImage and getPicture
* refactor: cleaning up index.ts
* refactor: moving SSG build generation logic out of the integration
* splitting build to ssg & ssr helpers, re-enabling SSR image build tests
* sharp should automatically rotate based on EXIF
* cleaning up how static images are tracked for SSG builds
* undo unrelated mod.d.ts change
* chore: add changeset
* Adds support for Astro.clientAddress
* Pass through mode and adapterName in SSG
* Pass through the mode provided
* Provide an adapter specific error message when possible
* <Picture /> should pass all unrecognized props down to the <img> element
* chore: add changeset
* Adding test coverage for custom <img> attributes
* chore: adding a README note for passing attributes to the picture's img
* Revert "<Picture /> should pass all unrecognized props down to the <img> element"
This reverts commit ce3e33930f.
* Picture should pass alt text to the img
* Vite 3 test
* deps: bump to Vite beta.1
* refactor: move to use optimizeDeps.force option
* refactor: stub out new updateModuleInfo params
* nit: remove comment on deprecated Vite feature
* nit: remove comment on deprecated vite feature
* hail mary: destroy all ssr external / noexternal!
* fix: use new middlewareMode config settings
* fix: resolve npm package paths for rollup input
* wip: revert to unresolved. Issue reported!
* sad refactor: use legacy devDepsScanner for component HMR
* fix: add astro/components to noExternal for Code component
* refactor: use ALWAYS_NOEXTERNAL array
* refactor: add package.json to all test runners for noExternal error
* deps: bump to latest vite 3 beta
* wip: add package.json to smoke
* fix: remove accidental "force true" on create-vite
* refactor: write smoke package.json programmatically
* refactor: add fontsource to noExternal
* fix: only add to ssr.noExternal if present in project
* wip: what if we just... didn't have a memory test
* deps: bump to latest vite beta
* Revert "wip: what if we just... didn't have a memory test"
This reverts commit 173729dbdc685e52881fc3333487b8f744add55f.
* fix: add type check for plugin.name
* feat: remove legacy.devDepsScanner. Vite 3 strat is now Vite 2.x strat!
* fix: add ssr.noExternal to components ex
* wip: ignore with-mdx starter
* fix: add serviceEntryPoint to ssr.noExternal
* temp: reset NODE_ENV on prod builds
* fix: missing async tag
* VITE 3 IS STABLE BABY
* deps: bump svelte to vite 3
* deps: bump vue to vite 3
* fix: resolve plugins for proper sorting
* sad fix: regex "export default" out of CSS ssr
* chore: add TODO to understand sad fix
* Revert "fix: resolve plugins for proper sorting"
This reverts commit e67c194d3a8e11070487ed325947e7c59e8d69cd.
* Revert "sad fix: regex "export default" out of CSS ssr"
This reverts commit 721d40b62b61440dc9e488787901c915579659db.
* fix: sort plugins WITHOUT resolveConfig
* Revert "wip: ignore with-mdx starter"
This reverts commit 7d4f7338e6.
* chore: revert memory test changes
* chore: add nanostores/preact ot noexternal
* chore: changeset
* chore: changeset
* deps: use Vite ^3.0.0
* fix: add back third party astro pkg scanner
Co-authored-by: bholmesdev <hey@bholmes.dev>