UNPKG

@empoleon/spotlight

Version:

Command center components for react and Empoleon

1 lines 819 B
{"version":3,"file":"Spotlight.context.cjs","sources":["../src/Spotlight.context.ts"],"sourcesContent":["import { createSafeContext, GetStylesApi } from '@empoleon/core';\nimport { SpotlightStore } from './spotlight.store';\nimport type { SpotlightRootFactory } from './SpotlightRoot';\n\ninterface SpotlightContextValue {\n query: string;\n setQuery: (query: string) => void;\n getStyles: GetStylesApi<SpotlightRootFactory>;\n store: SpotlightStore;\n closeOnActionTrigger: boolean | undefined;\n}\n\nexport const [SpotlightProvider, useSpotlightContext] = createSafeContext<SpotlightContextValue>(\n 'Spotlight component was not found in tree'\n);\n"],"names":["SpotlightProvider","useSpotlightContext","createSafeContext"],"mappings":";;;;AAYO,MAAM,CAACA,iBAAA,EAAmBC,mBAAmB,CAAA,GAAIC,sBAAA,CACtD,2CACF;;;;;"}