@depict-ai/ui 4.2.0 → 4.2.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.
@@ -1,5 +1,5 @@
1
1
  import { add_to_version_info as $b8hua$add_to_version_info, fetch_retry as $b8hua$fetch_retry, base_url as $b8hua$base_url, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, catchify as $b8hua$catchify, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, observer as $b8hua$observer, javascript_media_query as $b8hua$javascript_media_query, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem, dwarn as $b8hua$dwarn, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ContainedImage as $b8hua$ContainedImage, standard_price_format as $b8hua$standard_price_format, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, use_href_accessor as $b8hua$use_href_accessor, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, useExpandingContainer as $b8hua$useExpandingContainer, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, ListenableSet as $b8hua$ListenableSet1, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
2
- import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, escape as $b8hua$escape, createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, ssrStyle as $b8hua$ssrStyle, spread as $b8hua$spread, Dynamic as $b8hua$Dynamic } from "solid-js/web";
2
+ import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, escape as $b8hua$escape, createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, spread as $b8hua$spread, Dynamic as $b8hua$Dynamic } from "solid-js/web";
3
3
  import { createSignal as $b8hua$createSignal, createMemo as $b8hua$createMemo, createResource as $b8hua$createResource, Show as $b8hua$Show, Suspense as $b8hua$Suspense, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, onCleanup as $b8hua$onCleanup, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, createEffect as $b8hua$createEffect, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, splitProps as $b8hua$splitProps, mergeProps as $b8hua$mergeProps1, on as $b8hua$on, batch as $b8hua$batch, createSelector as $b8hua$createSelector, children as $b8hua$children, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
4
4
  import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify1, use_href_accessor as $b8hua$use_href_accessor1, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
5
5
  import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$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.0";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.2.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++) {
@@ -1173,22 +1173,43 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1173
1173
  outerRef_: outerRef_,
1174
1174
  animationDuration_: animationDuration_
1175
1175
  } = _ref;
1176
- const variantToUse = display_ === null || display_ === void 0 ? void 0 : display_.variant_displays[display_ === null || display_ === void 0 ? void 0 : display_.variant_index];
1177
- const imageUrls = variantToUse === null || variantToUse === void 0 ? void 0 : variantToUse.image_urls;
1178
- const imageUrl = imageUrls === null || imageUrls === void 0 ? void 0 : imageUrls[0];
1179
- const secondaryImageUrl = imageUrls === null || imageUrls === void 0 ? void 0 : imageUrls[1];
1176
+ const variantToUse = $b8hua$createMemo(() => {
1177
+ const display = display_();
1178
+ return display === null || display === void 0 ? void 0 : display.variant_displays[display === null || display === void 0 ? void 0 : display.variant_index];
1179
+ });
1180
+ const imageUrls = () => {
1181
+ var _variantToUse;
1182
+ return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : _variantToUse.image_urls;
1183
+ };
1184
+ const imageUrl = $b8hua$createMemo(() => {
1185
+ var _imageUrls;
1186
+ return (_imageUrls = imageUrls()) === null || _imageUrls === void 0 ? void 0 : _imageUrls[0];
1187
+ });
1188
+ const secondaryImageUrl = $b8hua$createMemo(() => {
1189
+ var _imageUrls2;
1190
+ return (_imageUrls2 = imageUrls()) === null || _imageUrls2 === void 0 ? void 0 : _imageUrls2[1];
1191
+ });
1180
1192
  const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
1181
1193
  const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $b8hua$createSignal($b8hua$untrack(isExpanded_));
1182
1194
  const [animationEffectExists, setAnimationEffectExists] = $b8hua$createSignal(false);
