@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.
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
98
98
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
99
99
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
100
100
  /*! Depict.ai search and product listing SDK */
101
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.7";
101
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.9";
102
102
  function $4b455f60dadde8b8$export$5bad61ecde080b1f(...params) {
103
103
  const {
104
104
  collapse: collapse,
@@ -653,22 +653,25 @@ function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
653
653
  }
654
654
  var $a0e53f99354809d9$var$_tmpl$ = ["<div", ">", "</div>"],
655
655
  $a0e53f99354809d9$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>"];
656
- function $a0e53f99354809d9$export$6649caad96ef8870({
657
- children: children,
658
- slider_ref_: slider_ref_,
659
- faded_opacity_ = 0.7,
660
- mutation_plugins_ = [],
661
- disable_fading_: disable_fading_,
662
- arrow_width_: arrow_width_,
663
- arrow_height_: arrow_height_,
664
- snapAlign_: snapAlign_,
665
- fadingThreshold_ = 0.96
666
- }) {
656
+ const $a0e53f99354809d9$var$SlidableContext = /*@__PURE__*/$5vyXB$solidjs.createContext();
657
+ function $a0e53f99354809d9$export$6649caad96ef8870(props) {
658
+ const {
659
+ slider_ref_: slider_ref_,
660
+ faded_opacity_ = 0.7,
661
+ mutation_plugins_ = [],
662
+ disable_fading_: disable_fading_,
663
+ snapAlign_: snapAlign_,
664
+ fadingThreshold_ = 0.96
665
+ } = props;
667
666
  const [hasHydrated, setHasHydrated] = $5vyXB$solidjs.createSignal(false);
668
667
  $5vyXB$solidjs.createEffect(() => setHasHydrated(true));
669
668
  const MakeButton = () => $5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
670
- height_: arrow_height_,
671
- width_: arrow_width_
669
+ get height_() {
670
+ return props.arrow_height_;
671
+ },
672
+ get width_() {
673
+ return props.arrow_width_;
674
+ }
672
675
  })));
673
676
  // 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
674
677
  // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
@@ -679,10 +682,11 @@ function $a0e53f99354809d9$export$6649caad96ef8870({
679
682
  return hasHydrated() && !(0, $5vyXB$solidjsweb.isServer);
680
683
  },
681
684
  get fallback() {
682
- return $5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(MakeButton, {})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(MakeButton, {})), $5vyXB$solidjsweb.escape(children));
685
+ return $5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(MakeButton, {})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(MakeButton, {})), $5vyXB$solidjsweb.escape(props.children));
683
686
  },
684
687
  get children() {
685
688
  return (() => {
689
+ const [intersectionEntries_, setIntersectionEntries] = $5vyXB$solidjs.createSignal([]);
686
690
  const fading_plugin = disable_fading_ ? undefined : $5vyXB$depictaiutilishared.slider_fading_factory({
687
691
  threshold_: fadingThreshold_,
688
692
  faded_opacity_: faded_opacity_
@@ -695,9 +699,17 @@ function $a0e53f99354809d9$export$6649caad96ef8870({
695
699
  constructor_plugins: [$5vyXB$depictaiutilishared.slider_snap_css(0, {
696
700
  align: snapAlign_
697
701
  }).constructor_plugin, ...(fading_plugin ? [fading_plugin.constructor_plugin] : [])],
698
- mutation_plugins: [...(fading_plugin ? [fading_plugin.mutation_plugin_] : []), ...mutation_plugins_]
702
+ mutation_plugins: [...(fading_plugin ? [fading_plugin.mutation_plugin_] : []), ...mutation_plugins_, entries => setIntersectionEntries(entries)]
699
703
  });
700
- $5vyXB$solidjsweb.insert(slider.insert_here, children);
704
+ $5vyXB$solidjsweb.insert(slider.insert_here, () => $5vyXB$solidjsweb.createComponent($a0e53f99354809d9$var$SlidableContext.Provider, {
705
+ value: {
706
+ slider_: slider,
707
+ intersectionEntries_: intersectionEntries_
708
+ },
709
+ get children() {
710
+ return props.children;
711
+ }
712
+ }));
701
713
  $5vyXB$solidjs.onCleanup(() => slider.observer.disconnect());
702
714
  slider_ref_?.(slider);
703
715
  return slider.container;
@@ -705,6 +717,9 @@ function $a0e53f99354809d9$export$6649caad96ef8870({
705
717
  }
706
718
  });
707
719
  }
720
+ function $a0e53f99354809d9$export$eaa625fb39439e37() {
721
+ return $5vyXB$solidjs.useContext($a0e53f99354809d9$var$SlidableContext);
722
+ }
708
723
  var $363ce4d1d71041aa$var$_tmpl$ = ["<h2", ' class="recs-title">', "</h2>"];
709
724
  function $363ce4d1d71041aa$export$d41d19e89346fa2({
710
725
  recommendations_resource_: recommendations_resource_,
@@ -865,34 +880,6 @@ function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
865
880
  }) => signal[1](matches)).remove);
866
881
  return signal[0];
867
882
  }
