/** * Definition helpers shared by the core roster and the block modules. * * Small constructors for prop schemas and block definitions. They only build * data: validation, the JSON Schema and `describe()` all read the result. */ import type { PropSchema } from './prop-schema.js'; import type { BlockDefinition, SizingContract } from './roster.js'; export declare const DEFAULT_MIGRATION = "Props are additive; removed props are reported as diagnostics, never silently dropped."; export declare const DEFAULT_SERIALIZER = "Serializes back to the same Page Spec shape; child blocks keep their order and slots."; export declare const DEFAULT_SIZING: SizingContract; export declare const str: (o?: Omit) => PropSchema; /** * How text renders. `describe` and the JSON Schema both carry it, once per * prop, so it stays short. */ export declare const PROSE_DESCRIPTION = "Plain text; a `backtick` pair renders as inline code."; export declare const VERBATIM_DESCRIPTION = "Emitted verbatim; backticks stay literal."; export declare const txt: (o?: { required?: boolean; default?: string; maxLength?: number; description?: string; }) => PropSchema; export declare const num: (o?: { required?: boolean; default?: number; min?: number; max?: number; integer?: boolean; description?: string; }) => PropSchema; export declare const bool: (o?: { required?: boolean; default?: boolean; description?: string; }) => PropSchema; export declare const urlProp: (o?: { required?: boolean; schemes?: readonly string[]; description?: string; asset?: "images" | "media"; rejectBlocked?: boolean; }) => PropSchema; export declare const list: (of: PropSchema, o?: { required?: boolean; minItems?: number; maxItems?: number; description?: string; }) => PropSchema; export declare const obj: (fields: Record, o?: { required?: boolean; description?: string; }) => PropSchema; export declare const oneOf: (options: readonly PropSchema[], o?: { required?: boolean; description?: string; }) => PropSchema; export declare const enumStr: (values: readonly string[], o?: { required?: boolean; default?: string; description?: string; }) => PropSchema; export declare const idProp: (description: string) => PropSchema; export declare const actionMap: (description: string) => PropSchema; /** A nested list of child blocks, built into `IrNode.slots` rather than props. */ export declare const blocks: (o?: { required?: boolean; minItems?: number; maxItems?: number; accepts?: readonly string[] | "*"; description?: string; }) => PropSchema; /** Reusable prop fragments. */ export declare const onProp: (description?: string) => PropSchema; export declare const anchorProps: Record; export declare const itemsOf: (fields: Record, o?: { minItems?: number; maxItems?: number; }) => PropSchema; export declare const TITLE: PropSchema; export declare const OPTIONAL_TITLE: PropSchema; export declare const LABEL: PropSchema; /** A block definition with the shared defaults filled in. */ export declare function define(specification: Partial & Pick): BlockDefinition; export declare function semantic(specification: Partial & Pick): BlockDefinition; //# sourceMappingURL=define-helpers.d.ts.map