1183
- const [salePrice] = $b8hua$createResource(() => variantToUse === null || variantToUse === void 0 ? void 0 : variantToUse.sale_price);
1184
- const [originalPrice] = $b8hua$createResource(() => variantToUse === null || variantToUse === void 0 ? void 0 : variantToUse.original_price);
1195
+ const [salePrice] = $b8hua$createResource(() => {
1196
+ var _variantToUse2;
1197
+ return (_variantToUse2 = variantToUse()) === null || _variantToUse2 === void 0 ? void 0 : _variantToUse2.sale_price;
1198
+ });
1199
+ const [originalPrice] = $b8hua$createResource(() => {
1200
+ var _variantToUse3;
1201
+ return (_variantToUse3 = variantToUse()) === null || _variantToUse3 === void 0 ? void 0 : _variantToUse3.original_price;
1202
+ });
1185
1203
  const isOnSale = $b8hua$createMemo(() => salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense
1186
1204
  const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
1187
1205
  return $b8hua$ssrElement("a", $b8hua$mergeProps({
1188
1206
  "class": "look-item"
1189
- }, () => isExpanded_() && !animationIsRunning() ? {
1190
- href: variantToUse === null || variantToUse === void 0 ? void 0 : variantToUse.page_url
1191
- } : {}), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
1207
+ }, () => {
1208
+ var _variantToUse4;
1209
+ return isExpanded_() && !animationIsRunning() ? {
1210
+ href: (_variantToUse4 = variantToUse()) === null || _variantToUse4 === void 0 ? void 0 : _variantToUse4.page_url
1211
+ } : {};
1212
+ }), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
1192
1213
  when: imageUrl,
1193
1214
  get fallback() {
1194
1215
  return $b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
@@ -1196,19 +1217,37 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1196
1217
  });
1197
1218
  },
1198
1219
  get children() {
1199
- return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
1200
- src: imageUrl,
1201
- get aspectRatio() {
1202
- return isExpanded_() ? 0.75 : 1;
1220
+ return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
1221
+ get when() {
1222
+ return imageUrl();
1203
1223
  },
1204
- get autoAdjustAspectRatio() {
1205
- return isExpanded_() ? "smoothed" : false;
1224
+ get fallback() {
1225
+ return $b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
1226
+ aspectRatio: 1
1227
+ });
1228
+ },
1229
+ get children() {
1230
+ return $b8hua$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
1231
+ get src() {
1232
+ return imageUrl();
1233
+ },
1234
+ get aspectRatio() {
1235
+ return isExpanded_() ? 0.75 : 1;
1236
+ },
1237
+ get autoAdjustAspectRatio() {
1238
+ return isExpanded_() ? "smoothed" : false;
1239
+ }
1240
+ });
1206
1241
  }
1207
1242
  })), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
1208
- when: secondaryImageUrl,
1243
+ get when() {
1244
+ return secondaryImageUrl();
1245
+ },
1209
1246
  get children() {
1210
1247
  return $b8hua$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
1211
- src: secondaryImageUrl,
1248
+ get src() {
1249
+ return secondaryImageUrl();
1250
+ },
1212
1251
  get aspectRatio() {
1213
1252
  return isExpanded_() ? 0.75 : 1;
1214
1253
  },
@@ -1225,11 +1264,11 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1225
1264
  return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : isExpanded_()) || animationIsRunning();
1226
1265
  },
1227
1266
  get children() {
1228
- var _$escape2;
1229
- return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$3, $b8hua$ssrHydrationKey(), (_$escape2 = $b8hua$escape(variantToUse === null || variantToUse === void 0 ? void 0 : variantToUse.title)) !== null && _$escape2 !== void 0 ? _$escape2 : $b8hua$escape($b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1267
+ var _$escape2, _variantToUse5;
1268
+ return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$3, $b8hua$ssrHydrationKey(), (_$escape2 = $b8hua$escape((_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title)) !== null && _$escape2 !== void 0 ? _$escape2 : $b8hua$escape($b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1230
1269
  height: "1em",
1231
1270
  width: "20ch"
1232
- })), "d-price ".concat(isOnSale() ? "sale" : ""), !variantToUse || salePrice.loading ? $b8hua$escape($b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1271
+ })), "d-price ".concat(isOnSale() ? "sale" : ""), !variantToUse() || salePrice.loading ? $b8hua$escape($b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1233
1272
  height: "1em",
1234
1273
  width: "20ch"
1235
1274
  })) : $b8hua$escape(salePrice()), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
@@ -1237,7 +1276,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
1237
1276
  return isOnSale();
1238
1277
  },
