@coras-io/embed 0.6.0 → 0.6.1
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
CHANGED
|
@@ -9,10 +9,10 @@ export declare class CorasLocationImage extends LitElement {
|
|
|
9
9
|
imageExtension: string;
|
|
10
10
|
alt: string;
|
|
11
11
|
/**
|
|
12
|
-
* Intrinsic size of the banner
|
|
13
|
-
*
|
|
14
|
-
* to the ratio that is
|
|
15
|
-
* to trim.
|
|
12
|
+
* Intrinsic size of the banner, matching the box it actually renders in:
|
|
13
|
+
* `--coras-page-max-width` less `--coras-content-padding` by
|
|
14
|
+
* `--location-image-height`. imgix then crops to the ratio that is
|
|
15
|
+
* displayed and `object-fit` has nothing left to trim.
|
|
16
16
|
*/
|
|
17
17
|
width: number;
|
|
18
18
|
height: number;
|
|
@@ -15,7 +15,7 @@ import styles from "./location-image.styles.js";
|
|
|
15
15
|
* assets (1160px) - wider candidates only make imgix upscale the same pixels
|
|
16
16
|
* and ship more bytes for no extra detail.
|
|
17
17
|
*/
|
|
18
|
-
const BANNER_WIDTHS = "480,640,768,
|
|
18
|
+
const BANNER_WIDTHS = "480,640,768,918,1160";
|
|
19
19
|
let CorasLocationImage = class CorasLocationImage extends LitElement {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
@@ -25,12 +25,12 @@ let CorasLocationImage = class CorasLocationImage extends LitElement {
|
|
|
25
25
|
this.imageExtension = "png";
|
|
26
26
|
this.alt = msg("Location image");
|
|
27
27
|
/**
|
|
28
|
-
* Intrinsic size of the banner
|
|
29
|
-
*
|
|
30
|
-
* to the ratio that is
|
|
31
|
-
* to trim.
|
|
28
|
+
* Intrinsic size of the banner, matching the box it actually renders in:
|
|
29
|
+
* `--coras-page-max-width` less `--coras-content-padding` by
|
|
30
|
+
* `--location-image-height`. imgix then crops to the ratio that is
|
|
31
|
+
* displayed and `object-fit` has nothing left to trim.
|
|
32
32
|
*/
|
|
33
|
-
this.width =
|
|
33
|
+
this.width = 918;
|
|
34
34
|
this.height = 148;
|
|
35
35
|
this.loading = false;
|
|
36
36
|
this.currentSrc = "";
|
|
@@ -38,14 +38,14 @@ export function buildSrcset(src, widths = RESPONSIVE_WIDTHS, options = {}) {
|
|
|
38
38
|
* - `carousel-hero` - better-carousel item on the details page
|
|
39
39
|
* - `gallery` - image-carousel item (legacy 780px hero)
|
|
40
40
|
* - `thumbnail` - basket-item, tour-ticket-type thumbs
|
|
41
|
-
* - `header-banner` - location-image banner,
|
|
41
|
+
* - `header-banner` - location-image banner, 918px of page content width
|
|
42
42
|
*/
|
|
43
43
|
const SIZES_PRESETS = {
|
|
44
44
|
"card-grid": "(min-width: 1001px) 25vw, (min-width: 501px) 50vw, 100vw",
|
|
45
45
|
"carousel-hero": "(min-width: 1024px) 480px, 90vw",
|
|
46
46
|
gallery: "(min-width: 1024px) 780px, 100vw",
|
|
47
47
|
thumbnail: "70px",
|
|
48
|
-
"header-banner": "
|
|
48
|
+
"header-banner": "918px",
|
|
49
49
|
};
|
|
50
50
|
export function buildSizes(preset) {
|
|
51
51
|
return SIZES_PRESETS[preset];
|