@threadlabs/looma 0.23.14 → 0.23.16
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/components/ui-icon-button/ui-icon-button.html +27 -0
- package/components/ui-input/ui-input.html +6 -1
- package/components/ui-tree-item/ui-tree-item.html +50 -1
- package/components/ui-tree-item/ui-tree-item.js +2 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-icon-button.css +28 -0
- package/styles/ui-input.css +6 -1
- package/styles/ui-tree-item.css +54 -2
- package/vanilla/UiIconButton.d.ts +1 -0
- package/vanilla/UiIconButton.js +4 -1
- package/vue/UiIconButton.d.ts +9 -0
- package/vue/UiIconButton.vue +46 -0
- package/vue/UiInput.vue +6 -1
- package/vue/UiTreeItem.vue +59 -1
- package/vue/chunks/UiIconButton.js +24 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/components.css +216 -140
- package/vue/editor/LoomaEditor.d.ts +3 -2
- package/vue/editor/index.js +2 -2
|
@@ -23,9 +23,10 @@ export type LoomaImageUploader = (file: File) => Promise<string | LoomaImageUplo
|
|
|
23
23
|
/**
|
|
24
24
|
* Chooses whether formatting controls follow a selection, occupy persistent
|
|
25
25
|
* editor chrome, or open from an app-owned button (`popover`, with a text-only
|
|
26
|
-
* bubble for selections)
|
|
26
|
+
* bubble for selections). `contextual` exposes all commands at a focused caret
|
|
27
|
+
* as well as a selection; it does not alter document commands or stored content.
|
|
27
28
|
*/
|
|
28
|
-
export type LoomaEditorToolbarMode = "bubble" | "sticky" | "popover";
|
|
29
|
+
export type LoomaEditorToolbarMode = "bubble" | "sticky" | "popover" | "contextual";
|
|
29
30
|
/** A destination supplied by the host application, such as a page or record. */
|
|
30
31
|
export interface LoomaLinkTarget {
|
|
31
32
|
id: string;
|
package/vue/editor/index.js
CHANGED
|
@@ -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),
|