@depict-ai/ui 4.7.23 → 4.7.25
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 +129 -45
- package/ES10/index.d.ts +5 -1
- package/ES10/index.js +347 -264
- package/latest/index.cjs +129 -45
- package/latest/index.d.ts +5 -1
- package/latest/index.js +347 -264
- package/package.json +1 -1
- package/server/ES10/index.cjs +100 -32
- package/server/ES10/index.d.ts +5 -1
- package/server/ES10/index.js +236 -169
- package/server/latest/index.cjs +100 -32
- package/server/latest/index.d.ts +5 -1
- package/server/latest/index.js +236 -169
package/latest/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var $gVhhF$depictaiutilishared = require("@depict-ai/utilishared/latest");
|
|
2
|
+
var $gVhhF$depictaiutilisharedlatest = require("@depict-ai/utilishared/latest");
|
|
2
3
|
var $gVhhF$solidjs = require("solid-js");
|
|
3
4
|
var $gVhhF$solidjsweb = require("solid-js/web");
|
|
4
|
-
var $gVhhF$depictaiutilisharedlatest = require("@depict-ai/utilishared/latest");
|
|
5
5
|
var $gVhhF$solidjsstore = require("solid-js/store");
|
|
6
6
|
require("../multi_import_deduplicator.cjs").register_es_version("ui", "latest");
|
|
7
7
|
function $parcel$export(e, n, v, s) {
|
|
@@ -12,13 +12,14 @@ function $parcel$export(e, n, v, s) {
|
|
|
12
12
|
configurable: true
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
+
$parcel$export(module.exports, "useMobileHover", () => $8bf678c45948a297$export$d4d96868197be50e);
|
|
15
16
|
$parcel$export(module.exports, "useVisibilityState", () => $55cbacb79d3e0cea$export$54299a3c81f5425);
|
|
16
17
|
$parcel$export(module.exports, "useSlidableInformation", () => $a0e53f99354809d9$export$eaa625fb39439e37);
|
|
17
18
|
$parcel$export(module.exports, "useProductCardIsVisible", () => $67155e1aeb7073f6$export$80bb7300ce6a8be3);
|
|
18
19
|
$parcel$export(module.exports, "CurrentlyIntersectingContext", () => $67155e1aeb7073f6$export$f223d69ed12f5fb7);
|
|
19
20
|
$parcel$export(module.exports, "useExpandingContainerReactive", () => $4b455f60dadde8b8$export$5bad61ecde080b1f);
|
|
20
21
|
$parcel$export(module.exports, "LooksSliderOrGrid", () => $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa);
|
|
21
|
-
$parcel$export(module.exports, "LookCard", () => $
|
|
22
|
+
$parcel$export(module.exports, "LookCard", () => $bda357ff87c46163$export$44809a8a3e867e30);
|
|
22
23
|
$parcel$export(module.exports, "PseudoRouter", () => $e96dd13889871fc0$export$7e1297a3a19f10d8);
|
|
23
24
|
$parcel$export(module.exports, "promiseSafeStructuredClone", () => $ac946c6b782bb900$export$83bb9af5671e1dbe);
|
|
24
25
|
$parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $d84fe647b84b5dc5$export$5162a71f252e6122);
|
|
@@ -103,7 +104,68 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
103
104
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
104
105
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
105
106
|
/*! Depict.ai search and product listing SDK */
|
|
106
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.
|
|
107
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.25";
|
|
108
|
+
let $8bf678c45948a297$var$elementsHoveredSignal;
|
|
109
|
+
let $8bf678c45948a297$var$consumersSignal;
|
|
110
|
+
function $8bf678c45948a297$export$d4d96868197be50e() {
|
|
111
|
+
if (!$8bf678c45948a297$var$elementsHoveredSignal || !$8bf678c45948a297$var$consumersSignal) $gVhhF$solidjs.createRoot(dispose => {
|
|
112
|
+
$8bf678c45948a297$var$elementsHoveredSignal = $gVhhF$solidjs.createSignal(new Set());
|
|
113
|
+
$8bf678c45948a297$var$consumersSignal = $gVhhF$solidjs.createSignal(0);
|
|
114
|
+
const [consumers] = $8bf678c45948a297$var$consumersSignal;
|
|
115
|
+
// No matter how often useMobileHover is called, only add one listener and get hovered elements once per touchmove event, for efficiency
|
|
116
|
+
$8bf678c45948a297$var$doHeavyCalculations();
|
|
117
|
+
$gVhhF$solidjs.createEffect(() => {
|
|
118
|
+
// No-one needs information anymore, stop listening
|
|
119
|
+
const users = consumers();
|
|
120
|
+
if (users < 1) {
|
|
121
|
+
$gVhhF$depictaiutilisharedlatest.dlog("Stopping to listen for mobile hover");
|
|
122
|
+
dispose();
|
|
123
|
+
$8bf678c45948a297$var$elementsHoveredSignal = undefined;
|
|
124
|
+
$8bf678c45948a297$var$consumersSignal = undefined;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
const [elementsHovered] = $8bf678c45948a297$var$elementsHoveredSignal;
|
|
129
|
+
const [, setConsumers] = $8bf678c45948a297$var$consumersSignal;
|
|
130
|
+
setConsumers(prev => prev + 1);
|
|
131
|
+
$gVhhF$solidjs.onCleanup(() => setConsumers(prev => prev - 1));
|
|
132
|
+
return elementsHovered;
|
|
133
|
+
}
|
|
134
|
+
function $8bf678c45948a297$var$doHeavyCalculations() {
|
|
135
|
+
$gVhhF$depictaiutilisharedlatest.dlog("Starting to listen for mobile hover");
|
|
136
|
+
const [, setElementsHovered] = $8bf678c45948a297$var$elementsHoveredSignal;
|
|
137
|
+
const elementAtTouch = new Map();
|
|
138
|
+
const updateSet = () => setElementsHovered(new Set([...elementAtTouch.values()].filter(v => v)));
|
|
139
|
+
const setPositionHandler = $gVhhF$depictaiutilisharedlatest.catchify(evt => {
|
|
140
|
+
for (const touch of evt.changedTouches) elementAtTouch.set(touch.identifier, $8bf678c45948a297$var$getElementAtTouch(touch));
|
|
141
|
+
updateSet();
|
|
142
|
+
});
|
|
143
|
+
const deleteTouchHandler = $gVhhF$depictaiutilisharedlatest.catchify(evt => {
|
|
144
|
+
for (const touch of evt.changedTouches) elementAtTouch.delete(touch.identifier);
|
|
145
|
+
updateSet();
|
|
146
|
+
});
|
|
147
|
+
addEventListener("touchstart", setPositionHandler, {
|
|
148
|
+
passive: true
|
|
149
|
+
});
|
|
150
|
+
addEventListener("touchmove", setPositionHandler, {
|
|
151
|
+
passive: true
|
|
152
|
+
});
|
|
153
|
+
addEventListener("touchend", deleteTouchHandler, {
|
|
154
|
+
passive: true
|
|
155
|
+
});
|
|
156
|
+
addEventListener("touchcancel", deleteTouchHandler, {
|
|
157
|
+
passive: true
|
|
158
|
+
});
|
|
159
|
+
$gVhhF$solidjs.onCleanup(() => {
|
|
160
|
+
removeEventListener("touchstart", setPositionHandler);
|
|
161
|
+
removeEventListener("touchmove", setPositionHandler);
|
|
162
|
+
removeEventListener("touchend", deleteTouchHandler);
|
|
163
|
+
removeEventListener("touchcancel", deleteTouchHandler);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function $8bf678c45948a297$var$getElementAtTouch(touch) {
|
|
167
|
+
return document.elementFromPoint(touch.clientX, touch.clientY);
|
|
168
|
+
}
|
|
107
169
|
function $55cbacb79d3e0cea$export$54299a3c81f5425() {
|
|
108
170
|
const d = document;
|
|
109
171
|
const [isVisible, setIsVisible] = $gVhhF$solidjs.createSignal(d.visibilityState !== "hidden");
|
|
@@ -1437,11 +1499,11 @@ function $d659702496cb72ea$export$a71e92cfbb498adc(props) {
|
|
|
1437
1499
|
return $gVhhF$depictaiutilishared.standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1438
1500
|
});
|
|
1439
1501
|
}
|
|
1440
|
-
var $
|
|
1441
|
-
$
|
|
1442
|
-
$
|
|
1443
|
-
$
|
|
1444
|
-
function $
|
|
1502
|
+
var $0540c3739b32dc79$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=img-wrapper>`),
|
|
1503
|
+
$0540c3739b32dc79$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<span class="d-price original">`),
|
|
1504
|
+
$0540c3739b32dc79$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=right-part><div class=text-container><span class="d-title line-clamp"></span><span class=d-price></span><!$><!/></div><!$><!/>`),
|
|
1505
|
+
$0540c3739b32dc79$var$_tmpl$4 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<a class=look-item><!$><!/><!$><!/>`);
|
|
1506
|
+
function $0540c3739b32dc79$export$b73ed90f0ee50dc3({
|
|
1445
1507
|
display_: display_,
|
|
1446
1508
|
FavoriteButton_: FavoriteButton_,
|
|
1447
1509
|
userWantsExpandedSignal_: [userWantsExpanded, setUserWantsExpanded],
|
|
@@ -1467,7 +1529,7 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1467
1529
|
const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
|
|
1468
1530
|
const title = $gVhhF$solidjs.createMemo(() => variantToUse()?.title);
|
|
1469
1531
|
return (() => {
|
|
1470
|
-
var _el$ = $gVhhF$solidjsweb.getNextElement($
|
|
1532
|
+
var _el$ = $gVhhF$solidjsweb.getNextElement($0540c3739b32dc79$var$_tmpl$4),
|
|
1471
1533
|
_el$12 = _el$.firstChild,
|
|
1472
1534
|
[_el$13, _co$3] = $gVhhF$solidjsweb.getNextMarker(_el$12.nextSibling),
|
|
1473
1535
|
_el$14 = _el$13.nextSibling,
|
|
@@ -1500,7 +1562,7 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1500
1562
|
});
|
|
1501
1563
|
},
|
|
1502
1564
|
get children() {
|
|
1503
|
-
var _el$2 = $gVhhF$solidjsweb.getNextElement($
|
|
1565
|
+
var _el$2 = $gVhhF$solidjsweb.getNextElement($0540c3739b32dc79$var$_tmpl$);
|
|
1504
1566
|
$gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1505
1567
|
get when() {
|
|
1506
1568
|
return imageUrl();
|
|
@@ -1535,7 +1597,7 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1535
1597
|
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
|
|
1536
1598
|
},
|
|
1537
1599
|
get children() {
|
|
1538
|
-
var _el$3 = $gVhhF$solidjsweb.getNextElement($
|
|
1600
|
+
var _el$3 = $gVhhF$solidjsweb.getNextElement($0540c3739b32dc79$var$_tmpl$3),
|
|
1539
1601
|
_el$4 = _el$3.firstChild,
|
|
1540
1602
|
_el$5 = _el$4.firstChild,
|
|
1541
1603
|
_el$6 = _el$5.nextSibling,
|
|
@@ -1615,7 +1677,7 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1615
1677
|
return isOnSale();
|
|
1616
1678
|
},
|
|
1617
1679
|
get children() {
|
|
1618
|
-
var _el$7 = $gVhhF$solidjsweb.getNextElement($
|
|
1680
|
+
var _el$7 = $gVhhF$solidjsweb.getNextElement($0540c3739b32dc79$var$_tmpl$2);
|
|
1619
1681
|
$gVhhF$solidjsweb.insert(_el$7, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1620
1682
|
get when() {
|
|
1621
1683
|
return variantToUse() && !originalPrice.loading;
|
|
@@ -1714,8 +1776,8 @@ async function $4f38102efa525ee0$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1714
1776
|
}
|
|
1715
1777
|
return isAffected;
|
|
1716
1778
|
}
|
|
1717
|
-
var $
|
|
1718
|
-
function $
|
|
1779
|
+
var $912d9a717ceee184$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=scroll-padding><div class=look-overlay>`);
|
|
1780
|
+
function $912d9a717ceee184$export$ebf0b1d4f90c09ae({
|
|
1719
1781
|
displays_: displays_,
|
|
1720
1782
|
FavoriteButton_: FavoriteButton_,
|
|
1721
1783
|
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
@@ -1734,6 +1796,7 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1734
1796
|
const textFadeInAnimationRunning = $gVhhF$solidjs.createSignal(false);
|
|
1735
1797
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1736
1798
|
const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
|
|
1799
|
+
//const elementsHovered = useMobileHover();
|
|
1737
1800
|
$4f38102efa525ee0$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1738
1801
|
return $gVhhF$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
1739
1802
|
get children() {
|
|
@@ -1742,21 +1805,37 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1742
1805
|
return containerWidth_() || !displays_();
|
|
1743
1806
|
},
|
|
1744
1807
|
get children() {
|
|
1745
|
-
var _el$ = $gVhhF$solidjsweb.getNextElement($
|
|
1808
|
+
var _el$ = $gVhhF$solidjsweb.getNextElement($912d9a717ceee184$var$_tmpl$),
|
|
1746
1809
|
_el$2 = _el$.firstChild;
|
|
1747
1810
|
$gVhhF$solidjsweb.addEventListener(_el$2, "mouseleave", $gVhhF$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(false)));
|
|
1748
1811
|
$gVhhF$solidjsweb.addEventListener(_el$2, "mouseenter", $gVhhF$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(true)));
|
|
1749
|
-
$gVhhF$solidjsweb.use(el =>
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1812
|
+
$gVhhF$solidjsweb.use(el => {
|
|
1813
|
+
$gVhhF$solidjs.createEffect(() => {
|
|
1814
|
+
if (userWantsExpanded()) return;
|
|
1815
|
+
if (isAffectedByChromeBug) {
|
|
1816
|
+
$912d9a717ceee184$var$scrollingFunctionForChrome(el, 0, animationDuration_);
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
el.scrollTo({
|
|
1820
|
+
top: 0,
|
|
1821
|
+
behavior: "smooth"
|
|
1822
|
+
});
|
|
1758
1823
|
});
|
|
1759
|
-
|
|
1824
|
+
// createEffect(wasOpenedByHover => {
|
|
1825
|
+
// if (supportsHover_()) return;
|
|
1826
|
+
// const hovered = elementsHovered();
|
|
1827
|
+
// checkHovered: {
|
|
1828
|
+
// if (hovered.has(el)) break checkHovered;
|
|
1829
|
+
// for (const element of hovered) {
|
|
1830
|
+
// if (el.contains(element)) break checkHovered;
|
|
1831
|
+
// }
|
|
1832
|
+
// if (wasOpenedByHover) setUserWantsExpanded(false);
|
|
1833
|
+
// return;
|
|
1834
|
+
// }
|
|
1835
|
+
// setUserWantsExpanded(true);
|
|
1836
|
+
// return true;
|
|
1837
|
+
// });
|
|
1838
|
+
}, _el$2);
|
|
1760
1839
|
$gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Index), {
|
|
1761
1840
|
get each() {
|
|
1762
1841
|
return displays_() || Array.from({
|
|
@@ -1764,7 +1843,7 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1764
1843
|
});
|
|
1765
1844
|
},
|
|
1766
1845
|
children: (display, index) => {
|
|
1767
|
-
return $gVhhF$solidjsweb.createComponent((0, $
|
|
1846
|
+
return $gVhhF$solidjsweb.createComponent((0, $0540c3739b32dc79$export$b73ed90f0ee50dc3), {
|
|
1768
1847
|
pseudoRouter_: pseudoRouter_,
|
|
1769
1848
|
animationDuration_: animationDuration_,
|
|
1770
1849
|
display_: display,
|
|
@@ -1805,7 +1884,7 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1805
1884
|
/**
|
|
1806
1885
|
* Workaround for Chrome bug 326498383, adapted version of https://stackoverflow.com/a/39494245
|
|
1807
1886
|
*/
|
|
1808
|
-
function $
|
|
1887
|
+
function $912d9a717ceee184$var$scrollingFunctionForChrome(element, targetScrollY, duration) {
|
|
1809
1888
|
let start;
|
|
1810
1889
|
const startingY = element.scrollTop;
|
|
1811
1890
|
const diff = targetScrollY - startingY;
|
|
@@ -1822,8 +1901,8 @@ function $905010a06f9aeae5$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1822
1901
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1823
1902
|
requestAnimationFrame(step);
|
|
1824
1903
|
}
|
|
1825
|
-
var $
|
|
1826
|
-
function $
|
|
1904
|
+
var $bda357ff87c46163$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=look-card><!$><!/><!$><!/>`);
|
|
1905
|
+
function $bda357ff87c46163$export$44809a8a3e867e30({
|
|
1827
1906
|
display_: display_,
|
|
1828
1907
|
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
1829
1908
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1880,7 +1959,7 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
|
1880
1959
|
// Close us if another look expands
|
|
1881
1960
|
$gVhhF$solidjs.createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1882
1961
|
return (() => {
|
|
1883
|
-
var _el$ = $gVhhF$solidjsweb.getNextElement($
|
|
1962
|
+
var _el$ = $gVhhF$solidjsweb.getNextElement($bda357ff87c46163$var$_tmpl$),
|
|
1884
1963
|
_el$2 = _el$.firstChild,
|
|
1885
1964
|
[_el$3, _co$] = $gVhhF$solidjsweb.getNextMarker(_el$2.nextSibling),
|
|
1886
1965
|
_el$4 = _el$3.nextSibling,
|
|
@@ -1920,7 +1999,7 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
|
1920
1999
|
});
|
|
1921
2000
|
}
|
|
1922
2001
|
}), _el$3, _co$);
|
|
1923
|
-
$gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $
|
|
2002
|
+
$gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $912d9a717ceee184$export$ebf0b1d4f90c09ae), {
|
|
1924
2003
|
displays_: () => display_()?.displays,
|
|
1925
2004
|
userWantsExpandedSignal_: useWantsExpandedSignal_,
|
|
1926
2005
|
containerWidth_: containerWidth_,
|
|
@@ -2198,7 +2277,7 @@ function $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa(props) {
|
|
|
2198
2277
|
return $a3bbfa5fdaa39f3a$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
2199
2278
|
});
|
|
2200
2279
|
const sharedOptions = {
|
|
2201
|
-
product_card_template_: display => $
|
|
2280
|
+
product_card_template_: display => $bda357ff87c46163$export$44809a8a3e867e30({
|
|
2202
2281
|
display_: () => display,
|
|
2203
2282
|
FavoriteButton_: props.FavoriteButton_,
|
|
2204
2283
|
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
@@ -2856,7 +2935,7 @@ function $ce4b5b99c8b2b34e$export$a146ac6fa8346a25({
|
|
|
2856
2935
|
ev.preventDefault();
|
|
2857
2936
|
submit_query_(item());
|
|
2858
2937
|
})), _el$4);
|
|
2859
|
-
$gVhhF$solidjsweb.addEventListener(_el$4, "mouseleave", $gVhhF$depictaiutilishared.catchify(() => write_selected_index_(
|
|
2938
|
+
$gVhhF$solidjsweb.addEventListener(_el$4, "mouseleave", $gVhhF$depictaiutilishared.catchify(() => write_selected_index_()));
|
|
2860
2939
|
$gVhhF$solidjsweb.addEventListener(_el$4, "mouseenter", $gVhhF$depictaiutilishared.catchify(() => write_selected_index_([0, index])));
|
|
2861
2940
|
$gVhhF$solidjsweb.insert(_el$5, $gVhhF$solidjsweb.createComponent((0, $9e30168c4b1661d2$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
2862
2941
|
$gVhhF$solidjsweb.insert(_el$6, item);
|
|
@@ -4365,7 +4444,7 @@ function $1ab22f2cd39b3061$export$916e6850778505f6(search_params, filter_query_p
|
|
|
4365
4444
|
const keys = [...search_params.keys()];
|
|
4366
4445
|
for (const key of keys) if (key.startsWith(filter_query_param_prefix) || key === sorting_query_param || key.startsWith($1ab22f2cd39b3061$var$legacy_filter_prefix)) search_params.delete(key);
|
|
4367
4446
|
}
|
|
4368
|
-
const $1ab22f2cd39b3061$export$
|
|
4447
|
+
const $1ab22f2cd39b3061$export$84daa4fa1471698b = "#went_sideways_clear_filters";
|
|
4369
4448
|
function $1ab22f2cd39b3061$export$43cd1e747fecd42e({
|
|
4370
4449
|
to_url_: to_url_,
|
|
4371
4450
|
set_clearing_flag_: set_clearing_flag_,
|
|
@@ -4379,9 +4458,13 @@ function $1ab22f2cd39b3061$export$43cd1e747fecd42e({
|
|
|
4379
4458
|
const {
|
|
4380
4459
|
searchParams: searchParams
|
|
4381
4460
|
} = url_object;
|
|
4382
|
-
|
|
4461
|
+
let transferredAnyFilters = false;
|
|
4383
4462
|
if (from_search_params_.has(sorting_query_param_)) searchParams.set(sorting_query_param_, from_search_params_.get(sorting_query_param_));
|
|
4384
|
-
for (const key of from_search_params_.keys()) if (key.startsWith(filter_query_param_prefix_))
|
|
4463
|
+
for (const key of from_search_params_.keys()) if (key.startsWith(filter_query_param_prefix_)) {
|
|
4464
|
+
searchParams.set(key, from_search_params_.get(key));
|
|
4465
|
+
transferredAnyFilters = true;
|
|
4466
|
+
}
|
|
4467
|
+
if (set_clearing_flag_ && transferredAnyFilters) url_object.hash = $1ab22f2cd39b3061$export$84daa4fa1471698b;
|
|
4385
4468
|
if (was_url_object) return url_object;
|
|
4386
4469
|
return url_object.href;
|
|
4387
4470
|
}
|
|
@@ -9914,7 +9997,8 @@ function $c79fd10a3ab7d6e0$export$477caf01aecaeb2a(options) {
|
|
|
9914
9997
|
$gVhhF$solidjs.onCleanup(() => (0, $gVhhF$depictaiutilishared.instant_exec_on_suspect_history_change).delete(history_change_handler));
|
|
9915
9998
|
$gVhhF$solidjs.createComputed(() => {
|
|
9916
9999
|
const {
|
|
9917
|
-
searchParams: searchParams
|
|
10000
|
+
searchParams: searchParams,
|
|
10001
|
+
hash: hash
|
|
9918
10002
|
} = new URL(get_current_href());
|
|
9919
10003
|
$gVhhF$solidjs.batch(() => {
|
|
9920
10004
|
const found_sorting = $1ab22f2cd39b3061$export$766e9676e74997d3(searchParams, sorting_query_param_);
|
|
@@ -9946,7 +10030,7 @@ function $c79fd10a3ab7d6e0$export$477caf01aecaeb2a(options) {
|
|
|
9946
10030
|
if (found_override_listing_id) $gVhhF$depictaiutilishared.dlog("Found override query id:", found_override_listing_id); // This stuff might get confusing so better log it
|
|
9947
10031
|
}
|
|
9948
10032
|
|
|
9949
|
-
if (
|
|
10033
|
+
if (hash === (0, $1ab22f2cd39b3061$export$84daa4fa1471698b)) set_has_sideways_filter_clearing_flag(true);
|
|
9950
10034
|
if (!writer_started) {
|
|
9951
10035
|
// The owner here is the createComputed which gets disposed the next time the computation runs - but we actually just want to delay the start of the href_writer until our signals contain the current value of the URL, therefore the runWithOwner
|
|
9952
10036
|
$gVhhF$solidjs.runWithOwner(owner, () => $c79fd10a3ab7d6e0$var$start_href_writer({
|
|
@@ -9987,21 +10071,21 @@ function $c79fd10a3ab7d6e0$var$start_href_writer({
|
|
|
9987
10071
|
filter_query_param_prefix_: filter_query_param_prefix_
|
|
9988
10072
|
}) {
|
|
9989
10073
|
$gVhhF$solidjs.createEffect($gVhhF$solidjs.on([get_sorting_, get_selected_filters_, get_has_sideways_filter_clearing_flag_], ([sorting, filters, has_sideways_filter_clearing_flag]) => {
|
|
9990
|
-
const
|
|
9991
|
-
const
|
|
10074
|
+
const url_object = new URL(location.href);
|
|
10075
|
+
const unmodified_search_params = [...url_object.searchParams];
|
|
10076
|
+
const unmodified_hash = url_object.hash;
|
|
9992
10077
|
const {
|
|
9993
10078
|
searchParams: searchParams
|
|
9994
10079
|
} = url_object;
|
|
9995
10080
|
$1ab22f2cd39b3061$export$916e6850778505f6(searchParams, filter_query_param_prefix_, sorting_query_param_);
|
|
9996
10081
|
$1ab22f2cd39b3061$export$62acb285a7579555(sorting, searchParams, sorting_query_param_);
|
|
9997
10082
|
$1ab22f2cd39b3061$export$58aa3f171519b6d7(filters, searchParams, filter_query_param_prefix_);
|
|
9998
|
-
if (!has_sideways_filter_clearing_flag) $c79fd10a3ab7d6e0$var$delete_sideways_param_flag(
|
|
10083
|
+
if (!has_sideways_filter_clearing_flag) $c79fd10a3ab7d6e0$var$delete_sideways_param_flag(url_object);
|
|
9999
10084
|
// We can't just check if the URL is equal since sometimes the order of the parameters in the URL changes (randomly?) so we need to compare them one by one
|
|
10000
|
-
const unmodified_search_params = [...new URL(current_href).searchParams];
|
|
10001
10085
|
const new_search_params = [...searchParams];
|
|
10002
10086
|
// Having the array middle step because if we'd check the "size" property of the map the algorithm could be fooled if there were two query parameters with the same key
|
|
10003
10087
|
const new_search_params_map = new Map(new_search_params);
|
|
10004
|
-
if (unmodified_search_params.length !== new_search_params.length || !unmodified_search_params.every(([key, value]) => new_search_params_map.get(key) === value))
|
|
10088
|
+
if (unmodified_search_params.length !== new_search_params.length || !unmodified_search_params.every(([key, value]) => new_search_params_map.get(key) === value) || unmodified_hash !== url_object.hash)
|
|
10005
10089
|
// Only update URL if it actually changed
|
|
10006
10090
|
router_.navigate_.go_to_({
|
|
10007
10091
|
is_replace_: true,
|
|
@@ -10013,8 +10097,8 @@ function $c79fd10a3ab7d6e0$var$start_href_writer({
|
|
|
10013
10097
|
defer: true
|
|
10014
10098
|
}));
|
|
10015
10099
|
}
|
|
10016
|
-
function $c79fd10a3ab7d6e0$var$delete_sideways_param_flag(
|
|
10017
|
-
if (
|
|
10100
|
+
function $c79fd10a3ab7d6e0$var$delete_sideways_param_flag(url_object) {
|
|
10101
|
+
if (url_object.hash === (0, $1ab22f2cd39b3061$export$84daa4fa1471698b)) url_object.hash = "";
|
|
10018
10102
|
}
|
|
10019
10103
|
|
|
10020
10104
|
// We just pass page_url_creator to DepictAPI when we instantiate it, so don't allow it to be specified if api is already specified
|
package/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,11 @@ 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.25";
|
|
15
|
+
/**
|
|
16
|
+
* Returns a set containing the element under every finger touching the screen right now.
|
|
17
|
+
*/
|
|
18
|
+
export function useMobileHover(): import("solid-js").Accessor<Set<Element>>;
|
|
15
19
|
/**
|
|
16
20
|
* Returns if the current tab is visible
|
|
17
21
|
*/
|