@threadlabs/looma 0.23.14 → 0.23.15

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.
@@ -1990,10 +1990,10 @@ var LoomaEditor = defineComponent({
1990
1990
  onDblclick: onImageDoubleClick,
1991
1991
  onKeydown: onImageKeyDown
1992
1992
  }, [
1993
- instance && props.editable && !mobile.value && (props.toolbarMode === "bubble" || props.toolbarMode === "popover") ? h(BubbleMenu, {
1993
+ instance && props.editable && !mobile.value && (props.toolbarMode === "bubble" || props.toolbarMode === "popover" || props.toolbarMode === "contextual") ? h(BubbleMenu, {
1994
1994
  editor: instance,
1995
1995
  pluginKey: "looma-text-formatting-menu",
1996
- shouldShow: ({ editor: menuEditor, from, to }) => (props.toolbarMode !== "popover" || !props.toolbarOpen) && shouldShowTextFormattingToolbar(menuEditor, from, to),
1996
+ shouldShow: ({ editor: menuEditor, from, to }) => (props.toolbarMode !== "popover" || !props.toolbarOpen) && (props.toolbarMode === "contextual" ? menuEditor.isFocused : shouldShowTextFormattingToolbar(menuEditor, from, to)),
1997
1997
  tippyOptions: {
1998
1998
  appendTo: () => root.value?.closest("dialog[open], [popover]") ?? document.body,
1999
1999
  onShow: () => announceOverlayOpen(root.value?.ownerDocument ?? document, root.value),