prosemirror-slash-menu-react 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -185,7 +185,7 @@ var Placement;
185
185
  Placement["leftStart"] = "left-start";
186
186
  Placement["leftEnd"] = "left-end";
187
187
  })(Placement || (Placement = {}));
188
- const SlashMenuReact = ({ editorState, editorView, icons, rightIcons, subMenuIcon, filterFieldIcon, filterPlaceHolder, mainMenuLabel, popperReference, popperOptions, clickable, disableInput, }) => {
188
+ const SlashMenuReact = ({ editorState, editorView, icons, rightIcons, subMenuIcon, filterFieldIcon, filterPlaceHolder, mainMenuLabel, popperReference, popperOptions, clickable, disableInput, noMatchLabel, }) => {
189
189
  var _a;
190
190
  const menuState = useMemo(() => {
191
191
  if (!editorState)
@@ -368,7 +368,7 @@ const SlashMenuReact = ({ editorState, editorView, icons, rightIcons, subMenuIco
368
368
  groups[group].map((el, idx) => (React.createElement(ListItem, { key: el.id, menuState: menuState, Icon: icons === null || icons === void 0 ? void 0 : icons[el.id], RightIcon: rightIcons === null || rightIcons === void 0 ? void 0 : rightIcons[el.id], idx: idx, clickable: clickable, el: el, view: editorView })))));
369
369
  })
370
370
  : elements === null || elements === void 0 ? void 0 : elements.map((el, idx) => (React.createElement(ListItem, { key: el.id, menuState: menuState, Icon: icons === null || icons === void 0 ? void 0 : icons[el.id], RightIcon: rightIcons === null || rightIcons === void 0 ? void 0 : rightIcons[el.id], idx: idx, clickable: clickable, el: el, view: editorView }))),
371
- (elements === null || elements === void 0 ? void 0 : elements.length) === 0 ? (React.createElement("div", { className: "menu-placeholder" }, "No matching items")) : null))) : null));
371
+ (elements === null || elements === void 0 ? void 0 : elements.length) === 0 ? (React.createElement("div", { className: "menu-placeholder" }, noMatchLabel || "No matching items")) : null))) : null));
372
372
  };
373
373
 
374
374
  export { Icons, Placement, SlashMenuReact, defaultElements, defaultIcons };
package/dist/index.js CHANGED
@@ -193,7 +193,7 @@ exports.Placement = void 0;
193
193
  Placement["leftStart"] = "left-start";
194
194
  Placement["leftEnd"] = "left-end";
195
195
  })(exports.Placement || (exports.Placement = {}));
196
- const SlashMenuReact = ({ editorState, editorView, icons, rightIcons, subMenuIcon, filterFieldIcon, filterPlaceHolder, mainMenuLabel, popperReference, popperOptions, clickable, disableInput, }) => {
196
+ const SlashMenuReact = ({ editorState, editorView, icons, rightIcons, subMenuIcon, filterFieldIcon, filterPlaceHolder, mainMenuLabel, popperReference, popperOptions, clickable, disableInput, noMatchLabel, }) => {
197
197
  var _a;
198
198
  const menuState = React.useMemo(() => {
199
199
  if (!editorState)
@@ -376,7 +376,7 @@ const SlashMenuReact = ({ editorState, editorView, icons, rightIcons, subMenuIco
376
376
  groups[group].map((el, idx) => (React__default["default"].createElement(ListItem, { key: el.id, menuState: menuState, Icon: icons === null || icons === void 0 ? void 0 : icons[el.id], RightIcon: rightIcons === null || rightIcons === void 0 ? void 0 : rightIcons[el.id], idx: idx, clickable: clickable, el: el, view: editorView })))));
377
377
  })
378
378
  : elements === null || elements === void 0 ? void 0 : elements.map((el, idx) => (React__default["default"].createElement(ListItem, { key: el.id, menuState: menuState, Icon: icons === null || icons === void 0 ? void 0 : icons[el.id], RightIcon: rightIcons === null || rightIcons === void 0 ? void 0 : rightIcons[el.id], idx: idx, clickable: clickable, el: el, view: editorView }))),
379
- (elements === null || elements === void 0 ? void 0 : elements.length) === 0 ? (React__default["default"].createElement("div", { className: "menu-placeholder" }, "No matching items")) : null))) : null));
379
+ (elements === null || elements === void 0 ? void 0 : elements.length) === 0 ? (React__default["default"].createElement("div", { className: "menu-placeholder" }, noMatchLabel || "No matching items")) : null))) : null));
380
380
  };
381
381
 
382
382
  exports.SlashMenuReact = SlashMenuReact;
@@ -45,5 +45,6 @@ export interface SlashMenuProps {
45
45
  popperOptions?: PopperOptions;
46
46
  clickable?: boolean;
47
47
  disableInput?: boolean;
48
+ noMatchLabel?: string;
48
49
  }
49
50
  export declare const SlashMenuReact: FC<SlashMenuProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prosemirror-slash-menu-react",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Implementation of prosemirror-slash-menu in react",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -29,7 +29,7 @@
29
29
  "rollup-plugin-postcss": "^4.0.2",
30
30
  "typescript": "^5.1.6",
31
31
  "web-vitals": "^2.1.4",
32
- "prosemirror-slash-menu": "0.4.3"
32
+ "prosemirror-slash-menu": "0.4.4"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",