@beyondwork/docx-react-component 1.0.128 → 1.0.130
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 +809 -78
- package/dist/api/public-types.d.cts +2 -2
- package/dist/api/public-types.d.ts +2 -2
- package/dist/api/public-types.js +4 -4
- package/dist/api/v3.cjs +2059 -402
- package/dist/api/v3.d.cts +3 -3
- package/dist/api/v3.d.ts +3 -3
- package/dist/api/v3.js +13 -13
- package/dist/{canonical-document-CXCFCbAz.d.cts → canonical-document-BMtONpgf.d.cts} +6 -0
- package/dist/{canonical-document-CXCFCbAz.d.ts → canonical-document-BMtONpgf.d.ts} +6 -0
- package/dist/{chunk-MWSBGJQO.js → chunk-35RHOE6I.js} +105 -4
- package/dist/{chunk-2QL5DAKF.js → chunk-3YCQM2RV.js} +6 -6
- package/dist/{chunk-ESJ2MES5.js → chunk-4YCWECLZ.js} +1 -1
- package/dist/{chunk-4EENH4FG.js → chunk-6TBLDBCL.js} +1 -1
- package/dist/{chunk-XRACP43Q.js → chunk-7G5GR3VV.js} +469 -32
- package/dist/{chunk-CXSYRB37.js → chunk-A3GSNB4G.js} +183 -55
- package/dist/{chunk-5DGKFNQT.js → chunk-A66ZVUAT.js} +150 -1
- package/dist/{chunk-YIYM4ZAP.js → chunk-CI2TD3T4.js} +1 -1
- package/dist/{chunk-TQDQU2E3.js → chunk-DGA7M77X.js} +2 -2
- package/dist/{chunk-EB6M3GE6.js → chunk-FM4K4XFJ.js} +100 -97
- package/dist/{chunk-D5HYZQTG.js → chunk-HYHCRMR7.js} +1 -1
- package/dist/{chunk-6F5QW44A.js → chunk-KNHMXKC6.js} +2 -2
- package/dist/{chunk-4YJVRIUB.js → chunk-M7YRJX6V.js} +61 -29
- package/dist/{chunk-KFCQYZXR.js → chunk-OVLZQ6FZ.js} +61 -0
- package/dist/{chunk-BYSRJ4FE.js → chunk-PHMWH23E.js} +1 -1
- package/dist/{chunk-ZDOAUP3V.js → chunk-Q7Y57KOK.js} +2 -2
- package/dist/{chunk-LZVBNDGU.js → chunk-QXKQPUOM.js} +3 -3
- package/dist/{chunk-CX42VC67.js → chunk-SYQWQ6FE.js} +1 -1
- package/dist/{chunk-KV435YXO.js → chunk-T5YYFDZB.js} +1 -1
- package/dist/{chunk-YHZHPXDB.js → chunk-THVM6EP5.js} +419 -24
- package/dist/{chunk-V6XVZFFH.js → chunk-VRKK2CSZ.js} +111 -90
- package/dist/{chunk-OL2UEHRP.js → chunk-WUDSNHWF.js} +1 -1
- package/dist/{chunk-LCYYR57Q.js → chunk-WZDKNF37.js} +666 -107
- package/dist/{chunk-6EROGFUF.js → chunk-YLL7MF5C.js} +444 -131
- package/dist/{chunk-YD2JE54B.js → chunk-ZVC23LKV.js} +1 -1
- package/dist/compare.cjs +100 -97
- package/dist/compare.d.cts +1 -1
- package/dist/compare.d.ts +1 -1
- package/dist/compare.js +3 -3
- 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 +182 -54
- 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 +182 -54
- 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 +182 -54
- 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 +2765 -557
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +52 -28
- package/dist/io/docx-session.cjs +267 -211
- package/dist/io/docx-session.d.cts +4 -4
- package/dist/io/docx-session.d.ts +4 -4
- package/dist/io/docx-session.js +6 -6
- package/dist/legal.cjs +9 -20
- package/dist/legal.d.cts +1 -1
- package/dist/legal.d.ts +1 -1
- package/dist/legal.js +3 -3
- package/dist/{loader-19ct2Be0.d.ts → loader-B-aL5HGD.d.ts} +3 -3
- package/dist/{loader-CoXQ2wGd.d.cts → loader-DiY_ZgKl.d.cts} +3 -3
- package/dist/{measurement-backend-canvas-Q3MJMEYX.js → measurement-backend-canvas-F7ZYDACK.js} +1 -1
- package/dist/{public-types-B-CskQen.d.cts → public-types-DyqnxxO9.d.ts} +252 -2
- package/dist/{public-types-7KZsNGE2.d.ts → public-types-gvubspUI.d.cts} +252 -2
- package/dist/public-types.cjs +809 -78
- package/dist/public-types.d.cts +2 -2
- package/dist/public-types.d.ts +2 -2
- package/dist/public-types.js +4 -4
- package/dist/runtime/collab.d.cts +3 -3
- package/dist/runtime/collab.d.ts +3 -3
- package/dist/runtime/document-runtime.cjs +1887 -313
- package/dist/runtime/document-runtime.d.cts +2 -2
- package/dist/runtime/document-runtime.d.ts +2 -2
- package/dist/runtime/document-runtime.js +17 -17
- package/dist/{session-B5015J4v.d.cts → session-BUN6B-Vj.d.cts} +3 -3
- package/dist/{session-C2i8-d6v.d.ts → session-CDB0hohT.d.ts} +3 -3
- package/dist/session.cjs +267 -211
- package/dist/session.d.cts +5 -5
- package/dist/session.d.ts +5 -5
- package/dist/session.js +7 -7
- package/dist/tailwind.cjs +809 -78
- package/dist/tailwind.d.cts +2 -2
- package/dist/tailwind.d.ts +2 -2
- package/dist/tailwind.js +8 -8
- package/dist/{types-DNhN0WeN.d.cts → types-C4bz3kDU.d.cts} +2 -2
- package/dist/{types-yvrQuGX9.d.ts → types-VWH6CRvG.d.ts} +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 +5 -5
- package/dist/ui-tailwind.cjs +809 -78
- package/dist/ui-tailwind.d.cts +3 -3
- package/dist/ui-tailwind.d.ts +3 -3
- package/dist/ui-tailwind.js +8 -8
- 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-gvubspUI.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-gvubspUI.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
6
|
-
import '../canonical-document-
|
|
6
|
+
import '../canonical-document-BMtONpgf.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-DyqnxxO9.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-DyqnxxO9.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
6
|
-
import '../canonical-document-
|
|
6
|
+
import '../canonical-document-BMtONpgf.js';
|
|
7
7
|
import 'prosemirror-state';
|
|
8
8
|
import 'prosemirror-model';
|
|
9
9
|
|
package/dist/api/v3.js
CHANGED
|
@@ -5,26 +5,26 @@ import {
|
|
|
5
5
|
mockId,
|
|
6
6
|
mockPayload,
|
|
7
7
|
validateApiV3Metadata
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-WZDKNF37.js";
|
|
9
|
+
import "../chunk-7G5GR3VV.js";
|
|
10
10
|
import "../chunk-C2LWJ4CZ.js";
|
|
11
11
|
import {
|
|
12
12
|
createUiApi,
|
|
13
13
|
emitUxResponse
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-CI2TD3T4.js";
|
|
15
|
+
import "../chunk-THVM6EP5.js";
|
|
16
|
+
import "../chunk-OVLZQ6FZ.js";
|
|
17
17
|
import "../chunk-QIO6V46H.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-A3GSNB4G.js";
|
|
19
19
|
import "../chunk-OYGMRRR7.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-DGA7M77X.js";
|
|
21
|
+
import "../chunk-VRKK2CSZ.js";
|
|
22
|
+
import "../chunk-4YCWECLZ.js";
|
|
23
|
+
import "../chunk-M7YRJX6V.js";
|
|
24
24
|
import "../chunk-4BJ6K26R.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-A66ZVUAT.js";
|
|
26
|
+
import "../chunk-WUDSNHWF.js";
|
|
27
|
+
import "../chunk-FM4K4XFJ.js";
|
|
28
28
|
import "../chunk-IHE7YOAY.js";
|
|
29
29
|
import "../chunk-MT37IIGN.js";
|
|
30
30
|
import "../chunk-UTL65BUI.js";
|
|
@@ -634,6 +634,8 @@ interface NumberingLevelParagraphGeometry {
|
|
|
634
634
|
readonly tabStops?: TabStop[];
|
|
635
635
|
}
|
|
636
636
|
interface NumberingLevelDefinition {
|
|
637
|
+
/** Source numbering-part pointer for level-specific joins and command readback. */
|
|
638
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
637
639
|
readonly level: number;
|
|
638
640
|
readonly format: string;
|
|
639
641
|
readonly text: string;
|
|
@@ -652,6 +654,8 @@ interface NumberingLevelDefinition {
|
|
|
652
654
|
readonly picBulletId?: string;
|
|
653
655
|
}
|
|
654
656
|
interface NumberingLevelOverrideDefinition {
|
|
657
|
+
/** Source numbering-part pointer for override-level definition joins. */
|
|
658
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
655
659
|
readonly level: number;
|
|
656
660
|
readonly format?: string;
|
|
657
661
|
readonly text?: string;
|
|
@@ -672,6 +676,8 @@ interface NumberingInstance {
|
|
|
672
676
|
readonly overrides: NumberingLevelOverride[];
|
|
673
677
|
}
|
|
674
678
|
interface NumberingLevelOverride {
|
|
679
|
+
/** Source numbering-part pointer for `<w:lvlOverride>`. */
|
|
680
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
675
681
|
readonly level: number;
|
|
676
682
|
readonly startAt?: number;
|
|
677
683
|
readonly levelDefinition?: NumberingLevelOverrideDefinition;
|
|
@@ -634,6 +634,8 @@ interface NumberingLevelParagraphGeometry {
|
|
|
634
634
|
readonly tabStops?: TabStop[];
|
|
635
635
|
}
|
|
636
636
|
interface NumberingLevelDefinition {
|
|
637
|
+
/** Source numbering-part pointer for level-specific joins and command readback. */
|
|
638
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
637
639
|
readonly level: number;
|
|
638
640
|
readonly format: string;
|
|
639
641
|
readonly text: string;
|
|
@@ -652,6 +654,8 @@ interface NumberingLevelDefinition {
|
|
|
652
654
|
readonly picBulletId?: string;
|
|
653
655
|
}
|
|
654
656
|
interface NumberingLevelOverrideDefinition {
|
|
657
|
+
/** Source numbering-part pointer for override-level definition joins. */
|
|
658
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
655
659
|
readonly level: number;
|
|
656
660
|
readonly format?: string;
|
|
657
661
|
readonly text?: string;
|
|
@@ -672,6 +676,8 @@ interface NumberingInstance {
|
|
|
672
676
|
readonly overrides: NumberingLevelOverride[];
|
|
673
677
|
}
|
|
674
678
|
interface NumberingLevelOverride {
|
|
679
|
+
/** Source numbering-part pointer for `<w:lvlOverride>`. */
|
|
680
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
675
681
|
readonly level: number;
|
|
676
682
|
readonly startAt?: number;
|
|
677
683
|
readonly levelDefinition?: NumberingLevelOverrideDefinition;
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
PAGE_STACK_GAP_PX,
|
|
4
4
|
defaultChromeReservations,
|
|
5
5
|
resolveDefaultZoom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-THVM6EP5.js";
|
|
7
7
|
import {
|
|
8
8
|
storyTargetKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A3GSNB4G.js";
|
|
10
10
|
import {
|
|
11
11
|
MAIN_STORY_KEY,
|
|
12
12
|
collectCanonicalLayoutInputs,
|
|
13
13
|
collectStoryBlockContexts,
|
|
14
14
|
createHeaderFooterStoryKey,
|
|
15
15
|
createNoteStoryKey
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-A66ZVUAT.js";
|
|
17
17
|
import {
|
|
18
18
|
MAIN_STORY_TARGET
|
|
19
19
|
} from "./chunk-M2HUK3KF.js";
|
|
@@ -266,6 +266,76 @@ function diffRenderFrames(prev, next) {
|
|
|
266
266
|
}
|
|
267
267
|
return { addedPages, removedPages, unchangedPages, changedPages };
|
|
268
268
|
}
|
|
269
|
+
function createPagePatchPlan(prev, next, diff = diffRenderFrames(prev, next), options = {}) {
|
|
270
|
+
const prevByIndex = indexPagesByIndex(prev?.pages ?? []);
|
|
271
|
+
const nextByIndex = indexPagesByIndex(next.pages);
|
|
272
|
+
const addedPages = diff.addedPages.map(
|
|
273
|
+
(pageIndex) => pageIdForIndex(nextByIndex, pageIndex)
|
|
274
|
+
);
|
|
275
|
+
const removedPages = diff.removedPages.map(
|
|
276
|
+
(pageIndex) => pageIdForIndex(prevByIndex, pageIndex)
|
|
277
|
+
);
|
|
278
|
+
const unchangedPages = diff.unchangedPages.map(
|
|
279
|
+
(pageIndex) => pageIdForIndex(nextByIndex, pageIndex)
|
|
280
|
+
);
|
|
281
|
+
const changedPages = diff.changedPages.map(
|
|
282
|
+
(entry) => createPagePatchEntry(entry, pageIdForIndex(nextByIndex, entry.pageIndex), options)
|
|
283
|
+
);
|
|
284
|
+
return {
|
|
285
|
+
layoutRevision: options.layoutRevision ?? next.revision,
|
|
286
|
+
geometryRevision: options.geometryRevision ?? next.revision,
|
|
287
|
+
addedPages,
|
|
288
|
+
removedPages,
|
|
289
|
+
unchangedPages,
|
|
290
|
+
changedPages,
|
|
291
|
+
mountChanges: resolveMountChanges({
|
|
292
|
+
addedPages,
|
|
293
|
+
removedPages,
|
|
294
|
+
mountedPageIds: options.mountedPageIds,
|
|
295
|
+
requestedMountPageIds: options.requestedMountPageIds
|
|
296
|
+
})
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function createPagePatchEntry(entry, pageId, options) {
|
|
300
|
+
const regionChanges = entry.regions.map((region) => region.kind);
|
|
301
|
+
const fragmentChanges = uniqueStrings(
|
|
302
|
+
entry.regions.flatMap((region) => region.changedBlockIds)
|
|
303
|
+
);
|
|
304
|
+
const overlayLaneChanges = !entry.pageFrameChanged && entry.regions.length === 0 ? ["chrome-reservations"] : [];
|
|
305
|
+
return {
|
|
306
|
+
pageId,
|
|
307
|
+
pageIndex: entry.pageIndex,
|
|
308
|
+
frameChanged: entry.pageFrameChanged === true,
|
|
309
|
+
regionChanges,
|
|
310
|
+
fragmentChanges,
|
|
311
|
+
lineBoxChanges: fragmentChanges,
|
|
312
|
+
overlayLaneChanges,
|
|
313
|
+
reason: options.reason ?? (overlayLaneChanges.length > 0 ? "overlay" : "layout")
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
function resolveMountChanges(input) {
|
|
317
|
+
if (!input.mountedPageIds || !input.requestedMountPageIds) {
|
|
318
|
+
return {
|
|
319
|
+
mountPageIds: input.addedPages,
|
|
320
|
+
unmountPageIds: input.removedPages
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
const mounted = new Set(input.mountedPageIds);
|
|
324
|
+
const requested = new Set(input.requestedMountPageIds);
|
|
325
|
+
return {
|
|
326
|
+
mountPageIds: input.requestedMountPageIds.filter((pageId) => !mounted.has(pageId)),
|
|
327
|
+
unmountPageIds: input.mountedPageIds.filter((pageId) => !requested.has(pageId))
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function indexPagesByIndex(pages) {
|
|
331
|
+
return new Map(pages.map((page) => [page.page.pageIndex, page]));
|
|
332
|
+
}
|
|
333
|
+
function pageIdForIndex(pages, pageIndex) {
|
|
334
|
+
return pages.get(pageIndex)?.page.pageId ?? `page:${pageIndex}`;
|
|
335
|
+
}
|
|
336
|
+
function uniqueStrings(values) {
|
|
337
|
+
return [...new Set(values)];
|
|
338
|
+
}
|
|
269
339
|
function diffPage(prev, next, prevIndex, nextIndex) {
|
|
270
340
|
const changed = [];
|
|
271
341
|
const bodyChanges = diffRegion(prev.regions.body, next.regions.body, prevIndex, nextIndex);
|
|
@@ -486,10 +556,12 @@ function createRenderKernel(input) {
|
|
|
486
556
|
emit({ kind: "frame_built", revision: frame.revision, reason: "full" });
|
|
487
557
|
const diffT0 = typeof performance !== "undefined" ? performance.now() : 0;
|
|
488
558
|
const diff = diffRenderFrames(lastEmittedFrame, frame);
|
|
559
|
+
const patchPlan = createPagePatchPlan(lastEmittedFrame, frame, diff);
|
|
560
|
+
recordPagePatchPlanTelemetry(patchPlan);
|
|
489
561
|
if (diffT0 > 0) {
|
|
490
562
|
recordPerfSample("render.frame_diff", performance.now() - diffT0);
|
|
491
563
|
}
|
|
492
|
-
emit({ kind: "frame_diff", revision: frame.revision, diff });
|
|
564
|
+
emit({ kind: "frame_diff", revision: frame.revision, diff, patchPlan });
|
|
493
565
|
lastEmittedFrame = frame;
|
|
494
566
|
}
|
|
495
567
|
return frame;
|
|
@@ -512,6 +584,35 @@ function createRenderKernel(input) {
|
|
|
512
584
|
}
|
|
513
585
|
};
|
|
514
586
|
}
|
|
587
|
+
function recordPagePatchPlanTelemetry(plan) {
|
|
588
|
+
incrementInvalidationCounter(
|
|
589
|
+
"pageRender.patch.addedPages",
|
|
590
|
+
plan.addedPages.length
|
|
591
|
+
);
|
|
592
|
+
incrementInvalidationCounter(
|
|
593
|
+
"pageRender.patch.removedPages",
|
|
594
|
+
plan.removedPages.length
|
|
595
|
+
);
|
|
596
|
+
incrementInvalidationCounter(
|
|
597
|
+
"pageRender.patch.unchangedPages",
|
|
598
|
+
plan.unchangedPages.length
|
|
599
|
+
);
|
|
600
|
+
incrementInvalidationCounter(
|
|
601
|
+
"pageRender.patch.changedFragments",
|
|
602
|
+
plan.changedPages.reduce(
|
|
603
|
+
(total, page) => total + page.fragmentChanges.length,
|
|
604
|
+
0
|
|
605
|
+
)
|
|
606
|
+
);
|
|
607
|
+
incrementInvalidationCounter(
|
|
608
|
+
"pageRender.patch.mountedPages",
|
|
609
|
+
plan.mountChanges.mountPageIds.length
|
|
610
|
+
);
|
|
611
|
+
incrementInvalidationCounter(
|
|
612
|
+
"pageRender.patch.unmountedPages",
|
|
613
|
+
plan.mountChanges.unmountPageIds.length
|
|
614
|
+
);
|
|
615
|
+
}
|
|
515
616
|
function buildPage(page, topPx, zoom, activeStory, facet) {
|
|
516
617
|
const layout = page.layout;
|
|
517
618
|
const widthPx = layout.pageWidth * zoom.pxPerTwip;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
incrementInvalidationCounter,
|
|
3
3
|
recordPerfSample,
|
|
4
4
|
resolvePageOverlayRectsFromGeometry
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-35RHOE6I.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-CI2TD3T4.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-THVM6EP5.js";
|
|
24
24
|
import {
|
|
25
25
|
createCanvasBackend
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OVLZQ6FZ.js";
|
|
27
27
|
import {
|
|
28
28
|
storyTargetKey
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-A3GSNB4G.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-A66ZVUAT.js";
|
|
36
36
|
import {
|
|
37
37
|
createPublicNodeAnchor,
|
|
38
38
|
createPublicRangeAnchor
|