typeset
ai-research-agent / editor/typesetting/typeset
Functions
embed()
function embed(type): EmbedType
Parameters
Parameter | Type |
---|---|
|
Returns
format()
function format(type): FormatType
Parameters
Parameter | Type |
---|---|
|
Returns
line()
function line(type): LineType
Parameters
Parameter | Type |
---|---|
|
Returns
Classes
Types<T>
A type store to hold types and make it easy to manage them.
Type Parameters
Type Parameter | Default type |
---|---|
|
Accessors
default
Get Signature
get default(): T
Returns
T
Constructors
new Types()
new Types<T>(types): Types<T>
Parameters
Parameter | Type |
---|---|
|
|
Returns
Types
<T
>
Methods
add()
add(type): void
Parameters
Parameter | Type |
---|---|
|
|
Returns
void
findByAttributes()
Call Signature
findByAttributes(attributes, fallbackToDefault): T
Parameters
Parameter | Type |
---|---|
|
|
|
|
Returns
T
Call Signature
findByAttributes(attributes, fallbackToDefault?): undefined | T
Parameters
Parameter | Type |
---|---|
|
|
|
|
Returns
undefined
| T
findByNode()
Call Signature
findByNode(node, fallbackToDefault): T
Parameters
Parameter | Type |
---|---|
|
|
|
|
Returns
T
Call Signature
findByNode(node, fallbackToDefault?): undefined | T
Parameters
Parameter | Type |
---|---|
|
|
|
|
Returns
undefined
| T
get()
get(name): T
Parameters
Parameter | Type |
---|---|
|
|
Returns
T
init()
init(): void
Returns
void
matches()
matches(node): undefined | boolean
Parameters
Parameter | Type |
---|---|
|
|
Returns
undefined
| boolean
priority()
priority(name): number
Parameters
Parameter | Type |
---|---|
|
|
Returns
number
remove()
remove(type): void
Parameters
Parameter | Type |
---|---|
|
|
Returns
void
Properties
list
list: T[];
priorities
priorities: object;
Index Signature
[name
: string
]: number
selector
selector: string;
types
types: TypeMap<T>;
Typeset
Constructors
new Typeset()
new Typeset(types): Typeset
Parameters
Parameter | Type |
---|---|
|
Returns
Properties
embeds
embeds: Types<EmbedType>;
formats
formats: Types<FormatType>;
lines
lines: Types<LineType>;
embed()
static embed: (type) => EmbedType;
Parameters
Parameter | Type |
---|---|
|
Returns
format()
static format: (type) => FormatType;
Parameters
Parameter | Type |
---|---|
|
Returns
line()
static line: (type) => LineType;
Parameters
Parameter | Type |
---|---|
|
Returns
Interfaces
BasicType
Extended by
Properties
commands()?
optional commands: (editor) => Function | Commands;
Parameters
Parameter | Type |
---|---|
|
Returns
Function
| Commands
fromDom?
optional fromDom: false | FromDom;
name
name: string;
render?
optional render: Renderer;
selector
selector: string;
shortcuts?
optional shortcuts: string | Shortcuts;
styleSelector?
optional styleSelector: string;
Commands
Indexable
[name
: string
]: (...args
) => any
EmbedType
Extends
Properties
commands()?
optional commands: (editor) => Function | Commands;
Parameters
Parameter | Type |
---|---|
|
Returns
Function
| Commands
Inherited from
fromDom?
optional fromDom: false | FromDom;
Inherited from
name
name: string;
Inherited from
noFill?
optional noFill: boolean;
render?
optional render: Renderer;
Inherited from
selector
selector: string;
Inherited from
shortcuts?
optional shortcuts: string | Shortcuts;
Inherited from
styleSelector?
optional styleSelector: string;
Inherited from
FormatType
Extends
Properties
commands()?
optional commands: (editor) => Function | Commands;
Parameters
Parameter | Type |
---|---|
|
Returns
Function
| Commands
Inherited from
fromDom?
optional fromDom: false | FromDom;
Inherited from
greedy?
optional greedy: boolean;
name
name: string;
Inherited from
render?
optional render: Renderer;
Inherited from
selector
selector: string;
Inherited from
shortcuts?
optional shortcuts: string | Shortcuts;
Inherited from
styleSelector?
optional styleSelector: string;
Inherited from
LineType
Extends
Properties
child?
optional child: boolean;
commands()?
optional commands: (editor) => Function | Commands;
Parameters
Parameter | Type |
---|---|
|
Returns
Function
| Commands
Inherited from
contained?
optional contained: boolean;
defaultFollows?
optional defaultFollows: boolean;
fromDom?
optional fromDom: false | FromDom;
Inherited from
frozen?
optional frozen: boolean;
indentable?
optional indentable: boolean;
name
name: string;
Inherited from
nextLineAttributes()?
optional nextLineAttributes: (attributes) => default;
Parameters
Parameter | Type |
---|---|
|
Returns
onEmptyEnter()?
optional onEmptyEnter: (editor, line) => boolean;
Parameters
Parameter | Type |
---|---|
| |
|
Returns
boolean
onEnter()?
optional onEnter: (editor) => void;
Parameters
Parameter | Type |
---|---|
|
Returns
void
onTab()?
optional onTab: (editor, shiftKey) => void;
Parameters
Parameter | Type |
---|---|
| |
|
|
Returns
void
render?
optional render: Renderer;
Overrides
renderMultiple?
optional renderMultiple: MultiLineRenderer;
selector
selector: string;
Inherited from
shortcuts?
optional shortcuts: string | Shortcuts;
Inherited from
shouldCombine?
optional shouldCombine: ShouldCombine;
styleSelector?
optional styleSelector: string;
Inherited from
TypeMap<T>
Type Parameters
Type Parameter | Default type |
---|---|
|
Indexable
[name
: string
]: T
TypesetTypes
Properties
embeds?
optional embeds: (string | EmbedType)[];
formats?
optional formats: (string | FormatType)[];
lines?
optional lines: (string | LineType)[];
Type Aliases
FromDom()
type FromDom: (node) => any;
Parameters
Parameter | Type |
---|---|
|
|
Returns
any
LineData
type LineData: [default, VChild[], string];
MultiLineRenderer()
type MultiLineRenderer: (lines, editor, forHTML?) => VNode;
Parameters
Parameter | Type |
---|---|
|
|
| |
|
|
Returns
Renderer()
type Renderer: (attributes, children, line, editor, forHTML?) => VNode;
Parameters
Parameter | Type |
---|---|
| |
|
|
| |
| |
|
|
Returns
ShouldCombine()
type ShouldCombine: (prev, next) => boolean;
Parameters
Parameter | Type |
---|---|
| |
|
Returns
boolean