Skip to content

onsystem@0.6.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 20:31
· 320 commits to main since this release
e801bcd

Minor Changes

  • #92 ebc7dbc Thanks @dgesteves! - onsystem init in a design-system package now declares its config in its package.json ("onsystem": "./onsystem.config.json") and writes ONSYSTEM.md for the teams of the apps that use it, and an app with no config of its own takes on the config a dependency declares, from the workspace or from node_modules, in the CLI, the MCP server and the ESLint plugin alike.

    In a monorepo, an app with no config of its own that depends on such a package reads the package's config rather than the monorepo root's, so the root config's rules no longer apply to it.

  • #87 6c20ad8 Thanks @dgesteves! - Import and export design tokens as DTCG 2025.10 and DESIGN.md. DTCG files now read $root tokens and groups that $extends another, which were left out before. A DESIGN.md's front matter is a token source, which zero config reads when it finds no stylesheet or DTCG file. onsystem export --format dtcg|design-md prints the tokens it found, or writes them with --out: the DTCG file keeps colors as color objects, sizes as { value, unit }, aliases as references, and the token's name, the custom property, the Tailwind theme variable and the dark mode under $extensions["com.github.dgesteves.onsystem"], so reading it back gives the same findings, with the same token names.

  • #86 1d8000e Thanks @dgesteves! - MUI apps get a design system with no config: when a project depends on @mui/material and it is installed, onsystem reads MUI's components from the package's type declarations with the TypeScript checker, for MUI 5 to 9. It reads each component's props (Button's href signature included), the values of its string-literal props as variants (variant, color, size, TextField's generic variant), values the app adds by module augmentation or in its theme (teal: { main }, components.MuiChip.variants), the element it renders and the module that default-exports it. check, check_ui and the hook then report invented MUI components, props and variant values, skip props when component is set, and count a Tooltip with a string title as its child's accessible name. Palette colors, the spacing unit, border radius and font family come from the createTheme options the app writes out, following constants it imports by a relative path. Where the app has components of its own, those win a shared name in what the tools offer and suggest, while code that imports MUI's is checked against MUI's. inspect shows the library on a library line, and a workspace package that uses MUI is a project of its monorepo root. "libraries": false in the config turns this off, and a list (["mui"]) reads only the libraries it names. check --require-design-system, and the GitHub Action, which turns it on by default, count MUI's components as the app's design system: when the theme's colors cannot be read, as with a palette from Sass variables, the check runs and says that no-hardcoded-color did not. Libraries are adapters (src/libraries), so Chakra UI, Mantine, HeroUI and Radix Themes can follow.

Patch Changes

  • #79 ebb0fa8 Thanks @dgesteves! - The GitHub Action's description is shorter than 125 characters, so the release can be published to the GitHub Marketplace.

  • #80 037b19c Thanks @dgesteves! - init writes a config where check and inspect already find the design system without detecting one: an app with components/ui and no components.json. It spells out the default globs that match and the token files found, with --yes, without a terminal, and in one (where it no longer asks where the components are). Before, init --yes and init without a terminal exited 2 with "zero config found no design system".

  • #96 a380586 Thanks @dgesteves! - init names onsystem.baseline.json in its next steps only when it wrote one. Without a terminal, it says that it skipped the baseline question and that onsystem check . --update-baseline records one. inspect --explain lists each docs glob once, where a shadcn/ui app listed components/ui/**/*.{md,mdx} twice. The MCP server's load line counts components as inspect does: loaded 4 components (+6 parts), not loaded 10 components.

  • #84 7042a12 Thanks @dgesteves! - The package's npm page links to the website, onsystem.vercel.app, rather than the README on GitHub.

  • #90 8d62016 Thanks @dgesteves! - A Tailwind v3 borderRadius.DEFAULT token is suggested as rounded, not rounded-DEFAULT.

  • #89 58e6b63 Thanks @CRYPTONIKAV! - Tailwind v3 projects: radius values set in tailwind.config borderRadius, or in a preset it imports, are read, so 4px in a project whose rounded-sm is calc(var(--radius) - 4px) suggests rounded-sm. Thanks @CRYPTONIKAV.

  • #80 8549f8f Thanks @dgesteves! - npx onsystem with no command, typed in a terminal, says on stderr what it is before it starts the MCP server, which otherwise sits waiting on stdin and looks hung: where to add it to an agent, and that inspect or check . is what to run by hand. An MCP client starts it with a pipe, not a terminal, so clients see nothing new.