Changeset 0.37.9 (#221)

This commit is contained in:
2026-03-21 20:16:19 +00:00
parent 2695bb3bdc
commit 37b639c9c8
27 changed files with 3435 additions and 2018 deletions

View File

@@ -127,8 +127,19 @@ export async function boot() {
});
};
// NotesPane render helper — surfaces call sw.notesPane(container, opts)
// Returns Promise<imperative handle>.
sw.notesPane = function (container, opts = {}) {
return import('../components/notes-pane/index.js').then(({ NotesPane }) => {
const handleRef = { current: null };
const { render } = preact;
render(html`<${NotesPane} handleRef=${handleRef} ...${opts} />`, container);
return handleRef.current;
});
};
// Marker for idempotency
sw._sdk = '0.37.8';
sw._sdk = '0.37.9';
// 8. Expose globally
window.sw = sw;
@@ -150,7 +161,7 @@ export async function boot() {
// 10. Signal ready
events.emit('sdk.ready', {}, { localOnly: true });
document.dispatchEvent(new CustomEvent('sw:ready', { detail: { sw } }));
console.log('[sw] SDK v0.37.8 ready');
console.log('[sw] SDK v0.37.9 ready');
return sw;
}