@harbour-enterprises/superdoc 0.9.40 → 0.9.42

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 (79) hide show
  1. package/dist/chunks/{super-editor.es-BPWmPyPV.cjs → super-editor.es-C0bXjCb2.cjs} +60 -60
  2. package/dist/chunks/{super-editor.es-BMGaeJBV.es.js → super-editor.es-Jdmyi8pH.es.js} +6002 -6003
  3. package/dist/style.css +1 -3368
  4. package/dist/super-editor/chunks/{converter-3lmRyrJr.js → converter-CecWe0O8.js} +632 -632
  5. package/dist/super-editor/chunks/{docx-zipper-pzhEkORK.js → docx-zipper-BYhBuyXi.js} +1 -1
  6. package/dist/super-editor/chunks/{editor-B7eTfGQw.js → editor-CVMeRmT7.js} +4 -4
  7. package/dist/super-editor/chunks/{toolbar-BfM-mqT5.js → toolbar-CqjuKtGw.js} +2 -2
  8. package/dist/super-editor/converter.es.js +1 -1
  9. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  10. package/dist/super-editor/docx-zipper.es.js +2 -2
  11. package/dist/super-editor/editor.es.js +3 -3
  12. package/dist/super-editor/file-zipper.es.js +1 -1
  13. package/dist/super-editor/super-editor.es.js +6 -6
  14. package/dist/super-editor/toolbar.es.js +2 -2
  15. package/dist/super-editor.cjs +1 -1
  16. package/dist/super-editor.es.js +1 -1
  17. package/dist/superdoc.cjs +3 -3
  18. package/dist/superdoc.es.js +3 -3
  19. package/package.json +1 -1
  20. package/dist/components/CommentsLayer/comment-schemas.d.ts +0 -17
  21. package/dist/components/CommentsLayer/comment-schemas.d.ts.map +0 -1
  22. package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts +0 -22
  23. package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts.map +0 -1
  24. package/dist/components/CommentsLayer/helpers.d.ts +0 -8
  25. package/dist/components/CommentsLayer/helpers.d.ts.map +0 -1
  26. package/dist/components/CommentsLayer/use-comment.d.ts +0 -8
  27. package/dist/components/CommentsLayer/use-comment.d.ts.map +0 -1
  28. package/dist/components/CommentsLayer/use-conversation.d.ts +0 -23
  29. package/dist/components/CommentsLayer/use-conversation.d.ts.map +0 -1
  30. package/dist/components/CommentsLayer/use-floating-comment.d.ts +0 -12
  31. package/dist/components/CommentsLayer/use-floating-comment.d.ts.map +0 -1
  32. package/dist/components/CommentsLayer/use-tracked-change.d.ts +0 -1
  33. package/dist/components/CommentsLayer/use-tracked-change.d.ts.map +0 -1
  34. package/dist/components/PdfViewer/helpers/pdfjs-worker.d.ts +0 -3
  35. package/dist/components/PdfViewer/helpers/pdfjs-worker.d.ts.map +0 -1
  36. package/dist/components/PdfViewer/helpers/range.d.ts +0 -2
  37. package/dist/components/PdfViewer/helpers/range.d.ts.map +0 -1
  38. package/dist/components/PdfViewer/pdfjs.d.ts +0 -3
  39. package/dist/components/PdfViewer/pdfjs.d.ts.map +0 -1
  40. package/dist/components/PdfViewer/worker.d.ts +0 -3
  41. package/dist/components/PdfViewer/worker.d.ts.map +0 -1
  42. package/dist/composables/use-document.d.ts +0 -27
  43. package/dist/composables/use-document.d.ts.map +0 -1
  44. package/dist/composables/use-field.d.ts +0 -34
  45. package/dist/composables/use-field.d.ts.map +0 -1
  46. package/dist/core/SuperDoc.d.ts +0 -345
  47. package/dist/core/SuperDoc.d.ts.map +0 -1
  48. package/dist/core/collaboration/collaboration-comments.d.ts +0 -5
  49. package/dist/core/collaboration/collaboration-comments.d.ts.map +0 -1
  50. package/dist/core/collaboration/collaboration.d.ts +0 -27
  51. package/dist/core/collaboration/collaboration.d.ts.map +0 -1
  52. package/dist/core/collaboration/helpers.d.ts +0 -5
  53. package/dist/core/collaboration/helpers.d.ts.map +0 -1
  54. package/dist/core/collaboration/permissions.d.ts +0 -14
  55. package/dist/core/collaboration/permissions.d.ts.map +0 -1
  56. package/dist/core/create-app.d.ts +0 -2
  57. package/dist/core/create-app.d.ts.map +0 -1
  58. package/dist/core/helpers/export.d.ts +0 -3
  59. package/dist/core/helpers/export.d.ts.map +0 -1
  60. package/dist/core/index.d.ts +0 -2
  61. package/dist/core/index.d.ts.map +0 -1
  62. package/dist/helpers/use-selection.d.ts +0 -18
  63. package/dist/helpers/use-selection.d.ts.map +0 -1
  64. package/dist/icons.d.ts +0 -11
  65. package/dist/icons.d.ts.map +0 -1
  66. package/dist/index.d.ts +0 -15
  67. package/dist/index.d.ts.map +0 -1
  68. package/dist/main.d.ts +0 -2
  69. package/dist/main.d.ts.map +0 -1
  70. package/dist/stores/comments-store.d.ts +0 -248
  71. package/dist/stores/comments-store.d.ts.map +0 -1
  72. package/dist/stores/hrbr-fields-store.d.ts +0 -44
  73. package/dist/stores/hrbr-fields-store.d.ts.map +0 -1
  74. package/dist/stores/superdoc-store.d.ts +0 -881
  75. package/dist/stores/superdoc-store.d.ts.map +0 -1
  76. package/dist/super-editor.d.ts +0 -2
  77. package/dist/super-editor.d.ts.map +0 -1
  78. package/dist/superdoc.umd.js +0 -68991
  79. package/dist/superdoc.umd.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { J as md, a as yd, d as bd, j as jo, L as Wo, v as wd, f as Sd, p as Dd, c as vd } from "./chunks/super-editor.es-BMGaeJBV.es.js";
