@depict-ai/ui 4.0.17 → 4.0.19
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 +145 -120
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +145 -120
- package/latest/index.cjs +143 -118
- package/latest/index.d.ts +1 -1
- package/latest/index.js +143 -118
- package/package.json +2 -2
- package/server/ES10/index.cjs +97 -77
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +97 -77
- package/server/latest/index.cjs +95 -75
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +95 -75
package/ES10/index.cjs
CHANGED
|
@@ -95,7 +95,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
95
95
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
96
96
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
97
97
|
/*! Depict.ai search and product listing SDK */
|
|
98
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.
|
|
98
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.19";
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -2821,8 +2821,8 @@ function $317500f39819fba6$export$9ca09caa9c849d9c() {
|
|
|
2821
2821
|
var $d1e7b96fb13cd1d3$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<a>`),
|
|
2822
2822
|
$d1e7b96fb13cd1d3$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=listing-card><div class=image-part></div><!$><!/><h3 class=title>`),
|
|
2823
2823
|
$d1e7b96fb13cd1d3$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=empty-image>`);
|
|
2824
|
-
const $d1e7b96fb13cd1d3$var$aspectRatioWidthComponent =
|
|
2825
|
-
const $d1e7b96fb13cd1d3$var$aspectRatioHeightComponent =
|
|
2824
|
+
const $d1e7b96fb13cd1d3$var$aspectRatioWidthComponent = 400;
|
|
2825
|
+
const $d1e7b96fb13cd1d3$var$aspectRatioHeightComponent = 200;
|
|
2826
2826
|
const $d1e7b96fb13cd1d3$var$listingSuggestionCollageAspectRatio = $d1e7b96fb13cd1d3$var$aspectRatioWidthComponent / $d1e7b96fb13cd1d3$var$aspectRatioHeightComponent;
|
|
2827
2827
|
function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
2828
2828
|
let {
|
|
@@ -2984,7 +2984,7 @@ function $d1e7b96fb13cd1d3$export$ea41102db9bd68c3(_ref3) {
|
|
|
2984
2984
|
function $d1e7b96fb13cd1d3$var$EmptyImage() {
|
|
2985
2985
|
return (() => {
|
|
2986
2986
|
var _el$7 = $52FdA$solidjsweb.getNextElement($d1e7b96fb13cd1d3$var$_tmpl$3);
|
|
2987
|
-
_el$7.style.setProperty("aspect-ratio", "
|
|
2987
|
+
_el$7.style.setProperty("aspect-ratio", "2");
|
|
2988
2988
|
$52FdA$solidjsweb.insert(_el$7, $52FdA$solidjsweb.createComponent((0, $317500f39819fba6$export$9ca09caa9c849d9c), {}));
|
|
2989
2989
|
return _el$7;
|
|
2990
2990
|
})();
|
|
@@ -3605,11 +3605,12 @@ function $58ffab03481f8973$export$66d1697a0f27069c(modalLayoutStacked) {
|
|
|
3605
3605
|
var $43600b30502feeda$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=instant-results-wrapper><h2></h2><!$><!/>`),
|
|
3606
3606
|
$43600b30502feeda$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div>`),
|
|
3607
3607
|
$43600b30502feeda$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<dialog>`),
|
|
3608
|
-
$43600b30502feeda$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=
|
|
3609
|
-
$43600b30502feeda$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<
|
|
3610
|
-
$43600b30502feeda$var$_tmpl$6 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=
|
|
3611
|
-
$43600b30502feeda$var$_tmpl$7 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=
|
|
3612
|
-
$43600b30502feeda$var$_tmpl$8 = /*#__PURE__*/$52FdA$solidjsweb.template(`<
|
|
3608
|
+
$43600b30502feeda$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
3609
|
+
$43600b30502feeda$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<b>`),
|
|
3610
|
+
$43600b30502feeda$var$_tmpl$6 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal-backdrop>`),
|
|
3611
|
+
$43600b30502feeda$var$_tmpl$7 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal><div class=body><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
3612
|
+
$43600b30502feeda$var$_tmpl$8 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=left>`),
|
|
3613
|
+
$43600b30502feeda$var$_tmpl$9 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=right>`);
|
|
3613
3614
|
/**
|
|
3614
3615
|
* Second generation search modal - the solid component that gets added to <body> when the search modal is opened
|
|
3615
3616
|
*/
|
|
@@ -3911,6 +3912,21 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
3911
3912
|
return _el$6;
|
|
3912
3913
|
})();
|
|
3913
3914
|
};
|
|
3915
|
+
const discoverMoreSection = (() => {
|
|
3916
|
+
var _el$7 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$4),
|
|
3917
|
+
_el$8 = _el$7.firstChild;
|
|
3918
|
+
$52FdA$solidjsweb.addEventListener(_el$8, "click", $52FdA$depictaiutilishared.catchify(() => submit_query_()), true);
|
|
3919
|
+
$52FdA$solidjsweb.insert(_el$8, (() => {
|
|
3920
|
+
var _c$ = $52FdA$solidjsweb.memo(() => !!get_search_field_value_());
|
|
3921
|
+
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
3922
|
+
var _el$9 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$5);
|
|
3923
|
+
$52FdA$solidjsweb.insert(_el$9, formattedTotalNumberResults);
|
|
3924
|
+
return _el$9;
|
|
3925
|
+
})()) : i18n_.modal_discover_more_();
|
|
3926
|
+
})());
|
|
3927
|
+
$52FdA$solidjsweb.runHydrationEvents();
|
|
3928
|
+
return _el$7;
|
|
3929
|
+
})();
|
|
3914
3930
|
const search_field = $29e5dbeb69da7a36$export$b94867ecbd698f21({
|
|
3915
3931
|
BackIcon_: () => $52FdA$solidjsweb.createComponent((0, $50b50df3efaa8776$export$11e9f390c90a537f), {}),
|
|
3916
3932
|
input_field_ref_: element => set_input_field(element),
|
|
@@ -3960,24 +3976,22 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
3960
3976
|
},
|
|
3961
3977
|
get children() {
|
|
3962
3978
|
return [(() => {
|
|
3963
|
-
var _el$
|
|
3964
|
-
$52FdA$solidjsweb.addEventListener(_el$
|
|
3965
|
-
$52FdA$solidjsweb.effect(_$p => $52FdA$solidjsweb.classList(_el$
|
|
3979
|
+
var _el$10 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$6);
|
|
3980
|
+
$52FdA$solidjsweb.addEventListener(_el$10, "click", close_modal_, true);
|
|
3981
|
+
$52FdA$solidjsweb.effect(_$p => $52FdA$solidjsweb.classList(_el$10, {
|
|
3966
3982
|
[backdropRandomClassname]: true
|
|
3967
3983
|
}, _$p));
|
|
3968
3984
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
3969
|
-
return _el$
|
|
3985
|
+
return _el$10;
|
|
3970
3986
|
})(), (() => {
|
|
3971
|
-
var _el$
|
|
3972
|
-
_el$9 = _el$8.firstChild,
|
|
3973
|
-
_el$13 = _el$9.firstChild,
|
|
3974
|
-
[_el$14, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$13.nextSibling),
|
|
3975
|
-
_el$10 = _el$14.nextSibling,
|
|
3976
|
-
_el$11 = _el$10.nextSibling,
|
|
3987
|
+
var _el$11 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$7),
|
|
3977
3988
|
_el$12 = _el$11.firstChild,
|
|
3978
|
-
_el$
|
|
3979
|
-
[_el$
|
|
3980
|
-
|
|
3989
|
+
_el$14 = _el$12.firstChild,
|
|
3990
|
+
[_el$15, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$14.nextSibling),
|
|
3991
|
+
_el$13 = _el$15.nextSibling,
|
|
3992
|
+
_el$16 = _el$12.nextSibling,
|
|
3993
|
+
[_el$17, _co$3] = $52FdA$solidjsweb.getNextMarker(_el$16.nextSibling);
|
|
3994
|
+
$52FdA$solidjsweb.addEventListener(_el$11, "click", $52FdA$depictaiutilishared.catchify(_ref3 => {
|
|
3981
3995
|
let {
|
|
3982
3996
|
target: target,
|
|
3983
3997
|
currentTarget: currentTarget
|
|
@@ -3989,10 +4003,11 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
3989
4003
|
const resizeObserver = new ResizeObserver($52FdA$depictaiutilishared.catchify(records => setModalBodyWidth(records.at(-1).contentRect.width)));
|
|
3990
4004
|
resizeObserver.observe(element);
|
|
3991
4005
|
$52FdA$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
3992
|
-
}, _el$
|
|
3993
|
-
$52FdA$solidjsweb.insert(_el$
|
|
4006
|
+
}, _el$12);
|
|
4007
|
+
$52FdA$solidjsweb.insert(_el$12, search_field, _el$15, _co$2);
|
|
3994
4008
|
$52FdA$solidjsweb.use(el => {
|
|
3995
|
-
$52FdA$depictaiutilishared.catchify((0, $246adc3df5966856$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_)
|
|
4009
|
+
$52FdA$depictaiutilishared.catchify((0, $246adc3df5966856$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_ || (() => 0.03 // 3% under SearchModalV2 by default
|
|
4010
|
+
));
|
|
3996
4011
|
// Workaround part 2 of https://github.com/solidjs/solid/issues/2030
|
|
3997
4012
|
// We can't just re-render the components in the two different <Show> branches because <Show> would infinite loop because it depends on the resource created by the components
|
|
3998
4013
|
// We could also lift out the createResource from InstantResults into this component, but this component is already huge.
|
|
@@ -4000,41 +4015,32 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
4000
4015
|
const showStackedDOM = $52FdA$solidjs.createMemo(() => modalLayoutStacked_() || noResults());
|
|
4001
4016
|
$52FdA$solidjs.createEffect(() => {
|
|
4002
4017
|
if (showStackedDOM()) {
|
|
4003
|
-
el.replaceChildren(...renderedTextSuggestions(), ...renderedVisualSuggestions());
|
|
4018
|
+
el.replaceChildren(...renderedTextSuggestions(), ...renderedVisualSuggestions(), discoverMoreSection);
|
|
4004
4019
|
return;
|
|
4005
4020
|
}
|
|
4006
4021
|
el.replaceChildren(...[(() => {
|
|
4007
|
-
var _el$
|
|
4008
|
-
$52FdA$solidjsweb.insert(_el$
|
|
4009
|
-
return _el$17;
|
|
4010
|
-
})(), (() => {
|
|
4011
|
-
var _el$18 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$7);
|
|
4012
|
-
$52FdA$solidjsweb.insert(_el$18, renderedVisualSuggestions);
|
|
4022
|
+
var _el$18 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$8);
|
|
4023
|
+
$52FdA$solidjsweb.insert(_el$18, renderedTextSuggestions);
|
|
4013
4024
|
return _el$18;
|
|
4014
|
-
})()
|
|
4025
|
+
})(), (() => {
|
|
4026
|
+
var _el$19 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$9);
|
|
4027
|
+
$52FdA$solidjsweb.insert(_el$19, renderedVisualSuggestions);
|
|
4028
|
+
return _el$19;
|
|
4029
|
+
})(), discoverMoreSection]);
|
|
4015
4030
|
});
|
|
4016
|
-
}, _el$
|
|
4017
|
-
$52FdA$solidjsweb.
|
|
4018
|
-
$52FdA$solidjsweb.insert(_el$12, (() => {
|
|
4019
|
-
var _c$ = $52FdA$solidjsweb.memo(() => !!get_search_field_value_());
|
|
4020
|
-
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
4021
|
-
var _el$19 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$8);
|
|
4022
|
-
$52FdA$solidjsweb.insert(_el$19, formattedTotalNumberResults);
|
|
4023
|
-
return _el$19;
|
|
4024
|
-
})()) : i18n_.modal_discover_more_();
|
|
4025
|
-
})());
|
|
4026
|
-
$52FdA$solidjsweb.insert(_el$8, $52FdA$solidjsweb.createComponent((0, $cc66bbf6e783bb58$export$f021bdedd3ec901a), {
|
|
4031
|
+
}, _el$13);
|
|
4032
|
+
$52FdA$solidjsweb.insert(_el$11, $52FdA$solidjsweb.createComponent((0, $cc66bbf6e783bb58$export$f021bdedd3ec901a), {
|
|
4027
4033
|
styles: mergedCssObject
|
|
4028
|
-
}), _el$
|
|
4034
|
+
}), _el$17, _co$3);
|
|
4029
4035
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
4030
4036
|
var _v$ = !!modalLayoutStacked_(),
|
|
4031
4037
|
_v$2 = {
|
|
4032
4038
|
[random_classname_body]: true
|
|
4033
4039
|
},
|
|
4034
4040
|
_v$3 = !!noResults();
|
|
4035
|
-
_v$ !== _p$.e && _el$
|
|
4036
|
-
_p$.t = $52FdA$solidjsweb.classList(_el$
|
|
4037
|
-
_v$3 !== _p$.a && _el$
|
|
4041
|
+
_v$ !== _p$.e && _el$11.classList.toggle("stacked", _p$.e = _v$);
|
|
4042
|
+
_p$.t = $52FdA$solidjsweb.classList(_el$12, _v$2, _p$.t);
|
|
4043
|
+
_v$3 !== _p$.a && _el$13.classList.toggle("no-results", _p$.a = _v$3);
|
|
4038
4044
|
return _p$;
|
|
4039
4045
|
}, {
|
|
4040
4046
|
e: undefined,
|
|
@@ -4042,7 +4048,7 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
4042
4048
|
a: undefined
|
|
4043
4049
|
});
|
|
4044
4050
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
4045
|
-
return _el$
|
|
4051
|
+
return _el$11;
|
|
4046
4052
|
})()];
|
|
4047
4053
|
}
|
|
4048
4054
|
})];
|
|
@@ -10534,7 +10540,8 @@ function $685149df41127abd$export$9bf11afa910f536e(_ref) {
|
|
|
10534
10540
|
background = el;
|
|
10535
10541
|
(0, $52FdA$depictaiutilishared.observer).wait_for_element(el).then($52FdA$depictaiutilishared.catchify(() => {
|
|
10536
10542
|
set_background_style("transition", "all 200ms ease-in");
|
|
10537
|
-
|
|
10543
|
+
// For some reason this needs a requestAnimationFrame but the other modal-opening animations don't
|
|
10544
|
+
requestAnimationFrame($52FdA$depictaiutilishared.catchify(() => set_background_style("opacity", "1")));
|
|
10538
10545
|
}));
|
|
10539
10546
|
}, _el$2);
|
|
10540
10547
|
$52FdA$solidjsweb.addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
@@ -13614,6 +13621,69 @@ function $eab939d0b95b75ee$var$make_state_saved_rows(_ref2, i18n_) {
|
|
|
13614
13621
|
}));
|
|
13615
13622
|
return rows;
|
|
13616
13623
|
}
|
|
13624
|
+
function $ce2f7ec02a8f2173$export$e06dee46ebe7faa9(_ref) {
|
|
13625
|
+
let {
|
|
13626
|
+
setBackdropStyle_: setBackdropStyle_,
|
|
13627
|
+
setBodyAlignment_: setBodyAlignment_,
|
|
13628
|
+
openDuration_: openDuration_
|
|
13629
|
+
} = _ref;
|
|
13630
|
+
setBackdropStyle_(prev => ({
|
|
13631
|
+
...prev,
|
|
13632
|
+
opacity: 0,
|
|
13633
|
+
transition: "opacity ".concat(openDuration_, "ms ease-in")
|
|
13634
|
+
}));
|
|
13635
|
+
requestAnimationFrame(() => setBackdropStyle_(prev => ({
|
|
13636
|
+
...prev,
|
|
13637
|
+
opacity: 1
|
|
13638
|
+
})));
|
|
13639
|
+
setBodyAlignment_(prev => ({
|
|
13640
|
+
...prev,
|
|
13641
|
+
opacity: 0,
|
|
13642
|
+
transition: "opacity ".concat(openDuration_, "ms ease-in ").concat(openDuration_ / 5, "ms"),
|
|
13643
|
+
// Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
|
|
13644
|
+
"--js-animation-duration": "".concat(openDuration_, "ms")
|
|
13645
|
+
}));
|
|
13646
|
+
requestAnimationFrame(() => setBodyAlignment_(prev => ({
|
|
13647
|
+
...prev,
|
|
13648
|
+
opacity: 1
|
|
13649
|
+
})));
|
|
13650
|
+
}
|
|
13651
|
+
function $ce2f7ec02a8f2173$export$23d40cc5971c3acd(_ref2) {
|
|
13652
|
+
let {
|
|
13653
|
+
setBackdropStyle_: setBackdropStyle_,
|
|
13654
|
+
setBodyAlignment_: setBodyAlignment_,
|
|
13655
|
+
closeDuration_: closeDuration_
|
|
13656
|
+
} = _ref2;
|
|
13657
|
+
setBackdropStyle_(prev => ({
|
|
13658
|
+
...prev,
|
|
13659
|
+
opacity: 0,
|
|
13660
|
+
transition: "opacity ".concat(closeDuration_, "ms ease-out")
|
|
13661
|
+
}));
|
|
13662
|
+
setBodyAlignment_(prev => ({
|
|
13663
|
+
...prev,
|
|
13664
|
+
opacity: 0,
|
|
13665
|
+
transition: "opacity ".concat(closeDuration_, "ms ease-out")
|
|
13666
|
+
}));
|
|
13667
|
+
}
|
|
13668
|
+
function $ce2f7ec02a8f2173$export$dab9321f3c157061(alignmentSignals, modalVersion) {
|
|
13669
|
+
const [, setBodyAlignment_] = alignmentSignals.body_;
|
|
13670
|
+
const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $52FdA$solidjs.createSignal({});
|
|
13671
|
+
// For default centered modal, also run our fading animations if search modal v2
|
|
13672
|
+
modalVersion === 2 && $ce2f7ec02a8f2173$export$e06dee46ebe7faa9({
|
|
13673
|
+
openDuration_: 125,
|
|
13674
|
+
setBodyAlignment_: setBodyAlignment_,
|
|
13675
|
+
setBackdropStyle_: setBackdropStyle_
|
|
13676
|
+
});
|
|
13677
|
+
const closingAnimation = modalVersion === 2 ? async () => {
|
|
13678
|
+
$ce2f7ec02a8f2173$export$23d40cc5971c3acd({
|
|
13679
|
+
closeDuration_: 100,
|
|
13680
|
+
setBodyAlignment_: setBodyAlignment_,
|
|
13681
|
+
setBackdropStyle_: setBackdropStyle_
|
|
13682
|
+
});
|
|
13683
|
+
await new Promise(r => setTimeout(r, 100));
|
|
13684
|
+
} : undefined;
|
|
13685
|
+
return closingAnimation;
|
|
13686
|
+
}
|
|
13617
13687
|
var $a60bc7692ce52705$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search">`);
|
|
13618
13688
|
function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
13619
13689
|
let {
|
|
@@ -13628,7 +13698,15 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13628
13698
|
} = _ref;
|
|
13629
13699
|
return $52FdA$solidjs.createRoot(dispose => {
|
|
13630
13700
|
const [innerWidthReactive, setInnerWidthReactive] = $52FdA$solidjs.createSignal(innerWidth);
|
|
13631
|
-
const
|
|
13701
|
+
const [innerHeightReactive, setInnerHeightReactive] = $52FdA$solidjs.createSignal(innerHeight);
|
|
13702
|
+
const resizeObserver = new ResizeObserver(records => {
|
|
13703
|
+
const {
|
|
13704
|
+
width: width,
|
|
13705
|
+
height: height
|
|
13706
|
+
} = records.at(-1).contentRect;
|
|
13707
|
+
setInnerWidthReactive(width);
|
|
13708
|
+
setInnerHeightReactive(height);
|
|
13709
|
+
});
|
|
13632
13710
|
const {
|
|
13633
13711
|
left: left,
|
|
13634
13712
|
top: top,
|
|
@@ -13661,6 +13739,13 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13661
13739
|
zIndex: +zIndexOfFake + 1
|
|
13662
13740
|
} : {})
|
|
13663
13741
|
});
|
|
13742
|
+
const absoluteFieldTop = $52FdA$solidjs.createMemo(() => {
|
|
13743
|
+
innerHeightReactive();
|
|
13744
|
+
innerWidthReactive();
|
|
13745
|
+
// This is very semi-scientific but I hope it works (seems to, albeit laggy see comment where this value gets used)
|
|
13746
|
+
return fakeField.getBoundingClientRect().top;
|
|
13747
|
+
});
|
|
13748
|
+
$52FdA$solidjs.createEffect(() => console.log("absoluteFieldTop", fakeField, absoluteFieldTop(), "changing", addedToBody));
|
|
13664
13749
|
const pxOffCenter = Math.abs($52FdA$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
|
|
13665
13750
|
const openDuration_ = pxOffCenter > 100 ? 250 : 125; // faster animations if little left-right movement
|
|
13666
13751
|
const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
|
|
@@ -13694,7 +13779,10 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13694
13779
|
Object.assign(addedToBody.style, {
|
|
13695
13780
|
// This is left: 50%, transform: translateX(-50) with extra steps but when using it safari and firefox glitch out like crazy
|
|
13696
13781
|
left: "".concat(innerWidthReactive() / 2 - inModalFieldWidth() / 2, "px"),
|
|
13697
|
-
width: inModalFieldWidthPx()
|
|
13782
|
+
width: inModalFieldWidthPx(),
|
|
13783
|
+
// Lord forgive me for this is laggy. Example: on preview browser when resizing the screen in both x and y direction at the sam time. But it's too hard to change the code now, so that it doesn't happen.
|
|
13784
|
+
// Basically we'd want one align_field running in only the y-axis on the field that's still in the DOM and another one in the x-axis on the fake field. Or something…
|
|
13785
|
+
top: absoluteFieldTop() + "px"
|
|
13698
13786
|
});
|
|
13699
13787
|
// We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
|
|
13700
13788
|
setPollAlignment_(true);
|
|
@@ -13712,7 +13800,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13712
13800
|
clearTimeout(disableResizePollingTimeout);
|
|
13713
13801
|
setPollAlignment_(false);
|
|
13714
13802
|
});
|
|
13715
|
-
$
|
|
13803
|
+
$ce2f7ec02a8f2173$export$e06dee46ebe7faa9({
|
|
13716
13804
|
setBackdropStyle_: setBackdropStyle_,
|
|
13717
13805
|
setBodyAlignment_: setBodyAlignment_,
|
|
13718
13806
|
openDuration_: openDuration_
|
|
@@ -13726,7 +13814,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13726
13814
|
width: width,
|
|
13727
13815
|
left: left
|
|
13728
13816
|
} = fakeField.getBoundingClientRect();
|
|
13729
|
-
$
|
|
13817
|
+
$ce2f7ec02a8f2173$export$23d40cc5971c3acd({
|
|
13730
13818
|
setBackdropStyle_: setBackdropStyle_,
|
|
13731
13819
|
setBodyAlignment_: setBodyAlignment_,
|
|
13732
13820
|
closeDuration_: closeDuration_
|
|
@@ -13755,69 +13843,6 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
13755
13843
|
};
|
|
13756
13844
|
});
|
|
13757
13845
|
}
|
|
13758
|
-
function $a60bc7692ce52705$export$e06dee46ebe7faa9(_ref2) {
|
|
13759
|
-
let {
|
|
13760
|
-
setBackdropStyle_: setBackdropStyle_,
|
|
13761
|
-
setBodyAlignment_: setBodyAlignment_,
|
|
13762
|
-
openDuration_: openDuration_
|
|
13763
|
-
} = _ref2;
|
|
13764
|
-
setBackdropStyle_(prev => ({
|
|
13765
|
-
...prev,
|
|
13766
|
-
opacity: 0,
|
|
13767
|
-
transition: "opacity ".concat(openDuration_, "ms ease-in")
|
|
13768
|
-
}));
|
|
13769
|
-
requestAnimationFrame(() => setBackdropStyle_(prev => ({
|
|
13770
|
-
...prev,
|
|
13771
|
-
opacity: 1
|
|
13772
|
-
})));
|
|
13773
|
-
setBodyAlignment_(prev => ({
|
|
13774
|
-
...prev,
|
|
13775
|
-
opacity: 0,
|
|
13776
|
-
transition: "opacity ".concat(openDuration_, "ms ease-in ").concat(openDuration_ / 5, "ms"),
|
|
13777
|
-
// Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
|
|
13778
|
-
"--js-animation-duration": "".concat(openDuration_, "ms")
|
|
13779
|
-
}));
|
|
13780
|
-
requestAnimationFrame(() => setBodyAlignment_(prev => ({
|
|
13781
|
-
...prev,
|
|
13782
|
-
opacity: 1
|
|
13783
|
-
})));
|
|
13784
|
-
}
|
|
13785
|
-
function $a60bc7692ce52705$export$23d40cc5971c3acd(_ref3) {
|
|
13786
|
-
let {
|
|
13787
|
-
setBackdropStyle_: setBackdropStyle_,
|
|
13788
|
-
setBodyAlignment_: setBodyAlignment_,
|
|
13789
|
-
closeDuration_: closeDuration_
|
|
13790
|
-
} = _ref3;
|
|
13791
|
-
setBackdropStyle_(prev => ({
|
|
13792
|
-
...prev,
|
|
13793
|
-
opacity: 0,
|
|
13794
|
-
transition: "opacity ".concat(closeDuration_, "ms ease-out")
|
|
13795
|
-
}));
|
|
13796
|
-
setBodyAlignment_(prev => ({
|
|
13797
|
-
...prev,
|
|
13798
|
-
opacity: 0,
|
|
13799
|
-
transition: "opacity ".concat(closeDuration_, "ms ease-out")
|
|
13800
|
-
}));
|
|
13801
|
-
}
|
|
13802
|
-
function $a60bc7692ce52705$export$dab9321f3c157061(alignmentSignals, modalVersion) {
|
|
13803
|
-
const [, setBodyAlignment_] = alignmentSignals.body_;
|
|
13804
|
-
const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $52FdA$solidjs.createSignal({});
|
|
13805
|
-
// For default centered modal, also run our fading animations if search modal v2
|
|
13806
|
-
modalVersion === 2 && $a60bc7692ce52705$export$e06dee46ebe7faa9({
|
|
13807
|
-
openDuration_: 125,
|
|
13808
|
-
setBodyAlignment_: setBodyAlignment_,
|
|
13809
|
-
setBackdropStyle_: setBackdropStyle_
|
|
13810
|
-
});
|
|
13811
|
-
const closingAnimation = modalVersion === 2 ? async () => {
|
|
13812
|
-
$a60bc7692ce52705$export$23d40cc5971c3acd({
|
|
13813
|
-
closeDuration_: 100,
|
|
13814
|
-
setBodyAlignment_: setBodyAlignment_,
|
|
13815
|
-
setBackdropStyle_: setBackdropStyle_
|
|
13816
|
-
});
|
|
13817
|
-
await new Promise(r => setTimeout(r, 100));
|
|
13818
|
-
} : undefined;
|
|
13819
|
-
return closingAnimation;
|
|
13820
|
-
}
|
|
13821
13846
|
var $739c927cbecd26b0$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
13822
13847
|
$739c927cbecd26b0$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search"><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
|
|
13823
13848
|
function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
@@ -14546,7 +14571,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
14546
14571
|
if (!((_ = open_signal_value[0]) !== null && _ !== void 0 && _.alignmentSignals_) && search_page_aligned_modal_alignment_signals_) {
|
|
14547
14572
|
// Open modal aligned with search page if no alignment specified and possible to align with search page
|
|
14548
14573
|
const [options_arg, ...rest] = open_signal_value === true ? [{}] : open_signal_value;
|
|
14549
|
-
const closingAnimation = $
|
|
14574
|
+
const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
|
|
14550
14575
|
open_modal_({
|
|
14551
14576
|
closing_animation_: closingAnimation,
|
|
14552
14577
|
...options_arg,
|
|
@@ -14556,7 +14581,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
14556
14581
|
}
|
|
14557
14582
|
// Open centered modal
|
|
14558
14583
|
const centeredModalAlignmentSignals = $996102a9349df6d7$export$41b4894022a3580f();
|
|
14559
|
-
const closingAnimation = $
|
|
14584
|
+
const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
|
|
14560
14585
|
if (signal_value_is_options) {
|
|
14561
14586
|
const [options_arg, ...rest] = open_signal_value;
|
|
14562
14587
|
open_modal_({
|
|
@@ -14810,7 +14835,7 @@ const $a24cfef36ef12dc5$export$d86a33413558014e = openModalParams => {
|
|
|
14810
14835
|
field_: $52FdA$solidjs.createSignal({}),
|
|
14811
14836
|
backdrop_: $52FdA$solidjs.createSignal({})
|
|
14812
14837
|
};
|
|
14813
|
-
const closingAnimation = $
|
|
14838
|
+
const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
|
|
14814
14839
|
$52FdA$solidjs.createRoot(dispose => {
|
|
14815
14840
|
dispose_aligner = () => {
|
|
14816
14841
|
var _cleanup;
|
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 _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.0.
|
|
13
|
+
export const version = "4.0.19";
|
|
14
14
|
/**
|
|
15
15
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
16
16
|
*/
|