Changeset 0.21.5 (#91)

This commit is contained in:
2026-03-01 20:35:10 +00:00
parent d67cfd37c2
commit aadba77887
15 changed files with 1499 additions and 14 deletions

View File

@@ -167,6 +167,28 @@ const Surfaces = {
return this._registry.size > 1;
},
/**
* Get a saved DocumentFragment for a specific surface + region.
* Used by surfaces like editor-mode that want to embed chat DOM
* inside their own layout.
* @param {string} surfaceId — the surface that owns the saved DOM
* @param {string} regionId — the region name
* @returns {DocumentFragment|null}
*/
getSavedFragment(surfaceId, regionId) {
const key = `${surfaceId}::${regionId}`;
return this._saved.get(key) || null;
},
/**
* Put a DocumentFragment back into the saved store.
* Used during deactivation to return borrowed DOM.
*/
putSavedFragment(surfaceId, regionId, frag) {
const key = `${surfaceId}::${regionId}`;
this._saved.set(key, frag);
},
// ── Region Management ────────────────────
/**