seeonwall 0.12.0 → 0.13.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/README.md CHANGED
@@ -248,9 +248,10 @@ preview with no mat.
248
248
 
249
249
  ### When the image and the size disagree
250
250
 
251
- An image with other proportions than the size — one photo sold as 45x60 and as 80x120 — is cropped
252
- to the size from its centre, as CSS `object-fit: cover` crops. `posterFit="stretch"` distorts the
253
- image to the size instead, as the preview did before.
251
+ An image with other proportions than the size — one photo sold as 45x60 and as 80x120 — is
252
+ distorted to the size by up to 8%, and the remainder is cropped from its centre. This is
253
+ `posterFit="auto"`, the default. `posterFit="cover"` only crops, as CSS `object-fit: cover` crops.
254
+ `posterFit="stretch"` only distorts.
254
255
 
255
256
  ```tsx
256
257
  <SeeOnWallButton posterUrl={product.image} posterSizes="45x60,80x120" posterFit="stretch" />
@@ -283,7 +284,7 @@ The shapes above are `data-button-variant="outline" | "glyph" | "icon"` on the m
283
284
  `data-button-width="full"` stretches the button to its container. `data-sizes-from="auto"`, or a
284
285
  selector in the same attribute, reads the sizes from a size control on the page.
285
286
 
286
- `data-poster-mat` and `data-poster-mat-color` carry the mat above, and `data-poster-fit="stretch"`
287
+ `data-poster-mat` and `data-poster-mat-color` carry the mat above, and `data-poster-fit`
287
288
  the fit.
288
289
 
289
290
  `data-poster-offers` carries the offers above as a JSON array, and works the same way:
package/dist/types.d.ts CHANGED
@@ -19,8 +19,8 @@
19
19
  * this package, and the check does not read them.
20
20
  */
21
21
  export type SizeUnit = 'cm' | 'in';
22
- /** How the preview puts the image into a size of other proportions (ADR 260). */
23
- export type PosterFit = 'cover' | 'stretch';
22
+ /** How the preview puts the image into a size of other proportions (ADR 260, ADR 276). */
23
+ export type PosterFit = 'auto' | 'cover' | 'stretch';
24
24
  export interface PosterParams {
25
25
  posterUrl: string;
26
26
  posterTitle?: string;
@@ -91,8 +91,9 @@ export interface PosterParams {
91
91
  /** The colour of {@link posterMat}, as `#RRGGBB`. White when absent. */
92
92
  posterMatColor?: string;
93
93
  /**
94
- * How the image goes into a size of other proportions (ADR 260). `cover` crops it, as
95
- * CSS `object-fit: cover` does. `stretch` distorts it. The preview uses `cover` when absent.
94
+ * How the image goes into a size of other proportions (ADR 260, ADR 276). `cover` crops it, as
95
+ * CSS `object-fit: cover` does. `stretch` distorts it. `auto` distorts it by up to 8% and crops
96
+ * the remainder. The preview uses `auto` when absent.
96
97
  */
97
98
  posterFit?: PosterFit;
98
99
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAA;AAElC,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;AAE3C,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH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"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAiKH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAkKH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seeonwall",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Show shoppers a poster on their own wall, at true scale. The seeonwall.com widget for React and headless storefronts.",
5
5
  "keywords": [
6
6
  "seeonwall",