1239
1278
  get children() {
1240
- return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$2, $b8hua$ssrHydrationKey(), !variantToUse || originalPrice.loading ? $b8hua$escape($b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1279
+ return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$2, $b8hua$ssrHydrationKey(), !variantToUse() || originalPrice.loading ? $b8hua$escape($b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
1241
1280
  height: "1em",
1242
1281
  width: "20ch"
1243
1282
  })) : $b8hua$escape(originalPrice()));
@@ -1295,7 +1334,7 @@ async function $72017ebd8b9df947$var$checkIfIsAffectedByChromeBug326498383() {
1295
1334
  // Passive to make it more likely to run the callback before our timeout if the browser is under high load during the test
1296
1335
  {
1297
1336
  once: true,
1298
- passive: true
1337
+ passive: false
1299
1338
  });
1300
1339
  await timeoutPromise;
1301
1340
  } catch (e) {
@@ -1303,7 +1342,7 @@ async function $72017ebd8b9df947$var$checkIfIsAffectedByChromeBug326498383() {
1303
1342
  }
1304
1343
  return isAffected;
1305
1344
  }
1306
- var $4089a7972a508539$var$_tmpl$ = ["<div", ' class="scroll-padding"><div class="', '" style="', '">', "</div></div>"];
1345
+ var $4089a7972a508539$var$_tmpl$ = ["<div", ' class="scroll-padding">', "</div>"];
1307
1346
  function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
