Socket
Socket
Sign inDemoInstall

@wedevign/rich-markdown-editor

Package Overview
Dependencies
139
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 12.1.0 to 12.1.1

116

dist/menus/block.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEmbedsGroup = exports.getGroupedMenuItems = void 0;
const outline_icons_1 = require("outline-icons");
const icons_1 = require("../icons");
const removeMarks_1 = __importDefault(require("../commands/removeMarks"));
const SSR = typeof window === "undefined";
const isMac = !SSR && window.navigator.platform === "MacIntel";
const mod = isMac ? "⌘" : "ctrl";
const HIGHLIGHT_RADIUS = 12;
const getGroupedMenuItems = (view, dictionary) => {
const { state } = view;
const { schema } = state;
const allMarks = [
schema.marks.highlight_default,
schema.marks.highlight_orange,
schema.marks.highlight_yellow,
schema.marks.highlight_green,
schema.marks.highlight_blue,
];
return [

@@ -95,9 +80,2 @@ {

{
name: "image",
title: dictionary.image,
icon: outline_icons_1.ImageIcon,
searchKeyword: "image",
keywords: "picture photo",
},
{
name: "table",

@@ -173,96 +151,2 @@ title: dictionary.table,

},
{
groupData: {
name: "Highlight",
},
items: [
{
name: "highlight_default",
title: "Red",
icon: icons_1.CircleIcon,
iconSVGProps: {
r: HIGHLIGHT_RADIUS,
cx: HIGHLIGHT_RADIUS,
cy: HIGHLIGHT_RADIUS,
fill: schema.marks.highlight_default.attrs.color.default,
},
keywords: "highlight red",
searchKeyword: "red",
shortcut: "alt shift 1",
},
{
name: "highlight_orange",
title: "Orange",
icon: icons_1.CircleIcon,
iconSVGProps: {
r: HIGHLIGHT_RADIUS,
cx: HIGHLIGHT_RADIUS,
cy: HIGHLIGHT_RADIUS,
fill: schema.marks.highlight_orange.attrs.color.default,
},
keywords: "highlight orange",
searchKeyword: "orange",
shortcut: "alt shift 2",
},
{
name: "highlight_yellow",
title: "Yellow",
icon: icons_1.CircleIcon,
iconSVGProps: {
r: HIGHLIGHT_RADIUS,
cx: HIGHLIGHT_RADIUS,
cy: HIGHLIGHT_RADIUS,
fill: schema.marks.highlight_yellow.attrs.color.default,
},
keywords: "highlight yellow",
searchKeyword: "yellow",
shortcut: "alt shift 3",
},
{
name: "highlight_green",
title: "Green",
icon: icons_1.CircleIcon,
iconSVGProps: {
r: HIGHLIGHT_RADIUS,
cx: HIGHLIGHT_RADIUS,
cy: HIGHLIGHT_RADIUS,
fill: schema.marks.highlight_green.attrs.color.default,
},
keywords: "highlight green",
searchKeyword: "green",
shortcut: "alt shift 4",
},
{
name: "highlight_blue",
title: "Blue",
icon: icons_1.CircleIcon,
iconSVGProps: {
r: HIGHLIGHT_RADIUS,
cx: HIGHLIGHT_RADIUS,
cy: HIGHLIGHT_RADIUS,
fill: schema.marks.highlight_blue.attrs.color.default,
},
keywords: "highlight blue",
searchKeyword: "blue",
shortcut: "alt shift 5",
},
{
name: "highlight_remove",
title: "No highlight",
icon: icons_1.CircleIcon,
iconSVGProps: {
r: HIGHLIGHT_RADIUS - 1,
cx: HIGHLIGHT_RADIUS,
cy: HIGHLIGHT_RADIUS,
strokeWidth: 1,
fill: "#fff",
stroke: "#777",
},
keywords: "highlight remove unhighlight",
searchKeyword: "unhighlight",
shortcut: "",
customOnClick: () => removeMarks_1.default(view, allMarks),
},
],
},
];

@@ -269,0 +153,0 @@ };

79

dist/menus/formatting.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -28,6 +9,4 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const isInList_1 = __importDefault(require("../queries/isInList"));
const isMarkActive_1 = __importStar(require("../queries/isMarkActive"));
const isMarkActive_1 = __importDefault(require("../queries/isMarkActive"));
const isNodeActive_1 = __importDefault(require("../queries/isNodeActive"));
const removeMarks_1 = __importDefault(require("../commands/removeMarks"));
const icons_1 = require("../icons");
function formattingMenuItems(view, isTemplate, dictionary) {

@@ -39,9 +18,2 @@ const { state } = view;

const allowBlocks = !isTable && !isList;
const allMarks = [
schema.marks.highlight_default,
schema.marks.highlight_orange,
schema.marks.highlight_yellow,
schema.marks.highlight_green,
schema.marks.highlight_blue,
];
return [

@@ -76,51 +48,2 @@ {

{
name: "highlight_default",
tooltip: "Red Highlight",
icon: outline_icons_1.HighlightIcon,
iconColor: schema.marks.highlight_default.attrs.color.default,
active: isMarkActive_1.default(schema.marks.highlight_default),
visible: !isTemplate,
},
{
name: "highlight_orange",
tooltip: "Orange Highlight",
icon: outline_icons_1.HighlightIcon,
iconColor: schema.marks.highlight_orange.attrs.color.default,
active: isMarkActive_1.default(schema.marks.highlight_orange),
visible: !isTemplate,
},
{
name: "highlight_yellow",
tooltip: "Yellow Highlight",
icon: outline_icons_1.HighlightIcon,
iconColor: schema.marks.highlight_yellow.attrs.color.default,
active: isMarkActive_1.default(schema.marks.highlight_yellow),
visible: !isTemplate,
},
{
name: "highlight_green",
tooltip: "Green Highlight",
icon: outline_icons_1.HighlightIcon,
iconColor: schema.marks.highlight_green.attrs.color.default,
active: isMarkActive_1.default(schema.marks.highlight_green),
visible: !isTemplate,
},
{
name: "highlight_blue",
tooltip: "Blue Highlight",
icon: outline_icons_1.HighlightIcon,
iconColor: schema.marks.highlight_blue.attrs.color.default,
active: isMarkActive_1.default(schema.marks.highlight_blue),
visible: !isTemplate,
},
{
name: "highlight_remove",
tooltip: "Remove All Highlights",
icon: icons_1.RemoveIcon,
iconColor: "#fff",
active: isMarkActive_1.isAnyMarkActive(allMarks),
visible: !isTemplate,
customOnClick: () => removeMarks_1.default(view, allMarks),
},
{
name: "separator",

@@ -127,0 +50,0 @@ visible: allowBlocks,

2

package.json
{
"name": "@wedevign/rich-markdown-editor",
"description": "A rich text editor with Markdown shortcuts",
"version": "12.1.0",
"version": "12.1.1",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "typings": "dist/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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