@syntrologie/adapt-product 2.56.0 → 2.57.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/dist/cdn.js +2 -2
- package/dist/{chunk-RUE5UUEN.js → chunk-E2PP64GL.js} +10 -1
- package/dist/{chunk-RUE5UUEN.js.map → chunk-E2PP64GL.js.map} +3 -3
- package/dist/{chunk-QNZXBFP5.js → chunk-YEW72FVW.js} +22 -10
- package/dist/{chunk-QNZXBFP5.js.map → chunk-YEW72FVW.js.map} +3 -3
- package/dist/runtime.js +2 -2
- package/dist/schema.js +1 -1
- package/dist/widgets/ProductRecoCarouselLit.d.ts.map +1 -1
- package/dist/widgets/imageStandin.d.ts +2 -1
- package/dist/widgets/imageStandin.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
IMAGE_STANDIN_BACKGROUND,
|
|
2
3
|
VISIBLE_FACT_KEYS,
|
|
3
4
|
ViewportClassController,
|
|
4
5
|
__privateAdd,
|
|
@@ -14,10 +15,11 @@ import {
|
|
|
14
15
|
gridSchema,
|
|
15
16
|
heroSchema,
|
|
16
17
|
recoSchema,
|
|
18
|
+
standinInitial,
|
|
17
19
|
stripMountPlumbing,
|
|
18
20
|
takeoverPlanSchema,
|
|
19
21
|
watchLivePrice
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-E2PP64GL.js";
|
|
21
23
|
|
|
22
24
|
// src/presets-store.ts
|
|
23
25
|
function presetsWindow() {
|
|
@@ -4897,9 +4899,8 @@ function sanitizeProductDescription(html32) {
|
|
|
4897
4899
|
|
|
4898
4900
|
// src/widgets/imageStandin.ts
|
|
4899
4901
|
import { html as html7 } from "lit";
|
|
4900
|
-
var IMAGE_STANDIN_BACKGROUND = "linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02) 45%, rgba(0, 0, 0, 0.22)), var(--sc-color-primary, #3a3a3a)";
|
|
4901
4902
|
function standinMonogram(name) {
|
|
4902
|
-
const initial = (
|
|
4903
|
+
const initial = standinInitial(name) ?? "?";
|
|
4903
4904
|
return html7`<span
|
|
4904
4905
|
data-standin-monogram
|
|
4905
4906
|
style="position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font:700 2.4rem/1 var(--sc-font-family, inherit);color:var(--sc-launcher-color, #ffffff);opacity:0.85;letter-spacing:0.02em;user-select:none;"
|
|
@@ -7800,20 +7801,31 @@ var ProductRecoCarouselLit = class extends LitElement13 {
|
|
|
7800
7801
|
return html14`
|
|
7801
7802
|
<section class="sc-reco" style="box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:2px var(--sc-reco-inset,12px) var(--sc-reco-inset,12px);">
|
|
7802
7803
|
<div class="sc-reco__carousel" role="list" style="display:flex;align-items:stretch;gap:8px;flex:1 1 auto;min-height:0;overflow-x:auto;scroll-snap-type:x mandatory;">
|
|
7803
|
-
${items.map(
|
|
7804
|
-
|
|
7804
|
+
${items.map((it) => {
|
|
7805
|
+
const shownPrice = it.product_id && this._live[it.product_id] || it.price;
|
|
7806
|
+
const label = [it.name, shownPrice, it.hook].filter(Boolean).join(", ");
|
|
7807
|
+
return html14`
|
|
7805
7808
|
<div role="listitem" style="display:contents;">
|
|
7806
7809
|
<a data-reco-item data-product-cta="primary" href=${it.pdp_href}
|
|
7810
|
+
aria-label=${label || nothing9}
|
|
7807
7811
|
style=${styleMap2({ position: "relative", flex: "0 0 auto", aspectRatio: "4 / 5", minHeight: "var(--sc-reco-item-min-h, 162px)", maxHeight: "var(--sc-reco-item-max-h, 340px)", borderRadius: "12px", overflow: "hidden", scrollSnapAlign: "start", textDecoration: "none", display: "block", background: "#e5e7eb" })}>
|
|
7808
|
-
${it.image_url ? html14`<img src=${it.image_url} alt=${it.hook ?? "Recommended product"} loading="lazy" style="position:absolute;inset:0;width:100%;height:100%;object-fit:cover;">` :
|
|
7812
|
+
${it.image_url ? html14`<img src=${it.image_url} alt=${it.hook ?? "Recommended product"} loading="lazy" style="position:absolute;inset:0;width:100%;height:100%;object-fit:cover;">` : (
|
|
7813
|
+
// No photo from the store: the same branded stand-in the
|
|
7814
|
+
// card and comparison paint (imageStandin.ts), never a
|
|
7815
|
+
// flat grey box. Decorative: the product name is shown as
|
|
7816
|
+
// text below it. Nothing to name it by -> no monogram (a
|
|
7817
|
+
// '?' reads as broken).
|
|
7818
|
+
html14`<div data-product-image-standin aria-hidden="true" style="position:absolute;inset:0;background:${IMAGE_STANDIN_BACKGROUND};">${it.name || it.hook ? standinMonogram(it.name || it.hook) : nothing9}</div>`
|
|
7819
|
+
)}
|
|
7809
7820
|
<span style="position:absolute;inset:auto 0 0 0;height:60%;background:linear-gradient(transparent,rgba(0,0,0,.62));"></span>
|
|
7810
7821
|
<span style="position:absolute;left:8px;right:8px;bottom:8px;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5);">
|
|
7811
|
-
${it.
|
|
7822
|
+
${!it.image_url && it.name ? html14`<span data-reco-name style="display:block;font-weight:700;font-size:0.82rem;line-height:1.2;margin-bottom:2px;">${it.name}</span>` : nothing9}
|
|
7823
|
+
${shownPrice ? html14`<span style="display:block;font-weight:700;font-size:0.9rem;">${shownPrice}</span>` : nothing9}
|
|
7812
7824
|
${it.hook ? html14`<span style="display:block;font-size:0.72rem;line-height:1.2;opacity:.95;">${it.hook}</span>` : nothing9}
|
|
7813
7825
|
</span>
|
|
7814
7826
|
</a>
|
|
7815
|
-
</div
|
|
7816
|
-
)}
|
|
7827
|
+
</div>`;
|
|
7828
|
+
})}
|
|
7817
7829
|
</div>
|
|
7818
7830
|
</section>`;
|
|
7819
7831
|
}
|
|
@@ -12044,4 +12056,4 @@ export {
|
|
|
12044
12056
|
runtime,
|
|
12045
12057
|
runtime_default
|
|
12046
12058
|
};
|
|
12047
|
-
//# sourceMappingURL=chunk-
|
|
12059
|
+
//# sourceMappingURL=chunk-YEW72FVW.js.map
|