Files
iptvnator/tools/styles/mat-sys-baseline.mjs
T
4grayandClaude Fable 5 eac1dfa09e fix(theme): replace no-op --mat-sys-* tokens with --app-* design tokens
The Material theme setup in apps/web/src/m3-theme.scss uses the older M3
API (mat.define-theme + mat.all-component-themes), which emits component
tokens but never emits the --mat-sys-* system tokens. As a result ~540
var(--mat-sys-*) references across the app were silent no-ops: the
declarations were invalid at computed-value time and fell back to
inherited/initial values, so many backgrounds, borders and dividers never
rendered and several text/icon colors sat at the wrong contrast.

Rather than migrate to mat.theme() (which would flip every no-op at once
with M3 azure-palette values foreign to the hand-tuned design), remap the
high-visibility usages to the existing --app-* design tokens defined for
both themes in m3-theme.scss, verified screenshot-driven in light and dark
via Electron CDP.

Changes:
- Add --app-error-color and --app-accent-color tokens (light + dark).
- Fix high-visibility surfaces: settings area, workspace shell header,
  playlist switcher, downloads, channel-details dialog, account-info,
  group/category management dialogs, sources context/filters panels,
  nav-list, and the .dark-theme app background.
- Point the Tailwind color palette at --app-* tokens instead of --mat-sys-*.
- Strip ~150 dead var(--app-x, var(--mat-sys-y)) fallbacks repo-wide (the
  fallback can never be taken).
- UI polish surfaced by the remap: suppress Material's circular icon-button
  state layer in the header (keep the rounded-rectangle hover), remove the
  orphan divider before the download button, remove the redundant right-edge
  accent bar on active rail items (the filled chip is enough), and raise the
  header/switcher control icons from the muted tier to --app-body-color so
  they no longer read as disabled.

Guard against regressions:
- tools/styles/check-mat-sys-usage.mjs fails on any new var(--mat-sys-*)
  reference; legacy usages are grandfathered in a shrink-only baseline
  (tools/styles/mat-sys-baseline.mjs). Wired into the CI Lint job and
  exposed as `pnpm run lint:styles`.

Docs:
- docs/architecture/theme-design-tokens.md documents why the tokens are
  no-ops, the --app-* mapping table, and the screenshot-driven migration
  protocol. CLAUDE.md updated with the token policy and the new lint check.

Scrollbar-related --mat-sys-* usages are intentionally left untouched here;
they belong to the separate branch claude/iptvnator-dark-scrollbar-2600aa.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 22:31:46 +02:00

159 lines
5.4 KiB
JavaScript