868
-
869
- /** @jsxImportSource solid-js */
870
-
871
- function $f13855d1b951b24a$export$ebdc3711f7e02ccd(what_to_watch) {
872
- const [width, setWidth] = $5vyXB$solidjs.createSignal();
873
- const resizeObserver = new ResizeObserver($5vyXB$depictaiutilishared.catchify(records => {
874
- for (let j = 0; j < records.length; j++) {
875
- const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
876
- setWidth(width);
877
- }
878
- }));
879
- // 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.
880
- // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
881
- const disconnect = (0, $5vyXB$depictaiutilishared.observer).onexists(what_to_watch, ({
882
- element: element
883
- }) => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(() => {
884
- const current_size = what_to_watch.getBoundingClientRect().width;
885
- if (current_size)
886
- // 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.
887
- setWidth(current_size);
888
- resizeObserver.observe(element);
889
- })));
890
- $5vyXB$solidjs.onCleanup(() => {
891
- resizeObserver.disconnect();
892
- disconnect();
893
- });
894
- return width;
895
- }
896
883
  function $061ff5b4c3d36171$export$89c6019e4baa40b1(props) {
897
884
  const style = $5vyXB$solidjs.createMemo(() => {
898
885
  const {
@@ -1027,9 +1014,10 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
1027
1014
  });
1028
1015
  // 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
1029
1016
  // Happened on singular, they have some weird observer (+we also have one but ours is at least 3x more efficient)
1030
- const executeWhenIdleBatched = fn => {
1017
+ const executeWhenIdleBatched = (fn, isSizesUpdate) => {
1031
1018
  if (typeof requestIdleCallback !== "function") return setTimeout(fn); // Old browsers don't get optimisation
1032
- if ($5vyXB$solidjs.untrack(isPrioritisedImage)) return fn(); // If we're one of the first 8 images, execute the callbacks immediately
1019
+ if ((!isSizesUpdate || !sizeSetFastPath) && $5vyXB$solidjs.untrack(isPrioritisedImage)) return fn(); // If we're one of the first 8 images, execute the callbacks immediately (improves lighthouse metrics)
1020
+ // 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)
1033
1021
  const existingStack = listingContext?.[$19950faaac026e09$var$onIdleFunctionsSymbol];
1034
1022
  if (existingStack) return existingStack.add(fn);
1035
1023
  const newStack = new Set([fn]);
@@ -1111,10 +1099,11 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
1111
1099
  // This greatly improves performance when loading (more) products
1112
1100
  // See https://depictaiworkspace.slack.com/archives/C05NJ0K3WRL/p1698220617663139
1113
1101
  timeoutSet = true; // Important to set timeoutSet before the call to executeWhenIdleBatched since if this is an important image executeWhenIdleBatched will execute fn immediately
1114
- executeWhenIdleBatched(handler);
1102
+ executeWhenIdleBatched(handler, true);
1115
1103
  });
1104
+ const dontLoadImageYet = $5vyXB$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
1116
1105
  $5vyXB$solidjs.createEffect(() => {
1117
- 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
1106
+ 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
1118
1107
  Object.assign(img, src_options());
1119
1108
  // Add to DOM once decoded to not require/block any paints before image has completed loading and avoid showing broken image symbol
1120
1109
  // We can do this because there has to be a container around us giving us a size
@@ -1130,7 +1119,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
1130
1119
  img.decode().catch(e => $5vyXB$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"
1131
1120
  .then(async () => {
1132
1121
  // Also wait with inserting image (i.e. paint) until browser is idle
1133
- await new Promise(r => executeWhenIdleBatched(r));
1122
+ await new Promise(r => executeWhenIdleBatched(r, false));
1134
1123
  if (gotCleanedUp) return;
1135
1124
  setHasDecoded(true);
1136
1125
  hasDecodedFastPath = true;
@@ -1385,7 +1374,7 @@ var $b9e830d616d01b31$var$_tmpl$ = ["<div", ' style="position:absolute;width:10p
1385
1374
  let $b9e830d616d01b31$var$cachedValue;
1386
1375
  async function $b9e830d616d01b31$export$7b9a0e99f0aeb2f3() {
1387
1376
  if ($b9e830d616d01b31$var$cachedValue != undefined) return $b9e830d616d01b31$var$cachedValue;
1388
- return $b9e830d616d01b31$var$cachedValue = await $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383();
1377
+ return $b9e830d616d01b31$var$cachedValue = $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383();
1389
1378
  }
1390
1379
  async function $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383() {
1391
1380
  let isAffected = true;
@@ -1398,7 +1387,7 @@ async function $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383() {
1398
1387
  setTimeout($5vyXB$depictaiutilishared.catchify(() => {
1399
1388
  r();
1400
1389
  div.remove();
1401
- }), 200);
1390
+ }), 500);
1402
1391
  });
1403
1392
  const {
1404
1393
  style: style
@@ -1431,7 +1420,7 @@ async function $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383() {
1431
1420
  }
1432
1421
  return isAffected;
1433
1422
  }
1434
- var $905010a06f9aeae5$var$_tmpl$ = ["<div", ' class="scroll-padding">', "</div>"];
1423
+ var $905010a06f9aeae5$var$_tmpl$ = ["<div", ' class="scroll-padding"><div class="', '" style="', '">', "</div></div>"];
1435
1424
  function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
1436
1425
  displays_: displays_,
1437
1426
  FavoriteButton_: FavoriteButton_,
@@ -1440,7 +1429,8 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
1440
1429
  animationDuration_: animationDuration_,
1441
1430
  supportsHover_: supportsHover_,
1442
1431
  priceFormatting_: priceFormatting_,
1443
- pseudoRouter_: pseudoRouter_
1432
+ pseudoRouter_: pseudoRouter_,
1433
+ containerHeight_: containerHeight_
1444
1434
  }) {
1445
1435
  let isAffectedByChromeBug = false;
1446
1436
  // If the user requests the drawer to be expanded or not
@@ -1458,13 +1448,9 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
1458
1448
  return containerWidth_() || !displays_();
1459
1449
  },
1460
1450
  get children() {
1461
- return $5vyXB$solidjsweb.ssr($905010a06f9aeae5$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrElement("div", $5vyXB$solidjsweb.mergeProps({
1462
- get ["class"]() {
1463
- return `look-overlay ${userWantsExpanded() ? "expanded" : ""} ${!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : ""}`;
1464
- }
1465
- }, () => displays_() && {
1466
- style: `--look-card-width:${containerWidth_()}px;--look-item-height:${lookItemHeight() || 200}px`
1467
- }), () => $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Index), {
1451
+ return $5vyXB$solidjsweb.ssr($905010a06f9aeae5$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `look-overlay ${userWantsExpanded() ? "expanded" : ""} ${!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : ""}`, $5vyXB$solidjsweb.ssrStyle(displays_() &&
1452
+ // The styling is written like this to eke out animation smoothness on low CPU devices, git blame for previous, more readable versions.
1453
+ `--look-card-width:${containerWidth_()}px;--look-card-height:${containerHeight_()}px;--look-item-height:${lookItemHeight() || 200}px`), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Index), {
1468
1454
  get each() {
1469
1455
  return displays_() || Array.from({
1470
1456
  length: 4
@@ -1487,7 +1473,7 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
1487
1473
  })
1488
1474
  });
1489
1475
  }
1490
- })), false));
1476
+ })));
1491
1477
  }
