import { Slot } from '@revesuite/global/utils'; import type * as Y from 'yjs'; import { z } from 'zod'; import { Text } from './text-adapter.js'; import type { Page } from './workspace/index.js'; import type { YBlock } from './workspace/page.js'; declare const role: readonly ["root", "hub", "content"]; export type RoleType = (typeof role)[number]; export interface InternalPrimitives { Text: (input?: Y.Text | string) => Text; } export declare const internalPrimitives: InternalPrimitives; export declare const BlockSchema: z.ZodObject<{ version: z.ZodNumber; model: z.ZodObject<{ role: z.ZodEnum<["root", "hub", "content"]>; flavour: z.ZodString; tag: z.ZodObject<{ _$litStatic$: z.ZodString; r: z.ZodSymbol; }, "strip", z.ZodTypeAny, { _$litStatic$: string; r: symbol; }, { _$litStatic$: string; r: symbol; }>; parent: z.ZodOptional>; children: z.ZodOptional>; props: z.ZodOptional], z.ZodUnknown>, z.ZodRecord>>; toModel: z.ZodOptional, z.ZodType, z.ZodTypeDef, BaseBlockModel>>>; }, "strip", z.ZodTypeAny, { flavour: string; role: "content" | "root" | "hub"; tag: { _$litStatic$: string; r: symbol; }; parent?: string[] | undefined; children?: string[] | undefined; props?: ((args_0: InternalPrimitives, ...args_1: unknown[]) => Record) | undefined; toModel?: ((...args: unknown[]) => BaseBlockModel) | undefined; }, { flavour: string; role: "content" | "root" | "hub"; tag: { _$litStatic$: string; r: symbol; }; parent?: string[] | undefined; children?: string[] | undefined; props?: ((args_0: InternalPrimitives, ...args_1: unknown[]) => Record) | undefined; toModel?: ((...args: unknown[]) => BaseBlockModel) | undefined; }>; }, "strip", z.ZodTypeAny, { model: { flavour: string; role: "content" | "root" | "hub"; tag: { _$litStatic$: string; r: symbol; }; parent?: string[] | undefined; children?: string[] | undefined; props?: ((args_0: InternalPrimitives, ...args_1: unknown[]) => Record) | undefined; toModel?: ((...args: unknown[]) => BaseBlockModel) | undefined; }; version: number; }, { model: { flavour: string; role: "content" | "root" | "hub"; tag: { _$litStatic$: string; r: symbol; }; parent?: string[] | undefined; children?: string[] | undefined; props?: ((args_0: InternalPrimitives, ...args_1: unknown[]) => Record) | undefined; toModel?: ((...args: unknown[]) => BaseBlockModel) | undefined; }; version: number; }>; export type BlockSchemaType = z.infer; export type PropsSetter = (props: Props) => Partial; export type PropsGetter = (internalPrimitives: InternalPrimitives) => Props; interface StaticValue { _$litStatic$: string; r: symbol; } export type SchemaToModel; flavour: string; }; }> = BaseBlockModel & ReturnType & { flavour: Schema['model']['flavour']; }; export declare function defineBlockSchema, Metadata extends Readonly<{ version: number; role: Role; tag: StaticValue; parent?: string[]; children?: string[]; }>, Model extends BaseBlockModel>(options: { flavour: Flavour; metadata: Metadata; props?: (internalPrimitives: InternalPrimitives) => Props; toModel?: () => Model; }): { version: number; model: { role: Role; props: PropsGetter; flavour: Flavour; } & Metadata; }; declare const BaseBlockModel_base: new () => Props_1; export declare class BaseBlockModel extends BaseBlockModel_base { static version: number; flavour: string; tag: StaticValue; role: RoleType; page: Page; id: string; yBlock: YBlock; propsUpdated: Slot; childrenUpdated: Slot; childMap: Map; children: BaseBlockModel[]; type?: string; text?: Text; sourceId?: string; isEmpty(): boolean; firstChild(): BaseBlockModel | null; lastChild(): BaseBlockModel | null; lastItem(): BaseBlockModel | null; dispose(): void; onCreated(): void; } export {}; //# sourceMappingURL=base.d.ts.map