@syntrologie/adapt-product 2.8.0-canary.621 → 2.8.0-canary.622
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 +1 -1
- package/dist/{chunk-ZMAJFIEM.js → chunk-R4IIL3AD.js} +17 -10
- package/dist/chunk-R4IIL3AD.js.map +7 -0
- package/dist/runtime.js +1 -1
- package/dist/widgets/ProductCardLit.d.ts.map +1 -1
- package/dist/widgets/presentationContext.d.ts +10 -4
- package/dist/widgets/presentationContext.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZMAJFIEM.js.map +0 -7
package/dist/cdn.js
CHANGED
|
@@ -4912,9 +4912,8 @@ function standinMonogram(name) {
|
|
|
4912
4912
|
function presentationFromContext(el) {
|
|
4913
4913
|
let node = el;
|
|
4914
4914
|
while (node) {
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
}
|
|
4915
|
+
const named = node instanceof Element ? node.getAttribute("data-product-presentation") : null;
|
|
4916
|
+
if (named === "double" || named === "tall") return named;
|
|
4918
4917
|
const parent = node.parentNode;
|
|
4919
4918
|
node = parent instanceof ShadowRoot ? parent.host : parent;
|
|
4920
4919
|
}
|
|
@@ -5833,7 +5832,7 @@ var CARD_FLIP_CSS = `
|
|
|
5833
5832
|
.sc-product-card [data-card-flip] { animation: none; }
|
|
5834
5833
|
}
|
|
5835
5834
|
`;
|
|
5836
|
-
var _effectExecutor, _controller, _unsubDevice, _double, _lastFailureFingerprint, _reportedHealthStates, _healthRaf, _ProductCardLit_instances, scheduleHealthCheck_fn, measureAndReportHealth_fn, cleanupHostResources_fn, dispatchCard_fn, _onFlipAnimationEnd, startBind_fn, renderVariantPanel_fn, readProductObservation_fn, syncDecisionInputsBeforeIntent_fn;
|
|
5835
|
+
var _effectExecutor, _controller, _unsubDevice, _double, _tall, _lastFailureFingerprint, _reportedHealthStates, _healthRaf, _ProductCardLit_instances, scheduleHealthCheck_fn, measureAndReportHealth_fn, cleanupHostResources_fn, dispatchCard_fn, _onFlipAnimationEnd, startBind_fn, renderVariantPanel_fn, readProductObservation_fn, syncDecisionInputsBeforeIntent_fn;
|
|
5837
5836
|
var ProductCardLit = class extends LitElement8 {
|
|
5838
5837
|
constructor() {
|
|
5839
5838
|
super(...arguments);
|
|
@@ -5863,6 +5862,10 @@ var ProductCardLit = class extends LitElement8 {
|
|
|
5863
5862
|
* double-wide render branch: front face and options side by side, options
|
|
5864
5863
|
* pinned open. */
|
|
5865
5864
|
__privateAdd(this, _double, false);
|
|
5865
|
+
/** Set once at connect, like `#double`, from `data-product-presentation="tall"`:
|
|
5866
|
+
* the canvas gives the card all the height it needs, so a compact card puts
|
|
5867
|
+
* its price in the content column instead of on the photo. */
|
|
5868
|
+
__privateAdd(this, _tall, false);
|
|
5866
5869
|
/** Fingerprint of the last reported schema-validation failure (sorted
|
|
5867
5870
|
* invalid paths). Guards `render_failed` telemetry against re-render spam:
|
|
5868
5871
|
* the same bad props re-rendering must not re-emit. Reset on a successful
|
|
@@ -5907,7 +5910,9 @@ var ProductCardLit = class extends LitElement8 {
|
|
|
5907
5910
|
}
|
|
5908
5911
|
connectedCallback() {
|
|
5909
5912
|
super.connectedCallback();
|
|
5910
|
-
|
|
5913
|
+
const presentation = presentationFromContext(this);
|
|
5914
|
+
__privateSet(this, _double, presentation === "double");
|
|
5915
|
+
__privateSet(this, _tall, presentation === "tall");
|
|
5911
5916
|
if (__privateGet(this, _double)) __privateMethod(this, _ProductCardLit_instances, dispatchCard_fn).call(this, { type: "options-pinned", pinned: true });
|
|
5912
5917
|
__privateMethod(this, _ProductCardLit_instances, dispatchCard_fn).call(this, { type: "reconnected" });
|
|
5913
5918
|
__privateMethod(this, _ProductCardLit_instances, dispatchCard_fn).call(this, {
|
|
@@ -5990,7 +5995,8 @@ var ProductCardLit = class extends LitElement8 {
|
|
|
5990
5995
|
visibleFacts,
|
|
5991
5996
|
ctasWithMorphedLabel,
|
|
5992
5997
|
onPrimaryCtaClick,
|
|
5993
|
-
!view.primaryCta.disabled
|
|
5998
|
+
!view.primaryCta.disabled,
|
|
5999
|
+
!__privateGet(this, _tall)
|
|
5994
6000
|
);
|
|
5995
6001
|
const backFace = __privateMethod(this, _ProductCardLit_instances, renderVariantPanel_fn).call(this, view, product, {
|
|
5996
6002
|
pinned: false,
|
|
@@ -6028,6 +6034,7 @@ _effectExecutor = new WeakMap();
|
|
|
6028
6034
|
_controller = new WeakMap();
|
|
6029
6035
|
_unsubDevice = new WeakMap();
|
|
6030
6036
|
_double = new WeakMap();
|
|
6037
|
+
_tall = new WeakMap();
|
|
6031
6038
|
_lastFailureFingerprint = new WeakMap();
|
|
6032
6039
|
_reportedHealthStates = new WeakMap();
|
|
6033
6040
|
_healthRaf = new WeakMap();
|
|
@@ -6265,7 +6272,7 @@ function _buildArticleStyles(density, face = "front") {
|
|
|
6265
6272
|
overflow: "hidden"
|
|
6266
6273
|
};
|
|
6267
6274
|
}
|
|
6268
|
-
function renderProductCardInner(product, density, resolved, visibleFacts, ctas, onPrimaryCtaClick, commerceAvailable = true) {
|
|
6275
|
+
function renderProductCardInner(product, density, resolved, visibleFacts, ctas, onPrimaryCtaClick, commerceAvailable = true, priceOnPhoto = true) {
|
|
6269
6276
|
const imgSrc = resolved?.image ?? product.image?.src;
|
|
6270
6277
|
const showFraming = density === "standard" && product.framing;
|
|
6271
6278
|
const specGroups = buildSpecGroups(product);
|
|
@@ -6657,7 +6664,7 @@ function renderProductCardInner(product, density, resolved, visibleFacts, ctas,
|
|
|
6657
6664
|
>(${product.rating.count.toLocaleString()})</span
|
|
6658
6665
|
>
|
|
6659
6666
|
</div>` : nothing4;
|
|
6660
|
-
const priceOverlay = overlay && isVisible("price") && (product.price || product.salePrice) ? html9`<div
|
|
6667
|
+
const priceOverlay = overlay && priceOnPhoto && isVisible("price") && (product.price || product.salePrice) ? html9`<div
|
|
6661
6668
|
class="sc-product-card__price sc-product-card__price--overlay"
|
|
6662
6669
|
data-product-price
|
|
6663
6670
|
style=${styleMap(overlayPriceStyles)}
|
|
@@ -6833,7 +6840,7 @@ function renderProductCardInner(product, density, resolved, visibleFacts, ctas,
|
|
|
6833
6840
|
>
|
|
6834
6841
|
${factOrder.map((key) => {
|
|
6835
6842
|
if (key === "price") {
|
|
6836
|
-
if (overlay) return nothing4;
|
|
6843
|
+
if (overlay && priceOnPhoto) return nothing4;
|
|
6837
6844
|
if (!isVisible("price") || !product.price && !product.salePrice) return nothing4;
|
|
6838
6845
|
return html9`<div
|
|
6839
6846
|
class="sc-product-card__price"
|
|
@@ -12056,4 +12063,4 @@ export {
|
|
|
12056
12063
|
runtime,
|
|
12057
12064
|
runtime_default
|
|
12058
12065
|
};
|
|
12059
|
-
//# sourceMappingURL=chunk-
|
|
12066
|
+
//# sourceMappingURL=chunk-R4IIL3AD.js.map
|