Variable: SETTINGS_SCHEMA
const SETTINGS_SCHEMA: {
chart: {
default: {};
key: "chartjs_";
type: "object";
validate: () => true;
};
export: {
default: {
format: "png";
includeWatermark: false;
quality: 0.9;
theme: "auto";
};
key: "export_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
mapTheme: {
default: true;
key: "ffv-map-theme-inverted";
type: "boolean";
validate: (value: unknown) => value is boolean;
};
powerEstimation: {
default: {};
key: "powerEst_";
type: "object";
validate: () => true;
};
theme: {
default: "dark";
key: "ffv-theme";
type: "string";
validate: (value: unknown) => boolean;
};
ui: {
default: {
animationsEnabled: true;
compactMode: false;
showAdvancedControls: false;
};
key: "ui_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
units: {
default: {
distance: "metric";
temperature: "celsius";
time: "24h";
};
key: "units_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
};
Defined in: utils/state/domain/settingsStateSchema.ts:47
Settings categories and their persistence configuration.
Type Declarationβ
chartβ
readonly chart: {
default: {
};
key: "chartjs_";
type: "object";
validate: () => true;
};
chart.defaultβ
readonly default: {
} = {};
chart.keyβ
readonly key: "chartjs_" = "chartjs_";
chart.typeβ
readonly type: "object" = "object";
chart.validateβ
readonly validate: () => true;
Chart settings are stored as individual primitive values under object keys such as chartjs_field_speed = "hidden".
Returnsβ
true
exportβ
readonly export: {
default: {
format: "png";
includeWatermark: false;
quality: 0.9;
theme: "auto";
};
key: "export_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
export.defaultβ
readonly default: {
format: "png";
includeWatermark: false;
quality: 0.9;
theme: "auto";
};
export.default.formatβ
readonly format: "png" = "png";
export.default.includeWatermarkβ
readonly includeWatermark: false = false;
export.default.qualityβ
readonly quality: 0.9 = 0.9;
export.default.themeβ
readonly theme: "auto" = "auto";
export.keyβ
readonly key: "export_" = "export_";
export.typeβ
readonly type: "object" = "object";
export.validateβ
readonly validate: (value: unknown) => value is Record<string, unknown> = isSettingsObject;
Parametersβ
valueβ
unknown
Returnsβ
value is Record<string, unknown>
mapThemeβ
readonly mapTheme: {
default: true;
key: "ffv-map-theme-inverted";
type: "boolean";
validate: (value: unknown) => value is boolean;
};
mapTheme.defaultβ
readonly default: true = true;
mapTheme.keyβ
readonly key: "ffv-map-theme-inverted" = "ffv-map-theme-inverted";
mapTheme.typeβ
readonly type: "boolean" = "boolean";
mapTheme.validateβ
readonly validate: (value: unknown) => value is boolean;
Parametersβ
valueβ
unknown
Returnsβ
value is boolean
powerEstimationβ
readonly powerEstimation: {
default: {
};
key: "powerEst_";
type: "object";
validate: () => true;
};
powerEstimation.defaultβ
readonly default: {
} = {};
powerEstimation.keyβ
readonly key: "powerEst_" = "powerEst_";
powerEstimation.typeβ
readonly type: "object" = "object";
powerEstimation.validateβ
readonly validate: () => true;
Power estimation settings are stored as individual primitive values under object keys such as powerEst_riderWeightKg = 75.
Returnsβ
true
themeβ
readonly theme: {
default: "dark";
key: "ffv-theme";
type: "string";
validate: (value: unknown) => boolean;
};
theme.defaultβ
readonly default: "dark" = "dark";
theme.keyβ
readonly key: "ffv-theme" = "ffv-theme";
theme.typeβ
readonly type: "string" = "string";
theme.validateβ
readonly validate: (value: unknown) => boolean;
Parametersβ
valueβ
unknown
Returnsβ
boolean
uiβ
readonly ui: {
default: {
animationsEnabled: true;
compactMode: false;
showAdvancedControls: false;
};
key: "ui_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
ui.defaultβ
readonly default: {
animationsEnabled: true;
compactMode: false;
showAdvancedControls: false;
};
ui.default.animationsEnabledβ
readonly animationsEnabled: true = true;
ui.default.compactModeβ
readonly compactMode: false = false;
ui.default.showAdvancedControlsβ
readonly showAdvancedControls: false = false;
ui.keyβ
readonly key: "ui_" = "ui_";
ui.typeβ
readonly type: "object" = "object";
ui.validateβ
readonly validate: (value: unknown) => value is Record<string, unknown> = isSettingsObject;
Parametersβ
valueβ
unknown
Returnsβ
value is Record<string, unknown>
unitsβ
readonly units: {
default: {
distance: "metric";
temperature: "celsius";
time: "24h";
};
key: "units_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
units.defaultβ
readonly default: {
distance: "metric";
temperature: "celsius";
time: "24h";
};
units.default.distanceβ
readonly distance: "metric" = "metric";
units.default.temperatureβ
readonly temperature: "celsius" = "celsius";
units.default.timeβ
readonly time: "24h" = "24h";
units.keyβ
readonly key: "units_" = "units_";
units.typeβ
readonly type: "object" = "object";
units.validateβ
readonly validate: (value: unknown) => value is Record<string, unknown> = isSettingsObject;
Parametersβ
valueβ
unknown
Returnsβ
value is Record<string, unknown>