chore: follow the general comments style

This commit is contained in:
Ilia Mashkov
2026-04-17 12:14:55 +03:00
parent 0ebf75b24e
commit cfaff46d59
56 changed files with 1600 additions and 499 deletions
@@ -22,6 +22,9 @@ import { responsiveManager } from '$shared/lib';
export type LayoutMode = 'list' | 'grid';
interface LayoutConfig {
/**
* Active display mode (list | grid)
*/
mode: LayoutMode;
}
@@ -40,9 +43,13 @@ const DEFAULT_CONFIG: LayoutConfig = {
* calculation. Persists user preference to localStorage.
*/
class LayoutManager {
/** Current layout mode */
/**
* Reactive layout mode state
*/
#mode = $state<LayoutMode>(DEFAULT_CONFIG.mode);
/** Persistent storage for layout preference */
/**
* Persistence layer for saving layout between sessions
*/
#store = createPersistentStore<LayoutConfig>(STORAGE_KEY, DEFAULT_CONFIG);
constructor() {
@@ -53,7 +60,9 @@ class LayoutManager {
}
}
/** Current layout mode ('list' or 'grid') */
/**
* Current active layout mode
*/
get mode(): LayoutMode {
return this.#mode;
}
@@ -66,12 +75,16 @@ class LayoutManager {
return responsiveManager.isMobile || responsiveManager.isTabletPortrait ? SM_GAP_PX : MD_GAP_PX;
}
/** Whether currently in list mode */
/**
* True if currently showing a single-column list
*/
get isListMode(): boolean {
return this.#mode === 'list';
}
/** Whether currently in grid mode */
/**
* True if currently showing a multi-column grid
*/
get isGridMode(): boolean {
return this.#mode === 'grid';
}
@@ -1,4 +1,6 @@
/** @vitest-environment jsdom */
/**
* @vitest-environment jsdom
*/
import {
afterEach,