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

@prosekit/extensions

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prosekit/extensions - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

dist/prosekit-extensions-link.d.ts

14

dist/prosekit-extensions-blockquote.js

@@ -6,10 +6,8 @@ // src/blockquote/index.ts

name: "blockquote",
spec: {
content: "block+",
group: "block",
defining: true,
parseDOM: [{ tag: "blockquote" }],
toDOM() {
return ["blockquote", 0];
}
content: "block+",
group: "block",
defining: true,
parseDOM: [{ tag: "blockquote" }],
toDOM() {
return ["blockquote", 0];
}

@@ -16,0 +14,0 @@ });

@@ -12,25 +12,23 @@ // src/bold/index.ts

name: "bold",
spec: {
parseDOM: [
{ tag: "strong" },
// This works around a Google Docs misbehavior where
// pasted content will be inexplicably wrapped in `<b>`
// tags with a font-weight normal.
{
tag: "b",
getAttrs: (node) => {
return typeof node !== "string" && node.style.fontWeight !== "normal" && null;
}
},
{ style: "font-weight=400", clearMark: (m) => m.type.name == "strong" },
{
style: "font-weight",
getAttrs: (value) => {
return typeof value === "string" && /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null;
}
parseDOM: [
{ tag: "strong" },
// This works around a Google Docs misbehavior where
// pasted content will be inexplicably wrapped in `<b>`
// tags with a font-weight normal.
{
tag: "b",
getAttrs: (node) => {
return typeof node !== "string" && node.style.fontWeight !== "normal" && null;
}
],
toDOM() {
return ["em", 0];
},
{ style: "font-weight=400", clearMark: (m) => m.type.name == "strong" },
{
style: "font-weight",
getAttrs: (value) => {
return typeof value === "string" && /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null;
}
}
],
toDOM() {
return ["em", 0];
}

@@ -37,0 +35,0 @@ });

@@ -6,7 +6,5 @@ // src/code/index.ts

name: "code",
spec: {
parseDOM: [{ tag: "code" }],
toDOM() {
return ["code", 0];
}
parseDOM: [{ tag: "code" }],
toDOM() {
return ["code", 0];
}

@@ -13,0 +11,0 @@ });

@@ -14,18 +14,16 @@ // src/heading/index.ts

name: "heading",
spec: {
attrs: { level: { default: 1 } },
content: "inline*",
group: "block",
defining: true,
parseDOM: [
{ tag: "h1", attrs: { level: 1 } },
{ tag: "h2", attrs: { level: 2 } },
{ tag: "h3", attrs: { level: 3 } },
{ tag: "h4", attrs: { level: 4 } },
{ tag: "h5", attrs: { level: 5 } },
{ tag: "h6", attrs: { level: 6 } }
],
toDOM(node) {
return [`h${node.attrs.level}`, 0];
}
attrs: { level: { default: 1 } },
content: "inline*",
group: "block",
defining: true,
parseDOM: [
{ tag: "h1", attrs: { level: 1 } },
{ tag: "h2", attrs: { level: 2 } },
{ tag: "h3", attrs: { level: 3 } },
{ tag: "h4", attrs: { level: 4 } },
{ tag: "h5", attrs: { level: 5 } },
{ tag: "h6", attrs: { level: 6 } }
],
toDOM(node) {
return [`h${node.attrs.level}`, 0];
}

@@ -32,0 +30,0 @@ });

@@ -12,15 +12,13 @@ // src/italic/index.ts

name: "italic",
spec: {
parseDOM: [
{ tag: "i" },
{ tag: "em" },
{ style: "font-style=italic" },
{
style: "font-style=normal",
clearMark: (m) => m.type.name === "italic"
}
],
toDOM() {
return ["em", 0];
parseDOM: [
{ tag: "i" },
{ tag: "em" },
{ style: "font-style=italic" },
{
style: "font-style=normal",
clearMark: (m) => m.type.name === "italic"
}
],
toDOM() {
return ["em", 0];
}

@@ -27,0 +25,0 @@ });

@@ -16,3 +16,3 @@ // src/list/index.ts

function addListSpec() {
return addNodeSpec({ name: "list", spec: createListSpec() });
return addNodeSpec({ ...createListSpec(), name: "list" });
}

@@ -19,0 +19,0 @@ function addListPlugins() {

@@ -6,32 +6,30 @@ // src/mention/index.ts

name: "mention",
spec: {
atom: true,
group: "inline",
attrs: {
id: {},
value: {},
kind: { default: "" }
},
inline: true,
leafText: (node) => node.attrs.value.toString(),
parseDOM: [
atom: true,
group: "inline",
attrs: {
id: {},
value: {},
kind: { default: "" }
},
inline: true,
leafText: (node) => node.attrs.value.toString(),
parseDOM: [
{
tag: `span[data-mention]`,
getAttrs: (dom) => ({
id: dom.getAttribute("data-id") || "",
kind: dom.getAttribute("data-mention") || "",
value: dom.textContent || ""
})
}
],
toDOM(node) {
return [
"span",
{
tag: `span[data-mention]`,
getAttrs: (dom) => ({
id: dom.getAttribute("data-id") || "",
kind: dom.getAttribute("data-mention") || "",
value: dom.textContent || ""
})
}
],
toDOM(node) {
return [
"span",
{
"data-id": node.attrs.id.toString(),
"data-mention": node.attrs.kind.toString()
},
node.attrs.value.toString()
];
}
"data-id": node.attrs.id.toString(),
"data-mention": node.attrs.kind.toString()
},
node.attrs.value.toString()
];
}

@@ -38,0 +36,0 @@ });

{
"name": "@prosekit/extensions",
"type": "module",
"version": "0.0.6",
"version": "0.0.7",
"private": false,

@@ -63,2 +63,7 @@ "author": {

},
"./link": {
"types": "./dist/prosekit-extensions-link.d.ts",
"import": "./dist/prosekit-extensions-link.js",
"default": "./dist/prosekit-extensions-link.js"
},
"./list": {

@@ -95,11 +100,11 @@ "types": "./dist/prosekit-extensions-list.d.ts",

"dependencies": {
"@prosekit/core": "^0.0.6",
"@prosekit/core": "^0.0.7",
"@prosekit/pm": "^0.0.3",
"prosemirror-flat-list": "^0.3.15"
"prosemirror-flat-list": "^0.4.1"
},
"devDependencies": {
"@prosekit/dev": "*",
"tsup": "^7.1.0",
"tsup": "^7.2.0",
"typescript": "^5.1.6",
"vitest": "^0.33.0"
"vitest": "^0.34.1"
},

@@ -134,2 +139,5 @@ "scripts": {

],
"link": [
"./dist/prosekit-extensions-link.d.ts"
],
"list": [

@@ -136,0 +144,0 @@ "./dist/prosekit-extensions-list.d.ts"

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