@overmap-ai/blocks 1.0.30 → 1.0.31-fix-error-boundary.1
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.
|
@@ -3,5 +3,5 @@ interface ErrorBoundaryProps extends React.PropsWithChildren {
|
|
|
3
3
|
absoluteCentering?: boolean;
|
|
4
4
|
message?: string;
|
|
5
5
|
}
|
|
6
|
-
declare const OvermapErrorBoundary: React.MemoExoticComponent<(props: ErrorBoundaryProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
-
export
|
|
6
|
+
export declare const OvermapErrorBoundary: React.MemoExoticComponent<(props: ErrorBoundaryProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export {};
|
package/dist/blocks.js
CHANGED
|
@@ -2759,7 +2759,6 @@ const OvermapErrorBoundary = memo((props) => {
|
|
|
2759
2759
|
const [attempt, setAttempt] = React.useState(0);
|
|
2760
2760
|
const logError = useCallback((error, info) => {
|
|
2761
2761
|
console.error(error, info);
|
|
2762
|
-
setAttempt((prev) => prev + 1);
|
|
2763
2762
|
}, []);
|
|
2764
2763
|
const handleRetry = useCallback(() => {
|
|
2765
2764
|
setAttempt((prev) => prev + 1);
|
|
@@ -2767,7 +2766,15 @@ const OvermapErrorBoundary = memo((props) => {
|
|
|
2767
2766
|
return /* @__PURE__ */ jsx(
|
|
2768
2767
|
ErrorBoundary,
|
|
2769
2768
|
{
|
|
2770
|
-
fallback: /* @__PURE__ */ jsx(
|
|
2769
|
+
fallback: /* @__PURE__ */ jsx(
|
|
2770
|
+
ErrorFallback,
|
|
2771
|
+
{
|
|
2772
|
+
absoluteCentering,
|
|
2773
|
+
message,
|
|
2774
|
+
onRetry: handleRetry
|
|
2775
|
+
},
|
|
2776
|
+
attempt
|
|
2777
|
+
),
|
|
2771
2778
|
onError: logError,
|
|
2772
2779
|
children: props.children
|
|
2773
2780
|
},
|
|
@@ -5057,6 +5064,7 @@ export {
|
|
|
5057
5064
|
DropdownMenu as OvermapDropdownMenu,
|
|
5058
5065
|
DropdownMultiSelect as OvermapDropdownMultiSelect,
|
|
5059
5066
|
DropdownSelect as OvermapDropdownSelect,
|
|
5067
|
+
OvermapErrorBoundary,
|
|
5060
5068
|
OvermapInputItem,
|
|
5061
5069
|
OvermapItem,
|
|
5062
5070
|
OvermapItemGroup,
|