@depict-ai/ui 4.2.0 → 4.2.2
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 +140 -89
- package/ES10/index.d.ts +3 -2
- package/ES10/index.js +140 -89
- package/latest/index.cjs +116 -84
- package/latest/index.d.ts +3 -2
- package/latest/index.js +116 -84
- package/package.json +4 -4
- package/server/ES10/index.cjs +132 -78
- package/server/ES10/index.d.ts +3 -2
- package/server/ES10/index.js +133 -79
- package/server/latest/index.cjs +108 -73
- package/server/latest/index.d.ts +3 -2
- package/server/latest/index.js +109 -74
package/ES10/index.cjs
CHANGED
|
@@ -100,7 +100,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
100
100
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
101
101
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
102
102
|
/*! Depict.ai search and product listing SDK */
|
|
103
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.2.
|
|
103
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.2.2";
|
|
104
104
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
105
105
|
const cols_at_size = [];
|
|
106
106
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -1376,15 +1376,33 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1376
1376
|
outerRef_: outerRef_,
|
|
1377
1377
|
animationDuration_: animationDuration_
|
|
1378
1378
|
} = _ref;
|
|
1379
|
-
const variantToUse =
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1379
|
+
const variantToUse = $52FdA$solidjs.createMemo(() => {
|
|
1380
|
+
const display = display_();
|
|
1381
|
+
return display === null || display === void 0 ? void 0 : display.variant_displays[display === null || display === void 0 ? void 0 : display.variant_index];
|
|
1382
|
+
});
|
|
1383
|
+
const imageUrls = () => {
|
|
1384
|
+
var _variantToUse;
|
|
1385
|
+
return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : _variantToUse.image_urls;
|
|
1386
|
+
};
|
|
1387
|
+
const imageUrl = $52FdA$solidjs.createMemo(() => {
|
|
1388
|
+
var _imageUrls;
|
|
1389
|
+
return (_imageUrls = imageUrls()) === null || _imageUrls === void 0 ? void 0 : _imageUrls[0];
|
|
1390
|
+
});
|
|
1391
|
+
const secondaryImageUrl = $52FdA$solidjs.createMemo(() => {
|
|
1392
|
+
var _imageUrls2;
|
|
1393
|
+
return (_imageUrls2 = imageUrls()) === null || _imageUrls2 === void 0 ? void 0 : _imageUrls2[1];
|
|
1394
|
+
});
|
|
1383
1395
|
const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
|
|
1384
1396
|
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $52FdA$solidjs.createSignal($52FdA$solidjs.untrack(isExpanded_));
|
|
1385
1397
|
const [animationEffectExists, setAnimationEffectExists] = $52FdA$solidjs.createSignal(false);
|
|
1386
|
-
const [salePrice] = $52FdA$solidjs.createResource(() =>
|
|
1387
|
-
|
|
1398
|
+
const [salePrice] = $52FdA$solidjs.createResource(() => {
|
|
1399
|
+
var _variantToUse2;
|
|
1400
|
+
return (_variantToUse2 = variantToUse()) === null || _variantToUse2 === void 0 ? void 0 : _variantToUse2.sale_price;
|
|
1401
|
+
});
|
|
1402
|
+
const [originalPrice] = $52FdA$solidjs.createResource(() => {
|
|
1403
|
+
var _variantToUse3;
|
|
1404
|
+
return (_variantToUse3 = variantToUse()) === null || _variantToUse3 === void 0 ? void 0 : _variantToUse3.original_price;
|
|
1405
|
+
});
|
|
1388
1406
|
const isOnSale = $52FdA$solidjs.createMemo(() => salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense
|
|
1389
1407
|
const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
|
|
1390
1408
|
return (() => {
|
|
@@ -1395,9 +1413,12 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1395
1413
|
[_el$19, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$18.nextSibling);
|
|
1396
1414
|
var _ref$ = outerRef_;
|
|
1397
1415
|
typeof _ref$ === "function" ? $52FdA$solidjsweb.use(_ref$, _el$) : outerRef_ = _el$;
|
|
1398
|
-
$52FdA$solidjsweb.spread(_el$, $52FdA$solidjsweb.mergeProps(() =>
|
|
1399
|
-
|
|
1400
|
-
|
|
1416
|
+
$52FdA$solidjsweb.spread(_el$, $52FdA$solidjsweb.mergeProps(() => {
|
|
1417
|
+
var _variantToUse4;
|
|
1418
|
+
return isExpanded_() && !animationIsRunning() ? {
|
|
1419
|
+
href: (_variantToUse4 = variantToUse()) === null || _variantToUse4 === void 0 ? void 0 : _variantToUse4.page_url
|
|
1420
|
+
} : {};
|
|
1421
|
+
}), false, true);
|
|
1401
1422
|
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1402
1423
|
when: imageUrl,
|
|
1403
1424
|
get fallback() {
|
|
@@ -1411,20 +1432,38 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1411
1432
|
[_el$4, _co$] = $52FdA$solidjsweb.getNextMarker(_el$3.nextSibling),
|
|
1412
1433
|
_el$5 = _el$4.nextSibling,
|
|
1413
1434
|
[_el$6, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$5.nextSibling);
|
|
1414
|
-
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
return isExpanded_() ? 0.75 : 1;
|
|
1435
|
+
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1436
|
+
get when() {
|
|
1437
|
+
return imageUrl();
|
|
1418
1438
|
},
|
|
1419
|
-
get
|
|
1420
|
-
return
|
|
1439
|
+
get fallback() {
|
|
1440
|
+
return $52FdA$solidjsweb.createComponent((0, $b8a8d61b3ec5f5ac$export$3f37af283f8fb843), {
|
|
1441
|
+
aspectRatio: 1
|
|
1442
|
+
});
|
|
1443
|
+
},
|
|
1444
|
+
get children() {
|
|
1445
|
+
return $52FdA$solidjsweb.createComponent((0, $f3db423dc84bc35d$export$9d4a4b669b1929ab), {
|
|
1446
|
+
get src() {
|
|
1447
|
+
return imageUrl();
|
|
1448
|
+
},
|
|
1449
|
+
get aspectRatio() {
|
|
1450
|
+
return isExpanded_() ? 0.75 : 1;
|
|
1451
|
+
},
|
|
1452
|
+
get autoAdjustAspectRatio() {
|
|
1453
|
+
return isExpanded_() ? "smoothed" : false;
|
|
1454
|
+
}
|
|
1455
|
+
});
|
|
1421
1456
|
}
|
|
1422
1457
|
}), _el$4, _co$);
|
|
1423
1458
|
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1424
|
-
when
|
|
1459
|
+
get when() {
|
|
1460
|
+
return secondaryImageUrl();
|
|
1461
|
+
},
|
|
1425
1462
|
get children() {
|
|
1426
1463
|
return $52FdA$solidjsweb.createComponent((0, $f3db423dc84bc35d$export$9d4a4b669b1929ab), {
|
|
1427
|
-
src
|
|
1464
|
+
get src() {
|
|
1465
|
+
return secondaryImageUrl();
|
|
1466
|
+
},
|
|
1428
1467
|
get aspectRatio() {
|
|
1429
1468
|
return isExpanded_() ? 0.75 : 1;
|
|
1430
1469
|
},
|
|
@@ -1485,14 +1524,14 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1485
1524
|
}));
|
|
1486
1525
|
}, _el$7);
|
|
1487
1526
|
$52FdA$solidjsweb.insert(_el$9, () => {
|
|
1488
|
-
var _variantToUse$title;
|
|
1489
|
-
return (_variantToUse$title = variantToUse === null ||
|
|
1527
|
+
var _variantToUse$title, _variantToUse5;
|
|
1528
|
+
return (_variantToUse$title = (_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title) !== null && _variantToUse$title !== void 0 ? _variantToUse$title : $52FdA$solidjsweb.createComponent((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
|
|
1490
1529
|
height: "1em",
|
|
1491
1530
|
width: "20ch"
|
|
1492
1531
|
});
|
|
1493
1532
|
});
|
|
1494
1533
|
$52FdA$solidjsweb.insert(_el$10, (() => {
|
|
1495
|
-
var _c$ = $52FdA$solidjsweb.memo(() => !!(!variantToUse || salePrice.loading));
|
|
1534
|
+
var _c$ = $52FdA$solidjsweb.memo(() => !!(!variantToUse() || salePrice.loading));
|
|
1496
1535
|
return () => _c$() ? $52FdA$solidjsweb.createComponent((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
|
|
1497
1536
|
height: "1em",
|
|
1498
1537
|
width: "20ch"
|
|
@@ -1505,7 +1544,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1505
1544
|
get children() {
|
|
1506
1545
|
var _el$11 = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$2);
|
|
1507
1546
|
$52FdA$solidjsweb.insert(_el$11, (() => {
|
|
1508
|
-
var _c$2 = $52FdA$solidjsweb.memo(() => !!(!variantToUse || originalPrice.loading));
|
|
1547
|
+
var _c$2 = $52FdA$solidjsweb.memo(() => !!(!variantToUse() || originalPrice.loading));
|
|
1509
1548
|
return () => _c$2() ? $52FdA$solidjsweb.createComponent((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
|
|
1510
1549
|
height: "1em",
|
|
1511
1550
|
width: "20ch"
|
|
@@ -1572,7 +1611,7 @@ async function $dfa95866b27a2a53$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1572
1611
|
// Passive to make it more likely to run the callback before our timeout if the browser is under high load during the test
|
|
1573
1612
|
{
|
|
1574
1613
|
once: true,
|
|
1575
|
-
passive:
|
|
1614
|
+
passive: false
|
|
1576
1615
|
});
|
|
1577
1616
|
await timeoutPromise;
|
|
1578
1617
|
} catch (e) {
|
|
@@ -1597,19 +1636,16 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1597
1636
|
// The following three signals just contain the state if the animations are actually running and should only be set by the respective animation code
|
|
1598
1637
|
const textFadeInAnimationRunning = $52FdA$solidjs.createSignal(false);
|
|
1599
1638
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1600
|
-
// These expanded variables are what's used to trigger the second and first phase animations
|
|
1601
1639
|
$dfa95866b27a2a53$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1602
1640
|
return $52FdA$solidjsweb.createComponent((0, $d067f3a30f047b41$export$e68cff63f76bd15b), {
|
|
1603
1641
|
get children() {
|
|
1604
1642
|
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1605
1643
|
get when() {
|
|
1606
|
-
return containerWidth_();
|
|
1644
|
+
return containerWidth_() || !displays_;
|
|
1607
1645
|
},
|
|
1608
1646
|
get children() {
|
|
1609
1647
|
var _el$ = $52FdA$solidjsweb.getNextElement($e0b3f1f332b6863b$var$_tmpl$),
|
|
1610
1648
|
_el$2 = _el$.firstChild;
|
|
1611
|
-
$52FdA$solidjsweb.addEventListener(_el$2, "mouseleave", $52FdA$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(false)));
|
|
1612
|
-
$52FdA$solidjsweb.addEventListener(_el$2, "mouseenter", $52FdA$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(true)));
|
|
1613
1649
|
$52FdA$solidjsweb.use(el => $52FdA$solidjs.createEffect(() => {
|
|
1614
1650
|
if (userWantsExpanded()) return;
|
|
1615
1651
|
if (isAffectedByChromeBug) {
|
|
@@ -1621,35 +1657,45 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1621
1657
|
behavior: "smooth"
|
|
1622
1658
|
});
|
|
1623
1659
|
}), _el$2);
|
|
1624
|
-
$52FdA$solidjsweb.
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1660
|
+
$52FdA$solidjsweb.spread(_el$2, $52FdA$solidjsweb.mergeProps({
|
|
1661
|
+
get classList() {
|
|
1662
|
+
return {
|
|
1663
|
+
expanded: userWantsExpanded(),
|
|
1664
|
+
"resting-fully-expanded": !getSecondPartAnimationRunning() && userWantsExpanded()
|
|
1665
|
+
};
|
|
1666
|
+
},
|
|
1667
|
+
get onMouseEnter() {
|
|
1668
|
+
return $52FdA$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(true));
|
|
1669
|
+
},
|
|
1670
|
+
get onMouseLeave() {
|
|
1671
|
+
return $52FdA$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(false));
|
|
1672
|
+
}
|
|
1673
|
+
}, () => displays_ && {
|
|
1674
|
+
style: "--look-card-width:".concat(containerWidth_(), "px;--look-item-height:").concat(lookItemHeight() || 200, "px")
|
|
1675
|
+
}), false, true);
|
|
1676
|
+
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Index), {
|
|
1677
|
+
get each() {
|
|
1678
|
+
return displays_ || Array.from({
|
|
1679
|
+
length: 4
|
|
1680
|
+
});
|
|
1681
|
+
},
|
|
1682
|
+
children: (display, index) => {
|
|
1683
|
+
return $52FdA$solidjsweb.createComponent((0, $d66c35b5a6d6d926$export$b73ed90f0ee50dc3), {
|
|
1684
|
+
animationDuration_: animationDuration_,
|
|
1685
|
+
display_: display,
|
|
1686
|
+
FavoriteButton_: FavoriteButton_,
|
|
1687
|
+
isExpanded_: userWantsExpanded,
|
|
1688
|
+
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
1689
|
+
outerRef_: el => $52FdA$solidjs.createEffect(() => {
|
|
1690
|
+
if (index !== 0) return;
|
|
1691
|
+
const resizeObserver = new ResizeObserver($52FdA$depictaiutilishared.catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
1692
|
+
resizeObserver.observe(el);
|
|
1693
|
+
$52FdA$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
1694
|
+
})
|
|
1695
|
+
});
|
|
1696
|
+
}
|
|
1639
1697
|
}));
|
|
1640
|
-
$52FdA$solidjsweb.
|
|
1641
|
-
var _v$ = "--look-card-width:".concat(containerWidth_(), "px;--look-item-height:").concat(lookItemHeight() || 200, "px"),
|
|
1642
|
-
_v$2 = !!userWantsExpanded(),
|
|
1643
|
-
_v$3 = !!(!getSecondPartAnimationRunning() && userWantsExpanded());
|
|
1644
|
-
_p$.e = $52FdA$solidjsweb.style(_el$2, _v$, _p$.e);
|
|
1645
|
-
_v$2 !== _p$.t && _el$2.classList.toggle("expanded", _p$.t = _v$2);
|
|
1646
|
-
_v$3 !== _p$.a && _el$2.classList.toggle("resting-fully-expanded", _p$.a = _v$3);
|
|
1647
|
-
return _p$;
|
|
1648
|
-
}, {
|
|
1649
|
-
e: undefined,
|
|
1650
|
-
t: undefined,
|
|
1651
|
-
a: undefined
|
|
1652
|
-
});
|
|
1698
|
+
$52FdA$solidjsweb.runHydrationEvents();
|
|
1653
1699
|
return _el$;
|
|
1654
1700
|
}
|
|
1655
1701
|
});
|
|
@@ -1676,35 +1722,41 @@ function $e0b3f1f332b6863b$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1676
1722
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1677
1723
|
requestAnimationFrame(step);
|
|
1678
1724
|
}
|
|
1679
|
-
var $47e3c3102c78121b$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=look-card
|
|
1680
|
-
function $47e3c3102c78121b$export$44809a8a3e867e30(
|
|
1725
|
+
var $47e3c3102c78121b$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=look-card>`);
|
|
1726
|
+
function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
|
|
1727
|
+
let {
|
|
1728
|
+
display_: display_,
|
|
1729
|
+
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
1730
|
+
FavoriteButton_: FavoriteButton_,
|
|
1731
|
+
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
1732
|
+
animationDuration_: animationDuration_
|
|
1733
|
+
} = _ref;
|
|
1681
1734
|
// TODO: shopify, run displayTransformers to get dynamic prices
|
|
1682
1735
|
// TODO: format prices
|
|
1683
|
-
const
|
|
1684
|
-
const [coverImage] = (display === null || display === void 0 ? void 0 : display.image_urls) || [];
|
|
1736
|
+
const [coverImage] = (display_ === null || display_ === void 0 ? void 0 : display_.image_urls) || [];
|
|
1685
1737
|
const useWantsExpandedSignal_ = $52FdA$solidjs.createSignal(false);
|
|
1686
1738
|
const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
|
|
1687
|
-
const [expandedLooks_, setExpandedLooks] = (info === null || info === void 0 ? void 0 : info.expandedLooksSignal_) || [];
|
|
1688
1739
|
const supportsHover_ = $3e17e871e9d0911d$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
|
|
1689
1740
|
const us = Symbol("look");
|
|
1690
1741
|
const container = (() => {
|
|
1691
1742
|
var _el$ = $52FdA$solidjsweb.getNextElement($47e3c3102c78121b$var$_tmpl$);
|
|
1692
1743
|
$52FdA$solidjsweb.addEventListener(_el$, "click", $52FdA$depictaiutilishared.catchify(() => setUserWantsExpanded(prev => !prev)), true);
|
|
1744
|
+
_el$.classList.toggle("placeholder", !!!display_);
|
|
1693
1745
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
1694
1746
|
return _el$;
|
|
1695
1747
|
})();
|
|
1696
1748
|
const containerWidth_ = $c387d7f1d9fb66c0$export$ebdc3711f7e02ccd(container);
|
|
1697
|
-
const clickHandler = $52FdA$depictaiutilishared.catchify(
|
|
1749
|
+
const clickHandler = $52FdA$depictaiutilishared.catchify(_ref2 => {
|
|
1698
1750
|
let {
|
|
1699
1751
|
target: target
|
|
1700
|
-
} =
|
|
1752
|
+
} = _ref2;
|
|
1701
1753
|
if (target !== container && !container.contains(target))
|
|
1702
1754
|
// When clicking outside the look, close it
|
|
1703
1755
|
setUserWantsExpanded(false);
|
|
1704
1756
|
});
|
|
1705
1757
|
addEventListener("click", clickHandler);
|
|
1706
1758
|
$52FdA$solidjs.onCleanup(() => removeEventListener("click", clickHandler));
|
|
1707
|
-
$52FdA$solidjs.createEffect(() => setExpandedLooks
|
|
1759
|
+
$52FdA$solidjs.createEffect(() => setExpandedLooks(prev => {
|
|
1708
1760
|
if (userWantsExpanded()) {
|
|
1709
1761
|
// Close the other expanded looks
|
|
1710
1762
|
prev.clear();
|
|
@@ -1714,42 +1766,42 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(display, info, FavoriteButton
|
|
|
1714
1766
|
return prev;
|
|
1715
1767
|
}));
|
|
1716
1768
|
// Close us if another look expands
|
|
1717
|
-
$52FdA$solidjs.createEffect(() =>
|
|
1718
|
-
$52FdA$solidjsweb.insert(container, () => $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1719
|
-
when:
|
|
1769
|
+
$52FdA$solidjs.createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1770
|
+
$52FdA$solidjsweb.insert(container, () => [$52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1771
|
+
when: display_,
|
|
1720
1772
|
get fallback() {
|
|
1721
1773
|
return $52FdA$solidjsweb.createComponent((0, $b8a8d61b3ec5f5ac$export$3f37af283f8fb843), {
|
|
1722
|
-
|
|
1723
|
-
height: "100%"
|
|
1774
|
+
aspectRatio: placeholderImageAspectRatio_
|
|
1724
1775
|
});
|
|
1725
1776
|
},
|
|
1726
1777
|
get children() {
|
|
1727
|
-
return
|
|
1778
|
+
return $52FdA$solidjsweb.createComponent((0, $f3db423dc84bc35d$export$9d4a4b669b1929ab), {
|
|
1728
1779
|
src: coverImage,
|
|
1729
|
-
aspectRatio:
|
|
1780
|
+
aspectRatio: placeholderImageAspectRatio_,
|
|
1730
1781
|
autoAdjustAspectRatio: true
|
|
1731
|
-
})
|
|
1732
|
-
get displays_() {
|
|
1733
|
-
return display === null || display === void 0 ? void 0 : display.displays;
|
|
1734
|
-
},
|
|
1735
|
-
userWantsExpandedSignal_: useWantsExpandedSignal_,
|
|
1736
|
-
containerWidth_: containerWidth_,
|
|
1737
|
-
animationDuration_: animationDuration_,
|
|
1738
|
-
supportsHover_: supportsHover_,
|
|
1739
|
-
FavoriteButton_: FavoriteButton_
|
|
1740
|
-
})];
|
|
1782
|
+
});
|
|
1741
1783
|
}
|
|
1742
|
-
}))
|
|
1784
|
+
}), $52FdA$solidjsweb.createComponent((0, $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae), {
|
|
1785
|
+
get displays_() {
|
|
1786
|
+
return display_ === null || display_ === void 0 ? void 0 : display_.displays;
|
|
1787
|
+
},
|
|
1788
|
+
userWantsExpandedSignal_: useWantsExpandedSignal_,
|
|
1789
|
+
containerWidth_: containerWidth_,
|
|
1790
|
+
animationDuration_: animationDuration_,
|
|
1791
|
+
supportsHover_: supportsHover_,
|
|
1792
|
+
FavoriteButton_: FavoriteButton_
|
|
1793
|
+
})]);
|
|
1743
1794
|
return container;
|
|
1744
1795
|
}
|
|
1745
1796
|
$52FdA$solidjsweb.delegateEvents(["click"]);
|
|
1746
|
-
var $8446f782881fa12e$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict recommendations looks">`);
|
|
1797
|
+
var $8446f782881fa12e$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict recommendations looks"style=--animation-duration:240ms>`);
|
|
1747
1798
|
let $8446f782881fa12e$var$expandedLooksSignal_;
|
|
1748
1799
|
function $8446f782881fa12e$export$1935e6bdfc5ed8ce(props) {
|
|
1749
1800
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
1750
1801
|
$8446f782881fa12e$var$expandedLooksSignal_ || ($8446f782881fa12e$var$expandedLooksSignal_ = $52FdA$solidjs.createSignal(new Set(), {
|
|
1751
1802
|
equals: false
|
|
1752
1803
|
}));
|
|
1804
|
+
const expandingAnimationDuration = 240;
|
|
1753
1805
|
const grid_spacing_override = $52FdA$solidjs.createMemo(() => {
|
|
1754
1806
|
const {
|
|
1755
1807
|
gridSpacing_: gridSpacing_
|
|
@@ -1786,10 +1838,13 @@ function $8446f782881fa12e$export$1935e6bdfc5ed8ce(props) {
|
|
|
1786
1838
|
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $d067f3a30f047b41$export$e68cff63f76bd15b), {
|
|
1787
1839
|
get children() {
|
|
1788
1840
|
return $236a257ee52e5414$export$d41d19e89346fa2({
|
|
1789
|
-
product_card_template_: (display, info) => $47e3c3102c78121b$export$44809a8a3e867e30(
|
|
1790
|
-
|
|
1841
|
+
product_card_template_: (display, info) => $47e3c3102c78121b$export$44809a8a3e867e30({
|
|
1842
|
+
display_: display,
|
|
1843
|
+
FavoriteButton_: props.FavoriteButton_,
|
|
1844
|
+
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
1845
|
+
animationDuration_: expandingAnimationDuration,
|
|
1791
1846
|
expandedLooksSignal_: $8446f782881fa12e$var$expandedLooksSignal_
|
|
1792
|
-
}
|
|
1847
|
+
}),
|
|
1793
1848
|
recommendations_resource_: looksResource,
|
|
1794
1849
|
title_: () => props.title_,
|
|
1795
1850
|
layout_options_: $52FdA$solidjs.createMemo(() => ({
|
|
@@ -3370,10 +3425,6 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
3370
3425
|
$52FdA$solidjsweb.delegateEvents(["click", "keydown", "input", "pointerdown"]);
|
|
3371
3426
|
function $8c2e68c6d458169b$export$fe334901e8bebd57() {
|
|
3372
3427
|
const cleanup_fns = [];
|
|
3373
|
-
$52FdA$depictaiutilishared.dlog("DISABLING SCROLLING");
|
|
3374
|
-
$52FdA$solidjs.onCleanup(() => {
|
|
3375
|
-
console.log("RE-ENABLING SCROLLING");
|
|
3376
|
-
});
|
|
3377
3428
|
const cleanup = () => cleanup_fns.forEach(f => f());
|
|
3378
3429
|
// use an animation to automatically retain the `overflow` values and all other styling
|
|
3379
3430
|
for (const element of [document.documentElement, document.body]) {
|
package/ES10/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.2.
|
|
13
|
+
export const version = "4.2.2";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -249,9 +249,10 @@ export function LooksSlider(props: {
|
|
|
249
249
|
merchant_: string;
|
|
250
250
|
market_: string;
|
|
251
251
|
locale_: string;
|
|
252
|
+
imagePlaceholderAspectRatio_: number | string;
|
|
252
253
|
title_?: JSX.Element;
|
|
253
254
|
FavoriteButton_?: (props: {
|
|
254
|
-
display_: ModernDisplay | null | undefined
|
|
255
|
+
display_: Accessor<ModernDisplay | null | undefined>;
|
|
255
256
|
}) => JSX.Element;
|
|
256
257
|
}): HTMLDivElement;
|
|
257
258
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|