This release separates what a component is from how it looks. Definitions
live in @postkit/core, @postkit/react renders them as headless views, and
today's Chakra components move to @postkit/chakra. Your posts don't change.
Added
createPostkitand kits: enable only the components you use, and ship only those.- Defaults, slot parts and views: change what authors get with
defaultsincreatePostkit, swap one part, or replace the render, all without ejecting. postkit ejectandpostkit diff, from the new@postkit/cli: own a component's source and still see what changed upstream.- Footnotes and sidenotes, carried through every renderer including email.
- An optional
styles.cssbaseline for the headless views, driven by--postkit-*tokens. renderEmail()in@postkit/email, which turns a Markdown, MDX or@postkit/coredocument into email HTML and plain text.Device, a screenshot in a plain iPhone, iPad or Mac frame drawn with CSS (kind,src,alt,caption). It's experimental.Carouselpresentation="peek": the current item centred with its neighbours faded either side, arrows only, and its caption announced to screen readers. Like every carousel, it never advances on its own.Gallerypresentation="row": two or three related pictures side by side, which become a swipeable rail on phones.Videocaptions(a WebVTT track),captionsLang,durationanddecorative.- Figure numbering:
<PostkitProvider figures="numbered">labels figures, videos and devices "Fig. 1", "Fig. 2"…, and the items of a carousel or gallery "Fig. 3", "Fig. 3b", "Fig. 3c".
Changed
@postkit/reactrenders headless views for every static component. Interactive components whose behaviour isn't shared yet stay Chakra-only until 0.3.x, and the component manifest marks them.- Chakra recipes follow the host's colour mode, with dark values for every
colour in
postkitDefaultTheme. - Every component now defaults to the subtle variant (D12). Pass
variant="outline", or setdefaultsincreatePostkit, to keep the 0.2 look. - Email support is computed from what the email renderer exports, and every component declares an email fallback.
- Callout accepts
typeas an alias fortone, in directives and in MDX.tonestays the documented prop, and wins if both are set. - A
Videowithout a captions track now gets a warning, in development and in your build output, unless you mark itdecorative. It never fails the build, even in strict mode, so this isn't a breaking change. - Poll, Chart and SocialPost are marked experimental in the component manifest until they've been reviewed.
Removed
- The unused
async,colors,stringsandutilspackages.
Migrating from 0.2
If you render with Chakra, change one import. Component names and props are unchanged.
ts
// 0.2
import { Callout, PostkitProvider } from '@postkit/react';
// 0.3
import { Callout, PostkitProvider } from '@postkit/chakra';Want only the components you use? Move to createPostkit when you're ready.
The old exports keep working through 0.x.