@depict-ai/ui 4.10.22 → 4.10.24
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 +26 -19
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +26 -19
- package/latest/index.cjs +26 -16
- package/latest/index.d.ts +1 -1
- package/latest/index.js +26 -16
- package/package.json +9 -4
- package/server/ES10/index.cjs +26 -19
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +26 -19
- package/server/latest/index.cjs +26 -16
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +26 -16
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.24";
|
|
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 => {
|
|
@@ -1768,11 +1768,16 @@ function $f8f375d6245ffff2$export$b94605e5b3ce01c(_ref4) {
|
|
|
1768
1768
|
if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
|
|
1769
1769
|
// Find the row the last product lands in: each row has room for the columns that blocks don't take up
|
|
1770
1770
|
let last_product_row = 0;
|
|
1771
|
+
let last_product_row_is_full = false;
|
|
1771
1772
|
for (let seen_products = 0;; last_product_row++) {
|
|
1772
1773
|
const row = displaced_products_[last_product_row];
|
|
1773
1774
|
const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
|
|
1774
|
-
|
|
1775
|
-
if (seen_products >= product_count)
|
|
1775
|
+
const product_slots_in_row = Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
|
|
1776
|
+
if (seen_products + product_slots_in_row >= product_count) {
|
|
1777
|
+
last_product_row_is_full = seen_products + product_slots_in_row === product_count;
|
|
1778
|
+
break;
|
|
1779
|
+
}
|
|
1780
|
+
seen_products += product_slots_in_row;
|
|
1776
1781
|
// Rows past the ones blocks take up all have room for products, so we're done by then at the latest
|
|
1777
1782
|
if (last_product_row >= displaced_products_.length + product_count) break;
|
|
1778
1783
|
}
|
|
@@ -1781,31 +1786,33 @@ function $f8f375d6245ffff2$export$b94605e5b3ce01c(_ref4) {
|
|
|
1781
1786
|
const block = content_blocks_by_index_[i];
|
|
1782
1787
|
if (block === undefined) continue;
|
|
1783
1788
|
const rows = rows_by_index_[i] || [];
|
|
1789
|
+
const last_allowed_row = last_product_row + (last_product_row_is_full ? 1 : 0);
|
|
1784
1790
|
if (Array.isArray(block) && rows.length > 1) {
|
|
1785
|
-
// Several blocks share this index
|
|
1786
|
-
const
|
|
1787
|
-
if (
|
|
1791
|
+
// Several blocks can share this index. Keep only blocks in allowed trailing rows.
|
|
1792
|
+
const in_trailing_rows = block.filter((_, j) => rows[j] <= last_allowed_row);
|
|
1793
|
+
if (in_trailing_rows.length) trailing.push(in_trailing_rows);
|
|
1788
1794
|
continue;
|
|
1789
1795
|
}
|
|
1790
|
-
if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) >
|
|
1796
|
+
if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) > last_allowed_row) continue; // Keep cards meant for later rows hidden after filtering.
|
|
1791
1797
|
trailing.push(block);
|
|
1792
1798
|
}
|
|
1793
1799
|
return trailing;
|
|
1794
1800
|
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1801
|
+
function $f8f375d6245ffff2$export$911278b0390ae36e(block, max_span_columns) {
|
|
1802
|
+
const span_columns = Math.min(block.span_columns, max_span_columns !== null && max_span_columns !== void 0 ? max_span_columns : Infinity);
|
|
1803
|
+
const spans_whole_row = span_columns === max_span_columns;
|
|
1804
|
+
return {
|
|
1805
|
+
span_columns: span_columns,
|
|
1806
|
+
span_rows: spans_whole_row ? 1 : block.span_rows,
|
|
1807
|
+
spans_whole_row: spans_whole_row
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1800
1810
|
function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
1801
1811
|
const get_wrapped_blocks = $52FdA$solidjs.mapArray(() => rendered_content_blocks, block => {
|
|
1802
1812
|
if (!block) return;
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
});
|
|
1807
|
-
// If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
|
|
1808
|
-
const final_span_rows = $52FdA$solidjs.createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
1813
|
+
const final_spans = $52FdA$solidjs.createMemo(() => $f8f375d6245ffff2$export$911278b0390ae36e(block, max_span_columns()));
|
|
1814
|
+
const final_span_columns = $52FdA$solidjs.createMemo(() => final_spans().span_columns);
|
|
1815
|
+
const final_span_rows = $52FdA$solidjs.createMemo(() => final_spans().span_rows);
|
|
1809
1816
|
const [rendering_delayed, set_rendering_delayed_] = $52FdA$solidjs.createSignal(true);
|
|
1810
1817
|
const content = $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1811
1818
|
get when() {
|
|
@@ -1819,7 +1826,7 @@ function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1819
1826
|
}
|
|
1820
1827
|
}));
|
|
1821
1828
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
1822
|
-
var _v$ = !!(
|
|
1829
|
+
var _v$ = !!final_spans().spans_whole_row,
|
|
1823
1830
|
_v$2 = {
|
|
1824
1831
|
[(0, $830518481649feb1$export$c500183c31c2b22e)]: final_span_columns()
|
|
1825
1832
|
},
|
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.24";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
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.24";
|
|
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 => {
|
|
@@ -1663,11 +1663,16 @@ function $ff7feae4dddd6073$export$b94605e5b3ce01c(_ref4) {
|
|
|
1663
1663
|
if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
|
|
1664
1664
|
// Find the row the last product lands in: each row has room for the columns that blocks don't take up
|
|
1665
1665
|
let last_product_row = 0;
|
|
1666
|
+
let last_product_row_is_full = false;
|
|
1666
1667
|
for (let seen_products = 0;; last_product_row++) {
|
|
1667
1668
|
const row = displaced_products_[last_product_row];
|
|
1668
1669
|
const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
|
|
1669
|
-
|
|
1670
|
-
if (seen_products >= product_count)
|
|
1670
|
+
const product_slots_in_row = Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
|
|
1671
|
+
if (seen_products + product_slots_in_row >= product_count) {
|
|
1672
|
+
last_product_row_is_full = seen_products + product_slots_in_row === product_count;
|
|
1673
|
+
break;
|
|
1674
|
+
}
|
|
1675
|
+
seen_products += product_slots_in_row;
|
|
1671
1676
|
// Rows past the ones blocks take up all have room for products, so we're done by then at the latest
|
|
1672
1677
|
if (last_product_row >= displaced_products_.length + product_count) break;
|
|
1673
1678
|
}
|
|
@@ -1676,31 +1681,33 @@ function $ff7feae4dddd6073$export$b94605e5b3ce01c(_ref4) {
|
|
|
1676
1681
|
const block = content_blocks_by_index_[i];
|
|
1677
1682
|
if (block === undefined) continue;
|
|
1678
1683
|
const rows = rows_by_index_[i] || [];
|
|
1684
|
+
const last_allowed_row = last_product_row + (last_product_row_is_full ? 1 : 0);
|
|
1679
1685
|
if (Array.isArray(block) && rows.length > 1) {
|
|
1680
|
-
// Several blocks share this index
|
|
1681
|
-
const
|
|
1682
|
-
if (
|
|
1686
|
+
// Several blocks can share this index. Keep only blocks in allowed trailing rows.
|
|
1687
|
+
const in_trailing_rows = block.filter((_, j) => rows[j] <= last_allowed_row);
|
|
1688
|
+
if (in_trailing_rows.length) trailing.push(in_trailing_rows);
|
|
1683
1689
|
continue;
|
|
1684
1690
|
}
|
|
1685
|
-
if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) >
|
|
1691
|
+
if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) > last_allowed_row) continue; // Keep cards meant for later rows hidden after filtering.
|
|
1686
1692
|
trailing.push(block);
|
|
1687
1693
|
}
|
|
1688
1694
|
return trailing;
|
|
1689
1695
|
}
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1696
|
+
function $ff7feae4dddd6073$export$911278b0390ae36e(block, max_span_columns) {
|
|
1697
|
+
const span_columns = Math.min(block.span_columns, max_span_columns !== null && max_span_columns !== void 0 ? max_span_columns : Infinity);
|
|
1698
|
+
const spans_whole_row = span_columns === max_span_columns;
|
|
1699
|
+
return {
|
|
1700
|
+
span_columns: span_columns,
|
|
1701
|
+
span_rows: spans_whole_row ? 1 : block.span_rows,
|
|
1702
|
+
spans_whole_row: spans_whole_row
|
|
1703
|
+
};
|
|
1704
|
+
}
|
|
1695
1705
|
function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
1696
1706
|
const get_wrapped_blocks = $8tj43$mapArray(() => rendered_content_blocks, block => {
|
|
1697
1707
|
if (!block) return;
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
});
|
|
1702
|
-
// If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
|
|
1703
|
-
const final_span_rows = $8tj43$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
1708
|
+
const final_spans = $8tj43$createMemo(() => $ff7feae4dddd6073$export$911278b0390ae36e(block, max_span_columns()));
|
|
1709
|
+
const final_span_columns = $8tj43$createMemo(() => final_spans().span_columns);
|
|
1710
|
+
const final_span_rows = $8tj43$createMemo(() => final_spans().span_rows);
|
|
1704
1711
|
const [rendering_delayed, set_rendering_delayed_] = $8tj43$createSignal(true);
|
|
1705
1712
|
const content = $8tj43$createComponent((0, $8tj43$Show), {
|
|
1706
1713
|
get when() {
|
|
@@ -1714,7 +1721,7 @@ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1714
1721
|
}
|
|
1715
1722
|
}));
|
|
1716
1723
|
$8tj43$effect(_p$ => {
|
|
1717
|
-
var _v$ = !!(
|
|
1724
|
+
var _v$ = !!final_spans().spans_whole_row,
|
|
1718
1725
|
_v$2 = {
|
|
1719
1726
|
[(0, $64d94dcaa058dc7b$export$c500183c31c2b22e)]: final_span_columns()
|
|
1720
1727
|
},
|
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.24";
|
|
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, ({
|
|
@@ -1686,11 +1686,16 @@ function $d92f338ba8f9da9b$export$b94605e5b3ce01c({
|
|
|
1686
1686
|
if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
|
|
1687
1687
|
// Find the row the last product lands in: each row has room for the columns that blocks don't take up
|
|
1688
1688
|
let last_product_row = 0;
|
|
1689
|
+
let last_product_row_is_full = false;
|
|
1689
1690
|
for (let seen_products = 0;; last_product_row++) {
|
|
1690
1691
|
const row = displaced_products_[last_product_row];
|
|
1691
1692
|
const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
|
|
1692
|
-
|
|
1693
|
-
if (seen_products >= product_count)
|
|
1693
|
+
const product_slots_in_row = Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
|
|
1694
|
+
if (seen_products + product_slots_in_row >= product_count) {
|
|
1695
|
+
last_product_row_is_full = seen_products + product_slots_in_row === product_count;
|
|
1696
|
+
break;
|
|
1697
|
+
}
|
|
1698
|
+
seen_products += product_slots_in_row;
|
|
1694
1699
|
// Rows past the ones blocks take up all have room for products, so we're done by then at the latest
|
|
1695
1700
|
if (last_product_row >= displaced_products_.length + product_count) break;
|
|
1696
1701
|
}
|
|
@@ -1698,28 +1703,33 @@ function $d92f338ba8f9da9b$export$b94605e5b3ce01c({
|
|
|
1698
1703
|
const block = content_blocks_by_index_[i];
|
|
1699
1704
|
if (block === undefined) continue;
|
|
1700
1705
|
const rows = rows_by_index_[i] || [];
|
|
1706
|
+
const last_allowed_row = last_product_row + (last_product_row_is_full ? 1 : 0);
|
|
1701
1707
|
if (Array.isArray(block) && rows.length > 1) {
|
|
1702
|
-
// Several blocks share this index
|
|
1703
|
-
const
|
|
1704
|
-
if (
|
|
1708
|
+
// Several blocks can share this index. Keep only blocks in allowed trailing rows.
|
|
1709
|
+
const in_trailing_rows = block.filter((_, j) => rows[j] <= last_allowed_row);
|
|
1710
|
+
if (in_trailing_rows.length) trailing.push(in_trailing_rows);
|
|
1705
1711
|
continue;
|
|
1706
1712
|
}
|
|
1707
|
-
if ((rows[0] ?? Infinity) >
|
|
1713
|
+
if ((rows[0] ?? Infinity) > last_allowed_row) continue; // Keep cards meant for later rows hidden after filtering.
|
|
1708
1714
|
trailing.push(block);
|
|
1709
1715
|
}
|
|
1710
1716
|
return trailing;
|
|
1711
1717
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1718
|
+
function $d92f338ba8f9da9b$export$911278b0390ae36e(block, max_span_columns) {
|
|
1719
|
+
const span_columns = Math.min(block.span_columns, max_span_columns ?? Infinity);
|
|
1720
|
+
const spans_whole_row = span_columns === max_span_columns;
|
|
1721
|
+
return {
|
|
1722
|
+
span_columns: span_columns,
|
|
1723
|
+
span_rows: spans_whole_row ? 1 : block.span_rows,
|
|
1724
|
+
spans_whole_row: spans_whole_row
|
|
1725
|
+
};
|
|
1726
|
+
}
|
|
1717
1727
|
function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
1718
1728
|
const get_wrapped_blocks = $gVhhF$solidjs.mapArray(() => rendered_content_blocks, block => {
|
|
1719
1729
|
if (!block) return;
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1722
|
-
const final_span_rows = $gVhhF$solidjs.createMemo(() =>
|
|
1730
|
+
const final_spans = $gVhhF$solidjs.createMemo(() => $d92f338ba8f9da9b$export$911278b0390ae36e(block, max_span_columns()));
|
|
1731
|
+
const final_span_columns = $gVhhF$solidjs.createMemo(() => final_spans().span_columns);
|
|
1732
|
+
const final_span_rows = $gVhhF$solidjs.createMemo(() => final_spans().span_rows);
|
|
1723
1733
|
const [rendering_delayed, set_rendering_delayed_] = $gVhhF$solidjs.createSignal(true);
|
|
1724
1734
|
const content = $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1725
1735
|
get when() {
|
|
@@ -1733,7 +1743,7 @@ function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1733
1743
|
}
|
|
1734
1744
|
}));
|
|
1735
1745
|
$gVhhF$solidjsweb.effect(_p$ => {
|
|
1736
|
-
var _v$ = !!(
|
|
1746
|
+
var _v$ = !!final_spans().spans_whole_row,
|
|
1737
1747
|
_v$2 = {
|
|
1738
1748
|
[(0, $75777da1687ba3f6$export$c500183c31c2b22e)]: final_span_columns()
|
|
1739
1749
|
},
|
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.24";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
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.24";
|
|
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, ({
|
|
@@ -1584,11 +1584,16 @@ function $e7a7eb102ddc0c79$export$b94605e5b3ce01c({
|
|
|
1584
1584
|
if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
|
|
1585
1585
|
// Find the row the last product lands in: each row has room for the columns that blocks don't take up
|
|
1586
1586
|
let last_product_row = 0;
|
|
1587
|
+
let last_product_row_is_full = false;
|
|
1587
1588
|
for (let seen_products = 0;; last_product_row++) {
|
|
1588
1589
|
const row = displaced_products_[last_product_row];
|
|
1589
1590
|
const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
|
|
1590
|
-
|
|
1591
|
-
if (seen_products >= product_count)
|
|
1591
|
+
const product_slots_in_row = Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
|
|
1592
|
+
if (seen_products + product_slots_in_row >= product_count) {
|
|
1593
|
+
last_product_row_is_full = seen_products + product_slots_in_row === product_count;
|
|
1594
|
+
break;
|
|
1595
|
+
}
|
|
1596
|
+
seen_products += product_slots_in_row;
|
|
1592
1597
|
// Rows past the ones blocks take up all have room for products, so we're done by then at the latest
|
|
1593
1598
|
if (last_product_row >= displaced_products_.length + product_count) break;
|
|
1594
1599
|
}
|
|
@@ -1596,28 +1601,33 @@ function $e7a7eb102ddc0c79$export$b94605e5b3ce01c({
|
|
|
1596
1601
|
const block = content_blocks_by_index_[i];
|
|
1597
1602
|
if (block === undefined) continue;
|
|
1598
1603
|
const rows = rows_by_index_[i] || [];
|
|
1604
|
+
const last_allowed_row = last_product_row + (last_product_row_is_full ? 1 : 0);
|
|
1599
1605
|
if (Array.isArray(block) && rows.length > 1) {
|
|
1600
|
-
// Several blocks share this index
|
|
1601
|
-
const
|
|
1602
|
-
if (
|
|
1606
|
+
// Several blocks can share this index. Keep only blocks in allowed trailing rows.
|
|
1607
|
+
const in_trailing_rows = block.filter((_, j) => rows[j] <= last_allowed_row);
|
|
1608
|
+
if (in_trailing_rows.length) trailing.push(in_trailing_rows);
|
|
1603
1609
|
continue;
|
|
1604
1610
|
}
|
|
1605
|
-
if ((rows[0] ?? Infinity) >
|
|
1611
|
+
if ((rows[0] ?? Infinity) > last_allowed_row) continue; // Keep cards meant for later rows hidden after filtering.
|
|
1606
1612
|
trailing.push(block);
|
|
1607
1613
|
}
|
|
1608
1614
|
return trailing;
|
|
1609
1615
|
}
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1616
|
+
function $e7a7eb102ddc0c79$export$911278b0390ae36e(block, max_span_columns) {
|
|
1617
|
+
const span_columns = Math.min(block.span_columns, max_span_columns ?? Infinity);
|
|
1618
|
+
const spans_whole_row = span_columns === max_span_columns;
|
|
1619
|
+
return {
|
|
1620
|
+
span_columns: span_columns,
|
|
1621
|
+
span_rows: spans_whole_row ? 1 : block.span_rows,
|
|
1622
|
+
spans_whole_row: spans_whole_row
|
|
1623
|
+
};
|
|
1624
|
+
}
|
|
1615
1625
|
function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
1616
1626
|
const get_wrapped_blocks = $9HbP8$mapArray(() => rendered_content_blocks, block => {
|
|
1617
1627
|
if (!block) return;
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1620
|
-
const final_span_rows = $9HbP8$createMemo(() =>
|
|
1628
|
+
const final_spans = $9HbP8$createMemo(() => $e7a7eb102ddc0c79$export$911278b0390ae36e(block, max_span_columns()));
|
|
1629
|
+
const final_span_columns = $9HbP8$createMemo(() => final_spans().span_columns);
|
|
1630
|
+
const final_span_rows = $9HbP8$createMemo(() => final_spans().span_rows);
|
|
1621
1631
|
const [rendering_delayed, set_rendering_delayed_] = $9HbP8$createSignal(true);
|
|
1622
1632
|
const content = $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
1623
1633
|
get when() {
|
|
@@ -1631,7 +1641,7 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
1631
1641
|
}
|
|
1632
1642
|
}));
|
|
1633
1643
|
$9HbP8$effect(_p$ => {
|
|
1634
|
-
var _v$ = !!(
|
|
1644
|
+
var _v$ = !!final_spans().spans_whole_row,
|
|
1635
1645
|
_v$2 = {
|
|
1636
1646
|
[(0, $6dee9211e57ac31a$export$c500183c31c2b22e)]: final_span_columns()
|
|
1637
1647
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "git+https://github.com/depict-org/depict-ui.git",
|
|
6
|
+
"directory": "browser-tags-v2/packages/ui"
|
|
7
|
+
},
|
|
8
|
+
"version": "4.10.24",
|
|
4
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.",
|
|
5
10
|
"packageManager": "yarn@3.2.2",
|
|
6
11
|
"sass": "styles.scss",
|
|
@@ -236,9 +241,9 @@
|
|
|
236
241
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
242
|
"@babel/runtime": "^7.22.6",
|
|
238
243
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^4.6.
|
|
240
|
-
"@depict-ai/types": "^5.6.
|
|
241
|
-
"@depict-ai/utilishared": "^2.6.
|
|
244
|
+
"@depict-ai/plp-styling": "^4.6.15",
|
|
245
|
+
"@depict-ai/types": "^5.6.13",
|
|
246
|
+
"@depict-ai/utilishared": "^2.6.13",
|
|
242
247
|
"solid-js": "^1.9.10"
|
|
243
248
|
},
|
|
244
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.24";
|
|
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 => {
|
|
@@ -1475,11 +1475,16 @@ function $f8f375d6245ffff2$export$b94605e5b3ce01c(_ref4) {
|
|
|
1475
1475
|
if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
|
|
1476
1476
|
// Find the row the last product lands in: each row has room for the columns that blocks don't take up
|
|
1477
1477
|
let last_product_row = 0;
|
|
1478
|
+
let last_product_row_is_full = false;
|
|
1478
1479
|
for (let seen_products = 0;; last_product_row++) {
|
|
1479
1480
|
const row = displaced_products_[last_product_row];
|
|
1480
1481
|
const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
|
|
1481
|
-
|
|
1482
|
-
if (seen_products >= product_count)
|
|
1482
|
+
const product_slots_in_row = Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
|
|
1483
|
+
if (seen_products + product_slots_in_row >= product_count) {
|
|
1484
|
+
last_product_row_is_full = seen_products + product_slots_in_row === product_count;
|
|
1485
|
+
break;
|
|
1486
|
+
}
|
|
1487
|
+
seen_products += product_slots_in_row;
|
|
1483
1488
|
// Rows past the ones blocks take up all have room for products, so we're done by then at the latest
|
|
1484
1489
|
if (last_product_row >= displaced_products_.length + product_count) break;
|
|
1485
1490
|
}
|
|
@@ -1488,38 +1493,40 @@ function $f8f375d6245ffff2$export$b94605e5b3ce01c(_ref4) {
|
|
|
1488
1493
|
const block = content_blocks_by_index_[i];
|
|
1489
1494
|
if (block === undefined) continue;
|
|
1490
1495
|
const rows = rows_by_index_[i] || [];
|
|
1496
|
+
const last_allowed_row = last_product_row + (last_product_row_is_full ? 1 : 0);
|
|
1491
1497
|
if (Array.isArray(block) && rows.length > 1) {
|
|
1492
|
-
// Several blocks share this index
|
|
1493
|
-
const
|
|
1494
|
-
if (
|
|
1498
|
+
// Several blocks can share this index. Keep only blocks in allowed trailing rows.
|
|
1499
|
+
const in_trailing_rows = block.filter((_, j) => rows[j] <= last_allowed_row);
|
|
1500
|
+
if (in_trailing_rows.length) trailing.push(in_trailing_rows);
|
|
1495
1501
|
continue;
|
|
1496
1502
|
}
|
|
1497
|
-
if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) >
|
|
1503
|
+
if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) > last_allowed_row) continue; // Keep cards meant for later rows hidden after filtering.
|
|
1498
1504
|
trailing.push(block);
|
|
1499
1505
|
}
|
|
1500
1506
|
return trailing;
|
|
1501
1507
|
}
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1508
|
+
function $f8f375d6245ffff2$export$911278b0390ae36e(block, max_span_columns) {
|
|
1509
|
+
const span_columns = Math.min(block.span_columns, max_span_columns !== null && max_span_columns !== void 0 ? max_span_columns : Infinity);
|
|
1510
|
+
const spans_whole_row = span_columns === max_span_columns;
|
|
1511
|
+
return {
|
|
1512
|
+
span_columns: span_columns,
|
|
1513
|
+
span_rows: spans_whole_row ? 1 : block.span_rows,
|
|
1514
|
+
spans_whole_row: spans_whole_row
|
|
1515
|
+
};
|
|
1516
|
+
}
|
|
1507
1517
|
function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
1508
1518
|
const get_wrapped_blocks = $3hooq$solidjs.mapArray(() => rendered_content_blocks, block => {
|
|
1509
1519
|
if (!block) return;
|
|
1510
|
-
const
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
});
|
|
1514
|
-
// If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
|
|
1515
|
-
const final_span_rows = $3hooq$solidjs.createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
1520
|
+
const final_spans = $3hooq$solidjs.createMemo(() => $f8f375d6245ffff2$export$911278b0390ae36e(block, max_span_columns()));
|
|
1521
|
+
const final_span_columns = $3hooq$solidjs.createMemo(() => final_spans().span_columns);
|
|
1522
|
+
const final_span_rows = $3hooq$solidjs.createMemo(() => final_spans().span_rows);
|
|
1516
1523
|
const [rendering_delayed, set_rendering_delayed_] = $3hooq$solidjs.createSignal(true);
|
|
1517
1524
|
const content = $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
1518
1525
|
get when() {
|
|
1519
1526
|
return !rendering_delayed();
|
|
1520
1527
|
},
|
|
1521
1528
|
get children() {
|
|
1522
|
-
return $3hooq$solidjsweb.ssr($f8f375d6245ffff2$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "content-block-wrapper ".concat(
|
|
1529
|
+
return $3hooq$solidjsweb.ssr($f8f375d6245ffff2$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "content-block-wrapper ".concat(final_spans().spans_whole_row ? "spans-whole-row" : ""), "grid-column:" + "span ".concat($3hooq$solidjsweb.escape(final_span_columns(), true)) + (";grid-row:" + "span ".concat($3hooq$solidjsweb.escape(final_span_rows(), true))) + (";spans_columns_variable_name:" + $3hooq$solidjsweb.escape(final_span_columns(), true)), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($f8f375d6245ffff2$var$RenderContent, {
|
|
1523
1530
|
get content() {
|
|
1524
1531
|
return block.content;
|
|
1525
1532
|
}
|
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.24";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
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.24";
|
|
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 => {
|
|
@@ -1370,11 +1370,16 @@ function $ff7feae4dddd6073$export$b94605e5b3ce01c(_ref4) {
|
|
|
1370
1370
|
if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
|
|
1371
1371
|
// Find the row the last product lands in: each row has room for the columns that blocks don't take up
|
|
1372
1372
|
let last_product_row = 0;
|
|
1373
|
+
let last_product_row_is_full = false;
|
|
1373
1374
|
for (let seen_products = 0;; last_product_row++) {
|
|
1374
1375
|
const row = displaced_products_[last_product_row];
|
|
1375
1376
|
const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
|
|
1376
|
-
|
|
1377
|
-
if (seen_products >= product_count)
|
|
1377
|
+
const product_slots_in_row = Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
|
|
1378
|
+
if (seen_products + product_slots_in_row >= product_count) {
|
|
1379
|
+
last_product_row_is_full = seen_products + product_slots_in_row === product_count;
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
seen_products += product_slots_in_row;
|
|
1378
1383
|
// Rows past the ones blocks take up all have room for products, so we're done by then at the latest
|
|
1379
1384
|
if (last_product_row >= displaced_products_.length + product_count) break;
|
|
1380
1385
|
}
|
|
@@ -1383,38 +1388,40 @@ function $ff7feae4dddd6073$export$b94605e5b3ce01c(_ref4) {
|
|
|
1383
1388
|
const block = content_blocks_by_index_[i];
|
|
1384
1389
|
if (block === undefined) continue;
|
|
1385
1390
|
const rows = rows_by_index_[i] || [];
|
|
1391
|
+
const last_allowed_row = last_product_row + (last_product_row_is_full ? 1 : 0);
|
|
1386
1392
|
if (Array.isArray(block) && rows.length > 1) {
|
|
1387
|
-
// Several blocks share this index
|
|
1388
|
-
const
|
|
1389
|
-
if (
|
|
1393
|
+
// Several blocks can share this index. Keep only blocks in allowed trailing rows.
|
|
1394
|
+
const in_trailing_rows = block.filter((_, j) => rows[j] <= last_allowed_row);
|
|
1395
|
+
if (in_trailing_rows.length) trailing.push(in_trailing_rows);
|
|
1390
1396
|
continue;
|
|
1391
1397
|
}
|
|
1392
|
-
if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) >
|
|
1398
|
+
if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) > last_allowed_row) continue; // Keep cards meant for later rows hidden after filtering.
|
|
1393
1399
|
trailing.push(block);
|
|
1394
1400
|
}
|
|
1395
1401
|
return trailing;
|
|
1396
1402
|
}
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1403
|
+
function $ff7feae4dddd6073$export$911278b0390ae36e(block, max_span_columns) {
|
|
1404
|
+
const span_columns = Math.min(block.span_columns, max_span_columns !== null && max_span_columns !== void 0 ? max_span_columns : Infinity);
|
|
1405
|
+
const spans_whole_row = span_columns === max_span_columns;
|
|
1406
|
+
return {
|
|
1407
|
+
span_columns: span_columns,
|
|
1408
|
+
span_rows: spans_whole_row ? 1 : block.span_rows,
|
|
1409
|
+
spans_whole_row: spans_whole_row
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1402
1412
|
function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
1403
1413
|
const get_wrapped_blocks = $b8hua$mapArray(() => rendered_content_blocks, block => {
|
|
1404
1414
|
if (!block) return;
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
});
|
|
1409
|
-
// If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
|
|
1410
|
-
const final_span_rows = $b8hua$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
1415
|
+
const final_spans = $b8hua$createMemo(() => $ff7feae4dddd6073$export$911278b0390ae36e(block, max_span_columns()));
|
|
1416
|
+
const final_span_columns = $b8hua$createMemo(() => final_spans().span_columns);
|
|
1417
|
+
const final_span_rows = $b8hua$createMemo(() => final_spans().span_rows);
|
|
1411
1418
|
const [rendering_delayed, set_rendering_delayed_] = $b8hua$createSignal(true);
|
|
1412
1419
|
const content = $b8hua$createComponent((0, $b8hua$Show), {
|
|
1413
1420
|
get when() {
|
|
1414
1421
|
return !rendering_delayed();
|
|
1415
1422
|
},
|
|
1416
1423
|
get children() {
|
|
1417
|
-
return $b8hua$ssr($ff7feae4dddd6073$var$_tmpl$, $b8hua$ssrHydrationKey(), "content-block-wrapper ".concat(
|
|
1424
|
+
return $b8hua$ssr($ff7feae4dddd6073$var$_tmpl$, $b8hua$ssrHydrationKey(), "content-block-wrapper ".concat(final_spans().spans_whole_row ? "spans-whole-row" : ""), "grid-column:" + "span ".concat($b8hua$escape(final_span_columns(), true)) + (";grid-row:" + "span ".concat($b8hua$escape(final_span_rows(), true))) + (";spans_columns_variable_name:" + $b8hua$escape(final_span_columns(), true)), $b8hua$escape($b8hua$createComponent($ff7feae4dddd6073$var$RenderContent, {
|
|
1418
1425
|
get content() {
|
|
1419
1426
|
return block.content;
|
|
1420
1427
|
}
|
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.24";
|
|
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, ({
|
|
@@ -1406,11 +1406,16 @@ function $d92f338ba8f9da9b$export$b94605e5b3ce01c({
|
|
|
1406
1406
|
if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
|
|
1407
1407
|
// Find the row the last product lands in: each row has room for the columns that blocks don't take up
|
|
1408
1408
|
let last_product_row = 0;
|
|
1409
|
+
let last_product_row_is_full = false;
|
|
1409
1410
|
for (let seen_products = 0;; last_product_row++) {
|
|
1410
1411
|
const row = displaced_products_[last_product_row];
|
|
1411
1412
|
const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
|
|
1412
|
-
|
|
1413
|
-
if (seen_products >= product_count)
|
|
1413
|
+
const product_slots_in_row = Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
|
|
1414
|
+
if (seen_products + product_slots_in_row >= product_count) {
|
|
1415
|
+
last_product_row_is_full = seen_products + product_slots_in_row === product_count;
|
|
1416
|
+
break;
|
|
1417
|
+
}
|
|
1418
|
+
seen_products += product_slots_in_row;
|
|
1414
1419
|
// Rows past the ones blocks take up all have room for products, so we're done by then at the latest
|
|
1415
1420
|
if (last_product_row >= displaced_products_.length + product_count) break;
|
|
1416
1421
|
}
|
|
@@ -1418,35 +1423,40 @@ function $d92f338ba8f9da9b$export$b94605e5b3ce01c({
|
|
|
1418
1423
|
const block = content_blocks_by_index_[i];
|
|
1419
1424
|
if (block === undefined) continue;
|
|
1420
1425
|
const rows = rows_by_index_[i] || [];
|
|
1426
|
+
const last_allowed_row = last_product_row + (last_product_row_is_full ? 1 : 0);
|
|
1421
1427
|
if (Array.isArray(block) && rows.length > 1) {
|
|
1422
|
-
// Several blocks share this index
|
|
1423
|
-
const
|
|
1424
|
-
if (
|
|
1428
|
+
// Several blocks can share this index. Keep only blocks in allowed trailing rows.
|
|
1429
|
+
const in_trailing_rows = block.filter((_, j) => rows[j] <= last_allowed_row);
|
|
1430
|
+
if (in_trailing_rows.length) trailing.push(in_trailing_rows);
|
|
1425
1431
|
continue;
|
|
1426
1432
|
}
|
|
1427
|
-
if ((rows[0] ?? Infinity) >
|
|
1433
|
+
if ((rows[0] ?? Infinity) > last_allowed_row) continue; // Keep cards meant for later rows hidden after filtering.
|
|
1428
1434
|
trailing.push(block);
|
|
1429
1435
|
}
|
|
1430
1436
|
return trailing;
|
|
1431
1437
|
}
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1438
|
+
function $d92f338ba8f9da9b$export$911278b0390ae36e(block, max_span_columns) {
|
|
1439
|
+
const span_columns = Math.min(block.span_columns, max_span_columns ?? Infinity);
|
|
1440
|
+
const spans_whole_row = span_columns === max_span_columns;
|
|
1441
|
+
return {
|
|
1442
|
+
span_columns: span_columns,
|
|
1443
|
+
span_rows: spans_whole_row ? 1 : block.span_rows,
|
|
1444
|
+
spans_whole_row: spans_whole_row
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1437
1447
|
function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
1438
1448
|
const get_wrapped_blocks = $5vyXB$solidjs.mapArray(() => rendered_content_blocks, block => {
|
|
1439
1449
|
if (!block) return;
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1442
|
-
const final_span_rows = $5vyXB$solidjs.createMemo(() =>
|
|
1450
|
+
const final_spans = $5vyXB$solidjs.createMemo(() => $d92f338ba8f9da9b$export$911278b0390ae36e(block, max_span_columns()));
|
|
1451
|
+
const final_span_columns = $5vyXB$solidjs.createMemo(() => final_spans().span_columns);
|
|
1452
|
+
const final_span_rows = $5vyXB$solidjs.createMemo(() => final_spans().span_rows);
|
|
1443
1453
|
const [rendering_delayed, set_rendering_delayed_] = $5vyXB$solidjs.createSignal(true);
|
|
1444
1454
|
const content = $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1445
1455
|
get when() {
|
|
1446
1456
|
return !rendering_delayed();
|
|
1447
1457
|
},
|
|
1448
1458
|
get children() {
|
|
1449
|
-
return $5vyXB$solidjsweb.ssr($d92f338ba8f9da9b$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `content-block-wrapper ${
|
|
1459
|
+
return $5vyXB$solidjsweb.ssr($d92f338ba8f9da9b$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `content-block-wrapper ${final_spans().spans_whole_row ? "spans-whole-row" : ""}`, "grid-column:" + `span ${$5vyXB$solidjsweb.escape(final_span_columns(), true)}` + (";grid-row:" + `span ${$5vyXB$solidjsweb.escape(final_span_rows(), true)}`) + (";spans_columns_variable_name:" + $5vyXB$solidjsweb.escape(final_span_columns(), true)), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent($d92f338ba8f9da9b$var$RenderContent, {
|
|
1450
1460
|
get content() {
|
|
1451
1461
|
return block.content;
|
|
1452
1462
|
}
|
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.24";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
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.24";
|
|
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, ({
|
|
@@ -1304,11 +1304,16 @@ function $e7a7eb102ddc0c79$export$b94605e5b3ce01c({
|
|
|
1304
1304
|
if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
|
|
1305
1305
|
// Find the row the last product lands in: each row has room for the columns that blocks don't take up
|
|
1306
1306
|
let last_product_row = 0;
|
|
1307
|
+
let last_product_row_is_full = false;
|
|
1307
1308
|
for (let seen_products = 0;; last_product_row++) {
|
|
1308
1309
|
const row = displaced_products_[last_product_row];
|
|
1309
1310
|
const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
|
|
1310
|
-
|
|
1311
|
-
if (seen_products >= product_count)
|
|
1311
|
+
const product_slots_in_row = Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
|
|
1312
|
+
if (seen_products + product_slots_in_row >= product_count) {
|
|
1313
|
+
last_product_row_is_full = seen_products + product_slots_in_row === product_count;
|
|
1314
|
+
break;
|
|
1315
|
+
}
|
|
1316
|
+
seen_products += product_slots_in_row;
|
|
1312
1317
|
// Rows past the ones blocks take up all have room for products, so we're done by then at the latest
|
|
1313
1318
|
if (last_product_row >= displaced_products_.length + product_count) break;
|
|
1314
1319
|
}
|
|
@@ -1316,35 +1321,40 @@ function $e7a7eb102ddc0c79$export$b94605e5b3ce01c({
|
|
|
1316
1321
|
const block = content_blocks_by_index_[i];
|
|
1317
1322
|
if (block === undefined) continue;
|
|
1318
1323
|
const rows = rows_by_index_[i] || [];
|
|
1324
|
+
const last_allowed_row = last_product_row + (last_product_row_is_full ? 1 : 0);
|
|
1319
1325
|
if (Array.isArray(block) && rows.length > 1) {
|
|
1320
|
-
// Several blocks share this index
|
|
1321
|
-
const
|
|
1322
|
-
if (
|
|
1326
|
+
// Several blocks can share this index. Keep only blocks in allowed trailing rows.
|
|
1327
|
+
const in_trailing_rows = block.filter((_, j) => rows[j] <= last_allowed_row);
|
|
1328
|
+
if (in_trailing_rows.length) trailing.push(in_trailing_rows);
|
|
1323
1329
|
continue;
|
|
1324
1330
|
}
|
|
1325
|
-
if ((rows[0] ?? Infinity) >
|
|
1331
|
+
if ((rows[0] ?? Infinity) > last_allowed_row) continue; // Keep cards meant for later rows hidden after filtering.
|
|
1326
1332
|
trailing.push(block);
|
|
1327
1333
|
}
|
|
1328
1334
|
return trailing;
|
|
1329
1335
|
}
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1336
|
+
function $e7a7eb102ddc0c79$export$911278b0390ae36e(block, max_span_columns) {
|
|
1337
|
+
const span_columns = Math.min(block.span_columns, max_span_columns ?? Infinity);
|
|
1338
|
+
const spans_whole_row = span_columns === max_span_columns;
|
|
1339
|
+
return {
|
|
1340
|
+
span_columns: span_columns,
|
|
1341
|
+
span_rows: spans_whole_row ? 1 : block.span_rows,
|
|
1342
|
+
spans_whole_row: spans_whole_row
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1335
1345
|
function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
1336
1346
|
const get_wrapped_blocks = $i7OB2$mapArray(() => rendered_content_blocks, block => {
|
|
1337
1347
|
if (!block) return;
|
|
1338
|
-
const
|
|
1339
|
-
|
|
1340
|
-
const final_span_rows = $i7OB2$createMemo(() =>
|
|
1348
|
+
const final_spans = $i7OB2$createMemo(() => $e7a7eb102ddc0c79$export$911278b0390ae36e(block, max_span_columns()));
|
|
1349
|
+
const final_span_columns = $i7OB2$createMemo(() => final_spans().span_columns);
|
|
1350
|
+
const final_span_rows = $i7OB2$createMemo(() => final_spans().span_rows);
|
|
1341
1351
|
const [rendering_delayed, set_rendering_delayed_] = $i7OB2$createSignal(true);
|
|
1342
1352
|
const content = $i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1343
1353
|
get when() {
|
|
1344
1354
|
return !rendering_delayed();
|
|
1345
1355
|
},
|
|
1346
1356
|
get children() {
|
|
1347
|
-
return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), `content-block-wrapper ${
|
|
1357
|
+
return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), `content-block-wrapper ${final_spans().spans_whole_row ? "spans-whole-row" : ""}`, "grid-column:" + `span ${$i7OB2$escape(final_span_columns(), true)}` + (";grid-row:" + `span ${$i7OB2$escape(final_span_rows(), true)}`) + (";spans_columns_variable_name:" + $i7OB2$escape(final_span_columns(), true)), $i7OB2$escape($i7OB2$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
|
|
1348
1358
|
get content() {
|
|
1349
1359
|
return block.content;
|
|
1350
1360
|
}
|