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

prosemirror-flat-list

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-flat-list - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

17

./dist/prosemirror-flat-list.js

@@ -1418,2 +1418,15 @@ // src/commands/dedent-list.ts

// src/utils/unwrap-list-slice.ts
import { Slice as Slice4 } from "prosemirror-model";
function unwrapListSlice(slice) {
while (slice.openStart >= 2 && slice.openEnd >= 2 && slice.content.childCount === 1 && isListNode(slice.content.child(0))) {
slice = new Slice4(
slice.content.child(0).content,
slice.openStart - 1,
slice.openEnd - 1
);
}
return slice;
}
// src/plugins/clipboard.ts

@@ -1423,3 +1436,4 @@ function createListClipboardPlugin(schema) {

props: {
clipboardSerializer: ListDOMSerializer.fromSchema(schema)
clipboardSerializer: ListDOMSerializer.fromSchema(schema),
transformCopied: unwrapListSlice
}

@@ -1557,3 +1571,4 @@ });

setSafeSelection,
unwrapListSlice,
wrappingListInputRule
};

@@ -19,2 +19,3 @@ import type { Attrs } from 'prosemirror-model';

import { Schema } from 'prosemirror-model';
import { Slice } from 'prosemirror-model';
import { Transaction } from 'prosemirror-state';

@@ -477,2 +478,10 @@

/**
* Reduce the open depth of a slice if it only contains a single list node. This
* will improve the copy/paste experience.
*
* @internal
*/
export declare function unwrapListSlice(slice: Slice): Slice;
/**
* Build an input rule for automatically wrapping a textblock into a list node

@@ -479,0 +488,0 @@ * when a given string is typed.

@@ -1418,2 +1418,15 @@ // src/commands/dedent-list.ts

// src/utils/unwrap-list-slice.ts
import { Slice as Slice4 } from "prosemirror-model";
function unwrapListSlice(slice) {
while (slice.openStart >= 2 && slice.openEnd >= 2 && slice.content.childCount === 1 && isListNode(slice.content.child(0))) {
slice = new Slice4(
slice.content.child(0).content,
slice.openStart - 1,
slice.openEnd - 1
);
}
return slice;
}
// src/plugins/clipboard.ts

@@ -1423,3 +1436,4 @@ function createListClipboardPlugin(schema) {

props: {
clipboardSerializer: ListDOMSerializer.fromSchema(schema)
clipboardSerializer: ListDOMSerializer.fromSchema(schema),
transformCopied: unwrapListSlice
}

@@ -1557,3 +1571,4 @@ });

setSafeSelection,
unwrapListSlice,
wrappingListInputRule
};

2

package.json
{
"name": "prosemirror-flat-list",
"type": "module",
"version": "0.3.5",
"version": "0.3.6",
"description": "Powerful list support for ProseMirror",

@@ -6,0 +6,0 @@ "author": "ocavue <ocavue@gmail.com>",

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