Kosmesis

kosmesis

Changelog for kosmesis.

0.6.1

  • kosmesis init installs @morphos/icons@^2.0.3, the range the registry components are now type-checked against, together with @praxisjs/runtime 0.8.1 (boolean aria-* attributes written as "true"/"false") and the latest Morphos releases.

0.6.0

  • kosmesis init can run without prompts. Every question has a flag (--style-system, --icon-library, --css, --root-component, --overwrite, --erase / --no-erase, --force), and --yes (or --defaults) answers the rest with their default. In that mode nothing is erased or overwritten unless its flag says so, and a run that needs one of those answers stops with exit code 1 and names the flag. Flags you pass also skip their prompt in the interactive flow, which is otherwise unchanged. kosmesis init --help lists them.
  • kosmesis init wires @tailwindcss/vite, praxisjsCSS() and the @ alias into the vite.config.ts create-praxisjs writes for Tauri v2 apps (defineConfig(({ mode }) => ...) with import { defineConfig, loadEnv } from "vite"). Before, the plugin call was added without its import and the alias was skipped, so the build failed. When the file has no shape it can edit, init now says to add the alias by hand.
  • With Tailwind, the stylesheet content kosmesis init keeps below the theme tokens now goes inside @layer base. Unlayered CSS beats every Tailwind layer, so a kept reset such as the create-praxisjs template's * { margin: 0; padding: 0 } stripped the padding and margins off every component. Content that is already written for Tailwind (@import, @theme, @plugin, @utility, ...) is kept as it was.

0.5.0

  • kosmesis init works with @morphos/icons 2.0.0, which moved LucideSource to the @morphos/icons/lucide subpath. The generated root component now imports IconProvider from @morphos/icons and LucideSource from @morphos/icons/lucide; before, a fresh project failed to type-check (Module "@morphos/icons" has no exported member "LucideSource"). Projects initialized with 0.4.0 can apply the same one-line import change by hand.
  • kosmesis init installs @morphos/icons@^2.0.1 and lucide@^1.27.0 instead of whatever is latest, so a future major of either can't break the code it generates. A package already in package.json is left alone.
  • kosmesis registry build fails when a component imports a package it doesn't list in dependencies (or, for type-only imports, devDependencies), or a relative file that isn't its own or one of its registryDependencies, and lists every case. Only @praxisjs/core, @praxisjs/decorators, @praxisjs/jsx and @praxisjs/runtime may be imported undeclared. kosmesis registry init's example now lists @praxisjs/shared under devDependencies.
  • Registry fixes found by that check: every component that imports @praxisjs/shared now lists it under devDependencies (with pnpm, kosmesis add used to leave 72 imports unresolved), Morphing Dialog lists @morphos/icons, the Tailwind Sidebar lists class-variance-authority, and Command lists dialog as a registry dependency.
  • Components are versioned. Every registry item has a version (every Kosmesis component starts at 1.0.0), and kosmesis add records it, with a hash of each file it wrote, in a new components.lock.json next to components.json (commit it).
  • New kosmesis outdated lists installed components with the installed and latest version, and whether you edited them, including components from your own registries.
  • New kosmesis update <component...> (or --all) shows the diff and asks before writing. A file you edited is never replaced silently: you choose to skip it (the default), overwrite it, or write the new version next to it as <name>.new.tsx to merge by hand. When not interactive (CI), update only writes with --yes, and never overwrites edited files. Files the registry didn't change keep your edits, and new registry or npm dependencies are installed.
  • Projects created before 0.5.0 are migrated on the first outdated or update: components found in the ui folder that match a registry component start being tracked, at the registry's version when the file is identical to it, otherwise with an unknown version and treated as possibly edited. Your own components are never tracked.
  • kosmesis add asks before overwriting a file you edited or that it didn't install (default: no), and skips such files when not interactive. --overwrite replaces them anyway. Unedited files it installed are replaced as before.
  • kosmesis registry build checks each item's version against a committed registry-lock.json: it fails when an item's files or dependencies changed without a version bump, when a version goes down, or when a version isn't semver. Items without a version build with a warning and are served unversioned (shown as unknown, never as an update). Built items carry a hash per file, and each style system gets an index.json listing every item without content. kosmesis registry init's example starts at version 1.0.0.

0.4.0

  • kosmesis init now prompts for an icon library (Lucide, backed by @morphos/icons' built-in LucideSource provider, or None), stores the choice as iconLibrary in components.json, installs @morphos/icons/lucide when Lucide is selected, and wires @IconProvider(LucideSource) onto the project's root component — the same "ensure" pattern already used for @Themed(...).
  • Every registry component that previously rendered an emoji or a hand-picked Unicode glyph as a pseudo-icon now renders a real <Icon> from @morphos/icons instead, in both style systems.

0.3.2

  • kosmesis init now wires the virtual:praxisjs/styles.css import into @praxisjs/css projects: it adds import "virtual:praxisjs/styles.css"; to the entry file (src/main.tsx) after wiring praxisjsCSS() into vite.config.ts, and declares the module in src/vite-env.d.ts so TypeScript doesn't error on it. Previously this step was missing, so the CSS the Vite plugin extracts at build time never reached the production bundle.

0.3.1

  • Bumped tsdown to 0.22.4, resolving a peer dependency mismatch with typescript.

0.3.0

  • kosmesis init now asks before touching pre-existing file content instead of silently keeping or discarding it:
    • If your global CSS file or @praxisjs/css theme module already has content, you're asked whether to erase it before Kosmesis adds its tokens.
    • For @praxisjs/css projects, the create-praxisjs template's default stylesheet (a separate file from the theme module) gets the same treatment, since it's otherwise never touched.
    • For @praxisjs/css projects, init also asks for your root component's path and automatically wires @Themed(KosmesisTokens, LightTheme, { persist: true, syncTabs: true }) above @Component() — previously this was left as a manual note.

0.2.0

  • Added a named-registry system: kosmesis registry add|remove|list manages a registries map in components.json, and kosmesis add @<namespace>/<component> resolves a component from its namespace's registry instead of the project default.
  • Added kosmesis registry init and kosmesis registry build to scaffold and build a custom registry — no more hand-writing a registry.json-to-inlined-JSON build script. See Custom Registry.
  • Registry entries can now declare devDependencies alongside dependencies — kosmesis add installs each group separately, with devDependencies getting the package manager's -D/--save-dev flag.

0.1.2

  • Removed the unnecessary baseUrl assignment from ensureTsconfigAlias. This avoids the deprecated baseUrl compiler option, which is scheduled to stop working in TypeScript 7.0, while preserving the generated path alias configuration.

0.1.1

  • kosmesis init and kosmesis add now install missing runtime dependencies automatically with the detected package manager. If the install fails, the CLI still prints the command to run manually.

0.1.0

Initial release.

  • kosmesis init — writes components.json, prompts once for a style system (Tailwind CSS or @praxisjs/css), wires theme tokens and the matching Vite plugin into the project, adds the @/* import alias, and (Tailwind only) writes the cn() helper.
  • kosmesis add <component...> — resolves a component's registryDependencies closure in dependency-first order, writes every file into src/components/ui/, and reports any missing runtime dependencies.
  • A registry of 65 components ported from shadcn/ui, each shipped in two independent style systems with an identical public prop API — Tailwind CSS + class-variance-authority, and @praxisjs/css — built on Morphos instead of Radix UI.

On this page