@depict-ai/react-ui 1.3.1 → 1.3.3
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 +2 -1
- package/dist/main.js +6 -3
- package/dist/module.js +6 -3
- package/dist-server/index.d.ts +1 -1
- package/dist-server/main.js +1 -1
- package/dist-server/module.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import React, { ReactNode, PropsWithChildren, ReactElement } from "react";
|
|
|
4
4
|
import { DPC } from "@depict-ai/dpc";
|
|
5
5
|
import { Locale } from "@depict-ai/ui/locales";
|
|
6
6
|
import { ModernDisplayWithPageUrl } from "@depict-ai/ui/src";
|
|
7
|
-
export const version = "1.3.
|
|
7
|
+
export const version = "1.3.3";
|
|
8
8
|
interface PLPConfig<T extends Display> extends BaseProductListingConfig {
|
|
9
9
|
/**
|
|
10
10
|
* The product card to use for rendering products.
|
|
@@ -511,4 +511,5 @@ export const Navigation: {
|
|
|
511
511
|
nextRouterNavigation: (router: import("next/router").NextRouter) => import("ui/components/DepictProvider").NavigateFunction;
|
|
512
512
|
};
|
|
513
513
|
export { CategoryTitle, embedded_num_products as EmbeddedNumProducts } from "@depict-ai/ui";
|
|
514
|
+
export type { PageURLCreator } from "@depict-ai/ui";
|
|
514
515
|
export type { Locale } from "@depict-ai/ui/locales";
|
package/dist/main.js
CHANGED
|
@@ -31,7 +31,7 @@ $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fb
|
|
|
31
31
|
$parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
|
|
32
32
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
33
33
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
34
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "1.3.
|
|
34
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "1.3.3";
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -193,11 +193,14 @@ function $6319748b4f0426f0$export$6453cbc34515a94d() {
|
|
|
193
193
|
const are_on_search_or_category_page = ()=>(0, $b4d0d98857ed9934$export$775e6b3892b5ad52)() || (0, $b4d0d98857ed9934$export$30c8a12df09be0e4)();
|
|
194
194
|
if ($6319748b4f0426f0$var$set) return; // Just being safe
|
|
195
195
|
$6319748b4f0426f0$var$set = true;
|
|
196
|
-
|
|
196
|
+
// We used to initialise this variable with false which in some cases (scroll to top button in FloatingButtons) would cause the scroll to be blocked when it shouldn't (see https://depictaiworkspace.slack.com/archives/C058KQ3MU8Z/p1686141321127089?thread_ts=1686134246.109689&cid=C058KQ3MU8Z)
|
|
197
|
+
// I don't know why we'd want to initialise it with false? The only reason I can see is in the hopes of scroll restoration working on initial page load, but it basically never does due to react rendering and executing our component too late
|
|
198
|
+
let should_use_old_scroll = true;
|
|
197
199
|
const old_scrollTo = window.scrollTo;
|
|
198
200
|
const next_router_event_target = $6319748b4f0426f0$var$make_next_router_event_target(); // So we can use once: true
|
|
199
201
|
window.scrollTo = (...args)=>{
|
|
200
|
-
if (should_use_old_scroll || process.env.__NEXT_SCROLL_RESTORATION || !are_on_search_or_category_page()
|
|
202
|
+
if (should_use_old_scroll || process.env.__NEXT_SCROLL_RESTORATION || !are_on_search_or_category_page() || history.scrollRestoration === "manual" // I.e. Chimi has manual scroll restoration that we don't want to block https://depictaiworkspace.slack.com/archives/C058KQ3MU8Z/p1686658007164019?thread_ts=1686134246.109689&cid=C058KQ3MU8Z
|
|
203
|
+
) return Reflect.apply(old_scrollTo, window, args);
|
|
201
204
|
else should_use_old_scroll = true;
|
|
202
205
|
};
|
|
203
206
|
// When popping state, add padding in the same event as the "popstate" event (required) and then remove it once our stuff is in the DOM
|
package/dist/module.js
CHANGED
|
@@ -11,7 +11,7 @@ import {DPC as $TZSbU$DPC} from "@depict-ai/dpc";
|
|
|
11
11
|
|
|
12
12
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
13
13
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
14
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.3.
|
|
14
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.3.3";
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -173,11 +173,14 @@ function $8071251ee4e9ffa1$export$6453cbc34515a94d() {
|
|
|
173
173
|
const are_on_search_or_category_page = ()=>(0, $c83ba9ab79386687$export$775e6b3892b5ad52)() || (0, $c83ba9ab79386687$export$30c8a12df09be0e4)();
|
|
174
174
|
if ($8071251ee4e9ffa1$var$set) return; // Just being safe
|
|
175
175
|
$8071251ee4e9ffa1$var$set = true;
|
|
176
|
-
|
|
176
|
+
// We used to initialise this variable with false which in some cases (scroll to top button in FloatingButtons) would cause the scroll to be blocked when it shouldn't (see https://depictaiworkspace.slack.com/archives/C058KQ3MU8Z/p1686141321127089?thread_ts=1686134246.109689&cid=C058KQ3MU8Z)
|
|
177
|
+
// I don't know why we'd want to initialise it with false? The only reason I can see is in the hopes of scroll restoration working on initial page load, but it basically never does due to react rendering and executing our component too late
|
|
178
|
+
let should_use_old_scroll = true;
|
|
177
179
|
const old_scrollTo = window.scrollTo;
|
|
178
180
|
const next_router_event_target = $8071251ee4e9ffa1$var$make_next_router_event_target(); // So we can use once: true
|
|
179
181
|
window.scrollTo = (...args)=>{
|
|
180
|
-
if (should_use_old_scroll || process.env.__NEXT_SCROLL_RESTORATION || !are_on_search_or_category_page()
|
|
182
|
+
if (should_use_old_scroll || process.env.__NEXT_SCROLL_RESTORATION || !are_on_search_or_category_page() || history.scrollRestoration === "manual" // I.e. Chimi has manual scroll restoration that we don't want to block https://depictaiworkspace.slack.com/archives/C058KQ3MU8Z/p1686658007164019?thread_ts=1686134246.109689&cid=C058KQ3MU8Z
|
|
183
|
+
) return Reflect.apply(old_scrollTo, window, args);
|
|
181
184
|
else should_use_old_scroll = true;
|
|
182
185
|
};
|
|
183
186
|
// When popping state, add padding in the same event as the "popstate" event (required) and then remove it once our stuff is in the DOM
|
package/dist-server/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ interface UseFetchRecommendationsReturn<T extends Display> {
|
|
|
33
33
|
*/
|
|
34
34
|
fetchRecommendations: (opts: FetchRecsOptions) => Promise<T[]>;
|
|
35
35
|
}
|
|
36
|
-
export const version = "1.3.
|
|
36
|
+
export const version = "1.3.3";
|
|
37
37
|
export function DepictProvider(props: any): any;
|
|
38
38
|
export function SearchPage(): any;
|
|
39
39
|
export function CategoryPage(): any;
|
package/dist-server/main.js
CHANGED
|
@@ -40,7 +40,7 @@ function $35dfe83eec81954c$export$4b564d7f5a1b1d43({ solid_component: solid_comp
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "1.3.
|
|
43
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "1.3.3";
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
|
package/dist-server/module.js
CHANGED
|
@@ -22,7 +22,7 @@ function $4568c09979447ab1$export$4b564d7f5a1b1d43({ solid_component: solid_comp
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.3.
|
|
25
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.3.3";
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/react-ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"README.md"
|
|
98
98
|
],
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@depict-ai/dpc": "^1.0.
|
|
100
|
+
"@depict-ai/dpc": "^1.0.27",
|
|
101
101
|
"@depict-ai/plp-styling": "^1.0.26",
|
|
102
|
-
"@depict-ai/ui": "^1.3.
|
|
102
|
+
"@depict-ai/ui": "^1.3.2",
|
|
103
103
|
"@depict-ai/utilishared": "^1.0.25",
|
|
104
104
|
"solid-js": "^1.7.3"
|
|
105
105
|
},
|