@ai-matrx/records-ui 0.102.19 → 0.102.21

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,17 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.102.21
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records-ui/v0.102.20..npm/records-ui/v0.102.21 -- apps/shared/records-ui`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.102.20
10
+
11
+ - `readTableShapes` reads markdown tables through THE GFM rule (`tableStartsAt` / `findTableEnd` / `rowCells` from `@ai-matrx/content-ir/source`) instead of a private pipe splitter and delimiter regex: edge pipes optional, `\|` stays in its cell, and the table ends where chat and the editor end it (AP-2).
12
+
13
+ **Consumer action:** none.
14
+
3
15
  ## 0.102.19
4
16
 
5
17
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/dist/index.cjs CHANGED
@@ -7138,7 +7138,7 @@ function RecordValue({
7138
7138
  }
7139
7139
  if (inCell && ui.grid === "merged" && ui.renderText && typeof value === "string" && value.trim() !== "" && editorKindFor(field2) === "long_text" && !shownAsOf(field2) && !(0, import_core4.wholeValueOf)(document2, field2.key) && !envelopeFor(document2, field2.key)?.absent && // A long-text cell holding a kind is drawn by the kind system below, not as markdown.
7140
7140
  !kindValueOf(value)) {
7141
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "block max-h-[4.5em] min-w-0 overflow-hidden whitespace-normal", "data-records-cell-text": "", children: ui.renderText(value, "cell") });
7141
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "block h-[1.5em] min-w-0 overflow-hidden whitespace-normal", "data-records-cell-text": "", children: ui.renderText(value, "cell") });
7142
7142
  }
7143
7143
  if (isSignatureField(field2) && value !== null && value !== void 0 && value !== "") {
7144
7144
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SignatureValue, { value, inCell, recordId, fieldKey: field2.key, document: document2 });
@@ -19501,25 +19501,8 @@ function nameAbove(lines, lineIndex) {
19501
19501
  }
19502
19502
  return null;
19503
19503
  }
19504
- var SEPARATOR = /^\s*\|?\s*:?-{2,}:?\s*(\|\s*:?-{2,}:?\s*)*\|?\s*$/;
19505
19504
  function splitPipes(line) {
19506
- let text = line.trim();
19507
- if (text.startsWith("|")) text = text.slice(1);
19508
- if (text.endsWith("|") && !text.endsWith("\\|")) text = text.slice(0, -1);
19509
- const cells = [];
19510
- let cell2 = "";
19511
- for (let i = 0; i < text.length; i += 1) {
19512
- const ch = text[i];
19513
- if (ch === "\\" && text[i + 1] === "|") {
19514
- cell2 += "\\|";
19515
- i += 1;
19516
- } else if (ch === "|") {
19517
- cells.push(cell2);
19518
- cell2 = "";
19519
- } else cell2 += ch;
19520
- }
19521
- cells.push(cell2);
19522
- return cells.map(cellWords);
19505
+ return (0, import_source2.rowCells)(line).map(cellWords);
19523
19506
  }
19524
19507
  var LIST_ITEM = /^(\s*)(?:[-*+•]|\d{1,3}[.)])\s+(?:\[[ xX]\]\s+)?(.*)$/;
19525
19508
  var KEY_VALUE = /^\s*(?:\*\*|__)?([^:*_|]{1,40}?)(?::(?:\*\*|__)|(?:\*\*|__):|:)\s+(.+)$/;
@@ -19768,14 +19751,11 @@ function readTableShapes(text) {
19768
19751
  i = j + 1;
19769
19752
  continue;
19770
19753
  }
19771
- if (line.includes("|") && SEPARATOR.test(lines[i + 1] ?? "") && !SEPARATOR.test(line)) {
19754
+ if ((0, import_source2.tableStartsAt)(lines, i)) {
19772
19755
  const headers = uniqueLabels(splitPipes(line));
19773
- let j = i + 2;
19756
+ const j = (0, import_source2.findTableEnd)(lines, i);
19774
19757
  const matrix = [];
19775
- while (j < lines.length && (lines[j] ?? "").includes("|") && (lines[j] ?? "").trim() !== "") {
19776
- matrix.push(splitPipes(lines[j]));
19777
- j += 1;
19778
- }
19758
+ for (let r = i + 2; r < j; r += 1) matrix.push(splitPipes(lines[r]));
19779
19759
  const rows = rowsOf(headers, matrix);
19780
19760
  if (headers.length >= 1 && rows.length >= 1) {
19781
19761
  shapes.push({
@@ -20512,7 +20492,6 @@ function UndoRedoLive({ source }) {
20512
20492
  }
20513
20493
  function UndoRedoPair({ face, onUndo, onRedo }) {
20514
20494
  const undo = { depth: { back: face.back, forward: face.forward }, busy: face.busy };
20515
- if (undo.depth.back === 0 && undo.depth.forward === 0) return null;
20516
20495
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
20517
20496
  /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
20518
20497
  import_design_system57.Button,
@@ -23589,7 +23568,7 @@ function GridBody({
23589
23568
  {
23590
23569
  ...fills ? { className: "min-h-0 flex-1" } : {},
23591
23570
  frameHeight: fills ? "fill" : "content",
23592
- loadingRows: rememberedRowCount(rowMemoryKey, pageSize, fills ? "fill" : 5),
23571
+ loadingRows: rememberedRowCount(rowMemoryKey, pageSize, embedded ? fills ? "fill" : 5 : rememberedRowCount(`${tableId}:page:last`, pageSize, fills ? "fill" : 5)),
23593
23572
  ...!look.rowHeight ? { loadingRowHeight: RECORDS_GRID_ROW_PX } : {},
23594
23573
  data: rows,
23595
23574
  columns: tableColumns,