1492
1478
  });
1493
1479
  }
@@ -1513,7 +1499,7 @@ function $905010a06f9aeae5$var$scrollingFunctionForChrome(element, targetScrollY
1513
1499
  // Bootstrap our animation - it will get called right before next frame shall be rendered.
1514
1500
  requestAnimationFrame(step);
1515
1501
  }
1516
- var $ad882bbe664dbd53$var$_tmpl$ = ["<div", ' class="', '"></div>'];
1502
+ var $ad882bbe664dbd53$var$_tmpl$ = ["<div", ' class="', '"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"];
1517
1503
  function $ad882bbe664dbd53$export$44809a8a3e867e30({
1518
1504
  display_: display_,
1519
1505
  expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
@@ -1523,12 +1509,14 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
1523
1509
  priceFormatting_: priceFormatting_,
1524
1510
  pseudoRouter_: pseudoRouter_
1525
1511
  }) {
1512
+ let container;
1526
1513
  const useWantsExpandedSignal_ = $5vyXB$solidjs.createSignal(false);
1527
1514
  const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
1528
1515
  const supportsHover_ = $b54e6192d0caa293$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
1529
1516
  const us = Symbol("look");
1530
- const container = $5vyXB$solidjsweb.ssr($ad882bbe664dbd53$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `look-card ${!display_() ? "placeholder" : ""}`);
1531
- const containerWidth_ = $f13855d1b951b24a$export$ebdc3711f7e02ccd(container);
1517
+ const index = $129b9b9c010039d0$export$e3faf4d95300054f();
1518
+ const [containerWidth_, setContainerWidth] = $5vyXB$solidjs.createSignal();
1519
+ const [containerHeight_, setContainerHeight] = $5vyXB$solidjs.createSignal();
1532
1520
  const clickHandler = $5vyXB$depictaiutilishared.catchify(({
1533
1521
  target: target
1534
1522
  }) => {
@@ -1536,6 +1524,7 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
1536
1524
  // When clicking outside the look, close it
1537
1525
  setUserWantsExpanded(false);
1538
1526
  });
1527
+ const slidableInformation = $a0e53f99354809d9$export$eaa625fb39439e37();
1539
1528
  addEventListener("click", clickHandler);
1540
1529
  $5vyXB$solidjs.onCleanup(() => removeEventListener("click", clickHandler));
1541
1530
  $5vyXB$solidjs.createEffect(() => setExpandedLooks(prev => {
@@ -1547,9 +1536,27 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
1547
1536
  } else prev.delete(us);
1548
1537
  return prev;
1549
1538
  }));
1539
+ if (slidableInformation) {
1540
+ const ourVisiblityInSlider = $5vyXB$solidjs.createMemo(() => {
1541
+ const currentCard = index?.();
1542
+ if (isNaN(currentCard)) return;
1543
+ slidableInformation?.intersectionEntries_();
1544
+ return slidableInformation?.slider_.intersecting_items_object?.[currentCard]?.intersectionRatio;
1545
+ });
1546
+ $5vyXB$solidjs.createEffect(prevVisibility => {
1547
+ // Have memo -> effect setup for diffing, so we do as little work as possible in unrelated cards
1548
+ // as number is safe because undefined and NaN are both not < 0.5
1549
+ const visibility = ourVisiblityInSlider();
1550
+ if (visibility < 0.5 && (isNaN(prevVisibility) || visibility - prevVisibility < 0))
1551
+ // When sliding this card completely into the background, collapse it
1552
+ // 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
1553
+ setUserWantsExpanded(false);
1554
+ return visibility;
1555
+ });
1556
+ }
1550
1557
  // Close us if another look expands
1551
1558
  $5vyXB$solidjs.createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
1552
- $5vyXB$solidjsweb.insert(container, () => [$5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
1559
+ return $5vyXB$solidjsweb.ssr($ad882bbe664dbd53$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `look-card ${!display_ ? "placeholder" : ""}`, $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
1553
1560
  get when() {
1554
1561
  return display_();
1555
1562
  },
@@ -1567,7 +1574,7 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
1567
1574
  autoAdjustAspectRatio: true
1568
1575
  });
1569
1576
  }
1570
- }), $5vyXB$solidjsweb.createComponent((0, $905010a06f9aeae5$export$ebf0b1d4f90c09ae), {
1577
+ })), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $905010a06f9aeae5$export$ebf0b1d4f90c09ae), {
1571
1578
  displays_: () => display_()?.displays,
1572
1579
  userWantsExpandedSignal_: useWantsExpandedSignal_,
1573
1580
  containerWidth_: containerWidth_,
@@ -1575,9 +1582,9 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
1575
1582
  supportsHover_: supportsHover_,
1576
1583
  FavoriteButton_: FavoriteButton_,
1577
1584
  priceFormatting_: priceFormatting_,
1578
- pseudoRouter_: pseudoRouter_
1579
- })]);
1580
- return container;
1585
+ pseudoRouter_: pseudoRouter_,
1586
+ containerHeight_: containerHeight_
1587
+ })));
1581
1588
  }