// Generated by tools/styles/generate-mat-sys-baseline.mjs — do not edit by hand.
// Files with legacy var(--mat-sys-*) references that predate the guard.
// These tokens are never emitted by the current theme (m3-theme.scss), so
// every reference is a silent no-op. Use the --app-* design tokens instead
// (see docs/architecture/theme-design-tokens.md). This list should only
// shrink: migrate a file, rerun the generator, and commit the result.
export const matSysBaseline = new Map([
['apps/web/src/styles.scss', 2],
[
'libs/playlist/m3u/feature-player/src/lib/video-player/video-player.component.scss',
6,
],
[
'libs/playlist/shared/ui/src/lib/recent-playlists/playlist-info/playlist-info.component.ts',
3,
],
[
'libs/playlist/shared/ui/src/lib/recent-playlists/playlist-item/playlist-item.component.scss',
4,
],
[
'libs/portal/catalog/feature/src/lib/category-content-view/category-content-view.component.scss',
5,
],
[
'libs/portal/shared/ui/src/lib/components/favorites-layout/favorites-layout.component.scss',
5,
],
[
'libs/portal/shared/ui/src/lib/components/global-favorites-list/global-favorites-list.component.scss',
1,
],
[
'libs/portal/shared/ui/src/lib/components/grid-list/grid-list.component.scss',
2,
],
[
'libs/portal/shared/ui/src/lib/components/portal-empty-state/portal-empty-state.component.scss',
1,
],
[
'libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-page.component.scss',
3,
],
[
'libs/portal/shared/ui/src/lib/components/unified-collection/unified-grid-tab.component.scss',
1,
],
[
'libs/portal/shared/ui/src/lib/components/unified-collection/unified-live-tab.component.scss',
6,
],
[
'libs/portal/shared/ui/src/lib/navigation/portal-rail-links.component.scss',
1,
],
['libs/portal/shared/ui/src/lib/styles/_skeleton.scss', 1],
[
'libs/portal/stalker/feature/src/lib/stalker-live-stream-layout/stalker-live-stream-layout.component.scss',
3,
],
[
'libs/portal/xtream/feature/src/lib/portal-channels-list/portal-channels-list.component.scss',
1,
],
[
'libs/portal/xtream/feature/src/lib/search-results/search-results.component.scss',
5,
],
[
'libs/portal/xtream/feature/src/lib/xtream-cached-offline-notice.component.ts',
2,
],
[
'libs/ui/components/src/lib/channel-list-container/all-channels-view/all-channels-view.component.scss',
2,
],
[
'libs/ui/components/src/lib/channel-list-container/channel-list-container.component.scss',
2,
],
[
'libs/ui/components/src/lib/channel-list-container/groups-view/groups-view.component.scss',
6,
],
[
'libs/ui/components/src/lib/channel-list-loading-state/channel-list-loading-state.component.scss',
1,
],
[
'libs/ui/components/src/lib/external-playback-dock/external-playback-dock.component.scss',
14,
],
[
'libs/ui/components/src/lib/season-container/season-container.component.scss',
24,
],
[
'libs/ui/components/src/lib/window-controls/window-controls.component.scss',
1,
],
['libs/ui/playback/src/lib/audio-player/audio-player.component.scss', 14],
[
'libs/ui/playback/src/lib/embedded-mpv-player/embedded-mpv-player.component.scss',
25,
],
[
'libs/ui/playback/src/lib/portal-inline-player/series-playback-navigation-controls.component.scss',
4,
],
['libs/ui/styles/_panel-header.scss', 1],
['libs/ui/styles/_portal-layout.scss', 1],
['libs/ui/styles/_portal-sidebar.scss', 4],
[
'libs/workspace/dashboard/feature/src/lib/rails/dashboard-rail.component.scss',
2,
],
[
'libs/workspace/shell/feature/src/lib/global-favorites/global-favorites-list.component.scss',
1,
],
[
'libs/workspace/shell/feature/src/lib/workspace-command-palette/workspace-command-palette.component.scss',
12,
],
[
'libs/workspace/shell/feature/src/lib/workspace-context-panel/components/workspace-context-category-view.component.scss',
1,
],
[
'libs/workspace/shell/feature/src/lib/workspace-context-panel/workspace-context-panel.component.scss',
1,
],
[
'libs/workspace/shell/feature/src/lib/workspace-context-panel/workspace-settings-context-panel.component.scss',
1,
],
[
'libs/workspace/shell/feature/src/lib/workspace-shell/components/workspace-shell-context-sidebar/workspace-shell-context-sidebar.component.scss',
1,
],
[
'libs/workspace/shell/feature/src/lib/workspace-shell/components/workspace-shell-import-overlay/workspace-shell-import-overlay.component.scss',
1,
],
[
'libs/workspace/shell/feature/src/lib/workspace-shell/components/workspace-shell-rail-links/workspace-shell-rail-links.component.scss',
3,
],
[
'libs/workspace/shell/feature/src/lib/workspace-shell/components/workspace-shell-rail/workspace-shell-rail.component.scss',
5,
],
[
'libs/workspace/shell/feature/src/lib/workspace-shell/workspace-shell.component.scss',
1,
],
]);