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.2 to 12.1.3

dist/marks/ExerciseProgressionLink.d.ts

2

dist/components/BlockMenu.d.ts
import React from "react";
import { Props } from "./KnowtCommandMenu";
import { GroupMenuItem } from "../types";
declare type BlockMenuProps = Omit<Props, "renderMenuItem" | "renderGroupMenuItem" | "allGroups" | "visibleGroups" | "onClearSearch"> & Required<Pick<Props, "onLinkToolbarOpen" | "onArticleLinkToolbarOpen" | "onExerciseLinkToolbarOpen" | "onMethodLinkToolbarOpen" | "embeds">>;
declare type BlockMenuProps = Omit<Props, "renderMenuItem" | "renderGroupMenuItem" | "allGroups" | "visibleGroups" | "onClearSearch"> & Required<Pick<Props, "onLinkToolbarOpen" | "onArticleLinkToolbarOpen" | "onExerciseLinkToolbarOpen" | "onExerciseSetLinkToolbarOpen" | "onExerciseProgressionLinkToolbarOpen" | "onMethodLinkToolbarOpen" | "onMethodSetLinkToolbarOpen" | "onMethodProgressionLinkToolbarOpen" | "embeds">>;
declare class BlockMenu extends React.Component<BlockMenuProps> {

@@ -6,0 +6,0 @@ get groupedItems(): GroupMenuItem[];

@@ -19,3 +19,7 @@ import * as React from "react";

onExerciseLinkToolbarOpen?: () => void;
onExerciseSetLinkToolbarOpen?: () => void;
onExerciseProgressionLinkToolbarOpen?: () => void;
onMethodLinkToolbarOpen?: () => void;
onMethodSetLinkToolbarOpen?: () => void;
onMethodProgressionLinkToolbarOpen?: () => void;
onClose: () => void;

@@ -22,0 +26,0 @@ onClearSearch: (clearLength: number) => void;

@@ -162,3 +162,3 @@ "use strict";

this.insertItem = (item) => {
var _a, _b, _c, _d, _e, _f, _g, _h;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
this.clearSearch();

@@ -190,7 +190,27 @@ if (item.customOnClick) {

}
case "exercise_set_link": {
this.close();
(_h = (_g = this.props).onExerciseSetLinkToolbarOpen) === null || _h === void 0 ? void 0 : _h.call(_g);
return;
}
case "exercise_progression_link": {
this.close();
(_k = (_j = this.props).onExerciseProgressionLinkToolbarOpen) === null || _k === void 0 ? void 0 : _k.call(_j);
return;
}
case "method_link": {
this.close();
(_h = (_g = this.props).onMethodLinkToolbarOpen) === null || _h === void 0 ? void 0 : _h.call(_g);
(_m = (_l = this.props).onMethodLinkToolbarOpen) === null || _m === void 0 ? void 0 : _m.call(_l);
return;
}
case "method_set_link": {
this.close();
(_p = (_o = this.props).onMethodSetLinkToolbarOpen) === null || _p === void 0 ? void 0 : _p.call(_o);
return;
}
case "method_progression_link": {
this.close();
(_r = (_q = this.props).onMethodProgressionLinkToolbarOpen) === null || _r === void 0 ? void 0 : _r.call(_q);
return;
}
default:

@@ -197,0 +217,0 @@ this.insertBlock(item);

@@ -69,2 +69,10 @@ export declare const base: {

createNewExercise: string;
exerciseSet: string;
searchOrPasteExerciseSetLink: string;
findOrCreateExerciseSet: string;
createNewExerciseSet: string;
exerciseProgression: string;
searchOrPasteExerciseProgressionLink: string;
findOrCreateExerciseProgression: string;
createNewExerciseProgression: string;
method: string;

@@ -74,4 +82,12 @@ searchOrPasteMethodLink: string;

createNewMethod: string;
methodSet: string;
searchOrPasteMethodSetLink: string;
findOrCreateMethodSet: string;
createNewMethodSet: string;
methodProgression: string;
searchOrPasteMethodProgressionLink: string;
findOrCreateMethodProgression: string;
createNewMethodProgression: string;
};
export default base;
//# sourceMappingURL=dictionary.d.ts.map

@@ -72,8 +72,24 @@ "use strict";

createNewExercise: "Create a new exercise",
exerciseSet: "Exercise Set",
searchOrPasteExerciseSetLink: "Search exercise set or paste a link…",
findOrCreateExerciseSet: "Find or create an exercise set…",
createNewExerciseSet: "Create a new exercise set",
exerciseProgression: "Exercise Progression",
searchOrPasteExerciseProgressionLink: "Search exercise progression or paste a link…",
findOrCreateExerciseProgression: "Find or create an exercise progression…",
createNewExerciseProgression: "Create a new exercise progression",
method: "Method",
searchOrPasteMethodLink: "Search method or paste a link…",
findOrCreateMethod: "Find or create a method…",
findOrCreateMethod: "Find or create an method…",
createNewMethod: "Create a new method",
methodSet: "Method Set",
searchOrPasteMethodSetLink: "Search method set or paste a link…",
findOrCreateMethodSet: "Find or create an method set…",
createNewMethodSet: "Create a new method set",
methodProgression: "Method Progression",
searchOrPasteMethodProgressionLink: "Search method progression or paste a link…",
findOrCreateMethodProgression: "Find or create an method progression…",
createNewMethodProgression: "Create a new method progression",
};
exports.default = exports.base;
//# sourceMappingURL=dictionary.js.map

@@ -111,3 +111,3 @@ import * as React from "react";

extensions?: Extension[];
disableExtensions?: ("strong" | "code_inline" | "highlight" | "em" | "link" | "article_link" | "exercise_link" | "method_link" | "placeholder" | "strikethrough" | "underline" | "blockquote" | "bullet_list" | "checkbox_item" | "checkbox_list" | "code_block" | "code_fence" | "embed" | "br" | "heading" | "hr" | "image" | "list_item" | "container_notice" | "ordered_list" | "paragraph" | "table" | "td" | "th" | "tr" | "emoji")[];
disableExtensions?: ("strong" | "code_inline" | "highlight" | "em" | "link" | "article_link" | "exercise_link" | "exercise_set_link" | "exercise_progression_link" | "method_link" | "method_set_link" | "method_progression_link" | "placeholder" | "strikethrough" | "underline" | "blockquote" | "bullet_list" | "checkbox_item" | "checkbox_list" | "code_block" | "code_fence" | "embed" | "br" | "heading" | "hr" | "image" | "list_item" | "container_notice" | "ordered_list" | "paragraph" | "table" | "td" | "th" | "tr" | "emoji")[];
fontScale?: number;

@@ -142,4 +142,12 @@ autoFocus?: boolean;

onSearchExerciseLink?: (term: string) => Promise<SearchResult[]>;
onCreateExerciseSetLink?: (title: string) => Promise<string>;
onSearchExerciseSetLink?: (term: string) => Promise<SearchResult[]>;
onCreateExerciseProgressionLink?: (title: string) => Promise<string>;
onSearchExerciseProgressionLink?: (term: string) => Promise<SearchResult[]>;
onCreateMethodLink?: (title: string) => Promise<string>;
onSearchMethodLink?: (term: string) => Promise<SearchResult[]>;
onCreateMethodSetLink?: (title: string) => Promise<string>;
onSearchMethodSetLink?: (term: string) => Promise<SearchResult[]>;
onCreateMethodProgressionLink?: (title: string) => Promise<string>;
onSearchMethodProgressionLink?: (term: string) => Promise<SearchResult[]>;
onClickLink: (href: string, event: MouseEvent) => void;

@@ -164,3 +172,7 @@ onHoverLink?: (event: MouseEvent) => boolean;

exerciseLinkMenuOpen: boolean;
exerciseSetLinkMenuOpen: boolean;
exerciseProgressionLinkMenuOpen: boolean;
methodLinkMenuOpen: boolean;
methodSetLinkMenuOpen: boolean;
methodProgressionLinkMenuOpen: boolean;
blockMenuSearch: string;

@@ -190,3 +202,7 @@ emojiMenuOpen: boolean;

exerciseLinkMenuOpen: boolean;
exerciseSetLinkMenuOpen: boolean;
exerciseProgressionLinkMenuOpen: boolean;
methodLinkMenuOpen: boolean;
methodSetLinkMenuOpen: boolean;
methodProgressionLinkMenuOpen: boolean;
blockMenuSearch: string;

@@ -252,7 +268,15 @@ emojiMenuOpen: boolean;

handleOpenExerciseLinkMenu: () => void;
handleOpenExerciseSetLinkMenu: () => void;
handleOpenExerciseProgressionLinkMenu: () => void;
handleOpenMethodLinkMenu: () => void;
handleOpenMethodSetLinkMenu: () => void;
handleOpenMethodProgressionLinkMenu: () => void;
handleCloseLinkMenu: () => void;
handleCloseArticleLinkMenu: () => void;
handleCloseExerciseLinkMenu: () => void;
handleCloseExerciseSetLinkMenu: () => void;
handleCloseExerciseProgressionLinkMenu: () => void;
handleCloseMethodLinkMenu: () => void;
handleCloseMethodSetLinkMenu: () => void;
handleCloseMethodProgressionLinkMenu: () => void;
handleOpenBlockMenu: (search: string) => void;

@@ -429,2 +453,10 @@ handleCloseBlockMenu: () => void;

createNewExercise: string;
exerciseSet: string;
searchOrPasteExerciseSetLink: string;
findOrCreateExerciseSet: string;
createNewExerciseSet: string;
exerciseProgression: string;
searchOrPasteExerciseProgressionLink: string;
findOrCreateExerciseProgression: string;
createNewExerciseProgression: string;
method: string;

@@ -434,2 +466,10 @@ searchOrPasteMethodLink: string;

createNewMethod: string;
methodSet: string;
searchOrPasteMethodSetLink: string;
findOrCreateMethodSet: string;
createNewMethodSet: string;
methodProgression: string;
searchOrPasteMethodProgressionLink: string;
findOrCreateMethodProgression: string;
createNewMethodProgression: string;
}> | undefined) => {

@@ -503,2 +543,10 @@ addColumnAfter: string;

createNewExercise: string;
exerciseSet: string;
searchOrPasteExerciseSetLink: string;
findOrCreateExerciseSet: string;
createNewExerciseSet: string;
exerciseProgression: string;
searchOrPasteExerciseProgressionLink: string;
findOrCreateExerciseProgression: string;
createNewExerciseProgression: string;
method: string;

@@ -508,2 +556,10 @@ searchOrPasteMethodLink: string;

createNewMethod: string;
methodSet: string;
searchOrPasteMethodSetLink: string;
findOrCreateMethodSet: string;
createNewMethodSet: string;
methodProgression: string;
searchOrPasteMethodProgressionLink: string;
findOrCreateMethodProgression: string;
createNewMethodProgression: string;
}) & import("lodash").MemoizedFunction;

