@omnigrid/react 0.1.34 → 0.1.35

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,4 +1,4 @@
1
- import type { GridProps } from "./types";
1
+ import type { GridProps } from "./types.js";
2
2
  /**
3
3
  * React adapter over the headless core.
4
4
  *
package/dist/OmniGrid.js CHANGED
@@ -2,17 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, } from "react";
3
3
  import { flushSync } from "react-dom";
4
4
  import { DomPool, flattenColumns, isActiveCondition } from "@omnigrid/core";
5
- import { CellTooltipLayer } from "./cellTooltip";
6
- import { contentToReactNode, hasRenderableContent } from "./content";
7
- import { getCollapsedGroupDisplay, getGroupColumnRole, getTreeDataLeafIndent, isGroupRowNode, poolGetRowId, renderGroupCellContent, renderGroupCellPlaceholder, } from "./groupCell";
8
- import { computeGroupSegments } from "./groupHeader";
9
- import { renderDefaultOverlay } from "./overlays";
10
- import { PooledRowPane } from "./pooledRow";
11
- import { PopupHost } from "./popup";
12
- import { createCellRoot } from "./reactRoot";
13
- import { getRowRenderParams } from "./rowRenderParams";
14
- import { resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling";
15
- import { useGrid } from "./useGrid";
5
+ import { CellTooltipLayer } from "./cellTooltip.js";
6
+ import { contentToReactNode, hasRenderableContent } from "./content.js";
7
+ import { getCollapsedGroupDisplay, getGroupColumnRole, getTreeDataLeafIndent, isGroupRowNode, poolGetRowId, renderGroupCellContent, renderGroupCellPlaceholder, } from "./groupCell.js";
8
+ import { computeGroupSegments } from "./groupHeader.js";
9
+ import { renderDefaultOverlay } from "./overlays.js";
10
+ import { PooledRowPane } from "./pooledRow.js";
11
+ import { PopupHost } from "./popup.js";
12
+ import { createCellRoot } from "./reactRoot.js";
13
+ import { getRowRenderParams } from "./rowRenderParams.js";
14
+ import { resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling.js";
15
+ import { useGrid } from "./useGrid.js";
16
16
  function getCellValue(row, column) {
17
17
  if (column.valueGetter)
18
18
  return column.valueGetter(row);
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode, type RefObject } from "react";
2
- import type { CellTooltipRenderer } from "./reactColumnDef";
3
- import type { CellTooltipOptions } from "./types";
2
+ import type { CellTooltipRenderer } from "./reactColumnDef.js";
3
+ import type { CellTooltipOptions } from "./types.js";
4
4
  export declare function isTextOverflowed(textWidth: number, containerWidth: number): boolean;
5
5
  /** Props for the delegated tooltip layer mounted by the grid. */
