@depict-ai/ui 4.2.2 → 4.3.1

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
@@ -100,7 +100,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
100
100
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
101
101
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
102
102
  /*! Depict.ai search and product listing SDK */
103
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.2.2";
103
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.3.1";
104
104
  const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
105
105
  const cols_at_size = [];
106
106
  for (let i = 0; i < sorted_cols_at_size.length; i++) {
@@ -1363,7 +1363,7 @@ function $f3db423dc84bc35d$export$9d4a4b669b1929ab(props) {
1363
1363
  }
1364
1364
  }));
1365
1365
  }
1366
- var $d66c35b5a6d6d926$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=img-wrapper><!$><!/><!$><!/>`),
1366
+ var $d66c35b5a6d6d926$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=img-wrapper>`),
1367
1367
  $d66c35b5a6d6d926$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<span class="d-price original">`),
1368
1368
  $d66c35b5a6d6d926$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=right-part><div class=text-container><span class="d-title line-clamp"></span><span class=d-price></span><!$><!/></div><!$><!/>`),
1369
1369
  $d66c35b5a6d6d926$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<a class=look-item><!$><!/><!$><!/>`);
@@ -1380,17 +1380,9 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
1380
1380
  const display = display_();
1381
1381
  return display === null || display === void 0 ? void 0 : display.variant_displays[display === null || display === void 0 ? void 0 : display.variant_index];
1382
1382
  });
1383
- const imageUrls = () => {
1384
- var _variantToUse;
1385
- return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : _variantToUse.image_urls;
1386
- };
1387
1383
  const imageUrl = $52FdA$solidjs.createMemo(() => {
1388
- var _imageUrls;
1389
- return (_imageUrls = imageUrls()) === null || _imageUrls === void 0 ? void 0 : _imageUrls[0];
1390
- });
1391
- const secondaryImageUrl = $52FdA$solidjs.createMemo(() => {
1392
- var _imageUrls2;
1393
- return (_imageUrls2 = imageUrls()) === null || _imageUrls2 === void 0 ? void 0 : _imageUrls2[1];
1384
+ var _variantToUse, _variantToUse$image_u;
1385
+ return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : (_variantToUse$image_u = _variantToUse.image_urls) === null || _variantToUse$image_u === void 0 ? void 0 : _variantToUse$image_u[0];
1394
1386
  });
1395
1387
  const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
1396
1388
  const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $52FdA$solidjs.createSignal($52FdA$solidjs.untrack(isExpanded_));
@@ -1407,10 +1399,10 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
1407
1399
  const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
1408
1400
  return (() => {
1409
1401
  var _el$ = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$4),
1410
- _el$16 = _el$.firstChild,
1411
- [_el$17, _co$5] = $52FdA$solidjsweb.getNextMarker(_el$16.nextSibling),
1412
- _el$18 = _el$17.nextSibling,
1413
- [_el$19, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$18.nextSibling);
1402
+ _el$12 = _el$.firstChild,
1403
+ [_el$13, _co$3] = $52FdA$solidjsweb.getNextMarker(_el$12.nextSibling),
1404
+ _el$14 = _el$13.nextSibling,
1405
+ [_el$15, _co$4] = $52FdA$solidjsweb.getNextMarker(_el$14.nextSibling);
1414
1406
  var _ref$ = outerRef_;
1415
1407
  typeof _ref$ === "function" ? $52FdA$solidjsweb.use(_ref$, _el$) : outerRef_ = _el$;
1416
1408
  $52FdA$solidjsweb.spread(_el$, $52FdA$solidjsweb.mergeProps(() => {
@@ -1427,11 +1419,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
1427
1419
  });
1428
1420
  },
1429
1421
  get children() {
1430
- var _el$2 = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$),
1431
- _el$3 = _el$2.firstChild,
1432
- [_el$4, _co$] = $52FdA$solidjsweb.getNextMarker(_el$3.nextSibling),
1433
- _el$5 = _el$4.nextSibling,
1434
- [_el$6, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$5.nextSibling);
1422
+ var _el$2 = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$);
1435
1423
  $52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
1436
1424
  get when() {
1437
1425
  return imageUrl();
@@ -1454,42 +1442,23 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
1454
1442
  }
1455
1443
  });
1456
1444
  }
1457
- }), _el$4, _co$);
1458
- $52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
1459
- get when() {
1460
- return secondaryImageUrl();
1461
- },
1462
- get children() {
1463
- return $52FdA$solidjsweb.createComponent((0, $f3db423dc84bc35d$export$9d4a4b669b1929ab), {
1464
- get src() {
1465
- return secondaryImageUrl();
1466
- },
1467
- get aspectRatio() {
1468
- return isExpanded_() ? 0.75 : 1;
1469
- },
1470
- "class": "secondary",
1471
- get autoAdjustAspectRatio() {
1472
- return isExpanded_() ? "smoothed" : false;
1473
- }
1474
- });
1475
- }
1476
- }), _el$6, _co$2);
1445
+ }));
1477
1446
  return _el$2;
1478
1447
  }
1479
- }), _el$17, _co$5);
1448
+ }), _el$13, _co$3);
1480
1449
  $52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
1481
1450
  get when() {
1482
1451
  return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : isExpanded_()) || animationIsRunning();
1483
1452
  },
1484
1453
  get children() {
1485
- var _el$7 = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$3),
1486
- _el$8 = _el$7.firstChild,
1487
- _el$9 = _el$8.firstChild,
1488
- _el$10 = _el$9.nextSibling,
1489
- _el$12 = _el$10.nextSibling,
1490
- [_el$13, _co$3] = $52FdA$solidjsweb.getNextMarker(_el$12.nextSibling),
1491
- _el$14 = _el$8.nextSibling,
1492
- [_el$15, _co$4] = $52FdA$solidjsweb.getNextMarker(_el$14.nextSibling);
1454
+ var _el$3 = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$3),
1455
+ _el$4 = _el$3.firstChild,
1456
+ _el$5 = _el$4.firstChild,
1457
+ _el$6 = _el$5.nextSibling,
1458
+ _el$8 = _el$6.nextSibling,
1459
+ [_el$9, _co$] = $52FdA$solidjsweb.getNextMarker(_el$8.nextSibling),
1460
+ _el$10 = _el$4.nextSibling,
1461
+ [_el$11, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$10.nextSibling);
1493
1462
  $52FdA$solidjsweb.use(element => {
1494
1463
  const owner = $52FdA$solidjs.getOwner();
1495
1464
  $52FdA$solidjs.onCleanup((0, $52FdA$depictaiutilishared.observer).onexists(element, _ref2 => {
@@ -1522,49 +1491,49 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
1522
1491
  for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $52FdA$depictaiutilishared.catchify(() => setAnimationIsRunning(false)));
1523
1492
  disconnector();
1524
1493
  }));
1525
- }, _el$7);
1526
- $52FdA$solidjsweb.insert(_el$9, () => {
1494
+ }, _el$3);
1495
+ $52FdA$solidjsweb.insert(_el$5, () => {
1527
1496
  var _variantToUse$title, _variantToUse5;
1528
1497
  return (_variantToUse$title = (_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title) !== null && _variantToUse$title !== void 0 ? _variantToUse$title : $52FdA$solidjsweb.createComponent((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
1529
1498
  height: "1em",
1530
1499
  width: "20ch"
1531
1500
  });
1532
1501
  });
1533
- $52FdA$solidjsweb.insert(_el$10, (() => {
1502
+ $52FdA$solidjsweb.insert(_el$6, (() => {
1534
1503
  var _c$ = $52FdA$solidjsweb.memo(() => !!(!variantToUse() || salePrice.loading));
1535
1504
  return () => _c$() ? $52FdA$solidjsweb.createComponent((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
1536
1505
  height: "1em",
1537
1506
  width: "20ch"
1538
1507
  }) : salePrice();
1539
1508
  })());
1540
- $52FdA$solidjsweb.insert(_el$8, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
1509
+ $52FdA$solidjsweb.insert(_el$4, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
1541
1510
  get when() {
1542
1511
  return isOnSale();
1543
1512
  },
1544
1513
  get children() {
1545
- var _el$11 = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$2);
1546
- $52FdA$solidjsweb.insert(_el$11, (() => {
1514
+ var _el$7 = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$2);
1515
+ $52FdA$solidjsweb.insert(_el$7, (() => {
1547
1516
  var _c$2 = $52FdA$solidjsweb.memo(() => !!(!variantToUse() || originalPrice.loading));
1548
1517
  return () => _c$2() ? $52FdA$solidjsweb.createComponent((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
1549
1518
  height: "1em",
1550
1519
  width: "20ch"
1551
1520
  }) : originalPrice();
1552
1521
  })());
1553
- return _el$11;
1522
+ return _el$7;
1554
1523
  }
1555
- }), _el$13, _co$3);
1556
- $52FdA$solidjsweb.insert(_el$7, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
1524
+ }), _el$9, _co$);
1525
+ $52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
1557
1526
  when: FavoriteButton_,
1558
1527
  get children() {
1559
1528
  return $52FdA$solidjsweb.createComponent(FavoriteButton, {
1560
1529
  display_: display_
1561
1530
  });
1562
1531
  }
1563
- }), _el$15, _co$4);
1564
- $52FdA$solidjsweb.effect(() => _el$10.classList.toggle("sale", !!isOnSale()));
1565
- return _el$7;
1532
+ }), _el$11, _co$2);
1533
+ $52FdA$solidjsweb.effect(() => _el$6.classList.toggle("sale", !!isOnSale()));
1534
+ return _el$3;
1566
1535
  }
1567
- }), _el$19, _co$6);
1536
+ }), _el$15, _co$4);
1568
1537
  $52FdA$solidjsweb.runHydrationEvents();
1569
1538
  return _el$;
1570
1539
  })();
@@ -1740,16 +1709,23 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
1740
1709
  const us = Symbol("look");
1741
1710
  const container = (() => {
1742
1711
  var _el$ = $52FdA$solidjsweb.getNextElement($47e3c3102c78121b$var$_tmpl$);
1743
- $52FdA$solidjsweb.addEventListener(_el$, "click", $52FdA$depictaiutilishared.catchify(() => setUserWantsExpanded(prev => !prev)), true);
1712
+ $52FdA$solidjsweb.addEventListener(_el$, "click", $52FdA$depictaiutilishared.catchify(_ref2 => {
1713
+ let {
1714
+ target: target
1715
+ } = _ref2;
1716
+ // Don't toggle when clicking on the links
1717
+ if (target.matches("a") || target.closest("a")) return;
1718
+ setUserWantsExpanded(prev => !prev);
1719
+ }), true);
1744
1720
  _el$.classList.toggle("placeholder", !!!display_);
1745
1721
  $52FdA$solidjsweb.runHydrationEvents();
1746
1722
  return _el$;
1747
1723
  })();
1748
1724
  const containerWidth_ = $c387d7f1d9fb66c0$export$ebdc3711f7e02ccd(container);
1749
- const clickHandler = $52FdA$depictaiutilishared.catchify(_ref2 => {
1725
+ const clickHandler = $52FdA$depictaiutilishared.catchify(_ref3 => {
1750
1726
  let {
1751
1727
  target: target
1752
- } = _ref2;
1728
+ } = _ref3;
1753
1729
  if (target !== container && !container.contains(target))
1754
1730
  // When clicking outside the look, close it
1755
1731
  setUserWantsExpanded(false);
@@ -12366,7 +12342,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
12366
12342
  selected_filters_: selected_filters_,
12367
12343
  local_filter_cache_: local_filter_cache_,
12368
12344
  get_extra_filters_button_: get_extra_filters_button_,
12369
- get_extra_sorting_button_: get_extra_sorting_button_
12345
+ get_extra_sorting_button_: get_extra_sorting_button_,
12346
+ filterModalParent_: filterModalParent_
12370
12347
  } = _ref;
12371
12348
  const Self = () => {
12372
12349
  // This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
@@ -12501,7 +12478,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
12501
12478
  formatted_number_of_results_: formatted_number_of_results_,
12502
12479
  dismiss_modal_: dismiss_modal_,
12503
12480
  i18n_: i18n_
12504
- }));
12481
+ }, filterModalParent_));
12505
12482
  const {
12506
12483
  remove: remove
12507
12484
  } = $52FdA$depictaiutilishared.javascript_media_query("(max-width:651px)", _ref3 => {
@@ -13572,7 +13549,6 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
13572
13549
  market_: market_,
13573
13550
  showing_recommendation_rows_: showing_recommendation_rows_,
13574
13551
  layout_options_: layout_options_,
13575
- recommendations_layout_options_: recommendations_layout_options_,
13576
13552
  scroll_restoration_data_: scroll_restoration_data_,
13577
13553
  product_card_template_: product_card_template_,
13578
13554
  modalAlignmentSignalsRef_: modalAlignmentSignalsRef_,
@@ -13582,7 +13558,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
13582
13558
  content_search_enabled_: content_search_enabled_,
13583
13559
  content_blocks_by_row_: content_blocks_by_row_,
13584
13560
  modalVersionUsed_: modalVersionUsed_,
13585
- BackIcon_: BackIcon_
13561
+ BackIcon_: BackIcon_,
13562
+ filterModalParent_: filterModalParent_
13586
13563
  } = _ref;
13587
13564
  const [get_sorting] = current_sorting_;
13588
13565
  const all_products_loaded_ = $52FdA$solidjs.createSignal(false);
@@ -13703,7 +13680,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
13703
13680
  formatted_number_of_results_: formatted_number_of_results_,
13704
13681
  local_filter_cache_: local_filter_cache_,
13705
13682
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
13706
- number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_
13683
+ number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
13684
+ filterModalParent_: filterModalParent_
13707
13685
  });
13708
13686
  const results_filters = $52FdA$solidjs.createSignal();
13709
13687
  const owner = $52FdA$solidjs.getOwner();
@@ -13962,12 +13940,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
13962
13940
  depict_api_: depict_api_,
13963
13941
  i18n_: i18n_,
13964
13942
  search_query_base_: search_query_base_,
13965
- get layout_options_() {
13966
- return $52FdA$solidjs.createMemo(() => {
13967
- var _recommendations_layo;
13968
- return (_recommendations_layo = recommendations_layout_options_ === null || recommendations_layout_options_ === void 0 ? void 0 : recommendations_layout_options_()) !== null && _recommendations_layo !== void 0 ? _recommendations_layo : layout_options_();
13969
- });
13970
- },
13943
+ layout_options_: layout_options_,
13971
13944
  showing_recommendation_rows_: showing_recommendation_rows_,
13972
13945
  product_card_template_: product_card_template_,
13973
13946
  all_products_loaded_: get_all_products_loaded
@@ -14470,15 +14443,7 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
14470
14443
  cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77($b1ea8d47bcf03111$export$ff7109b9b2b206ba(props.cols_at_size)),
14471
14444
  ...grid_spacing_override()
14472
14445
  })),
14473
- recommendations_layout_options_: $52FdA$solidjs.createMemo(() => {
14474
- const {
14475
- extra_depict_options: extra_depict_options
14476
- } = props;
14477
- return extra_depict_options !== null && extra_depict_options !== void 0 && extra_depict_options.recommendations_cols_at_size ? {
14478
- cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(extra_depict_options.recommendations_cols_at_size),
14479
- ...grid_spacing_override()
14480
- } : undefined;
14481
- }),
14446
+ filterModalParent_: $52FdA$solidjs.untrack(() => props.filterModalParent_),
14482
14447
  product_card_template_: product_card_template
14483
14448
  });
14484
14449
  }, "Entire SearchPage failed");
@@ -15432,7 +15397,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
15432
15397
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15433
15398
  sorting_query_param_: sorting_query_param_,
15434
15399
  filter_query_param_prefix_: filter_query_param_prefix_,
15435
- content_blocks_by_row_: content_blocks_by_row_
15400
+ content_blocks_by_row_: content_blocks_by_row_,
15401
+ filterModalParent_: filterModalParent_
15436
15402
  } = _ref;
15437
15403
  let results_for;
15438
15404
  let only_show_filters_opener_;
@@ -15635,6 +15601,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
15635
15601
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15636
15602
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
15637
15603
  sort_and_filter_disabled_: sort_and_filter_disabled_,
15604
+ filterModalParent_: filterModalParent_,
15638
15605
  ...extra_sort_and_filter_args_
15639
15606
  });
15640
15607
  $52FdA$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
@@ -15923,6 +15890,7 @@ function $c10e33c4681f8c9b$export$e2bf8ce7779e827e(props) {
15923
15890
  category_sorting_open_: category_sorting_open_,
15924
15891
  expanded_filters_: expanded_filters_,
15925
15892
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15893
+ filterModalParent_: $52FdA$solidjs.untrack(() => props.filterModalParent_),
15926
15894
  selected_filters_: selected_filters_,
15927
15895
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15928
15896
  content_blocks_by_row_: () => props.content_blocks_by_row,
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 _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "4.2.2";
13
+ export const version = "4.3.1";
14
14
  declare const LISTING_ID = "listingId";
15
15
  declare const EXTERNAL_ID = "externalId";
16
16
  type ScrollRestorationData = {
@@ -1337,9 +1337,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
1337
1337
  product_card_template: ProductCardTemplate<[TransformedDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<TransformedDisplay>>;
1338
1338
  content_blocks_by_row?: ContentBlocksByRow;
1339
1339
  on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
1340
- extra_depict_options?: {
1341
- recommendations_cols_at_size?: SDKColsAtSize;
1342
- };
1340
+ filterModalParent_?: HTMLElement | ShadowRoot;
1343
1341
  }): import("@depict-ai/utilishared").Node_Array;
1344
1342
  /**
1345
1343
  * Connects the height of the search field to the height of the aligner.
@@ -1379,7 +1377,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1379
1377
  * Open the modal with support for alignment.
1380
1378
  * @returns {void}
1381
1379
  */
1382
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1380
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1383
1381
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1384
1382
  export interface PageReplacer {
1385
1383
  readonly render_: () => Node_Array;
@@ -1456,5 +1454,6 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1456
1454
  on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
1457
1455
  content_blocks_by_row?: ContentBlocksByRow;
1458
1456
  layout?: PossibleLayout;
1459
- }): import("@depict-ai/utilishared/latest").Node_Array;
1457
+ filterModalParent_?: HTMLElement | ShadowRoot;
1458
+ }): import("@depict-ai/utilishared").Node_Array;
1460
1459
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
package/ES10/index.js CHANGED
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "4.2.2";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.3.1";
14
14
  const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
15
15
  const cols_at_size = [];
16
16
  for (let i = 0; i < sorted_cols_at_size.length; i++) {
@@ -1273,7 +1273,7 @@ function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
1273
1273
  }
1274
1274
  }));
1275
1275
  }
1276
- var $0c5b1686f971e5e7$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=img-wrapper><!$><!/><!$><!/>`),
1276
+ var $0c5b1686f971e5e7$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=img-wrapper>`),
1277
1277
  $0c5b1686f971e5e7$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<span class="d-price original">`),
