@depict-ai/ui 2.0.9 → 2.0.10

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
@@ -67,7 +67,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
67
67
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
68
68
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
69
69
  /*! Depict.ai search and product listing SDK */
70
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.9";
70
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.10";
71
71
 
72
72
  /** @jsxImportSource solid-js */
73
73
 
@@ -3727,8 +3727,8 @@ function $a162c9a08dc208c2$var$modify_only_local_filter(local_filter_object, sel
3727
3727
  }
3728
3728
  return modified_filter_object;
3729
3729
  }
3730
- async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_opts) {
3731
- const body = await (0, $52FdA$depictaiutilishared.observer).wait_for_element("body");
3730
+ async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
3731
+ const body = parent || (await (0, $52FdA$depictaiutilishared.observer).wait_for_element("body"));
3732
3732
  let dispose_and_remove;
3733
3733
  const open_modal_ = function () {
3734
3734
  let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -10942,6 +10942,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
10942
10942
  disable_scrolling_during_modal = true,
10943
10943
  bottom_distance_under_modal: bottom_distance_under_modal,
10944
10944
  render_instant_card: render_instant_card,
10945
+ override_modal_element: override_modal_element,
10945
10946
  ...props_on_class
10946
10947
  } = _ref;
10947
10948
  $ddd39c5f36f49703$var$_classPrivateFieldInitSpec(this, $ddd39c5f36f49703$var$_locale_signal, {
@@ -11097,7 +11098,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
11097
11098
  enable_category_suggestions_: enable_category_suggestions,
11098
11099
  disable_scrolling_: disable_scrolling_during_modal,
11099
11100
  bottom_distance_under_modal_: bottom_distance_under_modal
11100
- });
11101
+ }, override_modal_element);
11101
11102
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
11102
11103
  // The default behaviour is to align the modal with the input field if possible
11103
11104
  const modal_opening_effect = () => {
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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.9";
10
+ export const version = "2.0.10";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
@@ -435,6 +435,7 @@ export type PageURLCreator<InputDisplay extends ModernDisplay, OutputDisplay ext
435
435
  * So the idea is to have a modal. It should either be rendered and exist, in which case it is in the foreground and open, or it's completely gone. This makes things easier.
436
436
  * @param search_modal a function which returns an array of nodes that get appended into <body>. This function will run in its own solid-js root which will call onCleanup and cleanup all reactive things inside it when the modal is closed. This function will get the arguments passed to open_modal_ and the modal_fn_opts merged together, along with register_closing_animation_ where an async function that resolves once the animation is finished can be provided to animate the closing of the modal
437
437
  * @param modal_fn_opts static options for the modal that won't change on a per-opening basis
438
+ * @param parent override the parent element to append the modal to. Defaults to <body>
438
439
  @returns a function to open and close the modal. When calling the open_modal_ function additional parameters can be passed to the modal
439
440
  */
440
441
  export function general_modal_abstraction<StaticOptions extends {
@@ -445,7 +446,7 @@ export function general_modal_abstraction<StaticOptions extends {
445
446
  close_modal_: VoidFunction;
446
447
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
447
448
  register_closing_animation_: (animation: () => Promise<any>) => void;
448
- }) => Node_Array, modal_fn_opts: StaticOptions): Promise<{
449
+ }) => Node_Array, modal_fn_opts: StaticOptions, parent?: HTMLElement | ShadowRoot): Promise<{
449
450
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
450
451
  close_modal_: () => void;
451
452
  }>;
@@ -753,6 +754,7 @@ type GeneralConstructorOptions<InputDisplay extends Display, OutputDisplay exten
753
754
  disable_scrolling_during_modal?: boolean;
754
755
  bottom_distance_under_modal?: Accessor<number | undefined>;
755
756
  render_instant_card?: InstantCard<OutputDisplay extends ModernDisplay ? OutputDisplay : InputDisplay>;
757
+ override_modal_element?: HTMLElement | ShadowRoot;
756
758
  };
757
759
  type ConstructorOptionsWithApi<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = GeneralConstructorOptions<InputDisplay, OutputDisplay> & {
758
760
  api: DepictAPI<InputDisplay, OutputDisplay>;
@@ -786,6 +788,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
786
788
  disable_scrolling_during_modal,
787
789
  bottom_distance_under_modal,
788
790
  render_instant_card,
791
+ override_modal_element,
789
792
  ...props_on_class
790
793
  }: ConstructorOptions<InputDisplay, OutputDisplay>);
