mindcache 3.3.0 → 3.3.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/{CloudAdapter-CSncOr3V.d.mts → CloudAdapter-BgpqZE00.d.mts} +1 -1
- package/dist/{CloudAdapter-CSncOr3V.d.ts → CloudAdapter-BgpqZE00.d.ts} +1 -1
- package/dist/cloud/index.d.mts +2 -2
- package/dist/cloud/index.d.ts +2 -2
- package/dist/cloud/index.js +17 -5
- package/dist/cloud/index.js.map +1 -1
- package/dist/cloud/index.mjs +17 -5
- package/dist/cloud/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MindCache, a as MindCacheOptions } from './CloudAdapter-
|
|
2
|
-
export { A as AccessLevel, C as CloudAdapter, j as CloudAdapterEvents, h as CloudConfig, i as ConnectionState, D as DEFAULT_KEY_ATTRIBUTES, G as GlobalListener, H as HistoryEntry, e as HistoryOptions, K as KeyAttributes, b as KeyType, L as Listener, f as MindCacheCloudOptions, g as MindCacheIndexedDBOptions, c as STM, d as STMEntry, S as SystemTag } from './CloudAdapter-
|
|
1
|
+
import { M as MindCache, a as MindCacheOptions } from './CloudAdapter-BgpqZE00.mjs';
|
|
2
|
+
export { A as AccessLevel, C as CloudAdapter, j as CloudAdapterEvents, h as CloudConfig, i as ConnectionState, D as DEFAULT_KEY_ATTRIBUTES, G as GlobalListener, H as HistoryEntry, e as HistoryOptions, K as KeyAttributes, b as KeyType, L as Listener, f as MindCacheCloudOptions, g as MindCacheIndexedDBOptions, c as STM, d as STMEntry, S as SystemTag } from './CloudAdapter-BgpqZE00.mjs';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
|
|
5
5
|
interface IndexedDBConfig {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MindCache, a as MindCacheOptions } from './CloudAdapter-
|
|
2
|
-
export { A as AccessLevel, C as CloudAdapter, j as CloudAdapterEvents, h as CloudConfig, i as ConnectionState, D as DEFAULT_KEY_ATTRIBUTES, G as GlobalListener, H as HistoryEntry, e as HistoryOptions, K as KeyAttributes, b as KeyType, L as Listener, f as MindCacheCloudOptions, g as MindCacheIndexedDBOptions, c as STM, d as STMEntry, S as SystemTag } from './CloudAdapter-
|
|
1
|
+
import { M as MindCache, a as MindCacheOptions } from './CloudAdapter-BgpqZE00.js';
|
|
2
|
+
export { A as AccessLevel, C as CloudAdapter, j as CloudAdapterEvents, h as CloudConfig, i as ConnectionState, D as DEFAULT_KEY_ATTRIBUTES, G as GlobalListener, H as HistoryEntry, e as HistoryOptions, K as KeyAttributes, b as KeyType, L as Listener, f as MindCacheCloudOptions, g as MindCacheIndexedDBOptions, c as STM, d as STMEntry, S as SystemTag } from './CloudAdapter-BgpqZE00.js';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
|
|
5
5
|
interface IndexedDBConfig {
|
package/dist/index.js
CHANGED
|
@@ -429,7 +429,7 @@ var MindCache = class {
|
|
|
429
429
|
listeners = {};
|
|
430
430
|
globalListeners = [];
|
|
431
431
|
// Metadata
|
|
432
|
-
version = "3.1
|
|
432
|
+
version = "3.3.1";
|
|
433
433
|
// Internal flag to prevent sync loops when receiving remote updates
|
|
434
434
|
// (Less critical with Yjs but kept for API compat)
|
|
435
435
|
_isRemoteUpdate = false;
|
|
@@ -489,8 +489,22 @@ var MindCache = class {
|
|
|
489
489
|
constructor(options) {
|
|
490
490
|
this.doc = new Y__namespace.Doc();
|
|
491
491
|
this.rootMap = this.doc.getMap("mindcache");
|
|
492
|
-
this.rootMap.
|
|
493
|
-
|
|
492
|
+
this.rootMap.observeDeep((events) => {
|
|
493
|
+
const keysAffected = /* @__PURE__ */ new Set();
|
|
494
|
+
events.forEach((event) => {
|
|
495
|
+
if (event.target === this.rootMap) {
|
|
496
|
+
const mapEvent = event;
|
|
497
|
+
mapEvent.keysChanged.forEach((key) => keysAffected.add(key));
|
|
498
|
+
} else if (event.target.parent === this.rootMap) {
|
|
499
|
+
for (const [key, val] of this.rootMap) {
|
|
500
|
+
if (val === event.target) {
|
|
501
|
+
keysAffected.add(key);
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
keysAffected.forEach((key) => {
|
|
494
508
|
const entryMap = this.rootMap.get(key);
|
|
495
509
|
if (entryMap) {
|
|
496
510
|
const value = entryMap.get("value");
|
|
@@ -503,8 +517,6 @@ var MindCache = class {
|
|
|
503
517
|
}
|
|
504
518
|
}
|
|
505
519
|
});
|
|
506
|
-
});
|
|
507
|
-
this.rootMap.observeDeep((_events) => {
|
|
508
520
|
this.notifyGlobalListeners();
|
|
509
521
|
});
|
|
510
522
|
this.initGlobalUndoManager();
|