import './settingsTab.component.scss'; import './settingsNav.scss'; import { NgZone } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ConfigService } from 'tabby-core'; import { SidebarSnippet } from '../configProvider'; import { SidebarPlusEditorService } from '../editorLauncher.service'; import { SidebarPlusSnippetsService } from '../snippets.service'; /** * The plugin's page in Tabby's settings. * * Two pages, split by *ownership* rather than by subject (user's rule): every * setting sits under the switch of the feature it belongs to, so switching that * feature off takes its options away with it. Only what governs the whole * plugin — or Tabby itself — stays on the general page. */ export declare class SidebarPlusSettingsTabComponent { private editors; private config; private snippetsService; private ngbModal; private zone; /** * Tabby's own settings pages carry it — it is what gives the page its * padding and max width. Dropped when this page is mounted as a tab of the * unified "Better Tabby" panel (BetterPanelEmbedded token present): the * host carries the layout then. */ contentBox: boolean; /** * The page to open on, set by whoever is about to open this tab and read * once here. * * Static because the component does not exist yet at that point: the * sidebar's "Gérer la bibliothèque…" asks Tabby for the settings tab, and * Angular builds this only once the tab is shown. Reset on read so it * cannot pin the page for every later visit. */ static requestedSection: 'general' | 'features' | 'snippets' | null; /** Which page of this tab is showing. Deliberately not persisted: a reading position, not a preference. */ section: 'general' | 'features' | 'snippets'; editorPath: string; /** The snippet open in the editor, `null` when the list is showing. A blank `id` means it is new. */ draft: SidebarSnippet | null; constructor(editors: SidebarPlusEditorService, config: ConfigService, snippetsService: SidebarPlusSnippetsService, ngbModal: NgbModal, zone: NgZone, embedded: unknown); /** `href='#'` is what gives the tabs their pointer and focus behaviour; without this the page would jump to the top on every click. */ setSection(section: 'general' | 'features' | 'snippets', event: Event): void; get snippets(): SidebarSnippet[]; /** What a deletion would take away, stated before it is done rather than discovered afterwards. */ attachmentCount(snippet: SidebarSnippet): number; /** The placeholders a command reads, listed under it so the library says what each will ask of a profile. */ variablesOf(snippet: SidebarSnippet): { name: string; required: boolean; }[]; /** * Snippets attached nowhere. * * Each row already says so on its own; this is the count, and it only * shows up once there is something to clean. Detaching is the everyday * gesture and deleting is not, so the library fills up with experiments * that nothing points at any more — worth surfacing, not worth nagging * about. */ get unusedCount(): number; newSnippet(): void; editSnippet(snippet: SidebarSnippet): void; cancelEdit(): void; /** An edit changes the command everywhere it is attached — the page says so next to the button. */ saveDraft(): Promise; /** * Deletes the command outright, once confirmed. * * Confirmed and not undoable: the count of what it would take away is the * whole point of asking, and it is knowable *before* rather than after. * The plugin's own modal rather than a system dialog (piège #42), with the * cautious button focused — a reflex Entrée must not delete. */ deleteSnippet(snippet: SidebarSnippet): Promise; get enabled(): boolean; setEnabled(value: boolean): Promise; /** * Whether a block is on — its switch ticked *and* the host still able to * carry it. * * Both halves in one call because the template needs the conjunction * everywhere: it drives the toggle's state and the `*ngIf` on the options * the block owns. `requires` is the precondition id of hostCompat.ts, absent * for blocks that depend on nothing beyond the plugin itself. */ blockOn(key: string, requires?: string): boolean; /** Whether the host still provides a precondition. No id means nothing to require. */ hostHas(id?: string): boolean; /** * Stores the user's own answer, and only that. * * A block the host can no longer carry is shown unavailable with its switch * left as it was, never rewritten to false: that setting is the user's * choice, and overwriting it would lose it the day the host provides the * component again. */ setBlock(key: string, value: boolean): Promise; get workspaceSelectorMode(): string; setWorkspaceSelectorMode(value: string): Promise; get dragOutFolders(): boolean; setDragOutFolders(value: boolean): Promise; get deleteDefaultButton(): string; setDeleteDefaultButton(value: string): Promise; get hideNativeTransfersMenu(): boolean; /** * No repaint to force here: the class on `body` is applied by * SidebarPlusMountService, which is already listening to `config.changed$`. */ setHideNativeTransfersMenu(value: boolean): Promise; get autoRefreshSeconds(): number; /** Clamped to whole seconds and never negative; 0 is the documented "off". */ setAutoRefreshSeconds(value: unknown): Promise; get autoReturnToProfiles(): boolean; setAutoReturnToProfiles(value: boolean): Promise; get pingIntervalSeconds(): number; /** Same clamping as the auto-refresh above: whole seconds, never negative, 0 being the documented "off". */ setPingIntervalSeconds(value: unknown): Promise; save(): Promise; /** * `zone.run()` around the state change, not around the await: the picker * resolves outside Angular's zone, so assigning `editorPath` on the way * back updates the field without repainting it (piège #41). */ browse(): Promise; clear(): Promise; get canOpenWith(): boolean; }