791
794
  get enable_content_search(): boolean | undefined;
package/ES10/index.js CHANGED
@@ -8,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
8
8
  /*! Depict.ai search and product listing SDK */
9
9
  import { register_es_version } from "../multi_import_deduplicator.mjs";
10
10
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.9";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.10";
12
12
 
13
13
  /** @jsxImportSource solid-js */
14
14
 
@@ -3668,8 +3668,8 @@ function $44aa24b1bb793549$var$modify_only_local_filter(local_filter_object, sel
3668
3668
  }
3669
3669
  return modified_filter_object;
3670
3670
  }
3671
- async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_opts) {
3672
- const body = await (0, $8tj43$observer).wait_for_element("body");
3671
+ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
3672
+ const body = parent || (await (0, $8tj43$observer).wait_for_element("body"));
3673
3673
  let dispose_and_remove;
3674
3674
  const open_modal_ = function () {
3675
3675
  let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -10883,6 +10883,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
10883
10883
  disable_scrolling_during_modal = true,
10884
10884
  bottom_distance_under_modal: bottom_distance_under_modal,
10885
10885
  render_instant_card: render_instant_card,
10886
+ override_modal_element: override_modal_element,
10886
10887
  ...props_on_class
10887
10888
  } = _ref;
10888
10889
  $eb064bc3350276c1$var$_classPrivateFieldInitSpec(this, $eb064bc3350276c1$var$_locale_signal, {
@@ -11038,7 +11039,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
11038
11039
  enable_category_suggestions_: enable_category_suggestions,
11039
11040
  disable_scrolling_: disable_scrolling_during_modal,
11040
11041
  bottom_distance_under_modal_: bottom_distance_under_modal
11041
- });
11042
+ }, override_modal_element);
11042
11043
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
11043
11044
  // The default behaviour is to align the modal with the input field if possible
11044
11045
  const modal_opening_effect = () => {
package/latest/index.cjs CHANGED
@@ -61,7 +61,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
61
61
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
62
62
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
63
63
  /*! Depict.ai search and product listing SDK */
64
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.9";
64
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.10";
65
65
 
66
66
  /** @jsxImportSource solid-js */
67
67
 
@@ -3490,8 +3490,8 @@ function $70482f04605572e2$var$modify_only_local_filter(local_filter_object, sel
3490
3490
  }
3491
3491
  return modified_filter_object;
3492
3492
  }
3493
- async function $9abb0a35d4b60ed3$export$79b1565500412d9b(search_modal, modal_fn_opts) {
3494
- const body = await (0, $gVhhF$depictaiutilishared.observer).wait_for_element("body");
3493
+ async function $9abb0a35d4b60ed3$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
3494
+ const body = parent || (await (0, $gVhhF$depictaiutilishared.observer).wait_for_element("body"));
3495
3495
  let dispose_and_remove;
3496
3496
  const open_modal_ = (extra_options_for_modal = {}, on_dispose) => {
3497
3497
  if (dispose_and_remove)
@@ -10158,6 +10158,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
10158
10158
  disable_scrolling_during_modal = true,
10159
10159
  bottom_distance_under_modal: bottom_distance_under_modal,
10160
10160
  render_instant_card: render_instant_card,
10161
+ override_modal_element: override_modal_element,
10161
10162
  ...props_on_class
10162
10163
  }) {
10163
10164
  const owner = $gVhhF$solidjs.getOwner() || $gVhhF$solidjs.createRoot(() => $gVhhF$solidjs.getOwner()); // we might have an owner, if so, pass it on. Otherwise, create one so solid doesn't print warnings to the console
@@ -10280,7 +10281,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
10280
10281
  enable_category_suggestions_: enable_category_suggestions,
10281
10282
  disable_scrolling_: disable_scrolling_during_modal,
10282
10283
  bottom_distance_under_modal_: bottom_distance_under_modal
10283
- });
10284
+ }, override_modal_element);
10284
10285
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
10285
10286
  // The default behaviour is to align the modal with the input field if possible