@@ -510,0 +566,0 @@ render(): JSX.Element;

@@ -86,3 +86,7 @@ "use strict";

const ExerciseLink_1 = __importDefault(require("./marks/ExerciseLink"));
const ExerciseSetLink_1 = __importDefault(require("./marks/ExerciseSetLink"));
const ExerciseProgressionLink_1 = __importDefault(require("./marks/ExerciseProgressionLink"));
const MethodLink_1 = __importDefault(require("./marks/MethodLink"));
const MethodSetLink_1 = __importDefault(require("./marks/MethodSetLink"));
const MethodProgressionLink_1 = __importDefault(require("./marks/MethodProgressionLink"));
const BlockMenuTrigger_1 = __importDefault(require("./plugins/BlockMenuTrigger"));

@@ -114,3 +118,7 @@ const EmojiTrigger_1 = __importDefault(require("./plugins/EmojiTrigger"));

exerciseLinkMenuOpen: false,
exerciseSetLinkMenuOpen: false,
exerciseProgressionLinkMenuOpen: false,
methodLinkMenuOpen: false,
methodSetLinkMenuOpen: false,
methodProgressionLinkMenuOpen: false,
blockMenuSearch: "",

@@ -177,5 +185,23 @@ emojiMenuOpen: false,

};
this.handleOpenExerciseSetLinkMenu = () => {
this.setState({ blockMenuOpen: false, exerciseSetLinkMenuOpen: true });
};
this.handleOpenExerciseProgressionLinkMenu = () => {
this.setState({
blockMenuOpen: false,
exerciseProgressionLinkMenuOpen: true,
});
};
this.handleOpenMethodLinkMenu = () => {
this.setState({ blockMenuOpen: false, methodLinkMenuOpen: true });
};
this.handleOpenMethodSetLinkMenu = () => {
this.setState({ blockMenuOpen: false, methodSetLinkMenuOpen: true });
};
this.handleOpenMethodProgressionLinkMenu = () => {
this.setState({
blockMenuOpen: false,
methodProgressionLinkMenuOpen: true,
});
};
this.handleCloseLinkMenu = () => {

@@ -190,5 +216,17 @@ this.setState({ linkMenuOpen: false });

};
this.handleCloseExerciseSetLinkMenu = () => {
this.setState({ exerciseSetLinkMenuOpen: false });
};
this.handleCloseExerciseProgressionLinkMenu = () => {
this.setState({ exerciseProgressionLinkMenuOpen: false });
};
this.handleCloseMethodLinkMenu = () => {
this.setState({ methodLinkMenuOpen: false });
};
this.handleCloseMethodSetLinkMenu = () => {
this.setState({ methodSetLinkMenuOpen: false });
};
this.handleCloseMethodProgressionLinkMenu = () => {
this.setState({ methodProgressionLinkMenuOpen: false });
};
this.handleOpenBlockMenu = (search) => {

@@ -286,4 +324,8 @@ this.setState({ blockMenuOpen: true, blockMenuSearch: search });

!this.state.exerciseLinkMenuOpen &&
!this.state.exerciseSetLinkMenuOpen &&
!this.state.exerciseProgressionLinkMenuOpen &&
!this.state.methodLinkMenuOpen &&
!this.state.selectionMenuOpen) {
!this.state.selectionMenuOpen &&
!this.state.methodSetLinkMenuOpen &&
!this.state.methodProgressionLinkMenuOpen) {
this.isBlurred = true;

@@ -300,3 +342,7 @@ if (this.props.onBlur) {

this.state.exerciseLinkMenuOpen ||
this.state.exerciseSetLinkMenuOpen ||
this.state.exerciseProgressionLinkMenuOpen ||
this.state.methodLinkMenuOpen ||
this.state.methodSetLinkMenuOpen ||
this.state.methodProgressionLinkMenuOpen ||
this.state.selectionMenuOpen)) {

@@ -399,3 +445,3 @@ this.isBlurred = false;

new ExerciseLink_1.default({
onKeyboardShortcut: this.handleOpenArticleLinkMenu,
onKeyboardShortcut: this.handleOpenExerciseLinkMenu,
onClickLink: this.props.onClickLink,

@@ -405,2 +451,14 @@ onClickHashtag: this.props.onClickHashtag,

}),
new ExerciseSetLink_1.default({
onKeyboardShortcut: this.handleOpenExerciseSetLinkMenu,
onClickLink: this.props.onClickLink,
onClickHashtag: this.props.onClickHashtag,
onHoverLink: this.props.onHoverLink,
}),
new ExerciseProgressionLink_1.default({
onKeyboardShortcut: this.handleOpenExerciseProgressionLinkMenu,
onClickLink: this.props.onClickLink,
onClickHashtag: this.props.onClickHashtag,
onHoverLink: this.props.onHoverLink,
}),
new MethodLink_1.default({

@@ -412,2 +470,14 @@ onKeyboardShortcut: this.handleOpenArticleLinkMenu,

}),
new MethodSetLink_1.default({
onKeyboardShortcut: this.handleOpenMethodSetLinkMenu,
onClickLink: this.props.onClickLink,
onClickHashtag: this.props.onClickHashtag,
onHoverLink: this.props.onHoverLink,
}),
new MethodProgressionLink_1.default({
onKeyboardShortcut: this.handleOpenMethodProgressionLinkMenu,
onClickLink: this.props.onClickLink,
onClickHashtag: this.props.onClickHashtag,
onHoverLink: this.props.onHoverLink,
}),
new Strikethrough_1.default(),

@@ -610,5 +680,9 @@ new OrderedList_1.default(),

React.createElement(LinkToolbar_1.default, { view: this.view, dictionary: dictionary, isActive: this.state.exerciseLinkMenuOpen, contentType: "Exercise", onCreateLink: this.props.onCreateExerciseLink, onSearchLink: this.props.onSearchExerciseLink, onClickLink: this.props.onClickLink, onShowToast: this.props.onShowToast, onClose: this.handleCloseExerciseLinkMenu, tooltip: tooltip }),
React.createElement(LinkToolbar_1.default, { view: this.view, dictionary: dictionary, isActive: this.state.exerciseSetLinkMenuOpen, contentType: "ExerciseSet", onCreateLink: this.props.onCreateExerciseSetLink, onSearchLink: this.props.onSearchExerciseSetLink, onClickLink: this.props.onClickLink, onShowToast: this.props.onShowToast, onClose: this.handleCloseExerciseSetLinkMenu, tooltip: tooltip }),
React.createElement(LinkToolbar_1.default, { view: this.view, dictionary: dictionary, isActive: this.state.exerciseProgressionLinkMenuOpen, contentType: "ExerciseProgression", onCreateLink: this.props.onCreateExerciseProgressionLink, onSearchLink: this.props.onSearchExerciseProgressionLink, onClickLink: this.props.onClickLink, onShowToast: this.props.onShowToast, onClose: this.handleCloseExerciseProgressionLinkMenu, tooltip: tooltip }),
React.createElement(LinkToolbar_1.default, { view: this.view, dictionary: dictionary, isActive: this.state.methodLinkMenuOpen, contentType: "Method", onCreateLink: this.props.onCreateMethodLink, onSearchLink: this.props.onSearchMethodLink, onClickLink: this.props.onClickLink, onShowToast: this.props.onShowToast, onClose: this.handleCloseMethodLinkMenu, tooltip: tooltip }),
React.createElement(LinkToolbar_1.default, { view: this.view, dictionary: dictionary, isActive: this.state.methodSetLinkMenuOpen, contentType: "MethodSet", onCreateLink: this.props.onCreateMethodSetLink, onSearchLink: this.props.onSearchMethodSetLink, onClickLink: this.props.onClickLink, onShowToast: this.props.onShowToast, onClose: this.handleCloseMethodSetLinkMenu, tooltip: tooltip }),
React.createElement(LinkToolbar_1.default, { view: this.view, dictionary: dictionary, isActive: this.state.methodProgressionLinkMenuOpen, contentType: "MethodProgression", onCreateLink: this.props.onCreateMethodProgressionLink, onSearchLink: this.props.onSearchMethodProgressionLink, onClickLink: this.props.onClickLink, onShowToast: this.props.onShowToast, onClose: this.handleCloseMethodProgressionLinkMenu, tooltip: tooltip }),
React.createElement(EmojiMenu_1.default, { view: this.view, commands: this.commands, dictionary: dictionary, rtl: isRTL, isActive: this.state.emojiMenuOpen, search: this.state.blockMenuSearch, onClose: () => this.setState({ emojiMenuOpen: false }) }),
React.createElement(BlockMenu_1.default, { view: this.view, commands: this.commands, dictionary: dictionary, rtl: isRTL, isActive: this.state.blockMenuOpen, search: this.state.blockMenuSearch, onClose: this.handleCloseBlockMenu, uploadImage: this.props.uploadImage, onLinkToolbarOpen: this.handleOpenLinkMenu, onArticleLinkToolbarOpen: this.handleOpenArticleLinkMenu, onExerciseLinkToolbarOpen: this.handleOpenExerciseLinkMenu, onMethodLinkToolbarOpen: this.handleOpenMethodLinkMenu, onImageUploadStart: this.props.onImageUploadStart, onImageUploadStop: this.props.onImageUploadStop, onShowToast: this.props.onShowToast, embeds: this.props.embeds })))))));
React.createElement(BlockMenu_1.default, { view: this.view, commands: this.commands, dictionary: dictionary, rtl: isRTL, isActive: this.state.blockMenuOpen, search: this.state.blockMenuSearch, onClose: this.handleCloseBlockMenu, uploadImage: this.props.uploadImage, onLinkToolbarOpen: this.handleOpenLinkMenu, onArticleLinkToolbarOpen: this.handleOpenArticleLinkMenu, onExerciseLinkToolbarOpen: this.handleOpenExerciseLinkMenu, onExerciseSetLinkToolbarOpen: this.handleOpenExerciseSetLinkMenu, onExerciseProgressionLinkToolbarOpen: this.handleOpenExerciseProgressionLinkMenu, onMethodLinkToolbarOpen: this.handleOpenMethodLinkMenu, onMethodSetLinkToolbarOpen: this.handleOpenMethodSetLinkMenu, onMethodProgressionLinkToolbarOpen: this.handleOpenMethodProgressionLinkMenu, onImageUploadStart: this.props.onImageUploadStart, onImageUploadStop: this.props.onImageUploadStop, onShowToast: this.props.onShowToast, embeds: this.props.embeds })))))));
}

@@ -615,0 +689,0 @@ }

@@ -148,2 +148,34 @@ "use strict";

},
{
name: "exercise_set_link",
title: dictionary.exerciseSet,
icon: outline_icons_1.LinkIcon,
shortcut: "alt shift 4",
keywords: "exercise set",
searchKeyword: "exercise set",
},
{
name: "method_set_link",
title: dictionary.methodSet,
icon: outline_icons_1.LinkIcon,
shortcut: "alt shift 5",
keywords: "method set",
searchKeyword: "method set",
},
{
name: "exercise_progression_link",
title: dictionary.exerciseProgression,
icon: outline_icons_1.LinkIcon,
shortcut: "alt shift 6",
keywords: "exercise progression",
searchKeyword: "exercise progression",
},
{
name: "method_progression_link",
title: dictionary.methodProgression,
icon: outline_icons_1.LinkIcon,
shortcut: "alt shift 7",
keywords: "method progression",
searchKeyword: "method progression",
},
],

@@ -150,0 +182,0 @@ },

{
"name": "@wedevign/rich-markdown-editor",
"description": "A rich text editor with Markdown shortcuts",
"version": "12.1.2",
"version": "12.1.3",
"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

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

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