fix: resolve TypeScript errors in frontend build
This commit is contained in:
36
node_modules/@tiptap/extensions/dist/selection/index.js
generated
vendored
Normal file
36
node_modules/@tiptap/extensions/dist/selection/index.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
// src/selection/selection.ts
|
||||
import { Extension, isNodeSelection } from "@tiptap/core";
|
||||
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
||||
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
||||
var Selection = Extension.create({
|
||||
name: "selection",
|
||||
addOptions() {
|
||||
return {
|
||||
className: "selection"
|
||||
};
|
||||
},
|
||||
addProseMirrorPlugins() {
|
||||
const { editor, options } = this;
|
||||
return [
|
||||
new Plugin({
|
||||
key: new PluginKey("selection"),
|
||||
props: {
|
||||
decorations(state) {
|
||||
if (state.selection.empty || editor.isFocused || !editor.isEditable || isNodeSelection(state.selection) || editor.view.dragging) {
|
||||
return null;
|
||||
}
|
||||
return DecorationSet.create(state.doc, [
|
||||
Decoration.inline(state.selection.from, state.selection.to, {
|
||||
class: options.className
|
||||
})
|
||||
]);
|
||||
}
|
||||
}
|
||||
})
|
||||
];
|
||||
}
|
||||
});
|
||||
export {
|
||||
Selection
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in New Issue
Block a user