1278
1278
  $0c5b1686f971e5e7$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=right-part><div class=text-container><span class="d-title line-clamp"></span><span class=d-price></span><!$><!/></div><!$><!/>`),
1279
1279
  $0c5b1686f971e5e7$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<a class=look-item><!$><!/><!$><!/>`);
@@ -1290,17 +1290,9 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1290
1290
  const display = display_();
1291
1291
  return display === null || display === void 0 ? void 0 : display.variant_displays[display === null || display === void 0 ? void 0 : display.variant_index];
1292
1292
  });
1293
- const imageUrls = () => {
1294
- var _variantToUse;
1295
- return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : _variantToUse.image_urls;
1296
- };
1297
1293
  const imageUrl = $8tj43$createMemo(() => {
1298
- var _imageUrls;
1299
- return (_imageUrls = imageUrls()) === null || _imageUrls === void 0 ? void 0 : _imageUrls[0];
1300
- });
1301
- const secondaryImageUrl = $8tj43$createMemo(() => {
1302
- var _imageUrls2;
1303
- return (_imageUrls2 = imageUrls()) === null || _imageUrls2 === void 0 ? void 0 : _imageUrls2[1];
1294
+ var _variantToUse, _variantToUse$image_u;
1295
+ return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : (_variantToUse$image_u = _variantToUse.image_urls) === null || _variantToUse$image_u === void 0 ? void 0 : _variantToUse$image_u[0];
1304
1296
  });
