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

@milkdown/preset-gfm

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@milkdown/preset-gfm - npm Package Compare versions

Comparing version 7.2.2 to 7.2.3

43

./lib/index.es.js

@@ -5,7 +5,6 @@ import { expectDomTypeError as O } from "@milkdown/exception";

import { $markAttr as $e, $markSchema as _e, $command as h, $useKeymap as ee, $nodeSchema as k, $inputRule as te, $prose as B, $remark as Pe } from "@milkdown/utils";
import { commandsCtx as A } from "@milkdown/core";
import { commandsCtx as M } from "@milkdown/core";
import { TextSelection as Ee, Selection as oe, PluginKey as De, Plugin as Oe } from "@milkdown/prose/state";
import { TableMap as g, CellSelection as y, tableNodes as Be, goToNextCell as ne, isInTable as N, deleteTable as Ke, deleteColumn as He, deleteRow as Le, addColumnBefore as Fe, addColumnAfter as We, selectedRect as le, setCellAttr as ze, columnResizing as Ge, tableEditing as je } from "@milkdown/prose/tables";
import { findParentNode as Ze, cloneTr as M, browser as V } from "@milkdown/prose";
import { toggleMark as Ve } from "@milkdown/prose/commands";
import { toggleMarkdownMark as Ze, findParentNode as Ve, cloneTr as A, browser as V } from "@milkdown/prose";
import Ue from "remark-gfm";

