@opencloud-eu/web-pkg 6.2.0 → 7.0.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.
Files changed (97) hide show
  1. package/dist/assets/worker-BJYfkZQP.js +25 -0
  2. package/dist/assets/worker-CXvpBk--.js +25 -0
  3. package/dist/assets/worker-liEKqzWv.js +25 -0
  4. package/dist/{composables-CAlEpA5b.js → components-GUHsaO1-.js} +8084 -10608
  5. package/dist/src/components/Avatars/AvatarUpload.vue.d.ts +0 -1
  6. package/dist/src/components/ContextActions/ContextMenuQuickAction.vue.d.ts +15 -9
  7. package/dist/src/components/CreateShortcutModal.vue.d.ts +15 -9
  8. package/dist/src/components/ImageCropper.vue.d.ts +12 -0
  9. package/dist/src/components/Spaces/SpaceImageModal.vue.d.ts +0 -1
  10. package/dist/src/components/index.d.ts +0 -1
  11. package/dist/src/composables/actions/files/index.d.ts +0 -21
  12. package/dist/src/composables/actions/spaces/index.d.ts +0 -12
  13. package/dist/src/composables/actions/types.d.ts +8 -7
  14. package/dist/src/composables/breadcrumbs/useBreadcrumbsFromPath.d.ts +1 -3
  15. package/dist/src/composables/driveResolver/useDriveResolver.d.ts +0 -1
  16. package/dist/src/composables/keyboardActions/useCropperKeyboardActions.d.ts +2 -1
  17. package/dist/src/composables/piniaStores/auth.d.ts +24 -2
  18. package/dist/src/composables/piniaStores/capabilities.d.ts +1 -13
  19. package/dist/src/composables/piniaStores/config/config.d.ts +1 -91
  20. package/dist/src/composables/piniaStores/config/types.d.ts +0 -20
  21. package/dist/src/composables/piniaStores/extensionRegistry/extensionRegistry.d.ts +4 -1
  22. package/dist/src/composables/piniaStores/messages.d.ts +12 -12
  23. package/dist/src/composables/piniaStores/spaces.d.ts +1 -3
  24. package/dist/src/composables/piniaStores/theme.d.ts +1 -1
  25. package/dist/src/composables/router/useFileRouteReplace.d.ts +0 -2
  26. package/dist/src/composables/spaces/useGetMatchingSpace.d.ts +0 -4
  27. package/dist/src/editor/components/SlashCommandMenu.vue.d.ts +9 -0
  28. package/dist/src/editor/components/TextEditorContent.vue.d.ts +7 -0
  29. package/dist/src/editor/components/TextEditorProvider.vue.d.ts +17 -0
  30. package/dist/src/editor/components/TextEditorToolbar.vue.d.ts +3 -0
  31. package/dist/src/editor/composables/index.d.ts +3 -0
  32. package/dist/src/editor/composables/strategies/html.d.ts +3 -0
  33. package/dist/src/editor/composables/strategies/index.d.ts +5 -0
  34. package/dist/src/editor/composables/strategies/markdown.d.ts +3 -0
  35. package/dist/src/editor/composables/strategies/plainText.d.ts +3 -0
  36. package/dist/src/editor/composables/strategies/tiptapJson.d.ts +3 -0
  37. package/dist/src/editor/composables/strategies/types.d.ts +10 -0
  38. package/dist/src/editor/composables/useContentStrategy.d.ts +5 -0
  39. package/dist/src/editor/composables/useEditorActions.d.ts +75 -0
  40. package/dist/src/editor/composables/useTextEditor.d.ts +2 -0
  41. package/dist/src/editor/extensions/index.d.ts +1 -0
  42. package/dist/src/editor/extensions/slashCommands.d.ts +16 -0
  43. package/dist/src/editor/index.d.ts +5 -0
  44. package/dist/src/editor/types.d.ts +29 -0
  45. package/dist/src/helpers/groupwareResponse.d.ts +1 -0
  46. package/dist/src/helpers/index.d.ts +2 -0
  47. package/dist/src/helpers/router/routeOptions.d.ts +1 -7
  48. package/dist/src/helpers/virtualCursorElement.d.ts +1 -0
  49. package/dist/src/router/index.d.ts +2 -1
  50. package/dist/src/router/utils.d.ts +1 -6
  51. package/dist/src/types.d.ts +1 -0
  52. package/dist/src/utils/dummyGettext.d.ts +6 -0
  53. package/dist/src/utils/index.d.ts +1 -0
  54. package/dist/web-pkg/editor.js +1351 -0
  55. package/dist/web-pkg.css +3 -0
  56. package/dist/web-pkg.js +2860 -1481
  57. package/package.json +37 -10
  58. package/dist/TextEditor-CTRIgoeG.js +0 -819
  59. package/dist/assets/worker-Bv-mZ-VL.js +0 -25
  60. package/dist/assets/worker-Dx2ttEp-.js +0 -25
  61. package/dist/assets/worker-nUcRt7qV.js +0 -25
  62. package/dist/src/components/TextEditor/TextEditor.vue.d.ts +0 -18
  63. package/dist/src/components/TextEditor/index.d.ts +0 -17
  64. package/dist/src/components/TextEditor/l18n.d.ts +0 -3
  65. package/dist/src/composables/actions/files/useFileActionsCopy.d.ts +0 -4
  66. package/dist/src/composables/actions/files/useFileActionsCopyPermanentLink.d.ts +0 -4
  67. package/dist/src/composables/actions/files/useFileActionsCreateLink.d.ts +0 -6
  68. package/dist/src/composables/actions/files/useFileActionsCreateNewFile.d.ts +0 -10
  69. package/dist/src/composables/actions/files/useFileActionsCreateNewFolder.d.ts +0 -9
  70. package/dist/src/composables/actions/files/useFileActionsCreateNewShortcut.d.ts +0 -8
  71. package/dist/src/composables/actions/files/useFileActionsCreateSpaceFromResource.d.ts +0 -4
  72. package/dist/src/composables/actions/files/useFileActionsDisableSync.d.ts +0 -5
  73. package/dist/src/composables/actions/files/useFileActionsDownloadArchive.d.ts +0 -4
  74. package/dist/src/composables/actions/files/useFileActionsEmptyTrashBin.d.ts +0 -8
  75. package/dist/src/composables/actions/files/useFileActionsEnableSync.d.ts +0 -5
  76. package/dist/src/composables/actions/files/useFileActionsFavorite.d.ts +0 -4
  77. package/dist/src/composables/actions/files/useFileActionsMove.d.ts +0 -4
  78. package/dist/src/composables/actions/files/useFileActionsOpenShortcut.d.ts +0 -5
  79. package/dist/src/composables/actions/files/useFileActionsPaste.d.ts +0 -4
  80. package/dist/src/composables/actions/files/useFileActionsRename.d.ts +0 -6
  81. package/dist/src/composables/actions/files/useFileActionsSetImage.d.ts +0 -4
  82. package/dist/src/composables/actions/files/useFileActionsShowActions.d.ts +0 -4
  83. package/dist/src/composables/actions/files/useFileActionsShowDetails.d.ts +0 -4
  84. package/dist/src/composables/actions/files/useFileActionsShowShares.d.ts +0 -5
  85. package/dist/src/composables/actions/files/useFileActionsToggleHideShare.d.ts +0 -5
  86. package/dist/src/composables/actions/spaces/useSpaceActionsDelete.d.ts +0 -6
  87. package/dist/src/composables/actions/spaces/useSpaceActionsDeleteImage.d.ts +0 -8
  88. package/dist/src/composables/actions/spaces/useSpaceActionsDisable.d.ts +0 -6
  89. package/dist/src/composables/actions/spaces/useSpaceActionsDuplicate.d.ts +0 -6
  90. package/dist/src/composables/actions/spaces/useSpaceActionsEditDescription.d.ts +0 -6
  91. package/dist/src/composables/actions/spaces/useSpaceActionsEditQuota.d.ts +0 -4
  92. package/dist/src/composables/actions/spaces/useSpaceActionsEditReadmeContent.d.ts +0 -4
  93. package/dist/src/composables/actions/spaces/useSpaceActionsNavigateToTrash.d.ts +0 -4
  94. package/dist/src/composables/actions/spaces/useSpaceActionsRename.d.ts +0 -6
  95. package/dist/src/composables/actions/spaces/useSpaceActionsRestore.d.ts +0 -6
  96. package/dist/src/composables/actions/spaces/useSpaceActionsSetIcon.d.ts +0 -6
  97. package/dist/src/composables/actions/spaces/useSpaceActionsShowMembers.d.ts +0 -4
