Slots, events and URIs

Every slot Studio declares, with its shape and owner, plus the events and witwin:// URI helpers, generated from the Studio code.

Unstable: registering into a slot through the slots service uses a proposed service, which only system Plugins and Plugins loaded from a local path may use. Slot ids and their owners can change between releases.

Every slot some Studio code declares, found by reading the declare(...) calls. Register into a slot with the slots service (proposed) or with the host.register* function that targets it; see Web API and Linking panels. "Owner" is the Plugin whose activation declares the slot (workbench and kernel are Studio itself). A slot declared twice is listed twice.

36 declarations.

SlotShapeOwnerKeyValue typeDeclared inWhat it holds
console.channelsliststudio.consolestudio/src/plugins/console/index.tsxconsole.channels (list slot, owner studio.console): Console channels whose lines do not come from the Project's console topic, such as the desktop app's server process log.
document.viewerchainstudio.documentDocumentViewerstudio/src/plugins/document/index.tsxThe chain slot the Document panel reads its viewers from.
hierarchy.createsinglestudio.hierarchystudio/src/plugins/hierarchy/index.tsxSlots Hierarchy owns (D16 P5b).
hierarchy.externalDragliststudio.hierarchystudio/src/plugins/hierarchy/index.tsx
opener.handlerschainworkbenchOpenHandlerstudio/packages/witwin-workbench/src/services/opener.tsOpener: open(uri) (plan §5.5).
parameters.variedByliststudio.parametersstudio/src/plugins/parameters/index.tsxSlot Parameters owns (D16 P5b): who varies a parameter.
plot.resultsinglekernelstudio/src/app/bootstrap/builtinPanels.tsx
project.fileTypeskeyedstudio.projectProjectFileTypestudio/src/plugins/project/index.tsThe Project slot of file types (owner studio.project).
properties.inspectorkeyedstudio.propertiesPropertiesInspectorstudio/src/plugins/properties/index.tsxThe Properties slot of inspectors (owner studio.properties).
selection.kindskeyedworkbenchkindSelectionKindstudio/packages/witwin-workbench/src/services/selection.tskeyed by kind: the domains that take part in the selection.
settings.pageskeyedkernelidSettingsPageEntrystudio/src/features/settings/settingsPagesSlot.tssettings.pages (plan §5.4): pages of the Settings dialog that plugins add with host.registerSettingsPage.
studies.kind.editorkeyedstudio.studieskindStudyKindEditorstudio/src/plugins/studies/panel/registerSlots.tsKeyed by Study kind: the Setup and Results views of that kind.
studies.method.editorkeyedstudio.studiesmethodStudyMethodEditorstudio/src/plugins/studies/panel/registerSlots.tsKeyed by method kind: a settings editor that replaces the settings_schema form.
tasks.step.editorkeyedstudio.taskskindTaskStepKindstudio/src/plugins/tasks/stepKinds.ts
viewport.createsinglekernelstudio/src/app/bootstrap/builtinPanels.tsxSlots the Scene view (kernel) declares for what Plugins add to it (D16 P5).
viewport.droplistkernelstudio/src/app/bootstrap/builtinPanels.tsx
viewport.gizmosliststudio.viewportstudio/src/plugins/viewport/index.tsx
viewport.modesinglestudio.viewportstudio/src/plugins/viewport/index.tsxsingle, ViewportModeEntry.
viewport.overlaylistkernelstudio/src/app/bootstrap/builtinPanels.tsx
viewport.overlayMenuliststudio.viewportstudio/src/plugins/viewport/index.tsxlist, ViewportOverlayMenuEntry: items of the Overlays menu.
viewport.overlaysliststudio.viewportstudio/src/plugins/viewport/index.tsxValue: { id, zone, render }.
viewport.passesliststudio.viewportstudio/src/plugins/viewport/index.tsx
viewport.sceneLayersliststudio.viewportstudio/src/plugins/viewport/index.tsxlist, ViewportSceneLayerEntry: drawn inside the 3D scene.
viewport.toolbarliststudio.viewportstudio/src/plugins/viewport/index.tsxlist, ViewportToolbarEntry.
viewport.toolsliststudio.viewportstudio/src/plugins/viewport/index.tsx
viewport.visualizersliststudio.viewportstudio/src/plugins/viewport/index.tsx
workbench.chatsingleworkbenchstudio/packages/witwin-workbench/src/slots/workbenchSlots.tssingle: the Agent chat column left of the editor (studio.agent).
workbench.pageslistkernelWorkbenchPageEntrystudio/src/features/plugins/workbenchPages.tsx
workbench.panelskeyedworkbenchidWorkbenchPanelEntrystudio/packages/witwin-workbench/src/slots/workbenchSlots.tskeyed by panel id: every dockable panel, built-in or from a plugin.
workbench.primarysingleworkbenchstudio/packages/witwin-workbench/src/slots/workbenchSlots.tssingle: the main view behind the tracks (the Scene view).
workbench.raillistworkbenchWorkbenchRailEntrystudio/packages/witwin-workbench/src/slots/workbenchSlots.tslist: buttons on the bottom rail, by order.
workbench.rootlistkernelWorkbenchRootEntrystudio/src/app/workbenchRootSlot.tsx
workbench.topBar.centerlistworkbench{ order?: number }studio/packages/witwin-workbench/src/slots/workbenchSlots.ts
workbench.topBar.leftlistworkbench{ order?: number }studio/packages/witwin-workbench/src/slots/workbenchSlots.tslist: top bar items of each region, by order.
workbench.topBar.menuslistworkbench{ order?: number }studio/packages/witwin-workbench/src/slots/workbenchSlots.tslist: top bar menus (File, Edit, ...), by order.
workbench.topBar.rightlistworkbench{ order?: number }studio/packages/witwin-workbench/src/slots/workbenchSlots.ts

Events (events service)#

Typed in WorkbenchEventMap (studio/packages/witwin-workbench/src/services/events.ts). Other names carry unknown; a Plugin's own events are <pluginId>.<what>.

EventPayloadWhen
project.file.created{ path: string }A file appeared in the Project (created, imported, copied).
run.finished{ runId: string; status: string }A Run reached a final status.
study.updated{ studyId: string }A Study's record or its runs changed.
scene.saved{ sceneId: string | null }The current Scene was written to disk (File > Save).
library.placed{ itemId?: string }The user placed an item from the Library (a temporary Library panel closes).
console.message{ level: 'log' | 'warning' | 'error'; message: string; source: string; timestamp: string }A line for the Console's Default channel from outside the Project's console topic (Electron's server process log promotes tracebacks).

witwin:// URI helpers#

Exported by @witwin/workbench/services (studio/packages/witwin-workbench/src/services/witwinUri.ts). Form: witwin://<kind>/<id>[?key=value][#fragment]; a Plugin's own kinds are <pluginId>.<kind>.

FunctionWhat it returns
isWitwinUriKind(kind: string)
parseWitwinUri(href: string)Parse a witwin:// href; null for any other scheme or a malformed URI.
formatWitwinUri(uri: Pick<WitwinUri, 'kind' | 'id'> & Partial<Pick<WitwinUri, 'params' | 'fragment'>>)Build a href from parts; the inverse of parseWitwinUri for well-formed input.
fileUri(path: string, lines?: { line: number; endLine?: number })witwin://file/<project-relative path>; #L10-L20 selects lines.
sceneUri(sceneId: string)witwin://scene/<sceneId>.
sceneObjectUri(target: SceneObjectTarget & { objectId: string })witwin://scene/<sceneId>/object/<objectId>[?index=1][#Component.field].
parseSceneTarget(uri: WitwinUri)The scene, object and field a scene URI points at; null for another kind.
resultUri(resultId: string)witwin://result/<id>.
studyUri(studyId: string, options: { variable?: string } = {})witwin://study/<id>[?variable=<parameter>]; variable scrolls its Setup to that variable.
parameterUri(name: string)witwin://parameter/<name>: a Scene parameter by name.
runUri(runId: string)witwin://run/<id>.
panelUri(panelId: string)witwin://panel/<id>: show a panel by its id.