From c150a6a0e59f9a1d914b689c09c7905766aebf3d Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Mon, 9 Feb 2026 20:35:31 +0100 Subject: [PATCH 1/3] feat(runtime): export Picture and Image props types --- src/runtime/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/index.ts b/src/runtime/index.ts index 96831a51f..c69e3f522 100644 --- a/src/runtime/index.ts +++ b/src/runtime/index.ts @@ -1,5 +1,7 @@ export { createImage } from './image' export { defineProvider } from './utils/provider' export { createMapper, createOperationsGenerator } from './utils/index' +export type { PictureProps } from './components/NuxtPicture.vue' +export type { ImageProps } from './components/NuxtImg.vue' export type { Mapper } from './utils/index' From 4e33f9f48f8ab20a1cececfcf79a1ec5bf62a3a0 Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Tue, 10 Feb 2026 22:37:55 +0100 Subject: [PATCH 2/3] fix: split runtime and module types --- src/runtime/components/NuxtPicture.vue | 2 +- src/runtime/types.ts | 2 ++ src/types/image.ts | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/runtime/types.ts diff --git a/src/runtime/components/NuxtPicture.vue b/src/runtime/components/NuxtPicture.vue index 04653486b..6d2bcc610 100644 --- a/src/runtime/components/NuxtPicture.vue +++ b/src/runtime/components/NuxtPicture.vue @@ -32,7 +32,7 @@ import { markFeatureUsage } from '../utils/performance' import { useImage } from '../composables' import { useImageProps } from '../utils/props' import type { BaseImageProps } from '../utils/props' -import type { DataAttributes } from '../../types/image' +import type { DataAttributes } from '../types' import type { ConfiguredImageProviders, ProviderDefaults } from '@nuxt/image' import { useHead, useNuxtApp, useRequestEvent } from '#imports' diff --git a/src/runtime/types.ts b/src/runtime/types.ts new file mode 100644 index 000000000..3091f3c2a --- /dev/null +++ b/src/runtime/types.ts @@ -0,0 +1,2 @@ + +export type DataAttributes = Record<`data-${string}`, string> \ No newline at end of file diff --git a/src/types/image.ts b/src/types/image.ts index ae0f06ffc..0a4adf92e 100644 --- a/src/types/image.ts +++ b/src/types/image.ts @@ -120,4 +120,3 @@ export interface ImageSizesVariant { _cHeight?: number | undefined } -export type DataAttributes = Record<`data-${string}`, string> From a8df8ec09b7cbc00ed0942627a4fbe3a3a8d59df Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Tue, 10 Feb 2026 23:39:35 +0100 Subject: [PATCH 3/3] chore: lint --- src/runtime/types.ts | 3 +-- src/types/image.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/runtime/types.ts b/src/runtime/types.ts index 3091f3c2a..de47bbeae 100644 --- a/src/runtime/types.ts +++ b/src/runtime/types.ts @@ -1,2 +1 @@ - -export type DataAttributes = Record<`data-${string}`, string> \ No newline at end of file +export type DataAttributes = Record<`data-${string}`, string> diff --git a/src/types/image.ts b/src/types/image.ts index 0a4adf92e..0ff89fb67 100644 --- a/src/types/image.ts +++ b/src/types/image.ts @@ -119,4 +119,3 @@ export interface ImageSizesVariant { _cWidth: number _cHeight?: number | undefined } -