@depict-ai/ui 4.7.7 → 4.7.9

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.
@@ -104,7 +104,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
104
104
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
105
105
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
106
106
  /*! Depict.ai search and product listing SDK */
107
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.7";
107
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.9";
108
108
  function $d6d51b09cb2116a6$export$5bad61ecde080b1f() {
109
109
  const {
110
110
  collapse: collapse,
@@ -687,23 +687,25 @@ function $9d19451330d04c3c$export$8be2714ec7f169ee() {
687
687
  }
688
688
  var $ad8ec7729fffeb9c$var$_tmpl$ = ["<div", ">", "</div>"],
689
689
  $ad8ec7729fffeb9c$var$_tmpl$2 = ["<div", ' class="depict-slider depict"><button aria-label="Scroll left" class="left d-navbutton" type="button">', '</button><button aria-label="Scroll right" class="right d-navbutton" type="button">', '</button><div class="sliding">', "</div></div>"];
690
- function $ad8ec7729fffeb9c$export$6649caad96ef8870(_ref) {
691
- let {
692
- children: children,
690
+ const $ad8ec7729fffeb9c$var$SlidableContext = /*@__PURE__*/$3hooq$solidjs.createContext();
691
+ function $ad8ec7729fffeb9c$export$6649caad96ef8870(props) {
692
+ const {
693
693
  slider_ref_: slider_ref_,
694
694
  faded_opacity_ = 0.7,
695
695
  mutation_plugins_ = [],
696
696
  disable_fading_: disable_fading_,
697
- arrow_width_: arrow_width_,
698
- arrow_height_: arrow_height_,
699
697
  snapAlign_: snapAlign_,
700
698
  fadingThreshold_ = 0.96
701
- } = _ref;
699
+ } = props;
702
700
  const [hasHydrated, setHasHydrated] = $3hooq$solidjs.createSignal(false);
703
701
  $3hooq$solidjs.createEffect(() => setHasHydrated(true));
704
702
  const MakeButton = () => $3hooq$solidjsweb.ssr($ad8ec7729fffeb9c$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $9d19451330d04c3c$export$8be2714ec7f169ee), {
705
- height_: arrow_height_,
706
- width_: arrow_width_
703
+ get height_() {
704
+ return props.arrow_height_;
705
+ },
706
+ get width_() {
707
+ return props.arrow_width_;
708
+ }
707
709
  })));
708
710
  // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
709
711
  // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
@@ -714,10 +716,11 @@ function $ad8ec7729fffeb9c$export$6649caad96ef8870(_ref) {
714
716
  return hasHydrated() && !(0, $3hooq$solidjsweb.isServer);
715
717
  },
716
718
  get fallback() {
717
- return $3hooq$solidjsweb.ssr($ad8ec7729fffeb9c$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(MakeButton, {})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(MakeButton, {})), $3hooq$solidjsweb.escape(children));
719
+ return $3hooq$solidjsweb.ssr($ad8ec7729fffeb9c$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(MakeButton, {})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(MakeButton, {})), $3hooq$solidjsweb.escape(props.children));
718
720
  },
