@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/ES10/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var $52FdA$depictaiutilishared = require("@depict-ai/utilishared/ES10");
|
|
2
|
+
var $52FdA$depictaiutilisharedlatest = require("@depict-ai/utilishared/ES10");
|
|
2
3
|
var $52FdA$solidjs = require("solid-js");
|
|
3
4
|
var $52FdA$solidjsweb = require("solid-js/web");
|
|
4
5
|
var $52FdA$babelruntimehelpersdefineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
5
|
-
var $52FdA$depictaiutilisharedlatest = require("@depict-ai/utilishared/ES10");
|
|
6
6
|
var $52FdA$babelruntimehelpersclassPrivateFieldSet = require("@babel/runtime/helpers/classPrivateFieldSet");
|
|
7
7
|
var $52FdA$babelruntimehelpersclassPrivateFieldGet = require("@babel/runtime/helpers/classPrivateFieldGet");
|
|
8
8
|
var $52FdA$solidjsstore = require("solid-js/store");
|
|
@@ -18,13 +18,14 @@ function $parcel$export(e, n, v, s) {
|
|
|
18
18
|
function $parcel$interopDefault(a) {
|
|
19
19
|
return a && a.__esModule ? a.default : a;
|
|
20
20
|
}
|
|
21
|
+
$parcel$export(module.exports, "useMobileHover", () => $0deb6ff75e3d67c6$export$d4d96868197be50e);
|
|
21
22
|
$parcel$export(module.exports, "useVisibilityState", () => $e7a7d2fe8a8217d8$export$54299a3c81f5425);
|
|
22
23
|
$parcel$export(module.exports, "useSlidableInformation", () => $ad8ec7729fffeb9c$export$eaa625fb39439e37);
|
|
23
24
|
$parcel$export(module.exports, "useProductCardIsVisible", () => $a52942afacbced93$export$80bb7300ce6a8be3);
|
|
24
25
|
$parcel$export(module.exports, "CurrentlyIntersectingContext", () => $a52942afacbced93$export$f223d69ed12f5fb7);
|
|
25
26
|
$parcel$export(module.exports, "useExpandingContainerReactive", () => $d6d51b09cb2116a6$export$5bad61ecde080b1f);
|
|
26
27
|
$parcel$export(module.exports, "LooksSliderOrGrid", () => $e57cd46536ad992e$export$2c9f9bf2092486aa);
|
|
27
|
-
$parcel$export(module.exports, "LookCard", () => $
|
|
28
|
+
$parcel$export(module.exports, "LookCard", () => $ae325261371de459$export$44809a8a3e867e30);
|
|
28
29
|
$parcel$export(module.exports, "PseudoRouter", () => $73014ff36186a4dd$export$7e1297a3a19f10d8);
|
|
29
30
|
$parcel$export(module.exports, "promiseSafeStructuredClone", () => $400d96565bbbfe07$export$83bb9af5671e1dbe);
|
|
30
31
|
$parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $cfcd56242923775d$export$5162a71f252e6122);
|
|
@@ -109,7 +110,68 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
109
110
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
110
111
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
111
112
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.
|
|
113
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.25";
|
|
114
|
+
let $0deb6ff75e3d67c6$var$elementsHoveredSignal;
|
|
115
|
+
let $0deb6ff75e3d67c6$var$consumersSignal;
|
|
116
|
+
function $0deb6ff75e3d67c6$export$d4d96868197be50e() {
|
|
117
|
+
if (!$0deb6ff75e3d67c6$var$elementsHoveredSignal || !$0deb6ff75e3d67c6$var$consumersSignal) $52FdA$solidjs.createRoot(dispose => {
|
|
118
|
+
$0deb6ff75e3d67c6$var$elementsHoveredSignal = $52FdA$solidjs.createSignal(new Set());
|
|
119
|
+
$0deb6ff75e3d67c6$var$consumersSignal = $52FdA$solidjs.createSignal(0);
|
|
120
|
+
const [consumers] = $0deb6ff75e3d67c6$var$consumersSignal;
|
|
121
|
+
// No matter how often useMobileHover is called, only add one listener and get hovered elements once per touchmove event, for efficiency
|
|
122
|
+
$0deb6ff75e3d67c6$var$doHeavyCalculations();
|
|
123
|
+
$52FdA$solidjs.createEffect(() => {
|
|
124
|
+
// No-one needs information anymore, stop listening
|
|
125
|
+
const users = consumers();
|
|
126
|
+
if (users < 1) {
|
|
127
|
+
$52FdA$depictaiutilisharedlatest.dlog("Stopping to listen for mobile hover");
|
|
128
|
+
dispose();
|
|
129
|
+
$0deb6ff75e3d67c6$var$elementsHoveredSignal = undefined;
|
|
130
|
+
$0deb6ff75e3d67c6$var$consumersSignal = undefined;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
const [elementsHovered] = $0deb6ff75e3d67c6$var$elementsHoveredSignal;
|
|
135
|
+
const [, setConsumers] = $0deb6ff75e3d67c6$var$consumersSignal;
|
|
136
|
+
setConsumers(prev => prev + 1);
|
|
137
|
+
$52FdA$solidjs.onCleanup(() => setConsumers(prev => prev - 1));
|
|
138
|
+
return elementsHovered;
|
|
139
|
+
}
|
|
140
|
+
function $0deb6ff75e3d67c6$var$doHeavyCalculations() {
|
|
141
|
+
$52FdA$depictaiutilisharedlatest.dlog("Starting to listen for mobile hover");
|
|
142
|
+
const [, setElementsHovered] = $0deb6ff75e3d67c6$var$elementsHoveredSignal;
|
|
143
|
+
const elementAtTouch = new Map();
|
|
144
|
+
const updateSet = () => setElementsHovered(new Set([...elementAtTouch.values()].filter(v => v)));
|
|
145
|
+
const setPositionHandler = $52FdA$depictaiutilisharedlatest.catchify(evt => {
|
|
146
|
+
for (const touch of evt.changedTouches) elementAtTouch.set(touch.identifier, $0deb6ff75e3d67c6$var$getElementAtTouch(touch));
|
|
147
|
+
updateSet();
|
|
148
|
+
});
|
|
149
|
+
const deleteTouchHandler = $52FdA$depictaiutilisharedlatest.catchify(evt => {
|
|
150
|
+
for (const touch of evt.changedTouches) elementAtTouch.delete(touch.identifier);
|
|
151
|
+
updateSet();
|
|
152
|
+
});
|
|
153
|
+
addEventListener("touchstart", setPositionHandler, {
|
|
154
|
+
passive: true
|
|
155
|
+
});
|
|
156
|
+
addEventListener("touchmove", setPositionHandler, {
|
|
157
|
+
passive: true
|
|
158
|
+
});
|
|
159
|
+
addEventListener("touchend", deleteTouchHandler, {
|
|
160
|
+
passive: true
|
|
161
|
+
});
|
|
162
|
+
addEventListener("touchcancel", deleteTouchHandler, {
|
|
163
|
+
passive: true
|
|
164
|
+
});
|
|
165
|
+
$52FdA$solidjs.onCleanup(() => {
|
|
166
|
+
removeEventListener("touchstart", setPositionHandler);
|
|
167
|
+
removeEventListener("touchmove", setPositionHandler);
|
|
168
|
+
removeEventListener("touchend", deleteTouchHandler);
|
|
169
|
+
removeEventListener("touchcancel", deleteTouchHandler);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function $0deb6ff75e3d67c6$var$getElementAtTouch(touch) {
|
|
173
|
+
return document.elementFromPoint(touch.clientX, touch.clientY);
|
|
174
|
+
}
|
|
113
175
|
function $e7a7d2fe8a8217d8$export$54299a3c81f5425() {
|
|
114
176
|
const d = document;
|
|
115
177
|
const [isVisible, setIsVisible] = $52FdA$solidjs.createSignal(d.visibilityState !== "hidden");
|
|
@@ -1500,11 +1562,11 @@ function $f38f2e64ebe2da86$export$a71e92cfbb498adc(props) {
|
|
|
1500
1562
|
return $52FdA$depictaiutilishared.standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1501
1563
|
});
|
|
1502
1564
|
}
|
|
1503
|
-
var $
|
|
1504
|
-
$
|
|
1505
|
-
$
|
|
1506
|
-
$
|
|
1507
|
-
function $
|
|
1565
|
+
var $53dca9b7b01789b1$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=img-wrapper>`),
|
|
1566
|
+
$53dca9b7b01789b1$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<span class="d-price original">`),
|
|
1567
|
+
$53dca9b7b01789b1$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=right-part><div class=text-container><span class="d-title line-clamp"></span><span class=d-price></span><!$><!/></div><!$><!/>`),
|
|
1568
|
+
$53dca9b7b01789b1$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<a class=look-item><!$><!/><!$><!/>`);
|
|
1569
|
+
function $53dca9b7b01789b1$export$b73ed90f0ee50dc3(_ref) {
|
|
1508
1570
|
let {
|
|
1509
1571
|
display_: display_,
|
|
1510
1572
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1546,7 +1608,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1546
1608
|
return (_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title;
|
|
1547
1609
|
});
|
|
1548
1610
|
return (() => {
|
|
1549
|
-
var _el$ = $52FdA$solidjsweb.getNextElement($
|
|
1611
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($53dca9b7b01789b1$var$_tmpl$4),
|
|
1550
1612
|
_el$12 = _el$.firstChild,
|
|
1551
1613
|
[_el$13, _co$3] = $52FdA$solidjsweb.getNextMarker(_el$12.nextSibling),
|
|
1552
1614
|
_el$14 = _el$13.nextSibling,
|
|
@@ -1579,7 +1641,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1579
1641
|
});
|
|
1580
1642
|
},
|
|
1581
1643
|
get children() {
|
|
1582
|
-
var _el$2 = $52FdA$solidjsweb.getNextElement($
|
|
1644
|
+
var _el$2 = $52FdA$solidjsweb.getNextElement($53dca9b7b01789b1$var$_tmpl$);
|
|
1583
1645
|
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1584
1646
|
get when() {
|
|
1585
1647
|
return imageUrl();
|
|
@@ -1614,7 +1676,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1614
1676
|
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
|
|
1615
1677
|
},
|
|
1616
1678
|
get children() {
|
|
1617
|
-
var _el$3 = $52FdA$solidjsweb.getNextElement($
|
|
1679
|
+
var _el$3 = $52FdA$solidjsweb.getNextElement($53dca9b7b01789b1$var$_tmpl$3),
|
|
1618
1680
|
_el$4 = _el$3.firstChild,
|
|
1619
1681
|
_el$5 = _el$4.firstChild,
|
|
1620
1682
|
_el$6 = _el$5.nextSibling,
|
|
@@ -1698,7 +1760,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1698
1760
|
return isOnSale();
|
|
1699
1761
|
},
|
|
1700
1762
|
get children() {
|
|
1701
|
-
var _el$7 = $52FdA$solidjsweb.getNextElement($
|
|
1763
|
+
var _el$7 = $52FdA$solidjsweb.getNextElement($53dca9b7b01789b1$var$_tmpl$2);
|
|
1702
1764
|
$52FdA$solidjsweb.insert(_el$7, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1703
1765
|
get when() {
|
|
1704
1766
|
return variantToUse() && !originalPrice.loading;
|
|
@@ -1797,8 +1859,8 @@ async function $b5e1e9638abb90ff$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1797
1859
|
}
|
|
1798
1860
|
return isAffected;
|
|
1799
1861
|
}
|
|
1800
|
-
var $
|
|
1801
|
-
function $
|
|
1862
|
+
var $1709366c442d8933$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=scroll-padding><div class=look-overlay>`);
|
|
1863
|
+
function $1709366c442d8933$export$ebf0b1d4f90c09ae(_ref) {
|
|
1802
1864
|
let {
|
|
1803
1865
|
displays_: displays_,
|
|
1804
1866
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1818,6 +1880,7 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1818
1880
|
const textFadeInAnimationRunning = $52FdA$solidjs.createSignal(false);
|
|
1819
1881
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1820
1882
|
const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
|
|
1883
|
+
//const elementsHovered = useMobileHover();
|
|
1821
1884
|
$b5e1e9638abb90ff$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1822
1885
|
return $52FdA$solidjsweb.createComponent((0, $d067f3a30f047b41$export$e68cff63f76bd15b), {
|
|
1823
1886
|
get children() {
|
|
@@ -1826,21 +1889,37 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1826
1889
|
return containerWidth_() || !displays_();
|
|
1827
1890
|
},
|
|
1828
1891
|
get children() {
|
|
1829
|
-
var _el$ = $52FdA$solidjsweb.getNextElement($
|
|
1892
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($1709366c442d8933$var$_tmpl$),
|
|
1830
1893
|
_el$2 = _el$.firstChild;
|
|
1831
1894
|
$52FdA$solidjsweb.addEventListener(_el$2, "mouseleave", $52FdA$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(false)));
|
|
1832
1895
|
$52FdA$solidjsweb.addEventListener(_el$2, "mouseenter", $52FdA$depictaiutilishared.catchify(() => supportsHover_() && setUserWantsExpanded(true)));
|
|
1833
|
-
$52FdA$solidjsweb.use(el =>
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1896
|
+
$52FdA$solidjsweb.use(el => {
|
|
1897
|
+
$52FdA$solidjs.createEffect(() => {
|
|
1898
|
+
if (userWantsExpanded()) return;
|
|
1899
|
+
if (isAffectedByChromeBug) {
|
|
1900
|
+
$1709366c442d8933$var$scrollingFunctionForChrome(el, 0, animationDuration_);
|
|
1901
|
+
return;
|
|
1902
|
+
}
|
|
1903
|
+
el.scrollTo({
|
|
1904
|
+
top: 0,
|
|
1905
|
+
behavior: "smooth"
|
|
1906
|
+
});
|
|
1842
1907
|
});
|
|
1843
|
-
|
|
1908
|
+
// createEffect(wasOpenedByHover => {
|
|
1909
|
+
// if (supportsHover_()) return;
|
|
1910
|
+
// const hovered = elementsHovered();
|
|
1911
|
+
// checkHovered: {
|
|
1912
|
+
// if (hovered.has(el)) break checkHovered;
|
|
1913
|
+
// for (const element of hovered) {
|
|
1914
|
+
// if (el.contains(element)) break checkHovered;
|
|
1915
|
+
// }
|
|
1916
|
+
// if (wasOpenedByHover) setUserWantsExpanded(false);
|
|
1917
|
+
// return;
|
|
1918
|
+
// }
|
|
1919
|
+
// setUserWantsExpanded(true);
|
|
1920
|
+
// return true;
|
|
1921
|
+
// });
|
|
1922
|
+
}, _el$2);
|
|
1844
1923
|
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Index), {
|
|
1845
1924
|
get each() {
|
|
1846
1925
|
return displays_() || Array.from({
|
|
@@ -1848,7 +1927,7 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1848
1927
|
});
|
|
1849
1928
|
},
|
|
1850
1929
|
children: (display, index) => {
|
|
1851
|
-
return $52FdA$solidjsweb.createComponent((0, $
|
|
1930
|
+
return $52FdA$solidjsweb.createComponent((0, $53dca9b7b01789b1$export$b73ed90f0ee50dc3), {
|
|
1852
1931
|
pseudoRouter_: pseudoRouter_,
|
|
1853
1932
|
animationDuration_: animationDuration_,
|
|
1854
1933
|
display_: display,
|
|
@@ -1889,7 +1968,7 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1889
1968
|
/**
|
|
1890
1969
|
* Workaround for Chrome bug 326498383, adapted version of https://stackoverflow.com/a/39494245
|
|
1891
1970
|
*/
|
|
1892
|
-
function $
|
|
1971
|
+
function $1709366c442d8933$var$scrollingFunctionForChrome(element, targetScrollY, duration) {
|
|
1893
1972
|
let start;
|
|
1894
1973
|
const startingY = element.scrollTop;
|
|
1895
1974
|
const diff = targetScrollY - startingY;
|
|
@@ -1906,8 +1985,8 @@ function $e0b3f1f332b6863b$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1906
1985
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1907
1986
|
requestAnimationFrame(step);
|
|
1908
1987
|
}
|
|
1909
|
-
var $
|
|
1910
|
-
function $
|
|
1988
|
+
var $ae325261371de459$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=look-card><!$><!/><!$><!/>`);
|
|
1989
|
+
function $ae325261371de459$export$44809a8a3e867e30(_ref) {
|
|
1911
1990
|
let {
|
|
1912
1991
|
display_: display_,
|
|
1913
1992
|
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
@@ -1967,7 +2046,7 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
|
|
|
1967
2046
|
// Close us if another look expands
|
|
1968
2047
|
$52FdA$solidjs.createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1969
2048
|
return (() => {
|
|
1970
|
-
var _el$ = $52FdA$solidjsweb.getNextElement($
|
|
2049
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($ae325261371de459$var$_tmpl$),
|
|
1971
2050
|
_el$2 = _el$.firstChild,
|
|
1972
2051
|
[_el$3, _co$] = $52FdA$solidjsweb.getNextMarker(_el$2.nextSibling),
|
|
1973
2052
|
_el$4 = _el$3.nextSibling,
|
|
@@ -2008,7 +2087,7 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
|
|
|
2008
2087
|
});
|
|
2009
2088
|
}
|
|
2010
2089
|
}), _el$3, _co$);
|
|
2011
|
-
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $
|
|
2090
|
+
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $1709366c442d8933$export$ebf0b1d4f90c09ae), {
|
|
2012
2091
|
displays_: () => {
|
|
2013
2092
|
var _display_2;
|
|
2014
2093
|
return (_display_2 = display_()) === null || _display_2 === void 0 ? void 0 : _display_2.displays;
|
|
@@ -2308,7 +2387,7 @@ function $e57cd46536ad992e$export$2c9f9bf2092486aa(props) {
|
|
|
2308
2387
|
return $e57cd46536ad992e$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
2309
2388
|
});
|
|
2310
2389
|
const sharedOptions = {
|
|
2311
|
-
product_card_template_: display => $
|
|
2390
|
+
product_card_template_: display => $ae325261371de459$export$44809a8a3e867e30({
|
|
2312
2391
|
display_: () => display,
|
|
2313
2392
|
FavoriteButton_: props.FavoriteButton_,
|
|
2314
2393
|
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
@@ -3008,7 +3087,7 @@ function $ca262da429af47ea$export$a146ac6fa8346a25(_ref) {
|
|
|
3008
3087
|
ev.preventDefault();
|
|
3009
3088
|
submit_query_(item());
|
|
3010
3089
|
})), _el$4);
|
|
3011
|
-
$52FdA$solidjsweb.addEventListener(_el$4, "mouseleave", $52FdA$depictaiutilishared.catchify(() => write_selected_index_(
|
|
3090
|
+
$52FdA$solidjsweb.addEventListener(_el$4, "mouseleave", $52FdA$depictaiutilishared.catchify(() => write_selected_index_()));
|
|
3012
3091
|
$52FdA$solidjsweb.addEventListener(_el$4, "mouseenter", $52FdA$depictaiutilishared.catchify(() => write_selected_index_([0, index])));
|
|
3013
3092
|
$52FdA$solidjsweb.insert(_el$5, $52FdA$solidjsweb.createComponent((0, $8767e7eba5066d2b$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
3014
3093
|
$52FdA$solidjsweb.insert(_el$6, item);
|
|
@@ -4578,7 +4657,7 @@ function $a68b73fd7ba0853f$export$916e6850778505f6(search_params, filter_query_p
|
|
|
4578
4657
|
const keys = [...search_params.keys()];
|
|
4579
4658
|
for (const key of keys) if (key.startsWith(filter_query_param_prefix) || key === sorting_query_param || key.startsWith($a68b73fd7ba0853f$var$legacy_filter_prefix)) search_params.delete(key);
|
|
4580
4659
|
}
|
|
4581
|
-
const $a68b73fd7ba0853f$export$
|
|
4660
|
+
const $a68b73fd7ba0853f$export$84daa4fa1471698b = "#went_sideways_clear_filters";
|
|
4582
4661
|
function $a68b73fd7ba0853f$export$43cd1e747fecd42e(_ref2) {
|
|
4583
4662
|
let {
|
|
4584
4663
|
to_url_: to_url_,
|
|
@@ -4593,9 +4672,13 @@ function $a68b73fd7ba0853f$export$43cd1e747fecd42e(_ref2) {
|
|
|
4593
4672
|
const {
|
|
4594
4673
|
searchParams: searchParams
|
|
4595
4674
|
} = url_object;
|
|
4596
|
-
|
|
4675
|
+
let transferredAnyFilters = false;
|
|
4597
4676
|
if (from_search_params_.has(sorting_query_param_)) searchParams.set(sorting_query_param_, from_search_params_.get(sorting_query_param_));
|
|
4598
|
-
for (const key of from_search_params_.keys()) if (key.startsWith(filter_query_param_prefix_))
|
|
4677
|
+
for (const key of from_search_params_.keys()) if (key.startsWith(filter_query_param_prefix_)) {
|
|
4678
|
+
searchParams.set(key, from_search_params_.get(key));
|
|
4679
|
+
transferredAnyFilters = true;
|
|
4680
|
+
}
|
|
4681
|
+
if (set_clearing_flag_ && transferredAnyFilters) url_object.hash = $a68b73fd7ba0853f$export$84daa4fa1471698b;
|
|
4599
4682
|
if (was_url_object) return url_object;
|
|
4600
4683
|
return url_object.href;
|
|
4601
4684
|
}
|
|
@@ -10480,7 +10563,8 @@ function $5dd9d0d3ea82e2dd$export$477caf01aecaeb2a(options) {
|
|
|
10480
10563
|
$52FdA$solidjs.onCleanup(() => (0, $52FdA$depictaiutilishared.instant_exec_on_suspect_history_change).delete(history_change_handler));
|
|
10481
10564
|
$52FdA$solidjs.createComputed(() => {
|
|
10482
10565
|
const {
|
|
10483
|
-
searchParams: searchParams
|
|
10566
|
+
searchParams: searchParams,
|
|
10567
|
+
hash: hash
|
|
10484
10568
|
} = new URL(get_current_href());
|
|
10485
10569
|
$52FdA$solidjs.batch(() => {
|
|
10486
10570
|
const found_sorting = $a68b73fd7ba0853f$export$766e9676e74997d3(searchParams, sorting_query_param_);
|
|
@@ -10518,7 +10602,7 @@ function $5dd9d0d3ea82e2dd$export$477caf01aecaeb2a(options) {
|
|
|
10518
10602
|
if (found_override_listing_id) $52FdA$depictaiutilishared.dlog("Found override query id:", found_override_listing_id); // This stuff might get confusing so better log it
|
|
10519
10603
|
}
|
|
10520
10604
|
|
|
10521
|
-
if (
|
|
10605
|
+
if (hash === (0, $a68b73fd7ba0853f$export$84daa4fa1471698b)) set_has_sideways_filter_clearing_flag(true);
|
|
10522
10606
|
if (!writer_started) {
|
|
10523
10607
|
// 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
|
|
10524
10608
|
$52FdA$solidjs.runWithOwner(owner, () => $5dd9d0d3ea82e2dd$var$start_href_writer({
|
|
@@ -10561,24 +10645,24 @@ function $5dd9d0d3ea82e2dd$var$start_href_writer(_ref3) {
|
|
|
10561
10645
|
} = _ref3;
|
|
10562
10646
|
$52FdA$solidjs.createEffect($52FdA$solidjs.on([get_sorting_, get_selected_filters_, get_has_sideways_filter_clearing_flag_], _ref4 => {
|
|
10563
10647
|
let [sorting, filters, has_sideways_filter_clearing_flag] = _ref4;
|
|
10564
|
-
const
|
|
10565
|
-
const
|
|
10648
|
+
const url_object = new URL(location.href);
|
|
10649
|
+
const unmodified_search_params = [...url_object.searchParams];
|
|
10650
|
+
const unmodified_hash = url_object.hash;
|
|
10566
10651
|
const {
|
|
10567
10652
|
searchParams: searchParams
|
|
10568
10653
|
} = url_object;
|
|
10569
10654
|
$a68b73fd7ba0853f$export$916e6850778505f6(searchParams, filter_query_param_prefix_, sorting_query_param_);
|
|
10570
10655
|
$a68b73fd7ba0853f$export$62acb285a7579555(sorting, searchParams, sorting_query_param_);
|
|
10571
10656
|
$a68b73fd7ba0853f$export$58aa3f171519b6d7(filters, searchParams, filter_query_param_prefix_);
|
|
10572
|
-
if (!has_sideways_filter_clearing_flag) $5dd9d0d3ea82e2dd$var$delete_sideways_param_flag(
|
|
10657
|
+
if (!has_sideways_filter_clearing_flag) $5dd9d0d3ea82e2dd$var$delete_sideways_param_flag(url_object);
|
|
10573
10658
|
// 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
|
|
10574
|
-
const unmodified_search_params = [...new URL(current_href).searchParams];
|
|
10575
10659
|
const new_search_params = [...searchParams];
|
|
10576
10660
|
// 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
|
|
10577
10661
|
const new_search_params_map = new Map(new_search_params);
|
|
10578
10662
|
if (unmodified_search_params.length !== new_search_params.length || !unmodified_search_params.every(_ref5 => {
|
|
10579
10663
|
let [key, value] = _ref5;
|
|
10580
10664
|
return new_search_params_map.get(key) === value;
|
|
10581
|
-
}))
|
|
10665
|
+
}) || unmodified_hash !== url_object.hash)
|
|
10582
10666
|
// Only update URL if it actually changed
|
|
10583
10667
|
router_.navigate_.go_to_({
|
|
10584
10668
|
is_replace_: true,
|
|
@@ -10590,8 +10674,8 @@ function $5dd9d0d3ea82e2dd$var$start_href_writer(_ref3) {
|
|
|
10590
10674
|
defer: true
|
|
10591
10675
|
}));
|
|
10592
10676
|
}
|
|
10593
|
-
function $5dd9d0d3ea82e2dd$var$delete_sideways_param_flag(
|
|
10594
|
-
if (
|
|
10677
|
+
function $5dd9d0d3ea82e2dd$var$delete_sideways_param_flag(url_object) {
|
|
10678
|
+
if (url_object.hash === (0, $a68b73fd7ba0853f$export$84daa4fa1471698b)) url_object.hash = "";
|
|
10595
10679
|
}
|
|
10596
10680
|
function $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
10597
10681
|
$9cbefc32b9dab36d$var$_checkPrivateRedeclaration(obj, privateMap);
|
package/ES10/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
|
*/
|