@syntrologie/adapt-product 2.55.1 → 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/bind/controller.d.ts +22 -1
- package/dist/bind/controller.d.ts.map +1 -1
- package/dist/cdn.js +2 -2
- package/dist/chunk-E2PP64GL.js +5215 -0
- package/dist/chunk-E2PP64GL.js.map +7 -0
- package/dist/{chunk-QXR5X22R.js → chunk-YEW72FVW.js} +1038 -1214
- package/dist/chunk-YEW72FVW.js.map +7 -0
- package/dist/decision/card.d.ts +4 -0
- package/dist/decision/card.d.ts.map +1 -1
- package/dist/platformAdapter.d.ts +31 -0
- package/dist/platformAdapter.d.ts.map +1 -1
- package/dist/runtime.d.ts +9 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +4 -2
- package/dist/sanitizer.d.ts +4 -0
- package/dist/sanitizer.d.ts.map +1 -1
- package/dist/schema.d.ts +32 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -1
- package/dist/storefront-urls.d.ts +9 -0
- package/dist/storefront-urls.d.ts.map +1 -0
- package/dist/widgets/OtherProductTileLit.d.ts +20 -2
- package/dist/widgets/OtherProductTileLit.d.ts.map +1 -1
- package/dist/widgets/PdpChartBarStackedLit.d.ts.map +1 -1
- package/dist/widgets/PdpChartLit.d.ts.map +1 -1
- package/dist/widgets/PdpChartMetricPullLit.d.ts.map +1 -1
- package/dist/widgets/PdpOtherProductsCarouselLit.d.ts.map +1 -1
- package/dist/widgets/PdpOtherProductsGridLit.d.ts.map +1 -1
- package/dist/widgets/PdpPeerFeedCarouselLit.d.ts.map +1 -1
- package/dist/widgets/PdpPeerFeedLit.d.ts.map +1 -1
- package/dist/widgets/PdpPeerFeedMasonryLit.d.ts.map +1 -1
- package/dist/widgets/PdpQaAccordionLit.d.ts.map +1 -1
- package/dist/widgets/PdpQaLit.d.ts.map +1 -1
- package/dist/widgets/PdpQaSideBySideLit.d.ts.map +1 -1
- package/dist/widgets/PdpRegionalFullBleedLit.d.ts.map +1 -1
- package/dist/widgets/PdpRegionalInlineNoteLit.d.ts.map +1 -1
- package/dist/widgets/PdpRegionalLit.d.ts.map +1 -1
- package/dist/widgets/PdpRibbonLit.d.ts.map +1 -1
- package/dist/widgets/PdpSectionHeaderLit.d.ts.map +1 -1
- package/dist/widgets/PdpSlotLit.d.ts.map +1 -1
- package/dist/widgets/PdpTrendingNewsHeroLit.d.ts.map +1 -1
- package/dist/widgets/PdpTrendingNewsLit.d.ts.map +1 -1
- package/dist/widgets/PdpTrendingNewsMagazineLit.d.ts.map +1 -1
- package/dist/widgets/ProductCardLit.d.ts +3 -8
- package/dist/widgets/ProductCardLit.d.ts.map +1 -1
- package/dist/widgets/ProductComparisonLit.d.ts +1 -5
- package/dist/widgets/ProductComparisonLit.d.ts.map +1 -1
- package/dist/widgets/ProductDetailsLit.d.ts +31 -0
- package/dist/widgets/ProductDetailsLit.d.ts.map +1 -0
- package/dist/widgets/ProductGridLit.d.ts +2 -4
- package/dist/widgets/ProductGridLit.d.ts.map +1 -1
- package/dist/widgets/ProductHeroLit.d.ts +2 -4
- package/dist/widgets/ProductHeroLit.d.ts.map +1 -1
- package/dist/widgets/ProductRecoCarouselLit.d.ts +7 -0
- package/dist/widgets/ProductRecoCarouselLit.d.ts.map +1 -1
- package/dist/widgets/SyntroPdpLit.d.ts +12 -3
- package/dist/widgets/SyntroPdpLit.d.ts.map +1 -1
- package/dist/widgets/VariantPanelLit.d.ts +9 -0
- package/dist/widgets/VariantPanelLit.d.ts.map +1 -1
- package/dist/widgets/imageStandin.d.ts +2 -1
- package/dist/widgets/imageStandin.d.ts.map +1 -1
- package/dist/widgets/presentationContext.d.ts +11 -0
- package/dist/widgets/presentationContext.d.ts.map +1 -0
- package/package.json +4 -7
- package/dist/chunk-D2W6UYLT.js +0 -370
- package/dist/chunk-D2W6UYLT.js.map +0 -7
- package/dist/chunk-QXR5X22R.js.map +0 -7
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { Product } from '../schema-primitives';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* `compare_at` comes only from the store's live price: the struck-through
|
|
4
|
+
* pre-sale price, or null when the store says the product is not on sale
|
|
5
|
+
* (which overrides any sale the catalog still carries).
|
|
6
|
+
*/
|
|
7
|
+
export type BindCallback = (productId: string, kind: 'image' | 'price' | 'compare_at', value: string | null) => void;
|
|
3
8
|
export declare class BindController {
|
|
4
9
|
#private;
|
|
5
10
|
private readonly products;
|
|
@@ -9,4 +14,20 @@ export declare class BindController {
|
|
|
9
14
|
allSettled(): Promise<void>;
|
|
10
15
|
destroy(): void;
|
|
11
16
|
}
|
|
17
|
+
/** What a widget paints over its props: bound image/price, and the store's
|
|
18
|
+
* live sale display (`compareAt` present only when the store answered). */
|
|
19
|
+
export type ResolvedFields = {
|
|
20
|
+
image?: string;
|
|
21
|
+
price?: string;
|
|
22
|
+
compareAt?: string | null;
|
|
23
|
+
};
|
|
24
|
+
export type ResolvedMap = Record<string, ResolvedFields>;
|
|
25
|
+
/** Fold one bind answer into a widget's resolved map. A null image/price is
|
|
26
|
+
* no answer (the props stand); a null compare-at is the store saying "not on
|
|
27
|
+
* sale", which a widget must honour over the catalog. */
|
|
28
|
+
export declare function mergeResolved(resolved: ResolvedMap, productId: string, kind: 'image' | 'price' | 'compare_at', value: string | null): ResolvedMap;
|
|
29
|
+
/** On a rebind, keep the store's live answer for products still priced live
|
|
30
|
+
* (no explicit bind), so the price never flicks back to the catalog's for a
|
|
31
|
+
* frame. Anything an explicit bind resolved is re-resolved from scratch. */
|
|
32
|
+
export declare function keepResolved(resolved: ResolvedMap, products: ReadonlyArray<Pick<Product, 'id' | 'price'>>): ResolvedMap;
|
|
12
33
|
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/bind/controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/bind/controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGpD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,YAAY,EACtC,KAAK,EAAE,MAAM,GAAG,IAAI,KACjB,IAAI,CAAC;AAEV,qBAAa,cAAc;;IAOvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBADR,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,QAAQ,EAAE,YAAY;IAGzC,KAAK,IAAI,IAAI;IA0BP,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjC,OAAO,IAAI,IAAI;CAyBhB;AAED;4EAC4E;AAC5E,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAC3F,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAEzD;;0DAE0D;AAC1D,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,WAAW,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,YAAY,EACtC,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,WAAW,CAMb;AAED;;6EAE6E;AAC7E,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC,GACrD,WAAW,CAQb"}
|