@depict-ai/ui 4.3.2 → 4.3.4
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/ES10/index.cjs +159 -140
- package/ES10/index.d.ts +12 -1
- package/ES10/index.js +193 -174
- package/latest/index.cjs +153 -134
- package/latest/index.d.ts +12 -1
- package/latest/index.js +187 -168
- package/package.json +2 -2
- package/server/ES10/index.cjs +129 -117
- package/server/ES10/index.d.ts +12 -1
- package/server/ES10/index.js +168 -156
- package/server/latest/index.cjs +123 -111
- package/server/latest/index.d.ts +12 -1
- package/server/latest/index.js +162 -150
package/server/latest/index.cjs
CHANGED
|
@@ -12,7 +12,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
12
12
|
configurable: true
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
$parcel$export(module.exports, "LooksSlider", () => $
|
|
15
|
+
$parcel$export(module.exports, "LooksSlider", () => $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa);
|
|
16
16
|
$parcel$export(module.exports, "promiseSafeStructuredClone", () => $ac946c6b782bb900$export$83bb9af5671e1dbe);
|
|
17
17
|
$parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $d84fe647b84b5dc5$export$5162a71f252e6122);
|
|
18
18
|
$parcel$export(module.exports, "prefixes_to_preserve_in_history_dot_state", () => $d84fe647b84b5dc5$export$3064e1e8c6513da3);
|
|
@@ -94,7 +94,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
94
94
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
95
95
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
96
96
|
/*! Depict.ai search and product listing SDK */
|
|
97
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.3.
|
|
97
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.3.4";
|
|
98
98
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
99
99
|
const cols_at_size = [];
|
|
100
100
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -1192,7 +1192,7 @@ var $1ae437d7d388a66e$var$_tmpl$ = ["<div", ' class="img-wrapper">', "</div>"],
|
|
|
1192
1192
|
function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
1193
1193
|
display_: display_,
|
|
1194
1194
|
FavoriteButton_: FavoriteButton_,
|
|
1195
|
-
|
|
1195
|
+
userWantsExpandedSignal_: [userWantsExpanded, setUserWantsExpanded],
|
|
1196
1196
|
textFadeInAnimationRunning_: textFadeInAnimationRunning_,
|
|
1197
1197
|
outerRef_: outerRef_,
|
|
1198
1198
|
animationDuration_: animationDuration_,
|
|
@@ -1205,12 +1205,12 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1205
1205
|
});
|
|
1206
1206
|
const imageUrl = $5vyXB$solidjs.createMemo(() => variantToUse()?.image_urls?.[0]);
|
|
1207
1207
|
const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
|
|
1208
|
-
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $5vyXB$solidjs.createSignal($5vyXB$solidjs.untrack(
|
|
1208
|
+
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $5vyXB$solidjs.createSignal($5vyXB$solidjs.untrack(userWantsExpanded));
|
|
1209
1209
|
const [animationEffectExists, setAnimationEffectExists] = $5vyXB$solidjs.createSignal(false);
|
|
1210
1210
|
const [salePrice] = $5vyXB$solidjs.createResource(() => variantToUse()?.sale_price);
|
|
1211
1211
|
const [originalPrice] = $5vyXB$solidjs.createResource(() => variantToUse()?.original_price);
|
|
1212
1212
|
const isOnSale = $5vyXB$solidjs.createMemo(() => !salePrice.loading && !originalPrice.loading && salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense after the initial load
|
|
1213
|
-
const enableLink = $5vyXB$solidjs.createMemo(() =>
|
|
1213
|
+
const enableLink = $5vyXB$solidjs.createMemo(() => userWantsExpanded() && !animationIsRunning());
|
|
1214
1214
|
const href = $5vyXB$solidjs.createMemo(() => variantToUse()?.page_url);
|
|
1215
1215
|
const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
|
|
1216
1216
|
return $5vyXB$solidjsweb.ssrElement("a", $5vyXB$solidjsweb.mergeProps({
|
|
@@ -1240,10 +1240,10 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1240
1240
|
return imageUrl();
|
|
1241
1241
|
},
|
|
1242
1242
|
get aspectRatio() {
|
|
1243
|
-
return
|
|
1243
|
+
return userWantsExpanded() ? 0.75 : 1;
|
|
1244
1244
|
},
|
|
1245
1245
|
get autoAdjustAspectRatio() {
|
|
1246
|
-
return
|
|
1246
|
+
return userWantsExpanded();
|
|
1247
1247
|
},
|
|
1248
1248
|
imgProps: {
|
|
1249
1249
|
keyRatioUpdating: true
|
|
@@ -1254,7 +1254,7 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1254
1254
|
}
|
|
1255
1255
|
})), "<!--/-->", "<!--$-->", $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1256
1256
|
get when() {
|
|
1257
|
-
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() :
|
|
1257
|
+
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
|
|
1258
1258
|
},
|
|
1259
1259
|
get children() {
|
|
1260
1260
|
return $5vyXB$solidjsweb.ssr($1ae437d7d388a66e$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(variantToUse()?.title) ?? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
@@ -1386,7 +1386,7 @@ var $905010a06f9aeae5$var$_tmpl$ = ["<div", ' class="scroll-padding">', "</div>"
|
|
|
1386
1386
|
function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
1387
1387
|
displays_: displays_,
|
|
1388
1388
|
FavoriteButton_: FavoriteButton_,
|
|
1389
|
-
userWantsExpandedSignal_:
|
|
1389
|
+
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
1390
1390
|
containerWidth_: containerWidth_,
|
|
1391
1391
|
animationDuration_: animationDuration_,
|
|
1392
1392
|
supportsHover_: supportsHover_,
|
|
@@ -1400,6 +1400,7 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1400
1400
|
// The following three signals just contain the state if the animations are actually running and should only be set by the respective animation code
|
|
1401
1401
|
const textFadeInAnimationRunning = $5vyXB$solidjs.createSignal(false);
|
|
1402
1402
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1403
|
+
const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
|
|
1403
1404
|
$b9e830d616d01b31$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1404
1405
|
return $5vyXB$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
1405
1406
|
get children() {
|
|
@@ -1426,7 +1427,7 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1426
1427
|
animationDuration_: animationDuration_,
|
|
1427
1428
|
display_: display,
|
|
1428
1429
|
FavoriteButton_: FavoriteButton_,
|
|
1429
|
-
|
|
1430
|
+
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
1430
1431
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
1431
1432
|
priceFormatting_: priceFormatting_,
|
|
1432
1433
|
outerRef_: el => $5vyXB$solidjs.createEffect(() => {
|
|
@@ -1640,11 +1641,85 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
1640
1641
|
this.on_navigation_ = on_navigation;
|
|
1641
1642
|
}
|
|
1642
1643
|
}
|
|
1643
|
-
var $
|
|
1644
|
-
|
|
1645
|
-
|
|
1644
|
+
var $b8e79813f4f7ebe4$var$_tmpl$ = ["<button", ' class="show-more major" type="button">', "</button>"],
|
|
1645
|
+
$b8e79813f4f7ebe4$var$_tmpl$2 = ["<h2", ' class="recs-title">', "</h2>"],
|
|
1646
|
+
$b8e79813f4f7ebe4$var$_tmpl$3 = ["<div", ' class="recommendation-grid"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"];
|
|
1647
|
+
function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
1648
|
+
recommendations_resource_: recommendations_resource_,
|
|
1649
|
+
product_card_template_: product_card_template_,
|
|
1650
|
+
layout_options_: layout_options_,
|
|
1651
|
+
title_: title_,
|
|
1652
|
+
max_rows_: max_rows_,
|
|
1653
|
+
view_more_button_: view_more_button_
|
|
1654
|
+
}) {
|
|
1655
|
+
const rows_object_ = $5vyXB$solidjs.createMemo(() => {
|
|
1656
|
+
const view_more_button = view_more_button_?.();
|
|
1657
|
+
const max_rows = max_rows_?.();
|
|
1658
|
+
if (!view_more_button) {
|
|
1659
|
+
if (max_rows) return {
|
|
1660
|
+
max_rows: max_rows
|
|
1661
|
+
};
|
|
1662
|
+
return "all";
|
|
1663
|
+
}
|
|
1664
|
+
return {
|
|
1665
|
+
max_rows: max_rows,
|
|
1666
|
+
start_rows: view_more_button.start_rows,
|
|
1667
|
+
rows_per_click: view_more_button.rows_per_click ?? 2,
|
|
1668
|
+
button: $5vyXB$solidjsweb.ssr($b8e79813f4f7ebe4$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(view_more_button.text))
|
|
1669
|
+
};
|
|
1670
|
+
});
|
|
1671
|
+
const is_showing_something = $5vyXB$solidjs.createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
1672
|
+
const title = $5vyXB$solidjs.createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
1673
|
+
const num_placeholders_ = () => 20;
|
|
1674
|
+
const elements = [$5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1675
|
+
get when() {
|
|
1676
|
+
return title();
|
|
1677
|
+
},
|
|
1678
|
+
get children() {
|
|
1679
|
+
return $5vyXB$solidjsweb.ssr($b8e79813f4f7ebe4$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(title()));
|
|
1680
|
+
}
|
|
1681
|
+
}), $5vyXB$solidjsweb.ssr($b8e79813f4f7ebe4$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($fc23d7668ae0011d$export$a2cc176055f8f08()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $f48d0fbb00835aaa$export$d21e32dfedac04be), $5vyXB$solidjsweb.mergeProps({
|
|
1682
|
+
get rows() {
|
|
1683
|
+
return rows_object_();
|
|
1684
|
+
},
|
|
1685
|
+
layout: "grid",
|
|
1686
|
+
element_attributes: {
|
|
1687
|
+
class: "cards"
|
|
1688
|
+
}
|
|
1689
|
+
}, layout_options_, {
|
|
1690
|
+
get children() {
|
|
1691
|
+
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Suspense), {
|
|
1692
|
+
get fallback() {
|
|
1693
|
+
return $0caf87eaa19079da$export$f33414a4df0afd3f({
|
|
1694
|
+
num_placeholders_: num_placeholders_,
|
|
1695
|
+
product_card_template_: product_card_template_
|
|
1696
|
+
});
|
|
1697
|
+
},
|
|
1698
|
+
get children() {
|
|
1699
|
+
return (() => {
|
|
1700
|
+
// IIFE to make sure we access both the recommendations_resource and the resources containing the product card rendering results themselves within the Suspense boundary
|
|
1701
|
+
const displays_by_key_ = $a73063cc642f3e5f$export$7f8bd308237ab5a5($5vyXB$solidjs.createMemo(() => recommendations_resource_() || []));
|
|
1702
|
+
return $a73063cc642f3e5f$export$43f0fb951fcb0c54({
|
|
1703
|
+
displays_by_key_: displays_by_key_,
|
|
1704
|
+
product_card_template_: product_card_template_
|
|
1705
|
+
});
|
|
1706
|
+
})();
|
|
1707
|
+
}
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1710
|
+
}))))];
|
|
1711
|
+
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1712
|
+
get when() {
|
|
1713
|
+
return is_showing_something();
|
|
1714
|
+
},
|
|
1715
|
+
children: elements
|
|
1716
|
+
});
|
|
1717
|
+
}
|
|
1718
|
+
var $a3bbfa5fdaa39f3a$var$_tmpl$ = ["<div", ' class="depict recommendations looks" style="', '">', "</div>"];
|
|
1719
|
+
let $a3bbfa5fdaa39f3a$var$expandedLooksSignal_;
|
|
1720
|
+
function $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa(props) {
|
|
1646
1721
|
return $95837413165cc2df$export$23fca46f3143581f(() => {
|
|
1647
|
-
$
|
|
1722
|
+
$a3bbfa5fdaa39f3a$var$expandedLooksSignal_ ||= $5vyXB$solidjs.createSignal(new Set(), {
|
|
1648
1723
|
equals: false
|
|
1649
1724
|
});
|
|
1650
1725
|
const expandingAnimationDuration = 240;
|
|
@@ -1684,38 +1759,49 @@ function $072863633018e322$export$1935e6bdfc5ed8ce(props) {
|
|
|
1684
1759
|
market: market,
|
|
1685
1760
|
locale: locale
|
|
1686
1761
|
};
|
|
1687
|
-
return $
|
|
1762
|
+
return $a3bbfa5fdaa39f3a$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
1688
1763
|
});
|
|
1764
|
+
const sharedOptions = {
|
|
1765
|
+
product_card_template_: display => $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
1766
|
+
display_: display,
|
|
1767
|
+
FavoriteButton_: props.FavoriteButton_,
|
|
1768
|
+
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
1769
|
+
animationDuration_: expandingAnimationDuration,
|
|
1770
|
+
expandedLooksSignal_: $a3bbfa5fdaa39f3a$var$expandedLooksSignal_,
|
|
1771
|
+
priceFormatting_: () => props.priceFormatting_,
|
|
1772
|
+
pseudoRouter_: pseudoRouter
|
|
1773
|
+
}),
|
|
1774
|
+
recommendations_resource_: looksResource,
|
|
1775
|
+
title_: () => props.title_,
|
|
1776
|
+
layout_options_: $5vyXB$solidjs.createMemo(() => ({
|
|
1777
|
+
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
1778
|
+
...grid_spacing_override()
|
|
1779
|
+
}))
|
|
1780
|
+
};
|
|
1689
1781
|
$5vyXB$solidjs.createEffect(() => {
|
|
1690
1782
|
const {
|
|
1691
1783
|
onNavigation_: onNavigation_
|
|
1692
1784
|
} = props;
|
|
1693
1785
|
if (onNavigation_) pseudoRouter.on_navigation_ = onNavigation_;
|
|
1694
1786
|
});
|
|
1695
|
-
return $5vyXB$solidjsweb.ssr($
|
|
1787
|
+
return $5vyXB$solidjsweb.ssr($a3bbfa5fdaa39f3a$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(`--animation-duration: ${expandingAnimationDuration}ms`), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
1696
1788
|
get children() {
|
|
1697
|
-
return $
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
}
|
|
1707
|
-
recommendations_resource_: looksResource,
|
|
1708
|
-
title_: () => props.title_,
|
|
1709
|
-
layout_options_: $5vyXB$solidjs.createMemo(() => ({
|
|
1710
|
-
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
1711
|
-
...grid_spacing_override()
|
|
1712
|
-
}))
|
|
1789
|
+
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1790
|
+
get when() {
|
|
1791
|
+
return props.gridOptions_;
|
|
1792
|
+
},
|
|
1793
|
+
get fallback() {
|
|
1794
|
+
return $5vyXB$solidjsweb.createComponent((0, $363ce4d1d71041aa$export$d41d19e89346fa2), sharedOptions);
|
|
1795
|
+
},
|
|
1796
|
+
get children() {
|
|
1797
|
+
return $5vyXB$solidjsweb.createComponent((0, $b8e79813f4f7ebe4$export$7da560f849543dff), $5vyXB$solidjsweb.mergeProps(sharedOptions, () => props.gridOptions_));
|
|
1798
|
+
}
|
|
1713
1799
|
});
|
|
1714
1800
|
}
|
|
1715
1801
|
})));
|
|
1716
1802
|
}, "LookSlider failed");
|
|
1717
1803
|
}
|
|
1718
|
-
async function $
|
|
1804
|
+
async function $a3bbfa5fdaa39f3a$var$runDisplayTransformersForLooks(baseData, listings, displayTransformers) {
|
|
1719
1805
|
try {
|
|
1720
1806
|
const {
|
|
1721
1807
|
products: productTransformer,
|
|
@@ -4339,84 +4425,9 @@ const $0b23bfd073d9a4e8$export$b91cec6bdc6b32a1 = /*@__PURE__*/(() => {
|
|
|
4339
4425
|
const $a3280f0aad997933$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
4340
4426
|
const $a3280f0aad997933$export$864d304a0bc46829 = "2%";
|
|
4341
4427
|
const $a3280f0aad997933$export$7bf543b9d9be2c22 = (0, $0b23bfd073d9a4e8$export$b91cec6bdc6b32a1);
|
|
4342
|
-
var $
|
|
4343
|
-
$b8e79813f4f7ebe4$var$_tmpl$2 = ["<div", ' class="recommendation-grid"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"];
|
|
4344
|
-
function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
4345
|
-
recommendations_resource_: recommendations_resource_,
|
|
4346
|
-
product_card_template_: product_card_template_,
|
|
4347
|
-
layout_options_: layout_options_,
|
|
4348
|
-
rows_object_: rows_object_,
|
|
4349
|
-
title_: title_
|
|
4350
|
-
}) {
|
|
4351
|
-
const is_showing_something = $5vyXB$solidjs.createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
4352
|
-
const title = $5vyXB$solidjs.createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
4353
|
-
const num_placeholders_ = () => 20;
|
|
4354
|
-
const elements = [$5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
4355
|
-
get when() {
|
|
4356
|
-
return title();
|
|
4357
|
-
},
|
|
4358
|
-
get children() {
|
|
4359
|
-
return $5vyXB$solidjsweb.ssr($b8e79813f4f7ebe4$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(title()));
|
|
4360
|
-
}
|
|
4361
|
-
}), $5vyXB$solidjsweb.ssr($b8e79813f4f7ebe4$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($fc23d7668ae0011d$export$a2cc176055f8f08()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $f48d0fbb00835aaa$export$d21e32dfedac04be), $5vyXB$solidjsweb.mergeProps({
|
|
4362
|
-
get rows() {
|
|
4363
|
-
return rows_object_();
|
|
4364
|
-
},
|
|
4365
|
-
layout: "grid",
|
|
4366
|
-
element_attributes: {
|
|
4367
|
-
class: "cards"
|
|
4368
|
-
}
|
|
4369
|
-
}, layout_options_, {
|
|
4370
|
-
get children() {
|
|
4371
|
-
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Suspense), {
|
|
4372
|
-
get fallback() {
|
|
4373
|
-
return $0caf87eaa19079da$export$f33414a4df0afd3f({
|
|
4374
|
-
num_placeholders_: num_placeholders_,
|
|
4375
|
-
product_card_template_: product_card_template_
|
|
4376
|
-
});
|
|
4377
|
-
},
|
|
4378
|
-
get children() {
|
|
4379
|
-
return (() => {
|
|
4380
|
-
// IIFE to make sure we access both the recommendations_resource and the resources containing the product card rendering results themselves within the Suspense boundary
|
|
4381
|
-
const displays_by_key_ = $a73063cc642f3e5f$export$7f8bd308237ab5a5($5vyXB$solidjs.createMemo(() => recommendations_resource_() || []));
|
|
4382
|
-
return $a73063cc642f3e5f$export$43f0fb951fcb0c54({
|
|
4383
|
-
displays_by_key_: displays_by_key_,
|
|
4384
|
-
product_card_template_: product_card_template_
|
|
4385
|
-
});
|
|
4386
|
-
})();
|
|
4387
|
-
}
|
|
4388
|
-
});
|
|
4389
|
-
}
|
|
4390
|
-
}))))];
|
|
4391
|
-
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
4392
|
-
get when() {
|
|
4393
|
-
return is_showing_something();
|
|
4394
|
-
},
|
|
4395
|
-
children: elements
|
|
4396
|
-
});
|
|
4397
|
-
}
|
|
4398
|
-
var $1f8dbf7e28b3eff2$var$_tmpl$ = ["<button", ' class="show-more major" type="button">', "</button>"],
|
|
4399
|
-
$1f8dbf7e28b3eff2$var$_tmpl$2 = ["<div", ' class="depict plp recommendations">', "</div>"];
|
|
4428
|
+
var $1f8dbf7e28b3eff2$var$_tmpl$ = ["<div", ' class="depict plp recommendations">', "</div>"];
|
|
4400
4429
|
function $1f8dbf7e28b3eff2$export$9756467d34d91cdb(props) {
|
|
4401
4430
|
return $95837413165cc2df$export$23fca46f3143581f(() => {
|
|
4402
|
-
const rows_object_ = $5vyXB$solidjs.createMemo(() => {
|
|
4403
|
-
const {
|
|
4404
|
-
view_more_button: view_more_button,
|
|
4405
|
-
max_rows: max_rows
|
|
4406
|
-
} = props;
|
|
4407
|
-
if (!view_more_button) {
|
|
4408
|
-
if (max_rows) return {
|
|
4409
|
-
max_rows: max_rows
|
|
4410
|
-
};
|
|
4411
|
-
return "all";
|
|
4412
|
-
}
|
|
4413
|
-
return {
|
|
4414
|
-
max_rows: max_rows,
|
|
4415
|
-
start_rows: view_more_button.start_rows,
|
|
4416
|
-
rows_per_click: view_more_button.rows_per_click ?? 2,
|
|
4417
|
-
button: $5vyXB$solidjsweb.ssr($1f8dbf7e28b3eff2$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(view_more_button.text))
|
|
4418
|
-
};
|
|
4419
|
-
});
|
|
4420
4431
|
const grid_spacing_override = $5vyXB$solidjs.createMemo(() => {
|
|
4421
4432
|
const {
|
|
4422
4433
|
grid_spacing: grid_spacing
|
|
@@ -4429,10 +4440,11 @@ function $1f8dbf7e28b3eff2$export$9756467d34d91cdb(props) {
|
|
|
4429
4440
|
};
|
|
4430
4441
|
});
|
|
4431
4442
|
const [recommendations_resource_] = $5vyXB$solidjs.createResource(() => props.recommendations, recs => recs);
|
|
4432
|
-
return $5vyXB$solidjsweb.ssr($1f8dbf7e28b3eff2$var$_tmpl
|
|
4443
|
+
return $5vyXB$solidjsweb.ssr($1f8dbf7e28b3eff2$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
4433
4444
|
get children() {
|
|
4434
4445
|
return $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
4435
|
-
|
|
4446
|
+
max_rows_: () => props.max_rows,
|
|
4447
|
+
view_more_button_: () => props.view_more_button,
|
|
4436
4448
|
product_card_template_: (...args) => props.product_card_template(...args),
|
|
4437
4449
|
recommendations_resource_: recommendations_resource_,
|
|
4438
4450
|
title_: () => props.title,
|
package/server/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.3.
|
|
13
|
+
export const version = "4.3.4";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -877,6 +877,17 @@ export function LooksSlider(props: {
|
|
|
877
877
|
display_: Accessor<ModernDisplay | null | undefined>;
|
|
878
878
|
}) => JSX.Element;
|
|
879
879
|
displayTransformers_?: DisplayTransformers<ModernDisplay, ModernDisplayWithPageUrl<ModernDisplay>>;
|
|
880
|
+
/**
|
|
881
|
+
* If provided, will render as grid instead of slider
|
|
882
|
+
*/
|
|
883
|
+
gridOptions_?: {
|
|
884
|
+
view_more_button?: {
|
|
885
|
+
text: string;
|
|
886
|
+
start_rows?: number;
|
|
887
|
+
rows_per_click?: number;
|
|
888
|
+
};
|
|
889
|
+
max_rows?: number;
|
|
890
|
+
};
|
|
880
891
|
onNavigation_?: OnNavigation;
|
|
881
892
|
priceFormatting_: plp_shared_i18n["price_formatting_"];
|
|
882
893
|
}): HTMLDivElement;
|