superdoc 2.29.0 → 2.30.0-next.13
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/README.md +127 -25
- package/dist/chunks/{FindReplaceSurface-B_5ggdWg.es.js → FindReplaceSurface-BEnRLpD9.es.js} +1 -1
- package/dist/chunks/{FindReplaceSurface-fVHxPXtn.cjs → FindReplaceSurface-DWXgWgg7.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-CZqhDQQ1.es.js → PasswordPromptSurface-DjV1JgjD.es.js} +1 -1
- package/dist/chunks/{PasswordPromptSurface-x8GNmMJT.cjs → PasswordPromptSurface-VFPnQOML.cjs} +1 -1
- package/dist/chunks/{PdfViewer-CW09MNrB.es.js → PdfViewer-C2r-K8zC.es.js} +1 -1
- package/dist/chunks/{PdfViewer-CkrAHpC-.cjs → PdfViewer-DYTbPVUr.cjs} +1 -1
- package/dist/chunks/{_plugin-vue_export-helper-BkbCxNeT.cjs → _plugin-vue_export-helper-BzM2_tVU.cjs} +9 -0
- package/dist/chunks/{_plugin-vue_export-helper-DRPRMkeA.es.js → _plugin-vue_export-helper-CmkaJDnr.es.js} +4 -1
- package/dist/chunks/{create-super-doc-ui-Dc8dQAMc.es.js → create-super-doc-ui--o8TcYYv.es.js} +6080 -5456
- package/dist/chunks/{create-super-doc-ui-L60GhVAX.cjs → create-super-doc-ui-CvK1JdZv.cjs} +3567 -2937
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/changes/changes.d.ts +26 -0
- package/dist/document-api/src/changes/changes.types.d.ts +156 -0
- package/dist/document-api/src/comments/comment-create-attribution.d.ts +4 -0
- package/dist/document-api/src/comments/comments.types.d.ts +4 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +76 -8
- package/dist/document-api/src/contract/operation-registry.d.ts +2 -2
- package/dist/document-api/src/contract/schemas.d.ts +7 -1
- package/dist/document-api/src/create/create.d.ts +0 -4
- package/dist/document-api/src/diff/diff.types.d.ts +6 -6
- package/dist/document-api/src/header-footers/header-footers.d.ts +1 -3
- package/dist/document-api/src/index.d.ts +13 -1
- package/dist/document-api/src/inline-semantics/token-sets.d.ts +0 -2
- package/dist/document-api/src/insert/insert.d.ts +0 -1
- package/dist/document-api/src/paragraphs/paragraphs.d.ts +8 -3
- package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +49 -5
- package/dist/document-api/src/tables/data/table-preset-appearance.generated.d.ts +2 -0
- package/dist/document-api/src/tables/table-style-presets.d.ts +73 -0
- package/dist/document-api/src/tables/tables.d.ts +4 -1
- package/dist/document-api/src/types/sd-props.d.ts +7 -0
- package/dist/document-api/src/types/table-operations.types.d.ts +12 -15
- package/dist/layout-engine/contracts/src/index.d.ts +4 -1
- package/dist/layout-engine/contracts/src/table-cell-vector-overlay.d.ts +2 -0
- package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +4 -0
- package/dist/layout-engine/layout-bridge/src/coupled-footnote-pagination.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/footnote-page-certificate.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/footnote-page-planner.d.ts +5 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/footnote-page-flow.d.ts +3 -0
- package/dist/layout-engine/layout-engine/src/index.d.ts +7 -0
- package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +5 -0
- package/dist/layout-engine/layout-engine/src/layout-table.d.ts +3 -1
- package/dist/layout-engine/layout-engine/src/layout-utils.d.ts +0 -4
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +4 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphContent.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/styles.d.ts +0 -10
- package/dist/layout-engine/painters/dom/src/svg-utils.d.ts +1 -13
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/shared/common/Telemetry.d.ts +50 -0
- package/dist/shared/common/event-types.d.ts +13 -0
- package/dist/shared/font-system/src/bundled-face-names.d.ts +1 -0
- package/dist/shared/font-system/src/resolver.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +17 -33
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +6 -4
- package/dist/superdoc/src/components/CommentsLayer/comment-params.d.ts +84 -0
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +15 -95
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -9
- package/dist/superdoc/src/composables/use-comment-sidebar.d.ts +6 -0
- package/dist/superdoc/src/composables/use-document.d.ts +51 -99
- package/dist/superdoc/src/core/SuperDoc.d.ts +12 -3
- package/dist/superdoc/src/core/collaboration/cdn-collaboration-comment-map.d.ts +1 -0
- package/dist/superdoc/src/core/collaboration/collaboration-comment-map.d.ts +2 -0
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +1 -1
- package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +10 -1
- package/dist/superdoc/src/core/document-open-telemetry.d.ts +1 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +4 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +1 -0
- package/dist/superdoc/src/core/types/index.d.ts +110 -39
- package/dist/superdoc/src/helpers/deprecation.d.ts +12 -3
- package/dist/superdoc/src/helpers/object-guards.d.ts +1 -0
- package/dist/superdoc/src/helpers/v2-review-geometry-delivery.d.ts +22 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +1 -0
- package/dist/superdoc/src/public/content-control-ref.d.ts +12 -0
- package/dist/superdoc/src/public/index.d.cts +20 -0
- package/dist/superdoc/src/public/index.d.ts +4 -1
- package/dist/superdoc/src/public/ui/async-read-cache.d.ts +32 -0
- package/dist/superdoc/src/public/ui/block-commands.d.ts +39 -0
- package/dist/superdoc/src/public/ui/command-results.d.ts +39 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +5 -1
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -17
- package/dist/superdoc/src/public/ui/document-change-records.d.ts +7 -0
- package/dist/superdoc/src/public/ui/entity-rows.d.ts +14 -0
- package/dist/superdoc/src/public/ui/font-options.d.ts +7 -0
- package/dist/superdoc/src/public/ui/format-painter-paragraph.d.ts +7 -0
- package/dist/superdoc/src/public/ui/format-painter-state.d.ts +29 -0
- package/dist/superdoc/src/public/ui/heavy-read-policy.d.ts +11 -0
- package/dist/superdoc/src/public/ui/host-events.d.ts +3 -0
- package/dist/superdoc/src/public/ui/inline-values.d.ts +80 -0
- package/dist/superdoc/src/public/ui/loose-record.d.ts +4 -0
- package/dist/superdoc/src/public/ui/reasons.d.ts +1 -0
- package/dist/superdoc/src/public/ui/selection-targets.d.ts +53 -0
- package/dist/superdoc/src/public/ui/shared-tracked-changes-catalog.d.ts +16 -0
- package/dist/superdoc/src/public/ui/tracked-change-ids.d.ts +51 -0
- package/dist/superdoc/src/public/ui/types.d.ts +25 -2
- package/dist/superdoc/src/public/ui/ui-bench-timing.d.ts +9 -0
- package/dist/superdoc/src/public/ui.d.cts +18 -0
- package/dist/superdoc/src/public/ui.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +23022 -546
- package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +1 -1
- package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +10 -10
- package/dist/superdoc/src/stores/helpers/review-presentation.d.ts +91 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +4 -2
- package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +1 -8
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +1 -1
- package/dist/superdoc/src/stores/helpers/v2-review-adapters.d.ts +147 -0
- package/dist/superdoc/src/stores/superdoc-store.d.ts +12 -2895
- package/dist/superdoc.cjs +915 -516
- package/dist/superdoc.es.js +915 -516
- package/dist/word-layout/src/marker-utils.d.ts +0 -5
- package/dist/word-layout/src/unit-conversions.d.ts +0 -1
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +38 -42
- package/package.json +12 -3
- package/dist/document-api/src/diff/index.d.ts +0 -3
- package/dist/document-api/src/write/locator.d.ts +0 -24
- package/dist/layout-engine/painters/dom/src/features/feature-registry.d.ts +0 -41
- package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +0 -11
- package/dist/word-layout/src/tab-layout.d.ts +0 -193
|
@@ -194,7 +194,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
194
194
|
trackedChangeAnchorKey: string | null;
|
|
195
195
|
trackedChangeCanonicalId: string | null;
|
|
196
196
|
trackedChangePositionAliases: string[];
|
|
197
|
-
trackedChangeDecision: (
|
|
197
|
+
trackedChangeDecision: import('./comment-params.js').TrackedChangeDecision | null;
|
|
198
198
|
trackedChangeLabel: string | null;
|
|
199
199
|
trackedChangeDetailLines: {
|
|
200
200
|
excerpt: string;
|
|
@@ -202,13 +202,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
202
202
|
}[] | null;
|
|
203
203
|
trackedChangeImagePreview: {
|
|
204
204
|
src: string;
|
|
205
|
-
contentType
|
|
206
|
-
role
|
|
207
|
-
partUri?: string | undefined;
|
|
208
|
-
relationshipId?: string | undefined;
|
|
205
|
+
contentType?: string | undefined;
|
|
206
|
+
role?: string | undefined;
|
|
209
207
|
width?: number | undefined;
|
|
210
208
|
height?: number | undefined;
|
|
211
|
-
alt
|
|
209
|
+
alt: string;
|
|
212
210
|
} | null;
|
|
213
211
|
customAttributes: readonly {
|
|
214
212
|
name: string;
|
|
@@ -227,7 +225,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
227
225
|
docxCommentJSON: {} | null;
|
|
228
226
|
origin: "word" | "google-docs" | "unknown" | undefined;
|
|
229
227
|
threadingMethod: "commentsExtended" | "range-based" | "mixed" | undefined;
|
|
230
|
-
threadingStyleOverride: import('
|
|
228
|
+
threadingStyleOverride: import('../../../../shared/common/comments-types.js').CommentThreadingStyle | undefined;
|
|
231
229
|
threadingParentCommentId: string | null | undefined;
|
|
232
230
|
originalXmlStructure: {
|
|
233
231
|
hasCommentsExtended: boolean;
|
|
@@ -238,7 +236,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
238
236
|
text: string;
|
|
239
237
|
superdoc?: {
|
|
240
238
|
emit: (event: "comments-update", payload: {
|
|
241
|
-
type: import('
|
|
239
|
+
type: import('../../../../shared/common/event-types.js').CommentEvent;
|
|
242
240
|
changes?: {
|
|
243
241
|
key: string;
|
|
244
242
|
value: unknown;
|
|
@@ -260,7 +258,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
260
258
|
text: string;
|
|
261
259
|
superdoc: {
|
|
262
260
|
emit: (event: "comments-update", payload: {
|
|
263
|
-
type: import('
|
|
261
|
+
type: import('../../../../shared/common/event-types.js').CommentEvent;
|
|
264
262
|
changes?: {
|
|
265
263
|
key: string;
|
|
266
264
|
value: unknown;
|
|
@@ -332,7 +330,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
332
330
|
trackedChangeAnchorKey: string | null;
|
|
333
331
|
trackedChangeCanonicalId: string | null;
|
|
334
332
|
trackedChangePositionAliases: string[];
|
|
335
|
-
trackedChangeDecision: (
|
|
333
|
+
trackedChangeDecision: import('./comment-params.js').TrackedChangeDecision | null;
|
|
336
334
|
trackedChangeLabel: string | null;
|
|
337
335
|
trackedChangeDetailLines: {
|
|
338
336
|
excerpt: string;
|
|
@@ -340,13 +338,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
340
338
|
}[] | null;
|
|
341
339
|
trackedChangeImagePreview: {
|
|
342
340
|
src: string;
|
|
343
|
-
contentType
|
|
344
|
-
role
|
|
345
|
-
partUri?: string | undefined;
|
|
346
|
-
relationshipId?: string | undefined;
|
|
341
|
+
contentType?: string | undefined;
|
|
342
|
+
role?: string | undefined;
|
|
347
343
|
width?: number | undefined;
|
|
348
344
|
height?: number | undefined;
|
|
349
|
-
alt
|
|
345
|
+
alt: string;
|
|
350
346
|
} | null;
|
|
351
347
|
customAttributes: readonly {
|
|
352
348
|
name: string;
|
|
@@ -361,7 +357,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
361
357
|
resolvedByName: string | null | undefined;
|
|
362
358
|
origin: "word" | "google-docs" | "unknown" | undefined;
|
|
363
359
|
threadingMethod: "commentsExtended" | "range-based" | "mixed" | undefined;
|
|
364
|
-
threadingStyleOverride: import('
|
|
360
|
+
threadingStyleOverride: import('../../../../shared/common/comments-types.js').CommentThreadingStyle | undefined;
|
|
365
361
|
threadingParentCommentId: string | null | undefined;
|
|
366
362
|
originalXmlStructure: {
|
|
367
363
|
hasCommentsExtended: boolean;
|
|
@@ -375,7 +371,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
375
371
|
name?: string | null;
|
|
376
372
|
superdoc: {
|
|
377
373
|
emit: (event: "comments-update", payload: {
|
|
378
|
-
type: import('
|
|
374
|
+
type: import('../../../../shared/common/event-types.js').CommentEvent;
|
|
379
375
|
changes?: {
|
|
380
376
|
key: string;
|
|
381
377
|
value: unknown;
|
|
@@ -392,7 +388,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
392
388
|
modules?: import('../../public/index.js').Modules;
|
|
393
389
|
};
|
|
394
390
|
};
|
|
395
|
-
decision?:
|
|
391
|
+
decision?: import('./comment-params.js').TrackedChangeDecision;
|
|
396
392
|
reconciliationToken?: symbol;
|
|
397
393
|
}) => {
|
|
398
394
|
ok: false;
|
|
@@ -402,7 +398,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
402
398
|
isInternal: boolean;
|
|
403
399
|
superdoc: {
|
|
404
400
|
emit: (event: "comments-update", payload: {
|
|
405
|
-
type: import('
|
|
401
|
+
type: import('../../../../shared/common/event-types.js').CommentEvent;
|
|
406
402
|
changes?: {
|
|
407
403
|
key: string;
|
|
408
404
|
value: unknown;
|
|
@@ -423,12 +419,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
423
419
|
ok: false;
|
|
424
420
|
reason: "read-only-document";
|
|
425
421
|
} | undefined;
|
|
426
|
-
updatePosition: (coords:
|
|
427
|
-
top: number;
|
|
428
|
-
left: number;
|
|
429
|
-
right: number;
|
|
430
|
-
bottom: number;
|
|
431
|
-
}, parentElement: Pick<Element, "getBoundingClientRect">) => void;
|
|
422
|
+
updatePosition: (coords: import('./comment-params.js').SelectionBounds, parentElement: Pick<Element, "getBoundingClientRect">) => void;
|
|
432
423
|
getCommentUser: () => {
|
|
433
424
|
name: string;
|
|
434
425
|
email: string | null | undefined;
|
|
@@ -440,14 +431,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
440
431
|
email: string | null;
|
|
441
432
|
image: string | null;
|
|
442
433
|
};
|
|
443
|
-
updateIdentityValues: (updates?:
|
|
444
|
-
commentId?: string;
|
|
445
|
-
importedId?: string | null;
|
|
446
|
-
parentCommentId?: string | null;
|
|
447
|
-
trackedChangeParentId?: string | null;
|
|
448
|
-
trackedChangeThreadParentId?: string | null;
|
|
449
|
-
threadingParentCommentId?: string | null;
|
|
450
|
-
}) => void;
|
|
434
|
+
updateIdentityValues: (updates?: import('./comment-params.js').CommentIdentity) => void;
|
|
451
435
|
}[] | null;
|
|
452
436
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
453
437
|
commentDialogElement: HTMLDivElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
type CommentId = string | number;
|
|
1
2
|
/**
|
|
2
3
|
* Collect every comment that should appear inside the tracked-change dialog
|
|
3
4
|
* for `parentComment`. Walks two sources of membership:
|
|
@@ -16,8 +17,9 @@
|
|
|
16
17
|
* Returns the comments belonging to this tracked-change thread, in original list order.
|
|
17
18
|
*/
|
|
18
19
|
export declare const collectTrackedChangeThread: <Comment extends {
|
|
19
|
-
commentId:
|
|
20
|
-
parentCommentId?:
|
|
21
|
-
threadingParentCommentId?:
|
|
22
|
-
trackedChangeThreadParentId?:
|
|
20
|
+
commentId: CommentId;
|
|
21
|
+
parentCommentId?: CommentId | null;
|
|
22
|
+
threadingParentCommentId?: CommentId | null;
|
|
23
|
+
trackedChangeThreadParentId?: CommentId | null;
|
|
23
24
|
}>(parentComment: Comment, allComments: ReadonlyArray<Comment>) => Array<Comment>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { TrackChangeCustomAttribute } from '../../../../document-api/src/index.js';
|
|
2
|
+
import { StoryLocator } from '../../core/types/index.js';
|
|
3
|
+
export type TrackedChangeDecision = 'accept' | 'reject';
|
|
4
|
+
export type SelectionBounds = {
|
|
5
|
+
top: number;
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
bottom: number;
|
|
9
|
+
};
|
|
10
|
+
export type CommentMention = {
|
|
11
|
+
name?: string | null;
|
|
12
|
+
email?: string | null;
|
|
13
|
+
};
|
|
14
|
+
export type CommentAuthor = {
|
|
15
|
+
name?: string | null;
|
|
16
|
+
email?: string | null;
|
|
17
|
+
};
|
|
18
|
+
export type TrackedChangeDetailLine = {
|
|
19
|
+
excerpt: string;
|
|
20
|
+
label: string;
|
|
21
|
+
};
|
|
22
|
+
export type TrackedChangeRowImagePreview = {
|
|
23
|
+
src: string;
|
|
24
|
+
contentType?: string;
|
|
25
|
+
role?: string;
|
|
26
|
+
width?: number;
|
|
27
|
+
height?: number;
|
|
28
|
+
alt: string;
|
|
29
|
+
};
|
|
30
|
+
export type CommentSelectionParams = {
|
|
31
|
+
documentId?: unknown;
|
|
32
|
+
page?: number;
|
|
33
|
+
selectionBounds?: Partial<SelectionBounds> | null;
|
|
34
|
+
source?: string | null;
|
|
35
|
+
};
|
|
36
|
+
export type CommentIdentity = {
|
|
37
|
+
commentId?: string;
|
|
38
|
+
importedId?: string | null;
|
|
39
|
+
parentCommentId?: string | null;
|
|
40
|
+
trackedChangeParentId?: string | null;
|
|
41
|
+
trackedChangeThreadParentId?: string | null;
|
|
42
|
+
threadingParentCommentId?: string | null;
|
|
43
|
+
};
|
|
44
|
+
export type CommentInputParams = CommentIdentity & {
|
|
45
|
+
uid?: string;
|
|
46
|
+
trackedChangeSide?: string | null;
|
|
47
|
+
fileId?: string | null;
|
|
48
|
+
fileType?: string | null;
|
|
49
|
+
createdAtVersionNumber?: number | null;
|
|
50
|
+
isInternal?: boolean;
|
|
51
|
+
mentions?: CommentMention[];
|
|
52
|
+
isFocused?: boolean;
|
|
53
|
+
creatorId?: string | null;
|
|
54
|
+
creatorEmail?: string | null;
|
|
55
|
+
creatorName?: string | null;
|
|
56
|
+
creatorImage?: string | null;
|
|
57
|
+
createdTime?: number;
|
|
58
|
+
importedAuthor?: CommentAuthor | null;
|
|
59
|
+
docxCommentJSON?: unknown;
|
|
60
|
+
commentText?: string;
|
|
61
|
+
selection?: CommentSelectionParams | null;
|
|
62
|
+
trackedChange?: boolean;
|
|
63
|
+
trackedChangeType?: string | null;
|
|
64
|
+
trackedChangeText?: string | null;
|
|
65
|
+
trackedChangeDisplayType?: string | null;
|
|
66
|
+
semanticColorKey?: string | null;
|
|
67
|
+
semanticColor?: string | null;
|
|
68
|
+
trackedChangeStory?: StoryLocator | null;
|
|
69
|
+
trackedChangeStoryKind?: string | null;
|
|
70
|
+
trackedChangeStoryLabel?: string;
|
|
71
|
+
trackedChangeAnchorKey?: string | null;
|
|
72
|
+
trackedChangeCanonicalId?: string | null;
|
|
73
|
+
trackedChangePositionAliases?: string[];
|
|
74
|
+
deletedText?: string | null;
|
|
75
|
+
trackedChangeLabel?: string | null;
|
|
76
|
+
trackedChangeDetailLines?: TrackedChangeDetailLine[] | null;
|
|
77
|
+
trackedChangeImagePreview?: TrackedChangeRowImagePreview | null;
|
|
78
|
+
customAttributes?: readonly TrackChangeCustomAttribute[] | null;
|
|
79
|
+
resolvedTime?: number | null;
|
|
80
|
+
resolvedById?: string | null;
|
|
81
|
+
resolvedByEmail?: string | null;
|
|
82
|
+
resolvedByName?: string | null;
|
|
83
|
+
trackedChangeDecision?: TrackedChangeDecision | null;
|
|
84
|
+
};
|
|
@@ -1,36 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Modules
|
|
1
|
+
import { CommentEvent } from '../../../../shared/common/event-types.js';
|
|
2
|
+
import { Comment as CommonComment } from '../../../../shared/common/comments-types.js';
|
|
3
|
+
import { Modules } from '../../core/types/index.js';
|
|
4
|
+
import { CommentIdentity, CommentInputParams, SelectionBounds, TrackedChangeDecision } from './comment-params.js';
|
|
5
|
+
export type UseCommentParams = CommentInputParams & Pick<CommonComment, 'origin' | 'threadingMethod' | 'threadingStyleOverride' | 'originalXmlStructure'>;
|
|
4
6
|
export declare const COMMENT_RECONCILIATION_TOKEN: unique symbol;
|
|
5
7
|
type ReadOnlyMutationOutcome = {
|
|
6
8
|
ok: false;
|
|
7
9
|
reason: 'read-only-document';
|
|
8
10
|
};
|
|
9
|
-
type TrackedChangeDecision = 'accept' | 'reject';
|
|
10
|
-
type SelectionBounds = {
|
|
11
|
-
top: number;
|
|
12
|
-
left: number;
|
|
13
|
-
right: number;
|
|
14
|
-
bottom: number;
|
|
15
|
-
};
|
|
16
|
-
type CommentMention = {
|
|
17
|
-
name?: string | null;
|
|
18
|
-
email?: string | null;
|
|
19
|
-
};
|
|
20
|
-
type CommentAuthor = {
|
|
21
|
-
name?: string | null;
|
|
22
|
-
email?: string | null;
|
|
23
|
-
};
|
|
24
|
-
type TrackedChangeDetailLine = {
|
|
25
|
-
excerpt: string;
|
|
26
|
-
label: string;
|
|
27
|
-
};
|
|
28
|
-
type CommentSelectionParams = {
|
|
29
|
-
documentId?: string | null;
|
|
30
|
-
page?: number;
|
|
31
|
-
selectionBounds?: Partial<SelectionBounds> | null;
|
|
32
|
-
source?: string | null;
|
|
33
|
-
};
|
|
34
11
|
type CommentChange = {
|
|
35
12
|
key: string;
|
|
36
13
|
value: unknown;
|
|
@@ -52,59 +29,6 @@ type CommentsHost = {
|
|
|
52
29
|
modules?: Modules;
|
|
53
30
|
};
|
|
54
31
|
};
|
|
55
|
-
type CommentIdentity = {
|
|
56
|
-
commentId?: string;
|
|
57
|
-
importedId?: string | null;
|
|
58
|
-
parentCommentId?: string | null;
|
|
59
|
-
trackedChangeParentId?: string | null;
|
|
60
|
-
trackedChangeThreadParentId?: string | null;
|
|
61
|
-
threadingParentCommentId?: string | null;
|
|
62
|
-
};
|
|
63
|
-
export type UseCommentParams = CommentIdentity & {
|
|
64
|
-
uid?: string;
|
|
65
|
-
trackedChangeSide?: string | null;
|
|
66
|
-
fileId?: string | null;
|
|
67
|
-
fileType?: string | null;
|
|
68
|
-
createdAtVersionNumber?: number | null;
|
|
69
|
-
isInternal?: boolean;
|
|
70
|
-
mentions?: CommentMention[];
|
|
71
|
-
isFocused?: boolean;
|
|
72
|
-
creatorId?: string | null;
|
|
73
|
-
creatorEmail?: string | null;
|
|
74
|
-
creatorName?: string | null;
|
|
75
|
-
creatorImage?: string | null;
|
|
76
|
-
createdTime?: number;
|
|
77
|
-
importedAuthor?: CommentAuthor | null;
|
|
78
|
-
docxCommentJSON?: unknown;
|
|
79
|
-
origin?: CommonComment['origin'];
|
|
80
|
-
threadingMethod?: CommonComment['threadingMethod'];
|
|
81
|
-
threadingStyleOverride?: CommentThreadingStyle;
|
|
82
|
-
originalXmlStructure?: CommonComment['originalXmlStructure'];
|
|
83
|
-
commentText?: string;
|
|
84
|
-
selection?: CommentSelectionParams;
|
|
85
|
-
trackedChange?: boolean;
|
|
86
|
-
trackedChangeType?: string | null;
|
|
87
|
-
trackedChangeText?: string | null;
|
|
88
|
-
trackedChangeDisplayType?: string | null;
|
|
89
|
-
semanticColorKey?: string | null;
|
|
90
|
-
semanticColor?: string | null;
|
|
91
|
-
trackedChangeStory?: StoryLocator | null;
|
|
92
|
-
trackedChangeStoryKind?: string | null;
|
|
93
|
-
trackedChangeStoryLabel?: string;
|
|
94
|
-
trackedChangeAnchorKey?: string | null;
|
|
95
|
-
trackedChangeCanonicalId?: string | null;
|
|
96
|
-
trackedChangePositionAliases?: string[];
|
|
97
|
-
deletedText?: string | null;
|
|
98
|
-
trackedChangeLabel?: string | null;
|
|
99
|
-
trackedChangeDetailLines?: TrackedChangeDetailLine[] | null;
|
|
100
|
-
trackedChangeImagePreview?: TrackChangeImagePreview | null;
|
|
101
|
-
customAttributes?: readonly TrackChangeCustomAttribute[] | null;
|
|
102
|
-
resolvedTime?: number | null;
|
|
103
|
-
resolvedById?: string | null;
|
|
104
|
-
resolvedByEmail?: string | null;
|
|
105
|
-
resolvedByName?: string | null;
|
|
106
|
-
trackedChangeDecision?: TrackedChangeDecision | null;
|
|
107
|
-
};
|
|
108
32
|
type ResolveCommentParams = {
|
|
109
33
|
id?: string | null;
|
|
110
34
|
email?: string | null;
|
|
@@ -188,7 +112,7 @@ export default function useComment(params: UseCommentParams): {
|
|
|
188
112
|
trackedChangeDisplayType: string | null;
|
|
189
113
|
semanticColorKey: string | null;
|
|
190
114
|
semanticColor: string | null;
|
|
191
|
-
trackedChangeStory: StoryLocator | null;
|
|
115
|
+
trackedChangeStory: import('../../public/index.js').StoryLocator | null;
|
|
192
116
|
trackedChangeStoryKind: string | null;
|
|
193
117
|
trackedChangeStoryLabel: string;
|
|
194
118
|
trackedChangeAnchorKey: string | null;
|
|
@@ -202,13 +126,11 @@ export default function useComment(params: UseCommentParams): {
|
|
|
202
126
|
}[] | null;
|
|
203
127
|
trackedChangeImagePreview: {
|
|
204
128
|
src: string;
|
|
205
|
-
contentType
|
|
206
|
-
role
|
|
207
|
-
partUri?: string | undefined;
|
|
208
|
-
relationshipId?: string | undefined;
|
|
129
|
+
contentType?: string | undefined;
|
|
130
|
+
role?: string | undefined;
|
|
209
131
|
width?: number | undefined;
|
|
210
132
|
height?: number | undefined;
|
|
211
|
-
alt
|
|
133
|
+
alt: string;
|
|
212
134
|
} | null;
|
|
213
135
|
customAttributes: readonly {
|
|
214
136
|
name: string;
|
|
@@ -227,7 +149,7 @@ export default function useComment(params: UseCommentParams): {
|
|
|
227
149
|
docxCommentJSON: {} | null;
|
|
228
150
|
origin: "word" | "google-docs" | "unknown" | undefined;
|
|
229
151
|
threadingMethod: "commentsExtended" | "range-based" | "mixed" | undefined;
|
|
230
|
-
threadingStyleOverride: CommentThreadingStyle | undefined;
|
|
152
|
+
threadingStyleOverride: import('../../../../shared/common/comments-types.js').CommentThreadingStyle | undefined;
|
|
231
153
|
threadingParentCommentId: string | null | undefined;
|
|
232
154
|
originalXmlStructure: {
|
|
233
155
|
hasCommentsExtended: boolean;
|
|
@@ -279,7 +201,7 @@ export default function useComment(params: UseCommentParams): {
|
|
|
279
201
|
trackedChangeDisplayType: string | null;
|
|
280
202
|
semanticColorKey: string | null;
|
|
281
203
|
semanticColor: string | null;
|
|
282
|
-
trackedChangeStory: StoryLocator | null;
|
|
204
|
+
trackedChangeStory: import('../../public/index.js').StoryLocator | null;
|
|
283
205
|
trackedChangeStoryKind: string | null;
|
|
284
206
|
trackedChangeStoryLabel: string;
|
|
285
207
|
trackedChangeAnchorKey: string | null;
|
|
@@ -293,13 +215,11 @@ export default function useComment(params: UseCommentParams): {
|
|
|
293
215
|
}[] | null;
|
|
294
216
|
trackedChangeImagePreview: {
|
|
295
217
|
src: string;
|
|
296
|
-
contentType
|
|
297
|
-
role
|
|
298
|
-
partUri?: string | undefined;
|
|
299
|
-
relationshipId?: string | undefined;
|
|
218
|
+
contentType?: string | undefined;
|
|
219
|
+
role?: string | undefined;
|
|
300
220
|
width?: number | undefined;
|
|
301
221
|
height?: number | undefined;
|
|
302
|
-
alt
|
|
222
|
+
alt: string;
|
|
303
223
|
} | null;
|
|
304
224
|
customAttributes: readonly {
|
|
305
225
|
name: string;
|
|
@@ -314,7 +234,7 @@ export default function useComment(params: UseCommentParams): {
|
|
|
314
234
|
resolvedByName: string | null | undefined;
|
|
315
235
|
origin: "word" | "google-docs" | "unknown" | undefined;
|
|
316
236
|
threadingMethod: "commentsExtended" | "range-based" | "mixed" | undefined;
|
|
317
|
-
threadingStyleOverride: CommentThreadingStyle | undefined;
|
|
237
|
+
threadingStyleOverride: import('../../../../shared/common/comments-types.js').CommentThreadingStyle | undefined;
|
|
318
238
|
threadingParentCommentId: string | null | undefined;
|
|
319
239
|
originalXmlStructure: {
|
|
320
240
|
hasCommentsExtended: boolean;
|
|
@@ -1,26 +1,47 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { EventEmitter } from '../../core/EventEmitter.js';
|
|
3
3
|
import { Document, Modules } from '../../core/types/index.js';
|
|
4
|
-
import { WhiteboardPageSize } from '../../core/whiteboard/Whiteboard.js';
|
|
4
|
+
import { Whiteboard, WhiteboardEventMap, WhiteboardPageSize } from '../../core/whiteboard/Whiteboard.js';
|
|
5
5
|
import { WhiteboardPage } from '../../core/whiteboard/WhiteboardPage.js';
|
|
6
6
|
import { PdfPageRenderedPayload } from '../PdfViewer/pdf-viewer-types.js';
|
|
7
7
|
import { WhiteboardPageOffset } from './whiteboard-types.js';
|
|
8
8
|
type WhiteboardDocument = Pick<Document, 'id' | 'type'>;
|
|
9
|
-
type WhiteboardPageReadyPayload = Pick<PdfPageRenderedPayload, 'pageIndex' | 'width' | 'height'
|
|
10
|
-
|
|
9
|
+
type WhiteboardPageReadyPayload = Pick<PdfPageRenderedPayload, 'pageIndex' | 'width' | 'height'> & Partial<Pick<PdfPageRenderedPayload, 'originalWidth' | 'originalHeight'>>;
|
|
10
|
+
type Bounds = Pick<DOMRect, 'top' | 'left'>;
|
|
11
|
+
type WhiteboardLayerElement = {
|
|
12
|
+
getBoundingClientRect(): Bounds;
|
|
13
|
+
};
|
|
14
|
+
type WhiteboardPageSource = Pick<WhiteboardPage, 'pageIndex' | 'size' | 'setSize'>;
|
|
15
|
+
type WhiteboardSource = Pick<Whiteboard, 'on' | 'off' | 'setPageSize'> & {
|
|
16
|
+
getPage(...args: Parameters<Whiteboard['getPage']>): WhiteboardPageSource | undefined;
|
|
17
|
+
getPages(): WhiteboardPageSource[];
|
|
18
|
+
};
|
|
19
|
+
type WhiteboardSourcePage<Board extends WhiteboardSource> = ReturnType<Board['getPages']>[number];
|
|
20
|
+
type WhiteboardHostEvents<Board extends WhiteboardSource> = {
|
|
21
|
+
'whiteboard:ready': [{
|
|
22
|
+
whiteboard: Board;
|
|
23
|
+
}];
|
|
24
|
+
'whiteboard:change': WhiteboardEventMap['change'];
|
|
25
|
+
'whiteboard:enabled': WhiteboardEventMap['enabled'];
|
|
26
|
+
'whiteboard:tool': WhiteboardEventMap['tool'];
|
|
27
|
+
};
|
|
28
|
+
export type UseWhiteboardOptions<Board extends WhiteboardSource> = {
|
|
11
29
|
proxy: {
|
|
12
|
-
$superdoc: Pick<
|
|
30
|
+
$superdoc: Pick<EventEmitter<WhiteboardHostEvents<Board>>, 'emit'> & {
|
|
31
|
+
whiteboard?: Board | null;
|
|
32
|
+
};
|
|
13
33
|
};
|
|
14
|
-
layers: Ref<
|
|
34
|
+
layers: Ref<WhiteboardLayerElement | null>;
|
|
15
35
|
documents: Ref<WhiteboardDocument[]>;
|
|
16
36
|
modules: Modules;
|
|
17
37
|
};
|
|
18
|
-
|
|
19
|
-
|
|
38
|
+
type Options<Board extends WhiteboardSource> = UseWhiteboardOptions<Board>;
|
|
39
|
+
export declare const useWhiteboard: <B extends WhiteboardSource>({ proxy, layers, documents, modules }: Options<B>) => {
|
|
40
|
+
whiteboard: B | null | undefined;
|
|
20
41
|
whiteboardModuleConfig: import('vue').ComputedRef<{
|
|
21
42
|
enabled?: boolean;
|
|
22
43
|
} | null>;
|
|
23
|
-
whiteboardPages: import('vue').ShallowRef<
|
|
44
|
+
whiteboardPages: import('vue').ShallowRef<WhiteboardSourcePage<B>[], WhiteboardSourcePage<B>[]>;
|
|
24
45
|
whiteboardPageSizes: Record<number, WhiteboardPageSize>;
|
|
25
46
|
whiteboardPageOffsets: Record<number, WhiteboardPageOffset>;
|
|
26
47
|
whiteboardEnabled: Ref<boolean, boolean>;
|