1305
1297
  const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
1306
1298
  const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $8tj43$createSignal($8tj43$untrack(isExpanded_));
@@ -1317,10 +1309,10 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1317
1309
  const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
1318
1310
  return (() => {
1319
1311
  var _el$ = $8tj43$getNextElement($0c5b1686f971e5e7$var$_tmpl$4),
1320
- _el$16 = _el$.firstChild,
1321
- [_el$17, _co$5] = $8tj43$getNextMarker(_el$16.nextSibling),
1322
- _el$18 = _el$17.nextSibling,
1323
- [_el$19, _co$6] = $8tj43$getNextMarker(_el$18.nextSibling);
1312
+ _el$12 = _el$.firstChild,
1313
+ [_el$13, _co$3] = $8tj43$getNextMarker(_el$12.nextSibling),
1314
+ _el$14 = _el$13.nextSibling,
1315
+ [_el$15, _co$4] = $8tj43$getNextMarker(_el$14.nextSibling);
1324
1316
  var _ref$ = outerRef_;
1325
1317
  typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$) : outerRef_ = _el$;
1326
1318
  $8tj43$spread(_el$, $8tj43$mergeProps(() => {
@@ -1337,11 +1329,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1337
1329
  });
1338
1330
  },
1339
1331
  get children() {
1340
- var _el$2 = $8tj43$getNextElement($0c5b1686f971e5e7$var$_tmpl$),
1341
- _el$3 = _el$2.firstChild,
1342
- [_el$4, _co$] = $8tj43$getNextMarker(_el$3.nextSibling),
1343
- _el$5 = _el$4.nextSibling,
1344
- [_el$6, _co$2] = $8tj43$getNextMarker(_el$5.nextSibling);
1332
+ var _el$2 = $8tj43$getNextElement($0c5b1686f971e5e7$var$_tmpl$);
1345
1333
  $8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Show), {
1346
1334
  get when() {
1347
1335
  return imageUrl();
@@ -1364,42 +1352,23 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1364
1352
  }
1365
1353
  });
