prosemirror-flat-list
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -66,3 +66,3 @@ import { Command, Plugin } from 'prosemirror-state'; | ||
declare function listToDOM(node: Node, nativeList: boolean, markerToDOM?: MarkerToDOM): DOMOutputSpec; | ||
type MarkerToDOM = (attrs: ListAttributes) => DOMOutputSpec | null; | ||
type MarkerToDOM = (attrs: ListAttributes) => DOMOutputSpec[] | null; | ||
declare const defaultMarkerToDOM: MarkerToDOM; | ||
@@ -69,0 +69,0 @@ |
@@ -91,10 +91,10 @@ // src/commands/dedent-list.ts | ||
const contentContainer = ["div", { class: "list-content" }, 0]; | ||
if (marker != null) { | ||
if (marker) { | ||
const markerContainer = [ | ||
"div", | ||
{ | ||
class: "list-marker", | ||
class: "list-marker list-marker-click-target", | ||
contenteditable: "false" | ||
}, | ||
marker | ||
...marker | ||
]; | ||
@@ -116,10 +116,12 @@ return nativeList ? [ | ||
return [ | ||
"label", | ||
[ | ||
"input", | ||
{ type: "checkbox", checked: attrs.checked ? "" : void 0 } | ||
"label", | ||
[ | ||
"input", | ||
{ type: "checkbox", checked: attrs.checked ? "" : void 0 } | ||
] | ||
] | ||
]; | ||
case "toggle": | ||
return ["span"]; | ||
return []; | ||
default: | ||
@@ -780,3 +782,3 @@ return null; | ||
const target = event.target; | ||
if (target == null ? void 0 : target.classList.contains("list-marker")) { | ||
if (target == null ? void 0 : target.classList.contains("list-marker-click-target")) { | ||
event.preventDefault(); | ||
@@ -783,0 +785,0 @@ const pos = view.posAtDOM(target, -10, -10); |
{ | ||
"name": "prosemirror-flat-list", | ||
"type": "module", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "", | ||
@@ -6,0 +6,0 @@ "author": "ocavue <ocavue@gmail.com>", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70039
2149