1308
1347
  let {
1309
1348
  displays_: displays_,
@@ -1320,31 +1359,42 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
1320
1359
  // The following three signals just contain the state if the animations are actually running and should only be set by the respective animation code
1321
1360
  const textFadeInAnimationRunning = $b8hua$createSignal(false);
1322
1361
  const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
1323
- // These expanded variables are what's used to trigger the second and first phase animations
1324
1362
  $72017ebd8b9df947$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
1325
1363
  return $b8hua$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
1326
1364
  get children() {
1327
1365
  return $b8hua$createComponent((0, $b8hua$Show), {
1328
1366
  get when() {
1329
- return containerWidth_();
1367
+ return containerWidth_() || !displays_;
1330
1368
  },
1331
1369
  get children() {
1332
- return $b8hua$ssr($4089a7972a508539$var$_tmpl$, $b8hua$ssrHydrationKey(), "look-overlay ".concat(userWantsExpanded() ? "expanded" : "", " ").concat(!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : ""), $b8hua$ssrStyle("--look-card-width:".concat(containerWidth_(), "px;--look-item-height:").concat(lookItemHeight() || 200, "px")), $b8hua$escape($b8hua$createComponent((0, $b8hua$For), {
1333
- each: displays_,
1334
- children: (display, index) => $b8hua$createComponent((0, $0c5b1686f971e5e7$export$b73ed90f0ee50dc3), {
1335
- animationDuration_: animationDuration_,
1336
- display_: display,
1337
- FavoriteButton_: FavoriteButton_,
1338
- isExpanded_: userWantsExpanded,
1339
- textFadeInAnimationRunning_: textFadeInAnimationRunning,
1340
- outerRef_: el => $b8hua$createEffect(() => {
1341
- if (index() !== 0) return;
1342
- const resizeObserver = new ResizeObserver($b8hua$catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
1343
- resizeObserver.observe(el);
1344
- $b8hua$onCleanup(() => resizeObserver.disconnect());
1345
- })
1346
- })
1347
- })));
1370
+ return $b8hua$ssr($4089a7972a508539$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrElement("div", $b8hua$mergeProps({
1371
+ get ["class"]() {
1372
+ return "look-overlay ".concat(userWantsExpanded() ? "expanded" : "", " ").concat(!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : "");
1373
+ }
1374
+ }, () => displays_ && {
1375
+ style: "--look-card-width:".concat(containerWidth_(), "px;--look-item-height:").concat(lookItemHeight() || 200, "px")
1376
+ }), () => $b8hua$escape($b8hua$createComponent((0, $b8hua$Index), {
1377
+ get each() {
1378
+ return displays_ || Array.from({
1379
+ length: 4
1380
+ });
1381
+ },
1382
+ children: (display, index) => {
1383
+ return $b8hua$createComponent((0, $0c5b1686f971e5e7$export$b73ed90f0ee50dc3), {
1384
+ animationDuration_: animationDuration_,
1385
+ display_: display,
1386
+ FavoriteButton_: FavoriteButton_,
1387
+ isExpanded_: userWantsExpanded,
1388
+ textFadeInAnimationRunning_: textFadeInAnimationRunning,
1389
+ outerRef_: el => $b8hua$createEffect(() => {
1390
+ if (index !== 0) return;
1391
+ const resizeObserver = new ResizeObserver($b8hua$catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
1392
+ resizeObserver.observe(el);
1393
+ $b8hua$onCleanup(() => resizeObserver.disconnect());
1394
+ })
1395
+ });
1396
+ }
1397
+ })), false));
1348
1398
  }
1349
1399
  });
1350
1400
  }
@@ -1370,30 +1420,35 @@ function $4089a7972a508539$var$scrollingFunctionForChrome(element, targetScrollY
1370
1420
  // Bootstrap our animation - it will get called right before next frame shall be rendered.
1371
1421
  requestAnimationFrame(step);
1372
1422
  }
1373
- var $697d8713dc82b9ab$var$_tmpl$ = ["<div", ' class="look-card" style="', '"></div>'];
1374
- function $697d8713dc82b9ab$export$44809a8a3e867e30(display, info, FavoriteButton_) {
1423
+ var $697d8713dc82b9ab$var$_tmpl$ = ["<div", ' class="', '"></div>'];
1424
+ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
1425
+ let {
1426
+ display_: display_,
1427
+ expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
1428
+ FavoriteButton_: FavoriteButton_,
1429
+ placeholderImageAspectRatio_: placeholderImageAspectRatio_,
1430
+ animationDuration_: animationDuration_
1431
+ } = _ref;
1375
1432
  // TODO: shopify, run displayTransformers to get dynamic prices
1376
1433
  // TODO: format prices
1377
- const animationDuration_ = 300;
1378
- const [coverImage] = (display === null || display === void 0 ? void 0 : display.image_urls) || [];
1434
+ const [coverImage] = (display_ === null || display_ === void 0 ? void 0 : display_.image_urls) || [];
1379
1435
  const useWantsExpandedSignal_ = $b8hua$createSignal(false);
1380
1436
  const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
1381
- const [expandedLooks_, setExpandedLooks] = (info === null || info === void 0 ? void 0 : info.expandedLooksSignal_) || [];
1382
1437
  const supportsHover_ = $00a5b94f0c11efbb$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
1383
1438
  const us = Symbol("look");
1384
- const container = $b8hua$ssr($697d8713dc82b9ab$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("--animation-duration: ".concat(animationDuration_, "ms")));
1439
+ const container = $b8hua$ssr($697d8713dc82b9ab$var$_tmpl$, $b8hua$ssrHydrationKey(), "look-card ".concat(!display_ ? "placeholder" : ""));
1385
1440
  const containerWidth_ = $fc830a7ee59416ef$export$ebdc3711f7e02ccd(container);
1386
- const clickHandler = $b8hua$catchify(_ref => {
1441
+ const clickHandler = $b8hua$catchify(_ref2 => {
1387
1442
  let {
1388
1443
  target: target
1389
- } = _ref;
1444
+ } = _ref2;
1390
1445
  if (target !== container && !container.contains(target))
1391
1446
  // When clicking outside the look, close it
1392
1447
  setUserWantsExpanded(false);
1393
1448
  });
1394
1449
  addEventListener("click", clickHandler);
1395
1450
  $b8hua$onCleanup(() => removeEventListener("click", clickHandler));
1396
- $b8hua$createEffect(() => setExpandedLooks === null || setExpandedLooks === void 0 ? void 0 : setExpandedLooks(prev => {
1451
+ $b8hua$createEffect(() => setExpandedLooks(prev => {
1397
1452
  if (userWantsExpanded()) {
1398
1453
  // Close the other expanded looks
1399
1454
  prev.clear();
@@ -1403,41 +1458,41 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(display, info, FavoriteButton
1403
1458
  return prev;
1404
1459
  }));
1405
1460
  // Close us if another look expands
1406
- $b8hua$createEffect(() => expandedLooks_ && !expandedLooks_().has(us) && setUserWantsExpanded(false));
1407
- $b8hua$insert(container, () => $b8hua$createComponent((0, $b8hua$Show), {
1408
- when: display,
1461
+ $b8hua$createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
1462
+ $b8hua$insert(container, () => [$b8hua$createComponent((0, $b8hua$Show), {
1463
+ when: display_,
1409
1464
  get fallback() {
1410
1465
  return $b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
1411
- width: "100%",
1412
- height: "100%"
1466
+ aspectRatio: placeholderImageAspectRatio_
1413
1467
  });
1414
1468
  },
1415
1469
  get children() {
1416
- return [$b8hua$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
1470
+ return $b8hua$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
1417
1471
  src: coverImage,
1418
- aspectRatio: 0.75,
1472
+ aspectRatio: placeholderImageAspectRatio_,
1419
1473
  autoAdjustAspectRatio: true
1420
- }), $b8hua$createComponent((0, $4089a7972a508539$export$ebf0b1d4f90c09ae), {
1421
- get displays_() {
1422
- return display === null || display === void 0 ? void 0 : display.displays;
1423
- },
1424
- userWantsExpandedSignal_: useWantsExpandedSignal_,
1425
- containerWidth_: containerWidth_,
1426
- animationDuration_: animationDuration_,
1427
- supportsHover_: supportsHover_,
1428
- FavoriteButton_: FavoriteButton_
1429
- })];
1474
+ });
1430
1475
  }
1431
- }));
1476
+ }), $b8hua$createComponent((0, $4089a7972a508539$export$ebf0b1d4f90c09ae), {
1477
+ get displays_() {
1478
+ return display_ === null || display_ === void 0 ? void 0 : display_.displays;
1479
+ },
1480
+ userWantsExpandedSignal_: useWantsExpandedSignal_,
1481
+ containerWidth_: containerWidth_,
1482
+ animationDuration_: animationDuration_,
1483
+ supportsHover_: supportsHover_,
1484
+ FavoriteButton_: FavoriteButton_
1485
+ })]);
1432
1486
  return container;
1433
1487
  }
1434
- var $cee56a95f722f55f$var$_tmpl$ = ["<div", ' class="depict recommendations looks">', "</div>"];
1488
+ var $cee56a95f722f55f$var$_tmpl$ = ["<div", ' class="depict recommendations looks" style="', '">', "</div>"];
1435
1489
  let $cee56a95f722f55f$var$expandedLooksSignal_;
1436
1490
  function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
1437
1491
  return $83e8cf2c0b87a58a$export$23fca46f3143581f(() => {
1438
1492
  $cee56a95f722f55f$var$expandedLooksSignal_ || ($cee56a95f722f55f$var$expandedLooksSignal_ = $b8hua$createSignal(new Set(), {
1439
1493
  equals: false
1440
1494
  }));
1495
+ const expandingAnimationDuration = 240;
1441
1496
  const grid_spacing_override = $b8hua$createMemo(() => {
1442
1497
  const {
1443
1498
  gridSpacing_: gridSpacing_
@@ -1469,13 +1524,16 @@ function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
1469
1524
  return [];
1470
1525
  return decoded.listings;
1471
1526
  });
1472
- return $b8hua$ssr($cee56a95f722f55f$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
1527
+ return $b8hua$ssr($cee56a95f722f55f$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("--animation-duration: ".concat(expandingAnimationDuration, "ms")), $b8hua$escape($b8hua$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
1473
1528
  get children() {
1474
1529
  return $39ddb986053fb759$export$d41d19e89346fa2({
1475
- product_card_template_: (display, info) => $697d8713dc82b9ab$export$44809a8a3e867e30(display, info ? {
1476
- ...info,
1530
+ product_card_template_: (display, info) => $697d8713dc82b9ab$export$44809a8a3e867e30({
1531
+ display_: display,
1532
+ FavoriteButton_: props.FavoriteButton_,
1533
+ placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
1534
+ animationDuration_: expandingAnimationDuration,
1477
1535
  expandedLooksSignal_: $cee56a95f722f55f$var$expandedLooksSignal_
1478
- } : info, props.FavoriteButton_),
1536
+ }),
1479
1537
  recommendations_resource_: looksResource,
1480
1538
  title_: () => props.title_,
1481
1539
  layout_options_: $b8hua$createMemo(() => ({