@ai-matrx/content-ir-react 0.19.0 → 0.19.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/dist/index.js CHANGED
@@ -834,8 +834,17 @@ function itemChanges(item, current, options = {}) {
834
834
 
835
835
  // directives/record-values.ts
836
836
  import { useEffect, useState, useSyncExternalStore as useSyncExternalStore2 } from "react";
837
- var revisions = /* @__PURE__ */ new Map();
838
- var listeners = /* @__PURE__ */ new Set();
837
+ var STORE_SLOT = /* @__PURE__ */ Symbol.for("@ai-matrx/content-ir-react/record-revisions");
838
+ function revisionStore() {
839
+ const slots = globalThis;
840
+ let store = slots[STORE_SLOT];
841
+ if (!store) {
842
+ store = { revisions: /* @__PURE__ */ new Map(), listeners: /* @__PURE__ */ new Set() };
843
+ slots[STORE_SLOT] = store;
844
+ }
845
+ return store;
846
+ }
847
+ var { revisions, listeners } = revisionStore();
839
848
  function recordRevision(id) {
840
849
  return revisions.get(id) ?? 0;
841
850
  }