@ethlete/cdk 3.8.2 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/esm2022/lib/components/picture/picture.component.mjs +18 -5
- package/esm2022/lib/components/picture/picture.component.types.mjs +1 -1
- package/esm2022/lib/components/picture/picture.utils.mjs +9 -0
- package/esm2022/lib/components/picture/public-api.mjs +2 -1
- package/fesm2022/ethlete-cdk.mjs +23 -4
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/lib/components/picture/picture.component.d.ts +2 -0
- package/lib/components/picture/picture.component.types.d.ts +12 -0
- package/lib/components/picture/picture.utils.d.ts +7 -0
- package/lib/components/picture/public-api.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,8 +5,10 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
import * as i1 from "./picture-data.directive";
|
|
6
6
|
export declare class PictureComponent {
|
|
7
7
|
protected readonly pictureData: PictureDataDirective;
|
|
8
|
+
protected readonly config: import("./picture.component.types").PictureConfig | null;
|
|
8
9
|
sources: PictureSource[];
|
|
9
10
|
protected trackBySrc: TrackByFunction<PictureSource>;
|
|
11
|
+
protected combineWithConfig(src: PictureSource): PictureSource;
|
|
10
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<PictureComponent, never>;
|
|
11
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<PictureComponent, "et-picture", never, { "sources": { "alias": "sources"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.PictureDataDirective; inputs: { "imgClass": "imgClass"; "hasPriority": "hasPriority"; "figureClass": "figureClass"; "pictureClass": "pictureClass"; "figcaptionClass": "figcaptionClass"; "defaultSrc": "defaultSrc"; "alt": "alt"; "figcaption": "figcaption"; "width": "width"; "height": "height"; "sizes": "sizes"; }; outputs: {}; }]>;
|
|
12
14
|
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
export interface PictureSource {
|
|
2
|
+
/**
|
|
3
|
+
* The mime type of the image.
|
|
4
|
+
* @example `image/jpeg`
|
|
5
|
+
*/
|
|
2
6
|
type: string;
|
|
7
|
+
/**
|
|
8
|
+
* The source set of the image. Can be either a single URL or a comma-separated list of URLs.
|
|
9
|
+
* @example `https://example.com/image.jpg`
|
|
10
|
+
* @example `https://example.com/image.jpg, https://example.com/image@2x.jpg`
|
|
11
|
+
*/
|
|
3
12
|
srcset: string;
|
|
4
13
|
}
|
|
14
|
+
export interface PictureConfig {
|
|
15
|
+
baseUrl?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { PictureConfig } from './picture.component.types';
|
|
3
|
+
export declare const IMAGE_CONFIG_TOKEN: InjectionToken<PictureConfig>;
|
|
4
|
+
export declare const provideImageConfig: (config?: Partial<PictureConfig> | null | undefined) => {
|
|
5
|
+
provide: InjectionToken<PictureConfig>;
|
|
6
|
+
useValue: Partial<PictureConfig> | null;
|
|
7
|
+
};
|