Skip to content

Public API

Every csszyx package pins the others to its own version, so an entry one csszyx package imports from another changes with them. This page names the entries you may import, the entries the compiler writes imports to, and the entries that connect the packages. A change to a public entry follows semver; a change to an internal one ships in the same release as every package that reads it.

KindMeaning
publicImport it, or name it in a config file. Changes follow semver.
generatedThe compiler writes imports to it. Keep the version the build installed; do not import it yourself. Its exports change only by adding names.
internalConnects csszyx packages. Not for import; it can change in any release.
EntryKindWhat it is
csszyxpublicThe umbrella package: the runtime helpers, transform, transformSource and serializeManifest. The @csszyx/core functions it re-exports (encode, transform_sz, compute_mangle_checksum, verify_mangle_checksum) are internal.
csszyx/litepublicThe string-only runtime helpers.
csszyx/vitepublicThe Vite plugin.
csszyx/webpackpublicThe webpack plugin.
csszyx/dynamicpublicRuntime injection.
csszyx/dynamic/reactpublicRuntime injection for React.
csszyx/browserpublicThe CDN build.
csszyx/browser.devpublicThe CDN build with development warnings.
csszyx/coregeneratedThe concat helpers the compiler retargets imports to.
csszyx/loweringpublicThe import that loads the object lowering outside the plugin.
@csszyx/runtimepublicThe runtime helpers.
@csszyx/runtime/litepublicThe string-only runtime helpers.
@csszyx/runtime/loweringpublicThe import that loads the object lowering outside the plugin.
@csszyx/runtime/splitpublicThe className half of the class toolkit.
@csszyx/runtime/coregeneratedThe concat helpers the compiler retargets imports to.
@csszyx/runtime/mergegeneratedThe group-merge helpers the compiler injects.
@csszyx/dynamicpublicRuntime injection.
@csszyx/dynamic/reactpublicRuntime injection for React.
@csszyx/varspublicCSS custom property helpers.
@csszyx/vars/reactpublicCSS custom property helpers for React.
@csszyx/typespublicThe sz prop and config types.
@csszyx/types/configpublicThe config types.
@csszyx/types/runtimepublicThe runtime types.
@csszyx/types/compilerpublicThe compiler types.
@csszyx/types/jsxpublicThe JSX sz prop augmentation.
@csszyx/types/jsx-reactpublicThe JSX sz prop augmentation for React.
@csszyx/types/jsx-solidpublicThe JSX sz prop augmentation for Solid.
@csszyx/unpluginpublicThe bundler plugin and its factories.
@csszyx/unplugin/vitepublicThe Vite plugin.
@csszyx/unplugin/webpackpublicThe webpack plugin.
@csszyx/unplugin/nextpublicThe Next.js wrapper.
@csszyx/unplugin/postcsspublicThe PostCSS plugin.
@csszyx/unplugin/jestpublicThe Jest transformer.
@csszyx/unplugin/css-manglerpublicThe CSS class mangler.
@csszyx/unplugin/next-prebuildpublicThe Next.js prebuild pass.
@csszyx/unplugin/next-watcherinternalThe watcher csszyx next watch runs.
@csszyx/unplugin/next-turbo-loaderinternalThe Turbopack loader csszyxTurbopack registers.
@csszyx/unplugin/diagnosticsinternalThe diagnostic policy the CLI and the plugin share.
@csszyx/compilerpublicThe sz lowering and the recovery manifest.
@csszyx/compiler/enginepublicThe engine calls: transformSource and the scans.
@csszyx/compiler/browserpublicThe browser-safe lowering.
@csszyx/compiler/migrateinternalThe migrate engine calls @csszyx/cli makes; use migrateSource or classNameToSzObject from @csszyx/cli.
@csszyx/compiler/internalinternalThe build lanes’ calls; use @csszyx/compiler/engine.
@csszyx/compiler/templateinternalWhat the Vue and Svelte adapters lower templates with; use @csszyx/vue-adapter or @csszyx/svelte-adapter.
@csszyx/compiler/reportinternalThe diagnostic words every package renders with.
@csszyx/compiler/errorsinternalThe error class every package throws; use isCsszyxError from @csszyx/runtime.
@csszyx/compiler/sz-limitsinternalThe depth limits the runtime shares.
@csszyx/compiler/keyword-familiesinternalThe keyword tables the runtime shares.
@csszyx/compiler/bool-classinternalA helper the runtime re-exports.
@csszyx/compiler/color-varinternalA helper the runtime re-exports.
@csszyx/compiler/color-modifierinternalHow a colour class’s slash opacity is read, shared with @csszyx/dynamic.
@csszyx/compiler/spacing-varinternalA helper the runtime re-exports.
@csszyx/coreinternalThe engine. Install it beside the compiler; do not import it. Use @csszyx/compiler/engine.
@csszyx/core/nativeinternalThe engine’s native binding.
@csszyx/core/parser-wasminternalThe engine’s WebAssembly build.
@csszyx/clipublicThe csszyx command, classNameToSzObject and migrateSource.
@csszyx/mcp-serverpublicThe csszyx-mcp command.
@csszyx/ts-pluginpublicThe TypeScript plugin, named in tsconfig.json.
@csszyx/svelte-adapterpublicThe Svelte preprocessor.
@csszyx/vue-adapterpublicThe Vue preprocessor.

A name an entry exports with a leading _ or __, or one marked @internal in its types, is written by the compiler or used by csszyx’s own packages, and follows the entry’s kind above only for code the compiler wrote.

A development build adds one object for you to read, globalThis.__csszyx_dev, the first time csszyx reports something; until then it is absent, so read it as __csszyx_dev?.reports(), where undefined means nothing was reported. It is not an import, and a production build leaves it out. Its members are only ever added; none is renamed or removed. Beside it, window.__csszyx is the mangle registry production.mangleDebugGlobal exposes (Config); every other __csszyx_* name on the page is internal.

MemberWhat it returns
__csszyx_dev.reports()The session’s csszyx reports, the ones the console did not print included: { format, total, dropped, reports: [{ code, message, count }] }. format is 1; it changes only when a field changes meaning or goes away, never when one is added, so a reader checks it first. code is the diagnostic id, which is never retired; message is the development message as the console prints it. count is the number of reports of that message: at least 1, and never more than the times it happened, since some checks report a value once however often it recurs. total adds up every report, and dropped the reports of messages past the limited number kept, which are listed in the order they first came. The lines saying the console stopped printing a kind of report are not reports and are not counted. The console prints each cause once and only a limited number a session; these limits are not part of this contract and may change.