@depict-ai/ui 0.0.44 → 0.0.45
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 +3 -3
- package/dist/main.js +8 -4
- package/dist/module.js +8 -4
- 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.45";
|
|
13
13
|
type ExclusiveId = {
|
|
14
14
|
categoryId: string;
|
|
15
15
|
productId?: undefined;
|
|
@@ -235,7 +235,7 @@ type DepictCategoryConstructorOptions = {
|
|
|
235
235
|
market: string;
|
|
236
236
|
merchant: string;
|
|
237
237
|
localization: category_i18n;
|
|
238
|
-
on_navigation?: (
|
|
238
|
+
on_navigation?: (relative_url: string, ev: MouseEvent, display: BaseCategoryDisplay) => unknown;
|
|
239
239
|
api?: DepictAPI;
|
|
240
240
|
};
|
|
241
241
|
export class DepictCategory {
|
|
@@ -305,7 +305,7 @@ type ConstructorOptions<T extends Display> = {
|
|
|
305
305
|
market: string;
|
|
306
306
|
merchant: string;
|
|
307
307
|
localization: search_i18n;
|
|
308
|
-
on_navigation?: (
|
|
308
|
+
on_navigation?: (relative_url: string) => unknown;
|
|
309
309
|
url_transformer?: (url_object: URL) => unknown;
|
|
310
310
|
enable_category_suggestions?: boolean;
|
|
311
311
|
disable_scrolling_during_modal?: boolean;
|
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.45";
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -4991,7 +4991,9 @@ class $068a627cc18f7bb6$export$f34314aa9505732e {
|
|
|
4991
4991
|
if (e.button || e.metaKey || e.ctrlKey) // Not single page navigating because button is not 0 or ctrl/command click
|
|
4992
4992
|
return;
|
|
4993
4993
|
try {
|
|
4994
|
-
|
|
4994
|
+
const url_object = new URL(d.page_url);
|
|
4995
|
+
const relative_url = url_object.pathname + url_object.search + url_object.hash;
|
|
4996
|
+
on_navigation(relative_url, e, d);
|
|
4995
4997
|
e.preventDefault();
|
|
4996
4998
|
} catch (e) {
|
|
4997
4999
|
queueMicrotask(()=>{
|
|
@@ -7391,10 +7393,12 @@ class $79fbf145b15af988$export$ac6237957a15b3f0 {
|
|
|
7391
7393
|
disable_scrolling_during_modal = true , api: api , bottom_distance_under_modal_: bottom_distance_under_modal_ , render_instant_card: render_instant_card , ...props_on_class }){
|
|
7392
7394
|
if ($79fbf145b15af988$export$ac6237957a15b3f0.#has_been_constructed) throw new Error("You can only have one instance of DepictSearch");
|
|
7393
7395
|
Object.assign(this, props_on_class);
|
|
7394
|
-
const on_navigation = raw_on_navigation && ((
|
|
7396
|
+
const on_navigation = raw_on_navigation && ((absolute_href)=>{
|
|
7397
|
+
const u_o = new URL(absolute_href);
|
|
7398
|
+
const relative_href = u_o.pathname + u_o.search + u_o.hash;
|
|
7395
7399
|
// make sure that we don't accidentally catchify if the SDK consumer has fucked up
|
|
7396
7400
|
try {
|
|
7397
|
-
return raw_on_navigation(
|
|
7401
|
+
return raw_on_navigation(relative_href);
|
|
7398
7402
|
} catch (e) {
|
|
7399
7403
|
queueMicrotask(()=>{
|
|
7400
7404
|
throw e;
|
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.45";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -4960,7 +4960,9 @@ class $ec52ef1e6c117813$export$f34314aa9505732e {
|
|
|
4960
4960
|
if (e.button || e.metaKey || e.ctrlKey) // Not single page navigating because button is not 0 or ctrl/command click
|
|
4961
4961
|
return;
|
|
4962
4962
|
try {
|
|
4963
|
-
|
|
4963
|
+
const url_object = new URL(d.page_url);
|
|
4964
|
+
const relative_url = url_object.pathname + url_object.search + url_object.hash;
|
|
4965
|
+
on_navigation(relative_url, e, d);
|
|
4964
4966
|
e.preventDefault();
|
|
4965
4967
|
} catch (e) {
|
|
4966
4968
|
queueMicrotask(()=>{
|
|
@@ -7360,10 +7362,12 @@ class $540e930c58500cbe$export$ac6237957a15b3f0 {
|
|
|
7360
7362
|
disable_scrolling_during_modal = true , api: api , bottom_distance_under_modal_: bottom_distance_under_modal_ , render_instant_card: render_instant_card , ...props_on_class }){
|
|
7361
7363
|
if ($540e930c58500cbe$export$ac6237957a15b3f0.#has_been_constructed) throw new Error("You can only have one instance of DepictSearch");
|
|
7362
7364
|
Object.assign(this, props_on_class);
|
|
7363
|
-
const on_navigation = raw_on_navigation && ((
|
|
7365
|
+
const on_navigation = raw_on_navigation && ((absolute_href)=>{
|
|
7366
|
+
const u_o = new URL(absolute_href);
|
|
7367
|
+
const relative_href = u_o.pathname + u_o.search + u_o.hash;
|
|
7364
7368
|
// make sure that we don't accidentally catchify if the SDK consumer has fucked up
|
|
7365
7369
|
try {
|
|
7366
|
-
return raw_on_navigation(
|
|
7370
|
+
return raw_on_navigation(relative_href);
|
|
7367
7371
|
} catch (e) {
|
|
7368
7372
|
queueMicrotask(()=>{
|
|
7369
7373
|
throw e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.45",
|
|
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.43",
|
|
86
86
|
"solid-js": "^1.6.2"
|
|
87
87
|
},
|
|
88
88
|
"types": "dist/index.d.ts"
|