@deskhero/dh_ui 2.53.1 → 2.54.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/adapters/tiptap/components/BlockquoteButton.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/CodeblockButton.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/Dropdown.vue.d.ts +35 -0
- package/dist/adapters/tiptap/components/HeadingDropdown.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/ListDropdown.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/Separator.vue.d.ts +33 -0
- package/dist/adapters/tiptap/components/TableButton.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/Toolbar.vue.d.ts +9 -0
- package/dist/adapters/tiptap/components/button/Button.vue.d.ts +41 -0
- package/dist/adapters/tiptap/components/tiptap-icons/BlockquoteIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/ChevronDownIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/CodeblockIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/HeadingFourIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/HeadingIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/HeadingOneIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/HeadingThreeIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/HeadingTwoIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/ListIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/ListOrderedIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/ListTodoIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/RedoIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/TableIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/UndoIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/undo-redo-button/UndoRedoButton.vue.d.ts +30 -0
- package/dist/adapters/tiptap/extensions/attachment.d.ts +2 -0
- package/dist/adapters/tiptap/extensions/file-upload-node/file-upload-node-extension.d.ts +80 -0
- package/dist/adapters/tiptap/extensions/file-upload-node/index.d.ts +1 -0
- package/dist/adapters/tiptap/extensions/image-resize/constants/index.d.ts +22 -0
- package/dist/adapters/tiptap/extensions/image-resize/controllers/image-node-view.d.ts +32 -0
- package/dist/adapters/tiptap/extensions/image-resize/controllers/position-controller.d.ts +12 -0
- package/dist/adapters/tiptap/extensions/image-resize/controllers/resize-controller.d.ts +12 -0
- package/dist/adapters/tiptap/extensions/image-resize/image-resize.d.ts +1 -0
- package/dist/adapters/tiptap/extensions/image-resize/index.d.ts +3 -0
- package/dist/adapters/tiptap/extensions/image-resize/types/index.d.ts +16 -0
- package/dist/adapters/tiptap/extensions/image-resize/utils/attribute-parser.d.ts +4 -0
- package/dist/adapters/tiptap/extensions/image-resize/utils/index.d.ts +7 -0
- package/dist/adapters/tiptap/extensions/image-resize/utils/style-manager.d.ts +6 -0
- package/dist/adapters/tiptap/extensions/signature.d.ts +2 -0
- package/dist/adapters/tiptap/extensions/table/index.d.ts +2 -0
- package/dist/adapters/tiptap/utils/tiptap-utils.d.ts +122 -0
- package/dist/components/Copiable.vue.d.ts +8 -0
- package/dist/components/DatePicker.vue.d.ts +11 -0
- package/dist/components/DropdownMenu.vue.d.ts +108 -0
- package/dist/components/DropdownMenuItem.vue.d.ts +50 -0
- package/dist/components/Error.vue.d.ts +16 -0
- package/dist/components/ExpansionPanel.vue.d.ts +58 -0
- package/dist/components/FileUpload.vue.d.ts +13 -0
- package/dist/components/Input.vue.d.ts +51 -0
- package/dist/components/InputDropdown.vue.d.ts +16 -0
- package/dist/components/InputDropdownMultiple.vue.d.ts +16 -0
- package/dist/components/InputGroup.vue.d.ts +15 -0
- package/dist/components/InputList.vue.d.ts +23 -0
- package/dist/components/Modal.vue.d.ts +216 -0
- package/dist/components/Notification.vue.d.ts +293 -0
- package/dist/components/PasswordField.vue.d.ts +62 -0
- package/dist/components/RadioBox.vue.d.ts +9 -0
- package/dist/components/RadioBoxGroup.vue.d.ts +8 -0
- package/dist/components/SearchInput.vue.d.ts +36 -0
- package/dist/components/Stepper.vue.d.ts +23 -0
- package/dist/components/Tag.vue.d.ts +48 -0
- package/dist/models/DropdownMenuItem.model.d.ts +13 -0
- package/dist/models/InputDropdown.model.d.ts +4 -0
- package/dist/models/Tag.model.d.ts +7 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
open: {
|
|
3
|
+
type: import("vue").PropType<boolean>;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
orientation: {
|
|
7
|
+
type: import("vue").PropType<"row" | "column">;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
open: {
|
|
12
|
+
type: import("vue").PropType<boolean>;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
orientation: {
|
|
16
|
+
type: import("vue").PropType<"row" | "column">;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {
|
|
20
|
+
open: boolean;
|
|
21
|
+
orientation: "row" | "column";
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
23
|
+
trigger?(_: {
|
|
24
|
+
isOpen: boolean;
|
|
25
|
+
}): any;
|
|
26
|
+
items?(_: {
|
|
27
|
+
close: () => boolean;
|
|
28
|
+
}): any;
|
|
29
|
+
}>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type Orientation = "horizontal" | "vertical";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
class: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
orientation: {
|
|
8
|
+
type: import("vue").PropType<Orientation>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
decorative: {
|
|
12
|
+
type: import("vue").PropType<boolean>;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
class: {
|
|
17
|
+
type: import("vue").PropType<string>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
orientation: {
|
|
21
|
+
type: import("vue").PropType<Orientation>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
decorative: {
|
|
25
|
+
type: import("vue").PropType<boolean>;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{}>, {
|
|
29
|
+
class: string;
|
|
30
|
+
orientation: Orientation;
|
|
31
|
+
decorative: boolean;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
}>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
6
|
+
new (): {
|
|
7
|
+
$slots: S;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface ButtonProps {
|
|
2
|
+
class?: string;
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
type?: "button" | "submit" | "reset";
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
class: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
};
|
|
11
|
+
ariaLabel: {
|
|
12
|
+
type: import("vue").PropType<string>;
|
|
13
|
+
};
|
|
14
|
+
type: {
|
|
15
|
+
type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
16
|
+
};
|
|
17
|
+
disabled: {
|
|
18
|
+
type: import("vue").PropType<boolean>;
|
|
19
|
+
};
|
|
20
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
class: {
|
|
22
|
+
type: import("vue").PropType<string>;
|
|
23
|
+
};
|
|
24
|
+
ariaLabel: {
|
|
25
|
+
type: import("vue").PropType<string>;
|
|
26
|
+
};
|
|
27
|
+
type: {
|
|
28
|
+
type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
29
|
+
};
|
|
30
|
+
disabled: {
|
|
31
|
+
type: import("vue").PropType<boolean>;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
34
|
+
default?(_: {}): any;
|
|
35
|
+
}>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
action: {
|
|
3
|
+
type: import("vue").PropType<"undo" | "redo">;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
text: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
};
|
|
9
|
+
showShortcut: {
|
|
10
|
+
type: import("vue").PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
hideWhenUnavailable: {
|
|
13
|
+
type: import("vue").PropType<boolean>;
|
|
14
|
+
};
|
|
15
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
action: {
|
|
17
|
+
type: import("vue").PropType<"undo" | "redo">;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
text: {
|
|
21
|
+
type: import("vue").PropType<string>;
|
|
22
|
+
};
|
|
23
|
+
showShortcut: {
|
|
24
|
+
type: import("vue").PropType<boolean>;
|
|
25
|
+
};
|
|
26
|
+
hideWhenUnavailable: {
|
|
27
|
+
type: import("vue").PropType<boolean>;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Node } from "@tiptap/core";
|
|
2
|
+
import type { NodeType } from "@tiptap/pm/model";
|
|
3
|
+
import "./image-upload-node.scss";
|
|
4
|
+
import type { UploadEventPayload } from "@/models/UploadedFile.model";
|
|
5
|
+
export declare function setPendingFilesForNode(editorView: object, position: number, files: File[]): void;
|
|
6
|
+
export type UploadFunction = (file: File, onProgress?: (event: {
|
|
7
|
+
progress: number;
|
|
8
|
+
}) => void, abortSignal?: AbortSignal) => Promise<string>;
|
|
9
|
+
export interface FileUploadNodeOptions {
|
|
10
|
+
/**
|
|
11
|
+
* The type of the node.
|
|
12
|
+
* @default 'image'
|
|
13
|
+
*/
|
|
14
|
+
type?: string | NodeType | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Acceptable file types for upload.
|
|
17
|
+
* @default 'image/*'
|
|
18
|
+
*/
|
|
19
|
+
accept?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Maximum number of files that can be uploaded.
|
|
22
|
+
* @default 1
|
|
23
|
+
*/
|
|
24
|
+
limit?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum file size in bytes (0 for unlimited).
|
|
27
|
+
* @default 0
|
|
28
|
+
*/
|
|
29
|
+
maxSize?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Function to handle the upload process.
|
|
32
|
+
*/
|
|
33
|
+
upload?: UploadFunction;
|
|
34
|
+
/**
|
|
35
|
+
* Callback for upload errors.
|
|
36
|
+
*/
|
|
37
|
+
onError?: (error: Error) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Callback for successful uploads.
|
|
40
|
+
*/
|
|
41
|
+
onSuccess?: (url: string) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Callback for file upload events.
|
|
44
|
+
*/
|
|
45
|
+
onFileUpload?: (payload: UploadEventPayload) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Force upload as attachment even for single images.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
forceAttachment?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Internationalization strings for the upload UI.
|
|
53
|
+
*/
|
|
54
|
+
i18n?: Record<string, string>;
|
|
55
|
+
/**
|
|
56
|
+
* HTML attributes to add to the image element.
|
|
57
|
+
* @default {}
|
|
58
|
+
* @example { class: 'foo' }
|
|
59
|
+
*/
|
|
60
|
+
HTMLAttributes: Record<string, any>;
|
|
61
|
+
}
|
|
62
|
+
export interface FileUploadNodeAttributes {
|
|
63
|
+
accept?: string;
|
|
64
|
+
limit?: number;
|
|
65
|
+
maxSize?: number;
|
|
66
|
+
forceAttachment?: boolean;
|
|
67
|
+
i18n?: Record<string, string>;
|
|
68
|
+
}
|
|
69
|
+
declare module "@tiptap/core" {
|
|
70
|
+
interface Commands<ReturnType> {
|
|
71
|
+
fileUpload: {
|
|
72
|
+
setFileUploadNode: (options?: FileUploadNodeAttributes) => ReturnType;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* A Tiptap node extension that creates a file upload component.
|
|
78
|
+
*/
|
|
79
|
+
export declare const FileUploadNode: Node<FileUploadNodeOptions, any>;
|
|
80
|
+
export default FileUploadNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./file-upload-node-extension";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const CONSTANTS: {
|
|
2
|
+
readonly MOBILE_BREAKPOINT: 768;
|
|
3
|
+
readonly ICON_SIZE: "24px";
|
|
4
|
+
readonly CONTROLLER_HEIGHT: "25px";
|
|
5
|
+
readonly DOT_SIZE: {
|
|
6
|
+
readonly MOBILE: 16;
|
|
7
|
+
readonly DESKTOP: 9;
|
|
8
|
+
};
|
|
9
|
+
readonly DOT_POSITION: {
|
|
10
|
+
readonly MOBILE: "-8px";
|
|
11
|
+
readonly DESKTOP: "-4px";
|
|
12
|
+
};
|
|
13
|
+
readonly COLORS: {
|
|
14
|
+
readonly BORDER: "#6C6C6C";
|
|
15
|
+
readonly BACKGROUND: "rgba(255, 255, 255, 1)";
|
|
16
|
+
};
|
|
17
|
+
readonly ICONS: {
|
|
18
|
+
readonly LEFT: "<svg fill=\"currentColor\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path clip-rule=\"evenodd\" d=\"M2 6C2 5.44772 2.44772 5 3 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H3C2.44772 7 2 6.55228 2 6Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n <path clip-rule=\"evenodd\" d=\"M2 12C2 11.4477 2.44772 11 3 11H15C15.5523 11 16 11.4477 16 12C16 12.5523 15.5523 13 15 13H3C2.44772 13 2 12.5523 2 12Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n <path clip-rule=\"evenodd\" d=\"M2 18C2 17.4477 2.44772 17 3 17H17C17.5523 17 18 17.4477 18 18C18 18.5523 17.5523 19 17 19H3C2.44772 19 2 18.5523 2 18Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n </svg>";
|
|
19
|
+
readonly CENTER: "<svg fill=\"currentColor\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path clip-rule=\"evenodd\" d=\"M2 6C2 5.44772 2.44772 5 3 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H3C2.44772 7 2 6.55228 2 6Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n <path clip-rule=\"evenodd\" d=\"M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n <path clip-rule=\"evenodd\" d=\"M4 18C4 17.4477 4.44772 17 5 17H19C19.5523 17 20 17.4477 20 18C20 18.5523 19.5523 19 19 19H5C4.44772 19 4 18.5523 4 18Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n </svg>";
|
|
20
|
+
readonly RIGHT: "<svg fill=\"currentColor\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path clip-rule=\"evenodd\" d=\"M2 6C2 5.44772 2.44772 5 3 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H3C2.44772 7 2 6.55228 2 6Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n <path clip-rule=\"evenodd\" d=\"M8 12C8 11.4477 8.44772 11 9 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H9C8.44772 13 8 12.5523 8 12Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n <path clip-rule=\"evenodd\" d=\"M6 18C6 17.4477 6.44772 17 7 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H7C6.44772 19 6 18.5523 6 18Z\" fill=\"currentColor\" fill-rule=\"evenodd\"/>\n </svg>";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Node } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/core";
|
|
3
|
+
import type { EditorView } from "@tiptap/pm/view";
|
|
4
|
+
interface NodeViewContext {
|
|
5
|
+
node: Node;
|
|
6
|
+
editor: Editor;
|
|
7
|
+
view: EditorView;
|
|
8
|
+
getPos: (() => number | undefined) | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare class ImageNodeView {
|
|
11
|
+
private context;
|
|
12
|
+
private elements;
|
|
13
|
+
private inline;
|
|
14
|
+
private onContainerClick?;
|
|
15
|
+
private onDocumentClick?;
|
|
16
|
+
constructor(context: NodeViewContext, inline: boolean);
|
|
17
|
+
private createElements;
|
|
18
|
+
private clearContainerBorder;
|
|
19
|
+
private dispatchNodeView;
|
|
20
|
+
private removeResizeElements;
|
|
21
|
+
private setupImageAttributes;
|
|
22
|
+
private setupDOMStructure;
|
|
23
|
+
private createPositionController;
|
|
24
|
+
private createResizeHandler;
|
|
25
|
+
private setupContainerClick;
|
|
26
|
+
private setupContentClick;
|
|
27
|
+
initialize(): {
|
|
28
|
+
dom: HTMLElement;
|
|
29
|
+
destroy?: () => void;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ImageElements } from "../types";
|
|
2
|
+
export declare class PositionController {
|
|
3
|
+
private elements;
|
|
4
|
+
private inline;
|
|
5
|
+
private dispatchNodeView;
|
|
6
|
+
constructor(elements: ImageElements, inline: boolean, dispatchNodeView: () => void);
|
|
7
|
+
private createControllerIcon;
|
|
8
|
+
private handleLeftClick;
|
|
9
|
+
private handleCenterClick;
|
|
10
|
+
private handleRightClick;
|
|
11
|
+
createPositionControls(): PositionController;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ImageElements } from "../types";
|
|
2
|
+
export declare class ResizeController {
|
|
3
|
+
private elements;
|
|
4
|
+
private dispatchNodeView;
|
|
5
|
+
private state;
|
|
6
|
+
constructor(elements: ImageElements, dispatchNodeView: () => void);
|
|
7
|
+
private handleMouseMove;
|
|
8
|
+
private handleMouseUp;
|
|
9
|
+
private handleTouchMove;
|
|
10
|
+
private handleTouchEnd;
|
|
11
|
+
createResizeHandle(index: number): HTMLElement;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ImageResize: import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ResizeState {
|
|
2
|
+
isResizing: boolean;
|
|
3
|
+
startX: number;
|
|
4
|
+
startWidth: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PositionController {
|
|
7
|
+
element: HTMLElement;
|
|
8
|
+
leftController: HTMLElement;
|
|
9
|
+
centerController?: HTMLElement;
|
|
10
|
+
rightController: HTMLElement;
|
|
11
|
+
}
|
|
12
|
+
export interface ImageElements {
|
|
13
|
+
wrapper: HTMLElement;
|
|
14
|
+
container: HTMLElement;
|
|
15
|
+
img: HTMLImageElement;
|
|
16
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { Node as TiptapNode } from "@tiptap/pm/model";
|
|
2
|
+
import type { Editor } from "@tiptap/vue-3";
|
|
3
|
+
export declare const MAX_FILE_SIZE: number;
|
|
4
|
+
export declare const MAC_SYMBOLS: Record<string, string>;
|
|
5
|
+
export declare function cn(...classes: (string | boolean | undefined | null)[]): string;
|
|
6
|
+
/**
|
|
7
|
+
* Determines if the current platform is macOS
|
|
8
|
+
* @returns boolean indicating if the current platform is Mac
|
|
9
|
+
*/
|
|
10
|
+
export declare function isMac(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Formats a shortcut key based on the platform (Mac or non-Mac)
|
|
13
|
+
* @param key - The key to format (e.g., "ctrl", "alt", "shift")
|
|
14
|
+
* @param isMac - Boolean indicating if the platform is Mac
|
|
15
|
+
* @param capitalize - Whether to capitalize the key (default: true)
|
|
16
|
+
* @returns Formatted shortcut key symbol
|
|
17
|
+
*/
|
|
18
|
+
export declare const formatShortcutKey: (key: string, isMac: boolean, capitalize?: boolean) => string;
|
|
19
|
+
/**
|
|
20
|
+
* Parses a shortcut key string into an array of formatted key symbols
|
|
21
|
+
* @param shortcutKeys - The string of shortcut keys (e.g., "ctrl-alt-shift")
|
|
22
|
+
* @param delimiter - The delimiter used to split the keys (default: "-")
|
|
23
|
+
* @param capitalize - Whether to capitalize the keys (default: true)
|
|
24
|
+
* @returns Array of formatted shortcut key symbols
|
|
25
|
+
*/
|
|
26
|
+
export declare const parseShortcutKeys: (props: {
|
|
27
|
+
shortcutKeys: string | undefined;
|
|
28
|
+
delimiter?: string;
|
|
29
|
+
capitalize?: boolean;
|
|
30
|
+
}) => string[];
|
|
31
|
+
/**
|
|
32
|
+
* Checks if a mark exists in the editor schema
|
|
33
|
+
* @param markName - The name of the mark to check
|
|
34
|
+
* @param editor - The editor instance
|
|
35
|
+
* @returns boolean indicating if the mark exists in the schema
|
|
36
|
+
*/
|
|
37
|
+
export declare const isMarkInSchema: (markName: string, editor: Editor | null) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Checks if a node exists in the editor schema
|
|
40
|
+
* @param nodeName - The name of the node to check
|
|
41
|
+
* @param editor - The editor instance
|
|
42
|
+
* @returns boolean indicating if the node exists in the schema
|
|
43
|
+
*/
|
|
44
|
+
export declare const isNodeInSchema: (nodeName: string, editor: Editor | null) => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Moves the focus to the next node in the editor
|
|
47
|
+
* @param editor - The editor instance
|
|
48
|
+
* @returns boolean indicating if the focus was moved
|
|
49
|
+
*/
|
|
50
|
+
export declare function focusNextNode(editor: Editor): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Checks if a value is a valid number (not null, undefined, or NaN)
|
|
53
|
+
* @param value - The value to check
|
|
54
|
+
* @returns boolean indicating if the value is a valid number
|
|
55
|
+
*/
|
|
56
|
+
export declare function isValidPosition(pos: number | null | undefined): pos is number;
|
|
57
|
+
/**
|
|
58
|
+
* Checks if one or more extensions are registered in the Tiptap editor.
|
|
59
|
+
* @param editor - The Tiptap editor instance
|
|
60
|
+
* @param extensionNames - A single extension name or an array of names to check
|
|
61
|
+
* @returns True if at least one of the extensions is available, false otherwise
|
|
62
|
+
*/
|
|
63
|
+
export declare function isExtensionAvailable(editor: Editor | null, extensionNames: string | string[]): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Finds a node at the specified position with error handling
|
|
66
|
+
* @param editor The Tiptap editor instance
|
|
67
|
+
* @param position The position in the document to find the node
|
|
68
|
+
* @returns The node at the specified position, or null if not found
|
|
69
|
+
*/
|
|
70
|
+
export declare function findNodeAtPosition(editor: Editor, position: number): TiptapNode | null;
|
|
71
|
+
/**
|
|
72
|
+
* Finds the position and instance of a node in the document
|
|
73
|
+
* @param props Object containing editor, node (optional), and nodePos (optional)
|
|
74
|
+
* @param props.editor The Tiptap editor instance
|
|
75
|
+
* @param props.node The node to find (optional if nodePos is provided)
|
|
76
|
+
* @param props.nodePos The position of the node to find (optional if node is provided)
|
|
77
|
+
* @returns An object with the position and node, or null if not found
|
|
78
|
+
*/
|
|
79
|
+
export declare function findNodePosition(props: {
|
|
80
|
+
editor: Editor | null;
|
|
81
|
+
node?: TiptapNode | null;
|
|
82
|
+
nodePos?: number | null;
|
|
83
|
+
}): {
|
|
84
|
+
pos: number;
|
|
85
|
+
node: TiptapNode;
|
|
86
|
+
} | null;
|
|
87
|
+
/**
|
|
88
|
+
* Checks if the current selection in the editor is a node selection of specified types
|
|
89
|
+
* @param editor The Tiptap editor instance
|
|
90
|
+
* @param types An array of node type names to check against
|
|
91
|
+
* @returns boolean indicating if the selected node matches any of the specified types
|
|
92
|
+
*/
|
|
93
|
+
export declare function isNodeTypeSelected(editor: Editor | null, types?: string[]): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Handles image upload with progress tracking and abort capability
|
|
96
|
+
* @param file The file to upload
|
|
97
|
+
* @param onProgress Optional callback for tracking upload progress
|
|
98
|
+
* @param abortSignal Optional AbortSignal for cancelling the upload
|
|
99
|
+
* @returns Promise resolving to the URL of the uploaded image
|
|
100
|
+
*/
|
|
101
|
+
export declare const handleImageUpload: (file: File, onProgress?: ((event: {
|
|
102
|
+
progress: number;
|
|
103
|
+
}) => void) | undefined, abortSignal?: AbortSignal) => Promise<string>;
|
|
104
|
+
type ProtocolOptions = {
|
|
105
|
+
/**
|
|
106
|
+
* The protocol scheme to be registered.
|
|
107
|
+
* @default '''
|
|
108
|
+
* @example 'ftp'
|
|
109
|
+
* @example 'git'
|
|
110
|
+
*/
|
|
111
|
+
scheme: string;
|
|
112
|
+
/**
|
|
113
|
+
* If enabled, it allows optional slashes after the protocol.
|
|
114
|
+
* @default false
|
|
115
|
+
* @example true
|
|
116
|
+
*/
|
|
117
|
+
optionalSlashes?: boolean;
|
|
118
|
+
};
|
|
119
|
+
type ProtocolConfig = Array<ProtocolOptions | string>;
|
|
120
|
+
export declare function isAllowedUri(uri: string | undefined, protocols?: ProtocolConfig): true | RegExpMatchArray | null;
|
|
121
|
+
export declare function sanitizeUrl(inputUrl: string, baseUrl: string, protocols?: ProtocolConfig): string;
|
|
122
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
$props: {
|
|
3
|
+
readonly text?: string | undefined;
|
|
4
|
+
readonly placement?: string | undefined;
|
|
5
|
+
readonly readonly?: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
$props: {
|
|
3
|
+
readonly range?: boolean | undefined;
|
|
4
|
+
readonly enableTimePicker?: boolean | undefined;
|
|
5
|
+
readonly multiCalendars?: boolean | undefined;
|
|
6
|
+
readonly multiCalendarsSolo?: boolean | undefined;
|
|
7
|
+
readonly inline?: boolean | undefined;
|
|
8
|
+
};
|
|
9
|
+
$emit: (event: "update", ...args: any[]) => void;
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|