54 lines
2.6 KiB
JSON
54 lines
2.6 KiB
JSON
{
|
|
"module": "shared-theme.themeConfig",
|
|
"content": {
|
|
"path": "shared-theme.themeConfig",
|
|
"docstring": "Semantic (mode-aware) color tokens.\r\n\r\nAdds a `semantic` slice to the MUI theme (augmenting `@mui/material/styles`)\r\nwith surface/border/text colors, resolved per light/dark mode by\r\n`getSemanticColors`. `AppTheme` publishes these as CSS custom properties.",
|
|
"objects": {
|
|
"SemanticColors": {
|
|
"name": "SemanticColors",
|
|
"kind": "interface",
|
|
"path": "shared-theme.themeConfig.SemanticColors",
|
|
"signature": "SemanticColors",
|
|
"docstring": "Mode-aware semantic color groups attached to the MUI theme as\r\n`theme.semantic` and exposed as CSS custom properties by `AppTheme`.",
|
|
"members": {
|
|
"border": {
|
|
"name": "border",
|
|
"kind": "property",
|
|
"path": "shared-theme.themeConfig.SemanticColors.border",
|
|
"signature": "border: { default: string; subtle: string }",
|
|
"docstring": "Border colors."
|
|
},
|
|
"surface": {
|
|
"name": "surface",
|
|
"kind": "property",
|
|
"path": "shared-theme.themeConfig.SemanticColors.surface",
|
|
"signature": "surface: { card: string; elevated: string; page: string }",
|
|
"docstring": "Background surface colors."
|
|
},
|
|
"text": {
|
|
"name": "text",
|
|
"kind": "property",
|
|
"path": "shared-theme.themeConfig.SemanticColors.text",
|
|
"signature": "text: { muted: string; primary: string; secondary: string }",
|
|
"docstring": "Text colors."
|
|
}
|
|
}
|
|
},
|
|
"SemanticColorMode": {
|
|
"name": "SemanticColorMode",
|
|
"kind": "type-alias",
|
|
"path": "shared-theme.themeConfig.SemanticColorMode",
|
|
"signature": "SemanticColorMode: \"light\" | \"dark\"",
|
|
"docstring": "Color mode supported by the semantic tokens."
|
|
},
|
|
"getSemanticColors": {
|
|
"name": "getSemanticColors",
|
|
"kind": "function",
|
|
"path": "shared-theme.themeConfig.getSemanticColors",
|
|
"signature": "getSemanticColors(mode: SemanticColorMode): SemanticColors",
|
|
"docstring": "Resolve the semantic color groups for a color mode.\r\n\r\nDark mode uses fixed HSL values; light mode derives borders/text from the\r\n`gray` ramp (with `alpha`).\n\n**Parameters:**\n\n- `mode` — `\"light\"` or `\"dark\"`.\n\n**Returns:**\n\nThe `SemanticColors` for that mode.\n\n**Example:**\n\n```ts\r\nconst colors = getSemanticColors(\"dark\");\r\ncolors.surface.page; // \"hsl(0, 0%, 9%)\"\r\n```"
|
|
}
|
|
}
|
|
}
|
|
}
|