@domternal/core 1.0.0 → 1.0.1
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.cjs +5 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11024,10 +11024,10 @@ function createBubbleMenuPlugin(options) {
|
|
|
11024
11024
|
from: 0,
|
|
11025
11025
|
to: 0
|
|
11026
11026
|
}),
|
|
11027
|
-
apply: (
|
|
11027
|
+
apply: (tr, prevValue, _oldState, newState) => {
|
|
11028
11028
|
const { selection } = newState;
|
|
11029
11029
|
const { from, to } = selection;
|
|
11030
|
-
if (from !== prevValue.from || to !== prevValue.to) {
|
|
11030
|
+
if (tr.selectionSet || from !== prevValue.from || to !== prevValue.to) {
|
|
11031
11031
|
suppressed = false;
|
|
11032
11032
|
}
|
|
11033
11033
|
const visible = !suppressed && !selection.empty && editor.isEditable && shouldShow({
|
|
@@ -11112,10 +11112,8 @@ function createBubbleMenuPlugin(options) {
|
|
|
11112
11112
|
}
|
|
11113
11113
|
const state = pluginKey.getState(view.state);
|
|
11114
11114
|
const prevPluginState = pluginKey.getState(prevState);
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
hideMenu();
|
|
11118
|
-
}
|
|
11115
|
+
const domShown = element.hasAttribute("data-show") || updateTimeout !== null;
|
|
11116
|
+
if (state?.visible === prevPluginState?.visible && state?.from === prevPluginState?.from && state?.to === prevPluginState?.to && !(state?.visible && view.state.doc !== prevState.doc) && domShown === Boolean(state?.visible)) {
|
|
11119
11117
|
return;
|
|
11120
11118
|
}
|
|
11121
11119
|
if (updateTimeout) {
|
|
@@ -11242,7 +11240,7 @@ var StarterKit = Extension.create({
|
|
|
11242
11240
|
});
|
|
11243
11241
|
|
|
11244
11242
|
// src/index.ts
|
|
11245
|
-
var VERSION = "1.0.
|
|
11243
|
+
var VERSION = "1.0.1";
|
|
11246
11244
|
|
|
11247
11245
|
Object.defineProperty(exports, "PluginKey", {
|
|
11248
11246
|
enumerable: true,
|