generated at
scrapbox.Page.lines
scrapboxのページの構文解析情報が入っているobject

構造はまだ誰も調べていなさそうなので、ここで調べてscrapbox-jp/typesに載せておく
一部分まで調べてある
ありがたいtakker

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