1366
1354
  }
1367
- }), _el$4, _co$);
1368
- $8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Show), {
1369
- get when() {
1370
- return secondaryImageUrl();
1371
- },
1372
- get children() {
1373
- return $8tj43$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
1374
- get src() {
1375
- return secondaryImageUrl();
1376
- },
1377
- get aspectRatio() {
1378
- return isExpanded_() ? 0.75 : 1;
1379
- },
1380
- "class": "secondary",
1381
- get autoAdjustAspectRatio() {
1382
- return isExpanded_() ? "smoothed" : false;
1383
- }
1384
- });
1385
- }
1386
- }), _el$6, _co$2);
1355
+ }));
1387
1356
  return _el$2;
1388
1357
  }
1389
- }), _el$17, _co$5);
1358
+ }), _el$13, _co$3);
1390
1359
  $8tj43$insert(_el$, $8tj43$createComponent((0, $8tj43$Show), {
1391
1360
  get when() {
1392
1361
  return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : isExpanded_()) || animationIsRunning();
1393
1362
  },
1394
1363
  get children() {
1395
- var _el$7 = $8tj43$getNextElement($0c5b1686f971e5e7$var$_tmpl$3),
1396
- _el$8 = _el$7.firstChild,
1397
- _el$9 = _el$8.firstChild,
1398
- _el$10 = _el$9.nextSibling,
1399
- _el$12 = _el$10.nextSibling,
1400
- [_el$13, _co$3] = $8tj43$getNextMarker(_el$12.nextSibling),
1401
- _el$14 = _el$8.nextSibling,
1402
- [_el$15, _co$4] = $8tj43$getNextMarker(_el$14.nextSibling);
1364
+ var _el$3 = $8tj43$getNextElement($0c5b1686f971e5e7$var$_tmpl$3),
1365
+ _el$4 = _el$3.firstChild,
1366
+ _el$5 = _el$4.firstChild,
1367
+ _el$6 = _el$5.nextSibling,
1368
+ _el$8 = _el$6.nextSibling,
1369
+ [_el$9, _co$] = $8tj43$getNextMarker(_el$8.nextSibling),
1370
+ _el$10 = _el$4.nextSibling,
1371
+ [_el$11, _co$2] = $8tj43$getNextMarker(_el$10.nextSibling);
1403
1372
  $8tj43$use(element => {
1404
1373
  const owner = $8tj43$getOwner();
1405
1374
  $8tj43$onCleanup((0, $8tj43$observer).onexists(element, _ref2 => {
@@ -1432,49 +1401,49 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1432
1401
  for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $8tj43$catchify(() => setAnimationIsRunning(false)));
1433
1402
  disconnector();
1434
1403
  }));
1435
- }, _el$7);
1436
- $8tj43$insert(_el$9, () => {
1404
+ }, _el$3);
1405
+ $8tj43$insert(_el$5, () => {
1437
1406
  var _variantToUse$title, _variantToUse5;
1438
1407
  return (_variantToUse$title = (_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title) !== null && _variantToUse$title !== void 0 ? _variantToUse$title : $8tj43$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1439
1408
  height: "1em",
1440
1409
  width: "20ch"
1441
1410
  });
1442
1411
  });
1443
- $8tj43$insert(_el$10, (() => {
1412
+ $8tj43$insert(_el$6, (() => {
1444
1413
  var _c$ = $8tj43$memo(() => !!(!variantToUse() || salePrice.loading));
1445
1414
  return () => _c$() ? $8tj43$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1446
1415
  height: "1em",
1447
1416
  width: "20ch"
1448
1417
  }) : salePrice();
1449
1418
  })());
1450
- $8tj43$insert(_el$8, $8tj43$createComponent((0, $8tj43$Show), {
1419
+ $8tj43$insert(_el$4, $8tj43$createComponent((0, $8tj43$Show), {
1451
1420
  get when() {
1452
1421
  return isOnSale();
1453
1422
  },
1454
1423
  get children() {
1455
- var _el$11 = $8tj43$getNextElement($0c5b1686f971e5e7$var$_tmpl$2);
1456
- $8tj43$insert(_el$11, (() => {
1424
+ var _el$7 = $8tj43$getNextElement($0c5b1686f971e5e7$var$_tmpl$2);
1425
+ $8tj43$insert(_el$7, (() => {
1457
1426
  var _c$2 = $8tj43$memo(() => !!(!variantToUse() || originalPrice.loading));
1458
1427
  return () => _c$2() ? $8tj43$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1459
1428
  height: "1em",
1460
1429
  width: "20ch"
1461
1430
  }) : originalPrice();
1462
1431
  })());
1463
- return _el$11;
1432
+ return _el$7;
1464
1433
  }
1465
- }), _el$13, _co$3);
1466
- $8tj43$insert(_el$7, $8tj43$createComponent((0, $8tj43$Show), {
1434
+ }), _el$9, _co$);
1435
+ $8tj43$insert(_el$3, $8tj43$createComponent((0, $8tj43$Show), {
1467
1436
  when: FavoriteButton_,
1468
1437
  get children() {
1469
1438
  return $8tj43$createComponent(FavoriteButton, {
1470
1439
  display_: display_
1471
1440
  });
1472
1441
  }
1473
- }), _el$15, _co$4);
1474
- $8tj43$effect(() => _el$10.classList.toggle("sale", !!isOnSale()));
1475
- return _el$7;
1442
+ }), _el$11, _co$2);
1443
+ $8tj43$effect(() => _el$6.classList.toggle("sale", !!isOnSale()));
1444
+ return _el$3;
1476
1445
  }
1477
- }), _el$19, _co$6);
1446
+ }), _el$15, _co$4);
1478
1447
  $8tj43$runHydrationEvents();
