{"version":3,"file":"useWebPluginRegistry.cjs","names":["useSyncExternalStore","subscribeWebPluginRegistry","webPluginRegistryRevision","subscribeCuratedLayers","curatedLayersRevision"],"sources":["../../../src/web/stores/useWebPluginRegistry.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nimport { curatedLayersRevision, subscribeCuratedLayers } from '../lib/pluginMarketplaceApi';\nimport { subscribeWebPluginRegistry, webPluginRegistryRevision } from '../lib/pluginRegistry';\n\n/**\n * Re-renders a host surface when the focused session's plugin composition changes, or when the\n * catalog arrives and moves a plugin's settings from Settings to its own page.\n */\nexport function useWebPluginRegistry(): number {\n  const plugins = useSyncExternalStore(\n    subscribeWebPluginRegistry,\n    webPluginRegistryRevision,\n    webPluginRegistryRevision,\n  );\n  const curated = useSyncExternalStore(subscribeCuratedLayers, curatedLayersRevision, curatedLayersRevision);\n  return plugins + curated;\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,uBAA+B;CAO7C,QAAA,GANgBA,MAAAA,qBAAAA,CACdC,uBAAAA,4BACAC,uBAAAA,2BACAA,uBAAAA,yBAGW,KAAA,GADGF,MAAAA,qBAAAA,CAAqBG,6BAAAA,wBAAwBC,6BAAAA,uBAAuBA,6BAAAA,qBAC7D;AACzB"}