@depict-ai/ui 4.10.25 → 4.10.27
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 +34 -15
- package/ES10/index.d.ts +2 -1
- package/ES10/index.js +34 -15
- package/latest/index.cjs +34 -15
- package/latest/index.d.ts +2 -1
- package/latest/index.js +34 -15
- package/package.json +4 -4
- package/server/ES10/index.cjs +31 -7
- package/server/ES10/index.d.ts +2 -1
- package/server/ES10/index.js +31 -7
- package/server/latest/index.cjs +31 -7
- package/server/latest/index.d.ts +2 -1
- package/server/latest/index.js +31 -7
package/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.27";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $52FdA$solidjs.createSignal(false);
|
|
121
121
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -1858,25 +1858,27 @@ function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1858
1858
|
var _v$ = row(),
|
|
1859
1859
|
_v$2 = !!final_spans().spans_whole_row,
|
|
1860
1860
|
_v$3 = !!final_spans().spans_multiple_rows,
|
|
1861
|
-
_v$4 =
|
|
1861
|
+
_v$4 = !!(block.aspect_ratio === 1.5),
|
|
1862
|
+
_v$5 = {
|
|
1863
|
+
"grid-column": "span ".concat(final_span_columns()),
|
|
1864
|
+
"grid-row": "span ".concat(final_span_rows()),
|
|
1865
|
+
...(block.aspect_ratio === 1.5 && {
|
|
1866
|
+
"--content-block-aspect-ratio": block.aspect_ratio
|
|
1867
|
+
}),
|
|
1862
1868
|
[(0, $830518481649feb1$export$c500183c31c2b22e)]: final_span_columns()
|
|
1863
|
-
}
|
|
1864
|
-
_v$5 = "span ".concat(final_span_columns()),
|
|
1865
|
-
_v$6 = "span ".concat(final_span_rows());
|
|
1869
|
+
};
|
|
1866
1870
|
_v$ !== _p$.e && $52FdA$solidjsweb.setAttribute(_el$, "data-content-block-row", _p$.e = _v$);
|
|
1867
1871
|
_v$2 !== _p$.t && _el$.classList.toggle("spans-whole-row", _p$.t = _v$2);
|
|
1868
1872
|
_v$3 !== _p$.a && _el$.classList.toggle("spans-multiple-rows", _p$.a = _v$3);
|
|
1869
|
-
_p$.o
|
|
1870
|
-
|
|
1871
|
-
_v$6 !== _p$.n && ((_p$.n = _v$6) != null ? _el$.style.setProperty("grid-row", _v$6) : _el$.style.removeProperty("grid-row"));
|
|
1873
|
+
_v$4 !== _p$.o && _el$.classList.toggle("has-explicit-aspect-ratio", _p$.o = _v$4);
|
|
1874
|
+
_p$.i = $52FdA$solidjsweb.style(_el$, _v$5, _p$.i);
|
|
1872
1875
|
return _p$;
|
|
1873
1876
|
}, {
|
|
1874
1877
|
e: undefined,
|
|
1875
1878
|
t: undefined,
|
|
1876
1879
|
a: undefined,
|
|
1877
1880
|
o: undefined,
|
|
1878
|
-
i: undefined
|
|
1879
|
-
n: undefined
|
|
1881
|
+
i: undefined
|
|
1880
1882
|
});
|
|
1881
1883
|
return _el$;
|
|
1882
1884
|
}
|
|
@@ -8008,7 +8010,7 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
|
|
|
8008
8010
|
};
|
|
8009
8011
|
const idleHandle = requestIdleCallback(deadline => {
|
|
8010
8012
|
cancel();
|
|
8011
|
-
return callback(deadline);
|
|
8013
|
+
return callback(typeof (deadline === null || deadline === void 0 ? void 0 : deadline.timeRemaining) === "function" ? deadline : $e4e98e5080f4386e$var$makeDeadline());
|
|
8012
8014
|
}, {
|
|
8013
8015
|
timeout: timeout
|
|
8014
8016
|
});
|
|
@@ -8025,6 +8027,18 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
|
|
|
8025
8027
|
}, timeout + 1000);
|
|
8026
8028
|
return cancel;
|
|
8027
8029
|
}
|
|
8030
|
+
/**
|
|
8031
|
+
* Stand-in for a missing IdleDeadline: 50ms, the most a real one gives, counting down from when the callback was called
|
|
8032
|
+
*/
|
|
8033
|
+
function $e4e98e5080f4386e$var$makeDeadline() {
|
|
8034
|
+
const start = performance.now();
|
|
8035
|
+
return {
|
|
8036
|
+
didTimeout: false,
|
|
8037
|
+
timeRemaining() {
|
|
8038
|
+
return Math.max(0, 50 - (performance.now() - start));
|
|
8039
|
+
}
|
|
8040
|
+
};
|
|
8041
|
+
}
|
|
8028
8042
|
function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
|
|
8029
8043
|
var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
|
|
8030
8044
|
const page_hasnt_loaded =
|
|
@@ -8439,6 +8453,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
8439
8453
|
router_: router_,
|
|
8440
8454
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
8441
8455
|
mediaUrl_: mediaUrl_,
|
|
8456
|
+
aspectRatio_: aspectRatio_,
|
|
8442
8457
|
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
8443
8458
|
imageResizer_: imageResizer_,
|
|
8444
8459
|
text_: text_,
|
|
@@ -8458,7 +8473,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
8458
8473
|
component: link_ ? "a" : "div",
|
|
8459
8474
|
"class": "d-standard-content-wrapper",
|
|
8460
8475
|
get style() {
|
|
8461
|
-
return
|
|
8476
|
+
return aspectRatio_ === 1.5 ? "--media-aspect-ratio: 1.5" : aspectRatioWhenAloneInRow_() ? "--media-aspect-ratio: ".concat(aspectRatioWhenAloneInRow_()) : "";
|
|
8462
8477
|
},
|
|
8463
8478
|
ref: el => isImage && setWrapperSize(() => $054b1113e4897051$export$54c6d6ff54e72743(el)),
|
|
8464
8479
|
get onClick() {
|
|
@@ -8577,7 +8592,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
8577
8592
|
}
|
|
8578
8593
|
}));
|
|
8579
8594
|
}
|
|
8580
|
-
const $0c035bbe7e30b438$export$af2c67164f68e9e9 = content => {
|
|
8595
|
+
const $0c035bbe7e30b438$export$af2c67164f68e9e9 = (content, aspectRatio) => {
|
|
8581
8596
|
const {
|
|
8582
8597
|
link: link,
|
|
8583
8598
|
type: type,
|
|
@@ -8586,7 +8601,7 @@ const $0c035bbe7e30b438$export$af2c67164f68e9e9 = content => {
|
|
|
8586
8601
|
text_position: text_position,
|
|
8587
8602
|
cta: cta
|
|
8588
8603
|
} = content;
|
|
8589
|
-
return JSON.stringify([link, type, url, text !== null && text !== void 0 ? text : null, text_position !== null && text_position !== void 0 ? text_position : null, cta !== null && cta !== void 0 ? cta : null]);
|
|
8604
|
+
return JSON.stringify([link, type, url, text !== null && text !== void 0 ? text : null, text_position !== null && text_position !== void 0 ? text_position : null, cta !== null && cta !== void 0 ? cta : null, aspectRatio !== null && aspectRatio !== void 0 ? aspectRatio : null]);
|
|
8590
8605
|
};
|
|
8591
8606
|
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
8592
8607
|
let hasSeenContentBlock = false;
|
|
@@ -8629,7 +8644,7 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8629
8644
|
cta: cta
|
|
8630
8645
|
}
|
|
8631
8646
|
} = row;
|
|
8632
|
-
const componentCacheKey = $0c035bbe7e30b438$export$af2c67164f68e9e9(row.content);
|
|
8647
|
+
const componentCacheKey = $0c035bbe7e30b438$export$af2c67164f68e9e9(row.content, row.aspect_ratio);
|
|
8633
8648
|
// The aspect ratio depends only on the media, so its history key must stay the pre-text 3-element shape — widening it would orphan every ratio already persisted in history.state
|
|
8634
8649
|
const mediaCacheKey = JSON.stringify([link, type, url]);
|
|
8635
8650
|
let component = contentComponents.get(componentCacheKey);
|
|
@@ -8640,6 +8655,9 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8640
8655
|
mediaUrl_: url,
|
|
8641
8656
|
router_: router_,
|
|
8642
8657
|
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[mediaCacheKey],
|
|
8658
|
+
get aspectRatio_() {
|
|
8659
|
+
return row.aspect_ratio;
|
|
8660
|
+
},
|
|
8643
8661
|
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
8644
8662
|
...prev,
|
|
8645
8663
|
aspectRatios: {
|
|
@@ -8657,6 +8675,7 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8657
8675
|
const contentBlock = {
|
|
8658
8676
|
span_columns: row.span_columns,
|
|
8659
8677
|
span_rows: row.span_rows,
|
|
8678
|
+
aspect_ratio: row.aspect_ratio,
|
|
8660
8679
|
position: row.position,
|
|
8661
8680
|
content: component
|
|
8662
8681
|
};
|
package/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.27";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -393,6 +393,7 @@ export function ImagePlaceholder(props: ImagePlaceholderBaseOptions & (ImagePlac
|
|
|
393
393
|
export type ContentBlock = {
|
|
394
394
|
span_columns: number;
|
|
395
395
|
span_rows: number;
|
|
396
|
+
aspect_ratio?: 1.5;
|
|
396
397
|
position: "left" | "center" | "right";
|
|
397
398
|
content: () => JSX.Element | Promise<JSX.Element>;
|
|
398
399
|
};
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
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.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.27";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $8tj43$createSignal(false);
|
|
16
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -1753,25 +1753,27 @@ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1753
1753
|
var _v$ = row(),
|
|
1754
1754
|
_v$2 = !!final_spans().spans_whole_row,
|
|
1755
1755
|
_v$3 = !!final_spans().spans_multiple_rows,
|
|
1756
|
-
_v$4 =
|
|
1756
|
+
_v$4 = !!(block.aspect_ratio === 1.5),
|
|
1757
|
+
_v$5 = {
|
|
1758
|
+
"grid-column": "span ".concat(final_span_columns()),
|
|
1759
|
+
"grid-row": "span ".concat(final_span_rows()),
|
|
1760
|
+
...(block.aspect_ratio === 1.5 && {
|
|
1761
|
+
"--content-block-aspect-ratio": block.aspect_ratio
|
|
1762
|
+
}),
|
|
1757
1763
|
[(0, $64d94dcaa058dc7b$export$c500183c31c2b22e)]: final_span_columns()
|
|
1758
|
-
}
|
|
1759
|
-
_v$5 = "span ".concat(final_span_columns()),
|
|
1760
|
-
_v$6 = "span ".concat(final_span_rows());
|
|
1764
|
+
};
|
|
1761
1765
|
_v$ !== _p$.e && $8tj43$setAttribute(_el$, "data-content-block-row", _p$.e = _v$);
|
|
1762
1766
|
_v$2 !== _p$.t && _el$.classList.toggle("spans-whole-row", _p$.t = _v$2);
|
|
1763
1767
|
_v$3 !== _p$.a && _el$.classList.toggle("spans-multiple-rows", _p$.a = _v$3);
|
|
1764
|
-
_p$.o
|
|
1765
|
-
|
|
1766
|
-
_v$6 !== _p$.n && ((_p$.n = _v$6) != null ? _el$.style.setProperty("grid-row", _v$6) : _el$.style.removeProperty("grid-row"));
|
|
1768
|
+
_v$4 !== _p$.o && _el$.classList.toggle("has-explicit-aspect-ratio", _p$.o = _v$4);
|
|
1769
|
+
_p$.i = $8tj43$style(_el$, _v$5, _p$.i);
|
|
1767
1770
|
return _p$;
|
|
1768
1771
|
}, {
|
|
1769
1772
|
e: undefined,
|
|
1770
1773
|
t: undefined,
|
|
1771
1774
|
a: undefined,
|
|
1772
1775
|
o: undefined,
|
|
1773
|
-
i: undefined
|
|
1774
|
-
n: undefined
|
|
1776
|
+
i: undefined
|
|
1775
1777
|
});
|
|
1776
1778
|
return _el$;
|
|
1777
1779
|
}
|
|
@@ -7903,7 +7905,7 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
7903
7905
|
};
|
|
7904
7906
|
const idleHandle = requestIdleCallback(deadline => {
|
|
7905
7907
|
cancel();
|
|
7906
|
-
return callback(deadline);
|
|
7908
|
+
return callback(typeof (deadline === null || deadline === void 0 ? void 0 : deadline.timeRemaining) === "function" ? deadline : $6db93f70c2db1486$var$makeDeadline());
|
|
7907
7909
|
}, {
|
|
7908
7910
|
timeout: timeout
|
|
7909
7911
|
});
|
|
@@ -7920,6 +7922,18 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
7920
7922
|
}, timeout + 1000);
|
|
7921
7923
|
return cancel;
|
|
7922
7924
|
}
|
|
7925
|
+
/**
|
|
7926
|
+
* Stand-in for a missing IdleDeadline: 50ms, the most a real one gives, counting down from when the callback was called
|
|
7927
|
+
*/
|
|
7928
|
+
function $6db93f70c2db1486$var$makeDeadline() {
|
|
7929
|
+
const start = performance.now();
|
|
7930
|
+
return {
|
|
7931
|
+
didTimeout: false,
|
|
7932
|
+
timeRemaining() {
|
|
7933
|
+
return Math.max(0, 50 - (performance.now() - start));
|
|
7934
|
+
}
|
|
7935
|
+
};
|
|
7936
|
+
}
|
|
7923
7937
|
function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
|
|
7924
7938
|
var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
|
|
7925
7939
|
const page_hasnt_loaded =
|
|
@@ -8334,6 +8348,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
8334
8348
|
router_: router_,
|
|
8335
8349
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
8336
8350
|
mediaUrl_: mediaUrl_,
|
|
8351
|
+
aspectRatio_: aspectRatio_,
|
|
8337
8352
|
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
8338
8353
|
imageResizer_: imageResizer_,
|
|
8339
8354
|
text_: text_,
|
|
@@ -8353,7 +8368,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
8353
8368
|
component: link_ ? "a" : "div",
|
|
8354
8369
|
"class": "d-standard-content-wrapper",
|
|
8355
8370
|
get style() {
|
|
8356
|
-
return
|
|
8371
|
+
return aspectRatio_ === 1.5 ? "--media-aspect-ratio: 1.5" : aspectRatioWhenAloneInRow_() ? "--media-aspect-ratio: ".concat(aspectRatioWhenAloneInRow_()) : "";
|
|
8357
8372
|
},
|
|
8358
8373
|
ref: el => isImage && setWrapperSize(() => $4be619ec2cd7bba3$export$54c6d6ff54e72743(el)),
|
|
8359
8374
|
get onClick() {
|
|
@@ -8472,7 +8487,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
8472
8487
|
}
|
|
8473
8488
|
}));
|
|
8474
8489
|
}
|
|
8475
|
-
const $12ff24fdc4b26d88$export$af2c67164f68e9e9 = content => {
|
|
8490
|
+
const $12ff24fdc4b26d88$export$af2c67164f68e9e9 = (content, aspectRatio) => {
|
|
8476
8491
|
const {
|
|
8477
8492
|
link: link,
|
|
8478
8493
|
type: type,
|
|
@@ -8481,7 +8496,7 @@ const $12ff24fdc4b26d88$export$af2c67164f68e9e9 = content => {
|
|
|
8481
8496
|
text_position: text_position,
|
|
8482
8497
|
cta: cta
|
|
8483
8498
|
} = content;
|
|
8484
|
-
return JSON.stringify([link, type, url, text !== null && text !== void 0 ? text : null, text_position !== null && text_position !== void 0 ? text_position : null, cta !== null && cta !== void 0 ? cta : null]);
|
|
8499
|
+
return JSON.stringify([link, type, url, text !== null && text !== void 0 ? text : null, text_position !== null && text_position !== void 0 ? text_position : null, cta !== null && cta !== void 0 ? cta : null, aspectRatio !== null && aspectRatio !== void 0 ? aspectRatio : null]);
|
|
8485
8500
|
};
|
|
8486
8501
|
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
8487
8502
|
let hasSeenContentBlock = false;
|
|
@@ -8524,7 +8539,7 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8524
8539
|
cta: cta
|
|
8525
8540
|
}
|
|
8526
8541
|
} = row;
|
|
8527
|
-
const componentCacheKey = $12ff24fdc4b26d88$export$af2c67164f68e9e9(row.content);
|
|
8542
|
+
const componentCacheKey = $12ff24fdc4b26d88$export$af2c67164f68e9e9(row.content, row.aspect_ratio);
|
|
8528
8543
|
// The aspect ratio depends only on the media, so its history key must stay the pre-text 3-element shape — widening it would orphan every ratio already persisted in history.state
|
|
8529
8544
|
const mediaCacheKey = JSON.stringify([link, type, url]);
|
|
8530
8545
|
let component = contentComponents.get(componentCacheKey);
|
|
@@ -8535,6 +8550,9 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8535
8550
|
mediaUrl_: url,
|
|
8536
8551
|
router_: router_,
|
|
8537
8552
|
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[mediaCacheKey],
|
|
8553
|
+
get aspectRatio_() {
|
|
8554
|
+
return row.aspect_ratio;
|
|
8555
|
+
},
|
|
8538
8556
|
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
8539
8557
|
...prev,
|
|
8540
8558
|
aspectRatios: {
|
|
@@ -8552,6 +8570,7 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8552
8570
|
const contentBlock = {
|
|
8553
8571
|
span_columns: row.span_columns,
|
|
8554
8572
|
span_rows: row.span_rows,
|
|
8573
|
+
aspect_ratio: row.aspect_ratio,
|
|
8555
8574
|
position: row.position,
|
|
8556
8575
|
content: component
|
|
8557
8576
|
};
|
package/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.27";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
115
115
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -1769,25 +1769,27 @@ function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1769
1769
|
var _v$ = row(),
|
|
1770
1770
|
_v$2 = !!final_spans().spans_whole_row,
|
|
1771
1771
|
_v$3 = !!final_spans().spans_multiple_rows,
|
|
1772
|
-
_v$4 =
|
|
1772
|
+
_v$4 = !!(block.aspect_ratio === 1.5),
|
|
1773
|
+
_v$5 = {
|
|
1774
|
+
"grid-column": `span ${final_span_columns()}`,
|
|
1775
|
+
"grid-row": `span ${final_span_rows()}`,
|
|
1776
|
+
...(block.aspect_ratio === 1.5 && {
|
|
1777
|
+
"--content-block-aspect-ratio": block.aspect_ratio
|
|
1778
|
+
}),
|
|
1773
1779
|
[(0, $75777da1687ba3f6$export$c500183c31c2b22e)]: final_span_columns()
|
|
1774
|
-
}
|
|
1775
|
-
_v$5 = `span ${final_span_columns()}`,
|
|
1776
|
-
_v$6 = `span ${final_span_rows()}`;
|
|
1780
|
+
};
|
|
1777
1781
|
_v$ !== _p$.e && $gVhhF$solidjsweb.setAttribute(_el$, "data-content-block-row", _p$.e = _v$);
|
|
1778
1782
|
_v$2 !== _p$.t && _el$.classList.toggle("spans-whole-row", _p$.t = _v$2);
|
|
1779
1783
|
_v$3 !== _p$.a && _el$.classList.toggle("spans-multiple-rows", _p$.a = _v$3);
|
|
1780
|
-
_p$.o
|
|
1781
|
-
|
|
1782
|
-
_v$6 !== _p$.n && ((_p$.n = _v$6) != null ? _el$.style.setProperty("grid-row", _v$6) : _el$.style.removeProperty("grid-row"));
|
|
1784
|
+
_v$4 !== _p$.o && _el$.classList.toggle("has-explicit-aspect-ratio", _p$.o = _v$4);
|
|
1785
|
+
_p$.i = $gVhhF$solidjsweb.style(_el$, _v$5, _p$.i);
|
|
1783
1786
|
return _p$;
|
|
1784
1787
|
}, {
|
|
1785
1788
|
e: undefined,
|
|
1786
1789
|
t: undefined,
|
|
1787
1790
|
a: undefined,
|
|
1788
1791
|
o: undefined,
|
|
1789
|
-
i: undefined
|
|
1790
|
-
n: undefined
|
|
1792
|
+
i: undefined
|
|
1791
1793
|
});
|
|
1792
1794
|
return _el$;
|
|
1793
1795
|
}
|
|
@@ -7579,7 +7581,7 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
|
|
|
7579
7581
|
};
|
|
7580
7582
|
const idleHandle = requestIdleCallback(deadline => {
|
|
7581
7583
|
cancel();
|
|
7582
|
-
return callback(deadline);
|
|
7584
|
+
return callback(typeof deadline?.timeRemaining === "function" ? deadline : $3ea8e0af95b5b7d2$var$makeDeadline());
|
|
7583
7585
|
}, {
|
|
7584
7586
|
timeout: timeout
|
|
7585
7587
|
});
|
|
@@ -7596,6 +7598,18 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
|
|
|
7596
7598
|
}, timeout + 1000);
|
|
7597
7599
|
return cancel;
|
|
7598
7600
|
}
|
|
7601
|
+
/**
|
|
7602
|
+
* Stand-in for a missing IdleDeadline: 50ms, the most a real one gives, counting down from when the callback was called
|
|
7603
|
+
*/
|
|
7604
|
+
function $3ea8e0af95b5b7d2$var$makeDeadline() {
|
|
7605
|
+
const start = performance.now();
|
|
7606
|
+
return {
|
|
7607
|
+
didTimeout: false,
|
|
7608
|
+
timeRemaining() {
|
|
7609
|
+
return Math.max(0, 50 - (performance.now() - start));
|
|
7610
|
+
}
|
|
7611
|
+
};
|
|
7612
|
+
}
|
|
7599
7613
|
function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
|
|
7600
7614
|
const page_hasnt_loaded =
|
|
7601
7615
|
// @ts-ignore
|
|
@@ -7992,6 +8006,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
7992
8006
|
router_: router_,
|
|
7993
8007
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
7994
8008
|
mediaUrl_: mediaUrl_,
|
|
8009
|
+
aspectRatio_: aspectRatio_,
|
|
7995
8010
|
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
7996
8011
|
imageResizer_: imageResizer_,
|
|
7997
8012
|
text_: text_,
|
|
@@ -8011,7 +8026,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
8011
8026
|
component: link_ ? "a" : "div",
|
|
8012
8027
|
"class": "d-standard-content-wrapper",
|
|
8013
8028
|
get style() {
|
|
8014
|
-
return
|
|
8029
|
+
return aspectRatio_ === 1.5 ? "--media-aspect-ratio: 1.5" : aspectRatioWhenAloneInRow_() ? `--media-aspect-ratio: ${aspectRatioWhenAloneInRow_()}` : "";
|
|
8015
8030
|
},
|
|
8016
8031
|
ref: el => isImage && setWrapperSize(() => $128302ab61dab8f1$export$54c6d6ff54e72743(el)),
|
|
8017
8032
|
get onClick() {
|
|
@@ -8124,7 +8139,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
8124
8139
|
}
|
|
8125
8140
|
}));
|
|
8126
8141
|
}
|
|
8127
|
-
const $0a80939bf0a1e9cc$export$af2c67164f68e9e9 = content => {
|
|
8142
|
+
const $0a80939bf0a1e9cc$export$af2c67164f68e9e9 = (content, aspectRatio) => {
|
|
8128
8143
|
const {
|
|
8129
8144
|
link: link,
|
|
8130
8145
|
type: type,
|
|
@@ -8133,7 +8148,7 @@ const $0a80939bf0a1e9cc$export$af2c67164f68e9e9 = content => {
|
|
|
8133
8148
|
text_position: text_position,
|
|
8134
8149
|
cta: cta
|
|
8135
8150
|
} = content;
|
|
8136
|
-
return JSON.stringify([link, type, url, text ?? null, text_position ?? null, cta ?? null]);
|
|
8151
|
+
return JSON.stringify([link, type, url, text ?? null, text_position ?? null, cta ?? null, aspectRatio ?? null]);
|
|
8137
8152
|
};
|
|
8138
8153
|
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
8139
8154
|
let hasSeenContentBlock = false;
|
|
@@ -8175,7 +8190,7 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8175
8190
|
cta: cta
|
|
8176
8191
|
}
|
|
8177
8192
|
} = row;
|
|
8178
|
-
const componentCacheKey = $0a80939bf0a1e9cc$export$af2c67164f68e9e9(row.content);
|
|
8193
|
+
const componentCacheKey = $0a80939bf0a1e9cc$export$af2c67164f68e9e9(row.content, row.aspect_ratio);
|
|
8179
8194
|
// The aspect ratio depends only on the media, so its history key must stay the pre-text 3-element shape — widening it would orphan every ratio already persisted in history.state
|
|
8180
8195
|
const mediaCacheKey = JSON.stringify([link, type, url]);
|
|
8181
8196
|
let component = contentComponents.get(componentCacheKey);
|
|
@@ -8186,6 +8201,9 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8186
8201
|
mediaUrl_: url,
|
|
8187
8202
|
router_: router_,
|
|
8188
8203
|
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[mediaCacheKey],
|
|
8204
|
+
get aspectRatio_() {
|
|
8205
|
+
return row.aspect_ratio;
|
|
8206
|
+
},
|
|
8189
8207
|
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
8190
8208
|
...prev,
|
|
8191
8209
|
aspectRatios: {
|
|
@@ -8203,6 +8221,7 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8203
8221
|
const contentBlock = {
|
|
8204
8222
|
span_columns: row.span_columns,
|
|
8205
8223
|
span_rows: row.span_rows,
|
|
8224
|
+
aspect_ratio: row.aspect_ratio,
|
|
8206
8225
|
position: row.position,
|
|
8207
8226
|
content: component
|
|
8208
8227
|
};
|
package/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.27";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -393,6 +393,7 @@ export function ImagePlaceholder(props: ImagePlaceholderBaseOptions & (ImagePlac
|
|
|
393
393
|
export type ContentBlock = {
|
|
394
394
|
span_columns: number;
|
|
395
395
|
span_rows: number;
|
|
396
|
+
aspect_ratio?: 1.5;
|
|
396
397
|
position: "left" | "center" | "right";
|
|
397
398
|
content: () => JSX.Element | Promise<JSX.Element>;
|
|
398
399
|
};
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$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.10.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.27";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $9HbP8$createSignal(false);
|
|
13
13
|
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
@@ -1667,25 +1667,27 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1667
1667
|
var _v$ = row(),
|
|
1668
1668
|
_v$2 = !!final_spans().spans_whole_row,
|
|
1669
1669
|
_v$3 = !!final_spans().spans_multiple_rows,
|
|
1670
|
-
_v$4 =
|
|
1670
|
+
_v$4 = !!(block.aspect_ratio === 1.5),
|
|
1671
|
+
_v$5 = {
|
|
1672
|
+
"grid-column": `span ${final_span_columns()}`,
|
|
1673
|
+
"grid-row": `span ${final_span_rows()}`,
|
|
1674
|
+
...(block.aspect_ratio === 1.5 && {
|
|
1675
|
+
"--content-block-aspect-ratio": block.aspect_ratio
|
|
1676
|
+
}),
|
|
1671
1677
|
[(0, $6dee9211e57ac31a$export$c500183c31c2b22e)]: final_span_columns()
|
|
1672
|
-
}
|
|
1673
|
-
_v$5 = `span ${final_span_columns()}`,
|
|
1674
|
-
_v$6 = `span ${final_span_rows()}`;
|
|
1678
|
+
};
|
|
1675
1679
|
_v$ !== _p$.e && $9HbP8$setAttribute(_el$, "data-content-block-row", _p$.e = _v$);
|
|
1676
1680
|
_v$2 !== _p$.t && _el$.classList.toggle("spans-whole-row", _p$.t = _v$2);
|
|
1677
1681
|
_v$3 !== _p$.a && _el$.classList.toggle("spans-multiple-rows", _p$.a = _v$3);
|
|
1678
|
-
_p$.o
|
|
1679
|
-
|
|
1680
|
-
_v$6 !== _p$.n && ((_p$.n = _v$6) != null ? _el$.style.setProperty("grid-row", _v$6) : _el$.style.removeProperty("grid-row"));
|
|
1682
|
+
_v$4 !== _p$.o && _el$.classList.toggle("has-explicit-aspect-ratio", _p$.o = _v$4);
|
|
1683
|
+
_p$.i = $9HbP8$style(_el$, _v$5, _p$.i);
|
|
1681
1684
|
return _p$;
|
|
1682
1685
|
}, {
|
|
1683
1686
|
e: undefined,
|
|
1684
1687
|
t: undefined,
|
|
1685
1688
|
a: undefined,
|
|
1686
1689
|
o: undefined,
|
|
1687
|
-
i: undefined
|
|
1688
|
-
n: undefined
|
|
1690
|
+
i: undefined
|
|
1689
1691
|
});
|
|
1690
1692
|
return _el$;
|
|
1691
1693
|
}
|
|
@@ -7477,7 +7479,7 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
|
|
|
7477
7479
|
};
|
|
7478
7480
|
const idleHandle = requestIdleCallback(deadline => {
|
|
7479
7481
|
cancel();
|
|
7480
|
-
return callback(deadline);
|
|
7482
|
+
return callback(typeof deadline?.timeRemaining === "function" ? deadline : $4ea56971d92eb0cd$var$makeDeadline());
|
|
7481
7483
|
}, {
|
|
7482
7484
|
timeout: timeout
|
|
7483
7485
|
});
|
|
@@ -7494,6 +7496,18 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
|
|
|
7494
7496
|
}, timeout + 1000);
|
|
7495
7497
|
return cancel;
|
|
7496
7498
|
}
|
|
7499
|
+
/**
|
|
7500
|
+
* Stand-in for a missing IdleDeadline: 50ms, the most a real one gives, counting down from when the callback was called
|
|
7501
|
+
*/
|
|
7502
|
+
function $4ea56971d92eb0cd$var$makeDeadline() {
|
|
7503
|
+
const start = performance.now();
|
|
7504
|
+
return {
|
|
7505
|
+
didTimeout: false,
|
|
7506
|
+
timeRemaining() {
|
|
7507
|
+
return Math.max(0, 50 - (performance.now() - start));
|
|
7508
|
+
}
|
|
7509
|
+
};
|
|
7510
|
+
}
|
|
7497
7511
|
function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
|
|
7498
7512
|
const page_hasnt_loaded =
|
|
7499
7513
|
// @ts-ignore
|
|
@@ -7890,6 +7904,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
7890
7904
|
router_: router_,
|
|
7891
7905
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
7892
7906
|
mediaUrl_: mediaUrl_,
|
|
7907
|
+
aspectRatio_: aspectRatio_,
|
|
7893
7908
|
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
7894
7909
|
imageResizer_: imageResizer_,
|
|
7895
7910
|
text_: text_,
|
|
@@ -7909,7 +7924,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
7909
7924
|
component: link_ ? "a" : "div",
|
|
7910
7925
|
"class": "d-standard-content-wrapper",
|
|
7911
7926
|
get style() {
|
|
7912
|
-
return
|
|
7927
|
+
return aspectRatio_ === 1.5 ? "--media-aspect-ratio: 1.5" : aspectRatioWhenAloneInRow_() ? `--media-aspect-ratio: ${aspectRatioWhenAloneInRow_()}` : "";
|
|
7913
7928
|
},
|
|
7914
7929
|
ref: el => isImage && setWrapperSize(() => $a444a52bafa0dacc$export$54c6d6ff54e72743(el)),
|
|
7915
7930
|
get onClick() {
|
|
@@ -8022,7 +8037,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
8022
8037
|
}
|
|
8023
8038
|
}));
|
|
8024
8039
|
}
|
|
8025
|
-
const $486360b09f0d5729$export$af2c67164f68e9e9 = content => {
|
|
8040
|
+
const $486360b09f0d5729$export$af2c67164f68e9e9 = (content, aspectRatio) => {
|
|
8026
8041
|
const {
|
|
8027
8042
|
link: link,
|
|
8028
8043
|
type: type,
|
|
@@ -8031,7 +8046,7 @@ const $486360b09f0d5729$export$af2c67164f68e9e9 = content => {
|
|
|
8031
8046
|
text_position: text_position,
|
|
8032
8047
|
cta: cta
|
|
8033
8048
|
} = content;
|
|
8034
|
-
return JSON.stringify([link, type, url, text ?? null, text_position ?? null, cta ?? null]);
|
|
8049
|
+
return JSON.stringify([link, type, url, text ?? null, text_position ?? null, cta ?? null, aspectRatio ?? null]);
|
|
8035
8050
|
};
|
|
8036
8051
|
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
8037
8052
|
let hasSeenContentBlock = false;
|
|
@@ -8073,7 +8088,7 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8073
8088
|
cta: cta
|
|
8074
8089
|
}
|
|
8075
8090
|
} = row;
|
|
8076
|
-
const componentCacheKey = $486360b09f0d5729$export$af2c67164f68e9e9(row.content);
|
|
8091
|
+
const componentCacheKey = $486360b09f0d5729$export$af2c67164f68e9e9(row.content, row.aspect_ratio);
|
|
8077
8092
|
// The aspect ratio depends only on the media, so its history key must stay the pre-text 3-element shape — widening it would orphan every ratio already persisted in history.state
|
|
8078
8093
|
const mediaCacheKey = JSON.stringify([link, type, url]);
|
|
8079
8094
|
let component = contentComponents.get(componentCacheKey);
|
|
@@ -8084,6 +8099,9 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8084
8099
|
mediaUrl_: url,
|
|
8085
8100
|
router_: router_,
|
|
8086
8101
|
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[mediaCacheKey],
|
|
8102
|
+
get aspectRatio_() {
|
|
8103
|
+
return row.aspect_ratio;
|
|
8104
|
+
},
|
|
8087
8105
|
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
8088
8106
|
...prev,
|
|
8089
8107
|
aspectRatios: {
|
|
@@ -8101,6 +8119,7 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8101
8119
|
const contentBlock = {
|
|
8102
8120
|
span_columns: row.span_columns,
|
|
8103
8121
|
span_rows: row.span_rows,
|
|
8122
|
+
aspect_ratio: row.aspect_ratio,
|
|
8104
8123
|
position: row.position,
|
|
8105
8124
|
content: component
|
|
8106
8125
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "git+https://github.com/depict-org/depict-ui.git",
|
|
6
6
|
"directory": "browser-tags-v2/packages/ui"
|
|
7
7
|
},
|
|
8
|
-
"version": "4.10.
|
|
8
|
+
"version": "4.10.27",
|
|
9
9
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
10
10
|
"packageManager": "yarn@3.2.2",
|
|
11
11
|
"sass": "styles.scss",
|
|
@@ -241,9 +241,9 @@
|
|
|
241
241
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
242
242
|
"@babel/runtime": "^7.22.6",
|
|
243
243
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
244
|
-
"@depict-ai/plp-styling": "^4.6.
|
|
245
|
-
"@depict-ai/types": "^5.6.
|
|
246
|
-
"@depict-ai/utilishared": "^2.6.
|
|
244
|
+
"@depict-ai/plp-styling": "^4.6.18",
|
|
245
|
+
"@depict-ai/types": "^5.6.16",
|
|
246
|
+
"@depict-ai/utilishared": "^2.6.16",
|
|
247
247
|
"solid-js": "^1.9.10"
|
|
248
248
|
},
|
|
249
249
|
"type": "module",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.27";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $3hooq$solidjs.createSignal(false);
|
|
121
121
|
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -1555,7 +1555,14 @@ function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1555
1555
|
return !rendering_delayed();
|
|
1556
1556
|
},
|
|
1557
1557
|
get children() {
|
|
1558
|
-
return $3hooq$solidjsweb.ssr($f8f375d6245ffff2$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "content-block-wrapper ".concat(final_spans().spans_whole_row ? "spans-whole-row" : "", " ").concat(final_spans().spans_multiple_rows ? "spans-multiple-rows" : ""
|
|
1558
|
+
return $3hooq$solidjsweb.ssr($f8f375d6245ffff2$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "content-block-wrapper ".concat(final_spans().spans_whole_row ? "spans-whole-row" : "", " ").concat(final_spans().spans_multiple_rows ? "spans-multiple-rows" : "", " ").concat(block.aspect_ratio === 1.5 ? "has-explicit-aspect-ratio" : ""), $3hooq$solidjsweb.ssrAttribute("data-content-block-row", $3hooq$solidjsweb.escape(row(), true), false), $3hooq$solidjsweb.ssrStyle({
|
|
1559
|
+
"grid-column": "span ".concat(final_span_columns()),
|
|
1560
|
+
"grid-row": "span ".concat(final_span_rows()),
|
|
1561
|
+
...(block.aspect_ratio === 1.5 && {
|
|
1562
|
+
"--content-block-aspect-ratio": block.aspect_ratio
|
|
1563
|
+
}),
|
|
1564
|
+
[(0, $830518481649feb1$export$c500183c31c2b22e)]: final_span_columns()
|
|
1565
|
+
}), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($f8f375d6245ffff2$var$RenderContent, {
|
|
1559
1566
|
get content() {
|
|
1560
1567
|
return block.content;
|
|
1561
1568
|
}
|
|
@@ -6519,7 +6526,7 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
|
|
|
6519
6526
|
};
|
|
6520
6527
|
const idleHandle = requestIdleCallback(deadline => {
|
|
6521
6528
|
cancel();
|
|
6522
|
-
return callback(deadline);
|
|
6529
|
+
return callback(typeof (deadline === null || deadline === void 0 ? void 0 : deadline.timeRemaining) === "function" ? deadline : $e4e98e5080f4386e$var$makeDeadline());
|
|
6523
6530
|
}, {
|
|
6524
6531
|
timeout: timeout
|
|
6525
6532
|
});
|
|
@@ -6536,6 +6543,18 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
|
|
|
6536
6543
|
}, timeout + 1000);
|
|
6537
6544
|
return cancel;
|
|
6538
6545
|
}
|
|
6546
|
+
/**
|
|
6547
|
+
* Stand-in for a missing IdleDeadline: 50ms, the most a real one gives, counting down from when the callback was called
|
|
6548
|
+
*/
|
|
6549
|
+
function $e4e98e5080f4386e$var$makeDeadline() {
|
|
6550
|
+
const start = performance.now();
|
|
6551
|
+
return {
|
|
6552
|
+
didTimeout: false,
|
|
6553
|
+
timeRemaining() {
|
|
6554
|
+
return Math.max(0, 50 - (performance.now() - start));
|
|
6555
|
+
}
|
|
6556
|
+
};
|
|
6557
|
+
}
|
|
6539
6558
|
function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
|
|
6540
6559
|
var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
|
|
6541
6560
|
const page_hasnt_loaded =
|
|
@@ -6924,6 +6943,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6924
6943
|
router_: router_,
|
|
6925
6944
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
6926
6945
|
mediaUrl_: mediaUrl_,
|
|
6946
|
+
aspectRatio_: aspectRatio_,
|
|
6927
6947
|
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
6928
6948
|
imageResizer_: imageResizer_,
|
|
6929
6949
|
text_: text_,
|
|
@@ -6943,7 +6963,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6943
6963
|
component: link_ ? "a" : "div",
|
|
6944
6964
|
"class": "d-standard-content-wrapper",
|
|
6945
6965
|
get style() {
|
|
6946
|
-
return aspectRatioWhenAloneInRow_() ? "--media-aspect-ratio: ".concat(aspectRatioWhenAloneInRow_()) : "";
|
|
6966
|
+
return aspectRatio_ === 1.5 ? "--media-aspect-ratio: 1.5" : aspectRatioWhenAloneInRow_() ? "--media-aspect-ratio: ".concat(aspectRatioWhenAloneInRow_()) : "";
|
|
6947
6967
|
},
|
|
6948
6968
|
get onClick() {
|
|
6949
6969
|
return $3hooq$depictaiutilisharedlatest.catchify(ev => link_ && router_.navigate_.go_to_({
|
|
@@ -7010,7 +7030,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
7010
7030
|
}
|
|
7011
7031
|
}));
|
|
7012
7032
|
}
|
|
7013
|
-
const $0c035bbe7e30b438$export$af2c67164f68e9e9 = content => {
|
|
7033
|
+
const $0c035bbe7e30b438$export$af2c67164f68e9e9 = (content, aspectRatio) => {
|
|
7014
7034
|
const {
|
|
7015
7035
|
link: link,
|
|
7016
7036
|
type: type,
|
|
@@ -7019,7 +7039,7 @@ const $0c035bbe7e30b438$export$af2c67164f68e9e9 = content => {
|
|
|
7019
7039
|
text_position: text_position,
|
|
7020
7040
|
cta: cta
|
|
7021
7041
|
} = content;
|
|
7022
|
-
return JSON.stringify([link, type, url, text !== null && text !== void 0 ? text : null, text_position !== null && text_position !== void 0 ? text_position : null, cta !== null && cta !== void 0 ? cta : null]);
|
|
7042
|
+
return JSON.stringify([link, type, url, text !== null && text !== void 0 ? text : null, text_position !== null && text_position !== void 0 ? text_position : null, cta !== null && cta !== void 0 ? cta : null, aspectRatio !== null && aspectRatio !== void 0 ? aspectRatio : null]);
|
|
7023
7043
|
};
|
|
7024
7044
|
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
7025
7045
|
let hasSeenContentBlock = false;
|
|
@@ -7062,7 +7082,7 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
7062
7082
|
cta: cta
|
|
7063
7083
|
}
|
|
7064
7084
|
} = row;
|
|
7065
|
-
const componentCacheKey = $0c035bbe7e30b438$export$af2c67164f68e9e9(row.content);
|
|
7085
|
+
const componentCacheKey = $0c035bbe7e30b438$export$af2c67164f68e9e9(row.content, row.aspect_ratio);
|
|
7066
7086
|
// The aspect ratio depends only on the media, so its history key must stay the pre-text 3-element shape — widening it would orphan every ratio already persisted in history.state
|
|
7067
7087
|
const mediaCacheKey = JSON.stringify([link, type, url]);
|
|
7068
7088
|
let component = contentComponents.get(componentCacheKey);
|
|
@@ -7073,6 +7093,9 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
7073
7093
|
mediaUrl_: url,
|
|
7074
7094
|
router_: router_,
|
|
7075
7095
|
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[mediaCacheKey],
|
|
7096
|
+
get aspectRatio_() {
|
|
7097
|
+
return row.aspect_ratio;
|
|
7098
|
+
},
|
|
7076
7099
|
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
7077
7100
|
...prev,
|
|
7078
7101
|
aspectRatios: {
|
|
@@ -7090,6 +7113,7 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
7090
7113
|
const contentBlock = {
|
|
7091
7114
|
span_columns: row.span_columns,
|
|
7092
7115
|
span_rows: row.span_rows,
|
|
7116
|
+
aspect_ratio: row.aspect_ratio,
|
|
7093
7117
|
position: row.position,
|
|
7094
7118
|
content: component
|
|
7095
7119
|
};
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.27";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -393,6 +393,7 @@ export function ImagePlaceholder(props: ImagePlaceholderBaseOptions & (ImagePlac
|
|
|
393
393
|
export type ContentBlock = {
|
|
394
394
|
span_columns: number;
|
|
395
395
|
span_rows: number;
|
|
396
|
+
aspect_ratio?: 1.5;
|
|
396
397
|
position: "left" | "center" | "right";
|
|
397
398
|
content: () => JSX.Element | Promise<JSX.Element>;
|
|
398
399
|
};
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
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.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.27";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $b8hua$createSignal(false);
|
|
16
16
|
$b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
|
|
@@ -1450,7 +1450,14 @@ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1450
1450
|
return !rendering_delayed();
|
|
1451
1451
|
},
|
|
1452
1452
|
get children() {
|
|
1453
|
-
return $b8hua$ssr($ff7feae4dddd6073$var$_tmpl$, $b8hua$ssrHydrationKey(), "content-block-wrapper ".concat(final_spans().spans_whole_row ? "spans-whole-row" : "", " ").concat(final_spans().spans_multiple_rows ? "spans-multiple-rows" : ""
|
|
1453
|
+
return $b8hua$ssr($ff7feae4dddd6073$var$_tmpl$, $b8hua$ssrHydrationKey(), "content-block-wrapper ".concat(final_spans().spans_whole_row ? "spans-whole-row" : "", " ").concat(final_spans().spans_multiple_rows ? "spans-multiple-rows" : "", " ").concat(block.aspect_ratio === 1.5 ? "has-explicit-aspect-ratio" : ""), $b8hua$ssrAttribute("data-content-block-row", $b8hua$escape(row(), true), false), $b8hua$ssrStyle({
|
|
1454
|
+
"grid-column": "span ".concat(final_span_columns()),
|
|
1455
|
+
"grid-row": "span ".concat(final_span_rows()),
|
|
1456
|
+
...(block.aspect_ratio === 1.5 && {
|
|
1457
|
+
"--content-block-aspect-ratio": block.aspect_ratio
|
|
1458
|
+
}),
|
|
1459
|
+
[(0, $64d94dcaa058dc7b$export$c500183c31c2b22e)]: final_span_columns()
|
|
1460
|
+
}), $b8hua$escape($b8hua$createComponent($ff7feae4dddd6073$var$RenderContent, {
|
|
1454
1461
|
get content() {
|
|
1455
1462
|
return block.content;
|
|
1456
1463
|
}
|
|
@@ -6414,7 +6421,7 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
6414
6421
|
};
|
|
6415
6422
|
const idleHandle = requestIdleCallback(deadline => {
|
|
6416
6423
|
cancel();
|
|
6417
|
-
return callback(deadline);
|
|
6424
|
+
return callback(typeof (deadline === null || deadline === void 0 ? void 0 : deadline.timeRemaining) === "function" ? deadline : $6db93f70c2db1486$var$makeDeadline());
|
|
6418
6425
|
}, {
|
|
6419
6426
|
timeout: timeout
|
|
6420
6427
|
});
|
|
@@ -6431,6 +6438,18 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
6431
6438
|
}, timeout + 1000);
|
|
6432
6439
|
return cancel;
|
|
6433
6440
|
}
|
|
6441
|
+
/**
|
|
6442
|
+
* Stand-in for a missing IdleDeadline: 50ms, the most a real one gives, counting down from when the callback was called
|
|
6443
|
+
*/
|
|
6444
|
+
function $6db93f70c2db1486$var$makeDeadline() {
|
|
6445
|
+
const start = performance.now();
|
|
6446
|
+
return {
|
|
6447
|
+
didTimeout: false,
|
|
6448
|
+
timeRemaining() {
|
|
6449
|
+
return Math.max(0, 50 - (performance.now() - start));
|
|
6450
|
+
}
|
|
6451
|
+
};
|
|
6452
|
+
}
|
|
6434
6453
|
function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
|
|
6435
6454
|
var _globalThis$performan, _globalThis$performan2, _globalThis$performan3, _globalThis$performan4;
|
|
6436
6455
|
const page_hasnt_loaded =
|
|
@@ -6819,6 +6838,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
6819
6838
|
router_: router_,
|
|
6820
6839
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
6821
6840
|
mediaUrl_: mediaUrl_,
|
|
6841
|
+
aspectRatio_: aspectRatio_,
|
|
6822
6842
|
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
6823
6843
|
imageResizer_: imageResizer_,
|
|
6824
6844
|
text_: text_,
|
|
@@ -6838,7 +6858,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
6838
6858
|
component: link_ ? "a" : "div",
|
|
6839
6859
|
"class": "d-standard-content-wrapper",
|
|
6840
6860
|
get style() {
|
|
6841
|
-
return aspectRatioWhenAloneInRow_() ? "--media-aspect-ratio: ".concat(aspectRatioWhenAloneInRow_()) : "";
|
|
6861
|
+
return aspectRatio_ === 1.5 ? "--media-aspect-ratio: 1.5" : aspectRatioWhenAloneInRow_() ? "--media-aspect-ratio: ".concat(aspectRatioWhenAloneInRow_()) : "";
|
|
6842
6862
|
},
|
|
6843
6863
|
get onClick() {
|
|
6844
6864
|
return $b8hua$catchify(ev => link_ && router_.navigate_.go_to_({
|
|
@@ -6905,7 +6925,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
6905
6925
|
}
|
|
6906
6926
|
}));
|
|
6907
6927
|
}
|
|
6908
|
-
const $12ff24fdc4b26d88$export$af2c67164f68e9e9 = content => {
|
|
6928
|
+
const $12ff24fdc4b26d88$export$af2c67164f68e9e9 = (content, aspectRatio) => {
|
|
6909
6929
|
const {
|
|
6910
6930
|
link: link,
|
|
6911
6931
|
type: type,
|
|
@@ -6914,7 +6934,7 @@ const $12ff24fdc4b26d88$export$af2c67164f68e9e9 = content => {
|
|
|
6914
6934
|
text_position: text_position,
|
|
6915
6935
|
cta: cta
|
|
6916
6936
|
} = content;
|
|
6917
|
-
return JSON.stringify([link, type, url, text !== null && text !== void 0 ? text : null, text_position !== null && text_position !== void 0 ? text_position : null, cta !== null && cta !== void 0 ? cta : null]);
|
|
6937
|
+
return JSON.stringify([link, type, url, text !== null && text !== void 0 ? text : null, text_position !== null && text_position !== void 0 ? text_position : null, cta !== null && cta !== void 0 ? cta : null, aspectRatio !== null && aspectRatio !== void 0 ? aspectRatio : null]);
|
|
6918
6938
|
};
|
|
6919
6939
|
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
6920
6940
|
let hasSeenContentBlock = false;
|
|
@@ -6957,7 +6977,7 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6957
6977
|
cta: cta
|
|
6958
6978
|
}
|
|
6959
6979
|
} = row;
|
|
6960
|
-
const componentCacheKey = $12ff24fdc4b26d88$export$af2c67164f68e9e9(row.content);
|
|
6980
|
+
const componentCacheKey = $12ff24fdc4b26d88$export$af2c67164f68e9e9(row.content, row.aspect_ratio);
|
|
6961
6981
|
// The aspect ratio depends only on the media, so its history key must stay the pre-text 3-element shape — widening it would orphan every ratio already persisted in history.state
|
|
6962
6982
|
const mediaCacheKey = JSON.stringify([link, type, url]);
|
|
6963
6983
|
let component = contentComponents.get(componentCacheKey);
|
|
@@ -6968,6 +6988,9 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6968
6988
|
mediaUrl_: url,
|
|
6969
6989
|
router_: router_,
|
|
6970
6990
|
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[mediaCacheKey],
|
|
6991
|
+
get aspectRatio_() {
|
|
6992
|
+
return row.aspect_ratio;
|
|
6993
|
+
},
|
|
6971
6994
|
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
6972
6995
|
...prev,
|
|
6973
6996
|
aspectRatios: {
|
|
@@ -6985,6 +7008,7 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6985
7008
|
const contentBlock = {
|
|
6986
7009
|
span_columns: row.span_columns,
|
|
6987
7010
|
span_rows: row.span_rows,
|
|
7011
|
+
aspect_ratio: row.aspect_ratio,
|
|
6988
7012
|
position: row.position,
|
|
6989
7013
|
content: component
|
|
6990
7014
|
};
|
package/server/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.27";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $5vyXB$solidjs.createSignal(false);
|
|
115
115
|
$5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -1479,7 +1479,14 @@ function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1479
1479
|
return !rendering_delayed();
|
|
1480
1480
|
},
|
|
1481
1481
|
get children() {
|
|
1482
|
-
return $5vyXB$solidjsweb.ssr($d92f338ba8f9da9b$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `content-block-wrapper ${final_spans().spans_whole_row ? "spans-whole-row" : ""} ${final_spans().spans_multiple_rows ? "spans-multiple-rows" : ""}
|
|
1482
|
+
return $5vyXB$solidjsweb.ssr($d92f338ba8f9da9b$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `content-block-wrapper ${final_spans().spans_whole_row ? "spans-whole-row" : ""} ${final_spans().spans_multiple_rows ? "spans-multiple-rows" : ""} ${block.aspect_ratio === 1.5 ? "has-explicit-aspect-ratio" : ""}`, $5vyXB$solidjsweb.ssrAttribute("data-content-block-row", $5vyXB$solidjsweb.escape(row(), true), false), $5vyXB$solidjsweb.ssrStyle({
|
|
1483
|
+
"grid-column": `span ${final_span_columns()}`,
|
|
1484
|
+
"grid-row": `span ${final_span_rows()}`,
|
|
1485
|
+
...(block.aspect_ratio === 1.5 && {
|
|
1486
|
+
"--content-block-aspect-ratio": block.aspect_ratio
|
|
1487
|
+
}),
|
|
1488
|
+
[(0, $75777da1687ba3f6$export$c500183c31c2b22e)]: final_span_columns()
|
|
1489
|
+
}), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent($d92f338ba8f9da9b$var$RenderContent, {
|
|
1483
1490
|
get content() {
|
|
1484
1491
|
return block.content;
|
|
1485
1492
|
}
|
|
@@ -6146,7 +6153,7 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
|
|
|
6146
6153
|
};
|
|
6147
6154
|
const idleHandle = requestIdleCallback(deadline => {
|
|
6148
6155
|
cancel();
|
|
6149
|
-
return callback(deadline);
|
|
6156
|
+
return callback(typeof deadline?.timeRemaining === "function" ? deadline : $3ea8e0af95b5b7d2$var$makeDeadline());
|
|
6150
6157
|
}, {
|
|
6151
6158
|
timeout: timeout
|
|
6152
6159
|
});
|
|
@@ -6163,6 +6170,18 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
|
|
|
6163
6170
|
}, timeout + 1000);
|
|
6164
6171
|
return cancel;
|
|
6165
6172
|
}
|
|
6173
|
+
/**
|
|
6174
|
+
* Stand-in for a missing IdleDeadline: 50ms, the most a real one gives, counting down from when the callback was called
|
|
6175
|
+
*/
|
|
6176
|
+
function $3ea8e0af95b5b7d2$var$makeDeadline() {
|
|
6177
|
+
const start = performance.now();
|
|
6178
|
+
return {
|
|
6179
|
+
didTimeout: false,
|
|
6180
|
+
timeRemaining() {
|
|
6181
|
+
return Math.max(0, 50 - (performance.now() - start));
|
|
6182
|
+
}
|
|
6183
|
+
};
|
|
6184
|
+
}
|
|
6166
6185
|
function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
|
|
6167
6186
|
const page_hasnt_loaded =
|
|
6168
6187
|
// @ts-ignore
|
|
@@ -6533,6 +6552,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
6533
6552
|
router_: router_,
|
|
6534
6553
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
6535
6554
|
mediaUrl_: mediaUrl_,
|
|
6555
|
+
aspectRatio_: aspectRatio_,
|
|
6536
6556
|
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
6537
6557
|
imageResizer_: imageResizer_,
|
|
6538
6558
|
text_: text_,
|
|
@@ -6552,7 +6572,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
6552
6572
|
component: link_ ? "a" : "div",
|
|
6553
6573
|
"class": "d-standard-content-wrapper",
|
|
6554
6574
|
get style() {
|
|
6555
|
-
return aspectRatioWhenAloneInRow_() ? `--media-aspect-ratio: ${aspectRatioWhenAloneInRow_()}` : "";
|
|
6575
|
+
return aspectRatio_ === 1.5 ? "--media-aspect-ratio: 1.5" : aspectRatioWhenAloneInRow_() ? `--media-aspect-ratio: ${aspectRatioWhenAloneInRow_()}` : "";
|
|
6556
6576
|
},
|
|
6557
6577
|
get onClick() {
|
|
6558
6578
|
return $5vyXB$depictaiutilisharedlatest.catchify(ev => link_ && router_.navigate_.go_to_({
|
|
@@ -6613,7 +6633,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
6613
6633
|
}
|
|
6614
6634
|
}));
|
|
6615
6635
|
}
|
|
6616
|
-
const $0a80939bf0a1e9cc$export$af2c67164f68e9e9 = content => {
|
|
6636
|
+
const $0a80939bf0a1e9cc$export$af2c67164f68e9e9 = (content, aspectRatio) => {
|
|
6617
6637
|
const {
|
|
6618
6638
|
link: link,
|
|
6619
6639
|
type: type,
|
|
@@ -6622,7 +6642,7 @@ const $0a80939bf0a1e9cc$export$af2c67164f68e9e9 = content => {
|
|
|
6622
6642
|
text_position: text_position,
|
|
6623
6643
|
cta: cta
|
|
6624
6644
|
} = content;
|
|
6625
|
-
return JSON.stringify([link, type, url, text ?? null, text_position ?? null, cta ?? null]);
|
|
6645
|
+
return JSON.stringify([link, type, url, text ?? null, text_position ?? null, cta ?? null, aspectRatio ?? null]);
|
|
6626
6646
|
};
|
|
6627
6647
|
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
6628
6648
|
let hasSeenContentBlock = false;
|
|
@@ -6664,7 +6684,7 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6664
6684
|
cta: cta
|
|
6665
6685
|
}
|
|
6666
6686
|
} = row;
|
|
6667
|
-
const componentCacheKey = $0a80939bf0a1e9cc$export$af2c67164f68e9e9(row.content);
|
|
6687
|
+
const componentCacheKey = $0a80939bf0a1e9cc$export$af2c67164f68e9e9(row.content, row.aspect_ratio);
|
|
6668
6688
|
// The aspect ratio depends only on the media, so its history key must stay the pre-text 3-element shape — widening it would orphan every ratio already persisted in history.state
|
|
6669
6689
|
const mediaCacheKey = JSON.stringify([link, type, url]);
|
|
6670
6690
|
let component = contentComponents.get(componentCacheKey);
|
|
@@ -6675,6 +6695,9 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6675
6695
|
mediaUrl_: url,
|
|
6676
6696
|
router_: router_,
|
|
6677
6697
|
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[mediaCacheKey],
|
|
6698
|
+
get aspectRatio_() {
|
|
6699
|
+
return row.aspect_ratio;
|
|
6700
|
+
},
|
|
6678
6701
|
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
6679
6702
|
...prev,
|
|
6680
6703
|
aspectRatios: {
|
|
@@ -6692,6 +6715,7 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6692
6715
|
const contentBlock = {
|
|
6693
6716
|
span_columns: row.span_columns,
|
|
6694
6717
|
span_rows: row.span_rows,
|
|
6718
|
+
aspect_ratio: row.aspect_ratio,
|
|
6695
6719
|
position: row.position,
|
|
6696
6720
|
content: component
|
|
6697
6721
|
};
|
package/server/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.27";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -393,6 +393,7 @@ export function ImagePlaceholder(props: ImagePlaceholderBaseOptions & (ImagePlac
|
|
|
393
393
|
export type ContentBlock = {
|
|
394
394
|
span_columns: number;
|
|
395
395
|
span_rows: number;
|
|
396
|
+
aspect_ratio?: 1.5;
|
|
396
397
|
position: "left" | "center" | "right";
|
|
397
398
|
content: () => JSX.Element | Promise<JSX.Element>;
|
|
398
399
|
};
|
package/server/latest/index.js
CHANGED
|
@@ -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.10.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.27";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $i7OB2$createSignal(false);
|
|
13
13
|
$i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
|
|
@@ -1377,7 +1377,14 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1377
1377
|
return !rendering_delayed();
|
|
1378
1378
|
},
|
|
1379
1379
|
get children() {
|
|
1380
|
-
return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), `content-block-wrapper ${final_spans().spans_whole_row ? "spans-whole-row" : ""} ${final_spans().spans_multiple_rows ? "spans-multiple-rows" : ""}
|
|
1380
|
+
return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), `content-block-wrapper ${final_spans().spans_whole_row ? "spans-whole-row" : ""} ${final_spans().spans_multiple_rows ? "spans-multiple-rows" : ""} ${block.aspect_ratio === 1.5 ? "has-explicit-aspect-ratio" : ""}`, $i7OB2$ssrAttribute("data-content-block-row", $i7OB2$escape(row(), true), false), $i7OB2$ssrStyle({
|
|
1381
|
+
"grid-column": `span ${final_span_columns()}`,
|
|
1382
|
+
"grid-row": `span ${final_span_rows()}`,
|
|
1383
|
+
...(block.aspect_ratio === 1.5 && {
|
|
1384
|
+
"--content-block-aspect-ratio": block.aspect_ratio
|
|
1385
|
+
}),
|
|
1386
|
+
[(0, $6dee9211e57ac31a$export$c500183c31c2b22e)]: final_span_columns()
|
|
1387
|
+
}), $i7OB2$escape($i7OB2$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
|
|
1381
1388
|
get content() {
|
|
1382
1389
|
return block.content;
|
|
1383
1390
|
}
|
|
@@ -6044,7 +6051,7 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
|
|
|
6044
6051
|
};
|
|
6045
6052
|
const idleHandle = requestIdleCallback(deadline => {
|
|
6046
6053
|
cancel();
|
|
6047
|
-
return callback(deadline);
|
|
6054
|
+
return callback(typeof deadline?.timeRemaining === "function" ? deadline : $4ea56971d92eb0cd$var$makeDeadline());
|
|
6048
6055
|
}, {
|
|
6049
6056
|
timeout: timeout
|
|
6050
6057
|
});
|
|
@@ -6061,6 +6068,18 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
|
|
|
6061
6068
|
}, timeout + 1000);
|
|
6062
6069
|
return cancel;
|
|
6063
6070
|
}
|
|
6071
|
+
/**
|
|
6072
|
+
* Stand-in for a missing IdleDeadline: 50ms, the most a real one gives, counting down from when the callback was called
|
|
6073
|
+
*/
|
|
6074
|
+
function $4ea56971d92eb0cd$var$makeDeadline() {
|
|
6075
|
+
const start = performance.now();
|
|
6076
|
+
return {
|
|
6077
|
+
didTimeout: false,
|
|
6078
|
+
timeRemaining() {
|
|
6079
|
+
return Math.max(0, 50 - (performance.now() - start));
|
|
6080
|
+
}
|
|
6081
|
+
};
|
|
6082
|
+
}
|
|
6064
6083
|
function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
|
|
6065
6084
|
const page_hasnt_loaded =
|
|
6066
6085
|
// @ts-ignore
|
|
@@ -6431,6 +6450,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
6431
6450
|
router_: router_,
|
|
6432
6451
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
6433
6452
|
mediaUrl_: mediaUrl_,
|
|
6453
|
+
aspectRatio_: aspectRatio_,
|
|
6434
6454
|
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
6435
6455
|
imageResizer_: imageResizer_,
|
|
6436
6456
|
text_: text_,
|
|
@@ -6450,7 +6470,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
6450
6470
|
component: link_ ? "a" : "div",
|
|
6451
6471
|
"class": "d-standard-content-wrapper",
|
|
6452
6472
|
get style() {
|
|
6453
|
-
return aspectRatioWhenAloneInRow_() ? `--media-aspect-ratio: ${aspectRatioWhenAloneInRow_()}` : "";
|
|
6473
|
+
return aspectRatio_ === 1.5 ? "--media-aspect-ratio: 1.5" : aspectRatioWhenAloneInRow_() ? `--media-aspect-ratio: ${aspectRatioWhenAloneInRow_()}` : "";
|
|
6454
6474
|
},
|
|
6455
6475
|
get onClick() {
|
|
6456
6476
|
return $i7OB2$catchify(ev => link_ && router_.navigate_.go_to_({
|
|
@@ -6511,7 +6531,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
6511
6531
|
}
|
|
6512
6532
|
}));
|
|
6513
6533
|
}
|
|
6514
|
-
const $486360b09f0d5729$export$af2c67164f68e9e9 = content => {
|
|
6534
|
+
const $486360b09f0d5729$export$af2c67164f68e9e9 = (content, aspectRatio) => {
|
|
6515
6535
|
const {
|
|
6516
6536
|
link: link,
|
|
6517
6537
|
type: type,
|
|
@@ -6520,7 +6540,7 @@ const $486360b09f0d5729$export$af2c67164f68e9e9 = content => {
|
|
|
6520
6540
|
text_position: text_position,
|
|
6521
6541
|
cta: cta
|
|
6522
6542
|
} = content;
|
|
6523
|
-
return JSON.stringify([link, type, url, text ?? null, text_position ?? null, cta ?? null]);
|
|
6543
|
+
return JSON.stringify([link, type, url, text ?? null, text_position ?? null, cta ?? null, aspectRatio ?? null]);
|
|
6524
6544
|
};
|
|
6525
6545
|
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
6526
6546
|
let hasSeenContentBlock = false;
|
|
@@ -6562,7 +6582,7 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6562
6582
|
cta: cta
|
|
6563
6583
|
}
|
|
6564
6584
|
} = row;
|
|
6565
|
-
const componentCacheKey = $486360b09f0d5729$export$af2c67164f68e9e9(row.content);
|
|
6585
|
+
const componentCacheKey = $486360b09f0d5729$export$af2c67164f68e9e9(row.content, row.aspect_ratio);
|
|
6566
6586
|
// The aspect ratio depends only on the media, so its history key must stay the pre-text 3-element shape — widening it would orphan every ratio already persisted in history.state
|
|
6567
6587
|
const mediaCacheKey = JSON.stringify([link, type, url]);
|
|
6568
6588
|
let component = contentComponents.get(componentCacheKey);
|
|
@@ -6573,6 +6593,9 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6573
6593
|
mediaUrl_: url,
|
|
6574
6594
|
router_: router_,
|
|
6575
6595
|
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[mediaCacheKey],
|
|
6596
|
+
get aspectRatio_() {
|
|
6597
|
+
return row.aspect_ratio;
|
|
6598
|
+
},
|
|
6576
6599
|
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
6577
6600
|
...prev,
|
|
6578
6601
|
aspectRatios: {
|
|
@@ -6590,6 +6613,7 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6590
6613
|
const contentBlock = {
|
|
6591
6614
|
span_columns: row.span_columns,
|
|
6592
6615
|
span_rows: row.span_rows,
|
|
6616
|
+
aspect_ratio: row.aspect_ratio,
|
|
6593
6617
|
position: row.position,
|
|
6594
6618
|
content: component
|
|
6595
6619
|
};
|