@infinite-table/infinite-react 7.2.5-canary.0 → 7.2.5-canary.2

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.dev.js CHANGED
@@ -1471,6 +1471,7 @@ var import_react6 = require("react");
1471
1471
 
1472
1472
  // src/components/RawList/AvoidReactDiff.tsx
1473
1473
  var React8 = __toESM(require("react"));
1474
+ var import_react_dom = require("react-dom");
1474
1475
  var import_react5 = require("react");
1475
1476
  function AvoidReactDiffFn(props) {
1476
1477
  const [children, setChildren] = (0, import_react5.useState)(props.updater.get);
@@ -1482,10 +1483,18 @@ function AvoidReactDiffFn(props) {
1482
1483
  cancelAnimationFrame(rafId.current);
1483
1484
  }
1484
1485
  rafId.current = requestAnimationFrame(() => {
1485
- setChildren(children2);
1486
+ queueMicrotask(() => {
1487
+ (0, import_react_dom.flushSync)(() => {
1488
+ setChildren(children2);
1489
+ });
1490
+ });
1486
1491
  });
1487
1492
  } else {
1488
- setChildren(children2);
1493
+ queueMicrotask(() => {
1494
+ (0, import_react_dom.flushSync)(() => {
1495
+ setChildren(children2);
1496
+ });
1497
+ });
1489
1498
  }
1490
1499
  }
1491
1500
  const remove = props.updater.onChange(onChange);
@@ -6135,7 +6144,7 @@ function InfiniteTableFooter(props) {
6135
6144
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
6136
6145
  var React52 = __toESM(require("react"));
6137
6146
  var import_react34 = require("react");
6138
- var import_react_dom = require("react-dom");
6147
+ var import_react_dom2 = require("react-dom");
6139
6148
 
6140
6149
  // src/utils/keyMirror.ts
6141
6150
  function keyMirror(obj) {
@@ -13432,7 +13441,7 @@ function InfiniteTableHeaderCell(props) {
13432
13441
  ),
13433
13442
  currentHeader
13434
13443
  );
13435
- draggingProxy = (0, import_react_dom.createPortal)(draggingProxy, portalDOMRef.current);
13444
+ draggingProxy = (0, import_react_dom2.createPortal)(draggingProxy, portalDOMRef.current);
13436
13445
  }
13437
13446
  return /* @__PURE__ */ React52.createElement(ContextProvider, { value: renderParam }, /* @__PURE__ */ React52.createElement(
13438
13447
  InfiniteTableCell,
@@ -25721,7 +25730,7 @@ var useLicense = (licenseKey = "") => {
25721
25730
  }
25722
25731
  let valid2 = isValidLicense(licenseKey, {
25723
25732
  publishedAt: 1624970570587,
25724
- version: "7.2.5-canary.0"
25733
+ version: "7.2.5-canary.2"
25725
25734
  });
25726
25735
  if (!licenseKey && !valid2 && isInsidePlayground) {
25727
25736
  return true;
@@ -26584,7 +26593,7 @@ var import_react60 = require("react");
26584
26593
  // src/components/hooks/useOverlay/index.tsx
26585
26594
  var React60 = __toESM(require("react"));
26586
26595
  var import_react56 = require("react");
26587
- var import_react_dom2 = require("react-dom");
26596
+ var import_react_dom3 = require("react-dom");
26588
26597
 
26589
26598
  // src/utils/pageGeometry/alignment/index.ts
26590
26599
  function isHTMLElement(v) {
@@ -26836,7 +26845,7 @@ function useOverlayPortal(content, portalContainer) {
26836
26845
  }
26837
26846
  getContainer();
26838
26847
  }, [portalContainer]);
26839
- return portalContainer ? container ? (0, import_react_dom2.createPortal)(content, container) : (
26848
+ return portalContainer ? container ? (0, import_react_dom3.createPortal)(content, container) : (
26840
26849
  // we're probably still fetching the container
26841
26850
  /* @__PURE__ */ React60.createElement(React60.Fragment, null)
26842
26851
  ) : portalContainer === null || portalContainer === false ? content : /* @__PURE__ */ React60.createElement(DefaultOverlayPortal, null, content);
@@ -30744,7 +30753,7 @@ var FlashingColumnCell = createFlashingColumnCellComponent();
30744
30753
  // src/components/HeadlessTable/MatrixDebugger.tsx
30745
30754
  var React80 = __toESM(require("react"));
30746
30755
  var import_react74 = require("react");
30747
- var import_react_dom3 = require("react-dom");
30756
+ var import_react_dom4 = require("react-dom");
30748
30757
  function INTERNAL_MatrixDebugger(props) {
30749
30758
  const [getState, setGetState] = React80.useState(null);
30750
30759
  (0, import_react74.useEffect)(() => {
@@ -30784,7 +30793,7 @@ function MatrixDebuggerUI() {
30784
30793
  const columnsIndexes = cellManager.getColumnsWithCells();
30785
30794
  const domRef = (0, import_react74.useRef)(null);
30786
30795
  const displayTimeoutRef = (0, import_react74.useRef)(null);
30787
- return /* @__PURE__ */ React80.createElement("div", { style: { overflow: "auto" } }, (0, import_react_dom3.createPortal)(
30796
+ return /* @__PURE__ */ React80.createElement("div", { style: { overflow: "auto" } }, (0, import_react_dom4.createPortal)(
30788
30797
  /* @__PURE__ */ React80.createElement(
30789
30798
  "div",
30790
30799
  {
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,18 @@ function AvoidReactDiffFn(props) {
1415
1416
  cancelAnimationFrame(rafId.current);
1416
1417
  }
1417
1418
  rafId.current = requestAnimationFrame(() => {
1418
- setChildren(children2);
1419
+ queueMicrotask(() => {
1420
+ flushSync(() => {
1421
+ setChildren(children2);
1422
+ });
1423
+ });
1419
1424
  });
1420
1425
  } else {
1421
- setChildren(children2);
1426
+ queueMicrotask(() => {
1427
+ flushSync(() => {
1428
+ setChildren(children2);
1429
+ });
1430
+ });
1422
1431
  }
1423
1432
  }
1424
1433
  const remove = props.updater.onChange(onChange);
@@ -25671,7 +25680,7 @@ var useLicense = (licenseKey = "") => {
25671
25680
  }
25672
25681
  let valid2 = isValidLicense(licenseKey, {
25673
25682
  publishedAt: 1624970570587,
25674
- version: "7.2.5-canary.0"
25683
+ version: "7.2.5-canary.2"
25675
25684
  });
25676
25685
  if (!licenseKey && !valid2 && isInsidePlayground) {
25677
25686
  return true;