@ai-matrx/design-system 0.59.0 → 0.59.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.59.1
|
|
4
|
+
### Unreleased
|
|
5
|
+
|
|
6
|
+
- **A row whose own facts moved is drawn again for real.** 0.59.0's element comparison returned a
|
|
7
|
+
row's old element whenever the trees matched — so a host that reads its state through a stable
|
|
8
|
+
handle and names the changed row with `rowVersion` (records-ui's grid) never showed an opened
|
|
9
|
+
cell: Enter, F2 and typing did nothing, and every records-ui grid keyboard test failed. The
|
|
10
|
+
comparison now runs only when nothing but the host's functions/objects moved. Guard:
|
|
11
|
+
`MatrxDataTable.a-row-version-redraws-its-row.test.tsx` (red on 0.59.0).
|
|
12
|
+
|
|
3
13
|
## 0.59.0
|
|
4
14
|
|
|
5
15
|
- **A host's inline functions never redraw the table.** A host that writes `cell`,
|
|
@@ -35792,9 +35792,9 @@ var RowDrawings = class {
|
|
|
35792
35792
|
* The element to hand React for this row. The SAME object as last time when `raw` draws what the
|
|
35793
35793
|
* last one drew (its handlers are re-pointed); a new one otherwise.
|
|
35794
35794
|
*/
|
|
35795
|
-
draw(rowId, raw) {
|
|
35795
|
+
draw(rowId, raw, fresh = false) {
|
|
35796
35796
|
const previous = this.rows.get(rowId);
|
|
35797
|
-
if (previous) {
|
|
35797
|
+
if (previous && !fresh) {
|
|
35798
35798
|
const updates = [];
|
|
35799
35799
|
if (sameDrawing(previous.raw, raw, "", "", 0, updates) && updates.every(([path2]) => previous.slots.has(path2))) {
|
|
35800
35800
|
for (const [path2, fn] of updates) previous.slots.get(path2).fn = fn;
|
|
@@ -52709,8 +52709,12 @@ function versionFacts(version2) {
|
|
|
52709
52709
|
function sameBodyRow(a, b) {
|
|
52710
52710
|
return a.row === b.row && a.index === b.index && a.epoch === b.epoch && a.probe === b.probe && a.rowId === b.rowId && a.facts.length === b.facts.length && a.facts.every((fact, i) => Object.is(fact, b.facts[i]));
|
|
52711
52711
|
}
|
|
52712
|
-
var MatrxTableBodyRow = (0, import_react29.memo)(function MatrxTableBodyRow2(
|
|
52713
|
-
|
|
52712
|
+
var MatrxTableBodyRow = (0, import_react29.memo)(function MatrxTableBodyRow2(props) {
|
|
52713
|
+
const { rowId, row, index, draw } = props;
|
|
52714
|
+
const last = (0, import_react29.useRef)(null);
|
|
52715
|
+
const fresh = last.current === null || !sameBodyRow({ ...last.current, probe: props.probe }, props);
|
|
52716
|
+
last.current = props;
|
|
52717
|
+
return draw(rowId, row, index, fresh);
|
|
52714
52718
|
}, sameBodyRow);
|
|
52715
52719
|
var MatrxTableChrome = (0, import_react29.memo)(function MatrxTableChrome2({ render }) {
|
|
52716
52720
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: render() });
|
|
@@ -55229,7 +55233,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
55229
55233
|
const rowProbe = useRenderEpoch(rowShape.filter((value) => typeof value === "function" || typeof value === "object" && value !== null));
|
|
55230
55234
|
const rowDrawings = (0, import_react29.useRef)(null);
|
|
55231
55235
|
rowDrawings.current ??= new RowDrawings();
|
|
55232
|
-
const drawBodyRow = (rowId, row, index) => rowDrawings.current.draw(rowId, renderRecordRow(row, index));
|
|
55236
|
+
const drawBodyRow = (rowId, row, index, fresh) => rowDrawings.current.draw(rowId, renderRecordRow(row, index), fresh);
|
|
55233
55237
|
chromeLatest.current = { processed, data, toggleAllOnPage, showMore: progressiveRows.showMore, applySavedView };
|
|
55234
55238
|
const chromeGeometry = [
|
|
55235
55239
|
...Object.entries(effectiveColumnWidths).flat(),
|