Socket
Socket
Sign inDemoInstall

@tiptap/extension-horizontal-rule

Package Overview
Dependencies
Maintainers
2
Versions
167
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-alpha.4 to 2.0.0-alpha.5

dist/packages/extension-horizontal-rule/src/horizontal-rule.d.ts

8

CHANGELOG.md

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

# [2.0.0-alpha.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-horizontal-rule@2.0.0-alpha.4...@tiptap/extension-horizontal-rule@2.0.0-alpha.5) (2020-12-18)
**Note:** Version bump only for package @tiptap/extension-horizontal-rule
# [2.0.0-alpha.4](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-horizontal-rule@2.0.0-alpha.3...@tiptap/extension-horizontal-rule@2.0.0-alpha.4) (2020-12-02)

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

19

dist/packages/extension-horizontal-rule/src/index.d.ts

@@ -1,18 +0,3 @@

import { Command, Node } from '@tiptap/core';
export interface HorizontalRuleOptions {
HTMLAttributes: {
[key: string]: any;
};
}
declare const HorizontalRule: Node<HorizontalRuleOptions, {
/**
* Add a horizontal rule
*/
setHorizontalRule: () => Command;
}>;
import { HorizontalRule } from './horizontal-rule';
export * from './horizontal-rule';
export default HorizontalRule;
declare module '@tiptap/core' {
interface AllExtensions {
HorizontalRule: typeof HorizontalRule;
}
}

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@tiptap/core")):"function"==typeof define&&define.amd?define(["@tiptap/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["@tiptap/extension-horizontal-rule"]=t(e["@tiptap/core"])}(this,(function(e){"use strict";return e.Node.create({name:"horizontalRule",defaultOptions:{HTMLAttributes:{}},group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",e.mergeAttributes(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({tr:e,dispatch:t})=>(t&&e.replaceSelectionWith(this.type.create()),!0)}},addInputRules(){return[e.nodeInputRule(/^(?:---|___\s|\*\*\*\s)$/,this.type)]}})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tiptap/core")):"function"==typeof define&&define.amd?define(["exports","@tiptap/core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@tiptap/extension-horizontal-rule"]={},e["@tiptap/core"])}(this,(function(e,t){"use strict";const o=t.Node.create({name:"horizontalRule",defaultOptions:{HTMLAttributes:{}},group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",t.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({tr:e,dispatch:t})=>(t&&e.replaceSelectionWith(this.type.create()),!0)}},addInputRules(){return[t.nodeInputRule(/^(?:---|___\s|\*\*\*\s)$/,this.type)]}});e.HorizontalRule=o,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=tiptap-extension-horizontal-rule.bundle.umd.min.js.map
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@tiptap/core');

@@ -39,3 +41,4 @@

module.exports = HorizontalRule;
exports.HorizontalRule = HorizontalRule;
exports.default = HorizontalRule;
//# sourceMappingURL=tiptap-extension-horizontal-rule.cjs.js.map

@@ -38,2 +38,3 @@ import { Node, mergeAttributes, nodeInputRule } from '@tiptap/core';

export default HorizontalRule;
export { HorizontalRule };
//# sourceMappingURL=tiptap-extension-horizontal-rule.esm.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@tiptap/core')) :
typeof define === 'function' && define.amd ? define(['@tiptap/core'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global['@tiptap/extension-horizontal-rule'] = factory(global.core));
}(this, (function (core) { '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-horizontal-rule'] = {}, global.core));
}(this, (function (exports, core) { 'use strict';

@@ -41,5 +41,8 @@ const HorizontalRule = core.Node.create({

return HorizontalRule;
exports.HorizontalRule = HorizontalRule;
exports.default = HorizontalRule;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=tiptap-extension-horizontal-rule.umd.js.map
{
"name": "@tiptap/extension-horizontal-rule",
"description": "horizontal rule extension for tiptap",
"version": "2.0.0-alpha.4",
"version": "2.0.0-alpha.5",
"homepage": "https://tiptap.dev",

@@ -28,3 +28,3 @@ "keywords": [

},
"gitHead": "a884cb81de8783d0097741c1ddb97a82ea88ae0e"
"gitHead": "0371cb0a5d803a44d93532aa34419ec7ffffdc24"
}

@@ -1,61 +0,5 @@

import {
Command,
Node,
nodeInputRule,
mergeAttributes,
} from '@tiptap/core'
import { HorizontalRule } from './horizontal-rule'
export interface HorizontalRuleOptions {
HTMLAttributes: {
[key: string]: any
},
}
export * from './horizontal-rule'
const HorizontalRule = Node.create({
name: 'horizontalRule',
defaultOptions: <HorizontalRuleOptions>{
HTMLAttributes: {},
},
group: 'block',
parseHTML() {
return [
{ tag: 'hr' },
]
},
renderHTML({ HTMLAttributes }) {
return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)]
},
addCommands() {
return {
/**
* Add a horizontal rule
*/
setHorizontalRule: (): Command => ({ tr, dispatch }) => {
if (dispatch) {
tr.replaceSelectionWith(this.type.create())
}
return true
},
}
},
addInputRules() {
return [
nodeInputRule(/^(?:---|___\s|\*\*\*\s)$/, this.type),
]
},
})
export default HorizontalRule
declare module '@tiptap/core' {
interface AllExtensions {
HorizontalRule: typeof HorizontalRule,
}
}

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

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