@jupyter/ydoc
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -87,2 +87,21 @@ /* ----------------------------------------------------------------------------- | ||
} | ||
if (metaEvent.keysChanged.has('metadata')) { | ||
// Handle metadata change when adding/removing the YMap | ||
const change = metaEvent.changes.keys.get('metadata'); | ||
if ((change === null || change === void 0 ? void 0 : change.action) === 'add' && !change.oldValue) { | ||
const metadataChange = new Map(); | ||
for (const key of Object.keys(this.metadata)) { | ||
metadataChange.set(key, { | ||
action: 'add', | ||
oldValue: undefined | ||
}); | ||
this._metadataChanged.emit({ | ||
key, | ||
type: 'add', | ||
newValue: this.getMetadata(key) | ||
}); | ||
} | ||
this._changed.emit({ metadataChange }); | ||
} | ||
} | ||
if (metaEvent.keysChanged.has('nbformat')) { | ||
@@ -89,0 +108,0 @@ const change = metaEvent.changes.keys.get('nbformat'); |
{ | ||
"name": "@jupyter/ydoc", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Jupyter document structures for collaborative editing using YJS", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129830
2997