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

prosemirror-tables

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-tables - npm Package Compare versions

Comparing version 0.7.4 to 0.7.5

2

package.json
{
"name": "prosemirror-tables",
"version": "0.7.4",
"version": "0.7.5",
"description": "ProseMirror's rowspan/colspan tables component",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -10,3 +10,3 @@ import {Plugin, PluginKey} from "prosemirror-state"

export function columnResizing({ handleWidth = 5, cellMinWidth = 25, View = TableView } = {}) {
export function columnResizing({ handleWidth = 5, cellMinWidth = 25, View = TableView, lastColumnResizable = true } = {}) {
let plugin = new Plugin({

@@ -31,3 +31,3 @@ key,

handleDOMEvents: {
mousemove(view, event) { handleMouseMove(view, event, handleWidth, cellMinWidth) },
mousemove(view, event) { handleMouseMove(view, event, handleWidth, cellMinWidth, lastColumnResizable) },
mouseleave(view) { handleMouseLeave(view) },

@@ -69,3 +69,3 @@ mousedown(view, event) { handleMouseDown(view, event, cellMinWidth) }

function handleMouseMove(view, event, handleWidth, cellMinWidth) {
function handleMouseMove(view, event, handleWidth, cellMinWidth, lastColumnResizable) {
let pluginState = key.getState(view.state)

@@ -82,3 +82,16 @@

}
if (cell != pluginState.activeHandle) updateHandle(view, cell)
if (cell != pluginState.activeHandle) {
if (!lastColumnResizable && cell !== -1) {
let $cell = view.state.doc.resolve(cell)
let table = $cell.node(-1), map = TableMap.get(table), start = $cell.start(-1)
let col = map.colCount($cell.pos - start) + $cell.nodeAfter.attrs.colspan - 1
if (col == map.width - 1) {
return
}
}
updateHandle(view, cell)
}
}

@@ -85,0 +98,0 @@ }

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

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