import { InstalledRepositorySettingsPanel, InstalledSettingsPanel } from "./pluginRegistry.mjs"; import { SettingsSectionContribution } from "@agimon-ai/po-core/web"; //#region src/web/lib/settingsSections.d.ts /** * The settings menu, as data: the rail's gear and the settings page both * need to name a section, and neither feature may import the other. * * The host's own pages come first and keep fixed positions, because they * are about the cockpit itself rather than about a package. Contributed pages * sort after them, by their declared order and then their id, so the menu is * stable across syncs whatever order plugins install in. */ export type SettingsWorkspace = 'general' | 'repository'; export interface SettingsSection { id: string; label: string; detail: string; /** A contributed page's own menu mark; host pages take theirs from the menu. */ icon?: SettingsSectionContribution['icon']; workspace: SettingsWorkspace; hostId?: string; readOnly?: boolean; /** The fields a contributed page renders; absent on the host's own pages. */ contribution?: SettingsSectionContribution; /** Package panel hosted inside the repository workspace. */ repositoryPanel?: InstalledRepositorySettingsPanel; /** A page the contributing package draws itself, rather than fields the host renders. */ panel?: InstalledSettingsPanel; /** The curated layer whose Plugins page now holds this page; Settings leaves it out. */ movedTo?: string; } /** The host's account page: Sign in with Po where the host offers it, and account-wide preferences. */ export declare const ACCOUNT_SETTINGS_SECTION = "account-preferences"; export declare const DEFAULT_SETTINGS_SECTION = "providers"; export declare const DEFAULT_REPOSITORY_SETTINGS_SECTION = "repositories"; /** * Every page the menu offers. Read through a function rather than held in a * const: plugins install before the first render, but a module-level array * evaluated at import time would freeze the list before that happened. */ export declare function settingsSections(workspace?: SettingsWorkspace, options?: { hostId?: string; isSignedInWorkerOrigin?: boolean; includeMoved?: boolean; canManageHosts?: boolean; }): readonly SettingsSection[]; export interface SettingsSectionGroup { id: string; label: string; sections: readonly SettingsSection[]; } /** The origin capability is supplied by the signed-in shell, never inferred from a hostname. */ export declare function settingsSectionGroups(hosts: readonly { id: string; name: string; }[], isSignedInWorkerOrigin: boolean, workspace?: SettingsWorkspace, options?: { canManageHosts?: boolean; }): readonly SettingsSectionGroup[]; export declare function settingsSection(id: string | undefined, isSignedInWorkerOrigin?: boolean, options?: { canManageHosts?: boolean; }): SettingsSection | undefined; /** Where an old `/settings/` link for a page that moved to its plugin now points: the layer id. */ export declare function movedSettingsLayer(id: string | undefined): string | undefined; //#endregion //# sourceMappingURL=settingsSections.d.mts.map