wordinweb 0.2.1 → 0.2.3
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/{chunk-XGTWJMDG.js → chunk-OIN65MGS.js} +271 -134
- package/dist/chunk-OIN65MGS.js.map +1 -0
- package/dist/collab.d.ts +35 -19
- package/dist/collab.js +231 -50
- package/dist/collab.js.map +1 -1
- package/dist/{index-C2J9egkh.d.ts → index-CGp6gVjn.d.ts} +29 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-XGTWJMDG.js.map +0 -1
|
@@ -2301,6 +2301,10 @@ type EditorIntent = {
|
|
|
2301
2301
|
};
|
|
2302
2302
|
newBlockId: number;
|
|
2303
2303
|
newRunId: number;
|
|
2304
|
+
suggest?: {
|
|
2305
|
+
author: string;
|
|
2306
|
+
date: string;
|
|
2307
|
+
};
|
|
2304
2308
|
} | {
|
|
2305
2309
|
kind: "formatRun";
|
|
2306
2310
|
blockId: number;
|
|
@@ -2344,6 +2348,16 @@ type EditorIntent = {
|
|
|
2344
2348
|
author: string;
|
|
2345
2349
|
date: string;
|
|
2346
2350
|
};
|
|
2351
|
+
} | {
|
|
2352
|
+
kind: "acceptRevision";
|
|
2353
|
+
index: number;
|
|
2354
|
+
} | {
|
|
2355
|
+
kind: "rejectRevision";
|
|
2356
|
+
index: number;
|
|
2357
|
+
} | {
|
|
2358
|
+
kind: "acceptAllRevisions";
|
|
2359
|
+
} | {
|
|
2360
|
+
kind: "rejectAllRevisions";
|
|
2347
2361
|
} | {
|
|
2348
2362
|
kind: "setImageWrap";
|
|
2349
2363
|
runId: number;
|
|
@@ -2567,7 +2581,7 @@ interface IntentBase {
|
|
|
2567
2581
|
* revisions and/or mark paragraph glyphs (split "ins" marks, merge "del"
|
|
2568
2582
|
* suggestions) — the SUGGESTING counterparts of deleteText/mergeParagraph.
|
|
2569
2583
|
* Nothing is removed: Word keeps both sides until accept/reject (the
|
|
2570
|
-
* already-collab-wired
|
|
2584
|
+
* already-collab-wired accept/reject revision intents).
|
|
2571
2585
|
* Author/date travel IN the intent (doc 05 rule a: nondeterministic values
|
|
2572
2586
|
* are generated once by the originator); revision w:ids are scan-derived
|
|
2573
2587
|
* from identical tree state on every replica. Positional offsets were
|
|
@@ -2623,6 +2637,11 @@ interface SplitParagraphIntent extends IntentBase {
|
|
|
2623
2637
|
at: Position;
|
|
2624
2638
|
newBlockId: StableId;
|
|
2625
2639
|
newRunId: StableId;
|
|
2640
|
+
/** With metadata, Enter remains a tracked paragraph-break suggestion. */
|
|
2641
|
+
suggest?: {
|
|
2642
|
+
author: string;
|
|
2643
|
+
date: string;
|
|
2644
|
+
};
|
|
2626
2645
|
}
|
|
2627
2646
|
/**
|
|
2628
2647
|
* Character-format an entire run (bold/italic/underline/…). Whole-run only:
|
|
@@ -2896,7 +2915,7 @@ interface InsertBookmarkIntent extends IntentBase {
|
|
|
2896
2915
|
runId: StableId;
|
|
2897
2916
|
name: string;
|
|
2898
2917
|
}
|
|
2899
|
-
type Intent = InsertTextIntent | DeleteTextIntent | SplitParagraphIntent | FormatRunIntent | FormatParagraphIntent | SetListTypeIntent | FormatRangeIntent | TableOpIntent | MergeParagraphIntent | CommentRunIntent | PasteBlocksIntent | InsertImageIntent | SuggestRevisionIntent | InsertBreakIntent | InsertMathIntent | InsertShapeIntent | ReplyCommentIntent | AdjustIndentIntent | SetSpacingIntent | InsertPageFieldIntent | SetLinkIntent | InsertFootnoteIntent | SetDropCapIntent | SetDividerIntent | InsertBookmarkIntent | InsertBlankPageIntent | InsertSectionBreakIntent | InsertCrossRefIntent | InsertCoverPageIntent | SetPageLayoutIntent | SetListLevelIntent | InsertWordArtIntent | InsertChartIntent | InsertSmartArtIntent | SetLineNumberingIntent | InsertDateTimeFieldIntent | InsertFieldIntent | SetDrawingRotationIntent | SetDrawingFillIntent | SetChartDataIntent | SetSmartArtNodeTextIntent | SetDrawingWordArtTextIntent | SetDrawingLineStyleIntent | SetImageAltTextIntent | RemoveLinkIntent | SetImageWrapIntent | SetDrawingOrderIntent | SetSmartArtDataIntent | SetSmartArtFillIntent | SetSmartArtTextFormatIntent | SetFloatingPagePositionIntent | ResizeDrawingIntent | ResizeTableColumnIntent | ResizeTableRowIntent | MoveTableIntent | RemoveDrawingIntent | SetMathLinearIntent | DeleteMathIntent | MoveMathIntent | EnsureHeaderFooterIntent | DeleteCommentIntent | InsertBookmarkRangeIntent | ToggleCheckboxIntent | AcceptRevisionIntent | RejectRevisionIntent | AcceptAllRevisionsIntent | InsertTableIntent;
|
|
2918
|
+
type Intent = InsertTextIntent | DeleteTextIntent | SplitParagraphIntent | FormatRunIntent | FormatParagraphIntent | SetListTypeIntent | FormatRangeIntent | TableOpIntent | MergeParagraphIntent | CommentRunIntent | PasteBlocksIntent | InsertImageIntent | SuggestRevisionIntent | InsertBreakIntent | InsertMathIntent | InsertShapeIntent | ReplyCommentIntent | AdjustIndentIntent | SetSpacingIntent | InsertPageFieldIntent | SetLinkIntent | InsertFootnoteIntent | SetDropCapIntent | SetDividerIntent | InsertBookmarkIntent | InsertBlankPageIntent | InsertSectionBreakIntent | InsertCrossRefIntent | InsertCoverPageIntent | SetPageLayoutIntent | SetListLevelIntent | InsertWordArtIntent | InsertChartIntent | InsertSmartArtIntent | SetLineNumberingIntent | InsertDateTimeFieldIntent | InsertFieldIntent | SetDrawingRotationIntent | SetDrawingFillIntent | SetChartDataIntent | SetSmartArtNodeTextIntent | SetDrawingWordArtTextIntent | SetDrawingLineStyleIntent | SetImageAltTextIntent | RemoveLinkIntent | SetImageWrapIntent | SetDrawingOrderIntent | SetSmartArtDataIntent | SetSmartArtFillIntent | SetSmartArtTextFormatIntent | SetFloatingPagePositionIntent | ResizeDrawingIntent | ResizeTableColumnIntent | ResizeTableRowIntent | MoveTableIntent | RemoveDrawingIntent | SetMathLinearIntent | DeleteMathIntent | MoveMathIntent | EnsureHeaderFooterIntent | DeleteCommentIntent | InsertBookmarkRangeIntent | ToggleCheckboxIntent | AcceptRevisionIntent | RejectRevisionIntent | AcceptAllRevisionsIntent | RejectAllRevisionsIntent | InsertTableIntent;
|
|
2900
2919
|
/** Insert a blank page at the end of a run. */
|
|
2901
2920
|
interface InsertBlankPageIntent extends IntentBase {
|
|
2902
2921
|
kind: "insertBlankPage";
|
|
@@ -3220,6 +3239,10 @@ interface RejectRevisionIntent extends IntentBase {
|
|
|
3220
3239
|
interface AcceptAllRevisionsIntent extends IntentBase {
|
|
3221
3240
|
kind: "acceptAllRevisions";
|
|
3222
3241
|
}
|
|
3242
|
+
/** Reject every tracked change in the document. */
|
|
3243
|
+
interface RejectAllRevisionsIntent extends IntentBase {
|
|
3244
|
+
kind: "rejectAllRevisions";
|
|
3245
|
+
}
|
|
3223
3246
|
/** Insert a rows×cols table after the paragraph containing the anchor run. */
|
|
3224
3247
|
interface InsertTableIntent extends IntentBase {
|
|
3225
3248
|
kind: "insertTable";
|
|
@@ -4095,20 +4118,15 @@ interface DocxViewApi {
|
|
|
4095
4118
|
*/
|
|
4096
4119
|
setSuggesting(on: boolean, author?: string): void;
|
|
4097
4120
|
isSuggesting(): boolean;
|
|
4098
|
-
/** Accept the tracked change at the caret (keep insertion / apply deletion).
|
|
4099
|
-
* Refuses (false, no mutation) in a live collab session — resolving a
|
|
4100
|
-
* suggestion emits no intent yet, so it would fork the room. */
|
|
4121
|
+
/** Accept the tracked change at the caret (keep insertion / apply deletion). */
|
|
4101
4122
|
acceptRevisionAtCaret(): boolean;
|
|
4102
|
-
/** Reject the tracked change at the caret (drop insertion / restore
|
|
4103
|
-
* deletion). Refuses in a live collab session, like accept. */
|
|
4123
|
+
/** Reject the tracked change at the caret (drop insertion / restore deletion). */
|
|
4104
4124
|
rejectRevisionAtCaret(): boolean;
|
|
4105
4125
|
/** How many tracked changes (suggestions) the document currently holds. */
|
|
4106
4126
|
revisionCount(): number;
|
|
4107
|
-
/** Accept every tracked change (one undo step). Returns how many applied.
|
|
4108
|
-
* Returns 0 without mutating in a live collab session, like accept. */
|
|
4127
|
+
/** Accept every tracked change (one undo step). Returns how many applied. */
|
|
4109
4128
|
acceptAllRevisions(): number;
|
|
4110
|
-
/** Reject every tracked change (one undo step). Returns how many applied.
|
|
4111
|
-
* Returns 0 without mutating in a live collab session, like accept. */
|
|
4129
|
+
/** Reject every tracked change (one undo step). Returns how many applied. */
|
|
4112
4130
|
rejectAllRevisions(): number;
|
|
4113
4131
|
/** Current caret as stable-id addresses (collab), or null. The encoding
|
|
4114
4132
|
* survives a reconciliation reload, so it can be captured from a view
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export { i as COLLAB_IMAGE_EXTS, j as CoverPageContent, D as DocxDocument, k as DocxToolbar, l as DocxToolbarProps, n as DocxView, d as DocxViewApi, o as DocxViewProps, p as DrawingTool, q as INSERT_COMMANDS, r as ImageInsertResult, t as InsertCommandSpec, u as LineNumberingPatch, v as PageLayoutPatch, w as ParagraphAlignment, x as RunFormatPatch, y as ScreenshotInsertResult, z as SelectionFormat, A as ShapePreset, T as ToolbarFeature, B as ToolbarMenuSelect, E as ToolbarMenuSelectOption, F as ToolbarMenuSelectProps, c as ToolbarMode, G as layoutDocument, H as printPages, J as renderToDom } from './index-
|
|
2
|
+
export { i as COLLAB_IMAGE_EXTS, j as CoverPageContent, D as DocxDocument, k as DocxToolbar, l as DocxToolbarProps, n as DocxView, d as DocxViewApi, o as DocxViewProps, p as DrawingTool, q as INSERT_COMMANDS, r as ImageInsertResult, t as InsertCommandSpec, u as LineNumberingPatch, v as PageLayoutPatch, w as ParagraphAlignment, x as RunFormatPatch, y as ScreenshotInsertResult, z as SelectionFormat, A as ShapePreset, T as ToolbarFeature, B as ToolbarMenuSelect, E as ToolbarMenuSelectOption, F as ToolbarMenuSelectProps, c as ToolbarMode, G as layoutDocument, H as printPages, J as renderToDom } from './index-CGp6gVjn.js';
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wordinweb",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "React component for high-fidelity DOCX viewing and editing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/react": "^18.3.0",
|
|
54
54
|
"@types/react-dom": "^18.3.0",
|
|
55
55
|
"@wordinweb/core": "0.1.0",
|
|
56
|
-
"@wordinweb/collab": "0.2.
|
|
56
|
+
"@wordinweb/collab": "0.2.1",
|
|
57
57
|
"react": "^18.3.0",
|
|
58
58
|
"react-dom": "^18.3.0",
|
|
59
59
|
"jsdom": "^25.0.0",
|