@depict-ai/ui 4.0.18 → 4.0.20

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 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.18";
98
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.20";
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 = 402.67;
2825
- const $d1e7b96fb13cd1d3$var$aspectRatioHeightComponent = 203.64;
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", "1.977362011392654");
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=depict-search-modal-backdrop>`),
3609
- $43600b30502feeda$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal><div class=body><!$><!/><div class=padded></div><div class=discover-more><button class=major type=button></button></div></div><!$><!/>`),
3610
- $43600b30502feeda$var$_tmpl$6 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=left>`),
3611
- $43600b30502feeda$var$_tmpl$7 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=right>`),
3612
- $43600b30502feeda$var$_tmpl$8 = /*#__PURE__*/$52FdA$solidjsweb.template(`<b>`);
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$7 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$4);
3964
- $52FdA$solidjsweb.addEventListener(_el$7, "click", close_modal_, true);
3965
- $52FdA$solidjsweb.effect(_$p => $52FdA$solidjsweb.classList(_el$7, {
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$7;
3985
+ return _el$10;
3970
3986
  })(), (() => {
3971
- var _el$8 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$5),
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$15 = _el$9.nextSibling,
3979
- [_el$16, _co$3] = $52FdA$solidjsweb.getNextMarker(_el$15.nextSibling);
3980
- $52FdA$solidjsweb.addEventListener(_el$8, "click", $52FdA$depictaiutilishared.catchify(_ref3 => {
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$9);
3993
- $52FdA$solidjsweb.insert(_el$9, search_field, _el$14, _co$2);
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$17 = $52FdA$solidjsweb.getNextElement($43600b30502feeda$var$_tmpl$6);
4008
- $52FdA$solidjsweb.insert(_el$17, renderedTextSuggestions);
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$10);
4017
- $52FdA$solidjsweb.addEventListener(_el$12, "click", $52FdA$depictaiutilishared.catchify(() => submit_query_()), true);
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$16, _co$3);
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$8.classList.toggle("stacked", _p$.e = _v$);
4036
- _p$.t = $52FdA$solidjsweb.classList(_el$9, _v$2, _p$.t);
4037
- _v$3 !== _p$.a && _el$10.classList.toggle("no-results", _p$.a = _v$3);
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$8;
4051
+ return _el$11;
4046
4052
  })()];
4047
4053
  }
4048
4054
  })];
@@ -13615,6 +13621,69 @@ function $eab939d0b95b75ee$var$make_state_saved_rows(_ref2, i18n_) {
13615
13621
  }));
13616
13622
  return rows;
13617
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
+ }
13618
13687
  var $a60bc7692ce52705$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search">`);
13619
13688
  function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
13620
13689
  let {
@@ -13629,7 +13698,15 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
13629
13698
  } = _ref;
13630
13699
  return $52FdA$solidjs.createRoot(dispose => {
13631
13700
  const [innerWidthReactive, setInnerWidthReactive] = $52FdA$solidjs.createSignal(innerWidth);
13632
- const resizeObserver = new ResizeObserver(records => setInnerWidthReactive(records.at(-1).contentRect.width));
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
+ });
13633
13710
  const {
13634
13711
  left: left,
13635
13712
  top: top,
@@ -13662,6 +13739,12 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
13662
13739
  zIndex: +zIndexOfFake + 1
13663
13740
  } : {})
13664
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
+ });
13665
13748
  const pxOffCenter = Math.abs($52FdA$solidjs.untrack(innerWidthReactive) / 2 - (left + width / 2));
13666
13749
  const openDuration_ = pxOffCenter > 100 ? 250 : 125; // faster animations if little left-right movement
13667
13750
  const closeDuration_ = pxOffCenter > 100 ? 150 : 100;
@@ -13695,7 +13778,10 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
13695
13778
  Object.assign(addedToBody.style, {
13696
13779
  // This is left: 50%, transform: translateX(-50) with extra steps but when using it safari and firefox glitch out like crazy
13697
13780
  left: "".concat(innerWidthReactive() / 2 - inModalFieldWidth() / 2, "px"),
13698
- width: inModalFieldWidthPx()
13781
+ width: inModalFieldWidthPx(),
13782
+ // 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.
13783
+ // 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…
13784
+ top: absoluteFieldTop() + "px"
13699
13785
  });
13700
13786
  // We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
13701
13787
  setPollAlignment_(true);
@@ -13713,7 +13799,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
13713
13799
  clearTimeout(disableResizePollingTimeout);
13714
13800
  setPollAlignment_(false);
13715
13801
  });
13716
- $a60bc7692ce52705$export$e06dee46ebe7faa9({
13802
+ $ce2f7ec02a8f2173$export$e06dee46ebe7faa9({
13717
13803
  setBackdropStyle_: setBackdropStyle_,
13718
13804
  setBodyAlignment_: setBodyAlignment_,
13719
13805
  openDuration_: openDuration_
@@ -13727,7 +13813,7 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
13727
13813
  width: width,
13728
13814
  left: left
13729
13815
  } = fakeField.getBoundingClientRect();
13730
- $a60bc7692ce52705$export$23d40cc5971c3acd({
13816
+ $ce2f7ec02a8f2173$export$23d40cc5971c3acd({
13731
13817
  setBackdropStyle_: setBackdropStyle_,
13732
13818
  setBodyAlignment_: setBodyAlignment_,
13733
13819
  closeDuration_: closeDuration_
@@ -13756,69 +13842,6 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
13756
13842
  };
13757
13843
  });
13758
13844
  }
13759
- function $a60bc7692ce52705$export$e06dee46ebe7faa9(_ref2) {
13760
- let {
13761
- setBackdropStyle_: setBackdropStyle_,
13762
- setBodyAlignment_: setBodyAlignment_,
13763
- openDuration_: openDuration_
13764
- } = _ref2;
13765
- setBackdropStyle_(prev => ({
13766
- ...prev,
13767
- opacity: 0,
13768
- transition: "opacity ".concat(openDuration_, "ms ease-in")
13769
- }));
13770
- requestAnimationFrame(() => setBackdropStyle_(prev => ({
13771
- ...prev,
13772
- opacity: 1
13773
- })));
13774
- setBodyAlignment_(prev => ({
13775
- ...prev,
13776
- opacity: 0,
13777
- transition: "opacity ".concat(openDuration_, "ms ease-in ").concat(openDuration_ / 5, "ms"),
13778
- // Add a slight delay so the brightness of the modal isn't so jarring before the background has gotten darkened
13779
- "--js-animation-duration": "".concat(openDuration_, "ms")
13780
- }));
13781
- requestAnimationFrame(() => setBodyAlignment_(prev => ({
13782
- ...prev,
13783
- opacity: 1
13784
- })));
13785
- }
13786
- function $a60bc7692ce52705$export$23d40cc5971c3acd(_ref3) {
13787
- let {
13788
- setBackdropStyle_: setBackdropStyle_,
13789
- setBodyAlignment_: setBodyAlignment_,
13790
- closeDuration_: closeDuration_
13791
- } = _ref3;
13792
- setBackdropStyle_(prev => ({
13793
- ...prev,
13794
- opacity: 0,
13795
- transition: "opacity ".concat(closeDuration_, "ms ease-out")
13796
- }));
13797
- setBodyAlignment_(prev => ({
13798
- ...prev,
13799
- opacity: 0,
13800
- transition: "opacity ".concat(closeDuration_, "ms ease-out")
13801
- }));
13802
- }
13803
- function $a60bc7692ce52705$export$dab9321f3c157061(alignmentSignals, modalVersion) {
13804
- const [, setBodyAlignment_] = alignmentSignals.body_;
13805
- const [, setBackdropStyle_] = alignmentSignals.backdrop_ || $52FdA$solidjs.createSignal({});
13806
- // For default centered modal, also run our fading animations if search modal v2
13807
- modalVersion === 2 && $a60bc7692ce52705$export$e06dee46ebe7faa9({
13808
- openDuration_: 125,
13809
- setBodyAlignment_: setBodyAlignment_,
13810
- setBackdropStyle_: setBackdropStyle_
13811
- });
13812
- const closingAnimation = modalVersion === 2 ? async () => {
13813
- $a60bc7692ce52705$export$23d40cc5971c3acd({
13814
- closeDuration_: 100,
13815
- setBodyAlignment_: setBodyAlignment_,
13816
- setBackdropStyle_: setBackdropStyle_
13817
- });
13818
- await new Promise(r => setTimeout(r, 100));
13819
- } : undefined;
13820
- return closingAnimation;
13821
- }
13822
13845
  var $739c927cbecd26b0$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
13823
13846
  $739c927cbecd26b0$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search"><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
13824
13847
  function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
@@ -14547,7 +14570,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
14547
14570
  if (!((_ = open_signal_value[0]) !== null && _ !== void 0 && _.alignmentSignals_) && search_page_aligned_modal_alignment_signals_) {
14548
14571
  // Open modal aligned with search page if no alignment specified and possible to align with search page
14549
14572
  const [options_arg, ...rest] = open_signal_value === true ? [{}] : open_signal_value;
14550
- const closingAnimation = $a60bc7692ce52705$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
14573
+ const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(search_page_aligned_modal_alignment_signals_, modalVersion);
14551
14574
  open_modal_({
14552
14575
  closing_animation_: closingAnimation,
14553
14576
  ...options_arg,
@@ -14557,7 +14580,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
14557
14580
  }
14558
14581
  // Open centered modal
14559
14582
  const centeredModalAlignmentSignals = $996102a9349df6d7$export$41b4894022a3580f();
14560
- const closingAnimation = $a60bc7692ce52705$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
14583
+ const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(centeredModalAlignmentSignals, modalVersion);
14561
14584
  if (signal_value_is_options) {
14562
14585
  const [options_arg, ...rest] = open_signal_value;
14563
14586
  open_modal_({
@@ -14811,7 +14834,7 @@ const $a24cfef36ef12dc5$export$d86a33413558014e = openModalParams => {
14811
14834
  field_: $52FdA$solidjs.createSignal({}),
14812
14835
  backdrop_: $52FdA$solidjs.createSignal({})
14813
14836
  };
14814
- const closingAnimation = $a60bc7692ce52705$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
14837
+ const closingAnimation = $ce2f7ec02a8f2173$export$dab9321f3c157061(alignmentSignals_, openModalParams.runAnimations_ ? 2 : 1);
14815
14838
  $52FdA$solidjs.createRoot(dispose => {
14816
14839
  dispose_aligner = () => {
14817
14840
  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.18";
13
+ export const version = "4.0.20";
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
  */
@@ -1211,7 +1211,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1211
1211
  on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
1212
1212
  content_blocks_by_row?: ContentBlocksByRow;
1213
1213
  layout?: PossibleLayout;
1214
- }): import("@depict-ai/utilishared").Node_Array;
1214
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1215
1215
  export function BreadCrumbs<T extends Display>({
1216
1216
  depict_category
1217
1217
  }: {
@@ -1351,7 +1351,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1351
1351
  * Open the modal with support for alignment.
1352
1352
  * @returns {void}
1353
1353
  */
1354
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1354
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1355
1355
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1356
1356
  export interface PageReplacer {
1357
1357
  readonly render_: () => Node_Array;