Skip to main content

lingxia_shell/
lib.rs

1//! Platform-neutral semantic core for the LingXia host shell.
2//!
3//! This crate owns app-declared sidebar actions, user-owned Pins, validation,
4//! Pin persistence, and deterministic state transitions. It deliberately
5//! has no dependency on lxapps, the surface graph, browser bookmarks, Logic,
6//! or platform UI. Host integration resolves metadata and executes activation;
7//! platform skins only render resolved snapshots and report stable ids.
8
9mod error;
10mod manager;
11mod pin;
12mod runtime;
13mod sidebar_action;
14mod sidebar_chrome;
15mod store;
16mod surface_menu;
17
18pub use error::{ShellError, ShellResult};
19pub use manager::{ShellManager, ShellSnapshot};
20pub use pin::{MAX_SHELL_PINS, PinCollection, PinMutation, ShellPin, ShellPinTarget};
21pub use runtime::{
22    ShellHost, SidebarActionIntent, activate_sidebar_action, apply_current_pins,
23    apply_current_sidebar_actions, initialize, is_pinned, manager, pins, reorder_pins,
24    resolved_sidebar_actions, set_pinned, set_sidebar_chrome, set_window_frame, sidebar_chrome,
25    window_frame,
26};
27pub use sidebar_action::{
28    MAX_HEADER_SIDEBAR_ACTIONS, ResolvedShellSidebarAction, ShellSidebarAction,
29    ShellSidebarActionUpdate, SidebarActionCollection, SidebarActionPlacement,
30};
31pub use sidebar_chrome::{
32    DEFAULT_EXPANDED_SIDEBAR_WIDTH, ShellWindowState, SidebarChrome, WindowFrame,
33};
34pub use store::{PIN_STORE_FILE, SHELL_WINDOW_FILE, ShellStore};
35pub use surface_menu::{
36    LxappSurfaceMenuAction, SurfaceMenuAction, SurfaceMenuBuiltinAction, SurfaceMenuContext,
37    SurfaceMenuIntent, SurfaceMenuItem, SurfaceMenuItemRole, SurfaceMenuSection,
38    SurfaceMenuSectionKind, SurfaceMenuSnapshot, compose_surface_menu,
39};