@opencloud-eu/web-pkg 6.1.0 → 7.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/dist/assets/worker-B8V6K8WY.js +25 -0
- package/dist/assets/worker-BjLAp2qA.js +25 -0
- package/dist/assets/worker-Cz7k4ET0.js +25 -0
- package/dist/{composables-TkULFBg4.js → components-DGm07xAo.js} +8229 -10761
- package/dist/src/components/AppBar/AppBar.vue.d.ts +34 -91
- package/dist/src/components/AppTemplates/AppWrapper.vue.d.ts +1 -9
- package/dist/src/components/AppTopBar.vue.d.ts +3 -11
- package/dist/src/components/Avatars/AvatarUpload.vue.d.ts +0 -1
- package/dist/src/components/Avatars/UserAvatar.vue.d.ts +1 -9
- package/dist/src/components/ContextActions/ActionMenuDropItem.vue.d.ts +1 -9
- package/dist/src/components/ContextActions/ContextActionMenu.vue.d.ts +9 -27
- package/dist/src/components/ContextActions/ContextMenuQuickAction.vue.d.ts +30 -134
- package/dist/src/components/CreateLinkModal.vue.d.ts +6 -14
- package/dist/src/components/CreateShortcutModal.vue.d.ts +34 -142
- package/dist/src/components/CustomComponentTarget.vue.d.ts +1 -9
- package/dist/src/components/FilesList/ContextActions.vue.d.ts +9 -27
- package/dist/src/components/FilesList/ResourceGhostElement.vue.d.ts +7 -17
- package/dist/src/components/FilesList/ResourceIcon.vue.d.ts +1 -9
- package/dist/src/components/FilesList/ResourceListItem.vue.d.ts +5 -12
- package/dist/src/components/FilesList/ResourceName.vue.d.ts +3 -9
- package/dist/src/components/FilesList/ResourceStatusIndicators.vue.d.ts +1 -9
- package/dist/src/components/FilesList/ResourceTable.vue.d.ts +8 -16
- package/dist/src/components/FilesList/ResourceTile.vue.d.ts +6 -14
- package/dist/src/components/FilesList/ResourceTiles.vue.d.ts +7 -15
- package/dist/src/components/Filters/DateFilter.vue.d.ts +5 -13
- package/dist/src/components/ImageCropper.vue.d.ts +12 -0
- package/dist/src/components/ItemFilter.vue.d.ts +5 -13
- package/dist/src/components/NoContentMessage.vue.d.ts +1 -9
- package/dist/src/components/Search/ResourcePreview.vue.d.ts +1 -9
- package/dist/src/components/SideBar/CompareSaveDialog.vue.d.ts +1 -1
- package/dist/src/components/SideBar/FileSideBar.vue.d.ts +1 -9
- package/dist/src/components/SideBar/Files/FileInfo.vue.d.ts +1 -9
- package/dist/src/components/SideBar/SideBar.vue.d.ts +5 -13
- package/dist/src/components/SideBar/SideBarPanels.vue.d.ts +6 -14
- package/dist/src/components/SideBar/Spaces/Details/SpaceDetails.vue.d.ts +1 -9
- package/dist/src/components/SideBar/Spaces/Details/SpaceDetailsMultiple.vue.d.ts +1 -9
- package/dist/src/components/SideBar/Spaces/SpaceInfo.vue.d.ts +5 -1
- package/dist/src/components/SpaceQuota.vue.d.ts +1 -9
- package/dist/src/components/Spaces/QuotaModal.vue.d.ts +3 -11
- package/dist/src/components/Spaces/SpaceImageModal.vue.d.ts +2 -11
- package/dist/src/components/ViewOptions.vue.d.ts +1 -9
- package/dist/src/components/index.d.ts +0 -2
- package/dist/src/composables/actions/files/index.d.ts +0 -21
- package/dist/src/composables/actions/spaces/index.d.ts +0 -12
- package/dist/src/composables/actions/types.d.ts +93 -2
- package/dist/src/composables/breadcrumbs/useBreadcrumbsFromPath.d.ts +1 -3
- package/dist/src/composables/driveResolver/useDriveResolver.d.ts +0 -1
- package/dist/src/composables/keyboardActions/useCropperKeyboardActions.d.ts +2 -1
- package/dist/src/composables/keyboardActions/useKeyboardActions.d.ts +1 -0
- package/dist/src/composables/piniaStores/auth.d.ts +24 -2
- package/dist/src/composables/piniaStores/avatars.d.ts +3 -3
- package/dist/src/composables/piniaStores/config/config.d.ts +1 -91
- package/dist/src/composables/piniaStores/config/types.d.ts +0 -20
- package/dist/src/composables/piniaStores/extensionRegistry/extensionRegistry.d.ts +4 -1
- package/dist/src/composables/piniaStores/messages.d.ts +12 -594
- package/dist/src/composables/piniaStores/spaces.d.ts +1 -3
- package/dist/src/composables/piniaStores/theme.d.ts +1 -1
- package/dist/src/composables/resources/useResourceViewDrag.d.ts +7 -17
- package/dist/src/composables/resources/useResourceViewHelpers.d.ts +7 -17
- package/dist/src/composables/router/useFileRouteReplace.d.ts +0 -2
- package/dist/src/composables/spaces/useGetMatchingSpace.d.ts +0 -4
- package/dist/src/editor/components/SlashCommandMenu.vue.d.ts +9 -0
- package/dist/src/editor/components/TextEditorContent.vue.d.ts +7 -0
- package/dist/src/editor/components/TextEditorProvider.vue.d.ts +17 -0
- package/dist/src/editor/composables/index.d.ts +3 -0
- package/dist/src/editor/composables/strategies/html.d.ts +3 -0
- package/dist/src/editor/composables/strategies/index.d.ts +5 -0
- package/dist/src/editor/composables/strategies/markdown.d.ts +3 -0
- package/dist/src/editor/composables/strategies/plainText.d.ts +3 -0
- package/dist/src/editor/composables/strategies/tiptapJson.d.ts +3 -0
- package/dist/src/editor/composables/strategies/types.d.ts +10 -0
- package/dist/src/editor/composables/useContentStrategy.d.ts +5 -0
- package/dist/src/editor/composables/useEditorActions.d.ts +75 -0
- package/dist/src/editor/composables/useTextEditor.d.ts +2 -0
- package/dist/src/editor/extensions/index.d.ts +1 -0
- package/dist/src/editor/extensions/slashCommands.d.ts +16 -0
- package/dist/src/editor/index.d.ts +5 -0
- package/dist/src/editor/types.d.ts +29 -0
- package/dist/src/helpers/groupwareResponse.d.ts +1 -0
- package/dist/src/helpers/index.d.ts +2 -0
- package/dist/src/helpers/router/routeOptions.d.ts +1 -7
- package/dist/src/helpers/virtualCursorElement.d.ts +1 -0
- package/dist/src/router/index.d.ts +2 -1
- package/dist/src/router/utils.d.ts +1 -6
- package/dist/src/types.d.ts +1 -0
- package/dist/src/utils/dummyGettext.d.ts +6 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/web-pkg/editor.js +1360 -0
- package/dist/web-pkg.js +2956 -1661
- package/package.json +26 -9
- package/dist/TextEditor-B0ZZfO_w.js +0 -819
- package/dist/assets/worker-C-Nrpmiq.js +0 -24
- package/dist/assets/worker-CzI1mBNb.js +0 -24
- package/dist/assets/worker-DDmV-och.js +0 -24
- package/dist/src/components/Navigation/index.d.ts +0 -1
- package/dist/src/components/TextEditor/TextEditor.vue.d.ts +0 -26
- package/dist/src/components/TextEditor/index.d.ts +0 -39
- package/dist/src/components/TextEditor/l18n.d.ts +0 -3
- package/dist/src/composables/actions/files/useFileActionsCopy.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsCopyPermanentLink.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsCreateLink.d.ts +0 -6
- package/dist/src/composables/actions/files/useFileActionsCreateNewFile.d.ts +0 -10
- package/dist/src/composables/actions/files/useFileActionsCreateNewFolder.d.ts +0 -9
- package/dist/src/composables/actions/files/useFileActionsCreateNewShortcut.d.ts +0 -8
- package/dist/src/composables/actions/files/useFileActionsCreateSpaceFromResource.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsDisableSync.d.ts +0 -5
- package/dist/src/composables/actions/files/useFileActionsDownloadArchive.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsEmptyTrashBin.d.ts +0 -8
- package/dist/src/composables/actions/files/useFileActionsEnableSync.d.ts +0 -5
- package/dist/src/composables/actions/files/useFileActionsFavorite.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsMove.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsOpenShortcut.d.ts +0 -5
- package/dist/src/composables/actions/files/useFileActionsPaste.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsRename.d.ts +0 -6
- package/dist/src/composables/actions/files/useFileActionsSetImage.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsShowActions.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsShowDetails.d.ts +0 -4
- package/dist/src/composables/actions/files/useFileActionsShowShares.d.ts +0 -5
- package/dist/src/composables/actions/files/useFileActionsToggleHideShare.d.ts +0 -5
- package/dist/src/composables/actions/spaces/useSpaceActionsDelete.d.ts +0 -6
- package/dist/src/composables/actions/spaces/useSpaceActionsDeleteImage.d.ts +0 -8
- package/dist/src/composables/actions/spaces/useSpaceActionsDisable.d.ts +0 -6
- package/dist/src/composables/actions/spaces/useSpaceActionsDuplicate.d.ts +0 -6
- package/dist/src/composables/actions/spaces/useSpaceActionsEditDescription.d.ts +0 -6
- package/dist/src/composables/actions/spaces/useSpaceActionsEditQuota.d.ts +0 -4
- package/dist/src/composables/actions/spaces/useSpaceActionsEditReadmeContent.d.ts +0 -4
- package/dist/src/composables/actions/spaces/useSpaceActionsNavigateToTrash.d.ts +0 -4
- package/dist/src/composables/actions/spaces/useSpaceActionsRename.d.ts +0 -6
- package/dist/src/composables/actions/spaces/useSpaceActionsRestore.d.ts +0 -6
- package/dist/src/composables/actions/spaces/useSpaceActionsSetIcon.d.ts +0 -6
- package/dist/src/composables/actions/spaces/useSpaceActionsShowMembers.d.ts +0 -4
- /package/dist/src/{components/Navigation/MobileNav.vue.d.ts → editor/components/TextEditorToolbar.vue.d.ts} +0 -0
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { SpaceResource } from '@opencloud-eu/web-client';
|
|
2
2
|
import { Graph } from '@opencloud-eu/web-client/graph';
|
|
3
3
|
import type { CollaboratorShare, MountPointSpaceResource } from '@opencloud-eu/web-client';
|
|
4
|
-
import { ConfigStore } from './config';
|
|
5
4
|
export declare const sortSpaceMembers: (shares: CollaboratorShare[]) => CollaboratorShare[];
|
|
6
|
-
export declare const getSpacesByType: ({ graphClient, driveType,
|
|
5
|
+
export declare const getSpacesByType: ({ graphClient, driveType, signal }: {
|
|
7
6
|
graphClient: Graph;
|
|
8
7
|
driveType: string;
|
|
9
|
-
configStore: ConfigStore;
|
|
10
8
|
signal?: AbortSignal;
|
|
11
9
|
}) => Promise<SpaceResource[]>;
|
|
12
10
|
export declare const useSpacesStore: import("pinia").StoreDefinition<"spaces", Pick<{
|
|
@@ -264,7 +264,7 @@ export declare const useThemeStore: import("pinia").StoreDefinition<"theme", Pic
|
|
|
264
264
|
setAutoSystemTheme: () => void;
|
|
265
265
|
isCurrentThemeAutoSystem: import("vue").ComputedRef<boolean>;
|
|
266
266
|
getRoleIcon: (role: ShareRole) => string;
|
|
267
|
-
}, "
|
|
267
|
+
}, "currentTheme" | "availableThemes">, Pick<{
|
|
268
268
|
availableThemes: import("vue").Ref<{
|
|
269
269
|
isDark: boolean;
|
|
270
270
|
label: string;
|
|
@@ -21,23 +21,13 @@ export declare const useResourceViewDrag: ({ selectedIds, selectedResources, emi
|
|
|
21
21
|
required: true;
|
|
22
22
|
};
|
|
23
23
|
}>> & Readonly<{}>, {}, {}, {
|
|
24
|
-
ResourceIcon: import("vue").DefineComponent<
|
|
25
|
-
resource:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
size
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
-
resource: {
|
|
34
|
-
type: import("vue").PropType<Resource | import("@opencloud-eu/web-client").SpaceResource>;
|
|
35
|
-
required: true;
|
|
36
|
-
};
|
|
37
|
-
size: {
|
|
38
|
-
type: import("vue").PropType<import("@opencloud-eu/design-system/helpers").SizeType>;
|
|
39
|
-
};
|
|
40
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
ResourceIcon: import("vue").DefineComponent<{
|
|
25
|
+
resource: Resource | import("@opencloud-eu/web-client").SpaceResource;
|
|
26
|
+
size?: import("@opencloud-eu/design-system/helpers").SizeType;
|
|
27
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
28
|
+
resource: Resource | import("@opencloud-eu/web-client").SpaceResource;
|
|
29
|
+
size?: import("@opencloud-eu/design-system/helpers").SizeType;
|
|
30
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
31
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>>>;
|
|
42
32
|
dragItem: Ref<Resource, Resource>;
|
|
43
33
|
dragSelection: import("vue").ComputedRef<Resource[]>;
|
|
@@ -32,23 +32,13 @@ export declare const useResourceViewHelpers: ({ space, resources, selectedIds, e
|
|
|
32
32
|
required: true;
|
|
33
33
|
};
|
|
34
34
|
}>> & Readonly<{}>, {}, {}, {
|
|
35
|
-
ResourceIcon: import("vue").DefineComponent<
|
|
36
|
-
resource:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
size
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
-
resource: {
|
|
45
|
-
type: import("vue").PropType<Resource | SpaceResource>;
|
|
46
|
-
required: true;
|
|
47
|
-
};
|
|
48
|
-
size: {
|
|
49
|
-
type: import("vue").PropType<import("@opencloud-eu/design-system/helpers").SizeType>;
|
|
50
|
-
};
|
|
51
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
ResourceIcon: import("vue").DefineComponent<{
|
|
36
|
+
resource: Resource | SpaceResource;
|
|
37
|
+
size?: import("@opencloud-eu/design-system/helpers").SizeType;
|
|
38
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
39
|
+
resource: Resource | SpaceResource;
|
|
40
|
+
size?: import("@opencloud-eu/design-system/helpers").SizeType;
|
|
41
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
52
42
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>>>;
|
|
53
43
|
dragItem: Ref<Resource, Resource>;
|
|
54
44
|
dragSelection: import("vue").ComputedRef<Resource[]>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Resource, SpaceResource } from '@opencloud-eu/web-client';
|
|
2
2
|
import { Router } from 'vue-router';
|
|
3
|
-
import { ConfigStore } from '../piniaStores';
|
|
4
3
|
export interface FileRouteReplaceOptions {
|
|
5
4
|
router?: Router;
|
|
6
|
-
configStore?: ConfigStore;
|
|
7
5
|
}
|
|
8
6
|
export declare const useFileRouteReplace: (options?: FileRouteReplaceOptions) => {
|
|
9
7
|
replaceInvalidFileRoute: ({ space, resource, path, fileId }: {
|
|
@@ -7,9 +7,5 @@ export declare const useGetMatchingSpace: (options?: GetMatchingSpaceOptions) =>
|
|
|
7
7
|
getInternalSpace: (storageId: string) => SpaceResource;
|
|
8
8
|
getMatchingSpace: (resource: Resource) => SpaceResource;
|
|
9
9
|
isPersonalSpaceRoot: (resource: Resource) => boolean;
|
|
10
|
-
isResourceAccessible: ({ space, path }: {
|
|
11
|
-
space: SpaceResource;
|
|
12
|
-
path: string;
|
|
13
|
-
}) => boolean;
|
|
14
10
|
};
|
|
15
11
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SuggestionProps } from '@tiptap/suggestion';
|
|
2
|
+
import { FlatSlashCommandItem } from '../extensions';
|
|
3
|
+
type __VLS_Props = SuggestionProps<FlatSlashCommandItem>;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
5
|
+
onUpdate: () => void;
|
|
6
|
+
onKeyDown: (event: KeyboardEvent) => boolean;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TextEditorInstance } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
editor?: TextEditorInstance;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TextEditorInstance } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
editor: TextEditorInstance;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Extension } from '@tiptap/core';
|
|
2
|
+
import type { EditorActionGroup } from '../useEditorActions';
|
|
3
|
+
import type { Editor } from '@tiptap/vue-3';
|
|
4
|
+
export interface ContentTypeStrategy {
|
|
5
|
+
editorContentType?(): string;
|
|
6
|
+
serialize(editor: Editor): string;
|
|
7
|
+
deserialize(content: string): Record<string, unknown> | string;
|
|
8
|
+
extensions(): Extension[];
|
|
9
|
+
editorActionGroups(): EditorActionGroup[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { MaybeRef } from 'vue';
|
|
2
|
+
import type { Editor, Range } from '@tiptap/core';
|
|
3
|
+
import { TextEditorState } from '../types';
|
|
4
|
+
export interface EditorAction {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
iconFillType?: 'fill' | 'line' | 'none';
|
|
10
|
+
activeIcon?: (editor: Editor) => {
|
|
11
|
+
icon: string;
|
|
12
|
+
iconFillType?: 'fill' | 'line' | 'none';
|
|
13
|
+
} | undefined;
|
|
14
|
+
keywords?: string[];
|
|
15
|
+
toolbarAction?: (editor: Editor, value?: string) => void;
|
|
16
|
+
slashCommandAction?: (ctx: {
|
|
17
|
+
editor: Editor;
|
|
18
|
+
range: Range;
|
|
19
|
+
}) => void;
|
|
20
|
+
isActive?: (editor: Editor) => boolean;
|
|
21
|
+
isEnabled?: (editor: Editor) => boolean;
|
|
22
|
+
showInToolbar?: boolean;
|
|
23
|
+
showInSlashCommands?: boolean;
|
|
24
|
+
childActions?: EditorAction[];
|
|
25
|
+
}
|
|
26
|
+
export interface EditorActionGroup {
|
|
27
|
+
id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
actions: EditorAction[];
|
|
30
|
+
}
|
|
31
|
+
export interface UseEditorActionsOptions {
|
|
32
|
+
onRequestLinkUrl?: (editor: Editor, currentUrl?: string) => void;
|
|
33
|
+
onRequestImageUrl?: (editor: Editor) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface ContentTypeActions {
|
|
36
|
+
toolbarGroups: EditorAction[][];
|
|
37
|
+
slashCommandGroups: EditorActionGroup[];
|
|
38
|
+
}
|
|
39
|
+
export declare function useEditorActions(state: TextEditorState, options?: MaybeRef<UseEditorActionsOptions>): {
|
|
40
|
+
undo: () => EditorAction;
|
|
41
|
+
redo: () => EditorAction;
|
|
42
|
+
toggleSourceMode: () => EditorAction;
|
|
43
|
+
heading: () => EditorAction;
|
|
44
|
+
heading1: () => EditorAction;
|
|
45
|
+
heading2: () => EditorAction;
|
|
46
|
+
heading3: () => EditorAction;
|
|
47
|
+
heading4: () => EditorAction;
|
|
48
|
+
fontSize: () => EditorAction;
|
|
49
|
+
textColor: () => EditorAction;
|
|
50
|
+
backgroundColor: () => EditorAction;
|
|
51
|
+
bold: () => EditorAction;
|
|
52
|
+
italic: () => EditorAction;
|
|
53
|
+
underline: () => EditorAction;
|
|
54
|
+
strikethrough: () => EditorAction;
|
|
55
|
+
codeInline: () => EditorAction;
|
|
56
|
+
lineHeight: () => EditorAction;
|
|
57
|
+
blockquote: () => EditorAction;
|
|
58
|
+
codeBlock: () => EditorAction;
|
|
59
|
+
bulletList: () => EditorAction;
|
|
60
|
+
orderedList: () => EditorAction;
|
|
61
|
+
taskList: () => EditorAction;
|
|
62
|
+
link: () => EditorAction;
|
|
63
|
+
image: () => EditorAction;
|
|
64
|
+
imageUrl: () => EditorAction;
|
|
65
|
+
imageUpload: () => EditorAction;
|
|
66
|
+
horizontalRule: () => EditorAction;
|
|
67
|
+
tableMenu: () => EditorAction;
|
|
68
|
+
createTable: () => EditorAction;
|
|
69
|
+
addRowBefore: () => EditorAction;
|
|
70
|
+
addRowAfter: () => EditorAction;
|
|
71
|
+
deleteRow: () => EditorAction;
|
|
72
|
+
addColumnBefore: () => EditorAction;
|
|
73
|
+
addColumnAfter: () => EditorAction;
|
|
74
|
+
deleteColumn: () => EditorAction;
|
|
75
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './slashCommands';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Extension as TipTapExtension, Editor } from '@tiptap/core';
|
|
2
|
+
import { SuggestionProps } from '@tiptap/suggestion';
|
|
3
|
+
import { EditorAction, EditorActionGroup } from '../composables';
|
|
4
|
+
export type FlatSlashCommandItem = EditorAction & {
|
|
5
|
+
groupId: string;
|
|
6
|
+
groupTitle: string;
|
|
7
|
+
};
|
|
8
|
+
export interface SlashCommandsOptions {
|
|
9
|
+
getGroups: () => EditorActionGroup[];
|
|
10
|
+
}
|
|
11
|
+
export interface SlashCommandMenuHandle {
|
|
12
|
+
onUpdate: (props: SuggestionProps<FlatSlashCommandItem>) => void;
|
|
13
|
+
onKeyDown: (event: KeyboardEvent) => boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function filterSlashCommandItems(groups: EditorActionGroup[], query: string, editor: Editor): FlatSlashCommandItem[];
|
|
16
|
+
export declare const SlashCommands: TipTapExtension<SlashCommandsOptions, any>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ContentType, TextEditorOptions, TextEditorInstance } from './types';
|
|
2
|
+
export { useTextEditor } from './composables/useTextEditor';
|
|
3
|
+
export { default as TextEditorProvider } from './components/TextEditorProvider.vue';
|
|
4
|
+
export { default as TextEditorContent } from './components/TextEditorContent.vue';
|
|
5
|
+
export { default as TextEditorToolbar } from './components/TextEditorToolbar.vue';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ShallowRef, Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { Editor } from '@tiptap/vue-3';
|
|
3
|
+
import { EditorActionGroup } from './composables';
|
|
4
|
+
export type ContentType = 'plain-text' | 'markdown' | 'html' | 'tiptap-json';
|
|
5
|
+
export interface TextEditorOptions {
|
|
6
|
+
contentType: ContentType;
|
|
7
|
+
modelValue?: Ref<string>;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
slashCommands?: boolean;
|
|
10
|
+
onUpdate?: (content: string) => void;
|
|
11
|
+
onRequestLinkUrl?: (currentUrl?: string) => Promise<string | null>;
|
|
12
|
+
onRequestImageUrl?: () => Promise<string | null>;
|
|
13
|
+
}
|
|
14
|
+
export interface TextEditorState {
|
|
15
|
+
sourceMode: Ref<boolean>;
|
|
16
|
+
}
|
|
17
|
+
export interface TextEditorInstance {
|
|
18
|
+
state: TextEditorState;
|
|
19
|
+
editor: ShallowRef<Editor | null>;
|
|
20
|
+
contentType: Ref<ContentType>;
|
|
21
|
+
readonly: Ref<boolean>;
|
|
22
|
+
actionGroups(): EditorActionGroup[];
|
|
23
|
+
getContent(): string;
|
|
24
|
+
isEmpty: ComputedRef<boolean>;
|
|
25
|
+
isFocused: ComputedRef<boolean>;
|
|
26
|
+
focus(): void;
|
|
27
|
+
blur(): void;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const parseJsonStringIfNeeded: <T>(data: T | string) => T;
|
|
@@ -12,9 +12,11 @@ export * from './filesize';
|
|
|
12
12
|
export * from './fuse';
|
|
13
13
|
export * from './locale';
|
|
14
14
|
export * from './path';
|
|
15
|
+
export * from './permissions';
|
|
15
16
|
export * from './store';
|
|
16
17
|
export * from './binary';
|
|
17
18
|
export * from './platform';
|
|
18
19
|
export * from './promise';
|
|
19
20
|
export * from './textByteSize';
|
|
20
21
|
export * from './versions';
|
|
22
|
+
export * from './virtualCursorElement';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpaceResource } from '@opencloud-eu/web-client';
|
|
2
|
-
import {
|
|
2
|
+
import { LocationQuery } from '../../composables';
|
|
3
3
|
import { RouteParams } from 'vue-router';
|
|
4
4
|
/**
|
|
5
5
|
* Creates route options for routing into a file location:
|
|
@@ -8,16 +8,10 @@ import { RouteParams } from 'vue-router';
|
|
|
8
8
|
* - query.fileId
|
|
9
9
|
*
|
|
10
10
|
* Both query options are optional.
|
|
11
|
-
*
|
|
12
|
-
* @param space {SpaceResource}
|
|
13
|
-
* @param target {path: string, fileId: string | number}
|
|
14
|
-
* @param options {configStore: ConfigStore}
|
|
15
11
|
*/
|
|
16
12
|
export declare const createFileRouteOptions: (space: SpaceResource, target?: {
|
|
17
13
|
path?: string;
|
|
18
14
|
fileId?: string | number;
|
|
19
|
-
}, options?: {
|
|
20
|
-
configStore: ConfigStore;
|
|
21
15
|
}) => {
|
|
22
16
|
params: RouteParams;
|
|
23
17
|
query: LocationQuery;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createVirtualCursorElement: (event: MouseEvent) => HTMLButtonElement;
|
|
@@ -7,7 +7,8 @@ import { isLocationSharesActive, createLocationShares, locationSharesViaLink, lo
|
|
|
7
7
|
import { isLocationSpacesActive, createLocationSpaces, locationSpacesGeneric } from './spaces';
|
|
8
8
|
import { isLocationTrashActive, createLocationTrash } from './trash';
|
|
9
9
|
import { isLocationActiveDirector, createLocation } from './utils';
|
|
10
|
+
import { $gettext } from '../utils/dummyGettext';
|
|
10
11
|
import type { ActiveRouteDirectorFunc } from './utils';
|
|
11
12
|
declare const buildRoutes: (components: RouteComponents) => RouteRecordRaw[];
|
|
12
|
-
export { createLocation, createLocationCommon, createLocationShares, createLocationSpaces, createLocationPublic, isLocationCommonActive, isLocationSharesActive, isLocationSpacesActive, isLocationPublicActive, isLocationActive, isLocationActiveDirector, isLocationTrashActive, createLocationTrash, locationPublicLink, locationPublicUpload, locationSpacesGeneric, locationSharesViaLink, locationSharesWithMe, locationSharesWithOthers, buildRoutes, ActiveRouteDirectorFunc };
|
|
13
|
+
export { createLocation, createLocationCommon, createLocationShares, createLocationSpaces, createLocationPublic, isLocationCommonActive, isLocationSharesActive, isLocationSpacesActive, isLocationPublicActive, isLocationActive, isLocationActiveDirector, isLocationTrashActive, createLocationTrash, locationPublicLink, locationPublicUpload, locationSpacesGeneric, locationSharesViaLink, locationSharesWithMe, locationSharesWithOthers, buildRoutes, ActiveRouteDirectorFunc, $gettext };
|
|
13
14
|
export type { RouteShareTypes };
|
|
@@ -17,12 +17,7 @@ export declare const isLocationActive: (router: Router, ...comparatives: [RouteL
|
|
|
17
17
|
* @param defaultComparatives
|
|
18
18
|
*/
|
|
19
19
|
export declare const isLocationActiveDirector: <T extends string>(...defaultComparatives: [RouteLocationNamedRaw, ...RouteLocationNamedRaw[]]) => ActiveRouteDirectorFunc<T>;
|
|
20
|
-
|
|
21
|
-
* just a dummy function to trick gettext tools
|
|
22
|
-
*
|
|
23
|
-
* @param msg
|
|
24
|
-
*/
|
|
25
|
-
export declare function $gettext(msg: string): string;
|
|
20
|
+
export { $gettext } from '../utils/dummyGettext';
|
|
26
21
|
/**
|
|
27
22
|
* create a location with attached default values
|
|
28
23
|
*
|
package/dist/src/types.d.ts
CHANGED