@tiptap/extension-hard-break
Advanced tools
Comparing version 2.0.0-beta.6 to 2.0.0-beta.7
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-beta.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.6...@tiptap/extension-hard-break@2.0.0-beta.7) (2021-05-05) | ||
**Note:** Version bump only for package @tiptap/extension-hard-break | ||
# [2.0.0-beta.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.5...@tiptap/extension-hard-break@2.0.0-beta.6) (2021-04-23) | ||
@@ -8,0 +16,0 @@ |
@@ -6,3 +6,2 @@ 'use strict'; | ||
var core = require('@tiptap/core'); | ||
var prosemirrorCommands = require('prosemirror-commands'); | ||
@@ -27,11 +26,6 @@ const HardBreak = core.Node.create({ | ||
return { | ||
setHardBreak: () => ({ commands, state, dispatch }) => { | ||
setHardBreak: () => ({ commands }) => { | ||
return commands.first([ | ||
() => prosemirrorCommands.exitCode(state, dispatch), | ||
() => { | ||
if (dispatch) { | ||
state.tr.replaceSelectionWith(this.type.create()).scrollIntoView(); | ||
} | ||
return true; | ||
}, | ||
() => commands.exitCode(), | ||
() => commands.insertContent({ type: this.name }), | ||
]); | ||
@@ -38,0 +32,0 @@ }, |
import { Node, mergeAttributes } from '@tiptap/core'; | ||
import { exitCode } from 'prosemirror-commands'; | ||
@@ -22,11 +21,6 @@ const HardBreak = Node.create({ | ||
return { | ||
setHardBreak: () => ({ commands, state, dispatch }) => { | ||
setHardBreak: () => ({ commands }) => { | ||
return commands.first([ | ||
() => exitCode(state, dispatch), | ||
() => { | ||
if (dispatch) { | ||
state.tr.replaceSelectionWith(this.type.create()).scrollIntoView(); | ||
} | ||
return true; | ||
}, | ||
() => commands.exitCode(), | ||
() => commands.insertContent({ type: this.name }), | ||
]); | ||
@@ -33,0 +27,0 @@ }, |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core'), require('prosemirror-commands')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core', 'prosemirror-commands'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@tiptap/extension-hard-break'] = {}, global.core, global.prosemirrorCommands)); | ||
}(this, (function (exports, core, prosemirrorCommands) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@tiptap/extension-hard-break'] = {}, global.core)); | ||
}(this, (function (exports, core) { 'use strict'; | ||
@@ -25,11 +25,6 @@ const HardBreak = core.Node.create({ | ||
return { | ||
setHardBreak: () => ({ commands, state, dispatch }) => { | ||
setHardBreak: () => ({ commands }) => { | ||
return commands.first([ | ||
() => prosemirrorCommands.exitCode(state, dispatch), | ||
() => { | ||
if (dispatch) { | ||
state.tr.replaceSelectionWith(this.type.create()).scrollIntoView(); | ||
} | ||
return true; | ||
}, | ||
() => commands.exitCode(), | ||
() => commands.insertContent({ type: this.name }), | ||
]); | ||
@@ -36,0 +31,0 @@ }, |
MIT License | ||
Copyright (c) 2020, überdosis GbR | ||
Copyright (c) 2021, überdosis GbR | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
{ | ||
"name": "@tiptap/extension-hard-break", | ||
"description": "hard break extension for tiptap", | ||
"version": "2.0.0-beta.6", | ||
"version": "2.0.0-beta.7", | ||
"homepage": "https://tiptap.dev", | ||
@@ -18,3 +18,2 @@ "keywords": [ | ||
"module": "dist/tiptap-extension-hard-break.esm.js", | ||
"unpkg": "dist/tiptap-extension-hard-break.bundle.umd.min.js", | ||
"types": "dist/packages/extension-hard-break/src/index.d.ts", | ||
@@ -26,6 +25,5 @@ "files": [ | ||
"peerDependencies": { | ||
"@tiptap/core": "^2.0.0-beta.1", | ||
"prosemirror-commands": "^1.1.3" | ||
"@tiptap/core": "^2.0.0-beta.1" | ||
}, | ||
"gitHead": "bd9e15d78f9159afb05d09e7ba279ff7d74a85ea" | ||
"gitHead": "c64520b74dab6b127c78960c1bd0af237b1f68fb" | ||
} |
import { Command, Node, mergeAttributes } from '@tiptap/core' | ||
import { exitCode } from 'prosemirror-commands' | ||
@@ -44,12 +43,6 @@ export interface HardBreakOptions { | ||
return { | ||
setHardBreak: () => ({ commands, state, dispatch }) => { | ||
setHardBreak: () => ({ commands }) => { | ||
return commands.first([ | ||
() => exitCode(state, dispatch), | ||
() => { | ||
if (dispatch) { | ||
state.tr.replaceSelectionWith(this.type.create()).scrollIntoView() | ||
} | ||
return true | ||
}, | ||
() => commands.exitCode(), | ||
() => commands.insertContent({ type: this.name }), | ||
]) | ||
@@ -56,0 +49,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
1
19524
14
187
1