2
- import { b as cb, K as lb, S as gb } from "./chunks/super-editor.es-BMGaeJBV.es.js";
1
+ import { J as md, a as yd, d as bd, j as jo, L as Wo, v as wd, f as Sd, p as Dd, c as vd } from "./chunks/super-editor.es-Jdmyi8pH.es.js";
2
+ import { I as cb, K as lb, S as gb } from "./chunks/super-editor.es-Jdmyi8pH.es.js";
3
3
  import { Y as Vl, r as V, Z as Ai, p as Ne, _ as _n, a as Ae, $ as qn, a0 as la, C as ht, i as lt, q as Ji, l as bt, x as Oe, a1 as Fd, L as ti, R as _t, a2 as kd, a3 as xd, a4 as Xo, g as Ti, N as Gs, M as Kr, j as li, k as Qi, h as ga, U as Rd, s as Nd, z as _r, F as qt, Q as GA, m as dt, D as fi, G as fs, B as re, V as Md, S as Ld, W as Gd, K as Oi, O as ds, E as sr, P as Td, J as Ud, T as Hd, b as ye, o as pe, t as Bi, v as Si, y as zl, f as Xe, A as ci, e as tt, u as Ci, w as wi, n as js, a5 as Zl, d as An, c as $l, X as Pd, a6 as Od } from "./chunks/vue-BDbTsTMu.es.js";
4
4
  import { B as Pn } from "./chunks/jszip-DSGi1sNe.es.js";
5
5
  import { B as Jd } from "./chunks/blank-docx-BRvkcuiv.es.js";
@@ -32533,7 +32533,7 @@ class ab extends eg {
32533
32533
  this.config = {
32534
32534
  ...this.config,
32535
32535
  ...t
32536
- }, this.config.colors = RI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.9.40", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, await this.#s(this.config.modules), this.#t(), this.#i(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#n(this);
32536
+ }, this.config.colors = RI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.9.41", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, await this.#s(this.config.modules), this.#t(), this.#i(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#n(this);
32537
32537
  }
32538
32538
  get requiredNumberOfEditors() {
32539
32539
  return this.superdocStore.documents.filter((t) => t.type === On).length;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@harbour-enterprises/superdoc",
3
3
  "type": "module",
4
- "version": "0.9.40",
4
+ "version": "0.9.42",
5
5
  "license": "AGPL-3.0",
6
6
  "readme": "../../README.md",
7
7
  "files": [
@@ -1,17 +0,0 @@
1
- export namespace conversation {
2
- let conversationId: any;
3
- let documentId: any;
4
- let creatorEmail: any;
5
- let creatorName: any;
6
- let comments: any[];
7
- let selection: any;
8
- }
9
- export namespace comment {
10
- let comment: any;
11
- namespace user {
12
- let name: any;
13
- let email: any;
14
- }
15
- let timestamp: any;
16
- }
17
- //# sourceMappingURL=comment-schemas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"comment-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/CommentsLayer/comment-schemas.js"],"names":[],"mappings":""}
@@ -1,22 +0,0 @@
1
- /**
2
- * Comments list renderer (not floating comments)
3
- *
4
- * This renders a list of comments into an element, connected to main SuperDoc instance
5
- */
6
- export class SuperComments extends EventEmitter<string | symbol, any> {
7
- constructor(options: any, superdoc: any);
8
- element: any;
9
- config: {
10
- comments: any[];
11
- element: any;
12
- commentsStore: any;
13
- };
14
- app: import("vue").App<Element>;
15
- superdoc: any;
16
- createVueApp(): void;
17
- container: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any>;
18
- close(): void;
19
- open(): void;
20
- }
21
- import EventEmitter from 'eventemitter3';
22
- //# sourceMappingURL=super-comments-list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"super-comments-list.d.ts","sourceRoot":"","sources":["../../../../src/components/CommentsLayer/commentsList/super-comments-list.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH;IAUE,yCAOC;IAfD,aAAQ;IAER;;;;MAIE;IAMA,gCAAe;IACf,cAAwB;IAI1B,qBAUC;IADC,yQAA6C;IAG/C,cAOC;IAED,aAIC;CACF;yBAxDwB,eAAe"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Comments helper to format dates from timestamp
3
- *
4
- * @param {Number} timestamp The timestamp to format
5
- * @returns {String} The formatted date
6
- */
7
- export function formatDate(timestamp: number): string;
8
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/CommentsLayer/helpers.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,sDAYC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Comment composable
3
- *
4
- * @param {Object} params The initial values of the comment
5
- * @returns {Object} The comment composable
6
- */
7
- export default function useComment(params: any): any;
8
- //# sourceMappingURL=use-comment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-comment.d.ts","sourceRoot":"","sources":["../../../src/components/CommentsLayer/use-comment.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,qDA+QC"}
@@ -1,23 +0,0 @@
1
- export default function useConversation(params: any): {
2
- getValues: () => any;
3
- markDone: (email: any, name: any) => void;
4
- conversationId: any;
5
- thread: import("vue").Ref<any, any>;
6
- documentId: any;
7
- creatorEmail: any;
8
- creatorName: any;
9
- comments: import("vue").Ref<any, any>;
10
- selection: any;
11
- markedDone: import("vue").Ref<any, any>;
12
- markedDoneByEmail: import("vue").Ref<any, any>;
13
- markedDoneByName: import("vue").Ref<any, any>;
14
- isFocused: import("vue").Ref<any, any>;
15
- group: import("vue").Ref<any, any>;
16
- conversationElement: import("vue").Ref<any, any>;
17
- suppressHighlight: import("vue").Ref<any, any>;
18
- suppressClick: import("vue").Ref<any, any>;
19
- isInternal: import("vue").Ref<any, any>;
20
- isTrackedChange: import("vue").Ref<any, any>;
21
- trackedChange: any;
22
- };
23
- //# sourceMappingURL=use-conversation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-conversation.d.ts","sourceRoot":"","sources":["../../../src/components/CommentsLayer/use-conversation.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;EAsFC"}
@@ -1,12 +0,0 @@
1
- export function useFloatingComment(params: any): {
2
- id: any;
3
- comment: import("vue").Ref<any, any>;
4
- position: {
5
- top: number;
6
- left: number;
7
- right: number;
8
- bottom: number;
9
- };
10
- offset: import("vue").Ref<number, number>;
11
- };
12
- //# sourceMappingURL=use-floating-comment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-floating-comment.d.ts","sourceRoot":"","sources":["../../../src/components/CommentsLayer/use-floating-comment.js"],"names":[],"mappings":"AAEA;;;;;;;;;;EAkBC"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=use-tracked-change.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-tracked-change.d.ts","sourceRoot":"","sources":["../../../src/components/CommentsLayer/use-tracked-change.js"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export { fo as WorkerMessageHandler };
2
- declare var fo: any;
3
- //# sourceMappingURL=pdfjs-worker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pdfjs-worker.d.ts","sourceRoot":"","sources":["../../../../src/components/PdfViewer/helpers/pdfjs-worker.js"],"names":[],"mappings":";AAoB+12xC,oBAAgD"}
@@ -1,2 +0,0 @@
1
- export function range(start: any, end: any): any[];
2
- //# sourceMappingURL=range.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../../src/components/PdfViewer/helpers/range.js"],"names":[],"mappings":"AAAO,mDAGN"}
@@ -1,3 +0,0 @@
1
- import * as pdfjsLib from 'pdfjs-dist';
2
- export { pdfjsLib, pdfjsViewer };
3
- //# sourceMappingURL=pdfjs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pdfjs.d.ts","sourceRoot":"","sources":["../../../src/components/PdfViewer/pdfjs.js"],"names":[],"mappings":"0BAA0B,YAAY"}
@@ -1,3 +0,0 @@
1
- export { fo as WorkerMessageHandler };
2
- declare var fo: any;
3
- //# sourceMappingURL=worker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../src/components/PdfViewer/worker.js"],"names":[],"mappings":";AAgC244xC,oBAAgD"}
@@ -1,27 +0,0 @@
1
- export default function useDocument(params: any, superdocConfig: any): {
2
- id: any;
3
- data: any;
4
- type: string;
5
- config: any;
6
- state: any;
7
- role: any;
8
- core: import("vue").Ref<any, any>;
9
- ydoc: import("vue").ShallowRef<any, any>;
10
- provider: import("vue").ShallowRef<any, any>;
11
- socket: import("vue").ShallowRef<any, any>;
12
- isNewFile: import("vue").Ref<any, any>;
13
- container: import("vue").Ref<any, any>;
14
- pageContainers: import("vue").Ref<any[], any[]>;
15
- isReady: import("vue").Ref<boolean, boolean>;
16
- rulers: import("vue").Ref<any, any>;
17
- rawFields: import("vue").Ref<any, any>;
18
- fields: import("vue").Ref<any, any>;
19
- annotations: import("vue").Ref<any, any>;
20
- conversations: import("vue").Ref<any, any>;
21
- setEditor: (ref: any) => any;
22
- getEditor: () => any;
23
- removeComments: () => void;
24
- restoreComments: () => void;
25
- removeConversation: (conversationId: any) => void;
26
- };
27
- //# sourceMappingURL=use-document.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-document.d.ts","sourceRoot":"","sources":["../../src/composables/use-document.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;EAwGC"}
@@ -1,34 +0,0 @@
1
- export function useFieldValueWatcher(field: any, originalValue: any): {
2
- value: any;
3
- };
4
- export function useField(field: any): {
5
- id: import("vue").Ref<any, any>;
6
- icon: import("vue").Ref<any, any>;
7
- iconPack: import("vue").Ref<any, any>;
8
- label: import("vue").Ref<any, any>;
9
- placeholder: any;
10
- fieldType: import("vue").Ref<any, any>;
11
- fieldSubType: import("vue").Ref<any, any>;
12
- value: any;
13
- format: import("vue").Ref<any, any>;
14
- logicRules: import("vue").Ref<any, any>;
15
- hidden: import("vue").Ref<boolean, boolean>;
16
- originalJSON: any;
17
- fieldStyle: {
18
- fontFamily: any;
19
- fontSize: any;
20
- originalFontSize: any;
21
- };
22
- valueGetter: any;
23
- };
24
- export function useImageField(field: any): {
25
- fontfamily: import("vue").Ref<any, any>;
26
- iteminputtype: import("vue").Ref<any, any>;
27
- };
28
- export function useSelectField(field: any): {
29
- options: import("vue").Ref<any, any>;
30
- };
31
- export function useCheckboxField(field: any): {
32
- options: import("vue").Ref<any, any>;
33
- };
34
- //# sourceMappingURL=use-field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-field.d.ts","sourceRoot":"","sources":["../../src/composables/use-field.js"],"names":[],"mappings":"AAEA;;EA0BC;AAED;;;;;;;;;;;;;;;;;;;EAgEC;AAED;;;EASC;AAED;;EAKC;AAED;;EAiBC"}
@@ -1,345 +0,0 @@
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
@@ -1 +0,0 @@
1
-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AAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;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"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,27 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,5 +0,0 @@
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