@beyondwork/docx-react-component 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/package.json +24 -34
- package/src/api/README.md +5 -1
- package/src/api/public-types.ts +710 -4
- package/src/api/session-state.ts +60 -0
- package/src/core/commands/formatting-commands.ts +2 -1
- package/src/core/commands/image-commands.ts +147 -0
- package/src/core/commands/index.ts +19 -3
- package/src/core/commands/list-commands.ts +231 -36
- package/src/core/commands/paragraph-layout-commands.ts +339 -0
- package/src/core/commands/section-layout-commands.ts +680 -0
- package/src/core/commands/style-commands.ts +262 -0
- package/src/core/search/search-text.ts +357 -0
- package/src/core/selection/mapping.ts +41 -0
- package/src/core/state/editor-state.ts +4 -1
- package/src/index.ts +51 -0
- package/src/io/docx-session.ts +623 -56
- package/src/io/export/serialize-comments.ts +104 -34
- package/src/io/export/serialize-footnotes.ts +198 -1
- package/src/io/export/serialize-headers-footers.ts +203 -10
- package/src/io/export/serialize-main-document.ts +285 -8
- package/src/io/export/serialize-numbering.ts +28 -7
- package/src/io/export/split-review-boundaries.ts +181 -19
- package/src/io/normalize/normalize-text.ts +144 -32
- package/src/io/ooxml/highlight-colors.ts +39 -0
- package/src/io/ooxml/numbering-sentinels.ts +44 -0
- package/src/io/ooxml/parse-comments.ts +85 -19
- package/src/io/ooxml/parse-fields.ts +396 -0
- package/src/io/ooxml/parse-footnotes.ts +452 -22
- package/src/io/ooxml/parse-headers-footers.ts +657 -29
- package/src/io/ooxml/parse-inline-media.ts +30 -0
- package/src/io/ooxml/parse-main-document.ts +807 -20
- package/src/io/ooxml/parse-numbering.ts +7 -0
- package/src/io/ooxml/parse-revisions.ts +317 -38
- package/src/io/ooxml/parse-settings.ts +184 -0
- package/src/io/ooxml/parse-shapes.ts +25 -0
- package/src/io/ooxml/parse-styles.ts +463 -0
- package/src/io/ooxml/parse-theme.ts +32 -0
- package/src/legal/bookmarks.ts +44 -0
- package/src/legal/cross-references.ts +59 -1
- package/src/model/canonical-document.ts +250 -4
- package/src/model/cds-1.0.0.ts +13 -0
- package/src/model/snapshot.ts +87 -2
- package/src/review/store/revision-store.ts +6 -0
- package/src/review/store/revision-types.ts +1 -0
- package/src/runtime/document-layout.ts +332 -0
- package/src/runtime/document-navigation.ts +603 -0
- package/src/runtime/document-runtime.ts +1754 -78
- package/src/runtime/document-search.ts +145 -0
- package/src/runtime/numbering-prefix.ts +47 -26
- package/src/runtime/page-layout-estimation.ts +212 -0
- package/src/runtime/read-only-diagnostics-runtime.ts +9 -0
- package/src/runtime/session-capabilities.ts +35 -3
- package/src/runtime/story-context.ts +164 -0
- package/src/runtime/story-targeting.ts +162 -0
- package/src/runtime/surface-projection.ts +324 -36
- package/src/runtime/table-schema.ts +89 -7
- package/src/runtime/view-state.ts +477 -0
- package/src/runtime/workflow-markup.ts +349 -0
- package/src/ui/WordReviewEditor.tsx +2469 -1344
- package/src/ui/browser-export.ts +52 -0
- package/src/ui/editor-command-bag.ts +120 -0
- package/src/ui/editor-runtime-boundary.ts +1422 -0
- package/src/ui/editor-shell-view.tsx +134 -0
- package/src/ui/editor-surface-controller.tsx +51 -0
- package/src/ui/headless/preserve-editor-selection.ts +5 -0
- package/src/ui/headless/revision-decoration-model.ts +4 -4
- package/src/ui/headless/selection-helpers.ts +20 -0
- package/src/ui/headless/selection-toolbar-model.ts +22 -0
- package/src/ui/headless/use-editor-keyboard.ts +6 -1
- package/src/ui/runtime-snapshot-selectors.ts +197 -0
- package/src/ui-tailwind/chrome/tw-alert-banner.tsx +18 -2
- package/src/ui-tailwind/chrome/tw-image-context-toolbar.tsx +129 -0
- package/src/ui-tailwind/chrome/tw-layout-panel.tsx +114 -0
- package/src/ui-tailwind/chrome/tw-object-context-toolbar.tsx +34 -0
- package/src/ui-tailwind/chrome/tw-page-ruler.tsx +386 -0
- package/src/ui-tailwind/chrome/tw-selection-toolbar.tsx +150 -14
- package/src/ui-tailwind/chrome/tw-table-context-toolbar.tsx +128 -0
- package/src/ui-tailwind/editor-surface/perf-probe.ts +179 -0
- package/src/ui-tailwind/editor-surface/pm-command-bridge.ts +46 -7
- package/src/ui-tailwind/editor-surface/pm-contextual-ui.ts +31 -0
- package/src/ui-tailwind/editor-surface/pm-decorations.ts +35 -0
- package/src/ui-tailwind/editor-surface/pm-position-map.ts +3 -3
- package/src/ui-tailwind/editor-surface/pm-schema.ts +186 -13
- package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +191 -68
- package/src/ui-tailwind/editor-surface/search-plugin.ts +19 -68
- package/src/ui-tailwind/editor-surface/surface-build-keys.ts +51 -0
- package/src/ui-tailwind/editor-surface/tw-inline-token.tsx +11 -0
- package/src/ui-tailwind/editor-surface/tw-opaque-block.tsx +7 -1
- package/src/ui-tailwind/editor-surface/tw-prosemirror-surface.tsx +528 -85
- package/src/ui-tailwind/editor-surface/tw-table-node-view.tsx +0 -1
- package/src/ui-tailwind/index.ts +2 -1
- package/src/ui-tailwind/page-chrome-model.ts +27 -0
- package/src/ui-tailwind/review/tw-comment-sidebar.tsx +277 -147
- package/src/ui-tailwind/review/tw-health-panel.tsx +31 -2
- package/src/ui-tailwind/review/tw-review-rail.tsx +8 -8
- package/src/ui-tailwind/review/tw-revision-sidebar.tsx +15 -15
- package/src/ui-tailwind/theme/editor-theme.css +127 -0
- package/src/ui-tailwind/toolbar/tw-toolbar-icon-button.tsx +4 -0
- package/src/ui-tailwind/toolbar/tw-toolbar.tsx +829 -12
- package/src/ui-tailwind/tw-review-workspace.tsx +1238 -42
- package/src/validation/compatibility-engine.ts +119 -24
- package/src/validation/compatibility-report.ts +1 -0
- package/src/validation/diagnostics.ts +1 -0
- package/src/validation/docx-comment-proof.ts +707 -0
package/src/index.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export { WordReviewEditor } from "./ui/WordReviewEditor.tsx";
|
|
2
|
+
export {
|
|
3
|
+
createEditorSessionState,
|
|
4
|
+
editorSessionStateFromPersistedSnapshot,
|
|
5
|
+
persistedSnapshotFromEditorSessionState,
|
|
6
|
+
EDITOR_SESSION_STATE_VERSION,
|
|
7
|
+
} from "./api/session-state.ts";
|
|
2
8
|
export type {
|
|
9
|
+
LoadRequest,
|
|
10
|
+
LoadSourcePolicy,
|
|
11
|
+
EditorSessionState,
|
|
12
|
+
EditorHostAdapter,
|
|
3
13
|
WordReviewEditorProps,
|
|
4
14
|
WordReviewEditorRef,
|
|
5
15
|
EditorUser,
|
|
@@ -18,12 +28,32 @@ export type {
|
|
|
18
28
|
RuntimeRenderSnapshot,
|
|
19
29
|
SelectionSnapshot,
|
|
20
30
|
EditorAnchorProjection,
|
|
31
|
+
EditorStoryTarget,
|
|
32
|
+
PageLayoutSnapshot,
|
|
33
|
+
WorkspaceMode,
|
|
34
|
+
ZoomLevel,
|
|
35
|
+
SectionBreakType,
|
|
36
|
+
SectionLayoutPatch,
|
|
37
|
+
SectionPageNumberingPatch,
|
|
38
|
+
HeaderFooterLinkPatch,
|
|
39
|
+
EditorViewStateSnapshot,
|
|
40
|
+
ViewMode,
|
|
41
|
+
CaretAffinity,
|
|
42
|
+
ActiveListContext,
|
|
43
|
+
ActiveNoteContext,
|
|
44
|
+
PageRegionHitTest,
|
|
45
|
+
LayoutMeasurement,
|
|
21
46
|
DocumentStats,
|
|
22
47
|
CommentSidebarSnapshot,
|
|
23
48
|
CommentSidebarThreadSnapshot,
|
|
24
49
|
CommentSidebarThreadEntrySnapshot,
|
|
25
50
|
TrackedChangesSnapshot,
|
|
26
51
|
TrackedChangeEntrySnapshot,
|
|
52
|
+
StyleCatalogSnapshot,
|
|
53
|
+
StyleCatalogEntrySnapshot,
|
|
54
|
+
DocumentNavigationSnapshot,
|
|
55
|
+
DocumentPageSnapshot,
|
|
56
|
+
DocumentHeadingSnapshot,
|
|
27
57
|
AddCommentParams,
|
|
28
58
|
ExportDocxOptions,
|
|
29
59
|
ExportResult,
|
|
@@ -31,6 +61,8 @@ export type {
|
|
|
31
61
|
AutosaveState,
|
|
32
62
|
EditorTelemetryEvent,
|
|
33
63
|
LoadResult,
|
|
64
|
+
SaveSessionParams,
|
|
65
|
+
SaveSessionResult,
|
|
34
66
|
SaveSnapshotParams,
|
|
35
67
|
SaveSnapshotResult,
|
|
36
68
|
SaveExportParams,
|
|
@@ -42,4 +74,23 @@ export type {
|
|
|
42
74
|
SurfaceTextMark,
|
|
43
75
|
EditorSurfaceSnapshot,
|
|
44
76
|
CommandStateSnapshot,
|
|
77
|
+
WorkflowScopeMode,
|
|
78
|
+
WorkflowCandidateRange,
|
|
79
|
+
WorkflowScope,
|
|
80
|
+
WorkflowWorkItem,
|
|
81
|
+
WorkflowOverlay,
|
|
82
|
+
WorkflowBlockedCommandReason,
|
|
83
|
+
WorkflowScopeSnapshot,
|
|
84
|
+
InteractionGuardSnapshot,
|
|
85
|
+
WorkflowMarkupKind,
|
|
86
|
+
WorkflowMarkupBase,
|
|
87
|
+
WorkflowHighlightMarkup,
|
|
88
|
+
WorkflowCommentMarkup,
|
|
89
|
+
WorkflowRevisionMarkup,
|
|
90
|
+
WorkflowFieldMarkup,
|
|
91
|
+
WorkflowProtectedRangeMarkup,
|
|
92
|
+
WorkflowOpaqueFragmentMarkup,
|
|
93
|
+
WorkflowMarkupItem,
|
|
94
|
+
WorkflowMarkupSnapshot,
|
|
95
|
+
WorkflowCandidateRangeOptions,
|
|
45
96
|
} from "./api/public-types.ts";
|