import { createWindowManager, createDesktopBinder } from './chunk-YCHJXSTC.js'; // src/adapters/svelte.ts function createManager(options) { return createWindowManager(options); } function wmStore(wm) { return { subscribe(run) { run(wm.getState()); return wm.subscribe(run); } }; } function wmWindowStore(wm, id) { return { subscribe(run) { run(wm.get(id)); let last = wm.get(id); return wm.subscribe(() => { const next = wm.get(id); if (next !== last) { last = next; run(next); } }); } }; } function createDesktop(wm, options) { const binder = createDesktopBinder(wm, options); return { binder, desktop(node) { const unbind = binder.bindDesktop(node); return { destroy: unbind }; }, window(node, params) { let unbind = binder.bindWindow(params.id, node, params); return { update(next) { unbind(); unbind = binder.bindWindow(next.id, node, next); }, destroy() { unbind(); } }; } }; } export { createDesktop, createManager, wmStore, wmWindowStore }; //# sourceMappingURL=svelte.js.map //# sourceMappingURL=svelte.js.map