@@ -29,7 +29,6 @@ declare const ScriptConfigSchema: z.ZodObject<{
29
29
  }, z.core.$strip>;
30
30
  export type ScriptConfig = z.infer<typeof ScriptConfigSchema>;
31
31
  declare const OptionsConfigSchema: z.ZodObject<{
32
- cernFeatures: z.ZodOptional<z.ZodBoolean>;
33
32
  openFilesInNewTab: z.ZodOptional<z.ZodBoolean>;
34
33
  concurrentRequests: z.ZodOptional<z.ZodObject<{
35
34
  resourceBatchActions: z.ZodOptional<z.ZodNumber>;
@@ -68,17 +67,8 @@ declare const OptionsConfigSchema: z.ZodObject<{
68
67
  description: z.ZodOptional<z.ZodString>;
69
68
  href: z.ZodOptional<z.ZodString>;
70
69
  }, z.core.$strip>>;
71
- isRunningOnEos: z.ZodOptional<z.ZodBoolean>;
72
70
  loginUrl: z.ZodOptional<z.ZodString>;
73
71
  logoutUrl: z.ZodOptional<z.ZodString>;
74
- ocm: z.ZodOptional<z.ZodObject<{
75
- openRemotely: z.ZodOptional<z.ZodBoolean>;
76
- }, z.core.$strip>>;
77
- routing: z.ZodOptional<z.ZodObject<{
78
- fullShareOwnerPaths: z.ZodOptional<z.ZodBoolean>;
79
- idBased: z.ZodOptional<z.ZodBoolean>;
80
- }, z.core.$strip>>;
81
- runningOnEos: z.ZodOptional<z.ZodBoolean>;
82
72
  tokenStorageLocal: z.ZodOptional<z.ZodBoolean>;
83
73
  upload: z.ZodOptional<z.ZodObject<{
84
74
  companionUrl: z.ZodOptional<z.ZodString>;
@@ -91,7 +81,6 @@ export declare const RawConfigSchema: z.ZodObject<{
91
81
  server: z.ZodString;
92
82
  theme: z.ZodString;
93
83
  options: z.ZodObject<{
94
- cernFeatures: z.ZodOptional<z.ZodBoolean>;
95
84
  openFilesInNewTab: z.ZodOptional<z.ZodBoolean>;
96
85
  concurrentRequests: z.ZodOptional<z.ZodObject<{
97
86
  resourceBatchActions: z.ZodOptional<z.ZodNumber>;
@@ -130,17 +119,8 @@ export declare const RawConfigSchema: z.ZodObject<{
130
119
  description: z.ZodOptional<z.ZodString>;
131
120
  href: z.ZodOptional<z.ZodString>;
132
121
  }, z.core.$strip>>;
133
- isRunningOnEos: z.ZodOptional<z.ZodBoolean>;
134
122
  loginUrl: z.ZodOptional<z.ZodString>;
135
123
  logoutUrl: z.ZodOptional<z.ZodString>;
136
- ocm: z.ZodOptional<z.ZodObject<{
137
- openRemotely: z.ZodOptional<z.ZodBoolean>;
138
- }, z.core.$strip>>;
139
- routing: z.ZodOptional<z.ZodObject<{
140
- fullShareOwnerPaths: z.ZodOptional<z.ZodBoolean>;
141
- idBased: z.ZodOptional<z.ZodBoolean>;
142
- }, z.core.$strip>>;
143
- runningOnEos: z.ZodOptional<z.ZodBoolean>;
144
124
  tokenStorageLocal: z.ZodOptional<z.ZodBoolean>;
145
125
  upload: z.ZodOptional<z.ZodObject<{
146
126
  companionUrl: z.ZodOptional<z.ZodString>;
@@ -11,6 +11,7 @@ export declare const useExtensionRegistry: import("pinia").StoreDefinition<"exte
11
11
  getExtensionPoints: <T extends ExtensionPoint<Extension>>(options?: {
12
12
  extensionType?: ExtensionType;
13
13
  }) => T[];
14
+ getExtensionById: <T extends Extension>(id: string) => T | undefined;
14
15
  }, "extensions" | "extensionPoints">, Pick<{
15
16
  extensions: Ref<Ref<Extension[], Extension[]>[], Ref<Extension[], Extension[]>[]>;
16
17
  registerExtensions: (e: Ref<Extension[]>) => void;
@@ -22,6 +23,7 @@ export declare const useExtensionRegistry: import("pinia").StoreDefinition<"exte
22
23
  getExtensionPoints: <T extends ExtensionPoint<Extension>>(options?: {
23
24
  extensionType?: ExtensionType;
24
25
  }) => T[];
26
+ getExtensionById: <T extends Extension>(id: string) => T | undefined;
25
27
  }, never>, Pick<{
26
28
  extensions: Ref<Ref<Extension[], Extension[]>[], Ref<Extension[], Extension[]>[]>;
27
29
  registerExtensions: (e: Ref<Extension[]>) => void;
@@ -33,5 +35,6 @@ export declare const useExtensionRegistry: import("pinia").StoreDefinition<"exte
33
35
  getExtensionPoints: <T extends ExtensionPoint<Extension>>(options?: {
34
36
  extensionType?: ExtensionType;
35
37
  }) => T[];
36
- }, "registerExtensions" | "unregisterExtensions" | "requestExtensions" | "registerExtensionPoints" | "unregisterExtensionPoints" | "getExtensionPoints">>;
38
+ getExtensionById: <T extends Extension>(id: string) => T | undefined;
39
+ }, "registerExtensions" | "unregisterExtensions" | "requestExtensions" | "registerExtensionPoints" | "unregisterExtensionPoints" | "getExtensionPoints" | "getExtensionById">>;
37
40
  export type ExtensionRegistry = ReturnType<typeof useExtensionRegistry>;
@@ -23,7 +23,7 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
23
23
  status?: "passive" | "primary" | "success" | "warning" | "danger";
24
24
  actions?: {
25
25
  name: string;
26
- category?: "share" | "actions" | "context" | "sidebar";
26
+ category?: "primary" | "secondary" | "tertiary" | "quaternary";
27
27
  icon: string | ((options?: ActionOptions) => string);
28
28
  iconFillType?: import("../..").IconFillType;
29
29
  appearance?: import("@opencloud-eu/design-system/helpers").AppearanceType;
@@ -55,7 +55,7 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
55
55
  status?: "passive" | "primary" | "success" | "warning" | "danger";
56
56
  actions?: {
57
57
  name: string;
58
- category?: "share" | "actions" | "context" | "sidebar";
58
+ category?: "primary" | "secondary" | "tertiary" | "quaternary";
59
59
  icon: string | ((options?: ActionOptions) => string);
60
60
  iconFillType?: import("../..").IconFillType;
61
61
  appearance?: import("@opencloud-eu/design-system/helpers").AppearanceType;
@@ -82,8 +82,8 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
82
82
  id: string;
83
83
  timeout?: number;
84
84
  status?: "passive" | "primary" | "success" | "warning" | "danger";
85
- actions?: Action[];
86
85
  title: string;
86
+ actions?: Action[];
87
87
  errors?: MessageError[];
88
88
  desc?: string;
89
89
  actionOptions?: ActionOptions;
@@ -92,8 +92,8 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
92
92
  showErrorMessage: (data: Omit<Message, "id">) => {
93
93
  timeout: number;
94
94
  status: "passive" | "primary" | "success" | "warning" | "danger";
95
- actions?: Action[];
96
95
  title: string;
96
+ actions?: Action[];
97
97
  errors?: MessageError[];
98
98
  desc?: string;
99
99
  actionOptions?: ActionOptions;
@@ -112,7 +112,7 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
112
112
  status?: "passive" | "primary" | "success" | "warning" | "danger";
113
113
  actions?: {
114
114
  name: string;
115
- category?: "share" | "actions" | "context" | "sidebar";
115
+ category?: "primary" | "secondary" | "tertiary" | "quaternary";
116
116
  icon: string | ((options?: ActionOptions) => string);
117
117
  iconFillType?: import("../..").IconFillType;
118
118
  appearance?: import("@opencloud-eu/design-system/helpers").AppearanceType;
@@ -144,7 +144,7 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
144
144
  status?: "passive" | "primary" | "success" | "warning" | "danger";
145
145
  actions?: {
146
146
  name: string;
147
- category?: "share" | "actions" | "context" | "sidebar";
147
+ category?: "primary" | "secondary" | "tertiary" | "quaternary";
148
148
  icon: string | ((options?: ActionOptions) => string);
149
149
  iconFillType?: import("../..").IconFillType;
150
150
  appearance?: import("@opencloud-eu/design-system/helpers").AppearanceType;
@@ -171,8 +171,8 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
171
171
  id: string;
172
172
  timeout?: number;
173
173
  status?: "passive" | "primary" | "success" | "warning" | "danger";
174
- actions?: Action[];
175
174
  title: string;
175
+ actions?: Action[];
176
176
  errors?: MessageError[];
177
177
  desc?: string;
178
178
  actionOptions?: ActionOptions;
@@ -181,8 +181,8 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
181
181
  showErrorMessage: (data: Omit<Message, "id">) => {
182
182
  timeout: number;
183
183
  status: "passive" | "primary" | "success" | "warning" | "danger";
184
- actions?: Action[];
185
184
  title: string;
185
+ actions?: Action[];
186
186
  errors?: MessageError[];
187
187
  desc?: string;
188
188
  actionOptions?: ActionOptions;
@@ -201,7 +201,7 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
201
201
  status?: "passive" | "primary" | "success" | "warning" | "danger";
202
202
  actions?: {
203
203
  name: string;
204
- category?: "share" | "actions" | "context" | "sidebar";
204
+ category?: "primary" | "secondary" | "tertiary" | "quaternary";
205
205
  icon: string | ((options?: ActionOptions) => string);
206
206
  iconFillType?: import("../..").IconFillType;
207
207
  appearance?: import("@opencloud-eu/design-system/helpers").AppearanceType;
@@ -233,7 +233,7 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
233
233
  status?: "passive" | "primary" | "success" | "warning" | "danger";
234
234
  actions?: {
235
235
  name: string;
236
- category?: "share" | "actions" | "context" | "sidebar";
236
+ category?: "primary" | "secondary" | "tertiary" | "quaternary";
237
237
  icon: string | ((options?: ActionOptions) => string);
238
238
  iconFillType?: import("../..").IconFillType;
239
239
  appearance?: import("@opencloud-eu/design-system/helpers").AppearanceType;
@@ -260,8 +260,8 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
260
260
  id: string;
261
261
  timeout?: number;
262
262
  status?: "passive" | "primary" | "success" | "warning" | "danger";
263
- actions?: Action[];
264
263
  title: string;
264
+ actions?: Action[];
265
265
  errors?: MessageError[];
266
266
  desc?: string;
267
267
  actionOptions?: ActionOptions;
@@ -270,8 +270,8 @@ export declare const useMessages: import("pinia").StoreDefinition<"messages", Pi
270
270
  showErrorMessage: (data: Omit<Message, "id">) => {
271
271
  timeout: number;
272
272
  status: "passive" | "primary" | "success" | "warning" | "danger";
273
- actions?: Action[];
274
273
  title: string;
274
+ actions?: Action[];
275
275
  errors?: MessageError[];
276
276
  desc?: string;
277
277
  actionOptions?: ActionOptions;
@@ -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, configStore, signal }: {
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
- }, "availableThemes" | "currentTheme">, Pick<{
267
+ }, "currentTheme" | "availableThemes">, Pick<{
268
268
  availableThemes: import("vue").Ref<{
269
269
  isDark: boolean;
270
270
  label: string;
@@ -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,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export * from './useContentStrategy';
2
+ export * from './useEditorActions';
3
+ export * from './useTextEditor';
@@ -0,0 +1,3 @@
1
+ import { ContentTypeStrategy } from './types';
2
+ import { TextEditorState } from '../../types';
3
+ export declare const useStrategyHtml: (editorState: TextEditorState) => ContentTypeStrategy;
@@ -0,0 +1,5 @@
1
+ export * from './html';
2
+ export * from './markdown';
3
+ export * from './plainText';
4
+ export * from './tiptapJson';
5
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ import { ContentTypeStrategy } from './types';
2
+ import { TextEditorState } from '../../types';
3
+ export declare const useStrategyMarkdown: (editorState: TextEditorState) => ContentTypeStrategy;
@@ -0,0 +1,3 @@
1
+ import { ContentTypeStrategy } from './types';
2
+ import { TextEditorState } from '../../types';
3
+ export declare const useStrategyPlainText: (editorState: TextEditorState) => ContentTypeStrategy;
@@ -0,0 +1,3 @@
1
+ import { ContentTypeStrategy } from './types';
2
+ import { TextEditorState } from '../../types';
3
+ export declare const useStrategyTiptapJson: (editorState: TextEditorState) => ContentTypeStrategy;
@@ -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,5 @@
1
+ import type { ContentType, TextEditorState } from '../types';
2
+ import { ContentTypeStrategy } from './strategies';
3
+ export declare const useContentStrategy: () => {
4
+ resolveStrategy: (contentType: ContentType, editorState: TextEditorState) => ContentTypeStrategy;
5
+ };
@@ -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,2 @@
1
+ import type { TextEditorOptions, TextEditorInstance } from '../types';
2
+ export declare function useTextEditor(options: TextEditorOptions): TextEditorInstance;
@@ -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 { ConfigStore, LocationQuery } from '../../composables';
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
  *
@@ -18,6 +18,7 @@ export type FederatedConnection = FederatedUser & {
18
18
  export interface UpdateChannel {
19
19
  current_version: string;
20
20
  url: string;
21
+ critical: string[];
21
22
  }
22
23
  export interface Updates {
23
24
  channels: Record<string, UpdateChannel>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * just a dummy function to trick gettext tools
3
+ *
4
+ * @param msg
5
+ */
6
+ export declare function $gettext(msg: string): string;
@@ -3,3 +3,4 @@ export * from './encodePath';
3
3
  export * from './objectKeys';
4
4
  export * from './semver';
5
5
  export * from './types';
6
+ export * from './dummyGettext';