@projectfive/v-richtext-vue2 0.0.0-stage → 3.0.0
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/Readme.md +69 -0
- package/dist/style.css +1 -0
- package/dist/types/richtext-vue/src/components/input-richtext/CharacterCount.vue.d.ts +19 -0
- package/dist/types/richtext-vue/src/components/input-richtext/InputRichtext.vue.d.ts +135 -0
- package/dist/types/richtext-vue/src/components/input-richtext/MediaControls.vue.d.ts +3 -0
- package/dist/types/richtext-vue/src/components/input-richtext/MentionMenu.vue.d.ts +21 -0
- package/dist/types/richtext-vue/src/components/input-richtext/TableMenu.vue.d.ts +19 -0
- package/dist/types/richtext-vue/src/components/input-richtext/TableOfContents.vue.d.ts +3 -0
- package/dist/types/richtext-vue/src/components/input-richtext/TemplatesMenu.vue.d.ts +18 -0
- package/dist/types/richtext-vue/src/components/input-richtext/UploadPopover.vue.d.ts +24 -0
- package/dist/types/richtext-vue/src/components/input-richtext/VisibilityConditionsMenu.vue.d.ts +20 -0
- package/dist/types/richtext-vue/src/components/input-richtext/YoutubePopover.vue.d.ts +4 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/file-drop.d.ts +22 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/file-node.d.ts +18 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/heading-id.d.ts +14 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/index.d.ts +36 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/link.d.ts +8 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/media-attributes.d.ts +8 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/mention-menu.d.ts +62 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/mention.d.ts +16 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/previews.d.ts +8 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/task-item.d.ts +8 -0
- package/dist/types/richtext-vue/src/components/input-richtext/extensions/visibility-conditions.d.ts +32 -0
- package/dist/types/richtext-vue/src/components/input-richtext/liquid.d.ts +11 -0
- package/dist/types/richtext-vue/src/components/input-richtext/types.d.ts +122 -0
- package/dist/types/richtext-vue/src/components/tiptap-icons/Icon.vue.d.ts +15 -0
- package/dist/types/richtext-vue/src/components/tiptap-icons/index.d.ts +40 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/CommandButton.vue.d.ts +36 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/blockquote-button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/blockquote-button/use-blockquote.d.ts +12 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/code-block-button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/code-block-button/use-code-block.d.ts +12 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-button/use-color-highlight.d.ts +125 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-popover/ColorHighlightPopover.vue.d.ts +3 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-popover/ColorHighlightPopoverButton.vue.d.ts +17 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-popover/ColorHighlightPopoverContent.vue.d.ts +183 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-popover/index.d.ts +3 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/command.d.ts +26 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/heading-button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/heading-button/use-heading.d.ts +25 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/heading-dropdown-menu/HeadingDropdownMenu.vue.d.ts +32 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/heading-dropdown-menu/index.d.ts +2 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/heading-dropdown-menu/use-heading-dropdown-menu.d.ts +6 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/LinkButton.vue.d.ts +17 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/LinkContent.vue.d.ts +18 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/LinkMain.vue.d.ts +28 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/LinkPopover.vue.d.ts +62 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/index.d.ts +4 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/use-link-popover.d.ts +96 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/list-button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/list-button/use-list.d.ts +22 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/list-dropdown-menu/ListDropdownMenu.vue.d.ts +32 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/list-dropdown-menu/index.d.ts +2 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/list-dropdown-menu/use-list-dropdown-menu.d.ts +15 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/mark-button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/mark-button/use-mark.d.ts +29 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/text-align-button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/text-align-button/use-text-align.d.ts +27 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/undo-redo-button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui/undo-redo-button/use-undo-redo.d.ts +17 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button/Button.vue.d.ts +53 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button-group/ButtonGroup.vue.d.ts +43 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button-group/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/Card.vue.d.ts +16 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/CardBody.vue.d.ts +15 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/CardItemGroup.vue.d.ts +42 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/index.d.ts +3 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/dropdown-menu/DropdownMenu.vue.d.ts +66 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/dropdown-menu/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/input/Input.vue.d.ts +20 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/input/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/popover/Popover.vue.d.ts +65 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/popover/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/separator/Separator.vue.d.ts +35 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/separator/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/spacer/Spacer.vue.d.ts +31 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/spacer/index.d.ts +1 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/Toolbar.vue.d.ts +45 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/ToolbarGroup.vue.d.ts +15 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/ToolbarSeparator.vue.d.ts +3 -0
- package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/index.d.ts +3 -0
- package/dist/types/richtext-vue/src/composables/use-editor-state.d.ts +32 -0
- package/dist/types/richtext-vue/src/composables/use-is-breakpoint.d.ts +10 -0
- package/dist/types/richtext-vue/src/composables/use-menu-navigation.d.ts +55 -0
- package/dist/types/richtext-vue/src/composables/use-popover.d.ts +45 -0
- package/dist/types/richtext-vue/src/composables/use-tiptap-editor.d.ts +16 -0
- package/dist/types/richtext-vue/src/composables/use-top-layer.d.ts +9 -0
- package/dist/types/richtext-vue/src/composables/use-translations.d.ts +7 -0
- package/dist/types/richtext-vue/src/composables/utils.d.ts +21 -0
- package/dist/types/richtext-vue/src/index.d.ts +14 -0
- package/dist/types/richtext-vue/src/lib/pointer.d.ts +6 -0
- package/dist/types/richtext-vue/src/lib/resize-image.d.ts +6 -0
- package/dist/types/richtext-vue/src/lib/shortcuts.d.ts +24 -0
- package/dist/types/richtext-vue/src/lib/throttle.d.ts +10 -0
- package/dist/types/richtext-vue/src/lib/tiptap-utils.d.ts +109 -0
- package/dist/types/richtext-vue/src/locales/en.d.ts +140 -0
- package/dist/types/richtext-vue/src/locales/index.d.ts +5 -0
- package/dist/types/richtext-vue/src/locales/nl.d.ts +2 -0
- package/dist/types/richtext-vue2/src/components/tiptap-ui-primitive/portal/Portal.vue.d.ts +15 -0
- package/dist/types/richtext-vue2/src/lib/tiptap-vue.d.ts +9 -0
- package/dist/v-richtext.js +3318 -0
- package/dist/v-richtext.js.map +1 -0
- package/package.json +64 -6
- package/README.md +0 -3
package/dist/types/richtext-vue/src/components/tiptap-ui/text-align-button/use-text-align.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ChainedCommands } from "@tiptap/core";
|
|
2
|
+
import { type Editor } from "@tiptap/core";
|
|
3
|
+
export type TextAlign = "left" | "center" | "right" | "justify";
|
|
4
|
+
export declare const TEXT_ALIGN_SHORTCUT_KEYS: Record<TextAlign, string>;
|
|
5
|
+
export declare const textAlignIcons: {
|
|
6
|
+
left: "align-left";
|
|
7
|
+
center: "align-center";
|
|
8
|
+
right: "align-right";
|
|
9
|
+
justify: "align-justify";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Checks if text alignment can be performed in the current editor state
|
|
13
|
+
*/
|
|
14
|
+
export declare function canSetTextAlign(editor: Editor | null, align: TextAlign): boolean;
|
|
15
|
+
export declare function hasSetTextAlign(commands: ChainedCommands): commands is ChainedCommands & {
|
|
16
|
+
setTextAlign: (align: TextAlign) => ChainedCommands;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Checks if the text alignment is currently active
|
|
20
|
+
*/
|
|
21
|
+
export declare function isTextAlignActive(editor: Editor | null, align: TextAlign): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Sets text alignment in the editor
|
|
24
|
+
*/
|
|
25
|
+
export declare function setTextAlign(editor: Editor | null, align: TextAlign): boolean;
|
|
26
|
+
/** p5: toolbar command, rendered by CommandButton (see ../command.ts) */
|
|
27
|
+
export declare const textAlignCommand: (align: TextAlign) => import("@/components/tiptap-ui/command").EditorCommand;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./use-undo-redo";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Editor } from "@tiptap/core";
|
|
2
|
+
export type UndoRedoAction = "undo" | "redo";
|
|
3
|
+
export declare const UNDO_REDO_SHORTCUT_KEYS: Record<UndoRedoAction, string>;
|
|
4
|
+
export declare const historyIcons: {
|
|
5
|
+
undo: "undo2";
|
|
6
|
+
redo: "redo2";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Checks if a history action can be executed
|
|
10
|
+
*/
|
|
11
|
+
export declare function canExecuteUndoRedoAction(editor: Editor | null, action: UndoRedoAction): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Executes a history action on the editor
|
|
14
|
+
*/
|
|
15
|
+
export declare function executeUndoRedoAction(editor: Editor | null, action: UndoRedoAction): boolean;
|
|
16
|
+
/** p5: toolbar command, rendered by CommandButton (see ../command.ts) */
|
|
17
|
+
export declare const undoRedoCommand: (action: UndoRedoAction) => import("@/components/tiptap-ui/command").EditorCommand;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import "@/components/tiptap-ui-primitive/button/button.scss";
|
|
2
|
+
/**
|
|
3
|
+
* p5: always the template's "ghost" style; its variants, sizes and check
|
|
4
|
+
* variant are left out (see UPSTREAM.md).
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** Shown as the native title tooltip, together with shortcutKeys */
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
showTooltip?: boolean;
|
|
10
|
+
shortcutKeys?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_template: () => {
|
|
13
|
+
__VLS_Slots: {
|
|
14
|
+
default?: (props: {}) => any;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
19
|
+
showTooltip: boolean;
|
|
20
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
click: (event: MouseEvent) => void;
|
|
22
|
+
mousedown: (event: MouseEvent) => void;
|
|
23
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
24
|
+
showTooltip: boolean;
|
|
25
|
+
}>>>, {
|
|
26
|
+
showTooltip: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_TypePropsToOption<T> = {
|
|
32
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
33
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
34
|
+
} : {
|
|
35
|
+
type: import('vue').PropType<T[K]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type __VLS_WithDefaults<P, D> = {
|
|
40
|
+
[K in keyof P & string]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
41
|
+
default: D[K];
|
|
42
|
+
}> : P[K];
|
|
43
|
+
};
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
50
|
+
[K in keyof T]: T[K];
|
|
51
|
+
} : {
|
|
52
|
+
[K in keyof T as K]: T[K];
|
|
53
|
+
}) & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Button } from "./Button.vue";
|
package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button-group/ButtonGroup.vue.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "@/components/tiptap-ui-primitive/button-group/button-group.scss";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
orientation?: "horizontal" | "vertical";
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_template: () => {
|
|
6
|
+
__VLS_Slots: {
|
|
7
|
+
default?: (props: {}) => any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
12
|
+
orientation: string;
|
|
13
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
14
|
+
orientation: string;
|
|
15
|
+
}>>>, {
|
|
16
|
+
orientation: "horizontal" | "vertical";
|
|
17
|
+
}>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_TypePropsToOption<T> = {
|
|
22
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type __VLS_WithDefaults<P, D> = {
|
|
30
|
+
[K in keyof P & string]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
31
|
+
default: D[K];
|
|
32
|
+
}> : P[K];
|
|
33
|
+
};
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
40
|
+
[K in keyof T]: T[K];
|
|
41
|
+
} : {
|
|
42
|
+
[K in keyof T as K]: T[K];
|
|
43
|
+
}) & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ButtonGroup } from "./ButtonGroup.vue";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "@/components/tiptap-ui-primitive/card/card.scss";
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, unknown, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const __VLS_template: () => {
|
|
2
|
+
__VLS_Slots: {
|
|
3
|
+
default?: (props: {}) => any;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, unknown, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
8
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/CardItemGroup.vue.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
orientation?: "horizontal" | "vertical";
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_template: () => {
|
|
5
|
+
__VLS_Slots: {
|
|
6
|
+
default?: (props: {}) => any;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
11
|
+
orientation: string;
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
13
|
+
orientation: string;
|
|
14
|
+
}>>>, {
|
|
15
|
+
orientation: "horizontal" | "vertical";
|
|
16
|
+
}>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_TypePropsToOption<T> = {
|
|
21
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
22
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
23
|
+
} : {
|
|
24
|
+
type: import('vue').PropType<T[K]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
type __VLS_WithDefaults<P, D> = {
|
|
29
|
+
[K in keyof P & string]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
30
|
+
default: D[K];
|
|
31
|
+
}> : P[K];
|
|
32
|
+
};
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} : {
|
|
41
|
+
[K in keyof T as K]: T[K];
|
|
42
|
+
}) & {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type PopoverAlign } from "@/composables/use-popover";
|
|
2
|
+
import "@/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss";
|
|
3
|
+
import "@/components/tiptap-ui-primitive/popover/popover-anchor.scss";
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
7
|
+
open?: boolean;
|
|
8
|
+
align?: PopoverAlign;
|
|
9
|
+
sideOffset?: number;
|
|
10
|
+
}>, {
|
|
11
|
+
open: boolean;
|
|
12
|
+
align: string;
|
|
13
|
+
sideOffset: number;
|
|
14
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:open": (value: boolean) => void;
|
|
16
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
17
|
+
open?: boolean;
|
|
18
|
+
align?: PopoverAlign;
|
|
19
|
+
sideOffset?: number;
|
|
20
|
+
}>, {
|
|
21
|
+
open: boolean;
|
|
22
|
+
align: string;
|
|
23
|
+
sideOffset: number;
|
|
24
|
+
}>>>, {
|
|
25
|
+
open: boolean;
|
|
26
|
+
align: PopoverAlign;
|
|
27
|
+
sideOffset: number;
|
|
28
|
+
}>, {
|
|
29
|
+
trigger?: (props: {
|
|
30
|
+
attrs: {
|
|
31
|
+
'aria-haspopup': string;
|
|
32
|
+
popovertarget: string;
|
|
33
|
+
"aria-controls": string;
|
|
34
|
+
"aria-expanded": string;
|
|
35
|
+
"data-state": string;
|
|
36
|
+
style: {
|
|
37
|
+
anchorName: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}) => any;
|
|
41
|
+
} & {
|
|
42
|
+
default?: (props: {}) => any;
|
|
43
|
+
}>;
|
|
44
|
+
type __VLS_TypePropsToOption<T> = {
|
|
45
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
46
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
47
|
+
} : {
|
|
48
|
+
type: import('vue').PropType<T[K]>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
type __VLS_WithDefaults<P, D> = {
|
|
53
|
+
[K in keyof P & string]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
54
|
+
default: D[K];
|
|
55
|
+
}> : P[K];
|
|
56
|
+
};
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
63
|
+
[K in keyof T]: T[K];
|
|
64
|
+
} : {
|
|
65
|
+
[K in keyof T as K]: T[K];
|
|
66
|
+
}) & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DropdownMenu } from "./DropdownMenu.vue";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "@/components/tiptap-ui-primitive/input/input.scss";
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: string) => void;
|
|
8
|
+
change: (event: Event) => void;
|
|
9
|
+
keydown: (event: KeyboardEvent) => void;
|
|
10
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
11
|
+
modelValue?: string;
|
|
12
|
+
}>>>, {}>;
|
|
13
|
+
type __VLS_TypePropsToOption<T> = {
|
|
14
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Input } from "./Input.vue";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type PopoverAlign } from "@/composables/use-popover";
|
|
2
|
+
import "@/components/tiptap-ui-primitive/popover/popover.scss";
|
|
3
|
+
import "@/components/tiptap-ui-primitive/popover/popover-anchor.scss";
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
7
|
+
open?: boolean;
|
|
8
|
+
align?: PopoverAlign;
|
|
9
|
+
sideOffset?: number;
|
|
10
|
+
}>, {
|
|
11
|
+
open: boolean;
|
|
12
|
+
align: string;
|
|
13
|
+
sideOffset: number;
|
|
14
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:open": (value: boolean) => void;
|
|
16
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
17
|
+
open?: boolean;
|
|
18
|
+
align?: PopoverAlign;
|
|
19
|
+
sideOffset?: number;
|
|
20
|
+
}>, {
|
|
21
|
+
open: boolean;
|
|
22
|
+
align: string;
|
|
23
|
+
sideOffset: number;
|
|
24
|
+
}>>>, {
|
|
25
|
+
open: boolean;
|
|
26
|
+
align: PopoverAlign;
|
|
27
|
+
sideOffset: number;
|
|
28
|
+
}>, {
|
|
29
|
+
trigger?: (props: {
|
|
30
|
+
attrs: {
|
|
31
|
+
popovertarget: string;
|
|
32
|
+
"aria-controls": string;
|
|
33
|
+
"aria-expanded": string;
|
|
34
|
+
"data-state": string;
|
|
35
|
+
style: {
|
|
36
|
+
anchorName: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}) => any;
|
|
40
|
+
} & {
|
|
41
|
+
default?: (props: {}) => any;
|
|
42
|
+
}>;
|
|
43
|
+
type __VLS_TypePropsToOption<T> = {
|
|
44
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
45
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
46
|
+
} : {
|
|
47
|
+
type: import('vue').PropType<T[K]>;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
type __VLS_WithDefaults<P, D> = {
|
|
52
|
+
[K in keyof P & string]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
53
|
+
default: D[K];
|
|
54
|
+
}> : P[K];
|
|
55
|
+
};
|
|
56
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
62
|
+
[K in keyof T]: T[K];
|
|
63
|
+
} : {
|
|
64
|
+
[K in keyof T as K]: T[K];
|
|
65
|
+
}) & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Popover } from "./Popover.vue";
|
package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/separator/Separator.vue.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import "@/components/tiptap-ui-primitive/separator/separator.scss";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
orientation?: "horizontal" | "vertical";
|
|
4
|
+
decorative?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
7
|
+
orientation: string;
|
|
8
|
+
decorative: boolean;
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
10
|
+
orientation: string;
|
|
11
|
+
decorative: boolean;
|
|
12
|
+
}>>>, {
|
|
13
|
+
orientation: "horizontal" | "vertical";
|
|
14
|
+
decorative: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_TypePropsToOption<T> = {
|
|
19
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
20
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
21
|
+
} : {
|
|
22
|
+
type: import('vue').PropType<T[K]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type __VLS_WithDefaults<P, D> = {
|
|
27
|
+
[K in keyof P & string]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
28
|
+
default: D[K];
|
|
29
|
+
}> : P[K];
|
|
30
|
+
};
|
|
31
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} : {
|
|
34
|
+
[K in keyof T as K]: T[K];
|
|
35
|
+
}) & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Separator } from "./Separator.vue";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
orientation?: "horizontal" | "vertical";
|
|
3
|
+
size?: string | number;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
6
|
+
orientation: string;
|
|
7
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
8
|
+
orientation: string;
|
|
9
|
+
}>>>, {
|
|
10
|
+
orientation: "horizontal" | "vertical";
|
|
11
|
+
}>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_TypePropsToOption<T> = {
|
|
15
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
16
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
17
|
+
} : {
|
|
18
|
+
type: import('vue').PropType<T[K]>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type __VLS_WithDefaults<P, D> = {
|
|
23
|
+
[K in keyof P & string]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
24
|
+
default: D[K];
|
|
25
|
+
}> : P[K];
|
|
26
|
+
};
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} : {
|
|
30
|
+
[K in keyof T as K]: T[K];
|
|
31
|
+
}) & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Spacer } from "./Spacer.vue";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "@/components/tiptap-ui-primitive/toolbar/toolbar.scss";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
variant?: "floating" | "fixed";
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_template: () => {
|
|
6
|
+
__VLS_Slots: {
|
|
7
|
+
default?: (props: {}) => any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
12
|
+
variant: string;
|
|
13
|
+
}>, {
|
|
14
|
+
el: import("vue").Ref<HTMLDivElement | null>;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
16
|
+
variant: string;
|
|
17
|
+
}>>>, {
|
|
18
|
+
variant: "fixed" | "floating";
|
|
19
|
+
}>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_TypePropsToOption<T> = {
|
|
24
|
+
[K in keyof T & string]-?: {} extends Pick<T, K> ? {
|
|
25
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
26
|
+
} : {
|
|
27
|
+
type: import('vue').PropType<T[K]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type __VLS_WithDefaults<P, D> = {
|
|
32
|
+
[K in keyof P & string]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
33
|
+
default: D[K];
|
|
34
|
+
}> : P[K];
|
|
35
|
+
};
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
42
|
+
[K in keyof T]: T[K];
|
|
43
|
+
} : {
|
|
44
|
+
[K in keyof T as K]: T[K];
|
|
45
|
+
}) & {};
|
package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/ToolbarGroup.vue.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const __VLS_template: () => {
|
|
2
|
+
__VLS_Slots: {
|
|
3
|
+
default?: (props: {}) => any;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, unknown, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
8
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/ToolbarSeparator.vue.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, unknown, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import { type ComputedRef, type Ref, type ShallowRef } from "vue";
|
|
3
|
+
export interface UseEditorStateOptions<T> {
|
|
4
|
+
/**
|
|
5
|
+
* Reactive inputs the selector depends on besides the editor (usually props),
|
|
6
|
+
* so the state is recomputed when they change without a transaction.
|
|
7
|
+
*/
|
|
8
|
+
deps?: () => unknown;
|
|
9
|
+
/**
|
|
10
|
+
* Decides whether a newly selected value differs from the current one.
|
|
11
|
+
* @default shallowEqual
|
|
12
|
+
*/
|
|
13
|
+
equals?: (a: T, b: T) => boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Selects a slice of editor state and only updates when that slice changes.
|
|
17
|
+
*
|
|
18
|
+
* The selector runs after every transaction (and on focus/blur), outside of
|
|
19
|
+
* Vue's dependency tracking. The resulting ref is only written when the new
|
|
20
|
+
* value differs, so a button re-renders only when its own state changes rather
|
|
21
|
+
* than on every keystroke.
|
|
22
|
+
*
|
|
23
|
+
* Replaces React's `useEditorState` from @tiptap/react.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useEditorState<T>(editor: Ref<Editor | null>, selector: (editor: Editor | null) => T, options?: UseEditorStateOptions<T>): Readonly<ShallowRef<T>>;
|
|
26
|
+
/**
|
|
27
|
+
* Splits a selected state object into one computed ref per key, so it can be
|
|
28
|
+
* destructured in `<script setup>` and used directly in templates.
|
|
29
|
+
*/
|
|
30
|
+
export declare function toStateRefs<T extends object>(state: Readonly<Ref<T>>): {
|
|
31
|
+
[K in keyof T]: ComputedRef<T[K]>;
|
|
32
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
type BreakpointMode = "min" | "max";
|
|
3
|
+
/**
|
|
4
|
+
* Detects whether the current viewport matches a given breakpoint rule.
|
|
5
|
+
* Example:
|
|
6
|
+
* useIsBreakpoint("max", 768) // true when width < 768
|
|
7
|
+
* useIsBreakpoint("min", 1024) // true when width >= 1024
|
|
8
|
+
*/
|
|
9
|
+
export declare function useIsBreakpoint(mode?: BreakpointMode, breakpoint?: number): Readonly<Ref<boolean>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import { type Ref } from "vue";
|
|
3
|
+
import { type MaybeGetter } from "@/composables/utils";
|
|
4
|
+
type Orientation = "horizontal" | "vertical" | "both";
|
|
5
|
+
interface MenuNavigationOptions<T> {
|
|
6
|
+
/**
|
|
7
|
+
* The Tiptap editor instance, if using with a Tiptap editor.
|
|
8
|
+
*/
|
|
9
|
+
editor?: Ref<Editor | null | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* The container element that receives the keyboard events.
|
|
12
|
+
*/
|
|
13
|
+
containerRef?: Ref<HTMLElement | null | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* Search query that affects the selected item.
|
|
16
|
+
*/
|
|
17
|
+
query?: MaybeGetter<string | undefined>;
|
|
18
|
+
/**
|
|
19
|
+
* Items to navigate through.
|
|
20
|
+
*/
|
|
21
|
+
items: MaybeGetter<T[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Called when an item is selected.
|
|
24
|
+
*/
|
|
25
|
+
onSelect?: (item: T) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Called when the menu should close.
|
|
28
|
+
*/
|
|
29
|
+
onClose?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* The navigation orientation of the menu.
|
|
32
|
+
* @default "vertical"
|
|
33
|
+
*/
|
|
34
|
+
orientation?: Orientation;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to automatically select the first item when the menu opens.
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
autoSelectFirstItem?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether Tab/Shift+Tab should loop through the items.
|
|
42
|
+
* Disable this for ARIA toolbars, where Tab must leave the toolbar.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
loopOnTab?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Keyboard navigation for toolbars, dropdown menus and command palettes:
|
|
49
|
+
* arrow keys, tab, home/end, enter to select and escape to close.
|
|
50
|
+
*/
|
|
51
|
+
export declare function useMenuNavigation<T>({ editor, containerRef, query, items, onSelect, onClose, orientation, autoSelectFirstItem, loopOnTab, }: MenuNavigationOptions<T>): {
|
|
52
|
+
selectedIndex: import("vue").ComputedRef<number | undefined>;
|
|
53
|
+
setSelectedIndex: (value: number) => number;
|
|
54
|
+
};
|
|
55
|
+
export {};
|