719
721
  get children() {
720
722
  return (() => {
723
+ const [intersectionEntries_, setIntersectionEntries] = $3hooq$solidjs.createSignal([]);
721
724
  const fading_plugin = disable_fading_ ? undefined : $3hooq$depictaiutilishared.slider_fading_factory({
722
725
  threshold_: fadingThreshold_,
723
726
  faded_opacity_: faded_opacity_
@@ -730,9 +733,17 @@ function $ad8ec7729fffeb9c$export$6649caad96ef8870(_ref) {
730
733
  constructor_plugins: [$3hooq$depictaiutilishared.slider_snap_css(0, {
731
734
  align: snapAlign_
732
735
  }).constructor_plugin, ...(fading_plugin ? [fading_plugin.constructor_plugin] : [])],
733
- mutation_plugins: [...(fading_plugin ? [fading_plugin.mutation_plugin_] : []), ...mutation_plugins_]
736
+ mutation_plugins: [...(fading_plugin ? [fading_plugin.mutation_plugin_] : []), ...mutation_plugins_, entries => setIntersectionEntries(entries)]
734
737
  });
735
- $3hooq$solidjsweb.insert(slider.insert_here, children);
738
+ $3hooq$solidjsweb.insert(slider.insert_here, () => $3hooq$solidjsweb.createComponent($ad8ec7729fffeb9c$var$SlidableContext.Provider, {
739
+ value: {
740
+ slider_: slider,
741
+ intersectionEntries_: intersectionEntries_
742
+ },
743
+ get children() {
744
+ return props.children;
745
+ }
746
+ }));
736
747
  $3hooq$solidjs.onCleanup(() => slider.observer.disconnect());
737
748
  slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
738
749
  return slider.container;
@@ -740,6 +751,9 @@ function $ad8ec7729fffeb9c$export$6649caad96ef8870(_ref) {
740
751
  }
741
752
  });
742
753
  }
754
+ function $ad8ec7729fffeb9c$export$eaa625fb39439e37() {
755
+ return $3hooq$solidjs.useContext($ad8ec7729fffeb9c$var$SlidableContext);
756
+ }
743
757
  var $236a257ee52e5414$var$_tmpl$ = ["<h2", ' class="recs-title">', "</h2>"];
744
758
  function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
745
759
  let {
@@ -908,38 +922,6 @@ function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
908
922
  }).remove);
909
923
  return signal[0];
910
924
  }
911
-
912
- /** @jsxImportSource solid-js */
913
-
914
- function $c387d7f1d9fb66c0$export$ebdc3711f7e02ccd(what_to_watch) {
915
- const [width, setWidth] = $3hooq$solidjs.createSignal();
916
- const resizeObserver = new ResizeObserver($3hooq$depictaiutilishared.catchify(records => {
917
- for (let j = 0; j < records.length; j++) {
918
- var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
919
- const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
920
- setWidth(width);
921
- }
922
- }));
923
- // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
924
- // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
925
- const disconnect = (0, $3hooq$depictaiutilishared.observer).onexists(what_to_watch, _ref => {
926
- let {
927
- element: element
928
- } = _ref;
929
- return requestAnimationFrame($3hooq$depictaiutilishared.catchify(() => {
930
- const current_size = what_to_watch.getBoundingClientRect().width;
931
- if (current_size)
932
- // If element has size, set signal to that. ResizeObserver only triggers when the content is visible in some cases, but it might already have a size. This reduces size filter expanding animation jank in chrome.
933
- setWidth(current_size);
934
- resizeObserver.observe(element);
935
- }));
936
- });
937
- $3hooq$solidjs.onCleanup(() => {
938
- resizeObserver.disconnect();
939
- disconnect();
940
- });
941
- return width;
942
- }
943
925
  function $a7f7d416e6f61504$export$89c6019e4baa40b1(props) {
944
926
  const style = $3hooq$solidjs.createMemo(() => {
945
927
  const {
@@ -1078,9 +1060,10 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
1078
1060
  });
1079
1061
  // Batch idle callbacks so that MutationObserver can batch the resulting mutations better, so we don't lose tons of CPU time to MutationObservers doing lots of things for each image
1080
1062
  // Happened on singular, they have some weird observer (+we also have one but ours is at least 3x more efficient)
1081
- const executeWhenIdleBatched = fn => {
1063
+ const executeWhenIdleBatched = (fn, isSizesUpdate) => {
1082
1064
  if (typeof requestIdleCallback !== "function") return setTimeout(fn); // Old browsers don't get optimisation
1083
- if ($3hooq$solidjs.untrack(isPrioritisedImage)) return fn(); // If we're one of the first 8 images, execute the callbacks immediately
1065
+ if ((!isSizesUpdate || !sizeSetFastPath) && $3hooq$solidjs.untrack(isPrioritisedImage)) return fn(); // If we're one of the first 8 images, execute the callbacks immediately (improves lighthouse metrics)
1066
+ // unless we're just a `sizes` update after the initial sizes setting (this optimisation makes the looks animation a lot smoother on low-cpu devices)
1084
1067
  const existingStack = listingContext === null || listingContext === void 0 ? void 0 : listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol];
1085
1068
  if (existingStack) return existingStack.add(fn);
1086
1069
  const newStack = new Set([fn]);
@@ -1165,10 +1148,11 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
1165
1148
  // This greatly improves performance when loading (more) products
1166
1149
  // See https://depictaiworkspace.slack.com/archives/C05NJ0K3WRL/p1698220617663139
1167
1150
  timeoutSet = true; // Important to set timeoutSet before the call to executeWhenIdleBatched since if this is an important image executeWhenIdleBatched will execute fn immediately
1168
- executeWhenIdleBatched(handler);
1151
+ executeWhenIdleBatched(handler, true);
1169
1152
  });
1153
+ const dontLoadImageYet = $3hooq$solidjs.createMemo(() => !props.size() || !hasSetSize()); // Moving this condition into a memo saves us from re-setting src and srcset (expensive) if just props.size changes
1170
1154
  $3hooq$solidjs.createEffect(() => {
1171
- if (!props.size() || !hasSetSize()) return; // If size isn't known or set, don't assign src yet since it would cause the most low res image to load
1155
+ if (dontLoadImageYet()) return; // If size isn't known or set, don't assign src yet since it would cause the most low res image to load
1172
1156
  Object.assign(img, src_options());
1173
1157
  // Add to DOM once decoded to not require/block any paints before image has completed loading and avoid showing broken image symbol
1174
1158
  // We can do this because there has to be a container around us giving us a size
@@ -1184,7 +1168,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
1184
1168
  img.decode().catch(e => $3hooq$depictaiutilishared.dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
1185
1169
  .then(async () => {
1186
1170
  // Also wait with inserting image (i.e. paint) until browser is idle
1187
- await new Promise(r => executeWhenIdleBatched(r));
1171
+ await new Promise(r => executeWhenIdleBatched(r, false));
1188
1172
  if (gotCleanedUp) return;
1189
1173
  setHasDecoded(true);
1190
1174
  hasDecodedFastPath = true;
@@ -1461,7 +1445,7 @@ var $dfa95866b27a2a53$var$_tmpl$ = ["<div", ' style="position:absolute;width:10p
1461
1445
  let $dfa95866b27a2a53$var$cachedValue;
1462
1446
  async function $dfa95866b27a2a53$export$7b9a0e99f0aeb2f3() {
1463
1447
  if ($dfa95866b27a2a53$var$cachedValue != undefined) return $dfa95866b27a2a53$var$cachedValue;
1464
- return $dfa95866b27a2a53$var$cachedValue = await $dfa95866b27a2a53$var$checkIfIsAffectedByChromeBug326498383();
1448
+ return $dfa95866b27a2a53$var$cachedValue = $dfa95866b27a2a53$var$checkIfIsAffectedByChromeBug326498383();
1465
1449
  }
1466
1450
  async function $dfa95866b27a2a53$var$checkIfIsAffectedByChromeBug326498383() {
1467
1451
  let isAffected = true;
@@ -1474,7 +1458,7 @@ async function $dfa95866b27a2a53$var$checkIfIsAffectedByChromeBug326498383() {
1474
1458
  setTimeout($3hooq$depictaiutilishared.catchify(() => {
1475
1459
  r();
1476
1460
  div.remove();
1477
- }), 200);
1461
+ }), 500);
1478
1462
  });
1479
1463
  const {
1480
1464
  style: style
@@ -1507,7 +1491,7 @@ async function $dfa95866b27a2a53$var$checkIfIsAffectedByChromeBug326498383() {
1507
1491
  }
1508
1492
  return isAffected;
1509
1493
  }
1510
- var $e0b3f1f332b6863b$var$_tmpl$ = ["<div", ' class="scroll-padding">', "</div>"];
1494
+ var $e0b3f1f332b6863b$var$_tmpl$ = ["<div", ' class="scroll-padding"><div class="', '" style="', '">', "</div></div>"];
1511
1495
  function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
1512
1496
  let {
1513
1497
  displays_: displays_,
@@ -1517,7 +1501,8 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
1517
1501
  animationDuration_: animationDuration_,
1518
1502
  supportsHover_: supportsHover_,
1519
1503
  priceFormatting_: priceFormatting_,
1520
- pseudoRouter_: pseudoRouter_
1504
+ pseudoRouter_: pseudoRouter_,
1505
+ containerHeight_: containerHeight_
1521
1506
  } = _ref;
1522
1507
  let isAffectedByChromeBug = false;
1523
1508
  // If the user requests the drawer to be expanded or not
@@ -1535,13 +1520,9 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
1535
1520
  return containerWidth_() || !displays_();
1536
1521
  },
1537
1522
  get children() {
1538
- return $3hooq$solidjsweb.ssr($e0b3f1f332b6863b$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrElement("div", $3hooq$solidjsweb.mergeProps({
1539
- get ["class"]() {
1540
- return "look-overlay ".concat(userWantsExpanded() ? "expanded" : "", " ").concat(!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : "");
1541
- }
1542
- }, () => displays_() && {
1543
- style: "--look-card-width:".concat(containerWidth_(), "px;--look-item-height:").concat(lookItemHeight() || 200, "px")
1544
- }), () => $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Index), {
1523
+ return $3hooq$solidjsweb.ssr($e0b3f1f332b6863b$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "look-overlay ".concat(userWantsExpanded() ? "expanded" : "", " ").concat(!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : ""), $3hooq$solidjsweb.ssrStyle(displays_() &&
1524
+ // The styling is written like this to eke out animation smoothness on low CPU devices, git blame for previous, more readable versions.
1525
+ "--look-card-width:".concat(containerWidth_(), "px;--look-card-height:").concat(containerHeight_(), "px;--look-item-height:").concat(lookItemHeight() || 200, "px")), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Index), {
1545
1526
  get each() {
1546
1527
  return displays_() || Array.from({
1547
1528
  length: 4
@@ -1564,7 +1545,7 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
1564
1545
  })
1565
1546
  });
1566
1547
  }
1567
- })), false));
1548
+ })));
1568
1549
  }
1569
1550
  });
1570
1551
  }
@@ -1590,7 +1571,7 @@ function $e0b3f1f332b6863b$var$scrollingFunctionForChrome(element, targetScrollY
1590
1571
  // Bootstrap our animation - it will get called right before next frame shall be rendered.
1591
1572
  requestAnimationFrame(step);
1592
1573
  }
1593
- var $47e3c3102c78121b$var$_tmpl$ = ["<div", ' class="', '"></div>'];
1574
+ var $47e3c3102c78121b$var$_tmpl$ = ["<div", ' class="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"];
1594
1575
  function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
1595
1576
  let {
1596
1577
  display_: display_,
@@ -1601,12 +1582,14 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
1601
1582
  priceFormatting_: priceFormatting_,
1602
1583
  pseudoRouter_: pseudoRouter_
1603
1584
  } = _ref;
1585
+ let container;
1604
1586
  const useWantsExpandedSignal_ = $3hooq$solidjs.createSignal(false);
1605
1587
  const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
1606
1588
  const supportsHover_ = $3e17e871e9d0911d$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
1607
1589
  const us = Symbol("look");
1608
- const container = $3hooq$solidjsweb.ssr($47e3c3102c78121b$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "look-card ".concat(!display_() ? "placeholder" : ""));
1609
- const containerWidth_ = $c387d7f1d9fb66c0$export$ebdc3711f7e02ccd(container);
1590
+ const index = $b54645378dfc7280$export$e3faf4d95300054f();
1591
+ const [containerWidth_, setContainerWidth] = $3hooq$solidjs.createSignal();
1592
+ const [containerHeight_, setContainerHeight] = $3hooq$solidjs.createSignal();
1610
1593
  const clickHandler = $3hooq$depictaiutilishared.catchify(_ref2 => {
1611
1594
  let {
1612
1595
  target: target
@@ -1615,6 +1598,7 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
1615
1598
  // When clicking outside the look, close it
1616
1599
  setUserWantsExpanded(false);
1617
1600
  });
1601
+ const slidableInformation = $ad8ec7729fffeb9c$export$eaa625fb39439e37();
1618
1602
  addEventListener("click", clickHandler);
1619
1603
  $3hooq$solidjs.onCleanup(() => removeEventListener("click", clickHandler));
1620
1604
  $3hooq$solidjs.createEffect(() => setExpandedLooks(prev => {
@@ -1626,9 +1610,28 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
1626
1610
  } else prev.delete(us);
1627
1611
  return prev;
1628
1612
  }));
1613
+ if (slidableInformation) {
1614
+ const ourVisiblityInSlider = $3hooq$solidjs.createMemo(() => {
1615
+ var _slidableInformation$, _slidableInformation$2;
1616
+ const currentCard = index === null || index === void 0 ? void 0 : index();
1617
+ if (isNaN(currentCard)) return;
1618
+ slidableInformation === null || slidableInformation === void 0 || slidableInformation.intersectionEntries_();
1619
+ return slidableInformation === null || slidableInformation === void 0 ? void 0 : (_slidableInformation$ = slidableInformation.slider_.intersecting_items_object) === null || _slidableInformation$ === void 0 ? void 0 : (_slidableInformation$2 = _slidableInformation$[currentCard]) === null || _slidableInformation$2 === void 0 ? void 0 : _slidableInformation$2.intersectionRatio;
1620
+ });
1621
+ $3hooq$solidjs.createEffect(prevVisibility => {
1622
+ // Have memo -> effect setup for diffing, so we do as little work as possible in unrelated cards
1623
+ // as number is safe because undefined and NaN are both not < 0.5
1624
+ const visibility = ourVisiblityInSlider();
1625
+ if (visibility < 0.5 && (isNaN(prevVisibility) || visibility - prevVisibility < 0))
1626
+ // When sliding this card completely into the background, collapse it
1627
+ // Don't collapse it if we're about to put it more into visibility, to fix what's described at the end of https://www.loom.com/share/8796209c68764b18a0d565010929f594
1628
+ setUserWantsExpanded(false);
1629
+ return visibility;
1630
+ });
1631
+ }
1629
1632
  // Close us if another look expands
1630
1633
  $3hooq$solidjs.createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
1631
- $3hooq$solidjsweb.insert(container, () => [$3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
1634
+ return $3hooq$solidjsweb.ssr($47e3c3102c78121b$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "look-card ".concat(!display_ ? "placeholder" : ""), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
1632
1635
  get when() {
1633
1636
  return display_();
1634
1637
  },
@@ -1647,7 +1650,7 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
1647
1650
  autoAdjustAspectRatio: true
1648
1651
  });
1649
1652
  }
1650
- }), $3hooq$solidjsweb.createComponent((0, $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae), {
1653
+ })), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae), {
1651
1654
  displays_: () => {
1652
1655
  var _display_2;
1653
1656
  return (_display_2 = display_()) === null || _display_2 === void 0 ? void 0 : _display_2.displays;
@@ -1658,9 +1661,9 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
1658
1661
  supportsHover_: supportsHover_,
1659
1662
  FavoriteButton_: FavoriteButton_,
1660
1663
  priceFormatting_: priceFormatting_,
1661
- pseudoRouter_: pseudoRouter_
1662
- })]);
1663
- return container;
1664
+ pseudoRouter_: pseudoRouter_,
1665
+ containerHeight_: containerHeight_
1666
+ })));
1664
1667
  }
1665
1668
 
1666
1669
  /**
@@ -3103,6 +3106,38 @@ let $c95c6dd9e93acd82$export$44dad306455dddf;
3103
3106
  DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
3104
3107
  DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
3105
3108
  })($c95c6dd9e93acd82$export$44dad306455dddf || ($c95c6dd9e93acd82$export$44dad306455dddf = {}));
3109
+
3110
+ /** @jsxImportSource solid-js */
3111
+
3112
+ function $c387d7f1d9fb66c0$export$ebdc3711f7e02ccd(what_to_watch) {
3113
+ const [width, setWidth] = $3hooq$solidjs.createSignal();
3114
+ const resizeObserver = new ResizeObserver($3hooq$depictaiutilishared.catchify(records => {
3115
+ for (let j = 0; j < records.length; j++) {
3116
+ var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
3117
+ const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
3118
+ setWidth(width);
3119
+ }
3120
+ }));
3121
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
3122
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
3123
+ const disconnect = (0, $3hooq$depictaiutilishared.observer).onexists(what_to_watch, _ref => {
3124
+ let {
3125
+ element: element
3126
+ } = _ref;
3127
+ return requestAnimationFrame($3hooq$depictaiutilishared.catchify(() => {
3128
+ const current_size = what_to_watch.getBoundingClientRect().width;
3129
+ if (current_size)
3130
+ // If element has size, set signal to that. ResizeObserver only triggers when the content is visible in some cases, but it might already have a size. This reduces size filter expanding animation jank in chrome.
3131
+ setWidth(current_size);
3132
+ resizeObserver.observe(element);
3133
+ }));
3134
+ });
3135
+ $3hooq$solidjs.onCleanup(() => {
3136
+ resizeObserver.disconnect();
3137
+ disconnect();
3138
+ });
3139
+ return width;
3140
+ }
3106
3141
  var $34934309832515dc$var$_tmpl$ = '<path fill-rule="evenodd" d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z" fill="#0f0f0f"></path>';
