{"version":3,"sources":["../../../src/components/OutletHost.tsx"],"sourcesContent":["import React, { useSyncExternalStore } from 'react';\nimport { createPortal } from 'react-dom';\nimport type { OutletEntry, OutletStore } from '../context/OutletStore';\n\nconst OutletContent = ({ entry }: { entry: OutletEntry }) => {\n  return <>{entry.render(...entry.args)}</>;\n};\n\n/**\n * Renders every outlet of one engine instance as a keyed portal. Keys are outlet ids, so removing one outlet\n * never shifts the others onto a different container, and a data change re-renders the content in place.\n */\nexport const OutletHost = ({ store }: { store: OutletStore }) => {\n  const { entries } = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);\n\n  return (\n    <>{Array.from(entries.values(), (entry) => createPortal(<OutletContent entry={entry} />, entry.el, entry.id))}</>\n  );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4C;AAC5C,uBAA6B;AAIpB;AADT,IAAM,gBAAgB,CAAC,EAAE,MAAM,MAA8B;AAC3D,SAAO,2EAAG,gBAAM,OAAO,GAAG,MAAM,IAAI,GAAE;AACxC;AAMO,IAAM,aAAa,CAAC,EAAE,MAAM,MAA8B;AAC/D,QAAM,EAAE,QAAQ,QAAI,mCAAqB,MAAM,WAAW,MAAM,aAAa,MAAM,WAAW;AAE9F,SACE,2EAAG,gBAAM,KAAK,QAAQ,OAAO,GAAG,CAAC,cAAU,+BAAa,4CAAC,iBAAc,OAAc,GAAI,MAAM,IAAI,MAAM,EAAE,CAAC,GAAE;AAElH;","names":[]}