import { FieldTypes } from "./components/schema/fieldtypes"; // MD Parser type IdentifiedToken = { metadata: M; children?: Token[]; uuid: string; raw: string; content: string; rendersChildrenOnly?: boolean; rendersContentOnly?: boolean; }; type TokenRenderer = (t: Token) => ReactNode; type TokenAttributes = { type: string; render: TokenRenderer; }; type Token> = IdentifiedToken & TokenAttributes; type TokenMarker> = { start: number; end: number; type: string; parent?: TokenMarker; token: Token; }; type FrontMatter = Record; type SearchFunction = ( s: string, start: number, end: number, ) => { start: number; end: number; text: string; lastIndex: number; }; type TokenIdentifier = { rx: RegExp; parse: (s: string) => Token; search?: SearchFunction; }; type TokenIdentifierMap = Map>; type IdentifierRegistration = >( type: string, match: RegExp, parseFunction: (s: string, rx: RegExp) => IdentifiedToken, renderFunction: TokenRenderer, openTagRx?: RegExp, closeTagRx?: RegExp, ) => void; // Schema type MetadataType = { [key: string]: string; }; type FieldType = { type: FieldTypes; value: string; isConstant: boolean; limit: number; minimum: number; }; type TypeType = Record; type Template = { type: string; display: string; }; type SchemaFields = Record; type SchemaTypes = Record; type Schema = { id: string; name: string; fields: SchemaFields; types: SchemaTypes; version: number; gameSystemId?: string | null; }; // Input Binder type InputBinder = { name: string; value: string | number; onChange: ( e: ChangeEvent, ) => void; }; // Query type QueryableObject = Record;