@depict-ai/react-ui 2.0.9 → 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 +374 -140
- package/dist/module.js +364 -139
- package/dist/styles/components/PLP/Buttons.scss +93 -36
- package/dist/styles/components/PLP/MorphingSign.scss +2 -3
- package/dist/styles/components/PLP/PLPResults.scss +6 -0
- package/dist/styles/components/PLP/ProductListingPage.scss +28 -2
- package/dist/styles/components/PLP/ScrollStatus.scss +8 -1
- package/dist/styles/components/PLP/SelectedFilters.scss +10 -2
- package/dist/styles/components/PLP/SlidableItems.scss +22 -0
- package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +9 -0
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +90 -18
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +2 -4
- package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +6 -2
- package/dist/styles/components/PLP/Toast.scss +5 -0
- package/dist/styles/components/PLP/index.scss +12 -6
- package/dist/styles/components/category/BreadCrumbs.scss +13 -4
- package/dist/styles/components/category/CategoryTitle.scss +14 -2
- package/dist/styles/components/category/QuickLinks.scss +16 -7
- package/dist/styles/components/category/index.scss +5 -5
- package/dist/styles/components/search/Autocomplete.scss +99 -19
- package/dist/styles/components/search/CategorySuggestions.scss +8 -0
- package/dist/styles/components/search/InstantCard.scss +7 -2
- package/dist/styles/components/search/InstantResults.scss +2 -0
- package/dist/styles/components/search/PreviousSearches.scss +17 -4
- package/dist/styles/components/search/QueryInput.scss +28 -6
- package/dist/styles/components/search/SearchModal.scss +16 -10
- package/dist/styles/components/search/SearchRecommendations.scss +3 -0
- package/dist/styles/components/search/ShowingResultsFor.scss +3 -0
- package/dist/styles/components/search/index.scss +5 -5
- package/dist/styles/default.css +1 -1
- package/dist/styles/helpers/custom_input.scss +38 -6
- package/dist/styles/helpers/supports-hover.scss +2 -0
- package/dist/styles/helpers/utils.scss +9 -1
- package/dist/styles/variables.scss +17 -3
- package/latest/index.cjs +17 -7
- package/latest/index.d.ts +1 -1
- package/latest/index.js +18 -8
- package/package.json +2 -2
- 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/server/ES10/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var $aNCHr$react = require("react");
|
|
2
2
|
var $aNCHr$depictaiui = require("@depict-ai/ui/ES10");
|
|
3
3
|
var $aNCHr$solidjsweb = require("solid-js/web");
|
|
4
|
-
var $aNCHr$solidjs = require("solid-js");
|
|
5
4
|
var $aNCHr$reactdomserver = require("react-dom/server");
|
|
5
|
+
var $aNCHr$solidjs = require("solid-js");
|
|
6
6
|
var $aNCHr$reactjsxruntime = require("react/jsx-runtime");
|
|
7
7
|
var $aNCHr$reactdom = require("react-dom");
|
|
8
8
|
require("../../multi_import_deduplicator.cjs").register_es_version("react-ui", "ES10");
|
|
@@ -78,16 +78,19 @@ async function $99405615baa3d774$export$79c79419c1ef0081(_ref) {
|
|
|
78
78
|
display: display,
|
|
79
79
|
component_portals: component_portals,
|
|
80
80
|
set_portals: set_portals,
|
|
81
|
-
|
|
81
|
+
get_react_template: get_react_template
|
|
82
82
|
} = _ref;
|
|
83
83
|
let set_react_has_ran_hooks;
|
|
84
84
|
let was_cleaned_up = false;
|
|
85
85
|
const react_has_ran_hooks = new Promise(r => set_react_has_ran_hooks = r);
|
|
86
86
|
const solid_container = document.createElement("div");
|
|
87
|
+
let call_when_template_changes;
|
|
87
88
|
const owner = $aNCHr$solidjs.getOwner();
|
|
88
89
|
const reactProductCard = $aNCHr$reactjsxruntime.jsx(props => {
|
|
89
90
|
// Sneak in a hook into their product card component to know once react has finished rendering and running hooks
|
|
90
91
|
$aNCHr$react.useEffect(set_react_has_ran_hooks, []);
|
|
92
|
+
const [react_template, set_react_template] = $aNCHr$react.useState(() => $aNCHr$solidjs.untrack(get_react_template));
|
|
93
|
+
call_when_template_changes = set_react_template;
|
|
91
94
|
return react_template(props);
|
|
92
95
|
}, {
|
|
93
96
|
display: display
|
|
@@ -102,6 +105,16 @@ async function $99405615baa3d774$export$79c79419c1ef0081(_ref) {
|
|
|
102
105
|
const portal = $aNCHr$reactdom.createPortal(reactProductCardInErrorBoundary, solid_container);
|
|
103
106
|
component_portals.add(portal);
|
|
104
107
|
set_portals([...component_portals]);
|
|
108
|
+
$aNCHr$solidjs.createEffect($aNCHr$solidjs.on(get_react_template, new_template => queueMicrotask(() => {
|
|
109
|
+
var _call_when_template_c;
|
|
110
|
+
return (
|
|
111
|
+
// 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"
|
|
112
|
+
// Therefore do it after a microtask to evade detection
|
|
113
|
+
(_call_when_template_c = call_when_template_changes) === null || _call_when_template_c === void 0 ? void 0 : _call_when_template_c(() => new_template)
|
|
114
|
+
);
|
|
115
|
+
}), {
|
|
116
|
+
defer: true
|
|
117
|
+
})); // If we get a new template. call the useState hook thing so we correctly re-execute with the new template
|
|
105
118
|
$aNCHr$solidjs.onCleanup(() => {
|
|
106
119
|
was_cleaned_up = true;
|
|
107
120
|
// 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
|
|
@@ -129,7 +142,7 @@ function $27d583018ba6e604$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
129
142
|
};
|
|
130
143
|
return $99405615baa3d774$export$79c79419c1ef0081({
|
|
131
144
|
display: display,
|
|
132
|
-
|
|
145
|
+
get_react_template: () => props.productCard,
|
|
133
146
|
component_portals: component_portals,
|
|
134
147
|
set_portals: set_portals
|
|
135
148
|
});
|
|
@@ -157,7 +170,7 @@ function $27d583018ba6e604$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
157
170
|
}
|
|
158
171
|
});
|
|
159
172
|
}
|
|
160
|
-
const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.0.
|
|
173
|
+
const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.0.11";
|
|
161
174
|
function $202459d454907b31$export$9fac37a9c21c2f3b(props) {
|
|
162
175
|
return props.children;
|
|
163
176
|
}
|
package/server/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/server/ES10/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createElement as $7h5e1$createElement, useRef as $7h5e1$useRef, Fragment as $7h5e1$Fragment, useEffect as $7h5e1$useEffect, Component as $7h5e1$Component } from "react";
|
|
1
|
+
import { createElement as $7h5e1$createElement, useRef as $7h5e1$useRef, Fragment as $7h5e1$Fragment, useEffect as $7h5e1$useEffect, useState as $7h5e1$useState, Component as $7h5e1$Component } from "react";
|
|
2
2
|
import { ImagePlaceholder as $7h5e1$ImagePlaceholder, TextPlaceholder as $7h5e1$TextPlaceholder, RecommendationGrid as $7h5e1$RecommendationGrid, defaultColsAtSize as $7h5e1$defaultColsAtSize, defaultGridSpacing as $7h5e1$defaultGridSpacing, ProductCardError as $7h5e1$ProductCardError } from "@depict-ai/ui/ES10";
|
|
3
3
|
import { renderToString as $7h5e1$renderToString, generateHydrationScript as $7h5e1$generateHydrationScript, isServer as $7h5e1$isServer } from "solid-js/web";
|
|
4
|
-
import { untrack as $7h5e1$untrack, getOwner as $7h5e1$getOwner, runWithOwner as $7h5e1$runWithOwner, onCleanup as $7h5e1$onCleanup } from "solid-js";
|
|
5
4
|
import { renderToString as $7h5e1$renderToString1 } from "react-dom/server";
|
|
5
|
+
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";
|
|
6
6
|
import { jsx as $7h5e1$jsx } from "react/jsx-runtime";
|
|
7
7
|
import { createPortal as $7h5e1$createPortal } from "react-dom";
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
@@ -55,16 +55,19 @@ async function $6593e4e126cb318f$export$79c79419c1ef0081(_ref) {
|
|
|
55
55
|
display: display,
|
|
56
56
|
component_portals: component_portals,
|
|
57
57
|
set_portals: set_portals,
|
|
58
|
-
|
|
58
|
+
get_react_template: get_react_template
|
|
59
59
|
} = _ref;
|
|
60
60
|
let set_react_has_ran_hooks;
|
|
61
61
|
let was_cleaned_up = false;
|
|
62
62
|
const react_has_ran_hooks = new Promise(r => set_react_has_ran_hooks = r);
|
|
63
63
|
const solid_container = document.createElement("div");
|
|
64
|
+
let call_when_template_changes;
|
|
64
65
|
const owner = $7h5e1$getOwner();
|
|
65
66
|
const reactProductCard = $7h5e1$jsx(props => {
|
|
66
67
|
// Sneak in a hook into their product card component to know once react has finished rendering and running hooks
|
|
67
68
|
$7h5e1$useEffect(set_react_has_ran_hooks, []);
|
|
69
|
+
const [react_template, set_react_template] = $7h5e1$useState(() => $7h5e1$untrack(get_react_template));
|
|
70
|
+
call_when_template_changes = set_react_template;
|
|
68
71
|
return react_template(props);
|
|
69
72
|
}, {
|
|
70
73
|
display: display
|
|
@@ -79,6 +82,16 @@ async function $6593e4e126cb318f$export$79c79419c1ef0081(_ref) {
|
|
|
79
82
|
const portal = $7h5e1$createPortal(reactProductCardInErrorBoundary, solid_container);
|
|
80
83
|
component_portals.add(portal);
|
|
81
84
|
set_portals([...component_portals]);
|
|
85
|
+
$7h5e1$createEffect($7h5e1$on(get_react_template, new_template => queueMicrotask(() => {
|
|
86
|
+
var _call_when_template_c;
|
|
87
|
+
return (
|
|
88
|
+
// 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"
|
|
89
|
+
// Therefore do it after a microtask to evade detection
|
|
90
|
+
(_call_when_template_c = call_when_template_changes) === null || _call_when_template_c === void 0 ? void 0 : _call_when_template_c(() => new_template)
|
|
91
|
+
);
|
|
92
|
+
}), {
|
|
93
|
+
defer: true
|
|
94
|
+
})); // If we get a new template. call the useState hook thing so we correctly re-execute with the new template
|
|
82
95
|
$7h5e1$onCleanup(() => {
|
|
83
96
|
was_cleaned_up = true;
|
|
84
97
|
// 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
|
|
@@ -106,7 +119,7 @@ function $48b0916cc674770c$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
106
119
|
};
|
|
107
120
|
return $6593e4e126cb318f$export$79c79419c1ef0081({
|
|
108
121
|
display: display,
|
|
109
|
-
|
|
122
|
+
get_react_template: () => props.productCard,
|
|
110
123
|
component_portals: component_portals,
|
|
111
124
|
set_portals: set_portals
|
|
112
125
|
});
|
|
@@ -134,7 +147,7 @@ function $48b0916cc674770c$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
134
147
|
}
|
|
135
148
|
});
|
|
136
149
|
}
|
|
137
|
-
const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.0.
|
|
150
|
+
const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.0.11";
|
|
138
151
|
function $5c4add0a8fe94894$export$9fac37a9c21c2f3b(props) {
|
|
139
152
|
return props.children;
|
|
140
153
|
}
|
package/server/latest/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var $7QqFM$react = require("react");
|
|
2
2
|
var $7QqFM$depictaiui = require("@depict-ai/ui/latest");
|
|
3
3
|
var $7QqFM$solidjsweb = require("solid-js/web");
|
|
4
|
-
var $7QqFM$solidjs = require("solid-js");
|
|
5
4
|
var $7QqFM$reactdomserver = require("react-dom/server");
|
|
5
|
+
var $7QqFM$solidjs = require("solid-js");
|
|
6
6
|
var $7QqFM$reactjsxruntime = require("react/jsx-runtime");
|
|
7
7
|
var $7QqFM$reactdom = require("react-dom");
|
|
8
8
|
require("../../multi_import_deduplicator.cjs").register_es_version("react-ui", "latest");
|
|
@@ -76,16 +76,19 @@ async function $ecaac5ceddb08f39$export$79c79419c1ef0081({
|
|
|
76
76
|
display: display,
|
|
77
77
|
component_portals: component_portals,
|
|
78
78
|
set_portals: set_portals,
|
|
79
|
-
|
|
79
|
+
get_react_template: get_react_template
|
|
80
80
|
}) {
|
|
81
81
|
let set_react_has_ran_hooks;
|
|
82
82
|
let was_cleaned_up = false;
|
|
83
83
|
const react_has_ran_hooks = new Promise(r => set_react_has_ran_hooks = r);
|
|
84
84
|
const solid_container = document.createElement("div");
|
|
85
|
+
let call_when_template_changes;
|
|
85
86
|
const owner = $7QqFM$solidjs.getOwner();
|
|
86
87
|
const reactProductCard = $7QqFM$reactjsxruntime.jsx(props => {
|
|
87
88
|
// Sneak in a hook into their product card component to know once react has finished rendering and running hooks
|
|
88
89
|
$7QqFM$react.useEffect(set_react_has_ran_hooks, []);
|
|
90
|
+
const [react_template, set_react_template] = $7QqFM$react.useState(() => $7QqFM$solidjs.untrack(get_react_template));
|
|
91
|
+
call_when_template_changes = set_react_template;
|
|
89
92
|
return react_template(props);
|
|
90
93
|
}, {
|
|
91
94
|
display: display
|
|
@@ -100,6 +103,13 @@ async function $ecaac5ceddb08f39$export$79c79419c1ef0081({
|
|
|
100
103
|
const portal = $7QqFM$reactdom.createPortal(reactProductCardInErrorBoundary, solid_container);
|
|
101
104
|
component_portals.add(portal);
|
|
102
105
|
set_portals([...component_portals]);
|
|
106
|
+
$7QqFM$solidjs.createEffect($7QqFM$solidjs.on(get_react_template, new_template => queueMicrotask(() =>
|
|
107
|
+
// When the parent react component re-executes and provides a new product card, we want our react portal to also re-render
|
|
108
|
+
// 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"
|
|
109
|
+
// Therefore do it after a microtask to evade detection
|
|
110
|
+
call_when_template_changes?.(() => new_template)), {
|
|
111
|
+
defer: true
|
|
112
|
+
})); // If we get a new template. call the useState hook thing so we correctly re-execute with the new template
|
|
103
113
|
$7QqFM$solidjs.onCleanup(() => {
|
|
104
114
|
was_cleaned_up = true;
|
|
105
115
|
// 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
|
|
@@ -127,7 +137,7 @@ function $0aaa03f81d756b85$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
127
137
|
};
|
|
128
138
|
return $ecaac5ceddb08f39$export$79c79419c1ef0081({
|
|
129
139
|
display: display,
|
|
130
|
-
|
|
140
|
+
get_react_template: () => props.productCard,
|
|
131
141
|
component_portals: component_portals,
|
|
132
142
|
set_portals: set_portals
|
|
133
143
|
});
|
|
@@ -153,7 +163,7 @@ function $0aaa03f81d756b85$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
153
163
|
}
|
|
154
164
|
});
|
|
155
165
|
}
|
|
156
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "2.0.
|
|
166
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "2.0.11";
|
|
157
167
|
function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
|
|
158
168
|
return props.children;
|
|
159
169
|
}
|
package/server/latest/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/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.0.
|
|
6
|
+
export const version = "2.0.11";
|
|
7
7
|
interface UsePerformanceClientReturn {
|
|
8
8
|
dpc: DPC;
|
|
9
9
|
}
|
package/server/latest/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createElement as $eOXet$createElement, useRef as $eOXet$useRef, Fragment as $eOXet$Fragment, useEffect as $eOXet$useEffect, Component as $eOXet$Component } from "react";
|
|
1
|
+
import { createElement as $eOXet$createElement, useRef as $eOXet$useRef, Fragment as $eOXet$Fragment, useEffect as $eOXet$useEffect, useState as $eOXet$useState, Component as $eOXet$Component } from "react";
|
|
2
2
|
import { ImagePlaceholder as $eOXet$ImagePlaceholder, TextPlaceholder as $eOXet$TextPlaceholder, RecommendationGrid as $eOXet$RecommendationGrid, defaultColsAtSize as $eOXet$defaultColsAtSize, defaultGridSpacing as $eOXet$defaultGridSpacing, ProductCardError as $eOXet$ProductCardError } from "@depict-ai/ui/latest";
|
|
3
3
|
import { renderToString as $eOXet$renderToString, generateHydrationScript as $eOXet$generateHydrationScript, isServer as $eOXet$isServer } from "solid-js/web";
|
|
4
|
-
import { untrack as $eOXet$untrack, getOwner as $eOXet$getOwner, runWithOwner as $eOXet$runWithOwner, onCleanup as $eOXet$onCleanup } from "solid-js";
|
|
5
4
|
import { renderToString as $eOXet$renderToString1 } from "react-dom/server";
|
|
5
|
+
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";
|
|
6
6
|
import { jsx as $eOXet$jsx } from "react/jsx-runtime";
|
|
7
7
|
import { createPortal as $eOXet$createPortal } from "react-dom";
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
@@ -53,16 +53,19 @@ async function $75f1064c8b836348$export$79c79419c1ef0081({
|
|
|
53
53
|
display: display,
|
|
54
54
|
component_portals: component_portals,
|
|
55
55
|
set_portals: set_portals,
|
|
56
|
-
|
|
56
|
+
get_react_template: get_react_template
|
|
57
57
|
}) {
|
|
58
58
|
let set_react_has_ran_hooks;
|
|
59
59
|
let was_cleaned_up = false;
|
|
60
60
|
const react_has_ran_hooks = new Promise(r => set_react_has_ran_hooks = r);
|
|
61
61
|
const solid_container = document.createElement("div");
|
|
62
|
+
let call_when_template_changes;
|
|
62
63
|
const owner = $eOXet$getOwner();
|
|
63
64
|
const reactProductCard = $eOXet$jsx(props => {
|
|
64
65
|
// Sneak in a hook into their product card component to know once react has finished rendering and running hooks
|
|
65
66
|
$eOXet$useEffect(set_react_has_ran_hooks, []);
|
|
67
|
+
const [react_template, set_react_template] = $eOXet$useState(() => $eOXet$untrack(get_react_template));
|
|
68
|
+
call_when_template_changes = set_react_template;
|
|
66
69
|
return react_template(props);
|
|
67
70
|
}, {
|
|
68
71
|
display: display
|
|
@@ -77,6 +80,13 @@ async function $75f1064c8b836348$export$79c79419c1ef0081({
|
|
|
77
80
|
const portal = $eOXet$createPortal(reactProductCardInErrorBoundary, solid_container);
|
|
78
81
|
component_portals.add(portal);
|
|
79
82
|
set_portals([...component_portals]);
|
|
83
|
+
$eOXet$createEffect($eOXet$on(get_react_template, new_template => queueMicrotask(() =>
|
|
84
|
+
// When the parent react component re-executes and provides a new product card, we want our react portal to also re-render
|
|
85
|
+
// 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"
|
|
86
|
+
// Therefore do it after a microtask to evade detection
|
|
87
|
+
call_when_template_changes?.(() => new_template)), {
|
|
88
|
+
defer: true
|
|
89
|
+
})); // If we get a new template. call the useState hook thing so we correctly re-execute with the new template
|
|
80
90
|
$eOXet$onCleanup(() => {
|
|
81
91
|
was_cleaned_up = true;
|
|
82
92
|
// 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
|
|
@@ -104,7 +114,7 @@ function $8bee51f55543fe0c$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
104
114
|
};
|
|
105
115
|
return $75f1064c8b836348$export$79c79419c1ef0081({
|
|
106
116
|
display: display,
|
|
107
|
-
|
|
117
|
+
get_react_template: () => props.productCard,
|
|
108
118
|
component_portals: component_portals,
|
|
109
119
|
set_portals: set_portals
|
|
110
120
|
});
|
|
@@ -130,7 +140,7 @@ function $8bee51f55543fe0c$export$bd8acc07a8bae229(props, set_portals) {
|
|
|
130
140
|
}
|
|
131
141
|
});
|
|
132
142
|
}
|
|
133
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.0.
|
|
143
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.0.11";
|
|
134
144
|
function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
|
|
135
145
|
return props.children;
|
|
136
146
|
}
|