seeonwall 0.12.0 → 0.14.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 +6 -5
- package/dist/types.d.ts +6 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ The widget labels the button itself, in each of the languages it knows, and foll
|
|
|
124
124
|
A string is used in every language. An object replaces the label of the languages it names
|
|
125
125
|
and leaves the rest translated, so a shop that has wording for two of its languages keeps the
|
|
126
126
|
widget's wording for the others. The keys are the languages in `BUTTON_TEXT_LANGS`, exported
|
|
127
|
-
from the package: `en`, `pl`, `de`, `es`, `fr`, `it`, `pt`, `nl`, `sv`, `nb`, `da`, `fi`. A shopper on any
|
|
127
|
+
from the package: `en`, `pl`, `de`, `es`, `fr`, `it`, `pt`, `nl`, `sv`, `nb`, `da`, `fi`, `cs`, `sk`. A shopper on any
|
|
128
128
|
other language reads the English label, and your English override if you set one.
|
|
129
129
|
|
|
130
130
|
Under `icon` the label is still resolved and translated — it becomes the accessible name and
|
|
@@ -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
|
|
252
|
-
to the size
|
|
253
|
-
|
|
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
|
|
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.
|
|
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
|
/**
|
|
@@ -181,7 +182,7 @@ export interface PosterOffer {
|
|
|
181
182
|
* language that is not in this list gets the English label, and the English
|
|
182
183
|
* replacement if you give one.
|
|
183
184
|
*/
|
|
184
|
-
export declare const BUTTON_TEXT_LANGS: readonly ["en", "pl", "de", "es", "fr", "it", "pt", "nl", "sv", "nb", "da", "fi"];
|
|
185
|
+
export declare const BUTTON_TEXT_LANGS: readonly ["en", "pl", "de", "es", "fr", "it", "pt", "nl", "sv", "nb", "da", "fi", "cs", "sk"];
|
|
185
186
|
/** One language of {@link BUTTON_TEXT_LANGS}. */
|
|
186
187
|
export type ButtonTextLang = (typeof BUTTON_TEXT_LANGS)[number];
|
|
187
188
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -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,
|
|
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,0FAA0F;AAC1F,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAEpD,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;;;;OAIG;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,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,sFAAsF;IACtF,GAAG,EAAE,MAAM,CAAA;IACX,qDAAqD;IACrD,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,sDAAsD;IACtD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,mGAAmG;IACnG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kGAAkG;IAClG,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,+FAAgG,CAAA;AAE9H,iDAAiD;AACjD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
package/dist/types.js
CHANGED
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
* language that is not in this list gets the English label, and the English
|
|
27
27
|
* replacement if you give one.
|
|
28
28
|
*/
|
|
29
|
-
export const BUTTON_TEXT_LANGS = ['en', 'pl', 'de', 'es', 'fr', 'it', 'pt', 'nl', 'sv', 'nb', 'da', 'fi'];
|
|
29
|
+
export const BUTTON_TEXT_LANGS = ['en', 'pl', 'de', 'es', 'fr', 'it', 'pt', 'nl', 'sv', 'nb', 'da', 'fi', 'cs', 'sk'];
|
|
30
30
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
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,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA"}
|
package/package.json
CHANGED