1582
1589
 
1583
1590
  /**
@@ -2926,6 +2933,34 @@ let $0b6e2070a98de347$export$44dad306455dddf;
2926
2933
  DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
2927
2934
  DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
2928
2935
  })($0b6e2070a98de347$export$44dad306455dddf || ($0b6e2070a98de347$export$44dad306455dddf = {}));
2936
+
2937
+ /** @jsxImportSource solid-js */
2938
+
2939
+ function $f13855d1b951b24a$export$ebdc3711f7e02ccd(what_to_watch) {
2940
+ const [width, setWidth] = $5vyXB$solidjs.createSignal();
2941
+ const resizeObserver = new ResizeObserver($5vyXB$depictaiutilishared.catchify(records => {
2942
+ for (let j = 0; j < records.length; j++) {
2943
+ const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
2944
+ setWidth(width);
2945
+ }
2946
+ }));
2947
+ // 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.
2948
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
2949
+ const disconnect = (0, $5vyXB$depictaiutilishared.observer).onexists(what_to_watch, ({
2950
+ element: element
2951
+ }) => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(() => {
2952
+ const current_size = what_to_watch.getBoundingClientRect().width;
2953
+ if (current_size)
2954
+ // 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.
2955
+ setWidth(current_size);
2956
+ resizeObserver.observe(element);
2957
+ })));
2958
+ $5vyXB$solidjs.onCleanup(() => {
2959
+ resizeObserver.disconnect();
2960
+ disconnect();
2961
+ });
2962
+ return width;
2963
+ }
2929
2964
  var $0175183387c8923a$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>';
2930
2965
  function $0175183387c8923a$export$f7658c347b037c3f(props = {}) {
2931
2966
  return $5vyXB$solidjsweb.ssrElement("svg", $5vyXB$solidjsweb.mergeProps({
@@ -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
  */