add broken rollup build

This commit is contained in:
Philipp Kühn
2018-08-22 09:14:49 +02:00
parent 0e75610fcd
commit 4a8b85d250
29 changed files with 1208 additions and 714 deletions

View File

@@ -1,4 +1,3 @@
<script>
import { EditorState, Plugin } from 'prosemirror-state'
import { EditorView } from 'prosemirror-view'
import { Schema, DOMParser } from 'prosemirror-model'
@@ -217,4 +216,3 @@ export default {
},
}
</script>

View File

@@ -1,5 +1,5 @@
import { setBlockType } from 'prosemirror-commands'
import { nodeIsActive } from 'tiptap/utils'
import { nodeIsActive } from '../utils'
export default function (type, toggletype, attrs = {}) {
return (state, dispatch, view) => {

View File

@@ -1,5 +1,5 @@
import { nodeIsActive } from 'tiptap/utils'
import { wrapInList, liftListItem } from 'tiptap/helpers'
import { nodeIsActive } from '../utils'
import { wrapInList, liftListItem } from '../helpers'
export default function toggleList(type, itemType) {
return (state, dispatch, view) => {

View File

@@ -1,3 +1,3 @@
import Editor from './components/editor.vue'
import Editor from './components/editor'
export { Editor }

View File

@@ -1,5 +1,5 @@
import { Mark } from 'tiptap/utils'
import { toggleMark } from 'tiptap/helpers'
import { Mark } from '../utils'
import { toggleMark } from '../helpers'
export default class BoldMark extends Mark {

View File

@@ -1,5 +1,5 @@
import { Mark } from 'tiptap/utils'
import { toggleMark } from 'tiptap/helpers'
import { Mark } from '../utils'
import { toggleMark } from '../helpers'
export default class CodeMark extends Mark {

View File

@@ -1,5 +1,5 @@
import { Mark } from 'tiptap/utils'
import { toggleMark } from 'tiptap/helpers'
import { Mark } from '../utils'
import { toggleMark } from '../helpers'
export default class ItalicMark extends Mark {

View File

@@ -1,5 +1,5 @@
import { Mark } from 'tiptap/utils'
import { updateMark, removeMark } from 'tiptap/helpers'
import { Mark } from '../utils'
import { updateMark, removeMark } from '../helpers'
export default class LinkMark extends Mark {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { wrappingInputRule, setBlockType, wrapIn } from 'tiptap/helpers'
import { Node } from '../utils'
import { wrappingInputRule, setBlockType, wrapIn } from '../helpers'
export default class BlockquoteNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { wrappingInputRule, wrapInList, toggleList } from 'tiptap/helpers'
import { Node } from '../utils'
import { wrappingInputRule, wrapInList, toggleList } from '../helpers'
export default class BulletNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { toggleBlockType, setBlockType, textblockTypeInputRule } from 'tiptap/helpers'
import { Node } from '../utils'
import { toggleBlockType, setBlockType, textblockTypeInputRule } from '../helpers'
export default class CodeBlockNode extends Node {

View File

@@ -1,4 +1,4 @@
import { Node } from 'tiptap/utils'
import { Node } from '../utils'
export default class DocNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { chainCommands, exitCode } from 'tiptap/helpers'
import { Node } from '../utils'
import { chainCommands, exitCode } from '../helpers'
export default class HardBreakNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { setBlockType, textblockTypeInputRule, toggleBlockType } from 'tiptap/helpers'
import { Node } from '../utils'
import { setBlockType, textblockTypeInputRule, toggleBlockType } from '../helpers'
export default class HeadingNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { splitListItem, liftListItem, sinkListItem } from 'tiptap/helpers'
import { Node } from '../utils'
import { splitListItem, liftListItem, sinkListItem } from '../helpers'
export default class OrderedListNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { wrappingInputRule, wrapInList, toggleList } from 'tiptap/helpers'
import { Node } from '../utils'
import { wrappingInputRule, wrapInList, toggleList } from '../helpers'
export default class OrderedListNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { setBlockType } from 'tiptap/helpers'
import { Node } from '../utils'
import { setBlockType } from '../helpers'
export default class ParagraphNode extends Node {

View File

@@ -1,4 +1,4 @@
import { Node } from 'tiptap/utils'
import { Node } from '../utils'
export default class TextNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { splitListItem, liftListItem } from 'tiptap/helpers'
import { Node } from '../utils'
import { splitListItem, liftListItem } from '../helpers'
export default class TodoItemNode extends Node {

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap/utils'
import { wrapInList, wrappingInputRule } from 'tiptap/helpers'
import { Node } from '../utils'
import { wrapInList, wrappingInputRule } from '../helpers'
export default class BulletNode extends Node {

View File

@@ -8,13 +8,19 @@ export default function ({ schema, state, commands }) {
const command = commands[name] ? commands[name] : () => {}
return { name, active, command }
})
.reduce((actions, { name, active, command }) => ({
...actions,
.reduce((actions, { name, active, command }) => Object.assign({}, actions, {
[name]: {
active,
command,
},
}), {})
// .reduce((actions, { name, active, command }) => ({
// ...actions,
// [name]: {
// active,
// command,
// },
// }), {})
const marks = Object.entries(schema.marks)
.map(([name]) => {
@@ -28,14 +34,21 @@ export default function ({ schema, state, commands }) {
command,
}
})
.reduce((actions, { name, active, attrs, command }) => ({
...actions,
.reduce((actions, { name, active, attrs, command }) => Object.assign({}, actions, {
[name]: {
active,
attrs,
command,
},
}), {})
// .reduce((actions, { name, active, attrs, command }) => ({
// ...actions,
// [name]: {
// active,
// attrs,
// command,
// },
// }), {})
return {
nodes,

View File

@@ -1,7 +1,7 @@
import { lift, selectParentNode } from 'prosemirror-commands'
import { undo, redo } from 'prosemirror-history'
import { undoInputRule } from 'prosemirror-inputrules'
import { isMac } from 'tiptap/utils'
import { isMac } from '../utils'
const keymap = {
'Mod-z': undo,