1479
1448
  return _el$;
1480
1449
  })();
@@ -1650,16 +1619,23 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
1650
1619
  const us = Symbol("look");
1651
1620
  const container = (() => {
1652
1621
  var _el$ = $8tj43$getNextElement($697d8713dc82b9ab$var$_tmpl$);
1653
- $8tj43$addEventListener(_el$, "click", $8tj43$catchify(() => setUserWantsExpanded(prev => !prev)), true);
1622
+ $8tj43$addEventListener(_el$, "click", $8tj43$catchify(_ref2 => {
1623
+ let {
1624
+ target: target
1625
+ } = _ref2;
1626
+ // Don't toggle when clicking on the links
1627
+ if (target.matches("a") || target.closest("a")) return;
1628
+ setUserWantsExpanded(prev => !prev);
1629
+ }), true);
1654
1630
  _el$.classList.toggle("placeholder", !!!display_);
1655
1631
  $8tj43$runHydrationEvents();
1656
1632
  return _el$;
1657
1633
  })();
1658
1634
  const containerWidth_ = $fc830a7ee59416ef$export$ebdc3711f7e02ccd(container);
1659
- const clickHandler = $8tj43$catchify(_ref2 => {
1635
+ const clickHandler = $8tj43$catchify(_ref3 => {
1660
1636
  let {
1661
1637
  target: target
1662
- } = _ref2;
1638
+ } = _ref3;
1663
1639
  if (target !== container && !container.contains(target))
1664
1640
  // When clicking outside the look, close it
1665
1641
  setUserWantsExpanded(false);
@@ -12276,7 +12252,8 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
12276
12252
  selected_filters_: selected_filters_,
12277
12253
  local_filter_cache_: local_filter_cache_,
12278
12254
  get_extra_filters_button_: get_extra_filters_button_,
12279
- get_extra_sorting_button_: get_extra_sorting_button_
12255
+ get_extra_sorting_button_: get_extra_sorting_button_,
12256
+ filterModalParent_: filterModalParent_
12280
12257
  } = _ref;
12281
12258
  const Self = () => {
12282
12259
  // This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
@@ -12411,7 +12388,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
12411
12388
  formatted_number_of_results_: formatted_number_of_results_,
12412
12389
  dismiss_modal_: dismiss_modal_,
12413
12390
  i18n_: i18n_
12414
- }));
12391
+ }, filterModalParent_));
12415
12392
  const {
12416
12393
  remove: remove
12417
12394
  } = $8tj43$javascript_media_query("(max-width:651px)", _ref3 => {
@@ -13482,7 +13459,6 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
13482
13459
  market_: market_,
13483
13460
  showing_recommendation_rows_: showing_recommendation_rows_,
13484
13461
  layout_options_: layout_options_,
13485
- recommendations_layout_options_: recommendations_layout_options_,
13486
13462
  scroll_restoration_data_: scroll_restoration_data_,
13487
13463
  product_card_template_: product_card_template_,
13488
13464
  modalAlignmentSignalsRef_: modalAlignmentSignalsRef_,
@@ -13492,7 +13468,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
13492
13468
  content_search_enabled_: content_search_enabled_,
13493
13469
  content_blocks_by_row_: content_blocks_by_row_,
13494
13470
  modalVersionUsed_: modalVersionUsed_,
13495
- BackIcon_: BackIcon_
13471
+ BackIcon_: BackIcon_,
13472
+ filterModalParent_: filterModalParent_
13496
13473
  } = _ref;
13497
13474
  const [get_sorting] = current_sorting_;
13498
13475
  const all_products_loaded_ = $8tj43$createSignal(false);
@@ -13613,7 +13590,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
13613
13590
  formatted_number_of_results_: formatted_number_of_results_,
13614
13591
  local_filter_cache_: local_filter_cache_,
13615
13592
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
13616
- number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_
13593
+ number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
13594
+ filterModalParent_: filterModalParent_
13617
13595
  });
