/** * The block roster. * * Each entry is the machine-readable contract the issue requires: stable type * and version, purpose, compact prompt-facing summary, props schema with * defaults and bounds, slots and child constraints, responsive sizing behavior, * accessibility contract, supported actions, runtime features, network * capability, migration policy, and serializer behavior. * * The roster is data. Rendering lives in the renderer; validation, the JSON * Schema, and `catalog()`/`describe()` all derive from these definitions so they * cannot drift apart. */ import type { ActionType } from './actions.js'; import type { BlockCategory } from './block-module.js'; import type { PropSchema } from './prop-schema.js'; export { CHART_KINDS } from '../blocks/chart/chart-kinds.js'; export * from './define-helpers.js'; /** * Features the core compiler emits. Block groups may add their own features * (see `FeatureModule`); the registry rejects any name outside both lists. */ export declare const CORE_RUNTIME_FEATURES: readonly ["tabs", "accordion", "carousel", "slider", "copy", "filter", "theme", "dialog", "chart", "diagram", "media", "outline", "bento", "marquee", "terminal", "tree", "before-after", "kpi", "showcase", "cta", "frame", "checklist", "state"]; export type CoreRuntimeFeature = (typeof CORE_RUNTIME_FEATURES)[number]; /** * A runtime feature name: a core feature or one a block group registers. The * open string arm is checked at registration rather than by the type system. */ export type RuntimeFeature = CoreRuntimeFeature | (string & {}); export interface SlotSpec { /** Types accepted by the slot; `'*'` accepts any block. */ accepts: readonly string[] | '*'; min?: number; max?: number; } export interface SizingContract { /** Semantic sizes the block supports. */ sizes: readonly string[]; default: string; /** How the block resolves available space. */ responsive: string; } export interface BlockDefinition { type: string; version: number; kind: 'semantic' | 'primitive'; /** Catalog grouping for discovery. */ category: BlockCategory; /** Up to 6 kebab-case search tags. */ tags: readonly string[]; /** Up to 4 short phrases (40 characters max) naming what the block is for. */ useCases: readonly string[]; /** Allowed direct parent types; absent means any parent, including the page. */ parents?: readonly string[]; /** Rows carry `data-ak-filter-item` and a `data-ak-row` JSON payload a filter can read. */ filterable?: boolean; /** The block reads rows from `dataRef` or inline `data`, reshaped by an optional `transform`. */ data?: { required: boolean; description: string; }; purpose: string; /** One line, used by the compact `catalog()` surface. */ summary: string; props: Record; slots?: Record; sizing: SizingContract; a11y: string; actions: readonly ActionType[]; runtimeFeatures: readonly RuntimeFeature[]; /** Emitted assets the block needs, beyond the shared base stylesheet. */ assets: readonly string[]; network: 'none' | 'optional'; migration: string; serializer: string; } /** * Core blocks: the roster entries that have not moved into a block module * under `src/blocks/`. The registry appends every module's definition. */ export declare const CORE_BLOCK_DEFINITIONS: readonly BlockDefinition[]; //# sourceMappingURL=roster.d.ts.map