@depict-ai/ui 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ES10/index.cjs CHANGED
@@ -76,7 +76,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
76
76
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
77
77
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
78
78
  /*! Depict.ai search and product listing SDK */
79
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.3";
79
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.4";
80
80
  const $a68b73fd7ba0853f$var$fallback_operator = "in";
81
81
  const $a68b73fd7ba0853f$var$fallback_token = "";
82
82
  const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
@@ -5274,6 +5274,9 @@ function $f8f375d6245ffff2$var$remap_blocks_to_index(_ref2) {
5274
5274
  const cols_showing = n_cols_currently_showing_();
5275
5275
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
5276
5276
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
5277
+ if (!cols_showing)
5278
+ // Nope out of here if we don't know how many columns are showing
5279
+ return content_blocks_by_index;
5277
5280
  for (let i = 0; i < wrapped_blocks.length; i++) {
5278
5281
  // i = row to show at
5279
5282
  const block = wrapped_blocks[i];
@@ -5338,10 +5341,12 @@ function $f8f375d6245ffff2$var$remap_blocks_to_index(_ref2) {
5338
5341
  function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
5339
5342
  const get_wrapped_blocks = $52FdA$solidjs.mapArray(() => rendered_content_blocks, block => {
5340
5343
  if (!block) return;
5341
- const get_span_columns = () => {
5344
+ const final_span_columns = $52FdA$solidjs.createMemo(() => {
5342
5345
  var _max_span_columns;
5343
5346
  return Math.min(block.span_columns, (_max_span_columns = max_span_columns()) !== null && _max_span_columns !== void 0 ? _max_span_columns : Infinity);
5344
- };
5347
+ });
5348
+ // 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
5349
+ const final_span_rows = $52FdA$solidjs.createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
5345
5350
  const [rendering_delayed, set_rendering_delayed_] = $52FdA$solidjs.createSignal(true);
5346
5351
  const content = $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
5347
5352
  get when() {
@@ -5356,10 +5361,10 @@ function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_s
5356
5361
  }));
5357
5362
  $52FdA$solidjsweb.effect(_p$ => {
5358
5363
  const _v$ = {
5359
- [(0, $830518481649feb1$export$c500183c31c2b22e)]: get_span_columns()
5364
+ [(0, $830518481649feb1$export$c500183c31c2b22e)]: final_span_columns()
5360
5365
  },
5361
- _v$2 = "span ".concat(get_span_columns()),
5362
- _v$3 = "span ".concat(block.span_rows);
5366
+ _v$2 = "span ".concat(final_span_columns()),
5367
+ _v$3 = "span ".concat(final_span_rows());
5363
5368
  _p$._v$ = $52FdA$solidjsweb.style(_el$, _v$, _p$._v$);
5364
5369
  _v$2 !== _p$._v$2 && ((_p$._v$2 = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
5365
5370
  _v$3 !== _p$._v$3 && ((_p$._v$3 = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
@@ -5382,7 +5387,10 @@ function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_s
5382
5387
  },
5383
5388
  get span_columns() {
5384
5389
  // Cap max width of block to the number of columns available, for everyone downstream
5385
- return get_span_columns();
5390
+ return final_span_columns();
5391
+ },
5392
+ get span_rows() {
5393
+ return final_span_rows();
5386
5394
  }
5387
5395
  });
5388
5396
  });
package/ES10/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.3";
10
+ export const version = "2.1.4";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
package/ES10/index.js CHANGED
@@ -9,7 +9,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
9
9
  /*! Depict.ai search and product listing SDK */
10
10
  import { register_es_version } from "../multi_import_deduplicator.mjs";
11
11
  register_es_version("ui", "ES10");
12
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.3";
12
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.4";
13
13
  const $2855bffe06ef7a03$var$fallback_operator = "in";
14
14
  const $2855bffe06ef7a03$var$fallback_token = "";
15
15
  const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
@@ -5207,6 +5207,9 @@ function $ff7feae4dddd6073$var$remap_blocks_to_index(_ref2) {
5207
5207
  const cols_showing = n_cols_currently_showing_();
5208
5208
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
5209
5209
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
5210
+ if (!cols_showing)
5211
+ // Nope out of here if we don't know how many columns are showing
5212
+ return content_blocks_by_index;
5210
5213
  for (let i = 0; i < wrapped_blocks.length; i++) {
5211
5214
  // i = row to show at
5212
5215
  const block = wrapped_blocks[i];
@@ -5271,10 +5274,12 @@ function $ff7feae4dddd6073$var$remap_blocks_to_index(_ref2) {
5271
5274
  function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
5272
5275
  const get_wrapped_blocks = $8tj43$mapArray(() => rendered_content_blocks, block => {
5273
5276
  if (!block) return;
5274
- const get_span_columns = () => {
5277
+ const final_span_columns = $8tj43$createMemo(() => {
5275
5278
  var _max_span_columns;
5276
5279
  return Math.min(block.span_columns, (_max_span_columns = max_span_columns()) !== null && _max_span_columns !== void 0 ? _max_span_columns : Infinity);
5277
- };
5280
+ });
5281
+ // 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
5282
+ const final_span_rows = $8tj43$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
5278
5283
  const [rendering_delayed, set_rendering_delayed_] = $8tj43$createSignal(true);
5279
5284
  const content = $8tj43$createComponent((0, $8tj43$Show), {
5280
5285
  get when() {
@@ -5289,10 +5294,10 @@ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_s
5289
5294
  }));
5290
5295
  $8tj43$effect(_p$ => {
5291
5296
  const _v$ = {
5292
- [(0, $64d94dcaa058dc7b$export$c500183c31c2b22e)]: get_span_columns()
5297
+ [(0, $64d94dcaa058dc7b$export$c500183c31c2b22e)]: final_span_columns()
5293
5298
  },
5294
- _v$2 = "span ".concat(get_span_columns()),
5295
- _v$3 = "span ".concat(block.span_rows);
5299
+ _v$2 = "span ".concat(final_span_columns()),
5300
+ _v$3 = "span ".concat(final_span_rows());
5296
5301
  _p$._v$ = $8tj43$style(_el$, _v$, _p$._v$);
5297
5302
  _v$2 !== _p$._v$2 && ((_p$._v$2 = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
5298
5303
  _v$3 !== _p$._v$3 && ((_p$._v$3 = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
@@ -5315,7 +5320,10 @@ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_s
5315
5320
  },
5316
5321
  get span_columns() {
5317
5322
  // Cap max width of block to the number of columns available, for everyone downstream
5318
- return get_span_columns();
5323
+ return final_span_columns();
5324
+ },
5325
+ get span_rows() {
5326
+ return final_span_rows();
5319
5327
  }
5320
5328
  });
5321
5329
  });
package/latest/index.cjs CHANGED
@@ -70,7 +70,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
70
70
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
71
71
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
72
72
  /*! Depict.ai search and product listing SDK */
73
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.3";
73
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.4";
74
74
  const $1ab22f2cd39b3061$var$fallback_operator = "in";
75
75
  const $1ab22f2cd39b3061$var$fallback_token = "";
76
76
  const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
@@ -4920,6 +4920,9 @@ function $d92f338ba8f9da9b$var$remap_blocks_to_index({
4920
4920
  const cols_showing = n_cols_currently_showing_();
4921
4921
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
4922
4922
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
4923
+ if (!cols_showing)
4924
+ // Nope out of here if we don't know how many columns are showing
4925
+ return content_blocks_by_index;
4923
4926
  for (let i = 0; i < wrapped_blocks.length; i++) {
4924
4927
  // i = row to show at
4925
4928
  const block = wrapped_blocks[i];
@@ -4980,7 +4983,9 @@ function $d92f338ba8f9da9b$var$remap_blocks_to_index({
4980
4983
  function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4981
4984
  const get_wrapped_blocks = $gVhhF$solidjs.mapArray(() => rendered_content_blocks, block => {
4982
4985
  if (!block) return;
4983
- const get_span_columns = () => Math.min(block.span_columns, max_span_columns() ?? Infinity);
4986
+ const final_span_columns = $gVhhF$solidjs.createMemo(() => Math.min(block.span_columns, max_span_columns() ?? Infinity));
4987
+ // 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
4988
+ const final_span_rows = $gVhhF$solidjs.createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
4984
4989
  const [rendering_delayed, set_rendering_delayed_] = $gVhhF$solidjs.createSignal(true);
4985
4990
  const content = $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
4986
4991
  get when() {
@@ -4995,10 +5000,10 @@ function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4995
5000
  }));
4996
5001
  $gVhhF$solidjsweb.effect(_p$ => {
4997
5002
  const _v$ = {
4998
- [(0, $75777da1687ba3f6$export$c500183c31c2b22e)]: get_span_columns()
5003
+ [(0, $75777da1687ba3f6$export$c500183c31c2b22e)]: final_span_columns()
4999
5004
  },
5000
- _v$2 = `span ${get_span_columns()}`,
5001
- _v$3 = `span ${block.span_rows}`;
5005
+ _v$2 = `span ${final_span_columns()}`,
5006
+ _v$3 = `span ${final_span_rows()}`;
5002
5007
  _p$._v$ = $gVhhF$solidjsweb.style(_el$, _v$, _p$._v$);
5003
5008
  _v$2 !== _p$._v$2 && ((_p$._v$2 = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
5004
5009
  _v$3 !== _p$._v$3 && ((_p$._v$3 = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
@@ -5021,7 +5026,10 @@ function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_s
5021
5026
  },
5022
5027
  get span_columns() {
5023
5028
  // Cap max width of block to the number of columns available, for everyone downstream
5024
- return get_span_columns();
5029
+ return final_span_columns();
5030
+ },
5031
+ get span_rows() {
5032
+ return final_span_rows();
5025
5033
  }
5026
5034
  });
5027
5035
  });
package/latest/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.3";
10
+ export const version = "2.1.4";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
package/latest/index.js CHANGED
@@ -6,7 +6,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
6
6
  /*! Depict.ai search and product listing SDK */
7
7
  import { register_es_version } from "../multi_import_deduplicator.mjs";
8
8
  register_es_version("ui", "latest");
9
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.3";
9
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.4";
10
10
  const $4147651646da990a$var$fallback_operator = "in";
11
11
  const $4147651646da990a$var$fallback_token = "";
12
12
  const $4147651646da990a$var$legacy_filter_prefix = "filter_";
@@ -4856,6 +4856,9 @@ function $e7a7eb102ddc0c79$var$remap_blocks_to_index({
4856
4856
  const cols_showing = n_cols_currently_showing_();
4857
4857
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
4858
4858
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
4859
+ if (!cols_showing)
4860
+ // Nope out of here if we don't know how many columns are showing
4861
+ return content_blocks_by_index;
4859
4862
  for (let i = 0; i < wrapped_blocks.length; i++) {
4860
4863
  // i = row to show at
4861
4864
  const block = wrapped_blocks[i];
@@ -4916,7 +4919,9 @@ function $e7a7eb102ddc0c79$var$remap_blocks_to_index({
4916
4919
  function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4917
4920
  const get_wrapped_blocks = $9HbP8$mapArray(() => rendered_content_blocks, block => {
4918
4921
  if (!block) return;
4919
- const get_span_columns = () => Math.min(block.span_columns, max_span_columns() ?? Infinity);
4922
+ const final_span_columns = $9HbP8$createMemo(() => Math.min(block.span_columns, max_span_columns() ?? Infinity));
4923
+ // 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
4924
+ const final_span_rows = $9HbP8$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
4920
4925
  const [rendering_delayed, set_rendering_delayed_] = $9HbP8$createSignal(true);
4921
4926
  const content = $9HbP8$createComponent((0, $9HbP8$Show), {
4922
4927
  get when() {
@@ -4931,10 +4936,10 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4931
4936
  }));
4932
4937
  $9HbP8$effect(_p$ => {
4933
4938
  const _v$ = {
4934
- [(0, $6dee9211e57ac31a$export$c500183c31c2b22e)]: get_span_columns()
4939
+ [(0, $6dee9211e57ac31a$export$c500183c31c2b22e)]: final_span_columns()
4935
4940
  },
4936
- _v$2 = `span ${get_span_columns()}`,
4937
- _v$3 = `span ${block.span_rows}`;
4941
+ _v$2 = `span ${final_span_columns()}`,
4942
+ _v$3 = `span ${final_span_rows()}`;
4938
4943
  _p$._v$ = $9HbP8$style(_el$, _v$, _p$._v$);
4939
4944
  _v$2 !== _p$._v$2 && ((_p$._v$2 = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
4940
4945
  _v$3 !== _p$._v$3 && ((_p$._v$3 = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
@@ -4957,7 +4962,10 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4957
4962
  },
4958
4963
  get span_columns() {
4959
4964
  // Cap max width of block to the number of columns available, for everyone downstream
4960
- return get_span_columns();
4965
+ return final_span_columns();
4966
+ },
4967
+ get span_rows() {
4968
+ return final_span_rows();
4961
4969
  }
4962
4970
  });
4963
4971
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "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
5
  "packageManager": "yarn@3.2.2",
6
6
  "sass": "styles.scss",
@@ -76,7 +76,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
76
76
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
77
77
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
78
78
  /*! Depict.ai search and product listing SDK */
79
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.3";
79
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.4";
80
80
  const $a68b73fd7ba0853f$var$fallback_operator = "in";
81
81
  const $a68b73fd7ba0853f$var$fallback_token = "";
82
82
  const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
@@ -4349,6 +4349,9 @@ function $f8f375d6245ffff2$var$remap_blocks_to_index(_ref2) {
4349
4349
  const cols_showing = n_cols_currently_showing_();
4350
4350
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
4351
4351
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
4352
+ if (!cols_showing)
4353
+ // Nope out of here if we don't know how many columns are showing
4354
+ return content_blocks_by_index;
4352
4355
  for (let i = 0; i < wrapped_blocks.length; i++) {
4353
4356
  // i = row to show at
4354
4357
  const block = wrapped_blocks[i];
@@ -4413,17 +4416,19 @@ function $f8f375d6245ffff2$var$remap_blocks_to_index(_ref2) {
4413
4416
  function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4414
4417
  const get_wrapped_blocks = $3hooq$solidjs.mapArray(() => rendered_content_blocks, block => {
4415
4418
  if (!block) return;
4416
- const get_span_columns = () => {
4419
+ const final_span_columns = $3hooq$solidjs.createMemo(() => {
4417
4420
  var _max_span_columns;
4418
4421
  return Math.min(block.span_columns, (_max_span_columns = max_span_columns()) !== null && _max_span_columns !== void 0 ? _max_span_columns : Infinity);
4419
- };
4422
+ });
4423
+ // 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
4424
+ const final_span_rows = $3hooq$solidjs.createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
4420
4425
  const [rendering_delayed, set_rendering_delayed_] = $3hooq$solidjs.createSignal(true);
4421
4426
  const content = $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
4422
4427
  get when() {
4423
4428
  return !rendering_delayed();
4424
4429
  },
4425
4430
  get children() {
4426
- return $3hooq$solidjsweb.ssr($f8f375d6245ffff2$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "grid-column:" + "span ".concat($3hooq$solidjsweb.escape(get_span_columns(), true)) + (";grid-row:" + "span ".concat($3hooq$solidjsweb.escape(block.span_rows, true))) + (";spans_columns_variable_name:" + $3hooq$solidjsweb.escape(get_span_columns(), true)), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($f8f375d6245ffff2$var$RenderContent, {
4431
+ return $3hooq$solidjsweb.ssr($f8f375d6245ffff2$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "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, {
4427
4432
  get content() {
4428
4433
  return block.content;
4429
4434
  }
@@ -4440,7 +4445,10 @@ function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4440
4445
  },
4441
4446
  get span_columns() {
4442
4447
  // Cap max width of block to the number of columns available, for everyone downstream
4443
- return get_span_columns();
4448
+ return final_span_columns();
4449
+ },
4450
+ get span_rows() {
4451
+ return final_span_rows();
4444
4452
  }
4445
4453
  });
4446
4454
  });
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.3";
10
+ export const version = "2.1.4";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
@@ -9,7 +9,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
9
9
  /*! Depict.ai search and product listing SDK */
10
10
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
11
11
  register_es_version("ui", "ES10");
12
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.3";
12
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.4";
13
13
  const $2855bffe06ef7a03$var$fallback_operator = "in";
14
14
  const $2855bffe06ef7a03$var$fallback_token = "";
15
15
  const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
@@ -4282,6 +4282,9 @@ function $ff7feae4dddd6073$var$remap_blocks_to_index(_ref2) {
4282
4282
  const cols_showing = n_cols_currently_showing_();
4283
4283
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
4284
4284
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
4285
+ if (!cols_showing)
4286
+ // Nope out of here if we don't know how many columns are showing
4287
+ return content_blocks_by_index;
4285
4288
  for (let i = 0; i < wrapped_blocks.length; i++) {
4286
4289
  // i = row to show at
4287
4290
  const block = wrapped_blocks[i];
@@ -4346,17 +4349,19 @@ function $ff7feae4dddd6073$var$remap_blocks_to_index(_ref2) {
4346
4349
  function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4347
4350
  const get_wrapped_blocks = $b8hua$mapArray(() => rendered_content_blocks, block => {
4348
4351
  if (!block) return;
4349
- const get_span_columns = () => {
4352
+ const final_span_columns = $b8hua$createMemo(() => {
4350
4353
  var _max_span_columns;
4351
4354
  return Math.min(block.span_columns, (_max_span_columns = max_span_columns()) !== null && _max_span_columns !== void 0 ? _max_span_columns : Infinity);
4352
- };
4355
+ });
4356
+ // 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
4357
+ const final_span_rows = $b8hua$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
4353
4358
  const [rendering_delayed, set_rendering_delayed_] = $b8hua$createSignal(true);
4354
4359
  const content = $b8hua$createComponent((0, $b8hua$Show), {
4355
4360
  get when() {
4356
4361
  return !rendering_delayed();
4357
4362
  },
4358
4363
  get children() {
4359
- return $b8hua$ssr($ff7feae4dddd6073$var$_tmpl$, $b8hua$ssrHydrationKey(), "grid-column:" + "span ".concat($b8hua$escape(get_span_columns(), true)) + (";grid-row:" + "span ".concat($b8hua$escape(block.span_rows, true))) + (";spans_columns_variable_name:" + $b8hua$escape(get_span_columns(), true)), $b8hua$escape($b8hua$createComponent($ff7feae4dddd6073$var$RenderContent, {
4364
+ return $b8hua$ssr($ff7feae4dddd6073$var$_tmpl$, $b8hua$ssrHydrationKey(), "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, {
4360
4365
  get content() {
4361
4366
  return block.content;
4362
4367
  }
@@ -4373,7 +4378,10 @@ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4373
4378
  },
4374
4379
  get span_columns() {
4375
4380
  // Cap max width of block to the number of columns available, for everyone downstream
4376
- return get_span_columns();
4381
+ return final_span_columns();
4382
+ },
4383
+ get span_rows() {
4384
+ return final_span_rows();
4377
4385
  }
4378
4386
  });
4379
4387
  });
@@ -70,7 +70,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
70
70
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
71
71
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
72
72
  /*! Depict.ai search and product listing SDK */
73
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.3";
73
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.4";
74
74
  const $1ab22f2cd39b3061$var$fallback_operator = "in";
75
75
  const $1ab22f2cd39b3061$var$fallback_token = "";
76
76
  const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
@@ -4032,6 +4032,9 @@ function $d92f338ba8f9da9b$var$remap_blocks_to_index({
4032
4032
  const cols_showing = n_cols_currently_showing_();
4033
4033
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
4034
4034
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
4035
+ if (!cols_showing)
4036
+ // Nope out of here if we don't know how many columns are showing
4037
+ return content_blocks_by_index;
4035
4038
  for (let i = 0; i < wrapped_blocks.length; i++) {
4036
4039
  // i = row to show at
4037
4040
  const block = wrapped_blocks[i];
@@ -4092,14 +4095,16 @@ function $d92f338ba8f9da9b$var$remap_blocks_to_index({
4092
4095
  function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4093
4096
  const get_wrapped_blocks = $5vyXB$solidjs.mapArray(() => rendered_content_blocks, block => {
4094
4097
  if (!block) return;
4095
- const get_span_columns = () => Math.min(block.span_columns, max_span_columns() ?? Infinity);
4098
+ const final_span_columns = $5vyXB$solidjs.createMemo(() => Math.min(block.span_columns, max_span_columns() ?? Infinity));
4099
+ // 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
4100
+ const final_span_rows = $5vyXB$solidjs.createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
4096
4101
  const [rendering_delayed, set_rendering_delayed_] = $5vyXB$solidjs.createSignal(true);
4097
4102
  const content = $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
4098
4103
  get when() {
4099
4104
  return !rendering_delayed();
4100
4105
  },
4101
4106
  get children() {
4102
- return $5vyXB$solidjsweb.ssr($d92f338ba8f9da9b$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "grid-column:" + `span ${$5vyXB$solidjsweb.escape(get_span_columns(), true)}` + (";grid-row:" + `span ${$5vyXB$solidjsweb.escape(block.span_rows, true)}`) + (";spans_columns_variable_name:" + $5vyXB$solidjsweb.escape(get_span_columns(), true)), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent($d92f338ba8f9da9b$var$RenderContent, {
4107
+ return $5vyXB$solidjsweb.ssr($d92f338ba8f9da9b$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "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, {
4103
4108
  get content() {
4104
4109
  return block.content;
4105
4110
  }
@@ -4116,7 +4121,10 @@ function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4116
4121
  },
4117
4122
  get span_columns() {
4118
4123
  // Cap max width of block to the number of columns available, for everyone downstream
4119
- return get_span_columns();
4124
+ return final_span_columns();
4125
+ },
4126
+ get span_rows() {
4127
+ return final_span_rows();
4120
4128
  }
4121
4129
  });
4122
4130
  });
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
10
- export const version = "2.1.3";
10
+ export const version = "2.1.4";
11
11
  /**
12
12
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
13
13
  */
@@ -6,7 +6,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
6
6
  /*! Depict.ai search and product listing SDK */
7
7
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
8
8
  register_es_version("ui", "latest");
9
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.3";
9
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.4";
10
10
  const $4147651646da990a$var$fallback_operator = "in";
11
11
  const $4147651646da990a$var$fallback_token = "";
12
12
  const $4147651646da990a$var$legacy_filter_prefix = "filter_";
@@ -3968,6 +3968,9 @@ function $e7a7eb102ddc0c79$var$remap_blocks_to_index({
3968
3968
  const cols_showing = n_cols_currently_showing_();
3969
3969
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
3970
3970
  const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
3971
+ if (!cols_showing)
3972
+ // Nope out of here if we don't know how many columns are showing
3973
+ return content_blocks_by_index;
3971
3974
  for (let i = 0; i < wrapped_blocks.length; i++) {
3972
3975
  // i = row to show at
3973
3976
  const block = wrapped_blocks[i];
@@ -4028,14 +4031,16 @@ function $e7a7eb102ddc0c79$var$remap_blocks_to_index({
4028
4031
  function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
4029
4032
  const get_wrapped_blocks = $i7OB2$mapArray(() => rendered_content_blocks, block => {
4030
4033
  if (!block) return;
4031
- const get_span_columns = () => Math.min(block.span_columns, max_span_columns() ?? Infinity);
4034
+ const final_span_columns = $i7OB2$createMemo(() => Math.min(block.span_columns, max_span_columns() ?? Infinity));
4035
+ // 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
4036
+ const final_span_rows = $i7OB2$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
4032
4037
  const [rendering_delayed, set_rendering_delayed_] = $i7OB2$createSignal(true);
4033
4038
  const content = $i7OB2$createComponent((0, $i7OB2$Show), {
4034
4039
  get when() {
4035
4040
  return !rendering_delayed();
4036
4041
  },
4037
4042
  get children() {
4038
- return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), "grid-column:" + `span ${$i7OB2$escape(get_span_columns(), true)}` + (";grid-row:" + `span ${$i7OB2$escape(block.span_rows, true)}`) + (";spans_columns_variable_name:" + $i7OB2$escape(get_span_columns(), true)), $i7OB2$escape($i7OB2$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
4043
+ return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), "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, {
4039
4044
  get content() {
4040
4045
  return block.content;
4041
4046
  }
@@ -4052,7 +4057,10 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4052
4057
  },
4053
4058
  get span_columns() {
4054
4059
  // Cap max width of block to the number of columns available, for everyone downstream
4055
- return get_span_columns();
4060
+ return final_span_columns();
4061
+ },
4062
+ get span_rows() {
4063
+ return final_span_rows();
4056
4064
  }
4057
4065
  });
4058
4066
  });