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

@tiptap/extension-heading

Package Overview
Dependencies
Maintainers
2
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-heading - npm Package Compare versions

Comparing version 2.0.0-alpha.10 to 2.0.0-alpha.11

8

CHANGELOG.md

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

# [2.0.0-alpha.11](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-heading@2.0.0-alpha.10...@tiptap/extension-heading@2.0.0-alpha.11) (2021-02-16)
**Note:** Version bump only for package @tiptap/extension-heading
# [2.0.0-alpha.10](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-heading@2.0.0-alpha.9...@tiptap/extension-heading@2.0.0-alpha.10) (2021-02-07)

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

32

dist/packages/extension-heading/src/heading.d.ts

@@ -9,21 +9,21 @@ import { Command, Node } from '@tiptap/core';

}
export declare const Heading: Node<HeadingOptions, {
/**
* Set a heading node
*/
setHeading: (attributes: {
level: Level;
}) => Command;
/**
* Toggle a heading node
*/
toggleHeading: (attributes: {
level: Level;
}) => Command;
}>;
declare module '@tiptap/core' {
interface AllExtensions {
Heading: typeof Heading;
interface Commands {
heading: {
/**
* Set a heading node
*/
setHeading: (attributes: {
level: Level;
}) => Command;
/**
* Toggle a heading node
*/
toggleHeading: (attributes: {
level: Level;
}) => Command;
};
}
}
export declare const Heading: Node<HeadingOptions>;
export {};

@@ -41,6 +41,3 @@ 'use strict';

return {
/**
* Set a heading node
*/
setHeading: (attributes) => ({ commands }) => {
setHeading: attributes => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {

@@ -51,6 +48,3 @@ return false;

},
/**
* Toggle a heading node
*/
toggleHeading: (attributes) => ({ commands }) => {
toggleHeading: attributes => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {

@@ -57,0 +51,0 @@ return false;

@@ -37,6 +37,3 @@ import { Node, mergeAttributes } from '@tiptap/core';

return {
/**
* Set a heading node
*/
setHeading: (attributes) => ({ commands }) => {
setHeading: attributes => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {

@@ -47,6 +44,3 @@ return false;

},
/**
* Toggle a heading node
*/
toggleHeading: (attributes) => ({ commands }) => {
toggleHeading: attributes => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {

@@ -53,0 +47,0 @@ return false;

@@ -40,6 +40,3 @@ (function (global, factory) {

return {
/**
* Set a heading node
*/
setHeading: (attributes) => ({ commands }) => {
setHeading: attributes => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {

@@ -50,6 +47,3 @@ return false;

},
/**
* Toggle a heading node
*/
toggleHeading: (attributes) => ({ commands }) => {
toggleHeading: attributes => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {

@@ -56,0 +50,0 @@ return false;

{
"name": "@tiptap/extension-heading",
"description": "heading extension for tiptap",
"version": "2.0.0-alpha.10",
"version": "2.0.0-alpha.11",
"homepage": "https://tiptap.dev",

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

},
"gitHead": "6bdeb4615c7b6afba4a2fcac4e3c35d7a7c0030a"
"gitHead": "71d8fbbcb1eacd664bb6992e0086a589e4684e69"
}

@@ -13,6 +13,21 @@ import { Command, Node, mergeAttributes } from '@tiptap/core'

export const Heading = Node.create({
declare module '@tiptap/core' {
interface Commands {
heading: {
/**
* Set a heading node
*/
setHeading: (attributes: { level: Level }) => Command,
/**
* Toggle a heading node
*/
toggleHeading: (attributes: { level: Level }) => Command,
}
}
}
export const Heading = Node.create<HeadingOptions>({
name: 'heading',
defaultOptions: <HeadingOptions>{
defaultOptions: {
levels: [1, 2, 3, 4, 5, 6],

@@ -56,6 +71,3 @@ HTMLAttributes: {},

return {
/**
* Set a heading node
*/
setHeading: (attributes: { level: Level }): Command => ({ commands }) => {
setHeading: attributes => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {

@@ -67,6 +79,3 @@ return false

},
/**
* Toggle a heading node
*/
toggleHeading: (attributes: { level: Level }): Command => ({ commands }) => {
toggleHeading: attributes => ({ commands }) => {
if (!this.options.levels.includes(attributes.level)) {

@@ -96,7 +105,1 @@ return false

})
declare module '@tiptap/core' {
interface AllExtensions {
Heading: typeof Heading,
}
}

Sorry, the diff of this file is too big to display

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