3107
3142
  function $34934309832515dc$export$f7658c347b037c3f() {
3108
3143
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.7.7";
14
+ export const version = "4.7.9";
15
15
  /**
16
16
  * Just like `useExpandingContainer` except that the children can be reactive solid-js signals, basically solid's JSX.Element instead of our JSX.Element
17
17
  */
@@ -121,17 +121,7 @@ export function GenericSliderArrowButton(props?: {
121
121
  width_?: number;
122
122
  height_?: number;
123
123
  }): SVGElement;
124
- export function SlidableItems({
125
- children,
126
- slider_ref_,
127
- faded_opacity_,
128
- mutation_plugins_,
129
- disable_fading_,
130
- arrow_width_,
131
- arrow_height_,
132
- snapAlign_,
133
- fadingThreshold_
134
- }: {
124
+ export function SlidableItems(props: {
135
125
  children?: JSX.Element;
136
126
  slider_ref_?: (slider: Amazing_Slider) => any;
137
127
  faded_opacity_?: number;
@@ -185,10 +175,6 @@ export function ImagePlaceholder(props: ImagePlaceholderBaseOptions & (ImagePlac
185
175
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
186
176
  */
187
177
  export function media_query_to_accessor(media_query: string): import("solid-js").Accessor<boolean>;
188
- /**
189
- * Returns accessor with the size of the provided element, including padding and border (I think)
190
- */
191
- export function make_accurate_width_accessor(what_to_watch: HTMLElement): import("solid-js").Accessor<number | undefined>;
192
178
  /**
193
179
  * A Placeholder to use instead of some text, while it's loading. This is the inline version, meant to be embedded into sentences (or exist instead of them), etc.
194
180
  * If you want a block version, use `ImagePlaceholder` with `width`and `height` set instead.
@@ -515,6 +501,10 @@ export function CrossIcon(props?: JSX.SvgSVGAttributes<SVGSVGElement>): SVGEleme
515
501
  * Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
516
502
  */
517
503
  export const modalVersionSymbol: unique symbol;
504
+ /**
505
+ * Returns accessor with the size of the provided element, including padding and border (I think)
506
+ */
507
+ export function make_accurate_width_accessor(what_to_watch: HTMLElement): import("solid-js").Accessor<number | undefined>;
518
508
  /**
519
509
  * This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
520
510
  * @param clickEvent The click event that triggered the navigation
@@ -902,7 +892,7 @@ export function LookCard({
902
892
  expandedLooksSignal_: Signal<Set<symbol>>;
903
893
  priceFormatting_: Accessor<plp_shared_i18n["price_formatting_"]>;
904
894
  pseudoRouter_: PseudoRouter;
905
- }): HTMLDivElement;
895
+ }): JSX.Element;
906
896
  /**
907
897
  * Render a grid with provided recommendations. displayTransformers will not be applied for this since you yourself provide the displays. Options are reactive.
908
898
  */