13618
13596
  const results_filters = $8tj43$createSignal();
13619
13597
  const owner = $8tj43$getOwner();
@@ -13872,12 +13850,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
13872
13850
  depict_api_: depict_api_,
13873
13851
  i18n_: i18n_,
13874
13852
  search_query_base_: search_query_base_,
13875
- get layout_options_() {
13876
- return $8tj43$createMemo(() => {
13877
- var _recommendations_layo;
13878
- return (_recommendations_layo = recommendations_layout_options_ === null || recommendations_layout_options_ === void 0 ? void 0 : recommendations_layout_options_()) !== null && _recommendations_layo !== void 0 ? _recommendations_layo : layout_options_();
13879
- });
13880
- },
13853
+ layout_options_: layout_options_,
13881
13854
  showing_recommendation_rows_: showing_recommendation_rows_,
13882
13855
  product_card_template_: product_card_template_,
13883
13856
  all_products_loaded_: get_all_products_loaded
@@ -14380,15 +14353,7 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
14380
14353
  cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77($3f7203368ad0d3ca$export$ff7109b9b2b206ba(props.cols_at_size)),
14381
14354
  ...grid_spacing_override()
14382
14355
  })),
14383
- recommendations_layout_options_: $8tj43$createMemo(() => {
14384
- const {
14385
- extra_depict_options: extra_depict_options
14386
- } = props;
14387
- return extra_depict_options !== null && extra_depict_options !== void 0 && extra_depict_options.recommendations_cols_at_size ? {
14388
- cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(extra_depict_options.recommendations_cols_at_size),
14389
- ...grid_spacing_override()
14390
- } : undefined;
14391
- }),
14356
+ filterModalParent_: $8tj43$untrack(() => props.filterModalParent_),
14392
14357
  product_card_template_: product_card_template
