sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
19 lines (15 loc) • 529 B
text/typescript
import {map, type OperatorFunction} from 'rxjs'
import {type CapabilityRecord, type StudioRenderingContext} from './types'
const capabilitiesByRenderingContext: Record<StudioRenderingContext['name'], CapabilityRecord> = {
coreUi: {
globalUserMenu: true,
globalWorkspaceControl: true,
},
default: {},
}
/**
* @internal
*/
export function listCapabilities(): OperatorFunction<StudioRenderingContext, CapabilityRecord> {
return map((renderingContext) => capabilitiesByRenderingContext[renderingContext.name])
}