@harbour-enterprises/superdoc 0.9.42 → 0.9.43

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 (90) hide show
  1. package/dist/chunks/{index-B1HJFsYK.cjs → index-DHS2ANjv.cjs} +1 -1
  2. package/dist/chunks/{index-9h_Kn-Dm.es.js → index-Dd_ce0Er.es.js} +1 -1
  3. package/dist/chunks/{index-g2tCwKji.es.js → index-XHRxRUhd.es.js} +2 -2
  4. package/dist/chunks/{index-vGJ1t7OQ.cjs → index-YqE5-6V1.cjs} +1 -1
  5. package/dist/chunks/{super-editor.es-C0bXjCb2.cjs → super-editor.es-DoKFRVV9.cjs} +36 -36
  6. package/dist/chunks/{super-editor.es-Jdmyi8pH.es.js → super-editor.es-Kq5BUGHb.es.js} +2180 -2189
  7. package/dist/chunks/{url-DOH7Dv51.es.js → url-BWFemt_V.es.js} +1 -1
  8. package/dist/chunks/{url-B-X4NWGe.cjs → url-Cqg7fbSS.cjs} +1 -1
  9. package/dist/chunks/xml-js-Bzw8Bo_u.es.js +1739 -0
  10. package/dist/chunks/xml-js-Zwb1wsIy.cjs +10 -0
  11. package/dist/components/CommentsLayer/comment-schemas.d.ts +17 -0
  12. package/dist/components/CommentsLayer/comment-schemas.d.ts.map +1 -0
  13. package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts +22 -0
  14. package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts.map +1 -0
  15. package/dist/components/CommentsLayer/helpers.d.ts +8 -0
  16. package/dist/components/CommentsLayer/helpers.d.ts.map +1 -0
  17. package/dist/components/CommentsLayer/use-comment.d.ts +8 -0
  18. package/dist/components/CommentsLayer/use-comment.d.ts.map +1 -0
  19. package/dist/components/CommentsLayer/use-conversation.d.ts +23 -0
  20. package/dist/components/CommentsLayer/use-conversation.d.ts.map +1 -0
  21. package/dist/components/CommentsLayer/use-floating-comment.d.ts +12 -0
  22. package/dist/components/CommentsLayer/use-floating-comment.d.ts.map +1 -0
  23. package/dist/components/CommentsLayer/use-tracked-change.d.ts +1 -0
  24. package/dist/components/CommentsLayer/use-tracked-change.d.ts.map +1 -0
  25. package/dist/components/PdfViewer/helpers/pdfjs-worker.d.ts +3 -0
  26. package/dist/components/PdfViewer/helpers/pdfjs-worker.d.ts.map +1 -0
  27. package/dist/components/PdfViewer/helpers/range.d.ts +2 -0
  28. package/dist/components/PdfViewer/helpers/range.d.ts.map +1 -0
  29. package/dist/components/PdfViewer/pdfjs.d.ts +3 -0
  30. package/dist/components/PdfViewer/pdfjs.d.ts.map +1 -0
  31. package/dist/components/PdfViewer/worker.d.ts +3 -0
  32. package/dist/components/PdfViewer/worker.d.ts.map +1 -0
  33. package/dist/composables/use-document.d.ts +27 -0
  34. package/dist/composables/use-document.d.ts.map +1 -0
  35. package/dist/composables/use-field.d.ts +34 -0
  36. package/dist/composables/use-field.d.ts.map +1 -0
  37. package/dist/core/SuperDoc.d.ts +345 -0
  38. package/dist/core/SuperDoc.d.ts.map +1 -0
  39. package/dist/core/collaboration/collaboration-comments.d.ts +5 -0
  40. package/dist/core/collaboration/collaboration-comments.d.ts.map +1 -0
  41. package/dist/core/collaboration/collaboration.d.ts +27 -0
  42. package/dist/core/collaboration/collaboration.d.ts.map +1 -0
  43. package/dist/core/collaboration/helpers.d.ts +5 -0
  44. package/dist/core/collaboration/helpers.d.ts.map +1 -0
  45. package/dist/core/collaboration/permissions.d.ts +14 -0
  46. package/dist/core/collaboration/permissions.d.ts.map +1 -0
  47. package/dist/core/create-app.d.ts +2 -0
  48. package/dist/core/create-app.d.ts.map +1 -0
  49. package/dist/core/helpers/export.d.ts +3 -0
  50. package/dist/core/helpers/export.d.ts.map +1 -0
  51. package/dist/core/index.d.ts +2 -0
  52. package/dist/core/index.d.ts.map +1 -0
  53. package/dist/helpers/use-selection.d.ts +18 -0
  54. package/dist/helpers/use-selection.d.ts.map +1 -0
  55. package/dist/icons.d.ts +11 -0
  56. package/dist/icons.d.ts.map +1 -0
  57. package/dist/index.d.ts +15 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/main.d.ts +2 -0
  60. package/dist/main.d.ts.map +1 -0
  61. package/dist/stores/comments-store.d.ts +248 -0
  62. package/dist/stores/comments-store.d.ts.map +1 -0
  63. package/dist/stores/hrbr-fields-store.d.ts +44 -0
  64. package/dist/stores/hrbr-fields-store.d.ts.map +1 -0
  65. package/dist/stores/superdoc-store.d.ts +881 -0
  66. package/dist/stores/superdoc-store.d.ts.map +1 -0
  67. package/dist/style.css +3368 -1
  68. package/dist/super-editor/chunks/{converter-CecWe0O8.js → converter-CqDzVfF_.js} +616 -625
  69. package/dist/super-editor/chunks/{docx-zipper-BYhBuyXi.js → docx-zipper-SLwsWvIk.js} +1 -1
  70. package/dist/super-editor/chunks/{editor-CVMeRmT7.js → editor-Dp6YHJKK.js} +3 -3
  71. package/dist/super-editor/chunks/{toolbar-CqjuKtGw.js → toolbar-DdBcazax.js} +2 -2
  72. package/dist/super-editor/converter.es.js +1 -1
  73. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  74. package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts.map +1 -1
  75. package/dist/super-editor/docx-zipper.es.js +2 -2
  76. package/dist/super-editor/editor.es.js +3 -3
  77. package/dist/super-editor/file-zipper.es.js +1 -1
  78. package/dist/super-editor/super-editor.es.js +6 -6
  79. package/dist/super-editor/toolbar.es.js +2 -2
  80. package/dist/super-editor.cjs +1 -1
  81. package/dist/super-editor.d.ts +2 -0
  82. package/dist/super-editor.d.ts.map +1 -0
  83. package/dist/super-editor.es.js +1 -1
  84. package/dist/superdoc.cjs +3 -3
  85. package/dist/superdoc.es.js +6 -6
  86. package/dist/superdoc.umd.js +68982 -0
  87. package/dist/superdoc.umd.js.map +1 -0
  88. package/package.json +1 -1
  89. package/dist/chunks/xml-js-BZ27jOyf.cjs +0 -10
  90. package/dist/chunks/xml-js-BgrWeyJ9.es.js +0 -1786
