Selkies

panels/catalog

The panel catalog: every panel a layout can show, in the order every layout shows them, with what decides whether the page shows it and what it draws. A layout decides only the arrangement and the skin: the sidebar folds each panel into a section, the toolbar puts the settings panels in its card of tabs, floats what floats beside its bar, and lists the rest in its menu. Adding a panel is one entry here.

The stream toggles every layout carries (video, audio, microphone, webcam, and the gamepad input) are a catalog of their own, STREAMS.

Interfaces

PanelContext

Defined in: panels/catalog.ts:34

What decides whether a panel shows.

Properties

d
d: DashboardState;

Defined in: panels/catalog.ts:35

panels
panels: any;

Defined in: panels/catalog.ts:37

Which settings panels and cards have anything to show.

s
s: any;

Defined in: panels/catalog.ts:38

primary
primary: boolean;

Defined in: panels/catalog.ts:40

This page is the primary display's, not a second screen's.


PanelCard

Defined in: panels/catalog.ts:44

One card of a settings panel: a section lists the cards one after the other, a tab folds them in an accordion.

Properties

value
value: string;

Defined in: panels/catalog.ts:45

title
title: string;

Defined in: panels/catalog.ts:47

Dictionary key of its title.

shown
shown: (ctx) => boolean;

Defined in: panels/catalog.ts:48

Parameters
ParameterType
ctxPanelContext
Returns

boolean

Body
Body: ComponentType;

Defined in: panels/catalog.ts:49


PanelSpec

Defined in: panels/catalog.ts:53

One panel of the catalog.

Properties

id
id: string;

Defined in: panels/catalog.ts:54

contentId
contentId: string;

Defined in: panels/catalog.ts:56

The id of its content element, which the suites address.

title
title: string;

Defined in: panels/catalog.ts:58

Dictionary key of its title.

tab?
tab?: string;

Defined in: panels/catalog.ts:60

Dictionary key of its short name, where a layout tabs it.

icon?
icon?: LucideIcon;

Defined in: panels/catalog.ts:62

Its mark in a menu or on a bar.

kind
kind: "settings" | "stats" | "panel";

Defined in: panels/catalog.ts:68

settings: the stream's settings, in cards. stats: the stats, which a layout lays out itself (LayoutSpec.stats over the stream). panel: anything else, drawn by Body.

shown
shown: (ctx, place) => boolean;

Defined in: panels/catalog.ts:69

Parameters
ParameterType
ctxPanelContext
placePanelPlace
Returns

boolean

cards?
cards?: PanelCard[];

Defined in: panels/catalog.ts:70

Body?
Body?: ComponentType<{
  place: PanelPlace;
}>;

Defined in: panels/catalog.ts:71

dialog?
dialog?: "apps" | "files";

Defined in: panels/catalog.ts:73

A menu opens this dialog rather than drawing the body.

menuClass?: string;

Defined in: panels/catalog.ts:75

Classes of the menu popup that draws the body, where it needs a width of its own.

floats?
floats?: boolean;

Defined in: panels/catalog.ts:77

A layout with a bar floats it beside the bar rather than listing it in a menu.


StreamSpec

Defined in: panels/catalog.ts:153

One stream toggle of the catalog.

Properties

id
id: string;

Defined in: panels/catalog.ts:154

icon
icon: LucideIcon;

Defined in: panels/catalog.ts:155

label
label: string;

Defined in: panels/catalog.ts:157

Dictionary key of its name in a menu.

enable
enable: string;

Defined in: panels/catalog.ts:159

Dictionary keys of what a press does, while off and while on.

disable
disable: string;

Defined in: panels/catalog.ts:160

input?
input?: boolean;

Defined in: panels/catalog.ts:162

An input rather than a stream: a layout that floats the gamepads panel toggles it there.

allowed
allowed: (r) => boolean;

Defined in: panels/catalog.ts:164

Whether the server lets the page toggle it (renderable).

Parameters
ParameterType
rDashboardState
Returns

boolean

on
on: (d) => boolean;

Defined in: panels/catalog.ts:165

Parameters
ParameterType
dDashboardState
Returns

boolean

toggle
toggle: (d) => void;

Defined in: panels/catalog.ts:166

Parameters
ParameterType
dDashboardState
Returns

void

Type Aliases

PanelPlace

type PanelPlace = "section" | "menu" | "float";

Defined in: panels/catalog.ts:31

Where a panel is drawn: a section of its own, a menu's popup, or a panel floating beside a bar.

Variables

PANELS

const PANELS: PanelSpec[];

Defined in: panels/catalog.ts:80


STREAMS

const STREAMS: StreamSpec[];

Defined in: panels/catalog.ts:170

The stream toggles, in order: the streams, then the gamepad input.

Functions

usePanelContext()

function usePanelContext(): PanelContext;

Defined in: panels/catalog.ts:142

What every panel's shown reads, from the shared state.

Returns

PanelContext


shownCards()

function shownCards(panel, ctx): PanelCard[];

Defined in: panels/catalog.ts:148

The cards of a settings panel the page shows.

Parameters

ParameterType
panelPanelSpec
ctxPanelContext

Returns

PanelCard[]