@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.
- package/ES10/index.cjs +140 -85
- package/ES10/index.d.ts +2 -1
- package/ES10/index.js +140 -85
- package/latest/index.cjs +116 -80
- package/latest/index.d.ts +2 -1
- package/latest/index.js +116 -80
- package/package.json +4 -4
- package/server/ES10/index.cjs +132 -74
- package/server/ES10/index.d.ts +2 -1
- package/server/ES10/index.js +133 -75
- package/server/latest/index.cjs +108 -69
- package/server/latest/index.d.ts +2 -1
- package/server/latest/index.js +109 -70
package/server/latest/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
94
94
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
95
95
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
96
96
|
/*! Depict.ai search and product listing SDK */
|
|
97
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.2.
|
|
97
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.2.1";
|
|
98
98
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
99
99
|
const cols_at_size = [];
|
|
100
100
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -1208,21 +1208,24 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1208
1208
|
outerRef_: outerRef_,
|
|
1209
1209
|
animationDuration_: animationDuration_
|
|
1210
1210
|
}) {
|
|
1211
|
-
const variantToUse =
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1211
|
+
const variantToUse = $5vyXB$solidjs.createMemo(() => {
|
|
1212
|
+
const display = display_();
|
|
1213
|
+
return display?.variant_displays[display?.variant_index];
|
|
1214
|
+
});
|
|
1215
|
+
const imageUrls = () => variantToUse()?.image_urls;
|
|
1216
|
+
const imageUrl = $5vyXB$solidjs.createMemo(() => imageUrls()?.[0]);
|
|
1217
|
+
const secondaryImageUrl = $5vyXB$solidjs.createMemo(() => imageUrls()?.[1]);
|
|
1215
1218
|
const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
|
|
1216
1219
|
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $5vyXB$solidjs.createSignal($5vyXB$solidjs.untrack(isExpanded_));
|
|
1217
1220
|
const [animationEffectExists, setAnimationEffectExists] = $5vyXB$solidjs.createSignal(false);
|
|
1218
|
-
const [salePrice] = $5vyXB$solidjs.createResource(() => variantToUse?.sale_price);
|
|
1219
|
-
const [originalPrice] = $5vyXB$solidjs.createResource(() => variantToUse?.original_price);
|
|
1221
|
+
const [salePrice] = $5vyXB$solidjs.createResource(() => variantToUse()?.sale_price);
|
|
1222
|
+
const [originalPrice] = $5vyXB$solidjs.createResource(() => variantToUse()?.original_price);
|
|
1220
1223
|
const isOnSale = $5vyXB$solidjs.createMemo(() => salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense
|
|
1221
1224
|
const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
|
|
1222
1225
|
return $5vyXB$solidjsweb.ssrElement("a", $5vyXB$solidjsweb.mergeProps({
|
|
1223
1226
|
"class": "look-item"
|
|
1224
1227
|
}, () => isExpanded_() && !animationIsRunning() ? {
|
|
1225
|
-
href: variantToUse?.page_url
|
|
1228
|
+
href: variantToUse()?.page_url
|
|
1226
1229
|
} : {}), () => ["<!--$-->", $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1227
1230
|
when: imageUrl,
|
|
1228
1231
|
get fallback() {
|
|
@@ -1231,19 +1234,37 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1231
1234
|
});
|
|
1232
1235
|
},
|
|
1233
1236
|
get children() {
|
|
1234
|
-
return $5vyXB$solidjsweb.ssr($1ae437d7d388a66e$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1237
|
+
return $5vyXB$solidjsweb.ssr($1ae437d7d388a66e$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1238
|
+
get when() {
|
|
1239
|
+
return imageUrl();
|
|
1240
|
+
},
|
|
1241
|
+
get fallback() {
|
|
1242
|
+
return $5vyXB$solidjsweb.createComponent((0, $3bc4a89b971a3af5$export$3f37af283f8fb843), {
|
|
1243
|
+
aspectRatio: 1
|
|
1244
|
+
});
|
|
1238
1245
|
},
|
|
1239
|
-
get
|
|
1240
|
-
return
|
|
1246
|
+
get children() {
|
|
1247
|
+
return $5vyXB$solidjsweb.createComponent((0, $d212a67662c5cf38$export$9d4a4b669b1929ab), {
|
|
1248
|
+
get src() {
|
|
1249
|
+
return imageUrl();
|
|
1250
|
+
},
|
|
1251
|
+
get aspectRatio() {
|
|
1252
|
+
return isExpanded_() ? 0.75 : 1;
|
|
1253
|
+
},
|
|
1254
|
+
get autoAdjustAspectRatio() {
|
|
1255
|
+
return isExpanded_() ? "smoothed" : false;
|
|
1256
|
+
}
|
|
1257
|
+
});
|
|
1241
1258
|
}
|
|
1242
1259
|
})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1243
|
-
when
|
|
1260
|
+
get when() {
|
|
1261
|
+
return secondaryImageUrl();
|
|
1262
|
+
},
|
|
1244
1263
|
get children() {
|
|
1245
1264
|
return $5vyXB$solidjsweb.createComponent((0, $d212a67662c5cf38$export$9d4a4b669b1929ab), {
|
|
1246
|
-
src
|
|
1265
|
+
get src() {
|
|
1266
|
+
return secondaryImageUrl();
|
|
1267
|
+
},
|
|
1247
1268
|
get aspectRatio() {
|
|
1248
1269
|
return isExpanded_() ? 0.75 : 1;
|
|
1249
1270
|
},
|
|
@@ -1260,10 +1281,10 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1260
1281
|
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : isExpanded_()) || animationIsRunning();
|
|
1261
1282
|
},
|
|
1262
1283
|
get children() {
|
|
1263
|
-
return $5vyXB$solidjsweb.ssr($1ae437d7d388a66e$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(variantToUse?.title) ?? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
1284
|
+
return $5vyXB$solidjsweb.ssr($1ae437d7d388a66e$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(variantToUse()?.title) ?? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
1264
1285
|
height: "1em",
|
|
1265
1286
|
width: "20ch"
|
|
1266
|
-
})), `d-price ${isOnSale() ? "sale" : ""}`, !variantToUse || salePrice.loading ? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
1287
|
+
})), `d-price ${isOnSale() ? "sale" : ""}`, !variantToUse() || salePrice.loading ? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
1267
1288
|
height: "1em",
|
|
1268
1289
|
width: "20ch"
|
|
1269
1290
|
})) : $5vyXB$solidjsweb.escape(salePrice()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
@@ -1271,7 +1292,7 @@ function $1ae437d7d388a66e$export$b73ed90f0ee50dc3({
|
|
|
1271
1292
|
return isOnSale();
|
|
1272
1293
|
},
|
|
1273
1294
|
get children() {
|
|
1274
|
-
return $5vyXB$solidjsweb.ssr($1ae437d7d388a66e$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), !variantToUse || originalPrice.loading ? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
1295
|
+
return $5vyXB$solidjsweb.ssr($1ae437d7d388a66e$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), !variantToUse() || originalPrice.loading ? $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
1275
1296
|
height: "1em",
|
|
1276
1297
|
width: "20ch"
|
|
1277
1298
|
})) : $5vyXB$solidjsweb.escape(originalPrice()));
|
|
@@ -1329,7 +1350,7 @@ async function $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1329
1350
|
// Passive to make it more likely to run the callback before our timeout if the browser is under high load during the test
|
|
1330
1351
|
{
|
|
1331
1352
|
once: true,
|
|
1332
|
-
passive:
|
|
1353
|
+
passive: false
|
|
1333
1354
|
});
|
|
1334
1355
|
await timeoutPromise;
|
|
1335
1356
|
} catch (e) {
|
|
@@ -1337,7 +1358,7 @@ async function $b9e830d616d01b31$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1337
1358
|
}
|
|
1338
1359
|
return isAffected;
|
|
1339
1360
|
}
|
|
1340
|
-
var $905010a06f9aeae5$var$_tmpl$ = ["<div", ' class="scroll-padding"
|
|
1361
|
+
var $905010a06f9aeae5$var$_tmpl$ = ["<div", ' class="scroll-padding">', "</div>"];
|
|
1341
1362
|
function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
1342
1363
|
displays_: displays_,
|
|
1343
1364
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1353,31 +1374,42 @@ function $905010a06f9aeae5$export$ebf0b1d4f90c09ae({
|
|
|
1353
1374
|
// The following three signals just contain the state if the animations are actually running and should only be set by the respective animation code
|
|
1354
1375
|
const textFadeInAnimationRunning = $5vyXB$solidjs.createSignal(false);
|
|
1355
1376
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1356
|
-
// These expanded variables are what's used to trigger the second and first phase animations
|
|
1357
1377
|
$b9e830d616d01b31$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1358
1378
|
return $5vyXB$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
1359
1379
|
get children() {
|
|
1360
1380
|
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1361
1381
|
get when() {
|
|
1362
|
-
return containerWidth_();
|
|
1382
|
+
return containerWidth_() || !displays_;
|
|
1363
1383
|
},
|
|
1364
1384
|
get children() {
|
|
1365
|
-
return $5vyXB$solidjsweb.ssr($905010a06f9aeae5$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(),
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1385
|
+
return $5vyXB$solidjsweb.ssr($905010a06f9aeae5$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrElement("div", $5vyXB$solidjsweb.mergeProps({
|
|
1386
|
+
get ["class"]() {
|
|
1387
|
+
return `look-overlay ${userWantsExpanded() ? "expanded" : ""} ${!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : ""}`;
|
|
1388
|
+
}
|
|
1389
|
+
}, () => displays_ && {
|
|
1390
|
+
style: `--look-card-width:${containerWidth_()}px;--look-item-height:${lookItemHeight() || 200}px`
|
|
1391
|
+
}), () => $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Index), {
|
|
1392
|
+
get each() {
|
|
1393
|
+
return displays_ || Array.from({
|
|
1394
|
+
length: 4
|
|
1395
|
+
});
|
|
1396
|
+
},
|
|
1397
|
+
children: (display, index) => {
|
|
1398
|
+
return $5vyXB$solidjsweb.createComponent((0, $1ae437d7d388a66e$export$b73ed90f0ee50dc3), {
|
|
1399
|
+
animationDuration_: animationDuration_,
|
|
1400
|
+
display_: display,
|
|
1401
|
+
FavoriteButton_: FavoriteButton_,
|
|
1402
|
+
isExpanded_: userWantsExpanded,
|
|
1403
|
+
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
1404
|
+
outerRef_: el => $5vyXB$solidjs.createEffect(() => {
|
|
1405
|
+
if (index !== 0) return;
|
|
1406
|
+
const resizeObserver = new ResizeObserver($5vyXB$depictaiutilishared.catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
1407
|
+
resizeObserver.observe(el);
|
|
1408
|
+
$5vyXB$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
1409
|
+
})
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
})), false));
|
|
1381
1413
|
}
|
|
1382
1414
|
});
|
|
1383
1415
|
}
|
|
@@ -1403,18 +1435,22 @@ function $905010a06f9aeae5$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1403
1435
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1404
1436
|
requestAnimationFrame(step);
|
|
1405
1437
|
}
|
|
1406
|
-
var $ad882bbe664dbd53$var$_tmpl$ = ["<div", ' class="
|
|
1407
|
-
function $ad882bbe664dbd53$export$44809a8a3e867e30(
|
|
1438
|
+
var $ad882bbe664dbd53$var$_tmpl$ = ["<div", ' class="', '"></div>'];
|
|
1439
|
+
function $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
1440
|
+
display_: display_,
|
|
1441
|
+
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
1442
|
+
FavoriteButton_: FavoriteButton_,
|
|
1443
|
+
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
1444
|
+
animationDuration_: animationDuration_
|
|
1445
|
+
}) {
|
|
1408
1446
|
// TODO: shopify, run displayTransformers to get dynamic prices
|
|
1409
1447
|
// TODO: format prices
|
|
1410
|
-
const
|
|
1411
|
-
const [coverImage] = display?.image_urls || [];
|
|
1448
|
+
const [coverImage] = display_?.image_urls || [];
|
|
1412
1449
|
const useWantsExpandedSignal_ = $5vyXB$solidjs.createSignal(false);
|
|
1413
1450
|
const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
|
|
1414
|
-
const [expandedLooks_, setExpandedLooks] = info?.expandedLooksSignal_ || [];
|
|
1415
1451
|
const supportsHover_ = $b54e6192d0caa293$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
|
|
1416
1452
|
const us = Symbol("look");
|
|
1417
|
-
const container = $5vyXB$solidjsweb.ssr($ad882bbe664dbd53$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(),
|
|
1453
|
+
const container = $5vyXB$solidjsweb.ssr($ad882bbe664dbd53$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `look-card ${!display_ ? "placeholder" : ""}`);
|
|
1418
1454
|
const containerWidth_ = $f13855d1b951b24a$export$ebdc3711f7e02ccd(container);
|
|
1419
1455
|
const clickHandler = $5vyXB$depictaiutilishared.catchify(({
|
|
1420
1456
|
target: target
|
|
@@ -1425,7 +1461,7 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30(display, info, FavoriteButton
|
|
|
1425
1461
|
});
|
|
1426
1462
|
addEventListener("click", clickHandler);
|
|
1427
1463
|
$5vyXB$solidjs.onCleanup(() => removeEventListener("click", clickHandler));
|
|
1428
|
-
$5vyXB$solidjs.createEffect(() => setExpandedLooks
|
|
1464
|
+
$5vyXB$solidjs.createEffect(() => setExpandedLooks(prev => {
|
|
1429
1465
|
if (userWantsExpanded()) {
|
|
1430
1466
|
// Close the other expanded looks
|
|
1431
1467
|
prev.clear();
|
|
@@ -1435,41 +1471,41 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30(display, info, FavoriteButton
|
|
|
1435
1471
|
return prev;
|
|
1436
1472
|
}));
|
|
1437
1473
|
// Close us if another look expands
|
|
1438
|
-
$5vyXB$solidjs.createEffect(() =>
|
|
1439
|
-
$5vyXB$solidjsweb.insert(container, () => $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1440
|
-
when:
|
|
1474
|
+
$5vyXB$solidjs.createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1475
|
+
$5vyXB$solidjsweb.insert(container, () => [$5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1476
|
+
when: display_,
|
|
1441
1477
|
get fallback() {
|
|
1442
1478
|
return $5vyXB$solidjsweb.createComponent((0, $3bc4a89b971a3af5$export$3f37af283f8fb843), {
|
|
1443
|
-
|
|
1444
|
-
height: "100%"
|
|
1479
|
+
aspectRatio: placeholderImageAspectRatio_
|
|
1445
1480
|
});
|
|
1446
1481
|
},
|
|
1447
1482
|
get children() {
|
|
1448
|
-
return
|
|
1483
|
+
return $5vyXB$solidjsweb.createComponent((0, $d212a67662c5cf38$export$9d4a4b669b1929ab), {
|
|
1449
1484
|
src: coverImage,
|
|
1450
|
-
aspectRatio:
|
|
1485
|
+
aspectRatio: placeholderImageAspectRatio_,
|
|
1451
1486
|
autoAdjustAspectRatio: true
|
|
1452
|
-
})
|
|
1453
|
-
get displays_() {
|
|
1454
|
-
return display?.displays;
|
|
1455
|
-
},
|
|
1456
|
-
userWantsExpandedSignal_: useWantsExpandedSignal_,
|
|
1457
|
-
containerWidth_: containerWidth_,
|
|
1458
|
-
animationDuration_: animationDuration_,
|
|
1459
|
-
supportsHover_: supportsHover_,
|
|
1460
|
-
FavoriteButton_: FavoriteButton_
|
|
1461
|
-
})];
|
|
1487
|
+
});
|
|
1462
1488
|
}
|
|
1463
|
-
}))
|
|
1489
|
+
}), $5vyXB$solidjsweb.createComponent((0, $905010a06f9aeae5$export$ebf0b1d4f90c09ae), {
|
|
1490
|
+
get displays_() {
|
|
1491
|
+
return display_?.displays;
|
|
1492
|
+
},
|
|
1493
|
+
userWantsExpandedSignal_: useWantsExpandedSignal_,
|
|
1494
|
+
containerWidth_: containerWidth_,
|
|
1495
|
+
animationDuration_: animationDuration_,
|
|
1496
|
+
supportsHover_: supportsHover_,
|
|
1497
|
+
FavoriteButton_: FavoriteButton_
|
|
1498
|
+
})]);
|
|
1464
1499
|
return container;
|
|
1465
1500
|
}
|
|
1466
|
-
var $072863633018e322$var$_tmpl$ = ["<div", ' class="depict recommendations looks">', "</div>"];
|
|
1501
|
+
var $072863633018e322$var$_tmpl$ = ["<div", ' class="depict recommendations looks" style="', '">', "</div>"];
|
|
1467
1502
|
let $072863633018e322$var$expandedLooksSignal_;
|
|
1468
1503
|
function $072863633018e322$export$1935e6bdfc5ed8ce(props) {
|
|
1469
1504
|
return $95837413165cc2df$export$23fca46f3143581f(() => {
|
|
1470
1505
|
$072863633018e322$var$expandedLooksSignal_ ||= $5vyXB$solidjs.createSignal(new Set(), {
|
|
1471
1506
|
equals: false
|
|
1472
1507
|
});
|
|
1508
|
+
const expandingAnimationDuration = 240;
|
|
1473
1509
|
const grid_spacing_override = $5vyXB$solidjs.createMemo(() => {
|
|
1474
1510
|
const {
|
|
1475
1511
|
gridSpacing_: gridSpacing_
|
|
@@ -1499,13 +1535,16 @@ function $072863633018e322$export$1935e6bdfc5ed8ce(props) {
|
|
|
1499
1535
|
return [];
|
|
1500
1536
|
return decoded.listings;
|
|
1501
1537
|
});
|
|
1502
|
-
return $5vyXB$solidjsweb.ssr($072863633018e322$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
1538
|
+
return $5vyXB$solidjsweb.ssr($072863633018e322$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(`--animation-duration: ${expandingAnimationDuration}ms`), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
1503
1539
|
get children() {
|
|
1504
1540
|
return $363ce4d1d71041aa$export$d41d19e89346fa2({
|
|
1505
|
-
product_card_template_: (display, info) => $ad882bbe664dbd53$export$44809a8a3e867e30(
|
|
1506
|
-
|
|
1541
|
+
product_card_template_: (display, info) => $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
1542
|
+
display_: display,
|
|
1543
|
+
FavoriteButton_: props.FavoriteButton_,
|
|
1544
|
+
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
1545
|
+
animationDuration_: expandingAnimationDuration,
|
|
1507
1546
|
expandedLooksSignal_: $072863633018e322$var$expandedLooksSignal_
|
|
1508
|
-
}
|
|
1547
|
+
}),
|
|
1509
1548
|
recommendations_resource_: looksResource,
|
|
1510
1549
|
title_: () => props.title_,
|
|
1511
1550
|
layout_options_: $5vyXB$solidjs.createMemo(() => ({
|
package/server/latest/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.
|
|
13
|
+
export const version = "4.2.1";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -249,6 +249,7 @@ export function LooksSlider(props: {
|
|
|
249
249
|
merchant_: string;
|
|
250
250
|
market_: string;
|
|
251
251
|
locale_: string;
|
|
252
|
+
imagePlaceholderAspectRatio_: number | string;
|
|
252
253
|
title_?: JSX.Element;
|
|
253
254
|
FavoriteButton_?: (props: {
|
|
254
255
|
display_: ModernDisplay | null | undefined;
|
package/server/latest/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { add_to_version_info as $i7OB2$add_to_version_info, fetch_retry as $i7OB2$fetch_retry, base_url as $i7OB2$base_url, slider_fractional_factory as $i7OB2$slider_fractional_factory, dlog as $i7OB2$dlog, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, catchify as $i7OB2$catchify, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, slider_fading_factory as $i7OB2$slider_fading_factory, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, observer as $i7OB2$observer, javascript_media_query as $i7OB2$javascript_media_query, queueMacroTask as $i7OB2$queueMacroTask, findMostFrequentItem as $i7OB2$findMostFrequentItem, dwarn as $i7OB2$dwarn, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ContainedImage as $i7OB2$ContainedImage, standard_price_format as $i7OB2$standard_price_format, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, use_href_accessor as $i7OB2$use_href_accessor, get_session_id as $i7OB2$get_session_id, add_version_query_params as $i7OB2$add_version_query_params, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, useExpandingContainer as $i7OB2$useExpandingContainer, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, snakeCasifyObject as $i7OB2$snakeCasifyObject, sort_obj as $i7OB2$sort_obj, make_url_with_query_params as $i7OB2$make_url_with_query_params, ListenableSet as $i7OB2$ListenableSet1, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
|
-
import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as $i7OB2$escape, createComponent as $i7OB2$createComponent, mergeProps as $i7OB2$mergeProps, isServer as $i7OB2$isServer, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, insert as $i7OB2$insert, ssrAttribute as $i7OB2$ssrAttribute,
|
|
2
|
+
import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, ssrStyle as $i7OB2$ssrStyle, escape as $i7OB2$escape, createComponent as $i7OB2$createComponent, mergeProps as $i7OB2$mergeProps, isServer as $i7OB2$isServer, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, insert as $i7OB2$insert, ssrAttribute as $i7OB2$ssrAttribute, spread as $i7OB2$spread, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
|
|
3
3
|
import { createSignal as $i7OB2$createSignal, createMemo as $i7OB2$createMemo, createResource as $i7OB2$createResource, Show as $i7OB2$Show, Suspense as $i7OB2$Suspense, untrack as $i7OB2$untrack, createRenderEffect as $i7OB2$createRenderEffect, Index as $i7OB2$Index, createRoot as $i7OB2$createRoot, onCleanup as $i7OB2$onCleanup, For as $i7OB2$For, getOwner as $i7OB2$getOwner, runWithOwner as $i7OB2$runWithOwner, createEffect as $i7OB2$createEffect, createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, createUniqueId as $i7OB2$createUniqueId, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, splitProps as $i7OB2$splitProps, mergeProps as $i7OB2$mergeProps1, on as $i7OB2$on, batch as $i7OB2$batch, createSelector as $i7OB2$createSelector, children as $i7OB2$children, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray } from "solid-js";
|
|
4
4
|
import { ListenableSet as $i7OB2$ListenableSet, catchify as $i7OB2$catchify1, use_href_accessor as $i7OB2$use_href_accessor1, report as $i7OB2$report1 } from "@depict-ai/utilishared/latest";
|
|
5
5
|
import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from "solid-js/store";
|
|
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.2.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.2.1";
|
|
11
11
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
12
12
|
const cols_at_size = [];
|
|
13
13
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -1121,21 +1121,24 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
|
|
|
1121
1121
|
outerRef_: outerRef_,
|
|
1122
1122
|
animationDuration_: animationDuration_
|
|
1123
1123
|
}) {
|
|
1124
|
-
const variantToUse =
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1124
|
+
const variantToUse = $i7OB2$createMemo(() => {
|
|
1125
|
+
const display = display_();
|
|
1126
|
+
return display?.variant_displays[display?.variant_index];
|
|
1127
|
+
});
|
|
1128
|
+
const imageUrls = () => variantToUse()?.image_urls;
|
|
1129
|
+
const imageUrl = $i7OB2$createMemo(() => imageUrls()?.[0]);
|
|
1130
|
+
const secondaryImageUrl = $i7OB2$createMemo(() => imageUrls()?.[1]);
|
|
1128
1131
|
const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
|
|
1129
1132
|
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $i7OB2$createSignal($i7OB2$untrack(isExpanded_));
|
|
1130
1133
|
const [animationEffectExists, setAnimationEffectExists] = $i7OB2$createSignal(false);
|
|
1131
|
-
const [salePrice] = $i7OB2$createResource(() => variantToUse?.sale_price);
|
|
1132
|
-
const [originalPrice] = $i7OB2$createResource(() => variantToUse?.original_price);
|
|
1134
|
+
const [salePrice] = $i7OB2$createResource(() => variantToUse()?.sale_price);
|
|
1135
|
+
const [originalPrice] = $i7OB2$createResource(() => variantToUse()?.original_price);
|
|
1133
1136
|
const isOnSale = $i7OB2$createMemo(() => salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense
|
|
1134
1137
|
const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
|
|
1135
1138
|
return $i7OB2$ssrElement("a", $i7OB2$mergeProps({
|
|
1136
1139
|
"class": "look-item"
|
|
1137
1140
|
}, () => isExpanded_() && !animationIsRunning() ? {
|
|
1138
|
-
href: variantToUse?.page_url
|
|
1141
|
+
href: variantToUse()?.page_url
|
|
1139
1142
|
} : {}), () => ["<!--$-->", $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1140
1143
|
when: imageUrl,
|
|
1141
1144
|
get fallback() {
|
|
@@ -1144,19 +1147,37 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
|
|
|
1144
1147
|
});
|
|
1145
1148
|
},
|
|
1146
1149
|
get children() {
|
|
1147
|
-
return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1150
|
+
return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1151
|
+
get when() {
|
|
1152
|
+
return imageUrl();
|
|
1153
|
+
},
|
|
1154
|
+
get fallback() {
|
|
1155
|
+
return $i7OB2$createComponent((0, $7f60f09116a3fe61$export$3f37af283f8fb843), {
|
|
1156
|
+
aspectRatio: 1
|
|
1157
|
+
});
|
|
1151
1158
|
},
|
|
1152
|
-
get
|
|
1153
|
-
return
|
|
1159
|
+
get children() {
|
|
1160
|
+
return $i7OB2$createComponent((0, $70bb27cc6be01fc7$export$9d4a4b669b1929ab), {
|
|
1161
|
+
get src() {
|
|
1162
|
+
return imageUrl();
|
|
1163
|
+
},
|
|
1164
|
+
get aspectRatio() {
|
|
1165
|
+
return isExpanded_() ? 0.75 : 1;
|
|
1166
|
+
},
|
|
1167
|
+
get autoAdjustAspectRatio() {
|
|
1168
|
+
return isExpanded_() ? "smoothed" : false;
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1154
1171
|
}
|
|
1155
1172
|
})), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1156
|
-
when
|
|
1173
|
+
get when() {
|
|
1174
|
+
return secondaryImageUrl();
|
|
1175
|
+
},
|
|
1157
1176
|
get children() {
|
|
1158
1177
|
return $i7OB2$createComponent((0, $70bb27cc6be01fc7$export$9d4a4b669b1929ab), {
|
|
1159
|
-
src
|
|
1178
|
+
get src() {
|
|
1179
|
+
return secondaryImageUrl();
|
|
1180
|
+
},
|
|
1160
1181
|
get aspectRatio() {
|
|
1161
1182
|
return isExpanded_() ? 0.75 : 1;
|
|
1162
1183
|
},
|
|
@@ -1173,10 +1194,10 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
|
|
|
1173
1194
|
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : isExpanded_()) || animationIsRunning();
|
|
1174
1195
|
},
|
|
1175
1196
|
get children() {
|
|
1176
|
-
return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$3, $i7OB2$ssrHydrationKey(), $i7OB2$escape(variantToUse?.title) ?? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
1197
|
+
return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$3, $i7OB2$ssrHydrationKey(), $i7OB2$escape(variantToUse()?.title) ?? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
1177
1198
|
height: "1em",
|
|
1178
1199
|
width: "20ch"
|
|
1179
|
-
})), `d-price ${isOnSale() ? "sale" : ""}`, !variantToUse || salePrice.loading ? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
1200
|
+
})), `d-price ${isOnSale() ? "sale" : ""}`, !variantToUse() || salePrice.loading ? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
1180
1201
|
height: "1em",
|
|
1181
1202
|
width: "20ch"
|
|
1182
1203
|
})) : $i7OB2$escape(salePrice()), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
@@ -1184,7 +1205,7 @@ function $5a6c386e1bde5665$export$b73ed90f0ee50dc3({
|
|
|
1184
1205
|
return isOnSale();
|
|
1185
1206
|
},
|
|
1186
1207
|
get children() {
|
|
1187
|
-
return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$2, $i7OB2$ssrHydrationKey(), !variantToUse || originalPrice.loading ? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
1208
|
+
return $i7OB2$ssr($5a6c386e1bde5665$var$_tmpl$2, $i7OB2$ssrHydrationKey(), !variantToUse() || originalPrice.loading ? $i7OB2$escape($i7OB2$createComponent((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
1188
1209
|
height: "1em",
|
|
1189
1210
|
width: "20ch"
|
|
1190
1211
|
})) : $i7OB2$escape(originalPrice()));
|
|
@@ -1242,7 +1263,7 @@ async function $62a8f670f8464532$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1242
1263
|
// Passive to make it more likely to run the callback before our timeout if the browser is under high load during the test
|
|
1243
1264
|
{
|
|
1244
1265
|
once: true,
|
|
1245
|
-
passive:
|
|
1266
|
+
passive: false
|
|
1246
1267
|
});
|
|
1247
1268
|
await timeoutPromise;
|
|
1248
1269
|
} catch (e) {
|
|
@@ -1250,7 +1271,7 @@ async function $62a8f670f8464532$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1250
1271
|
}
|
|
1251
1272
|
return isAffected;
|
|
1252
1273
|
}
|
|
1253
|
-
var $7555dcad3b8a4632$var$_tmpl$ = ["<div", ' class="scroll-padding"
|
|
1274
|
+
var $7555dcad3b8a4632$var$_tmpl$ = ["<div", ' class="scroll-padding">', "</div>"];
|
|
1254
1275
|
function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
|
|
1255
1276
|
displays_: displays_,
|
|
1256
1277
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1266,31 +1287,42 @@ function $7555dcad3b8a4632$export$ebf0b1d4f90c09ae({
|
|
|
1266
1287
|
// The following three signals just contain the state if the animations are actually running and should only be set by the respective animation code
|
|
1267
1288
|
const textFadeInAnimationRunning = $i7OB2$createSignal(false);
|
|
1268
1289
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1269
|
-
// These expanded variables are what's used to trigger the second and first phase animations
|
|
1270
1290
|
$62a8f670f8464532$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1271
1291
|
return $i7OB2$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
1272
1292
|
get children() {
|
|
1273
1293
|
return $i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1274
1294
|
get when() {
|
|
1275
|
-
return containerWidth_();
|
|
1295
|
+
return containerWidth_() || !displays_;
|
|
1276
1296
|
},
|
|
1277
1297
|
get children() {
|
|
1278
|
-
return $i7OB2$ssr($7555dcad3b8a4632$var$_tmpl$, $i7OB2$ssrHydrationKey(),
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1298
|
+
return $i7OB2$ssr($7555dcad3b8a4632$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrElement("div", $i7OB2$mergeProps({
|
|
1299
|
+
get ["class"]() {
|
|
1300
|
+
return `look-overlay ${userWantsExpanded() ? "expanded" : ""} ${!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : ""}`;
|
|
1301
|
+
}
|
|
1302
|
+
}, () => displays_ && {
|
|
1303
|
+
style: `--look-card-width:${containerWidth_()}px;--look-item-height:${lookItemHeight() || 200}px`
|
|
1304
|
+
}), () => $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Index), {
|
|
1305
|
+
get each() {
|
|
1306
|
+
return displays_ || Array.from({
|
|
1307
|
+
length: 4
|
|
1308
|
+
});
|
|
1309
|
+
},
|
|
1310
|
+
children: (display, index) => {
|
|
1311
|
+
return $i7OB2$createComponent((0, $5a6c386e1bde5665$export$b73ed90f0ee50dc3), {
|
|
1312
|
+
animationDuration_: animationDuration_,
|
|
1313
|
+
display_: display,
|
|
1314
|
+
FavoriteButton_: FavoriteButton_,
|
|
1315
|
+
isExpanded_: userWantsExpanded,
|
|
1316
|
+
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
1317
|
+
outerRef_: el => $i7OB2$createEffect(() => {
|
|
1318
|
+
if (index !== 0) return;
|
|
1319
|
+
const resizeObserver = new ResizeObserver($i7OB2$catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
1320
|
+
resizeObserver.observe(el);
|
|
1321
|
+
$i7OB2$onCleanup(() => resizeObserver.disconnect());
|
|
1322
|
+
})
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
})), false));
|
|
1294
1326
|
}
|
|
1295
1327
|
});
|
|
1296
1328
|
}
|
|
@@ -1316,18 +1348,22 @@ function $7555dcad3b8a4632$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1316
1348
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1317
1349
|
requestAnimationFrame(step);
|
|
1318
1350
|
}
|
|
1319
|
-
var $28ee4f7db3cc44b8$var$_tmpl$ = ["<div", ' class="
|
|
1320
|
-
function $28ee4f7db3cc44b8$export$44809a8a3e867e30(
|
|
1351
|
+
var $28ee4f7db3cc44b8$var$_tmpl$ = ["<div", ' class="', '"></div>'];
|
|
1352
|
+
function $28ee4f7db3cc44b8$export$44809a8a3e867e30({
|
|
1353
|
+
display_: display_,
|
|
1354
|
+
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
1355
|
+
FavoriteButton_: FavoriteButton_,
|
|
1356
|
+
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
1357
|
+
animationDuration_: animationDuration_
|
|
1358
|
+
}) {
|
|
1321
1359
|
// TODO: shopify, run displayTransformers to get dynamic prices
|
|
1322
1360
|
// TODO: format prices
|
|
1323
|
-
const
|
|
1324
|
-
const [coverImage] = display?.image_urls || [];
|
|
1361
|
+
const [coverImage] = display_?.image_urls || [];
|
|
1325
1362
|
const useWantsExpandedSignal_ = $i7OB2$createSignal(false);
|
|
1326
1363
|
const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
|
|
1327
|
-
const [expandedLooks_, setExpandedLooks] = info?.expandedLooksSignal_ || [];
|
|
1328
1364
|
const supportsHover_ = $dc9262ef6f786812$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
|
|
1329
1365
|
const us = Symbol("look");
|
|
1330
|
-
const container = $i7OB2$ssr($28ee4f7db3cc44b8$var$_tmpl$, $i7OB2$ssrHydrationKey(),
|
|
1366
|
+
const container = $i7OB2$ssr($28ee4f7db3cc44b8$var$_tmpl$, $i7OB2$ssrHydrationKey(), `look-card ${!display_ ? "placeholder" : ""}`);
|
|
1331
1367
|
const containerWidth_ = $2449872a62a75a20$export$ebdc3711f7e02ccd(container);
|
|
1332
1368
|
const clickHandler = $i7OB2$catchify(({
|
|
1333
1369
|
target: target
|
|
@@ -1338,7 +1374,7 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30(display, info, FavoriteButton
|
|
|
1338
1374
|
});
|
|
1339
1375
|
addEventListener("click", clickHandler);
|
|
1340
1376
|
$i7OB2$onCleanup(() => removeEventListener("click", clickHandler));
|
|
1341
|
-
$i7OB2$createEffect(() => setExpandedLooks
|
|
1377
|
+
$i7OB2$createEffect(() => setExpandedLooks(prev => {
|
|
1342
1378
|
if (userWantsExpanded()) {
|
|
1343
1379
|
// Close the other expanded looks
|
|
1344
1380
|
prev.clear();
|
|
@@ -1348,41 +1384,41 @@ function $28ee4f7db3cc44b8$export$44809a8a3e867e30(display, info, FavoriteButton
|
|
|
1348
1384
|
return prev;
|
|
1349
1385
|
}));
|
|
1350
1386
|
// Close us if another look expands
|
|
1351
|
-
$i7OB2$createEffect(() =>
|
|
1352
|
-
$i7OB2$insert(container, () => $i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1353
|
-
when:
|
|
1387
|
+
$i7OB2$createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1388
|
+
$i7OB2$insert(container, () => [$i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1389
|
+
when: display_,
|
|
1354
1390
|
get fallback() {
|
|
1355
1391
|
return $i7OB2$createComponent((0, $7f60f09116a3fe61$export$3f37af283f8fb843), {
|
|
1356
|
-
|
|
1357
|
-
height: "100%"
|
|
1392
|
+
aspectRatio: placeholderImageAspectRatio_
|
|
1358
1393
|
});
|
|
1359
1394
|
},
|
|
1360
1395
|
get children() {
|
|
1361
|
-
return
|
|
1396
|
+
return $i7OB2$createComponent((0, $70bb27cc6be01fc7$export$9d4a4b669b1929ab), {
|
|
1362
1397
|
src: coverImage,
|
|
1363
|
-
aspectRatio:
|
|
1398
|
+
aspectRatio: placeholderImageAspectRatio_,
|
|
1364
1399
|
autoAdjustAspectRatio: true
|
|
1365
|
-
})
|
|
1366
|
-
get displays_() {
|
|
1367
|
-
return display?.displays;
|
|
1368
|
-
},
|
|
1369
|
-
userWantsExpandedSignal_: useWantsExpandedSignal_,
|
|
1370
|
-
containerWidth_: containerWidth_,
|
|
1371
|
-
animationDuration_: animationDuration_,
|
|
1372
|
-
supportsHover_: supportsHover_,
|
|
1373
|
-
FavoriteButton_: FavoriteButton_
|
|
1374
|
-
})];
|
|
1400
|
+
});
|
|
1375
1401
|
}
|
|
1376
|
-
}))
|
|
1402
|
+
}), $i7OB2$createComponent((0, $7555dcad3b8a4632$export$ebf0b1d4f90c09ae), {
|
|
1403
|
+
get displays_() {
|
|
1404
|
+
return display_?.displays;
|
|
1405
|
+
},
|
|
1406
|
+
userWantsExpandedSignal_: useWantsExpandedSignal_,
|
|
1407
|
+
containerWidth_: containerWidth_,
|
|
1408
|
+
animationDuration_: animationDuration_,
|
|
1409
|
+
supportsHover_: supportsHover_,
|
|
1410
|
+
FavoriteButton_: FavoriteButton_
|
|
1411
|
+
})]);
|
|
1377
1412
|
return container;
|
|
1378
1413
|
}
|
|
1379
|
-
var $f577edfe2240eec1$var$_tmpl$ = ["<div", ' class="depict recommendations looks">', "</div>"];
|
|
1414
|
+
var $f577edfe2240eec1$var$_tmpl$ = ["<div", ' class="depict recommendations looks" style="', '">', "</div>"];
|
|
1380
1415
|
let $f577edfe2240eec1$var$expandedLooksSignal_;
|
|
1381
1416
|
function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
|
|
1382
1417
|
return $16b52438165aafe2$export$23fca46f3143581f(() => {
|
|
1383
1418
|
$f577edfe2240eec1$var$expandedLooksSignal_ ||= $i7OB2$createSignal(new Set(), {
|
|
1384
1419
|
equals: false
|
|
1385
1420
|
});
|
|
1421
|
+
const expandingAnimationDuration = 240;
|
|
1386
1422
|
const grid_spacing_override = $i7OB2$createMemo(() => {
|
|
1387
1423
|
const {
|
|
1388
1424
|
gridSpacing_: gridSpacing_
|
|
@@ -1412,13 +1448,16 @@ function $f577edfe2240eec1$export$1935e6bdfc5ed8ce(props) {
|
|
|
1412
1448
|
return [];
|
|
1413
1449
|
return decoded.listings;
|
|
1414
1450
|
});
|
|
1415
|
-
return $i7OB2$ssr($f577edfe2240eec1$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
1451
|
+
return $i7OB2$ssr($f577edfe2240eec1$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrStyle(`--animation-duration: ${expandingAnimationDuration}ms`), $i7OB2$escape($i7OB2$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
1416
1452
|
get children() {
|
|
1417
1453
|
return $c4492d24952ed731$export$d41d19e89346fa2({
|
|
1418
|
-
product_card_template_: (display, info) => $28ee4f7db3cc44b8$export$44809a8a3e867e30(
|
|
1419
|
-
|
|
1454
|
+
product_card_template_: (display, info) => $28ee4f7db3cc44b8$export$44809a8a3e867e30({
|
|
1455
|
+
display_: display,
|
|
1456
|
+
FavoriteButton_: props.FavoriteButton_,
|
|
1457
|
+
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
1458
|
+
animationDuration_: expandingAnimationDuration,
|
|
1420
1459
|
expandedLooksSignal_: $f577edfe2240eec1$var$expandedLooksSignal_
|
|
1421
|
-
}
|
|
1460
|
+
}),
|
|
1422
1461
|
recommendations_resource_: looksResource,
|
|
1423
1462
|
title_: () => props.title_,
|
|
1424
1463
|
layout_options_: $i7OB2$createMemo(() => ({
|