6
6
  export interface CellTooltipLayerProps {
package/dist/content.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { CheckboxControl, SlotNodeContent } from "@omnigrid/core";
3
- import type { ContentBridge } from "./types";
3
+ import type { ContentBridge } from "./types.js";
4
4
  export type { ContentBridge };
5
5
  export declare function isCheckboxControl(value: unknown): value is CheckboxControl;
6
6
  export declare function isSlotHtmlContent(value: unknown): value is {
package/dist/content.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { cloneElement, createElement, Fragment, isValidElement } from "react";
2
- import { isUIControlDescriptor, renderControl } from "./controls";
2
+ import { isUIControlDescriptor, renderControl } from "./controls.js";
3
3
  export function isCheckboxControl(value) {
4
4
  return typeof value === "object" && value !== null && value.type === "@omnigrid/checkbox";
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { UIControlDescriptor } from "@omnigrid/core";
3
- import type { DebouncedInputProps } from "./types";
3
+ import type { DebouncedInputProps } from "./types.js";
4
4
  export type { DebouncedInputProps };
5
5
  /** Type guard for core `UIControlDescriptor` objects. */
6
6
  export declare function isUIControlDescriptor(value: unknown): value is UIControlDescriptor;
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { ColumnLeafDef, GridApi, GroupRowNode, RowId } from "@omnigrid/core";
3
- import { type ContentBridge } from "./content";
3
+ import { type ContentBridge } from "./content.js";
4
4
  export declare function getTreeDataLeafIndent<T>(row: unknown, column: ColumnLeafDef<T>, grid: GridApi<T>): number | undefined;
5
5
  /**
6
6
  * Checks whether an arbitrary row node represents a grouping tree node.
package/dist/groupCell.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createElement } from "react";
2
- import { contentToReactNode } from "./content";
2
+ import { contentToReactNode } from "./content.js";
3
3
  const TREE_DATA_LEVEL_INDENT = 20;
4
4
  // Align leaf labels with group labels after the 24px toggle and 6px gap.
5
5
  const TREE_DATA_LEAF_CONTROL_OFFSET = 30;
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import "@omnigrid/style";
2
2
  import "@omnigrid/default-theme";
3
3
  export * from "@omnigrid/core";
4
- export type { CellTooltipRenderer, CellTooltipRenderContext, ReactCellRenderer, ReactColumnDef, ReactColumnDef as ColumnDef, ReactColumnGroupDef, ReactColumnGroupDef as ColumnGroupDef, ReactColumnLeafDef, ReactColumnLeafDef as ColumnLeafDef, ReactGridOptions, ReactGridOptions as GridOptions, } from "./reactColumnDef";
5
- export { PooledRowPane } from "./pooledRow";
6
- export type { ContentBridge, PooledCellRenderInfo, PooledColumn, PooledRowCallbacks, PooledRowModifiers } from "./types";
7
- export { OmniGrid } from "./OmniGrid";
8
- export type { GridProps, OverlayComponent, OverlayComponentProps, SlotRendererRegistry } from "./types";
9
- export { useGrid } from "./useGrid";
10
- export { DebouncedInput, isUIControlDescriptor, renderControl } from "./controls";
11
- export type { DebouncedInputProps } from "./controls";
12
- export { PopupHost } from "./popup";
13
- export type { PopupHostProps } from "./types";
14
- export type { UseGridResult } from "./types";
15
- export { type ResolvedColumnPresentation, resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling";
4
+ export type { CellTooltipRenderer, CellTooltipRenderContext, ReactCellRenderer, ReactColumnDef, ReactColumnDef as ColumnDef, ReactColumnGroupDef, ReactColumnGroupDef as ColumnGroupDef, ReactColumnLeafDef, ReactColumnLeafDef as ColumnLeafDef, ReactGridOptions, ReactGridOptions as GridOptions, } from "./reactColumnDef.js";
5
+ export { PooledRowPane } from "./pooledRow.js";
6
+ export type { ContentBridge, PooledCellRenderInfo, PooledColumn, PooledRowCallbacks, PooledRowModifiers } from "./types.js";
7
+ export { OmniGrid } from "./OmniGrid.js";
8
+ export type { GridProps, OverlayComponent, OverlayComponentProps, SlotRendererRegistry } from "./types.js";
9
+ export { useGrid } from "./useGrid.js";
10
+ export { DebouncedInput, isUIControlDescriptor, renderControl } from "./controls.js";
11
+ export type { DebouncedInputProps } from "./controls.js";
12
+ export { PopupHost } from "./popup.js";
13
+ export type { PopupHostProps } from "./types.js";
14
+ export type { UseGridResult } from "./types.js";
15
+ export { type ResolvedColumnPresentation, resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling.js";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "@omnigrid/style";
2
2
  import "@omnigrid/default-theme";
3
3
  export * from "@omnigrid/core";
4
- export { PooledRowPane } from "./pooledRow";
5
- export { OmniGrid } from "./OmniGrid";
6
- export { useGrid } from "./useGrid";
7
- export { DebouncedInput, isUIControlDescriptor, renderControl } from "./controls";
8
- export { PopupHost } from "./popup";
9
- export { resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling";
4
+ export { PooledRowPane } from "./pooledRow.js";
5
+ export { OmniGrid } from "./OmniGrid.js";
6
+ export { useGrid } from "./useGrid.js";
7
+ export { DebouncedInput, isUIControlDescriptor, renderControl } from "./controls.js";
8
+ export { PopupHost } from "./popup.js";
9
+ export { resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling.js";
@@ -1,6 +1,6 @@
1
1
  import type { PooledRow, RowSpanLayout } from "@omnigrid/core";
2
- import { type ContentBridge } from "./content";
3
- import type { PooledColumn, PooledRowCallbacks } from "./types";
2
+ import { type ContentBridge } from "./content.js";
3
+ import type { PooledColumn, PooledRowCallbacks } from "./types.js";
4
4
  /**
5
5
  * Reusable row panel: holds a fixed set of cells, lays them out for the
6
6
  * horizontal column window via `translateX`, and updates content in-place
package/dist/pooledRow.js CHANGED
@@ -1,4 +1,4 @@
1
- import { contentToReactNode, isSlotHtmlContent } from "./content";
1
+ import { contentToReactNode, isSlotHtmlContent } from "./content.js";
2
2
  const OFFSCREEN_X = -200000;
3
3
  const OFFSCREEN_Y = -200000;
4
4
  const ALIGN_TO_JUSTIFY = {
package/dist/popup.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { PopupHostProps } from "./types";
2
+ import type { PopupHostProps } from "./types.js";
3
3
  export declare function clampPopupLeft(desiredLeft: number, popupWidth: number, minLeft: number, maxRight: number): number;
4
4
  /**
5
5
  * Renders the grid's active `UIPopupDescriptor`. Popup state lives here, so
package/dist/popup.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createElement, useEffect, useLayoutEffect, useRef, useState } from "react";
2
- import { contentToReactNode } from "./content";
2
+ import { contentToReactNode } from "./content.js";
3
3
  const VIEWPORT_MARGIN = 8;
4
4
  export function clampPopupLeft(desiredLeft, popupWidth, minLeft, maxRight) {
5
5
  const maxLeft = Math.max(minLeft, maxRight - popupWidth);
package/dist/styling.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { CellRenderParams, ColumnGroupDef, ColumnLeafDef, ColumnStyle, ColumnStyleParams, HeaderGroupRenderParams, HeaderRenderParams, HeaderStyle, RowStyle } from "@omnigrid/core";
2
- import type { ResolvedColumnPresentation } from "./types";
2
+ import type { ResolvedColumnPresentation } from "./types.js";
3
3
  export type { ResolvedColumnPresentation };
4
4
  /**
5
5
  * Resolves column-level presentation once for the entire column across the entire dataset.
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { SlotRenderContext, UIInputControl } from "@omnigrid/core";
3
- import type { CellRoot } from "./reactRoot";
4
- import type { CellTooltipRenderer, ReactGridOptions } from "./reactColumnDef";
3
+ import type { CellRoot } from "./reactRoot.js";
4
+ import type { CellTooltipRenderer, ReactGridOptions } from "./reactColumnDef.js";
5
5
  /** Tooltip overrides resolved for a particular data column. */
6
6
  export interface CellTooltipOptions {
7
7
  /** Custom renderer for the truncated cell's full text. */
package/dist/useGrid.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { UseGridResult } from "./types";
2
- import type { ReactGridOptions } from "./reactColumnDef";
1
+ import type { UseGridResult } from "./types.js";
2
+ import type { ReactGridOptions } from "./reactColumnDef.js";
3
3
  /**
4
4
  * Binds the Grid instance from @omnigrid/core to the React lifecycle.
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnigrid/react",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "description": "React adapter and renderer for OmniGrid",
5
5
  "keywords": [
6
6
  "omnigrid",