Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/extension-horizontal-rule

Package Overview
Dependencies
Maintainers
2
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-horizontal-rule - npm Package Compare versions

Comparing version 2.0.0-beta.9 to 2.0.0-beta.10

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [2.0.0-beta.10](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-horizontal-rule@2.0.0-beta.9...@tiptap/extension-horizontal-rule@2.0.0-beta.10) (2021-05-05)
**Note:** Version bump only for package @tiptap/extension-horizontal-rule
# [2.0.0-beta.9](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-horizontal-rule@2.0.0-beta.8...@tiptap/extension-horizontal-rule@2.0.0-beta.9) (2021-05-05)

@@ -8,0 +16,0 @@

36

dist/tiptap-extension-horizontal-rule.cjs.js

@@ -24,20 +24,24 @@ 'use strict';

return {
setHorizontalRule: () => ({ tr, dispatch }) => {
var _a;
if (dispatch) {
tr.replaceSelectionWith(this.type.create());
const { parent, pos } = tr.selection.$from;
const posAfter = pos + 1;
const nodeAfter = tr.doc.nodeAt(posAfter);
// end of document
if (!nodeAfter) {
const node = (_a = parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();
if (node) {
tr.insert(posAfter, node);
tr.setSelection(prosemirrorState.TextSelection.create(tr.doc, posAfter));
setHorizontalRule: () => ({ chain }) => {
return chain()
.insertContent({ type: this.name })
.command(({ tr, dispatch }) => {
var _a;
if (dispatch) {
const { parent, pos } = tr.selection.$from;
const posAfter = pos + 1;
const nodeAfter = tr.doc.nodeAt(posAfter);
// end of document
if (!nodeAfter) {
const node = (_a = parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();
if (node) {
tr.insert(posAfter, node);
tr.setSelection(prosemirrorState.TextSelection.create(tr.doc, posAfter));
}
}
tr.scrollIntoView();
}
tr.scrollIntoView();
}
return true;
return true;
})
.run();
},

@@ -44,0 +48,0 @@ };

@@ -20,20 +20,24 @@ import { Node, mergeAttributes, nodeInputRule } from '@tiptap/core';

return {
setHorizontalRule: () => ({ tr, dispatch }) => {
var _a;
if (dispatch) {
tr.replaceSelectionWith(this.type.create());
const { parent, pos } = tr.selection.$from;
const posAfter = pos + 1;
const nodeAfter = tr.doc.nodeAt(posAfter);
// end of document
if (!nodeAfter) {
const node = (_a = parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();
if (node) {
tr.insert(posAfter, node);
tr.setSelection(TextSelection.create(tr.doc, posAfter));
setHorizontalRule: () => ({ chain }) => {
return chain()
.insertContent({ type: this.name })
.command(({ tr, dispatch }) => {
var _a;
if (dispatch) {
const { parent, pos } = tr.selection.$from;
const posAfter = pos + 1;
const nodeAfter = tr.doc.nodeAt(posAfter);
// end of document
if (!nodeAfter) {
const node = (_a = parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();
if (node) {
tr.insert(posAfter, node);
tr.setSelection(TextSelection.create(tr.doc, posAfter));
}
}
tr.scrollIntoView();
}
tr.scrollIntoView();
}
return true;
return true;
})
.run();
},

@@ -40,0 +44,0 @@ };

@@ -23,20 +23,24 @@ (function (global, factory) {

return {
setHorizontalRule: () => ({ tr, dispatch }) => {
var _a;
if (dispatch) {
tr.replaceSelectionWith(this.type.create());
const { parent, pos } = tr.selection.$from;
const posAfter = pos + 1;
const nodeAfter = tr.doc.nodeAt(posAfter);
// end of document
if (!nodeAfter) {
const node = (_a = parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();
if (node) {
tr.insert(posAfter, node);
tr.setSelection(prosemirrorState.TextSelection.create(tr.doc, posAfter));
setHorizontalRule: () => ({ chain }) => {
return chain()
.insertContent({ type: this.name })
.command(({ tr, dispatch }) => {
var _a;
if (dispatch) {
const { parent, pos } = tr.selection.$from;
const posAfter = pos + 1;
const nodeAfter = tr.doc.nodeAt(posAfter);
// end of document
if (!nodeAfter) {
const node = (_a = parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();
if (node) {
tr.insert(posAfter, node);
tr.setSelection(prosemirrorState.TextSelection.create(tr.doc, posAfter));
}
}
tr.scrollIntoView();
}
tr.scrollIntoView();
}
return true;
return true;
})
.run();
},

@@ -43,0 +47,0 @@ };

{
"name": "@tiptap/extension-horizontal-rule",
"description": "horizontal rule extension for tiptap",
"version": "2.0.0-beta.9",
"version": "2.0.0-beta.10",
"homepage": "https://tiptap.dev",

@@ -18,3 +18,2 @@ "keywords": [

"module": "dist/tiptap-extension-horizontal-rule.esm.js",
"unpkg": "dist/tiptap-extension-horizontal-rule.bundle.umd.min.js",
"types": "dist/packages/extension-horizontal-rule/src/index.d.ts",

@@ -31,3 +30,3 @@ "files": [

},
"gitHead": "9b32e15a8f1d0d33998f431b792e7f364de15083"
"gitHead": "c64520b74dab6b127c78960c1bd0af237b1f68fb"
}

@@ -45,24 +45,27 @@ import {

return {
setHorizontalRule: () => ({ tr, dispatch }) => {
if (dispatch) {
tr.replaceSelectionWith(this.type.create())
setHorizontalRule: () => ({ chain }) => {
return chain()
.insertContent({ type: this.name })
.command(({ tr, dispatch }) => {
if (dispatch) {
const { parent, pos } = tr.selection.$from
const posAfter = pos + 1
const nodeAfter = tr.doc.nodeAt(posAfter)
const { parent, pos } = tr.selection.$from
const posAfter = pos + 1
const nodeAfter = tr.doc.nodeAt(posAfter)
// end of document
if (!nodeAfter) {
const node = parent.type.contentMatch.defaultType?.create()
// end of document
if (!nodeAfter) {
const node = parent.type.contentMatch.defaultType?.create()
if (node) {
tr.insert(posAfter, node)
tr.setSelection(TextSelection.create(tr.doc, posAfter))
}
}
if (node) {
tr.insert(posAfter, node)
tr.setSelection(TextSelection.create(tr.doc, posAfter))
tr.scrollIntoView()
}
}
tr.scrollIntoView()
}
return true
return true
})
.run()
},

@@ -69,0 +72,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc