@beyondwork/docx-react-component 1.0.129 → 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 +595 -18
- package/dist/api/public-types.d.cts +1 -1
- package/dist/api/public-types.d.ts +1 -1
- package/dist/api/public-types.js +4 -4
- package/dist/api/v3.cjs +1164 -332
- package/dist/api/v3.d.cts +2 -2
- package/dist/api/v3.d.ts +2 -2
- package/dist/api/v3.js +13 -13
- package/dist/{chunk-OTQIW2TC.js → chunk-35RHOE6I.js} +105 -4
- package/dist/{chunk-PGKUJZXV.js → chunk-3YCQM2RV.js} +6 -6
- package/dist/{chunk-JJGVE5J7.js → chunk-4YCWECLZ.js} +1 -1
- package/dist/{chunk-EZKJXIPH.js → chunk-6TBLDBCL.js} +1 -1
- package/dist/{chunk-SKPTKQHF.js → chunk-7G5GR3VV.js} +122 -23
- package/dist/{chunk-HUIHBBAQ.js → chunk-A3GSNB4G.js} +17 -6
- package/dist/{chunk-5DGKFNQT.js → chunk-A66ZVUAT.js} +150 -1
- package/dist/{chunk-YIYM4ZAP.js → chunk-CI2TD3T4.js} +1 -1
- package/dist/{chunk-63FYIGCT.js → chunk-DGA7M77X.js} +2 -2
- package/dist/{chunk-EB6M3GE6.js → chunk-FM4K4XFJ.js} +100 -97
- package/dist/{chunk-VNLDQJ47.js → chunk-HYHCRMR7.js} +1 -1
- package/dist/{chunk-DJU2W4E4.js → chunk-KNHMXKC6.js} +2 -2
- package/dist/{chunk-Q3QYGKFE.js → chunk-M7YRJX6V.js} +10 -21
- package/dist/{chunk-KFCQYZXR.js → chunk-OVLZQ6FZ.js} +61 -0
- package/dist/{chunk-W34X3KBR.js → chunk-PHMWH23E.js} +1 -1
- package/dist/{chunk-DDN2AIGE.js → chunk-Q7Y57KOK.js} +2 -2
- package/dist/{chunk-LJH64PV3.js → chunk-QXKQPUOM.js} +3 -3
- package/dist/{chunk-CX42VC67.js → chunk-SYQWQ6FE.js} +1 -1
- package/dist/{chunk-5DSHUYSY.js → chunk-T5YYFDZB.js} +1 -1
- package/dist/{chunk-RMRTQGW3.js → chunk-THVM6EP5.js} +371 -13
- package/dist/{chunk-XMHSGPLN.js → chunk-VRKK2CSZ.js} +111 -90
- package/dist/{chunk-OL2UEHRP.js → chunk-WUDSNHWF.js} +1 -1
- package/dist/{chunk-XQCAMKIQ.js → chunk-WZDKNF37.js} +250 -106
- package/dist/{chunk-PRAZBHNF.js → chunk-YLL7MF5C.js} +15 -15
- package/dist/{chunk-YZDZ4FGR.js → chunk-ZVC23LKV.js} +1 -1
- package/dist/compare.cjs +100 -97
- package/dist/compare.js +3 -3
- package/dist/core/commands/formatting-commands.d.cts +1 -1
- package/dist/core/commands/formatting-commands.d.ts +1 -1
- package/dist/core/commands/image-commands.cjs +16 -5
- package/dist/core/commands/image-commands.d.cts +1 -1
- package/dist/core/commands/image-commands.d.ts +1 -1
- package/dist/core/commands/image-commands.js +5 -5
- package/dist/core/commands/section-layout-commands.d.cts +1 -1
- package/dist/core/commands/section-layout-commands.d.ts +1 -1
- package/dist/core/commands/style-commands.d.cts +1 -1
- package/dist/core/commands/style-commands.d.ts +1 -1
- package/dist/core/commands/table-structure-commands.cjs +16 -5
- package/dist/core/commands/table-structure-commands.d.cts +1 -1
- package/dist/core/commands/table-structure-commands.d.ts +1 -1
- package/dist/core/commands/table-structure-commands.js +4 -4
- package/dist/core/commands/text-commands.cjs +16 -5
- package/dist/core/commands/text-commands.d.cts +1 -1
- package/dist/core/commands/text-commands.d.ts +1 -1
- package/dist/core/commands/text-commands.js +5 -5
- package/dist/core/selection/mapping.d.cts +1 -1
- package/dist/core/selection/mapping.d.ts +1 -1
- package/dist/core/state/editor-state.d.cts +1 -1
- package/dist/core/state/editor-state.d.ts +1 -1
- package/dist/index.cjs +1280 -347
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +24 -24
- package/dist/io/docx-session.cjs +216 -203
- package/dist/io/docx-session.d.cts +3 -3
- package/dist/io/docx-session.d.ts +3 -3
- package/dist/io/docx-session.js +6 -6
- package/dist/legal.cjs +9 -20
- package/dist/legal.js +3 -3
- package/dist/{loader-4qsw4eIU.d.ts → loader-B-aL5HGD.d.ts} +2 -2
- package/dist/{loader-B8TKhmQi.d.cts → loader-DiY_ZgKl.d.cts} +2 -2
- package/dist/{measurement-backend-canvas-Q3MJMEYX.js → measurement-backend-canvas-F7ZYDACK.js} +1 -1
- package/dist/{public-types-p9b8rfy8.d.ts → public-types-DyqnxxO9.d.ts} +124 -1
- package/dist/{public-types-B5CRoR6f.d.cts → public-types-gvubspUI.d.cts} +124 -1
- package/dist/public-types.cjs +595 -18
- package/dist/public-types.d.cts +1 -1
- package/dist/public-types.d.ts +1 -1
- package/dist/public-types.js +4 -4
- package/dist/runtime/collab.d.cts +2 -2
- package/dist/runtime/collab.d.ts +2 -2
- package/dist/runtime/document-runtime.cjs +908 -129
- package/dist/runtime/document-runtime.d.cts +1 -1
- package/dist/runtime/document-runtime.d.ts +1 -1
- package/dist/runtime/document-runtime.js +17 -17
- package/dist/{session-BnGIjaex.d.cts → session-BUN6B-Vj.d.cts} +2 -2
- package/dist/{session-vEYKf-w3.d.ts → session-CDB0hohT.d.ts} +2 -2
- package/dist/session.cjs +216 -203
- package/dist/session.d.cts +4 -4
- package/dist/session.d.ts +4 -4
- package/dist/session.js +7 -7
- package/dist/tailwind.cjs +595 -18
- package/dist/tailwind.d.cts +1 -1
- package/dist/tailwind.d.ts +1 -1
- package/dist/tailwind.js +8 -8
- package/dist/{types-BLuvZ6cQ.d.cts → types-C4bz3kDU.d.cts} +1 -1
- package/dist/{types-Dutlyj0T.d.ts → types-VWH6CRvG.d.ts} +1 -1
- package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +2 -2
- package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +2 -2
- package/dist/ui-tailwind/editor-surface/search-plugin.js +5 -5
- package/dist/ui-tailwind.cjs +595 -18
- package/dist/ui-tailwind.d.cts +2 -2
- package/dist/ui-tailwind.d.ts +2 -2
- package/dist/ui-tailwind.js +8 -8
- package/package.json +1 -1
package/dist/api/v3.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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';
|
package/dist/api/v3.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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';
|
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";
|
|
@@ -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
|
|
@@ -7,30 +7,31 @@ import {
|
|
|
7
7
|
resolveSectionForStoryTarget,
|
|
8
8
|
searchSecondaryStories,
|
|
9
9
|
searchSurfaceBlocks
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-THVM6EP5.js";
|
|
11
11
|
import {
|
|
12
12
|
createEditorSurfaceSnapshot,
|
|
13
13
|
createFormattingContext,
|
|
14
14
|
resolveTableStyleResolution
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-A3GSNB4G.js";
|
|
16
16
|
import {
|
|
17
17
|
createSelectionSnapshot
|
|
18
18
|
} from "./chunk-OYGMRRR7.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeParsedTextDocument
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4YCWECLZ.js";
|
|
22
22
|
import {
|
|
23
23
|
buildFieldRegistry,
|
|
24
24
|
parseMainDocumentXml,
|
|
25
25
|
parseTocLevelRange
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-M7YRJX6V.js";
|
|
27
27
|
import {
|
|
28
28
|
collectEditableTargetRefs,
|
|
29
|
+
collectLayoutInputIdentities,
|
|
29
30
|
validateEditableTargetRef
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-A66ZVUAT.js";
|
|
31
32
|
import {
|
|
32
33
|
serializeMainDocument
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-FM4K4XFJ.js";
|
|
34
35
|
import {
|
|
35
36
|
findOpaqueFragmentsIntersectingRange
|
|
36
37
|
} from "./chunk-UFVDIR2C.js";
|
|
@@ -4056,6 +4057,19 @@ function paragraphHasBookmarkId(paragraph, bookmarkId) {
|
|
|
4056
4057
|
function commandActionHandleForAddress(commandFamily, address) {
|
|
4057
4058
|
return address ? `scope-command:${commandFamily}:${address.addressKey}` : void 0;
|
|
4058
4059
|
}
|
|
4060
|
+
function layoutIdentityIndexes(document) {
|
|
4061
|
+
const byTargetKey = /* @__PURE__ */ new Map();
|
|
4062
|
+
const byStoryBlockPath = /* @__PURE__ */ new Map();
|
|
4063
|
+
for (const identity of collectLayoutInputIdentities(document)) {
|
|
4064
|
+
byStoryBlockPath.set(`${identity.storyKey}:${identity.blockPath}`, identity);
|
|
4065
|
+
const targetKey = identity.editableTargetRef?.targetKey;
|
|
4066
|
+
if (targetKey) byTargetKey.set(targetKey, identity);
|
|
4067
|
+
}
|
|
4068
|
+
return { byTargetKey, byStoryBlockPath };
|
|
4069
|
+
}
|
|
4070
|
+
function layoutIdentityForTarget(target, indexes) {
|
|
4071
|
+
return indexes.byTargetKey.get(target.targetKey) ?? indexes.byStoryBlockPath.get(`${target.storyKey}:${target.blockPath}`);
|
|
4072
|
+
}
|
|
4059
4073
|
function withCommandAction(evidence, target, canonicalAddress = target.canonicalAddress) {
|
|
4060
4074
|
if (evidence.status !== "supported" || !canonicalAddress) return evidence;
|
|
4061
4075
|
return {
|
|
@@ -4067,6 +4081,24 @@ function withCommandAction(evidence, target, canonicalAddress = target.canonical
|
|
|
4067
4081
|
function commandAddressForTarget(target, scopeKind) {
|
|
4068
4082
|
return scopeKind === "list-item" && target.listAddress !== void 0 ? target.listAddress : target.canonicalAddress;
|
|
4069
4083
|
}
|
|
4084
|
+
function freezeCommandIntents(intents) {
|
|
4085
|
+
return Object.freeze([...new Set(intents)]);
|
|
4086
|
+
}
|
|
4087
|
+
function relatedListActionHandlesForTarget(target, primaryAddress) {
|
|
4088
|
+
if (target.commandFamily !== "text-leaf" || target.listAddress === void 0 || !LIST_TEXT_TARGET_KINDS2.has(target.kind) || target.listAddress.addressKey === primaryAddress?.addressKey) {
|
|
4089
|
+
return void 0;
|
|
4090
|
+
}
|
|
4091
|
+
const actionHandle = commandActionHandleForAddress(target.commandFamily, target.listAddress);
|
|
4092
|
+
if (!actionHandle) return void 0;
|
|
4093
|
+
return Object.freeze([
|
|
4094
|
+
{
|
|
4095
|
+
actionHandle,
|
|
4096
|
+
canonicalAddress: target.listAddress,
|
|
4097
|
+
intents: freezeCommandIntents(["list-text-edit", "list-structure-action"]),
|
|
4098
|
+
reason: "l07:list-address-target-supported"
|
|
4099
|
+
}
|
|
4100
|
+
]);
|
|
4101
|
+
}
|
|
4070
4102
|
function runtimeTextCommandEvidence(target, workflowBlockers) {
|
|
4071
4103
|
const shapeIssues = validateEditableTargetRef(target);
|
|
4072
4104
|
if (shapeIssues.length > 0) {
|
|
@@ -4166,13 +4198,16 @@ function runtimeCommandEvidence(target, workflowBlockers, textCommand, scopeKind
|
|
|
4166
4198
|
};
|
|
4167
4199
|
}
|
|
4168
4200
|
if (target.commandFamily === "text-leaf") {
|
|
4201
|
+
const canonicalAddress = commandAddressForTarget(target, scopeKind);
|
|
4202
|
+
const relatedActionHandles = relatedListActionHandlesForTarget(target, canonicalAddress);
|
|
4169
4203
|
return withCommandAction({
|
|
4170
4204
|
status: textCommand.status,
|
|
4171
4205
|
commandFamily: target.commandFamily,
|
|
4172
4206
|
intents: commandIntentsForTarget(target, scopeKind),
|
|
4173
4207
|
reason: textCommand.reason,
|
|
4208
|
+
...relatedActionHandles !== void 0 ? { relatedActionHandles } : {},
|
|
4174
4209
|
...textCommand.blockers ? { blockers: textCommand.blockers } : {}
|
|
4175
|
-
}, target,
|
|
4210
|
+
}, target, canonicalAddress);
|
|
4176
4211
|
}
|
|
4177
4212
|
if (target.commandFamily === "comment-revision") {
|
|
4178
4213
|
const isOpen = target.review?.status === "open";
|
|
@@ -4497,19 +4532,21 @@ function commandIntentsForTarget(target, scopeKind) {
|
|
|
4497
4532
|
if (target.kind === "hyperlink-text") {
|
|
4498
4533
|
return Object.freeze(["text-leaf-edit", "hyperlink-display-text-edit"]);
|
|
4499
4534
|
}
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4535
|
+
{
|
|
4536
|
+
const intents = ["text-leaf-edit"];
|
|
4537
|
+
if (target.table?.operationScope === "text") {
|
|
4538
|
+
intents.push(
|
|
4539
|
+
"table-text-paste",
|
|
4540
|
+
"table-text-drop",
|
|
4541
|
+
"table-structured-fragment-paste",
|
|
4542
|
+
"table-structured-fragment-drop"
|
|
4543
|
+
);
|
|
4544
|
+
}
|
|
4545
|
+
if ((scopeKind === "list-item" || target.listAddress !== void 0) && LIST_TEXT_TARGET_KINDS2.has(target.kind)) {
|
|
4546
|
+
intents.push("list-text-edit", "list-structure-action");
|
|
4547
|
+
}
|
|
4548
|
+
return freezeCommandIntents(intents);
|
|
4511
4549
|
}
|
|
4512
|
-
return Object.freeze(["text-leaf-edit"]);
|
|
4513
4550
|
case "field":
|
|
4514
4551
|
return Object.freeze(
|
|
4515
4552
|
target.field?.fieldFamily === "TOC" ? ["toc-refresh", "field-update"] : ["field-update"]
|
|
@@ -4656,7 +4693,7 @@ function readbackForTarget(document, target, runtimeTextCommand) {
|
|
|
4656
4693
|
source: "canonical-text-leaf"
|
|
4657
4694
|
};
|
|
4658
4695
|
}
|
|
4659
|
-
function projectTarget(document, target, relation, workflowBlockers, scopeKind) {
|
|
4696
|
+
function projectTarget(document, target, relation, workflowBlockers, scopeKind, layoutIdentity) {
|
|
4660
4697
|
const runtimeTextCommand = runtimeTextCommandEvidence(target, workflowBlockers);
|
|
4661
4698
|
const readback = readbackForTarget(document, target, runtimeTextCommand);
|
|
4662
4699
|
return {
|
|
@@ -4677,6 +4714,7 @@ function projectTarget(document, target, relation, workflowBlockers, scopeKind)
|
|
|
4677
4714
|
...target.table ? { table: target.table } : {},
|
|
4678
4715
|
...target.editableOwner ? { editableOwner: target.editableOwner } : {},
|
|
4679
4716
|
...target.canonicalAddress ? { canonicalAddress: target.canonicalAddress } : {},
|
|
4717
|
+
...layoutIdentity ? { layoutIdentity } : {},
|
|
4680
4718
|
staleCheck: target.staleCheck,
|
|
4681
4719
|
posture: target.posture,
|
|
4682
4720
|
...workflowBlockers.length > 0 ? { workflowBlockers: Object.freeze([...workflowBlockers]) } : {},
|
|
@@ -4692,7 +4730,7 @@ function deriveScopeEditableTargetEvidence(document, scope, entry, options = {})
|
|
|
4692
4730
|
facts.push(projectWorkflowBlockerFact(fact));
|
|
4693
4731
|
factsByTargetKey.set(fact.targetKey, facts);
|
|
4694
4732
|
}
|
|
4695
|
-
const
|
|
4733
|
+
const relatedTargets = collectEditableTargetRefs(document, options.editableTargetCache).map((target) => {
|
|
4696
4734
|
const relation = relationForTarget(target, scope, entry);
|
|
4697
4735
|
if (!relation) return null;
|
|
4698
4736
|
const workflowBlockers = Object.freeze(
|
|
@@ -4700,8 +4738,19 @@ function deriveScopeEditableTargetEvidence(document, scope, entry, options = {})
|
|
|
4700
4738
|
(left, right) => left.source.localeCompare(right.source) || left.blocker.localeCompare(right.blocker) || left.refusalId.localeCompare(right.refusalId)
|
|
4701
4739
|
)
|
|
4702
4740
|
);
|
|
4703
|
-
return
|
|
4704
|
-
}).filter((target) => target !== null)
|
|
4741
|
+
return { target, relation, workflowBlockers };
|
|
4742
|
+
}).filter((target) => target !== null);
|
|
4743
|
+
const layoutIndexes = relatedTargets.length > 0 ? layoutIdentityIndexes(document) : void 0;
|
|
4744
|
+
const entries = relatedTargets.map(
|
|
4745
|
+
({ target, relation, workflowBlockers }) => projectTarget(
|
|
4746
|
+
document,
|
|
4747
|
+
target,
|
|
4748
|
+
relation,
|
|
4749
|
+
workflowBlockers,
|
|
4750
|
+
scope.kind,
|
|
4751
|
+
layoutIndexes ? layoutIdentityForTarget(target, layoutIndexes) : void 0
|
|
4752
|
+
)
|
|
4753
|
+
).sort((a, b) => a.targetKey.localeCompare(b.targetKey));
|
|
4705
4754
|
const blockers = /* @__PURE__ */ new Set();
|
|
4706
4755
|
let supportedTextTargetCount = 0;
|
|
4707
4756
|
for (const target of entries) {
|
|
@@ -4765,15 +4814,65 @@ function projectEntry2(entry) {
|
|
|
4765
4814
|
...entry.posture.preserveOnly ? { preserveOnly: true } : {}
|
|
4766
4815
|
};
|
|
4767
4816
|
}
|
|
4817
|
+
function familyKindFor(entry) {
|
|
4818
|
+
return entry.objectKind ?? "unknown";
|
|
4819
|
+
}
|
|
4820
|
+
function familyStatusFor(entries) {
|
|
4821
|
+
if (entries.some((entry) => entry.runtimeCommand.status === "supported")) {
|
|
4822
|
+
return "supported";
|
|
4823
|
+
}
|
|
4824
|
+
if (entries.length > 0 && entries.every(
|
|
4825
|
+
(entry) => entry.preserveOnly === true || entry.commandFamily === "preserve-only-refusal"
|
|
4826
|
+
)) {
|
|
4827
|
+
return "preserve-only";
|
|
4828
|
+
}
|
|
4829
|
+
return "blocked";
|
|
4830
|
+
}
|
|
4831
|
+
function summarizeFamily(objectKind, entries) {
|
|
4832
|
+
const sortedEntries = [...entries].sort(
|
|
4833
|
+
(left, right) => left.targetKey.localeCompare(right.targetKey)
|
|
4834
|
+
);
|
|
4835
|
+
const preserveOnly = sortedEntries.some((entry) => entry.preserveOnly === true);
|
|
4836
|
+
return {
|
|
4837
|
+
objectKind,
|
|
4838
|
+
status: familyStatusFor(sortedEntries),
|
|
4839
|
+
count: sortedEntries.length,
|
|
4840
|
+
targetKeys: unique(sortedEntries.map((entry) => entry.targetKey)),
|
|
4841
|
+
relations: unique(sortedEntries.map((entry) => entry.relation)),
|
|
4842
|
+
commandFamilies: unique(sortedEntries.map((entry) => entry.commandFamily)),
|
|
4843
|
+
runtimeIntents: unique(
|
|
4844
|
+
sortedEntries.flatMap((entry) => [...entry.runtimeCommand.intents])
|
|
4845
|
+
),
|
|
4846
|
+
blockers: unique(sortedEntries.flatMap((entry) => [...entry.blockers])),
|
|
4847
|
+
...preserveOnly ? { preserveOnly: true } : {}
|
|
4848
|
+
};
|
|
4849
|
+
}
|
|
4850
|
+
function summarizeFamilies(entries) {
|
|
4851
|
+
const byFamily = /* @__PURE__ */ new Map();
|
|
4852
|
+
for (const entry of entries) {
|
|
4853
|
+
const objectKind = familyKindFor(entry);
|
|
4854
|
+
const bucket = byFamily.get(objectKind);
|
|
4855
|
+
if (bucket) {
|
|
4856
|
+
bucket.push(entry);
|
|
4857
|
+
continue;
|
|
4858
|
+
}
|
|
4859
|
+
byFamily.set(objectKind, [entry]);
|
|
4860
|
+
}
|
|
4861
|
+
return Object.freeze(
|
|
4862
|
+
[...byFamily.entries()].map(([objectKind, familyEntries]) => summarizeFamily(objectKind, familyEntries)).sort((left, right) => left.objectKind.localeCompare(right.objectKind))
|
|
4863
|
+
);
|
|
4864
|
+
}
|
|
4768
4865
|
function deriveScopeObjectEvidence(editableTargets) {
|
|
4769
4866
|
const entries = Object.freeze(
|
|
4770
4867
|
[...editableTargets?.entries ?? []].filter(isObjectTarget).map(projectEntry2).sort((left, right) => left.targetKey.localeCompare(right.targetKey))
|
|
4771
4868
|
);
|
|
4772
4869
|
const blockers = unique(entries.flatMap((entry) => [...entry.blockers]));
|
|
4870
|
+
const families = summarizeFamilies(entries);
|
|
4773
4871
|
return {
|
|
4774
4872
|
status: entries.length > 0 ? "present" : "none",
|
|
4775
4873
|
count: entries.length,
|
|
4776
4874
|
blockers,
|
|
4875
|
+
families,
|
|
4777
4876
|
entries
|
|
4778
4877
|
};
|
|
4779
4878
|
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
MAIN_STORY_KEY,
|
|
5
5
|
collectCanonicalFieldRegionIdentities,
|
|
6
6
|
collectEditableTargetRefs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A66ZVUAT.js";
|
|
8
8
|
import {
|
|
9
9
|
describeOpaqueFragment,
|
|
10
10
|
describeStructuredWrapperBlock,
|
|
@@ -3067,6 +3067,7 @@ function createEditorSurfaceSnapshot(document, _selection, activeStory = { kind:
|
|
|
3067
3067
|
...options.authorColorPalette ? { authorColorPalette: options.authorColorPalette } : {}
|
|
3068
3068
|
});
|
|
3069
3069
|
const editableTargetsByBlockPath = options.editableTargetsByBlockPath ?? indexEditableTargetsByBlockPath(document);
|
|
3070
|
+
const layoutIdentitiesByBlockPath = options.layoutIdentitiesByBlockPath;
|
|
3070
3071
|
const activeStoryBlockPathBase = getActiveStoryBlockPathBase(document, activeStory);
|
|
3071
3072
|
chartModelStore.beginBuildPass(document);
|
|
3072
3073
|
const unsupportedNumberingFormatsSeen = options.emitFormattingTelemetry ? /* @__PURE__ */ new Set() : null;
|
|
@@ -3090,6 +3091,7 @@ function createEditorSurfaceSnapshot(document, _selection, activeStory = { kind:
|
|
|
3090
3091
|
activeStory.kind !== "main",
|
|
3091
3092
|
!isInViewport,
|
|
3092
3093
|
editableTargetsByBlockPath,
|
|
3094
|
+
layoutIdentitiesByBlockPath,
|
|
3093
3095
|
`${activeStoryBlockPathBase}/block[${index}]`
|
|
3094
3096
|
);
|
|
3095
3097
|
if (isInViewport) {
|
|
@@ -3156,7 +3158,7 @@ function isIndexInAnyRange(index, ranges) {
|
|
|
3156
3158
|
}
|
|
3157
3159
|
return false;
|
|
3158
3160
|
}
|
|
3159
|
-
function createSurfaceBlock(block, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, blockPath) {
|
|
3161
|
+
function createSurfaceBlock(block, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, layoutIdentitiesByBlockPath, blockPath) {
|
|
3160
3162
|
if (block.type === "opaque_block") {
|
|
3161
3163
|
const fragment = getOpaqueFragment(document.preservation, block.fragmentId);
|
|
3162
3164
|
const descriptor = fragment ? describeOpaqueFragment(fragment) : null;
|
|
@@ -3193,6 +3195,7 @@ function createSurfaceBlock(block, document, cursor, counters, formattingContext
|
|
|
3193
3195
|
promoteSecondaryStoryTextBoxes,
|
|
3194
3196
|
cullBuild,
|
|
3195
3197
|
editableTargetsByBlockPath,
|
|
3198
|
+
layoutIdentitiesByBlockPath,
|
|
3196
3199
|
blockPath
|
|
3197
3200
|
);
|
|
3198
3201
|
}
|
|
@@ -3233,6 +3236,7 @@ function createSurfaceBlock(block, document, cursor, counters, formattingContext
|
|
|
3233
3236
|
promoteSecondaryStoryTextBoxes,
|
|
3234
3237
|
cullBuild,
|
|
3235
3238
|
editableTargetsByBlockPath,
|
|
3239
|
+
layoutIdentitiesByBlockPath,
|
|
3236
3240
|
blockPath
|
|
3237
3241
|
);
|
|
3238
3242
|
}
|
|
@@ -3315,10 +3319,11 @@ function createSurfaceBlock(block, document, cursor, counters, formattingContext
|
|
|
3315
3319
|
cullBuild,
|
|
3316
3320
|
editableTargetsByBlockPath,
|
|
3317
3321
|
blockPath,
|
|
3318
|
-
blockPath !== void 0 ? editableTargetsByBlockPath.get(blockPath) : void 0
|
|
3322
|
+
blockPath !== void 0 ? editableTargetsByBlockPath.get(blockPath) : void 0,
|
|
3323
|
+
blockPath !== void 0 ? layoutIdentitiesByBlockPath?.get(blockPath) : void 0
|
|
3319
3324
|
);
|
|
3320
3325
|
}
|
|
3321
|
-
function createTableBlock(tableIndex, table, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, tablePath) {
|
|
3326
|
+
function createTableBlock(tableIndex, table, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, layoutIdentitiesByBlockPath, tablePath) {
|
|
3322
3327
|
const lockedFragmentIds = [];
|
|
3323
3328
|
let innerCursor = cursor;
|
|
3324
3329
|
if (cullBuild) {
|
|
@@ -3335,6 +3340,7 @@ function createTableBlock(tableIndex, table, document, cursor, counters, formatt
|
|
|
3335
3340
|
promoteSecondaryStoryTextBoxes,
|
|
3336
3341
|
true,
|
|
3337
3342
|
editableTargetsByBlockPath,
|
|
3343
|
+
layoutIdentitiesByBlockPath,
|
|
3338
3344
|
tablePath !== void 0 ? `${tablePath}/row[${rowIndex}]/cell[${cellIndex}]/block[${childIndex}]` : void 0
|
|
3339
3345
|
);
|
|
3340
3346
|
lockedFragmentIds.push(...result.lockedFragmentIds);
|
|
@@ -3350,6 +3356,7 @@ function createTableBlock(tableIndex, table, document, cursor, counters, formatt
|
|
|
3350
3356
|
to: innerCursor,
|
|
3351
3357
|
styleId: table.styleId,
|
|
3352
3358
|
...table.sourceRef !== void 0 ? { sourceRef: table.sourceRef } : {},
|
|
3359
|
+
...tablePath !== void 0 && layoutIdentitiesByBlockPath?.get(tablePath) !== void 0 ? { layoutIdentity: layoutIdentitiesByBlockPath.get(tablePath) } : {},
|
|
3353
3360
|
gridColumns: table.gridColumns,
|
|
3354
3361
|
rows: []
|
|
3355
3362
|
},
|
|
@@ -3387,6 +3394,7 @@ function createTableBlock(tableIndex, table, document, cursor, counters, formatt
|
|
|
3387
3394
|
promoteSecondaryStoryTextBoxes,
|
|
3388
3395
|
cullBuild,
|
|
3389
3396
|
editableTargetsByBlockPath,
|
|
3397
|
+
layoutIdentitiesByBlockPath,
|
|
3390
3398
|
tablePath !== void 0 ? `${tablePath}/row[${rowIndex}]/cell[${cellIndex}]/block[${childIndex}]` : void 0
|
|
3391
3399
|
);
|
|
3392
3400
|
cellContent.push(result.block);
|
|
@@ -3475,6 +3483,7 @@ function createTableBlock(tableIndex, table, document, cursor, counters, formatt
|
|
|
3475
3483
|
to: innerCursor,
|
|
3476
3484
|
styleId: table.styleId,
|
|
3477
3485
|
...table.sourceRef !== void 0 ? { sourceRef: table.sourceRef } : {},
|
|
3486
|
+
...tablePath !== void 0 && layoutIdentitiesByBlockPath?.get(tablePath) !== void 0 ? { layoutIdentity: layoutIdentitiesByBlockPath.get(tablePath) } : {},
|
|
3478
3487
|
gridColumns: table.gridColumns,
|
|
3479
3488
|
...gridColumnsRelative ? { gridColumnsRelative } : {},
|
|
3480
3489
|
...resolvedTable.table?.alignment ? { alignment: resolvedTable.table.alignment } : {},
|
|
@@ -3662,7 +3671,7 @@ function resolveCellBorderStyles(borders, tableBorders, position) {
|
|
|
3662
3671
|
if (left) result.borderLeft = left;
|
|
3663
3672
|
return result;
|
|
3664
3673
|
}
|
|
3665
|
-
function createSdtBlock(sdtIndex, block, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, sdtPath) {
|
|
3674
|
+
function createSdtBlock(sdtIndex, block, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, layoutIdentitiesByBlockPath, sdtPath) {
|
|
3666
3675
|
const children = [];
|
|
3667
3676
|
const lockedFragmentIds = [];
|
|
3668
3677
|
let innerCursor = cursor;
|
|
@@ -3679,6 +3688,7 @@ function createSdtBlock(sdtIndex, block, document, cursor, counters, formattingC
|
|
|
3679
3688
|
promoteSecondaryStoryTextBoxes,
|
|
3680
3689
|
cullBuild,
|
|
3681
3690
|
editableTargetsByBlockPath,
|
|
3691
|
+
layoutIdentitiesByBlockPath,
|
|
3682
3692
|
sdtPath !== void 0 ? `${sdtPath}/block[${childIndex}]` : void 0
|
|
3683
3693
|
);
|
|
3684
3694
|
children.push(result.block);
|
|
@@ -3721,7 +3731,7 @@ function getRecursableSdtBlockedReasonCode(block) {
|
|
|
3721
3731
|
].filter(Boolean).join(" ").toLowerCase();
|
|
3722
3732
|
return searchText.includes("table of contents") || /\btoc\b/u.test(searchText) ? "workflow_preserve_only" : null;
|
|
3723
3733
|
}
|
|
3724
|
-
function createParagraphBlock(paragraphIndex, paragraph, document, start, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, blockPath, editableTarget) {
|
|
3734
|
+
function createParagraphBlock(paragraphIndex, paragraph, document, start, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, blockPath, editableTarget, layoutIdentity) {
|
|
3725
3735
|
const themeResolver = formattingContext.theme;
|
|
3726
3736
|
const effectiveNumbering = formattingContext.resolveEffectiveParagraphNumbering(paragraph);
|
|
3727
3737
|
let resolvedNumbering = null;
|
|
@@ -3744,6 +3754,7 @@ function createParagraphBlock(paragraphIndex, paragraph, document, start, format
|
|
|
3744
3754
|
from: start,
|
|
3745
3755
|
to: start,
|
|
3746
3756
|
...editableTarget !== void 0 ? { editableTarget } : {},
|
|
3757
|
+
...layoutIdentity !== void 0 ? { layoutIdentity } : {},
|
|
3747
3758
|
...paragraph.styleId ? { styleId: paragraph.styleId } : {},
|
|
3748
3759
|
...effectiveNumbering ? { numbering: effectiveNumbering } : {},
|
|
3749
3760
|
...resolvedNumbering ? {
|