import SchemaInstruction from "./SchemaInstruction"; import SchemaLeaf from "./SchemaLeaf"; import Definition from "../Definition"; import parse from "../../functions/schema/parse"; import { BlockInstance } from "@wordpress/blocks"; export declare type SchemaPrimitive = string | number | boolean; export declare type SchemaValue = SchemaPrimitive | SchemaObject | SchemaArray; export declare type SchemaObject = { [member: string]: SchemaValue; }; export declare type SchemaArray = SchemaValue[]; export declare const schemaDefinitions: Record; export declare type SchemaDefinitionConfiguration = { name: string; onlyNested?: boolean; separateInGraph?: boolean; }; /** * Schema definition class. */ export default class SchemaDefinition extends Definition { static separatorCharacters: string[]; static parser: typeof parse; instructions: Record; tree: SchemaLeaf; /** * Renders a schema definition. * * @param block The block. * * @returns The rendered schema. */ render(block: BlockInstance): SchemaValue; /** * Registers a schema definition. */ register(): void; /** * Returns whether or not schema should only be rendered for nested blocks. * * @returns Whether or not schema should only be rendered for nested blocks. */ onlyNested(): boolean; /** * Returns whether or not schema should be rendered even for nested blocks. * * @returns Whether or not schema should be rendered even for nested blocks. */ separateInGraph(): boolean; }