Files
emdash-patch-imageupload/packages/blocks/src/server.ts
kunthawat 2d1be52177 Emdash source with visual editor image upload fix
Fixes:
1. media.ts: wrap placeholder generation in try-catch
2. toolbar.ts: check r.ok, display error message in popover
2026-05-03 10:44:54 +07:00

50 lines
924 B
TypeScript

/**
* Server-safe exports for @emdash-cms/blocks.
*
* Use this entry point in plugin route handlers and other server-side code
* that doesn't have React available. Provides builders, validation, and types
* without importing any React components.
*/
export { blocks, elements } from "./builders.js";
export { validateBlocks } from "./validation.js";
export type {
// Composition objects
ConfirmDialog,
// Elements
ButtonElement,
TextInputElement,
NumberInputElement,
SelectElement,
ToggleElement,
SecretInputElement,
Element,
// Form
FieldCondition,
FormField,
// Block sub-types
TableColumn,
StatItem,
// Blocks
HeaderBlock,
SectionBlock,
DividerBlock,
FieldsBlock,
TableBlock,
ActionsBlock,
StatsBlock,
FormBlock,
ImageBlock,
ContextBlock,
ColumnsBlock,
Block,
// Interactions
BlockAction,
FormSubmit,
PageLoad,
BlockInteraction,
// Response
BlockResponse,
} from "./types.js";