@beyondwork/docx-react-component 1.0.124 → 1.0.125
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/api/public-types.cjs +147 -35
- package/dist/api/public-types.d.cts +2 -2
- package/dist/api/public-types.d.ts +2 -2
- package/dist/api/public-types.js +3 -3
- package/dist/api/v3.cjs +791 -101
- package/dist/api/v3.d.cts +3 -3
- package/dist/api/v3.d.ts +3 -3
- package/dist/api/v3.js +10 -10
- package/dist/{canonical-document-CG2TgAzj.d.cts → canonical-document-CXCFCbAz.d.cts} +2 -0
- package/dist/{canonical-document-CG2TgAzj.d.ts → canonical-document-CXCFCbAz.d.ts} +2 -0
- package/dist/{chunk-PFYUJU3Q.js → chunk-2QL5DAKF.js} +98 -43
- package/dist/{chunk-4IPEZYQX.js → chunk-4EENH4FG.js} +1 -1
- package/dist/{chunk-BOHHIVQ2.js → chunk-4G3OS2H6.js} +3 -3
- package/dist/{chunk-A74Y5NE4.js → chunk-4YJVRIUB.js} +52 -21
- package/dist/{chunk-FNWKE74J.js → chunk-5DGKFNQT.js} +5 -1
- package/dist/{chunk-RSYN6FTS.js → chunk-6F5QW44A.js} +2 -2
- package/dist/{chunk-KOHQFZMM.js → chunk-BYSRJ4FE.js} +1 -1
- package/dist/{chunk-H6IL5ABU.js → chunk-CXSYRB37.js} +64 -20
- package/dist/{chunk-32ZAOQ54.js → chunk-D5HYZQTG.js} +1 -1
- package/dist/{chunk-TY4DIJO3.js → chunk-ESJ2MES5.js} +1 -1
- package/dist/{chunk-ZMRO6P3A.js → chunk-JN444Z5S.js} +505 -44
- package/dist/{chunk-IR7QV2BX.js → chunk-KV435YXO.js} +2 -2
- package/dist/{chunk-N4VIXI2Z.js → chunk-MWSBGJQO.js} +137 -18
- package/dist/{chunk-Q76XPPTA.js → chunk-OHTK7F3F.js} +96 -13
- package/dist/{chunk-MPH4ZQS4.js → chunk-QT3LX4FA.js} +321 -51
- package/dist/{chunk-7PC6XUNO.js → chunk-TQDQU2E3.js} +2 -2
- package/dist/{chunk-4B74ETJI.js → chunk-V6XVZFFH.js} +2 -2
- package/dist/{chunk-NAMAWCXN.js → chunk-YD2JE54B.js} +1 -1
- package/dist/{chunk-ZRHLLPSJ.js → chunk-YHZHPXDB.js} +85 -18
- package/dist/{chunk-HXHQA4BU.js → chunk-YIYM4ZAP.js} +1 -1
- package/dist/{chunk-LGWNN3L2.js → chunk-ZDOAUP3V.js} +2 -2
- package/dist/compare.d.cts +1 -1
- package/dist/compare.d.ts +1 -1
- package/dist/core/commands/formatting-commands.d.cts +2 -2
- package/dist/core/commands/formatting-commands.d.ts +2 -2
- package/dist/core/commands/image-commands.cjs +65 -20
- package/dist/core/commands/image-commands.d.cts +2 -2
- package/dist/core/commands/image-commands.d.ts +2 -2
- package/dist/core/commands/image-commands.js +5 -5
- package/dist/core/commands/section-layout-commands.d.cts +2 -2
- package/dist/core/commands/section-layout-commands.d.ts +2 -2
- package/dist/core/commands/style-commands.d.cts +2 -2
- package/dist/core/commands/style-commands.d.ts +2 -2
- package/dist/core/commands/table-structure-commands.cjs +65 -20
- package/dist/core/commands/table-structure-commands.d.cts +2 -2
- package/dist/core/commands/table-structure-commands.d.ts +2 -2
- package/dist/core/commands/table-structure-commands.js +4 -4
- package/dist/core/commands/text-commands.cjs +66 -21
- package/dist/core/commands/text-commands.d.cts +2 -2
- package/dist/core/commands/text-commands.d.ts +2 -2
- package/dist/core/commands/text-commands.js +5 -5
- package/dist/core/selection/mapping.d.cts +2 -2
- package/dist/core/selection/mapping.d.ts +2 -2
- package/dist/core/state/editor-state.d.cts +2 -2
- package/dist/core/state/editor-state.d.ts +2 -2
- package/dist/index.cjs +1341 -193
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +39 -21
- package/dist/io/docx-session.cjs +51 -20
- package/dist/io/docx-session.d.cts +4 -4
- package/dist/io/docx-session.d.ts +4 -4
- package/dist/io/docx-session.js +4 -4
- package/dist/legal.cjs +36 -12
- package/dist/legal.d.cts +1 -1
- package/dist/legal.d.ts +1 -1
- package/dist/legal.js +3 -3
- package/dist/{loader-D9y4ZRjj.d.ts → loader-B1MxvbeV.d.ts} +3 -3
- package/dist/{loader-D9KCtj4m.d.cts → loader-CJXsswcd.d.cts} +3 -3
- package/dist/{public-types-CNnMHZM9.d.ts → public-types-BEGhv2YR.d.ts} +108 -6
- package/dist/{public-types-DajNGKV4.d.cts → public-types-DrhlQ5Zy.d.cts} +108 -6
- package/dist/public-types.cjs +147 -35
- package/dist/public-types.d.cts +2 -2
- package/dist/public-types.d.ts +2 -2
- package/dist/public-types.js +3 -3
- package/dist/runtime/collab.d.cts +3 -3
- package/dist/runtime/collab.d.ts +3 -3
- package/dist/runtime/document-runtime.cjs +685 -98
- package/dist/runtime/document-runtime.d.cts +2 -2
- package/dist/runtime/document-runtime.d.ts +2 -2
- package/dist/runtime/document-runtime.js +14 -14
- package/dist/{session-DyQGlryH.d.cts → session-Bp3zqnkS.d.cts} +3 -3
- package/dist/{session-DEmaOEjA.d.ts → session-xMOU_NtL.d.ts} +3 -3
- package/dist/session.cjs +51 -20
- package/dist/session.d.cts +5 -5
- package/dist/session.d.ts +5 -5
- package/dist/session.js +5 -5
- package/dist/tailwind.cjs +238 -73
- package/dist/tailwind.d.cts +2 -2
- package/dist/tailwind.d.ts +2 -2
- package/dist/tailwind.js +7 -7
- package/dist/{types-DjJNaE9c.d.ts → types-BFT8536T.d.ts} +2 -2
- package/dist/{types-CxE1aZiv.d.cts → types-DDPxEygX.d.cts} +2 -2
- package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +3 -3
- package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +3 -3
- package/dist/ui-tailwind/editor-surface/search-plugin.js +4 -4
- package/dist/ui-tailwind.cjs +238 -73
- package/dist/ui-tailwind.d.cts +3 -3
- package/dist/ui-tailwind.d.ts +3 -3
- package/dist/ui-tailwind.js +7 -7
- package/package.json +1 -1
package/dist/api/v3.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-
|
|
2
|
-
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-
|
|
1
|
+
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-DrhlQ5Zy.cjs';
|
|
2
|
+
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-DrhlQ5Zy.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
6
|
-
import '../canonical-document-
|
|
6
|
+
import '../canonical-document-CXCFCbAz.cjs';
|
|
7
7
|
import 'prosemirror-state';
|
|
8
8
|
import 'prosemirror-model';
|
|
9
9
|
|
package/dist/api/v3.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-
|
|
2
|
-
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-
|
|
1
|
+
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-BEGhv2YR.js';
|
|
2
|
+
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-BEGhv2YR.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
6
|
-
import '../canonical-document-
|
|
6
|
+
import '../canonical-document-CXCFCbAz.js';
|
|
7
7
|
import 'prosemirror-state';
|
|
8
8
|
import 'prosemirror-model';
|
|
9
9
|
|
package/dist/api/v3.js
CHANGED
|
@@ -5,24 +5,24 @@ import {
|
|
|
5
5
|
mockId,
|
|
6
6
|
mockPayload,
|
|
7
7
|
validateApiV3Metadata
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-JN444Z5S.js";
|
|
9
|
+
import "../chunk-OHTK7F3F.js";
|
|
10
10
|
import "../chunk-C2LWJ4CZ.js";
|
|
11
11
|
import {
|
|
12
12
|
createUiApi,
|
|
13
13
|
emitUxResponse
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-YIYM4ZAP.js";
|
|
15
|
+
import "../chunk-YHZHPXDB.js";
|
|
16
16
|
import "../chunk-KFCQYZXR.js";
|
|
17
17
|
import "../chunk-QIO6V46H.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-CXSYRB37.js";
|
|
19
19
|
import "../chunk-OYGMRRR7.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-TQDQU2E3.js";
|
|
21
|
+
import "../chunk-V6XVZFFH.js";
|
|
22
|
+
import "../chunk-ESJ2MES5.js";
|
|
23
|
+
import "../chunk-4YJVRIUB.js";
|
|
24
24
|
import "../chunk-4BJ6K26R.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-5DGKFNQT.js";
|
|
26
26
|
import "../chunk-OL2UEHRP.js";
|
|
27
27
|
import "../chunk-EB6M3GE6.js";
|
|
28
28
|
import "../chunk-IHE7YOAY.js";
|
|
@@ -597,6 +597,8 @@ interface NumberingCatalog {
|
|
|
597
597
|
interface NumPicBullet {
|
|
598
598
|
/** `w:numPicBulletId` attribute value — the lookup key. */
|
|
599
599
|
readonly numPicBulletId: string;
|
|
600
|
+
/** Source numbering-part pointer for Word telemetry joins. */
|
|
601
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
600
602
|
/** Verbatim XML for the `<w:numPicBullet>` element. */
|
|
601
603
|
readonly rawXml: string;
|
|
602
604
|
/**
|
|
@@ -597,6 +597,8 @@ interface NumberingCatalog {
|
|
|
597
597
|
interface NumPicBullet {
|
|
598
598
|
/** `w:numPicBulletId` attribute value — the lookup key. */
|
|
599
599
|
readonly numPicBulletId: string;
|
|
600
|
+
/** Source numbering-part pointer for Word telemetry joins. */
|
|
601
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
600
602
|
/** Verbatim XML for the `<w:numPicBullet>` element. */
|
|
601
603
|
readonly rawXml: string;
|
|
602
604
|
/**
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
incrementInvalidationCounter,
|
|
3
3
|
recordPerfSample,
|
|
4
4
|
resolvePageOverlayRectsFromGeometry
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MWSBGJQO.js";
|
|
6
6
|
import {
|
|
7
7
|
buildPageAnchorAttributes,
|
|
8
8
|
buildPageAnchorSelector,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
resolveChromePreset,
|
|
11
11
|
resolveChromePresetOptions,
|
|
12
12
|
resolveChromeVisibilityForPreset
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YIYM4ZAP.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_PAGE_ESTIMATE_PX_PER_TWIP,
|
|
16
16
|
DEFAULT_PX_PER_TWIP,
|
|
@@ -20,19 +20,19 @@ import {
|
|
|
20
20
|
findPageForOffset,
|
|
21
21
|
getUsableColumnWidth,
|
|
22
22
|
sanitizeMarkdown
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YHZHPXDB.js";
|
|
24
24
|
import {
|
|
25
25
|
createCanvasBackend
|
|
26
26
|
} from "./chunk-KFCQYZXR.js";
|
|
27
27
|
import {
|
|
28
28
|
storyTargetKey
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CXSYRB37.js";
|
|
30
30
|
import {
|
|
31
31
|
EMU_PER_INCH,
|
|
32
32
|
EMU_PER_PX,
|
|
33
33
|
ROTATION_UNITS_PER_DEGREE,
|
|
34
34
|
TWIPS_PER_PX
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-5DGKFNQT.js";
|
|
36
36
|
import {
|
|
37
37
|
createPublicNodeAnchor,
|
|
38
38
|
createPublicRangeAnchor
|
|
@@ -13801,26 +13801,42 @@ function resolveTopBarCommentAvailability(input) {
|
|
|
13801
13801
|
|
|
13802
13802
|
// src/ui-tailwind/review-workspace/use-status-bar-page-facts.ts
|
|
13803
13803
|
import { useMemo as useMemo8 } from "react";
|
|
13804
|
-
function
|
|
13805
|
-
const { layoutFacet, selectionPosition, activeStory,
|
|
13806
|
-
|
|
13807
|
-
const facet = layoutFacet;
|
|
13808
|
-
if (!facet) {
|
|
13809
|
-
return {
|
|
13810
|
-
displayPageNumber: null,
|
|
13811
|
-
pageCount: null,
|
|
13812
|
-
measurementFidelity: void 0
|
|
13813
|
-
};
|
|
13814
|
-
}
|
|
13815
|
-
const pageRef = facet.getPageForOffset(selectionPosition, activeStory);
|
|
13816
|
-
const displayPageNumber = pageRef !== null && typeof pageRef.pageIndex === "number" ? facet.getDisplayPageNumber(pageRef.pageIndex) ?? pageRef.pageIndex + 1 : null;
|
|
13817
|
-
const pageCount = facet.getPageCount();
|
|
13804
|
+
function resolveStatusBarPageFacts(options) {
|
|
13805
|
+
const { layoutFacet: facet, selectionPosition, activeStory, viewportPageIndexRange } = options;
|
|
13806
|
+
if (!facet) {
|
|
13818
13807
|
return {
|
|
13819
|
-
displayPageNumber,
|
|
13820
|
-
pageCount,
|
|
13821
|
-
measurementFidelity:
|
|
13808
|
+
displayPageNumber: null,
|
|
13809
|
+
pageCount: null,
|
|
13810
|
+
measurementFidelity: void 0
|
|
13822
13811
|
};
|
|
13823
|
-
}
|
|
13812
|
+
}
|
|
13813
|
+
const pageCount = facet.getPageCount();
|
|
13814
|
+
const viewportPageIndex = viewportPageIndexRange && viewportPageIndexRange.start >= 0 && viewportPageIndexRange.start < pageCount ? viewportPageIndexRange.start : null;
|
|
13815
|
+
const pageRef = viewportPageIndex !== null ? { pageIndex: viewportPageIndex } : facet.getPageForOffset(selectionPosition, activeStory);
|
|
13816
|
+
const displayPageNumber = normalizeStatusDisplayPageNumber(
|
|
13817
|
+
pageRef !== null && typeof pageRef.pageIndex === "number" ? facet.getDisplayPageNumber(pageRef.pageIndex) : null,
|
|
13818
|
+
pageRef !== null && typeof pageRef.pageIndex === "number" ? pageRef.pageIndex : null
|
|
13819
|
+
);
|
|
13820
|
+
return {
|
|
13821
|
+
displayPageNumber,
|
|
13822
|
+
pageCount,
|
|
13823
|
+
measurementFidelity: facet.getMeasurementFidelity()
|
|
13824
|
+
};
|
|
13825
|
+
}
|
|
13826
|
+
function normalizeStatusDisplayPageNumber(displayPageNumber, pageIndex) {
|
|
13827
|
+
if (pageIndex === null) return null;
|
|
13828
|
+
return typeof displayPageNumber === "number" && displayPageNumber > 0 ? displayPageNumber : pageIndex + 1;
|
|
13829
|
+
}
|
|
13830
|
+
function useStatusBarPageFacts(options) {
|
|
13831
|
+
const { layoutFacet, selectionPosition, activeStory, renderFrameRevision, viewportPageIndexRange } = options;
|
|
13832
|
+
return useMemo8(() => {
|
|
13833
|
+
return resolveStatusBarPageFacts({
|
|
13834
|
+
layoutFacet,
|
|
13835
|
+
selectionPosition,
|
|
13836
|
+
activeStory,
|
|
13837
|
+
viewportPageIndexRange
|
|
13838
|
+
});
|
|
13839
|
+
}, [layoutFacet, selectionPosition, activeStory, viewportPageIndexRange, renderFrameRevision]);
|
|
13824
13840
|
}
|
|
13825
13841
|
|
|
13826
13842
|
// src/ui-tailwind/review-workspace/use-grabbed-segment-offsets.ts
|
|
@@ -14448,6 +14464,12 @@ function readCompatibilityScopeCardFromWorkflowFacet(workflowFacet, scopeId) {
|
|
|
14448
14464
|
// src/ui-tailwind/review-workspace/use-page-markers.ts
|
|
14449
14465
|
import { useEffect as useEffect23, useMemo as useMemo12, useState as useState22 } from "react";
|
|
14450
14466
|
|
|
14467
|
+
// src/api/mounted-surface-residency.ts
|
|
14468
|
+
var MOUNTED_SURFACE_VIEWPORT_BLOCK_THRESHOLD = 250;
|
|
14469
|
+
function shouldUseMountedSurfaceViewportCulling(totalBlockCount) {
|
|
14470
|
+
return totalBlockCount > MOUNTED_SURFACE_VIEWPORT_BLOCK_THRESHOLD;
|
|
14471
|
+
}
|
|
14472
|
+
|
|
14451
14473
|
// src/ui-tailwind/page-stack/use-visible-block-range.ts
|
|
14452
14474
|
import * as React26 from "react";
|
|
14453
14475
|
var ESTIMATED_BLOCKS_PER_PAGE_FALLBACK = 50;
|
|
@@ -14828,7 +14850,7 @@ function pageMarkersEqual(a, b) {
|
|
|
14828
14850
|
}
|
|
14829
14851
|
return true;
|
|
14830
14852
|
}
|
|
14831
|
-
function
|
|
14853
|
+
function useGeometryVisiblePageIndexRanges(input) {
|
|
14832
14854
|
const {
|
|
14833
14855
|
scrollRoot,
|
|
14834
14856
|
geometryFacet,
|
|
@@ -14838,10 +14860,12 @@ function useGeometryVisiblePageIndexRange(input) {
|
|
|
14838
14860
|
renderFrameRevision,
|
|
14839
14861
|
viewportScale
|
|
14840
14862
|
} = input;
|
|
14841
|
-
const [
|
|
14863
|
+
const [ranges, setRanges] = useState22({ visiblePageIndexRange: null, viewportPageIndexRange: null });
|
|
14842
14864
|
useEffect23(() => {
|
|
14843
14865
|
if (!scrollRoot || !geometryFacet) {
|
|
14844
|
-
|
|
14866
|
+
setRanges(
|
|
14867
|
+
(prev) => prev.visiblePageIndexRange === null && prev.viewportPageIndexRange === null ? prev : { visiblePageIndexRange: null, viewportPageIndexRange: null }
|
|
14868
|
+
);
|
|
14845
14869
|
return void 0;
|
|
14846
14870
|
}
|
|
14847
14871
|
const runtime = scrollRoot.ownerDocument?.defaultView;
|
|
@@ -14851,7 +14875,7 @@ function useGeometryVisiblePageIndexRange(input) {
|
|
|
14851
14875
|
if (disposed) return;
|
|
14852
14876
|
const pageCount = layoutFacet?.getPageCount() ?? pageMarkerCount;
|
|
14853
14877
|
const scale = typeof viewportScale === "number" && Number.isFinite(viewportScale) && viewportScale > 0 ? viewportScale : 1;
|
|
14854
|
-
const
|
|
14878
|
+
const nextVisible = resolveVisiblePageIndexRangeFromViewport({
|
|
14855
14879
|
pageCount,
|
|
14856
14880
|
viewportTopPx: scrollRoot.scrollTop / scale,
|
|
14857
14881
|
viewportHeightPx: scrollRoot.clientHeight / scale,
|
|
@@ -14861,7 +14885,22 @@ function useGeometryVisiblePageIndexRange(input) {
|
|
|
14861
14885
|
return page ? page.frame : null;
|
|
14862
14886
|
}
|
|
14863
14887
|
});
|
|
14864
|
-
|
|
14888
|
+
const nextViewport = resolveVisiblePageIndexRangeFromViewport({
|
|
14889
|
+
pageCount,
|
|
14890
|
+
viewportTopPx: scrollRoot.scrollTop / scale,
|
|
14891
|
+
viewportHeightPx: scrollRoot.clientHeight / scale,
|
|
14892
|
+
overscanPages: 0,
|
|
14893
|
+
getPageFrame: (pageIndex) => {
|
|
14894
|
+
const page = geometryFacet.getPage(pageIndex);
|
|
14895
|
+
return page ? page.frame : null;
|
|
14896
|
+
}
|
|
14897
|
+
});
|
|
14898
|
+
setRanges(
|
|
14899
|
+
(prev) => pageRangeEqual(prev.visiblePageIndexRange, nextVisible) && pageRangeEqual(prev.viewportPageIndexRange, nextViewport) ? prev : {
|
|
14900
|
+
visiblePageIndexRange: nextVisible,
|
|
14901
|
+
viewportPageIndexRange: nextViewport
|
|
14902
|
+
}
|
|
14903
|
+
);
|
|
14865
14904
|
};
|
|
14866
14905
|
const schedule = () => {
|
|
14867
14906
|
if (disposed || rafHandle !== null) return;
|
|
@@ -14898,7 +14937,7 @@ function useGeometryVisiblePageIndexRange(input) {
|
|
|
14898
14937
|
scrollRoot,
|
|
14899
14938
|
viewportScale
|
|
14900
14939
|
]);
|
|
14901
|
-
return
|
|
14940
|
+
return ranges;
|
|
14902
14941
|
}
|
|
14903
14942
|
function shouldUseCompatibilityPageMarkerScan(input) {
|
|
14904
14943
|
return !input.geometryFacet || !input.layoutFacet;
|
|
@@ -14999,7 +15038,11 @@ function usePageMarkers(options) {
|
|
|
14999
15038
|
pageMarkers,
|
|
15000
15039
|
overscanPages
|
|
15001
15040
|
});
|
|
15002
|
-
const
|
|
15041
|
+
const markerViewportPageIndexRange = useVisiblePageIndexRange({
|
|
15042
|
+
pageMarkers,
|
|
15043
|
+
overscanPages: 0
|
|
15044
|
+
});
|
|
15045
|
+
const geometryPageIndexRanges = useGeometryVisiblePageIndexRanges({
|
|
15003
15046
|
scrollRoot: pageStackScrollRoot,
|
|
15004
15047
|
geometryFacet,
|
|
15005
15048
|
layoutFacet,
|
|
@@ -15008,7 +15051,8 @@ function usePageMarkers(options) {
|
|
|
15008
15051
|
renderFrameRevision,
|
|
15009
15052
|
viewportScale
|
|
15010
15053
|
});
|
|
15011
|
-
const visiblePageIndexRange =
|
|
15054
|
+
const visiblePageIndexRange = geometryPageIndexRanges.visiblePageIndexRange ?? markerVisiblePageIndexRange;
|
|
15055
|
+
const viewportPageIndexRange = geometryPageIndexRanges.viewportPageIndexRange ?? markerViewportPageIndexRange;
|
|
15012
15056
|
const visibleBlockRangesFromPageOffsets = useMemo12(
|
|
15013
15057
|
() => visiblePageIndexRange && layoutFacet ? resolveVisibleBlockRangesFromPageOffsets({
|
|
15014
15058
|
blocks: snapshot.surface?.blocks ?? [],
|
|
@@ -15044,9 +15088,11 @@ function usePageMarkers(options) {
|
|
|
15044
15088
|
]
|
|
15045
15089
|
);
|
|
15046
15090
|
const visibleBlockRanges = visibleBlockRangesFromPageOffsets ?? visibleBlockRangesFromPageRange ?? markerVisibleBlockRanges;
|
|
15091
|
+
const totalBlockCount = snapshot.surface?.blocks.length ?? 0;
|
|
15092
|
+
const shouldCullSurface = shouldUseMountedSurfaceViewportCulling(totalBlockCount);
|
|
15047
15093
|
const visibleRangesKey = useMemo12(
|
|
15048
|
-
() => visibleBlockRanges.map((r) => `${r.start}:${r.end}`).join("|"),
|
|
15049
|
-
[visibleBlockRanges]
|
|
15094
|
+
() => shouldCullSurface ? visibleBlockRanges.map((r) => `${r.start}:${r.end}`).join("|") : "full",
|
|
15095
|
+
[shouldCullSurface, visibleBlockRanges]
|
|
15050
15096
|
);
|
|
15051
15097
|
useEffect23(() => {
|
|
15052
15098
|
if (!layoutFacet) return;
|
|
@@ -15055,13 +15101,19 @@ function usePageMarkers(options) {
|
|
|
15055
15101
|
layoutFacet.requestViewportRefresh();
|
|
15056
15102
|
return;
|
|
15057
15103
|
}
|
|
15104
|
+
if (!shouldCullSurface) {
|
|
15105
|
+
layoutFacet.setVisibleBlockRanges([]);
|
|
15106
|
+
layoutFacet.requestViewportRefresh();
|
|
15107
|
+
return;
|
|
15108
|
+
}
|
|
15058
15109
|
layoutFacet.setVisibleBlockRanges(visibleBlockRanges);
|
|
15059
15110
|
layoutFacet.requestViewportRefresh();
|
|
15060
|
-
}, [layoutFacet, visibleRangesKey]);
|
|
15111
|
+
}, [layoutFacet, shouldCullSurface, visibleRangesKey]);
|
|
15061
15112
|
return {
|
|
15062
15113
|
pageMarkers,
|
|
15063
15114
|
visibleBlockRanges,
|
|
15064
|
-
visiblePageIndexRange: VIEWPORT_CULLING_ENABLED ? visiblePageIndexRange : null
|
|
15115
|
+
visiblePageIndexRange: VIEWPORT_CULLING_ENABLED ? visiblePageIndexRange : null,
|
|
15116
|
+
viewportPageIndexRange: VIEWPORT_CULLING_ENABLED ? viewportPageIndexRange : null
|
|
15065
15117
|
};
|
|
15066
15118
|
}
|
|
15067
15119
|
|
|
@@ -15530,11 +15582,20 @@ function TwReviewWorkspace(inputProps) {
|
|
|
15530
15582
|
selectionToolbarRootRef
|
|
15531
15583
|
});
|
|
15532
15584
|
const activePage = props.documentNavigation?.pages[props.documentNavigation.activePageIndex] ?? null;
|
|
15585
|
+
const { visiblePageIndexRange, viewportPageIndexRange } = usePageMarkers({
|
|
15586
|
+
pageStackScrollRoot,
|
|
15587
|
+
snapshot,
|
|
15588
|
+
layoutFacet: props.layoutFacet,
|
|
15589
|
+
geometryFacet: props.geometryFacet,
|
|
15590
|
+
renderFrameRevision,
|
|
15591
|
+
viewportScale: zoomScale
|
|
15592
|
+
});
|
|
15533
15593
|
const grabbedSegmentOffsets = useGrabbedSegmentOffsets(snapshot);
|
|
15534
15594
|
const statusBarPageFacts = useStatusBarPageFacts({
|
|
15535
15595
|
layoutFacet: props.layoutFacet,
|
|
15536
15596
|
selectionPosition,
|
|
15537
15597
|
activeStory: snapshot.activeStory,
|
|
15598
|
+
viewportPageIndexRange,
|
|
15538
15599
|
renderFrameRevision
|
|
15539
15600
|
});
|
|
15540
15601
|
const hidePageBorderForActiveEditing = isPageWorkspace && snapshot.activeStory.kind === "main" && shouldHidePageBorderForSelection(viewState.selection);
|
|
@@ -15560,14 +15621,6 @@ function TwReviewWorkspace(inputProps) {
|
|
|
15560
15621
|
});
|
|
15561
15622
|
const suppressFloatingToolDuringEditorInput = viewState.editorRole === "editor" && viewState.selection.isCollapsed;
|
|
15562
15623
|
const shouldRenderFloatingSelectionTool = chromeVisibility.selectionOverlay && gatedSelectionTool && !suppressFloatingToolDuringEditorInput && shouldRenderSelectionToolKind(scopedChromePolicy, gatedSelectionTool.kind);
|
|
15563
|
-
const { visiblePageIndexRange } = usePageMarkers({
|
|
15564
|
-
pageStackScrollRoot,
|
|
15565
|
-
snapshot,
|
|
15566
|
-
layoutFacet: props.layoutFacet,
|
|
15567
|
-
geometryFacet: props.geometryFacet,
|
|
15568
|
-
renderFrameRevision,
|
|
15569
|
-
viewportScale: zoomScale
|
|
15570
|
-
});
|
|
15571
15624
|
const { dismissSelectionToolbar, runWithSelectionToolbarDismiss } = useWorkspaceSideEffects({
|
|
15572
15625
|
layoutFacet: props.layoutFacet,
|
|
15573
15626
|
activeParagraphLayout,
|
|
@@ -18705,6 +18758,8 @@ export {
|
|
|
18705
18758
|
resolveSelectionToolRegistry,
|
|
18706
18759
|
resolveScopedChromePolicy,
|
|
18707
18760
|
shouldRenderSelectionToolKind,
|
|
18761
|
+
MOUNTED_SURFACE_VIEWPORT_BLOCK_THRESHOLD,
|
|
18762
|
+
shouldUseMountedSurfaceViewportCulling,
|
|
18708
18763
|
findScrollAnchor,
|
|
18709
18764
|
resolveScrollTopForAnchor,
|
|
18710
18765
|
TwAlertBanner,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-Y4XZCMCS.js";
|
|
4
4
|
import {
|
|
5
5
|
applyTextTransaction
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KV435YXO.js";
|
|
7
7
|
import {
|
|
8
8
|
createInsertedTableBlock,
|
|
9
9
|
createNoopStructuralMutation,
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
replaceParagraphScope,
|
|
12
12
|
resolveInsertedTableStyleId,
|
|
13
13
|
resolveParagraphScope
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BYSRJ4FE.js";
|
|
15
15
|
import {
|
|
16
16
|
NO_EDITABLE_TARGETS_INDEX,
|
|
17
17
|
createEditorSurfaceSnapshot
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CXSYRB37.js";
|
|
19
19
|
import {
|
|
20
20
|
createSelectionSnapshot
|
|
21
21
|
} from "./chunk-OYGMRRR7.js";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createHeaderFooterStoryKey,
|
|
7
7
|
createNoteStoryKey,
|
|
8
8
|
sha256TextHex
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5DGKFNQT.js";
|
|
10
10
|
import {
|
|
11
11
|
SCOPE_MARKER_BOOKMARK_PREFIX,
|
|
12
12
|
buildGrabBagSourceChildFromParsed,
|
|
@@ -1031,18 +1031,23 @@ function parseNumberingXml(xml, context) {
|
|
|
1031
1031
|
const abstractDefinitions = {};
|
|
1032
1032
|
const instances = {};
|
|
1033
1033
|
const numPicBullets = {};
|
|
1034
|
+
const topLevelOrdinals = /* @__PURE__ */ new Map();
|
|
1034
1035
|
for (const child of numberingElement.children) {
|
|
1035
1036
|
if (child.type !== "element") {
|
|
1036
1037
|
continue;
|
|
1037
1038
|
}
|
|
1038
|
-
|
|
1039
|
+
const childName = localName(child.name);
|
|
1040
|
+
const childOrdinal = (topLevelOrdinals.get(childName) ?? 0) + 1;
|
|
1041
|
+
topLevelOrdinals.set(childName, childOrdinal);
|
|
1042
|
+
const childXmlPath = `/numbering[1]/${childName}[${childOrdinal}]`;
|
|
1043
|
+
if (childName === "numPicBullet") {
|
|
1039
1044
|
const rawId = readStringAttr(child, "w:numPicBulletId");
|
|
1040
1045
|
if (rawId) {
|
|
1041
|
-
numPicBullets[rawId] = readNumPicBullet(child, rawId, context);
|
|
1046
|
+
numPicBullets[rawId] = readNumPicBullet(child, rawId, context, childXmlPath);
|
|
1042
1047
|
}
|
|
1043
1048
|
continue;
|
|
1044
1049
|
}
|
|
1045
|
-
switch (
|
|
1050
|
+
switch (childName) {
|
|
1046
1051
|
case "abstractNum": {
|
|
1047
1052
|
const rawId = readStringAttr(child, "w:abstractNumId");
|
|
1048
1053
|
if (!rawId) {
|
|
@@ -1062,7 +1067,7 @@ function parseNumberingXml(xml, context) {
|
|
|
1062
1067
|
const numStyleLink = numStyleLinkEl ? readStringAttr(numStyleLinkEl, "w:val") : void 0;
|
|
1063
1068
|
abstractDefinitions[abstractNumberingId] = {
|
|
1064
1069
|
abstractNumberingId,
|
|
1065
|
-
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "abstractNum", rawId) } : {},
|
|
1070
|
+
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "abstractNum", rawId, childXmlPath) } : {},
|
|
1066
1071
|
levels: readLevels(child),
|
|
1067
1072
|
...nsid ? { nsid } : {},
|
|
1068
1073
|
...multiLevelType ? { multiLevelType } : {},
|
|
@@ -1082,7 +1087,7 @@ function parseNumberingXml(xml, context) {
|
|
|
1082
1087
|
const numberingInstanceId = toCanonicalNumberingInstanceId(rawId);
|
|
1083
1088
|
instances[numberingInstanceId] = {
|
|
1084
1089
|
numberingInstanceId,
|
|
1085
|
-
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "num", rawId) } : {},
|
|
1090
|
+
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "num", rawId, childXmlPath) } : {},
|
|
1086
1091
|
abstractNumberingId: toCanonicalAbstractNumberingId(rawAbstractId),
|
|
1087
1092
|
overrides: readOverrides(child)
|
|
1088
1093
|
};
|
|
@@ -1096,15 +1101,16 @@ function parseNumberingXml(xml, context) {
|
|
|
1096
1101
|
...Object.keys(numPicBullets).length > 0 ? { numPicBullets } : {}
|
|
1097
1102
|
};
|
|
1098
1103
|
}
|
|
1099
|
-
function createNumberingSourceRef(partPath, element, rawId) {
|
|
1104
|
+
function createNumberingSourceRef(partPath, element, rawId, xmlPath) {
|
|
1100
1105
|
return {
|
|
1101
1106
|
sourceId: `part:${partPath}#${element}:${rawId}`,
|
|
1102
1107
|
partPath,
|
|
1103
1108
|
storyKind: "numbering",
|
|
1104
|
-
element
|
|
1109
|
+
element,
|
|
1110
|
+
...xmlPath !== void 0 ? { xmlPath } : {}
|
|
1105
1111
|
};
|
|
1106
1112
|
}
|
|
1107
|
-
function readNumPicBullet(node, numPicBulletId, context) {
|
|
1113
|
+
function readNumPicBullet(node, numPicBulletId, context, xmlPath) {
|
|
1108
1114
|
let widthEmu;
|
|
1109
1115
|
let heightEmu;
|
|
1110
1116
|
let mediaId;
|
|
@@ -1167,6 +1173,7 @@ function readNumPicBullet(node, numPicBulletId, context) {
|
|
|
1167
1173
|
}
|
|
1168
1174
|
return {
|
|
1169
1175
|
numPicBulletId,
|
|
1176
|
+
...context?.partPath !== void 0 ? { sourceRef: createNumberingSourceRef(context.partPath, "numPicBullet", numPicBulletId, xmlPath) } : {},
|
|
1170
1177
|
rawXml: serializeXmlElementToString(node),
|
|
1171
1178
|
...widthEmu !== void 0 ? { widthEmu } : {},
|
|
1172
1179
|
...heightEmu !== void 0 ? { heightEmu } : {},
|
|
@@ -1487,7 +1494,8 @@ function parseInteger(value) {
|
|
|
1487
1494
|
// src/io/ooxml/parse-bookmark-references.ts
|
|
1488
1495
|
var HYPERLINK_ANCHOR_RE = /<(?:\w+:)?hyperlink\b[^>]*\bw:anchor\s*=\s*"([^"]*)"/gi;
|
|
1489
1496
|
var INSTR_TEXT_RE = /<(?:\w+:)?instrText\b[^>]*>([\s\S]*?)<\/(?:\w+:)?instrText>/gi;
|
|
1490
|
-
var
|
|
1497
|
+
var FLD_SIMPLE_INSTR_DOUBLE_RE = /<(?:\w+:)?fldSimple\b[^>]*?\b(?:w:)?instr\s*=\s*"([^"]*)"/gi;
|
|
1498
|
+
var FLD_SIMPLE_INSTR_SINGLE_RE = /<(?:\w+:)?fldSimple\b[^>]*?\b(?:w:)?instr\s*=\s*'([^']*)'/gi;
|
|
1491
1499
|
var TOC_FIELD_RE = /\bTOC\b/;
|
|
1492
1500
|
var REFLIKE_FIELD_RE = /\b(?:HYPERLINK|REF|PAGEREF|NOTEREF)\s+([A-Za-z0-9_:.\-]+)/g;
|
|
1493
1501
|
var DATA_BINDING_RE = /<(?:\w+:)?dataBinding\b/i;
|
|
@@ -1506,11 +1514,22 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
|
|
|
1506
1514
|
}
|
|
1507
1515
|
INSTR_TEXT_RE.lastIndex = 0;
|
|
1508
1516
|
while ((m = INSTR_TEXT_RE.exec(documentXml)) !== null) {
|
|
1509
|
-
|
|
1517
|
+
const instrText = m[1] ?? "";
|
|
1518
|
+
scanFieldInstruction(instrText, retained, () => {
|
|
1519
|
+
retainAllToc = true;
|
|
1520
|
+
});
|
|
1510
1521
|
}
|
|
1511
|
-
|
|
1512
|
-
while ((m =
|
|
1513
|
-
|
|
1522
|
+
FLD_SIMPLE_INSTR_DOUBLE_RE.lastIndex = 0;
|
|
1523
|
+
while ((m = FLD_SIMPLE_INSTR_DOUBLE_RE.exec(documentXml)) !== null) {
|
|
1524
|
+
scanFieldInstruction(decodeXmlAttribute(m[1] ?? ""), retained, () => {
|
|
1525
|
+
retainAllToc = true;
|
|
1526
|
+
});
|
|
1527
|
+
}
|
|
1528
|
+
FLD_SIMPLE_INSTR_SINGLE_RE.lastIndex = 0;
|
|
1529
|
+
while ((m = FLD_SIMPLE_INSTR_SINGLE_RE.exec(documentXml)) !== null) {
|
|
1530
|
+
scanFieldInstruction(decodeXmlAttribute(m[1] ?? ""), retained, () => {
|
|
1531
|
+
retainAllToc = true;
|
|
1532
|
+
});
|
|
1514
1533
|
}
|
|
1515
1534
|
retainRevisionBoundedBookmarks(documentXml, retained);
|
|
1516
1535
|
return {
|
|
@@ -1519,14 +1538,16 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
|
|
|
1519
1538
|
retainAll
|
|
1520
1539
|
};
|
|
1521
1540
|
}
|
|
1522
|
-
function
|
|
1523
|
-
|
|
1541
|
+
function scanFieldInstruction(instrText, retained, retainToc) {
|
|
1542
|
+
if (TOC_FIELD_RE.test(instrText)) retainToc();
|
|
1524
1543
|
REFLIKE_FIELD_RE.lastIndex = 0;
|
|
1525
1544
|
let r;
|
|
1526
1545
|
while ((r = REFLIKE_FIELD_RE.exec(instrText)) !== null) {
|
|
1527
1546
|
if (r[1]) retained.add(r[1]);
|
|
1528
1547
|
}
|
|
1529
|
-
|
|
1548
|
+
}
|
|
1549
|
+
function decodeXmlAttribute(value) {
|
|
1550
|
+
return value.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
1530
1551
|
}
|
|
1531
1552
|
function retainRevisionBoundedBookmarks(documentXml, retained) {
|
|
1532
1553
|
const starts = /* @__PURE__ */ new Map();
|
|
@@ -5381,7 +5402,11 @@ function parseBodyChild(node, sourceXml, relationshipMap, relationships, mediaPa
|
|
|
5381
5402
|
switch (localName(child.name)) {
|
|
5382
5403
|
case "pPr":
|
|
5383
5404
|
styleId = readParagraphStyleId(child);
|
|
5384
|
-
numbering = readParagraphNumbering(
|
|
5405
|
+
numbering = readParagraphNumbering(
|
|
5406
|
+
child,
|
|
5407
|
+
sourcePartPath,
|
|
5408
|
+
`${sourceXmlPath}/pPr[${countPriorElementSiblingsByName(node, child) + 1}]`
|
|
5409
|
+
);
|
|
5385
5410
|
alignment = readParagraphAlignment(child);
|
|
5386
5411
|
spacing = readParagraphSpacing2(child);
|
|
5387
5412
|
contextualSpacing = readOptionalOnOffParagraphProperty(child, "contextualSpacing");
|
|
@@ -6464,7 +6489,7 @@ function readParagraphStyleId(node) {
|
|
|
6464
6489
|
}
|
|
6465
6490
|
return void 0;
|
|
6466
6491
|
}
|
|
6467
|
-
function readParagraphNumbering(node, sourcePartPath) {
|
|
6492
|
+
function readParagraphNumbering(node, sourcePartPath, sourceXmlPath) {
|
|
6468
6493
|
const numberingProperties = node.children.find(
|
|
6469
6494
|
(child) => child.type === "element" && localName(child.name) === "numPr"
|
|
6470
6495
|
);
|
|
@@ -6484,16 +6509,22 @@ function readParagraphNumbering(node, sourcePartPath) {
|
|
|
6484
6509
|
}
|
|
6485
6510
|
return {
|
|
6486
6511
|
numberingInstanceId: toCanonicalNumberingInstanceId(rawInstanceId),
|
|
6487
|
-
sourceRef: createElementSourceRef(
|
|
6512
|
+
sourceRef: createElementSourceRef(
|
|
6513
|
+
sourcePartPath,
|
|
6514
|
+
"numPr",
|
|
6515
|
+
numberingProperties,
|
|
6516
|
+
sourceXmlPath !== void 0 ? `${sourceXmlPath}/numPr[${countPriorElementSiblingsByName(node, numberingProperties) + 1}]` : void 0
|
|
6517
|
+
),
|
|
6488
6518
|
level: Number.parseInt(rawLevel, 10)
|
|
6489
6519
|
};
|
|
6490
6520
|
}
|
|
6491
|
-
function createElementSourceRef(partPath, element, node) {
|
|
6521
|
+
function createElementSourceRef(partPath, element, node, xmlPath) {
|
|
6492
6522
|
return {
|
|
6493
6523
|
sourceId: `part:${partPath}#${element}:${node.start}`,
|
|
6494
6524
|
partPath,
|
|
6495
6525
|
storyKind: storyKindFromPartPath(partPath),
|
|
6496
6526
|
element,
|
|
6527
|
+
...xmlPath !== void 0 ? { xmlPath } : {},
|
|
6497
6528
|
startOffset: node.start,
|
|
6498
6529
|
endOffset: node.end
|
|
6499
6530
|
};
|
|
@@ -916,7 +916,7 @@ function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, tar
|
|
|
916
916
|
context: { storyKey, insideSdt: contentControl !== void 0 },
|
|
917
917
|
...tableTarget
|
|
918
918
|
}) : void 0;
|
|
919
|
-
const listAddress =
|
|
919
|
+
const listAddress = paragraph.numbering !== void 0 ? createCanonicalAddress({
|
|
920
920
|
addressKind: "list-item-text",
|
|
921
921
|
storyKey,
|
|
922
922
|
staleCheckKind: "paragraph",
|
|
@@ -950,6 +950,7 @@ function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, tar
|
|
|
950
950
|
...contentControl !== void 0 ? { contentControl } : {},
|
|
951
951
|
...tableIdentity !== void 0 ? { table: tableIdentity } : {},
|
|
952
952
|
...editableOwner !== void 0 ? { editableOwner } : {},
|
|
953
|
+
...listAddress !== void 0 ? { listAddress } : {},
|
|
953
954
|
...tableIdentity !== void 0 ? {
|
|
954
955
|
canonicalAddress: createTableTargetCanonicalAddress(
|
|
955
956
|
tableIdentity,
|
|
@@ -1813,6 +1814,9 @@ function validateEditableTargetRef(value, path = "$") {
|
|
|
1813
1814
|
if (record.canonicalAddress !== void 0) {
|
|
1814
1815
|
validateTargetCanonicalAddress(record.canonicalAddress, `${path}.canonicalAddress`, issues);
|
|
1815
1816
|
}
|
|
1817
|
+
if (record.listAddress !== void 0) {
|
|
1818
|
+
validateTargetCanonicalAddress(record.listAddress, `${path}.listAddress`, issues);
|
|
1819
|
+
}
|
|
1816
1820
|
const staleCheck = asPlainObject(record.staleCheck, `${path}.staleCheck`, issues);
|
|
1817
1821
|
if (staleCheck) {
|
|
1818
1822
|
if (staleCheck.paragraphTextHash !== void 0) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TextTransactionError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KV435YXO.js";
|
|
4
4
|
import {
|
|
5
5
|
replaceParagraphScope,
|
|
6
6
|
resolveParagraphScope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BYSRJ4FE.js";
|
|
8
8
|
import {
|
|
9
9
|
cloneParagraphProperties,
|
|
10
10
|
cloneStoryUnit,
|