10286
10287
  const modal_opening_effect = () => {
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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.9";
10
+ export const version = "2.0.10";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
@@ -435,6 +435,7 @@ export type PageURLCreator<InputDisplay extends ModernDisplay, OutputDisplay ext
435
435
  * So the idea is to have a modal. It should either be rendered and exist, in which case it is in the foreground and open, or it's completely gone. This makes things easier.
436
436
  * @param search_modal a function which returns an array of nodes that get appended into <body>. This function will run in its own solid-js root which will call onCleanup and cleanup all reactive things inside it when the modal is closed. This function will get the arguments passed to open_modal_ and the modal_fn_opts merged together, along with register_closing_animation_ where an async function that resolves once the animation is finished can be provided to animate the closing of the modal
437
437
  * @param modal_fn_opts static options for the modal that won't change on a per-opening basis
438
+ * @param parent override the parent element to append the modal to. Defaults to <body>
438
439
  @returns a function to open and close the modal. When calling the open_modal_ function additional parameters can be passed to the modal
439
440
  */
440
441
  export function general_modal_abstraction<StaticOptions extends {
@@ -445,7 +446,7 @@ export function general_modal_abstraction<StaticOptions extends {
445
446
  close_modal_: VoidFunction;
446
447
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
447
448
  register_closing_animation_: (animation: () => Promise<any>) => void;
448
- }) => Node_Array, modal_fn_opts: StaticOptions): Promise<{
449
+ }) => Node_Array, modal_fn_opts: StaticOptions, parent?: HTMLElement | ShadowRoot): Promise<{
449
450
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
450
451
  close_modal_: () => void;
451
452
  }>;
@@ -753,6 +754,7 @@ type GeneralConstructorOptions<InputDisplay extends Display, OutputDisplay exten
753
754
  disable_scrolling_during_modal?: boolean;
754
755
  bottom_distance_under_modal?: Accessor<number | undefined>;
755
756
  render_instant_card?: InstantCard<OutputDisplay extends ModernDisplay ? OutputDisplay : InputDisplay>;
757
+ override_modal_element?: HTMLElement | ShadowRoot;
756
758
  };
757
759
  type ConstructorOptionsWithApi<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = GeneralConstructorOptions<InputDisplay, OutputDisplay> & {
758
760
  api: DepictAPI<InputDisplay, OutputDisplay>;
@@ -786,6 +788,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
786
788
  disable_scrolling_during_modal,
787
789
  bottom_distance_under_modal,
788
790
  render_instant_card,
791
+ override_modal_element,
789
792
  ...props_on_class
790
793
  }: ConstructorOptions<InputDisplay, OutputDisplay>);
791
794
  get enable_content_search(): boolean | undefined;
package/latest/index.js CHANGED
@@ -5,7 +5,7 @@ import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, i
5
5
  /*! Depict.ai search and product listing SDK */
6
6
  import { register_es_version } from "../multi_import_deduplicator.mjs";
7
7
  register_es_version("ui", "latest");
8
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.9";
8
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.10";
9
9
 
10
10
  /** @jsxImportSource solid-js */
11
11
 
@@ -3434,8 +3434,8 @@ function $5efb5894079b220e$var$modify_only_local_filter(local_filter_object, sel
3434
3434
  }
3435
3435
  return modified_filter_object;
3436
3436
  }
3437
- async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_opts) {
3438
- const body = await (0, $9HbP8$observer).wait_for_element("body");
3437
+ async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
3438
+ const body = parent || (await (0, $9HbP8$observer).wait_for_element("body"));
3439
3439
  let dispose_and_remove;
3440
3440
  const open_modal_ = (extra_options_for_modal = {}, on_dispose) => {
3441
3441
  if (dispose_and_remove)
@@ -10102,6 +10102,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
10102
10102
  disable_scrolling_during_modal = true,
10103
10103
  bottom_distance_under_modal: bottom_distance_under_modal,
10104
10104
  render_instant_card: render_instant_card,
10105
+ override_modal_element: override_modal_element,
10105
10106
  ...props_on_class
10106
10107
  }) {
10107
10108
  const owner = $9HbP8$getOwner() || $9HbP8$createRoot(() => $9HbP8$getOwner()); // we might have an owner, if so, pass it on. Otherwise, create one so solid doesn't print warnings to the console
@@ -10224,7 +10225,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
10224
10225
  enable_category_suggestions_: enable_category_suggestions,
10225
10226
  disable_scrolling_: disable_scrolling_during_modal,
10226
10227
  bottom_distance_under_modal_: bottom_distance_under_modal
10227
- });
10228
+ }, override_modal_element);
10228
10229
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
10229
10230
  // The default behaviour is to align the modal with the input field if possible
10230
10231
  const modal_opening_effect = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
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",
@@ -238,7 +238,7 @@
238
238
  "@babel/runtime-corejs3": "^7.22.6",
