File tree Expand file tree Collapse file tree 4 files changed +60
-60
lines changed Expand file tree Collapse file tree 4 files changed +60
-60
lines changed Original file line number Diff line number Diff line change 11import { Omit } from "./utils.ts" ;
2- export * from "./line.ts" ;
2+ export * from "./userscript/blocks.ts" ;
3+ export * from "./userscript/nodes.ts" ;
34
45/** scrapboxの行のメタデータ */
56export interface Line {
@@ -196,5 +197,3 @@ export type ProjectBackupWithMetadata = {
196197 lines : { text : string ; updated : number ; created : number } [ ] ;
197198 } ;
198199} ;
199-
200-
Original file line number Diff line number Diff line change 1- import { ParsedLine } from "./line .ts" ;
1+ import { ParsedLine } from "./userscript/blocks .ts" ;
22
33export type Layout =
44 | "list"
Original file line number Diff line number Diff line change 1+ import { Node , NodeWithoutIndent } from "./nodes.ts" ;
2+
3+ export type ParsedLine =
4+ & {
5+ text : string ;
6+ id : string ;
7+ userId : string ;
8+ updated : number ;
9+ created : number ;
10+ section : {
11+ number : number ;
12+ start : boolean ;
13+ end : boolean ;
14+ } ;
15+ }
16+ & ( {
17+ title ?: boolean ;
18+ } | {
19+ codeBlock : CodeBlock ;
20+ } | {
21+ tableBlock : TableBlock ;
22+ } | {
23+ helpfeel : Helpfeel ;
24+ } | {
25+ cli : Cli ;
26+ } | {
27+ formulaLine ?: true ;
28+ nodes : NodeWithoutIndent [ ] ;
29+ } | {
30+ numberList ?: { digit : number } ;
31+ formulaLine ?: true ;
32+ nodes : Node [ ] ;
33+ } ) ;
34+
35+ export type CodeBlock = {
36+ lang : string ;
37+ filename ?: string ;
38+ indent : number ;
39+ start : boolean ;
40+ end : boolean ;
41+ } ;
42+ export type TableBlock = {
43+ title : string ;
44+ cells : string [ ] ;
45+ indent : number ;
46+ start : boolean ;
47+ end : boolean ;
48+ } ;
49+ export type Helpfeel = {
50+ prefix : "?" ;
51+ entry : string ;
52+ } ;
53+ export type Cli = {
54+ prefix : "$" | "%" ;
55+ command : string ;
56+ } ;
Original file line number Diff line number Diff line change 1- export type ParsedLine =
2- & {
3- text : string ;
4- id : string ;
5- userId : string ;
6- updated : number ;
7- created : number ;
8- section : {
9- number : number ;
10- start : boolean ;
11- end : boolean ;
12- } ;
13- }
14- & ( {
15- title ?: boolean ;
16- } | {
17- codeBlock : CodeBlock ;
18- } | {
19- tableBlock : TableBlock ;
20- } | {
21- helpfeel : Helpfeel ;
22- } | {
23- cli : Cli ;
24- } | {
25- formulaLine ?: true ;
26- nodes : NodeWithoutIndent [ ] ;
27- } | {
28- numberList ?: { digit : number } ;
29- formulaLine ?: true ;
30- nodes : Node [ ] ;
31- } ) ;
32-
33- export type CodeBlock = {
34- lang : string ;
35- filename ?: string ;
36- indent : number ;
37- start : boolean ;
38- end : boolean ;
39- } ;
40- export type TableBlock = {
41- title : string ;
42- cells : string [ ] ;
43- indent : number ;
44- start : boolean ;
45- end : boolean ;
46- } ;
47- export type Helpfeel = {
48- prefix : "?" ;
49- entry : string ;
50- } ;
51- export type Cli = {
52- prefix : "$" | "%" ;
53- command : string ;
54- } ;
55-
561type NodeBase =
572 | PlainText
583 | Blank
@@ -79,7 +24,7 @@ type NodeBase =
7924 | UrlLink
8025 | Youtube
8126 | GoogleMap ;
82- type NodeWithoutIndent = NodeBase | Formula ;
27+ export type NodeWithoutIndent = NodeBase | Formula ;
8328export type Node = NodeWithoutIndent | Indent ;
8429type UnitBase = {
8530 content : string ;
You can’t perform that action at this time.
0 commit comments