@ai-matrx/records 0.86.2 → 0.87.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.
@@ -2163,9 +2163,10 @@ function sourceArchivedOf(value) {
2163
2163
  }
2164
2164
 
2165
2165
  // src/ops.ts
2166
+ import { globalSlot } from "@ai-matrx/kit/global-slot";
2166
2167
  var REMEMBER_MS = 3e4;
2167
2168
  var REMEMBER_MAX = 500;
2168
- var ours = /* @__PURE__ */ new Map();
2169
+ var ours = globalSlot("ai-matrx.records.op-ledger", () => /* @__PURE__ */ new Map());
2169
2170
  function trim(now) {
2170
2171
  for (const [id, at] of ours) {
2171
2172
  if (now - at <= REMEMBER_MS) break;
@@ -4958,7 +4959,8 @@ function isWritingDoor(door) {
4958
4959
  }
4959
4960
 
4960
4961
  // src/core/recordChanges.ts
4961
- var listeners = /* @__PURE__ */ new Set();
4962
+ import { globalSlot as globalSlot2 } from "@ai-matrx/kit/global-slot";
4963
+ var listeners = globalSlot2("ai-matrx.records.record-change-listeners", () => /* @__PURE__ */ new Set());
4962
4964
  function announceRecordChanged(recordId) {
4963
4965
  for (const listener of [...listeners]) {
4964
4966
  try {
@@ -4968,7 +4970,7 @@ function announceRecordChanged(recordId) {
4968
4970
  }
4969
4971
  }
4970
4972
  }
4971
- var removed = /* @__PURE__ */ new Set();
4973
+ var removed = globalSlot2("ai-matrx.records.removed-records", () => /* @__PURE__ */ new Set());
4972
4974
  function markRecordRemoved(recordId) {
4973
4975
  removed.add(recordId);
4974
4976
  }
@@ -4982,7 +4984,7 @@ function onRecordChanged(listener) {
4982
4984
  listeners.add(listener);
4983
4985
  return () => listeners.delete(listener);
4984
4986
  }
4985
- var tableListeners = /* @__PURE__ */ new Set();
4987
+ var tableListeners = globalSlot2("ai-matrx.records.table-structure-listeners", () => /* @__PURE__ */ new Set());
4986
4988
  function announceTableStructureChanged(tableId) {
4987
4989
  for (const listener of [...tableListeners]) {
4988
4990
  try {