@depict-ai/ui 0.0.41 → 0.0.42
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 +9 -1
- package/dist/main.js +50 -20
- package/dist/module.js +50 -21
- 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.42";
|
|
13
13
|
type ExclusiveId = {
|
|
14
14
|
categoryId: string;
|
|
15
15
|
productId?: undefined;
|
|
@@ -292,6 +292,14 @@ export type RenderCategorySuggestion = (category_suggestion: Accessor<CategorySu
|
|
|
292
292
|
op: WithRequired<SearchFilter, "op">["op"];
|
|
293
293
|
data: WithRequired<SearchFilter, "data">["data"];
|
|
294
294
|
}[]>) => JSX.Element;
|
|
295
|
+
/**
|
|
296
|
+
* Connects the height of the query input to the height of the aligner.
|
|
297
|
+
* @param aligner
|
|
298
|
+
* @returns
|
|
299
|
+
*/
|
|
300
|
+
export function connect_query_input_height_to_aligner_height(aligner: HTMLElement): {
|
|
301
|
+
cleanup: () => void;
|
|
302
|
+
};
|
|
295
303
|
type ConstructorOptions = {
|
|
296
304
|
search_query_url_param_name?: string;
|
|
297
305
|
market: string;
|
package/dist/main.js
CHANGED
|
@@ -30,10 +30,11 @@ $parcel$export(module.exports, "media_query_to_accessor", () => $beec9d22e42ed2c
|
|
|
30
30
|
$parcel$export(module.exports, "setup_fast_leave", () => $d589470b68ce5b67$export$689e204eadb33baf);
|
|
31
31
|
$parcel$export(module.exports, "show_toast", () => $b3e6a0e9382bf87e$export$5196e4c01fa56fcb);
|
|
32
32
|
$parcel$export(module.exports, "solid_format_price", () => $5fc9fc23df1591db$export$469c7af753d08925);
|
|
33
|
+
$parcel$export(module.exports, "connect_query_input_height_to_aligner_height", () => $94360f5c066c55b9$export$bec48a3a3ca6bc09);
|
|
33
34
|
$parcel$export(module.exports, "PageReplacer", () => $37e96a5ebc768cc7$export$3ccaa27d81dd8556);
|
|
34
35
|
$parcel$export(module.exports, "version", () => $ae93561d5649a847$export$83d89fbfd8236492);
|
|
35
36
|
/*! Depict.ai search and product listing SDK */
|
|
36
|
-
const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.
|
|
37
|
+
const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.42";
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
|
|
@@ -7343,6 +7344,29 @@ function $93779a41dce11249$export$a54ec244c8863715(opts) {
|
|
|
7343
7344
|
|
|
7344
7345
|
|
|
7345
7346
|
|
|
7347
|
+
|
|
7348
|
+
function $94360f5c066c55b9$export$bec48a3a3ca6bc09(aligner) {
|
|
7349
|
+
const style_element = document.createElement("style");
|
|
7350
|
+
document.head.append(style_element);
|
|
7351
|
+
const resize_observer = new ResizeObserver((0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
7352
|
+
const styles = (0, $d3c94b3b96557917$export$1233ca167bf71f9a)({
|
|
7353
|
+
".depict.plp .depict-search-modal .query-input": {
|
|
7354
|
+
"height": `${aligner?.clientHeight}px`
|
|
7355
|
+
}
|
|
7356
|
+
});
|
|
7357
|
+
style_element.replaceChildren(styles);
|
|
7358
|
+
}));
|
|
7359
|
+
resize_observer.observe(aligner);
|
|
7360
|
+
const cleanup = ()=>{
|
|
7361
|
+
resize_observer.disconnect();
|
|
7362
|
+
style_element.remove();
|
|
7363
|
+
};
|
|
7364
|
+
return {
|
|
7365
|
+
cleanup: cleanup
|
|
7366
|
+
};
|
|
7367
|
+
}
|
|
7368
|
+
|
|
7369
|
+
|
|
7346
7370
|
const $79fbf145b15af988$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$46MJV$solidjsweb.template)(`<div class="depict plp search"></div>`, 2);
|
|
7347
7371
|
/**
|
|
7348
7372
|
* Type for the private properties that are shared between the different exported search SDK wrapper functions. SDK users are not allowed to change/access these, they're an internal implementation detail.
|
|
@@ -7658,7 +7682,11 @@ function $79fbf145b15af988$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7658
7682
|
},
|
|
7659
7683
|
disabled_: true,
|
|
7660
7684
|
field_element_ref_: (field)=>{
|
|
7661
|
-
const
|
|
7685
|
+
const style_props_ = (0, $46MJV$solidjs.createSignal)({
|
|
7686
|
+
position: "fixed"
|
|
7687
|
+
});
|
|
7688
|
+
const { cleanup: align_field_cleanup } = $79fbf145b15af988$var$align_field_modal(style_props_, field, aligner_ref);
|
|
7689
|
+
const defaultHandler = (0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
7662
7690
|
depict_search.modal_open = [
|
|
7663
7691
|
{
|
|
7664
7692
|
style_props_: style_props_
|
|
@@ -7666,27 +7694,14 @@ function $79fbf145b15af988$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7666
7694
|
modal_dispose_handler
|
|
7667
7695
|
];
|
|
7668
7696
|
});
|
|
7697
|
+
const handler = click_handler ?? defaultHandler;
|
|
7669
7698
|
field.addEventListener("click", handler);
|
|
7670
|
-
(0, $46MJV$solidjs.onCleanup)(()=>
|
|
7699
|
+
(0, $46MJV$solidjs.onCleanup)(()=>{
|
|
7700
|
+
field.removeEventListener("click", handler);
|
|
7701
|
+
align_field_cleanup?.();
|
|
7702
|
+
});
|
|
7671
7703
|
}
|
|
7672
7704
|
});
|
|
7673
|
-
const style_props_ = (0, $46MJV$solidjs.createSignal)({
|
|
7674
|
-
position: "fixed"
|
|
7675
|
-
});
|
|
7676
|
-
if (aligner_ref) {
|
|
7677
|
-
const style_element = document.createElement("style");
|
|
7678
|
-
document.head.append(style_element);
|
|
7679
|
-
const resize_observer = new ResizeObserver((0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
7680
|
-
const styles = (0, $d3c94b3b96557917$export$1233ca167bf71f9a)({
|
|
7681
|
-
".depict.plp .depict-search-modal .query-input": {
|
|
7682
|
-
"height": `${aligner_ref?.clientHeight}px`
|
|
7683
|
-
}
|
|
7684
|
-
});
|
|
7685
|
-
style_element.replaceChildren(styles);
|
|
7686
|
-
}));
|
|
7687
|
-
resize_observer.observe(aligner_ref);
|
|
7688
|
-
(0, $67b60b572b7b7059$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7689
|
-
} else (0, $67b60b572b7b7059$export$b3ad617e9036868)(style_props_, input);
|
|
7690
7705
|
return [
|
|
7691
7706
|
(()=>{
|
|
7692
7707
|
const _el$ = $79fbf145b15af988$var$_tmpl$.cloneNode(true);
|
|
@@ -7697,6 +7712,20 @@ function $79fbf145b15af988$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7697
7712
|
];
|
|
7698
7713
|
}, "SearchField failed");
|
|
7699
7714
|
}
|
|
7715
|
+
function $79fbf145b15af988$var$align_field_modal(style_props_, input, aligner_ref) {
|
|
7716
|
+
if (aligner_ref) {
|
|
7717
|
+
const { cleanup: cleanup } = (0, $94360f5c066c55b9$export$bec48a3a3ca6bc09)(aligner_ref);
|
|
7718
|
+
(0, $67b60b572b7b7059$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7719
|
+
return {
|
|
7720
|
+
cleanup: cleanup
|
|
7721
|
+
};
|
|
7722
|
+
} else {
|
|
7723
|
+
(0, $67b60b572b7b7059$export$b3ad617e9036868)(style_props_, input);
|
|
7724
|
+
return {
|
|
7725
|
+
cleanup: null
|
|
7726
|
+
};
|
|
7727
|
+
}
|
|
7728
|
+
}
|
|
7700
7729
|
|
|
7701
7730
|
|
|
7702
7731
|
|
|
@@ -7757,6 +7786,7 @@ function $d589470b68ce5b67$export$689e204eadb33baf(pr) {
|
|
|
7757
7786
|
|
|
7758
7787
|
|
|
7759
7788
|
|
|
7789
|
+
|
|
7760
7790
|
class $37e96a5ebc768cc7$export$3ccaa27d81dd8556 extends EventTarget {
|
|
7761
7791
|
#stop_listening;
|
|
7762
7792
|
#disconnect_observer;
|
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.42";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -7313,6 +7313,29 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
|
|
|
7313
7313
|
|
|
7314
7314
|
|
|
7315
7315
|
|
|
7316
|
+
|
|
7317
|
+
function $9783d52321be38fe$export$bec48a3a3ca6bc09(aligner) {
|
|
7318
|
+
const style_element = document.createElement("style");
|
|
7319
|
+
document.head.append(style_element);
|
|
7320
|
+
const resize_observer = new ResizeObserver((0, $g9l4l$catchify)(()=>{
|
|
7321
|
+
const styles = (0, $246aa49a8f85c7f3$export$1233ca167bf71f9a)({
|
|
7322
|
+
".depict.plp .depict-search-modal .query-input": {
|
|
7323
|
+
"height": `${aligner?.clientHeight}px`
|
|
7324
|
+
}
|
|
7325
|
+
});
|
|
7326
|
+
style_element.replaceChildren(styles);
|
|
7327
|
+
}));
|
|
7328
|
+
resize_observer.observe(aligner);
|
|
7329
|
+
const cleanup = ()=>{
|
|
7330
|
+
resize_observer.disconnect();
|
|
7331
|
+
style_element.remove();
|
|
7332
|
+
};
|
|
7333
|
+
return {
|
|
7334
|
+
cleanup: cleanup
|
|
7335
|
+
};
|
|
7336
|
+
}
|
|
7337
|
+
|
|
7338
|
+
|
|
7316
7339
|
const $540e930c58500cbe$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="depict plp search"></div>`, 2);
|
|
7317
7340
|
/**
|
|
7318
7341
|
* Type for the private properties that are shared between the different exported search SDK wrapper functions. SDK users are not allowed to change/access these, they're an internal implementation detail.
|
|
@@ -7628,7 +7651,11 @@ function $540e930c58500cbe$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7628
7651
|
},
|
|
7629
7652
|
disabled_: true,
|
|
7630
7653
|
field_element_ref_: (field)=>{
|
|
7631
|
-
const
|
|
7654
|
+
const style_props_ = (0, $g9l4l$createSignal)({
|
|
7655
|
+
position: "fixed"
|
|
7656
|
+
});
|
|
7657
|
+
const { cleanup: align_field_cleanup } = $540e930c58500cbe$var$align_field_modal(style_props_, field, aligner_ref);
|
|
7658
|
+
const defaultHandler = (0, $g9l4l$catchify)(()=>{
|
|
7632
7659
|
depict_search.modal_open = [
|
|
7633
7660
|
{
|
|
7634
7661
|
style_props_: style_props_
|
|
@@ -7636,27 +7663,14 @@ function $540e930c58500cbe$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7636
7663
|
modal_dispose_handler
|
|
7637
7664
|
];
|
|
7638
7665
|
});
|
|
7666
|
+
const handler = click_handler ?? defaultHandler;
|
|
7639
7667
|
field.addEventListener("click", handler);
|
|
7640
|
-
(0, $g9l4l$onCleanup)(()=>
|
|
7668
|
+
(0, $g9l4l$onCleanup)(()=>{
|
|
7669
|
+
field.removeEventListener("click", handler);
|
|
7670
|
+
align_field_cleanup?.();
|
|
7671
|
+
});
|
|
7641
7672
|
}
|
|
7642
7673
|
});
|
|
7643
|
-
const style_props_ = (0, $g9l4l$createSignal)({
|
|
7644
|
-
position: "fixed"
|
|
7645
|
-
});
|
|
7646
|
-
if (aligner_ref) {
|
|
7647
|
-
const style_element = document.createElement("style");
|
|
7648
|
-
document.head.append(style_element);
|
|
7649
|
-
const resize_observer = new ResizeObserver((0, $g9l4l$catchify)(()=>{
|
|
7650
|
-
const styles = (0, $246aa49a8f85c7f3$export$1233ca167bf71f9a)({
|
|
7651
|
-
".depict.plp .depict-search-modal .query-input": {
|
|
7652
|
-
"height": `${aligner_ref?.clientHeight}px`
|
|
7653
|
-
}
|
|
7654
|
-
});
|
|
7655
|
-
style_element.replaceChildren(styles);
|
|
7656
|
-
}));
|
|
7657
|
-
resize_observer.observe(aligner_ref);
|
|
7658
|
-
(0, $079defea521d5e2a$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7659
|
-
} else (0, $079defea521d5e2a$export$b3ad617e9036868)(style_props_, input);
|
|
7660
7674
|
return [
|
|
7661
7675
|
(()=>{
|
|
7662
7676
|
const _el$ = $540e930c58500cbe$var$_tmpl$.cloneNode(true);
|
|
@@ -7667,6 +7681,20 @@ function $540e930c58500cbe$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7667
7681
|
];
|
|
7668
7682
|
}, "SearchField failed");
|
|
7669
7683
|
}
|
|
7684
|
+
function $540e930c58500cbe$var$align_field_modal(style_props_, input, aligner_ref) {
|
|
7685
|
+
if (aligner_ref) {
|
|
7686
|
+
const { cleanup: cleanup } = (0, $9783d52321be38fe$export$bec48a3a3ca6bc09)(aligner_ref);
|
|
7687
|
+
(0, $079defea521d5e2a$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7688
|
+
return {
|
|
7689
|
+
cleanup: cleanup
|
|
7690
|
+
};
|
|
7691
|
+
} else {
|
|
7692
|
+
(0, $079defea521d5e2a$export$b3ad617e9036868)(style_props_, input);
|
|
7693
|
+
return {
|
|
7694
|
+
cleanup: null
|
|
7695
|
+
};
|
|
7696
|
+
}
|
|
7697
|
+
}
|
|
7670
7698
|
|
|
7671
7699
|
|
|
7672
7700
|
|
|
@@ -7727,6 +7755,7 @@ function $36316d7b4c897a03$export$689e204eadb33baf(pr) {
|
|
|
7727
7755
|
|
|
7728
7756
|
|
|
7729
7757
|
|
|
7758
|
+
|
|
7730
7759
|
class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
|
|
7731
7760
|
#stop_listening;
|
|
7732
7761
|
#disconnect_observer;
|
|
@@ -7827,4 +7856,4 @@ class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7827
7856
|
(0, $g9l4l$dlog)("@depict-ai/ui version", (0, $18bf1d29fb889cca$export$83d89fbfd8236492));
|
|
7828
7857
|
|
|
7829
7858
|
|
|
7830
|
-
export {$e95f1855a5e3864f$export$58e808b1db15d3bc as fetchDepictRecommendations, $ec52ef1e6c117813$export$de035477d6fef996 as QuickLinks, $ec52ef1e6c117813$export$5b7c3ce0ebe51f86 as BreadCrumbs, $6340962f8bafd049$export$b91cec6bdc6b32a1 as CategoryTitle, $9b693ea3ff420de6$export$824dde41348efed1 as embedded_num_products, $80a49d3809ecb080$export$643598a327b5833e as get_categories, $ec52ef1e6c117813$export$f34314aa9505732e as DepictCategory, $ec52ef1e6c117813$export$e2bf8ce7779e827e as CategoryPage, $540e930c58500cbe$export$ac6237957a15b3f0 as DepictSearch, $540e930c58500cbe$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $540e930c58500cbe$export$f2dc7e4e4aa11abb as SearchPage, $540e930c58500cbe$export$b94867ecbd698f21 as SearchField, $aaacfac0064e97d9$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $079defea521d5e2a$export$b3ad617e9036868 as align_field, $246aa49a8f85c7f3$export$1233ca167bf71f9a as styles_to_valid_css_string, $a1123c5ed9b0ee29$export$fe334901e8bebd57 as disable_scrolling, $a3e81b85527bc866$export$d0596b5cae35ad4 as open_search_with_shift_slash, $972ebf2641490830$export$26df08e242fe83a3 as push_state_with_query_param_value, $3846bb34098c738f$export$e015ed2f2950f2e3 as DepictAPI, $f22123a20b6b80b3$export$2cefb7e61fcbae00 as add_to_version_info, $fefe7683325039b3$export$d9f36cf74e24d595 as media_query_to_accessor, $36316d7b4c897a03$export$689e204eadb33baf as setup_fast_leave, $886fa987db4f3805$export$5196e4c01fa56fcb as show_toast, $5178263ed1e394ca$export$469c7af753d08925 as solid_format_price, $ba6c9609228edf6b$export$3ccaa27d81dd8556 as PageReplacer, $18bf1d29fb889cca$export$83d89fbfd8236492 as version};
|
|
7859
|
+
export {$e95f1855a5e3864f$export$58e808b1db15d3bc as fetchDepictRecommendations, $ec52ef1e6c117813$export$de035477d6fef996 as QuickLinks, $ec52ef1e6c117813$export$5b7c3ce0ebe51f86 as BreadCrumbs, $6340962f8bafd049$export$b91cec6bdc6b32a1 as CategoryTitle, $9b693ea3ff420de6$export$824dde41348efed1 as embedded_num_products, $80a49d3809ecb080$export$643598a327b5833e as get_categories, $ec52ef1e6c117813$export$f34314aa9505732e as DepictCategory, $ec52ef1e6c117813$export$e2bf8ce7779e827e as CategoryPage, $540e930c58500cbe$export$ac6237957a15b3f0 as DepictSearch, $540e930c58500cbe$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $540e930c58500cbe$export$f2dc7e4e4aa11abb as SearchPage, $540e930c58500cbe$export$b94867ecbd698f21 as SearchField, $aaacfac0064e97d9$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $079defea521d5e2a$export$b3ad617e9036868 as align_field, $246aa49a8f85c7f3$export$1233ca167bf71f9a as styles_to_valid_css_string, $a1123c5ed9b0ee29$export$fe334901e8bebd57 as disable_scrolling, $a3e81b85527bc866$export$d0596b5cae35ad4 as open_search_with_shift_slash, $972ebf2641490830$export$26df08e242fe83a3 as push_state_with_query_param_value, $3846bb34098c738f$export$e015ed2f2950f2e3 as DepictAPI, $f22123a20b6b80b3$export$2cefb7e61fcbae00 as add_to_version_info, $fefe7683325039b3$export$d9f36cf74e24d595 as media_query_to_accessor, $36316d7b4c897a03$export$689e204eadb33baf as setup_fast_leave, $886fa987db4f3805$export$5196e4c01fa56fcb as show_toast, $5178263ed1e394ca$export$469c7af753d08925 as solid_format_price, $9783d52321be38fe$export$bec48a3a3ca6bc09 as connect_query_input_height_to_aligner_height, $ba6c9609228edf6b$export$3ccaa27d81dd8556 as PageReplacer, $18bf1d29fb889cca$export$83d89fbfd8236492 as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
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.40",
|
|
86
86
|
"solid-js": "^1.6.2"
|
|
87
87
|
},
|
|
88
88
|
"types": "dist/index.d.ts"
|