@depict-ai/react-ui 2.0.10 → 2.0.11
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 +22 -7
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +23 -8
- package/dist/main.js +527 -0
- package/dist/module.js +510 -0
- package/dist/styles/components/PLP/Buttons.scss +181 -0
- package/dist/styles/components/PLP/MorphingSign.scss +30 -0
- package/dist/styles/components/PLP/PLPResults.scss +26 -0
- package/dist/styles/components/PLP/ProductListingPage.scss +168 -0
- package/dist/styles/components/PLP/ScrollStatus.scss +31 -0
- package/dist/styles/components/PLP/SelectedFilters.scss +82 -0
- package/dist/styles/components/PLP/SlidableItems.scss +121 -0
- package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +84 -0
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +800 -0
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +158 -0
- package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +152 -0
- package/dist/styles/components/PLP/Toast.scss +59 -0
- package/dist/styles/components/PLP/index.scss +51 -0
- package/dist/styles/components/category/BreadCrumbs.scss +32 -0
- package/dist/styles/components/category/CategoryTitle.scss +40 -0
- package/dist/styles/components/category/QuickLinks.scss +80 -0
- package/dist/styles/components/category/index.scss +23 -0
- package/dist/styles/components/search/Autocomplete.scss +197 -0
- package/dist/styles/components/search/CategorySuggestions.scss +82 -0
- package/dist/styles/components/search/InstantCard.scss +122 -0
- package/dist/styles/components/search/InstantResults.scss +12 -0
- package/dist/styles/components/search/PreviousSearches.scss +90 -0
- package/dist/styles/components/search/QueryInput.scss +189 -0
- package/dist/styles/components/search/SearchModal.scss +101 -0
- package/dist/styles/components/search/SearchRecommendations.scss +28 -0
- package/dist/styles/components/search/ShowingResultsFor.scss +13 -0
- package/dist/styles/components/search/index.scss +40 -0
- package/dist/styles/default.css +1 -0
- package/dist/styles/helpers/custom_input.scss +194 -0
- package/dist/styles/helpers/supports-hover.scss +7 -0
- package/dist/styles/helpers/utils.scss +90 -0
- package/dist/styles/variables.scss +61 -0
- package/latest/index.cjs +17 -7
- package/latest/index.d.ts +1 -1
- package/latest/index.js +18 -8
- package/package.json +1 -1
- package/server/ES10/index.cjs +17 -4
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +18 -5
- package/server/latest/index.cjs +14 -4
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +15 -5
package/ES10/index.cjs
CHANGED
|
@@ -38,7 +38,7 @@ $parcel$export(module.exports, "version", () => $efbdd2dab4314170$export$83d89fb
|
|
|
38
38
|
$parcel$export(module.exports, "Navigation", () => $0d3a2413fdeb34b9$export$b8a61e5c71402559);
|
|
39
39
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
40
40
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
41
|
-
const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.0.
|
|
41
|
+
const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.0.11";
|
|
42
42
|
const $ef516b1f92253963$export$8e769ad4338a911e = {
|
|
43
43
|
usedLocale: $2kiy7$solidjs.createSignal((0, $2kiy7$depictaiuilocales.defaultLocale)),
|
|
44
44
|
search_instances: new Map(),
|
|
@@ -515,16 +515,19 @@ async function $99405615baa3d774$export$79c79419c1ef0081(_ref) {
|
|
|
515
515
|
display: display,
|
|
516
516
|
component_portals: component_portals,
|
|
517
517
|
set_portals: set_portals,
|
|
518
|
-
|
|
518
|
+
get_react_template: get_react_template
|
|
519
519
|
} = _ref;
|
|
520
520
|
let set_react_has_ran_hooks;
|
|
521
521
|
let was_cleaned_up = false;
|
|
522
522
|
const react_has_ran_hooks = new Promise(r => set_react_has_ran_hooks = r);
|
|
523
523
|
const solid_container = document.createElement("div");
|
|
524
|
+
let call_when_template_changes;
|
|
524
525
|
const owner = $2kiy7$solidjs.getOwner();
|
|
525
526
|
const reactProductCard = $2kiy7$reactjsxruntime.jsx(props => {
|
|
526
527
|
// Sneak in a hook into their product card component to know once react has finished rendering and running hooks
|
|
527
528
|
$2kiy7$react.useEffect(set_react_has_ran_hooks, []);
|
|
529
|
+
const [react_template, set_react_template] = $2kiy7$react.useState(() => $2kiy7$solidjs.untrack(get_react_template));
|
|
530
|
+
call_when_template_changes = set_react_template;
|
|
528
531
|
return react_template(props);
|
|
529
532
|
}, {
|
|
530
533
|
display: display
|
|
@@ -539,6 +542,16 @@ async function $99405615baa3d774$export$79c79419c1ef0081(_ref) {
|
|
|
539
542
|
const portal = $2kiy7$reactdom.createPortal(reactProductCardInErrorBoundary, solid_container);
|
|
540
543
|
component_portals.add(portal);
|
|
541
544
|
set_portals([...component_portals]);
|
|
545
|
+
$2kiy7$solidjs.createEffect($2kiy7$solidjs.on(get_react_template, new_template => queueMicrotask(() => {
|
|
546
|
+
var _call_when_template_c;
|
|
547
|
+
return (
|
|
548
|
+
// if we update the state inside the portal synchronously from the parent call react gets confused with "Warning: Cannot update a component (`Unknown`) while rendering a different component (`$48d7f568740a317d$export$f7d2f673fc2f091d`). To locate the bad setState() call inside `$48d7f568740a317d$export$f7d2f673fc2f091d`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render"
|
|
549
|
+
// Therefore do it after a microtask to evade detection
|
|
550
|
+
(_call_when_template_c = call_when_template_changes) === null || _call_when_template_c === void 0 ? void 0 : _call_when_template_c(() => new_template)
|
|
551
|
+
);
|
|
552
|
+
}), {
|
|
553
|
+
defer: true
|
|
554
|
+
})); // If we get a new template. call the useState hook thing so we correctly re-execute with the new template
|
|
542
555
|
$2kiy7$solidjs.onCleanup(() => {
|
|
543
556
|
was_cleaned_up = true;
|
|
544
557
|
// this will stop working after any await so be careful to not await before this, or you'll have to carry the owner over with getOwner and runWithOwner
|
|
@@ -615,7 +628,7 @@ function $735104b46c50160f$var$SolidSearchPage(props, set_portals) {
|
|
|
615
628
|
depict_search: depict_search(),
|
|
616
629
|
product_card_template: display => $99405615baa3d774$export$79c79419c1ef0081({
|
|
617
630
|
display: display,
|
|
618
|
-
|
|
631
|
+
get_react_template: () => props.productCard,
|
|
619
632
|
component_portals: component_portals,
|
|
620
633
|
set_portals: set_portals
|
|
621
634
|
})
|
|
@@ -645,7 +658,9 @@ const $15691268d8df90a9$var$rendered_components_with_state_key = new Set();
|
|
|
645
658
|
function $15691268d8df90a9$export$f7d2f673fc2f091d(props) {
|
|
646
659
|
return $e7ba61a7074c02d3$export$f6e64e17bd69eeef({
|
|
647
660
|
// @ts-ignore
|
|
648
|
-
solid_component:
|
|
661
|
+
solid_component: function () {
|
|
662
|
+
return $e7ba61a7074c02d3$export$e5139bbbb9a05035($15691268d8df90a9$var$SolidCategoryPage)(...arguments);
|
|
663
|
+
},
|
|
649
664
|
props: props,
|
|
650
665
|
wrapper_type: "div",
|
|
651
666
|
wrapper_style: {}
|
|
@@ -696,7 +711,7 @@ function $15691268d8df90a9$var$SolidCategoryPage(props, set_portals) {
|
|
|
696
711
|
},
|
|
697
712
|
product_card_template: display => $99405615baa3d774$export$79c79419c1ef0081({
|
|
698
713
|
display: display,
|
|
699
|
-
|
|
714
|
+
get_react_template: () => props.productCard,
|
|
700
715
|
component_portals: component_portals,
|
|
701
716
|
set_portals: set_portals
|
|
702
717
|
})
|
|
@@ -776,7 +791,7 @@ function $745b83c12baac3c0$export$5abb40edfde2a843(props, set_portals) {
|
|
|
776
791
|
},
|
|
777
792
|
product_card_template: display => $99405615baa3d774$export$79c79419c1ef0081({
|
|
778
793
|
display: display,
|
|
779
|
-
|
|
794
|
+
get_react_template: () => props.productCard,
|
|
780
795
|
component_portals: component_portals,
|
|
781
796
|
set_portals: set_portals
|
|
782
797
|
}),
|
|
@@ -806,7 +821,7 @@ function $27d583018ba6e604$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
806
821
|
};
|
|
807
822
|
return $99405615baa3d774$export$79c79419c1ef0081({
|
|
808
823
|
display: display,
|
|
809
|
-
|
|
824
|
+
get_react_template: () => props.productCard,
|
|
810
825
|
component_portals: component_portals,
|
|
811
826
|
set_portals: set_portals
|
|
812
827
|
});
|
package/ES10/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, ReactNode, ReactPortal, ReactElement } from "
|
|
|
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.0.
|
|
6
|
+
export const version = "2.0.11";
|
|
7
7
|
interface UsePerformanceClientReturn {
|
|
8
8
|
dpc: DPC;
|
|
9
9
|
}
|
package/ES10/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { add_to_version_info as $jb2Oo$add_to_version_info, catchify as $jb2Oo$catchify, queueMacroTask as $jb2Oo$queueMacroTask, instant_exec_on_suspect_history_change as $jb2Oo$instant_exec_on_suspect_history_change, derror as $jb2Oo$derror } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { CategoryTitle as $383b6fd56bf151bd$re_export$CategoryTitle, embedded_num_products as $383b6fd56bf151bd$re_export$EmbeddedNumProducts, DepictAPI as $jb2Oo$DepictAPI, DepictSearch as $jb2Oo$DepictSearch, DepictCategory as $jb2Oo$DepictCategory, get_search_query_updating_blocked_signal as $jb2Oo$get_search_query_updating_blocked_signal, SearchPage as $jb2Oo$SearchPage, defaultColsAtSize as $jb2Oo$defaultColsAtSize, defaultGridSpacing as $jb2Oo$defaultGridSpacing, ProductCardError as $jb2Oo$ProductCardError, CategoryPage as $jb2Oo$CategoryPage, defaultCategoryTitlePlugin as $jb2Oo$defaultCategoryTitlePlugin, BreadCrumbs as $jb2Oo$BreadCrumbs, QuickLinks as $jb2Oo$QuickLinks, ImagePlaceholder as $jb2Oo$ImagePlaceholder, TextPlaceholder as $jb2Oo$TextPlaceholder, RecommendationSlider as $jb2Oo$RecommendationSlider, RecommendationGrid as $jb2Oo$RecommendationGrid, open_modal_with_alignment as $jb2Oo$open_modal_with_alignment, SearchField as $jb2Oo$SearchField, fetchDepictRecommendations as $jb2Oo$fetchDepictRecommendations } from "@depict-ai/ui/ES10";
|
|
3
|
-
import { untrack as $jb2Oo$untrack, createRoot as $jb2Oo$createRoot, createEffect as $jb2Oo$createEffect, createMemo as $jb2Oo$createMemo, createComponent as $jb2Oo$createComponent, Show as $jb2Oo$Show, createSignal as $jb2Oo$createSignal, createComputed as $jb2Oo$createComputed, onCleanup as $jb2Oo$onCleanup, getOwner as $jb2Oo$getOwner, runWithOwner as $jb2Oo$runWithOwner } from "solid-js";
|
|
3
|
+
import { untrack as $jb2Oo$untrack, createRoot as $jb2Oo$createRoot, createEffect as $jb2Oo$createEffect, createMemo as $jb2Oo$createMemo, createComponent as $jb2Oo$createComponent, Show as $jb2Oo$Show, createSignal as $jb2Oo$createSignal, createComputed as $jb2Oo$createComputed, onCleanup as $jb2Oo$onCleanup, getOwner as $jb2Oo$getOwner, runWithOwner as $jb2Oo$runWithOwner, on as $jb2Oo$on } from "solid-js";
|
|
4
4
|
import { createElement as $jb2Oo$createElement, Fragment as $jb2Oo$Fragment, useEffect as $jb2Oo$useEffect, useState as $jb2Oo$useState, useRef as $jb2Oo$useRef, forwardRef as $jb2Oo$forwardRef, Component as $jb2Oo$Component, useCallback as $jb2Oo$useCallback } from "react";
|
|
5
5
|
import { defaultLocale as $jb2Oo$defaultLocale } from "@depict-ai/ui/locales/ES10";
|
|
6
6
|
import { render as $jb2Oo$render, hydrate as $jb2Oo$hydrate, isServer as $jb2Oo$isServer } from "solid-js/web";
|
|
@@ -14,7 +14,7 @@ import { renderToString as $jb2Oo$renderToString } from "react-dom/server";
|
|
|
14
14
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
15
15
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
16
16
|
register_es_version("react-ui", "ES10");
|
|
17
|
-
const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.0.
|
|
17
|
+
const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.0.11";
|
|
18
18
|
const $8c691d7f86317052$export$8e769ad4338a911e = {
|
|
19
19
|
usedLocale: $jb2Oo$createSignal((0, $jb2Oo$defaultLocale)),
|
|
20
20
|
search_instances: new Map(),
|
|
@@ -491,16 +491,19 @@ async function $6593e4e126cb318f$export$79c79419c1ef0081(_ref) {
|
|
|
491
491
|
display: display,
|
|
492
492
|
component_portals: component_portals,
|
|
493
493
|
set_portals: set_portals,
|
|
494
|
-
|
|
494
|
+
get_react_template: get_react_template
|
|
495
495
|
} = _ref;
|
|
496
496
|
let set_react_has_ran_hooks;
|
|
497
497
|
let was_cleaned_up = false;
|
|
498
498
|
const react_has_ran_hooks = new Promise(r => set_react_has_ran_hooks = r);
|
|
499
499
|
const solid_container = document.createElement("div");
|
|
500
|
+
let call_when_template_changes;
|
|
500
501
|
const owner = $jb2Oo$getOwner();
|
|
501
502
|
const reactProductCard = $jb2Oo$jsx(props => {
|
|
502
503
|
// Sneak in a hook into their product card component to know once react has finished rendering and running hooks
|
|
503
504
|
$jb2Oo$useEffect(set_react_has_ran_hooks, []);
|
|
505
|
+
const [react_template, set_react_template] = $jb2Oo$useState(() => $jb2Oo$untrack(get_react_template));
|
|
506
|
+
call_when_template_changes = set_react_template;
|
|
504
507
|
return react_template(props);
|
|
505
508
|
}, {
|
|
506
509
|
display: display
|
|
@@ -515,6 +518,16 @@ async function $6593e4e126cb318f$export$79c79419c1ef0081(_ref) {
|
|
|
515
518
|
const portal = $jb2Oo$createPortal(reactProductCardInErrorBoundary, solid_container);
|
|
516
519
|
component_portals.add(portal);
|
|
517
520
|
set_portals([...component_portals]);
|
|
521
|
+
$jb2Oo$createEffect($jb2Oo$on(get_react_template, new_template => queueMicrotask(() => {
|
|
522
|
+
var _call_when_template_c;
|
|
523
|
+
return (
|
|
524
|
+
// if we update the state inside the portal synchronously from the parent call react gets confused with "Warning: Cannot update a component (`Unknown`) while rendering a different component (`$48d7f568740a317d$export$f7d2f673fc2f091d`). To locate the bad setState() call inside `$48d7f568740a317d$export$f7d2f673fc2f091d`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render"
|
|
525
|
+
// Therefore do it after a microtask to evade detection
|
|
526
|
+
(_call_when_template_c = call_when_template_changes) === null || _call_when_template_c === void 0 ? void 0 : _call_when_template_c(() => new_template)
|
|
527
|
+
);
|
|
528
|
+
}), {
|
|
529
|
+
defer: true
|
|
530
|
+
})); // If we get a new template. call the useState hook thing so we correctly re-execute with the new template
|
|
518
531
|
$jb2Oo$onCleanup(() => {
|
|
519
532
|
was_cleaned_up = true;
|
|
520
533
|
// this will stop working after any await so be careful to not await before this, or you'll have to carry the owner over with getOwner and runWithOwner
|
|
@@ -591,7 +604,7 @@ function $d059770e7af9e2dc$var$SolidSearchPage(props, set_portals) {
|
|
|
591
604
|
depict_search: depict_search(),
|
|
592
605
|
product_card_template: display => $6593e4e126cb318f$export$79c79419c1ef0081({
|
|
593
606
|
display: display,
|
|
594
|
-
|
|
607
|
+
get_react_template: () => props.productCard,
|
|
595
608
|
component_portals: component_portals,
|
|
596
609
|
set_portals: set_portals
|
|
597
610
|
})
|
|
@@ -621,7 +634,9 @@ const $e86a296a07b17ad5$var$rendered_components_with_state_key = new Set();
|
|
|
621
634
|
function $e86a296a07b17ad5$export$f7d2f673fc2f091d(props) {
|
|
622
635
|
return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
|
|
623
636
|
// @ts-ignore
|
|
624
|
-
solid_component:
|
|
637
|
+
solid_component: function () {
|
|
638
|
+
return $0dd9d9a9c7da4c1d$export$e5139bbbb9a05035($e86a296a07b17ad5$var$SolidCategoryPage)(...arguments);
|
|
639
|
+
},
|
|
625
640
|
props: props,
|
|
626
641
|
wrapper_type: "div",
|
|
627
642
|
wrapper_style: {}
|
|
@@ -672,7 +687,7 @@ function $e86a296a07b17ad5$var$SolidCategoryPage(props, set_portals) {
|
|
|
672
687
|
},
|
|
673
688
|
product_card_template: display => $6593e4e126cb318f$export$79c79419c1ef0081({
|
|
674
689
|
display: display,
|
|
675
|
-
|
|
690
|
+
get_react_template: () => props.productCard,
|
|
676
691
|
component_portals: component_portals,
|
|
677
692
|
set_portals: set_portals
|
|
678
693
|
})
|
|
@@ -752,7 +767,7 @@ function $c02e9fd51f31a1bd$export$5abb40edfde2a843(props, set_portals) {
|
|
|
752
767
|
},
|
|
753
768
|
product_card_template: display => $6593e4e126cb318f$export$79c79419c1ef0081({
|
|
754
769
|
display: display,
|
|
755
|
-
|
|
770
|
+
get_react_template: () => props.productCard,
|
|
756
771
|
component_portals: component_portals,
|
|
757
772
|
set_portals: set_portals
|
|
758
773
|
}),
|
|
@@ -782,7 +797,7 @@ function $48b0916cc674770c$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
782
797
|
};
|
|
783
798
|
return $6593e4e126cb318f$export$79c79419c1ef0081({
|
|
784
799
|
display: display,
|
|
785
|
-
|
|
800
|
+
get_react_template: () => props.productCard,
|
|
786
801
|
component_portals: component_portals,
|
|
787
802
|
set_portals: set_portals
|
|
788
803
|
});
|