scrapbox.Page.lines
一部分まで調べてある
ありがたい
nodeの種類一覧
tstype NodeType = "blank" | "video" | "vimeo" | "audio" | "audioLink" | "image" | "imageLink" | "gyazo" | "gyazoLink" | "link" | "hashTag" | "icon" | "strong-icon" | "strongImage" | "strongGyazo" | "strongImageLink" | "strongGyazoLInk" | "deco" | "deco-formula" | "strong" | "url" | "urlLink" | "youtube" | "location" | "quote" | "code" | "indent";
種類別
title
code block
node.tstype CodeBlock = {
lang: string;
filename?: string;
indent: number;
start: boolean;
end: boolean;
};
table block
node.tstype TableBlock = {
title: string;
cells: string[];
indent: number;
start: boolean;
end: boolean;
};
cellに含まれるリンクをparseしてくれないみたい
またindentの解析がバグっている
helpfeel
node.tstype Helpfeel = {
prefix: "?";
entry: string;
};
command line
node.tstype Cli = {
prefix: "$" | "%";
command: string;
};
nodes
node.tstype UnitBase = {
content: string;
whole: string;
};
plain text
blank
node.tstype Blank = {
type: "blank";
unit: UnitBase;
children: PlainText;
};
video
node.tstype Video = {
type: "video";
unit: UnitBase;
fileId: string | undefined;
children: PlainText;
};
vimeo
node.tstype Vimeo = {
type: "vimeo";
unit: UnitBase & {
videoId: string;
};
children: PlainText;
};
decoration
node.tstype Decoration = {
type : "deco";
unit: UnitBase & {
deco: string;
strong: number;
italic: boolean;
strike: boolean;
underline: boolean;
};
children: Node;
}
link
node.tstype Link = {
type: "link";
unit: UnitBase & ({
page: string;
} | {
project: string;
page: string;
} | {
project: string;
});
children: Node;
};
quote
node.tstype Quote = {
type: "quote";
unit: UnitBase & {
tag: string;
};
children: Node;
};
code
node.tstype Code = {
type: "code";
unit: UnitBase;
children: PlainText;
};
indent
番号つきリストだと、行に対して numberList: {digit: number;};
が生える
node.tstype Indent = {
type: "indent";
unit: UnitBase & {
tag: string;
};
children: Node;
};
audio
node.tstype Audio = {
type: "audio";
unit: UnitBase;
fileId: string | undefined;
children: PlainText;
};
audio link
node.tstype AudioLink = {
type: "audioLink";
unit: UnitBase & {
link: string;
title: string;
};
fileId: string | undefined;
children: PlainText;
};
image
node.tstype Image = ImageBase & { type: "image"; };
type StrongImage = ImageBase & { type: "strongImage"; };
type ImageBase = {
unit: UnitBase;
fileId: string | undefined;
children: PlainText;
};
gyazo
node.tstype Gyazo = GyazoBase & { type: "gyazo"; };
type StrongGyazo = GyazoBase & { type: "strongGyazo"; };
type GyazoBase = {
unit: UnitBase;
children: PlainText;
};
image link
node.tstype ImageLink = ImageLinkBase & { type: "imageLink"; };
type StrongImageLink = ImageLinkBase & { type: "strongImageLink"; };
type ImageLinkBase = {
unit: UnitBase & {
image: string;
link: string;
};
children: PlainText;
};
gyazo link
node.tstype GyazoLink = GyazoLinkBase & { type: "gyazoLink"; };
type StrongGyazoLink = GyazoLinkBase & { type: "strongGyazoLink"; };
type GyazoLinkBase = {
unit: UnitBase & {
gyazo: string;
link: string;
};
children: PlainText;
};
icon
node.tstype Icon = IconBase & { type: "icon" };
type StrongIcon = IconBase & { type: "strong-icon" };
type IconBase = {
unit: UnitBase & {
project?: string;
page: string;
size: number;
};
children: PlainText;
};
formula
これが含まれている行は formulaLine: true
が生える
node.tstype Formula = {
type: "deco-formula";
unit: UnitBase & {
formula: string;
};
children: PlainText;
}
strong
node.tstype Formula = {
type: "strong";
unit: UnitBase;
children: Node;
}
url
node.tstype Url = {
type: "url";
unit: UnitBase;
fileId: string | undefined;
children: PlainText;
};
type UrlLink = {
type: "urlLink";
unit: UnitBase & {
link: string;
title?: string;
};
fileId: string | undefined;
children: PlainText;
};
youtube
node.tstype Youtube = {
type: "youtube";
unit: UnitBase & {
params: Record<string, string> & { t?: number; };
} & ({
videoId?: string;
} | {
listId?: string;
});
children: PlainText;
};
location
node.tstype Location = {
type: "location";
unit: UnitBase & {
latitude: number;
longitude: number;
zoom: number;
title?: string;
};
children: PlainText;
};