From ad23a571161d5a1c6eecaf2f04651c86e388d746 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Wed, 22 Nov 2023 13:06:18 -0800 Subject: [PATCH] Improve reference for Spotlight.init --- .../content/docs/reference/configuration.md | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/packages/website/src/content/docs/reference/configuration.md b/packages/website/src/content/docs/reference/configuration.md index 64afcf29..899118f3 100644 --- a/packages/website/src/content/docs/reference/configuration.md +++ b/packages/website/src/content/docs/reference/configuration.md @@ -15,6 +15,43 @@ Spotlight.init({ ### `integrations` -_type:_ `[]` +**type:** [`SpotlightIntegration[]`](#spotlightintegration) Defines which integrations should be loaded for Spotlight. + +#### `SpotlightIntegration` + +```ts +// TODO +type SpotlightIntegration = {}; +``` + +### `sidecar` + +**type:** string + +The Sidecar event-source stream endpoint. + +```js +Spotlight.init({ + sidecar: 'http://localhost:8969/stream', +}); +``` + +### `anchor` + +**type:** [`AnchorConfig`](#anchorconfig) + +The anchor position for the toolbar. + +```js +Spotlight.init({ + anchor: 'centerRight', +}); +``` + +#### `AnchorConfig` + +```ts +type AnchorConfig = 'bottomRight' | 'bottomLeft' | 'centerRight' | 'centerLeft' | 'topLeft' | 'topRight'; +```