@beyondwork/docx-react-component 1.0.28 → 1.0.29
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/canonical-document-BLEbzL2J.d.cts +844 -0
- package/dist/canonical-document-BLEbzL2J.d.ts +844 -0
- package/dist/chunk-2FJS5GZM.js +763 -0
- package/dist/chunk-2FJS5GZM.js.map +1 -0
- package/{src/core/commands/section-layout-commands.ts → dist/chunk-2OQBZS3F.js} +106 -340
- package/dist/chunk-2OQBZS3F.js.map +1 -0
- package/dist/chunk-2S7W4KFO.js +127 -0
- package/dist/chunk-2S7W4KFO.js.map +1 -0
- package/dist/chunk-2TG72QSW.js +3874 -0
- package/dist/chunk-2TG72QSW.js.map +1 -0
- package/{src/core/commands/table-structure-commands.ts → dist/chunk-36QNIZBO.js} +126 -315
- package/dist/chunk-36QNIZBO.js.map +1 -0
- package/dist/chunk-4AQOYAW4.js +3069 -0
- package/dist/chunk-4AQOYAW4.js.map +1 -0
- package/dist/chunk-4D5EWJ3P.js +77 -0
- package/dist/chunk-4D5EWJ3P.js.map +1 -0
- package/dist/chunk-5FN54NDH.js +2257 -0
- package/dist/chunk-5FN54NDH.js.map +1 -0
- package/dist/chunk-BOYGQYRQ.js +7306 -0
- package/dist/chunk-BOYGQYRQ.js.map +1 -0
- package/dist/chunk-CN3XMECL.js +212 -0
- package/dist/chunk-CN3XMECL.js.map +1 -0
- package/dist/chunk-EBI3BX6U.js +164 -0
- package/dist/chunk-EBI3BX6U.js.map +1 -0
- package/dist/chunk-EILUG3VB.js +1275 -0
- package/dist/chunk-EILUG3VB.js.map +1 -0
- package/dist/chunk-FUDY333O.js +70 -0
- package/dist/chunk-FUDY333O.js.map +1 -0
- package/dist/chunk-GBVOWFIK.js +1237 -0
- package/dist/chunk-GBVOWFIK.js.map +1 -0
- package/dist/chunk-H4TQ3H3Y.js +262 -0
- package/dist/chunk-H4TQ3H3Y.js.map +1 -0
- package/{src/core/commands/style-commands.ts → dist/chunk-JGB3IXZO.js} +40 -113
- package/dist/chunk-JGB3IXZO.js.map +1 -0
- package/dist/chunk-KD2QRQPY.js +4342 -0
- package/dist/chunk-KD2QRQPY.js.map +1 -0
- package/dist/chunk-KLMXQVYK.js +369 -0
- package/dist/chunk-KLMXQVYK.js.map +1 -0
- package/dist/chunk-KZUG5KFQ.js +214 -0
- package/dist/chunk-KZUG5KFQ.js.map +1 -0
- package/{src/core/state/text-transaction.ts → dist/chunk-QDAQ4CJU.js} +79 -236
- package/dist/chunk-QDAQ4CJU.js.map +1 -0
- package/{src/legal/bookmarks.ts → dist/chunk-RMH72RZI.js} +44 -130
- package/dist/chunk-RMH72RZI.js.map +1 -0
- package/dist/chunk-SWKWQZXM.js +117 -0
- package/dist/chunk-SWKWQZXM.js.map +1 -0
- package/{src/core/commands/formatting-commands.ts → dist/chunk-TJBP2K4T.js} +196 -536
- package/dist/chunk-TJBP2K4T.js.map +1 -0
- package/dist/chunk-TLCEAQDQ.js +542 -0
- package/dist/chunk-TLCEAQDQ.js.map +1 -0
- package/{src/core/commands/text-commands.ts → dist/chunk-UZXBISGO.js} +86 -142
- package/dist/chunk-UZXBISGO.js.map +1 -0
- package/dist/chunk-WGBAKP3Q.js +3220 -0
- package/dist/chunk-WGBAKP3Q.js.map +1 -0
- package/dist/compare/index.cjs +5475 -0
- package/dist/compare/index.cjs.map +1 -0
- package/dist/compare/index.d.cts +114 -0
- package/dist/compare/index.d.ts +114 -0
- package/dist/compare/index.js +731 -0
- package/dist/compare/index.js.map +1 -0
- package/dist/core/commands/formatting-commands.cjs +828 -0
- package/dist/core/commands/formatting-commands.cjs.map +1 -0
- package/dist/core/commands/formatting-commands.d.cts +63 -0
- package/dist/core/commands/formatting-commands.d.ts +63 -0
- package/dist/core/commands/formatting-commands.js +37 -0
- package/dist/core/commands/formatting-commands.js.map +1 -0
- package/dist/core/commands/image-commands.cjs +2023 -0
- package/dist/core/commands/image-commands.cjs.map +1 -0
- package/dist/core/commands/image-commands.d.cts +58 -0
- package/dist/core/commands/image-commands.d.ts +58 -0
- package/dist/core/commands/image-commands.js +18 -0
- package/dist/core/commands/image-commands.js.map +1 -0
- package/dist/core/commands/section-layout-commands.cjs +477 -0
- package/dist/core/commands/section-layout-commands.cjs.map +1 -0
- package/dist/core/commands/section-layout-commands.d.cts +62 -0
- package/dist/core/commands/section-layout-commands.d.ts +62 -0
- package/dist/core/commands/section-layout-commands.js +21 -0
- package/dist/core/commands/section-layout-commands.js.map +1 -0
- package/dist/core/commands/style-commands.cjs +214 -0
- package/dist/core/commands/style-commands.cjs.map +1 -0
- package/dist/core/commands/style-commands.d.cts +13 -0
- package/dist/core/commands/style-commands.d.ts +13 -0
- package/dist/core/commands/style-commands.js +9 -0
- package/dist/core/commands/style-commands.js.map +1 -0
- package/dist/core/commands/table-structure-commands.cjs +1883 -0
- package/dist/core/commands/table-structure-commands.cjs.map +1 -0
- package/dist/core/commands/table-structure-commands.d.cts +59 -0
- package/dist/core/commands/table-structure-commands.d.ts +59 -0
- package/dist/core/commands/table-structure-commands.js +12 -0
- package/dist/core/commands/table-structure-commands.js.map +1 -0
- package/dist/core/commands/text-commands.cjs +2391 -0
- package/dist/core/commands/text-commands.cjs.map +1 -0
- package/dist/core/commands/text-commands.d.cts +24 -0
- package/dist/core/commands/text-commands.d.ts +24 -0
- package/dist/core/commands/text-commands.js +28 -0
- package/dist/core/commands/text-commands.js.map +1 -0
- package/dist/core/selection/mapping.cjs +200 -0
- package/dist/core/selection/mapping.cjs.map +1 -0
- package/dist/core/selection/mapping.d.cts +2 -0
- package/dist/core/selection/mapping.d.ts +2 -0
- package/dist/core/selection/mapping.js +31 -0
- package/dist/core/selection/mapping.js.map +1 -0
- package/dist/core/state/editor-state.cjs +2278 -0
- package/dist/core/state/editor-state.cjs.map +1 -0
- package/dist/core/state/editor-state.d.cts +2 -0
- package/dist/core/state/editor-state.d.ts +2 -0
- package/dist/core/state/editor-state.js +26 -0
- package/dist/core/state/editor-state.js.map +1 -0
- package/dist/index.cjs +38553 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +7856 -0
- package/dist/index.js.map +1 -0
- package/dist/io/docx-session.cjs +16236 -0
- package/dist/io/docx-session.cjs.map +1 -0
- package/dist/io/docx-session.d.cts +21 -0
- package/dist/io/docx-session.d.ts +21 -0
- package/dist/io/docx-session.js +18 -0
- package/dist/io/docx-session.js.map +1 -0
- package/dist/legal/index.cjs +3900 -0
- package/dist/legal/index.cjs.map +1 -0
- package/dist/legal/index.d.cts +86 -0
- package/dist/legal/index.d.ts +86 -0
- package/dist/legal/index.js +616 -0
- package/dist/legal/index.js.map +1 -0
- package/dist/public-types-7ZL_94cz.d.ts +1573 -0
- package/dist/public-types-CeMaDueh.d.cts +1573 -0
- package/dist/public-types.cjs +19 -0
- package/dist/public-types.cjs.map +1 -0
- package/dist/public-types.d.cts +2 -0
- package/dist/public-types.d.ts +2 -0
- package/dist/public-types.js +1 -0
- package/dist/public-types.js.map +1 -0
- package/dist/runtime/document-runtime.cjs +11140 -0
- package/dist/runtime/document-runtime.cjs.map +1 -0
- package/dist/runtime/document-runtime.d.cts +231 -0
- package/dist/runtime/document-runtime.d.ts +231 -0
- package/dist/runtime/document-runtime.js +21 -0
- package/dist/runtime/document-runtime.js.map +1 -0
- package/dist/structural-helpers-CilgOVhh.d.cts +10 -0
- package/dist/structural-helpers-q0Gd-eBN.d.ts +10 -0
- package/dist/ui-tailwind/editor-surface/search-plugin.cjs +313 -0
- package/dist/ui-tailwind/editor-surface/search-plugin.cjs.map +1 -0
- package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +67 -0
- package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +67 -0
- package/dist/ui-tailwind/editor-surface/search-plugin.js +23 -0
- package/dist/ui-tailwind/editor-surface/search-plugin.js.map +1 -0
- package/dist/ui-tailwind/index.cjs +4833 -0
- package/dist/ui-tailwind/index.cjs.map +1 -0
- package/dist/ui-tailwind/index.d.cts +617 -0
- package/dist/ui-tailwind/index.d.ts +617 -0
- package/dist/ui-tailwind/index.js +575 -0
- package/dist/ui-tailwind/index.js.map +1 -0
- package/package.json +61 -41
- package/src/README.md +0 -85
- package/src/api/README.md +0 -26
- package/src/api/public-types.ts +0 -1421
- package/src/api/session-state.ts +0 -60
- package/src/compare/diff-engine.ts +0 -623
- package/src/compare/export-redlines.ts +0 -280
- package/src/compare/index.ts +0 -25
- package/src/compare/snapshot.ts +0 -97
- package/src/component-inventory.md +0 -99
- package/src/core/README.md +0 -10
- package/src/core/commands/README.md +0 -3
- package/src/core/commands/image-commands.ts +0 -373
- package/src/core/commands/index.ts +0 -1757
- package/src/core/commands/list-commands.ts +0 -565
- package/src/core/commands/paragraph-layout-commands.ts +0 -339
- package/src/core/commands/review-commands.ts +0 -108
- package/src/core/commands/structural-helpers.ts +0 -309
- package/src/core/schema/README.md +0 -3
- package/src/core/schema/text-schema.ts +0 -516
- package/src/core/search/search-text.ts +0 -357
- package/src/core/selection/README.md +0 -3
- package/src/core/selection/mapping.ts +0 -289
- package/src/core/selection/review-anchors.ts +0 -183
- package/src/core/state/README.md +0 -3
- package/src/core/state/editor-state.ts +0 -892
- package/src/formats/xlsx/io/parse-shared-strings.ts +0 -41
- package/src/formats/xlsx/io/parse-sheet.ts +0 -459
- package/src/formats/xlsx/io/parse-styles.ts +0 -59
- package/src/formats/xlsx/io/parse-workbook.ts +0 -75
- package/src/formats/xlsx/io/serialize-shared-strings.ts +0 -72
- package/src/formats/xlsx/io/serialize-sheet.ts +0 -333
- package/src/formats/xlsx/io/serialize-styles.ts +0 -98
- package/src/formats/xlsx/io/serialize-workbook.ts +0 -429
- package/src/formats/xlsx/io/xlsx-session.ts +0 -314
- package/src/formats/xlsx/model/cell.ts +0 -189
- package/src/formats/xlsx/model/sheet.ts +0 -326
- package/src/formats/xlsx/model/styles.ts +0 -118
- package/src/formats/xlsx/model/workbook.ts +0 -453
- package/src/formats/xlsx/runtime/cell-commands.ts +0 -567
- package/src/formats/xlsx/runtime/sheet-commands.ts +0 -206
- package/src/formats/xlsx/runtime/workbook-runtime.ts +0 -177
- package/src/formats/xlsx/runtime/workbook-transaction.ts +0 -822
- package/src/index.ts +0 -101
- package/src/io/README.md +0 -10
- package/src/io/docx-session.ts +0 -2882
- package/src/io/export/README.md +0 -3
- package/src/io/export/export-session.ts +0 -220
- package/src/io/export/minimal-docx.ts +0 -115
- package/src/io/export/reattach-preserved-parts.ts +0 -54
- package/src/io/export/serialize-comments.ts +0 -947
- package/src/io/export/serialize-footnotes.ts +0 -399
- package/src/io/export/serialize-headers-footers.ts +0 -372
- package/src/io/export/serialize-main-document.ts +0 -1376
- package/src/io/export/serialize-numbering.ts +0 -118
- package/src/io/export/serialize-revisions.ts +0 -389
- package/src/io/export/serialize-runtime-revisions.ts +0 -269
- package/src/io/export/serialize-tables.ts +0 -174
- package/src/io/export/split-review-boundaries.ts +0 -356
- package/src/io/normalize/README.md +0 -3
- package/src/io/normalize/normalize-text.ts +0 -639
- package/src/io/ooxml/README.md +0 -3
- package/src/io/ooxml/highlight-colors.ts +0 -39
- package/src/io/ooxml/numbering-sentinels.ts +0 -44
- package/src/io/ooxml/parse-comments.ts +0 -846
- package/src/io/ooxml/parse-complex-content.ts +0 -287
- package/src/io/ooxml/parse-fields.ts +0 -834
- package/src/io/ooxml/parse-footnotes.ts +0 -896
- package/src/io/ooxml/parse-headers-footers.ts +0 -1169
- package/src/io/ooxml/parse-inline-media.ts +0 -461
- package/src/io/ooxml/parse-main-document.ts +0 -2877
- package/src/io/ooxml/parse-numbering.ts +0 -432
- package/src/io/ooxml/parse-revisions.ts +0 -931
- package/src/io/ooxml/parse-settings.ts +0 -184
- package/src/io/ooxml/parse-shapes.ts +0 -296
- package/src/io/ooxml/parse-styles.ts +0 -463
- package/src/io/ooxml/parse-tables.ts +0 -618
- package/src/io/ooxml/parse-theme.ts +0 -346
- package/src/io/ooxml/part-manifest.ts +0 -136
- package/src/io/ooxml/revision-boundaries.ts +0 -351
- package/src/io/opc/README.md +0 -3
- package/src/io/opc/corrupt-package.ts +0 -166
- package/src/io/opc/docx-package.ts +0 -74
- package/src/io/opc/package-reader.ts +0 -325
- package/src/io/opc/package-writer.ts +0 -273
- package/src/io/source-package-provenance.ts +0 -241
- package/src/legal/cross-references.ts +0 -414
- package/src/legal/defined-terms.ts +0 -203
- package/src/legal/index.ts +0 -32
- package/src/legal/signature-blocks.ts +0 -259
- package/src/model/README.md +0 -3
- package/src/model/canonical-document.ts +0 -2632
- package/src/model/cds-1.0.0.ts +0 -212
- package/src/model/snapshot.ts +0 -649
- package/src/preservation/README.md +0 -3
- package/src/preservation/markup-compatibility.ts +0 -48
- package/src/preservation/opaque-fragment-store.ts +0 -89
- package/src/preservation/opaque-region.ts +0 -233
- package/src/preservation/package-preservation.ts +0 -113
- package/src/preservation/preserved-part-manifest.ts +0 -56
- package/src/preservation/relationship-retention.ts +0 -57
- package/src/preservation/store.ts +0 -185
- package/src/review/README.md +0 -16
- package/src/review/store/README.md +0 -3
- package/src/review/store/comment-anchors.ts +0 -70
- package/src/review/store/comment-remapping.ts +0 -154
- package/src/review/store/comment-store.ts +0 -331
- package/src/review/store/comment-thread.ts +0 -109
- package/src/review/store/revision-actions.ts +0 -394
- package/src/review/store/revision-store.ts +0 -312
- package/src/review/store/revision-types.ts +0 -171
- package/src/review/store/runtime-comment-store.ts +0 -43
- package/src/runtime/README.md +0 -3
- package/src/runtime/ai-action-policy.ts +0 -764
- package/src/runtime/document-layout.ts +0 -332
- package/src/runtime/document-navigation.ts +0 -603
- package/src/runtime/document-runtime.ts +0 -3159
- package/src/runtime/document-search.ts +0 -145
- package/src/runtime/numbering-prefix.ts +0 -216
- package/src/runtime/page-layout-estimation.ts +0 -212
- package/src/runtime/read-only-diagnostics-runtime.ts +0 -241
- package/src/runtime/review-runtime.ts +0 -44
- package/src/runtime/revision-runtime.ts +0 -107
- package/src/runtime/session-capabilities.ts +0 -192
- package/src/runtime/story-context.ts +0 -164
- package/src/runtime/story-targeting.ts +0 -162
- package/src/runtime/surface-projection.ts +0 -1357
- package/src/runtime/table-commands.ts +0 -173
- package/src/runtime/table-schema.ts +0 -309
- package/src/runtime/view-state.ts +0 -477
- package/src/runtime/virtualized-rendering.ts +0 -258
- package/src/runtime/workflow-markup.ts +0 -353
- package/src/ui/README.md +0 -30
- package/src/ui/WordReviewEditor.tsx +0 -4086
- package/src/ui/browser-export.ts +0 -52
- package/src/ui/comments/README.md +0 -3
- package/src/ui/compatibility/README.md +0 -3
- package/src/ui/editor-command-bag.ts +0 -120
- package/src/ui/editor-runtime-boundary.ts +0 -1457
- package/src/ui/editor-shell-view.tsx +0 -142
- package/src/ui/editor-surface/README.md +0 -3
- package/src/ui/editor-surface-controller.tsx +0 -61
- package/src/ui/headless/comment-decoration-model.ts +0 -124
- package/src/ui/headless/preserve-editor-selection.ts +0 -5
- package/src/ui/headless/revision-decoration-model.ts +0 -128
- package/src/ui/headless/selection-helpers.ts +0 -54
- package/src/ui/headless/selection-toolbar-model.ts +0 -34
- package/src/ui/headless/use-editor-keyboard.ts +0 -103
- package/src/ui/review/README.md +0 -3
- package/src/ui/runtime-snapshot-selectors.ts +0 -197
- package/src/ui/shared/revision-filters.ts +0 -31
- package/src/ui/status/README.md +0 -3
- package/src/ui/theme/README.md +0 -3
- package/src/ui/toolbar/README.md +0 -3
- package/src/ui/workflow-surface-blocked-rails.ts +0 -94
- package/src/ui-tailwind/chrome/tw-alert-banner.tsx +0 -64
- package/src/ui-tailwind/chrome/tw-image-context-toolbar.tsx +0 -129
- package/src/ui-tailwind/chrome/tw-layout-panel.tsx +0 -114
- package/src/ui-tailwind/chrome/tw-object-context-toolbar.tsx +0 -34
- package/src/ui-tailwind/chrome/tw-page-ruler.tsx +0 -386
- package/src/ui-tailwind/chrome/tw-selection-toolbar.tsx +0 -186
- package/src/ui-tailwind/chrome/tw-suggestion-card.tsx +0 -139
- package/src/ui-tailwind/chrome/tw-table-context-toolbar.tsx +0 -128
- package/src/ui-tailwind/chrome/tw-unsaved-modal.tsx +0 -58
- package/src/ui-tailwind/chrome/use-before-unload.ts +0 -20
- package/src/ui-tailwind/editor-surface/perf-probe.ts +0 -179
- package/src/ui-tailwind/editor-surface/pm-command-bridge.ts +0 -184
- package/src/ui-tailwind/editor-surface/pm-contextual-ui.ts +0 -31
- package/src/ui-tailwind/editor-surface/pm-decorations.ts +0 -427
- package/src/ui-tailwind/editor-surface/pm-position-map.ts +0 -123
- package/src/ui-tailwind/editor-surface/pm-schema.ts +0 -876
- package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +0 -504
- package/src/ui-tailwind/editor-surface/search-plugin.ts +0 -168
- package/src/ui-tailwind/editor-surface/surface-build-keys.ts +0 -61
- package/src/ui-tailwind/editor-surface/tw-caret.tsx +0 -12
- package/src/ui-tailwind/editor-surface/tw-editor-surface.tsx +0 -150
- package/src/ui-tailwind/editor-surface/tw-inline-token.tsx +0 -129
- package/src/ui-tailwind/editor-surface/tw-opaque-block.tsx +0 -58
- package/src/ui-tailwind/editor-surface/tw-paragraph-block.tsx +0 -151
- package/src/ui-tailwind/editor-surface/tw-prosemirror-surface.tsx +0 -944
- package/src/ui-tailwind/editor-surface/tw-segment-view.tsx +0 -111
- package/src/ui-tailwind/editor-surface/tw-table-node-view.tsx +0 -436
- package/src/ui-tailwind/index.ts +0 -62
- package/src/ui-tailwind/page-chrome-model.ts +0 -27
- package/src/ui-tailwind/review/tw-comment-sidebar.tsx +0 -406
- package/src/ui-tailwind/review/tw-health-panel.tsx +0 -149
- package/src/ui-tailwind/review/tw-review-rail.tsx +0 -120
- package/src/ui-tailwind/review/tw-revision-sidebar.tsx +0 -164
- package/src/ui-tailwind/status/tw-status-bar.tsx +0 -61
- package/src/ui-tailwind/toolbar/tw-toolbar-icon-button.tsx +0 -52
- package/src/ui-tailwind/toolbar/tw-toolbar.tsx +0 -1064
- package/src/ui-tailwind/tw-review-workspace.tsx +0 -1417
- package/src/validation/README.md +0 -3
- package/src/validation/compatibility-engine.ts +0 -634
- package/src/validation/compatibility-report.ts +0 -161
- package/src/validation/diagnostics.ts +0 -204
- package/src/validation/docx-comment-proof.ts +0 -707
- package/src/validation/import-diagnostics.ts +0 -128
- package/src/validation/low-priority-word-surfaces.ts +0 -373
- /package/{src → dist}/ui-tailwind/theme/editor-theme.css +0 -0
package/src/api/public-types.ts
DELETED
|
@@ -1,1421 +0,0 @@
|
|
|
1
|
-
import type { PersistedEditorSnapshot as RuntimePersistedEditorSnapshot } from "../core/state/editor-state.ts";
|
|
2
|
-
import type {
|
|
3
|
-
FieldFamily as FieldFamilyType,
|
|
4
|
-
FieldRefreshStatus as FieldRefreshStatusType,
|
|
5
|
-
SupportedFieldFamily as SupportedFieldFamilyType,
|
|
6
|
-
} from "../model/canonical-document.ts";
|
|
7
|
-
|
|
8
|
-
export type FieldFamily = FieldFamilyType;
|
|
9
|
-
export type FieldRefreshStatus = FieldRefreshStatusType;
|
|
10
|
-
export type SupportedFieldFamily = SupportedFieldFamilyType;
|
|
11
|
-
|
|
12
|
-
export type ExternalDocumentSource =
|
|
13
|
-
| {
|
|
14
|
-
kind: "docx";
|
|
15
|
-
bytes: Uint8Array | ArrayBuffer;
|
|
16
|
-
sourceLabel?: string;
|
|
17
|
-
}
|
|
18
|
-
| {
|
|
19
|
-
kind: "session";
|
|
20
|
-
sessionState: EditorSessionState;
|
|
21
|
-
sourceLabel?: string;
|
|
22
|
-
}
|
|
23
|
-
| {
|
|
24
|
-
kind: "snapshot";
|
|
25
|
-
snapshot: PersistedEditorSnapshot;
|
|
26
|
-
sourceLabel?: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type LoadSourcePolicy = "prefer-saved-state" | "prefer-source-package";
|
|
30
|
-
|
|
31
|
-
export interface LoadRequest {
|
|
32
|
-
documentId: string;
|
|
33
|
-
loadRevision?: string;
|
|
34
|
-
loadSourcePolicy?: LoadSourcePolicy;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface EditorUser {
|
|
38
|
-
userId: string;
|
|
39
|
-
displayName: string;
|
|
40
|
-
email?: string;
|
|
41
|
-
avatarUrl?: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type EditorAnchorProjection =
|
|
45
|
-
| {
|
|
46
|
-
kind: "range";
|
|
47
|
-
from: number;
|
|
48
|
-
to: number;
|
|
49
|
-
assoc: {
|
|
50
|
-
start: -1 | 1;
|
|
51
|
-
end: -1 | 1;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
| {
|
|
55
|
-
kind: "node";
|
|
56
|
-
at: number;
|
|
57
|
-
assoc: -1 | 1;
|
|
58
|
-
}
|
|
59
|
-
| {
|
|
60
|
-
kind: "detached";
|
|
61
|
-
lastKnownRange: {
|
|
62
|
-
from: number;
|
|
63
|
-
to: number;
|
|
64
|
-
};
|
|
65
|
-
reason: "deleted" | "invalidatedByStructureChange" | "importAmbiguity";
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export type EditorStoryTarget =
|
|
69
|
-
| { kind: "main" }
|
|
70
|
-
| {
|
|
71
|
-
kind: "header";
|
|
72
|
-
relationshipId: string;
|
|
73
|
-
variant: "default" | "first" | "even";
|
|
74
|
-
sectionIndex?: number;
|
|
75
|
-
}
|
|
76
|
-
| {
|
|
77
|
-
kind: "footer";
|
|
78
|
-
relationshipId: string;
|
|
79
|
-
variant: "default" | "first" | "even";
|
|
80
|
-
sectionIndex?: number;
|
|
81
|
-
}
|
|
82
|
-
| { kind: "footnote"; noteId: string }
|
|
83
|
-
| { kind: "endnote"; noteId: string };
|
|
84
|
-
|
|
85
|
-
export interface SelectionSnapshot {
|
|
86
|
-
anchor: number;
|
|
87
|
-
head: number;
|
|
88
|
-
isCollapsed: boolean;
|
|
89
|
-
activeRange: EditorAnchorProjection;
|
|
90
|
-
storyTarget?: EditorStoryTarget;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface PageLayoutSnapshot {
|
|
94
|
-
sectionIndex: number;
|
|
95
|
-
sectionType?: "continuous" | "nextPage" | "evenPage" | "oddPage" | "nextColumn";
|
|
96
|
-
pageWidth: number;
|
|
97
|
-
pageHeight: number;
|
|
98
|
-
marginTop: number;
|
|
99
|
-
marginBottom: number;
|
|
100
|
-
marginLeft: number;
|
|
101
|
-
marginRight: number;
|
|
102
|
-
headerMargin: number;
|
|
103
|
-
footerMargin: number;
|
|
104
|
-
gutter: number;
|
|
105
|
-
orientation: "portrait" | "landscape";
|
|
106
|
-
columns: number;
|
|
107
|
-
differentFirstPage: boolean;
|
|
108
|
-
differentOddEvenPages: boolean;
|
|
109
|
-
pageNumbering?: {
|
|
110
|
-
format?: string;
|
|
111
|
-
start?: number;
|
|
112
|
-
chapterStyle?: string;
|
|
113
|
-
chapterSeparator?: string;
|
|
114
|
-
};
|
|
115
|
-
lineNumbering?: {
|
|
116
|
-
countBy?: number;
|
|
117
|
-
start?: number;
|
|
118
|
-
distance?: number;
|
|
119
|
-
restart?: "newPage" | "newSection" | "continuous";
|
|
120
|
-
};
|
|
121
|
-
pageBorders?: {
|
|
122
|
-
top?: { value?: string; size?: number; space?: number; color?: string };
|
|
123
|
-
left?: { value?: string; size?: number; space?: number; color?: string };
|
|
124
|
-
bottom?: { value?: string; size?: number; space?: number; color?: string };
|
|
125
|
-
right?: { value?: string; size?: number; space?: number; color?: string };
|
|
126
|
-
offsetFrom?: "page" | "text";
|
|
127
|
-
display?: "allPages" | "firstPage" | "notFirstPage";
|
|
128
|
-
zOrder?: "front" | "back";
|
|
129
|
-
};
|
|
130
|
-
documentGrid?: {
|
|
131
|
-
type?: "default" | "lines" | "linesAndChars" | "snapToChars";
|
|
132
|
-
linePitch?: number;
|
|
133
|
-
charSpace?: number;
|
|
134
|
-
};
|
|
135
|
-
columnDefinitions: Array<{ width: number; space?: number }>;
|
|
136
|
-
equalWidthColumns: boolean;
|
|
137
|
-
columnSeparator: boolean;
|
|
138
|
-
headerVariants: Array<{ variant: "default" | "first" | "even"; relationshipId: string }>;
|
|
139
|
-
footerVariants: Array<{ variant: "default" | "first" | "even"; relationshipId: string }>;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export type WorkspaceMode = "canvas" | "page";
|
|
143
|
-
|
|
144
|
-
export type ZoomLevel = "pageWidth" | "onePage" | number;
|
|
145
|
-
|
|
146
|
-
export type SectionBreakType =
|
|
147
|
-
| "nextPage"
|
|
148
|
-
| "continuous"
|
|
149
|
-
| "evenPage"
|
|
150
|
-
| "oddPage"
|
|
151
|
-
| "nextColumn";
|
|
152
|
-
|
|
153
|
-
export interface SectionLayoutPatch {
|
|
154
|
-
pageSize?: Partial<{
|
|
155
|
-
width: number;
|
|
156
|
-
height: number;
|
|
157
|
-
orientation: "portrait" | "landscape";
|
|
158
|
-
}>;
|
|
159
|
-
pageMargins?: Partial<{
|
|
160
|
-
top: number;
|
|
161
|
-
right: number;
|
|
162
|
-
bottom: number;
|
|
163
|
-
left: number;
|
|
164
|
-
header: number;
|
|
165
|
-
footer: number;
|
|
166
|
-
gutter: number;
|
|
167
|
-
}>;
|
|
168
|
-
columns?: Partial<{
|
|
169
|
-
count: number;
|
|
170
|
-
space: number;
|
|
171
|
-
equalWidth: boolean;
|
|
172
|
-
columns: Array<{ width: number; space?: number }>;
|
|
173
|
-
separator: boolean;
|
|
174
|
-
}>;
|
|
175
|
-
titlePage?: boolean;
|
|
176
|
-
sectionType?: SectionBreakType;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export interface SectionPageNumberingPatch {
|
|
180
|
-
format?: string | null;
|
|
181
|
-
start?: number | null;
|
|
182
|
-
chapterStyle?: string | null;
|
|
183
|
-
chapterSeparator?: string | null;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export interface HeaderFooterLinkPatch {
|
|
187
|
-
kind: "header" | "footer";
|
|
188
|
-
variant: "default" | "first" | "even";
|
|
189
|
-
linkToPrevious: boolean;
|
|
190
|
-
relationshipId?: string | null;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export interface DocumentStats {
|
|
194
|
-
storyLength: number;
|
|
195
|
-
commentCount: number;
|
|
196
|
-
revisionCount: number;
|
|
197
|
-
opaqueFragmentCount: number;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export interface CommentSidebarSnapshot {
|
|
201
|
-
activeCommentId?: string;
|
|
202
|
-
openCommentIds: string[];
|
|
203
|
-
resolvedCommentIds: string[];
|
|
204
|
-
detachedCommentIds: string[];
|
|
205
|
-
totalCount: number;
|
|
206
|
-
threads: CommentSidebarThreadSnapshot[];
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export interface CommentSidebarThreadEntrySnapshot {
|
|
210
|
-
entryId: string;
|
|
211
|
-
authorId: string;
|
|
212
|
-
body: string;
|
|
213
|
-
createdAt: string;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface CommentSidebarThreadSnapshot {
|
|
217
|
-
commentId: string;
|
|
218
|
-
status: "open" | "resolved" | "detached";
|
|
219
|
-
anchor: EditorAnchorProjection;
|
|
220
|
-
excerpt: string;
|
|
221
|
-
entryCount: number;
|
|
222
|
-
entries: CommentSidebarThreadEntrySnapshot[];
|
|
223
|
-
createdAt: string;
|
|
224
|
-
createdBy: string;
|
|
225
|
-
warningCount: number;
|
|
226
|
-
anchorLabel: string;
|
|
227
|
-
isActive: boolean;
|
|
228
|
-
resolvedAt?: string;
|
|
229
|
-
resolvedBy?: string;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export interface TrackedChangeEntrySnapshot {
|
|
233
|
-
revisionId: string;
|
|
234
|
-
kind: "insertion" | "deletion" | "formatting" | "move" | "property-change";
|
|
235
|
-
label: string;
|
|
236
|
-
status: "active" | "accepted" | "rejected" | "detached";
|
|
237
|
-
actionability: "actionable" | "preserve-only";
|
|
238
|
-
storyTarget?: EditorStoryTarget;
|
|
239
|
-
importedRevisionForm?:
|
|
240
|
-
| "run-insertion"
|
|
241
|
-
| "run-deletion"
|
|
242
|
-
| "paragraph-insertion"
|
|
243
|
-
| "paragraph-deletion";
|
|
244
|
-
anchor: EditorAnchorProjection;
|
|
245
|
-
anchorLabel: string;
|
|
246
|
-
createdAt: string;
|
|
247
|
-
authorId: string;
|
|
248
|
-
warningCount: number;
|
|
249
|
-
canAccept: boolean;
|
|
250
|
-
canReject: boolean;
|
|
251
|
-
preserveOnlyReason?: string;
|
|
252
|
-
excerpt?: string;
|
|
253
|
-
detail?: string;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export interface TrackedChangesSnapshot {
|
|
257
|
-
pendingChangeIds: string[];
|
|
258
|
-
acceptedChangeIds: string[];
|
|
259
|
-
rejectedChangeIds: string[];
|
|
260
|
-
detachedChangeIds: string[];
|
|
261
|
-
actionableChangeIds: string[];
|
|
262
|
-
preserveOnlyChangeIds: string[];
|
|
263
|
-
totalCount: number;
|
|
264
|
-
revisions: TrackedChangeEntrySnapshot[];
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export type FormattingAlignment = "left" | "center" | "right" | "justify";
|
|
268
|
-
|
|
269
|
-
export interface FormattingBreadcrumbItem {
|
|
270
|
-
kind: "table" | "table_row" | "table_cell" | "paragraph" | "sdt_block" | "opaque_block";
|
|
271
|
-
label: string;
|
|
272
|
-
from: number;
|
|
273
|
-
to: number;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export interface FormattingStateSnapshot {
|
|
277
|
-
bold: boolean;
|
|
278
|
-
italic: boolean;
|
|
279
|
-
underline: boolean;
|
|
280
|
-
strikethrough: boolean;
|
|
281
|
-
superscript: boolean;
|
|
282
|
-
subscript: boolean;
|
|
283
|
-
fontFamily?: string;
|
|
284
|
-
fontSize?: number;
|
|
285
|
-
textColor?: string;
|
|
286
|
-
highlightColor?: string | null;
|
|
287
|
-
alignment?: FormattingAlignment;
|
|
288
|
-
paragraphStyleId?: string;
|
|
289
|
-
breadcrumb: FormattingBreadcrumbItem[];
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
export interface SearchOptions {
|
|
293
|
-
matchCase?: boolean;
|
|
294
|
-
wholeWord?: boolean;
|
|
295
|
-
limit?: number;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
export interface SearchResultSnapshot {
|
|
299
|
-
resultId: string;
|
|
300
|
-
anchor: EditorAnchorProjection;
|
|
301
|
-
excerpt: string;
|
|
302
|
-
isActive: boolean;
|
|
303
|
-
storyTarget?: EditorStoryTarget;
|
|
304
|
-
sectionIndex?: number;
|
|
305
|
-
pageIndex?: number;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// ---------------------------------------------------------------------------
|
|
309
|
-
// Document Navigation Model (Wave 37)
|
|
310
|
-
// ---------------------------------------------------------------------------
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Runtime-owned snapshot of the document's page stack, heading outline, and
|
|
314
|
-
* navigation context. Derived from canonical document state and section
|
|
315
|
-
* properties — never from DOM scroll position or CSS layout.
|
|
316
|
-
*/
|
|
317
|
-
export interface DocumentNavigationSnapshot {
|
|
318
|
-
/** Total estimated page count across all sections. */
|
|
319
|
-
pageCount: number;
|
|
320
|
-
/** Ordered page descriptors, one per logical page. */
|
|
321
|
-
pages: DocumentPageSnapshot[];
|
|
322
|
-
/** Ordered heading outline extracted from paragraph styles. */
|
|
323
|
-
headings: DocumentHeadingSnapshot[];
|
|
324
|
-
/** Index of the page containing the current selection head. */
|
|
325
|
-
activePageIndex: number;
|
|
326
|
-
/** Section index containing the current selection head. */
|
|
327
|
-
activeSectionIndex: number;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/** Runtime-derived descriptor for a single logical page. */
|
|
331
|
-
export interface DocumentPageSnapshot {
|
|
332
|
-
/** Zero-based page index within the whole document. */
|
|
333
|
-
pageIndex: number;
|
|
334
|
-
/** Section that owns this page (zero-based). */
|
|
335
|
-
sectionIndex: number;
|
|
336
|
-
/** Zero-based page index within its owning section. */
|
|
337
|
-
pageInSection: number;
|
|
338
|
-
/** Estimated character offset where the page begins in the main story. */
|
|
339
|
-
startOffset: number;
|
|
340
|
-
/** Estimated character offset where the page ends in the main story. */
|
|
341
|
-
endOffset: number;
|
|
342
|
-
/** Page layout properties inherited from the section. */
|
|
343
|
-
layout: PageLayoutSnapshot;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/** A heading entry in the document outline. */
|
|
347
|
-
export interface DocumentHeadingSnapshot {
|
|
348
|
-
/** Stable identifier for the heading (derived from block position). */
|
|
349
|
-
headingId: string;
|
|
350
|
-
/** Outline level (1 = Heading 1, 2 = Heading 2, etc.). */
|
|
351
|
-
level: number;
|
|
352
|
-
/** Plain-text content of the heading paragraph. */
|
|
353
|
-
text: string;
|
|
354
|
-
/** Character offset of the heading in the main story. */
|
|
355
|
-
offset: number;
|
|
356
|
-
/** Zero-based page index where the heading lives. */
|
|
357
|
-
pageIndex: number;
|
|
358
|
-
/** Section index where the heading lives. */
|
|
359
|
-
sectionIndex: number;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/** A single field entry in the runtime field snapshot. */
|
|
363
|
-
export interface FieldEntrySnapshot {
|
|
364
|
-
/** Stable index of the field in document order. */
|
|
365
|
-
index: number;
|
|
366
|
-
/** Classified field family. */
|
|
367
|
-
fieldFamily: FieldFamily;
|
|
368
|
-
/** Whether this family is in the supported refresh slice. */
|
|
369
|
-
supported: boolean;
|
|
370
|
-
/** Raw field instruction string. */
|
|
371
|
-
instruction: string;
|
|
372
|
-
/** Target bookmark for REF/PAGEREF/NOTEREF fields. */
|
|
373
|
-
fieldTarget?: string;
|
|
374
|
-
/** Current refresh status. */
|
|
375
|
-
refreshStatus: FieldRefreshStatus;
|
|
376
|
-
/** Resolved display text (from field children). */
|
|
377
|
-
displayText: string;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/** Runtime field snapshot — read-only view of all fields in the document. */
|
|
381
|
-
export interface FieldSnapshot {
|
|
382
|
-
/** Total number of fields in the document. */
|
|
383
|
-
totalCount: number;
|
|
384
|
-
/** Number of fields in the supported refresh slice. */
|
|
385
|
-
supportedCount: number;
|
|
386
|
-
/** Number of fields that are preserve-only. */
|
|
387
|
-
preserveOnlyCount: number;
|
|
388
|
-
/** Ordered field entries. */
|
|
389
|
-
fields: FieldEntrySnapshot[];
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/** Options for runtime-backed field refresh. */
|
|
393
|
-
export interface UpdateFieldsOptions {
|
|
394
|
-
/** When true, only refresh fields in the supported slice. Default true. */
|
|
395
|
-
supportedOnly?: boolean;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/** Result of a runtime-backed field refresh operation. */
|
|
399
|
-
export interface UpdateFieldsResult {
|
|
400
|
-
/** Total number of fields in the document. */
|
|
401
|
-
totalCount: number;
|
|
402
|
-
/** Number of fields that were refreshed. */
|
|
403
|
-
updatedCount: number;
|
|
404
|
-
/** Number of preserve-only fields left unchanged. */
|
|
405
|
-
preserveOnlyCount: number;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/** Options for runtime-backed TOC refresh. */
|
|
409
|
-
export interface TocRefreshOptions {
|
|
410
|
-
/** Maximum heading outline level to include (1–9, default 3). */
|
|
411
|
-
maxLevel?: number;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
/** Result of a TOC refresh operation. */
|
|
415
|
-
export interface TocRefreshResult {
|
|
416
|
-
/** Number of TOC entries generated from heading structure. */
|
|
417
|
-
entryCount: number;
|
|
418
|
-
/** Heading entries that populated the TOC. */
|
|
419
|
-
entries: Array<{
|
|
420
|
-
level: number;
|
|
421
|
-
text: string;
|
|
422
|
-
pageIndex: number;
|
|
423
|
-
}>;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
export interface StyleCatalogEntrySnapshot {
|
|
427
|
-
styleId: string;
|
|
428
|
-
displayName: string;
|
|
429
|
-
kind: "paragraph" | "character" | "table";
|
|
430
|
-
isDefault: boolean;
|
|
431
|
-
basedOn?: string;
|
|
432
|
-
nextStyle?: string;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
export interface StyleCatalogSnapshot {
|
|
436
|
-
paragraphs: StyleCatalogEntrySnapshot[];
|
|
437
|
-
characters: StyleCatalogEntrySnapshot[];
|
|
438
|
-
tables: StyleCatalogEntrySnapshot[];
|
|
439
|
-
fromPackage: boolean;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
export interface InsertTableOptions {
|
|
443
|
-
rows: number;
|
|
444
|
-
columns: number;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
export interface InsertImageOptions {
|
|
448
|
-
data: Uint8Array;
|
|
449
|
-
mimeType: string;
|
|
450
|
-
width?: number;
|
|
451
|
-
height?: number;
|
|
452
|
-
altText?: string;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
export type SurfaceTextMark =
|
|
456
|
-
| "bold"
|
|
457
|
-
| "italic"
|
|
458
|
-
| "underline"
|
|
459
|
-
| "strikethrough"
|
|
460
|
-
| "doubleStrikethrough"
|
|
461
|
-
| "superscript"
|
|
462
|
-
| "subscript"
|
|
463
|
-
| "vanish"
|
|
464
|
-
| "emboss"
|
|
465
|
-
| "imprint"
|
|
466
|
-
| "shadow"
|
|
467
|
-
| "smallCaps"
|
|
468
|
-
| "allCaps";
|
|
469
|
-
|
|
470
|
-
export type SurfaceInlineSegment =
|
|
471
|
-
| {
|
|
472
|
-
segmentId: string;
|
|
473
|
-
kind: "text";
|
|
474
|
-
from: number;
|
|
475
|
-
to: number;
|
|
476
|
-
text: string;
|
|
477
|
-
marks?: SurfaceTextMark[];
|
|
478
|
-
markAttrs?: {
|
|
479
|
-
backgroundColor?: string;
|
|
480
|
-
charSpacing?: number;
|
|
481
|
-
kerning?: number;
|
|
482
|
-
textFill?: string;
|
|
483
|
-
fontFamily?: string;
|
|
484
|
-
fontSize?: number;
|
|
485
|
-
textColor?: string;
|
|
486
|
-
};
|
|
487
|
-
hyperlinkHref?: string;
|
|
488
|
-
}
|
|
489
|
-
| {
|
|
490
|
-
segmentId: string;
|
|
491
|
-
kind: "tab" | "hard_break";
|
|
492
|
-
from: number;
|
|
493
|
-
to: number;
|
|
494
|
-
hyperlinkHref?: string;
|
|
495
|
-
}
|
|
496
|
-
| {
|
|
497
|
-
segmentId: string;
|
|
498
|
-
kind: "image";
|
|
499
|
-
from: number;
|
|
500
|
-
to: number;
|
|
501
|
-
mediaId: string;
|
|
502
|
-
altText?: string;
|
|
503
|
-
state: "editable" | "missing";
|
|
504
|
-
display?: "inline" | "floating";
|
|
505
|
-
detail?: string;
|
|
506
|
-
}
|
|
507
|
-
| {
|
|
508
|
-
segmentId: string;
|
|
509
|
-
kind: "opaque_inline";
|
|
510
|
-
from: number;
|
|
511
|
-
to: number;
|
|
512
|
-
fragmentId: string;
|
|
513
|
-
warningId: string;
|
|
514
|
-
label: string;
|
|
515
|
-
detail: string;
|
|
516
|
-
presentation?: "inline-chip" | "quiet-marker";
|
|
517
|
-
state: "locked-preserve-only";
|
|
518
|
-
}
|
|
519
|
-
| {
|
|
520
|
-
segmentId: string;
|
|
521
|
-
kind: "note_ref";
|
|
522
|
-
from: number;
|
|
523
|
-
to: number;
|
|
524
|
-
noteKind: "footnote" | "endnote";
|
|
525
|
-
noteId: string;
|
|
526
|
-
label: string;
|
|
527
|
-
}
|
|
528
|
-
| {
|
|
529
|
-
segmentId: string;
|
|
530
|
-
kind: "field_ref";
|
|
531
|
-
from: number;
|
|
532
|
-
to: number;
|
|
533
|
-
fieldFamily: SupportedFieldFamily;
|
|
534
|
-
fieldTarget?: string;
|
|
535
|
-
instruction: string;
|
|
536
|
-
refreshStatus: FieldRefreshStatus;
|
|
537
|
-
label: string;
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
export interface SurfaceTableCellSnapshot {
|
|
541
|
-
gridSpan: number;
|
|
542
|
-
verticalMerge: "restart" | "continue" | null;
|
|
543
|
-
colspan: number;
|
|
544
|
-
rowspan: number;
|
|
545
|
-
backgroundColor?: string | null;
|
|
546
|
-
verticalAlign?: "top" | "center" | "bottom" | null;
|
|
547
|
-
borderTop?: string | null;
|
|
548
|
-
borderRight?: string | null;
|
|
549
|
-
borderBottom?: string | null;
|
|
550
|
-
borderLeft?: string | null;
|
|
551
|
-
content: SurfaceBlockSnapshot[];
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
export interface SurfaceTableRowSnapshot {
|
|
555
|
-
cells: SurfaceTableCellSnapshot[];
|
|
556
|
-
gridBefore?: number;
|
|
557
|
-
gridAfter?: number;
|
|
558
|
-
height?: number;
|
|
559
|
-
heightRule?: "auto" | "atLeast" | "exact";
|
|
560
|
-
isHeader?: boolean;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
export type SurfaceBlockSnapshot =
|
|
564
|
-
| {
|
|
565
|
-
blockId: string;
|
|
566
|
-
kind: "paragraph";
|
|
567
|
-
from: number;
|
|
568
|
-
to: number;
|
|
569
|
-
styleId?: string;
|
|
570
|
-
numbering?: {
|
|
571
|
-
numberingInstanceId: string;
|
|
572
|
-
level: number;
|
|
573
|
-
};
|
|
574
|
-
numberingPrefix?: string;
|
|
575
|
-
numberingSuffix?: "tab" | "space" | "nothing";
|
|
576
|
-
alignment?: "left" | "center" | "right" | "both" | "distribute";
|
|
577
|
-
spacing?: { before?: number; after?: number; line?: number; lineRule?: string };
|
|
578
|
-
contextualSpacing?: boolean;
|
|
579
|
-
indentation?: { left?: number; right?: number; firstLine?: number; hanging?: number };
|
|
580
|
-
borders?: { top?: unknown; left?: unknown; bottom?: unknown; right?: unknown; bar?: unknown; between?: unknown };
|
|
581
|
-
shading?: { fill?: string; color?: string; val?: string };
|
|
582
|
-
tabStops?: Array<{ pos: number; val?: string; leader?: string }>;
|
|
583
|
-
keepNext?: boolean;
|
|
584
|
-
keepLines?: boolean;
|
|
585
|
-
pageBreakBefore?: boolean;
|
|
586
|
-
outlineLevel?: number;
|
|
587
|
-
bidi?: boolean;
|
|
588
|
-
suppressLineNumbers?: boolean;
|
|
589
|
-
segments: SurfaceInlineSegment[];
|
|
590
|
-
}
|
|
591
|
-
| {
|
|
592
|
-
blockId: string;
|
|
593
|
-
kind: "table";
|
|
594
|
-
from: number;
|
|
595
|
-
to: number;
|
|
596
|
-
styleId?: string;
|
|
597
|
-
gridColumns: number[];
|
|
598
|
-
alignment?: "left" | "center" | "right";
|
|
599
|
-
tblLook?: {
|
|
600
|
-
firstRow?: boolean;
|
|
601
|
-
lastRow?: boolean;
|
|
602
|
-
firstColumn?: boolean;
|
|
603
|
-
lastColumn?: boolean;
|
|
604
|
-
noHBand?: boolean;
|
|
605
|
-
noVBand?: boolean;
|
|
606
|
-
};
|
|
607
|
-
rows: SurfaceTableRowSnapshot[];
|
|
608
|
-
}
|
|
609
|
-
| {
|
|
610
|
-
blockId: string;
|
|
611
|
-
kind: "sdt_block";
|
|
612
|
-
from: number;
|
|
613
|
-
to: number;
|
|
614
|
-
sdtType?: string;
|
|
615
|
-
alias?: string;
|
|
616
|
-
tag?: string;
|
|
617
|
-
lock?: string;
|
|
618
|
-
checkboxChecked?: boolean;
|
|
619
|
-
dateValue?: string;
|
|
620
|
-
dropdownItems?: Array<{ displayText?: string; value: string }>;
|
|
621
|
-
comboBoxItems?: Array<{ displayText?: string; value: string }>;
|
|
622
|
-
showingPlcHdr?: boolean;
|
|
623
|
-
children: SurfaceBlockSnapshot[];
|
|
624
|
-
}
|
|
625
|
-
| {
|
|
626
|
-
blockId: string;
|
|
627
|
-
kind: "opaque_block";
|
|
628
|
-
from: number;
|
|
629
|
-
to: number;
|
|
630
|
-
fragmentId: string;
|
|
631
|
-
warningId: string;
|
|
632
|
-
label: string;
|
|
633
|
-
detail: string;
|
|
634
|
-
state: "locked-preserve-only";
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
export interface SecondaryStorySurface {
|
|
638
|
-
target: EditorStoryTarget;
|
|
639
|
-
label: string;
|
|
640
|
-
storySize: number;
|
|
641
|
-
blocks: SurfaceBlockSnapshot[];
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
export interface EditorSurfaceSnapshot {
|
|
645
|
-
storySize: number;
|
|
646
|
-
plainText: string;
|
|
647
|
-
blocks: SurfaceBlockSnapshot[];
|
|
648
|
-
lockedFragmentIds: string[];
|
|
649
|
-
secondaryStories: SecondaryStorySurface[];
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
export type EditorWarningCode =
|
|
653
|
-
| "unsupported_ooxml_preserved"
|
|
654
|
-
| "unsupported_ooxml_locked"
|
|
655
|
-
| "import_normalized"
|
|
656
|
-
| "export_roundtrip_risk"
|
|
657
|
-
| "comment_anchor_detached"
|
|
658
|
-
| "revision_anchor_detached"
|
|
659
|
-
| "large_document_degraded"
|
|
660
|
-
| "font_substitution"
|
|
661
|
-
| "image_missing";
|
|
662
|
-
|
|
663
|
-
export interface EditorWarning {
|
|
664
|
-
warningId: string;
|
|
665
|
-
code: EditorWarningCode;
|
|
666
|
-
severity: "info" | "warning";
|
|
667
|
-
message: string;
|
|
668
|
-
source:
|
|
669
|
-
| "import"
|
|
670
|
-
| "runtime"
|
|
671
|
-
| "review"
|
|
672
|
-
| "preservation"
|
|
673
|
-
| "validation"
|
|
674
|
-
| "export";
|
|
675
|
-
affectedAnchor?: EditorAnchorProjection;
|
|
676
|
-
featureEntryId?: string;
|
|
677
|
-
details?: Record<string, unknown>;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
export type EditorErrorCode =
|
|
681
|
-
| "import_failed"
|
|
682
|
-
| "export_failed"
|
|
683
|
-
| "package_corrupt"
|
|
684
|
-
| "validation_failed"
|
|
685
|
-
| "datastore_failed"
|
|
686
|
-
| "internal_invariant";
|
|
687
|
-
|
|
688
|
-
export interface EditorError {
|
|
689
|
-
errorId: string;
|
|
690
|
-
code: EditorErrorCode;
|
|
691
|
-
message: string;
|
|
692
|
-
isFatal: boolean;
|
|
693
|
-
source: "import" | "runtime" | "validation" | "datastore" | "host" | "export";
|
|
694
|
-
details?: Record<string, unknown>;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
export type CompatibilityFeatureClass =
|
|
698
|
-
| "supported-roundtrip"
|
|
699
|
-
| "preserve-only"
|
|
700
|
-
| "unsupported-fatal";
|
|
701
|
-
|
|
702
|
-
export interface CompatibilityFeatureEntry {
|
|
703
|
-
featureEntryId: string;
|
|
704
|
-
featureKey: string;
|
|
705
|
-
featureClass: CompatibilityFeatureClass;
|
|
706
|
-
message: string;
|
|
707
|
-
affectedAnchor?: EditorAnchorProjection;
|
|
708
|
-
details?: Record<string, unknown>;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
export interface CompatibilityReport {
|
|
712
|
-
reportVersion: "compatibility-report/1";
|
|
713
|
-
generatedAt: string;
|
|
714
|
-
blockExport: boolean;
|
|
715
|
-
featureEntries: CompatibilityFeatureEntry[];
|
|
716
|
-
warnings: EditorWarning[];
|
|
717
|
-
errors: EditorError[];
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
export interface CompatibilityPanelSnapshot {
|
|
721
|
-
blockExport: boolean;
|
|
722
|
-
blockExportReasons: string[];
|
|
723
|
-
warningCount: number;
|
|
724
|
-
errorCount: number;
|
|
725
|
-
featureEntries: CompatibilityFeatureEntry[];
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
export type ViewMode = "editing" | "review" | "view";
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* Runtime document-mode — controls whether editing is unrestricted, restricted
|
|
732
|
-
* to suggestions, or fully read-only at the document level.
|
|
733
|
-
*
|
|
734
|
-
* Distinct from `ViewMode` (editor posture) and `WorkspaceMode` (shell layout).
|
|
735
|
-
* `DocumentMode` reflects document-level editing authority, not presentation.
|
|
736
|
-
*/
|
|
737
|
-
export type DocumentMode = "editing" | "suggesting" | "viewing";
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* A single permission range parsed from `w:permStart` / `w:permEnd` in the
|
|
741
|
-
* source package. Ranges carry stable ids, edit-rights metadata, and an
|
|
742
|
-
* enforcement reason that the UI can display.
|
|
743
|
-
*/
|
|
744
|
-
export interface ProtectionRange {
|
|
745
|
-
/** Stable range id from `w:id` on the originating `w:permStart`. */
|
|
746
|
-
rangeId: string;
|
|
747
|
-
/** Start offset of the editable range when the runtime can map it safely. */
|
|
748
|
-
start?: number;
|
|
749
|
-
/** End offset of the editable range when the runtime can map it safely. */
|
|
750
|
-
end?: number;
|
|
751
|
-
/** Editor group allowed to edit this range (`w:edGrp`), if specified. */
|
|
752
|
-
editorGroup?: string;
|
|
753
|
-
/** Specific editor identity (`w:ed`), if specified. */
|
|
754
|
-
editor?: string;
|
|
755
|
-
/** Whether this range is currently enforced by the runtime. */
|
|
756
|
-
enforced: boolean;
|
|
757
|
-
/** Human-readable reason for the enforcement state. */
|
|
758
|
-
enforcementReason: string;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* Snapshot of the document's protection posture. Descriptive and bounded —
|
|
763
|
-
* no public bypass around protected ranges, export blockers, or preserve-only
|
|
764
|
-
* regions.
|
|
765
|
-
*/
|
|
766
|
-
export interface ProtectionSnapshot {
|
|
767
|
-
/** Whether document-level protection is declared in the source package. */
|
|
768
|
-
hasDocumentProtection: boolean;
|
|
769
|
-
/**
|
|
770
|
-
* The declared protection edit type from `w:documentProtection` in
|
|
771
|
-
* `settings.xml` (e.g. `"readOnly"`, `"comments"`, `"trackedChanges"`,
|
|
772
|
-
* `"forms"`, `"none"`). `undefined` when no protection element exists.
|
|
773
|
-
*/
|
|
774
|
-
editType?: string;
|
|
775
|
-
/** Whether the declared protection is enforced (`w:enforcement="1"`). */
|
|
776
|
-
enforcementActive: boolean;
|
|
777
|
-
/** All parsed permission ranges from the source package. */
|
|
778
|
-
ranges: ProtectionRange[];
|
|
779
|
-
/** Count of permission ranges that are currently enforced. */
|
|
780
|
-
enforcedRangeCount: number;
|
|
781
|
-
/** Count of permission ranges preserved but not live-enforced. */
|
|
782
|
-
preservedRangeCount: number;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
export type CaretAffinity = "forward" | "backward" | "none";
|
|
786
|
-
|
|
787
|
-
export interface ActiveListContext {
|
|
788
|
-
numberingInstanceId: string;
|
|
789
|
-
level: number;
|
|
790
|
-
isOrdered: boolean;
|
|
791
|
-
markerText?: string;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
export interface ActiveNoteContext {
|
|
795
|
-
noteKind: "footnote" | "endnote";
|
|
796
|
-
noteId: string;
|
|
797
|
-
referencePosition: number;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
export interface PageRegionHitTest {
|
|
801
|
-
region: "body" | "header" | "footer" | "margin" | "gutter";
|
|
802
|
-
sectionIndex: number;
|
|
803
|
-
columnIndex: number;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
export interface LayoutMeasurement {
|
|
807
|
-
pageRegions: PageRegionHitTest[];
|
|
808
|
-
caretAffinity: CaretAffinity;
|
|
809
|
-
tabStops: Array<{ pos: number; val?: string; leader?: string }>;
|
|
810
|
-
listMarkerLane?: { indent: number; markerWidth: number };
|
|
811
|
-
objectFrame?: { kind: "image" | "textbox" | "shape"; anchorPos: number; display: "inline" | "floating" };
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
export interface EditorViewStateSnapshot {
|
|
815
|
-
viewMode: ViewMode;
|
|
816
|
-
documentMode: DocumentMode;
|
|
817
|
-
workspaceMode: WorkspaceMode;
|
|
818
|
-
zoomLevel: ZoomLevel;
|
|
819
|
-
activeStory: EditorStoryTarget;
|
|
820
|
-
selection: SelectionSnapshot;
|
|
821
|
-
caretAffinity: CaretAffinity;
|
|
822
|
-
activeListContext: ActiveListContext | null;
|
|
823
|
-
activeNoteContext: ActiveNoteContext | null;
|
|
824
|
-
activePageRegion: PageRegionHitTest | null;
|
|
825
|
-
activeObjectFrame: LayoutMeasurement["objectFrame"] | null;
|
|
826
|
-
measurement: LayoutMeasurement;
|
|
827
|
-
isFocused: boolean;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
export interface CommandStateSnapshot {
|
|
831
|
-
canUndo: boolean;
|
|
832
|
-
canRedo: boolean;
|
|
833
|
-
readOnly: boolean;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
export interface RuntimeRenderSnapshot {
|
|
837
|
-
documentId: string;
|
|
838
|
-
sessionId: string;
|
|
839
|
-
sourceLabel?: string;
|
|
840
|
-
revisionToken: string;
|
|
841
|
-
isReady: boolean;
|
|
842
|
-
isDirty: boolean;
|
|
843
|
-
readOnly: boolean;
|
|
844
|
-
documentMode: DocumentMode;
|
|
845
|
-
selection: SelectionSnapshot;
|
|
846
|
-
activeStory: EditorStoryTarget;
|
|
847
|
-
pageLayout?: PageLayoutSnapshot;
|
|
848
|
-
documentStats: DocumentStats;
|
|
849
|
-
comments: CommentSidebarSnapshot;
|
|
850
|
-
trackedChanges: TrackedChangesSnapshot;
|
|
851
|
-
compatibility: CompatibilityPanelSnapshot;
|
|
852
|
-
warnings: EditorWarning[];
|
|
853
|
-
fatalError?: EditorError;
|
|
854
|
-
commandState: CommandStateSnapshot;
|
|
855
|
-
surface?: EditorSurfaceSnapshot;
|
|
856
|
-
protectionSnapshot: ProtectionSnapshot;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
export interface EditorSessionState {
|
|
860
|
-
sessionVersion: "editor-session-state/1";
|
|
861
|
-
schemaVersion: RuntimePersistedEditorSnapshot["schemaVersion"];
|
|
862
|
-
documentId: string;
|
|
863
|
-
docId: string;
|
|
864
|
-
createdAt: string;
|
|
865
|
-
updatedAt: string;
|
|
866
|
-
editorBuild: string;
|
|
867
|
-
canonicalDocument: RuntimePersistedEditorSnapshot["canonicalDocument"];
|
|
868
|
-
compatibility: CompatibilityReport;
|
|
869
|
-
warningLog: EditorWarning[];
|
|
870
|
-
protectionSnapshot?: ProtectionSnapshot;
|
|
871
|
-
sourcePackage?: RuntimePersistedEditorSnapshot["sourcePackage"];
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
export interface PersistedEditorSnapshot {
|
|
875
|
-
snapshotVersion: RuntimePersistedEditorSnapshot["snapshotVersion"];
|
|
876
|
-
schemaVersion: RuntimePersistedEditorSnapshot["schemaVersion"];
|
|
877
|
-
documentId: string;
|
|
878
|
-
docId: string;
|
|
879
|
-
createdAt: string;
|
|
880
|
-
updatedAt: string;
|
|
881
|
-
savedAt: string;
|
|
882
|
-
editorBuild: string;
|
|
883
|
-
canonicalDocument: RuntimePersistedEditorSnapshot["canonicalDocument"];
|
|
884
|
-
compatibility: CompatibilityReport;
|
|
885
|
-
warningLog: EditorWarning[];
|
|
886
|
-
protectionSnapshot?: ProtectionSnapshot;
|
|
887
|
-
sourcePackage?: RuntimePersistedEditorSnapshot["sourcePackage"];
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
export interface AddCommentParams {
|
|
891
|
-
anchor?: EditorAnchorProjection;
|
|
892
|
-
body?: string;
|
|
893
|
-
authorId?: string;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
export interface ExportDocxOptions {
|
|
897
|
-
fileName?: string;
|
|
898
|
-
reason?: string;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
export interface ExportDelivery {
|
|
902
|
-
mode: "downloaded" | "persisted-by-host" | "exported-bytes-only";
|
|
903
|
-
savedAt?: string;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
export interface ExportResult {
|
|
907
|
-
bytes: Uint8Array;
|
|
908
|
-
mimeType: string;
|
|
909
|
-
fileName: string;
|
|
910
|
-
delivery: ExportDelivery;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
export type WorkflowScopeMode = "edit" | "suggest" | "comment" | "view";
|
|
914
|
-
|
|
915
|
-
export interface WorkflowCandidateRange {
|
|
916
|
-
candidateId: string;
|
|
917
|
-
storyTarget?: EditorStoryTarget;
|
|
918
|
-
anchor: EditorAnchorProjection;
|
|
919
|
-
label?: string;
|
|
920
|
-
source?: "search" | "playbook" | "host" | "ai";
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
export interface WorkflowScope {
|
|
924
|
-
scopeId: string;
|
|
925
|
-
mode: WorkflowScopeMode;
|
|
926
|
-
anchor: EditorAnchorProjection;
|
|
927
|
-
storyTarget?: EditorStoryTarget;
|
|
928
|
-
workItemId?: string;
|
|
929
|
-
label?: string;
|
|
930
|
-
domain?: "legal" | "commercial" | "finance" | "other";
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
export interface WorkflowWorkItem {
|
|
934
|
-
workItemId: string;
|
|
935
|
-
title: string;
|
|
936
|
-
description?: string;
|
|
937
|
-
domain?: "legal" | "commercial" | "finance" | "other";
|
|
938
|
-
status?: "pending" | "active" | "done" | "blocked";
|
|
939
|
-
scopeIds: string[];
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
export interface WorkflowOverlay {
|
|
943
|
-
overlayVersion: "workflow-overlay/1";
|
|
944
|
-
candidates?: WorkflowCandidateRange[];
|
|
945
|
-
scopes: WorkflowScope[];
|
|
946
|
-
workItems?: WorkflowWorkItem[];
|
|
947
|
-
activeWorkItemId?: string | null;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
export interface WorkflowBlockedCommandReason {
|
|
951
|
-
code:
|
|
952
|
-
| "outside_workflow_scope"
|
|
953
|
-
| "workflow_comment_only"
|
|
954
|
-
| "workflow_view_only"
|
|
955
|
-
| "workflow_preserve_only"
|
|
956
|
-
| "workflow_blocked_import"
|
|
957
|
-
| "document_read_only"
|
|
958
|
-
| "document_viewing_mode"
|
|
959
|
-
| "protected_range"
|
|
960
|
-
| "unsupported_surface"
|
|
961
|
-
| "suggesting_unsupported";
|
|
962
|
-
message: string;
|
|
963
|
-
scopeId?: string;
|
|
964
|
-
workItemId?: string;
|
|
965
|
-
anchor?: EditorAnchorProjection;
|
|
966
|
-
storyTarget?: EditorStoryTarget;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
export interface WorkflowScopeSnapshot {
|
|
970
|
-
overlayPresent: boolean;
|
|
971
|
-
activeWorkItemId?: string | null;
|
|
972
|
-
activeWorkItem?: WorkflowWorkItem;
|
|
973
|
-
scopes: WorkflowScope[];
|
|
974
|
-
candidates: WorkflowCandidateRange[];
|
|
975
|
-
blockedReasons: WorkflowBlockedCommandReason[];
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
export type EffectiveSelectionMode = WorkflowScopeMode | "blocked";
|
|
979
|
-
|
|
980
|
-
export interface InteractionGuardSnapshot {
|
|
981
|
-
effectiveMode: EffectiveSelectionMode;
|
|
982
|
-
matchedScopeId?: string;
|
|
983
|
-
matchedScopeMode?: WorkflowScopeMode;
|
|
984
|
-
disabledReason?: string;
|
|
985
|
-
blockedReasons: WorkflowBlockedCommandReason[];
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
export type WorkflowMarkupKind =
|
|
989
|
-
| "highlight"
|
|
990
|
-
| "comment"
|
|
991
|
-
| "revision"
|
|
992
|
-
| "field"
|
|
993
|
-
| "protected_range"
|
|
994
|
-
| "opaque_fragment";
|
|
995
|
-
|
|
996
|
-
export interface WorkflowMarkupBase {
|
|
997
|
-
markupId: string;
|
|
998
|
-
kind: WorkflowMarkupKind;
|
|
999
|
-
anchor: EditorAnchorProjection;
|
|
1000
|
-
storyTarget?: EditorStoryTarget;
|
|
1001
|
-
label: string;
|
|
1002
|
-
excerpt?: string;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
export interface WorkflowHighlightMarkup extends WorkflowMarkupBase {
|
|
1006
|
-
kind: "highlight";
|
|
1007
|
-
color: string;
|
|
1008
|
-
text: string;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
export interface WorkflowCommentMarkup extends WorkflowMarkupBase {
|
|
1012
|
-
kind: "comment";
|
|
1013
|
-
commentId: string;
|
|
1014
|
-
status: CommentSidebarThreadSnapshot["status"];
|
|
1015
|
-
warningCount: number;
|
|
1016
|
-
entryCount: number;
|
|
1017
|
-
createdAt: string;
|
|
1018
|
-
createdBy: string;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
export interface WorkflowRevisionMarkup extends WorkflowMarkupBase {
|
|
1022
|
-
kind: "revision";
|
|
1023
|
-
revisionId: string;
|
|
1024
|
-
revisionKind: TrackedChangeEntrySnapshot["kind"];
|
|
1025
|
-
status: TrackedChangeEntrySnapshot["status"];
|
|
1026
|
-
actionability: TrackedChangeEntrySnapshot["actionability"];
|
|
1027
|
-
authorId: string;
|
|
1028
|
-
createdAt: string;
|
|
1029
|
-
preserveOnlyReason?: string;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
export interface WorkflowFieldMarkup extends WorkflowMarkupBase {
|
|
1033
|
-
kind: "field";
|
|
1034
|
-
fieldIndex: number;
|
|
1035
|
-
fieldFamily: FieldFamily;
|
|
1036
|
-
fieldTarget?: string;
|
|
1037
|
-
refreshStatus: FieldRefreshStatus;
|
|
1038
|
-
displayText: string;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
export interface WorkflowProtectedRangeMarkup extends WorkflowMarkupBase {
|
|
1042
|
-
kind: "protected_range";
|
|
1043
|
-
rangeId: string;
|
|
1044
|
-
enforced: boolean;
|
|
1045
|
-
enforcementReason: string;
|
|
1046
|
-
editorGroup?: string;
|
|
1047
|
-
editor?: string;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
export interface WorkflowOpaqueFragmentMarkup extends WorkflowMarkupBase {
|
|
1051
|
-
kind: "opaque_fragment";
|
|
1052
|
-
fragmentId: string;
|
|
1053
|
-
warningId: string;
|
|
1054
|
-
detail: string;
|
|
1055
|
-
blockedReasonCode: "workflow_preserve_only" | "workflow_blocked_import";
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
export type WorkflowMarkupItem =
|
|
1059
|
-
| WorkflowHighlightMarkup
|
|
1060
|
-
| WorkflowCommentMarkup
|
|
1061
|
-
| WorkflowRevisionMarkup
|
|
1062
|
-
| WorkflowFieldMarkup
|
|
1063
|
-
| WorkflowProtectedRangeMarkup
|
|
1064
|
-
| WorkflowOpaqueFragmentMarkup;
|
|
1065
|
-
|
|
1066
|
-
export interface WorkflowMarkupSnapshot {
|
|
1067
|
-
totalCount: number;
|
|
1068
|
-
items: WorkflowMarkupItem[];
|
|
1069
|
-
highlights: WorkflowHighlightMarkup[];
|
|
1070
|
-
comments: WorkflowCommentMarkup[];
|
|
1071
|
-
revisions: WorkflowRevisionMarkup[];
|
|
1072
|
-
fields: WorkflowFieldMarkup[];
|
|
1073
|
-
protectedRanges: WorkflowProtectedRangeMarkup[];
|
|
1074
|
-
opaqueFragments: WorkflowOpaqueFragmentMarkup[];
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
export type HostAnnotationKind =
|
|
1078
|
-
| "note"
|
|
1079
|
-
| "scope_hint"
|
|
1080
|
-
| "readonly_marker"
|
|
1081
|
-
| "suggestion"
|
|
1082
|
-
| "warning";
|
|
1083
|
-
|
|
1084
|
-
export interface HostAnnotationItem {
|
|
1085
|
-
annotationId: string;
|
|
1086
|
-
kind: HostAnnotationKind;
|
|
1087
|
-
label: string;
|
|
1088
|
-
anchor: EditorAnchorProjection;
|
|
1089
|
-
storyTarget?: EditorStoryTarget;
|
|
1090
|
-
detail?: string;
|
|
1091
|
-
scopeMode?: WorkflowScopeMode;
|
|
1092
|
-
severity?: "low" | "medium" | "high";
|
|
1093
|
-
workItemId?: string;
|
|
1094
|
-
provenance: "host";
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
export interface HostAnnotationOverlay {
|
|
1098
|
-
overlayVersion: "host-annotation-overlay/1";
|
|
1099
|
-
annotations: HostAnnotationItem[];
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
export interface HostAnnotationSnapshot {
|
|
1103
|
-
totalCount: number;
|
|
1104
|
-
annotations: HostAnnotationItem[];
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
export interface WorkflowCandidateRangeOptions {
|
|
1108
|
-
kinds?: WorkflowMarkupKind[];
|
|
1109
|
-
includeDetached?: boolean;
|
|
1110
|
-
source?: WorkflowCandidateRange["source"];
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
export type AutosaveState =
|
|
1114
|
-
| { status: "idle" }
|
|
1115
|
-
| { status: "saving" }
|
|
1116
|
-
| { status: "saved"; savedAt: string }
|
|
1117
|
-
| { status: "error"; error: EditorError };
|
|
1118
|
-
|
|
1119
|
-
export interface AutosaveConfig {
|
|
1120
|
-
enabled?: boolean;
|
|
1121
|
-
debounceMs?: number;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
export type WordReviewEditorEvent =
|
|
1125
|
-
| {
|
|
1126
|
-
type: "ready";
|
|
1127
|
-
documentId: string;
|
|
1128
|
-
sessionId: string;
|
|
1129
|
-
source: "docx" | "session" | "snapshot";
|
|
1130
|
-
stats: DocumentStats;
|
|
1131
|
-
compatibility: CompatibilityReport;
|
|
1132
|
-
comments: CommentSidebarSnapshot;
|
|
1133
|
-
trackedChanges: TrackedChangesSnapshot;
|
|
1134
|
-
}
|
|
1135
|
-
| {
|
|
1136
|
-
type: "dirty_changed";
|
|
1137
|
-
documentId: string;
|
|
1138
|
-
isDirty: boolean;
|
|
1139
|
-
}
|
|
1140
|
-
| {
|
|
1141
|
-
type: "selection_changed";
|
|
1142
|
-
documentId: string;
|
|
1143
|
-
selection: SelectionSnapshot;
|
|
1144
|
-
}
|
|
1145
|
-
| {
|
|
1146
|
-
type: "comment_added";
|
|
1147
|
-
documentId: string;
|
|
1148
|
-
commentId: string;
|
|
1149
|
-
anchor: EditorAnchorProjection;
|
|
1150
|
-
}
|
|
1151
|
-
| {
|
|
1152
|
-
type: "comment_resolved";
|
|
1153
|
-
documentId: string;
|
|
1154
|
-
commentId: string;
|
|
1155
|
-
}
|
|
1156
|
-
| {
|
|
1157
|
-
type: "change_accepted";
|
|
1158
|
-
documentId: string;
|
|
1159
|
-
changeId: string;
|
|
1160
|
-
}
|
|
1161
|
-
| {
|
|
1162
|
-
type: "change_rejected";
|
|
1163
|
-
documentId: string;
|
|
1164
|
-
changeId: string;
|
|
1165
|
-
}
|
|
1166
|
-
| {
|
|
1167
|
-
type: "story_changed";
|
|
1168
|
-
documentId: string;
|
|
1169
|
-
activeStory: EditorStoryTarget;
|
|
1170
|
-
}
|
|
1171
|
-
| {
|
|
1172
|
-
type: "warning_added";
|
|
1173
|
-
documentId: string;
|
|
1174
|
-
warning: EditorWarning;
|
|
1175
|
-
}
|
|
1176
|
-
| {
|
|
1177
|
-
type: "warning_cleared";
|
|
1178
|
-
documentId: string;
|
|
1179
|
-
warningId: string;
|
|
1180
|
-
code: EditorWarningCode;
|
|
1181
|
-
}
|
|
1182
|
-
| {
|
|
1183
|
-
type: "error";
|
|
1184
|
-
documentId: string;
|
|
1185
|
-
error: EditorError;
|
|
1186
|
-
}
|
|
1187
|
-
| {
|
|
1188
|
-
type: "autosave_state";
|
|
1189
|
-
documentId: string;
|
|
1190
|
-
state: AutosaveState;
|
|
1191
|
-
}
|
|
1192
|
-
| {
|
|
1193
|
-
type: "snapshot_saved";
|
|
1194
|
-
documentId: string;
|
|
1195
|
-
snapshot: PersistedEditorSnapshot;
|
|
1196
|
-
isAutosave: boolean;
|
|
1197
|
-
}
|
|
1198
|
-
| {
|
|
1199
|
-
type: "session_saved";
|
|
1200
|
-
documentId: string;
|
|
1201
|
-
sessionState: EditorSessionState;
|
|
1202
|
-
savedAt: string;
|
|
1203
|
-
isAutosave: boolean;
|
|
1204
|
-
}
|
|
1205
|
-
| {
|
|
1206
|
-
type: "export_completed";
|
|
1207
|
-
documentId: string;
|
|
1208
|
-
result: ExportResult;
|
|
1209
|
-
}
|
|
1210
|
-
| {
|
|
1211
|
-
type: "workflow_overlay_changed";
|
|
1212
|
-
documentId: string;
|
|
1213
|
-
snapshot: WorkflowScopeSnapshot;
|
|
1214
|
-
}
|
|
1215
|
-
| {
|
|
1216
|
-
type: "workflow_active_work_item_changed";
|
|
1217
|
-
documentId: string;
|
|
1218
|
-
activeWorkItemId: string | null;
|
|
1219
|
-
}
|
|
1220
|
-
| {
|
|
1221
|
-
type: "host_annotation_overlay_changed";
|
|
1222
|
-
documentId: string;
|
|
1223
|
-
snapshot: HostAnnotationSnapshot;
|
|
1224
|
-
}
|
|
1225
|
-
| {
|
|
1226
|
-
type: "change_authored";
|
|
1227
|
-
documentId: string;
|
|
1228
|
-
changeId: string;
|
|
1229
|
-
kind: "insertion" | "deletion";
|
|
1230
|
-
}
|
|
1231
|
-
| {
|
|
1232
|
-
type: "command_blocked";
|
|
1233
|
-
documentId: string;
|
|
1234
|
-
command: string;
|
|
1235
|
-
reasons: WorkflowBlockedCommandReason[];
|
|
1236
|
-
};
|
|
1237
|
-
|
|
1238
|
-
export interface LoadResult {
|
|
1239
|
-
source?: ExternalDocumentSource;
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
export interface SaveSnapshotParams {
|
|
1243
|
-
documentId: string;
|
|
1244
|
-
snapshot: PersistedEditorSnapshot;
|
|
1245
|
-
isAutosave: boolean;
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
export interface SaveSnapshotResult {
|
|
1249
|
-
savedAt: string;
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
export interface SaveSessionParams {
|
|
1253
|
-
documentId: string;
|
|
1254
|
-
sessionState: EditorSessionState;
|
|
1255
|
-
isAutosave: boolean;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
export interface SaveSessionResult {
|
|
1259
|
-
savedAt: string;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
export interface SaveExportParams {
|
|
1263
|
-
documentId: string;
|
|
1264
|
-
result: ExportResult;
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
export interface SaveExportResult {
|
|
1268
|
-
savedAt: string;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
export interface EditorTelemetryEvent {
|
|
1272
|
-
type: string;
|
|
1273
|
-
documentId: string;
|
|
1274
|
-
detail?: Record<string, unknown>;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
export interface EditorHostAdapter {
|
|
1278
|
-
load?(params: LoadRequest): Promise<LoadResult>;
|
|
1279
|
-
saveSession?(params: SaveSessionParams): Promise<SaveSessionResult>;
|
|
1280
|
-
saveExport?(params: SaveExportParams): Promise<SaveExportResult>;
|
|
1281
|
-
logEvent?(event: EditorTelemetryEvent): void;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
export interface EditorDatastoreAdapter {
|
|
1285
|
-
load(params: LoadRequest): Promise<LoadResult>;
|
|
1286
|
-
saveSnapshot(params: SaveSnapshotParams): Promise<SaveSnapshotResult>;
|
|
1287
|
-
saveExport?(params: SaveExportParams): Promise<SaveExportResult>;
|
|
1288
|
-
logEvent?(event: EditorTelemetryEvent): void;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
export interface WordReviewEditorRef {
|
|
1292
|
-
focus(): void;
|
|
1293
|
-
blur(): void;
|
|
1294
|
-
undo(): void;
|
|
1295
|
-
redo(): void;
|
|
1296
|
-
addComment(params: AddCommentParams): string;
|
|
1297
|
-
openComment(commentId: string): void;
|
|
1298
|
-
resolveComment(commentId: string): void;
|
|
1299
|
-
reopenComment(commentId: string): void;
|
|
1300
|
-
addCommentReply(commentId: string, body: string): void;
|
|
1301
|
-
editCommentBody(commentId: string, body: string): void;
|
|
1302
|
-
deleteComment(commentId: string): void;
|
|
1303
|
-
acceptChange(changeId: string): void;
|
|
1304
|
-
rejectChange(changeId: string): void;
|
|
1305
|
-
acceptAllChanges(): void;
|
|
1306
|
-
rejectAllChanges(): void;
|
|
1307
|
-
exportDocx(options?: ExportDocxOptions): Promise<ExportResult>;
|
|
1308
|
-
getSessionState(): EditorSessionState;
|
|
1309
|
-
getSnapshot(): PersistedEditorSnapshot;
|
|
1310
|
-
getRenderSnapshot(): RuntimeRenderSnapshot;
|
|
1311
|
-
getCompatibilityReport(): CompatibilityReport;
|
|
1312
|
-
getWarnings(): EditorWarning[];
|
|
1313
|
-
getCommentSidebarSnapshot(): CommentSidebarSnapshot;
|
|
1314
|
-
getTrackedChangesSnapshot(): TrackedChangesSnapshot;
|
|
1315
|
-
getComments(): CommentSidebarSnapshot;
|
|
1316
|
-
getTrackedChanges(): TrackedChangesSnapshot;
|
|
1317
|
-
isDirty(): boolean;
|
|
1318
|
-
getFormattingState(): FormattingStateSnapshot;
|
|
1319
|
-
getStyleCatalog(): StyleCatalogSnapshot;
|
|
1320
|
-
replaceText(text: string, target?: EditorAnchorProjection): void;
|
|
1321
|
-
toggleBold(): void;
|
|
1322
|
-
toggleItalic(): void;
|
|
1323
|
-
toggleUnderline(): void;
|
|
1324
|
-
toggleStrikethrough(): void;
|
|
1325
|
-
toggleSuperscript(): void;
|
|
1326
|
-
toggleSubscript(): void;
|
|
1327
|
-
setFontFamily(fontFamily: string | null): void;
|
|
1328
|
-
setFontSize(size: number | null): void;
|
|
1329
|
-
setTextColor(color: string | null): void;
|
|
1330
|
-
setHighlightColor(color: string | null): void;
|
|
1331
|
-
setAlignment(alignment: FormattingAlignment): void;
|
|
1332
|
-
setParagraphStyle(styleId: string | null): void;
|
|
1333
|
-
setTableStyle(styleId: string | null): void;
|
|
1334
|
-
indent(): void;
|
|
1335
|
-
outdent(): void;
|
|
1336
|
-
insertPageBreak(): void;
|
|
1337
|
-
insertTable(options: InsertTableOptions): void;
|
|
1338
|
-
insertImage(options: InsertImageOptions): void;
|
|
1339
|
-
addRowBefore(): void;
|
|
1340
|
-
addRowAfter(): void;
|
|
1341
|
-
addColumnBefore(): void;
|
|
1342
|
-
addColumnAfter(): void;
|
|
1343
|
-
deleteRow(): void;
|
|
1344
|
-
deleteColumn(): void;
|
|
1345
|
-
deleteTable(): void;
|
|
1346
|
-
mergeCells(): void;
|
|
1347
|
-
splitCell(): void;
|
|
1348
|
-
setCellBackground(color: string): void;
|
|
1349
|
-
search(query: string, options?: SearchOptions): SearchResultSnapshot[];
|
|
1350
|
-
clearSearch(): void;
|
|
1351
|
-
setSelection(selection: SelectionSnapshot | null): void;
|
|
1352
|
-
scrollToRevision(revisionId: string): void;
|
|
1353
|
-
scrollToComment(commentId: string): void;
|
|
1354
|
-
openStory(target: EditorStoryTarget): void;
|
|
1355
|
-
closeStory(): void;
|
|
1356
|
-
getPageLayoutSnapshot(): PageLayoutSnapshot | null;
|
|
1357
|
-
getDocumentNavigationSnapshot(): DocumentNavigationSnapshot;
|
|
1358
|
-
getFieldSnapshot(): FieldSnapshot;
|
|
1359
|
-
updateFields(options?: UpdateFieldsOptions): UpdateFieldsResult;
|
|
1360
|
-
updateTableOfContents(options?: TocRefreshOptions): TocRefreshResult;
|
|
1361
|
-
getViewState(): EditorViewStateSnapshot;
|
|
1362
|
-
setDocumentMode(mode: DocumentMode): void;
|
|
1363
|
-
getProtectionSnapshot(): ProtectionSnapshot;
|
|
1364
|
-
setWorkspaceMode(mode: WorkspaceMode): void;
|
|
1365
|
-
setZoom(level: ZoomLevel): void;
|
|
1366
|
-
insertSectionBreak(type: SectionBreakType, options?: { afterSectionIndex?: number }): void;
|
|
1367
|
-
deleteSectionBreak(sectionIndex: number): void;
|
|
1368
|
-
updateSectionLayout(sectionIndex: number, patch: SectionLayoutPatch): void;
|
|
1369
|
-
setSectionPageNumbering(
|
|
1370
|
-
sectionIndex: number,
|
|
1371
|
-
patch: SectionPageNumberingPatch | null,
|
|
1372
|
-
): void;
|
|
1373
|
-
setHeaderFooterLink(sectionIndex: number, params: HeaderFooterLinkPatch): void;
|
|
1374
|
-
setImageLayout(mediaId: string, dimensions: { widthEmu: number; heightEmu: number }): void;
|
|
1375
|
-
setImageFrame(mediaId: string, offsets: { horizontalOffsetEmu?: number; verticalOffsetEmu?: number }): void;
|
|
1376
|
-
setWorkflowOverlay(overlay: WorkflowOverlay): void;
|
|
1377
|
-
clearWorkflowOverlay(): void;
|
|
1378
|
-
getWorkflowScopeSnapshot(): WorkflowScopeSnapshot | null;
|
|
1379
|
-
getInteractionGuardSnapshot(): InteractionGuardSnapshot;
|
|
1380
|
-
getWorkflowMarkupSnapshot(): WorkflowMarkupSnapshot;
|
|
1381
|
-
setHostAnnotationOverlay(overlay: HostAnnotationOverlay): void;
|
|
1382
|
-
clearHostAnnotationOverlay(): void;
|
|
1383
|
-
getHostAnnotationSnapshot(): HostAnnotationSnapshot;
|
|
1384
|
-
getWorkflowCandidateRanges(options?: WorkflowCandidateRangeOptions): WorkflowCandidateRange[];
|
|
1385
|
-
replaceWorkflowMarkupText(markupId: string, text: string): void;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
export interface WordReviewEditorProps {
|
|
1389
|
-
documentId: string;
|
|
1390
|
-
currentUser: EditorUser;
|
|
1391
|
-
initialDocx?: Uint8Array | ArrayBuffer;
|
|
1392
|
-
initialSessionState?: EditorSessionState;
|
|
1393
|
-
initialSnapshot?: PersistedEditorSnapshot;
|
|
1394
|
-
initialSourceLabel?: string;
|
|
1395
|
-
externalDocumentRevision?: string;
|
|
1396
|
-
externalDocSource?: ExternalDocumentSource;
|
|
1397
|
-
loadRevision?: string;
|
|
1398
|
-
loadSourcePolicy?: LoadSourcePolicy;
|
|
1399
|
-
readOnly?: boolean;
|
|
1400
|
-
reviewMode?: "editing" | "review";
|
|
1401
|
-
suggestionsEnabled?: boolean;
|
|
1402
|
-
markupDisplay?: "clean" | "simple" | "all";
|
|
1403
|
-
showReviewPanel?: boolean;
|
|
1404
|
-
chromeVisibility?: Partial<WordReviewEditorChromeVisibility>;
|
|
1405
|
-
hostAdapter?: EditorHostAdapter;
|
|
1406
|
-
datastore?: EditorDatastoreAdapter;
|
|
1407
|
-
autosave?: AutosaveConfig;
|
|
1408
|
-
onEvent?: (event: WordReviewEditorEvent) => void;
|
|
1409
|
-
onWarning?: (warning: EditorWarning) => void;
|
|
1410
|
-
onError?: (error: EditorError) => void;
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
export interface WordReviewEditorChromeVisibility {
|
|
1414
|
-
toolbar: boolean;
|
|
1415
|
-
alerts: boolean;
|
|
1416
|
-
selectionOverlay: boolean;
|
|
1417
|
-
contextToolbars: boolean;
|
|
1418
|
-
pageChrome: boolean;
|
|
1419
|
-
statusBar: boolean;
|
|
1420
|
-
reviewRail: boolean;
|
|
1421
|
-
}
|