@mmstack/primitives 22.11.0 → 22.11.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.
@@ -5780,6 +5780,17 @@ function createConvergingApply(opt) {
5780
5780
  const reg = registers.get(keyOf$1(path));
5781
5781
  return reg ? liveOf(reg) : [];
5782
5782
  },
5783
+ liveUnder: (path) => {
5784
+ const key = keyOf$1(path);
5785
+ const out = [];
5786
+ const at = registers.get(key);
5787
+ for (const reg of at ? [at, ...descendantsOf(key)] : descendantsOf(key)) {
5788
+ const siblings = liveOf(reg);
5789
+ if (siblings.length)
5790
+ out.push({ path: reg.path, siblings });
5791
+ }
5792
+ return out;
5793
+ },
5783
5794
  materialize: () => {
5784
5795
  const root = registers.get('');
5785
5796
  const res = root?.result;
@@ -6092,6 +6103,7 @@ function opSync(source, opt) {
6092
6103
  log.flush(); // fold pending base writes in first, so they count as observed
6093
6104
  return conv.captureFrontier();
6094
6105
  },
6106
+ liveUnder: (path) => conv.liveUnder(path),
6095
6107
  commitScope: (frontier, fn) => {
6096
6108
  log.flush(); // earlier pending writes emit against the live frontier, not this one
6097
6109
  scopeFrontier = frontier;