@depict-ai/ui 4.7.7 → 4.7.8
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 +127 -107
- package/ES10/index.d.ts +6 -6
- package/ES10/index.js +128 -108
- package/latest/index.cjs +117 -94
- package/latest/index.d.ts +6 -6
- package/latest/index.js +118 -95
- package/package.json +4 -4
- package/server/ES10/index.cjs +58 -58
- package/server/ES10/index.d.ts +6 -6
- package/server/ES10/index.js +58 -58
- package/server/latest/index.cjs +54 -54
- package/server/latest/index.d.ts +6 -6
- package/server/latest/index.js +54 -54
package/latest/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
98
98
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
99
99
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
100
100
|
/*! Depict.ai search and product listing SDK */
|
|
101
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.
|
|
101
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.8";
|
|
102
102
|
function $4b455f60dadde8b8$export$5bad61ecde080b1f(...params) {
|
|
103
103
|
const {
|
|
104
104
|
collapse: collapse,
|
|
@@ -941,34 +941,6 @@ function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
|
941
941
|
}) => signal[1](matches)).remove);
|
|
942
942
|
return signal[0];
|
|
943
943
|
}
|
|
944
|
-
|
|
945
|
-
/** @jsxImportSource solid-js */
|
|
946
|
-
|
|
947
|
-
function $f13855d1b951b24a$export$ebdc3711f7e02ccd(what_to_watch) {
|
|
948
|
-
const [width, setWidth] = $gVhhF$solidjs.createSignal();
|
|
949
|
-
const resizeObserver = new ResizeObserver($gVhhF$depictaiutilishared.catchify(records => {
|
|
950
|
-
for (let j = 0; j < records.length; j++) {
|
|
951
|
-
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
952
|
-
setWidth(width);
|
|
953
|
-
}
|
|
954
|
-
}));
|
|
955
|
-
// If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
|
|
956
|
-
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
957
|
-
const disconnect = (0, $gVhhF$depictaiutilishared.observer).onexists(what_to_watch, ({
|
|
958
|
-
element: element
|
|
959
|
-
}) => requestAnimationFrame($gVhhF$depictaiutilishared.catchify(() => {
|
|
960
|
-
const current_size = what_to_watch.getBoundingClientRect().width;
|
|
961
|
-
if (current_size)
|
|
962
|
-
// If element has size, set signal to that. ResizeObserver only triggers when the content is visible in some cases, but it might already have a size. This reduces size filter expanding animation jank in chrome.
|
|
963
|
-
setWidth(current_size);
|
|
964
|
-
resizeObserver.observe(element);
|
|
965
|
-
})));
|
|
966
|
-
$gVhhF$solidjs.onCleanup(() => {
|
|
967
|
-
resizeObserver.disconnect();
|
|
968
|
-
disconnect();
|
|
969
|
-
});
|
|
970
|
-
return width;
|
|
971
|
-
}
|
|
972
944
|
function $061ff5b4c3d36171$export$89c6019e4baa40b1(props) {
|
|
973
945
|
const style = $gVhhF$solidjs.createMemo(() => {
|
|
974
946
|
const {
|
|
@@ -1128,9 +1100,10 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
1128
1100
|
});
|
|
1129
1101
|
// Batch idle callbacks so that MutationObserver can batch the resulting mutations better, so we don't lose tons of CPU time to MutationObservers doing lots of things for each image
|
|
1130
1102
|
// Happened on singular, they have some weird observer (+we also have one but ours is at least 3x more efficient)
|
|
1131
|
-
const executeWhenIdleBatched = fn => {
|
|
1103
|
+
const executeWhenIdleBatched = (fn, isSizesUpdate) => {
|
|
1132
1104
|
if (typeof requestIdleCallback !== "function") return setTimeout(fn); // Old browsers don't get optimisation
|
|
1133
|
-
if ($gVhhF$solidjs.untrack(isPrioritisedImage)) return fn(); // If we're one of the first 8 images, execute the callbacks immediately
|
|
1105
|
+
if ((!isSizesUpdate || !sizeSetFastPath) && $gVhhF$solidjs.untrack(isPrioritisedImage)) return fn(); // If we're one of the first 8 images, execute the callbacks immediately (improves lighthouse metrics)
|
|
1106
|
+
// unless we're just a `sizes` update after the initial sizes setting (this optimisation makes the looks animation a lot smoother on low-cpu devices)
|
|
1134
1107
|
const existingStack = listingContext?.[$19950faaac026e09$var$onIdleFunctionsSymbol];
|
|
1135
1108
|
if (existingStack) return existingStack.add(fn);
|
|
1136
1109
|
const newStack = new Set([fn]);
|
|
@@ -1212,10 +1185,11 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
1212
1185
|
// This greatly improves performance when loading (more) products
|
|
1213
1186
|
// See https://depictaiworkspace.slack.com/archives/C05NJ0K3WRL/p1698220617663139
|
|
1214
1187
|
timeoutSet = true; // Important to set timeoutSet before the call to executeWhenIdleBatched since if this is an important image executeWhenIdleBatched will execute fn immediately
|
|
1215
|
-
executeWhenIdleBatched(handler);
|
|
1188
|
+
executeWhenIdleBatched(handler, true);
|
|
1216
1189
|
});
|
|
1190
|
+
const dontLoadImageYet = $gVhhF$solidjs.createMemo(() => !props.size() || !hasSetSize()); // Moving this condition into a memo saves us from re-setting src and srcset (expensive) if just props.size changes
|
|
1217
1191
|
$gVhhF$solidjs.createEffect(() => {
|
|
1218
|
-
if (
|
|
1192
|
+
if (dontLoadImageYet()) return; // If size isn't known or set, don't assign src yet since it would cause the most low res image to load
|
|
1219
1193
|
Object.assign(img, src_options());
|
|
1220
1194
|
// Add to DOM once decoded to not require/block any paints before image has completed loading and avoid showing broken image symbol
|
|
1221
1195
|
// We can do this because there has to be a container around us giving us a size
|
|
@@ -1231,7 +1205,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
1231
1205
|
img.decode().catch(e => $gVhhF$depictaiutilishared.dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
|
|
1232
1206
|
.then(async () => {
|
|
1233
1207
|
// Also wait with inserting image (i.e. paint) until browser is idle
|
|
1234
|
-
await new Promise(r => executeWhenIdleBatched(r));
|
|
1208
|
+
await new Promise(r => executeWhenIdleBatched(r, false));
|
|
1235
1209
|
if (gotCleanedUp) return;
|
|
1236
1210
|
setHasDecoded(true);
|
|
1237
1211
|
hasDecodedFastPath = true;
|
|
@@ -1562,7 +1536,7 @@ var $b9e830d616d01b31$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div
|
|
|
1562
1536
|
let $b9e830d616d01b31$var$cachedValue;
|
|
1563
1537
|
async function $b9e830d616d01b31$export$7b9a0e99f0aeb2f3() {
|
|
1564
1538
|
if ($b9e830d616d01b31$var$cachedValue != undefined) return $b9e830d616d01b31$var$cachedValue;
|
|
1565
|
-
return $b9e830d616d01b31$var$cachedValue =
|
|
1539
|
+
return $b9e830d616d01b31$var$cachedValue = $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383();
|
|
1566
1540
|
}
|
|
1567
1541
|
async function $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383() {
|
|
1568
1542
|
let isAffected = true;
|
|
@@ -1575,7 +1549,7 @@ async function $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1575
1549
|
setTimeout($gVhhF$depictaiutilishared.catchify(() => {
|
|
1576
1550
|
r();
|
|
1577
1551
|
div.remove();
|
|
1578
|
-
}),
|
|
1552
|
+
}), 500);
|
|
1579
1553
|
});
|
|
1580
1554
|
const {
|
|
1581
1555
|
style: style
|
|
@@ -1617,7 +1591,8 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1617
1591
|
animationDuration_: animationDuration_,
|
|
1618
1592
|
supportsHover_: supportsHover_,
|
|
1619
1593
|
priceFormatting_: priceFormatting_,
|
|
1620
|
-
pseudoRouter_: pseudoRouter_
|
|
1594
|
+
pseudoRouter_: pseudoRouter_,
|
|
1595
|
+
containerHeight_: containerHeight_
|
|
1621
1596
|
}) {
|
|
1622
1597
|
let isAffectedByChromeBug = false;
|
|
1623
1598
|
// If the user requests the drawer to be expanded or not
|
|
@@ -1637,6 +1612,8 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1637
1612
|
get children() {
|
|
1638
1613
|
var _el$ = $gVhhF$solidjsweb.getNextElement($905010a06f9aeae5$var$_tmpl$),
|
|
1639
1614
|
_el$2 = _el$.firstChild;
|
|
1615
|
+
$gVhhF$solidjsweb.addEventListener(_el$2, "mouseleave", $gVhhF$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(false)));
|
|
1616
|
+
$gVhhF$solidjsweb.addEventListener(_el$2, "mouseenter", $gVhhF$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(true)));
|
|
1640
1617
|
$gVhhF$solidjsweb.use(el => $gVhhF$solidjs.createEffect(() => {
|
|
1641
1618
|
if (userWantsExpanded()) return;
|
|
1642
1619
|
if (isAffectedByChromeBug) {
|
|
@@ -1648,22 +1625,6 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1648
1625
|
behavior: "smooth"
|
|
1649
1626
|
});
|
|
1650
1627
|
}), _el$2);
|
|
1651
|
-
$gVhhF$solidjsweb.spread(_el$2, $gVhhF$solidjsweb.mergeProps({
|
|
1652
|
-
get classList() {
|
|
1653
|
-
return {
|
|
1654
|
-
expanded: userWantsExpanded(),
|
|
1655
|
-
"resting-fully-expanded": !getSecondPartAnimationRunning() && userWantsExpanded()
|
|
1656
|
-
};
|
|
1657
|
-
},
|
|
1658
|
-
get onMouseEnter() {
|
|
1659
|
-
return $gVhhF$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(true));
|
|
1660
|
-
},
|
|
1661
|
-
get onMouseLeave() {
|
|
1662
|
-
return $gVhhF$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(false));
|
|
1663
|
-
}
|
|
1664
|
-
}, () => displays_() && {
|
|
1665
|
-
style: `--look-card-width:${containerWidth_()}px;--look-item-height:${lookItemHeight() || 200}px`
|
|
1666
|
-
}), false, true);
|
|
1667
1628
|
$gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Index), {
|
|
1668
1629
|
get each() {
|
|
1669
1630
|
return displays_() || Array.from({
|
|
@@ -1688,7 +1649,21 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1688
1649
|
});
|
|
1689
1650
|
}
|
|
1690
1651
|
}));
|
|
1691
|
-
$gVhhF$solidjsweb.
|
|
1652
|
+
$gVhhF$solidjsweb.effect(_p$ => {
|
|
1653
|
+
var _v$ = !!userWantsExpanded(),
|
|
1654
|
+
_v$2 = !!(!getSecondPartAnimationRunning() && userWantsExpanded()),
|
|
1655
|
+
_v$3 = displays_() &&
|
|
1656
|
+
// The styling is written like this to eke out animation smoothness on low CPU devices, git blame for previous, more readable versions.
|
|
1657
|
+
`--look-card-width:${containerWidth_()}px;--look-card-height:${containerHeight_()}px;--look-item-height:${lookItemHeight() || 200}px`;
|
|
1658
|
+
_v$ !== _p$.e && _el$2.classList.toggle("expanded", _p$.e = _v$);
|
|
1659
|
+
_v$2 !== _p$.t && _el$2.classList.toggle("resting-fully-expanded", _p$.t = _v$2);
|
|
1660
|
+
_p$.a = $gVhhF$solidjsweb.style(_el$2, _v$3, _p$.a);
|
|
1661
|
+
return _p$;
|
|
1662
|
+
}, {
|
|
1663
|
+
e: undefined,
|
|
1664
|
+
t: undefined,
|
|
1665
|
+
a: undefined
|
|
1666
|
+
});
|
|
1692
1667
|
return _el$;
|
|
1693
1668
|
}
|
|
1694
1669
|
});
|
|
@@ -1715,7 +1690,7 @@ function $905010a06f9aeae5$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1715
1690
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1716
1691
|
requestAnimationFrame(step);
|
|
1717
1692
|
}
|
|
1718
|
-
var $ad882bbe664dbd53$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=look-card
|
|
1693
|
+
var $ad882bbe664dbd53$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=look-card><!$><!/><!$><!/>`);
|
|
1719
1694
|
function $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
1720
1695
|
display_: display_,
|
|
1721
1696
|
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
@@ -1725,20 +1700,13 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
|
1725
1700
|
priceFormatting_: priceFormatting_,
|
|
1726
1701
|
pseudoRouter_: pseudoRouter_
|
|
1727
1702
|
}) {
|
|
1703
|
+
let container;
|
|
1728
1704
|
const useWantsExpandedSignal_ = $gVhhF$solidjs.createSignal(false);
|
|
1729
1705
|
const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
|
|
1730
1706
|
const supportsHover_ = $b54e6192d0caa293$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
|
|
1731
1707
|
const us = Symbol("look");
|
|
1732
|
-
const
|
|
1733
|
-
|
|
1734
|
-
$gVhhF$solidjsweb.addEventListener(_el$, "click", $gVhhF$depictaiutilishared.catchify(({
|
|
1735
|
-
target: target
|
|
1736
|
-
}) => setUserWantsExpanded(prev => !prev)), true);
|
|
1737
|
-
$gVhhF$solidjsweb.effect(() => _el$.classList.toggle("placeholder", !display_()));
|
|
1738
|
-
$gVhhF$solidjsweb.runHydrationEvents();
|
|
1739
|
-
return _el$;
|
|
1740
|
-
})();
|
|
1741
|
-
const containerWidth_ = $f13855d1b951b24a$export$ebdc3711f7e02ccd(container);
|
|
1708
|
+
const [containerWidth_, setContainerWidth] = $gVhhF$solidjs.createSignal();
|
|
1709
|
+
const [containerHeight_, setContainerHeight] = $gVhhF$solidjs.createSignal();
|
|
1742
1710
|
const clickHandler = $gVhhF$depictaiutilishared.catchify(({
|
|
1743
1711
|
target: target
|
|
1744
1712
|
}) => {
|
|
@@ -1759,35 +1727,62 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
|
1759
1727
|
}));
|
|
1760
1728
|
// Close us if another look expands
|
|
1761
1729
|
$gVhhF$solidjs.createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1730
|
+
return (() => {
|
|
1731
|
+
var _el$ = $gVhhF$solidjsweb.getNextElement($ad882bbe664dbd53$var$_tmpl$),
|
|
1732
|
+
_el$2 = _el$.firstChild,
|
|
1733
|
+
[_el$3, _co$] = $gVhhF$solidjsweb.getNextMarker(_el$2.nextSibling),
|
|
1734
|
+
_el$4 = _el$3.nextSibling,
|
|
1735
|
+
[_el$5, _co$2] = $gVhhF$solidjsweb.getNextMarker(_el$4.nextSibling);
|
|
1736
|
+
$gVhhF$solidjsweb.addEventListener(_el$, "click", $gVhhF$depictaiutilishared.catchify(() => setUserWantsExpanded(prev => !prev)), true);
|
|
1737
|
+
$gVhhF$solidjsweb.use(el => {
|
|
1738
|
+
container = el;
|
|
1739
|
+
const ro = new ResizeObserver($gVhhF$depictaiutilishared.catchify(records => {
|
|
1740
|
+
const last = records.at(-1);
|
|
1741
|
+
if (!last) return;
|
|
1742
|
+
const {
|
|
1743
|
+
width: width,
|
|
1744
|
+
height: height
|
|
1745
|
+
} = last.contentRect;
|
|
1746
|
+
setContainerWidth(width);
|
|
1747
|
+
setContainerHeight(height);
|
|
1748
|
+
}));
|
|
1749
|
+
ro.observe(el);
|
|
1750
|
+
$gVhhF$solidjs.onCleanup(() => ro.disconnect());
|
|
1751
|
+
}, _el$);
|
|
1752
|
+
_el$.classList.toggle("placeholder", !!!display_);
|
|
1753
|
+
$gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1754
|
+
get when() {
|
|
1755
|
+
return display_();
|
|
1756
|
+
},
|
|
1757
|
+
get fallback() {
|
|
1758
|
+
return $gVhhF$solidjsweb.createComponent((0, $3bc4a89b971a3af5$export$3f37af283f8fb843), {
|
|
1759
|
+
aspectRatio: `var(${(0, $6f604560873e4f69$export$8a2234b5b1a5ebd4)}, ${placeholderImageAspectRatio_})`
|
|
1760
|
+
});
|
|
1761
|
+
},
|
|
1762
|
+
get children() {
|
|
1763
|
+
return $gVhhF$solidjsweb.createComponent((0, $d212a67662c5cf38$export$9d4a4b669b1929ab), {
|
|
1764
|
+
get src() {
|
|
1765
|
+
return display_()?.image_urls?.[0];
|
|
1766
|
+
},
|
|
1767
|
+
aspectRatio: placeholderImageAspectRatio_,
|
|
1768
|
+
autoAdjustAspectRatio: true
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1771
|
+
}), _el$3, _co$);
|
|
1772
|
+
$gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $905010a06f9aeae5$export$ebf0b1d4f90c09ae), {
|
|
1773
|
+
displays_: () => display_()?.displays,
|
|
1774
|
+
userWantsExpandedSignal_: useWantsExpandedSignal_,
|
|
1775
|
+
containerWidth_: containerWidth_,
|
|
1776
|
+
animationDuration_: animationDuration_,
|
|
1777
|
+
supportsHover_: supportsHover_,
|
|
1778
|
+
FavoriteButton_: FavoriteButton_,
|
|
1779
|
+
priceFormatting_: priceFormatting_,
|
|
1780
|
+
pseudoRouter_: pseudoRouter_,
|
|
1781
|
+
containerHeight_: containerHeight_
|
|
1782
|
+
}), _el$5, _co$2);
|
|
1783
|
+
$gVhhF$solidjsweb.runHydrationEvents();
|
|
1784
|
+
return _el$;
|
|
1785
|
+
})();
|
|
1791
1786
|
}
|
|
1792
1787
|
$gVhhF$solidjsweb.delegateEvents(["click"]);
|
|
1793
1788
|
|
|
@@ -3451,6 +3446,34 @@ let $0b6e2070a98de347$export$44dad306455dddf;
|
|
|
3451
3446
|
DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
|
|
3452
3447
|
DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
|
|
3453
3448
|
})($0b6e2070a98de347$export$44dad306455dddf || ($0b6e2070a98de347$export$44dad306455dddf = {}));
|
|
3449
|
+
|
|
3450
|
+
/** @jsxImportSource solid-js */
|
|
3451
|
+
|
|
3452
|
+
function $f13855d1b951b24a$export$ebdc3711f7e02ccd(what_to_watch) {
|
|
3453
|
+
const [width, setWidth] = $gVhhF$solidjs.createSignal();
|
|
3454
|
+
const resizeObserver = new ResizeObserver($gVhhF$depictaiutilishared.catchify(records => {
|
|
3455
|
+
for (let j = 0; j < records.length; j++) {
|
|
3456
|
+
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
3457
|
+
setWidth(width);
|
|
3458
|
+
}
|
|
3459
|
+
}));
|
|
3460
|
+
// If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
|
|
3461
|
+
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
3462
|
+
const disconnect = (0, $gVhhF$depictaiutilishared.observer).onexists(what_to_watch, ({
|
|
3463
|
+
element: element
|
|
3464
|
+
}) => requestAnimationFrame($gVhhF$depictaiutilishared.catchify(() => {
|
|
3465
|
+
const current_size = what_to_watch.getBoundingClientRect().width;
|
|
3466
|
+
if (current_size)
|
|
3467
|
+
// If element has size, set signal to that. ResizeObserver only triggers when the content is visible in some cases, but it might already have a size. This reduces size filter expanding animation jank in chrome.
|
|
3468
|
+
setWidth(current_size);
|
|
3469
|
+
resizeObserver.observe(element);
|
|
3470
|
+
})));
|
|
3471
|
+
$gVhhF$solidjs.onCleanup(() => {
|
|
3472
|
+
resizeObserver.disconnect();
|
|
3473
|
+
disconnect();
|
|
3474
|
+
});
|
|
3475
|
+
return width;
|
|
3476
|
+
}
|
|
3454
3477
|
var $0175183387c8923a$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg width=21 height=20 viewBox="0 0 21 20"fill=none><path fill-rule=evenodd d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z"fill=#0f0f0f>`);
|
|
3455
3478
|
function $0175183387c8923a$export$f7658c347b037c3f(props = {}) {
|
|
3456
3479
|
return (() => {
|
package/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.7.
|
|
14
|
+
export const version = "4.7.8";
|
|
15
15
|
/**
|
|
16
16
|
* Just like `useExpandingContainer` except that the children can be reactive solid-js signals, basically solid's JSX.Element instead of our JSX.Element
|
|
17
17
|
*/
|
|
@@ -185,10 +185,6 @@ export function ImagePlaceholder(props: ImagePlaceholderBaseOptions & (ImagePlac
|
|
|
185
185
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
186
186
|
*/
|
|
187
187
|
export function media_query_to_accessor(media_query: string): import("solid-js").Accessor<boolean>;
|
|
188
|
-
/**
|
|
189
|
-
* Returns accessor with the size of the provided element, including padding and border (I think)
|
|
190
|
-
*/
|
|
191
|
-
export function make_accurate_width_accessor(what_to_watch: HTMLElement): import("solid-js").Accessor<number | undefined>;
|
|
192
188
|
/**
|
|
193
189
|
* A Placeholder to use instead of some text, while it's loading. This is the inline version, meant to be embedded into sentences (or exist instead of them), etc.
|
|
194
190
|
* If you want a block version, use `ImagePlaceholder` with `width`and `height` set instead.
|
|
@@ -515,6 +511,10 @@ export function CrossIcon(props?: JSX.SvgSVGAttributes<SVGSVGElement>): SVGEleme
|
|
|
515
511
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
516
512
|
*/
|
|
517
513
|
export const modalVersionSymbol: unique symbol;
|
|
514
|
+
/**
|
|
515
|
+
* Returns accessor with the size of the provided element, including padding and border (I think)
|
|
516
|
+
*/
|
|
517
|
+
export function make_accurate_width_accessor(what_to_watch: HTMLElement): import("solid-js").Accessor<number | undefined>;
|
|
518
518
|
/**
|
|
519
519
|
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
520
520
|
* @param clickEvent The click event that triggered the navigation
|
|
@@ -902,7 +902,7 @@ export function LookCard({
|
|
|
902
902
|
expandedLooksSignal_: Signal<Set<symbol>>;
|
|
903
903
|
priceFormatting_: Accessor<plp_shared_i18n["price_formatting_"]>;
|
|
904
904
|
pseudoRouter_: PseudoRouter;
|
|
905
|
-
}):
|
|
905
|
+
}): JSX.Element;
|
|
906
906
|
/**
|
|
907
907
|
* Render a grid with provided recommendations. displayTransformers will not be applied for this since you yourself provide the displays. Options are reactive.
|
|
908
908
|
*/
|