Require file extensions for imports and exports (#4001)

* Require .js endings

* add extension alias for cypress to resolve ts files with js endings
This commit is contained in:
Ben Asher 2023-06-30 12:03:49 -07:00 committed by GitHub
parent 75f0418f03
commit e97630c639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
238 changed files with 690 additions and 673 deletions

View File

@ -43,7 +43,21 @@ module.exports = {
'no-console': ['warn', { allow: ['warn', 'error'] }], 'no-console': ['warn', { allow: ['warn', 'error'] }],
semi: ['error', 'never'], semi: ['error', 'never'],
'import/order': 'off', 'import/order': 'off',
'import/extensions': 'off', 'import/extensions': ['error', 'ignorePackages'],
'no-restricted-imports': ['error',
{
paths: [
{
name: '..',
message: 'Import from ../index.js instead.',
},
{
name: '.',
message: 'Import from ./index.js instead.',
},
],
},
],
'import/no-extraneous-dependencies': 'off', 'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off', 'import/no-unresolved': 'off',
'import/no-dynamic-require': 'off', 'import/no-dynamic-require': 'off',

View File

@ -8,7 +8,7 @@
// otherwise the `onig.wasm` file is missing in the dist folder // otherwise the `onig.wasm` file is missing in the dist folder
import 'shiki/dist/onig.wasm?url' import 'shiki/dist/onig.wasm?url'
import Worker from './shiki.worker?worker' import Worker from './shiki.worker.js?worker'
export default { export default {
props: { props: {

View File

@ -1,7 +1,7 @@
import 'iframe-resizer/js/iframeResizer.contentWindow' import 'iframe-resizer/js/iframeResizer.contentWindow'
import './style.scss' import './style.scss'
import { debug } from './helper' import { debug } from './helper.js'
export default function init(name: string, source: any) { export default function init(name: string, source: any) {
// @ts-ignore // @ts-ignore

View File

@ -4,7 +4,7 @@ import './style.scss'
import React from 'react' import React from 'react'
import { createRoot } from 'react-dom/client' import { createRoot } from 'react-dom/client'
import { debug, splitName } from './helper' import { debug, splitName } from './helper.js'
export default function init(name: string, source: any) { export default function init(name: string, source: any) {
// @ts-ignore // @ts-ignore

View File

@ -1,7 +1,7 @@
import 'iframe-resizer/js/iframeResizer.contentWindow' import 'iframe-resizer/js/iframeResizer.contentWindow'
import './style.scss' import './style.scss'
import { debug, splitName } from './helper' import { debug, splitName } from './helper.js'
export default function init(name: string, source: any) { export default function init(name: string, source: any) {
// @ts-ignore // @ts-ignore

View File

@ -3,7 +3,7 @@ import './style.scss'
import { createApp } from 'vue' import { createApp } from 'vue'
import { debug, splitName } from './helper' import { debug, splitName } from './helper.js'
export default function init(name: string, source: any) { export default function init(name: string, source: any) {
// @ts-ignore // @ts-ignore

View File

@ -17,7 +17,7 @@ import html from 'highlight.js/lib/languages/xml'
import { lowlight } from 'lowlight' import { lowlight } from 'lowlight'
import React from 'react' import React from 'react'
import CodeBlockComponent from './CodeBlockComponent' import CodeBlockComponent from './CodeBlockComponent.jsx'
lowlight.registerLanguage('html', html) lowlight.registerLanguage('html', html)
lowlight.registerLanguage('css', css) lowlight.registerLanguage('css', css)

View File

@ -2,7 +2,7 @@ import './MenuBar.scss'
import React, { Fragment } from 'react' import React, { Fragment } from 'react'
import MenuItem from './MenuItem' import MenuItem from './MenuItem.jsx'
export default ({ editor }) => { export default ({ editor }) => {
const items = [ const items = [

View File

@ -15,8 +15,8 @@ import React, {
} from 'react' } from 'react'
import * as Y from 'yjs' import * as Y from 'yjs'
import { variables } from '../../../variables' import { variables } from '../../../variables.js'
import MenuBar from './MenuBar' import MenuBar from './MenuBar.jsx'
const colors = ['#958DF1', '#F98181', '#FBBC88', '#FAF594', '#70CFF8', '#94FADB', '#B9F18D'] const colors = ['#958DF1', '#F98181', '#FBBC88', '#FAF594', '#70CFF8', '#94FADB', '#B9F18D']
const names = [ const names = [

View File

@ -32,7 +32,7 @@ import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import * as Y from 'yjs' import * as Y from 'yjs'
import { variables } from '../../../variables' import { variables } from '../../../variables.js'
import MenuBar from './MenuBar.vue' import MenuBar from './MenuBar.vue'
const getRandomElement = list => { const getRandomElement = list => {

View File

@ -8,7 +8,7 @@ import Text from '@tiptap/extension-text'
import { EditorContent, useEditor } from '@tiptap/react' import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react' import React from 'react'
import suggestion from './suggestion' import suggestion from './suggestion.js'
export default () => { export default () => {
const limit = 280 const limit = 280

View File

@ -1,7 +1,7 @@
import { ReactRenderer } from '@tiptap/react' import { ReactRenderer } from '@tiptap/react'
import tippy from 'tippy.js' import tippy from 'tippy.js'
import { MentionList } from './MentionList' import { MentionList } from './MentionList.jsx'
export default { export default {
items: ({ query }) => { items: ({ query }) => {

View File

@ -44,7 +44,7 @@ import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text' import Text from '@tiptap/extension-text'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import suggestion from './suggestion' import suggestion from './suggestion.js'
export default { export default {
components: { components: {

View File

@ -7,7 +7,7 @@ import Document from '@tiptap/extension-document'
import Text from '@tiptap/extension-text' import Text from '@tiptap/extension-text'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import Paper from './Paper' import Paper from './Paper.js'
export default { export default {
components: { components: {

View File

@ -1,7 +1,7 @@
import { Extension } from '@tiptap/core' import { Extension } from '@tiptap/core'
import { Plugin } from '@tiptap/pm/state' import { Plugin } from '@tiptap/pm/state'
import findColors from './findColors' import findColors from './findColors.js'
export const ColorHighlighter = Extension.create({ export const ColorHighlighter = Extension.create({
name: 'colorHighlighter', name: 'colorHighlighter',

View File

@ -8,8 +8,8 @@ import Typography from '@tiptap/extension-typography'
import { EditorContent, useEditor } from '@tiptap/react' import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react' import React from 'react'
import { ColorHighlighter } from './ColorHighlighter' import { ColorHighlighter } from './ColorHighlighter.ts'
import { SmilieReplacer } from './SmilieReplacer' import { SmilieReplacer } from './SmilieReplacer.ts'
export default () => { export default () => {
const editor = useEditor({ const editor = useEditor({

View File

@ -1,7 +1,7 @@
import { Extension } from '@tiptap/core' import { Extension } from '@tiptap/core'
import { Plugin } from '@tiptap/pm/state' import { Plugin } from '@tiptap/pm/state'
import findColors from './findColors' import findColors from './findColors.js'
export const ColorHighlighter = Extension.create({ export const ColorHighlighter = Extension.create({
name: 'colorHighlighter', name: 'colorHighlighter',

View File

@ -10,8 +10,8 @@ import Text from '@tiptap/extension-text'
import Typography from '@tiptap/extension-typography' import Typography from '@tiptap/extension-typography'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import { ColorHighlighter } from './ColorHighlighter' import { ColorHighlighter } from './ColorHighlighter.ts'
import { SmilieReplacer } from './SmilieReplacer' import { SmilieReplacer } from './SmilieReplacer.ts'
export default { export default {
components: { components: {

View File

@ -1,7 +1,7 @@
import { Plugin, PluginKey } from '@tiptap/pm/state' import { Plugin, PluginKey } from '@tiptap/pm/state'
import * as Y from 'yjs' import * as Y from 'yjs'
import { AnnotationState } from './AnnotationState' import { AnnotationState } from './AnnotationState.js'
export const AnnotationPluginKey = new PluginKey('annotation') export const AnnotationPluginKey = new PluginKey('annotation')

View File

@ -7,13 +7,13 @@ import {
} from 'y-prosemirror' } from 'y-prosemirror'
import * as Y from 'yjs' import * as Y from 'yjs'
import { AnnotationItem } from './AnnotationItem' import { AnnotationItem } from './AnnotationItem.js'
import { AnnotationPluginKey } from './AnnotationPlugin' import { AnnotationPluginKey } from './AnnotationPlugin.js'
import { import {
AddAnnotationAction, AddAnnotationAction,
DeleteAnnotationAction, DeleteAnnotationAction,
UpdateAnnotationAction, UpdateAnnotationAction,
} from './collaboration-annotation' } from './collaboration-annotation.js'
export interface AnnotationStateOptions { export interface AnnotationStateOptions {
HTMLAttributes: { HTMLAttributes: {

View File

@ -1,7 +1,7 @@
import { Extension } from '@tiptap/core' import { Extension } from '@tiptap/core'
import * as Y from 'yjs' import * as Y from 'yjs'
import { AnnotationPlugin, AnnotationPluginKey } from './AnnotationPlugin' import { AnnotationPlugin, AnnotationPluginKey } from './AnnotationPlugin.js'
export interface AddAnnotationAction { export interface AddAnnotationAction {
type: 'addAnnotation', type: 'addAnnotation',

View File

@ -1,5 +1,5 @@
import { CollaborationAnnotation } from './collaboration-annotation' import { CollaborationAnnotation } from './collaboration-annotation.js'
export * from './collaboration-annotation' export * from './collaboration-annotation.js'
export default CollaborationAnnotation export default CollaborationAnnotation

View File

@ -41,7 +41,7 @@ import Text from '@tiptap/extension-text'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import * as Y from 'yjs' import * as Y from 'yjs'
import CollaborationAnnotation from './extension' import CollaborationAnnotation from './extension/index.ts'
export default { export default {
components: { components: {

View File

@ -8,8 +8,8 @@
import StarterKit from '@tiptap/starter-kit' import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import Commands from './commands' import Commands from './commands.js'
import suggestion from './suggestion' import suggestion from './suggestion.js'
export default { export default {
components: { components: {

View File

@ -12,7 +12,7 @@
import StarterKit from '@tiptap/starter-kit' import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import Iframe from './iframe' import Iframe from './iframe.ts'
export default { export default {
components: { components: {

View File

@ -6,7 +6,7 @@ import Text from '@tiptap/extension-text'
import { EditorContent, useEditor } from '@tiptap/react' import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react' import React from 'react'
import { CustomExtension } from './CustomExtension' import { CustomExtension } from './CustomExtension.ts'
export default () => { export default () => {
const editor = useEditor({ const editor = useEditor({

View File

@ -9,7 +9,7 @@ import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text' import Text from '@tiptap/extension-text'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import { CustomExtension } from './CustomExtension' import { CustomExtension } from './CustomExtension.ts'
export default { export default {
components: { components: {

View File

@ -27,7 +27,7 @@ import Image from '@tiptap/extension-image'
import StarterKit from '@tiptap/starter-kit' import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import { Figure } from './figure' import { Figure } from './figure.ts'
export default { export default {
components: { components: {

View File

@ -25,8 +25,8 @@ import TableRow from '@tiptap/extension-table-row'
import StarterKit from '@tiptap/starter-kit' import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import { Figcaption } from './figcaption' import { Figcaption } from './figcaption.ts'
import { Figure } from './figure' import { Figure } from './figure.ts'
const ImageFigure = Figure.extend({ const ImageFigure = Figure.extend({
name: 'capturedImage', name: 'capturedImage',

View File

@ -6,7 +6,7 @@ import TextStyle from '@tiptap/extension-text-style'
import { EditorContent, Node, useEditor } from '@tiptap/react' import { EditorContent, Node, useEditor } from '@tiptap/react'
import React from 'react' import React from 'react'
import { content } from '../content' import { content } from '../content.ts'
const WrapperBlock = Node.create({ const WrapperBlock = Node.create({
name: 'wrapperBlock', name: 'wrapperBlock',

View File

@ -3,7 +3,7 @@ import { Node as ProsemirrorNode } from '@tiptap/pm/model'
import { Plugin, PluginKey, TextSelection } from '@tiptap/pm/state' import { Plugin, PluginKey, TextSelection } from '@tiptap/pm/state'
import { Decoration, DecorationSet } from '@tiptap/pm/view' import { Decoration, DecorationSet } from '@tiptap/pm/view'
import LinterPlugin, { Result as Issue } from './LinterPlugin' import LinterPlugin, { Result as Issue } from './LinterPlugin.js'
interface IconDivElement extends HTMLDivElement { interface IconDivElement extends HTMLDivElement {
issue?: Issue issue?: Issue

View File

@ -1,8 +1,8 @@
import { Linter } from './Linter' import { Linter } from './Linter.js'
export * from './Linter' export * from './Linter.js'
export default Linter export default Linter
export { BadWords } from './plugins/BadWords' export { BadWords } from './plugins/BadWords.js'
export { HeadingLevel } from './plugins/HeadingLevel' export { HeadingLevel } from './plugins/HeadingLevel.js'
export { Punctuation } from './plugins/Punctuation' export { Punctuation } from './plugins/Punctuation.js'

View File

@ -1,4 +1,4 @@
import LinterPlugin from '../LinterPlugin' import LinterPlugin from '../LinterPlugin.js'
export class BadWords extends LinterPlugin { export class BadWords extends LinterPlugin {

View File

@ -1,6 +1,6 @@
import { EditorView } from '@tiptap/pm/view' import { EditorView } from '@tiptap/pm/view'
import LinterPlugin, { Result as Issue } from '../LinterPlugin' import LinterPlugin, { Result as Issue } from '../LinterPlugin.js'
export class HeadingLevel extends LinterPlugin { export class HeadingLevel extends LinterPlugin {
fixHeader(level: number) { fixHeader(level: number) {

View File

@ -1,6 +1,6 @@
import { EditorView } from '@tiptap/pm/view' import { EditorView } from '@tiptap/pm/view'
import LinterPlugin, { Result as Issue } from '../LinterPlugin' import LinterPlugin, { Result as Issue } from '../LinterPlugin.js'
export class Punctuation extends LinterPlugin { export class Punctuation extends LinterPlugin {
public regex = / ([,.!?:]) ?/g public regex = / ([,.!?:]) ?/g

View File

@ -11,7 +11,7 @@ import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text' import Text from '@tiptap/extension-text'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import Linter, { BadWords, HeadingLevel, Punctuation } from './extension' import Linter, { BadWords, HeadingLevel, Punctuation } from './extension/index.ts'
export default { export default {
components: { components: {

View File

@ -8,7 +8,7 @@
import StarterKit from '@tiptap/starter-kit' import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import { TrailingNode } from './trailing-node' import { TrailingNode } from './trailing-node.ts'
export default { export default {
components: { components: {

View File

@ -5,7 +5,7 @@ import { EditorContent, useEditor } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit' import StarterKit from '@tiptap/starter-kit'
import React from 'react' import React from 'react'
import suggestion from './suggestion' import suggestion from './suggestion.js'
export default () => { export default () => {
const editor = useEditor({ const editor = useEditor({

View File

@ -9,7 +9,7 @@ import Mention from '@tiptap/extension-mention'
import StarterKit from '@tiptap/starter-kit' import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3' import { Editor, EditorContent } from '@tiptap/vue-3'
import suggestion from './suggestion' import suggestion from './suggestion.js'
export default { export default {
components: { components: {

View File

@ -1,10 +1,10 @@
import { EditorState, Transaction } from '@tiptap/pm/state' import { EditorState, Transaction } from '@tiptap/pm/state'
import { Editor } from './Editor' import { Editor } from './Editor.js'
import { createChainableState } from './helpers/createChainableState' import { createChainableState } from './helpers/createChainableState.js'
import { import {
AnyCommands, CanCommands, ChainedCommands, CommandProps, SingleCommands, AnyCommands, CanCommands, ChainedCommands, CommandProps, SingleCommands,
} from './types' } from './types.js'
export class CommandManager { export class CommandManager {
editor: Editor editor: Editor

View File

@ -4,19 +4,19 @@ import {
} from '@tiptap/pm/state' } from '@tiptap/pm/state'
import { EditorView } from '@tiptap/pm/view' import { EditorView } from '@tiptap/pm/view'
import { CommandManager } from './CommandManager' import { CommandManager } from './CommandManager.js'
import { EventEmitter } from './EventEmitter' import { EventEmitter } from './EventEmitter.js'
import { ExtensionManager } from './ExtensionManager' import { ExtensionManager } from './ExtensionManager.js'
import * as extensions from './extensions' import * as extensions from './extensions/index.js'
import { createDocument } from './helpers/createDocument' import { createDocument } from './helpers/createDocument.js'
import { getAttributes } from './helpers/getAttributes' import { getAttributes } from './helpers/getAttributes.js'
import { getHTMLFromFragment } from './helpers/getHTMLFromFragment' import { getHTMLFromFragment } from './helpers/getHTMLFromFragment.js'
import { getText } from './helpers/getText' import { getText } from './helpers/getText.js'
import { getTextSerializersFromSchema } from './helpers/getTextSerializersFromSchema' import { getTextSerializersFromSchema } from './helpers/getTextSerializersFromSchema.js'
import { isActive } from './helpers/isActive' import { isActive } from './helpers/isActive.js'
import { isNodeEmpty } from './helpers/isNodeEmpty' import { isNodeEmpty } from './helpers/isNodeEmpty.js'
import { resolveFocusPosition } from './helpers/resolveFocusPosition' import { resolveFocusPosition } from './helpers/resolveFocusPosition.js'
import { style } from './style' import { style } from './style.js'
import { import {
CanCommands, CanCommands,
ChainedCommands, ChainedCommands,
@ -25,9 +25,9 @@ import {
JSONContent, JSONContent,
SingleCommands, SingleCommands,
TextSerializer, TextSerializer,
} from './types' } from './types.js'
import { createStyleTag } from './utilities/createStyleTag' import { createStyleTag } from './utilities/createStyleTag.js'
import { isFunction } from './utilities/isFunction' import { isFunction } from './utilities/isFunction.js'
export { extensions } export { extensions }

View File

@ -1,12 +1,12 @@
import { Plugin, Transaction } from '@tiptap/pm/state' import { Plugin, Transaction } from '@tiptap/pm/state'
import { ExtensionConfig } from '.' import { Editor } from './Editor.js'
import { Editor } from './Editor' import { getExtensionField } from './helpers/getExtensionField.js'
import { getExtensionField } from './helpers/getExtensionField' import { ExtensionConfig } from './index.js'
import { InputRule } from './InputRule' import { InputRule } from './InputRule.js'
import { Mark } from './Mark' import { Mark } from './Mark.js'
import { Node } from './Node' import { Node } from './Node.js'
import { PasteRule } from './PasteRule' import { PasteRule } from './PasteRule.js'
import { import {
AnyConfig, AnyConfig,
Extensions, Extensions,
@ -14,9 +14,9 @@ import {
KeyboardShortcutCommand, KeyboardShortcutCommand,
ParentConfig, ParentConfig,
RawCommands, RawCommands,
} from './types' } from './types.js'
import { callOrReturn } from './utilities/callOrReturn' import { callOrReturn } from './utilities/callOrReturn.js'
import { mergeDeep } from './utilities/mergeDeep' import { mergeDeep } from './utilities/mergeDeep.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface ExtensionConfig<Options = any, Storage = any> { interface ExtensionConfig<Options = any, Storage = any> {

View File

@ -3,21 +3,21 @@ import { Node as ProsemirrorNode, Schema } from '@tiptap/pm/model'
import { Plugin } from '@tiptap/pm/state' import { Plugin } from '@tiptap/pm/state'
import { Decoration, EditorView } from '@tiptap/pm/view' import { Decoration, EditorView } from '@tiptap/pm/view'
import { Mark, NodeConfig } from '.' import { Editor } from './Editor.js'
import { Editor } from './Editor' import { getAttributesFromExtensions } from './helpers/getAttributesFromExtensions.js'
import { getAttributesFromExtensions } from './helpers/getAttributesFromExtensions' import { getExtensionField } from './helpers/getExtensionField.js'
import { getExtensionField } from './helpers/getExtensionField' import { getNodeType } from './helpers/getNodeType.js'
import { getNodeType } from './helpers/getNodeType' import { getRenderedAttributes } from './helpers/getRenderedAttributes.js'
import { getRenderedAttributes } from './helpers/getRenderedAttributes' import { getSchemaByResolvedExtensions } from './helpers/getSchemaByResolvedExtensions.js'
import { getSchemaByResolvedExtensions } from './helpers/getSchemaByResolvedExtensions' import { getSchemaTypeByName } from './helpers/getSchemaTypeByName.js'
import { getSchemaTypeByName } from './helpers/getSchemaTypeByName' import { isExtensionRulesEnabled } from './helpers/isExtensionRulesEnabled.js'
import { isExtensionRulesEnabled } from './helpers/isExtensionRulesEnabled' import { splitExtensions } from './helpers/splitExtensions.js'
import { splitExtensions } from './helpers/splitExtensions' import { Mark, NodeConfig } from './index.js'
import { inputRulesPlugin } from './InputRule' import { inputRulesPlugin } from './InputRule.js'
import { pasteRulesPlugin } from './PasteRule' import { pasteRulesPlugin } from './PasteRule.js'
import { AnyConfig, Extensions, RawCommands } from './types' import { AnyConfig, Extensions, RawCommands } from './types.js'
import { callOrReturn } from './utilities/callOrReturn' import { callOrReturn } from './utilities/callOrReturn.js'
import { findDuplicates } from './utilities/findDuplicates' import { findDuplicates } from './utilities/findDuplicates.js'
export class ExtensionManager { export class ExtensionManager {
editor: Editor editor: Editor

View File

@ -1,17 +1,17 @@
import { EditorState, Plugin, TextSelection } from '@tiptap/pm/state' import { EditorState, Plugin, TextSelection } from '@tiptap/pm/state'
import { CommandManager } from './CommandManager' import { CommandManager } from './CommandManager.js'
import { Editor } from './Editor' import { Editor } from './Editor.js'
import { createChainableState } from './helpers/createChainableState' import { createChainableState } from './helpers/createChainableState.js'
import { getTextContentFromNodes } from './helpers/getTextContentFromNodes' import { getTextContentFromNodes } from './helpers/getTextContentFromNodes.js'
import { import {
CanCommands, CanCommands,
ChainedCommands, ChainedCommands,
ExtendedRegExpMatchArray, ExtendedRegExpMatchArray,
Range, Range,
SingleCommands, SingleCommands,
} from './types' } from './types.js'
import { isRegExp } from './utilities/isRegExp' import { isRegExp } from './utilities/isRegExp.js'
export type InputRuleMatch = { export type InputRuleMatch = {
index: number index: number

View File

@ -3,12 +3,12 @@ import {
} from '@tiptap/pm/model' } from '@tiptap/pm/model'
import { Plugin, Transaction } from '@tiptap/pm/state' import { Plugin, Transaction } from '@tiptap/pm/state'
import { MarkConfig } from '.' import { Editor } from './Editor.js'
import { Editor } from './Editor' import { getExtensionField } from './helpers/getExtensionField.js'
import { getExtensionField } from './helpers/getExtensionField' import { MarkConfig } from './index.js'
import { InputRule } from './InputRule' import { InputRule } from './InputRule.js'
import { Node } from './Node' import { Node } from './Node.js'
import { PasteRule } from './PasteRule' import { PasteRule } from './PasteRule.js'
import { import {
AnyConfig, AnyConfig,
Attributes, Attributes,
@ -17,9 +17,9 @@ import {
KeyboardShortcutCommand, KeyboardShortcutCommand,
ParentConfig, ParentConfig,
RawCommands, RawCommands,
} from './types' } from './types.js'
import { callOrReturn } from './utilities/callOrReturn' import { callOrReturn } from './utilities/callOrReturn.js'
import { mergeDeep } from './utilities/mergeDeep' import { mergeDeep } from './utilities/mergeDeep.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
export interface MarkConfig<Options = any, Storage = any> { export interface MarkConfig<Options = any, Storage = any> {

View File

@ -3,11 +3,11 @@ import {
} from '@tiptap/pm/model' } from '@tiptap/pm/model'
import { Plugin, Transaction } from '@tiptap/pm/state' import { Plugin, Transaction } from '@tiptap/pm/state'
import { NodeConfig } from '.' import { Editor } from './Editor.js'
import { Editor } from './Editor' import { getExtensionField } from './helpers/getExtensionField.js'
import { getExtensionField } from './helpers/getExtensionField' import { NodeConfig } from './index.js'
import { InputRule } from './InputRule' import { InputRule } from './InputRule.js'
import { PasteRule } from './PasteRule' import { PasteRule } from './PasteRule.js'
import { import {
AnyConfig, AnyConfig,
Attributes, Attributes,
@ -17,9 +17,9 @@ import {
NodeViewRenderer, NodeViewRenderer,
ParentConfig, ParentConfig,
RawCommands, RawCommands,
} from './types' } from './types.js'
import { callOrReturn } from './utilities/callOrReturn' import { callOrReturn } from './utilities/callOrReturn.js'
import { mergeDeep } from './utilities/mergeDeep' import { mergeDeep } from './utilities/mergeDeep.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface NodeConfig<Options = any, Storage = any> { interface NodeConfig<Options = any, Storage = any> {

View File

@ -2,11 +2,11 @@ import { Node as ProseMirrorNode } from '@tiptap/pm/model'
import { NodeSelection } from '@tiptap/pm/state' import { NodeSelection } from '@tiptap/pm/state'
import { NodeView as ProseMirrorNodeView } from '@tiptap/pm/view' import { NodeView as ProseMirrorNodeView } from '@tiptap/pm/view'
import { Editor as CoreEditor } from './Editor' import { Editor as CoreEditor } from './Editor.js'
import { Node } from './Node' import { Node } from './Node.js'
import { DecorationWithType, NodeViewRendererOptions, NodeViewRendererProps } from './types' import { DecorationWithType, NodeViewRendererOptions, NodeViewRendererProps } from './types.js'
import { isAndroid } from './utilities/isAndroid' import { isAndroid } from './utilities/isAndroid.js'
import { isiOS } from './utilities/isiOS' import { isiOS } from './utilities/isiOS.js'
export class NodeView< export class NodeView<
Component, Component,

View File

@ -1,17 +1,17 @@
import { EditorState, Plugin } from '@tiptap/pm/state' import { EditorState, Plugin } from '@tiptap/pm/state'
import { CommandManager } from './CommandManager' import { CommandManager } from './CommandManager.js'
import { Editor } from './Editor' import { Editor } from './Editor.js'
import { createChainableState } from './helpers/createChainableState' import { createChainableState } from './helpers/createChainableState.js'
import { import {
CanCommands, CanCommands,
ChainedCommands, ChainedCommands,
ExtendedRegExpMatchArray, ExtendedRegExpMatchArray,
Range, Range,
SingleCommands, SingleCommands,
} from './types' } from './types.js'
import { isNumber } from './utilities/isNumber' import { isNumber } from './utilities/isNumber.js'
import { isRegExp } from './utilities/isRegExp' import { isRegExp } from './utilities/isRegExp.js'
export type PasteRuleMatch = { export type PasteRuleMatch = {
index: number index: number

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { liftTarget } from '@tiptap/pm/transform' import { liftTarget } from '@tiptap/pm/transform'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { Command, RawCommands } from '../types' import { Command, RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { createParagraphNear as originalCreateParagraphNear } from '@tiptap/pm/commands' import { createParagraphNear as originalCreateParagraphNear } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,7 +1,7 @@
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { Range, RawCommands } from '../types' import { Range, RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { deleteSelection as originalDeleteSelection } from '@tiptap/pm/commands' import { deleteSelection as originalDeleteSelection } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { exitCode as originalExitCode } from '@tiptap/pm/commands' import { exitCode as originalExitCode } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,9 +1,9 @@
import { MarkType } from '@tiptap/pm/model' import { MarkType } from '@tiptap/pm/model'
import { TextSelection } from '@tiptap/pm/state' import { TextSelection } from '@tiptap/pm/state'
import { getMarkRange } from '../helpers/getMarkRange' import { getMarkRange } from '../helpers/getMarkRange.js'
import { getMarkType } from '../helpers/getMarkType' import { getMarkType } from '../helpers/getMarkType.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { Command, CommandProps, RawCommands } from '../types' import { Command, CommandProps, RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,7 +1,7 @@
import { isTextSelection } from '../helpers/isTextSelection' import { isTextSelection } from '../helpers/isTextSelection.js'
import { resolveFocusPosition } from '../helpers/resolveFocusPosition' import { resolveFocusPosition } from '../helpers/resolveFocusPosition.js'
import { FocusPosition, RawCommands } from '../types' import { FocusPosition, RawCommands } from '../types.js'
import { isiOS } from '../utilities/isiOS' import { isiOS } from '../utilities/isiOS.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { CommandProps, RawCommands } from '../types' import { CommandProps, RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,50 +1,50 @@
export * from './blur' export * from './blur.js'
export * from './clearContent' export * from './clearContent.js'
export * from './clearNodes' export * from './clearNodes.js'
export * from './command' export * from './command.js'
export * from './createParagraphNear' export * from './createParagraphNear.js'
export * from './deleteCurrentNode' export * from './deleteCurrentNode.js'
export * from './deleteNode' export * from './deleteNode.js'
export * from './deleteRange' export * from './deleteRange.js'
export * from './deleteSelection' export * from './deleteSelection.js'
export * from './enter' export * from './enter.js'
export * from './exitCode' export * from './exitCode.js'
export * from './extendMarkRange' export * from './extendMarkRange.js'
export * from './first' export * from './first.js'
export * from './focus' export * from './focus.js'
export * from './forEach' export * from './forEach.js'
export * from './insertContent' export * from './insertContent.js'
export * from './insertContentAt' export * from './insertContentAt.js'
export * from './join' export * from './join.js'
export * from './keyboardShortcut' export * from './keyboardShortcut.js'
export * from './lift' export * from './lift.js'
export * from './liftEmptyBlock' export * from './liftEmptyBlock.js'
export * from './liftListItem' export * from './liftListItem.js'
export * from './newlineInCode' export * from './newlineInCode.js'
export * from './resetAttributes' export * from './resetAttributes.js'
export * from './scrollIntoView' export * from './scrollIntoView.js'
export * from './selectAll' export * from './selectAll.js'
export * from './selectNodeBackward' export * from './selectNodeBackward.js'
export * from './selectNodeForward' export * from './selectNodeForward.js'
export * from './selectParentNode' export * from './selectParentNode.js'
export * from './selectTextblockEnd' export * from './selectTextblockEnd.js'
export * from './selectTextblockStart' export * from './selectTextblockStart.js'
export * from './setContent' export * from './setContent.js'
export * from './setMark' export * from './setMark.js'
export * from './setMeta' export * from './setMeta.js'
export * from './setNode' export * from './setNode.js'
export * from './setNodeSelection' export * from './setNodeSelection.js'
export * from './setTextSelection' export * from './setTextSelection.js'
export * from './sinkListItem' export * from './sinkListItem.js'
export * from './splitBlock' export * from './splitBlock.js'
export * from './splitListItem' export * from './splitListItem.js'
export * from './toggleList' export * from './toggleList.js'
export * from './toggleMark' export * from './toggleMark.js'
export * from './toggleNode' export * from './toggleNode.js'
export * from './toggleWrap' export * from './toggleWrap.js'
export * from './undoInputRule' export * from './undoInputRule.js'
export * from './unsetAllMarks' export * from './unsetAllMarks.js'
export * from './unsetMark' export * from './unsetMark.js'
export * from './updateAttributes' export * from './updateAttributes.js'
export * from './wrapIn' export * from './wrapIn.js'
export * from './wrapInList' export * from './wrapInList.js'

View File

@ -1,6 +1,6 @@
import { ParseOptions } from '@tiptap/pm/model' import { ParseOptions } from '@tiptap/pm/model'
import { Content, RawCommands } from '../types' import { Content, RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model' import { Fragment, Node as ProseMirrorNode, ParseOptions } from '@tiptap/pm/model'
import { createNodeFromContent } from '../helpers/createNodeFromContent' import { createNodeFromContent } from '../helpers/createNodeFromContent.js'
import { selectionToInsertionEnd } from '../helpers/selectionToInsertionEnd' import { selectionToInsertionEnd } from '../helpers/selectionToInsertionEnd.js'
import { Content, Range, RawCommands } from '../types' import { Content, Range, RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -5,7 +5,7 @@ import {
joinUp as originalJoinUp, joinUp as originalJoinUp,
} from '@tiptap/pm/commands' } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
import { isiOS } from '../utilities/isiOS' import { isiOS } from '../utilities/isiOS.js'
import { isMacOS } from '../utilities/isMacOS' import { isMacOS } from '../utilities/isMacOS.js'
function normalizeKeyName(name: string) { function normalizeKeyName(name: string) {
const parts = name.split(/-(?!$)/) const parts = name.split(/-(?!$)/)

View File

@ -1,9 +1,9 @@
import { lift as originalLift } from '@tiptap/pm/commands' import { lift as originalLift } from '@tiptap/pm/commands'
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { isNodeActive } from '../helpers/isNodeActive' import { isNodeActive } from '../helpers/isNodeActive.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { liftEmptyBlock as originalLiftEmptyBlock } from '@tiptap/pm/commands' import { liftEmptyBlock as originalLiftEmptyBlock } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { liftListItem as originalLiftListItem } from '@tiptap/pm/schema-list' import { liftListItem as originalLiftListItem } from '@tiptap/pm/schema-list'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { newlineInCode as originalNewlineInCode } from '@tiptap/pm/commands' import { newlineInCode as originalNewlineInCode } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,10 +1,10 @@
import { MarkType, NodeType } from '@tiptap/pm/model' import { MarkType, NodeType } from '@tiptap/pm/model'
import { getMarkType } from '../helpers/getMarkType' import { getMarkType } from '../helpers/getMarkType.js'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName' import { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
import { deleteProps } from '../utilities/deleteProps' import { deleteProps } from '../utilities/deleteProps.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { selectNodeBackward as originalSelectNodeBackward } from '@tiptap/pm/commands' import { selectNodeBackward as originalSelectNodeBackward } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { selectNodeForward as originalSelectNodeForward } from '@tiptap/pm/commands' import { selectNodeForward as originalSelectNodeForward } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,6 +1,6 @@
import { selectParentNode as originalSelectParentNode } from '@tiptap/pm/commands' import { selectParentNode as originalSelectParentNode } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -2,7 +2,7 @@
// TODO: add types to @types/prosemirror-commands // TODO: add types to @types/prosemirror-commands
import { selectTextblockEnd as originalSelectTextblockEnd } from '@tiptap/pm/commands' import { selectTextblockEnd as originalSelectTextblockEnd } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -2,7 +2,7 @@
// TODO: add types to @types/prosemirror-commands // TODO: add types to @types/prosemirror-commands
import { selectTextblockStart as originalSelectTextblockStart } from '@tiptap/pm/commands' import { selectTextblockStart as originalSelectTextblockStart } from '@tiptap/pm/commands'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,7 +1,7 @@
import { ParseOptions } from '@tiptap/pm/model' import { ParseOptions } from '@tiptap/pm/model'
import { createDocument } from '../helpers/createDocument' import { createDocument } from '../helpers/createDocument.js'
import { Content, RawCommands } from '../types' import { Content, RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,10 +1,10 @@
import { MarkType, ResolvedPos } from '@tiptap/pm/model' import { MarkType, ResolvedPos } from '@tiptap/pm/model'
import { EditorState, Transaction } from '@tiptap/pm/state' import { EditorState, Transaction } from '@tiptap/pm/state'
import { isTextSelection } from '../helpers' import { getMarkAttributes } from '../helpers/getMarkAttributes.js'
import { getMarkAttributes } from '../helpers/getMarkAttributes' import { getMarkType } from '../helpers/getMarkType.js'
import { getMarkType } from '../helpers/getMarkType' import { isTextSelection } from '../helpers/index.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { setBlockType } from '@tiptap/pm/commands' import { setBlockType } from '@tiptap/pm/commands'
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,7 +1,7 @@
import { NodeSelection } from '@tiptap/pm/state' import { NodeSelection } from '@tiptap/pm/state'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
import { minMax } from '../utilities/minMax' import { minMax } from '../utilities/minMax.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,7 +1,7 @@
import { TextSelection } from '@tiptap/pm/state' import { TextSelection } from '@tiptap/pm/state'
import { Range, RawCommands } from '../types' import { Range, RawCommands } from '../types.js'
import { minMax } from '../utilities/minMax' import { minMax } from '../utilities/minMax.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { sinkListItem as originalSinkListItem } from '@tiptap/pm/schema-list' import { sinkListItem as originalSinkListItem } from '@tiptap/pm/schema-list'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,9 +1,9 @@
import { EditorState, NodeSelection, TextSelection } from '@tiptap/pm/state' import { EditorState, NodeSelection, TextSelection } from '@tiptap/pm/state'
import { canSplit } from '@tiptap/pm/transform' import { canSplit } from '@tiptap/pm/transform'
import { defaultBlockAt } from '../helpers/defaultBlockAt' import { defaultBlockAt } from '../helpers/defaultBlockAt.js'
import { getSplittedAttributes } from '../helpers/getSplittedAttributes' import { getSplittedAttributes } from '../helpers/getSplittedAttributes.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
function ensureMarks(state: EditorState, splittableMarks?: string[]) { function ensureMarks(state: EditorState, splittableMarks?: string[]) {
const marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks()) const marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks())

View File

@ -4,9 +4,9 @@ import {
import { TextSelection } from '@tiptap/pm/state' import { TextSelection } from '@tiptap/pm/state'
import { canSplit } from '@tiptap/pm/transform' import { canSplit } from '@tiptap/pm/transform'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { getSplittedAttributes } from '../helpers/getSplittedAttributes' import { getSplittedAttributes } from '../helpers/getSplittedAttributes.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -2,10 +2,10 @@ import { NodeType } from '@tiptap/pm/model'
import { Transaction } from '@tiptap/pm/state' import { Transaction } from '@tiptap/pm/state'
import { canJoin } from '@tiptap/pm/transform' import { canJoin } from '@tiptap/pm/transform'
import { findParentNode } from '../helpers/findParentNode' import { findParentNode } from '../helpers/findParentNode.js'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { isList } from '../helpers/isList' import { isList } from '../helpers/isList.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
const joinListBackwards = (tr: Transaction, listType: NodeType): boolean => { const joinListBackwards = (tr: Transaction, listType: NodeType): boolean => {
const list = findParentNode(node => node.type === listType)(tr.selection) const list = findParentNode(node => node.type === listType)(tr.selection)

View File

@ -1,8 +1,8 @@
import { MarkType } from '@tiptap/pm/model' import { MarkType } from '@tiptap/pm/model'
import { getMarkType } from '../helpers/getMarkType' import { getMarkType } from '../helpers/getMarkType.js'
import { isMarkActive } from '../helpers/isMarkActive' import { isMarkActive } from '../helpers/isMarkActive.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { isNodeActive } from '../helpers/isNodeActive' import { isNodeActive } from '../helpers/isNodeActive.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { isNodeActive } from '../helpers/isNodeActive' import { isNodeActive } from '../helpers/isNodeActive.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,4 +1,4 @@
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { MarkType } from '@tiptap/pm/model' import { MarkType } from '@tiptap/pm/model'
import { getMarkRange } from '../helpers/getMarkRange' import { getMarkRange } from '../helpers/getMarkRange.js'
import { getMarkType } from '../helpers/getMarkType' import { getMarkType } from '../helpers/getMarkType.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,9 +1,9 @@
import { MarkType, NodeType } from '@tiptap/pm/model' import { MarkType, NodeType } from '@tiptap/pm/model'
import { getMarkType } from '../helpers/getMarkType' import { getMarkType } from '../helpers/getMarkType.js'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName' import { getSchemaTypeNameByName } from '../helpers/getSchemaTypeNameByName.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { wrapIn as originalWrapIn } from '@tiptap/pm/commands' import { wrapIn as originalWrapIn } from '@tiptap/pm/commands'
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { NodeType } from '@tiptap/pm/model' import { NodeType } from '@tiptap/pm/model'
import { wrapInList as originalWrapInList } from '@tiptap/pm/schema-list' import { wrapInList as originalWrapInList } from '@tiptap/pm/schema-list'
import { getNodeType } from '../helpers/getNodeType' import { getNodeType } from '../helpers/getNodeType.js'
import { RawCommands } from '../types' import { RawCommands } from '../types.js'
declare module '@tiptap/core' { declare module '@tiptap/core' {
interface Commands<ReturnType> { interface Commands<ReturnType> {

View File

@ -1,8 +1,8 @@
import { Plugin, PluginKey } from '@tiptap/pm/state' import { Plugin, PluginKey } from '@tiptap/pm/state'
import { Extension } from '../Extension' import { Extension } from '../Extension.js'
import { getTextBetween } from '../helpers/getTextBetween' import { getTextBetween } from '../helpers/getTextBetween.js'
import { getTextSerializersFromSchema } from '../helpers/getTextSerializersFromSchema' import { getTextSerializersFromSchema } from '../helpers/getTextSerializersFromSchema.js'
export const ClipboardTextSerializer = Extension.create({ export const ClipboardTextSerializer = Extension.create({
name: 'clipboardTextSerializer', name: 'clipboardTextSerializer',

Some files were not shown because too many files have changed in this diff Show More