Skip to content

Commit

Permalink
Move jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Nov 5, 2024
1 parent 3babb85 commit 1e3d9fa
Showing 1 changed file with 32 additions and 17 deletions.
49 changes: 32 additions & 17 deletions packages/astro/src/types/public/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,37 @@ export interface ViteUserConfig extends OriginalViteUserConfig {
*/
remotePatterns?: Partial<RemotePattern>[];

/**
* @docs
* @name image.experimentalLayout
* @default `undefined`
* @description
* The default layout type for responsive images. Can be overridden by the `layout` prop on the image component.
* Requires the `experimental.responsiveImages` flag to be enabled.
* - `responsive` - The image will scale to fit the container, maintaining its aspect ratio, but will not exceed the specified dimensions.
* - `fixed` - The image will maintain its original dimensions.
* - `full-width` - The image will scale to fit the container, maintaining its aspect ratio.
*/
experimentalLayout?: ImageLayout | undefined;
/**
* @docs
* @name image.experimentalObjectFit
* @default `"cover"`
* @description
* The default object-fit value for responsive images. Can be overridden by the `fit` prop on the image component.
* Requires the `experimental.responsiveImages` flag to be enabled.
*/
experimentalObjectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | (string & {});
/**
* @docs
* @name image.experimentalObjectPosition
* @default `"center"`
* @description
* The default object-position value for responsive images. Can be overridden by the `position` prop on the image component.
* Requires the `experimental.responsiveImages` flag to be enabled.
*/
experimentalObjectPosition?: string;
};

/**
Expand Down Expand Up @@ -1731,23 +1762,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig {
*
*/

responsiveImages?:
| boolean
| {
/**
* @docs
* @name responsiveImages.layout
* @default `undefined`
* @description
* The default layout type for responsive images. Can be overridden by the `layout` prop on the image component.
* - `responsive` - The image will scale to fit the container, maintaining its aspect ratio, but will not exceed the specified dimensions.
* - `fixed` - The image will maintain its original dimensions.
* - `full-width` - The image will scale to fit the container, maintaining its aspect ratio.
*/
layout?: ImageLayout | undefined;
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | (string & {});
objectPosition?: string;
};
responsiveImages?: boolean;
};
}

Expand Down

0 comments on commit 1e3d9fa

Please sign in to comment.