239
239
  "@depict-ai/plp-styling": "^1.2.5",
240
240
  "@depict-ai/types": "^1.0.39",
241
- "@depict-ai/utilishared": "^1.0.42",
241
+ "@depict-ai/utilishared": "^1.0.43",
242
242
  "solid-js": "^1.7.3"
243
243
  },
244
244
  "type": "module",
@@ -67,7 +67,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
67
67
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
68
68
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
69
69
  /*! Depict.ai search and product listing SDK */
70
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.9";
70
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.10";
71
71
 
72
72
  /** @jsxImportSource solid-js */
73
73
 
@@ -2858,8 +2858,8 @@ function $a162c9a08dc208c2$var$modify_only_local_filter(local_filter_object, sel
2858
2858
  }
2859
2859
  return modified_filter_object;
2860
2860
  }
2861
- async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_opts) {
2862
- const body = await (0, $3hooq$depictaiutilishared.observer).wait_for_element("body");
2861
+ async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
2862
+ const body = parent || (await (0, $3hooq$depictaiutilishared.observer).wait_for_element("body"));
2863
2863
  let dispose_and_remove;
2864
2864
  const open_modal_ = function () {
2865
2865
  let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -8977,6 +8977,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
8977
8977
  disable_scrolling_during_modal = true,
8978
8978
  bottom_distance_under_modal: bottom_distance_under_modal,
8979
8979
  render_instant_card: render_instant_card,
8980
+ override_modal_element: override_modal_element,
8980
8981
  ...props_on_class
8981
8982
  } = _ref;
8982
8983
  $ddd39c5f36f49703$var$_classPrivateFieldInitSpec(this, $ddd39c5f36f49703$var$_locale_signal, {
@@ -9132,7 +9133,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
9132
9133
  enable_category_suggestions_: enable_category_suggestions,
9133
9134
  disable_scrolling_: disable_scrolling_during_modal,
9134
9135
  bottom_distance_under_modal_: bottom_distance_under_modal
9135
- });
9136
+ }, override_modal_element);
9136
9137
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
9137
9138
  // The default behaviour is to align the modal with the input field if possible
9138
9139
  const modal_opening_effect = () => {
@@ -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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.9";
10
+ export const version = "2.0.10";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
@@ -435,6 +435,7 @@ export type PageURLCreator<InputDisplay extends ModernDisplay, OutputDisplay ext
435
435
  * So the idea is to have a modal. It should either be rendered and exist, in which case it is in the foreground and open, or it's completely gone. This makes things easier.
436
436
  * @param search_modal a function which returns an array of nodes that get appended into <body>. This function will run in its own solid-js root which will call onCleanup and cleanup all reactive things inside it when the modal is closed. This function will get the arguments passed to open_modal_ and the modal_fn_opts merged together, along with register_closing_animation_ where an async function that resolves once the animation is finished can be provided to animate the closing of the modal
437
437
  * @param modal_fn_opts static options for the modal that won't change on a per-opening basis
438
+ * @param parent override the parent element to append the modal to. Defaults to <body>
438
439
  @returns a function to open and close the modal. When calling the open_modal_ function additional parameters can be passed to the modal
439
440
  */
440
441
  export function general_modal_abstraction<StaticOptions extends {
@@ -445,7 +446,7 @@ export function general_modal_abstraction<StaticOptions extends {
445
446
  close_modal_: VoidFunction;
446
447
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
447
448
  register_closing_animation_: (animation: () => Promise<any>) => void;
448
- }) => Node_Array, modal_fn_opts: StaticOptions): Promise<{
449
+ }) => Node_Array, modal_fn_opts: StaticOptions, parent?: HTMLElement | ShadowRoot): Promise<{
449
450
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
450
451
  close_modal_: () => void;
451
452
  }>;
@@ -753,6 +754,7 @@ type GeneralConstructorOptions<InputDisplay extends Display, OutputDisplay exten
753
754
  disable_scrolling_during_modal?: boolean;
754
755
  bottom_distance_under_modal?: Accessor<number | undefined>;
755
756
  render_instant_card?: InstantCard<OutputDisplay extends ModernDisplay ? OutputDisplay : InputDisplay>;
757
+ override_modal_element?: HTMLElement | ShadowRoot;
756
758
  };
