chore: migrate to new versions of prosemirror packages (#2854)
* refactor: upgrade prosemirror packages to new typescript versions * refactor: migrate to new typings from prosemirror * style: fix linting issues * style: fix linting issues * style: fix linting issues * fix(ci): fix build process by reimplement filterTransaction * fix(extension-test): fix broken build because of wrong output file names * fix: fix prosemirror-tables not being bundled correctly for ES6 * fix: move to prosemirror-tables-contently until es6 build is working * fix: fix tests for youtube * fix: fix youtube test * fix(demos): fix demos build
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
tableEditing,
|
||||
toggleHeader,
|
||||
toggleHeaderCell,
|
||||
} from 'prosemirror-tables'
|
||||
} from 'prosemirror-tables-contently'
|
||||
import { NodeView } from 'prosemirror-view'
|
||||
|
||||
import { TableView } from './TableView'
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import {
|
||||
Fragment,
|
||||
Node as ProsemirrorNode,
|
||||
NodeType, Schema,
|
||||
} from 'prosemirror-model'
|
||||
import { Fragment, Node as ProsemirrorNode, NodeType } from 'prosemirror-model'
|
||||
|
||||
export function createCell(cellType: NodeType, cellContent?: Fragment<Schema> | ProsemirrorNode<Schema> | Array<ProsemirrorNode<Schema>>): ProsemirrorNode | null | undefined {
|
||||
export function createCell(cellType: NodeType, cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>): ProsemirrorNode | null | undefined {
|
||||
if (cellContent) {
|
||||
return cellType.createChecked(null, cellContent)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Fragment, Node as ProsemirrorNode, Schema } from 'prosemirror-model'
|
||||
import { createCell } from './createCell'
|
||||
import { getTableNodeTypes } from './getTableNodeTypes'
|
||||
|
||||
export function createTable(schema: Schema, rowsCount: number, colsCount: number, withHeaderRow: boolean, cellContent?: Fragment<Schema> | ProsemirrorNode<Schema> | Array<ProsemirrorNode<Schema>>): ProsemirrorNode {
|
||||
export function createTable(schema: Schema, rowsCount: number, colsCount: number, withHeaderRow: boolean, cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>): ProsemirrorNode {
|
||||
const types = getTableNodeTypes(schema)
|
||||
const headerCells = []
|
||||
const cells = []
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CellSelection } from 'prosemirror-tables'
|
||||
import { CellSelection } from 'prosemirror-tables-contently'
|
||||
|
||||
export function isCellSelection(value: unknown): value is CellSelection {
|
||||
return value instanceof CellSelection
|
||||
|
||||
Reference in New Issue
Block a user