Documentation menu
Documentation / Blocks & themes / longform
Longform
npm install @wabbit/tome-longformFirst install from our registry?
Add our registry to the
.npmrcat the root of your project. Free packages install without a token.@wabbit:registry=https://npm.wabbit.com/
Tome platform long-form editorial reading-kit — 16 Payload blocks extracted from the upstream Signal set: drop caps, epigraphs, chapter dividers, asides, accordions, tables, spoilers, and cross-reference cards.
Overview
Tome platform long-form editorial reading-kit. 16 Payload blocks extracted from the upstream Signal editorial block set.
Blocks: DropCap, Epigraph, Footnotes, ChapterDivider, SeriesNav, AnchorSection, Accordion, TabbedContent, Callout, Aside, AuthorAside, KeyFacts, ImageGrid, DataTable, Spoiler, CrossLink.
Shared render cores. Every block except DropCap is a skin over a render core from @wabbit/tome-blocks-console, the same cores the signal theme's matching blocks use: the core renders the markup and holds any interaction state, and this package's CSS Modules supply every size, space, color and the typeface, so the blocks keep their look. Parts this package shows that the signal theme does not (the accordion's button rows and +/− sign, the FAQ as a description list, the badge row above a cross link's title, the verse epigraph's preformatted text, the image slot) are optional parts of those cores that this package switches on. Rich text and pictures still arrive already rendered, as before. @wabbit/tome-blocks-console is a peer, so install it alongside this package.
Peer dependencies
| Peer | Range |
|---|---|
@payloadcms/richtext-lexical | >=3.0.0 |
@wabbit/tome-blocks-console | >=0.1.1 <1.0.0 |
@wabbit/tome-ui | >=0.9.0 <1.0.0 |
payload | >=3.67.0 |
react / react-dom | >=19.0.0 |
typescript | >=5.7.0 |
@wabbit/tome-cop is optional — install it separately for the COP/intel aesthetic theme; without it, blocks render with @wabbit/tome-ui Layer 2 token defaults.
Quick start
// payload.config.ts
import { buildConfig } from 'payload'
import { longformBlocks } from '@wabbit/tome-longform'
export default buildConfig({
collections: [
{
slug: 'articles',
fields: [{ name: 'content', type: 'blocks', blocks: longformBlocks }],
},
],
})
// app/layout.tsx
import '@wabbit/tome-longform/styles.css'Render with the slug → component map from @wabbit/tome-longform/components. Each block row's blockType is its slug (longformDropCap, longformCallout, …):
import { longformComponents } from '@wabbit/tome-longform/components'
export function ArticleBody({ blocks }: { blocks: Array<{ blockType: string; id?: string }> }) {
return blocks.map((block, i) => {
const Block = longformComponents[block.blockType as keyof typeof longformComponents]
// every component takes the block row as a single `data` prop
return Block ? <Block key={block.id ?? i} data={block} /> : null
})
}Import longformBlocks from the root (or @wabbit/tome-longform/blocks) in payload.config.ts: those entries are config-only. The per-block @wabbit/tome-longform/blocks/longform* subpaths and @wabbit/tome-longform/components also load the React components and their CSS, which Payload's generate:types loader cannot handle.
Custom accent palette (X2)
import { createLongformBlocks } from '@wabbit/tome-longform'
const blocks = createLongformBlocks({ accentPalette: ['red', 'blue', 'gold'] })accentPalette is a list of accent names (the default is red, blue, gold, cyan, amber, green, ghost) and replaces the accent select options on all 16 blocks. longformBlocks is createLongformBlocks() with the default palette.
Shared Lexical config (L1)
import { lexicalEditor } from '@payloadcms/richtext-lexical'
import { longformLexicalConfig } from '@wabbit/tome-longform/utils/lexical'
editor: lexicalEditor({ features: longformLexicalConfig })longformLexicalConfig({ rootFeatures }) returns your root features plus Lexical's fixed and inline toolbars; it is a function, so pass it as features itself rather than calling it.
Dependencies
@wabbit/tome-ui(required)@wabbit/tome-blocks-console(required peer — the shared render cores)@wabbit/tome-cop(optional — provides COP/intel aesthetic theme)payload>=3.67.0 (peer)react>=19.0.0 (peer)@payloadcms/richtext-lexical(peer)
Public API
| Export | Subpath | Description |
|---|---|---|
longformBlocks, createLongformBlocks(opts) | . | Full block-array export + factory for a custom accent palette |
The 16 block configs (longformDropCapBlock … longformCrossLinkBlock), resolveAccent, accentColorField, breakoutWidthField, resolveBreakoutWidth, longformLexicalConfig, demo props (getDemoProps, one getLongform…DemoProps per block, demoRichText, DemoContext) and the types | . | Everything else on the root barrel — all config-safe |
getDemoProps, one getLongform…DemoProps per block, demoRichText, DemoContext | @wabbit/tome-longform/demo | The same demo props without the block configs: no Payload import, so a client bundle (a gallery page) can use it. This package ships raw Payload Block configs, not defineBlock descriptors, so it has no @wabbit/tome-longform/meta entry — a gallery describes these blocks itself |
The 16 block configs plus their palette factories (createDropCapBlock(palette?) … createCrossLinkBlock(palette?)) | @wabbit/tome-longform/blocks | Config-only barrel. It does not export longformBlocks; import that from the root |
One subpath per block (@wabbit/tome-longform/blocks/longformDropCap, @wabbit/tome-longform/blocks/longformEpigraph, @wabbit/tome-longform/blocks/longformFootnotes, @wabbit/tome-longform/blocks/longformChapterDivider, @wabbit/tome-longform/blocks/longformSeriesNav, @wabbit/tome-longform/blocks/longformAnchorSection, @wabbit/tome-longform/blocks/longformAccordion, @wabbit/tome-longform/blocks/longformTabbedContent, @wabbit/tome-longform/blocks/longformCallout, @wabbit/tome-longform/blocks/longformAside, @wabbit/tome-longform/blocks/longformAuthorAside, @wabbit/tome-longform/blocks/longformKeyFacts, @wabbit/tome-longform/blocks/longformImageGrid, @wabbit/tome-longform/blocks/longformDataTable, @wabbit/tome-longform/blocks/longformSpoiler, @wabbit/tome-longform/blocks/longformCrossLink) | @wabbit/tome-longform/blocks/longform* | That block's config, its create…Block factory and its render component (e.g. LongformDropCap), for consumers that only want one or two blocks. Because it includes the component, keep it out of payload.config.ts |
longformComponents (a LongformComponentMap: slug → component) and the 16 root components LongformDropCap … LongformCrossLink | @wabbit/tome-longform/components | React render layer. Each root component picks its variant from the block's designVersion and renders it through a shared core (DropCap through its own variant components, which are not exported) |
partitionChapterStreams(blocks, opts?), defaultIsMarginalia + types (PartitionableBlock, MarginaliaEntry, ChapterStreamPartition, PartitionChapterStreamsOptions, MarginaliaPredicateInput) | @wabbit/tome-longform/render | Splits a chapter's block list into a prose stream and a marginalia stream (sidebar/overlay variants), each marginal block anchored to the prose row it follows. Pure data; no components |
longformLexicalConfig | @wabbit/tome-longform/utils/lexical | Shared Lexical editor feature config (L1) |
resolveAccent, accentVars (re-exported from @wabbit/tome-ui/utils/accent), accentColorField(palette?), AccentColor, ResolvedAccent | @wabbit/tome-longform/utils/accent | Powers createLongformBlocks({ accentPalette }) |
breakoutWidthField, breakoutWidthFieldImageGrid, resolveBreakoutWidth, BreakoutWidth, ResolvedBreakoutWidth | @wabbit/tome-longform/utils/breakout | Breakout-width select field and resolver used by several blocks' full-bleed variants |
LongformBlockSlug, AccentColor, ResolvedAccent, ResolveAccent, LongformBlockProps, LongformComponentMap, CreateLongformBlocksOptions, LongformBlockFactory | @wabbit/tome-longform/types | Full type surface |
| Global CSS token surface | @wabbit/tome-longform/styles.css | Import once at the app root |
Epigraph hooks
longformEpigraph is the same component whether it sits in a page's blocks field or in a Lexical rich-text field's blocks feature (register longformEpigraph there to open an essay with one). A theme restyles it through data attributes rather than the hashed class names: the blockquote carries data-epigraph and data-design-version (CENTERED, ACCENT_BORDER or VERSE, written for the default too), and the text, the attribution and the source each sit in a span marked data-epigraph-text, data-epigraph-attribution and data-epigraph-source. An epigraph with no attribution or source writes no span for it. The layout and the em-dash attribution are unchanged.
Server / client posture
No file in this package carries a 'use client' directive: every block's Component.tsx is server-safe. The three interactive blocks hold their state in client cores from @wabbit/tome-blocks-console: Accordion (expand/collapse, AccordionCore), Spoiler (reveal, SpoilerCore) and TabbedContent (selected tab and keyboard, TabbedContentCore). Their content is rendered on the server and handed to the core as already-rendered nodes.
Behavior of the interactive blocks: an Accordion's closed answers are in the page from the first paint, collapsed (hidden), so find-in-page tools, search engines and screen readers reach them; SINGLE and FAQ open one row at a time, STACKED any number. TabbedContent keeps only the selected tab in the tab order, moves between tabs with the arrow keys, Home and End, and names each panel by its tab. Spoiler's reveal control sits over the hidden content, and its spoken name contains its visible word.
Testing
pnpm --filter @wabbit/tome-longform test runs the Vitest suite in tests/ (block configs, the palette factory, barrels and exports, demo props, interactive initial state, stream partitioning, the render matrix, rich-text editor wiring, and what each block switches on in its shared core).
Decisions that shaped this package
- Extraction with deliberate aesthetic decoupling — the 16 blocks were pulled from the upstream
Signal*set with the COP/intel visual language stripped out;@wabbit/tome-copisn't even a declared peer dependency, so the pack "works with any theme or none" by design, not by accident. - Marginalia promoted to named grid lines — margin-floating variants (Aside, AuthorAside, SeriesNav SIDEBAR, KeyFacts SIDEBAR) moved off
position:absoluteonto@wabbit/tome-ui's first-classmarginalia-{left,right}-{outer,inner}grid lines instead of staying a local layout hack. - Prose width is its own named track, not `content` — 13 of 16 blocks default to the
prose-start/endgrid lines to match a ~600px editorial column rather than the much widercontenttrack;partitionChapterStreams()in@wabbit/tome-longform/renderwas promoted verbatim from a consumer's chapter route once that pattern proved itself in production. - Breakout widths got relabeled, not a new track system —
breakout-md/breakout-lgwere re-aliased onto the existingreading/contenttracks rather than adding new column counts; this pack'sbreakoutWidthFieldoption labels were updated to drop misleading pixel hints and flagbreakout-lgas a legacy alias forcontent. - Accent handling converged on one upstream implementation — the per-pack accent-to-CSS-variable logic unified on a single canonical
accentVars()in@wabbit/tome-ui/utils/accent; this pack's drifted localACCENT_MAPwas retired for the shared one (a visible hue/border/background shift, hence a minor version bump). - Markup converged with the signal theme, look kept apart — fifteen blocks render through cores in
@wabbit/tome-blocks-consolethat the signal theme's matching blocks share, so a fix to markup or behavior lands once for both. The cores are block-layer, which lets a block pack depend on them; this package takes them as a peer, as every app-layer package does with its engines. What each package looks like, how wide a block sits and which lane it goes to stay with the package. The drop cap is the exception: the two packages store it in different shapes (rich text here, one plain string in the signal theme), so it keeps its own renderer.
Exports
| Import path |
|---|
@wabbit/tome-longform |
@wabbit/tome-longform/blocks |
@wabbit/tome-longform/blocks/longformDropCap |
@wabbit/tome-longform/blocks/longformEpigraph |
@wabbit/tome-longform/blocks/longformFootnotes |
@wabbit/tome-longform/blocks/longformChapterDivider |
@wabbit/tome-longform/blocks/longformSeriesNav |
@wabbit/tome-longform/blocks/longformAnchorSection |
@wabbit/tome-longform/blocks/longformAccordion |
@wabbit/tome-longform/blocks/longformTabbedContent |
@wabbit/tome-longform/blocks/longformCallout |
@wabbit/tome-longform/blocks/longformAside |
@wabbit/tome-longform/blocks/longformAuthorAside |
@wabbit/tome-longform/blocks/longformKeyFacts |
@wabbit/tome-longform/blocks/longformImageGrid |
@wabbit/tome-longform/blocks/longformDataTable |
@wabbit/tome-longform/blocks/longformSpoiler |
@wabbit/tome-longform/blocks/longformCrossLink |
@wabbit/tome-longform/components |
@wabbit/tome-longform/utils/accent |
@wabbit/tome-longform/utils/breakout |
@wabbit/tome-longform/utils/lexical |
@wabbit/tome-longform/render |
@wabbit/tome-longform/demo |
@wabbit/tome-longform/types |
@wabbit/tome-longform/styles.css |
Changelog
0.9.xMinor
longformEpigraphwrites hooks a theme can style, as a page block and as a Lexical block in a post body.The blockquote carries
data-epigraphanddata-design-version(CENTERED,ACCENT_BORDERorVERSE, written for the default too). The text, the attribution and the source are each wrapped in a span markeddata-epigraph-text,data-epigraph-attributionanddata-epigraph-source; an epigraph with no attribution or source writes no span for it.Layout, classes and the em-dash attribution are unchanged: removing the new attributes and spans gives the earlier markup back.
2 fixes (0.9.1 – 0.9.2)
- 0.9.2
Admin labels, field descriptions, demo content and messages now use American spellings.
- 0.9.1
Gallery and preview demo props no longer invent site paths.
A demo link is now the caller's
placeholderHrefor#, so rendered demos stop emitting real<a href>s to pages that exist on no site. README: subpath and file mentions are written package-qualified (for example@wabbit/tome-x/render) or as code text, so crawlers no longer resolve them as site URLs.
0.8.xMinor
Payload-free
./metaentries now match what each pack registers, and@wabbit/tome-dispatch,@wabbit/tome-longformand@wabbit/tome-readoutadd a./demoentry../demo(dispatch, longform, readout): the root barrel's demo props (getDemoProps, the per-block getters,DemoContext) on their own subpath, with no Payload import, so a client bundle such as a block gallery can use them without pulling in the block configs. Additive; the root barrel still exports them.These packages ship raw Payload
Blockconfigs rather thandefineBlockdescriptors, so they have no./metaentry../meta(extras, signal-theme): newextrasDeprecatedBlockMetaandsignalThemeDeprecatedBlockMetalists describe the 16 deprecated blocks each pack still registers for stored content but no longer offers.extrasBlockMetaandsignalThemeBlockMetaare unchanged: they still list only the offered blocks.The deprecated signal-theme blocks' metadata moved from inline
defineBlockarguments into payload-free<block>.meta.tsfiles; the registered descriptors are unchanged../meta(extras, marketing-starter): six motion blocks (image-marquee,marquee,showcase,logo-slider,pricing-plans,testimonial) now declarerequiredCapabilities: ['motion']in their metadata.defineBlockalready added it at registration, so the registered descriptors are unchanged, but the./metaentries lacked it and a gallery reading them could not tell these blocks need a motion provider.
0.7.xMinor
BREAKING:
@wabbit/tome-blocks-consoleis now a required peer; fifteen blocks render through its shared cores.Migration: install
@wabbit/tome-blocks-console(>=0.1.1 <1.0.0) alongside this package.Every block except the drop cap is a skin over a core shared with the signal theme's matching block. This package's CSS Modules still supply the sizes, spacing, colors, typeface and width, and the page template's side lanes are unchanged, so the blocks keep their look apart from these changes:
- Accordion
FAQ: each question starts with "Q:" and each answer with "A:", in the accent ink. - Cross link: the type badge takes its link type's color (operation red, intel blue, codex gold, external gray) instead of the block's accent.
- Data table
COMPARISON: alternate body rows are banded on the muted surface; the first column is no longer tinted and bold, and a highlighted cell in the first column now shows as highlighted. - Epigraph: the attribution follows an em dash on its own line, with the source on the line beneath it (they sat side by side); in
CENTEREDboth are centered. - Footnotes: a hairline sits above the notes.
- Spoiler: the reveal control sits over the hidden content, centered, in the same dark style and words, instead of below it.
- Image grid
MASONRY: a picture and its caption no longer split across the two columns.
Behavior changes: an accordion's closed answers are in the page from the first paint, collapsed (
hidden), where they used to be added only on opening, so find-in-page tools, search engines and screen readers reach them;SINGLEandFAQstill open one row at a time. Tabs keep only the selected tab in the tab order and move with the arrow keys, Home and End.The series nav marks the current part with
aria-currenton the part itself rather than on its list item. Footnotes keep theirfn-<number>ids.Key facts with a status also carry the status word, visually hidden. Data table header cells are column headers and the caption names the table.
A bare media record passed as an image grid picture (an object with a
url) is drawn as an image with the item'saltText; a rendered node renders as before.The variant components (
AccordionSingleand the like) were internal and are gone; each block'sComponent.tsxrenders all its variants. Markup changes with the cores (accordion buttons gaintype="button"andaria-controls, tabs gain ids), so site CSS that reached into the old structure through element selectors may need updating; class names are unchanged.- Accordion
1 fix (0.7.1)
- 0.7.1
Published packages now contain compiled JavaScript and type declarations under a one-line license banner, and no longer include source maps.
What you install: one compiled
.js(ESM) and.cjs(CommonJS) file per source module, its.d.ts/.d.ctsdeclarations, and the stylesheets, fonts and other assets a package already shipped. Every JavaScript module opens with a comment naming the package and its license:/*! @wabbit/<package> — © Wabbit, LLC. Wabbit Tome Commercial License (see LICENSE.md). Not for redistribution. */.The
.mapfiles and thesourceMappingURLcomments that pointed at them are gone, which roughly halves the size of each tarball.Debugging: the code is still unbundled and unminified, one readable file per module, so a stack trace points at real code with real names. Line numbers in a stack trace are one higher than before, because of the banner line.
A
'use client'directive stays the first statement of its module (the banner is a comment above it), so React Server Component boundaries are unchanged.No API change, no runtime behavior change, and nothing to do on upgrade.
In
@wabbit/tome-blocks-gallery, the source snapshotsextractGallerySourcewrites from an installed pack leave out the license banner line, so a component or config snapshot starts at the code and a paid block's preview shows its first 15 lines of real code.
0.6.xMinor
Accent layer unified:
accentVars()(accent →--block-accent-*CSS custom properties) is now canonical in@wabbit/tome-ui/utils/accent; dispatch/readout re-export it and their ~19 inline style-object constructions now call it (values byte-identical for both).longform: VISIBLE CHANGE (hence minor) — its local ACCENT_MAP had drifted from the canonical palette its own header declared as the migration target; completing the migration shifts longform block accent hues slightly, makes borders match text, switches backgrounds from solid pale to translucent color-mix, and longform now honors
--cop-accent-*theme overrides for the first time (parity with dispatch/readout). A visual pass on Callout/KeyFacts/DataTable-class blocks is recommended before adopting in a styled site.Every package now declares an explicit
sideEffectsfield (38 added; motion/engine/forms already correct).Registration-bearing modules (render files'
registerRenderer,blocks/*/index.tsdefineBlockself-registration, widgetregister.tsfiles, productHooks, permission self-registrations, print templates, chrome built-in variants) are listed so bundlers can tree-shake everything else WITHOUT dropping import-time registrations — previously the field was unset, which blocked cross-module tree-shaking through the barrels entirely. Never blanketfalseon a package with registration or CSS.
6 fixes (0.6.1 – 0.6.5)
- 0.6.5
CSS files are now copied to
dist/only by the post-build script; the duplicate tsuponSuccesscopy is gone.No behavior change, and the published
dist/is identical. - 0.6.4
Drops the unused
@wabbit/tome-corepeer dependency; nothing in the package imported it. - 0.6.3
dist now raw-Node loadable: relative specifiers get explicit extensions post-build.
buildgains&& node ../../scripts/fix-dist-extensions.mjs --strictas its last step, joining the 13 packages that already ran it. tsup buildsbundle: falseand emits relative specifiers exactly as the TypeScript source wrote them — extensionless — which bundlers resolve and raw Node does not (ESMERR_MODULE_NOT_FOUND; CJS worse,require('./x')finds the ESM.jstwin and Node 22+require(esm)then dies on that file's own extensionless import). Every consumer outside a bundler hit this: the payload CLI under plain node,generate:types,generate:importmap, ops scripts, codegen tools.No source changes, no API changes, and bundler consumers are unaffected — extensioned relative specifiers are universally resolvable.
Two supporting changes made the wiring possible, both in repo scripts rather than package source.
fix-dist-extensions.mjsnow skips bundler-asset specifiers (.css,.module.css,.scss, fonts, images, shaders) by explicit extension allowlist instead of reporting them as unresolvable — that single gap is why the 13 prior adopters were exactly the 13 packages that ship no CSS, since--strictexited 1 on any package with a relative stylesheet import.Dotted MODULE names (
./config.meta,./x.variants,./y.demo) are deliberately NOT treated as assets and still get.js/.cjsappended.assert-node-loadable.mjsgained the matching carve-outs so the new repo-wide CI gate reports real defects only: a resolution failure whose path lands undernode_modulesis a peer SKIP (next@15 has no exports map, sonext/imagefails as an absolute path), and a bundler-asset load failure is an environmental SKIP (CJS surfaces it asSyntaxError: Unexpected token '.'raised from inside the stylesheet).Verified before/after on four packages built one at a time: print 8 FAIL → 0, readout 22 FAIL → 0, ai 3 FAIL → 0, gamification 2 FAIL → 0 (its failure was the other signature — a
directory importmissing/index). cop was already clean on a fresh build, so the audit's "27 of 46 fail" figure includes at least one package whose local dist was merely stale. - 0.6.3
Manifest metadata:
homepage,bugs,engines.All 46 publishable manifests were missing the three fields a consumer sees before any code (2026-09-01 sale-readiness audit §6). Metadata only — no source, no build, no runtime change.
homepagedeep-links to that package README on GitHub (.../tree/main/packages/<dir>#readme). Without it a registry page links to the monorepo root and the reader has to guess which of 46 folders they want.bugs.urlpoints at the repo issue tracker, so a paying customer has a place to report a defect that is not email.engines.nodeis>=22, matching the rootenginesand.nvmrcset the same day. This is a real floor, not decoration: CI on Node 20 could not expand the glob the block packs use fornode --test, and a package installed on Node 20 fails at a runtime the installer cannot connect back to the version.
The forcing function ships with the change:
scripts/assert-manifest-metadata.mjs(rootpnpm assert:manifest-metadata, wired intoplatform-discipline.ymlbesideassert:license-metadata) fails when any publishable manifest lacksdescription,repository.directorymatching its own folder,homepage,bugs,engines.nodeequal to the repo floor,license,filesorsideEffects. It reported 138 violations before this change and 0 after. - 0.6.2
Fix a systemic, invisible-text readability defect across the block packs: a text color and the surface under it were coming from sources a consumer can set independently, so the pair could split.
Measured live on starter.wabbit.com with a canvas-based contrast parser walking every rendered text node: the worst pairs sat at 1.00–1.03:1 — near-black text on a near-black surface, copy that renders but cannot be read. Nothing in CI could see it, because every unit test and every route smoke passes with perfectly invisible text.
This is the second time this bug family has shipped. The first sweep added
--tome-color-on-solid-dark(blocks-lms-pack 0.12.1) and fixed chrome, lms-pack and catalog-pack; the themed packs were missed.This closes the rest and adds the tokens whose absence is why the misuse kept spreading.
Three mechanisms, one root cause
1. Split pairs. Blocks paired
--tome-color-card— not a house token at all; the house name is--tome-color-surface— carrying a DARK literal fallback, against--tome-color-foreground, which every themed consumer does define, carrying a LIGHT one.A fallback pair is only safe when both sides fall back together. The same shape appeared as cross-family pairing (
surface, the CARD family, paired withforeground, the PAGE family) and as clobbering: a band settingcolor: backgroundon itself while its children hardcoded their owncolor: foreground, which wins. longform had a third variant — it read--tome-color-muted-foreground32 times and--tome-color-muted3 times, and neither has ever been a house token, so the entire muted tier silently fell through tocurrentColorand inherited whatever ink an ancestor happened to have.2. Alpha-dimmed text.
opacity: 0.4–0.9on a label, andcolor-mix(<colour> 30–70%, transparent)as acolor:, composite against whatever happens to be behind them, so the ratio is unknowable at author time.Worst measured: 1.46:1. Several were an ancestor
opacityaimed at a rule that dimmed the real text in the same container along with it.3. Status and brand colors used as text.
warning/success/error/destructiveare FILL colors, tuned to be painted as a badge with an ink on top.Used as
color:the default amber measures 2.13:1 and the green 2.82:1. Brand hues have the mirror problem:--tome-color-primaryas text is fine on the page (near-black by default, 5.5:1 even under the starter's oxide theme) but becomes 2.22:1 inside a band whose fill the consumer chooses.New in
@wabbit/tome-ui- `--tome-color-{success,warning,error,destructive,info}-text` — the missing text-weight companions. Literals with inverted
[data-theme="dark"]values, each pinned to clear 4.5:1 against both--tome-color-backgroundand--tome-color-surface.infonever had a fill token either, which is why packs reached forprimary. Rule of thumb:warningpaints a box,warning-textwrites a word. - `--muted-foreground` retuned (
hsl(215 16% 47%)→hsl(215 20% 38%)light,65%→72%dark). That token is--tome-color-on-surface-muted, the tier every pack uses for captions, labels, metadata and table headers, and at the old value it reached only 4.27:1 on--card. The entire secondary text tier platform-wide sat just under AA — which is also why packs kept reaching past it for something with more presence. Standalone default only.
Because these are literals rather than Layer 1 aliases,
@wabbit/tome-coprestates them: a pack that is dark without being[data-theme="dark"]would otherwise inherit the light values.Fix shape, per pack
dispatch, readout, blocks-signal-theme are permanently dark by product identity. Each owns a pack-scoped surface/ink SET (
--dispatch-*,--readout-*,--signal-*) with internally consistent dark defaults compiled into every block module as inline fallbacks.No rule in these packs reads a house surface or text token for a panel, so no consumer theming can split the pair. The house
surface-solid-dark/on-solid-darkpair was rejected here for a stated reason: it is one flat pure-black surface with a single ink, and these packs need a layered palette. tome-cop drives all three sets so its theming still applies. signal-theme's accents split into three roles — identity fill, lightened on-panel text, and per-hue ink for accent fills — because one value cannot serve both a dark panel and a light article.longform, content-writer, editorial-pack, marketing-starter, agency-essentials, extras follow the ambient theme and are fixed with the house vocabulary: correct pairs (
surface/on-surface,background/foreground,primary/on-primary), the new-textweights for status copy, and solid ink steps in place of alpha. Painted bands publish their own ink as a local--_on-band, and brand/status text reads `var(--_on-band, <its normal - `--tome-color-{success,warning,error,destructive,info}-text` — the missing text-weight companions. Literals with inverted
- 0.6.1
Purge client-specific lore and Star Citizen universe references from all non-SC packages (content and labels only — no schema field names, slugs, or enum values changed).
- dispatch: demo content rewritten as an incident-war-room / ops-bridge scenario (SEV-1 bridge traffic, failover runbooks, recovered security-report transcript) plus neutral original fiction for inherently fictional variants (Relay Station Aurelia personal log, SV Aurelia ship log). Config field-description examples de-lored (old client- and universe-specific labels → neutral equivalents).
- readout: all 9 blocks' demo props rewritten as business-operations console data (deployment phases, sprint objectives, service status, perimeter traffic, on-call roster, infrastructure asset cards). Config examples de-lored.
- blocks-signal-theme: demo props for the 33-block pack rewritten as an original search-and-rescue expedition serial ("Operation Long Wake", SV Aurelia, Meridian Reach) with zero client or SC references; config examples de-lored. Pack positioning (SC-tier bundling per OQ-4) unchanged.
- blocks-extras / blocks-content-writer: Custom Hero and Post Hero meta descriptions stop name-dropping the client; "Callsign" field descriptions neutralized to "Author name or handle"; provenance comments neutralized.
- blocks-core: BLOCK_CATALOG mirror entries refreshed for custom-hero and post-hero only; registry comment neutralized.
- blocks-gallery: SourceBadge label for the
vngdsource value now renders "Legacy" (enum value unchanged). - accounts / core / lms / ui / org / admin / motion / longform / cop / blocks: internal provenance comments, shipped CSS comments, and consumer-visible field descriptions that named a specific client replaced with neutral "upstream" phrasing; longform package description de-lored. Historical CHANGELOG entries left untouched.
0.5.xMinor
Tokenize longform + LMS typography to the platform
--tome-text-*scaletome-longform — every hard-coded
font-sizerem/px literal across the 15 block CSS modules (Accordion, AnchorSection, Aside, AuthorAside, Callout, ChapterDivider, CrossLink, DataTable, ImageGrid, KeyFacts, SeriesNav, Spoiler, TabbedContent + DropCap's custom prop left as-is) now reads the platform type token with the original literal preserved as the fallback — e.g.font-size: var(--tome-text-sm, 0.875rem).em-based sizes are left untouched (intentional relative sizing).A Tome-themed consumer (one that loads
@wabbit/tome-ui/tokens) now gets longform type that tracks the platform scale; a consumer with no Tome tokens renders identically to before (fallback = the prior literal). Non-breaking, but rendered sizes shift in Tome-themed consumers — re-verify longform visually after upgrading.SeriesNav —
.partLink(which sits on the TOP_BANNER--block-accent-bgsurface) now leads its color with--block-accent-textbefore falling back to--tome-color-muted-foreground. When--block-accent-textis unset this is identical to the prior rule (non-regressive); when a consumer sets an accent background they now have a paired on-accent text hook, closing the cream-on-pastel contrast gap by contract rather than by a hard-coded value (mirrors the existing.seriesLabel/.sidebarLabelpairing).tome-lms-ui —
tokens.cssnow bridges the--lms-font-size-*scale to--tome-text-*(mirroring the existing color-token bridge), so LMS _content_ typography tracks the platform scale instead of being a parallel fixed scale. The previously-undefinedxs/base/xl/2xlnames (used across components with inline fallbacks) are now defined.Fallbacks equal the dominant observed intended size, so a non-Tome consumer is non-breaking.
CertificateTemplateliterals are tokenized onto this scale.Dense sidebar/nav chrome keeps its sub-14px px literals — that is intentional UI density, not reading prose, and was deliberately left untokenized.
1 fix (0.5.1)
- 0.5.1
Platform-wide peer-range sweep: every
workspace:*/workspace:^entry inpeerDependenciesreplaced with an explicit semver range (@wabbit/tome-core >=1.0.0 <2.0.0,tome-ui >=0.9.0 <1.0.0,tome-motion >=0.2.0 <1.0.0,tome-catalog >=1.1.0 <2.0.0,tome-admin >=0.5.0 <1.0.0;tome-crmranges standardized to>=0.2.0 <1.0.0).The workspace protocol publishes as an exact-version pin, so every substrate bump stranded installed dependents — the breakage class proven by marketing@0.1.0/deals@0.1.1 requiring
tome-crm@0.2.0exactly. devDependencies keepworkspace:*for the local link. (@wabbit/tome-admin-progot the same source fix but is rc-versioned; it carries the change on its next intentional release.)tome-crm additionally gains a once-per-process production warning when the capability-registry fallback grants access — the bootstrap heuristic (any authenticated user passes
crm:read) now announces itself instead of running silently on sites that forgot to seed capability grants (2026-06-10 audit hardening item).Graph-truth additions (same hygiene wave): tome-deals declares its lazy print integration as an optional peer (
@wabbit/tome-print >=0.1.0 <1.0.0); tome-intake declares its lazy catalog routing strategy (@wabbit/tome-catalog >=1.1.0 <2.0.0, optional). These were undeclared dynamic imports — invisible to consumers and to pnpm's build topology.
0.4.xMinor
render: new
@wabbit/tome-longform/rendersubpath exportingpartitionChapterStreams()— splits a block list into a prose stream and an order-anchored marginalia stream for the named-line grid's marginalia track.Promoted verbatim-in-behavior from the Wabbit chapter route (
series/[seriesSlug]/[chapterSlug]/marginaliaPartition.ts), with two deliberate generalizations: (1) noChapter['layout']type coupling — blocks are typed structurally (PartitionableBlock), so any consumer's block union works; (2) the marginalia predicate is injectable viaopts.isMarginalia, withdefaultIsMarginaliaexported as the canonical Wabbitlongform*+editorialSidenotetable. Consumers with a different block vocabulary (e.g. a consumer'ssignal*set) pass their own predicate — adding a consumer's marginalia variant no longer requires a tome-longform release.Additive: new subpath only, no change to existing exports or behavior; Wabbit's route-local copy is byte-equivalent in output under the default predicate.
2 fixes (0.4.1 – 0.4.4)
- 0.4.4
Fix mobile horizontal-overflow in four blocks.
dispatchRedacted(inline variant),editorialColophon(meta row),longformTabbedContent(tab/pill strip), andlongformChapterDivider(numbered row) forced page-level horizontal scroll at narrow viewports (≤375px). Root-cause CSS — the redacted bar caps atmax-width:100%, the colophon meta wraps, the tab strips scroll horizontally within their own container, and the chapter-divider content can shrink/wrap.No change to ≥768px layout.
- 0.4.1
utils/breakoutconverged onto the canonical@wabbit/tome-uihelper; the local copy is retired (it was an explicit placeholder pending tome-ui shipping the named-line resolver).No behavior change — mappings were already identical named-line grid-columns and the public API (
breakoutWidthField/breakoutWidthFieldImageGridconsts,resolveBreakoutWidth,BreakoutWidth/ResolvedBreakoutWidthtypes) is preserved. Re-anchors the@wabbit/tome-uipeer to 0.9.0.
0.3.xMinor
feat(longform): default 13 of 16 blocks to the new prose track (
prose-start / prose-end)Per spec 2026-05-11-tome-ui-prose-track-design §4. Each affected block's
.blockRootrule changes:/* before */ .blockRoot { grid-column: content-start / content-end; width: 100%; } /* after */ .blockRoot { grid-column: prose-start / prose-end; max-width: var(--tome-prose-max-width, none); margin-inline: auto; width: 100%; }Affected blocks (13;
.blockRootonly — all per-block variant rules unchanged):- DropCap, Epigraph, Footnotes, ChapterDivider, SeriesNav (TOP_BANNER + BOTTOM_CARD; SIDEBAR variant unchanged), AnchorSection, Accordion, TabbedContent, Callout, Aside (INLINE; LEFT_OVERLAY + RIGHT_OVERLAY variants unchanged at marginalia), AuthorAside (INDENTED; OVERLAY variant unchanged at marginalia), KeyFacts (COMPACT; STRIP at breakout-md + SIDEBAR at marginalia unchanged), Spoiler, CrossLink.
Unchanged (stay at content track per design §4):
- ImageGrid (
.blockRootat content; galleries want wider editorial intent) - DataTable (
.blockRootat content; tables benefit from width)
Consumer override pattern (matches tome-ui 0.8.0 cap convention):
/* on a route or layout wrapper */ .contentWrapper { --tome-prose-max-width: 600px; }feat(longform): semantic shift of
breakoutWidth: 'article'resolved column (BREAKING)Prior:
'article'→'content-start / content-end'(~1830px @ 1920 viewport). Now:'article'→'prose-start / prose-end'(~800px @ 1920 viewport with default settings).The string
'article'is unchanged in stored data; only the resolvedgrid-columnnarrows. Mitigation: blast radius is essentially Wabbit chapter data, which was authored with narrow intent (no migration needed).Pages/Posts/Studies don't author longform blocks at scale.
Note on ImageGrid + DataTable: their Components apply
breakoutWidthvia localBREAKOUT_CLASS_MAPs (not the centralresolveBreakoutWidthhelper).'article'field values resolve to their local.blockRootclass which still targetscontent-start / content-end— these two blocks render at content width regardless of helper semantics.The label change
'Article (720px)' → 'Article (prose)'in their option lists is for cross-block consistency only; behavior unchanged for these two.feat(longform): new
breakoutWidth: 'content'enum value (opt-in for content-track width)Added to
breakoutWidthField,ImageGrid/config.ts, andDataTable/config.tsoption lists. Position in dropdown: between'article'and'breakout-md'.Resolved column via
resolveBreakoutWidth:'content-start / content-end'. For consumers wanting the historical wider behavior on prose-tracked blocks.In ImageGrid + DataTable Components,
'content'falls through their localBREAKOUT_CLASS_MAPto the default class (which is.blockRoot= content-width). Behaviorally equivalent to'article'for these two blocks.For external consumers using
resolveBreakoutWidth(e.g., custom blocks in wabbit-site-core),'content'is the canonical content-width option.feat(longform): widen
BreakoutWidthtype union in inline Component prop interfacesLongformImageGridData.breakoutWidthandLongformDataTableData.breakoutWidthextended from'article' | 'breakout-md' | 'breakout-lg' | 'full-bleed'→ adds'content'. Behavior unchanged (local maps fall through to default for unrecognized keys); narrowing now type-correct.tome-ui peer floor bumped to
^0.8.0viaworkspace:^resolution (required forprose-start / prose-endlines +--tome-prose-max-widthcustom property + the marginalia-start/-endaliases used by SIDEBAR/OVERLAY variants from 0.2.0).KeyFacts SIDEBAR, Aside (LEFT_OVERLAY + RIGHT_OVERLAY), AuthorAside (OVERLAY), SeriesNav (SIDEBAR) variants UNCHANGED in 0.3.0 — their
marginalia-{left,right}-{start,end}rules now resolve correctly because tome-ui 0.8.0 ships the missing aliases (previously promised but never landed in 0.7.0's grid template).
4 fixes (0.3.1 – 0.3.3)
- 0.3.3
utils/breakout: re-label
breakoutWidthFieldoptions to reflect the tome-ui 0.8.2 alias repair.Removed misleading pixel hints (
Breakout MD (960px)/Breakout LG (1200px)— the actual widths depend on viewport, marginalia config, and prose-pad config; the px hints didn't reflect any platform reality). Reordered dropdown by monotonic width (article < breakout-md < content ≡ breakout-lg < full-bleed).Flagged
breakout-lgasContent (legacy alias)to surface the new synonym semantic in the admin UI. Updated admin description to name the four width semantics (Article = prose; Breakout = outer reading; Content = full inner content; Full Bleed = edge to edge).No JS resolver change —
BREAKOUT_MAPkeeps its existinggridColumnstring outputs; the strings resolve to the new alias targets via the platform CSS release. Pairs with@wabbit/tome-ui@0.8.2(the grid alias remap).See spec
2026-05-12-tome-ui-grid-breakout-rings-design. - 0.3.3
Updated dependencies [4225e9f]
- @wabbit/tome-ui@0.8.2
- 0.3.2
fix(longform): add
width: 100%to.blockRoot > *so flex-display inner variants don't shrink to fit-content0.3.1 moved the prose
max-widthcap from.blockRoot(subgrid item; max-width silently ignored) to.blockRoot > *(plain grid item; max-width binds). That fixed the cap for block-display inner variants — Epigraph.centered(blockquote), AuthorAside.indented, Aside.inline, KeyFacts.compact, etc. — which naturally fill grid-track width via default block stretching.But flex-display inner variants — ChapterDivider's
.ornamental/.numbered/.symbol(alldisplay: flex; justify-content: center) — shrink to their flex children's intrinsic width when no explicitwidthis set. The.ornamentalvariant rendered at 18px wide (single-glyph child) instead of 600px wide..numberedand.symbolwould have collapsed theirflex: 1rule-line children (.numberedRule/.symbolRule) to 0 width.Fix: add
width: 100%to the.blockRoot > *rule across all 14 prose-defaulted blocks. The interaction now is:width: 100%forces the inner wrapper to fill the parent's grid-track inline-size (~686px at lg+/xl with default settings)max-width: var(--tome-prose-max-width, none)clamps to the consumer's cap (e.g., 600px on Wabbit chapter routes)margin-inline: autocenters the clamped wrapper within the 686px parent span
Block-display inner variants are unaffected (they already filled width naturally;
width: 100%is redundant but harmless). Flex-display variants now fill 600px and lay out their children correctly.Affected blocks (14): same set as 0.3.1 — DropCap, Epigraph, Footnotes, ChapterDivider, SeriesNav (TOP_BANNER + BOTTOM_CARD only), AnchorSection, Accordion, TabbedContent, Callout, Aside (INLINE only), AuthorAside (INDENTED only), KeyFacts (COMPACT only), Spoiler, CrossLink. Non-prose variants (marginalia, breakout-md) unchanged.
Caught during the re-walk of staging.wabbit.com after 0.3.1 published: ChapterDivider
.ornamentalon chapter 1 rendered at width=18 instead of width=600. Spec amendment §12.6 documents the flex-display shrink-to-content failure mode alongside §12.5's subgrid+max-width quirk. - 0.3.1
fix(longform): move
max-width: var(--tome-prose-max-width, none)cap from.blockRootto.blockRoot > *inner-wrapper rule across the 14 prose-defaulted blocksThe bug. 0.3.0 declared
max-width: var(--tome-prose-max-width, none); margin-inline: auto;on each block's.blockRootrule. But.blockRootis alsodisplay: grid; grid-template-columns: subgrid; width: 100%;— browsers honor subgrid placement size (the prose-inner track width, ~686px at 1920 viewport with default settings) and silently ignore `max-width` + `margin-inline: auto` on subgrid items.Result: longform blocks rendered at the full prose-track width regardless of consumer
--tome-prose-max-widthsettings, while MediaBlock's.breakoutArticle(a plain block-level grid item) correctly capped at the consumer's set width.The fix. Move the cap properties from the outer
.blockRootrule (a subgrid item) to the inner.blockRoot > *rule (a plain grid item placed atgrid-column: 1 / -1of the parent subgrid). The inner wrapper IS a non-subgrid grid item;max-widthbinds normally on it.margin-inline: autocenters the capped content within the parent's prose-inner span.Affected blocks (14): DropCap, Epigraph, Footnotes, ChapterDivider, SeriesNav (TOP_BANNER + BOTTOM_CARD only — SIDEBAR variant stays uncapped at marginalia), AnchorSection, Accordion, TabbedContent, Callout, Aside (INLINE only — LEFT_OVERLAY + RIGHT_OVERLAY stay uncapped at marginalia), AuthorAside (INDENTED only — OVERLAY stays uncapped), KeyFacts (COMPACT only — STRIP stays at breakout-md, SIDEBAR stays at marginalia), Spoiler, CrossLink. Block files with multi-variant
> *rules split into per-variant rules so only the prose-defaulted variant's children get the cap; marginalia + breakout variants stay uncapped (correct intent — those variants don't sit in the prose track).Caught by staging walk. 4 chapters on staging.wabbit.com 2026-05-11 showed longform blocks rendering at 686px while
.copyFocusedContainerprose rendered at 600px (the Wabbit editorial target). MediaBlock atbreakoutWidth='article'correctly capped to 600px — proving the consumer-side--tome-prose-max-widthcascade works.Root cause traced to the subgrid+max-width interaction. Spec amendment §12.5 documents the CSS engine quirk and codifies the inner-wrapper cure as the canonical pattern for future prose-defaulted blocks.
No data migration. Patch-level; consumer
--tome-prose-max-widthdeclarations work unchanged.
0.2.xMinor
feat(longform): migrate SIDEBAR/OVERLAY variants from page-padding columns to first-class marginalia tracks
Five renderer variants migrate from
margin-{left,right}-*(24px page padding) tomarginalia-{left,right}-*named lines that resolve to a readable inner-content track at md+:KeyFacts.blockRootSidebar→marginalia-right-start / marginalia-right-endat md+Aside.blockRootRight→marginalia-right-start / marginalia-right-endat md+Aside.blockRootLeft→marginalia-left-start / marginalia-left-endat md+AuthorAside.blockRootOverlay→marginalia-right-start / marginalia-right-endat md+SeriesNav.blockRootSidebar→marginalia-right-start / marginalia-right-endat md+ (5th variant; one-line spec amendment 11.1 — same xl-only pattern as the 4 enumerated in design §4.1)
xl+ qualifier dropped — marginalia tracks exist from md+. Below md, variants fall through to the default content-area placement via the
:where(.grid > * > *)rule.Aside.LEFT_OVERLAYat md viewport resolves to 0 width because M_left=0 there; effectively activates at lg+ (documented limitation pending future spec revision).Eliminates the vertical-letter-column rendering bug observed at staging.wabbit.com/tome 2026-05-10 ("AT/A/G/L/A/N/C/E"), where the SIDEBAR variants placed at the 24px right padding column.
Requires
@wabbit/tome-ui ≥ 0.7.0. Peer dep already declared viaworkspace:^and resolves to the new floor on publish.Updated dependencies
- @wabbit/tome-ui@0.7.0
0.1.x
2 fixes (0.1.2)
- 0.1.2
Subgrid hygiene fix: every direct child of a
blockRoot*variant now spans the parent subgrid viagrid-column: 1 / -1.Previously, inner variant wrappers (
.standard,.colored,.compact,.callout,.spoilerContainer,.dropCapStandard,.accordion,.faq,.bottomCard, etc.) and descendant content in blocks like DropCap, Callout, Spoiler, and Footnotes (categorized) collapsed into the first cell of the parent subgrid because subgrid children only span 1 track unless explicitly placed.Per-variant
grid-column: 1 / -1rules added to all 16 longform blocks (Accordion, AnchorSection, Aside, AuthorAside, Callout, ChapterDivider, CrossLink, DataTable, DropCap, Epigraph, Footnotes, ImageGrid, KeyFacts, SeriesNav, Spoiler, TabbedContent), plus a defensive.blockRoot* > * { grid-column: 1 / -1 }catch-all that ensures any future inner element honors the subgrid contract regardless of its class name.Surfaced during a consumer's canary rollout phase —
@wabbit/tome-longformblocks rendered correctly block-level but inner variant wrappers collapsed into cell 1 when the consumer's page wrapper was a real grid (@wabbit/tome-ui/grid). Now functions correctly inside both grid and non-grid parents. - 0.1.2
Updated dependencies [1d90b24]
- @wabbit/tome-ui@0.6.1