@infinite-table/infinite-react 7.2.4 → 7.2.5-canary.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.
package/index.d.ts CHANGED
@@ -2534,7 +2534,7 @@ declare class GridRenderer extends Logger {
2534
2534
  private scrolling;
2535
2535
  cellHoverClassNames: string[];
2536
2536
  cellDetachedClassNames: string[];
2537
- protected cellManager: GridCellManager<{
2537
+ cellManager: GridCellManager<{
2538
2538
  renderRowIndex: number;
2539
2539
  renderColIndex: number;
2540
2540
  }>;
@@ -7547,6 +7547,11 @@ type FlashingCellOptions = {
7547
7547
  declare const createFlashingColumnCellComponent: (options?: FlashingCellOptions) => React$1.ForwardRefExoticComponent<Omit<React$1.HTMLProps<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
7548
7548
  declare const FlashingColumnCell: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLProps<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
7549
7549
 
7550
+ type MatrixDebuggerProps = {
7551
+ debugTarget: string;
7552
+ };
7553
+ declare function INTERNAL_MatrixDebugger(props: MatrixDebuggerProps): React$1.JSX.Element | null;
7554
+
7550
7555
  declare const components: {
7551
7556
  CheckBox: typeof InfiniteCheckBox;
7552
7557
  LoadMask: (props: LoadMaskProps) => React$1.JSX.Element;
@@ -7555,4 +7560,4 @@ declare const components: {
7555
7560
  NumberFilterEditor: typeof NumberFilterEditor;
7556
7561
  };
7557
7562
 
7558
- export { type AdvancedAlignable, CellSelectionState, type CellSelectionStateObject, type ColumnTypeWithInherit, DataClient, DataSource, type DataSourceAction, DataSourceActionType, type DataSourceAggregationReducer, type DataSourceApi, type DataSourceCRUDParam, type DataSourceCallback_BaseParam, type DataSourceComponentActions, type DataSourceContextValue, type DataSourceData, type DataSourceDataParams, type DataSourceDataParamsChanges, type DataSourceDebugWarningKey, type DataSourceDerivedState, type DataSourceFilterFunctionParam, type DataSourceFilterOperator, type DataSourceFilterOperatorFunction, type DataSourceFilterOperatorFunctionParam, type DataSourceFilterType, type DataSourceFilterValueItem, type DataSourceFilterValueItemValueGetter, type DataSourceGroupBy, type DataSourceGroupRowsList, type DataSourceInsertParam, type DataSourceLivePaginationCursorFn, type DataSourceLivePaginationCursorParams, type DataSourceLivePaginationCursorValue, type DataSourceMappedState, type DataSourceMappings, type DataSourceMasterDetailContextValue, type DataSourcePivotBy, type DataSourcePropAggregationReducers, type DataSourcePropCellSelection, type DataSourcePropCellSelection_MultiCell, type DataSourcePropCellSelection_SingleCell, type DataSourcePropFilterFunction, type DataSourcePropFilterTypes, type DataSourcePropFilterValue, type DataSourcePropGroupBy, type DataSourcePropGroupRowsState, type DataSourcePropGroupRowsStateObject, type DataSourcePropIsNodeExpanded, type DataSourcePropIsNodeReadOnly, type DataSourcePropIsNodeSelectable, type DataSourcePropIsNodeSelected, type DataSourcePropIsRowSelected, type DataSourcePropLivePaginationCursor, type DataSourcePropMultiRowSelectionChangeParamType, type DataSourcePropOnCellSelectionChange, type DataSourcePropOnCellSelectionChange_MultiCell, type DataSourcePropOnCellSelectionChange_SingleCell, type DataSourcePropOnRowSelectionChange, type DataSourcePropOnRowSelectionChange_MultiRow, type DataSourcePropOnRowSelectionChange_SingleRow, type DataSourcePropOnTreeSelectionChange, type DataSourcePropOnTreeSelectionChange_MultiNode, type DataSourcePropOnTreeSelectionChange_SingleNode, type DataSourcePropPivotBy, type DataSourcePropRowInfoReducers, type DataSourcePropRowSelection, type DataSourcePropRowSelection_MultiRow, type DataSourcePropRowSelection_SingleRow, type DataSourcePropSelectionMode, type DataSourcePropShouldReloadData, type DataSourcePropShouldReloadDataObject, type DataSourcePropSortFn, type DataSourcePropSortInfo, type DataSourcePropSortTypes, type DataSourcePropTreeFilterFunction, type DataSourcePropTreeSelection, type DataSourcePropTreeSelection_MultiNode, type DataSourcePropTreeSelection_SingleNode, type DataSourceProps, type DataSourcePropsNotAvailableInTreeDataSource, type DataSourcePropsWithChildren, type DataSourceRawReducer, type DataSourceRemoteData, type DataSourceRowInfoReducer, type DataSourceSetupState, type DataSourceSingleSortInfo, type DataSourceSortInfo, type DataSourceState, type DataSourceUpdateParam, type DebugLogger, type DebugTimingKey, type DebugWarningPayload, DeepMap, type DevToolsDataSourceOverrides, type DevToolsGenericMessage, type DevToolsHookFn, type DevToolsHookFnOptions, type DevToolsHostPageLogMessage, type DevToolsHostPageLogMessagePayload, type DevToolsHostPageMessage, type DevToolsHostPageMessagePayload, type DevToolsHostPageMessageType, type DevToolsInfiniteOverrides, type DevToolsMessageAddress, type DevToolsOverrides, type ElementContainerGetter, type ErrorCodeKey, FixedSizeSet, FlashingColumnCell, GroupRowsState, type InfiniteColumnEditorContextType, InfiniteTable, type InfiniteTableAction, InfiniteTableActionType, type InfiniteTableApi, type InfiniteTableCellSelectionApi, InfiniteTableClassName, type InfiniteTableColumn, type InfiniteTableColumnAggregator, type InfiniteTableColumnApi, type InfiniteTableColumnCellContextType, type InfiniteTableColumnComparer, type InfiniteTableColumnGroup, type InfiniteTableColumnRenderFunctionForGroupRows, type InfiniteTableColumnRenderFunctionForNormalRows, type InfiniteTableColumnRenderValueParam, type InfiniteTableColumnRowspanParam, type InfiniteTableColumnSizingOptions, type InfiniteTableColumnValueFormatterParams, type InfiniteTableColumnValueGetterParams, InfiniteTableComponent, type InfiniteTableComputedColumn, type InfiniteTableComputedValues, type InfiniteTableContextValue, type InfiniteTableDebugWarningKey, type InfiniteTableGroupColumnBase, type InfiniteTableGroupColumnFunction, type InfiniteTableGroupColumnGetterOptions, type InfiniteTableKeyboardNavigationApi, type InfiniteTablePivotColumn, type InfiniteTablePropAutoSizeColumnsKey, type InfiniteTablePropColumnGroupVisibility, type InfiniteTablePropColumnGroups, type InfiniteTablePropColumnOrder, type InfiniteTablePropColumnPinning, type InfiniteTablePropColumnSizing, type InfiniteTablePropColumnTypes, type InfiniteTablePropColumnVisibility, type InfiniteTablePropColumns, type InfiniteTablePropComponents, type InfiniteTablePropGetCellContextMenuItems, type InfiniteTablePropGetColumnMenuItems, type InfiniteTablePropGetContextMenuItems, type InfiniteTablePropGroupColumn, type InfiniteTablePropGroupRenderStrategy, type InfiniteTablePropHeaderOptions, type InfiniteTablePropKeyboardNavigation, type InfiniteTablePropKeyboardShorcut, type InfiniteTablePropMultiSortBehavior, type InfiniteTablePropRowClassName, type InfiniteTablePropRowStyle, type InfiniteTableProps, type InfiniteTablePropsNotAvailableInTreeGrid, type InfiniteTableRowClassNameFn, type InfiniteTableRowDetailApi, type InfiniteTableRowInfo, type InfiniteTableRowSelectionApi, type InfiniteTableRowStyleFn, type InfiniteTableState, type InfiniteTable_HasGrouping_RowInfoGroup, type InfiniteTable_HasGrouping_RowInfoNormal, type InfiniteTable_Tree_RowInfoLeafNode, type InfiniteTable_Tree_RowInfoNode, type InfiniteTable_Tree_RowInfoParentNode, type LazyGroupDataDeepMap, type LazyGroupDataItem, type LazyRowInfoGroup, Menu, type MenuChildrenFnParam, type MenuColumn, type MenuColumnRenderParam, type MenuDecoration, type MenuIconProps, type MenuItemActionContext, type MenuItemDefinition, type MenuItemObject, type MenuProps, type MenuRenderable, type MenuRuntimeItem, type MenuRuntimeItemSelectable, type MenuSeparator, type OverlayShowParams, RowDetailCache, RowDetailState, type RowDetailStateObject, RowDisabledState, type RowDisabledStateObject, RowSelectionState, type ScrollStopInfo, type Scrollbars, type ShowOverlayFn, type TableRenderRange, TreeDataSource, type TreeDataSourceProps, TreeExpandState, type TreeExpandStateValue, TreeGrid, type TreeGridOnlyProps, type TreeGridProps, TreeSelectionState, type TreeSelectionValue, type UpdateChildrenFn, type UpdateOverlayContentFn, type WaitForNodeOptions, WeakFixedSizeSet, alignNode, components, createFlashingColumnCellComponent, debounce, debug, defaultFilterTypes, eventMatchesKeyboardShortcut, filterDataArray, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceState, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useLayoutEffectWithChanges, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes };
7563
+ export { type AdvancedAlignable, CellSelectionState, type CellSelectionStateObject, type ColumnTypeWithInherit, DataClient, DataSource, type DataSourceAction, DataSourceActionType, type DataSourceAggregationReducer, type DataSourceApi, type DataSourceCRUDParam, type DataSourceCallback_BaseParam, type DataSourceComponentActions, type DataSourceContextValue, type DataSourceData, type DataSourceDataParams, type DataSourceDataParamsChanges, type DataSourceDebugWarningKey, type DataSourceDerivedState, type DataSourceFilterFunctionParam, type DataSourceFilterOperator, type DataSourceFilterOperatorFunction, type DataSourceFilterOperatorFunctionParam, type DataSourceFilterType, type DataSourceFilterValueItem, type DataSourceFilterValueItemValueGetter, type DataSourceGroupBy, type DataSourceGroupRowsList, type DataSourceInsertParam, type DataSourceLivePaginationCursorFn, type DataSourceLivePaginationCursorParams, type DataSourceLivePaginationCursorValue, type DataSourceMappedState, type DataSourceMappings, type DataSourceMasterDetailContextValue, type DataSourcePivotBy, type DataSourcePropAggregationReducers, type DataSourcePropCellSelection, type DataSourcePropCellSelection_MultiCell, type DataSourcePropCellSelection_SingleCell, type DataSourcePropFilterFunction, type DataSourcePropFilterTypes, type DataSourcePropFilterValue, type DataSourcePropGroupBy, type DataSourcePropGroupRowsState, type DataSourcePropGroupRowsStateObject, type DataSourcePropIsNodeExpanded, type DataSourcePropIsNodeReadOnly, type DataSourcePropIsNodeSelectable, type DataSourcePropIsNodeSelected, type DataSourcePropIsRowSelected, type DataSourcePropLivePaginationCursor, type DataSourcePropMultiRowSelectionChangeParamType, type DataSourcePropOnCellSelectionChange, type DataSourcePropOnCellSelectionChange_MultiCell, type DataSourcePropOnCellSelectionChange_SingleCell, type DataSourcePropOnRowSelectionChange, type DataSourcePropOnRowSelectionChange_MultiRow, type DataSourcePropOnRowSelectionChange_SingleRow, type DataSourcePropOnTreeSelectionChange, type DataSourcePropOnTreeSelectionChange_MultiNode, type DataSourcePropOnTreeSelectionChange_SingleNode, type DataSourcePropPivotBy, type DataSourcePropRowInfoReducers, type DataSourcePropRowSelection, type DataSourcePropRowSelection_MultiRow, type DataSourcePropRowSelection_SingleRow, type DataSourcePropSelectionMode, type DataSourcePropShouldReloadData, type DataSourcePropShouldReloadDataObject, type DataSourcePropSortFn, type DataSourcePropSortInfo, type DataSourcePropSortTypes, type DataSourcePropTreeFilterFunction, type DataSourcePropTreeSelection, type DataSourcePropTreeSelection_MultiNode, type DataSourcePropTreeSelection_SingleNode, type DataSourceProps, type DataSourcePropsNotAvailableInTreeDataSource, type DataSourcePropsWithChildren, type DataSourceRawReducer, type DataSourceRemoteData, type DataSourceRowInfoReducer, type DataSourceSetupState, type DataSourceSingleSortInfo, type DataSourceSortInfo, type DataSourceState, type DataSourceUpdateParam, type DebugLogger, type DebugTimingKey, type DebugWarningPayload, DeepMap, type DevToolsDataSourceOverrides, type DevToolsGenericMessage, type DevToolsHookFn, type DevToolsHookFnOptions, type DevToolsHostPageLogMessage, type DevToolsHostPageLogMessagePayload, type DevToolsHostPageMessage, type DevToolsHostPageMessagePayload, type DevToolsHostPageMessageType, type DevToolsInfiniteOverrides, type DevToolsMessageAddress, type DevToolsOverrides, type ElementContainerGetter, type ErrorCodeKey, FixedSizeSet, FlashingColumnCell, GroupRowsState, INTERNAL_MatrixDebugger, type InfiniteColumnEditorContextType, InfiniteTable, type InfiniteTableAction, InfiniteTableActionType, type InfiniteTableApi, type InfiniteTableCellSelectionApi, InfiniteTableClassName, type InfiniteTableColumn, type InfiniteTableColumnAggregator, type InfiniteTableColumnApi, type InfiniteTableColumnCellContextType, type InfiniteTableColumnComparer, type InfiniteTableColumnGroup, type InfiniteTableColumnRenderFunctionForGroupRows, type InfiniteTableColumnRenderFunctionForNormalRows, type InfiniteTableColumnRenderValueParam, type InfiniteTableColumnRowspanParam, type InfiniteTableColumnSizingOptions, type InfiniteTableColumnValueFormatterParams, type InfiniteTableColumnValueGetterParams, InfiniteTableComponent, type InfiniteTableComputedColumn, type InfiniteTableComputedValues, type InfiniteTableContextValue, type InfiniteTableDebugWarningKey, type InfiniteTableGroupColumnBase, type InfiniteTableGroupColumnFunction, type InfiniteTableGroupColumnGetterOptions, type InfiniteTableKeyboardNavigationApi, type InfiniteTablePivotColumn, type InfiniteTablePropAutoSizeColumnsKey, type InfiniteTablePropColumnGroupVisibility, type InfiniteTablePropColumnGroups, type InfiniteTablePropColumnOrder, type InfiniteTablePropColumnPinning, type InfiniteTablePropColumnSizing, type InfiniteTablePropColumnTypes, type InfiniteTablePropColumnVisibility, type InfiniteTablePropColumns, type InfiniteTablePropComponents, type InfiniteTablePropGetCellContextMenuItems, type InfiniteTablePropGetColumnMenuItems, type InfiniteTablePropGetContextMenuItems, type InfiniteTablePropGroupColumn, type InfiniteTablePropGroupRenderStrategy, type InfiniteTablePropHeaderOptions, type InfiniteTablePropKeyboardNavigation, type InfiniteTablePropKeyboardShorcut, type InfiniteTablePropMultiSortBehavior, type InfiniteTablePropRowClassName, type InfiniteTablePropRowStyle, type InfiniteTableProps, type InfiniteTablePropsNotAvailableInTreeGrid, type InfiniteTableRowClassNameFn, type InfiniteTableRowDetailApi, type InfiniteTableRowInfo, type InfiniteTableRowSelectionApi, type InfiniteTableRowStyleFn, type InfiniteTableState, type InfiniteTable_HasGrouping_RowInfoGroup, type InfiniteTable_HasGrouping_RowInfoNormal, type InfiniteTable_Tree_RowInfoLeafNode, type InfiniteTable_Tree_RowInfoNode, type InfiniteTable_Tree_RowInfoParentNode, type LazyGroupDataDeepMap, type LazyGroupDataItem, type LazyRowInfoGroup, Menu, type MenuChildrenFnParam, type MenuColumn, type MenuColumnRenderParam, type MenuDecoration, type MenuIconProps, type MenuItemActionContext, type MenuItemDefinition, type MenuItemObject, type MenuProps, type MenuRenderable, type MenuRuntimeItem, type MenuRuntimeItemSelectable, type MenuSeparator, type OverlayShowParams, RowDetailCache, RowDetailState, type RowDetailStateObject, RowDisabledState, type RowDisabledStateObject, RowSelectionState, type ScrollStopInfo, type Scrollbars, type ShowOverlayFn, type TableRenderRange, TreeDataSource, type TreeDataSourceProps, TreeExpandState, type TreeExpandStateValue, TreeGrid, type TreeGridOnlyProps, type TreeGridProps, TreeSelectionState, type TreeSelectionValue, type UpdateChildrenFn, type UpdateOverlayContentFn, type WaitForNodeOptions, WeakFixedSizeSet, alignNode, components, createFlashingColumnCellComponent, debounce, debug, defaultFilterTypes, eventMatchesKeyboardShortcut, filterDataArray, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceState, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useLayoutEffectWithChanges, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes };
package/index.dev.js CHANGED
@@ -76,6 +76,7 @@ __export(index_exports, {
76
76
  FixedSizeSet: () => FixedSizeSet,
77
77
  FlashingColumnCell: () => FlashingColumnCell,
78
78
  GroupRowsState: () => GroupRowsState,
79
+ INTERNAL_MatrixDebugger: () => INTERNAL_MatrixDebugger,
79
80
  InfiniteTable: () => InfiniteTable,
80
81
  InfiniteTableClassName: () => InfiniteTableClassName,
81
82
  InfiniteTableComponent: () => InfiniteTableComponent,
@@ -1470,6 +1471,7 @@ var import_react6 = require("react");
1470
1471
 
1471
1472
  // src/components/RawList/AvoidReactDiff.tsx
1472
1473
  var React8 = __toESM(require("react"));
1474
+ var import_react_dom = require("react-dom");
1473
1475
  var import_react5 = require("react");
1474
1476
  function AvoidReactDiffFn(props) {
1475
1477
  const [children, setChildren] = (0, import_react5.useState)(props.updater.get);
@@ -1481,10 +1483,14 @@ function AvoidReactDiffFn(props) {
1481
1483
  cancelAnimationFrame(rafId.current);
1482
1484
  }
1483
1485
  rafId.current = requestAnimationFrame(() => {
1484
- setChildren(children2);
1486
+ (0, import_react_dom.flushSync)(() => {
1487
+ setChildren(children2);
1488
+ });
1485
1489
  });
1486
1490
  } else {
1487
- setChildren(children2);
1491
+ (0, import_react_dom.flushSync)(() => {
1492
+ setChildren(children2);
1493
+ });
1488
1494
  }
1489
1495
  }
1490
1496
  const remove = props.updater.onChange(onChange);
@@ -6134,7 +6140,7 @@ function InfiniteTableFooter(props) {
6134
6140
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
6135
6141
  var React52 = __toESM(require("react"));
6136
6142
  var import_react34 = require("react");
6137
- var import_react_dom = require("react-dom");
6143
+ var import_react_dom2 = require("react-dom");
6138
6144
 
6139
6145
  // src/utils/keyMirror.ts
6140
6146
  function keyMirror(obj) {
@@ -13431,7 +13437,7 @@ function InfiniteTableHeaderCell(props) {
13431
13437
  ),
13432
13438
  currentHeader
13433
13439
  );
13434
- draggingProxy = (0, import_react_dom.createPortal)(draggingProxy, portalDOMRef.current);
13440
+ draggingProxy = (0, import_react_dom2.createPortal)(draggingProxy, portalDOMRef.current);
13435
13441
  }
13436
13442
  return /* @__PURE__ */ React52.createElement(ContextProvider, { value: renderParam }, /* @__PURE__ */ React52.createElement(
13437
13443
  InfiniteTableCell,
@@ -25720,7 +25726,7 @@ var useLicense = (licenseKey = "") => {
25720
25726
  }
25721
25727
  let valid2 = isValidLicense(licenseKey, {
25722
25728
  publishedAt: 1624970570587,
25723
- version: "7.2.4"
25729
+ version: "7.2.5-canary.1"
25724
25730
  });
25725
25731
  if (!licenseKey && !valid2 && isInsidePlayground) {
25726
25732
  return true;
@@ -26583,7 +26589,7 @@ var import_react60 = require("react");
26583
26589
  // src/components/hooks/useOverlay/index.tsx
26584
26590
  var React60 = __toESM(require("react"));
26585
26591
  var import_react56 = require("react");
26586
- var import_react_dom2 = require("react-dom");
26592
+ var import_react_dom3 = require("react-dom");
26587
26593
 
26588
26594
  // src/utils/pageGeometry/alignment/index.ts
26589
26595
  function isHTMLElement(v) {
@@ -26835,7 +26841,7 @@ function useOverlayPortal(content, portalContainer) {
26835
26841
  }
26836
26842
  getContainer();
26837
26843
  }, [portalContainer]);
26838
- return portalContainer ? container ? (0, import_react_dom2.createPortal)(content, container) : (
26844
+ return portalContainer ? container ? (0, import_react_dom3.createPortal)(content, container) : (
26839
26845
  // we're probably still fetching the container
26840
26846
  /* @__PURE__ */ React60.createElement(React60.Fragment, null)
26841
26847
  ) : portalContainer === null || portalContainer === false ? content : /* @__PURE__ */ React60.createElement(DefaultOverlayPortal, null, content);
@@ -30740,6 +30746,131 @@ var createFlashingColumnCellComponent = (options = {}) => {
30740
30746
  };
30741
30747
  var FlashingColumnCell = createFlashingColumnCellComponent();
30742
30748
 
30749
+ // src/components/HeadlessTable/MatrixDebugger.tsx
30750
+ var React80 = __toESM(require("react"));
30751
+ var import_react74 = require("react");
30752
+ var import_react_dom4 = require("react-dom");
30753
+ function INTERNAL_MatrixDebugger(props) {
30754
+ const [getState, setGetState] = React80.useState(null);
30755
+ (0, import_react74.useEffect)(() => {
30756
+ const { debugTarget } = props;
30757
+ const intervalId = setInterval(() => {
30758
+ if (globalThis.INFINITE && globalThis.INFINITE[debugTarget]) {
30759
+ const getState2 = globalThis.INFINITE[debugTarget].getState;
30760
+ clearInterval(intervalId);
30761
+ setGetState(() => getState2);
30762
+ }
30763
+ }, 100);
30764
+ return () => {
30765
+ clearInterval(intervalId);
30766
+ };
30767
+ }, [props.debugTarget]);
30768
+ return typeof getState === "function" ? /* @__PURE__ */ React80.createElement(MatrixDebuggerContext.Provider, { value: { getState } }, /* @__PURE__ */ React80.createElement(MatrixDebuggerUI, null)) : null;
30769
+ }
30770
+ var MatrixDebuggerContext = React80.createContext({
30771
+ getState: () => null
30772
+ });
30773
+ function MatrixDebuggerUI() {
30774
+ const contextValue = React80.useContext(MatrixDebuggerContext);
30775
+ const { getState } = contextValue;
30776
+ const [, rerender] = useRerender();
30777
+ const cellManager = getState().renderer.cellManager;
30778
+ (0, import_react74.useEffect)(() => {
30779
+ const delayedRerender = debounce(
30780
+ () => {
30781
+ console.log("rerender");
30782
+ rerender();
30783
+ },
30784
+ { wait: 500 }
30785
+ );
30786
+ return cellManager.onCellAttachmentChange(delayedRerender);
30787
+ }, [cellManager, rerender]);
30788
+ const rowIndexes = cellManager.getRowsWithCells();
30789
+ const columnsIndexes = cellManager.getColumnsWithCells();
30790
+ const domRef = (0, import_react74.useRef)(null);
30791
+ const displayTimeoutRef = (0, import_react74.useRef)(null);
30792
+ return /* @__PURE__ */ React80.createElement("div", { style: { overflow: "auto" } }, (0, import_react_dom4.createPortal)(
30793
+ /* @__PURE__ */ React80.createElement(
30794
+ "div",
30795
+ {
30796
+ ref: domRef,
30797
+ style: {
30798
+ position: "absolute",
30799
+ top: 0,
30800
+ left: 0,
30801
+ width: "0px",
30802
+ height: "0px",
30803
+ pointerEvents: "none",
30804
+ background: "rgba(255, 0, 0, 0.5)",
30805
+ opacity: "0"
30806
+ }
30807
+ }
30808
+ ),
30809
+ document.body
30810
+ ), /* @__PURE__ */ React80.createElement(
30811
+ "table",
30812
+ {
30813
+ style: {
30814
+ borderCollapse: "collapse"
30815
+ }
30816
+ },
30817
+ /* @__PURE__ */ React80.createElement("thead", null, /* @__PURE__ */ React80.createElement("tr", null, columnsIndexes.map((columnIndex) => {
30818
+ return /* @__PURE__ */ React80.createElement("th", { key: columnIndex, "data-col-index": columnIndex }, columnIndex);
30819
+ }))),
30820
+ /* @__PURE__ */ React80.createElement("tbody", null, rowIndexes.map((rowIndex) => {
30821
+ return /* @__PURE__ */ React80.createElement("tr", { key: rowIndex, "data-row-index": rowIndex }, columnsIndexes.map((columnIndex) => {
30822
+ return /* @__PURE__ */ React80.createElement(
30823
+ "td",
30824
+ {
30825
+ key: columnIndex,
30826
+ style: {
30827
+ padding: 5,
30828
+ border: "1px solid gray",
30829
+ background: cellManager.getCellAt([rowIndex, columnIndex])?.getNode() ? "rgba(0, 255, 0, 0.3)" : "rgba(255, 0, 0, 0.3)"
30830
+ // with 0.3 opacity
30831
+ },
30832
+ "data-col-index": columnIndex
30833
+ },
30834
+ /* @__PURE__ */ React80.createElement(
30835
+ "button",
30836
+ {
30837
+ onClick: () => {
30838
+ const el = cellManager.getCellAt([rowIndex, columnIndex])?.getElement();
30839
+ if (!el) {
30840
+ return;
30841
+ }
30842
+ const rect = el.getBoundingClientRect();
30843
+ domRef.current.style.top = `${rect.top}px`;
30844
+ domRef.current.style.left = `${rect.left}px`;
30845
+ domRef.current.style.width = `${rect.width}px`;
30846
+ domRef.current.style.height = `${rect.height}px`;
30847
+ domRef.current.style.opacity = "0.5";
30848
+ domRef.current.style.transition = "opacity 0.5s";
30849
+ if (displayTimeoutRef.current) {
30850
+ clearTimeout(displayTimeoutRef.current);
30851
+ }
30852
+ displayTimeoutRef.current = setTimeout(() => {
30853
+ domRef.current.style.opacity = "0";
30854
+ displayTimeoutRef.current = null;
30855
+ }, 2e3);
30856
+ console.log(el);
30857
+ },
30858
+ style: {
30859
+ cursor: "pointer"
30860
+ }
30861
+ },
30862
+ "(",
30863
+ rowIndex,
30864
+ ",",
30865
+ columnIndex,
30866
+ ")"
30867
+ )
30868
+ );
30869
+ }));
30870
+ }))
30871
+ ));
30872
+ }
30873
+
30743
30874
  // src/index.tsx
30744
30875
  var components = {
30745
30876
  CheckBox: InfiniteCheckBox,
@@ -30758,6 +30889,7 @@ var components = {
30758
30889
  FixedSizeSet,
30759
30890
  FlashingColumnCell,
30760
30891
  GroupRowsState,
30892
+ INTERNAL_MatrixDebugger,
30761
30893
  InfiniteTable,
30762
30894
  InfiniteTableClassName,
30763
30895
  InfiniteTableComponent,
package/index.dev.mjs CHANGED
@@ -1404,6 +1404,7 @@ import { useLayoutEffect as useLayoutEffect4, useMemo as useMemo2 } from "react"
1404
1404
 
1405
1405
  // src/components/RawList/AvoidReactDiff.tsx
1406
1406
  import * as React8 from "react";
1407
+ import { flushSync } from "react-dom";
1407
1408
  import { useLayoutEffect as useLayoutEffect3, useRef as useRef4, useState } from "react";
1408
1409
  function AvoidReactDiffFn(props) {
1409
1410
  const [children, setChildren] = useState(props.updater.get);
@@ -1415,10 +1416,14 @@ function AvoidReactDiffFn(props) {
1415
1416
  cancelAnimationFrame(rafId.current);
1416
1417
  }
1417
1418
  rafId.current = requestAnimationFrame(() => {
1418
- setChildren(children2);
1419
+ flushSync(() => {
1420
+ setChildren(children2);
1421
+ });
1419
1422
  });
1420
1423
  } else {
1421
- setChildren(children2);
1424
+ flushSync(() => {
1425
+ setChildren(children2);
1426
+ });
1422
1427
  }
1423
1428
  }
1424
1429
  const remove = props.updater.onChange(onChange);
@@ -25671,7 +25676,7 @@ var useLicense = (licenseKey = "") => {
25671
25676
  }
25672
25677
  let valid2 = isValidLicense(licenseKey, {
25673
25678
  publishedAt: 1624970570587,
25674
- version: "7.2.4"
25679
+ version: "7.2.5-canary.1"
25675
25680
  });
25676
25681
  if (!licenseKey && !valid2 && isInsidePlayground) {
25677
25682
  return true;
@@ -30701,6 +30706,131 @@ var createFlashingColumnCellComponent = (options = {}) => {
30701
30706
  };
30702
30707
  var FlashingColumnCell = createFlashingColumnCellComponent();
30703
30708
 
30709
+ // src/components/HeadlessTable/MatrixDebugger.tsx
30710
+ import * as React80 from "react";
30711
+ import { useEffect as useEffect44, useRef as useRef37 } from "react";
30712
+ import { createPortal as createPortal3 } from "react-dom";
30713
+ function INTERNAL_MatrixDebugger(props) {
30714
+ const [getState, setGetState] = React80.useState(null);
30715
+ useEffect44(() => {
30716
+ const { debugTarget } = props;
30717
+ const intervalId = setInterval(() => {
30718
+ if (globalThis.INFINITE && globalThis.INFINITE[debugTarget]) {
30719
+ const getState2 = globalThis.INFINITE[debugTarget].getState;
30720
+ clearInterval(intervalId);
30721
+ setGetState(() => getState2);
30722
+ }
30723
+ }, 100);
30724
+ return () => {
30725
+ clearInterval(intervalId);
30726
+ };
30727
+ }, [props.debugTarget]);
30728
+ return typeof getState === "function" ? /* @__PURE__ */ React80.createElement(MatrixDebuggerContext.Provider, { value: { getState } }, /* @__PURE__ */ React80.createElement(MatrixDebuggerUI, null)) : null;
30729
+ }
30730
+ var MatrixDebuggerContext = React80.createContext({
30731
+ getState: () => null
30732
+ });
30733
+ function MatrixDebuggerUI() {
30734
+ const contextValue = React80.useContext(MatrixDebuggerContext);
30735
+ const { getState } = contextValue;
30736
+ const [, rerender] = useRerender();
30737
+ const cellManager = getState().renderer.cellManager;
30738
+ useEffect44(() => {
30739
+ const delayedRerender = debounce(
30740
+ () => {
30741
+ console.log("rerender");
30742
+ rerender();
30743
+ },
30744
+ { wait: 500 }
30745
+ );
30746
+ return cellManager.onCellAttachmentChange(delayedRerender);
30747
+ }, [cellManager, rerender]);
30748
+ const rowIndexes = cellManager.getRowsWithCells();
30749
+ const columnsIndexes = cellManager.getColumnsWithCells();
30750
+ const domRef = useRef37(null);
30751
+ const displayTimeoutRef = useRef37(null);
30752
+ return /* @__PURE__ */ React80.createElement("div", { style: { overflow: "auto" } }, createPortal3(
30753
+ /* @__PURE__ */ React80.createElement(
30754
+ "div",
30755
+ {
30756
+ ref: domRef,
30757
+ style: {
30758
+ position: "absolute",
30759
+ top: 0,
30760
+ left: 0,
30761
+ width: "0px",
30762
+ height: "0px",
30763
+ pointerEvents: "none",
30764
+ background: "rgba(255, 0, 0, 0.5)",
30765
+ opacity: "0"
30766
+ }
30767
+ }
30768
+ ),
30769
+ document.body
30770
+ ), /* @__PURE__ */ React80.createElement(
30771
+ "table",
30772
+ {
30773
+ style: {
30774
+ borderCollapse: "collapse"
30775
+ }
30776
+ },
30777
+ /* @__PURE__ */ React80.createElement("thead", null, /* @__PURE__ */ React80.createElement("tr", null, columnsIndexes.map((columnIndex) => {
30778
+ return /* @__PURE__ */ React80.createElement("th", { key: columnIndex, "data-col-index": columnIndex }, columnIndex);
30779
+ }))),
30780
+ /* @__PURE__ */ React80.createElement("tbody", null, rowIndexes.map((rowIndex) => {
30781
+ return /* @__PURE__ */ React80.createElement("tr", { key: rowIndex, "data-row-index": rowIndex }, columnsIndexes.map((columnIndex) => {
30782
+ return /* @__PURE__ */ React80.createElement(
30783
+ "td",
30784
+ {
30785
+ key: columnIndex,
30786
+ style: {
30787
+ padding: 5,
30788
+ border: "1px solid gray",
30789
+ background: cellManager.getCellAt([rowIndex, columnIndex])?.getNode() ? "rgba(0, 255, 0, 0.3)" : "rgba(255, 0, 0, 0.3)"
30790
+ // with 0.3 opacity
30791
+ },
30792
+ "data-col-index": columnIndex
30793
+ },
30794
+ /* @__PURE__ */ React80.createElement(
30795
+ "button",
30796
+ {
30797
+ onClick: () => {
30798
+ const el = cellManager.getCellAt([rowIndex, columnIndex])?.getElement();
30799
+ if (!el) {
30800
+ return;
30801
+ }
30802
+ const rect = el.getBoundingClientRect();
30803
+ domRef.current.style.top = `${rect.top}px`;
30804
+ domRef.current.style.left = `${rect.left}px`;
30805
+ domRef.current.style.width = `${rect.width}px`;
30806
+ domRef.current.style.height = `${rect.height}px`;
30807
+ domRef.current.style.opacity = "0.5";
30808
+ domRef.current.style.transition = "opacity 0.5s";
30809
+ if (displayTimeoutRef.current) {
30810
+ clearTimeout(displayTimeoutRef.current);
30811
+ }
30812
+ displayTimeoutRef.current = setTimeout(() => {
30813
+ domRef.current.style.opacity = "0";
30814
+ displayTimeoutRef.current = null;
30815
+ }, 2e3);
30816
+ console.log(el);
30817
+ },
30818
+ style: {
30819
+ cursor: "pointer"
30820
+ }
30821
+ },
30822
+ "(",
30823
+ rowIndex,
30824
+ ",",
30825
+ columnIndex,
30826
+ ")"
30827
+ )
30828
+ );
30829
+ }));
30830
+ }))
30831
+ ));
30832
+ }
30833
+
30704
30834
  // src/index.tsx
30705
30835
  var components = {
30706
30836
  CheckBox: InfiniteCheckBox,
@@ -30718,6 +30848,7 @@ export {
30718
30848
  FixedSizeSet,
30719
30849
  FlashingColumnCell,
30720
30850
  GroupRowsState,
30851
+ INTERNAL_MatrixDebugger,
30721
30852
  InfiniteTable,
30722
30853
  InfiniteTableClassName,
30723
30854
  InfiniteTableComponent,