mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 05:19:40 +02:00
- Add settings module to mana-core-auth with REST API endpoints - Create user_settings table with globalSettings and appOverrides (JSONB) - Add createUserSettingsStore() factory in shared-theme package - Integrate user settings in all app layouts (calendar, chat, contacts, etc.) - Support for nav position, theme, locale settings with per-app overrides - Optimistic updates with localStorage caching for offline support - Add comprehensive documentation in docs/USER_SETTINGS.md API Endpoints: - GET /api/v1/settings - Get all user settings - PATCH /api/v1/settings/global - Update global settings - PATCH /api/v1/settings/app/:appId - Set app override - DELETE /api/v1/settings/app/:appId - Remove app override 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
91 lines
1.7 KiB
TypeScript
91 lines
1.7 KiB
TypeScript
// Types
|
|
export type {
|
|
ThemeMode,
|
|
ThemeVariant,
|
|
EffectiveMode,
|
|
ThemeState,
|
|
ThemeColors,
|
|
ThemeVariantDefinition,
|
|
AppThemeConfig,
|
|
ThemeStore,
|
|
HSLValue,
|
|
// A11y Types
|
|
ContrastLevel,
|
|
ColorblindMode,
|
|
A11ySettings,
|
|
A11yStore,
|
|
A11yStoreConfig,
|
|
// User Settings Types (synced via mana-core-auth)
|
|
NavPosition,
|
|
NavSettings,
|
|
ThemeSettings,
|
|
GlobalSettings,
|
|
AppOverride,
|
|
UserSettingsResponse,
|
|
UserSettingsStore,
|
|
UserSettingsStoreConfig,
|
|
} from './types';
|
|
|
|
// User Settings Constants
|
|
export { DEFAULT_GLOBAL_SETTINGS } from './types';
|
|
|
|
// Constants
|
|
export {
|
|
THEME_VARIANTS,
|
|
THEME_DEFINITIONS,
|
|
DEFAULT_MODE,
|
|
DEFAULT_VARIANT,
|
|
CSS_VAR_PREFIX,
|
|
STORAGE_KEY_SUFFIX,
|
|
} from './constants';
|
|
|
|
// A11y Constants
|
|
export {
|
|
A11Y_STORAGE_KEY_SUFFIX,
|
|
DEFAULT_A11Y_SETTINGS,
|
|
COLORBLIND_OPTIONS,
|
|
CONTRAST_OPTIONS,
|
|
HIGH_CONTRAST_CONFIG,
|
|
COLORBLIND_TRANSFORMS,
|
|
MOTION_DEFAULTS,
|
|
} from './a11y-constants';
|
|
|
|
// Store
|
|
export { createThemeStore, APP_THEME_CONFIGS } from './store.svelte';
|
|
|
|
// A11y Store
|
|
export { createA11yStore } from './a11y-store.svelte';
|
|
|
|
// User Settings Store
|
|
export { createUserSettingsStore } from './user-settings-store.svelte';
|
|
|
|
// Utils
|
|
export {
|
|
isBrowser,
|
|
getSystemPreference,
|
|
createSystemPreferenceListener,
|
|
getThemeColors,
|
|
colorsToCssVars,
|
|
applyThemeToDocument,
|
|
loadThemeFromStorage,
|
|
saveThemeToStorage,
|
|
parseHSL,
|
|
createHSL,
|
|
adjustLightness,
|
|
adjustSaturation,
|
|
getContrastColor,
|
|
generateThemeCSS,
|
|
} from './utils';
|
|
|
|
// A11y Utils
|
|
export {
|
|
getSystemReducedMotion,
|
|
createReducedMotionListener,
|
|
applyMotionSettings,
|
|
applyHighContrast,
|
|
applyColorblindTransform,
|
|
applyA11yTransformations,
|
|
applyA11yAttributes,
|
|
loadA11yFromStorage,
|
|
saveA11yToStorage,
|
|
} from './a11y-utils';
|