refactor: Use named exports instead of default exports (#2238)
* use named exports instead of default exports * fix tests Co-authored-by: Philipp Kühn <philippkuehn@MacBook-Pro-von-Philipp.local>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
import { RawCommands } from '../types'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TextSelection } from 'prosemirror-state'
|
||||
import { MarkType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import getMarkType from '../helpers/getMarkType'
|
||||
import getMarkRange from '../helpers/getMarkRange'
|
||||
import { getMarkType } from '../helpers/getMarkType'
|
||||
import { getMarkRange } from '../helpers/getMarkRange'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { RawCommands, FocusPosition } from '../types'
|
||||
import isTextSelection from '../helpers/isTextSelection'
|
||||
import isiOS from '../utilities/isiOS'
|
||||
import resolveFocusPosition from '../helpers/resolveFocusPosition'
|
||||
import { isTextSelection } from '../helpers/isTextSelection'
|
||||
import { isiOS } from '../utilities/isiOS'
|
||||
import { resolveFocusPosition } from '../helpers/resolveFocusPosition'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Fragment, Node as ProseMirrorNode, ParseOptions } from 'prosemirror-model'
|
||||
import createNodeFromContent from '../helpers/createNodeFromContent'
|
||||
import selectionToInsertionEnd from '../helpers/selectionToInsertionEnd'
|
||||
import { createNodeFromContent } from '../helpers/createNodeFromContent'
|
||||
import { selectionToInsertionEnd } from '../helpers/selectionToInsertionEnd'
|
||||
import {
|
||||
RawCommands,
|
||||
Content,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { lift as originalLift } from 'prosemirror-commands'
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import isNodeActive from '../helpers/isNodeActive'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { isNodeActive } from '../helpers/isNodeActive'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { liftListItem as originalLiftListItem } from 'prosemirror-schema-list'
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { NodeType, MarkType } from 'prosemirror-model'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import getMarkType from '../helpers/getMarkType'
|
||||
import getSchemaTypeNameByName from '../helpers/getSchemaTypeNameByName'
|
||||
import deleteProps from '../utilities/deleteProps'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
import { getMarkType } from '../helpers/getMarkType'
|
||||
import { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName'
|
||||
import { deleteProps } from '../utilities/deleteProps'
|
||||
import { RawCommands } from '../types'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TextSelection } from 'prosemirror-state'
|
||||
import { ParseOptions } from 'prosemirror-model'
|
||||
import createDocument from '../helpers/createDocument'
|
||||
import { createDocument } from '../helpers/createDocument'
|
||||
import { RawCommands, Content } from '../types'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { MarkType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import getMarkType from '../helpers/getMarkType'
|
||||
import getMarkAttributes from '../helpers/getMarkAttributes'
|
||||
import { getMarkType } from '../helpers/getMarkType'
|
||||
import { getMarkAttributes } from '../helpers/getMarkAttributes'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { setBlockType } from 'prosemirror-commands'
|
||||
import { RawCommands } from '../types'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Selection, NodeSelection } from 'prosemirror-state'
|
||||
import minMax from '../utilities/minMax'
|
||||
import { minMax } from '../utilities/minMax'
|
||||
import { RawCommands } from '../types'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Selection, TextSelection } from 'prosemirror-state'
|
||||
import minMax from '../utilities/minMax'
|
||||
import { minMax } from '../utilities/minMax'
|
||||
import { RawCommands, Range } from '../types'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { sinkListItem as originalSinkListItem } from 'prosemirror-schema-list'
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { canSplit } from 'prosemirror-transform'
|
||||
import { ContentMatch } from 'prosemirror-model'
|
||||
import { EditorState, NodeSelection, TextSelection } from 'prosemirror-state'
|
||||
import { RawCommands } from '../types'
|
||||
import getSplittedAttributes from '../helpers/getSplittedAttributes'
|
||||
import { getSplittedAttributes } from '../helpers/getSplittedAttributes'
|
||||
|
||||
function defaultBlockAt(match: ContentMatch) {
|
||||
for (let i = 0; i < match.edgeCount; i += 1) {
|
||||
|
||||
@@ -7,8 +7,8 @@ import {
|
||||
import { canSplit } from 'prosemirror-transform'
|
||||
import { TextSelection } from 'prosemirror-state'
|
||||
import { RawCommands } from '../types'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import getSplittedAttributes from '../helpers/getSplittedAttributes'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
import { getSplittedAttributes } from '../helpers/getSplittedAttributes'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import findParentNode from '../helpers/findParentNode'
|
||||
import isList from '../helpers/isList'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
import { findParentNode } from '../helpers/findParentNode'
|
||||
import { isList } from '../helpers/isList'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { MarkType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import getMarkType from '../helpers/getMarkType'
|
||||
import isMarkActive from '../helpers/isMarkActive'
|
||||
import { getMarkType } from '../helpers/getMarkType'
|
||||
import { isMarkActive } from '../helpers/isMarkActive'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import isNodeActive from '../helpers/isNodeActive'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { isNodeActive } from '../helpers/isNodeActive'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { wrapIn, lift } from 'prosemirror-commands'
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import isNodeActive from '../helpers/isNodeActive'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { isNodeActive } from '../helpers/isNodeActive'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { MarkType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import getMarkType from '../helpers/getMarkType'
|
||||
import getMarkRange from '../helpers/getMarkRange'
|
||||
import { getMarkType } from '../helpers/getMarkType'
|
||||
import { getMarkRange } from '../helpers/getMarkRange'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NodeType, MarkType } from 'prosemirror-model'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import getMarkType from '../helpers/getMarkType'
|
||||
import getSchemaTypeNameByName from '../helpers/getSchemaTypeNameByName'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
import { getMarkType } from '../helpers/getMarkType'
|
||||
import { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName'
|
||||
import { RawCommands } from '../types'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { wrapIn as originalWrapIn } from 'prosemirror-commands'
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import isNodeActive from '../helpers/isNodeActive'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { isNodeActive } from '../helpers/isNodeActive'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { wrapInList as originalWrapInList } from 'prosemirror-schema-list'
|
||||
import { NodeType } from 'prosemirror-model'
|
||||
import { RawCommands } from '../types'
|
||||
import getNodeType from '../helpers/getNodeType'
|
||||
import { getNodeType } from '../helpers/getNodeType'
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
|
||||
Reference in New Issue
Block a user