@depict-ai/ui 1.0.16 → 1.0.17
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/dist/client/main.js +164 -374
- package/dist/client/module.js +167 -375
- package/dist/index.d.ts +26 -52
- package/dist/main.js +8601 -0
- package/dist/module.js +8567 -0
- package/dist/server/main.js +142 -333
- package/dist/server/module.js +145 -334
- package/package.json +27 -50
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSX, Accessor, Setter, Signal } from "solid-js";
|
|
2
1
|
import { Display, Elem, ColsAtSize, Node_Array } from "@depict-ai/utilishared";
|
|
2
|
+
import { JSX, Accessor, Setter, Signal } from "solid-js";
|
|
3
3
|
import { SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
4
4
|
import { SearchRequest, SearchFilter } from "@depict-ai/types/api/SearchRequest";
|
|
5
5
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
@@ -7,13 +7,7 @@ import { SearchSuggestionsResponse, CategorySuggestion } from "@depict-ai/types/
|
|
|
7
7
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
8
8
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
9
9
|
import { ProductListingResponse } from "@depict-ai/types/api/ProductListingResponse";
|
|
10
|
-
export const version = "1.0.
|
|
11
|
-
export function CrossIcon(props?: JSX.SvgSVGAttributes<SVGSVGElement>): SVGElement;
|
|
12
|
-
/** @jsxImportSource solid-js */
|
|
13
|
-
export function GenericSliderArrowButton(props?: {
|
|
14
|
-
width_?: number;
|
|
15
|
-
height_?: number;
|
|
16
|
-
}): SVGElement;
|
|
10
|
+
export const version = "1.0.17";
|
|
17
11
|
export type OnNavigation = ((options: {
|
|
18
12
|
is_replace: boolean;
|
|
19
13
|
new_url: URL;
|
|
@@ -220,27 +214,6 @@ declare class SDKError extends Error {
|
|
|
220
214
|
export class ProductCardError extends SDKError {
|
|
221
215
|
constructor(templateError: Error);
|
|
222
216
|
}
|
|
223
|
-
/**
|
|
224
|
-
* Base placeholder component used by ImagePlaceholder and TextPlaceholder
|
|
225
|
-
*/
|
|
226
|
-
export function BasePlaceholder(props: {
|
|
227
|
-
style: JSX.CSSProperties;
|
|
228
|
-
class?: string;
|
|
229
|
-
}): JSX.Element;
|
|
230
|
-
/**
|
|
231
|
-
* A Placeholder to use instead of some text, while it's loading. This is the inline version, meant to be embedded into sentences (or exist instead of them), etc.
|
|
232
|
-
* If you want a block version, use `ImagePlaceholder` with `width`and `height` set instead.
|
|
233
|
-
* @property height height of the placeholder. Set to `1em` by default.
|
|
234
|
-
* @property width width of the placeholder. For specific number of characters use `ch`, ex: `width="7ch"`
|
|
235
|
-
* @property class extra classes to add to the placeholder
|
|
236
|
-
* @property style extra styles to add to the placeholder
|
|
237
|
-
*/
|
|
238
|
-
export function TextPlaceholder(props: {
|
|
239
|
-
style?: JSX.CSSProperties;
|
|
240
|
-
height: string;
|
|
241
|
-
width: string;
|
|
242
|
-
class?: string;
|
|
243
|
-
}): JSX.Element;
|
|
244
217
|
/**
|
|
245
218
|
* Disables scrolling until the solidjs reactive scoped is disposed (onCleanup)
|
|
246
219
|
* @returns A cleanup function to manually re-enable scrolling.
|
|
@@ -249,7 +222,7 @@ export function disable_scrolling(): () => void;
|
|
|
249
222
|
export const CategoryTitle: ({ category_title_, product_count_, }: {
|
|
250
223
|
category_title_: Accessor<string | undefined>;
|
|
251
224
|
product_count_: JSX.Element;
|
|
252
|
-
}) =>
|
|
225
|
+
}) => HTMLElement;
|
|
253
226
|
/**
|
|
254
227
|
* Embeds number of products between sort and filter buttons on mobile if possible, only supported for category pages right now. Pass it as category_title_ to Category.
|
|
255
228
|
* Note: this will add an invisible element as first element in depict-search-page which will confuse the flex-gap SCSS mixin a bit so you'll get some extra spacing at the beginning of the search page
|
|
@@ -315,27 +288,6 @@ export function QuickLinks({ depict_category }: {
|
|
|
315
288
|
depict_category: DepictCategory;
|
|
316
289
|
}): HTMLElement;
|
|
317
290
|
export function get_categories(tenant: string, market: string): Promise<string[]>;
|
|
318
|
-
type ImagePlaceholderBaseOptions = {
|
|
319
|
-
style?: JSX.CSSProperties;
|
|
320
|
-
class?: string;
|
|
321
|
-
};
|
|
322
|
-
type ImagePlaceholderBlockOptions = {
|
|
323
|
-
width: string;
|
|
324
|
-
height: string;
|
|
325
|
-
};
|
|
326
|
-
type ImagePlaceholderImageOptions = {
|
|
327
|
-
aspectRatio: number;
|
|
328
|
-
};
|
|
329
|
-
/**
|
|
330
|
-
* A placeholder that can be used instead of an image or other block of content while it's loading.
|
|
331
|
-
* The placeholder has `display:block`, meaning it will create a new "row" in the layout for itself. Can be used either for images with a defined aspect ratio (ContainedImage) or blocks.
|
|
332
|
-
* @property aspectRatio if aspectRatio is defined the placeholder will be in "image mode" and fill out the available width and then adjust the height according to the aspectRatio
|
|
333
|
-
* @property width If width and height is set, the defined width and height will be used.
|
|
334
|
-
* @property height If width and height is set, the defined width and height will be used.
|
|
335
|
-
* @property class extra classes to add to the placeholder
|
|
336
|
-
* @property style extra styles to add to the placeholder
|
|
337
|
-
*/
|
|
338
|
-
export function ImagePlaceholder(props: ImagePlaceholderBaseOptions & (ImagePlaceholderBlockOptions | ImagePlaceholderImageOptions)): JSX.Element;
|
|
339
291
|
export function DefaultInstantCardPlaceholder(): HTMLDivElement;
|
|
340
292
|
/**
|
|
341
293
|
* Useful for aligning the search modal to an element, like an existing input field
|
|
@@ -499,6 +451,28 @@ export interface BaseCategoryPageConfig extends BaseProductListingConfig {
|
|
|
499
451
|
*/
|
|
500
452
|
showQuicklinks?: boolean;
|
|
501
453
|
}
|
|
454
|
+
/**
|
|
455
|
+
* Props for the TextPlaceholder component.
|
|
456
|
+
*/
|
|
457
|
+
export interface TextPlaceholderProps {
|
|
458
|
+
/**
|
|
459
|
+
* The height of the text, including a unit.
|
|
460
|
+
* @example "1em"
|
|
461
|
+
*/
|
|
462
|
+
height: string;
|
|
463
|
+
/**
|
|
464
|
+
* The width of the text.
|
|
465
|
+
* @example "60px", "10em"
|
|
466
|
+
*/
|
|
467
|
+
width: string;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Props for the ImagePlaceholder component.
|
|
471
|
+
*/
|
|
472
|
+
export interface ImagePlaceholderProps {
|
|
473
|
+
/** The aspect ratio of the image that will be displayed. */
|
|
474
|
+
aspectRatio: number;
|
|
475
|
+
}
|
|
502
476
|
type CenteredLocation = {
|
|
503
477
|
location?: "centered";
|
|
504
478
|
};
|
|
@@ -564,5 +538,5 @@ export const defaultGridSpacing = "2%";
|
|
|
564
538
|
export const defaultCategoryTitlePlugin: ({ category_title_, product_count_, }: {
|
|
565
539
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
566
540
|
product_count_: import("solid-js").JSX.Element;
|
|
567
|
-
}) =>
|
|
541
|
+
}) => HTMLElement;
|
|
568
542
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequest";
|