@overmap-ai/blocks 1.0.19 → 1.0.20

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.
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("@radix-ui/themes"), require("react"), require("react-responsive"), require("@radix-ui/react-icons"), require("@radix-ui/react-dropdown-menu"), require("react-device-detect"), require("@radix-ui/react-dialog"), require("re-resizable"), require("@radix-ui/react-dismissable-layer"), require("react-transition-group"), require("@radix-ui/react-toggle-group"), require("@radix-ui/react-toolbar"), require("@radix-ui/react-toast"), require("react-dom"), require("@table-library/react-table-library/table.js"), require("@table-library/react-table-library/theme.js"), require("@table-library/react-table-library/sort.js"), require("@table-library/react-table-library/select.js"), require("@table-library/react-table-library/pagination.js")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "@radix-ui/themes", "react", "react-responsive", "@radix-ui/react-icons", "@radix-ui/react-dropdown-menu", "react-device-detect", "@radix-ui/react-dialog", "re-resizable", "@radix-ui/react-dismissable-layer", "react-transition-group", "@radix-ui/react-toggle-group", "@radix-ui/react-toolbar", "@radix-ui/react-toast", "react-dom", "@table-library/react-table-library/table.js", "@table-library/react-table-library/theme.js", "@table-library/react-table-library/sort.js", "@table-library/react-table-library/select.js", "@table-library/react-table-library/pagination.js"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.blocks = {}, global.jsxRuntime, global.themes, global.React, global.reactResponsive, global.reactIcons, global.RadixDropdownMenu, global.reactDeviceDetect, global.RadixDialogPrimitive, global.reResizable, global.reactDismissableLayer, global.reactTransitionGroup, global.reactToggleGroup, global.reactToolbar, global.RadixToast, global.reactDom, global.table_js, global.theme_js, global.sort_js, global.select_js, global.pagination_js));
3
- })(this, function(exports2, jsxRuntime, themes, React, reactResponsive, reactIcons, RadixDropdownMenu, reactDeviceDetect, RadixDialogPrimitive, reResizable, reactDismissableLayer, reactTransitionGroup, reactToggleGroup, reactToolbar, RadixToast, reactDom, table_js, theme_js, sort_js, select_js, pagination_js) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("@radix-ui/themes"), require("react"), require("react-responsive"), require("@radix-ui/react-icons"), require("@radix-ui/react-dropdown-menu"), require("react-device-detect"), require("@radix-ui/react-dialog"), require("re-resizable"), require("@radix-ui/react-dismissable-layer"), require("react-transition-group"), require("@radix-ui/react-toggle-group"), require("@radix-ui/react-toolbar"), require("@radix-ui/react-toast"), require("react-error-boundary"), require("feather-icons-react"), require("react-dom"), require("@table-library/react-table-library/table.js"), require("@table-library/react-table-library/theme.js"), require("@table-library/react-table-library/sort.js"), require("@table-library/react-table-library/select.js"), require("@table-library/react-table-library/pagination.js")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "@radix-ui/themes", "react", "react-responsive", "@radix-ui/react-icons", "@radix-ui/react-dropdown-menu", "react-device-detect", "@radix-ui/react-dialog", "re-resizable", "@radix-ui/react-dismissable-layer", "react-transition-group", "@radix-ui/react-toggle-group", "@radix-ui/react-toolbar", "@radix-ui/react-toast", "react-error-boundary", "feather-icons-react", "react-dom", "@table-library/react-table-library/table.js", "@table-library/react-table-library/theme.js", "@table-library/react-table-library/sort.js", "@table-library/react-table-library/select.js", "@table-library/react-table-library/pagination.js"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.blocks = {}, global.jsxRuntime, global.themes, global.React, global.reactResponsive, global.reactIcons, global.RadixDropdownMenu, global.reactDeviceDetect, global.RadixDialogPrimitive, global.reResizable, global.reactDismissableLayer, global.reactTransitionGroup, global.reactToggleGroup, global.reactToolbar, global.RadixToast, global.reactErrorBoundary, global.FeatherIcon, global.reactDom, global.table_js, global.theme_js, global.sort_js, global.select_js, global.pagination_js));
3
+ })(this, function(exports2, jsxRuntime, themes, React, reactResponsive, reactIcons, RadixDropdownMenu, reactDeviceDetect, RadixDialogPrimitive, reResizable, reactDismissableLayer, reactTransitionGroup, reactToggleGroup, reactToolbar, RadixToast, reactErrorBoundary, FeatherIcon, reactDom, table_js, theme_js, sort_js, select_js, pagination_js) {
4
4
  "use strict";
5
5
  function _interopNamespaceDefault(e) {
6
6
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -2261,6 +2261,39 @@
2261
2261
  );
2262
2262
  });
2263
2263
  const Separator = React.memo(_Separator);
2264
+ const centerStyles = { placeSelf: "center" };
2265
+ const ErrorFallback = React.memo((props) => {
2266
+ const { absoluteCentering } = props;
2267
+ const { resetBoundary } = reactErrorBoundary.useErrorBoundary();
2268
+ const height = "20px";
2269
+ const outerFlexStyles = absoluteCentering ? { position: "absolute", top: "50%", transform: "translateY(-50%)" } : void 0;
2270
+ return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "2", direction: "row", width: "100%", style: outerFlexStyles, children: [
2271
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexGrow: 1 } }),
2272
+ /* @__PURE__ */ jsxRuntime.jsx(FeatherIcon, { icon: "alert-triangle", size: height, style: centerStyles }),
2273
+ /* @__PURE__ */ jsxRuntime.jsx(Text$1, { style: { lineHeight: height, ...centerStyles }, children: "Something went wrong" }),
2274
+ /* @__PURE__ */ jsxRuntime.jsx(
2275
+ IconButton,
2276
+ {
2277
+ "aria-label": "Try again",
2278
+ variant: "soft",
2279
+ onClick: resetBoundary,
2280
+ style: centerStyles,
2281
+ hoverEffects: ["spin180Clockwise"],
2282
+ children: /* @__PURE__ */ jsxRuntime.jsx(FeatherIcon, { icon: "refresh-ccw", size: height })
2283
+ }
2284
+ ),
2285
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexGrow: 1 } })
2286
+ ] });
2287
+ });
2288
+ ErrorFallback.displayName = "ErrorFallback";
2289
+ const OvermapErrorBoundary = React.memo((props) => {
2290
+ const { absoluteCentering } = props;
2291
+ const logError = React.useCallback((error, info) => {
2292
+ console.error(error, info);
2293
+ }, []);
2294
+ return /* @__PURE__ */ jsxRuntime.jsx(reactErrorBoundary.ErrorBoundary, { fallback: /* @__PURE__ */ jsxRuntime.jsx(ErrorFallback, { absoluteCentering }), onError: logError, children: props.children });
2295
+ });
2296
+ OvermapErrorBoundary.displayName = "OvermapErrorBoundary";
2264
2297
  function _extends() {
2265
2298
  _extends = Object.assign ? Object.assign.bind() : function(target) {
2266
2299
  for (var i = 1; i < arguments.length; i++) {
@@ -3693,6 +3726,7 @@
3693
3726
  exports2.LeftAndRightPanels = LeftAndRightPanels;
3694
3727
  exports2.MultiPagePopover = MultiPagePopover;
3695
3728
  exports2.MultiSelect = MultiSelect;
3729
+ exports2.OvermapErrorBoundary = OvermapErrorBoundary;
3696
3730
  exports2.Popover = Popover;
3697
3731
  exports2.Root = Root;
3698
3732
  exports2.Select = Select;