@mmstack/primitives 21.11.0 → 21.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.
|
@@ -5740,6 +5740,17 @@ function createConvergingApply(opt) {
|
|
|
5740
5740
|
const reg = registers.get(keyOf$1(path));
|
|
5741
5741
|
return reg ? liveOf(reg) : [];
|
|
5742
5742
|
},
|
|
5743
|
+
liveUnder: (path) => {
|
|
5744
|
+
const key = keyOf$1(path);
|
|
5745
|
+
const out = [];
|
|
5746
|
+
const at = registers.get(key);
|
|
5747
|
+
for (const reg of at ? [at, ...descendantsOf(key)] : descendantsOf(key)) {
|
|
5748
|
+
const siblings = liveOf(reg);
|
|
5749
|
+
if (siblings.length)
|
|
5750
|
+
out.push({ path: reg.path, siblings });
|
|
5751
|
+
}
|
|
5752
|
+
return out;
|
|
5753
|
+
},
|
|
5743
5754
|
materialize: () => {
|
|
5744
5755
|
const root = registers.get('');
|
|
5745
5756
|
const res = root?.result;
|
|
@@ -6051,6 +6062,7 @@ function opSync(source, opt) {
|
|
|
6051
6062
|
log.flush(); // fold pending base writes in first, so they count as observed
|
|
6052
6063
|
return conv.captureFrontier();
|
|
6053
6064
|
},
|
|
6065
|
+
liveUnder: (path) => conv.liveUnder(path),
|
|
6054
6066
|
commitScope: (frontier, fn) => {
|
|
6055
6067
|
log.flush(); // earlier pending writes emit against the live frontier, not this one
|
|
6056
6068
|
scopeFrontier = frontier;
|