@beyondwork/docx-react-component 1.0.35 → 1.0.37
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 +103 -13
- package/package.json +1 -1
- package/src/api/package-version.ts +13 -0
- package/src/api/public-types.ts +84 -1
- package/src/core/commands/index.ts +19 -2
- package/src/core/selection/mapping.ts +6 -0
- package/src/io/docx-session.ts +24 -9
- package/src/io/export/build-app-properties-xml.ts +88 -0
- package/src/io/export/serialize-comments.ts +6 -1
- package/src/io/export/serialize-footnotes.ts +10 -9
- package/src/io/export/serialize-headers-footers.ts +11 -10
- package/src/io/export/serialize-main-document.ts +337 -50
- package/src/io/export/serialize-numbering.ts +115 -24
- package/src/io/export/serialize-tables.ts +13 -11
- package/src/io/export/table-properties-xml.ts +35 -16
- package/src/io/export/twip.ts +66 -0
- package/src/io/normalize/normalize-text.ts +5 -0
- package/src/io/ooxml/parse-footnotes.ts +2 -1
- package/src/io/ooxml/parse-headers-footers.ts +2 -1
- package/src/io/ooxml/parse-main-document.ts +21 -1
- package/src/legal/bookmarks.ts +78 -0
- package/src/model/canonical-document.ts +11 -0
- package/src/review/store/scope-tag-diff.ts +130 -0
- package/src/runtime/document-navigation.ts +1 -305
- package/src/runtime/document-runtime.ts +178 -16
- package/src/runtime/layout/docx-font-loader.ts +143 -0
- package/src/runtime/layout/index.ts +188 -0
- package/src/runtime/layout/inert-layout-facet.ts +45 -0
- package/src/runtime/layout/layout-engine-instance.ts +618 -0
- package/src/runtime/layout/layout-invalidation.ts +257 -0
- package/src/runtime/layout/layout-measurement-provider.ts +175 -0
- package/src/runtime/layout/measurement-backend-canvas.ts +307 -0
- package/src/runtime/layout/measurement-backend-empirical.ts +208 -0
- package/src/runtime/layout/page-fragment-mapper.ts +179 -0
- package/src/runtime/layout/page-graph.ts +433 -0
- package/src/runtime/layout/page-layout-snapshot-adapter.ts +70 -0
- package/src/runtime/layout/page-story-resolver.ts +195 -0
- package/src/runtime/layout/paginated-layout-engine.ts +788 -0
- package/src/runtime/layout/public-facet.ts +705 -0
- package/src/runtime/layout/resolved-formatting-document.ts +317 -0
- package/src/runtime/layout/resolved-formatting-state.ts +430 -0
- package/src/runtime/scope-tag-registry.ts +95 -0
- package/src/runtime/session-capabilities.ts +7 -4
- package/src/runtime/surface-projection.ts +1 -0
- package/src/runtime/text-ack-range.ts +49 -0
- package/src/ui/WordReviewEditor.tsx +15 -0
- package/src/ui/editor-runtime-boundary.ts +10 -1
- package/src/ui/editor-surface-controller.tsx +3 -0
- package/src/ui/headless/chrome-registry.ts +235 -0
- package/src/ui/headless/scoped-chrome-policy.ts +164 -0
- package/src/ui/headless/selection-tool-context.ts +2 -0
- package/src/ui/headless/selection-tool-resolver.ts +36 -17
- package/src/ui-tailwind/editor-surface/fast-text-edit-lane.ts +333 -0
- package/src/ui-tailwind/editor-surface/local-edit-session-state.ts +89 -0
- package/src/ui-tailwind/editor-surface/perf-probe.ts +21 -1
- package/src/ui-tailwind/editor-surface/pm-command-bridge.ts +8 -1
- package/src/ui-tailwind/editor-surface/pm-decorations.ts +73 -13
- package/src/ui-tailwind/editor-surface/predicted-position-map.ts +78 -0
- package/src/ui-tailwind/editor-surface/predicted-tag-preflight.ts +63 -0
- package/src/ui-tailwind/editor-surface/predicted-tx-gate.ts +39 -0
- package/src/ui-tailwind/editor-surface/tw-prosemirror-surface.tsx +173 -6
- package/src/ui-tailwind/theme/editor-theme.css +40 -14
- package/src/ui-tailwind/toolbar/tw-toolbar-icon-button.tsx +2 -2
- package/src/ui-tailwind/toolbar/tw-toolbar.tsx +235 -166
- package/src/ui-tailwind/tw-review-workspace.tsx +27 -1
|
@@ -57,6 +57,10 @@ import type {
|
|
|
57
57
|
SelectionToolAnchor,
|
|
58
58
|
} from "../ui/headless/selection-tool-types";
|
|
59
59
|
import type { MarkupDisplay } from "../ui/headless/comment-decoration-model";
|
|
60
|
+
import {
|
|
61
|
+
resolveScopedChromePolicy,
|
|
62
|
+
shouldRenderSelectionToolKind,
|
|
63
|
+
} from "../ui/headless/scoped-chrome-policy";
|
|
60
64
|
import type { EditorCommandBag } from "../ui/editor-command-bag.ts";
|
|
61
65
|
import { preserveEditorSelectionMouseDown } from "../ui/headless/preserve-editor-selection";
|
|
62
66
|
import { TwAlertBanner } from "./chrome/tw-alert-banner";
|
|
@@ -340,6 +344,25 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
340
344
|
}),
|
|
341
345
|
[reviewRailAvailable, reviewRailOpen, viewportWidth],
|
|
342
346
|
);
|
|
347
|
+
const scopedChromePolicy = useMemo(
|
|
348
|
+
() =>
|
|
349
|
+
resolveScopedChromePolicy({
|
|
350
|
+
preset: chromePreset,
|
|
351
|
+
compactMode: responsiveChrome.isNarrow,
|
|
352
|
+
capabilities: caps,
|
|
353
|
+
interactionGuardSnapshot: props.interactionGuardSnapshot,
|
|
354
|
+
workflowScopeSnapshot: props.workflowScopeSnapshot,
|
|
355
|
+
activeListContext: props.activeListContext,
|
|
356
|
+
}),
|
|
357
|
+
[
|
|
358
|
+
caps,
|
|
359
|
+
chromePreset,
|
|
360
|
+
props.activeListContext,
|
|
361
|
+
props.interactionGuardSnapshot,
|
|
362
|
+
props.workflowScopeSnapshot,
|
|
363
|
+
responsiveChrome.isNarrow,
|
|
364
|
+
],
|
|
365
|
+
);
|
|
343
366
|
const toolbarInteractionPolicy: ToolbarInteractionPolicy | undefined = caps
|
|
344
367
|
? {
|
|
345
368
|
mode: effectiveSelectionMode,
|
|
@@ -438,6 +461,7 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
438
461
|
blockedReasons={blockedReasons}
|
|
439
462
|
showDiagnosticsChrome={chromeVisibility.alerts}
|
|
440
463
|
interactionPolicy={toolbarInteractionPolicy}
|
|
464
|
+
scopedChromePolicy={scopedChromePolicy}
|
|
441
465
|
compactMode={responsiveChrome.isNarrow}
|
|
442
466
|
workspaceMode={props.workspaceMode}
|
|
443
467
|
zoomLevel={props.zoomLevel}
|
|
@@ -817,7 +841,9 @@ export function TwReviewWorkspace(inputProps: TwReviewWorkspaceProps) {
|
|
|
817
841
|
/>
|
|
818
842
|
</div>
|
|
819
843
|
) : null}
|
|
820
|
-
{chromeVisibility.selectionOverlay &&
|
|
844
|
+
{chromeVisibility.selectionOverlay &&
|
|
845
|
+
gatedSelectionTool &&
|
|
846
|
+
shouldRenderSelectionToolKind(scopedChromePolicy, gatedSelectionTool.kind) ? (
|
|
821
847
|
<TwSelectionToolHost
|
|
822
848
|
tool={gatedSelectionTool}
|
|
823
849
|
contextAnalytics={
|