@aglyn/shared-data-types 1.0.0-beta.229 → 1.0.0-beta.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js.map +1 -1
- package/src/lib/host-theme-fonts.d.ts +41 -0
- package/src/lib/host-theme-fonts.js +19 -0
- package/src/lib/host-theme-fonts.js.map +1 -0
- package/src/lib/host-theme.d.ts +6 -1
- package/src/lib/host-theme.js +0 -7
- package/src/lib/host-theme.js.map +1 -1
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
export * as DoD from './lib/dod';
|
|
18
18
|
export * from './lib/crud';
|
|
19
19
|
export * from './lib/host-theme';
|
|
20
|
+
export type * from './lib/host-theme-fonts';
|
|
20
21
|
export * from './lib/initializable';
|
|
21
22
|
export * from './lib/lifecycle';
|
|
22
23
|
export * from './lib/normalized';
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/shared/data/types/src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * as DoD from './lib/dod'\nexport * from './lib/crud'\nexport * from './lib/host-theme'\nexport * from './lib/initializable'\nexport * from './lib/lifecycle'\nexport * from './lib/normalized'\nexport * from './lib/semantic'\n"],"names":["DoD"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,sBAAqB,eAAW;AAAhC,SAAO,QAAKA,GAAG,GAAiB;AAChC,cAAc,gBAAY;AAC1B,cAAc,sBAAkB;
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/shared/data/types/src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * as DoD from './lib/dod'\nexport * from './lib/crud'\nexport * from './lib/host-theme'\nexport type * from './lib/host-theme-fonts'\nexport * from './lib/initializable'\nexport * from './lib/lifecycle'\nexport * from './lib/normalized'\nexport * from './lib/semantic'\n"],"names":["DoD"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,sBAAqB,eAAW;AAAhC,SAAO,QAAKA,GAAG,GAAiB;AAChC,cAAc,gBAAY;AAC1B,cAAc,sBAAkB;AAEhC,cAAc,yBAAqB;AACnC,cAAc,qBAAiB;AAC/B,cAAc,sBAAkB;AAChC,cAAc,oBAAgB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/** A font's generic family; picks the local face its fallback is drawn from. */
|
|
18
|
+
export type HostThemeFontCategory = 'sans-serif' | 'serif' | 'monospace' | 'display' | 'handwriting';
|
|
19
|
+
/** Font-unit metrics read from the file; a page sizes its fallback to them. */
|
|
20
|
+
export interface HostThemeFontMetrics {
|
|
21
|
+
unitsPerEm: number;
|
|
22
|
+
ascent: number;
|
|
23
|
+
/** Negative. */
|
|
24
|
+
descent: number;
|
|
25
|
+
lineGap: number;
|
|
26
|
+
/** Advance width averaged over English text by letter frequency. */
|
|
27
|
+
xWidthAvg: number;
|
|
28
|
+
}
|
|
29
|
+
/** One uploaded face of a `custom` font: a WOFF2 in the media library. */
|
|
30
|
+
export interface HostThemeFontFace {
|
|
31
|
+
/** For a variable file, the bottom of its weight range. */
|
|
32
|
+
weight: number;
|
|
33
|
+
/** For a variable file, the top of its weight range (`font-weight: 100 900`). */
|
|
34
|
+
weightMax?: number;
|
|
35
|
+
style: 'normal' | 'italic';
|
|
36
|
+
/** A `media:` reference. */
|
|
37
|
+
src: string;
|
|
38
|
+
/** Content hash; versions the URL. */
|
|
39
|
+
version?: string;
|
|
40
|
+
unicodeRange?: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ // The theme font shapes a page loads its fonts by (AGL-3656).
|
|
17
|
+
/** A font's generic family; picks the local face its fallback is drawn from. */ /** One uploaded face of a `custom` font: a WOFF2 in the media library. */ export { };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=host-theme-fonts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/shared/data/types/src/lib/host-theme-fonts.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// The theme font shapes a page loads its fonts by (AGL-3656).\n\n/** A font's generic family; picks the local face its fallback is drawn from. */\nexport type HostThemeFontCategory =\n | 'sans-serif'\n | 'serif'\n | 'monospace'\n | 'display'\n | 'handwriting'\n\n/** Font-unit metrics read from the file; a page sizes its fallback to them. */\nexport interface HostThemeFontMetrics {\n unitsPerEm: number\n ascent: number\n /** Negative. */\n descent: number\n lineGap: number\n /** Advance width averaged over English text by letter frequency. */\n xWidthAvg: number\n}\n\n/** One uploaded face of a `custom` font: a WOFF2 in the media library. */\nexport interface HostThemeFontFace {\n /** For a variable file, the bottom of its weight range. */\n weight: number\n /** For a variable file, the top of its weight range (`font-weight: 100 900`). */\n weightMax?: number\n style: 'normal' | 'italic'\n /** A `media:` reference. */\n src: string\n /** Content hash; versions the URL. */\n version?: string\n unicodeRange?: string\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,8DAA8D;AAE9D,8EAA8E,GAmB9E,wEAAwE,GACxE,WAWC"}
|
package/src/lib/host-theme.d.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import type { HostThemeFontCategory, HostThemeFontFace, HostThemeFontMetrics } from './host-theme-fonts';
|
|
17
18
|
/**
|
|
18
19
|
* Persisted host theme document types.
|
|
19
20
|
*
|
|
@@ -71,8 +72,12 @@ export interface HostThemeFont {
|
|
|
71
72
|
/** Font family name, e.g. "Inter". */
|
|
72
73
|
family: string;
|
|
73
74
|
weights?: Array<number>;
|
|
75
|
+
italics?: Array<number>;
|
|
74
76
|
/** Where the tenant loads the font from; system fonts need no loading. */
|
|
75
|
-
source?: 'google' | 'system';
|
|
77
|
+
source?: 'google' | 'system' | 'custom';
|
|
78
|
+
category?: HostThemeFontCategory;
|
|
79
|
+
metrics?: HostThemeFontMetrics;
|
|
80
|
+
faces?: Array<HostThemeFontFace>;
|
|
76
81
|
}
|
|
77
82
|
/**
|
|
78
83
|
* The text styles a theme can set: MUI's own, plus the four the platform adds
|
package/src/lib/host-theme.js
CHANGED
|
@@ -13,13 +13,6 @@
|
|
|
13
13
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
|
-
*/ /**
|
|
17
|
-
* Persisted host theme document types.
|
|
18
|
-
*
|
|
19
|
-
* These are plain-JSON (Firestore round-trippable) descriptions of a MUI
|
|
20
|
-
* theme. They intentionally carry no MUI imports so data-scope libs can
|
|
21
|
-
* depend on them; `@aglyn/shared-ui-theme` owns the conversion into runtime
|
|
22
|
-
* `ThemeOptions`.
|
|
23
16
|
*/ export { };
|
|
24
17
|
|
|
25
18
|
//# sourceMappingURL=host-theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/shared/data/types/src/lib/host-theme.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Persisted host theme document types.\n *\n * These are plain-JSON (Firestore round-trippable) descriptions of a MUI\n * theme. They intentionally carry no MUI imports so data-scope libs can\n * depend on them; `@aglyn/shared-ui-theme` owns the conversion into runtime\n * `ThemeOptions`.\n */\n\nexport type HostThemeScheme = 'light' | 'dark'\n\nexport interface HostThemePaletteColor {\n main: string\n light?: string\n dark?: string\n contrastText?: string\n}\n\n/**\n * Pale washes of the three accents, used as SURFACES (AGL-1244).\n *\n * Deliberately NOT a {@link HostThemePaletteColor}: a tint has no ramp and no\n * `contrastText`, because it is never a component `color`. It is the fill\n * behind an icon that is already `primary.dark` / `secondary.main` /\n * `tertiary.main`, so its members are named after the accent they belong to\n * rather than after a shade. Same shape as `background` and `text` — a group\n * of string leaves — which is why the theme editor reads and writes it\n * through the same path-based fields.\n */\nexport interface HostThemeTintColors {\n primary?: string\n secondary?: string\n tertiary?: string\n}\n\n/** Palette color keys supported per scheme, including repo-custom ones. */\nexport interface HostThemeSchemeColors {\n primary?: HostThemePaletteColor\n secondary?: HostThemePaletteColor\n tertiary?: HostThemePaletteColor\n surface?: HostThemePaletteColor\n error?: HostThemePaletteColor\n warning?: HostThemePaletteColor\n info?: HostThemePaletteColor\n success?: HostThemePaletteColor\n background?: {\n default?: string\n paper?: string\n }\n text?: {\n primary?: string\n secondary?: string\n disabled?: string\n }\n tint?: HostThemeTintColors\n divider?: string\n}\n\nexport interface HostThemeFont {\n /** Font family name, e.g. \"Inter\". */\n family: string\n weights?: Array<number>\n /** Where the tenant loads the font from; system fonts need no loading. */\n source?: 'google' | 'system'\n}\n\n/**\n * The text styles a theme can set: MUI's own, plus the four the platform adds\n * (AGL-3411) — `displayXl`, the rung above `h1`, and the `lede`, `bodyCompact`\n * and `micro` body rungs (17/13/11px in the platform theme). Leaving one out\n * of a theme keeps the platform's own definition, so a theme that restyles\n * every heading but not these renders them in the platform's font and weights.\n */\nexport type HostThemeTypographyVariantKey =\n | 'displayXl'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'subtitle1'\n | 'subtitle2'\n | 'body1'\n | 'body2'\n | 'button'\n | 'caption'\n | 'overline'\n | 'lede'\n | 'bodyCompact'\n | 'micro'\n\nexport interface HostThemeTypographyVariant {\n fontFamily?: string\n fontSize?: string | number\n fontWeight?: number\n lineHeight?: string | number\n letterSpacing?: string | number\n textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase'\n}\n\nexport interface HostThemeTypography {\n /** CSS font-family stack applied theme-wide. */\n fontFamily?: string\n variants?: {\n [P in HostThemeTypographyVariantKey]?: HostThemeTypographyVariant\n }\n}\n\n/**\n * A style a component takes only when its props match (MUI's theme\n * `variants`), e.g. `{ props: { variant: 'outlined' }, sx: { borderWidth: 2 } }`.\n *\n * `style` is literal CSS and `sx` is resolved against the theme, the same\n * split {@link HostThemeComponentOverride} makes between `styleOverrides` and\n * `sx`. Either or both.\n */\nexport interface HostThemeComponentVariant {\n /** Every prop named must equal the value given for the style to apply. */\n props: Record<string, string | number | boolean | null>\n style?: Record<string, unknown>\n sx?: Record<string, unknown>\n}\n\n/**\n * Plain-JSON component override. Functions are not representable by design,\n * so the theme-dependent half of MUI's component API is expressed as data:\n *\n * - `defaultProps` — MUI's own.\n * - `styleOverrides` — slot name → literal CSS object, MUI's own. `padding:\n * 8` is 8px.\n * - `sx` — slot name → an `sx` object, resolved against the site's theme per\n * scheme: palette paths (`borderColor: 'divider'`, `bgcolor:\n * 'primary.main'`), spacing units (`px: 2`), radius multiples\n * (`borderRadius: 2`), shadow indices (`boxShadow: 3`) and whole type\n * variants (`typography: 'button'`). A separate field, not a flag on\n * `styleOverrides`, because the same number means a different length in\n * each (`padding: 8` is 8px there and `spacing(8)` here).\n * - `variants` — props-matched styles, MUI's own.\n */\nexport interface HostThemeComponentOverride {\n defaultProps?: Record<string, unknown>\n styleOverrides?: Record<string, unknown>\n sx?: Record<string, Record<string, unknown>>\n variants?: Array<HostThemeComponentVariant>\n}\n\n/**\n * Plain-JSON theme mixins.\n *\n * `toolbar` is the only one a host can set, and it exists because it is the\n * ONLY way to change toolbar height from data (AGL-1242). MUI builds the\n * Toolbar's `regular` variant style FROM `theme.mixins.toolbar`, and applies\n * that variant AFTER `components.MuiToolbar.styleOverrides` — so a slot\n * override can never win, no matter how it is written. The value is a CSS\n * object and may nest media queries, e.g.\n * `{ minHeight: '56px', '@media (min-width:600px)': { minHeight: '72px' } }`.\n */\nexport interface HostThemeMixins {\n toolbar?: Record<string, unknown>\n}\n\nexport interface HostTheme {\n colorSchemes?: {\n [P in HostThemeScheme]?: HostThemeSchemeColors\n }\n typography?: HostThemeTypography\n fonts?: Array<HostThemeFont>\n shape?: {\n borderRadius?: number\n }\n spacing?: number\n mixins?: HostThemeMixins\n /** Keyed by MUI component slot name (e.g. `MuiButton`). Consumers validate against a whitelist. */\n components?: Record<string, HostThemeComponentOverride>\n /**\n * Whether visitors get a dark scheme. Absent (`'auto'`) follows the\n * visitor's system setting or their choice in the theme mode switcher,\n * rendering the platform's default dark palette under whatever dark colors\n * the site authored. `'off'` keeps every visitor on light — for a site whose\n * content carries light-only backgrounds — and hides the switcher on\n * published pages.\n */\n darkScheme?: 'auto' | 'off'\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/shared/data/types/src/lib/host-theme.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n HostThemeFontCategory,\n HostThemeFontFace,\n HostThemeFontMetrics,\n} from './host-theme-fonts'\n\n/**\n * Persisted host theme document types.\n *\n * These are plain-JSON (Firestore round-trippable) descriptions of a MUI\n * theme. They intentionally carry no MUI imports so data-scope libs can\n * depend on them; `@aglyn/shared-ui-theme` owns the conversion into runtime\n * `ThemeOptions`.\n */\n\nexport type HostThemeScheme = 'light' | 'dark'\n\nexport interface HostThemePaletteColor {\n main: string\n light?: string\n dark?: string\n contrastText?: string\n}\n\n/**\n * Pale washes of the three accents, used as SURFACES (AGL-1244).\n *\n * Deliberately NOT a {@link HostThemePaletteColor}: a tint has no ramp and no\n * `contrastText`, because it is never a component `color`. It is the fill\n * behind an icon that is already `primary.dark` / `secondary.main` /\n * `tertiary.main`, so its members are named after the accent they belong to\n * rather than after a shade. Same shape as `background` and `text` — a group\n * of string leaves — which is why the theme editor reads and writes it\n * through the same path-based fields.\n */\nexport interface HostThemeTintColors {\n primary?: string\n secondary?: string\n tertiary?: string\n}\n\n/** Palette color keys supported per scheme, including repo-custom ones. */\nexport interface HostThemeSchemeColors {\n primary?: HostThemePaletteColor\n secondary?: HostThemePaletteColor\n tertiary?: HostThemePaletteColor\n surface?: HostThemePaletteColor\n error?: HostThemePaletteColor\n warning?: HostThemePaletteColor\n info?: HostThemePaletteColor\n success?: HostThemePaletteColor\n background?: {\n default?: string\n paper?: string\n }\n text?: {\n primary?: string\n secondary?: string\n disabled?: string\n }\n tint?: HostThemeTintColors\n divider?: string\n}\n\nexport interface HostThemeFont {\n /** Font family name, e.g. \"Inter\". */\n family: string\n weights?: Array<number>\n italics?: Array<number>\n /** Where the tenant loads the font from; system fonts need no loading. */\n source?: 'google' | 'system' | 'custom'\n category?: HostThemeFontCategory\n metrics?: HostThemeFontMetrics\n faces?: Array<HostThemeFontFace>\n}\n\n/**\n * The text styles a theme can set: MUI's own, plus the four the platform adds\n * (AGL-3411) — `displayXl`, the rung above `h1`, and the `lede`, `bodyCompact`\n * and `micro` body rungs (17/13/11px in the platform theme). Leaving one out\n * of a theme keeps the platform's own definition, so a theme that restyles\n * every heading but not these renders them in the platform's font and weights.\n */\nexport type HostThemeTypographyVariantKey =\n | 'displayXl'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'subtitle1'\n | 'subtitle2'\n | 'body1'\n | 'body2'\n | 'button'\n | 'caption'\n | 'overline'\n | 'lede'\n | 'bodyCompact'\n | 'micro'\n\nexport interface HostThemeTypographyVariant {\n fontFamily?: string\n fontSize?: string | number\n fontWeight?: number\n lineHeight?: string | number\n letterSpacing?: string | number\n textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase'\n}\n\nexport interface HostThemeTypography {\n /** CSS font-family stack applied theme-wide. */\n fontFamily?: string\n variants?: {\n [P in HostThemeTypographyVariantKey]?: HostThemeTypographyVariant\n }\n}\n\n/**\n * A style a component takes only when its props match (MUI's theme\n * `variants`), e.g. `{ props: { variant: 'outlined' }, sx: { borderWidth: 2 } }`.\n *\n * `style` is literal CSS and `sx` is resolved against the theme, the same\n * split {@link HostThemeComponentOverride} makes between `styleOverrides` and\n * `sx`. Either or both.\n */\nexport interface HostThemeComponentVariant {\n /** Every prop named must equal the value given for the style to apply. */\n props: Record<string, string | number | boolean | null>\n style?: Record<string, unknown>\n sx?: Record<string, unknown>\n}\n\n/**\n * Plain-JSON component override. Functions are not representable by design,\n * so the theme-dependent half of MUI's component API is expressed as data:\n *\n * - `defaultProps` — MUI's own.\n * - `styleOverrides` — slot name → literal CSS object, MUI's own. `padding:\n * 8` is 8px.\n * - `sx` — slot name → an `sx` object, resolved against the site's theme per\n * scheme: palette paths (`borderColor: 'divider'`, `bgcolor:\n * 'primary.main'`), spacing units (`px: 2`), radius multiples\n * (`borderRadius: 2`), shadow indices (`boxShadow: 3`) and whole type\n * variants (`typography: 'button'`). A separate field, not a flag on\n * `styleOverrides`, because the same number means a different length in\n * each (`padding: 8` is 8px there and `spacing(8)` here).\n * - `variants` — props-matched styles, MUI's own.\n */\nexport interface HostThemeComponentOverride {\n defaultProps?: Record<string, unknown>\n styleOverrides?: Record<string, unknown>\n sx?: Record<string, Record<string, unknown>>\n variants?: Array<HostThemeComponentVariant>\n}\n\n/**\n * Plain-JSON theme mixins.\n *\n * `toolbar` is the only one a host can set, and it exists because it is the\n * ONLY way to change toolbar height from data (AGL-1242). MUI builds the\n * Toolbar's `regular` variant style FROM `theme.mixins.toolbar`, and applies\n * that variant AFTER `components.MuiToolbar.styleOverrides` — so a slot\n * override can never win, no matter how it is written. The value is a CSS\n * object and may nest media queries, e.g.\n * `{ minHeight: '56px', '@media (min-width:600px)': { minHeight: '72px' } }`.\n */\nexport interface HostThemeMixins {\n toolbar?: Record<string, unknown>\n}\n\nexport interface HostTheme {\n colorSchemes?: {\n [P in HostThemeScheme]?: HostThemeSchemeColors\n }\n typography?: HostThemeTypography\n fonts?: Array<HostThemeFont>\n shape?: {\n borderRadius?: number\n }\n spacing?: number\n mixins?: HostThemeMixins\n /** Keyed by MUI component slot name (e.g. `MuiButton`). Consumers validate against a whitelist. */\n components?: Record<string, HostThemeComponentOverride>\n /**\n * Whether visitors get a dark scheme. Absent (`'auto'`) follows the\n * visitor's system setting or their choice in the theme mode switcher,\n * rendering the platform's default dark palette under whatever dark colors\n * the site authored. `'off'` keeps every visitor on light — for a site whose\n * content carries light-only backgrounds — and hides the switcher on\n * published pages.\n */\n darkScheme?: 'auto' | 'off'\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GA8KD,WAsBC"}
|