14393
14358
  });
14394
14359
  }, "Entire SearchPage failed");
@@ -15342,7 +15307,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
15342
15307
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15343
15308
  sorting_query_param_: sorting_query_param_,
15344
15309
  filter_query_param_prefix_: filter_query_param_prefix_,
15345
- content_blocks_by_row_: content_blocks_by_row_
15310
+ content_blocks_by_row_: content_blocks_by_row_,
15311
+ filterModalParent_: filterModalParent_
15346
15312
  } = _ref;
15347
15313
  let results_for;
15348
15314
  let only_show_filters_opener_;
@@ -15545,6 +15511,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
15545
15511
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15546
15512
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
15547
15513
  sort_and_filter_disabled_: sort_and_filter_disabled_,
15514
+ filterModalParent_: filterModalParent_,
15548
15515
  ...extra_sort_and_filter_args_
15549
15516
  });
15550
15517
  $8tj43$catchify1((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
@@ -15833,6 +15800,7 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
15833
15800
  category_sorting_open_: category_sorting_open_,
15834
15801
  expanded_filters_: expanded_filters_,
15835
15802
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
15803
+ filterModalParent_: $8tj43$untrack(() => props.filterModalParent_),
15836
15804
  selected_filters_: selected_filters_,
15837
15805
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
15838
15806
  content_blocks_by_row_: () => props.content_blocks_by_row,