@depict-ai/ui 4.10.19 → 4.10.20

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.
@@ -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.19";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.20";
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 => {
@@ -2249,8 +2249,10 @@ async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_
2249
2249
  const modal_els = $3hooq$solidjs.createRoot(dispose => {
2250
2250
  let closing_animation;
2251
2251
  let animation_started;
2252
+ let focus_target_after_close;
2252
2253
  dispose_and_remove = () => {
2253
2254
  const actually_close = () => {
2255
+ var _focus_target_after_c;
2254
2256
  dispose();
2255
2257
  on_dispose === null || on_dispose === void 0 || on_dispose();
2256
2258
  const {
@@ -2269,11 +2271,19 @@ async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_
2269
2271
  }
2270
2272
  el.remove();
2271
2273
  });
2272
- if (should_restore_focus && element_focused_before_open !== null && element_focused_before_open !== void 0 && element_focused_before_open.isConnected) {
2274
+ const requested_focus_target = (_focus_target_after_c = focus_target_after_close) === null || _focus_target_after_c === void 0 ? void 0 : _focus_target_after_c();
2275
+ if (should_restore_focus && (requested_focus_target !== null && requested_focus_target !== void 0 && requested_focus_target.isConnected || element_focused_before_open !== null && element_focused_before_open !== void 0 && element_focused_before_open.isConnected)) {
2273
2276
  restoring_focus = true;
2274
2277
  try {
2275
2278
  // preventScroll so this can't re-introduce the safari page-jump the blur() above works around
2276
- element_focused_before_open.focus({
2279
+ let focused = false;
2280
+ if (requested_focus_target !== null && requested_focus_target !== void 0 && requested_focus_target.isConnected) {
2281
+ requested_focus_target.focus({
2282
+ preventScroll: true
2283
+ });
2284
+ focused = requested_focus_target.getRootNode().activeElement === requested_focus_target;
2285
+ }
2286
+ if (!focused && element_focused_before_open !== null && element_focused_before_open !== void 0 && element_focused_before_open.isConnected) element_focused_before_open.focus({
2277
2287
  preventScroll: true
2278
2288
  });
2279
2289
  } finally {
@@ -2295,7 +2305,8 @@ async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_
2295
2305
  ...extra_options_for_modal,
2296
2306
  close_modal_: close_modal_,
2297
2307
  open_modal_: open_modal_,
2298
- register_closing_animation_: animation => closing_animation = animation
2308
+ register_closing_animation_: animation => closing_animation = animation,
2309
+ set_focus_target_after_close_: get_target => focus_target_after_close = get_target
2299
2310
  });
2300
2311
  });
2301
2312
  body.append(...modal_els);
@@ -9383,6 +9394,7 @@ function $34934309832515dc$export$f7658c347b037c3f() {
9383
9394
  var $29e5dbeb69da7a36$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
9384
9395
  $29e5dbeb69da7a36$var$_tmpl$2 = ['<div class="field"><!--$-->', "<!--/-->", "<!--$-->", "<!--/--></div>"],
9385
9396
  $29e5dbeb69da7a36$var$_tmpl$3 = ["<button", ' class="submit major" type="button"', ">", "</button>"];
9397
+ const $29e5dbeb69da7a36$var$keys_not_opening_modal = new Set(["Tab", "Shift", "Control", "Alt", "AltGraph", "Meta", "CapsLock", "Escape", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Home", "End", "Insert", "ContextMenu", "NumLock", "ScrollLock", "Pause", "PrintScreen"]);
9386
9398
  function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
9387
9399
  let {
9388
9400
  search_field_value_: [searchFieldValue, setSearchFieldValue],
@@ -9528,6 +9540,33 @@ function $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
9528
9540
  }
9529
9541
  })();
9530
9542
  }
9543
+ function $9ccac7b807fe6451$export$9e9e2ae069cf2fe1(_ref) {
9544
+ let {
9545
+ props_search_field_value_: props_search_field_value_,
9546
+ props_submit_query_: props_submit_query_,
9547
+ dont_sync_search_field_value_except_on_submit_: dont_sync_search_field_value_except_on_submit_,
9548
+ set_focus_target_after_close_: set_focus_target_after_close_,
9549
+ get_search_page_input_element_: get_search_page_input_element_
9550
+ } = _ref;
9551
+ const search_field_value_ = dont_sync_search_field_value_except_on_submit_ ? $3hooq$solidjs.createSignal("") : props_search_field_value_;
9552
+ let submits_in_flight = 0;
9553
+ const submit_query_ = async function () {
9554
+ let new_query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $3hooq$solidjs.untrack(search_field_value_[0]);
9555
+ submits_in_flight++;
9556
+ try {
9557
+ return await props_submit_query_(new_query, () => set_focus_target_after_close_(get_search_page_input_element_));
9558
+ } finally {
9559
+ submits_in_flight--;
9560
+ }
9561
+ };
9562
+ if (dont_sync_search_field_value_except_on_submit_) $3hooq$solidjs.createEffect($3hooq$solidjs.on(search_field_value_[0], value => submits_in_flight > 0 && props_search_field_value_[1](value), {
9563
+ defer: true
9564
+ }));
9565
+ return {
9566
+ search_field_value_: search_field_value_,
9567
+ submit_query_: submit_query_
9568
+ };
9569
+ }
9531
9570
  var $9035b24c2dbd3f36$var$_tmpl$ = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
9532
9571
  $9035b24c2dbd3f36$var$_tmpl$2 = ["<b", ">", "</b>"],
9533
9572
  $9035b24c2dbd3f36$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '" role="search" aria-label="Search modal with search field, query suggestions and result preview"><!--$-->', '<!--/--><div id="depict-suggestions-and-result-preview" class="padded"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"],
@@ -9542,6 +9581,8 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
9542
9581
  search_query_url_param_name_: search_query_url_param_name_,
9543
9582
  previous_searches_: previous_searches_,
9544
9583
  close_modal_: close_modal_,
9584
+ set_focus_target_after_close_: set_focus_target_after_close_,
9585
+ get_search_page_input_element_: get_search_page_input_element_,
9545
9586
  depict_api_: depict_api_,
9546
9587
  merchant_: merchant_,
9547
9588
  market_: market_,
@@ -9566,15 +9607,16 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
9566
9607
  // As per feedback from stronger we sometimes want a modal with the search field value disconnected from the one in the rest of the UI, see https://depictaiworkspace.slack.com/archives/C02J16R9XEH/p1679065878487709.
9567
9608
  // This is desired for when the modal is opened from a UI element that visually does not look connected with the search page or current query
9568
9609
  // Basically the UI signals that the button that opens the modal starts a new search.
9569
- const search_field_value_ = dont_sync_search_field_value_except_on_submit_ ? $3hooq$solidjs.createSignal("") : props_search_field_value;
9570
- const propagate_search_field_value_back = dont_sync_search_field_value_except_on_submit_ ? () => props_search_field_value[1]($3hooq$solidjs.untrack(search_field_value_[0])) // Set actual search field value to the throwaway internal one before submitting
9571
- : undefined;
9572
- const submit_query_ = function () {
9573
- // submit_query expects to read the current search field value which is why we have to write the current one to the signal before calling it
9574
- // It will write the old one back and then write the new one after submit
9575
- propagate_search_field_value_back === null || propagate_search_field_value_back === void 0 || propagate_search_field_value_back();
9576
- return props_submit_query(...arguments);
9577
- };
9610
+ const {
9611
+ search_field_value_: search_field_value_,
9612
+ submit_query_: submit_query_
9613
+ } = $9ccac7b807fe6451$export$9e9e2ae069cf2fe1({
9614
+ props_search_field_value_: props_search_field_value,
9615
+ props_submit_query_: props_submit_query,
9616
+ dont_sync_search_field_value_except_on_submit_: dont_sync_search_field_value_except_on_submit_,
9617
+ set_focus_target_after_close_: set_focus_target_after_close_,
9618
+ get_search_page_input_element_: get_search_page_input_element_
9619
+ });
9578
9620
  const [input_field, set_input_field] = $3hooq$solidjs.createSignal();
9579
9621
  const [get_search_field_value_] = search_field_value_;
9580
9622
  // Search field alignment unused in ClassicSearchModal since the search field spans the whole modal
@@ -10207,6 +10249,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
10207
10249
  search_query_url_param_name_: search_query_url_param_name_,
10208
10250
  previous_searches_: previous_searches_,
10209
10251
  close_modal_: close_modal_,
10252
+ set_focus_target_after_close_: set_focus_target_after_close_,
10253
+ get_search_page_input_element_: get_search_page_input_element_,
10210
10254
  alignmentSignals_: alignmentSignals_,
10211
10255
  depict_api_: depict_api_,
10212
10256
  merchant_: merchant_,
@@ -10237,15 +10281,16 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
10237
10281
  // As per feedback from stronger we sometimes want a modal with the search field value disconnected from the one in the rest of the UI, see https://depictaiworkspace.slack.com/archives/C02J16R9XEH/p1679065878487709.
10238
10282
  // This is desired for when the modal is opened from a UI element that visually does not look connected with the search page or current query
10239
10283
  // Basically the UI signals that the button that opens the modal starts a new search.
10240
- const search_field_value_ = dont_sync_search_field_value_except_on_submit_ ? $3hooq$solidjs.createSignal("") : props_search_field_value;
10241
- const propagate_search_field_value_back = dont_sync_search_field_value_except_on_submit_ ? () => props_search_field_value[1]($3hooq$solidjs.untrack(search_field_value_[0])) // Set actual search field value to the throwaway internal one before submitting
10242
- : undefined;
10243
- const submit_query_ = function () {
10244
- // submit_query expects to read the current search field value which is why we have to write the current one to the signal before calling it
10245
- // It will write the old one back and then write the new one after submit
10246
- propagate_search_field_value_back === null || propagate_search_field_value_back === void 0 || propagate_search_field_value_back();
10247
- return props_submit_query(...arguments);
10248
- };
10284
+ const {
10285
+ search_field_value_: search_field_value_,
10286
+ submit_query_: submit_query_
10287
+ } = $9ccac7b807fe6451$export$9e9e2ae069cf2fe1({
10288
+ props_search_field_value_: props_search_field_value,
10289
+ props_submit_query_: props_submit_query,
10290
+ dont_sync_search_field_value_except_on_submit_: dont_sync_search_field_value_except_on_submit_,
10291
+ set_focus_target_after_close_: set_focus_target_after_close_,
10292
+ get_search_page_input_element_: get_search_page_input_element_
10293
+ });
10249
10294
  const [input_field, set_input_field] = $3hooq$solidjs.createSignal();
10250
10295
  const [searching_for_value_, set_searching_for_value_] = $3hooq$solidjs.createSignal();
10251
10296
  const [show_stale_content_results_, set_show_stale_content_results_] = $3hooq$solidjs.createSignal(false);
@@ -12254,11 +12299,12 @@ async function $7f680455a2aa1079$export$e16630ecb9644a1c(_ref) {
12254
12299
  let {
12255
12300
  on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
12256
12301
  search_param_name_: search_param_name_,
12257
- set_search_field_value_: set_search_field_value_,
12302
+ search_field_value_: search_field_value_,
12258
12303
  get_search_query_: get_search_query_,
12259
12304
  url_transformer_: url_transformer_,
12260
12305
  router_: router_,
12261
12306
  after_submit_: after_submit_,
12307
+ before_navigate_: before_navigate_,
12262
12308
  get_new_query: get_new_query
12263
12309
  } = _ref;
12264
12310
  const new_search_query = get_new_query();
@@ -12266,21 +12312,92 @@ async function $7f680455a2aa1079$export$e16630ecb9644a1c(_ref) {
12266
12312
  if (previous_query === new_search_query && new URLSearchParams(location.search).has(search_param_name_)) {
12267
12313
  // don't push a history entry / re-search if someone submits a search again
12268
12314
  // do close the modal though
12315
+ search_field_value_.settle_(new_search_query);
12269
12316
  on_submit_with_unchanged_value_ === null || on_submit_with_unchanged_value_ === void 0 || on_submit_with_unchanged_value_();
12270
- return;
12317
+ return false;
12271
12318
  }
12272
- set_search_field_value_(previous_query); // restore the value to the previous query since this one goes to the new history entry
12273
12319
  const target_url = new URL(location.href);
12274
12320
  url_transformer_ === null || url_transformer_ === void 0 || url_transformer_(target_url);
12275
12321
  target_url.searchParams.set(search_param_name_, new_search_query);
12276
- await router_.navigate_.go_to_({
12277
- new_url_: target_url,
12278
- is_replace_: false,
12279
- force_spa_navigation_: true
12280
- });
12281
- set_search_field_value_(new_search_query);
12322
+ const end_submit = search_field_value_.begin_submit_(new_search_query, previous_query);
12323
+ before_navigate_ === null || before_navigate_ === void 0 || before_navigate_();
12324
+ let landed;
12325
+ try {
12326
+ await router_.navigate_.go_to_({
12327
+ new_url_: target_url,
12328
+ is_replace_: false,
12329
+ force_spa_navigation_: true
12330
+ });
12331
+ } finally {
12332
+ landed = end_submit();
12333
+ }
12334
+ if (!landed) return false;
12282
12335
  scrollTo(0, 0);
12283
12336
  after_submit_ === null || after_submit_ === void 0 || after_submit_();
12337
+ return true;
12338
+ }
12339
+ function $24f1a81b790e371c$export$d13a185c53aa5edf(persisted_, get_search_query_) {
12340
+ const [get_persisted, set_persisted] = persisted_;
12341
+ const [get_submitting, set_submitting] = $3hooq$solidjs.createSignal();
12342
+ const get_value = $3hooq$solidjs.createMemo(() => {
12343
+ var _get_submitting;
12344
+ return (_get_submitting = get_submitting()) !== null && _get_submitting !== void 0 ? _get_submitting : get_persisted();
12345
+ });
12346
+ const set_value = value => {
12347
+ const new_value = typeof value === "function" ? value($3hooq$solidjs.untrack(get_value)) : value;
12348
+ if ($3hooq$solidjs.untrack(get_submitting) === undefined) set_persisted(new_value);else set_submitting(new_value);
12349
+ return new_value;
12350
+ };
12351
+ let current_submit;
12352
+ const end_submit = landed => {
12353
+ current_submit.landed_ = landed;
12354
+ current_submit = undefined;
12355
+ $3hooq$solidjs.batch(() => {
12356
+ const submitting = $3hooq$solidjs.untrack(get_submitting);
12357
+ set_submitting(undefined);
12358
+ if (landed && submitting !== undefined) set_persisted(submitting);
12359
+ });
12360
+ };
12361
+ const abort_on_popstate = what_happened => {
12362
+ if (what_happened === "popstate" && current_submit) end_submit(false);
12363
+ };
12364
+ (0, $3hooq$depictaiutilishared.instant_exec_on_suspect_history_change).add(abort_on_popstate);
12365
+ $3hooq$solidjs.onCleanup(() => (0, $3hooq$depictaiutilishared.instant_exec_on_suspect_history_change).delete(abort_on_popstate));
12366
+ $3hooq$solidjs.createEffect($3hooq$solidjs.on(get_search_query_, query => {
12367
+ const token = current_submit;
12368
+ if (!token || query !== token.query_) return;
12369
+ queueMicrotask(() => {
12370
+ if (current_submit === token) end_submit(true);
12371
+ });
12372
+ }, {
12373
+ defer: true
12374
+ }));
12375
+ const begin_submit_ = (submitted_query, query_of_current_history_entry) => {
12376
+ const token = current_submit = {
12377
+ query_: submitted_query,
12378
+ landed_: false
12379
+ };
12380
+ $3hooq$solidjs.batch(() => {
12381
+ set_submitting(submitted_query);
12382
+ set_persisted(query_of_current_history_entry);
12383
+ });
12384
+ return () => {
12385
+ if (current_submit === token) end_submit(true);
12386
+ return token.landed_;
12387
+ };
12388
+ };
12389
+ const settle_ = query => {
12390
+ if (current_submit) return;
12391
+ $3hooq$solidjs.batch(() => {
12392
+ set_submitting(undefined);
12393
+ set_persisted(query);
12394
+ });
12395
+ };
12396
+ return {
12397
+ value_: [get_value, set_value],
12398
+ begin_submit_: begin_submit_,
12399
+ settle_: settle_
12400
+ };
12284
12401
  }
12285
12402
  function $7a8e55af4ef13fae$export$181cceed5c91919e(callback, alsoRaF, passiveListener) {
12286
12403
  let aligned_this_microtask = false;
@@ -12954,6 +13071,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
12954
13071
  scroll_restoration_data_: scroll_restoration_data_,
12955
13072
  product_card_template_: product_card_template_,
12956
13073
  modalAlignmentSignalsRef_: modalAlignmentSignalsRef_,
13074
+ inputFieldRef_: inputFieldRef_,
12957
13075
  router_: router_,
12958
13076
  content_results_rows_: content_results_rows_,
12959
13077
  content_layout_options_: content_layout_options_,
@@ -13149,6 +13267,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
13149
13267
  if (!search_field) break add_input_field;
13150
13268
  setModalBodyStyle({});
13151
13269
  modalAlignmentSignalsRef_ === null || modalAlignmentSignalsRef_ === void 0 || modalAlignmentSignalsRef_(alignmentSignals_);
13270
+ inputFieldRef_ === null || inputFieldRef_ === void 0 || inputFieldRef_(input_element);
13271
+ $3hooq$solidjs.onCleanup(() => inputFieldRef_ === null || inputFieldRef_ === void 0 ? void 0 : inputFieldRef_(undefined));
13152
13272
  const [pollAlignment, setPollAlignment_] = $3hooq$solidjs.createSignal(false);
13153
13273
  const align_position = $3hooq$depictaiutilishared.catchify((0, $d6ed4dbb6507996d$export$b3ad617e9036868))(alignmentSignals_, search_field, (0, $d6ed4dbb6507996d$export$3f238c96c45e6cc6) | (0, $d6ed4dbb6507996d$export$7895aadd1956b1c7) | (modalVersionUsed_ === 1 ? (0, $d6ed4dbb6507996d$export$902f8b4a7dae5d78) : (0, $d6ed4dbb6507996d$export$6060bc6bee850eb6) | (0, $d6ed4dbb6507996d$export$5097308c5200105a)), true, pollAlignment);
13154
13274
  div_with_field_class.addEventListener("click", $3hooq$depictaiutilishared.catchify(e => {
@@ -13517,14 +13637,16 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
13517
13637
  set_search_content_results_rows((0, $eab939d0b95b75ee$export$70ceae36059a1036));
13518
13638
  }; // do this every time after we have submitted a new query - otherwise there might already be a saved number of rows in the state
13519
13639
  const on_submit_with_unchanged_value_ = () => this.modal_open = false;
13520
- const [get_search_field_value_, set_search_field_value_] = state_.field_value;
13521
- const configured_submit_query_ = new_query => $7f680455a2aa1079$export$e16630ecb9644a1c({
13640
+ const search_field_value_ = $24f1a81b790e371c$export$d13a185c53aa5edf(state_.field_value, get_search_query_);
13641
+ const [get_search_field_value_] = search_field_value_.value_;
13642
+ const configured_submit_query_ = (new_query, before_navigate_) => $7f680455a2aa1079$export$e16630ecb9644a1c({
13522
13643
  on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
13523
- set_search_field_value_: set_search_field_value_,
13644
+ search_field_value_: search_field_value_,
13524
13645
  get_search_query_: get_search_query_,
13525
13646
  search_param_name_: search_query_url_param_name_,
13526
13647
  after_submit_: after_submit_,
13527
- get_new_query: () => new_query || $3hooq$solidjs.untrack(get_search_field_value_),
13648
+ before_navigate_: before_navigate_,
13649
+ get_new_query: () => new_query !== null && new_query !== void 0 ? new_query : $3hooq$solidjs.untrack(get_search_field_value_),
13528
13650
  url_transformer_: url_transformer,
13529
13651
  router_: $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $ddd39c5f36f49703$var$_router)
13530
13652
  });
@@ -13543,6 +13665,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
13543
13665
  search_query_url_param_name_: search_query_url_param_name_,
13544
13666
  reset_history_state_: reset_history_state_,
13545
13667
  state_: state_,
13668
+ search_field_value_: search_field_value_.value_,
13546
13669
  router_: $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $ddd39c5f36f49703$var$_router),
13547
13670
  url_transformer_: url_transformer,
13548
13671
  depict_api_: depict_api_,
@@ -13566,7 +13689,11 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
13566
13689
  $3hooq$solidjs.onCleanup(() => _this.modal_open = false);
13567
13690
  return searchModalComponent(...arguments);
13568
13691
  }, {
13569
- search_field_value_: state_.field_value,
13692
+ search_field_value_: search_field_value_.value_,
13693
+ get_search_page_input_element_: () => {
13694
+ var _privately_shared_pro2;
13695
+ return (_privately_shared_pro2 = $ddd39c5f36f49703$export$dde08b2dca8cc1ce.get(this)) === null || _privately_shared_pro2 === void 0 ? void 0 : _privately_shared_pro2.search_page_input_element_;
13696
+ },
13570
13697
  get_search_query_: get_search_query_,
13571
13698
  search_query_url_param_name_: search_query_url_param_name_,
13572
13699
  previous_searches_: previous_searches,
@@ -13731,6 +13858,7 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
13731
13858
  const {
13732
13859
  state_: state_
13733
13860
  } = shared_properties;
13861
+ let registered_input_element;
13734
13862
  const grid_spacing_override = $3hooq$solidjs.createMemo(() => {
13735
13863
  const {
13736
13864
  grid_spacing: grid_spacing
@@ -13762,7 +13890,7 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
13762
13890
  var _depict_search$enable;
13763
13891
  return (_depict_search$enable = depict_search.enable_content_search) !== null && _depict_search$enable !== void 0 ? _depict_search$enable : $ddd39c5f36f49703$var$content_search_default;
13764
13892
  },
13765
- search_field_value_: state_.field_value,
13893
+ search_field_value_: shared_properties.search_field_value_,
13766
13894
  get_search_query_: shared_properties.get_search_query_,
13767
13895
  clear_filters_on_next_submit_: shared_properties.clear_filters_on_next_submit_,
13768
13896
  open_modal_: function () {
@@ -13773,6 +13901,16 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
13773
13901
  modalVersionUsed_: shared_properties.modalVersionUsed_,
13774
13902
  showSliderArrow_: () => props.showSliderArrow_,
13775
13903
  i18n_: shared_properties.i18n_,
13904
+ inputFieldRef_: input_element => {
13905
+ const shared_info_right_now = $ddd39c5f36f49703$export$dde08b2dca8cc1ce.get(depict_search);
13906
+ if (!shared_info_right_now) return;
13907
+ if (input_element === undefined && shared_info_right_now.search_page_input_element_ !== registered_input_element) return;
13908
+ registered_input_element = input_element;
13909
+ $ddd39c5f36f49703$export$dde08b2dca8cc1ce.set(depict_search, {
13910
+ ...shared_info_right_now,
13911
+ search_page_input_element_: input_element
13912
+ });
13913
+ },
13776
13914
  modalAlignmentSignalsRef_: style => {
13777
13915
  const shared_info_right_now = $ddd39c5f36f49703$export$dde08b2dca8cc1ce.get(depict_search);
13778
13916
  if (!shared_info_right_now) return;
@@ -14219,7 +14357,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
14219
14357
  return shared_properties.BackIcon_;
14220
14358
  },
14221
14359
  get search_field_value_() {
14222
- return shared_properties.state_.field_value;
14360
+ return shared_properties.search_field_value_;
14223
14361
  },
14224
14362
  get submit_query_() {
14225
14363
  return shared_properties.configured_submit_query_;
@@ -14262,7 +14400,7 @@ function $98aef9965764903d$export$316f6f283ae64765(props) {
14262
14400
  return shared_properties.BackIcon_;
14263
14401
  },
14264
14402
  get search_field_value_() {
14265
- return shared_properties.state_.field_value;
14403
+ return shared_properties.search_field_value_;
14266
14404
  },
14267
14405
  get submit_query_() {
14268
14406
  return shared_properties.configured_submit_query_;
@@ -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.19";
14
+ export const version = "4.10.20";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -713,6 +713,8 @@ declare function RawSearchModalV2<InputDisplay extends Display, OutputDisplay ex
713
713
  search_query_url_param_name_,
714
714
  previous_searches_,
715
715
  close_modal_,
716
+ set_focus_target_after_close_,
717
+ get_search_page_input_element_,
716
718
  alignmentSignals_,
717
719
  depict_api_,
718
720
  merchant_,
@@ -743,12 +745,14 @@ declare function RawSearchModalV2<InputDisplay extends Display, OutputDisplay ex
743
745
  search_query_url_param_name_: string;
744
746
  previous_searches_: Signal<string[]>;
745
747
  close_modal_: VoidFunction;
748
+ set_focus_target_after_close_: (get_target: (() => HTMLElement | undefined) | undefined) => void;
749
+ get_search_page_input_element_: () => HTMLInputElement | undefined;
746
750
  alignmentSignals_?: ModalAlignmentSignals;
747
751
  depict_api_: DepictAPI<InputDisplay, OutputDisplay>;
748
752
  clear_filters_: (user_triggered: boolean) => void;
749
753
  merchant_: Accessor<string>;
750
754
  market_: Accessor<string>;
751
- submit_query_: (new_query?: string) => void;
755
+ submit_query_: (new_query?: string, before_navigate_?: VoidFunction) => Promise<boolean>;
752
756
  class_list_?: Accessor<Record<string, boolean>>;
753
757
  url_transformer_?: (url_object: URL) => unknown;
754
758
  disable_scrolling_?: boolean;
@@ -785,6 +789,8 @@ declare function RawClassicSearchModal({
785
789
  search_query_url_param_name_,
786
790
  previous_searches_,
787
791
  close_modal_,
792
+ set_focus_target_after_close_,
793
+ get_search_page_input_element_,
788
794
  depict_api_,
789
795
  merchant_,
790
796
  market_,
@@ -810,11 +816,13 @@ declare function RawClassicSearchModal({
810
816
  search_query_url_param_name_: string;
811
817
  previous_searches_: Signal<string[]>;
812
818
  close_modal_: VoidFunction;
819
+ set_focus_target_after_close_: (get_target: (() => HTMLElement | undefined) | undefined) => void;
820
+ get_search_page_input_element_: () => HTMLInputElement | undefined;
813
821
  depict_api_: DepictAPI<any>;
814
822
  clear_filters_: (user_triggered: boolean) => void;
815
823
  merchant_: Accessor<string>;
816
824
  market_: Accessor<string>;
817
- submit_query_: (new_query?: string) => void;
825
+ submit_query_: (new_query?: string, before_navigate_?: VoidFunction) => Promise<boolean>;
818
826
  class_list_?: Accessor<Record<string, boolean>>;
819
827
  url_transformer_?: (url_object: URL) => unknown;
820
828
  disable_scrolling_?: boolean;
@@ -1038,6 +1046,7 @@ export function general_modal_abstraction<StaticOptions extends {
1038
1046
  close_modal_: VoidFunction;
1039
1047
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
1040
1048
  register_closing_animation_: (animation: () => Promise<any>) => void;
1049
+ set_focus_target_after_close_: (get_target: (() => HTMLElement | undefined) | undefined) => void;
1041
1050
  }) => Node_Array, modal_fn_opts: StaticOptions, parent?: HTMLElement | ShadowRoot): Promise<{
1042
1051
  open_modal_: (extra_options_for_modal?: any, on_dispose?: VoidFunction | undefined) => Promise<void | undefined>;
1043
1052
  close_modal_: () => void | undefined;