757
759
  type ConstructorOptionsWithApi<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = GeneralConstructorOptions<InputDisplay, OutputDisplay> & {
758
760
  api: DepictAPI<InputDisplay, OutputDisplay>;
@@ -786,6 +788,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
786
788
  disable_scrolling_during_modal,
787
789
  bottom_distance_under_modal,
788
790
  render_instant_card,
791
+ override_modal_element,
789
792
  ...props_on_class
790
793
  }: ConstructorOptions<InputDisplay, OutputDisplay>);
791
794
  get enable_content_search(): boolean | undefined;
@@ -8,7 +8,7 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
8
8
  /*! Depict.ai search and product listing SDK */
9
9
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
10
10
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.9";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.10";
12
12
 
13
13
  /** @jsxImportSource solid-js */
14
14
 
@@ -2799,8 +2799,8 @@ function $44aa24b1bb793549$var$modify_only_local_filter(local_filter_object, sel
2799
2799
  }
2800
2800
  return modified_filter_object;
2801
2801
  }
2802
- async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_opts) {
2803
- const body = await (0, $b8hua$observer).wait_for_element("body");
2802
+ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
2803
+ const body = parent || (await (0, $b8hua$observer).wait_for_element("body"));
2804
2804
  let dispose_and_remove;
2805
2805
  const open_modal_ = function () {
2806
2806
  let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -8918,6 +8918,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
8918
8918
  disable_scrolling_during_modal = true,
8919
8919
  bottom_distance_under_modal: bottom_distance_under_modal,
8920
8920
  render_instant_card: render_instant_card,
8921
+ override_modal_element: override_modal_element,
8921
8922
  ...props_on_class
8922
8923
  } = _ref;
8923
8924
  $eb064bc3350276c1$var$_classPrivateFieldInitSpec(this, $eb064bc3350276c1$var$_locale_signal, {
@@ -9073,7 +9074,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
9073
9074
  enable_category_suggestions_: enable_category_suggestions,
9074
9075
  disable_scrolling_: disable_scrolling_during_modal,
9075
9076
  bottom_distance_under_modal_: bottom_distance_under_modal
9076
- });
9077
+ }, override_modal_element);
9077
9078
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
9078
9079
  // The default behaviour is to align the modal with the input field if possible
9079
9080
  const modal_opening_effect = () => {
@@ -61,7 +61,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
61
61
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
62
62
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
63
63
  /*! Depict.ai search and product listing SDK */
64
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.9";
64
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.10";
65
65
 
66
66
  /** @jsxImportSource solid-js */
67
67
 
@@ -2658,8 +2658,8 @@ function $70482f04605572e2$var$modify_only_local_filter(local_filter_object, sel
2658
2658
  }
2659
2659
  return modified_filter_object;
2660
2660
  }
2661
- async function $9abb0a35d4b60ed3$export$79b1565500412d9b(search_modal, modal_fn_opts) {
2662
- const body = await (0, $5vyXB$depictaiutilishared.observer).wait_for_element("body");
2661
+ async function $9abb0a35d4b60ed3$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
2662
+ const body = parent || (await (0, $5vyXB$depictaiutilishared.observer).wait_for_element("body"));
2663
2663
  let dispose_and_remove;
2664
2664
  const open_modal_ = (extra_options_for_modal = {}, on_dispose) => {
2665
2665
  if (dispose_and_remove)
@@ -8258,6 +8258,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
8258
8258
  disable_scrolling_during_modal = true,
8259
8259
  bottom_distance_under_modal: bottom_distance_under_modal,
8260
8260
  render_instant_card: render_instant_card,
8261
+ override_modal_element: override_modal_element,
8261
8262
  ...props_on_class
8262
8263
  }) {
8263
8264
  const owner = $5vyXB$solidjs.getOwner() || $5vyXB$solidjs.createRoot(() => $5vyXB$solidjs.getOwner()); // we might have an owner, if so, pass it on. Otherwise, create one so solid doesn't print warnings to the console
@@ -8380,7 +8381,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
8380
8381
  enable_category_suggestions_: enable_category_suggestions,
8381
8382
  disable_scrolling_: disable_scrolling_during_modal,
8382
8383
  bottom_distance_under_modal_: bottom_distance_under_modal
8383
- });
8384
+ }, override_modal_element);
8384
8385
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
8385
8386
  // The default behaviour is to align the modal with the input field if possible
