@depict-ai/react-ui 2.1.14 → 2.1.16
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 +26 -6
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +26 -6
- package/latest/index.cjs +20 -5
- package/latest/index.d.ts +1 -1
- package/latest/index.js +20 -5
- package/package.json +6 -6
- package/server/ES10/index.cjs +33 -2
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +34 -3
- package/server/latest/index.cjs +32 -2
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +33 -3
package/ES10/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ $parcel$export(module.exports, "version", () => $efbdd2dab4314170$export$83d89fb
|
|
|
39
39
|
$parcel$export(module.exports, "Navigation", () => $0d3a2413fdeb34b9$export$b8a61e5c71402559);
|
|
40
40
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
41
41
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
42
|
-
const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.1.
|
|
42
|
+
const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.1.16";
|
|
43
43
|
const $ef516b1f92253963$export$8e769ad4338a911e = {
|
|
44
44
|
usedLocale: $2kiy7$solidjs.createSignal((0, $2kiy7$depictaiuilocales.defaultLocale)),
|
|
45
45
|
search_instances: new Map(),
|
|
@@ -139,6 +139,9 @@ let $abe6528d061993d2$var$set = false;
|
|
|
139
139
|
let $abe6528d061993d2$var$padding_animation;
|
|
140
140
|
function $abe6528d061993d2$export$6453cbc34515a94d() {
|
|
141
141
|
var _window, _window$next, _window$next$router, _window$next$router$e;
|
|
142
|
+
/// WARNING WARNING WARNING
|
|
143
|
+
// If you are debugging scroll restoration, make sure you're not in strict mode!!!!! Scroll restoration in nextjs won't work in strict mode because react will nuke all our elements from the DOM and render them again during going back
|
|
144
|
+
// Next 13.x+ has strict mode by default, opt out by setting reactStrictMode: false in next.config.js
|
|
142
145
|
const are_on_search_or_category_page = () => $e7ba61a7074c02d3$export$775e6b3892b5ad52() || $e7ba61a7074c02d3$export$30c8a12df09be0e4();
|
|
143
146
|
if ($abe6528d061993d2$var$set) return; // Just being safe
|
|
144
147
|
$abe6528d061993d2$var$set = true;
|
|
@@ -224,6 +227,8 @@ function $abe6528d061993d2$var$make_next_router_event_target() {
|
|
|
224
227
|
return next_router_event_target;
|
|
225
228
|
}
|
|
226
229
|
const $4a695f491f8300eb$export$599d4515591ef232 = (relativeUrl, isReplace, scroll) => {
|
|
230
|
+
var _window, _window$next;
|
|
231
|
+
if (typeof ((_window = window) === null || _window === void 0 ? void 0 : (_window$next = _window.next) === null || _window$next === void 0 ? void 0 : _window$next.router) === "undefined") throw new Error("You must provide a navigateFunction when not using Next.js.");
|
|
227
232
|
let Page;
|
|
228
233
|
(function (Page) {
|
|
229
234
|
Page[Page["OTHER"] = 0] = "OTHER";
|
|
@@ -287,7 +292,10 @@ function $50b0315f34679db4$export$bae2769a30719c48(disposable, stateKey) {
|
|
|
287
292
|
// default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
|
|
288
293
|
localization: $2kiy7$solidjs.untrack(get_locale),
|
|
289
294
|
url_transformer: url => url.pathname = $2kiy7$solidjs.untrack(get_search_page_path),
|
|
290
|
-
on_navigation: (
|
|
295
|
+
on_navigation: function () {
|
|
296
|
+
return (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation(...arguments);
|
|
297
|
+
},
|
|
298
|
+
// wrapping the function here since it could change
|
|
291
299
|
unique_instance_key_for_state: stateKey,
|
|
292
300
|
enable_content_search: $2kiy7$solidjs.untrack(get_enable_content_search)
|
|
293
301
|
});
|
|
@@ -327,7 +335,10 @@ function $d944107b1e0acdae$export$248b95d5073d5bab(disposable, stateKey) {
|
|
|
327
335
|
// TODO: check if we can do this
|
|
328
336
|
merchant: $2kiy7$solidjs.untrack(get_merchant),
|
|
329
337
|
localization: $2kiy7$solidjs.untrack(get_locale),
|
|
330
|
-
on_navigation: (
|
|
338
|
+
on_navigation: function () {
|
|
339
|
+
return (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation(...arguments);
|
|
340
|
+
},
|
|
341
|
+
// wrapping the function here since it could change
|
|
331
342
|
unique_instance_key_for_state: stateKey
|
|
332
343
|
});
|
|
333
344
|
$2kiy7$solidjs.createComputed(() => {
|
|
@@ -397,13 +408,11 @@ function $6f994ff16ce375bb$var$ActualDepictProvider(props) {
|
|
|
397
408
|
(0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[1](merchant);
|
|
398
409
|
$abe6528d061993d2$export$6453cbc34515a94d();
|
|
399
410
|
try {
|
|
400
|
-
var _window, _window$next;
|
|
401
411
|
const {
|
|
402
412
|
search_instances: search_instances,
|
|
403
413
|
category_instances: category_instances,
|
|
404
414
|
search_page_path_: [, set_search_page_path]
|
|
405
415
|
} = (0, $ef516b1f92253963$export$8e769ad4338a911e);
|
|
406
|
-
if (typeof ((_window = window) === null || _window === void 0 ? void 0 : (_window$next = _window.next) === null || _window$next === void 0 ? void 0 : _window$next.router) === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
|
|
407
416
|
const on_navigation = _ref => {
|
|
408
417
|
let {
|
|
409
418
|
is_replace: is_replace,
|
|
@@ -859,7 +868,18 @@ function $3b36cc844440a979$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
859
868
|
const component_portals = new Set();
|
|
860
869
|
return $2kiy7$depictaiui.RecommendationGrid({
|
|
861
870
|
get recommendations() {
|
|
862
|
-
|
|
871
|
+
const recs = props.recommendations;
|
|
872
|
+
if ("then" in recs) return recs.then(displays => {
|
|
873
|
+
var _globalState$api, _globalState$api$disp;
|
|
874
|
+
const transformFunction = (_globalState$api = (0, $ef516b1f92253963$export$8e769ad4338a911e).api) === null || _globalState$api === void 0 ? void 0 : (_globalState$api$disp = _globalState$api.display_transformers) === null || _globalState$api$disp === void 0 ? void 0 : _globalState$api$disp.products;
|
|
875
|
+
if (transformFunction) return transformFunction({
|
|
876
|
+
merchant: (0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[0](),
|
|
877
|
+
market: (0, $ef516b1f92253963$export$8e769ad4338a911e).market[0](),
|
|
878
|
+
displays: displays
|
|
879
|
+
});
|
|
880
|
+
return displays;
|
|
881
|
+
});
|
|
882
|
+
return recs;
|
|
863
883
|
},
|
|
864
884
|
product_card_template: display => {
|
|
865
885
|
if (0, $2kiy7$solidjsweb.isServer)
|
package/ES10/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, ReactNode, FC, ReactPortal, ReactElement } fr
|
|
|
3
3
|
import { BaseProviderConfig, BaseSearchProviderConfig, BaseCategoryProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ImagePlaceholder as _ImagePlaceholder1, TextPlaceholder as _TextPlaceholder1, ExclusiveId, fetchDepictRecommendations } from "@depict-ai/ui/ES10";
|
|
4
4
|
import { Locale } from "@depict-ai/ui/locales/ES10";
|
|
5
5
|
import { Display, ModernDisplay } from "@depict-ai/utilishared/ES10";
|
|
6
|
-
export const version = "2.1.
|
|
6
|
+
export const version = "2.1.16";
|
|
7
7
|
interface UsePerformanceClientReturn {
|
|
8
8
|
dpc: DPC;
|
|
9
9
|
}
|
package/ES10/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { renderToString as $jb2Oo$renderToString } from "react-dom/server";
|
|
|
15
15
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
16
16
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
17
17
|
register_es_version("react-ui", "ES10");
|
|
18
|
-
const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.1.
|
|
18
|
+
const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.1.16";
|
|
19
19
|
const $8c691d7f86317052$export$8e769ad4338a911e = {
|
|
20
20
|
usedLocale: $jb2Oo$createSignal((0, $jb2Oo$defaultLocale)),
|
|
21
21
|
search_instances: new Map(),
|
|
@@ -115,6 +115,9 @@ let $64144f6d578fd8ac$var$set = false;
|
|
|
115
115
|
let $64144f6d578fd8ac$var$padding_animation;
|
|
116
116
|
function $64144f6d578fd8ac$export$6453cbc34515a94d() {
|
|
117
117
|
var _window, _window$next, _window$next$router, _window$next$router$e;
|
|
118
|
+
/// WARNING WARNING WARNING
|
|
119
|
+
// If you are debugging scroll restoration, make sure you're not in strict mode!!!!! Scroll restoration in nextjs won't work in strict mode because react will nuke all our elements from the DOM and render them again during going back
|
|
120
|
+
// Next 13.x+ has strict mode by default, opt out by setting reactStrictMode: false in next.config.js
|
|
118
121
|
const are_on_search_or_category_page = () => $0dd9d9a9c7da4c1d$export$775e6b3892b5ad52() || $0dd9d9a9c7da4c1d$export$30c8a12df09be0e4();
|
|
119
122
|
if ($64144f6d578fd8ac$var$set) return; // Just being safe
|
|
120
123
|
$64144f6d578fd8ac$var$set = true;
|
|
@@ -200,6 +203,8 @@ function $64144f6d578fd8ac$var$make_next_router_event_target() {
|
|
|
200
203
|
return next_router_event_target;
|
|
201
204
|
}
|
|
202
205
|
const $7abe9e29758fa0eb$export$599d4515591ef232 = (relativeUrl, isReplace, scroll) => {
|
|
206
|
+
var _window, _window$next;
|
|
207
|
+
if (typeof ((_window = window) === null || _window === void 0 ? void 0 : (_window$next = _window.next) === null || _window$next === void 0 ? void 0 : _window$next.router) === "undefined") throw new Error("You must provide a navigateFunction when not using Next.js.");
|
|
203
208
|
let Page;
|
|
204
209
|
(function (Page) {
|
|
205
210
|
Page[Page["OTHER"] = 0] = "OTHER";
|
|
@@ -263,7 +268,10 @@ function $bef9f58602be2478$export$bae2769a30719c48(disposable, stateKey) {
|
|
|
263
268
|
// default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
|
|
264
269
|
localization: $jb2Oo$untrack(get_locale),
|
|
265
270
|
url_transformer: url => url.pathname = $jb2Oo$untrack(get_search_page_path),
|
|
266
|
-
on_navigation: (
|
|
271
|
+
on_navigation: function () {
|
|
272
|
+
return (0, $8c691d7f86317052$export$8e769ad4338a911e).on_navigation(...arguments);
|
|
273
|
+
},
|
|
274
|
+
// wrapping the function here since it could change
|
|
267
275
|
unique_instance_key_for_state: stateKey,
|
|
268
276
|
enable_content_search: $jb2Oo$untrack(get_enable_content_search)
|
|
269
277
|
});
|
|
@@ -303,7 +311,10 @@ function $b1c85026e863c95b$export$248b95d5073d5bab(disposable, stateKey) {
|
|
|
303
311
|
// TODO: check if we can do this
|
|
304
312
|
merchant: $jb2Oo$untrack(get_merchant),
|
|
305
313
|
localization: $jb2Oo$untrack(get_locale),
|
|
306
|
-
on_navigation: (
|
|
314
|
+
on_navigation: function () {
|
|
315
|
+
return (0, $8c691d7f86317052$export$8e769ad4338a911e).on_navigation(...arguments);
|
|
316
|
+
},
|
|
317
|
+
// wrapping the function here since it could change
|
|
307
318
|
unique_instance_key_for_state: stateKey
|
|
308
319
|
});
|
|
309
320
|
$jb2Oo$createComputed(() => {
|
|
@@ -373,13 +384,11 @@ function $18e5b9f66c7ade8e$var$ActualDepictProvider(props) {
|
|
|
373
384
|
(0, $8c691d7f86317052$export$8e769ad4338a911e).merchant[1](merchant);
|
|
374
385
|
$64144f6d578fd8ac$export$6453cbc34515a94d();
|
|
375
386
|
try {
|
|
376
|
-
var _window, _window$next;
|
|
377
387
|
const {
|
|
378
388
|
search_instances: search_instances,
|
|
379
389
|
category_instances: category_instances,
|
|
380
390
|
search_page_path_: [, set_search_page_path]
|
|
381
391
|
} = (0, $8c691d7f86317052$export$8e769ad4338a911e);
|
|
382
|
-
if (typeof ((_window = window) === null || _window === void 0 ? void 0 : (_window$next = _window.next) === null || _window$next === void 0 ? void 0 : _window$next.router) === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
|
|
383
392
|
const on_navigation = _ref => {
|
|
384
393
|
let {
|
|
385
394
|
is_replace: is_replace,
|
|
@@ -835,7 +844,18 @@ function $cd68097a7ee08669$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
835
844
|
const component_portals = new Set();
|
|
836
845
|
return $jb2Oo$RecommendationGrid({
|
|
837
846
|
get recommendations() {
|
|
838
|
-
|
|
847
|
+
const recs = props.recommendations;
|
|
848
|
+
if ("then" in recs) return recs.then(displays => {
|
|
849
|
+
var _globalState$api, _globalState$api$disp;
|
|
850
|
+
const transformFunction = (_globalState$api = (0, $8c691d7f86317052$export$8e769ad4338a911e).api) === null || _globalState$api === void 0 ? void 0 : (_globalState$api$disp = _globalState$api.display_transformers) === null || _globalState$api$disp === void 0 ? void 0 : _globalState$api$disp.products;
|
|
851
|
+
if (transformFunction) return transformFunction({
|
|
852
|
+
merchant: (0, $8c691d7f86317052$export$8e769ad4338a911e).merchant[0](),
|
|
853
|
+
market: (0, $8c691d7f86317052$export$8e769ad4338a911e).market[0](),
|
|
854
|
+
displays: displays
|
|
855
|
+
});
|
|
856
|
+
return displays;
|
|
857
|
+
});
|
|
858
|
+
return recs;
|
|
839
859
|
},
|
|
840
860
|
product_card_template: display => {
|
|
841
861
|
if (0, $jb2Oo$isServer)
|
package/latest/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fb
|
|
|
39
39
|
$parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
|
|
40
40
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
41
41
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
42
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.
|
|
42
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.16";
|
|
43
43
|
const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
|
|
44
44
|
usedLocale: $2IzJs$solidjs.createSignal((0, $2IzJs$depictaiuilocales.defaultLocale)),
|
|
45
45
|
search_instances: new Map(),
|
|
@@ -130,6 +130,9 @@ function $b4d0d98857ed9934$export$e5139bbbb9a05035(component, is_set) {
|
|
|
130
130
|
let $6319748b4f0426f0$var$set = false;
|
|
131
131
|
let $6319748b4f0426f0$var$padding_animation;
|
|
132
132
|
function $6319748b4f0426f0$export$6453cbc34515a94d() {
|
|
133
|
+
/// WARNING WARNING WARNING
|
|
134
|
+
// If you are debugging scroll restoration, make sure you're not in strict mode!!!!! Scroll restoration in nextjs won't work in strict mode because react will nuke all our elements from the DOM and render them again during going back
|
|
135
|
+
// Next 13.x+ has strict mode by default, opt out by setting reactStrictMode: false in next.config.js
|
|
133
136
|
const are_on_search_or_category_page = () => $b4d0d98857ed9934$export$775e6b3892b5ad52() || $b4d0d98857ed9934$export$30c8a12df09be0e4();
|
|
134
137
|
if ($6319748b4f0426f0$var$set) return; // Just being safe
|
|
135
138
|
$6319748b4f0426f0$var$set = true;
|
|
@@ -210,6 +213,7 @@ function $6319748b4f0426f0$var$make_next_router_event_target() {
|
|
|
210
213
|
return next_router_event_target;
|
|
211
214
|
}
|
|
212
215
|
const $bc389476eeb2b615$export$599d4515591ef232 = (relativeUrl, isReplace, scroll) => {
|
|
216
|
+
if (typeof window?.next?.router === "undefined") throw new Error("You must provide a navigateFunction when not using Next.js.");
|
|
213
217
|
let Page;
|
|
214
218
|
(function (Page) {
|
|
215
219
|
Page[Page["OTHER"] = 0] = "OTHER";
|
|
@@ -272,7 +276,8 @@ function $b1cf911fa603e77a$export$bae2769a30719c48(disposable, stateKey) {
|
|
|
272
276
|
// default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
|
|
273
277
|
localization: $2IzJs$solidjs.untrack(get_locale),
|
|
274
278
|
url_transformer: url => url.pathname = $2IzJs$solidjs.untrack(get_search_page_path),
|
|
275
|
-
on_navigation: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).on_navigation,
|
|
279
|
+
on_navigation: (...args) => (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).on_navigation(...args),
|
|
280
|
+
// wrapping the function here since it could change
|
|
276
281
|
unique_instance_key_for_state: stateKey,
|
|
277
282
|
enable_content_search: $2IzJs$solidjs.untrack(get_enable_content_search)
|
|
278
283
|
});
|
|
@@ -312,7 +317,8 @@ function $da98aca6c7d4c3f9$export$248b95d5073d5bab(disposable, stateKey) {
|
|
|
312
317
|
// TODO: check if we can do this
|
|
313
318
|
merchant: $2IzJs$solidjs.untrack(get_merchant),
|
|
314
319
|
localization: $2IzJs$solidjs.untrack(get_locale),
|
|
315
|
-
on_navigation: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).on_navigation,
|
|
320
|
+
on_navigation: (...args) => (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).on_navigation(...args),
|
|
321
|
+
// wrapping the function here since it could change
|
|
316
322
|
unique_instance_key_for_state: stateKey
|
|
317
323
|
});
|
|
318
324
|
$2IzJs$solidjs.createComputed(() => {
|
|
@@ -386,7 +392,6 @@ function $24b00503eef73528$var$ActualDepictProvider(props) {
|
|
|
386
392
|
category_instances: category_instances,
|
|
387
393
|
search_page_path_: [, set_search_page_path]
|
|
388
394
|
} = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e);
|
|
389
|
-
if (typeof window?.next?.router === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
|
|
390
395
|
const on_navigation = ({
|
|
391
396
|
is_replace: is_replace,
|
|
392
397
|
new_url: new_url,
|
|
@@ -826,7 +831,17 @@ function $c6b960f2a07285c8$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
826
831
|
const component_portals = new Set();
|
|
827
832
|
return $2IzJs$depictaiui.RecommendationGrid({
|
|
828
833
|
get recommendations() {
|
|
829
|
-
|
|
834
|
+
const recs = props.recommendations;
|
|
835
|
+
if ("then" in recs) return recs.then(displays => {
|
|
836
|
+
const transformFunction = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).api?.display_transformers?.products;
|
|
837
|
+
if (transformFunction) return transformFunction({
|
|
838
|
+
merchant: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).merchant[0](),
|
|
839
|
+
market: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).market[0](),
|
|
840
|
+
displays: displays
|
|
841
|
+
});
|
|
842
|
+
return displays;
|
|
843
|
+
});
|
|
844
|
+
return recs;
|
|
830
845
|
},
|
|
831
846
|
product_card_template: display => {
|
|
832
847
|
if (0, $2IzJs$solidjsweb.isServer)
|
package/latest/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, ReactNode, FC, ReactPortal, ReactElement } fr
|
|
|
3
3
|
import { BaseProviderConfig, BaseSearchProviderConfig, BaseCategoryProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ImagePlaceholder as _ImagePlaceholder1, TextPlaceholder as _TextPlaceholder1, ExclusiveId, fetchDepictRecommendations } from "@depict-ai/ui/latest";
|
|
4
4
|
import { Locale } from "@depict-ai/ui/locales/latest";
|
|
5
5
|
import { Display, ModernDisplay } from "@depict-ai/utilishared/latest";
|
|
6
|
-
export const version = "2.1.
|
|
6
|
+
export const version = "2.1.16";
|
|
7
7
|
interface UsePerformanceClientReturn {
|
|
8
8
|
dpc: DPC;
|
|
9
9
|
}
|
package/latest/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { renderToString as $2GFvs$renderToString } from "react-dom/server";
|
|
|
15
15
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
16
16
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
17
17
|
register_es_version("react-ui", "latest");
|
|
18
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.
|
|
18
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.16";
|
|
19
19
|
const $42858f023ef23dab$export$8e769ad4338a911e = {
|
|
20
20
|
usedLocale: $2GFvs$createSignal((0, $2GFvs$defaultLocale)),
|
|
21
21
|
search_instances: new Map(),
|
|
@@ -106,6 +106,9 @@ function $c83ba9ab79386687$export$e5139bbbb9a05035(component, is_set) {
|
|
|
106
106
|
let $8071251ee4e9ffa1$var$set = false;
|
|
107
107
|
let $8071251ee4e9ffa1$var$padding_animation;
|
|
108
108
|
function $8071251ee4e9ffa1$export$6453cbc34515a94d() {
|
|
109
|
+
/// WARNING WARNING WARNING
|
|
110
|
+
// If you are debugging scroll restoration, make sure you're not in strict mode!!!!! Scroll restoration in nextjs won't work in strict mode because react will nuke all our elements from the DOM and render them again during going back
|
|
111
|
+
// Next 13.x+ has strict mode by default, opt out by setting reactStrictMode: false in next.config.js
|
|
109
112
|
const are_on_search_or_category_page = () => $c83ba9ab79386687$export$775e6b3892b5ad52() || $c83ba9ab79386687$export$30c8a12df09be0e4();
|
|
110
113
|
if ($8071251ee4e9ffa1$var$set) return; // Just being safe
|
|
111
114
|
$8071251ee4e9ffa1$var$set = true;
|
|
@@ -186,6 +189,7 @@ function $8071251ee4e9ffa1$var$make_next_router_event_target() {
|
|
|
186
189
|
return next_router_event_target;
|
|
187
190
|
}
|
|
188
191
|
const $7216ca4c8308a0f9$export$599d4515591ef232 = (relativeUrl, isReplace, scroll) => {
|
|
192
|
+
if (typeof window?.next?.router === "undefined") throw new Error("You must provide a navigateFunction when not using Next.js.");
|
|
189
193
|
let Page;
|
|
190
194
|
(function (Page) {
|
|
191
195
|
Page[Page["OTHER"] = 0] = "OTHER";
|
|
@@ -248,7 +252,8 @@ function $80202ccbe2ade418$export$bae2769a30719c48(disposable, stateKey) {
|
|
|
248
252
|
// default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
|
|
249
253
|
localization: $2GFvs$untrack(get_locale),
|
|
250
254
|
url_transformer: url => url.pathname = $2GFvs$untrack(get_search_page_path),
|
|
251
|
-
on_navigation: (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation,
|
|
255
|
+
on_navigation: (...args) => (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation(...args),
|
|
256
|
+
// wrapping the function here since it could change
|
|
252
257
|
unique_instance_key_for_state: stateKey,
|
|
253
258
|
enable_content_search: $2GFvs$untrack(get_enable_content_search)
|
|
254
259
|
});
|
|
@@ -288,7 +293,8 @@ function $9145bcf81a0216ce$export$248b95d5073d5bab(disposable, stateKey) {
|
|
|
288
293
|
// TODO: check if we can do this
|
|
289
294
|
merchant: $2GFvs$untrack(get_merchant),
|
|
290
295
|
localization: $2GFvs$untrack(get_locale),
|
|
291
|
-
on_navigation: (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation,
|
|
296
|
+
on_navigation: (...args) => (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation(...args),
|
|
297
|
+
// wrapping the function here since it could change
|
|
292
298
|
unique_instance_key_for_state: stateKey
|
|
293
299
|
});
|
|
294
300
|
$2GFvs$createComputed(() => {
|
|
@@ -362,7 +368,6 @@ function $5376eb2a386cd90d$var$ActualDepictProvider(props) {
|
|
|
362
368
|
category_instances: category_instances,
|
|
363
369
|
search_page_path_: [, set_search_page_path]
|
|
364
370
|
} = (0, $42858f023ef23dab$export$8e769ad4338a911e);
|
|
365
|
-
if (typeof window?.next?.router === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
|
|
366
371
|
const on_navigation = ({
|
|
367
372
|
is_replace: is_replace,
|
|
368
373
|
new_url: new_url,
|
|
@@ -802,7 +807,17 @@ function $4d5c3f13a5ae62a7$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
802
807
|
const component_portals = new Set();
|
|
803
808
|
return $2GFvs$RecommendationGrid({
|
|
804
809
|
get recommendations() {
|
|
805
|
-
|
|
810
|
+
const recs = props.recommendations;
|
|
811
|
+
if ("then" in recs) return recs.then(displays => {
|
|
812
|
+
const transformFunction = (0, $42858f023ef23dab$export$8e769ad4338a911e).api?.display_transformers?.products;
|
|
813
|
+
if (transformFunction) return transformFunction({
|
|
814
|
+
merchant: (0, $42858f023ef23dab$export$8e769ad4338a911e).merchant[0](),
|
|
815
|
+
market: (0, $42858f023ef23dab$export$8e769ad4338a911e).market[0](),
|
|
816
|
+
displays: displays
|
|
817
|
+
});
|
|
818
|
+
return displays;
|
|
819
|
+
});
|
|
820
|
+
return recs;
|
|
806
821
|
},
|
|
807
822
|
product_card_template: display => {
|
|
808
823
|
if (0, $2GFvs$isServer)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/react-ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.16",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "ES10/index.d.ts",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"@babel/runtime": "latest",
|
|
137
137
|
"@babel/runtime-corejs3": "latest",
|
|
138
138
|
"@depict-ai/dpc": "^1.0.45",
|
|
139
|
-
"@depict-ai/plp-styling": "^1.2.
|
|
139
|
+
"@depict-ai/plp-styling": "^1.2.15",
|
|
140
140
|
"@depict-ai/ui": "^2.1.23",
|
|
141
141
|
"@depict-ai/utilishared": "^1.0.51",
|
|
142
142
|
"solid-js": "^1.8.1"
|
|
@@ -150,10 +150,10 @@
|
|
|
150
150
|
"@babel/core": "latest",
|
|
151
151
|
"@babel/preset-env": "latest",
|
|
152
152
|
"@babel/preset-typescript": "latest",
|
|
153
|
-
"@depict-ai/plp-styling": "^1.2.
|
|
153
|
+
"@depict-ai/plp-styling": "^1.2.15",
|
|
154
154
|
"@jest/globals": "^29.3.1",
|
|
155
|
-
"@parcel/babel-preset-env": "^2.
|
|
156
|
-
"@parcel/transformer-sass": "^2.
|
|
155
|
+
"@parcel/babel-preset-env": "^2.10.3",
|
|
156
|
+
"@parcel/transformer-sass": "^2.10.3",
|
|
157
157
|
"@types/jest": "^29.2.6",
|
|
158
158
|
"@types/node": "^18.11.11",
|
|
159
159
|
"@types/react": "^18.0.26",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"jest-haste-map": "^29.3.1",
|
|
165
165
|
"jest-resolve": "^29.3.1",
|
|
166
166
|
"next": "^13.4.10",
|
|
167
|
-
"parcel": "^2.
|
|
167
|
+
"parcel": "^2.10.3",
|
|
168
168
|
"react": "^18.2.0",
|
|
169
169
|
"react-dom": "^18.2.0",
|
|
170
170
|
"ts-jest": "^29.0.5"
|
package/server/ES10/index.cjs
CHANGED
|
@@ -7,6 +7,7 @@ var $aNCHr$reactdomserver = require("react-dom/server");
|
|
|
7
7
|
var $aNCHr$solidjs = require("solid-js");
|
|
8
8
|
var $aNCHr$reactjsxruntime = require("react/jsx-runtime");
|
|
9
9
|
var $aNCHr$reactdom = require("react-dom");
|
|
10
|
+
var $aNCHr$depictaiuilocales = require("@depict-ai/ui/locales/ES10");
|
|
10
11
|
require("../../multi_import_deduplicator.cjs").register_es_version("react-ui", "ES10");
|
|
11
12
|
function $parcel$export(e, n, v, s) {
|
|
12
13
|
Object.defineProperty(e, n, {
|
|
@@ -140,11 +141,41 @@ async function $3441d987b5ea85cb$export$32024253978abdc7(_ref) {
|
|
|
140
141
|
await react_has_ran_hooks; // After React has created elements it still takes some time to actually connect the refs and run the hooks. We don't want to replace placeholders before then.
|
|
141
142
|
return [solid_container];
|
|
142
143
|
}
|
|
144
|
+
const $ef516b1f92253963$export$8e769ad4338a911e = {
|
|
145
|
+
usedLocale: $aNCHr$solidjs.createSignal((0, $aNCHr$depictaiuilocales.defaultLocale)),
|
|
146
|
+
search_instances: new Map(),
|
|
147
|
+
category_instances: new Map(),
|
|
148
|
+
api: null,
|
|
149
|
+
dpc: null,
|
|
150
|
+
merchant: $aNCHr$solidjs.createSignal(),
|
|
151
|
+
market: $aNCHr$solidjs.createSignal(),
|
|
152
|
+
userId: $aNCHr$solidjs.createSignal(),
|
|
153
|
+
sessionId: $aNCHr$solidjs.createSignal(),
|
|
154
|
+
known_category_paths: new Set(),
|
|
155
|
+
search_page_path_: $aNCHr$solidjs.createSignal(),
|
|
156
|
+
search_page_in_dom: $aNCHr$solidjs.createSignal(false),
|
|
157
|
+
category_page_in_dom: $aNCHr$solidjs.createSignal(false),
|
|
158
|
+
provider_is_updating: $aNCHr$solidjs.createSignal(false),
|
|
159
|
+
enable_content_search: $aNCHr$solidjs.createSignal(),
|
|
160
|
+
category_meta_title_suffix: $aNCHr$solidjs.createSignal(),
|
|
161
|
+
disable_override_query_id: $aNCHr$solidjs.createSignal()
|
|
162
|
+
};
|
|
143
163
|
function $3b36cc844440a979$export$e46079a2793e9ec7(props, set_portals) {
|
|
144
164
|
const component_portals = new Set();
|
|
145
165
|
return $aNCHr$depictaiui.RecommendationGrid({
|
|
146
166
|
get recommendations() {
|
|
147
|
-
|
|
167
|
+
const recs = props.recommendations;
|
|
168
|
+
if ("then" in recs) return recs.then(displays => {
|
|
169
|
+
var _globalState$api, _globalState$api$disp;
|
|
170
|
+
const transformFunction = (_globalState$api = (0, $ef516b1f92253963$export$8e769ad4338a911e).api) === null || _globalState$api === void 0 ? void 0 : (_globalState$api$disp = _globalState$api.display_transformers) === null || _globalState$api$disp === void 0 ? void 0 : _globalState$api$disp.products;
|
|
171
|
+
if (transformFunction) return transformFunction({
|
|
172
|
+
merchant: (0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[0](),
|
|
173
|
+
market: (0, $ef516b1f92253963$export$8e769ad4338a911e).market[0](),
|
|
174
|
+
displays: displays
|
|
175
|
+
});
|
|
176
|
+
return displays;
|
|
177
|
+
});
|
|
178
|
+
return recs;
|
|
148
179
|
},
|
|
149
180
|
product_card_template: display => {
|
|
150
181
|
if (0, $aNCHr$solidjsweb.isServer)
|
|
@@ -190,7 +221,7 @@ function $3b36cc844440a979$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
190
221
|
}
|
|
191
222
|
});
|
|
192
223
|
}
|
|
193
|
-
const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.1.
|
|
224
|
+
const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.1.16";
|
|
194
225
|
function $202459d454907b31$export$9fac37a9c21c2f3b(props) {
|
|
195
226
|
return props.children;
|
|
196
227
|
}
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, ReactNode, FC, ReactPortal, ReactElement } fr
|
|
|
3
3
|
import { BaseProviderConfig, BaseSearchProviderConfig, BaseCategoryProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ImagePlaceholder as _ImagePlaceholder1, TextPlaceholder as _TextPlaceholder1, ExclusiveId, fetchDepictRecommendations } from "@depict-ai/ui/ES10";
|
|
4
4
|
import { Locale } from "@depict-ai/ui/locales/ES10";
|
|
5
5
|
import { Display, ModernDisplay } from "@depict-ai/utilishared/ES10";
|
|
6
|
-
export const version = "2.1.
|
|
6
|
+
export const version = "2.1.16";
|
|
7
7
|
interface UsePerformanceClientReturn {
|
|
8
8
|
dpc: DPC;
|
|
9
9
|
}
|
package/server/ES10/index.js
CHANGED
|
@@ -4,9 +4,10 @@ import { ImagePlaceholder as $7h5e1$ImagePlaceholder, TextPlaceholder as $7h5e1$
|
|
|
4
4
|
import { generateHydrationScript as $7h5e1$generateHydrationScript, renderToString as $7h5e1$renderToString, isServer as $7h5e1$isServer } from "solid-js/web";
|
|
5
5
|
import { dwarn as $7h5e1$dwarn } from "@depict-ai/utilishared/ES10";
|
|
6
6
|
import { renderToString as $7h5e1$renderToString1 } from "react-dom/server";
|
|
7
|
-
import { getOwner as $7h5e1$getOwner, untrack as $7h5e1$untrack, runWithOwner as $7h5e1$runWithOwner, createEffect as $7h5e1$createEffect, on as $7h5e1$on, onCleanup as $7h5e1$onCleanup } from "solid-js";
|
|
7
|
+
import { getOwner as $7h5e1$getOwner, untrack as $7h5e1$untrack, runWithOwner as $7h5e1$runWithOwner, createEffect as $7h5e1$createEffect, on as $7h5e1$on, onCleanup as $7h5e1$onCleanup, createSignal as $7h5e1$createSignal } from "solid-js";
|
|
8
8
|
import { jsx as $7h5e1$jsx } from "react/jsx-runtime";
|
|
9
9
|
import { createPortal as $7h5e1$createPortal } from "react-dom";
|
|
10
|
+
import { defaultLocale as $7h5e1$defaultLocale } from "@depict-ai/ui/locales/ES10";
|
|
10
11
|
|
|
11
12
|
//"use client"; // <- opt out of react server components to the rendering method where components are rendered both on the client and on the server and then hydrated on the client, see https://www.joshwcomeau.com/react/server-components/#:~:text=Client%20Components%20render%20on%20both%20the%20client%20and%20the%20server.
|
|
12
13
|
// This "use client" actually just gets deleted by parcel, but I'm leaving it because we re-add it in the build scripts and this makes you more aware of that
|
|
@@ -117,11 +118,41 @@ async function $cce08f18e2476cbf$export$32024253978abdc7(_ref) {
|
|
|
117
118
|
await react_has_ran_hooks; // After React has created elements it still takes some time to actually connect the refs and run the hooks. We don't want to replace placeholders before then.
|
|
118
119
|
return [solid_container];
|
|
119
120
|
}
|
|
121
|
+
const $8c691d7f86317052$export$8e769ad4338a911e = {
|
|
122
|
+
usedLocale: $7h5e1$createSignal((0, $7h5e1$defaultLocale)),
|
|
123
|
+
search_instances: new Map(),
|
|
124
|
+
category_instances: new Map(),
|
|
125
|
+
api: null,
|
|
126
|
+
dpc: null,
|
|
127
|
+
merchant: $7h5e1$createSignal(),
|
|
128
|
+
market: $7h5e1$createSignal(),
|
|
129
|
+
userId: $7h5e1$createSignal(),
|
|
130
|
+
sessionId: $7h5e1$createSignal(),
|
|
131
|
+
known_category_paths: new Set(),
|
|
132
|
+
search_page_path_: $7h5e1$createSignal(),
|
|
133
|
+
search_page_in_dom: $7h5e1$createSignal(false),
|
|
134
|
+
category_page_in_dom: $7h5e1$createSignal(false),
|
|
135
|
+
provider_is_updating: $7h5e1$createSignal(false),
|
|
136
|
+
enable_content_search: $7h5e1$createSignal(),
|
|
137
|
+
category_meta_title_suffix: $7h5e1$createSignal(),
|
|
138
|
+
disable_override_query_id: $7h5e1$createSignal()
|
|
139
|
+
};
|
|
120
140
|
function $cd68097a7ee08669$export$e46079a2793e9ec7(props, set_portals) {
|
|
121
141
|
const component_portals = new Set();
|
|
122
142
|
return $7h5e1$RecommendationGrid({
|
|
123
143
|
get recommendations() {
|
|
124
|
-
|
|
144
|
+
const recs = props.recommendations;
|
|
145
|
+
if ("then" in recs) return recs.then(displays => {
|
|
146
|
+
var _globalState$api, _globalState$api$disp;
|
|
147
|
+
const transformFunction = (_globalState$api = (0, $8c691d7f86317052$export$8e769ad4338a911e).api) === null || _globalState$api === void 0 ? void 0 : (_globalState$api$disp = _globalState$api.display_transformers) === null || _globalState$api$disp === void 0 ? void 0 : _globalState$api$disp.products;
|
|
148
|
+
if (transformFunction) return transformFunction({
|
|
149
|
+
merchant: (0, $8c691d7f86317052$export$8e769ad4338a911e).merchant[0](),
|
|
150
|
+
market: (0, $8c691d7f86317052$export$8e769ad4338a911e).market[0](),
|
|
151
|
+
displays: displays
|
|
152
|
+
});
|
|
153
|
+
return displays;
|
|
154
|
+
});
|
|
155
|
+
return recs;
|
|
125
156
|
},
|
|
126
157
|
product_card_template: display => {
|
|
127
158
|
if (0, $7h5e1$isServer)
|
|
@@ -167,7 +198,7 @@ function $cd68097a7ee08669$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
167
198
|
}
|
|
168
199
|
});
|
|
169
200
|
}
|
|
170
|
-
const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.1.
|
|
201
|
+
const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.1.16";
|
|
171
202
|
function $5c4add0a8fe94894$export$9fac37a9c21c2f3b(props) {
|
|
172
203
|
return props.children;
|
|
173
204
|
}
|
package/server/latest/index.cjs
CHANGED
|
@@ -7,6 +7,7 @@ var $7QqFM$reactdomserver = require("react-dom/server");
|
|
|
7
7
|
var $7QqFM$solidjs = require("solid-js");
|
|
8
8
|
var $7QqFM$reactjsxruntime = require("react/jsx-runtime");
|
|
9
9
|
var $7QqFM$reactdom = require("react-dom");
|
|
10
|
+
var $7QqFM$depictaiuilocales = require("@depict-ai/ui/locales/latest");
|
|
10
11
|
require("../../multi_import_deduplicator.cjs").register_es_version("react-ui", "latest");
|
|
11
12
|
function $parcel$export(e, n, v, s) {
|
|
12
13
|
Object.defineProperty(e, n, {
|
|
@@ -134,11 +135,40 @@ async function $6081519c185fcf70$export$32024253978abdc7({
|
|
|
134
135
|
await react_has_ran_hooks; // After React has created elements it still takes some time to actually connect the refs and run the hooks. We don't want to replace placeholders before then.
|
|
135
136
|
return [solid_container];
|
|
136
137
|
}
|
|
138
|
+
const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
|
|
139
|
+
usedLocale: $7QqFM$solidjs.createSignal((0, $7QqFM$depictaiuilocales.defaultLocale)),
|
|
140
|
+
search_instances: new Map(),
|
|
141
|
+
category_instances: new Map(),
|
|
142
|
+
api: null,
|
|
143
|
+
dpc: null,
|
|
144
|
+
merchant: $7QqFM$solidjs.createSignal(),
|
|
145
|
+
market: $7QqFM$solidjs.createSignal(),
|
|
146
|
+
userId: $7QqFM$solidjs.createSignal(),
|
|
147
|
+
sessionId: $7QqFM$solidjs.createSignal(),
|
|
148
|
+
known_category_paths: new Set(),
|
|
149
|
+
search_page_path_: $7QqFM$solidjs.createSignal(),
|
|
150
|
+
search_page_in_dom: $7QqFM$solidjs.createSignal(false),
|
|
151
|
+
category_page_in_dom: $7QqFM$solidjs.createSignal(false),
|
|
152
|
+
provider_is_updating: $7QqFM$solidjs.createSignal(false),
|
|
153
|
+
enable_content_search: $7QqFM$solidjs.createSignal(),
|
|
154
|
+
category_meta_title_suffix: $7QqFM$solidjs.createSignal(),
|
|
155
|
+
disable_override_query_id: $7QqFM$solidjs.createSignal()
|
|
156
|
+
};
|
|
137
157
|
function $c6b960f2a07285c8$export$e46079a2793e9ec7(props, set_portals) {
|
|
138
158
|
const component_portals = new Set();
|
|
139
159
|
return $7QqFM$depictaiui.RecommendationGrid({
|
|
140
160
|
get recommendations() {
|
|
141
|
-
|
|
161
|
+
const recs = props.recommendations;
|
|
162
|
+
if ("then" in recs) return recs.then(displays => {
|
|
163
|
+
const transformFunction = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).api?.display_transformers?.products;
|
|
164
|
+
if (transformFunction) return transformFunction({
|
|
165
|
+
merchant: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).merchant[0](),
|
|
166
|
+
market: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).market[0](),
|
|
167
|
+
displays: displays
|
|
168
|
+
});
|
|
169
|
+
return displays;
|
|
170
|
+
});
|
|
171
|
+
return recs;
|
|
142
172
|
},
|
|
143
173
|
product_card_template: display => {
|
|
144
174
|
if (0, $7QqFM$solidjsweb.isServer)
|
|
@@ -182,7 +212,7 @@ function $c6b960f2a07285c8$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
182
212
|
}
|
|
183
213
|
});
|
|
184
214
|
}
|
|
185
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.
|
|
215
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.16";
|
|
186
216
|
function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
|
|
187
217
|
return props.children;
|
|
188
218
|
}
|
package/server/latest/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, ReactNode, FC, ReactPortal, ReactElement } fr
|
|
|
3
3
|
import { BaseProviderConfig, BaseSearchProviderConfig, BaseCategoryProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ImagePlaceholder as _ImagePlaceholder1, TextPlaceholder as _TextPlaceholder1, ExclusiveId, fetchDepictRecommendations } from "@depict-ai/ui/latest";
|
|
4
4
|
import { Locale } from "@depict-ai/ui/locales/latest";
|
|
5
5
|
import { Display, ModernDisplay } from "@depict-ai/utilishared/latest";
|
|
6
|
-
export const version = "2.1.
|
|
6
|
+
export const version = "2.1.16";
|
|
7
7
|
interface UsePerformanceClientReturn {
|
|
8
8
|
dpc: DPC;
|
|
9
9
|
}
|
package/server/latest/index.js
CHANGED
|
@@ -4,9 +4,10 @@ import { ImagePlaceholder as $eOXet$ImagePlaceholder, TextPlaceholder as $eOXet$
|
|
|
4
4
|
import { generateHydrationScript as $eOXet$generateHydrationScript, renderToString as $eOXet$renderToString, isServer as $eOXet$isServer } from "solid-js/web";
|
|
5
5
|
import { dwarn as $eOXet$dwarn } from "@depict-ai/utilishared/latest";
|
|
6
6
|
import { renderToString as $eOXet$renderToString1 } from "react-dom/server";
|
|
7
|
-
import { getOwner as $eOXet$getOwner, untrack as $eOXet$untrack, runWithOwner as $eOXet$runWithOwner, createEffect as $eOXet$createEffect, on as $eOXet$on, onCleanup as $eOXet$onCleanup } from "solid-js";
|
|
7
|
+
import { getOwner as $eOXet$getOwner, untrack as $eOXet$untrack, runWithOwner as $eOXet$runWithOwner, createEffect as $eOXet$createEffect, on as $eOXet$on, onCleanup as $eOXet$onCleanup, createSignal as $eOXet$createSignal } from "solid-js";
|
|
8
8
|
import { jsx as $eOXet$jsx } from "react/jsx-runtime";
|
|
9
9
|
import { createPortal as $eOXet$createPortal } from "react-dom";
|
|
10
|
+
import { defaultLocale as $eOXet$defaultLocale } from "@depict-ai/ui/locales/latest";
|
|
10
11
|
|
|
11
12
|
//"use client"; // <- opt out of react server components to the rendering method where components are rendered both on the client and on the server and then hydrated on the client, see https://www.joshwcomeau.com/react/server-components/#:~:text=Client%20Components%20render%20on%20both%20the%20client%20and%20the%20server.
|
|
12
13
|
// This "use client" actually just gets deleted by parcel, but I'm leaving it because we re-add it in the build scripts and this makes you more aware of that
|
|
@@ -111,11 +112,40 @@ async function $bcf84a32dc612a43$export$32024253978abdc7({
|
|
|
111
112
|
await react_has_ran_hooks; // After React has created elements it still takes some time to actually connect the refs and run the hooks. We don't want to replace placeholders before then.
|
|
112
113
|
return [solid_container];
|
|
113
114
|
}
|
|
115
|
+
const $42858f023ef23dab$export$8e769ad4338a911e = {
|
|
116
|
+
usedLocale: $eOXet$createSignal((0, $eOXet$defaultLocale)),
|
|
117
|
+
search_instances: new Map(),
|
|
118
|
+
category_instances: new Map(),
|
|
119
|
+
api: null,
|
|
120
|
+
dpc: null,
|
|
121
|
+
merchant: $eOXet$createSignal(),
|
|
122
|
+
market: $eOXet$createSignal(),
|
|
123
|
+
userId: $eOXet$createSignal(),
|
|
124
|
+
sessionId: $eOXet$createSignal(),
|
|
125
|
+
known_category_paths: new Set(),
|
|
126
|
+
search_page_path_: $eOXet$createSignal(),
|
|
127
|
+
search_page_in_dom: $eOXet$createSignal(false),
|
|
128
|
+
category_page_in_dom: $eOXet$createSignal(false),
|
|
129
|
+
provider_is_updating: $eOXet$createSignal(false),
|
|
130
|
+
enable_content_search: $eOXet$createSignal(),
|
|
131
|
+
category_meta_title_suffix: $eOXet$createSignal(),
|
|
132
|
+
disable_override_query_id: $eOXet$createSignal()
|
|
133
|
+
};
|
|
114
134
|
function $4d5c3f13a5ae62a7$export$e46079a2793e9ec7(props, set_portals) {
|
|
115
135
|
const component_portals = new Set();
|
|
116
136
|
return $eOXet$RecommendationGrid({
|
|
117
137
|
get recommendations() {
|
|
118
|
-
|
|
138
|
+
const recs = props.recommendations;
|
|
139
|
+
if ("then" in recs) return recs.then(displays => {
|
|
140
|
+
const transformFunction = (0, $42858f023ef23dab$export$8e769ad4338a911e).api?.display_transformers?.products;
|
|
141
|
+
if (transformFunction) return transformFunction({
|
|
142
|
+
merchant: (0, $42858f023ef23dab$export$8e769ad4338a911e).merchant[0](),
|
|
143
|
+
market: (0, $42858f023ef23dab$export$8e769ad4338a911e).market[0](),
|
|
144
|
+
displays: displays
|
|
145
|
+
});
|
|
146
|
+
return displays;
|
|
147
|
+
});
|
|
148
|
+
return recs;
|
|
119
149
|
},
|
|
120
150
|
product_card_template: display => {
|
|
121
151
|
if (0, $eOXet$isServer)
|
|
@@ -159,7 +189,7 @@ function $4d5c3f13a5ae62a7$export$e46079a2793e9ec7(props, set_portals) {
|
|
|
159
189
|
}
|
|
160
190
|
});
|
|
161
191
|
}
|
|
162
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.
|
|
192
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.16";
|
|
163
193
|
function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
|
|
164
194
|
return props.children;
|
|
165
195
|
}
|