@@ -0,0 +1,345 @@
1
+ /**
2
+ * @typedef {Object} User The current user of this superdoc
3
+ * @property {string} name The user's name
4
+ * @property {string} email The user's email
5
+ * @property {string | null} image The user's photo
6
+ */
7
+ /**
8
+ * @typedef {Object} Telemetry Telemetry configuration
9
+ * @property {boolean} [enabled=true] Whether telemetry is enabled
10
+ * @property {string} [licenceKey] The licence key for telemetry
11
+ * @property {string} [endpoint] The endpoint for telemetry
12
+ */
13
+ /**
14
+ * @typedef {Object} Document
15
+ * @property {string} id The ID of the document
16
+ * @property {string} type The type of the document
17
+ * @property {File | null} [data] The initial data of the document
18
+ */
19
+ /**
20
+ * @typedef {Object} Config
21
+ * @property {string} [superdocId] The ID of the SuperDoc
22
+ * @property {string} selector The selector to mount the SuperDoc into
23
+ * @property {'editing' | 'viewing' | 'suggesting'} documentMode The mode of the document
24
+ * @property {'editor' | 'viewer' | 'suggester'} [role] The role of the user in this SuperDoc
25
+ * @property {Array<Document>} documents The documents to load
26
+ * @property {User} [user] The current user of this SuperDoc
27
+ * @property {Array<User>} [users] All users of this SuperDoc (can be used for "@"-mentions)
28
+ * @property {Array<string>} [colors] Colors to use for user awareness
29
+ * @property {Object} [modules] Modules to load
30
+ * @property {boolean} [pagination] Whether to show pagination in SuperEditors
31
+ * @property {string} [toolbar] Optional DOM element to render the toolbar in
32
+ * @property {Array<string>} [toolbarGroups] Toolbar groups to show
33
+ * @property {Object} [toolbarIcons] Icons to show in the toolbar
34
+ * @property {boolean} [isDev] Whether the SuperDoc is in development mode
35
+ * @property {Telemetry} [telemetry] Telemetry configuration
36
+ * @property {(editor: Editor) => void} [onEditorBeforeCreate] Callback before an editor is created
37
+ * @property {(editor: Editor) => void} [onEditorCreate] Callback after an editor is created
38
+ * @property {() => void} [onEditorDestroy] Callback after an editor is destroyed
39
+ * @property {(params: { error: object, editor: Editor, documentId: string, file: File })} [onContentError] Callback when there is an error in the content
40
+ * @property {(editor: { superdoc: SuperDoc }) => void} [onReady] Callback when the SuperDoc is ready
41
+ * @property {(params: { type: string, data: object}) => void} [onCommentsUpdate] Callback when comments are updated
42
+ * @property {(params: { context: SuperDoc, states: Array }) => void} [onAwarenessUpdate] Callback when awareness is updated
43
+ * @property {(params: { isLocked: boolean, lockedBy: User }) => void} [onLocked] Callback when the SuperDoc is locked
44
+ * @property {() => void} [onPdfDocumentReady] Callback when the PDF document is ready
45
+ * @property {(isOpened: boolean) => void} [onSidebarToggle] Callback when the sidebar is toggled
46
+ * @property {(params: { editor: Editor }) => void} [onCollaborationReady] Callback when collaboration is ready
47
+ * @property {(params: { editor: Editor }) => void} [onEditorUpdate] Callback when document is updated
48
+ * @property {(params: { error: Exception }) => void} [onException] Callback when an exception is thrown
49
+ */
50
+ /**
51
+ * SuperDoc class
52
+ * Expects a config object
53
+ * @class
54
+ */
55
+ export class SuperDoc extends EventEmitter<string | symbol, any> {
56
+ /** @type {Array<string>} */
57
+ static allowedTypes: Array<string>;
58
+ /**
59
+ * @param {Config} config
60
+ */
61
+ constructor(config: Config);
62
+ /** @type {number} */
63
+ version: number;
64
+ users: any;
65
+ /** @type {Config} */
66
+ config: Config;
67
+ userColorMap: Map<any, any>;
68
+ colorIndex: number;
69
+ superdocId: any;
70
+ colors: string[];
71
+ user: User;
72
+ socket: any;
73
+ isDev: boolean;
74
+ activeEditor: any;
75
+ comments: any[];
76
+ readyEditors: number;
77
+ isLocked: any;
78
+ lockedBy: any;
79
+ get requiredNumberOfEditors(): any;
80
+ get state(): {
81
+ documents: any;
82
+ users: any;
83
+ };
84
+ app: any;
85
+ pinia: any;
86
+ superdocStore: any;
87
+ commentsStore: any;
88
+ isCollaborative: boolean;
89
+ /**
90
+ * Add a user to the shared users list
91
+ *
92
+ * @param {Object} user The user to add
93
+ * @returns {void}
94
+ */
95
+ addSharedUser(user: any): void;
96
+ /**
97
+ * Remove a user from the shared users list
98
+ *
99
+ * @param {String} email The email of the user to remove
100
+ * @returns {void}
101
+ */
102
+ removeSharedUser(email: string): void;
103
+ telemetry: Telemetry;
104
+ onContentError({ error, editor }: {
105
+ error: any;
106
+ editor: any;
107
+ }): void;
108
+ broadcastPdfDocumentReady(): void;
109
+ broadcastReady(): void;
110
+ broadcastEditorBeforeCreate(editor: any): void;
111
+ broadcastEditorCreate(editor: any): void;
112
+ broadcastEditorDestroy(): void;
113
+ broadcastSidebarToggle(isOpened: any): void;
114
+ log(...args: any[]): void;
115
+ setActiveEditor(editor: any): void;
116
+ /**
117
+ * Toggle the ruler visibility for SuperEditors
118
+ *
119
+ * @returns {void}
120
+ */
121
+ toggleRuler(): void;
122
+ toolbarElement: any;
123
+ toolbar: SuperToolbar;
124
+ addCommentsList(element: any): void;
125
+ commentsList: SuperComments;
126
+ removeCommentsList(): void;
127
+ onToolbarCommand({ item, argument }: {
128
+ item: any;
129
+ argument: any;
130
+ }): void;
131
+ setDocumentMode(type: any): void;
132
+ /**
133
+ * Set the document to locked or unlocked
134
+ * @param {boolean} lock
135
+ */
136
+ setLocked(lock?: boolean): void;
137
+ getHTML(): any[];
138
+ /**
139
+ * Lock the current superdoc
140
+ * @param {Boolean} isLocked
141
+ * @param {User} lockedBy The user who locked the superdoc
142
+ */
143
+ lockSuperdoc(isLocked: boolean, lockedBy: User): void;
144
+ export({ exportType, commentsType, exportedName, additionalFiles, additionalFileNames }: {
145
+ exportType?: string[];
146
+ commentsType: any;
147
+ exportedName: any;
148
+ additionalFiles?: any[];
149
+ additionalFileNames?: any[];
150
+ }): Promise<void>;
151
+ exportEditorsToDOCX({ commentsType }?: {}): Promise<any[]>;
152
+ pendingCollaborationSaves: number;
153
+ save(): Promise<void[]>;
154
+ destroy(): void;
155
+ #private;
156
+ }
157
+ /**
158
+ * The current user of this superdoc
159
+ */
160
+ export type User = {
161
+ /**
162
+ * The user's name
163
+ */
164
+ name: string;
165
+ /**
166
+ * The user's email
167
+ */
168
+ email: string;
169
+ /**
170
+ * The user's photo
171
+ */
172
+ image: string | null;
173
+ };
174
+ /**
175
+ * Telemetry configuration
176
+ */
177
+ export type Telemetry = {
178
+ /**
179
+ * Whether telemetry is enabled
180
+ */
181
+ enabled?: boolean;
182
+ /**
183
+ * The licence key for telemetry
184
+ */
185
+ licenceKey?: string;
186
+ /**
187
+ * The endpoint for telemetry
188
+ */
189
+ endpoint?: string;
190
+ };
191
+ export type Document = {
192
+ /**
193
+ * The ID of the document
194
+ */
195
+ id: string;
196
+ /**
197
+ * The type of the document
198
+ */
199
+ type: string;
200
+ /**
201
+ * The initial data of the document
202
+ */
203
+ data?: File | null;
204
+ };
205
+ export type Config = {
206
+ /**
207
+ * The ID of the SuperDoc
208
+ */
209
+ superdocId?: string;
210
+ /**
211
+ * The selector to mount the SuperDoc into
212
+ */
213
+ selector: string;
214
+ /**
215
+ * The mode of the document
216
+ */
217
+ documentMode: "editing" | "viewing" | "suggesting";
218
+ /**
219
+ * The role of the user in this SuperDoc
220
+ */
221
+ role?: "editor" | "viewer" | "suggester";
222
+ /**
223
+ * The documents to load
224
+ */
225
+ documents: Array<Document>;
226
+ /**
227
+ * The current user of this SuperDoc
228
+ */
229
+ user?: User;
230
+ /**
231
+ * All users of this SuperDoc (can be used for "@"-mentions)
232
+ */
233
+ users?: Array<User>;
234
+ /**
235
+ * Colors to use for user awareness
236
+ */
237
+ colors?: Array<string>;
238
+ /**
239
+ * Modules to load
240
+ */
241
+ modules?: any;
242
+ /**
243
+ * Whether to show pagination in SuperEditors
244
+ */
245
+ pagination?: boolean;
246
+ /**
247
+ * Optional DOM element to render the toolbar in
248
+ */
249
+ toolbar?: string;
250
+ /**
251
+ * Toolbar groups to show
252
+ */
253
+ toolbarGroups?: Array<string>;
254
+ /**
255
+ * Icons to show in the toolbar
256
+ */
257
+ toolbarIcons?: any;
258
+ /**
259
+ * Whether the SuperDoc is in development mode
260
+ */
261
+ isDev?: boolean;
262
+ /**
263
+ * Telemetry configuration
264
+ */
265
+ telemetry?: Telemetry;
266
+ /**
267
+ * Callback before an editor is created
268
+ */
269
+ onEditorBeforeCreate?: (editor: Editor) => void;
270
+ /**
271
+ * Callback after an editor is created
272
+ */
273
+ onEditorCreate?: (editor: Editor) => void;
274
+ /**
275
+ * Callback after an editor is destroyed
276
+ */
277
+ onEditorDestroy?: () => void;
278
+ /**
279
+ * Callback when there is an error in the content
280
+ */
281
+ onContentError?: (params: {
282
+ error: object;
283
+ editor: Editor;
284
+ documentId: string;
285
+ file: File;
286
+ }) => any;
287
+ /**
288
+ * Callback when the SuperDoc is ready
289
+ */
290
+ onReady?: (editor: {
291
+ superdoc: SuperDoc;
292
+ }) => void;
293
+ /**
294
+ * Callback when comments are updated
295
+ */
296
+ onCommentsUpdate?: (params: {
297
+ type: string;
298
+ data: object;
299
+ }) => void;
300
+ /**
301
+ * Callback when awareness is updated
302
+ */
303
+ onAwarenessUpdate?: (params: {
304
+ context: SuperDoc;
305
+ states: any[];
306
+ }) => void;
307
+ /**
308
+ * Callback when the SuperDoc is locked
309
+ */
310
+ onLocked?: (params: {
311
+ isLocked: boolean;
312
+ lockedBy: User;
313
+ }) => void;
314
+ /**
315
+ * Callback when the PDF document is ready
316
+ */
317
+ onPdfDocumentReady?: () => void;
318
+ /**
319
+ * Callback when the sidebar is toggled
320
+ */
321
+ onSidebarToggle?: (isOpened: boolean) => void;
322
+ /**
323
+ * Callback when collaboration is ready
324
+ */
325
+ onCollaborationReady?: (params: {
326
+ editor: Editor;
327
+ }) => void;
328
+ /**
329
+ * Callback when document is updated
330
+ */
331
+ onEditorUpdate?: (params: {
332
+ editor: Editor;
333
+ }) => void;
334
+ /**
335
+ * Callback when an exception is thrown
336
+ */
337
+ onException?: (params: {
338
+ error: Exception;
339
+ }) => void;
340
+ };
341
+ import EventEmitter from 'eventemitter3';
342
+ import { Telemetry } from '@harbour-enterprises/common/Telemetry.js';
343
+ import { SuperToolbar } from '@harbour-enterprises/super-editor';
344
+ import { SuperComments } from '../components/CommentsLayer/commentsList/super-comments-list.js';
345
+ //# sourceMappingURL=SuperDoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","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AI;;;;qBACpC,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;kBACpC,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,SAAS,CAAA;KAAE,KAAK,IAAI;;yBApE3B,eAAe;0BASd,0CAA0C;6BAJ5B,mCAAmC;8BAC7C,iEAAiE"}
@@ -0,0 +1,5 @@
1
+ export function addYComment(yArray: any, ydoc: any, event: any): void;
2
+ export function updateYComment(yArray: any, ydoc: any, event: any): void;
3
+ export function deleteYComment(yArray: any, ydoc: any, event: any): void;
4
+ export function getCommentIndex(yArray: any, comment: any): any;
5
+ //# sourceMappingURL=collaboration-comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collaboration-comments.d.ts","sourceRoot":"","sources":["../../../src/core/collaboration/collaboration-comments.js"],"names":[],"mappings":"AAGO,sEAON;AAEM,yEAUN;AAEM,yEAQN;AAEM,gEAGN"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Translate awareness states to an array of users. This will cause superdoc (context) to
3
+ * emit an awareness-update event with the list of users.
4
+ *
5
+ * @param {Object} context The superdoc instance
6
+ * @param {*} states The awareness states
7
+ * @returns {void}
8
+ */
9
+ export function createAwarenessHandler(context: any, states: any): void;
10
+ /**
11
+ * Main function to create a provider for collaboration.
12
+ * Currently only hocuspocus is actually supported.
13
+ *
14
+ * @param {Object} param The config object
15
+ * @param {Object} param.config The configuration object
16
+ * @param {Object} param.ydoc The Yjs document
17
+ * @param {Object} param.user The user object
18
+ * @param {string} param.documentId The document ID
19
+ * @returns {Object} The provider and socket
20
+ */
21
+ export function createProvider({ config, user, documentId, socket, superdocInstance }: {
22
+ config: any;
23
+ ydoc: any;
24
+ user: any;
25
+ documentId: string;
26
+ }): any;
27
+ //# sourceMappingURL=collaboration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collaboration.d.ts","sourceRoot":"","sources":["../../../src/core/collaboration/collaboration.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,6DAHW,GAAC,GACC,IAAI,CAOhB;AAED;;;;;;;;;;GAUG;AACH,uFANG;IAAsB,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,UAAU,EAAxB,MAAM;CACd,OAQF"}
@@ -0,0 +1,5 @@
1
+ export function initCollaborationComments(superdoc: any): void;
2
+ export function initSuperdocYdoc(superdoc: any): void;
3
+ export function makeDocumentsCollaborative(superdoc: any): any;
4
+ export function syncCommentsToClients(superdoc: any, event: any): void;
5
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/core/collaboration/helpers.js"],"names":[],"mappings":"AAeO,0DAFM,IAAI,CA+BhB;AAUM,iDAFM,IAAI,CAmChB;AAUM,+DAqBN;AASM,kEAFM,IAAI,CAsBhB"}
@@ -0,0 +1,14 @@
1
+ export const PERMISSIONS: Readonly<{
2
+ RESOLVE_OWN: "RESOLVE_OWN";
3
+ RESOLVE_OTHER: "RESOLVE_OTHER";
4
+ REJECT_OWN: "REJECT_OWN";
5
+ REJECT_OTHER: "REJECT_OTHER";
6
+ COMMENTS_OVERFLOW_OWN: "COMMENTS_OVERFLOW";
7
+ COMMENTS_OVERFLOW_OTHER: "COMMENTS_OVERFLOW_OTHER";
8
+ COMMENTS_DELETE_OWN: "COMMENTS_DELETE_OWN";
9
+ COMMENTS_DELETE_OTHER: "COMMENTS_DELETE_OTHER";
10
+ UPLOAD_VERSION: "UPLOAD_VERSION";
11
+ VERSION_HISTORY: "VERSION_HISTORY";
12
+ }>;
13
+ export function isAllowed(permission: string, role: string, isInternal: boolean): boolean;
14
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../src/core/collaboration/permissions.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA2DI,0FAGN"}
@@ -0,0 +1,2 @@
1
+ export function createSuperdocVueApp(): any;
2
+ //# sourceMappingURL=create-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-app.d.ts","sourceRoot":"","sources":["../../src/core/create-app.js"],"names":[],"mappings":"AAaO,4CASN"}
@@ -0,0 +1,3 @@
1
+ export function createDownload(blob: Blob, name: string, extension: string): void;
2
+ export function cleanName(currentName: string): string;
3
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/export.js"],"names":[],"mappings":"AAOO,qCAJI,IAAI,QACJ,MAAM,aACN,MAAM,QAQhB;AAQM,uCAHI,MAAM,GACJ,MAAM,CAOlB"}
@@ -0,0 +1,2 @@
1
+ export * from "./SuperDoc.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ export default function useSelection(params: any): {
2
+ documentId: import("vue").Ref<any, any>;
3
+ page: import("vue").Ref<any, any>;
4
+ selectionBounds: any;
5
+ source: import("vue").Ref<any, any>;
6
+ getValues: () => {
7
+ documentId: any;
8
+ page: any;
9
+ selectionBounds: any;
10
+ source: any;
11
+ };
12
+ getContainerId: () => string;
13
+ getContainerLocation: (parentContainer: any) => {
14
+ top: number;
15
+ left: number;
16
+ };
17
+ };
18
+ //# sourceMappingURL=use-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-selection.d.ts","sourceRoot":"","sources":["../../src/helpers/use-selection.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;EA+CC"}
@@ -0,0 +1,11 @@
1
+ export namespace superdocIcons {
2
+ export { commentIconSvg as comment };
3
+ export { caretDownIconSvg as caretDown };
4
+ export { userCheckIconSvg as internal };
5
+ export { usersIconSvg as external };
6
+ export { checkIconSvg as markDone };
7
+ export { checkIconSvg as acceptChange };
8
+ export { xmarkIconSvg as rejectChange };
9
+ export { ellipsisVerticalSvg as overflow };
10
+ }
11
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.js"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export * from "./core/index.js";
2
+ import { getFileObject } from '@harbour-enterprises/common';
3
+ import { compareVersions } from '@harbour-enterprises/common';
4
+ import { Editor } from '@harbour-enterprises/super-editor';
5
+ import { getRichTextExtensions } from '@harbour-enterprises/super-editor';
6
+ import { DOCX } from '@harbour-enterprises/common';
7
+ import { PDF } from '@harbour-enterprises/common';
8
+ import { HTML } from '@harbour-enterprises/common';
9
+ import { helpers as superEditorHelpers } from '@harbour-enterprises/super-editor';
10
+ import { fieldAnnotationHelpers } from '@harbour-enterprises/super-editor';
11
+ import { trackChangesHelpers } from '@harbour-enterprises/super-editor';
12
+ import { SuperConverter } from '@harbour-enterprises/super-editor';
13
+ import { createZip } from '@harbour-enterprises/super-editor';
14
+ export { BlankDOCX, getFileObject, compareVersions, Editor, getRichTextExtensions, DOCX, PDF, HTML, superEditorHelpers, fieldAnnotationHelpers, trackChangesHelpers, SuperConverter, createZip };
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";8BAMgE,6BAA6B;gCAA7B,6BAA6B;uBANpB,mCAAmC;sCAAnC,mCAAmC;qBAM5C,6BAA6B;oBAA7B,6BAA6B;qBAA7B,6BAA6B;8CADtF,mCAAmC;uCAAnC,mCAAmC;oCAAnC,mCAAmC;+BAL+B,mCAAmC;0BAAnC,mCAAmC"}
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":""}