seeonwall 0.2.0 → 0.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE3D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA;AAYzC;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAwBvD;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uEAAuE;IACvE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,EACvC,yBAAyB;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAC/B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CA2DzE"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE3D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA;AAYzC;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAwBvD;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uEAAuE;IACvE,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,EACvC,yBAAyB;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAC/B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CA6DzE"}
package/dist/react.js CHANGED
@@ -66,7 +66,7 @@ function attr(target, name, value) {
66
66
  * arrives.
67
67
  */
68
68
  export function SeeOnWallButton(props) {
69
- const { posterUrl, posterTitle, sizeUnit, posterWidth, posterHeight, posterSizes, posterInset, productPageUrl, lang, frameDefaultCm, frameDefaultColor, backgroundColor, textColor, borderRadius, borderColor, buttonClassName, matchButton, matchColors, className, style, } = props;
69
+ const { posterUrl, posterTitle, sizeUnit, posterWidth, posterHeight, posterSizes, posterInset, productPageUrl, lang, frameDefaultCm, frameDefaultColor, framePreset, backgroundColor, textColor, borderRadius, borderColor, buttonClassName, matchButton, matchColors, className, style, } = props;
70
70
  const attributes = {};
71
71
  attr(attributes, 'data-poster-url', posterUrl);
72
72
  attr(attributes, 'data-poster-title', posterTitle);
@@ -79,6 +79,7 @@ export function SeeOnWallButton(props) {
79
79
  attr(attributes, 'data-lang', lang);
80
80
  attr(attributes, 'data-frame-default-cm', frameDefaultCm);
81
81
  attr(attributes, 'data-frame-default-color', frameDefaultColor);
82
+ attr(attributes, 'data-frame-preset', framePreset);
82
83
  attr(attributes, 'data-bg-color', backgroundColor);
83
84
  attr(attributes, 'data-text-color', textColor);
84
85
  attr(attributes, 'data-border-radius', borderRadius);
package/dist/react.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAK1C;;;;;;;GAOG;AACH,IAAI,SAAS,GAAG,CAAC,CAAA;AAEjB;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,OAAoB;IAC/C,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAA;IAE/D,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,IAAI,CAAC,CAAA;QACd,KAAK,IAAI,CAAC;YACR,MAAM;YACN,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/C,GAAG,CAAC,IAAI,K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C,kBAAkB,EAC3E,KAAK,EAAE,KAAK,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC"}
package/dist/types.d.ts CHANGED
@@ -20,65 +20,98 @@ export interface PosterParams {
20
20
  posterUrl: string;
21
21
  posterTitle?: string;
22
22
  /**
23
- * Fallback unit for any value here that does not state its own (ADR 094).
24
- * Defaults to "cm". A value that spells out its unit — "24cm", "10in", "a4" —
25
- * is unaffected by this, so setting it shop-wide can never change the meaning
26
- * of a number that was already explicit.
23
+ * The unit for a value in this object that does not give one. Refer to
24
+ * ADR 094. The default is "cm".
27
25
  *
28
- * Also seeds the unit the shopper is shown for wall, frame and mat
29
- * measurements — they can still switch it in the visualizer.
26
+ * A value that gives its own unit does not change. Examples are "24cm",
27
+ * "10in" and "a4". Thus a shop-wide unit cannot change the meaning of a
28
+ * number that was already complete.
29
+ *
30
+ * This value also selects the first unit for the wall, the frame and the mat.
31
+ * The shopper can select a different unit in the visualizer.
30
32
  */
31
33
  sizeUnit?: SizeUnit;
32
34
  /**
33
- * Poster width. Either a number in {@link sizeUnit}, or a string carrying its
34
- * own unit — "24cm", "10in", "29,7 cm", '11"' — or a named format such as
35
- * "a4", which resolves to that format's width (21cm). Declare a named poster
36
- * by writing the same name in {@link posterHeight}.
35
+ * The width of the poster. Give one of these three forms:
36
+ *
37
+ * - A number in the unit of {@link sizeUnit}.
38
+ * - A string with its own unit, for example "24cm", "10in", "29,7 cm" or '11"'.
39
+ * - The name of a format, for example "a4". The width of A4 is 21cm.
40
+ *
41
+ * To declare a poster by name, write the same name in {@link posterHeight}.
37
42
  */
38
43
  posterWidth?: number | string;
39
- /** Poster height. Same forms as {@link posterWidth}; "a4" here is 29.7cm. */
44
+ /**
45
+ * The height of the poster. The forms are those of {@link posterWidth}. The
46
+ * height of A4 is 29.7cm.
47
+ */
40
48
  posterHeight?: number | string;
41
49
  /**
42
- * Comma-separated list of available poster sizes. Each entry is a "WxH" pair
43
- * that may carry its own unit, or a named format: "30x40,50x70",
44
- * "12x16in,18x24in", "a4,a3,50x70cm". Entries without a unit fall back to
45
- * {@link sizeUnit}.
46
- * When present with more than one entry, the visualizer shows a size selector.
50
+ * The sizes that the shopper can select. Write them in one string and put a
51
+ * comma between them.
52
+ *
53
+ * Each item is a "WxH" pair or the name of a format. An item can give its own
54
+ * unit. Examples are "30x40,50x70", "12x16in,18x24in" and "a4,a3,50x70cm". An
55
+ * item without a unit uses {@link sizeUnit}.
56
+ *
57
+ * The visualizer shows a size selector when there is more than one item.
47
58
  */
48
59
  posterSizes?: string;
49
60
  /**
50
- * Merchant-declared sub-rectangle of the poster image holding the actual artwork,
51
- * as "left,top,width,height" percentages (ADR 092).
61
+ * The part of the image that holds the artwork. Write four percentages and
62
+ * put a comma between them: the left edge, the top edge, the width and the
63
+ * height. Refer to ADR 092.
64
+ *
65
+ * Many shops sell with a mockup image. The print is in the middle of a
66
+ * coloured field, and often it has a frame. The print becomes too small if
67
+ * the visualizer uses the full image.
52
68
  *
53
- * Shops sell with mockup images — the print centred on a coloured field, often
54
- * framed — and rendering the whole image makes the print come out too small.
55
- * Forwarded verbatim: the visualizer parses it and ignores anything malformed, so a
56
- * typo in a theme setting degrades to the uncropped rendering rather than breaking.
69
+ * The widget sends this value without a change. The visualizer reads it and
70
+ * ignores a value that it cannot read. Thus an error in a theme setting gives
71
+ * the full image. It does not stop the preview.
57
72
  */
58
73
  posterInset?: string;
59
74
  /**
60
- * Explicit product page URL for this poster. When set, bookmarks link to this
61
- * URL instead of the page where the button was clicked (originPageUrl).
62
- * Useful on listing/search pages where each poster has its own detail page.
75
+ * The address of the product page for this poster.
76
+ *
77
+ * A bookmark uses this address. Without it, a bookmark uses the address of
78
+ * the page that holds the button. Give this value on a list page or a search
79
+ * page, where each poster has its own page.
63
80
  */
64
81
  productPageUrl?: string;
65
82
  /**
66
- * Per-button language override (BCP-47 tag, e.g. "pl", "de").
67
- * Read from data-lang on the .seeonwall-button element.
68
- * When set, this language is used for the button label and forwarded to the
69
- * visualizer iframe, overriding the global config.lang for this button only.
83
+ * The language for this button only. Write a BCP-47 tag, for example "pl" or
84
+ * "de". The widget reads it from the `data-lang` attribute of the mount.
85
+ *
86
+ * The widget uses this language for the label of the button, and it sends the
87
+ * language to the visualizer. This value replaces the language of the shop
88
+ * for this button. It does not change the other buttons.
70
89
  */
71
90
  lang?: string;
72
91
  /**
73
- * Width in centimetres of the frame the preview starts with. Omitted or 0 means
74
- * the poster previews unframed, which is what most shops sell — set this only if
75
- * the price on the page includes a frame. Shoppers can still add or remove one.
92
+ * The width in centimetres of the frame that the preview starts with.
93
+ *
94
+ * The preview shows no frame if this value is absent or 0. Most shops sell a
95
+ * print without a frame. Give this value only if the price on the page
96
+ * includes a frame. The shopper can add a frame or remove it.
76
97
  */
77
98
  frameDefaultCm?: number;
78
99
  /**
79
- * Hex colour of that default frame (e.g. "#3E2723"). Ignored unless
80
- * frameDefaultCm is greater than 0. Defaults to black.
100
+ * The colour of that frame, as a hex value, for example "#3E2723". The widget
101
+ * ignores this value if {@link frameDefaultCm} is 0 or absent. The default is
102
+ * black.
81
103
  */
82
104
  frameDefaultColor?: string;
105
+ /**
106
+ * The name of a frame that this shop sells (ADR 162).
107
+ *
108
+ * The widget reads it from the `data-frame-preset` attribute of the mount. It selects a frame
109
+ * from the catalogue of the shop, and the preview opens with the width and the colour of that
110
+ * frame. This value beats {@link frameDefaultCm} and {@link frameDefaultColor}.
111
+ *
112
+ * The value is the name that the merchant gave the frame in the admin portal. A name that no
113
+ * frame carries is ignored, and the two values above then apply.
114
+ */
115
+ framePreset?: string;
83
116
  }
84
117
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAA;AAElC,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW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AAM,CAAA;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seeonwall",
3
- "version": "0.2.0",
3
+ "version": "0.3.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",