@overmap-ai/blocks 1.0.25-export-error-fixes.0 → 1.0.25-export-error-fixes.3

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,15 +1,4 @@
1
- import { Dispatch, PropsWithChildren, SetStateAction } from "react";
2
- interface ILayoutContent {
3
- small: boolean;
4
- hideLayout: boolean;
5
- /** controlled value for open state of LeftSlideOut Component. */
6
- showLeftSlideOut: boolean;
7
- setShowLeftSlideOut: Dispatch<SetStateAction<boolean>>;
8
- /** controlled value for open state of RightSlideOut Component. */
9
- showRightSlideOut: boolean;
10
- setShowRightSlideOut: Dispatch<SetStateAction<boolean>>;
11
- }
12
- export declare const LayoutContext: import("react").Context<ILayoutContent>;
1
+ import { PropsWithChildren } from "react";
13
2
  export interface RootProps extends PropsWithChildren {
14
3
  /** TODO: DOCUMENT THIS HEAVILY
15
4
  * @default false */
@@ -20,4 +9,3 @@ export interface RootProps extends PropsWithChildren {
20
9
  }
21
10
  /** */
22
11
  export declare const Root: import("react").MemoExoticComponent<(props: RootProps) => import("react/jsx-runtime").JSX.Element>;
23
- export {};
@@ -0,0 +1,14 @@
1
+ import { Dispatch, SetStateAction } from "react";
2
+ interface ILayoutContent {
3
+ small: boolean;
4
+ hideLayout: boolean;
5
+ /** controlled value for open state of LeftSlideOut Component. */
6
+ showLeftSlideOut: boolean;
7
+ setShowLeftSlideOut: Dispatch<SetStateAction<boolean>>;
8
+ /** controlled value for open state of RightSlideOut Component. */
9
+ showRightSlideOut: boolean;
10
+ setShowRightSlideOut: Dispatch<SetStateAction<boolean>>;
11
+ }
12
+ export declare const LayoutContext: import("react").Context<ILayoutContent>;
13
+ export declare const useLayoutContext: () => ILayoutContent;
14
+ export {};
@@ -7,7 +7,7 @@ export declare const Layout: {
7
7
  RightSlideOut: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOut").LayoutSlideOutProps & import("react").RefAttributes<HTMLDivElement>>>;
8
8
  SlideOutTrigger: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOutTrigger").SlideOutTriggerProps & import("react").RefAttributes<HTMLButtonElement>>>;
9
9
  };
10
- export * from "./hooks";
10
+ export * from "./context";
11
11
  export type * from "./Root";
12
12
  export type * from "./Container";
13
13
  export type * from "./SlideOutOverlay";
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactElement, ReactNode } from "react";
2
2
  export type IdLabel = string | number;
3
3
  export type ValueLabel = IdLabel | null | undefined;
4
4
  export type TableLabel = ValueLabel | ReactNode;
@@ -37,6 +37,7 @@ export interface TableRow {
37
37
  columns: {
38
38
  [columnId: string]: TableCell;
39
39
  };
40
+ decorator?: (row: ReactElement) => ReactElement;
40
41
  }
41
42
  export interface TableProps {
42
43
  columns: TableColumn[];
package/dist/blocks.js CHANGED
@@ -1495,6 +1495,7 @@ const _Sidebar = forwardRef(function Sidebar2({
1495
1495
  });
1496
1496
  const Sidebar = memo(_Sidebar);
1497
1497
  const LayoutContext = createContext({});
1498
+ const useLayoutContext = () => useContext(LayoutContext);
1498
1499
  const Root$1 = memo((props) => {
1499
1500
  const { children, small = false, hideLayout = false } = props;
1500
1501
  const [showLeftSlideOut, setShowLeftSlideOut] = useState(false);
@@ -1513,7 +1514,6 @@ const Root$1 = memo((props) => {
1513
1514
  return /* @__PURE__ */ jsx(LayoutContext.Provider, { value: contextValue, children });
1514
1515
  });
1515
1516
  Root$1.displayName = "Layout.Root";
1516
- const useLayoutContext = () => useContext(LayoutContext);
1517
1517
  const Container = memo(
1518
1518
  forwardRef((props, ref) => {
1519
1519
  const { children, style, grow = "1", height = "100%", position, ...rest } = props;
@@ -3978,37 +3978,43 @@ const _Table = forwardRef(function Table2(props, ref) {
3978
3978
  ] }) }),
3979
3979
  /* @__PURE__ */ jsxs(Body, { children: [
3980
3980
  tableList.length === 0 && /* @__PURE__ */ jsx(TableRow, { className: styles$1.noDataTextContainer, children: /* @__PURE__ */ jsx(Cell, { children: emptyMessage }) }),
3981
- tableList.map((row) => /* @__PURE__ */ jsxs(
3982
- Row,
3983
- {
3984
- item: row,
3985
- className: classNames(styles$1.tableRow, rowClassName, row.className, {
3986
- [styles$1.disabled]: row.disabled
3987
- }),
3988
- onClick: !row.disabled && row.onClick,
3989
- children: [
3990
- showSelect && /* @__PURE__ */ jsx(CellSelect, { item: row }, row.id),
3991
- columns.map((column, i) => {
3992
- const cell = row[column.id];
3993
- return /* @__PURE__ */ jsx(
3994
- Cell,
3995
- {
3996
- className: classNames(
3997
- styles$1.tableCell,
3998
- cellClassName,
3999
- cell.className,
4000
- { [styles$1.disabled]: cell.disabled || column.disabled }
4001
- ),
4002
- onClick: cell.disabled || column.disabled ? void 0 : row[column.id].onClick,
4003
- children: cell.label
4004
- },
4005
- i
4006
- );
4007
- })
4008
- ]
4009
- },
4010
- row.id
4011
- ))
3981
+ tableList.map((row) => {
3982
+ const rowElement = /* @__PURE__ */ jsxs(
3983
+ Row,
3984
+ {
3985
+ item: row,
3986
+ render: true,
3987
+ className: classNames(styles$1.tableRow, rowClassName, row.className, {
3988
+ [styles$1.disabled]: row.disabled
3989
+ }),
3990
+ onClick: !row.disabled && row.onClick,
3991
+ children: [
3992
+ showSelect && /* @__PURE__ */ jsx(CellSelect, { item: row }, row.id),
3993
+ columns.map((column, i) => {
3994
+ const cell = row[column.id];
3995
+ return /* @__PURE__ */ jsx(
3996
+ Cell,
3997
+ {
3998
+ className: classNames(
3999
+ styles$1.tableCell,
4000
+ cellClassName,
4001
+ cell.className,
4002
+ {
4003
+ [styles$1.disabled]: cell.disabled || column.disabled
4004
+ }
4005
+ ),
4006
+ onClick: cell.disabled || column.disabled ? void 0 : row[column.id].onClick,
4007
+ children: cell.label
4008
+ },
4009
+ i
4010
+ );
4011
+ })
4012
+ ]
4013
+ },
4014
+ row.id
4015
+ );
4016
+ return (row == null ? void 0 : row.decorator) ? row.decorator(rowElement) : rowElement;
4017
+ })
4012
4018
  ] })
4013
4019
  ] })
4014
4020
  }
@@ -4270,6 +4276,7 @@ export {
4270
4276
  IconColorUtility,
4271
4277
  Input,
4272
4278
  Layout,
4279
+ LayoutContext,
4273
4280
  LeftAndRightPanels,
4274
4281
  MultiPagePopover,
4275
4282
  MultiSelect,