@@ -23,3 +22,2 @@ const d = (e, t) => (Object.assign(e, {

const x = _e("strike_through", (e) => ({
inclusive: !1,
parseDOM: [

@@ -51,3 +49,6 @@ { tag: "del" },

});
const H = h("ToggleStrikeThrough", () => () => Ve(x.type()));
const H = h("ToggleStrikeThrough", () => () => {
const e = x.type();
return Ze(e, "~~");
});
d(H, {

@@ -61,3 +62,3 @@ displayName: "Command<ToggleStrikethrough>",

command: (e) => {
const t = e.get(A);
const t = e.get(M);
return () => t.call(H.key);

@@ -78,3 +79,3 @@ }

return T.type().create(null, l);
}, w = (e) => Ze((t) => t.type.spec.tableRole === "table")(e), b = (e, t) => {
}, w = (e) => Ve((t) => t.type.spec.tableRole === "table")(e), b = (e, t) => {
const n = w(t);

@@ -133,3 +134,3 @@ if (!n)

const l = e.doc.resolve(o.pos);
return M(e.setSelection(new y(l, n)));
return A(e.setSelection(new y(l, n)));
}

@@ -156,3 +157,3 @@ }

), i = n.doc.resolve(o.start + a), c = l ? y.rowSelection : y.colSelection, m = r.positionAt(l ? t : 0, l ? 0 : t, o.node), s = n.doc.resolve(o.start + m);
return M(n.setSelection(c(i, s)));
return A(n.setSelection(c(i, s)));
}

@@ -294,3 +295,3 @@ }

0
), c = M(e).replaceWith(
), c = A(e).replaceWith(
l.pos,

@@ -317,3 +318,3 @@ l.pos + l.node.nodeSize,

0
), c = M(e).replaceWith(
), c = A(e).replaceWith(
l.pos,

@@ -593,3 +594,3 @@ l.pos + l.node.nodeSize,

command: (e) => {
const t = e.get(A);
const t = e.get(M);
return () => t.call(W.key);

@@ -601,3 +602,3 @@ }

command: (e) => {
const t = e.get(A);
const t = e.get(M);
return () => t.call(F.key);

@@ -609,3 +610,3 @@ }

command: (e) => {
const t = e.get(A);
const t = e.get(M);
return () => t.call(z.key);

@@ -829,3 +830,3 @@ }

Re
], Ae = B(() => {
], Me = B(() => {
const e = new De("MILKDOWN_AUTO_INSERT_ZERO_SPACE"), t = (o) => o.type === Q.type(), n = (o) => t(o) && o.nodeSize === 2;

@@ -848,8 +849,8 @@ return new Oe({

});
d(Ae, {
d(Me, {
displayName: "Prose<autoInsertZeroSpaceInTablePlugin>",
group: "Prose"
});
const Me = B(() => Ge({}));
d(Me, {
const Ae = B(() => Ge({}));
d(Ae, {
displayName: "Prose<columnResizingPlugin>",

@@ -869,4 +870,4 @@ group: "Prose"

const rt = [
Me,
Ae,
Me,
xe,

@@ -901,3 +902,3 @@ ve

H
], Ct = [at, lt, nt, rt, st].flat();
], bt = [at, lt, nt, rt, st].flat();
export {

@@ -920,3 +921,3 @@ ke as addColAfterCommand,

C as getCellsInRow,
Ct as gfm,
bt as gfm,
W as goToNextTableCellCommand,

@@ -923,0 +924,0 @@ F as goToPrevTableCellCommand,

@@ -5,7 +5,6 @@ import { expectDomTypeError as O } from "@milkdown/exception";

import { $markAttr as $e, $markSchema as _e, $command as h, $useKeymap as ee, $nodeSchema as k, $inputRule as te, $prose as B, $remark as Pe } from "@milkdown/utils";
import { commandsCtx as A } from "@milkdown/core";
import { commandsCtx as M } from "@milkdown/core";
import { TextSelection as Ee, Selection as oe, PluginKey as De, Plugin as Oe } from "@milkdown/prose/state";
import { TableMap as g, CellSelection as y, tableNodes as Be, goToNextCell as ne, isInTable as N, deleteTable as Ke, deleteColumn as He, deleteRow as Le, addColumnBefore as Fe, addColumnAfter as We, selectedRect as le, setCellAttr as ze, columnResizing as Ge, tableEditing as je } from "@milkdown/prose/tables";
import { findParentNode as Ze, cloneTr as M, browser as V } from "@milkdown/prose";
import { toggleMark as Ve } from "@milkdown/prose/commands";
import { toggleMarkdownMark as Ze, findParentNode as Ve, cloneTr as A, browser as V } from "@milkdown/prose";
import Ue from "remark-gfm";

@@ -23,3 +22,2 @@ const d = (e, t) => (Object.assign(e, {

const x = _e("strike_through", (e) => ({
inclusive: !1,
parseDOM: [

@@ -51,3 +49,6 @@ { tag: "del" },

});
const H = h("ToggleStrikeThrough", () => () => Ve(x.type()));
const H = h("ToggleStrikeThrough", () => () => {
const e = x.type();
return Ze(e, "~~");
});
d(H, {

@@ -61,3 +62,3 @@ displayName: "Command<ToggleStrikethrough>",

command: (e) => {
const t = e.get(A);
const t = e.get(M);
return () => t.call(H.key);

@@ -78,3 +79,3 @@ }

return T.type().create(null, l);
}, w = (e) => Ze((t) => t.type.spec.tableRole === "table")(e), b = (e, t) => {
}, w = (e) => Ve((t) => t.type.spec.tableRole === "table")(e), b = (e, t) => {
const n = w(t);

@@ -133,3 +134,3 @@ if (!n)

const l = e.doc.resolve(o.pos);
return M(e.setSelection(new y(l, n)));
return A(e.setSelection(new y(l, n)));
}

@@ -156,3 +157,3 @@ }

), i = n.doc.resolve(o.start + a), c = l ? y.rowSelection : y.colSelection, m = r.positionAt(l ? t : 0, l ? 0 : t, o.node), s = n.doc.resolve(o.start + m);
return M(n.setSelection(c(i, s)));
return A(n.setSelection(c(i, s)));
}

@@ -294,3 +295,3 @@ }

0
), c = M(e).replaceWith(
), c = A(e).replaceWith(
l.pos,

@@ -317,3 +318,3 @@ l.pos + l.node.nodeSize,

0
), c = M(e).replaceWith(
), c = A(e).replaceWith(
l.pos,

@@ -593,3 +594,3 @@ l.pos + l.node.nodeSize,

command: (e) => {
const t = e.get(A);
const t = e.get(M);
return () => t.call(W.key);

@@ -601,3 +602,3 @@ }

command: (e) => {
const t = e.get(A);
const t = e.get(M);
return () => t.call(F.key);

@@ -609,3 +610,3 @@ }

command: (e) => {
const t = e.get(A);
const t = e.get(M);
return () => t.call(z.key);

@@ -829,3 +830,3 @@ }

Re
], Ae = B(() => {
], Me = B(() => {
const e = new De("MILKDOWN_AUTO_INSERT_ZERO_SPACE"), t = (o) => o.type === Q.type(), n = (o) => t(o) && o.nodeSize === 2;

@@ -848,8 +849,8 @@ return new Oe({

});
d(Ae, {
d(Me, {
displayName: "Prose<autoInsertZeroSpaceInTablePlugin>",
group: "Prose"
});
const Me = B(() => Ge({}));
d(Me, {
const Ae = B(() => Ge({}));
d(Ae, {
displayName: "Prose<columnResizingPlugin>",

@@ -869,4 +870,4 @@ group: "Prose"

const rt = [
Me,
Ae,
Me,
xe,

@@ -901,3 +902,3 @@ ve

H
], Ct = [at, lt, nt, rt, st].flat();
], bt = [at, lt, nt, rt, st].flat();
export {

@@ -920,3 +921,3 @@ ke as addColAfterCommand,

C as getCellsInRow,
Ct as gfm,
bt as gfm,
W as goToNextTableCellCommand,

@@ -923,0 +924,0 @@ F as goToPrevTableCellCommand,

{
"name": "@milkdown/preset-gfm",
"type": "module",
"version": "7.2.2",
"version": "7.2.3",
"license": "MIT",

@@ -34,11 +34,11 @@ "repository": {

"tslib": "^2.5.0",
"@milkdown/exception": "7.2.2",
"@milkdown/utils": "7.2.2"
"@milkdown/exception": "7.2.3",
"@milkdown/utils": "7.2.3"
},
"devDependencies": {
"@milkdown/core": "7.2.2",
"@milkdown/ctx": "7.2.2",
"@milkdown/preset-commonmark": "7.2.2",
"@milkdown/prose": "7.2.2",
"@milkdown/transformer": "7.2.2"
"@milkdown/core": "7.2.3",
"@milkdown/ctx": "7.2.3",
"@milkdown/preset-commonmark": "7.2.3",
"@milkdown/prose": "7.2.3",
"@milkdown/transformer": "7.2.3"
},

@@ -45,0 +45,0 @@ "nx": {

/* Copyright 2021, Milkdown by Mirone. */
import { commandsCtx } from '@milkdown/core'
import { toggleMark } from '@milkdown/prose/commands'
import { $command, $markAttr, $markSchema, $useKeymap } from '@milkdown/utils'
import { toggleMarkdownMark } from '@milkdown/prose'
import { withMeta } from '../__internal__'

@@ -17,3 +17,2 @@

export const strikethroughSchema = $markSchema('strike_through', ctx => ({
inclusive: false,
parseDOM: [

@@ -51,3 +50,7 @@ { tag: 'del' },

/// A command to toggle the strikethrough mark.
export const toggleStrikethroughCommand = $command('ToggleStrikeThrough', () => () => toggleMark(strikethroughSchema.type()))
export const toggleStrikethroughCommand = $command('ToggleStrikeThrough', () => () => {
const markType = strikethroughSchema.type()
const mark = '~~'
return toggleMarkdownMark(markType, mark)
})

@@ -54,0 +57,0 @@ withMeta(toggleStrikethroughCommand, {

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc