AI Notice: Most documentation right now was auto-generated by an LLM. Handwritten documentation will be implemented over time on the road to 1.0
ModuleProvider
Module provider - provides a UI module that can be placed in any panel
Modules are self-contained UI components like Navigator, File Preview, or Terminal that can be arranged in tabs or splits within panels.
Signature
interface ModuleProvider {
type: "module";
id: string;
name: string;
icon: string;
allowedPositions?: ModulePosition[];
defaultPosition?: ModulePosition;
component: import("svelte").Component<ModuleProviderProps>;
allowMultiple?: boolean;
requiresRemount?: boolean;
getDefaultState?: () => unknown;
shortcut?: ItemShortcutConfig;
getTabTitle?: (state?: unknown) => string;
getTabIcon?: (state?: unknown) => string;
}Members
| Name | Type | Required | Description |
|---|---|---|---|
type | "module" | yes | — |
id | string | yes | Unique module identifier (e.g., ‘phials.module.navigator’) |
name | string | yes | Human-readable name for display |
icon | string | yes | Icon for tabs and headers |
allowedPositions | ModulePosition[] | no | Positions where this module can be placed (default: all panels, not center) |
defaultPosition | ModulePosition | no | Default position for new instances |
component | import("svelte").Component<ModuleProviderProps> | yes | The module component |
allowMultiple | boolean | no | Whether multiple instances of this module are allowed (default: false) |
requiresRemount | boolean | no | If true, the component is fully remounted when switching between instances (needed for lifecycle-heavy modules like Terminal). Default: false. |
getDefaultState | () => unknown | no | Default state for new module instances |
shortcut | ItemShortcutConfig | no | Keyboard shortcut to toggle/focus this module |
getTabTitle | (state?: unknown) => string | no | Dynamic tab title when rendered in center (falls back to name) |
getTabIcon | (state?: unknown) => string | no | Dynamic tab icon when rendered in center (falls back to icon) |