This release expands Postkit from a React component collection into a portable publishing system. Content can now move through versioned HTML, Markdown, MDX, and JSON representations, then render through React, framework adapters, Astro, or email-specific components.
Added
@postkit/core, with a versioned document model plus safe HTML, Markdown, MDX, and JSON parsing and serialization.DocumentRendererand document-specific exports from@postkit/react/document.@postkit/email, with email-safe components built on Chakra Email.@postkit/shiki, with a lazy syntax-highlighting adapter for code blocks.- Provider and fence-metadata controls for copying, wrapping, line numbers, titles, language metadata, highlighted lines, and maximum code-block height.
- Focused
@postkit/react/themeand@postkit/react/remarkentry points. - A generated component manifest and live component explorer covering variants, examples, renderer support, and runtime requirements.
- Closure-aware yalc tooling that links internal Postkit dependencies into local consumers before pushing updated packages.
Changed
- React and email component exports now use generic names such as
Callout,CodeBlock, andAuthorCard.PostkitProviderretains its branded name. - The React renderer is host-native by default. Chakra headings, links, lists, buttons, inputs, tables, tabs, and other primitives inherit the application's recipes and semantic tokens.
- Postkit's standalone visual treatment is now opt-in through
postkitDefaultTheme; structural article and list rhythm remains available without the preset. - Code blocks default to no line numbers and no wrapping, use horizontal overflow, and support inline or tooltip copy confirmation.
- Public theme declarations use a lightweight contract to avoid recursively expanding Chakra style types in consuming TypeScript programs.
- Chakra UI compatibility now starts at
3.29.0and remains below version 4.
Migrating from 0.1
Remove the Postkit prefix from component and component-prop imports:
// 0.1
import { PostkitCallout, type PostkitCalloutProps } from '@postkit/react';
// 0.2
import { Callout, type CalloutProps } from '@postkit/react';The same pattern applies across the component catalog. Factory, provider, recipe, manifest, and Postkit-specific contract names remain branded.
Applications that want the previous standalone visual defaults should opt into the preset explicitly:
import { PostkitProvider, postkitDefaultTheme } from '@postkit/react';
export function ArticleProviders({ children }: React.PropsWithChildren) {
return (
<PostkitProvider preset={postkitDefaultTheme}>{children}</PostkitProvider>
);
}Applications with an existing Chakra system should continue to provide that system without the preset. Postkit will add its content recipes while allowing the host theme to control typography and common primitives.