@depict-ai/ui 0.0.42 → 0.0.44
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/index.d.ts +16 -16
- package/dist/main.js +42 -23
- package/dist/module.js +42 -23
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestions
|
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
10
|
import { ProductListingResponse, BaseCategoryDisplay } from "@depict-ai/types/api/ProductListingResponse";
|
|
11
11
|
import { JSX as _JSX1 } from "solid-js/types/jsx";
|
|
12
|
-
export const version = "0.0.
|
|
12
|
+
export const version = "0.0.44";
|
|
13
13
|
type ExclusiveId = {
|
|
14
14
|
categoryId: string;
|
|
15
15
|
productId?: undefined;
|
|
@@ -67,7 +67,7 @@ type RecsAPIWrapperOptions = {
|
|
|
67
67
|
* ```
|
|
68
68
|
* @return This function is guaranteed to return an array of Displays. If anything fails, you will get an empty array.
|
|
69
69
|
*/
|
|
70
|
-
export function fetchDepictRecommendations<T = Display>({ merchant, market, headers, ...fetch_recs_options }: RecsAPIWrapperOptions): Promise<T[]>;
|
|
70
|
+
export function fetchDepictRecommendations<T extends Display = Display>({ merchant, market, headers, ...fetch_recs_options }: RecsAPIWrapperOptions): Promise<T[]>;
|
|
71
71
|
/**
|
|
72
72
|
* Like standard_price_format except that the price and the formatting are reactive accessors
|
|
73
73
|
*/
|
|
@@ -155,7 +155,7 @@ interface category_i18n extends plp_shared_i18n {
|
|
|
155
155
|
*/
|
|
156
156
|
export interface Locale extends category_i18n, search_i18n {
|
|
157
157
|
}
|
|
158
|
-
export type InstantCard = (display:
|
|
158
|
+
export type InstantCard<T extends Display> = (display: T, context: {
|
|
159
159
|
index: number;
|
|
160
160
|
i18n: _search_i18n1;
|
|
161
161
|
merchant: string;
|
|
@@ -250,11 +250,11 @@ export class DepictCategory {
|
|
|
250
250
|
set market(market: string);
|
|
251
251
|
constructor({ api, on_navigation, ...props_on_class }: DepictCategoryConstructorOptions);
|
|
252
252
|
}
|
|
253
|
-
export function CategoryPage({ depict_category, grid_spacing, cols_at_size, product_card_template, get_product_id, show_breadcrumbs, show_quicklinks, category_title, }: {
|
|
253
|
+
export function CategoryPage<T extends Display>({ depict_category, grid_spacing, cols_at_size, product_card_template, get_product_id, show_breadcrumbs, show_quicklinks, category_title, }: {
|
|
254
254
|
depict_category: DepictCategory;
|
|
255
255
|
grid_spacing: SDKGridSpacing;
|
|
256
256
|
cols_at_size: SDKColsAtSize;
|
|
257
|
-
product_card_template: (display:
|
|
257
|
+
product_card_template: (display: T | null, info: InfoForProcessing<T>) => Promise<Node_Array> | Node_Array;
|
|
258
258
|
get_product_id: (url?: string) => string | Promise<string>;
|
|
259
259
|
show_quicklinks?: boolean;
|
|
260
260
|
show_breadcrumbs?: boolean;
|
|
@@ -300,7 +300,7 @@ export type RenderCategorySuggestion = (category_suggestion: Accessor<CategorySu
|
|
|
300
300
|
export function connect_query_input_height_to_aligner_height(aligner: HTMLElement): {
|
|
301
301
|
cleanup: () => void;
|
|
302
302
|
};
|
|
303
|
-
type ConstructorOptions = {
|
|
303
|
+
type ConstructorOptions<T extends Display> = {
|
|
304
304
|
search_query_url_param_name?: string;
|
|
305
305
|
market: string;
|
|
306
306
|
merchant: string;
|
|
@@ -311,7 +311,7 @@ type ConstructorOptions = {
|
|
|
311
311
|
disable_scrolling_during_modal?: boolean;
|
|
312
312
|
api?: DepictAPI;
|
|
313
313
|
bottom_distance_under_modal_?: Accessor<number | undefined>;
|
|
314
|
-
render_instant_card?: InstantCard
|
|
314
|
+
render_instant_card?: InstantCard<T>;
|
|
315
315
|
};
|
|
316
316
|
type OpenModalArguments = [
|
|
317
317
|
options_for_modal?: {
|
|
@@ -321,10 +321,10 @@ type OpenModalArguments = [
|
|
|
321
321
|
},
|
|
322
322
|
on_dispose?: VoidFunction
|
|
323
323
|
];
|
|
324
|
-
export const get_search_query_updating_blocked_signal: (depict_search: DepictSearch) => Signal<boolean> | undefined;
|
|
325
|
-
export class DepictSearch {
|
|
324
|
+
export const get_search_query_updating_blocked_signal: (depict_search: DepictSearch<any>) => Signal<boolean> | undefined;
|
|
325
|
+
export class DepictSearch<T extends Display> {
|
|
326
326
|
#private;
|
|
327
|
-
constructor({ search_query_url_param_name, url_transformer, on_navigation: raw_on_navigation, enable_category_suggestions, disable_scrolling_during_modal, api, bottom_distance_under_modal_, render_instant_card, ...props_on_class }: ConstructorOptions);
|
|
327
|
+
constructor({ search_query_url_param_name, url_transformer, on_navigation: raw_on_navigation, enable_category_suggestions, disable_scrolling_during_modal, api, bottom_distance_under_modal_, render_instant_card, ...props_on_class }: ConstructorOptions<T>);
|
|
328
328
|
get localization(): search_i18n;
|
|
329
329
|
set localization(locale_obj: search_i18n);
|
|
330
330
|
get modal_open(): OpenModalArguments | boolean;
|
|
@@ -334,24 +334,24 @@ export class DepictSearch {
|
|
|
334
334
|
get market(): string;
|
|
335
335
|
set market(market: string);
|
|
336
336
|
}
|
|
337
|
-
export function SearchPage({ depict_search, include_input_field, grid_spacing, cols_at_size, product_card_template, get_product_id, extra_depict_options, }: {
|
|
338
|
-
depict_search: DepictSearch
|
|
337
|
+
export function SearchPage<T extends Display>({ depict_search, include_input_field, grid_spacing, cols_at_size, product_card_template, get_product_id, extra_depict_options, }: {
|
|
338
|
+
depict_search: DepictSearch<T>;
|
|
339
339
|
include_input_field?: boolean | {
|
|
340
340
|
on_open_?: VoidFunction;
|
|
341
341
|
on_close_?: VoidFunction;
|
|
342
342
|
};
|
|
343
343
|
grid_spacing: SDKGridSpacing;
|
|
344
344
|
cols_at_size: SDKColsAtSize;
|
|
345
|
-
product_card_template: (display:
|
|
345
|
+
product_card_template: (display: T | null, info: InfoForProcessing<T>) => Promise<Node_Array> | Node_Array;
|
|
346
346
|
get_product_id: (url?: string) => string | Promise<string>;
|
|
347
347
|
extra_depict_options?: {
|
|
348
|
-
pre_processors?: RR_PreProcessor[];
|
|
349
|
-
post_processors?: RR_PostProcessor[];
|
|
348
|
+
pre_processors?: RR_PreProcessor<T>[];
|
|
349
|
+
post_processors?: RR_PostProcessor<T>[];
|
|
350
350
|
recommendations_cols_at_size?: SDKColsAtSize;
|
|
351
351
|
};
|
|
352
352
|
}): Node_Array;
|
|
353
353
|
interface SearchFieldParams {
|
|
354
|
-
depict_search: DepictSearch
|
|
354
|
+
depict_search: DepictSearch<any>;
|
|
355
355
|
modal_dispose_handler?: VoidFunction;
|
|
356
356
|
click_handler?: (this: HTMLDivElement, ev: MouseEvent) => any;
|
|
357
357
|
aligner_ref?: HTMLElement | null;
|
package/dist/main.js
CHANGED
|
@@ -34,7 +34,7 @@ $parcel$export(module.exports, "connect_query_input_height_to_aligner_height", (
|
|
|
34
34
|
$parcel$export(module.exports, "PageReplacer", () => $37e96a5ebc768cc7$export$3ccaa27d81dd8556);
|
|
35
35
|
$parcel$export(module.exports, "version", () => $ae93561d5649a847$export$83d89fbfd8236492);
|
|
36
36
|
/*! Depict.ai search and product listing SDK */
|
|
37
|
-
const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.
|
|
37
|
+
const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.44";
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -868,7 +868,10 @@ function $8d94abc871e13baf$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
868
868
|
query_base_: query_base_,
|
|
869
869
|
observe_for_counting_: observe_for_counting_,
|
|
870
870
|
start_cursor_: current_cursor
|
|
871
|
-
}) : (items)
|
|
871
|
+
}) : function(items) {
|
|
872
|
+
observe_for_counting_(items);
|
|
873
|
+
return items;
|
|
874
|
+
};
|
|
872
875
|
// create owner to run product cards with an Owner, so they know when they've gotten removed
|
|
873
876
|
const [owner_for_cards, dispose_our_cards] = (0, $46MJV$solidjs.createRoot)((dispose)=>[
|
|
874
877
|
(0, $46MJV$solidjs.getOwner)(),
|
|
@@ -1039,7 +1042,7 @@ async function $8d94abc871e13baf$var$insert_placeholders({ scroll_restoration_da
|
|
|
1039
1042
|
{
|
|
1040
1043
|
page_url: "javascript:void(0)"
|
|
1041
1044
|
}
|
|
1042
|
-
]
|
|
1045
|
+
] // This later gets ignored and turned into `null` by the SDK functions in the @depict-ai/ui package
|
|
1043
1046
|
});
|
|
1044
1047
|
const element = elements?.find((e)=>e instanceof HTMLElement || e instanceof SVGElement);
|
|
1045
1048
|
if (!element) return [];
|
|
@@ -1131,7 +1134,7 @@ function $557269f7f9c4f20e$export$6c6d7a51fa9aa15d(props) {
|
|
|
1131
1134
|
await expand(0, do_duration);
|
|
1132
1135
|
} else {
|
|
1133
1136
|
const animation = await collapse();
|
|
1134
|
-
animation
|
|
1137
|
+
animation?.addEventListener("finish", (0, $46MJV$depictaiutilishared.catchify)(()=>details_.open = false));
|
|
1135
1138
|
}
|
|
1136
1139
|
}));
|
|
1137
1140
|
details_.addEventListener("toggle", (0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
@@ -5051,7 +5054,10 @@ function $068a627cc18f7bb6$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5051
5054
|
...grid_spacing_override
|
|
5052
5055
|
},
|
|
5053
5056
|
rr_options_: {
|
|
5054
|
-
template:
|
|
5057
|
+
template: (display, info)=>{
|
|
5058
|
+
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
5059
|
+
return product_card_template(is_placeholder ? null : display, info);
|
|
5060
|
+
}
|
|
5055
5061
|
}
|
|
5056
5062
|
});
|
|
5057
5063
|
}, "Entire CategoryPage failed");
|
|
@@ -5508,12 +5514,14 @@ function $9f81b7ced87aabf2$export$7de92c4c2205ebf3({ depict_api_: depict_api_ ,
|
|
|
5508
5514
|
const rendering_result = await (await (0, $46MJV$depictaiutilishared.make_placeholder_rr)({
|
|
5509
5515
|
// render the max amount of elements that there could be, to make sure scroll restoration works (placeholders can't be shorter than actual content)
|
|
5510
5516
|
num_items: (0, $39d15a684cb3e309$export$6c9030e511152266) + (0, $46MJV$solidjs.untrack)(get_showing_recommendation_rows) * Math.max(...layout_options_.cols_at_size.map(([per_column])=>per_column))
|
|
5511
|
-
}))(tenant_object_,
|
|
5517
|
+
}))(tenant_object_, // @ts-ignore - make_placeholder_rr types is a touchy subject
|
|
5518
|
+
{
|
|
5512
5519
|
type: "search_recs",
|
|
5513
5520
|
recs: recs_promise,
|
|
5514
5521
|
...rr_options_,
|
|
5515
5522
|
...typeof rr_options_.template === "function" ? {
|
|
5516
5523
|
template: (...args)=>(0, $46MJV$solidjs.runWithOwner)(owner_for_cards, ()=>// give template the possibility to know when it gets removed from the DOM by using solid-js onCleanup
|
|
5524
|
+
// @ts-ignore
|
|
5517
5525
|
rr_options_.template(...args))
|
|
5518
5526
|
} : {}
|
|
5519
5527
|
});
|
|
@@ -5673,7 +5681,7 @@ function $ad118c2ba257d9b7$export$84bba84a7b837187(search_query) {
|
|
|
5673
5681
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
5674
5682
|
}));
|
|
5675
5683
|
(0, $46MJV$solidjs.createComputed)((0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
5676
|
-
const searches = (0, $46MJV$solidjs.untrack)(
|
|
5684
|
+
const searches = (0, $46MJV$solidjs.untrack)(read_previous_searches);
|
|
5677
5685
|
const current_query = read_search_query();
|
|
5678
5686
|
if (!current_query) // don't save no query in history
|
|
5679
5687
|
return;
|
|
@@ -7653,7 +7661,10 @@ function $79fbf145b15af988$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7653
7661
|
width_: 6.46
|
|
7654
7662
|
}),
|
|
7655
7663
|
rr_options_: {
|
|
7656
|
-
template:
|
|
7664
|
+
template: (display, info)=>{
|
|
7665
|
+
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
7666
|
+
return product_card_template(is_placeholder ? null : display, info);
|
|
7667
|
+
},
|
|
7657
7668
|
pre_processors: extra_depict_options?.pre_processors,
|
|
7658
7669
|
post_processors: extra_depict_options?.post_processors
|
|
7659
7670
|
},
|
|
@@ -7685,20 +7696,23 @@ function $79fbf145b15af988$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7685
7696
|
const style_props_ = (0, $46MJV$solidjs.createSignal)({
|
|
7686
7697
|
position: "fixed"
|
|
7687
7698
|
});
|
|
7688
|
-
const { cleanup: align_field_cleanup } = $79fbf145b15af988$var$align_field_modal(style_props_, field, aligner_ref);
|
|
7689
7699
|
const defaultHandler = (0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
7700
|
+
const { cleanup: cleanup } = $79fbf145b15af988$var$align_field_modal(style_props_, field, aligner_ref);
|
|
7701
|
+
const complete_modal_dispose_handler = ()=>{
|
|
7702
|
+
modal_dispose_handler?.();
|
|
7703
|
+
cleanup();
|
|
7704
|
+
};
|
|
7690
7705
|
depict_search.modal_open = [
|
|
7691
7706
|
{
|
|
7692
7707
|
style_props_: style_props_
|
|
7693
7708
|
},
|
|
7694
|
-
|
|
7709
|
+
complete_modal_dispose_handler
|
|
7695
7710
|
];
|
|
7696
7711
|
});
|
|
7697
7712
|
const handler = click_handler ?? defaultHandler;
|
|
7698
7713
|
field.addEventListener("click", handler);
|
|
7699
7714
|
(0, $46MJV$solidjs.onCleanup)(()=>{
|
|
7700
7715
|
field.removeEventListener("click", handler);
|
|
7701
|
-
align_field_cleanup?.();
|
|
7702
7716
|
});
|
|
7703
7717
|
}
|
|
7704
7718
|
});
|
|
@@ -7713,18 +7727,23 @@ function $79fbf145b15af988$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7713
7727
|
}, "SearchField failed");
|
|
7714
7728
|
}
|
|
7715
7729
|
function $79fbf145b15af988$var$align_field_modal(style_props_, input, aligner_ref) {
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
}
|
|
7727
|
-
|
|
7730
|
+
return (0, $46MJV$solidjs.createRoot)((dispose)=>{
|
|
7731
|
+
if (aligner_ref) {
|
|
7732
|
+
const { cleanup: cleanup } = (0, $94360f5c066c55b9$export$bec48a3a3ca6bc09)(aligner_ref);
|
|
7733
|
+
(0, $67b60b572b7b7059$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7734
|
+
return {
|
|
7735
|
+
cleanup: ()=>{
|
|
7736
|
+
cleanup();
|
|
7737
|
+
dispose();
|
|
7738
|
+
}
|
|
7739
|
+
};
|
|
7740
|
+
} else {
|
|
7741
|
+
(0, $67b60b572b7b7059$export$b3ad617e9036868)(style_props_, input);
|
|
7742
|
+
return {
|
|
7743
|
+
cleanup: dispose
|
|
7744
|
+
};
|
|
7745
|
+
}
|
|
7746
|
+
});
|
|
7728
7747
|
}
|
|
7729
7748
|
|
|
7730
7749
|
|
package/dist/module.js
CHANGED
|
@@ -3,7 +3,7 @@ import {template as $g9l4l$template, insert as $g9l4l$insert, effect as $g9l4l$e
|
|
|
3
3
|
import {createSignal as $g9l4l$createSignal, onCleanup as $g9l4l$onCleanup, createComputed as $g9l4l$createComputed, createEffect as $g9l4l$createEffect, untrack as $g9l4l$untrack, batch as $g9l4l$batch, createResource as $g9l4l$createResource, createMemo as $g9l4l$createMemo, Show as $g9l4l$Show, createRenderEffect as $g9l4l$createRenderEffect, runWithOwner as $g9l4l$runWithOwner, createRoot as $g9l4l$createRoot, getOwner as $g9l4l$getOwner, on as $g9l4l$on, Index as $g9l4l$Index, For as $g9l4l$For, ErrorBoundary as $g9l4l$ErrorBoundary} from "solid-js";
|
|
4
4
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
|
-
const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.
|
|
6
|
+
const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.44";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -837,7 +837,10 @@ function $57363319986950eb$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
837
837
|
query_base_: query_base_,
|
|
838
838
|
observe_for_counting_: observe_for_counting_,
|
|
839
839
|
start_cursor_: current_cursor
|
|
840
|
-
}) : (items)
|
|
840
|
+
}) : function(items) {
|
|
841
|
+
observe_for_counting_(items);
|
|
842
|
+
return items;
|
|
843
|
+
};
|
|
841
844
|
// create owner to run product cards with an Owner, so they know when they've gotten removed
|
|
842
845
|
const [owner_for_cards, dispose_our_cards] = (0, $g9l4l$createRoot)((dispose)=>[
|
|
843
846
|
(0, $g9l4l$getOwner)(),
|
|
@@ -1008,7 +1011,7 @@ async function $57363319986950eb$var$insert_placeholders({ scroll_restoration_da
|
|
|
1008
1011
|
{
|
|
1009
1012
|
page_url: "javascript:void(0)"
|
|
1010
1013
|
}
|
|
1011
|
-
]
|
|
1014
|
+
] // This later gets ignored and turned into `null` by the SDK functions in the @depict-ai/ui package
|
|
1012
1015
|
});
|
|
1013
1016
|
const element = elements?.find((e)=>e instanceof HTMLElement || e instanceof SVGElement);
|
|
1014
1017
|
if (!element) return [];
|
|
@@ -1100,7 +1103,7 @@ function $7d4ae726763dc6bc$export$6c6d7a51fa9aa15d(props) {
|
|
|
1100
1103
|
await expand(0, do_duration);
|
|
1101
1104
|
} else {
|
|
1102
1105
|
const animation = await collapse();
|
|
1103
|
-
animation
|
|
1106
|
+
animation?.addEventListener("finish", (0, $g9l4l$catchify)(()=>details_.open = false));
|
|
1104
1107
|
}
|
|
1105
1108
|
}));
|
|
1106
1109
|
details_.addEventListener("toggle", (0, $g9l4l$catchify)(()=>{
|
|
@@ -5020,7 +5023,10 @@ function $ec52ef1e6c117813$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5020
5023
|
...grid_spacing_override
|
|
5021
5024
|
},
|
|
5022
5025
|
rr_options_: {
|
|
5023
|
-
template:
|
|
5026
|
+
template: (display, info)=>{
|
|
5027
|
+
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
5028
|
+
return product_card_template(is_placeholder ? null : display, info);
|
|
5029
|
+
}
|
|
5024
5030
|
}
|
|
5025
5031
|
});
|
|
5026
5032
|
}, "Entire CategoryPage failed");
|
|
@@ -5477,12 +5483,14 @@ function $aee0c68312d971f4$export$7de92c4c2205ebf3({ depict_api_: depict_api_ ,
|
|
|
5477
5483
|
const rendering_result = await (await (0, $g9l4l$make_placeholder_rr)({
|
|
5478
5484
|
// render the max amount of elements that there could be, to make sure scroll restoration works (placeholders can't be shorter than actual content)
|
|
5479
5485
|
num_items: (0, $9679915780ee67c0$export$6c9030e511152266) + (0, $g9l4l$untrack)(get_showing_recommendation_rows) * Math.max(...layout_options_.cols_at_size.map(([per_column])=>per_column))
|
|
5480
|
-
}))(tenant_object_,
|
|
5486
|
+
}))(tenant_object_, // @ts-ignore - make_placeholder_rr types is a touchy subject
|
|
5487
|
+
{
|
|
5481
5488
|
type: "search_recs",
|
|
5482
5489
|
recs: recs_promise,
|
|
5483
5490
|
...rr_options_,
|
|
5484
5491
|
...typeof rr_options_.template === "function" ? {
|
|
5485
5492
|
template: (...args)=>(0, $g9l4l$runWithOwner)(owner_for_cards, ()=>// give template the possibility to know when it gets removed from the DOM by using solid-js onCleanup
|
|
5493
|
+
// @ts-ignore
|
|
5486
5494
|
rr_options_.template(...args))
|
|
5487
5495
|
} : {}
|
|
5488
5496
|
});
|
|
@@ -5642,7 +5650,7 @@ function $4d62f5daa51642fe$export$84bba84a7b837187(search_query) {
|
|
|
5642
5650
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
5643
5651
|
}));
|
|
5644
5652
|
(0, $g9l4l$createComputed)((0, $g9l4l$catchify)(()=>{
|
|
5645
|
-
const searches = (0, $g9l4l$untrack)(
|
|
5653
|
+
const searches = (0, $g9l4l$untrack)(read_previous_searches);
|
|
5646
5654
|
const current_query = read_search_query();
|
|
5647
5655
|
if (!current_query) // don't save no query in history
|
|
5648
5656
|
return;
|
|
@@ -7622,7 +7630,10 @@ function $540e930c58500cbe$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7622
7630
|
width_: 6.46
|
|
7623
7631
|
}),
|
|
7624
7632
|
rr_options_: {
|
|
7625
|
-
template:
|
|
7633
|
+
template: (display, info)=>{
|
|
7634
|
+
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
7635
|
+
return product_card_template(is_placeholder ? null : display, info);
|
|
7636
|
+
},
|
|
7626
7637
|
pre_processors: extra_depict_options?.pre_processors,
|
|
7627
7638
|
post_processors: extra_depict_options?.post_processors
|
|
7628
7639
|
},
|
|
@@ -7654,20 +7665,23 @@ function $540e930c58500cbe$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7654
7665
|
const style_props_ = (0, $g9l4l$createSignal)({
|
|
7655
7666
|
position: "fixed"
|
|
7656
7667
|
});
|
|
7657
|
-
const { cleanup: align_field_cleanup } = $540e930c58500cbe$var$align_field_modal(style_props_, field, aligner_ref);
|
|
7658
7668
|
const defaultHandler = (0, $g9l4l$catchify)(()=>{
|
|
7669
|
+
const { cleanup: cleanup } = $540e930c58500cbe$var$align_field_modal(style_props_, field, aligner_ref);
|
|
7670
|
+
const complete_modal_dispose_handler = ()=>{
|
|
7671
|
+
modal_dispose_handler?.();
|
|
7672
|
+
cleanup();
|
|
7673
|
+
};
|
|
7659
7674
|
depict_search.modal_open = [
|
|
7660
7675
|
{
|
|
7661
7676
|
style_props_: style_props_
|
|
7662
7677
|
},
|
|
7663
|
-
|
|
7678
|
+
complete_modal_dispose_handler
|
|
7664
7679
|
];
|
|
7665
7680
|
});
|
|
7666
7681
|
const handler = click_handler ?? defaultHandler;
|
|
7667
7682
|
field.addEventListener("click", handler);
|
|
7668
7683
|
(0, $g9l4l$onCleanup)(()=>{
|
|
7669
7684
|
field.removeEventListener("click", handler);
|
|
7670
|
-
align_field_cleanup?.();
|
|
7671
7685
|
});
|
|
7672
7686
|
}
|
|
7673
7687
|
});
|
|
@@ -7682,18 +7696,23 @@ function $540e930c58500cbe$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7682
7696
|
}, "SearchField failed");
|
|
7683
7697
|
}
|
|
7684
7698
|
function $540e930c58500cbe$var$align_field_modal(style_props_, input, aligner_ref) {
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
}
|
|
7696
|
-
|
|
7699
|
+
return (0, $g9l4l$createRoot)((dispose)=>{
|
|
7700
|
+
if (aligner_ref) {
|
|
7701
|
+
const { cleanup: cleanup } = (0, $9783d52321be38fe$export$bec48a3a3ca6bc09)(aligner_ref);
|
|
7702
|
+
(0, $079defea521d5e2a$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7703
|
+
return {
|
|
7704
|
+
cleanup: ()=>{
|
|
7705
|
+
cleanup();
|
|
7706
|
+
dispose();
|
|
7707
|
+
}
|
|
7708
|
+
};
|
|
7709
|
+
} else {
|
|
7710
|
+
(0, $079defea521d5e2a$export$b3ad617e9036868)(style_props_, input);
|
|
7711
|
+
return {
|
|
7712
|
+
cleanup: dispose
|
|
7713
|
+
};
|
|
7714
|
+
}
|
|
7715
|
+
});
|
|
7697
7716
|
}
|
|
7698
7717
|
|
|
7699
7718
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": [
|
|
6
6
|
"src/index.ts",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"ts-jest": "^29.0.3"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@depict-ai/utilishared": "^0.0.
|
|
85
|
+
"@depict-ai/utilishared": "^0.0.42",
|
|
86
86
|
"solid-js": "^1.6.2"
|
|
87
87
|
},
|
|
88
88
|
"types": "dist/index.d.ts"
|