Socket
Socket
Sign inDemoInstall

@milkdown/plugin-diagram

Package Overview
Dependencies
198
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.4.1 to 5.5.0

16

lib/index.es.js

@@ -119,3 +119,3 @@ var __defProp = Object.defineProperty;

var _a;
return ((_a = node == null ? void 0 : node.attrs) == null ? void 0 : _a.identity) || nanoid();
return ((_a = node == null ? void 0 : node.attrs) == null ? void 0 : _a["identity"]) || nanoid();
};

@@ -208,3 +208,3 @@ const getStyle = (utils) => {

return {
value: dom.dataset.value,
value: dom.dataset["value"],
identity: dom.id

@@ -223,3 +223,3 @@ };

"data-type": id,
"data-value": node.attrs.value
"data-value": node.attrs["value"]
},

@@ -232,3 +232,3 @@ 0

runner: (state, node, type) => {
const value = node.value;
const value = node["value"];
state.openNode(type, { value });

@@ -257,4 +257,4 @@ if (value) {

const code = document.createElement("div");
code.dataset.type = id;
code.dataset.value = node.attrs.value;
code.dataset["type"] = id;
code.dataset["value"] = node.attrs["value"];
if (codeStyle && hideCodeStyle) {

@@ -287,3 +287,3 @@ code.classList.add(codeStyle, hideCodeStyle);

};
render(node.attrs.value);
render(node.attrs["value"]);
return {

@@ -314,3 +314,3 @@ dom,

const newVal = ((_a2 = updatedNode.content.firstChild) == null ? void 0 : _a2.text) || "";
code.dataset.value = newVal;
code.dataset["value"] = newVal;
render(newVal);

@@ -317,0 +317,0 @@ return true;

{
"name": "@milkdown/plugin-diagram",
"version": "5.4.1",
"version": "5.5.0",
"type": "module",

@@ -20,4 +20,4 @@ "main": "./lib/index.es.js",

"devDependencies": {
"@milkdown/core": "5.4.1",
"@milkdown/prose": "5.4.1"
"@milkdown/core": "5.5.0",
"@milkdown/prose": "5.5.0"
},

@@ -30,3 +30,3 @@ "peerDependencies": {

"@types/mermaid": "^8.2.7",
"@milkdown/utils": "5.4.1",
"@milkdown/utils": "5.5.0",
"mermaid": "^8.12.1",

@@ -33,0 +33,0 @@ "nanoid": "^3.1.25",

@@ -64,3 +64,3 @@ /* Copyright 2021, Milkdown by Mirone. */

return {
value: dom.dataset.value,
value: dom.dataset['value'],
identity: dom.id,

@@ -79,3 +79,3 @@ };

'data-type': id,
'data-value': node.attrs.value,
'data-value': node.attrs['value'],
},

@@ -88,3 +88,3 @@ 0,

runner: (state, node, type) => {
const value = node.value as string;
const value = node['value'] as string;
state.openNode(type, { value });

@@ -113,4 +113,4 @@ if (value) {

const code = document.createElement('div');
code.dataset.type = id;
code.dataset.value = node.attrs.value;
code.dataset['type'] = id;
code.dataset['value'] = node.attrs['value'];
if (codeStyle && hideCodeStyle) {

@@ -147,3 +147,3 @@ code.classList.add(codeStyle, hideCodeStyle);

render(node.attrs.value);
render(node.attrs['value']);

@@ -177,3 +177,3 @@ return {

const newVal = updatedNode.content.firstChild?.text || '';
code.dataset.value = newVal;
code.dataset['value'] = newVal;

@@ -180,0 +180,0 @@ render(newVal);

@@ -36,2 +36,2 @@ /* Copyright 2021, Milkdown by Mirone. */

export const getId = (node?: Node) => node?.attrs?.identity || nanoid();
export const getId = (node?: Node) => node?.attrs?.['identity'] || nanoid();

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc