Panel Frontend Module

Panel Frontend Module

Svelte 5 frontend module providing the panel registry, docked panel containers with tab management, collapsible mini-panels, floating panel windows with drag/resize, and the floating panel orchestrator.

Responsibilities

Public API Surface

Export Kind Description
register() function Register a panel component with metadata
getComponentById() function Lookup a registered component by ID
getRegisteredComponents() function Get all registered component configs
getComponentsForIds() function Resolve ID array to sorted configs
getDefaultLayout() function Build default docked layout from registrations
isAllowedAtPosition() function Check if a component supports a position
PanelContainer component Docked panel container with tabs
FloatingPanel component Individual floating panel window
FloatingPanelManager component Orchestrator for all floating panels
MiniPanel component Collapsed panel icon strip
PanelComponentConfig type Registration config interface
PanelPosition type 'left' | 'right' | 'bottom' | 'floating'
PanelTier type 'core' | 'pro' | 'addon'
PanelSource type 'builtin' | 'plugin'

Internal Structure

src/lib/components/panels/
  |-- index.ts                    (barrel exports)
  |-- PanelRegistry.ts            (singleton registry + built-in registrations)
  |-- PanelContainer.svelte       (docked panel with tabs + lazy-loading)
  |-- FloatingPanel.svelte        (floating window with drag/resize)
  |-- FloatingPanelManager.svelte (orchestrator for floating instances)
  +-- MiniPanel.svelte            (collapsed icon strip)

Component Relationships

Dependencies

Dependency Type Purpose
userPreferences store internal Panel layout state, mutations, persistence
LucideIcons external Dynamic icon resolution for tabs and mini-panels
svelte Component type external Generic component reference for lazy-loading
createLogger internal Logger factory for debug/info output

Dataflow Diagrams