@curvenote/schema
Version:
Schema and markdown parser for @curvenote/editor
116 lines (115 loc) • 3.19 kB
TypeScript
import type { PhrasingContent, FlowContent, Math as SpecMath, Heading as SpecHeading, TableCell as SpecTableCell, StaticPhrasingContent } from 'myst-spec';
export { Text, Abbreviation, Emphasis, InlineCode, Link, Node as MystNode, PhrasingContent, FlowContent, StaticPhrasingContent, Strong, Subscript, Superscript, Underline, Blockquote, Break, List, ListContent, ListItem, Paragraph, ThematicBreak, Admonition, CrossReference, Code, InlineMath, Caption, Container, Image, Legend, Table, TableRow, FootnoteDefinition, FootnoteReference, Root, } from 'myst-spec';
export declare type NoAttrs = Record<string, never>;
declare type Identifier = {
identifier: string;
label?: string;
};
export declare type OptionalNumbered = {
numbered?: boolean;
number?: string;
};
export declare type Strikethrough = {
type: 'delete';
children: PhrasingContent[];
};
export declare type Margin = {
type: 'margin';
children: FlowContent[];
};
export declare type Cite = {
type: 'cite';
identifier?: string;
label?: string;
};
export declare type CiteGroup = {
type: 'citeGroup';
kind: 'narrative' | 'parenthetical';
children: Cite[];
};
export declare type InlineFootnote = {
type: 'inlineFootnote';
children: FlowContent[];
};
export declare type Math = SpecMath & OptionalNumbered;
export declare type Heading = SpecHeading & OptionalNumbered;
export declare type Iframe = {
type: 'iframe';
src: string;
width: string | number | null;
};
export declare type Time = {
type: 'time';
time: string;
value: string;
};
export declare type Mention = {
type: 'mention';
value: string;
} & Identifier;
export declare type TableCell = SpecTableCell & {
colspan?: number;
rowspan?: number;
};
export declare type LinkBlock = {
type: 'linkBlock';
url: string;
thumbnail?: string;
title?: string;
children: StaticPhrasingContent[];
};
export declare type Button = {
type: 'reactiveButton';
label?: string;
labelFunction?: string;
disabled?: string;
disabledFunction?: string;
clickFunction?: string;
};
export declare type Display = {
type: 'reactiveDisplay';
value?: string;
valueFunction?: string;
format?: string;
transformFunction?: string;
};
export declare type Dynamic = {
type: 'reactiveDynamic';
value?: string;
valueFunction?: string;
changeFunction?: string;
format?: string;
min?: string;
minFunction?: string;
max?: string;
maxFunction?: string;
step?: string;
stepFunction?: string;
};
export declare type Range = {
type: 'reactiveRange';
value?: string;
valueFunction?: string;
changeFunction?: string;
format?: string;
min?: string;
minFunction?: string;
max?: string;
maxFunction?: string;
step?: string;
stepFunction?: string;
};
export declare type Switch = {
type: 'reactiveSwitch';
value?: string;
valueFunction?: string;
changeFunction?: string;
label?: string;
};
export declare type Variable = {
type: 'reactiveVariable';
name: string;
value?: string;
valueFunction?: string;
format?: string;
};