mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Adds src/components/ui: buttons, messages, labels, progress, status, tables,
form controls, panels, cards, statistics, modals, tooltips, tabs, and icons.
Everything resolves its colors through theme tokens, so no component branches
on the current theme, and Semantic UI keeps rendering the app meanwhile.
Mantine is bridged rather than restyled: its own CSS variables are pointed at
our tokens. Four details were not obvious, and each caused a visible defect
in night mode before being fixed:
- Structural colors must go in the resolver's light/dark blocks. Mantine
emits its values under [data-mantine-color-scheme], which outranks the
:root block that `variables` becomes, so its grays were winning.
- The dark and gray palettes are mapped shade by shade to tokens. Mantine
reads them directly for table borders, zebra stripes and input chrome;
they can be neither flattened nor left alone.
- Mantine writes --button-* as inline styles, which no stylesheet can
outrank, so the dashed danger treatment sets real properties instead.
- Switch colors are written onto inner elements, so they need scoped CSS
rather than a variable on the root. Adds a --knob token for control
handles, because Mantine's default thumb follows theme.white, which is
near-black in the dark-based themes.
An audit of every painted pixel in the /theme-sample gallery now finds no
non-red channel in night mode.
Icons come from @tabler/icons-react with the 102 Semantic names the app uses
mapped to components; they stroke with currentColor, so they follow the theme
without any rule of their own. Toasts keep the react-semantic-toasts-2
signature so those call sites migrate by changing an import.
TypeScript 5 is required: Mantine's declarations use `const` type parameters,
which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape).
That needs two npm overrides to keep clean installs working, both verified
against a Docker build: react-scripts declares peerOptional typescript ^3||^4,
and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5
made getter-only - crashing the dev server's type checker on every rebuild.
semantic-baseline.test.js ratchets the removal: it fails if a file not already
listed imports Semantic UI. An ESLint rule would have printed 75 warnings per
rebuild, and CI unsets CI= for its build step, so it would guard nothing there.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
82 lines
2.1 KiB
JSON
82 lines
2.1 KiB
JSON
{
|
|
"name": "wrolpi-app",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"dependencies": {
|
|
"@acalcutt/maplibre-contour-pmtiles": "^0.1.2",
|
|
"@artsy/fresnel": "^8.5.0",
|
|
"@cypress/react18": "^2.0.1",
|
|
"@mantine/core": "^8.3.18",
|
|
"@mantine/hooks": "^8.3.18",
|
|
"@mantine/notifications": "^8.3.18",
|
|
"@tabler/icons-react": "^3.46.0",
|
|
"@testing-library/react": "^13.4.0",
|
|
"@testing-library/user-event": "^13.5.0",
|
|
"cypress": "^13.15.2",
|
|
"esptool-js": "^0.6.0",
|
|
"lodash": "^4.18.1",
|
|
"maplibre-gl": "^5.24.0",
|
|
"mathjs": "^15.2.0",
|
|
"pmtiles": "^4.4.1",
|
|
"protomaps-themes-base": "^4.5.0",
|
|
"query-string": "^9.4.1",
|
|
"react": "^18.2.0",
|
|
"react-colorful": "^5.8.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-dropzone": "^14.2.3",
|
|
"react-hotkeys-hook": "^5.3.3",
|
|
"react-qr-code": "^2.2.0",
|
|
"react-router": "^7.18.1",
|
|
"react-scripts": "5.0.1",
|
|
"react-semantic-toasts-2": "^0.6.7",
|
|
"react-stl-viewer": "^2.5.0",
|
|
"semantic-ui-offline": "^2.5.1",
|
|
"semantic-ui-react": "^2.1.5",
|
|
"three": "^0.185",
|
|
"web-vitals": "^5.3.0"
|
|
},
|
|
"scripts": {
|
|
"start": "react-scripts start",
|
|
"build": "BROWSERSLIST_IGNORE_OLD_DATA=true react-scripts build",
|
|
"test": "react-scripts test",
|
|
"eject": "react-scripts eject",
|
|
"cy:run": "cypress run",
|
|
"cy:open": "cypress open"
|
|
},
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"react-app"
|
|
]
|
|
},
|
|
"browserslist": {
|
|
"production": [
|
|
">0.2%",
|
|
"not dead",
|
|
"not op_mini all"
|
|
],
|
|
"development": [
|
|
"last 1 chrome version",
|
|
"last 1 firefox version",
|
|
"last 1 safari version"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@types/lodash": "^4.17.24",
|
|
"@types/node": "^26.0.1",
|
|
"@types/react": "^18.3.17",
|
|
"@types/react-dom": "^18.3.5",
|
|
"typescript": "^5.9.3"
|
|
},
|
|
"jest": {
|
|
"transformIgnorePatterns": [
|
|
"node_modules/(?!(react-hotkeys-hook)/)"
|
|
]
|
|
},
|
|
"overrides": {
|
|
"react-scripts": {
|
|
"typescript": "$typescript"
|
|
},
|
|
"fork-ts-checker-webpack-plugin": "^6.5.3"
|
|
}
|
|
}
|