Client block registry now carries a renderer, edit form, palette label/icon, and defaults for all seven Wave 1 blocks (self-registering via client/src/blocks/types/*): heading, rich_text, image, two_column, cta, divider, quote. - BlockRenderer + BlockList render stored blocks via the registry (respect `visible`, tolerate unknown types), reading getBlock from ./registry to avoid the index -> twoColumn -> BlockRenderer cycle. - editorKit: shared Field/TextField/TextAreaField/SelectField styled with the existing admin form classes; rich_text editor reuses RichTextEditor (variant post), image editor reuses the shared uploader. - two_column editor is a mini per-column canvas (add from the leaf-only palette, edit via each block's registry editor, reorder, remove). - theme.css: public block styles (heading/image alignment/cta/quote/ two-column responsive grid) + column sub-block editor styles. Verified: all 11 modules transform cleanly under esbuild. Full visual verification comes with the builder UI (step 5) + public route (step 6). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
815 B
JavaScript
20 lines
815 B
JavaScript
// Client block registry entrypoint. Importing this module registers every
|
|
// browser-side block definition (renderer + editor + palette entry) exactly
|
|
// once, then re-exports the registry API. The page builder and the public page
|
|
// renderer should import from HERE, not ./registry, so the definitions are
|
|
// loaded before anything reads the registry.
|
|
//
|
|
// Wave 1 definitions are registered below as each block is built (spec build
|
|
// order step 3), one import per block.
|
|
|
|
export * from './registry'
|
|
|
|
// ── Wave 1 block definitions (self-register on import) ─────────────────
|
|
import './types/heading.jsx'
|
|
import './types/richText.jsx'
|
|
import './types/image.jsx'
|
|
import './types/twoColumn.jsx'
|
|
import './types/cta.jsx'
|
|
import './types/divider.jsx'
|
|
import './types/quote.jsx'
|