@syntrologie/adapt-product 2.8.0-canary.621 → 2.8.0-canary.623

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 CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  onActivate,
3
3
  runtime
4
- } from "./chunk-ZMAJFIEM.js";
5
- import "./chunk-E2PP64GL.js";
4
+ } from "./chunk-B4FZB66N.js";
5
+ import "./chunk-T7LBBAXC.js";
6
6
 
7
7
  // src/cdn.ts
8
8
  var manifest = {
@@ -9,17 +9,19 @@ import {
9
9
  cardSchema,
10
10
  comparisonSchema,
11
11
  dispatchDiveDeeper,
12
+ emitOnBus,
12
13
  external_exports,
13
14
  fetchLivePrice,
14
15
  getProductPlatformAdapter,
15
16
  gridSchema,
16
17
  heroSchema,
18
+ publishOnBus,
17
19
  recoSchema,
18
20
  standinInitial,
19
21
  stripMountPlumbing,
20
22
  takeoverPlanSchema,
21
23
  watchLivePrice
22
- } from "./chunk-E2PP64GL.js";
24
+ } from "./chunk-T7LBBAXC.js";
23
25
 
24
26
  // src/presets-store.ts
25
27
  function presetsWindow() {
@@ -4912,9 +4914,8 @@ function standinMonogram(name) {
4912
4914
  function presentationFromContext(el) {
4913
4915
  let node = el;
4914
4916
  while (node) {
4915
- if (node instanceof Element && node.getAttribute("data-product-presentation") === "double") {
4916
- return "double";
4917
- }
4917
+ const named = node instanceof Element ? node.getAttribute("data-product-presentation") : null;
4918
+ if (named === "double" || named === "tall") return named;
4918
4919
  const parent = node.parentNode;
4919
4920
  node = parent instanceof ShadowRoot ? parent.host : parent;
4920
4921
  }
@@ -5028,11 +5029,7 @@ function measureRenderHealth(card) {
5028
5029
  // src/widgets/renderHealthReporter.ts
5029
5030
  function synEmit(name, props) {
5030
5031
  if (typeof window === "undefined") return;
5031
- try {
5032
- const emit2 = window.SynOS?.runtime?.events?.emit;
5033
- if (typeof emit2 === "function") emit2(name, props);
5034
- } catch {
5035
- }
5032
+ emitOnBus(window.SynOS?.runtime?.events, name, props);
5036
5033
  }
5037
5034
  var CLEAN = { clips: [], blank: false };
5038
5035
  function reportRenderHealth(root, opts) {
@@ -5743,23 +5740,11 @@ function synWindow() {
5743
5740
  }
5744
5741
  function _publishEvent(name, props) {
5745
5742
  if (typeof window === "undefined") return;
5746
- try {
5747
- const publish2 = synWindow().SynOS?.runtime?.events?.publish;
5748
- if (typeof publish2 === "function") {
5749
- publish2(name, props);
5750
- }
5751
- } catch {
5752
- }
5743
+ publishOnBus(synWindow().SynOS?.runtime?.events, name, props);
5753
5744
  }
5754
5745
  function _captureTelemetry(name, props) {
5755
5746
  if (typeof window === "undefined") return;
5756
- try {
5757
- const emit2 = synWindow().SynOS?.runtime?.events?.emit;
5758
- if (typeof emit2 === "function") {
5759
- emit2(name, props);
5760
- }
5761
- } catch {
5762
- }
5747
+ emitOnBus(synWindow().SynOS?.runtime?.events, name, props);
5763
5748
  }
5764
5749
  function _invalidPathsFromIssues(issues) {
5765
5750
  const paths = /* @__PURE__ */ new Set();
@@ -5833,7 +5818,7 @@ var CARD_FLIP_CSS = `
5833
5818
  .sc-product-card [data-card-flip] { animation: none; }
5834
5819
  }
5835
5820
  `;
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;
5821
+ 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
5822
  var ProductCardLit = class extends LitElement8 {
5838
5823
  constructor() {
5839
5824
  super(...arguments);
@@ -5863,6 +5848,10 @@ var ProductCardLit = class extends LitElement8 {
5863
5848
  * double-wide render branch: front face and options side by side, options
5864
5849
  * pinned open. */
5865
5850
  __privateAdd(this, _double, false);
5851
+ /** Set once at connect, like `#double`, from `data-product-presentation="tall"`:
5852
+ * the canvas gives the card all the height it needs, so a compact card puts
5853
+ * its price in the content column instead of on the photo. */
5854
+ __privateAdd(this, _tall, false);
5866
5855
  /** Fingerprint of the last reported schema-validation failure (sorted
5867
5856
  * invalid paths). Guards `render_failed` telemetry against re-render spam:
5868
5857
  * the same bad props re-rendering must not re-emit. Reset on a successful
@@ -5907,7 +5896,9 @@ var ProductCardLit = class extends LitElement8 {
5907
5896
  }
5908
5897
  connectedCallback() {
5909
5898
  super.connectedCallback();
5910
- __privateSet(this, _double, presentationFromContext(this) === "double");
5899
+ const presentation = presentationFromContext(this);
5900
+ __privateSet(this, _double, presentation === "double");
5901
+ __privateSet(this, _tall, presentation === "tall");
5911
5902
  if (__privateGet(this, _double)) __privateMethod(this, _ProductCardLit_instances, dispatchCard_fn).call(this, { type: "options-pinned", pinned: true });
5912
5903
  __privateMethod(this, _ProductCardLit_instances, dispatchCard_fn).call(this, { type: "reconnected" });
5913
5904
  __privateMethod(this, _ProductCardLit_instances, dispatchCard_fn).call(this, {
@@ -5990,7 +5981,8 @@ var ProductCardLit = class extends LitElement8 {
5990
5981
  visibleFacts,
5991
5982
  ctasWithMorphedLabel,
5992
5983
  onPrimaryCtaClick,
5993
- !view.primaryCta.disabled
5984
+ !view.primaryCta.disabled,
5985
+ !__privateGet(this, _tall)
5994
5986
  );
5995
5987
  const backFace = __privateMethod(this, _ProductCardLit_instances, renderVariantPanel_fn).call(this, view, product, {
5996
5988
  pinned: false,
@@ -6028,6 +6020,7 @@ _effectExecutor = new WeakMap();
6028
6020
  _controller = new WeakMap();
6029
6021
  _unsubDevice = new WeakMap();
6030
6022
  _double = new WeakMap();
6023
+ _tall = new WeakMap();
6031
6024
  _lastFailureFingerprint = new WeakMap();
6032
6025
  _reportedHealthStates = new WeakMap();
6033
6026
  _healthRaf = new WeakMap();
@@ -6265,7 +6258,7 @@ function _buildArticleStyles(density, face = "front") {
6265
6258
  overflow: "hidden"
6266
6259
  };
6267
6260
  }
6268
- function renderProductCardInner(product, density, resolved, visibleFacts, ctas, onPrimaryCtaClick, commerceAvailable = true) {
6261
+ function renderProductCardInner(product, density, resolved, visibleFacts, ctas, onPrimaryCtaClick, commerceAvailable = true, priceOnPhoto = true) {
6269
6262
  const imgSrc = resolved?.image ?? product.image?.src;
6270
6263
  const showFraming = density === "standard" && product.framing;
6271
6264
  const specGroups = buildSpecGroups(product);
@@ -6657,7 +6650,7 @@ function renderProductCardInner(product, density, resolved, visibleFacts, ctas,
6657
6650
  >(${product.rating.count.toLocaleString()})</span
6658
6651
  >
6659
6652
  </div>` : nothing4;
6660
- const priceOverlay = overlay && isVisible("price") && (product.price || product.salePrice) ? html9`<div
6653
+ const priceOverlay = overlay && priceOnPhoto && isVisible("price") && (product.price || product.salePrice) ? html9`<div
6661
6654
  class="sc-product-card__price sc-product-card__price--overlay"
6662
6655
  data-product-price
6663
6656
  style=${styleMap(overlayPriceStyles)}
@@ -6833,7 +6826,7 @@ function renderProductCardInner(product, density, resolved, visibleFacts, ctas,
6833
6826
  >
6834
6827
  ${factOrder.map((key) => {
6835
6828
  if (key === "price") {
6836
- if (overlay) return nothing4;
6829
+ if (overlay && priceOnPhoto) return nothing4;
6837
6830
  if (!isVisible("price") || !product.price && !product.salePrice) return nothing4;
6838
6831
  return html9`<div
6839
6832
  class="sc-product-card__price"
@@ -12056,4 +12049,4 @@ export {
12056
12049
  runtime,
12057
12050
  runtime_default
12058
12051
  };
12059
- //# sourceMappingURL=chunk-ZMAJFIEM.js.map
12052
+ //# sourceMappingURL=chunk-B4FZB66N.js.map