@tiptap/extension-bubble-menu
Advanced tools
Comparing version 2.0.0-beta.30 to 2.0.0-beta.31
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.0.0-beta.31](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.30...@tiptap/extension-bubble-menu@2.0.0-beta.31) (2021-08-23) | ||
### Bug Fixes | ||
* make shouldShow and pluginKey option for menus, fix [#1779](https://github.com/ueberdosis/tiptap/issues/1779) ([70a328b](https://github.com/ueberdosis/tiptap/commit/70a328bd3dea174170ad8e92db4c4f7f9368fd1b)) | ||
# [2.0.0-beta.30](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.29...@tiptap/extension-bubble-menu@2.0.0-beta.30) (2021-08-20) | ||
@@ -8,0 +19,0 @@ |
@@ -10,3 +10,3 @@ import { Editor } from '@tiptap/core'; | ||
tippyOptions?: Partial<Props>; | ||
shouldShow: ((props: { | ||
shouldShow?: ((props: { | ||
editor: Editor; | ||
@@ -13,0 +13,0 @@ view: EditorView; |
@@ -81,3 +81,3 @@ 'use strict'; | ||
update(view, oldState) { | ||
var _a; | ||
var _a, _b; | ||
const { state, composing } = view; | ||
@@ -93,3 +93,3 @@ const { doc, selection } = state; | ||
const to = Math.max(...ranges.map(range => range.$to.pos)); | ||
const shouldShow = this.shouldShow({ | ||
const shouldShow = (_a = this.shouldShow) === null || _a === void 0 ? void 0 : _a.call(this, { | ||
editor: this.editor, | ||
@@ -106,3 +106,3 @@ view, | ||
} | ||
(_a = this.tippy) === null || _a === void 0 ? void 0 : _a.setProps({ | ||
(_b = this.tippy) === null || _b === void 0 ? void 0 : _b.setProps({ | ||
getReferenceClientRect: () => { | ||
@@ -109,0 +109,0 @@ if (core.isNodeSelection(state.selection)) { |
@@ -73,3 +73,3 @@ import { isTextSelection, isNodeSelection, posToDOMRect, Extension } from '@tiptap/core'; | ||
update(view, oldState) { | ||
var _a; | ||
var _a, _b; | ||
const { state, composing } = view; | ||
@@ -85,3 +85,3 @@ const { doc, selection } = state; | ||
const to = Math.max(...ranges.map(range => range.$to.pos)); | ||
const shouldShow = this.shouldShow({ | ||
const shouldShow = (_a = this.shouldShow) === null || _a === void 0 ? void 0 : _a.call(this, { | ||
editor: this.editor, | ||
@@ -98,3 +98,3 @@ view, | ||
} | ||
(_a = this.tippy) === null || _a === void 0 ? void 0 : _a.setProps({ | ||
(_b = this.tippy) === null || _b === void 0 ? void 0 : _b.setProps({ | ||
getReferenceClientRect: () => { | ||
@@ -101,0 +101,0 @@ if (isNodeSelection(state.selection)) { |
@@ -79,3 +79,3 @@ (function (global, factory) { | ||
update(view, oldState) { | ||
var _a; | ||
var _a, _b; | ||
const { state, composing } = view; | ||
@@ -91,3 +91,3 @@ const { doc, selection } = state; | ||
const to = Math.max(...ranges.map(range => range.$to.pos)); | ||
const shouldShow = this.shouldShow({ | ||
const shouldShow = (_a = this.shouldShow) === null || _a === void 0 ? void 0 : _a.call(this, { | ||
editor: this.editor, | ||
@@ -104,3 +104,3 @@ view, | ||
} | ||
(_a = this.tippy) === null || _a === void 0 ? void 0 : _a.setProps({ | ||
(_b = this.tippy) === null || _b === void 0 ? void 0 : _b.setProps({ | ||
getReferenceClientRect: () => { | ||
@@ -107,0 +107,0 @@ if (core.isNodeSelection(state.selection)) { |
{ | ||
"name": "@tiptap/extension-bubble-menu", | ||
"description": "bubble-menu extension for tiptap", | ||
"version": "2.0.0-beta.30", | ||
"version": "2.0.0-beta.31", | ||
"homepage": "https://tiptap.dev", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "2966b4344ae08324a8621fb42b45f9c02bd49a56" | ||
"gitHead": "5ee50917599866747b0ddffc89a5ef65a8987eca" | ||
} |
@@ -16,3 +16,3 @@ import { | ||
tippyOptions?: Partial<Props>, | ||
shouldShow: ((props: { | ||
shouldShow?: ((props: { | ||
editor: Editor, | ||
@@ -144,3 +144,3 @@ view: EditorView, | ||
const shouldShow = this.shouldShow({ | ||
const shouldShow = this.shouldShow?.({ | ||
editor: this.editor, | ||
@@ -147,0 +147,0 @@ view, |
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
70866