refactor: recreate extension exports

This commit is contained in:
Florian Wiech
2020-12-07 21:32:50 +01:00
parent 11de3a287f
commit 4142637921
62 changed files with 186 additions and 93 deletions

View File

@@ -9,7 +9,7 @@ export interface BlockquoteOptions {
export const inputRegex = /^\s*>\s$/gm export const inputRegex = /^\s*>\s$/gm
const Blockquote = Node.create({ export const Blockquote = Node.create({
name: 'blockquote', name: 'blockquote',
defaultOptions: <BlockquoteOptions>{ defaultOptions: <BlockquoteOptions>{
@@ -68,8 +68,6 @@ const Blockquote = Node.create({
}, },
}) })
export default Blockquote
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Blockquote: typeof Blockquote, Blockquote: typeof Blockquote,

View File

@@ -0,0 +1,5 @@
import { Blockquote } from './blockquote'
export * from './blockquote'
export default Blockquote

View File

@@ -17,7 +17,7 @@ export const starPasteRegex = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/gm
export const underscoreInputRegex = /(?:^|\s)((?:__)((?:[^__]+))(?:__))$/gm export const underscoreInputRegex = /(?:^|\s)((?:__)((?:[^__]+))(?:__))$/gm
export const underscorePasteRegex = /(?:^|\s)((?:__)((?:[^__]+))(?:__))/gm export const underscorePasteRegex = /(?:^|\s)((?:__)((?:[^__]+))(?:__))/gm
const Bold = Mark.create({ export const Bold = Mark.create({
name: 'bold', name: 'bold',
defaultOptions: <BoldOptions>{ defaultOptions: <BoldOptions>{
@@ -88,8 +88,6 @@ const Bold = Mark.create({
}, },
}) })
export default Bold
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Bold: typeof Bold, Bold: typeof Bold,

View File

@@ -0,0 +1,5 @@
import { Bold } from './bold'
export * from './bold'
export default Bold

View File

@@ -9,7 +9,7 @@ export interface BulletListOptions {
export const inputRegex = /^\s*([-+*])\s$/ export const inputRegex = /^\s*([-+*])\s$/
const BulletList = Node.create({ export const BulletList = Node.create({
name: 'bulletList', name: 'bulletList',
defaultOptions: <BulletListOptions>{ defaultOptions: <BulletListOptions>{
@@ -54,8 +54,6 @@ const BulletList = Node.create({
}, },
}) })
export default BulletList
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
BulletList: typeof BulletList, BulletList: typeof BulletList,

View File

@@ -0,0 +1,5 @@
import { BulletList } from './bullet-list'
export * from './bullet-list'
export default BulletList

View File

@@ -11,7 +11,7 @@ export interface CodeBlockOptions {
export const backtickInputRegex = /^```(?<language>[a-z]*)? $/ export const backtickInputRegex = /^```(?<language>[a-z]*)? $/
export const tildeInputRegex = /^~~~(?<language>[a-z]*)? $/ export const tildeInputRegex = /^~~~(?<language>[a-z]*)? $/
const CodeBlock = Node.create({ export const CodeBlock = Node.create({
name: 'codeBlock', name: 'codeBlock',
defaultOptions: <CodeBlockOptions>{ defaultOptions: <CodeBlockOptions>{
@@ -103,8 +103,6 @@ const CodeBlock = Node.create({
}, },
}) })
export default CodeBlock
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
CodeBlock: typeof CodeBlock, CodeBlock: typeof CodeBlock,

View File

@@ -0,0 +1,5 @@
import { CodeBlock } from './code-block'
export * from './code-block'
export default CodeBlock

View File

@@ -15,7 +15,7 @@ export interface CodeOptions {
export const inputRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))$/gm export const inputRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))$/gm
export const pasteRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))/gm export const pasteRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))/gm
const Code = Mark.create({ export const Code = Mark.create({
name: 'code', name: 'code',
defaultOptions: <CodeOptions>{ defaultOptions: <CodeOptions>{
@@ -76,8 +76,6 @@ const Code = Mark.create({
}, },
}) })
export default Code
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Code: typeof Code, Code: typeof Code,

View File

@@ -0,0 +1,5 @@
import { Code } from './code'
export * from './code'
export default Code

View File

@@ -17,7 +17,7 @@ const awarenessStatesToArray = (states: Map<number, { [key: string]: any }>) =>
}) })
} }
const CollaborationCursor = Extension.create({ export const CollaborationCursor = Extension.create({
name: 'collaborationCursor', name: 'collaborationCursor',
defaultOptions: <CollaborationCursorOptions>{ defaultOptions: <CollaborationCursorOptions>{
@@ -88,8 +88,6 @@ const CollaborationCursor = Extension.create({
}, },
}) })
export default CollaborationCursor
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
CollaborationCursor: typeof CollaborationCursor, CollaborationCursor: typeof CollaborationCursor,

View File

@@ -0,0 +1,5 @@
import { CollaborationCursor } from './collaboration-cursor'
export * from './collaboration-cursor'
export default CollaborationCursor

View File

@@ -10,7 +10,7 @@ export interface CollaborationOptions {
provider: any, provider: any,
} }
const Collaboration = Extension.create({ export const Collaboration = Extension.create({
name: 'collaboration', name: 'collaboration',
defaultOptions: <CollaborationOptions>{ defaultOptions: <CollaborationOptions>{
@@ -60,8 +60,6 @@ const Collaboration = Extension.create({
}, },
}) })
export default Collaboration
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Collaboration: typeof Collaboration, Collaboration: typeof Collaboration,

View File

@@ -0,0 +1,5 @@
import { Collaboration } from './collaboration'
export * from './collaboration'
export default Collaboration

View File

@@ -1,13 +1,11 @@
import { Node } from '@tiptap/core' import { Node } from '@tiptap/core'
const Document = Node.create({ export const Document = Node.create({
name: 'document', name: 'document',
topNode: true, topNode: true,
content: 'block+', content: 'block+',
}) })
export default Document
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Document: typeof Document, Document: typeof Document,

View File

@@ -0,0 +1,5 @@
import { Document } from './document'
export * from './document'
export default Document

View File

@@ -7,7 +7,7 @@ export interface DropcursorOptions {
class: string | null, class: string | null,
} }
const Dropcursor = Extension.create({ export const Dropcursor = Extension.create({
name: 'dropCursor', name: 'dropCursor',
defaultOptions: <DropcursorOptions>{ defaultOptions: <DropcursorOptions>{
@@ -23,8 +23,6 @@ const Dropcursor = Extension.create({
}, },
}) })
export default Dropcursor
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Dropcursor: typeof Dropcursor, Dropcursor: typeof Dropcursor,

View File

@@ -0,0 +1,5 @@
import { Dropcursor } from './dropcursor'
export * from './dropcursor'
export default Dropcursor

View File

@@ -7,7 +7,7 @@ export interface FocusOptions {
nested: boolean, nested: boolean,
} }
const FocusClasses = Extension.create({ export const FocusClasses = Extension.create({
name: 'focus', name: 'focus',
defaultOptions: <FocusOptions>{ defaultOptions: <FocusOptions>{
@@ -50,8 +50,6 @@ const FocusClasses = Extension.create({
}, },
}) })
export default FocusClasses
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
FocusClasses: typeof FocusClasses, FocusClasses: typeof FocusClasses,

View File

@@ -0,0 +1,5 @@
import { FocusClasses } from './focus'
export * from './focus'
export default FocusClasses

View File

@@ -5,7 +5,7 @@ type FontFamilyOptions = {
types: string[], types: string[],
} }
const FontFamily = Extension.create({ export const FontFamily = Extension.create({
name: 'fontFamily', name: 'fontFamily',
defaultOptions: <FontFamilyOptions>{ defaultOptions: <FontFamilyOptions>{
@@ -60,8 +60,6 @@ const FontFamily = Extension.create({
}, },
}) })
export default FontFamily
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
FontFamily: typeof FontFamily, FontFamily: typeof FontFamily,

View File

@@ -0,0 +1,5 @@
import { FontFamily } from './font-family'
export * from './font-family'
export default FontFamily

View File

@@ -1,7 +1,7 @@
import { Extension } from '@tiptap/core' import { Extension } from '@tiptap/core'
import { gapCursor } from 'prosemirror-gapcursor' import { gapCursor } from 'prosemirror-gapcursor'
const Gapcursor = Extension.create({ export const Gapcursor = Extension.create({
name: 'gapCursor', name: 'gapCursor',
addProseMirrorPlugins() { addProseMirrorPlugins() {
@@ -11,8 +11,6 @@ const Gapcursor = Extension.create({
}, },
}) })
export default Gapcursor
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Gapcursor: typeof Gapcursor, Gapcursor: typeof Gapcursor,

View File

@@ -0,0 +1,5 @@
import { Gapcursor } from './gapcursor'
export * from './gapcursor'
export default Gapcursor

View File

@@ -7,7 +7,7 @@ export interface HardBreakOptions {
}, },
} }
const HardBreak = Node.create({ export const HardBreak = Node.create({
name: 'hardBreak', name: 'hardBreak',
defaultOptions: <HardBreakOptions>{ defaultOptions: <HardBreakOptions>{
@@ -59,8 +59,6 @@ const HardBreak = Node.create({
}, },
}) })
export default HardBreak
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
HardBreak: typeof HardBreak, HardBreak: typeof HardBreak,

View File

@@ -0,0 +1,5 @@
import { HardBreak } from './hard-break'
export * from './hard-break'
export default HardBreak

View File

@@ -10,7 +10,7 @@ export interface HeadingOptions {
}, },
} }
const Heading = Node.create({ export const Heading = Node.create({
name: 'heading', name: 'heading',
defaultOptions: <HeadingOptions>{ defaultOptions: <HeadingOptions>{
@@ -91,8 +91,6 @@ const Heading = Node.create({
}, },
}) })
export default Heading
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Heading: typeof Heading, Heading: typeof Heading,

View File

@@ -0,0 +1,5 @@
import { Heading } from './heading'
export * from './heading'
export default Heading

View File

@@ -16,7 +16,7 @@ export interface HighlightOptions {
export const inputRegex = /(?:^|\s)((?:==)((?:[^~]+))(?:==))$/gm export const inputRegex = /(?:^|\s)((?:==)((?:[^~]+))(?:==))$/gm
export const pasteRegex = /(?:^|\s)((?:==)((?:[^~]+))(?:==))/gm export const pasteRegex = /(?:^|\s)((?:==)((?:[^~]+))(?:==))/gm
const Highlight = Mark.create({ export const Highlight = Mark.create({
name: 'highlight', name: 'highlight',
defaultOptions: <HighlightOptions>{ defaultOptions: <HighlightOptions>{
@@ -105,8 +105,6 @@ const Highlight = Mark.create({
}, },
}) })
export default Highlight
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Highlight: typeof Highlight, Highlight: typeof Highlight,

View File

@@ -0,0 +1,5 @@
import { Highlight } from './highlight'
export * from './highlight'
export default Highlight

View File

@@ -6,7 +6,7 @@ export interface HistoryOptions {
newGroupDelay: number, newGroupDelay: number,
} }
const History = Extension.create({ export const History = Extension.create({
name: 'history', name: 'history',
defaultOptions: <HistoryOptions>{ defaultOptions: <HistoryOptions>{
@@ -46,8 +46,6 @@ const History = Extension.create({
}, },
}) })
export default History
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
History: typeof History, History: typeof History,

View File

@@ -0,0 +1,5 @@
import { History } from './history'
export * from './history'
export default History

View File

@@ -11,7 +11,7 @@ export interface HorizontalRuleOptions {
}, },
} }
const HorizontalRule = Node.create({ export const HorizontalRule = Node.create({
name: 'horizontalRule', name: 'horizontalRule',
defaultOptions: <HorizontalRuleOptions>{ defaultOptions: <HorizontalRuleOptions>{
@@ -52,8 +52,6 @@ const HorizontalRule = Node.create({
}, },
}) })
export default HorizontalRule
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
HorizontalRule: typeof HorizontalRule, HorizontalRule: typeof HorizontalRule,

View File

@@ -0,0 +1,5 @@
import { HorizontalRule } from './horizontal-rule'
export * from './horizontal-rule'
export default HorizontalRule

View File

@@ -14,7 +14,7 @@ export interface ImageOptions {
export const inputRegex = /!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/ export const inputRegex = /!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/
const Image = Node.create({ export const Image = Node.create({
name: 'image', name: 'image',
defaultOptions: <ImageOptions>{ defaultOptions: <ImageOptions>{
@@ -87,8 +87,6 @@ const Image = Node.create({
}, },
}) })
export default Image
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Image: typeof Image, Image: typeof Image,

View File

@@ -0,0 +1,5 @@
import { Image } from './image'
export * from './image'
export default Image

View File

@@ -0,0 +1,5 @@
import { Italic } from './italic'
export * from './italic'
export default Italic

View File

@@ -17,7 +17,7 @@ export const starPasteRegex = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/gm
export const underscoreInputRegex = /(?:^|\s)((?:_)((?:[^_]+))(?:_))$/gm export const underscoreInputRegex = /(?:^|\s)((?:_)((?:[^_]+))(?:_))$/gm
export const underscorePasteRegex = /(?:^|\s)((?:_)((?:[^_]+))(?:_))/gm export const underscorePasteRegex = /(?:^|\s)((?:_)((?:[^_]+))(?:_))/gm
const Italic = Mark.create({ export const Italic = Mark.create({
name: 'italic', name: 'italic',
defaultOptions: <ItalicOptions>{ defaultOptions: <ItalicOptions>{
@@ -87,8 +87,6 @@ const Italic = Mark.create({
}, },
}) })
export default Italic
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Italic: typeof Italic, Italic: typeof Italic,

View File

@@ -0,0 +1,5 @@
import { Link } from './link'
export * from './link'
export default Link

View File

@@ -16,7 +16,7 @@ export interface LinkOptions {
export const pasteRegex = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi export const pasteRegex = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi
export const pasteRegexWithBrackets = /(?:\()https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/()]*)(?:\))/gi export const pasteRegexWithBrackets = /(?:\()https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/()]*)(?:\))/gi
const Link = Mark.create({ export const Link = Mark.create({
name: 'link', name: 'link',
inclusive: false, inclusive: false,
@@ -106,8 +106,6 @@ const Link = Mark.create({
}, },
}) })
export default Link
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Link: typeof Link, Link: typeof Link,

View File

@@ -0,0 +1,5 @@
import { ListItem } from './list-item'
export * from './list-item'
export default ListItem

View File

@@ -6,7 +6,7 @@ export interface ListItemOptions {
}, },
} }
const ListItem = Node.create({ export const ListItem = Node.create({
name: 'listItem', name: 'listItem',
defaultOptions: <ListItemOptions>{ defaultOptions: <ListItemOptions>{
@@ -38,8 +38,6 @@ const ListItem = Node.create({
}, },
}) })
export default ListItem
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
ListItem: typeof ListItem, ListItem: typeof ListItem,

View File

@@ -0,0 +1,5 @@
import { OrderedList } from './ordered-list'
export * from './ordered-list'
export default OrderedList

View File

@@ -9,7 +9,7 @@ export interface OrderedListOptions {
export const inputRegex = /^(\d+)\.\s$/ export const inputRegex = /^(\d+)\.\s$/
const OrderedList = Node.create({ export const OrderedList = Node.create({
name: 'orderedList', name: 'orderedList',
defaultOptions: <OrderedListOptions>{ defaultOptions: <OrderedListOptions>{
@@ -78,8 +78,6 @@ const OrderedList = Node.create({
}, },
}) })
export default OrderedList
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
OrderedList: typeof OrderedList, OrderedList: typeof OrderedList,

View File

@@ -0,0 +1,5 @@
import { Paragraph } from './paragraph'
export * from './paragraph'
export default Paragraph

View File

@@ -6,7 +6,7 @@ export interface ParagraphOptions {
}, },
} }
const Paragraph = Node.create({ export const Paragraph = Node.create({
name: 'paragraph', name: 'paragraph',
defaultOptions: <ParagraphOptions>{ defaultOptions: <ParagraphOptions>{
@@ -45,8 +45,6 @@ const Paragraph = Node.create({
}, },
}) })
export default Paragraph
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Paragraph: typeof Paragraph, Paragraph: typeof Paragraph,

View File

@@ -0,0 +1,5 @@
import { Strike } from './strike'
export * from './strike'
export default Strike

View File

@@ -15,7 +15,7 @@ export interface StrikeOptions {
export const inputRegex = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/gm export const inputRegex = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/gm
export const pasteRegex = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/gm export const pasteRegex = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/gm
const Strike = Mark.create({ export const Strike = Mark.create({
name: 'strike', name: 'strike',
defaultOptions: <StrikeOptions>{ defaultOptions: <StrikeOptions>{
@@ -85,8 +85,6 @@ const Strike = Mark.create({
}, },
}) })
export default Strike
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Strike: typeof Strike, Strike: typeof Strike,

View File

@@ -0,0 +1,5 @@
import { TaskItem } from './task-item'
export * from './task-item'
export default TaskItem

View File

@@ -10,7 +10,7 @@ export interface TaskItemOptions {
export const inputRegex = /^\s*(\[([ |x])\])\s$/ export const inputRegex = /^\s*(\[([ |x])\])\s$/
const TaskItem = Node.create({ export const TaskItem = Node.create({
name: 'taskItem', name: 'taskItem',
defaultOptions: <TaskItemOptions>{ defaultOptions: <TaskItemOptions>{
@@ -139,8 +139,6 @@ const TaskItem = Node.create({
}, },
}) })
export default TaskItem
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
TaskItem: typeof TaskItem, TaskItem: typeof TaskItem,

View File

@@ -0,0 +1,5 @@
import { TaskList } from './task-list'
export * from './task-list'
export default TaskList

View File

@@ -6,7 +6,7 @@ export interface TaskListOptions {
}, },
} }
const TaskList = Node.create({ export const TaskList = Node.create({
name: 'taskList', name: 'taskList',
defaultOptions: <TaskListOptions>{ defaultOptions: <TaskListOptions>{
@@ -48,8 +48,6 @@ const TaskList = Node.create({
}, },
}) })
export default TaskList
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
TaskList: typeof TaskList, TaskList: typeof TaskList,

View File

@@ -0,0 +1,5 @@
import { TextAlign } from './text-align'
export * from './text-align'
export default TextAlign

View File

@@ -6,7 +6,7 @@ type TextAlignOptions = {
defaultAlignment: string, defaultAlignment: string,
} }
const TextAlign = Extension.create({ export const TextAlign = Extension.create({
name: 'textAlign', name: 'textAlign',
defaultOptions: <TextAlignOptions>{ defaultOptions: <TextAlignOptions>{
@@ -71,8 +71,6 @@ const TextAlign = Extension.create({
}, },
}) })
export default TextAlign
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
TextAlign: typeof TextAlign, TextAlign: typeof TextAlign,

View File

@@ -0,0 +1,5 @@
import { TextStyle } from './text-style'
export * from './text-style'
export default TextStyle

View File

@@ -11,7 +11,7 @@ export interface TextStyleOptions {
}, },
} }
const TextStyle = Mark.create({ export const TextStyle = Mark.create({
name: 'textStyle', name: 'textStyle',
defaultOptions: <TextStyleOptions>{ defaultOptions: <TextStyleOptions>{
@@ -59,8 +59,6 @@ const TextStyle = Mark.create({
}) })
export default TextStyle
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
TextStyle: typeof TextStyle, TextStyle: typeof TextStyle,

View File

@@ -0,0 +1,5 @@
import { Text } from './text'
export * from './text'
export default Text

View File

@@ -1,12 +1,10 @@
import { Node } from '@tiptap/core' import { Node } from '@tiptap/core'
const Text = Node.create({ export const Text = Node.create({
name: 'text', name: 'text',
group: 'inline', group: 'inline',
}) })
export default Text
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Text: typeof Text, Text: typeof Text,

View File

@@ -0,0 +1,5 @@
import { Typography } from './typography'
export * from './typography'
export default Typography

View File

@@ -20,7 +20,7 @@ export const laquo = new InputRule(/<<$/, '«')
export const raquo = new InputRule(/>>$/, '»') export const raquo = new InputRule(/>>$/, '»')
export const multiplication = new InputRule(/\d+\s?([*x])\s?\d+$/, '×') export const multiplication = new InputRule(/\d+\s?([*x])\s?\d+$/, '×')
const Typography = Extension.create({ export const Typography = Extension.create({
name: 'typography', name: 'typography',
addInputRules() { addInputRules() {
@@ -45,8 +45,6 @@ const Typography = Extension.create({
}, },
}) })
export default Typography
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Typography: typeof Typography, Typography: typeof Typography,

View File

@@ -0,0 +1,5 @@
import { Underline } from './underline'
export * from './underline'
export default Underline

View File

@@ -6,7 +6,7 @@ export interface UnderlineOptions {
}, },
} }
const Underline = Mark.create({ export const Underline = Mark.create({
name: 'underline', name: 'underline',
defaultOptions: <UnderlineOptions>{ defaultOptions: <UnderlineOptions>{
@@ -58,8 +58,6 @@ const Underline = Mark.create({
}, },
}) })
export default Underline
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface AllExtensions { interface AllExtensions {
Underline: typeof Underline, Underline: typeof Underline,