-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add annotations to GDocs paste buffers (#65)
- Loading branch information
Showing
29 changed files
with
274 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { InlineAnnotation } from '@atjson/document'; | ||
|
||
export default class Bold extends InlineAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'ts_bd'; // Text style: bold | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/@atjson/source-gdocs-paste/src/annotations/heading.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { BlockAnnotation } from '@atjson/document'; | ||
|
||
export default class Heading extends BlockAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'ps_hd'; | ||
attributes!: { | ||
level: 1 | 2 | 3 | 4 | 5 | 6 | 100 | 101; | ||
}; | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/@atjson/source-gdocs-paste/src/annotations/horizontal-rule.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ObjectAnnotation } from '@atjson/document'; | ||
|
||
export default class HorizontalRule extends ObjectAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'horizontal_rule'; | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/@atjson/source-gdocs-paste/src/annotations/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export { default as Bold } from './bold'; | ||
export { default as Heading } from './heading'; | ||
export { default as HorizontalRule } from './horizontal-rule'; | ||
export { default as Italic } from './italic'; | ||
export { default as Link } from './link'; | ||
export { default as ListItem } from './list-item'; | ||
export { default as List } from './list'; | ||
export { default as Strikethrough } from './strikethrough'; | ||
export { default as Underline } from './underline'; | ||
export { default as VerticalAdjust } from './vertical-adjust'; |
6 changes: 6 additions & 0 deletions
6
packages/@atjson/source-gdocs-paste/src/annotations/italic.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { InlineAnnotation } from '@atjson/document'; | ||
|
||
export default class Italic extends InlineAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'ts_it'; // Text style: italic | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/@atjson/source-gdocs-paste/src/annotations/link.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { InlineAnnotation } from '@atjson/document'; | ||
|
||
export default class Link extends InlineAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'lnks_link'; | ||
attributes!: { | ||
ulnk_url: string; | ||
lnk_type: number; | ||
}; | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/@atjson/source-gdocs-paste/src/annotations/list-item.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { BlockAnnotation } from '@atjson/document'; | ||
|
||
export default class ListItem extends BlockAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'list_item'; | ||
attributes!: { | ||
ls_id: string; | ||
ls_nest: number; | ||
}; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/@atjson/source-gdocs-paste/src/annotations/list.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { BlockAnnotation } from '@atjson/document'; | ||
|
||
export default class List extends BlockAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'list'; | ||
attributes!: { | ||
ls_id: string; | ||
ls_b_gs: string; | ||
ls_b_gt: number; | ||
ls_b_a: number; | ||
}; | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/@atjson/source-gdocs-paste/src/annotations/strikethrough.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { InlineAnnotation } from '@atjson/document'; | ||
|
||
export default class Strikethrough extends InlineAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'ts_st'; // Text style: strikethrough | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/@atjson/source-gdocs-paste/src/annotations/underline.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { InlineAnnotation } from '@atjson/document'; | ||
|
||
export default class Underline extends InlineAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'ts_un'; // Text style: underline | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/@atjson/source-gdocs-paste/src/annotations/vertical-adjust.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { InlineAnnotation } from '@atjson/document'; | ||
|
||
export default class VerticalAdjust extends InlineAnnotation { | ||
static vendorPrefix = 'gdocs'; | ||
static type = 'ts_va'; // Text style: underline | ||
attributes!: { | ||
va: 'sub' | 'sup'; // Vertical adjust: subscript / superscript | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.