@ai-matrx/records-ui 0.95.17 → 0.95.19

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.95.19
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records-ui/v0.95.18..npm/records-ui/v0.95.19 -- apps/shared/records-ui`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.95.18
10
+
11
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
12
+ `git diff npm/records-ui/v0.95.17..npm/records-ui/v0.95.18 -- apps/shared/records-ui`).
13
+ No source changes intended and no consumer action required.
14
+
3
15
  ## 0.95.17
4
16
 
5
17
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/dist/index.cjs CHANGED
@@ -20053,9 +20053,27 @@ function GridBody({
20053
20053
  return { written, readBack, missing, refusals };
20054
20054
  }, [pastePlan, client, tableId, records, merged, applyPasteAsOne, versions]);
20055
20055
  const columnIds = (0, import_react97.useMemo)(() => ordered.map((field2) => field2.key), [ordered]);
20056
+ const lookWrites = (0, import_react97.useRef)(null);
20056
20057
  const writeLook = (0, import_react97.useCallback)(
20057
- (next) => onPresentationChange?.(next),
20058
- [onPresentationChange]
20058
+ (next) => {
20059
+ if (!onPresentationChange) return;
20060
+ const held = lookWrites.current?.base === presentation ? lookWrites.current : null;
20061
+ const merged2 = { ...held?.merged ?? presentation };
20062
+ const before = presentation;
20063
+ const after = next;
20064
+ for (const key of /* @__PURE__ */ new Set([...Object.keys(before), ...Object.keys(after)])) {
20065
+ if (before[key] === after[key]) continue;
20066
+ if (after[key] === void 0) delete merged2[key];
20067
+ else merged2[key] = after[key];
20068
+ }
20069
+ const entry = { base: presentation, merged: merged2 };
20070
+ lookWrites.current = entry;
20071
+ queueMicrotask(() => {
20072
+ if (lookWrites.current === entry) lookWrites.current = null;
20073
+ });
20074
+ onPresentationChange(merged2);
20075
+ },
20076
+ [onPresentationChange, presentation]
20059
20077
  );
20060
20078
  const chooseSummary = (0, import_react97.useCallback)(
20061
20079
  (key, op2) => {
@@ -20064,9 +20082,9 @@ function GridBody({
20064
20082
  else next[key] = op2;
20065
20083
  setLocalSummaries(next);
20066
20084
  const { summaries: _dropped, ...rest } = presentation;
20067
- onPresentationChange?.(Object.keys(next).length > 0 ? { ...rest, summaries: next } : rest);
20085
+ writeLook(Object.keys(next).length > 0 ? { ...rest, summaries: next } : rest);
20068
20086
  },
20069
- [chosenSummaries, presentation, onPresentationChange]
20087
+ [chosenSummaries, presentation, writeLook]
20070
20088
  );
20071
20089
  const handToAgent = (0, import_react97.useCallback)(
20072
20090
  (action3, row) => host.runAgentAction?.({
@@ -22225,7 +22243,7 @@ var OBJECT_ACTION_GROUPS = [
22225
22243
  var GROUP_IDS = new Set(OBJECT_ACTION_GROUPS.map((g) => g.id));
22226
22244
  var DEFAULT_ACTION_ORIGIN = "https://www.aimatrx.com";
22227
22245
  function tableLink(tableId, origin = DEFAULT_ACTION_ORIGIN) {
22228
- return `${origin.replace(/\/+$/, "")}/data-v2/${encodeURIComponent(tableId)}`;
22246
+ return `${origin.replace(/\/+$/, "")}/data/${encodeURIComponent(tableId)}`;
22229
22247
  }
22230
22248
  function makeDefaultWords(layoutLabel) {
22231
22249
  return layoutLabel ? `Make ${layoutLabel} the default` : "Make this the default";
@@ -25891,7 +25909,7 @@ var import_design_system76 = require("@ai-matrx/design-system");
25891
25909
 
25892
25910
  // src/recordActions.ts
25893
25911
  function recordLink(tableId, recordId, origin = DEFAULT_ACTION_ORIGIN) {
25894
- return `${origin.replace(/\/+$/, "")}/data-v2/${encodeURIComponent(tableId)}?record=${encodeURIComponent(recordId)}`;
25912
+ return `${origin.replace(/\/+$/, "")}/data/${encodeURIComponent(tableId)}?record=${encodeURIComponent(recordId)}`;
25895
25913
  }
25896
25914
  var NOOP2 = () => {
25897
25915
  };