@depict-ai/ui 4.1.3 → 4.1.4
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/ES10/index.cjs +12 -5
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +12 -5
- package/latest/index.cjs +12 -5
- package/latest/index.d.ts +1 -1
- package/latest/index.js +12 -5
- package/package.json +1 -1
- package/server/ES10/index.cjs +12 -5
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +12 -5
- package/server/latest/index.cjs +12 -5
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +12 -5
package/ES10/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
98
98
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
99
99
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
100
100
|
/*! Depict.ai search and product listing SDK */
|
|
101
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.
|
|
101
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.4";
|
|
102
102
|
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
103
103
|
let $cfcd56242923775d$var$has_ran = false;
|
|
104
104
|
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
@@ -2649,7 +2649,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
2649
2649
|
src: src,
|
|
2650
2650
|
customGenerateImageUrl_: customGenerateImageUrl_
|
|
2651
2651
|
} = props;
|
|
2652
|
-
const fallback_src = (customGenerateImageUrl_ || $858fdcf73148519f$
|
|
2652
|
+
const fallback_src = (customGenerateImageUrl_ || $858fdcf73148519f$export$1d6267828870adda)(src, 400);
|
|
2653
2653
|
const srcset = $858fdcf73148519f$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
|
|
2654
2654
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
2655
2655
|
return {
|
|
@@ -2791,9 +2791,9 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
2791
2791
|
});
|
|
2792
2792
|
}
|
|
2793
2793
|
function $858fdcf73148519f$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2794
|
-
return resolutions.map(width => "".concat((customGenerateImageUrl_ || $858fdcf73148519f$
|
|
2794
|
+
return resolutions.map(width => "".concat((customGenerateImageUrl_ || $858fdcf73148519f$export$1d6267828870adda)(url, width), " ").concat(width, "w")).join(", ");
|
|
2795
2795
|
}
|
|
2796
|
-
function $858fdcf73148519f$
|
|
2796
|
+
function $858fdcf73148519f$export$1d6267828870adda(url, width) {
|
|
2797
2797
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2798
2798
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2799
2799
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2861,7 +2861,14 @@ function $9e470232a6b789a3$export$9d4a4b669b1929ab(props) {
|
|
|
2861
2861
|
return {
|
|
2862
2862
|
...props.imgProps,
|
|
2863
2863
|
customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
|
|
2864
|
-
) =>
|
|
2864
|
+
) => {
|
|
2865
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2866
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2867
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2868
|
+
return $858fdcf73148519f$export$1d6267828870adda(url, width);
|
|
2869
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2870
|
+
return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
|
|
2871
|
+
}
|
|
2865
2872
|
};
|
|
2866
2873
|
}
|
|
2867
2874
|
}));
|
package/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.1.
|
|
13
|
+
export const version = "4.1.4";
|
|
14
14
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.1.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.1.4";
|
|
14
14
|
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
15
15
|
let $68e6625c8d51f847$var$has_ran = false;
|
|
16
16
|
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
@@ -2561,7 +2561,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
2561
2561
|
src: src,
|
|
2562
2562
|
customGenerateImageUrl_: customGenerateImageUrl_
|
|
2563
2563
|
} = props;
|
|
2564
|
-
const fallback_src = (customGenerateImageUrl_ || $56047603f9d212b6$
|
|
2564
|
+
const fallback_src = (customGenerateImageUrl_ || $56047603f9d212b6$export$1d6267828870adda)(src, 400);
|
|
2565
2565
|
const srcset = $56047603f9d212b6$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
|
|
2566
2566
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
2567
2567
|
return {
|
|
@@ -2703,9 +2703,9 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
2703
2703
|
});
|
|
2704
2704
|
}
|
|
2705
2705
|
function $56047603f9d212b6$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2706
|
-
return resolutions.map(width => "".concat((customGenerateImageUrl_ || $56047603f9d212b6$
|
|
2706
|
+
return resolutions.map(width => "".concat((customGenerateImageUrl_ || $56047603f9d212b6$export$1d6267828870adda)(url, width), " ").concat(width, "w")).join(", ");
|
|
2707
2707
|
}
|
|
2708
|
-
function $56047603f9d212b6$
|
|
2708
|
+
function $56047603f9d212b6$export$1d6267828870adda(url, width) {
|
|
2709
2709
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2710
2710
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2711
2711
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2773,7 +2773,14 @@ function $7fbaab3d3dafb4f5$export$9d4a4b669b1929ab(props) {
|
|
|
2773
2773
|
return {
|
|
2774
2774
|
...props.imgProps,
|
|
2775
2775
|
customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
|
|
2776
|
-
) =>
|
|
2776
|
+
) => {
|
|
2777
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2778
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2779
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2780
|
+
return $56047603f9d212b6$export$1d6267828870adda(url, width);
|
|
2781
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2782
|
+
return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
|
|
2783
|
+
}
|
|
2777
2784
|
};
|
|
2778
2785
|
}
|
|
2779
2786
|
}));
|
package/latest/index.cjs
CHANGED
|
@@ -92,7 +92,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
|
|
|
92
92
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
93
93
|
$parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
|
|
94
94
|
/*! Depict.ai search and product listing SDK */
|
|
95
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.
|
|
95
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.4";
|
|
96
96
|
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
97
97
|
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
98
98
|
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
@@ -2543,7 +2543,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
2543
2543
|
src: src,
|
|
2544
2544
|
customGenerateImageUrl_: customGenerateImageUrl_
|
|
2545
2545
|
} = props;
|
|
2546
|
-
const fallback_src = (customGenerateImageUrl_ || $19950faaac026e09$
|
|
2546
|
+
const fallback_src = (customGenerateImageUrl_ || $19950faaac026e09$export$1d6267828870adda)(src, 400);
|
|
2547
2547
|
const srcset = $19950faaac026e09$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
|
|
2548
2548
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
2549
2549
|
return {
|
|
@@ -2682,9 +2682,9 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
2682
2682
|
});
|
|
2683
2683
|
}
|
|
2684
2684
|
function $19950faaac026e09$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2685
|
-
return resolutions.map(width => `${(customGenerateImageUrl_ || $19950faaac026e09$
|
|
2685
|
+
return resolutions.map(width => `${(customGenerateImageUrl_ || $19950faaac026e09$export$1d6267828870adda)(url, width)} ${width}w`).join(", ");
|
|
2686
2686
|
}
|
|
2687
|
-
function $19950faaac026e09$
|
|
2687
|
+
function $19950faaac026e09$export$1d6267828870adda(url, width) {
|
|
2688
2688
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2689
2689
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2690
2690
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2750,7 +2750,14 @@ function $e8327f98c8ee28d7$export$9d4a4b669b1929ab(props) {
|
|
|
2750
2750
|
return {
|
|
2751
2751
|
...props.imgProps,
|
|
2752
2752
|
customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
|
|
2753
|
-
) =>
|
|
2753
|
+
) => {
|
|
2754
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2755
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2756
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2757
|
+
return $19950faaac026e09$export$1d6267828870adda(url, width);
|
|
2758
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2759
|
+
return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
|
|
2760
|
+
}
|
|
2754
2761
|
};
|
|
2755
2762
|
}
|
|
2756
2763
|
}));
|
package/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.1.
|
|
13
|
+
export const version = "4.1.4";
|
|
14
14
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.1.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.1.4";
|
|
11
11
|
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
12
12
|
let $90980bd87c9960f9$var$has_ran = false;
|
|
13
13
|
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
@@ -2458,7 +2458,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
2458
2458
|
src: src,
|
|
2459
2459
|
customGenerateImageUrl_: customGenerateImageUrl_
|
|
2460
2460
|
} = props;
|
|
2461
|
-
const fallback_src = (customGenerateImageUrl_ || $e8ffe11ed01df0fe$
|
|
2461
|
+
const fallback_src = (customGenerateImageUrl_ || $e8ffe11ed01df0fe$export$1d6267828870adda)(src, 400);
|
|
2462
2462
|
const srcset = $e8ffe11ed01df0fe$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
|
|
2463
2463
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
2464
2464
|
return {
|
|
@@ -2597,9 +2597,9 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
2597
2597
|
});
|
|
2598
2598
|
}
|
|
2599
2599
|
function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2600
|
-
return resolutions.map(width => `${(customGenerateImageUrl_ || $e8ffe11ed01df0fe$
|
|
2600
|
+
return resolutions.map(width => `${(customGenerateImageUrl_ || $e8ffe11ed01df0fe$export$1d6267828870adda)(url, width)} ${width}w`).join(", ");
|
|
2601
2601
|
}
|
|
2602
|
-
function $e8ffe11ed01df0fe$
|
|
2602
|
+
function $e8ffe11ed01df0fe$export$1d6267828870adda(url, width) {
|
|
2603
2603
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2604
2604
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2605
2605
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2665,7 +2665,14 @@ function $4f16612bea257571$export$9d4a4b669b1929ab(props) {
|
|
|
2665
2665
|
return {
|
|
2666
2666
|
...props.imgProps,
|
|
2667
2667
|
customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
|
|
2668
|
-
) =>
|
|
2668
|
+
) => {
|
|
2669
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2670
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2671
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2672
|
+
return $e8ffe11ed01df0fe$export$1d6267828870adda(url, width);
|
|
2673
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2674
|
+
return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
|
|
2675
|
+
}
|
|
2669
2676
|
};
|
|
2670
2677
|
}
|
|
2671
2678
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.4",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
98
98
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
99
99
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
100
100
|
/*! Depict.ai search and product listing SDK */
|
|
101
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.
|
|
101
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.4";
|
|
102
102
|
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
103
103
|
let $cfcd56242923775d$var$has_ran = false;
|
|
104
104
|
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
@@ -2079,7 +2079,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
2079
2079
|
src: src,
|
|
2080
2080
|
customGenerateImageUrl_: customGenerateImageUrl_
|
|
2081
2081
|
} = props;
|
|
2082
|
-
const fallback_src = (customGenerateImageUrl_ || $858fdcf73148519f$
|
|
2082
|
+
const fallback_src = (customGenerateImageUrl_ || $858fdcf73148519f$export$1d6267828870adda)(src, 400);
|
|
2083
2083
|
const srcset = $858fdcf73148519f$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
|
|
2084
2084
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
2085
2085
|
return {
|
|
@@ -2221,9 +2221,9 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
2221
2221
|
});
|
|
2222
2222
|
}
|
|
2223
2223
|
function $858fdcf73148519f$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2224
|
-
return resolutions.map(width => "".concat((customGenerateImageUrl_ || $858fdcf73148519f$
|
|
2224
|
+
return resolutions.map(width => "".concat((customGenerateImageUrl_ || $858fdcf73148519f$export$1d6267828870adda)(url, width), " ").concat(width, "w")).join(", ");
|
|
2225
2225
|
}
|
|
2226
|
-
function $858fdcf73148519f$
|
|
2226
|
+
function $858fdcf73148519f$export$1d6267828870adda(url, width) {
|
|
2227
2227
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2228
2228
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2229
2229
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2291,7 +2291,14 @@ function $9e470232a6b789a3$export$9d4a4b669b1929ab(props) {
|
|
|
2291
2291
|
return {
|
|
2292
2292
|
...props.imgProps,
|
|
2293
2293
|
customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
|
|
2294
|
-
) =>
|
|
2294
|
+
) => {
|
|
2295
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2296
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2297
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2298
|
+
return $858fdcf73148519f$export$1d6267828870adda(url, width);
|
|
2299
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2300
|
+
return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
|
|
2301
|
+
}
|
|
2295
2302
|
};
|
|
2296
2303
|
}
|
|
2297
2304
|
}));
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.1.
|
|
13
|
+
export const version = "4.1.4";
|
|
14
14
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.1.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.1.4";
|
|
14
14
|
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
15
15
|
let $68e6625c8d51f847$var$has_ran = false;
|
|
16
16
|
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
@@ -1991,7 +1991,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1991
1991
|
src: src,
|
|
1992
1992
|
customGenerateImageUrl_: customGenerateImageUrl_
|
|
1993
1993
|
} = props;
|
|
1994
|
-
const fallback_src = (customGenerateImageUrl_ || $56047603f9d212b6$
|
|
1994
|
+
const fallback_src = (customGenerateImageUrl_ || $56047603f9d212b6$export$1d6267828870adda)(src, 400);
|
|
1995
1995
|
const srcset = $56047603f9d212b6$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
|
|
1996
1996
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
1997
1997
|
return {
|
|
@@ -2133,9 +2133,9 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
2133
2133
|
});
|
|
2134
2134
|
}
|
|
2135
2135
|
function $56047603f9d212b6$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2136
|
-
return resolutions.map(width => "".concat((customGenerateImageUrl_ || $56047603f9d212b6$
|
|
2136
|
+
return resolutions.map(width => "".concat((customGenerateImageUrl_ || $56047603f9d212b6$export$1d6267828870adda)(url, width), " ").concat(width, "w")).join(", ");
|
|
2137
2137
|
}
|
|
2138
|
-
function $56047603f9d212b6$
|
|
2138
|
+
function $56047603f9d212b6$export$1d6267828870adda(url, width) {
|
|
2139
2139
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2140
2140
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2141
2141
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2203,7 +2203,14 @@ function $7fbaab3d3dafb4f5$export$9d4a4b669b1929ab(props) {
|
|
|
2203
2203
|
return {
|
|
2204
2204
|
...props.imgProps,
|
|
2205
2205
|
customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
|
|
2206
|
-
) =>
|
|
2206
|
+
) => {
|
|
2207
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2208
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2209
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2210
|
+
return $56047603f9d212b6$export$1d6267828870adda(url, width);
|
|
2211
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2212
|
+
return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
|
|
2213
|
+
}
|
|
2207
2214
|
};
|
|
2208
2215
|
}
|
|
2209
2216
|
}));
|
package/server/latest/index.cjs
CHANGED
|
@@ -92,7 +92,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
|
|
|
92
92
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
93
93
|
$parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
|
|
94
94
|
/*! Depict.ai search and product listing SDK */
|
|
95
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.
|
|
95
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.4";
|
|
96
96
|
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
97
97
|
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
98
98
|
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
@@ -1987,7 +1987,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
1987
1987
|
src: src,
|
|
1988
1988
|
customGenerateImageUrl_: customGenerateImageUrl_
|
|
1989
1989
|
} = props;
|
|
1990
|
-
const fallback_src = (customGenerateImageUrl_ || $19950faaac026e09$
|
|
1990
|
+
const fallback_src = (customGenerateImageUrl_ || $19950faaac026e09$export$1d6267828870adda)(src, 400);
|
|
1991
1991
|
const srcset = $19950faaac026e09$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
|
|
1992
1992
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
1993
1993
|
return {
|
|
@@ -2126,9 +2126,9 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
2126
2126
|
});
|
|
2127
2127
|
}
|
|
2128
2128
|
function $19950faaac026e09$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2129
|
-
return resolutions.map(width => `${(customGenerateImageUrl_ || $19950faaac026e09$
|
|
2129
|
+
return resolutions.map(width => `${(customGenerateImageUrl_ || $19950faaac026e09$export$1d6267828870adda)(url, width)} ${width}w`).join(", ");
|
|
2130
2130
|
}
|
|
2131
|
-
function $19950faaac026e09$
|
|
2131
|
+
function $19950faaac026e09$export$1d6267828870adda(url, width) {
|
|
2132
2132
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2133
2133
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2134
2134
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2194,7 +2194,14 @@ function $e8327f98c8ee28d7$export$9d4a4b669b1929ab(props) {
|
|
|
2194
2194
|
return {
|
|
2195
2195
|
...props.imgProps,
|
|
2196
2196
|
customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
|
|
2197
|
-
) =>
|
|
2197
|
+
) => {
|
|
2198
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2199
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2200
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2201
|
+
return $19950faaac026e09$export$1d6267828870adda(url, width);
|
|
2202
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2203
|
+
return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
|
|
2204
|
+
}
|
|
2198
2205
|
};
|
|
2199
2206
|
}
|
|
2200
2207
|
}));
|
package/server/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.1.
|
|
13
|
+
export const version = "4.1.4";
|
|
14
14
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.1.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.1.4";
|
|
11
11
|
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
12
12
|
let $90980bd87c9960f9$var$has_ran = false;
|
|
13
13
|
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
@@ -1902,7 +1902,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
1902
1902
|
src: src,
|
|
1903
1903
|
customGenerateImageUrl_: customGenerateImageUrl_
|
|
1904
1904
|
} = props;
|
|
1905
|
-
const fallback_src = (customGenerateImageUrl_ || $e8ffe11ed01df0fe$
|
|
1905
|
+
const fallback_src = (customGenerateImageUrl_ || $e8ffe11ed01df0fe$export$1d6267828870adda)(src, 400);
|
|
1906
1906
|
const srcset = $e8ffe11ed01df0fe$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
|
|
1907
1907
|
// The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
|
|
1908
1908
|
return {
|
|
@@ -2041,9 +2041,9 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
2041
2041
|
});
|
|
2042
2042
|
}
|
|
2043
2043
|
function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
|
|
2044
|
-
return resolutions.map(width => `${(customGenerateImageUrl_ || $e8ffe11ed01df0fe$
|
|
2044
|
+
return resolutions.map(width => `${(customGenerateImageUrl_ || $e8ffe11ed01df0fe$export$1d6267828870adda)(url, width)} ${width}w`).join(", ");
|
|
2045
2045
|
}
|
|
2046
|
-
function $e8ffe11ed01df0fe$
|
|
2046
|
+
function $e8ffe11ed01df0fe$export$1d6267828870adda(url, width) {
|
|
2047
2047
|
// Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
|
|
2048
2048
|
// We're making the assumptions that the url has already at least one query parameter and that the image resizing service will choose the last one out of a duplicate width parameter (shopify's does)
|
|
2049
2049
|
// That way we can just to string concatenation which is insanely fast
|
|
@@ -2109,7 +2109,14 @@ function $4f16612bea257571$export$9d4a4b669b1929ab(props) {
|
|
|
2109
2109
|
return {
|
|
2110
2110
|
...props.imgProps,
|
|
2111
2111
|
customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
|
|
2112
|
-
) =>
|
|
2112
|
+
) => {
|
|
2113
|
+
if (url.startsWith("https://cdn.shopify.com"))
|
|
2114
|
+
// The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
|
|
2115
|
+
// but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
|
|
2116
|
+
return $e8ffe11ed01df0fe$export$1d6267828870adda(url, width);
|
|
2117
|
+
// Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
|
|
2118
|
+
return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
|
|
2119
|
+
}
|
|
2113
2120
|
};
|
|
2114
2121
|
}
|
|
2115
2122
|
}));
|