# ThemeSourceControls

How the theme contract scripts a source. A real adapter implements these
by mocking `matchMedia` and reading the document it applies the theme to.

This is an interface exported by `@mapcairn/core/contracts`, checked against version 0.2.0.

## Signature

```ts
import type { ThemeSourceControls } from "@mapcairn/core/contracts";
 
interface ThemeSourceControls
```

## Methods

### applied

```ts
applied(): ResolvedTheme | null;
```

The theme currently reflected on the document, or null when none is.

### setSystemTheme

```ts
setSystemTheme(theme: ResolvedTheme): void;
```

Changes the operating system's colour scheme, as the user would.

- `theme` (`ResolvedTheme`)

## See also

- [`ResolvedTheme`](https://docs.mapcairn.com/api/core/ResolvedTheme.md)

Source: [packages/core/src/contracts/themeSource.contract.ts:11](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/contracts/themeSource.contract.ts#L11)
