@depict-ai/ui 3.0.0 → 3.0.2

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/latest/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
11
11
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
12
12
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
13
13
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "3.0.0";
14
+ export const version = "3.0.2";
15
15
  /** @jsxImportSource solid-js */
16
16
  export function GenericSliderArrowButton(props?: {
17
17
  width_?: number;
@@ -603,56 +603,23 @@ export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDispla
603
603
  products?: (options: DisplayTransformerAlwaysThereData & {
604
604
  displays: InputDisplay[];
605
605
  }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
606
- categories?: (options: DisplayTransformerAlwaysThereData & {
607
- data: (Breadcrumb | Quicklink | CategorySuggestion)[];
608
- }) => CanBePromiseWrapped<{
606
+ categories?: <T extends Breadcrumb | Quicklink | CategorySuggestion>(options: DisplayTransformerAlwaysThereData & {
607
+ data: T[];
608
+ }) => CanBePromiseWrapped<(T & {
609
609
  page_url: string;
610
- }[]>;
610
+ })[]>;
611
611
  contentResults?: (options: DisplayTransformerAlwaysThereData & {
612
612
  data: ContentLink[];
613
613
  }) => CanBePromiseWrapped<ContentLink[]>;
614
614
  };
615
- export type SomethingTakingAPageURLCreatorOrDisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
616
- page_url_creator?: PageURLCreator<InputDisplay, OutputDisplay>;
617
- display_transformers?: never;
618
- } | {
619
- page_url_creator?: never;
615
+ export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
620
616
  display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
621
617
  } : {
622
- page_url_creator: PageURLCreator<InputDisplay, OutputDisplay>;
623
- display_transformers?: never;
624
- } | {
625
618
  display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
626
- page_url_creator?: never;
627
619
  } : {
628
620
  page_url_creator?: never;
629
621
  display_transformers?: never;
630
622
  };
631
- type PageURLCreatorAlwaysThereData = {
632
- merchant: string;
633
- market: string;
634
- };
635
- type PageURLCreatorCategoryData = {
636
- type: "categories";
637
- data: (Breadcrumb | Quicklink | CategorySuggestion)[];
638
- };
639
- type PageURLCreatorProductData<T extends ModernDisplay> = {
640
- displays: T[];
641
- type: "products";
642
- };
643
- type PageURLCreatorOptions<InputDisplay extends ModernDisplay> = PageURLCreatorAlwaysThereData & (PageURLCreatorCategoryData | PageURLCreatorProductData<InputDisplay>);
644
- /**
645
- * @deprecated use DisplayTransformers instead
646
- * PageUrlCreator is, in its most basic form, a function that takes in a list of categories or products and returns a list of page_urls for the provided categories or products.
647
- * It's main use case is to allow for the creation of links to the product or category pages on the merchant's site.
648
- * It can also be used for the depict customers which already have links to change those links (i.e. for staging sites).
649
- * Also, it can be used to enrich the data for each product card in a batched way, which is why it can be an async function and return a whole display in the case of products.
650
- */
651
- export type PageURLCreator<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = (options: PageURLCreatorOptions<InputDisplay>) => (typeof options)["type"] extends "categories" ? CanBePromiseWrapped<{
652
- page_url: string;
653
- }[]> : CanBePromiseWrapped<{
654
- page_url: string;
655
- }[]> | CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
656
623
  export type ExclusiveId = {
657
624
  categoryId: string;
658
625
  productId?: undefined;
@@ -731,21 +698,21 @@ type SearchSuggestionsResponseAfterURLCreator = { [K in keyof SearchSuggestionsR
731
698
  type AddPageUrlToDisplay<T extends any[]> = (T[number] & {
732
699
  page_url: string;
733
700
  })[];
734
- type SearchResponseAfterURLCreator = { [K in keyof SearchResponse]: K extends "displays" ? AddPageUrlToDisplay<SearchResponse[K]> : K extends "filters" ? AddActualFieldToFilters<SearchResponse[K]> : SearchResponse[K] };
701
+ type SearchResponseAfterDisplayTransformer = { [K in keyof SearchResponse]: K extends "displays" ? AddPageUrlToDisplay<SearchResponse[K]> : K extends "filters" ? AddActualFieldToFilters<SearchResponse[K]> : SearchResponse[K] };
735
702
  type QuicklinksOrBreadCrumbsWithPageURL<T extends Breadcrumb | Quicklink> = T & {
736
703
  page_url: string;
737
704
  };
738
705
  type _AddPageUrlToDisplay1<T extends any[]> = (T[number] & {
739
706
  page_url: string;
740
707
  })[];
741
- type ProductListingResponseAfterURLCreator = { [K in keyof ProductListingResponseV3]: K extends "displays" ? _AddPageUrlToDisplay1<ProductListingResponseV3[K]> : K extends "filters" ? AddActualFieldToFilters<ProductListingResponseV3[K]> : ProductListingResponseV3[K] };
742
- type GetListingResponseAfterURLCreator = { [K in keyof GetListingResponse]: K extends "breadcrumbs" ? QuicklinksOrBreadCrumbsWithPageURL<Breadcrumb>[] : K extends "quick_links" ? QuicklinksOrBreadCrumbsWithPageURL<Quicklink>[] : GetListingResponse[K] };
708
+ type ProductListingResponseAfterDisplayTransformer = { [K in keyof ProductListingResponseV3]: K extends "displays" ? _AddPageUrlToDisplay1<ProductListingResponseV3[K]> : K extends "filters" ? AddActualFieldToFilters<ProductListingResponseV3[K]> : ProductListingResponseV3[K] };
709
+ type GetListingResponseAfterDisplayTransformer = { [K in keyof GetListingResponse]: K extends "breadcrumbs" ? QuicklinksOrBreadCrumbsWithPageURL<Breadcrumb>[] : K extends "quick_links" ? QuicklinksOrBreadCrumbsWithPageURL<Quicklink>[] : GetListingResponse[K] };
743
710
  type DepictAPIConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = {
744
711
  get_metadata?: () => Promise<{
745
712
  [k: string]: string;
746
713
  } | undefined>;
747
714
  get_session_id?: () => string | undefined;
748
- } & SomethingTakingAPageURLCreatorOrDisplayTransformers<InputDisplay, OutputDisplay>;
715
+ } & SomethingTakingADisplayTransformers<InputDisplay, OutputDisplay>;
749
716
  interface GetListingOptions extends GetListingRequest {
750
717
  listing_id: string;
751
718
  session_id?: string;
@@ -757,21 +724,20 @@ interface GetListingOptions extends GetListingRequest {
757
724
  */
758
725
  export class DepictAPI<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never = InputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<InputDisplay> : never> {
759
726
  #private;
760
- page_url_creator: PageURLCreator<ModernDisplay, OutputDisplay> | undefined;
761
727
  display_transformers: DisplayTransformers<ModernDisplay, OutputDisplay> | undefined;
762
728
  constructor(options: DepictAPIConstructorOptions<InputDisplay, OutputDisplay>);
763
729
  suggest(input_req: SearchSuggestionsRequestV3): Promise<SearchSuggestionsResponseAfterURLCreator & {
764
730
  failed?: true;
765
731
  }>;
766
- query(input_req: SearchRequestV3): Promise<SearchResponseAfterURLCreator & {
732
+ query(input_req: SearchRequestV3): Promise<SearchResponseAfterDisplayTransformer & {
767
733
  failed?: true;
768
734
  }>;
769
- get_listing(input_req: GetListingOptions): Promise<GetListingResponseAfterURLCreator & {
735
+ get_listing(input_req: GetListingOptions): Promise<GetListingResponseAfterDisplayTransformer & {
770
736
  failed?: true;
771
737
  }>;
772
738
  get_listing_products(input_req: ProductListingRequestV3 & {
773
739
  listing_id: string;
774
- }): Promise<ProductListingResponseAfterURLCreator & {
740
+ }): Promise<ProductListingResponseAfterDisplayTransformer & {
775
741
  failed?: true;
776
742
  }>;
777
743
  get_recommended<T extends Display>(input_req: BaseSearchRequestV3): Promise<{
@@ -823,7 +789,7 @@ type CategoryConstructorOptionsWithApi<InputDisplay extends Display, OutputDispl
823
789
  };
824
790
  type CategoryConstructorOptionsWithoutApi<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = GeneralCategoryListingOptions & {
825
791
  api?: never;
826
- } & SomethingTakingAPageURLCreatorOrDisplayTransformers<InputDisplay, OutputDisplay>;
792
+ } & SomethingTakingADisplayTransformers<InputDisplay, OutputDisplay>;
827
793
  type DepictCategoryConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay> = CategoryConstructorOptionsWithApi<InputDisplay, OutputDisplay> | CategoryConstructorOptionsWithoutApi<InputDisplay, OutputDisplay>;
828
794
  export class DepictCategory<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never = InputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<InputDisplay> : never> {
829
795
  #private;
@@ -844,7 +810,6 @@ export class DepictCategory<InputDisplay extends Display, OutputDisplay extends
844
810
  constructor({
845
811
  api,
846
812
  on_navigation,
847
- page_url_creator,
848
813
  display_transformers,
849
814
  unique_instance_key_for_state,
850
815
  listing_id_state_key,
@@ -929,7 +894,7 @@ type ConstructorOptionsWithApi<InputDisplay extends Display, OutputDisplay exten
929
894
  };
930
895
  type ConstructorOptionsWithoutAPI<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = GeneralConstructorOptions<InputDisplay, OutputDisplay> & {
931
896
  api?: never;
932
- } & SomethingTakingAPageURLCreatorOrDisplayTransformers<InputDisplay, OutputDisplay>;
897
+ } & SomethingTakingADisplayTransformers<InputDisplay, OutputDisplay>;
933
898
  type ConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay> = ConstructorOptionsWithApi<InputDisplay, OutputDisplay> | ConstructorOptionsWithoutAPI<InputDisplay, OutputDisplay>;
934
899
  export type OpenModalArguments = [options_for_modal?: {
935
900
  style_props_?: Signal<JSX.CSSProperties>;
@@ -947,7 +912,6 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
947
912
  url_transformer,
948
913
  on_navigation,
949
914
  enable_category_suggestions,
950
- page_url_creator,
951
915
  display_transformers,
952
916
  api,
953
917
  disable_scrolling_during_modal,
@@ -1024,46 +988,16 @@ export type BaseProviderConfig<InputDisplay extends Display, PossibleTransformed
1024
988
  */
1025
989
  uniqueInstanceKeyForState?: string;
1026
990
  } & (InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
1027
- /**
1028
- * @deprecated use displayTransformers instead
1029
- */
1030
- pageURLCreator?: PageURLCreator<InputDisplay, PossibleTransformedDisplay>;
1031
- /**
1032
- * Functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
1033
- */
1034
- displayTransformers?: never;
1035
- } | {
1036
- /**
1037
- * @deprecated use displayTransformers instead
1038
- */
1039
- pageURLCreator?: never;
1040
991
  /**
1041
992
  * Functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
1042
993
  */
1043
994
  displayTransformers: DisplayTransformers<InputDisplay, PossibleTransformedDisplay>;
1044
995
  } : {
1045
- /**
1046
- * @deprecated use displayTransformers instead
1047
- */
1048
- pageURLCreator: PageURLCreator<InputDisplay, PossibleTransformedDisplay>;
1049
- /**
1050
- * Functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
1051
- */
1052
- displayTransformers?: never;
1053
- } | {
1054
996
  /**
1055
997
  * Functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
1056
998
  */
1057
999
  displayTransformers: DisplayTransformers<InputDisplay, PossibleTransformedDisplay>;
1058
- /**
1059
- * @deprecated use displayTransformers instead
1060
- */
1061
- pageURLCreator?: never;
1062
1000
  } : {
1063
- /**
1064
- * @deprecated use displayTransformers instead
1065
- */
1066
- pageURLCreator?: never;
1067
1001
  /**
1068
1002
  * Functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
1069
1003
  */
package/latest/index.js CHANGED
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.0";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.2";
11
11
  const $fbbadcb080ad1d4a$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0"fill=#0f0f0f>`);
12
12
  function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
13
13
  return (() => {
@@ -5447,100 +5447,54 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
5447
5447
  };
5448
5448
  #get_metadata;
5449
5449
  #get_session_id;
5450
- #guard_url_creator_length(expected, received) {
5451
- if (expected.length !== received.length) {
5452
- const e = new Error("displayTransformer returned wrong number of page URLs, got " + received.length + ", expected " + expected.length);
5453
- queueMicrotask(() => {
5454
- throw e;
5455
- });
5456
- throw e;
5457
- }
5458
- }
5459
5450
  async #run_url_creator_for_suggest(merchant, market, response) {
5460
- const page_url_creator = this.page_url_creator;
5461
5451
  const category_transformer = this.display_transformers?.categories;
5462
- if (!page_url_creator && !category_transformer) return response;
5452
+ if (!category_transformer) return response;
5463
5453
  // find category suggestions, run thing with them, and then replace them
5464
5454
  const category_suggestions = response.suggestions.filter(suggestion => suggestion.type === "category");
5465
- const page_urls = await (page_url_creator || category_transformer)({
5455
+ const transformed_category_suggestions = await category_transformer({
5466
5456
  market: market,
5467
5457
  merchant: merchant,
5468
- data: [...category_suggestions],
5469
- ...(page_url_creator ? {
5470
- type: "categories"
5471
- } : {})
5458
+ data: [...category_suggestions]
5472
5459
  });
5473
- this.#guard_url_creator_length(category_suggestions, page_urls);
5474
- while (page_urls.length)
5475
- // Copy over getters so we sneakily can make this reactive
5476
- Object.defineProperties(category_suggestions.pop(), Object.getOwnPropertyDescriptors(page_urls.pop()));
5460
+ response.suggestions = transformed_category_suggestions;
5477
5461
  return response;
5478
5462
  }
5479
5463
  async #run_display_transformers_for_rest(merchant, market, input_data) {
5480
5464
  const {
5481
- page_url_creator: page_url_creator,
5482
5465
  display_transformers: display_transformers
5483
5466
  } = this;
5484
- if (!page_url_creator && !display_transformers) return input_data;
5467
+ if (!display_transformers) return input_data;
5485
5468
  const product_transformer = display_transformers?.products;
5486
5469
  const category_transformer = display_transformers?.categories;
5487
5470
  const content_result_transformer = display_transformers?.contentResults;
5488
5471
  const displays = input_data.displays;
5489
- const owner = $9HbP8$getOwner();
5490
5472
  const {
5491
- breadcrumbs: breadcrumbs,
5492
- quick_links: quick_links,
5493
5473
  content_search_links: content_search_links
5494
5474
  } = input_data;
5495
- if (displays && (page_url_creator || product_transformer)) {
5496
- const page_urls = await (page_url_creator || product_transformer)({
5475
+ if (displays && product_transformer) {
5476
+ const transformed_displays = await product_transformer({
5497
5477
  merchant: merchant,
5498
5478
  market: market,
5499
- displays: [...input_data.displays],
5500
- ...(page_url_creator ? {
5501
- type: "products"
5502
- } : {})
5479
+ displays: [...displays]
5503
5480
  });
5504
- this.#guard_url_creator_length(displays, page_urls);
5505
- for (let i = 0; i < displays.length; i++) {
5506
- const new_display_or_page_url = page_urls[i];
5507
- const old_display = displays[i];
5508
- if ("page_url" in new_display_or_page_url && Object.keys(new_display_or_page_url).length === 1) {
5509
- // they only returned page_url, let's put it into the display
5510
- const old_display_was_modern = ("variant_index" in old_display);
5511
- if (old_display_was_modern) {
5512
- const variant_displays = old_display.variant_displays;
5513
- for (let i = 0; i < variant_displays.length; i++) variant_displays[i].page_url = new_display_or_page_url.page_url;
5514
- } else old_display.page_url = new_display_or_page_url.page_url;
5515
- } else
5516
- // We got a whole new display, let's replace it
5517
- displays[i] = new_display_or_page_url;
5518
- }
5481
+ input_data.displays = transformed_displays;
5519
5482
  }
5520
- if (page_url_creator || category_transformer) for (const category_display_array of [breadcrumbs, quick_links]) {
5483
+ if (category_transformer) for (const key of ["breadcrumbs", "quick_links"]) {
5484
+ const category_display_array = input_data[key];
5521
5485
  if (!category_display_array) continue;
5522
- const page_urls = await (page_url_creator || category_transformer)({
5486
+ const transformed_category_displays = await category_transformer({
5523
5487
  merchant: merchant,
5524
5488
  market: market,
5525
- data: [...category_display_array],
5526
- ...(page_url_creator ? {
5527
- type: "categories"
5528
- } : {})
5489
+ data: [...category_display_array]
5529
5490
  });
5530
- this.#guard_url_creator_length(category_display_array, page_urls);
5531
- for (let i = 0; i < category_display_array.length; i++)
5532
- // Copy over getters so we sneakily can make this reactive
5533
- Object.defineProperties(category_display_array[i], Object.getOwnPropertyDescriptors(page_urls[i]));
5534
- }
5535
- if (content_search_links?.length && content_result_transformer) {
5536
- const result = await $9HbP8$runWithOwner(owner, () => content_result_transformer({
5537
- merchant: merchant,
5538
- market: market,
5539
- data: [...content_search_links]
5540
- }));
5541
- this.#guard_url_creator_length(content_search_links, result);
5542
- input_data.content_search_links = result;
5491
+ input_data[key] = transformed_category_displays;
5543
5492
  }
5493
+ if (content_search_links?.length && content_result_transformer) input_data.content_search_links = await content_result_transformer({
5494
+ merchant: merchant,
5495
+ market: market,
5496
+ data: [...content_search_links]
5497
+ });
5544
5498
  return input_data;
5545
5499
  }
5546
5500
  async #cached_request({
@@ -5552,7 +5506,6 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
5552
5506
  }) {
5553
5507
  const cache_obj = this.#get_cache_obj_for_endpoint(endpoint_);
5554
5508
  const with_ids = this.#add_ids_to_request(input_req_);
5555
- const owner = $9HbP8$getOwner();
5556
5509
  const metaData = await this.#get_metadata?.();
5557
5510
  const request = metaData ? Object.assign(with_ids, {
5558
5511
  metadata: metaData
@@ -5580,7 +5533,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
5580
5533
  let result;
5581
5534
  try {
5582
5535
  const unmodified_result = await api_response.json();
5583
- result = await $9HbP8$runWithOwner(owner, () => this.#run_display_transformers_for_rest(input_req_.merchant, input_req_.market, unmodified_result));
5536
+ result = await this.#run_display_transformers_for_rest(input_req_.merchant, input_req_.market, unmodified_result);
5584
5537
  } catch (e) {
5585
5538
  $9HbP8$dwarn("displayTransformer or json decoding failed", e);
5586
5539
  break return_successfully;
@@ -5611,17 +5564,14 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
5611
5564
  const {
5612
5565
  get_metadata: get_metadata,
5613
5566
  get_session_id: get_session_id,
5614
- page_url_creator: page_url_creator,
5615
5567
  display_transformers: display_transformers
5616
5568
  } = options ?? {};
5617
5569
  this.#get_metadata = get_metadata;
5618
5570
  this.#get_session_id = get_session_id;
5619
- this.page_url_creator = page_url_creator;
5620
5571
  this.display_transformers = display_transformers;
5621
5572
  }
5622
5573
  async suggest(input_req) {
5623
5574
  const with_ids = this.#add_ids_to_request(input_req);
5624
- const owner = $9HbP8$getOwner();
5625
5575
  const metaData = await this.#get_metadata?.();
5626
5576
  const request = metaData ? Object.assign(with_ids, {
5627
5577
  metadata: JSON.stringify(metaData)
@@ -5633,7 +5583,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
5633
5583
  const decoded_json = await results.json();
5634
5584
  if (!Array.isArray(decoded_json?.suggestions)) break attempt_to_return_api_response;
5635
5585
  try {
5636
- return await $9HbP8$runWithOwner(owner, () => this.#run_url_creator_for_suggest(input_req.merchant, input_req.market, decoded_json));
5586
+ return await this.#run_url_creator_for_suggest(input_req.merchant, input_req.market, decoded_json);
5637
5587
  } catch (e) {
5638
5588
  $9HbP8$dwarn("displayTransformer failed", e);
5639
5589
  }
@@ -7646,7 +7596,9 @@ function $dfa5b6f7c5e421df$export$5646050d516e06bc({
7646
7596
  children: (display_accessor, index) => {
7647
7597
  const href = $9HbP8$createMemo(() => $4147651646da990a$export$43cd1e747fecd42e({
7648
7598
  to_url_: display_accessor()?.page_url,
7649
- filter_query_param_prefix_: filter_query_param_prefix_,
7599
+ filter_query_param_prefix_:
7600
+ // page_url here can be a getter if that was added in the display transformers as a way of making this reactive
7601
+ filter_query_param_prefix_,
7650
7602
  sorting_query_param_: sorting_query_param_
7651
7603
  }));
7652
7604
  return [$9HbP8$createComponent((0, $9HbP8$Show), {
@@ -8096,7 +8048,7 @@ function $e7fce80abe608e01$var$clear_if_opened_new_tab_with_sideways_url_params_
8096
8048
  });
8097
8049
  tracking_function_for_plp_results(plp_results_);
8098
8050
  }
8099
- const $cc6f5b69378cd164$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=statement style=white-space:pre-wrap>No category ID specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a category ID in your Depict Provider.`),
8051
+ const $cc6f5b69378cd164$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=statement style=white-space:pre-wrap>No listingId specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a listingId.`),
8100
8052
  $cc6f5b69378cd164$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div class=buttons><button class="ok major">`);
8101
8053
  function $cc6f5b69378cd164$export$7af06a63c5a976c9(el, listing_id, i18n_) {
8102
8054
  if (!(0, $9HbP8$is_debug)) return; // Just to make sure we don't show this in production
@@ -8106,7 +8058,7 @@ function $cc6f5b69378cd164$export$7af06a63c5a976c9(el, listing_id, i18n_) {
8106
8058
  }) => $9HbP8$runWithOwner(owner, () => $9HbP8$createEffect(() => {
8107
8059
  if (!document.documentElement.contains(element)) return;
8108
8060
  if (!listing_id()) {
8109
- const warning = "No category ID specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a category ID in your Depict Provider.";
8061
+ const warning = "No listingId specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a listingId.";
8110
8062
  $9HbP8$dwarn(warning);
8111
8063
  const {
8112
8064
  close_toast_: close_toast_
@@ -8776,7 +8728,6 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
8776
8728
  constructor({
8777
8729
  api: api,
8778
8730
  on_navigation: on_navigation,
8779
- page_url_creator: page_url_creator,
8780
8731
  display_transformers: display_transformers,
8781
8732
  unique_instance_key_for_state = "",
8782
8733
  listing_id_state_key: listing_id_state_key,
@@ -8827,7 +8778,6 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
8827
8778
  reset_history_state_: reset_history_state_,
8828
8779
  // @ts-ignore
8829
8780
  depict_api_: api ?? new (0, $7fa23e2a0079eca4$export$e015ed2f2950f2e3)({
8830
- page_url_creator: page_url_creator,
8831
8781
  display_transformers: display_transformers
8832
8782
  }),
8833
8783
  router_: this.#router,
@@ -11684,7 +11634,6 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
11684
11634
  url_transformer: url_transformer,
11685
11635
  on_navigation: on_navigation,
11686
11636
  enable_category_suggestions = true,
11687
- page_url_creator: page_url_creator,
11688
11637
  display_transformers: display_transformers,
11689
11638
  api: api,
11690
11639
  // Stuff needed for non-standard customer deployments that we shouldn't actually expose
@@ -11736,7 +11685,6 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
11736
11685
  });
11737
11686
  // @ts-ignore
11738
11687
  const depict_api_ = api ?? new (0, $7fa23e2a0079eca4$export$e015ed2f2950f2e3)({
11739
- page_url_creator: page_url_creator,
11740
11688
  display_transformers: display_transformers
11741
11689
  });
11742
11690
  const previous_searches = $21f51c14cb3f586f$export$84bba84a7b837187(get_search_query_);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
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",