diff --git a/.changeset/perfect-islands-teach.md b/.changeset/perfect-islands-teach.md new file mode 100644 index 000000000..7d83eb44d --- /dev/null +++ b/.changeset/perfect-islands-teach.md @@ -0,0 +1,5 @@ +--- +'@astrojs/image': patch +--- + +Fixing TypeScript definition exports for image components diff --git a/packages/integrations/image/README.md b/packages/integrations/image/README.md index fef238891..35136f568 100644 --- a/packages/integrations/image/README.md +++ b/packages/integrations/image/README.md @@ -104,7 +104,7 @@ export default { ```html --- -import { Image } from '@astrojs/image'; +import { Image } from '@astrojs/image/components'; import heroImage from '../assets/hero.png'; --- @@ -132,7 +132,7 @@ import heroImage from '../assets/hero.png'; ```html --- -import { Image } from '@astrojs/image'; +import { Image } from '@astrojs/image/components'; const imageUrl = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'; --- @@ -156,7 +156,7 @@ const imageUrl = 'https://www.google.com/images/branding/googlelogo/2x/googlelog ```html --- setup: | - import { Image } from '@astrojs/image' + import { Image } from '@astrojs/image/components' import hero from '../../assets/blog/introducing-astro.jpg' title: Hello world! publishDate: 12 Sep 2021 @@ -181,7 +181,7 @@ description: Just a Hello World Post! ```html --- -import { Picture } from '@astrojs/image'; +import { Picture } from '@astrojs/image/components'; import hero from '../assets/hero.png'; const imageUrl = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'; diff --git a/packages/integrations/image/components/index.js b/packages/integrations/image/components/index.ts similarity index 100% rename from packages/integrations/image/components/index.js rename to packages/integrations/image/components/index.ts diff --git a/packages/integrations/image/src/types.ts b/packages/integrations/image/src/types.ts index 4aafe762d..58a1c59f4 100644 --- a/packages/integrations/image/src/types.ts +++ b/packages/integrations/image/src/types.ts @@ -1,5 +1,4 @@ /// -export type { Image, Picture } from '../components/index.js'; export * from './index.js'; interface ImageIntegration { diff --git a/packages/integrations/image/test/fixtures/basic-image/src/pages/index.astro b/packages/integrations/image/test/fixtures/basic-image/src/pages/index.astro index 34deda90e..57b7fd97c 100644 --- a/packages/integrations/image/test/fixtures/basic-image/src/pages/index.astro +++ b/packages/integrations/image/test/fixtures/basic-image/src/pages/index.astro @@ -1,6 +1,6 @@ --- import socialJpg from '../assets/social.jpg'; -import { Image } from '@astrojs/image'; +import { Image } from '@astrojs/image/components'; --- diff --git a/packages/integrations/image/test/fixtures/basic-picture/src/pages/index.astro b/packages/integrations/image/test/fixtures/basic-picture/src/pages/index.astro index f51760e79..fdaf5b6b9 100644 --- a/packages/integrations/image/test/fixtures/basic-picture/src/pages/index.astro +++ b/packages/integrations/image/test/fixtures/basic-picture/src/pages/index.astro @@ -1,6 +1,6 @@ --- import socialJpg from '../assets/social.jpg'; -import { Picture } from '@astrojs/image'; +import { Picture } from '@astrojs/image/components'; ---