superdoc 2.30.0-next.4 → 2.30.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{create-super-doc-ui-CbEDXtpm.es.js → create-super-doc-ui-Cq8trPVC.es.js} +494 -107
- package/dist/chunks/{create-super-doc-ui--kQBNTyt.cjs → create-super-doc-ui-FH5GSHph.cjs} +492 -105
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- 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 +25 -7
- 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/index.d.ts +7 -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 +1 -0
- package/dist/layout-engine/contracts/src/table-cell-vector-overlay.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +2 -0
- 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/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/composables/use-comment-sidebar.d.ts +6 -0
- package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +10 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +4 -0
- package/dist/superdoc/src/core/types/index.d.ts +39 -0
- package/dist/superdoc/src/public/index.d.cts +4 -0
- package/dist/superdoc/src/public/index.d.ts +1 -1
- package/dist/superdoc/src/public/ui/format-painter-paragraph.d.ts +7 -0
- package/dist/superdoc/src/public/ui/format-painter-state.d.ts +5 -9
- package/dist/superdoc/src/public/ui/inline-values.d.ts +1 -1
- package/dist/superdoc/src/public/ui/reasons.d.ts +1 -0
- package/dist/superdoc/src/public/ui/selection-targets.d.ts +2 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +21 -9
- package/dist/superdoc/src/stores/helpers/review-presentation.d.ts +1 -0
- package/dist/superdoc.cjs +239 -60
- package/dist/superdoc.es.js +239 -60
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +38 -38
- package/package.json +2 -2
|
@@ -289,6 +289,7 @@ import type { ToolbarItemId as __Cjs_ToolbarItemId } from './index.js' with { "r
|
|
|
289
289
|
import type { ToolbarOptionalItemId as __Cjs_ToolbarOptionalItemId } from './index.js' with { "resolution-mode": "import" };
|
|
290
290
|
import type { ToolbarRegion as __Cjs_ToolbarRegion } from './index.js' with { "resolution-mode": "import" };
|
|
291
291
|
import type { ToolbarStringId as __Cjs_ToolbarStringId } from './index.js' with { "resolution-mode": "import" };
|
|
292
|
+
import type { TouchInteractionConfig as __Cjs_TouchInteractionConfig } from './index.js' with { "resolution-mode": "import" };
|
|
292
293
|
import type { TrackChangeAuthor as __Cjs_TrackChangeAuthor } from './index.js' with { "resolution-mode": "import" };
|
|
293
294
|
import type { TrackChangeHighlightColors as __Cjs_TrackChangeHighlightColors } from './index.js' with { "resolution-mode": "import" };
|
|
294
295
|
import type { TrackChangesAuthorColorsConfig as __Cjs_TrackChangesAuthorColorsConfig } from './index.js' with { "resolution-mode": "import" };
|
|
@@ -311,6 +312,7 @@ import type { ViewingOptions as __Cjs_ViewingOptions } from './index.js' with {
|
|
|
311
312
|
import type { ViewingTrackedChangesMode as __Cjs_ViewingTrackedChangesMode } from './index.js' with { "resolution-mode": "import" };
|
|
312
313
|
import type { ViewingVisibilityConfig as __Cjs_ViewingVisibilityConfig } from './index.js' with { "resolution-mode": "import" };
|
|
313
314
|
import type { ViewOptions as __Cjs_ViewOptions } from './index.js' with { "resolution-mode": "import" };
|
|
315
|
+
import type { WritingAssistanceConfig as __Cjs_WritingAssistanceConfig } from './index.js' with { "resolution-mode": "import" };
|
|
314
316
|
export type { __Cjs_AwarenessState as AwarenessState };
|
|
315
317
|
export type { __Cjs_AwarenessUser as AwarenessUser };
|
|
316
318
|
export declare const BlankDOCX: typeof import('./index.js', { with: { "resolution-mode": "import" } }).BlankDOCX;
|
|
@@ -614,6 +616,7 @@ export type { __Cjs_ToolbarItemId as ToolbarItemId };
|
|
|
614
616
|
export type { __Cjs_ToolbarOptionalItemId as ToolbarOptionalItemId };
|
|
615
617
|
export type { __Cjs_ToolbarRegion as ToolbarRegion };
|
|
616
618
|
export type { __Cjs_ToolbarStringId as ToolbarStringId };
|
|
619
|
+
export type { __Cjs_TouchInteractionConfig as TouchInteractionConfig };
|
|
617
620
|
export type { __Cjs_TrackChangeAuthor as TrackChangeAuthor };
|
|
618
621
|
export type { __Cjs_TrackChangeHighlightColors as TrackChangeHighlightColors };
|
|
619
622
|
export type { __Cjs_TrackChangesAuthorColorsConfig as TrackChangesAuthorColorsConfig };
|
|
@@ -636,3 +639,4 @@ export type { __Cjs_ViewingOptions as ViewingOptions };
|
|
|
636
639
|
export type { __Cjs_ViewingTrackedChangesMode as ViewingTrackedChangesMode };
|
|
637
640
|
export type { __Cjs_ViewingVisibilityConfig as ViewingVisibilityConfig };
|
|
638
641
|
export type { __Cjs_ViewOptions as ViewOptions };
|
|
642
|
+
export type { __Cjs_WritingAssistanceConfig as WritingAssistanceConfig };
|
|
@@ -115,7 +115,7 @@ export type { SuperDocLayoutEngineOptions as LayoutEngineOptions } from '../core
|
|
|
115
115
|
export type { FlowBlock, FlowMode, Layout, Fragment as LayoutFragment, Page as LayoutPage } from '../../../layout-engine/contracts/src/index.js';
|
|
116
116
|
export type { LayoutMetrics } from '../../../layout-engine/layout-bridge/src/index.js';
|
|
117
117
|
export type { LayoutMode } from '../../../layout-engine/painters/dom/src/index.js';
|
|
118
|
-
export type { CommentInteractionConfig, CommentsConfig, CommentsLayout, CommentsResponsiveConfig, TrackChangesInteractionConfig, } from '../core/types/index.js';
|
|
118
|
+
export type { CommentInteractionConfig, CommentsConfig, CommentsLayout, CommentsResponsiveConfig, TouchInteractionConfig, TrackChangesInteractionConfig, WritingAssistanceConfig, } from '../core/types/index.js';
|
|
119
119
|
export type { TrackChangeHighlightColors } from '../core/types/index.js';
|
|
120
120
|
export type { ContentControlsConfig } from '../core/types/index.js';
|
|
121
121
|
export type { RulerConfig } from '../core/types/index.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ParagraphBatchOperation, SDParagraphProps, SDTabStop } from '../../../../document-api/src/index.js';
|
|
2
|
+
export type ParagraphPaintOperation = ParagraphBatchOperation;
|
|
3
|
+
type ParagraphPaintProperties = Omit<SDParagraphProps, 'tabs'> & {
|
|
4
|
+
tabs?: Partial<SDTabStop>[];
|
|
5
|
+
};
|
|
6
|
+
export declare function captureParagraphPaintOperations(props: ParagraphPaintProperties, supports?: (operationId: string) => boolean): ParagraphPaintOperation[];
|
|
7
|
+
export {};
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
+
import { SDRunProps } from '../../../../document-api/src/index.js';
|
|
2
|
+
import { ParagraphPaintOperation } from './format-painter-paragraph.js';
|
|
1
3
|
export type FormatPainterMode = 'idle' | 'armed' | 'persistent';
|
|
2
4
|
export interface FormatPainterParagraphSnapshot {
|
|
3
5
|
styleId: string | null;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
left?: number;
|
|
8
|
-
right?: number;
|
|
9
|
-
firstLine?: number;
|
|
10
|
-
hanging?: number;
|
|
11
|
-
} | null;
|
|
12
|
-
markRunProps: unknown | null;
|
|
6
|
+
inheritedFontKeys?: Array<'fontFamily' | 'fontSize'>;
|
|
7
|
+
operations: ParagraphPaintOperation[];
|
|
8
|
+
markRunProps: SDRunProps | null;
|
|
13
9
|
numbering: {
|
|
14
10
|
numId: number;
|
|
15
11
|
level?: number;
|
|
@@ -5,7 +5,7 @@ export type EffectiveInlineUniformityState = {
|
|
|
5
5
|
state: 'uniform';
|
|
6
6
|
value: string;
|
|
7
7
|
} | {
|
|
8
|
-
state: 'mixed' | 'unresolvable';
|
|
8
|
+
state: 'mixed' | 'unresolvable' | 'absent';
|
|
9
9
|
};
|
|
10
10
|
export declare function readEffectiveInlineUniformityStates(raw: unknown): Record<string, EffectiveInlineUniformityState> | null;
|
|
11
11
|
export type SelectionTextSegment = {
|
|
@@ -94,6 +94,7 @@ export declare const SUPERDOC_UI_REASONS: {
|
|
|
94
94
|
* are never gated by this reason.
|
|
95
95
|
*/
|
|
96
96
|
readonly contentControlLocked: "content-control-locked";
|
|
97
|
+
readonly deletedTextFormattingUnsupported: "deleted-text-formatting-unsupported";
|
|
97
98
|
/**
|
|
98
99
|
* The current user is not allowed to run this command under the product
|
|
99
100
|
* permissionResolver / role matrix (SD-3845). Distinct from document
|
|
@@ -43,3 +43,5 @@ export type TextSelectionTarget = SelectionTarget & {
|
|
|
43
43
|
export declare function capturedTableCellTarget(value: unknown): TextSelectionTarget | null;
|
|
44
44
|
export declare function selectionTargetForRestore(capture: SelectionCapture): SelectionTarget | null;
|
|
45
45
|
export declare function resolveInlineSelectionTarget(selection: SelectionSlice): SelectionTarget | null;
|
|
46
|
+
export declare function selectionHasOnlyDeletedText(selection: SelectionSlice): boolean;
|
|
47
|
+
export declare function selectionTouchesDeletedText(selection: SelectionSlice): boolean;
|
|
@@ -81,8 +81,10 @@ type TrackedChangeIdentityCandidatesInput = {
|
|
|
81
81
|
positionAliases?: readonly string[];
|
|
82
82
|
};
|
|
83
83
|
type TrackedChangeBatchIdentityIndex = {
|
|
84
|
+
inUse: boolean;
|
|
84
85
|
add: (comment: CommentModel) => void;
|
|
85
86
|
aliasesFor: (comment: CommentModel) => string[];
|
|
87
|
+
isCurrent: () => boolean;
|
|
86
88
|
work: () => Record<string, number>;
|
|
87
89
|
candidates: (input?: TrackedChangeIdentityCandidatesInput) => Set<CommentModel>;
|
|
88
90
|
};
|
|
@@ -132,6 +134,7 @@ type ReconcileTrackedChangesInput = {
|
|
|
132
134
|
liveIds?: Set<string> | null;
|
|
133
135
|
liveAnchorKeys?: Set<string> | null;
|
|
134
136
|
hydrationGeneration?: unknown;
|
|
137
|
+
preserveDraft?: boolean;
|
|
135
138
|
};
|
|
136
139
|
type ApplyReviewWindowInput = {
|
|
137
140
|
superdoc?: CommentsStoreHost | null;
|
|
@@ -6764,7 +6767,9 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
6764
6767
|
updateIdentityValues: (updates?: CommentIdentity) => void;
|
|
6765
6768
|
};
|
|
6766
6769
|
};
|
|
6767
|
-
addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges, }: AddCommentInput
|
|
6770
|
+
addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges, preserveDraft, }: AddCommentInput & {
|
|
6771
|
+
preserveDraft?: boolean;
|
|
6772
|
+
}) => {
|
|
6768
6773
|
ok: boolean;
|
|
6769
6774
|
reason: string;
|
|
6770
6775
|
} | Promise<V2CommentMutationOutcome | {
|
|
@@ -7416,11 +7421,12 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
7416
7421
|
retainedTrackedChangeIds?: Iterable<unknown> | null;
|
|
7417
7422
|
}) => void;
|
|
7418
7423
|
clearEditorCommentPositions: () => void;
|
|
7419
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
7424
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, preserveDraft, }: {
|
|
7420
7425
|
superdoc: CommentsStoreHost | null | undefined;
|
|
7421
7426
|
params: V2TrackedChangeCommentParams;
|
|
7422
7427
|
broadcastChanges?: boolean;
|
|
7423
7428
|
trackedChangeIdentityIndex?: TrackedChangeBatchIdentityIndex | null;
|
|
7429
|
+
preserveDraft?: boolean;
|
|
7424
7430
|
}) => void;
|
|
7425
7431
|
syncResolvedCommentsWithDocument: () => number;
|
|
7426
7432
|
setActiveFloatingCommentInstance: (instanceId?: unknown) => void;
|
|
@@ -7913,7 +7919,7 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
7913
7919
|
allResolved?: undefined;
|
|
7914
7920
|
removedRows?: undefined;
|
|
7915
7921
|
}>;
|
|
7916
|
-
reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, preparedPresentation, previousPreparedPresentation, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: ReconcileTrackedChangesInput) => {
|
|
7922
|
+
reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, preserveDraft, preparedPresentation, previousPreparedPresentation, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: ReconcileTrackedChangesInput) => {
|
|
7917
7923
|
liveIds: Set<string>;
|
|
7918
7924
|
liveAnchorKeys: Set<string>;
|
|
7919
7925
|
appliedCount: number;
|
|
@@ -14515,7 +14521,9 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
14515
14521
|
updateIdentityValues: (updates?: CommentIdentity) => void;
|
|
14516
14522
|
};
|
|
14517
14523
|
};
|
|
14518
|
-
addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges, }: AddCommentInput
|
|
14524
|
+
addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges, preserveDraft, }: AddCommentInput & {
|
|
14525
|
+
preserveDraft?: boolean;
|
|
14526
|
+
}) => {
|
|
14519
14527
|
ok: boolean;
|
|
14520
14528
|
reason: string;
|
|
14521
14529
|
} | Promise<V2CommentMutationOutcome | {
|
|
@@ -15167,11 +15175,12 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
15167
15175
|
retainedTrackedChangeIds?: Iterable<unknown> | null;
|
|
15168
15176
|
}) => void;
|
|
15169
15177
|
clearEditorCommentPositions: () => void;
|
|
15170
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
15178
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, preserveDraft, }: {
|
|
15171
15179
|
superdoc: CommentsStoreHost | null | undefined;
|
|
15172
15180
|
params: V2TrackedChangeCommentParams;
|
|
15173
15181
|
broadcastChanges?: boolean;
|
|
15174
15182
|
trackedChangeIdentityIndex?: TrackedChangeBatchIdentityIndex | null;
|
|
15183
|
+
preserveDraft?: boolean;
|
|
15175
15184
|
}) => void;
|
|
15176
15185
|
syncResolvedCommentsWithDocument: () => number;
|
|
15177
15186
|
setActiveFloatingCommentInstance: (instanceId?: unknown) => void;
|
|
@@ -15664,7 +15673,7 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
15664
15673
|
allResolved?: undefined;
|
|
15665
15674
|
removedRows?: undefined;
|
|
15666
15675
|
}>;
|
|
15667
|
-
reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, preparedPresentation, previousPreparedPresentation, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: ReconcileTrackedChangesInput) => {
|
|
15676
|
+
reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, preserveDraft, preparedPresentation, previousPreparedPresentation, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: ReconcileTrackedChangesInput) => {
|
|
15668
15677
|
liveIds: Set<string>;
|
|
15669
15678
|
liveAnchorKeys: Set<string>;
|
|
15670
15679
|
appliedCount: number;
|
|
@@ -22266,7 +22275,9 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
22266
22275
|
updateIdentityValues: (updates?: CommentIdentity) => void;
|
|
22267
22276
|
};
|
|
22268
22277
|
};
|
|
22269
|
-
addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges, }: AddCommentInput
|
|
22278
|
+
addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges, preserveDraft, }: AddCommentInput & {
|
|
22279
|
+
preserveDraft?: boolean;
|
|
22280
|
+
}) => {
|
|
22270
22281
|
ok: boolean;
|
|
22271
22282
|
reason: string;
|
|
22272
22283
|
} | Promise<V2CommentMutationOutcome | {
|
|
@@ -22918,11 +22929,12 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
22918
22929
|
retainedTrackedChangeIds?: Iterable<unknown> | null;
|
|
22919
22930
|
}) => void;
|
|
22920
22931
|
clearEditorCommentPositions: () => void;
|
|
22921
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
22932
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, preserveDraft, }: {
|
|
22922
22933
|
superdoc: CommentsStoreHost | null | undefined;
|
|
22923
22934
|
params: V2TrackedChangeCommentParams;
|
|
22924
22935
|
broadcastChanges?: boolean;
|
|
22925
22936
|
trackedChangeIdentityIndex?: TrackedChangeBatchIdentityIndex | null;
|
|
22937
|
+
preserveDraft?: boolean;
|
|
22926
22938
|
}) => void;
|
|
22927
22939
|
syncResolvedCommentsWithDocument: () => number;
|
|
22928
22940
|
setActiveFloatingCommentInstance: (instanceId?: unknown) => void;
|
|
@@ -23415,7 +23427,7 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
23415
23427
|
allResolved?: undefined;
|
|
23416
23428
|
removedRows?: undefined;
|
|
23417
23429
|
}>;
|
|
23418
|
-
reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, preparedPresentation, previousPreparedPresentation, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: ReconcileTrackedChangesInput) => {
|
|
23430
|
+
reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, preserveDraft, preparedPresentation, previousPreparedPresentation, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: ReconcileTrackedChangesInput) => {
|
|
23419
23431
|
liveIds: Set<string>;
|
|
23420
23432
|
liveAnchorKeys: Set<string>;
|
|
23421
23433
|
appliedCount: number;
|