@threadlabs/looma 0.2.18 → 0.2.19
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/package.json +1 -1
- package/vue/editor/index.js +8 -1
package/package.json
CHANGED
package/vue/editor/index.js
CHANGED
|
@@ -351,6 +351,13 @@ function managedMenuAnchorRect(rect) {
|
|
|
351
351
|
height: rect.height
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
|
+
function managedSlashMenuItems(items) {
|
|
355
|
+
return items.map(({ title, description, icon }) => ({
|
|
356
|
+
title,
|
|
357
|
+
description,
|
|
358
|
+
icon
|
|
359
|
+
}));
|
|
360
|
+
}
|
|
354
361
|
function selectedTableElement(editor) {
|
|
355
362
|
const { node } = editor.view.domAtPos(editor.state.selection.from);
|
|
356
363
|
const element = node instanceof HTMLElement ? node : node.parentElement;
|
|
@@ -1089,7 +1096,7 @@ var LoomaEditor = defineComponent2({
|
|
|
1089
1096
|
slash.active && slash.items.length > 0 ? h2(EditorSlashMenu, {
|
|
1090
1097
|
open: true,
|
|
1091
1098
|
query: slash.query,
|
|
1092
|
-
items: slash.items,
|
|
1099
|
+
items: managedSlashMenuItems(slash.items),
|
|
1093
1100
|
selectedIndex: slash.selectedIndex,
|
|
1094
1101
|
anchorRect: managedMenuAnchorRect(slash.rect),
|
|
1095
1102
|
onSlashMenuHighlight: ({ index }) => {
|