@beyondwork/docx-react-component 1.0.84 → 1.0.86
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/package.json +1 -1
- package/src/api/internal/build-ref-projections.ts +3 -0
- package/src/api/public-types.ts +38 -0
- package/src/api/v3/_runtime-handle.ts +11 -0
- package/src/api/v3/runtime/content.ts +148 -1
- package/src/api/v3/runtime/formatting.ts +41 -0
- package/src/api/v3/runtime/review.ts +98 -0
- package/src/core/commands/index.ts +81 -25
- package/src/core/state/editor-state.ts +15 -0
- package/src/io/ooxml/header-footer-reference.ts +38 -0
- package/src/io/ooxml/parse-headers-footers.ts +11 -23
- package/src/io/ooxml/parse-main-document.ts +7 -10
- package/src/model/canonical-document.ts +9 -0
- package/src/model/review/comment-types.ts +2 -0
- package/src/runtime/document-runtime.ts +677 -54
- package/src/runtime/formatting/field/resolver.ts +73 -8
- package/src/runtime/layout/layout-engine-version.ts +31 -12
- package/src/runtime/layout/paginated-layout-engine.ts +18 -11
- package/src/runtime/layout/public-facet.ts +119 -16
- package/src/runtime/layout/resolve-page-fields.ts +68 -6
- package/src/runtime/layout/resolve-page-previews.ts +1 -1
- package/src/runtime/suggestions-snapshot.ts +24 -0
- package/src/runtime/surface-projection.ts +59 -2
- package/src/shell/ref-commands.ts +3 -354
- package/src/shell/session-bootstrap.ts +8 -0
- package/src/ui/WordReviewEditor.tsx +192 -35
- package/src/ui/editor-command-bag.ts +7 -1
- package/src/ui/editor-shell-view.tsx +1 -0
- package/src/ui/headless/revision-decoration-model.ts +13 -0
- package/src/ui/headless/selection-tool-types.ts +2 -0
- package/src/ui-tailwind/chrome/editor-action-registry.ts +7 -26
- package/src/ui-tailwind/chrome/tw-detach-handle.tsx +6 -2
- package/src/ui-tailwind/chrome/tw-suggestion-card.tsx +7 -3
- package/src/ui-tailwind/chrome/tw-table-context-toolbar.tsx +175 -25
- package/src/ui-tailwind/chrome-overlay/tw-chrome-overlay.tsx +1 -1
- package/src/ui-tailwind/editor-surface/pm-decorations.ts +12 -0
- package/src/ui-tailwind/editor-surface/pm-page-break-decorations.ts +18 -30
- package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +1 -1
- package/src/ui-tailwind/editor-surface/tw-page-block-view.tsx +1 -1
- package/src/ui-tailwind/page-stack/tw-page-chrome-entry.tsx +20 -11
- package/src/ui-tailwind/page-stack/tw-page-footer-band.tsx +9 -4
- package/src/ui-tailwind/page-stack/tw-page-header-band.tsx +12 -7
- package/src/ui-tailwind/page-stack/tw-page-stack-chrome-layer.tsx +29 -10
- package/src/ui-tailwind/page-stack/tw-region-block-renderer.tsx +1 -1
- package/src/ui-tailwind/review/tw-comment-sidebar.tsx +8 -3
- package/src/ui-tailwind/review/tw-review-rail.tsx +2 -0
- package/src/ui-tailwind/review/tw-revision-sidebar.tsx +46 -31
- package/src/ui-tailwind/review/tw-workflow-tab.tsx +159 -8
- package/src/ui-tailwind/review-workspace/types.ts +7 -2
- package/src/ui-tailwind/review-workspace/use-page-markers.ts +11 -1
- package/src/ui-tailwind/toolbar/tw-role-action-region.tsx +8 -9
- package/src/ui-tailwind/toolbar/tw-toolbar.tsx +21 -16
- package/src/ui-tailwind/tw-review-workspace.tsx +27 -4
|
@@ -85,7 +85,7 @@ export type {
|
|
|
85
85
|
TwReviewWorkspaceProps,
|
|
86
86
|
} from "./review-workspace/types.ts";
|
|
87
87
|
|
|
88
|
-
import type { EditorRole } from "../api/public-types.ts";
|
|
88
|
+
import type { EditorRole, EditorStoryTarget } from "../api/public-types.ts";
|
|
89
89
|
|
|
90
90
|
// Default shell-header modes for the workspace's default composition.
|
|
91
91
|
// Designsystem §6.1 prescribes a 4-mode switcher; all four are reachable in
|
|
@@ -184,7 +184,21 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
184
184
|
const caps = props.capabilities;
|
|
185
185
|
const isPageWorkspace = props.workspaceMode === "page";
|
|
186
186
|
const markupDisplay = props.markupDisplay;
|
|
187
|
+
const trackedChangesAuthoringEnabled =
|
|
188
|
+
props.trackedChangesAuthoringEnabled ?? props.showTrackedChanges;
|
|
187
189
|
const [navOpen, setNavOpen] = useState(false);
|
|
190
|
+
const handleOpenPageModeStory = useCallback(
|
|
191
|
+
(target: EditorStoryTarget) => {
|
|
192
|
+
if (
|
|
193
|
+
!isPageWorkspace &&
|
|
194
|
+
(target.kind === "header" || target.kind === "footer")
|
|
195
|
+
) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
props.onOpenStory?.(target);
|
|
199
|
+
},
|
|
200
|
+
[isPageWorkspace, props.onOpenStory],
|
|
201
|
+
);
|
|
188
202
|
|
|
189
203
|
// Scope card state — tracks which scope's card is currently open so
|
|
190
204
|
// the ChromeOverlay's card layer renders the right one. Open/close
|
|
@@ -597,7 +611,7 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
597
611
|
toolbarInteractionPolicy?.canAddComment ??
|
|
598
612
|
(caps ? caps.canAddComment : false)
|
|
599
613
|
}
|
|
600
|
-
showTrackedChanges={
|
|
614
|
+
showTrackedChanges={trackedChangesAuthoringEnabled}
|
|
601
615
|
capabilities={caps}
|
|
602
616
|
onAddComment={
|
|
603
617
|
props.onAddComment
|
|
@@ -608,6 +622,10 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
608
622
|
dismissSelectionToolbar();
|
|
609
623
|
props.onShowTrackedChangesChange(show);
|
|
610
624
|
}}
|
|
625
|
+
onReviewMarkupMode={(mode) => {
|
|
626
|
+
dismissSelectionToolbar();
|
|
627
|
+
props.onReviewMarkupModeChange?.(mode);
|
|
628
|
+
}}
|
|
611
629
|
onReviewSidebarTrackedChanges={
|
|
612
630
|
props.onReviewSidebarTrackedChanges
|
|
613
631
|
? runWithSelectionToolbarDismiss(props.onReviewSidebarTrackedChanges)
|
|
@@ -728,7 +746,7 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
728
746
|
formattingState={props.formattingState}
|
|
729
747
|
activeListContext={props.activeListContext}
|
|
730
748
|
styleCatalog={props.styleCatalog}
|
|
731
|
-
showTrackedChanges={
|
|
749
|
+
showTrackedChanges={trackedChangesAuthoringEnabled}
|
|
732
750
|
showSidebarToggle={responsiveChrome.showSidebarToggle}
|
|
733
751
|
isSidebarOpen={reviewRailOpen}
|
|
734
752
|
onUndo={runWithSelectionToolbarDismiss(props.onUndo)}
|
|
@@ -1159,7 +1177,7 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
1159
1177
|
}
|
|
1160
1178
|
renderFrameRevision={renderFrameRevision}
|
|
1161
1179
|
activeStory={snapshot.activeStory}
|
|
1162
|
-
onOpenStory={
|
|
1180
|
+
onOpenStory={handleOpenPageModeStory}
|
|
1163
1181
|
pmSurfaceElement={pmSurfaceElement}
|
|
1164
1182
|
visiblePageIndexRange={visiblePageIndexRange}
|
|
1165
1183
|
mediaPreviews={props.mediaPreviews}
|
|
@@ -1227,6 +1245,7 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
1227
1245
|
onAddReply: props.onAddReply,
|
|
1228
1246
|
onEditBody: props.onEditBody,
|
|
1229
1247
|
onOpenRevision: props.onOpenRevision,
|
|
1248
|
+
onReplyToRevision: props.onReplyToRevision,
|
|
1230
1249
|
onAcceptRevision: props.onAcceptRevision,
|
|
1231
1250
|
onRejectRevision: props.onRejectRevision,
|
|
1232
1251
|
onAcceptAllChanges: props.onAcceptAllChanges,
|
|
@@ -1235,6 +1254,10 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
1235
1254
|
// Layer-06 workflow facet. Layout facet no longer exposes
|
|
1236
1255
|
// `getAllScopeRailSegments` (methods removed in v40 / Slice 4C).
|
|
1237
1256
|
scopeRailSegments: props.workflowFacet?.getAllRailSegments() ?? [],
|
|
1257
|
+
activeScopeId,
|
|
1258
|
+
onOpenScope: (segment) => {
|
|
1259
|
+
handleScopeStripeClick({ scopeId: segment.scopeId });
|
|
1260
|
+
},
|
|
1238
1261
|
workflowTab: props.reviewRailWorkflowTab,
|
|
1239
1262
|
workflowCount: props.reviewRailWorkflowCount,
|
|
1240
1263
|
workflowScopesTitle: props.reviewRailWorkflowScopesTitle,
|