@depict-ai/ui 4.7.14 → 4.7.16

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.
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor, Signal, Setter } from "solid-js";
2
- import { useExpandingContainer, Display, ColsAtSize, report, Amazing_Slider, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/ES10";
2
+ import { Display, useExpandingContainer, ColsAtSize, report, Amazing_Slider, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/ES10";
3
3
  import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
4
4
  import { ContentLink, SearchResponse, SearchFilter as _SearchFilter1 } from "@depict-ai/types/api/SearchResponse";
5
5
  import { Ancestors, ListingSuggestion, SearchSuggestionsResponseV3 } from "@depict-ai/types/api/SearchSuggestionsResponseV3";
@@ -11,19 +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.7.14";
15
- /**
16
- * Just like `useExpandingContainer` except that the children can be reactive solid-js signals, basically solid's JSX.Element instead of our JSX.Element
17
- */
18
- export function useExpandingContainerReactive(...params: Parameters<typeof useExpandingContainer>): {
19
- collapse: (collapsing_delay?: any, time_to_collapse?: any) => Promise<Animation | undefined>;
20
- expand: (expanding_delay?: any, time_to_expand?: any) => Promise<Animation | undefined>;
21
- ExpandingContainer: ({
22
- children
23
- }: {
24
- children: JSX.Element | (() => JSX.Element);
25
- }) => JSX.Element;
26
- };
14
+ export const version = "4.7.16";
27
15
  declare const LISTING_ID = "listingId";
28
16
  declare const EXTERNAL_ID = "externalId";
29
17
  type ScrollRestorationData = {
@@ -47,13 +35,6 @@ type AddActualFieldToArray<T> = T extends Array<infer U> ? (U & {
47
35
  actual_field?: string;
48
36
  })[] : never;
49
37
  type AddActualFieldToFilters<T extends SearchFilter[] | undefined> = T extends undefined ? undefined : AddActualFieldToArray<T>;
50
- export type SDKColsAtSize = [number, number?][];
51
- /**
52
- * Transform SDK ColsAtSize into valid Layout ColsAtSize
53
- * @param cols_at_size [nbCol, maxWidth]
54
- * @returns
55
- */
56
- export const convert_sdk_cols_at_size_to_layout: (cols_at_size: SDKColsAtSize) => ColsAtSize;
57
38
  /**
58
39
  * Provider to wrap every product card that gets rendered in (in PLPResults rendering internals), enables using useProductCardIndex anywhere inside the product card to get the index of the product card.
59
40
  */
@@ -71,6 +52,29 @@ export function useProductCardIndex(): Accessor<number> | undefined;
71
52
  * @param obj Anything to clone
72
53
  */
73
54
  export function promiseSafeStructuredClone<T>(obj: T): T;
55
+ /**
56
+ * Returns an accessor that says if said product card is in the viewport or not, when ran within a product card. Throws if not ran within a product card.
57
+ */
58
+ export function useProductCardIsVisible(): Accessor<boolean | undefined>;
59
+ /**
60
+ * Just like `useExpandingContainer` except that the children can be reactive solid-js signals, basically solid's JSX.Element instead of our JSX.Element
61
+ */
62
+ export function useExpandingContainerReactive(...params: Parameters<typeof useExpandingContainer>): {
63
+ collapse: (collapsing_delay?: any, time_to_collapse?: any) => Promise<Animation | undefined>;
64
+ expand: (expanding_delay?: any, time_to_expand?: any) => Promise<Animation | undefined>;
65
+ ExpandingContainer: ({
66
+ children
67
+ }: {
68
+ children: JSX.Element | (() => JSX.Element);
69
+ }) => JSX.Element;
70
+ };
71
+ export type SDKColsAtSize = [number, number?][];
72
+ /**
73
+ * Transform SDK ColsAtSize into valid Layout ColsAtSize
74
+ * @param cols_at_size [nbCol, maxWidth]
75
+ * @returns
76
+ */
77
+ export const convert_sdk_cols_at_size_to_layout: (cols_at_size: SDKColsAtSize) => ColsAtSize;
74
78
  declare class SDKError extends Error {}
75
79
  export class ProductCardError extends SDKError {
76
80
  constructor(templateError: Error);
@@ -1432,7 +1436,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1432
1436
  * Open the modal with support for alignment.
1433
1437
  * @returns {void}
1434
1438
  */
1435
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1439
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1436
1440
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1437
1441
  export interface PageReplacer {
1438
1442
  readonly render_: () => Node_Array;
@@ -1511,5 +1515,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1511
1515
  content_blocks_by_row?: ContentBlocksByRow;
1512
1516
  layout?: PossibleLayout;
1513
1517
  filterModalParent_?: HTMLElement | ShadowRoot;
1514
- }): import("@depict-ai/utilishared").Node_Array;
1518
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1515
1519
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";