8386
8387
  const modal_opening_effect = () => {
@@ -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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.9";
10
+ export const version = "2.0.10";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
@@ -435,6 +435,7 @@ export type PageURLCreator<InputDisplay extends ModernDisplay, OutputDisplay ext
435
435
  * So the idea is to have a modal. It should either be rendered and exist, in which case it is in the foreground and open, or it's completely gone. This makes things easier.
436
436
  * @param search_modal a function which returns an array of nodes that get appended into <body>. This function will run in its own solid-js root which will call onCleanup and cleanup all reactive things inside it when the modal is closed. This function will get the arguments passed to open_modal_ and the modal_fn_opts merged together, along with register_closing_animation_ where an async function that resolves once the animation is finished can be provided to animate the closing of the modal
437
437
  * @param modal_fn_opts static options for the modal that won't change on a per-opening basis
438
+ * @param parent override the parent element to append the modal to. Defaults to <body>
438
439
  @returns a function to open and close the modal. When calling the open_modal_ function additional parameters can be passed to the modal
439
440
  */
440
441
  export function general_modal_abstraction<StaticOptions extends {
@@ -445,7 +446,7 @@ export function general_modal_abstraction<StaticOptions extends {
445
446
  close_modal_: VoidFunction;
446
447
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
447
448
  register_closing_animation_: (animation: () => Promise<any>) => void;
448
- }) => Node_Array, modal_fn_opts: StaticOptions): Promise<{
449
+ }) => Node_Array, modal_fn_opts: StaticOptions, parent?: HTMLElement | ShadowRoot): Promise<{
449
450
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
450
451
  close_modal_: () => void;
451
452
  }>;
@@ -753,6 +754,7 @@ type GeneralConstructorOptions<InputDisplay extends Display, OutputDisplay exten
753
754
  disable_scrolling_during_modal?: boolean;
754
755
  bottom_distance_under_modal?: Accessor<number | undefined>;
755
756
  render_instant_card?: InstantCard<OutputDisplay extends ModernDisplay ? OutputDisplay : InputDisplay>;
757
+ override_modal_element?: HTMLElement | ShadowRoot;
756
758
  };
757
759
  type ConstructorOptionsWithApi<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = GeneralConstructorOptions<InputDisplay, OutputDisplay> & {
758
760
  api: DepictAPI<InputDisplay, OutputDisplay>;
@@ -786,6 +788,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
786
788
  disable_scrolling_during_modal,
787
789
  bottom_distance_under_modal,
788
790
  render_instant_card,
791
+ override_modal_element,
789
792
  ...props_on_class
790
793
  }: ConstructorOptions<InputDisplay, OutputDisplay>);
791
794
  get enable_content_search(): boolean | undefined;
@@ -5,7 +5,7 @@ import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as
5
5
  /*! Depict.ai search and product listing SDK */
6
6
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
7
7
  register_es_version("ui", "latest");
8
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.9";
8
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.10";
9
9
 
10
10
  /** @jsxImportSource solid-js */
11
11
 
@@ -2602,8 +2602,8 @@ function $5efb5894079b220e$var$modify_only_local_filter(local_filter_object, sel
2602
2602
  }
2603
2603
  return modified_filter_object;
2604
2604
  }
2605
- async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_opts) {
2606
- const body = await (0, $i7OB2$observer).wait_for_element("body");
2605
+ async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
2606
+ const body = parent || (await (0, $i7OB2$observer).wait_for_element("body"));
2607
2607
  let dispose_and_remove;
2608
2608
  const open_modal_ = (extra_options_for_modal = {}, on_dispose) => {
2609
2609
  if (dispose_and_remove)
@@ -8202,6 +8202,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
8202
8202
  disable_scrolling_during_modal = true,
8203
8203
  bottom_distance_under_modal: bottom_distance_under_modal,
8204
8204
  render_instant_card: render_instant_card,
8205
+ override_modal_element: override_modal_element,
8205
8206
  ...props_on_class
8206
8207
  }) {
8207
8208
  const owner = $i7OB2$getOwner() || $i7OB2$createRoot(() => $i7OB2$getOwner()); // we might have an owner, if so, pass it on. Otherwise, create one so solid doesn't print warnings to the console
@@ -8324,7 +8325,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
8324
8325
  enable_category_suggestions_: enable_category_suggestions,
8325
8326
  disable_scrolling_: disable_scrolling_during_modal,
8326
8327
  bottom_distance_under_modal_: bottom_distance_under_modal
8327
- });
8328
+ }, override_modal_element);
8328
8329
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
8329
8330
  // The default behaviour is to align the modal with the input field if possible
8330
8331
  const modal_opening_effect = () => {