@superdoc-dev/cli 0.8.0-next.10 → 0.8.0-next.12
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/index.js +1077 -1223
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -9660,9 +9660,37 @@ var init_schemas = __esm(() => {
|
|
|
9660
9660
|
type: "array",
|
|
9661
9661
|
items: objectSchema({
|
|
9662
9662
|
nodeId: { type: "string", description: "Stable block ID — pass to scrollToElement() for navigation." },
|
|
9663
|
-
type: {
|
|
9663
|
+
type: {
|
|
9664
|
+
type: "string",
|
|
9665
|
+
description: "Block type: paragraph, heading, listItem, image, tableOfContents."
|
|
9666
|
+
},
|
|
9664
9667
|
text: { type: "string", description: "Full plain text content of the block." },
|
|
9665
|
-
headingLevel: { type: "integer", description: "Heading level (1–6). Only present for headings." }
|
|
9668
|
+
headingLevel: { type: "integer", description: "Heading level (1–6). Only present for headings." },
|
|
9669
|
+
tableContext: objectSchema({
|
|
9670
|
+
tableOrdinal: {
|
|
9671
|
+
type: "integer",
|
|
9672
|
+
description: "0-based table ordinal, unique within one extract() result."
|
|
9673
|
+
},
|
|
9674
|
+
parentTableOrdinal: {
|
|
9675
|
+
type: "integer",
|
|
9676
|
+
description: "Ordinal of the parent table when the containing table is nested."
|
|
9677
|
+
},
|
|
9678
|
+
parentRowIndex: {
|
|
9679
|
+
type: "integer",
|
|
9680
|
+
description: "Row index in the parent table. Set with parentTableOrdinal."
|
|
9681
|
+
},
|
|
9682
|
+
parentColumnIndex: {
|
|
9683
|
+
type: "integer",
|
|
9684
|
+
description: "Column index in the parent table. Set with parentTableOrdinal."
|
|
9685
|
+
},
|
|
9686
|
+
rowIndex: { type: "integer", description: "0-based row index of the containing cell." },
|
|
9687
|
+
columnIndex: {
|
|
9688
|
+
type: "integer",
|
|
9689
|
+
description: "0-based logical grid column, not the row child order."
|
|
9690
|
+
},
|
|
9691
|
+
rowspan: { type: "integer", description: "Number of rows the cell spans." },
|
|
9692
|
+
colspan: { type: "integer", description: "Number of columns the cell spans." }
|
|
9693
|
+
}, ["tableOrdinal", "rowIndex", "columnIndex", "rowspan", "colspan"])
|
|
9666
9694
|
}, ["nodeId", "type", "text"])
|
|
9667
9695
|
},
|
|
9668
9696
|
comments: {
|
|
@@ -65507,7 +65535,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
65507
65535
|
emptyOptions2 = {};
|
|
65508
65536
|
});
|
|
65509
65537
|
|
|
65510
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
65538
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-D54XfHFt.es.js
|
|
65511
65539
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
65512
65540
|
const fieldValue = extension$1.config[field];
|
|
65513
65541
|
if (typeof fieldValue === "function")
|
|
@@ -95651,6 +95679,11 @@ function createStoryEditor(parentEditor, content$2, options = {}) {
|
|
|
95651
95679
|
fragment: null,
|
|
95652
95680
|
...editorOptions
|
|
95653
95681
|
});
|
|
95682
|
+
const inheritedPresentationEditor = parentEditor.presentationEditor ?? parentEditor._presentationEditor ?? null;
|
|
95683
|
+
if (inheritedPresentationEditor) {
|
|
95684
|
+
storyEditor.presentationEditor = inheritedPresentationEditor;
|
|
95685
|
+
storyEditor._presentationEditor = inheritedPresentationEditor;
|
|
95686
|
+
}
|
|
95654
95687
|
if (storyEditor.options && typeof storyEditor.options === "object")
|
|
95655
95688
|
Object.defineProperty(storyEditor.options, "parentEditor", {
|
|
95656
95689
|
enumerable: false,
|
|
@@ -99714,6 +99747,17 @@ function resolveLiveStorySessionRuntime(hostEditor, storyKey) {
|
|
|
99714
99747
|
return null;
|
|
99715
99748
|
return buildLiveSessionRuntime(registration);
|
|
99716
99749
|
}
|
|
99750
|
+
function commitLiveStorySessionRuntimes(hostEditor) {
|
|
99751
|
+
const sessions = liveSessionsByHost.get(hostEditor);
|
|
99752
|
+
if (!sessions || sessions.size === 0)
|
|
99753
|
+
return 0;
|
|
99754
|
+
let committedCount = 0;
|
|
99755
|
+
for (const registration of [...sessions.values()]) {
|
|
99756
|
+
buildLiveSessionRuntime(registration).commit?.(hostEditor);
|
|
99757
|
+
committedCount += 1;
|
|
99758
|
+
}
|
|
99759
|
+
return committedCount;
|
|
99760
|
+
}
|
|
99717
99761
|
function unregisterLiveStorySessionRuntime(hostEditor, storyKey, editor) {
|
|
99718
99762
|
const sessions = liveSessionsByHost.get(hostEditor);
|
|
99719
99763
|
if (!sessions)
|
|
@@ -117686,7 +117730,7 @@ var isRegExp = (value) => {
|
|
|
117686
117730
|
state.kern = kernNode.attributes["w:val"];
|
|
117687
117731
|
}
|
|
117688
117732
|
}, SuperConverter;
|
|
117689
|
-
var
|
|
117733
|
+
var init_SuperConverter_D54XfHFt_es = __esm(() => {
|
|
117690
117734
|
init_rolldown_runtime_Bg48TavK_es();
|
|
117691
117735
|
init_jszip_C49i9kUs_es();
|
|
117692
117736
|
init_xml_js_CqGKpaft_es();
|
|
@@ -128738,7 +128782,7 @@ var init_SuperConverter_uCLp4MWG_es = __esm(() => {
|
|
|
128738
128782
|
},
|
|
128739
128783
|
type: {
|
|
128740
128784
|
type: "string",
|
|
128741
|
-
description: "Block type: paragraph, heading, listItem,
|
|
128785
|
+
description: "Block type: paragraph, heading, listItem, image, tableOfContents."
|
|
128742
128786
|
},
|
|
128743
128787
|
text: {
|
|
128744
128788
|
type: "string",
|
|
@@ -128747,7 +128791,47 @@ var init_SuperConverter_uCLp4MWG_es = __esm(() => {
|
|
|
128747
128791
|
headingLevel: {
|
|
128748
128792
|
type: "integer",
|
|
128749
128793
|
description: "Heading level (1–6). Only present for headings."
|
|
128750
|
-
}
|
|
128794
|
+
},
|
|
128795
|
+
tableContext: objectSchema2({
|
|
128796
|
+
tableOrdinal: {
|
|
128797
|
+
type: "integer",
|
|
128798
|
+
description: "0-based table ordinal, unique within one extract() result."
|
|
128799
|
+
},
|
|
128800
|
+
parentTableOrdinal: {
|
|
128801
|
+
type: "integer",
|
|
128802
|
+
description: "Ordinal of the parent table when the containing table is nested."
|
|
128803
|
+
},
|
|
128804
|
+
parentRowIndex: {
|
|
128805
|
+
type: "integer",
|
|
128806
|
+
description: "Row index in the parent table. Set with parentTableOrdinal."
|
|
128807
|
+
},
|
|
128808
|
+
parentColumnIndex: {
|
|
128809
|
+
type: "integer",
|
|
128810
|
+
description: "Column index in the parent table. Set with parentTableOrdinal."
|
|
128811
|
+
},
|
|
128812
|
+
rowIndex: {
|
|
128813
|
+
type: "integer",
|
|
128814
|
+
description: "0-based row index of the containing cell."
|
|
128815
|
+
},
|
|
128816
|
+
columnIndex: {
|
|
128817
|
+
type: "integer",
|
|
128818
|
+
description: "0-based logical grid column, not the row child order."
|
|
128819
|
+
},
|
|
128820
|
+
rowspan: {
|
|
128821
|
+
type: "integer",
|
|
128822
|
+
description: "Number of rows the cell spans."
|
|
128823
|
+
},
|
|
128824
|
+
colspan: {
|
|
128825
|
+
type: "integer",
|
|
128826
|
+
description: "Number of columns the cell spans."
|
|
128827
|
+
}
|
|
128828
|
+
}, [
|
|
128829
|
+
"tableOrdinal",
|
|
128830
|
+
"rowIndex",
|
|
128831
|
+
"columnIndex",
|
|
128832
|
+
"rowspan",
|
|
128833
|
+
"colspan"
|
|
128834
|
+
])
|
|
128751
128835
|
}, [
|
|
128752
128836
|
"nodeId",
|
|
128753
128837
|
"type",
|
|
@@ -155062,7 +155146,7 @@ var init_SuperConverter_uCLp4MWG_es = __esm(() => {
|
|
|
155062
155146
|
};
|
|
155063
155147
|
});
|
|
155064
155148
|
|
|
155065
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
155149
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-DrE9IMiD.es.js
|
|
155066
155150
|
function parseSizeUnit(val = "0") {
|
|
155067
155151
|
const length3 = val.toString() || "0";
|
|
155068
155152
|
const value = Number.parseFloat(length3);
|
|
@@ -157654,8 +157738,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
157654
157738
|
}
|
|
157655
157739
|
};
|
|
157656
157740
|
};
|
|
157657
|
-
var
|
|
157658
|
-
|
|
157741
|
+
var init_create_headless_toolbar_DrE9IMiD_es = __esm(() => {
|
|
157742
|
+
init_SuperConverter_D54XfHFt_es();
|
|
157659
157743
|
init_constants_CGhJRd87_es();
|
|
157660
157744
|
init_dist_B8HfvhaK_es();
|
|
157661
157745
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -206342,7 +206426,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
206342
206426
|
init_remark_gfm_BhnWr3yf_es();
|
|
206343
206427
|
});
|
|
206344
206428
|
|
|
206345
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
206429
|
+
// ../../packages/superdoc/dist/chunks/src-BFNW1Ck5.es.js
|
|
206346
206430
|
function deleteProps(obj, propOrProps) {
|
|
206347
206431
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
206348
206432
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -207921,7 +208005,8 @@ function getEditorSurfaceElement(editor) {
|
|
|
207921
208005
|
return null;
|
|
207922
208006
|
if (typeof editor.hitTest === "function" && editor.element instanceof HTMLElement)
|
|
207923
208007
|
return editor.element;
|
|
207924
|
-
|
|
208008
|
+
const parentEditor = editor.options?.parentEditor ?? null;
|
|
208009
|
+
return (editor.presentationEditor ?? parentEditor?.presentationEditor ?? parentEditor?._presentationEditor ?? null)?.element ?? editor.view?.dom ?? editor.options?.element ?? null;
|
|
207925
208010
|
}
|
|
207926
208011
|
function getSurfaceRelativePoint(editor, eventLocation = {}) {
|
|
207927
208012
|
const surface = getEditorSurfaceElement(editor);
|
|
@@ -227887,341 +227972,6 @@ function executeStructuralReplaceWrapper(editor, input2, options) {
|
|
|
227887
227972
|
};
|
|
227888
227973
|
}
|
|
227889
227974
|
}
|
|
227890
|
-
function extractTextPreview(node3) {
|
|
227891
|
-
if (!node3.isTextblock)
|
|
227892
|
-
return null;
|
|
227893
|
-
const text5 = node3.textContent;
|
|
227894
|
-
if (text5.length <= TEXT_PREVIEW_MAX_LENGTH)
|
|
227895
|
-
return text5;
|
|
227896
|
-
return text5.slice(0, TEXT_PREVIEW_MAX_LENGTH);
|
|
227897
|
-
}
|
|
227898
|
-
function extractBlockText$1(node3) {
|
|
227899
|
-
if (!node3.isTextblock)
|
|
227900
|
-
return null;
|
|
227901
|
-
return node3.textContent;
|
|
227902
|
-
}
|
|
227903
|
-
function buildStyleContext(editor) {
|
|
227904
|
-
const styleProps = readTranslatedLinkedStyles(editor);
|
|
227905
|
-
if (!styleProps)
|
|
227906
|
-
return null;
|
|
227907
|
-
return {
|
|
227908
|
-
styles: styleProps.styles ?? {},
|
|
227909
|
-
docDefaultsFontSizeHp: typeof styleProps.docDefaults?.runProperties?.fontSize === "number" ? styleProps.docDefaults.runProperties.fontSize : undefined
|
|
227910
|
-
};
|
|
227911
|
-
}
|
|
227912
|
-
function resolveBlockFontSizePt(styleCtx, styleId) {
|
|
227913
|
-
if (!styleCtx)
|
|
227914
|
-
return OOXML_DEFAULT_FONT_SIZE_PT;
|
|
227915
|
-
let currentId = styleId ?? "Normal";
|
|
227916
|
-
const visited = /* @__PURE__ */ new Set;
|
|
227917
|
-
while (currentId && !visited.has(currentId)) {
|
|
227918
|
-
visited.add(currentId);
|
|
227919
|
-
const style2 = styleCtx.styles[currentId];
|
|
227920
|
-
if (!style2)
|
|
227921
|
-
break;
|
|
227922
|
-
const fs = style2.runProperties?.fontSize;
|
|
227923
|
-
if (typeof fs === "number")
|
|
227924
|
-
return fs / 2;
|
|
227925
|
-
currentId = style2.basedOn ?? "";
|
|
227926
|
-
}
|
|
227927
|
-
if (!visited.has("Normal")) {
|
|
227928
|
-
const fs = styleCtx.styles["Normal"]?.runProperties?.fontSize;
|
|
227929
|
-
if (typeof fs === "number")
|
|
227930
|
-
return fs / 2;
|
|
227931
|
-
}
|
|
227932
|
-
if (typeof styleCtx.docDefaultsFontSizeHp === "number")
|
|
227933
|
-
return styleCtx.docDefaultsFontSizeHp / 2;
|
|
227934
|
-
return OOXML_DEFAULT_FONT_SIZE_PT;
|
|
227935
|
-
}
|
|
227936
|
-
function extractBlockFormatting(node3, styleCtx) {
|
|
227937
|
-
const pProps = node3.attrs.paragraphProperties;
|
|
227938
|
-
const styleId = pProps?.styleId ?? null;
|
|
227939
|
-
let fontFamily;
|
|
227940
|
-
let fontSize;
|
|
227941
|
-
let bold2;
|
|
227942
|
-
let underline;
|
|
227943
|
-
let color2;
|
|
227944
|
-
node3.descendants((child) => {
|
|
227945
|
-
if (fontFamily !== undefined)
|
|
227946
|
-
return false;
|
|
227947
|
-
const marks = child.marks ?? [];
|
|
227948
|
-
if (!child.isText || marks.length === 0)
|
|
227949
|
-
return;
|
|
227950
|
-
for (const mark2 of marks) {
|
|
227951
|
-
const markName = mark2.type.name;
|
|
227952
|
-
const attrs = mark2.attrs;
|
|
227953
|
-
if (markName === "textStyle") {
|
|
227954
|
-
if (typeof attrs.fontFamily === "string" && attrs.fontFamily)
|
|
227955
|
-
fontFamily = attrs.fontFamily;
|
|
227956
|
-
if (attrs.fontSize != null) {
|
|
227957
|
-
const raw = typeof attrs.fontSize === "string" ? parseFloat(attrs.fontSize) : attrs.fontSize;
|
|
227958
|
-
if (typeof raw === "number" && Number.isFinite(raw))
|
|
227959
|
-
fontSize = raw;
|
|
227960
|
-
}
|
|
227961
|
-
if (typeof attrs.color === "string" && attrs.color)
|
|
227962
|
-
color2 = attrs.color;
|
|
227963
|
-
}
|
|
227964
|
-
if (markName === "bold" && attrs.value === true)
|
|
227965
|
-
bold2 = true;
|
|
227966
|
-
if (markName === "underline")
|
|
227967
|
-
underline = true;
|
|
227968
|
-
}
|
|
227969
|
-
return false;
|
|
227970
|
-
});
|
|
227971
|
-
if (color2 === "auto")
|
|
227972
|
-
color2 = undefined;
|
|
227973
|
-
let headingLevel;
|
|
227974
|
-
if (typeof styleId === "string") {
|
|
227975
|
-
const m$1 = HEADING_PATTERN.exec(styleId);
|
|
227976
|
-
if (m$1)
|
|
227977
|
-
headingLevel = parseInt(m$1[1], 10);
|
|
227978
|
-
}
|
|
227979
|
-
return {
|
|
227980
|
-
...styleId ? { styleId } : {},
|
|
227981
|
-
...fontFamily ? { fontFamily } : {},
|
|
227982
|
-
...fontSize !== undefined ? { fontSize } : styleCtx ? { fontSize: resolveBlockFontSizePt(styleCtx, styleId) } : {},
|
|
227983
|
-
...bold2 ? { bold: bold2 } : {},
|
|
227984
|
-
...underline ? { underline } : {},
|
|
227985
|
-
...color2 ? { color: color2 } : {},
|
|
227986
|
-
...pProps?.justification ? { alignment: pProps.justification } : {},
|
|
227987
|
-
...headingLevel ? { headingLevel } : {}
|
|
227988
|
-
};
|
|
227989
|
-
}
|
|
227990
|
-
function toBlockSummary(candidate, ordinal) {
|
|
227991
|
-
return {
|
|
227992
|
-
ordinal,
|
|
227993
|
-
nodeId: candidate.nodeId,
|
|
227994
|
-
nodeType: candidate.nodeType,
|
|
227995
|
-
textPreview: extractTextPreview(candidate.node)
|
|
227996
|
-
};
|
|
227997
|
-
}
|
|
227998
|
-
function resolveSdBlockId(candidate) {
|
|
227999
|
-
const sdBlockId = candidate.node.attrs?.sdBlockId;
|
|
228000
|
-
if (typeof sdBlockId === "string" && sdBlockId.length > 0)
|
|
228001
|
-
return sdBlockId;
|
|
228002
|
-
throw new DocumentApiAdapterError("INTERNAL_ERROR", "Resolved block candidate is missing sdBlockId attribute. This indicates a schema/extension invariant violation.", { attrs: candidate.node.attrs });
|
|
228003
|
-
}
|
|
228004
|
-
function validateDeleteTargetNodeType(nodeType) {
|
|
228005
|
-
if (REJECTED_DELETE_NODE_TYPES3.has(nodeType))
|
|
228006
|
-
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.delete does not support "${nodeType}" targets. Table row/column operations are out of scope.`, { nodeType });
|
|
228007
|
-
if (!SUPPORTED_DELETE_NODE_TYPES3.has(nodeType))
|
|
228008
|
-
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.delete does not support "${nodeType}" targets.`, { nodeType });
|
|
228009
|
-
}
|
|
228010
|
-
function validateCommandLayerUniqueness(editor, sdBlockId) {
|
|
228011
|
-
const getBlockNodeById = editor.helpers?.blockNode?.getBlockNodeById;
|
|
228012
|
-
if (typeof getBlockNodeById !== "function")
|
|
228013
|
-
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", "blocks.delete requires the blockNode helper to be registered.", { reason: "missing_helper" });
|
|
228014
|
-
const matches2 = getBlockNodeById(sdBlockId);
|
|
228015
|
-
if (!matches2 || Array.isArray(matches2) && matches2.length === 0)
|
|
228016
|
-
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `Block with sdBlockId "${sdBlockId}" was not found at the command layer.`, { sdBlockId });
|
|
228017
|
-
if (Array.isArray(matches2) && matches2.length > 1)
|
|
228018
|
-
throw new DocumentApiAdapterError("AMBIGUOUS_TARGET", `Multiple blocks share sdBlockId "${sdBlockId}" at the command layer.`, {
|
|
228019
|
-
sdBlockId,
|
|
228020
|
-
count: matches2.length
|
|
228021
|
-
});
|
|
228022
|
-
}
|
|
228023
|
-
function collectTopLevelBlocks(editor) {
|
|
228024
|
-
const doc$12 = editor.state.doc;
|
|
228025
|
-
const results = [];
|
|
228026
|
-
let offset$1 = 0;
|
|
228027
|
-
for (let i4 = 0;i4 < doc$12.childCount; i4++) {
|
|
228028
|
-
const child = doc$12.child(i4);
|
|
228029
|
-
const nodeType = mapBlockNodeType(child);
|
|
228030
|
-
const pos = offset$1;
|
|
228031
|
-
if (nodeType) {
|
|
228032
|
-
const nodeId = resolveBlockNodeId(child, pos, nodeType, [i4]);
|
|
228033
|
-
if (nodeId)
|
|
228034
|
-
results.push({
|
|
228035
|
-
node: child,
|
|
228036
|
-
pos,
|
|
228037
|
-
end: pos + child.nodeSize,
|
|
228038
|
-
nodeType,
|
|
228039
|
-
nodeId
|
|
228040
|
-
});
|
|
228041
|
-
}
|
|
228042
|
-
offset$1 += child.nodeSize;
|
|
228043
|
-
}
|
|
228044
|
-
return results;
|
|
228045
|
-
}
|
|
228046
|
-
function blocksListWrapper(editor, input2) {
|
|
228047
|
-
const topLevel = collectTopLevelBlocks(editor);
|
|
228048
|
-
const filtered = input2?.nodeTypes ? topLevel.filter((b$1) => input2.nodeTypes.includes(b$1.nodeType)) : topLevel;
|
|
228049
|
-
const total = filtered.length;
|
|
228050
|
-
const offset$1 = input2?.offset ?? 0;
|
|
228051
|
-
const limit = input2?.limit ?? total;
|
|
228052
|
-
const paged = filtered.slice(offset$1, offset$1 + limit);
|
|
228053
|
-
const rev = getRevision(editor);
|
|
228054
|
-
const styleCtx = buildStyleContext(editor);
|
|
228055
|
-
return {
|
|
228056
|
-
total,
|
|
228057
|
-
blocks: paged.map((candidate, i4) => {
|
|
228058
|
-
const textLength = computeTextContentLength(candidate.node);
|
|
228059
|
-
const fullText = input2?.includeText ? extractBlockText$1(candidate.node) : undefined;
|
|
228060
|
-
const ref$1 = textLength > 0 ? encodeV4Ref({
|
|
228061
|
-
v: 4,
|
|
228062
|
-
rev,
|
|
228063
|
-
storyKey: "body",
|
|
228064
|
-
scope: "block",
|
|
228065
|
-
matchId: candidate.nodeId,
|
|
228066
|
-
segments: [{
|
|
228067
|
-
blockId: candidate.nodeId,
|
|
228068
|
-
start: 0,
|
|
228069
|
-
end: textLength
|
|
228070
|
-
}],
|
|
228071
|
-
blockIndex: offset$1 + i4
|
|
228072
|
-
}) : undefined;
|
|
228073
|
-
return {
|
|
228074
|
-
ordinal: offset$1 + i4,
|
|
228075
|
-
nodeId: candidate.nodeId,
|
|
228076
|
-
nodeType: candidate.nodeType,
|
|
228077
|
-
textPreview: extractTextPreview(candidate.node),
|
|
228078
|
-
...fullText !== undefined ? { text: fullText } : {},
|
|
228079
|
-
isEmpty: textLength === 0,
|
|
228080
|
-
...extractBlockFormatting(candidate.node, styleCtx),
|
|
228081
|
-
...ref$1 ? { ref: ref$1 } : {}
|
|
228082
|
-
};
|
|
228083
|
-
}),
|
|
228084
|
-
revision: rev
|
|
228085
|
-
};
|
|
228086
|
-
}
|
|
228087
|
-
function blocksDeleteWrapper(editor, input2, options) {
|
|
228088
|
-
rejectTrackedMode("blocks.delete", options);
|
|
228089
|
-
const candidate = findBlockByIdStrict(getBlockIndex(editor), input2.target);
|
|
228090
|
-
validateDeleteTargetNodeType(candidate.nodeType);
|
|
228091
|
-
const deletedBlock = toBlockSummary(candidate, collectTopLevelBlocks(editor).findIndex((b$1) => b$1.nodeId === candidate.nodeId && b$1.nodeType === candidate.nodeType));
|
|
228092
|
-
const sdBlockId = resolveSdBlockId(candidate);
|
|
228093
|
-
const deleteBlockNodeById = requireEditorCommand(editor.commands?.deleteBlockNodeById, "blocks.delete");
|
|
228094
|
-
validateCommandLayerUniqueness(editor, sdBlockId);
|
|
228095
|
-
if (options?.dryRun)
|
|
228096
|
-
return {
|
|
228097
|
-
success: true,
|
|
228098
|
-
deleted: input2.target,
|
|
228099
|
-
deletedBlock
|
|
228100
|
-
};
|
|
228101
|
-
if (executeDomainCommand(editor, () => {
|
|
228102
|
-
const didApply = deleteBlockNodeById(sdBlockId);
|
|
228103
|
-
if (didApply)
|
|
228104
|
-
clearIndexCache(editor);
|
|
228105
|
-
return didApply;
|
|
228106
|
-
}, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
|
|
228107
|
-
throw new DocumentApiAdapterError("INTERNAL_ERROR", "blocks.delete command returned false despite passing all pre-apply checks. This is an internal invariant violation.", {
|
|
228108
|
-
sdBlockId,
|
|
228109
|
-
target: input2.target
|
|
228110
|
-
});
|
|
228111
|
-
return {
|
|
228112
|
-
success: true,
|
|
228113
|
-
deleted: input2.target,
|
|
228114
|
-
deletedBlock
|
|
228115
|
-
};
|
|
228116
|
-
}
|
|
228117
|
-
function hasSectionBreak(candidate) {
|
|
228118
|
-
const pPr = candidate.node.attrs?.paragraphProperties;
|
|
228119
|
-
return pPr?.sectPr != null && typeof pPr.sectPr === "object";
|
|
228120
|
-
}
|
|
228121
|
-
function resolveTopLevelOrdinal(topLevel, candidate, label) {
|
|
228122
|
-
const idx = topLevel.findIndex((b$1) => b$1.nodeId === candidate.nodeId && b$1.nodeType === candidate.nodeType);
|
|
228123
|
-
if (idx !== -1)
|
|
228124
|
-
return idx;
|
|
228125
|
-
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.deleteRange ${label} resolved to a nested block (not a direct document child). Only top-level blocks are supported.`, {
|
|
228126
|
-
nodeId: candidate.nodeId,
|
|
228127
|
-
nodeType: candidate.nodeType
|
|
228128
|
-
});
|
|
228129
|
-
}
|
|
228130
|
-
function resolveRangeEndpoint(index2, address2, label) {
|
|
228131
|
-
const key2 = `${address2.nodeType}:${address2.nodeId}`;
|
|
228132
|
-
if (index2.ambiguous.has(key2))
|
|
228133
|
-
throw new DocumentApiAdapterError("AMBIGUOUS_TARGET", `Multiple blocks share key "${key2}".`, { target: address2 });
|
|
228134
|
-
const candidate = index2.byId.get(key2);
|
|
228135
|
-
if (candidate)
|
|
228136
|
-
return candidate;
|
|
228137
|
-
const mismatch = index2.candidates.find((c) => c.nodeId === address2.nodeId);
|
|
228138
|
-
if (mismatch)
|
|
228139
|
-
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.deleteRange ${label} expected ${address2.nodeType}:${address2.nodeId} but resolved to ${mismatch.nodeType}.`, {
|
|
228140
|
-
expected: address2.nodeType,
|
|
228141
|
-
actual: mismatch.nodeType,
|
|
228142
|
-
nodeId: address2.nodeId
|
|
228143
|
-
});
|
|
228144
|
-
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `Block "${key2}" was not found.`, { target: address2 });
|
|
228145
|
-
}
|
|
228146
|
-
function rejectUnmappedNodesInRange(doc$12, rangeBlocks) {
|
|
228147
|
-
if (rangeBlocks.length === 0)
|
|
228148
|
-
return;
|
|
228149
|
-
const rangeFrom = rangeBlocks[0].pos;
|
|
228150
|
-
const rangeTo = rangeBlocks[rangeBlocks.length - 1].end;
|
|
228151
|
-
const recognizedPositions = new Set(rangeBlocks.map((b$1) => b$1.pos));
|
|
228152
|
-
let offset$1 = 0;
|
|
228153
|
-
for (let i4 = 0;i4 < doc$12.childCount; i4++) {
|
|
228154
|
-
const child = doc$12.child(i4);
|
|
228155
|
-
const childEnd = offset$1 + child.nodeSize;
|
|
228156
|
-
if (childEnd > rangeFrom && offset$1 < rangeTo && !recognizedPositions.has(offset$1)) {
|
|
228157
|
-
if (!RANGE_DELETE_SAFE_NODE_TYPES.has(child.type.name))
|
|
228158
|
-
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.deleteRange cannot delete range: unrecognized node "${child.type.name}" at position ${offset$1} would be silently removed.`, {
|
|
228159
|
-
pmNodeType: child.type.name,
|
|
228160
|
-
pos: offset$1
|
|
228161
|
-
});
|
|
228162
|
-
}
|
|
228163
|
-
offset$1 = childEnd;
|
|
228164
|
-
}
|
|
228165
|
-
}
|
|
228166
|
-
function blocksDeleteRangeWrapper(editor, input2, options) {
|
|
228167
|
-
rejectTrackedMode("blocks.deleteRange", options);
|
|
228168
|
-
const topLevel = collectTopLevelBlocks(editor);
|
|
228169
|
-
const index2 = getBlockIndex(editor);
|
|
228170
|
-
const startCandidate = resolveRangeEndpoint(index2, input2.start, "start");
|
|
228171
|
-
const endCandidate = resolveRangeEndpoint(index2, input2.end, "end");
|
|
228172
|
-
const startOrdinal = resolveTopLevelOrdinal(topLevel, startCandidate, "start");
|
|
228173
|
-
const endOrdinal = resolveTopLevelOrdinal(topLevel, endCandidate, "end");
|
|
228174
|
-
if (startOrdinal > endOrdinal)
|
|
228175
|
-
throw new DocumentApiAdapterError("INVALID_INPUT", `blocks.deleteRange start ordinal (${startOrdinal}) is after end ordinal (${endOrdinal}). The start must precede or equal the end.`, {
|
|
228176
|
-
startOrdinal,
|
|
228177
|
-
endOrdinal
|
|
228178
|
-
});
|
|
228179
|
-
const rangeBlocks = topLevel.slice(startOrdinal, endOrdinal + 1);
|
|
228180
|
-
rejectUnmappedNodesInRange(editor.state.doc, rangeBlocks);
|
|
228181
|
-
for (const block of rangeBlocks)
|
|
228182
|
-
if (hasSectionBreak(block))
|
|
228183
|
-
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.deleteRange cannot delete a range that includes a section break (block "${block.nodeId}" at ordinal ${topLevel.indexOf(block)}).`, {
|
|
228184
|
-
nodeId: block.nodeId,
|
|
228185
|
-
nodeType: block.nodeType
|
|
228186
|
-
});
|
|
228187
|
-
const deletedBlocks = rangeBlocks.map((c, i4) => toBlockSummary(c, startOrdinal + i4));
|
|
228188
|
-
const revisionBefore = getRevision(editor);
|
|
228189
|
-
if (options?.dryRun)
|
|
228190
|
-
return {
|
|
228191
|
-
success: true,
|
|
228192
|
-
deletedCount: rangeBlocks.length,
|
|
228193
|
-
deletedBlocks,
|
|
228194
|
-
revision: {
|
|
228195
|
-
before: revisionBefore,
|
|
228196
|
-
after: revisionBefore
|
|
228197
|
-
},
|
|
228198
|
-
dryRun: true
|
|
228199
|
-
};
|
|
228200
|
-
const rangeFrom = rangeBlocks[0].pos;
|
|
228201
|
-
const rangeTo = rangeBlocks[rangeBlocks.length - 1].end;
|
|
228202
|
-
if (executeDomainCommand(editor, () => {
|
|
228203
|
-
const tr = editor.state.tr;
|
|
228204
|
-
tr.delete(rangeFrom, rangeTo);
|
|
228205
|
-
editor.dispatch(tr);
|
|
228206
|
-
clearIndexCache(editor);
|
|
228207
|
-
return true;
|
|
228208
|
-
}, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
|
|
228209
|
-
throw new DocumentApiAdapterError("INTERNAL_ERROR", "blocks.deleteRange command returned false despite passing all pre-apply checks.", {
|
|
228210
|
-
start: input2.start,
|
|
228211
|
-
end: input2.end
|
|
228212
|
-
});
|
|
228213
|
-
const revisionAfter = getRevision(editor);
|
|
228214
|
-
return {
|
|
228215
|
-
success: true,
|
|
228216
|
-
deletedCount: rangeBlocks.length,
|
|
228217
|
-
deletedBlocks,
|
|
228218
|
-
revision: {
|
|
228219
|
-
before: revisionBefore,
|
|
228220
|
-
after: revisionAfter
|
|
228221
|
-
},
|
|
228222
|
-
dryRun: false
|
|
228223
|
-
};
|
|
228224
|
-
}
|
|
228225
227975
|
function ensureFallbackStore(editor) {
|
|
228226
227976
|
if (!editor.storage)
|
|
228227
227977
|
editor.storage = {};
|
|
@@ -229390,19 +229140,116 @@ function trackChangesAcceptAllWrapper(editor, _input, options) {
|
|
|
229390
229140
|
function trackChangesRejectAllWrapper(editor, _input, options) {
|
|
229391
229141
|
return decideAll(editor, "reject", options);
|
|
229392
229142
|
}
|
|
229393
|
-
function
|
|
229394
|
-
|
|
229395
|
-
|
|
229396
|
-
|
|
229397
|
-
|
|
229398
|
-
|
|
229399
|
-
|
|
229400
|
-
|
|
229143
|
+
function indexCellsForTable(tableNode) {
|
|
229144
|
+
const map$12 = TableMap.get(tableNode);
|
|
229145
|
+
const anchors = [];
|
|
229146
|
+
let rowOffset = 0;
|
|
229147
|
+
for (let rowChildIndex = 0;rowChildIndex < tableNode.childCount; rowChildIndex++) {
|
|
229148
|
+
const row2 = tableNode.child(rowChildIndex);
|
|
229149
|
+
let cellOffsetInRow = 0;
|
|
229150
|
+
for (let cellChildIndexInRow = 0;cellChildIndexInRow < row2.childCount; cellChildIndexInRow++) {
|
|
229151
|
+
const cellNode = row2.child(cellChildIndexInRow);
|
|
229152
|
+
const cellOffset = rowOffset + 1 + cellOffsetInRow;
|
|
229153
|
+
cellOffsetInRow += cellNode.nodeSize;
|
|
229154
|
+
const cellAttrs = cellNode.attrs;
|
|
229155
|
+
if (cellAttrs.__placeholder != null)
|
|
229156
|
+
continue;
|
|
229157
|
+
const mapIndex = map$12.map.indexOf(cellOffset);
|
|
229158
|
+
if (mapIndex < 0)
|
|
229159
|
+
continue;
|
|
229160
|
+
anchors.push({
|
|
229161
|
+
cellNode,
|
|
229162
|
+
cellOffset,
|
|
229163
|
+
rowChildIndex,
|
|
229164
|
+
cellChildIndexInRow,
|
|
229165
|
+
gridRowIndex: Math.floor(mapIndex / map$12.width),
|
|
229166
|
+
gridColumnIndex: mapIndex % map$12.width,
|
|
229167
|
+
rowspan: cellAttrs.rowspan ?? 1,
|
|
229168
|
+
colspan: cellAttrs.colspan ?? 1
|
|
229169
|
+
});
|
|
229170
|
+
}
|
|
229171
|
+
rowOffset += row2.nodeSize;
|
|
229172
|
+
}
|
|
229173
|
+
return anchors;
|
|
229174
|
+
}
|
|
229175
|
+
function buildBlock(node3, pos, nodeType, path2, tableContext) {
|
|
229176
|
+
const nodeId = resolveBlockNodeId(node3, pos, nodeType, path2);
|
|
229177
|
+
if (!nodeId)
|
|
229178
|
+
return;
|
|
229179
|
+
const pProps = node3.attrs.paragraphProperties;
|
|
229180
|
+
const headingLevel = getHeadingLevel(pProps?.styleId);
|
|
229181
|
+
const block = {
|
|
229182
|
+
nodeId,
|
|
229183
|
+
type: nodeType,
|
|
229184
|
+
text: node3.textContent
|
|
229185
|
+
};
|
|
229186
|
+
if (headingLevel !== undefined)
|
|
229187
|
+
block.headingLevel = headingLevel;
|
|
229188
|
+
if (tableContext)
|
|
229189
|
+
block.tableContext = tableContext;
|
|
229190
|
+
return block;
|
|
229191
|
+
}
|
|
229192
|
+
function collectContainerBlocks(container, contentStart, containerPath, ordinals, tableContext, nestedParent) {
|
|
229193
|
+
const blocks2 = [];
|
|
229194
|
+
let childOffset = 0;
|
|
229195
|
+
for (let i4 = 0;i4 < container.childCount; i4++) {
|
|
229196
|
+
const child = container.child(i4);
|
|
229197
|
+
const childPos = contentStart + childOffset;
|
|
229198
|
+
childOffset += child.nodeSize;
|
|
229199
|
+
const childPath = [...containerPath, i4];
|
|
229200
|
+
if (child.type.name === "table") {
|
|
229201
|
+
blocks2.push(...collectTableExtractBlocks(child, childPos, childPath, ordinals, nestedParent));
|
|
229202
|
+
continue;
|
|
229203
|
+
}
|
|
229204
|
+
if (SDT_BLOCK_NODE_NAMES.has(child.type.name)) {
|
|
229205
|
+
blocks2.push(...collectContainerBlocks(child, childPos + 1, childPath, ordinals, tableContext, nestedParent));
|
|
229206
|
+
continue;
|
|
229207
|
+
}
|
|
229208
|
+
const childType = mapBlockNodeType(child);
|
|
229209
|
+
if (childType && EMITTABLE_BLOCK_TYPES.has(childType)) {
|
|
229210
|
+
const block = buildBlock(child, childPos, childType, childPath, tableContext);
|
|
229211
|
+
if (block)
|
|
229212
|
+
blocks2.push(block);
|
|
229213
|
+
continue;
|
|
229214
|
+
}
|
|
229215
|
+
if (!child.isLeaf && child.firstChild?.isBlock === true)
|
|
229216
|
+
blocks2.push(...collectContainerBlocks(child, childPos + 1, childPath, ordinals, tableContext, nestedParent));
|
|
229217
|
+
}
|
|
229218
|
+
return blocks2;
|
|
229219
|
+
}
|
|
229220
|
+
function collectTableExtractBlocks(tableNode, tablePos, tablePath, ordinals, parent) {
|
|
229221
|
+
const tableOrdinal = ordinals.next++;
|
|
229222
|
+
const anchors = indexCellsForTable(tableNode);
|
|
229223
|
+
const blocks2 = [];
|
|
229224
|
+
for (const anchor of anchors) {
|
|
229225
|
+
const cellContentStart = tablePos + 1 + anchor.cellOffset + 1;
|
|
229226
|
+
const cellPath = [
|
|
229227
|
+
...tablePath,
|
|
229228
|
+
anchor.rowChildIndex,
|
|
229229
|
+
anchor.cellChildIndexInRow
|
|
229230
|
+
];
|
|
229231
|
+
const tableContext = {
|
|
229232
|
+
tableOrdinal,
|
|
229233
|
+
rowIndex: anchor.gridRowIndex,
|
|
229234
|
+
columnIndex: anchor.gridColumnIndex,
|
|
229235
|
+
rowspan: anchor.rowspan,
|
|
229236
|
+
colspan: anchor.colspan
|
|
229401
229237
|
};
|
|
229402
|
-
if (
|
|
229403
|
-
|
|
229404
|
-
|
|
229405
|
-
|
|
229238
|
+
if (parent) {
|
|
229239
|
+
tableContext.parentTableOrdinal = parent.tableOrdinal;
|
|
229240
|
+
tableContext.parentRowIndex = parent.rowIndex;
|
|
229241
|
+
tableContext.parentColumnIndex = parent.columnIndex;
|
|
229242
|
+
}
|
|
229243
|
+
blocks2.push(...collectContainerBlocks(anchor.cellNode, cellContentStart, cellPath, ordinals, tableContext, {
|
|
229244
|
+
tableOrdinal,
|
|
229245
|
+
rowIndex: anchor.gridRowIndex,
|
|
229246
|
+
columnIndex: anchor.gridColumnIndex
|
|
229247
|
+
}));
|
|
229248
|
+
}
|
|
229249
|
+
return blocks2;
|
|
229250
|
+
}
|
|
229251
|
+
function collectBlocks(editor) {
|
|
229252
|
+
return collectContainerBlocks(editor.state.doc, 0, [], { next: 0 });
|
|
229406
229253
|
}
|
|
229407
229254
|
function collectComments(editor) {
|
|
229408
229255
|
return createCommentsWrapper(editor).list({ includeResolved: true }).items.map((item) => {
|
|
@@ -230194,6 +230041,341 @@ function createHeadingWrapper(editor, input2, options) {
|
|
|
230194
230041
|
disposeEphemeralWriteRuntime(runtime);
|
|
230195
230042
|
}
|
|
230196
230043
|
}
|
|
230044
|
+
function extractTextPreview(node3) {
|
|
230045
|
+
if (!node3.isTextblock)
|
|
230046
|
+
return null;
|
|
230047
|
+
const text5 = node3.textContent;
|
|
230048
|
+
if (text5.length <= TEXT_PREVIEW_MAX_LENGTH)
|
|
230049
|
+
return text5;
|
|
230050
|
+
return text5.slice(0, TEXT_PREVIEW_MAX_LENGTH);
|
|
230051
|
+
}
|
|
230052
|
+
function extractBlockText$1(node3) {
|
|
230053
|
+
if (!node3.isTextblock)
|
|
230054
|
+
return null;
|
|
230055
|
+
return node3.textContent;
|
|
230056
|
+
}
|
|
230057
|
+
function buildStyleContext(editor) {
|
|
230058
|
+
const styleProps = readTranslatedLinkedStyles(editor);
|
|
230059
|
+
if (!styleProps)
|
|
230060
|
+
return null;
|
|
230061
|
+
return {
|
|
230062
|
+
styles: styleProps.styles ?? {},
|
|
230063
|
+
docDefaultsFontSizeHp: typeof styleProps.docDefaults?.runProperties?.fontSize === "number" ? styleProps.docDefaults.runProperties.fontSize : undefined
|
|
230064
|
+
};
|
|
230065
|
+
}
|
|
230066
|
+
function resolveBlockFontSizePt(styleCtx, styleId) {
|
|
230067
|
+
if (!styleCtx)
|
|
230068
|
+
return OOXML_DEFAULT_FONT_SIZE_PT;
|
|
230069
|
+
let currentId = styleId ?? "Normal";
|
|
230070
|
+
const visited = /* @__PURE__ */ new Set;
|
|
230071
|
+
while (currentId && !visited.has(currentId)) {
|
|
230072
|
+
visited.add(currentId);
|
|
230073
|
+
const style2 = styleCtx.styles[currentId];
|
|
230074
|
+
if (!style2)
|
|
230075
|
+
break;
|
|
230076
|
+
const fs = style2.runProperties?.fontSize;
|
|
230077
|
+
if (typeof fs === "number")
|
|
230078
|
+
return fs / 2;
|
|
230079
|
+
currentId = style2.basedOn ?? "";
|
|
230080
|
+
}
|
|
230081
|
+
if (!visited.has("Normal")) {
|
|
230082
|
+
const fs = styleCtx.styles["Normal"]?.runProperties?.fontSize;
|
|
230083
|
+
if (typeof fs === "number")
|
|
230084
|
+
return fs / 2;
|
|
230085
|
+
}
|
|
230086
|
+
if (typeof styleCtx.docDefaultsFontSizeHp === "number")
|
|
230087
|
+
return styleCtx.docDefaultsFontSizeHp / 2;
|
|
230088
|
+
return OOXML_DEFAULT_FONT_SIZE_PT;
|
|
230089
|
+
}
|
|
230090
|
+
function extractBlockFormatting(node3, styleCtx) {
|
|
230091
|
+
const pProps = node3.attrs.paragraphProperties;
|
|
230092
|
+
const styleId = pProps?.styleId ?? null;
|
|
230093
|
+
let fontFamily;
|
|
230094
|
+
let fontSize;
|
|
230095
|
+
let bold2;
|
|
230096
|
+
let underline;
|
|
230097
|
+
let color2;
|
|
230098
|
+
node3.descendants((child) => {
|
|
230099
|
+
if (fontFamily !== undefined)
|
|
230100
|
+
return false;
|
|
230101
|
+
const marks = child.marks ?? [];
|
|
230102
|
+
if (!child.isText || marks.length === 0)
|
|
230103
|
+
return;
|
|
230104
|
+
for (const mark2 of marks) {
|
|
230105
|
+
const markName = mark2.type.name;
|
|
230106
|
+
const attrs = mark2.attrs;
|
|
230107
|
+
if (markName === "textStyle") {
|
|
230108
|
+
if (typeof attrs.fontFamily === "string" && attrs.fontFamily)
|
|
230109
|
+
fontFamily = attrs.fontFamily;
|
|
230110
|
+
if (attrs.fontSize != null) {
|
|
230111
|
+
const raw = typeof attrs.fontSize === "string" ? parseFloat(attrs.fontSize) : attrs.fontSize;
|
|
230112
|
+
if (typeof raw === "number" && Number.isFinite(raw))
|
|
230113
|
+
fontSize = raw;
|
|
230114
|
+
}
|
|
230115
|
+
if (typeof attrs.color === "string" && attrs.color)
|
|
230116
|
+
color2 = attrs.color;
|
|
230117
|
+
}
|
|
230118
|
+
if (markName === "bold" && attrs.value === true)
|
|
230119
|
+
bold2 = true;
|
|
230120
|
+
if (markName === "underline")
|
|
230121
|
+
underline = true;
|
|
230122
|
+
}
|
|
230123
|
+
return false;
|
|
230124
|
+
});
|
|
230125
|
+
if (color2 === "auto")
|
|
230126
|
+
color2 = undefined;
|
|
230127
|
+
let headingLevel;
|
|
230128
|
+
if (typeof styleId === "string") {
|
|
230129
|
+
const m$1 = HEADING_PATTERN.exec(styleId);
|
|
230130
|
+
if (m$1)
|
|
230131
|
+
headingLevel = parseInt(m$1[1], 10);
|
|
230132
|
+
}
|
|
230133
|
+
return {
|
|
230134
|
+
...styleId ? { styleId } : {},
|
|
230135
|
+
...fontFamily ? { fontFamily } : {},
|
|
230136
|
+
...fontSize !== undefined ? { fontSize } : styleCtx ? { fontSize: resolveBlockFontSizePt(styleCtx, styleId) } : {},
|
|
230137
|
+
...bold2 ? { bold: bold2 } : {},
|
|
230138
|
+
...underline ? { underline } : {},
|
|
230139
|
+
...color2 ? { color: color2 } : {},
|
|
230140
|
+
...pProps?.justification ? { alignment: pProps.justification } : {},
|
|
230141
|
+
...headingLevel ? { headingLevel } : {}
|
|
230142
|
+
};
|
|
230143
|
+
}
|
|
230144
|
+
function toBlockSummary(candidate, ordinal) {
|
|
230145
|
+
return {
|
|
230146
|
+
ordinal,
|
|
230147
|
+
nodeId: candidate.nodeId,
|
|
230148
|
+
nodeType: candidate.nodeType,
|
|
230149
|
+
textPreview: extractTextPreview(candidate.node)
|
|
230150
|
+
};
|
|
230151
|
+
}
|
|
230152
|
+
function resolveSdBlockId(candidate) {
|
|
230153
|
+
const sdBlockId = candidate.node.attrs?.sdBlockId;
|
|
230154
|
+
if (typeof sdBlockId === "string" && sdBlockId.length > 0)
|
|
230155
|
+
return sdBlockId;
|
|
230156
|
+
throw new DocumentApiAdapterError("INTERNAL_ERROR", "Resolved block candidate is missing sdBlockId attribute. This indicates a schema/extension invariant violation.", { attrs: candidate.node.attrs });
|
|
230157
|
+
}
|
|
230158
|
+
function validateDeleteTargetNodeType(nodeType) {
|
|
230159
|
+
if (REJECTED_DELETE_NODE_TYPES3.has(nodeType))
|
|
230160
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.delete does not support "${nodeType}" targets. Table row/column operations are out of scope.`, { nodeType });
|
|
230161
|
+
if (!SUPPORTED_DELETE_NODE_TYPES3.has(nodeType))
|
|
230162
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.delete does not support "${nodeType}" targets.`, { nodeType });
|
|
230163
|
+
}
|
|
230164
|
+
function validateCommandLayerUniqueness(editor, sdBlockId) {
|
|
230165
|
+
const getBlockNodeById = editor.helpers?.blockNode?.getBlockNodeById;
|
|
230166
|
+
if (typeof getBlockNodeById !== "function")
|
|
230167
|
+
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", "blocks.delete requires the blockNode helper to be registered.", { reason: "missing_helper" });
|
|
230168
|
+
const matches2 = getBlockNodeById(sdBlockId);
|
|
230169
|
+
if (!matches2 || Array.isArray(matches2) && matches2.length === 0)
|
|
230170
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `Block with sdBlockId "${sdBlockId}" was not found at the command layer.`, { sdBlockId });
|
|
230171
|
+
if (Array.isArray(matches2) && matches2.length > 1)
|
|
230172
|
+
throw new DocumentApiAdapterError("AMBIGUOUS_TARGET", `Multiple blocks share sdBlockId "${sdBlockId}" at the command layer.`, {
|
|
230173
|
+
sdBlockId,
|
|
230174
|
+
count: matches2.length
|
|
230175
|
+
});
|
|
230176
|
+
}
|
|
230177
|
+
function collectTopLevelBlocks(editor) {
|
|
230178
|
+
const doc$12 = editor.state.doc;
|
|
230179
|
+
const results = [];
|
|
230180
|
+
let offset$1 = 0;
|
|
230181
|
+
for (let i4 = 0;i4 < doc$12.childCount; i4++) {
|
|
230182
|
+
const child = doc$12.child(i4);
|
|
230183
|
+
const nodeType = mapBlockNodeType(child);
|
|
230184
|
+
const pos = offset$1;
|
|
230185
|
+
if (nodeType) {
|
|
230186
|
+
const nodeId = resolveBlockNodeId(child, pos, nodeType, [i4]);
|
|
230187
|
+
if (nodeId)
|
|
230188
|
+
results.push({
|
|
230189
|
+
node: child,
|
|
230190
|
+
pos,
|
|
230191
|
+
end: pos + child.nodeSize,
|
|
230192
|
+
nodeType,
|
|
230193
|
+
nodeId
|
|
230194
|
+
});
|
|
230195
|
+
}
|
|
230196
|
+
offset$1 += child.nodeSize;
|
|
230197
|
+
}
|
|
230198
|
+
return results;
|
|
230199
|
+
}
|
|
230200
|
+
function blocksListWrapper(editor, input2) {
|
|
230201
|
+
const topLevel = collectTopLevelBlocks(editor);
|
|
230202
|
+
const filtered = input2?.nodeTypes ? topLevel.filter((b$1) => input2.nodeTypes.includes(b$1.nodeType)) : topLevel;
|
|
230203
|
+
const total = filtered.length;
|
|
230204
|
+
const offset$1 = input2?.offset ?? 0;
|
|
230205
|
+
const limit = input2?.limit ?? total;
|
|
230206
|
+
const paged = filtered.slice(offset$1, offset$1 + limit);
|
|
230207
|
+
const rev = getRevision(editor);
|
|
230208
|
+
const styleCtx = buildStyleContext(editor);
|
|
230209
|
+
return {
|
|
230210
|
+
total,
|
|
230211
|
+
blocks: paged.map((candidate, i4) => {
|
|
230212
|
+
const textLength = computeTextContentLength(candidate.node);
|
|
230213
|
+
const fullText = input2?.includeText ? extractBlockText$1(candidate.node) : undefined;
|
|
230214
|
+
const ref$1 = textLength > 0 ? encodeV4Ref({
|
|
230215
|
+
v: 4,
|
|
230216
|
+
rev,
|
|
230217
|
+
storyKey: "body",
|
|
230218
|
+
scope: "block",
|
|
230219
|
+
matchId: candidate.nodeId,
|
|
230220
|
+
segments: [{
|
|
230221
|
+
blockId: candidate.nodeId,
|
|
230222
|
+
start: 0,
|
|
230223
|
+
end: textLength
|
|
230224
|
+
}],
|
|
230225
|
+
blockIndex: offset$1 + i4
|
|
230226
|
+
}) : undefined;
|
|
230227
|
+
return {
|
|
230228
|
+
ordinal: offset$1 + i4,
|
|
230229
|
+
nodeId: candidate.nodeId,
|
|
230230
|
+
nodeType: candidate.nodeType,
|
|
230231
|
+
textPreview: extractTextPreview(candidate.node),
|
|
230232
|
+
...fullText !== undefined ? { text: fullText } : {},
|
|
230233
|
+
isEmpty: textLength === 0,
|
|
230234
|
+
...extractBlockFormatting(candidate.node, styleCtx),
|
|
230235
|
+
...ref$1 ? { ref: ref$1 } : {}
|
|
230236
|
+
};
|
|
230237
|
+
}),
|
|
230238
|
+
revision: rev
|
|
230239
|
+
};
|
|
230240
|
+
}
|
|
230241
|
+
function blocksDeleteWrapper(editor, input2, options) {
|
|
230242
|
+
rejectTrackedMode("blocks.delete", options);
|
|
230243
|
+
const candidate = findBlockByIdStrict(getBlockIndex(editor), input2.target);
|
|
230244
|
+
validateDeleteTargetNodeType(candidate.nodeType);
|
|
230245
|
+
const deletedBlock = toBlockSummary(candidate, collectTopLevelBlocks(editor).findIndex((b$1) => b$1.nodeId === candidate.nodeId && b$1.nodeType === candidate.nodeType));
|
|
230246
|
+
const sdBlockId = resolveSdBlockId(candidate);
|
|
230247
|
+
const deleteBlockNodeById = requireEditorCommand(editor.commands?.deleteBlockNodeById, "blocks.delete");
|
|
230248
|
+
validateCommandLayerUniqueness(editor, sdBlockId);
|
|
230249
|
+
if (options?.dryRun)
|
|
230250
|
+
return {
|
|
230251
|
+
success: true,
|
|
230252
|
+
deleted: input2.target,
|
|
230253
|
+
deletedBlock
|
|
230254
|
+
};
|
|
230255
|
+
if (executeDomainCommand(editor, () => {
|
|
230256
|
+
const didApply = deleteBlockNodeById(sdBlockId);
|
|
230257
|
+
if (didApply)
|
|
230258
|
+
clearIndexCache(editor);
|
|
230259
|
+
return didApply;
|
|
230260
|
+
}, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
|
|
230261
|
+
throw new DocumentApiAdapterError("INTERNAL_ERROR", "blocks.delete command returned false despite passing all pre-apply checks. This is an internal invariant violation.", {
|
|
230262
|
+
sdBlockId,
|
|
230263
|
+
target: input2.target
|
|
230264
|
+
});
|
|
230265
|
+
return {
|
|
230266
|
+
success: true,
|
|
230267
|
+
deleted: input2.target,
|
|
230268
|
+
deletedBlock
|
|
230269
|
+
};
|
|
230270
|
+
}
|
|
230271
|
+
function hasSectionBreak(candidate) {
|
|
230272
|
+
const pPr = candidate.node.attrs?.paragraphProperties;
|
|
230273
|
+
return pPr?.sectPr != null && typeof pPr.sectPr === "object";
|
|
230274
|
+
}
|
|
230275
|
+
function resolveTopLevelOrdinal(topLevel, candidate, label) {
|
|
230276
|
+
const idx = topLevel.findIndex((b$1) => b$1.nodeId === candidate.nodeId && b$1.nodeType === candidate.nodeType);
|
|
230277
|
+
if (idx !== -1)
|
|
230278
|
+
return idx;
|
|
230279
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.deleteRange ${label} resolved to a nested block (not a direct document child). Only top-level blocks are supported.`, {
|
|
230280
|
+
nodeId: candidate.nodeId,
|
|
230281
|
+
nodeType: candidate.nodeType
|
|
230282
|
+
});
|
|
230283
|
+
}
|
|
230284
|
+
function resolveRangeEndpoint(index2, address2, label) {
|
|
230285
|
+
const key2 = `${address2.nodeType}:${address2.nodeId}`;
|
|
230286
|
+
if (index2.ambiguous.has(key2))
|
|
230287
|
+
throw new DocumentApiAdapterError("AMBIGUOUS_TARGET", `Multiple blocks share key "${key2}".`, { target: address2 });
|
|
230288
|
+
const candidate = index2.byId.get(key2);
|
|
230289
|
+
if (candidate)
|
|
230290
|
+
return candidate;
|
|
230291
|
+
const mismatch = index2.candidates.find((c) => c.nodeId === address2.nodeId);
|
|
230292
|
+
if (mismatch)
|
|
230293
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.deleteRange ${label} expected ${address2.nodeType}:${address2.nodeId} but resolved to ${mismatch.nodeType}.`, {
|
|
230294
|
+
expected: address2.nodeType,
|
|
230295
|
+
actual: mismatch.nodeType,
|
|
230296
|
+
nodeId: address2.nodeId
|
|
230297
|
+
});
|
|
230298
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `Block "${key2}" was not found.`, { target: address2 });
|
|
230299
|
+
}
|
|
230300
|
+
function rejectUnmappedNodesInRange(doc$12, rangeBlocks) {
|
|
230301
|
+
if (rangeBlocks.length === 0)
|
|
230302
|
+
return;
|
|
230303
|
+
const rangeFrom = rangeBlocks[0].pos;
|
|
230304
|
+
const rangeTo = rangeBlocks[rangeBlocks.length - 1].end;
|
|
230305
|
+
const recognizedPositions = new Set(rangeBlocks.map((b$1) => b$1.pos));
|
|
230306
|
+
let offset$1 = 0;
|
|
230307
|
+
for (let i4 = 0;i4 < doc$12.childCount; i4++) {
|
|
230308
|
+
const child = doc$12.child(i4);
|
|
230309
|
+
const childEnd = offset$1 + child.nodeSize;
|
|
230310
|
+
if (childEnd > rangeFrom && offset$1 < rangeTo && !recognizedPositions.has(offset$1)) {
|
|
230311
|
+
if (!RANGE_DELETE_SAFE_NODE_TYPES.has(child.type.name))
|
|
230312
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.deleteRange cannot delete range: unrecognized node "${child.type.name}" at position ${offset$1} would be silently removed.`, {
|
|
230313
|
+
pmNodeType: child.type.name,
|
|
230314
|
+
pos: offset$1
|
|
230315
|
+
});
|
|
230316
|
+
}
|
|
230317
|
+
offset$1 = childEnd;
|
|
230318
|
+
}
|
|
230319
|
+
}
|
|
230320
|
+
function blocksDeleteRangeWrapper(editor, input2, options) {
|
|
230321
|
+
rejectTrackedMode("blocks.deleteRange", options);
|
|
230322
|
+
const topLevel = collectTopLevelBlocks(editor);
|
|
230323
|
+
const index2 = getBlockIndex(editor);
|
|
230324
|
+
const startCandidate = resolveRangeEndpoint(index2, input2.start, "start");
|
|
230325
|
+
const endCandidate = resolveRangeEndpoint(index2, input2.end, "end");
|
|
230326
|
+
const startOrdinal = resolveTopLevelOrdinal(topLevel, startCandidate, "start");
|
|
230327
|
+
const endOrdinal = resolveTopLevelOrdinal(topLevel, endCandidate, "end");
|
|
230328
|
+
if (startOrdinal > endOrdinal)
|
|
230329
|
+
throw new DocumentApiAdapterError("INVALID_INPUT", `blocks.deleteRange start ordinal (${startOrdinal}) is after end ordinal (${endOrdinal}). The start must precede or equal the end.`, {
|
|
230330
|
+
startOrdinal,
|
|
230331
|
+
endOrdinal
|
|
230332
|
+
});
|
|
230333
|
+
const rangeBlocks = topLevel.slice(startOrdinal, endOrdinal + 1);
|
|
230334
|
+
rejectUnmappedNodesInRange(editor.state.doc, rangeBlocks);
|
|
230335
|
+
for (const block of rangeBlocks)
|
|
230336
|
+
if (hasSectionBreak(block))
|
|
230337
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", `blocks.deleteRange cannot delete a range that includes a section break (block "${block.nodeId}" at ordinal ${topLevel.indexOf(block)}).`, {
|
|
230338
|
+
nodeId: block.nodeId,
|
|
230339
|
+
nodeType: block.nodeType
|
|
230340
|
+
});
|
|
230341
|
+
const deletedBlocks = rangeBlocks.map((c, i4) => toBlockSummary(c, startOrdinal + i4));
|
|
230342
|
+
const revisionBefore = getRevision(editor);
|
|
230343
|
+
if (options?.dryRun)
|
|
230344
|
+
return {
|
|
230345
|
+
success: true,
|
|
230346
|
+
deletedCount: rangeBlocks.length,
|
|
230347
|
+
deletedBlocks,
|
|
230348
|
+
revision: {
|
|
230349
|
+
before: revisionBefore,
|
|
230350
|
+
after: revisionBefore
|
|
230351
|
+
},
|
|
230352
|
+
dryRun: true
|
|
230353
|
+
};
|
|
230354
|
+
const rangeFrom = rangeBlocks[0].pos;
|
|
230355
|
+
const rangeTo = rangeBlocks[rangeBlocks.length - 1].end;
|
|
230356
|
+
if (executeDomainCommand(editor, () => {
|
|
230357
|
+
const tr = editor.state.tr;
|
|
230358
|
+
tr.delete(rangeFrom, rangeTo);
|
|
230359
|
+
editor.dispatch(tr);
|
|
230360
|
+
clearIndexCache(editor);
|
|
230361
|
+
return true;
|
|
230362
|
+
}, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
|
|
230363
|
+
throw new DocumentApiAdapterError("INTERNAL_ERROR", "blocks.deleteRange command returned false despite passing all pre-apply checks.", {
|
|
230364
|
+
start: input2.start,
|
|
230365
|
+
end: input2.end
|
|
230366
|
+
});
|
|
230367
|
+
const revisionAfter = getRevision(editor);
|
|
230368
|
+
return {
|
|
230369
|
+
success: true,
|
|
230370
|
+
deletedCount: rangeBlocks.length,
|
|
230371
|
+
deletedBlocks,
|
|
230372
|
+
revision: {
|
|
230373
|
+
before: revisionBefore,
|
|
230374
|
+
after: revisionAfter
|
|
230375
|
+
},
|
|
230376
|
+
dryRun: false
|
|
230377
|
+
};
|
|
230378
|
+
}
|
|
230197
230379
|
function findLevelElement(abstract, ilvl) {
|
|
230198
230380
|
const ilvlStr = String(ilvl);
|
|
230199
230381
|
return abstract.elements?.find((el) => el.name === "w:lvl" && el.attributes?.["w:ilvl"] === ilvlStr);
|
|
@@ -249226,33 +249408,27 @@ function resolveLayout(input2) {
|
|
|
249226
249408
|
resolved.layoutEpoch = layout.layoutEpoch;
|
|
249227
249409
|
return resolved;
|
|
249228
249410
|
}
|
|
249229
|
-
function
|
|
249230
|
-
|
|
249231
|
-
|
|
249232
|
-
|
|
249233
|
-
|
|
249234
|
-
|
|
249235
|
-
|
|
249236
|
-
|
|
249411
|
+
function resolveHeaderFooterLayout(layout, blocks2, measures) {
|
|
249412
|
+
const pages = layout.pages.map((page) => {
|
|
249413
|
+
const blockMap = buildBlockMap(page.blocks ?? blocks2, page.measures ?? measures);
|
|
249414
|
+
const blockVersionCache = /* @__PURE__ */ new Map;
|
|
249415
|
+
return {
|
|
249416
|
+
number: page.number,
|
|
249417
|
+
numberText: page.numberText,
|
|
249418
|
+
items: page.fragments.map((fragment2, fragmentIndex) => resolveFragmentItem(fragment2, fragmentIndex, page.number - 1, blockMap, blockVersionCache))
|
|
249419
|
+
};
|
|
249420
|
+
});
|
|
249237
249421
|
return {
|
|
249238
|
-
|
|
249239
|
-
|
|
249422
|
+
height: layout.height,
|
|
249423
|
+
minY: layout.minY,
|
|
249424
|
+
maxY: layout.maxY,
|
|
249425
|
+
renderHeight: layout.renderHeight,
|
|
249426
|
+
pages
|
|
249240
249427
|
};
|
|
249241
249428
|
}
|
|
249242
|
-
function
|
|
249243
|
-
|
|
249244
|
-
|
|
249245
|
-
if (hasBlocks !== hasMeasures)
|
|
249246
|
-
throw new Error(`${label}Blocks and ${label}Measures must both be provided or both be omitted.`);
|
|
249247
|
-
if (!hasBlocks || !hasMeasures)
|
|
249248
|
-
return;
|
|
249249
|
-
if (!Array.isArray(blocks2) || !Array.isArray(measures))
|
|
249250
|
-
throw new Error(`${label}Blocks and ${label}Measures must be arrays when provided.`);
|
|
249251
|
-
assertRequiredBlockMeasurePair(label, blocks2, measures);
|
|
249252
|
-
return {
|
|
249253
|
-
blocks: blocks2,
|
|
249254
|
-
measures
|
|
249255
|
-
};
|
|
249429
|
+
function assertRequiredBlockMeasurePair(label, blocks2, measures) {
|
|
249430
|
+
if (blocks2.length !== measures.length)
|
|
249431
|
+
throw new Error(`${label} blocks and measures must have the same length.`);
|
|
249256
249432
|
}
|
|
249257
249433
|
function createEmptyResolvedLayout(flowMode, pageGap) {
|
|
249258
249434
|
return {
|
|
@@ -249262,25 +249438,8 @@ function createEmptyResolvedLayout(flowMode, pageGap) {
|
|
|
249262
249438
|
pages: []
|
|
249263
249439
|
};
|
|
249264
249440
|
}
|
|
249265
|
-
function
|
|
249266
|
-
return "
|
|
249267
|
-
}
|
|
249268
|
-
function normalizeDomPainterInput(input2) {
|
|
249269
|
-
if (!input2.resolvedLayout || !input2.sourceLayout)
|
|
249270
|
-
throw new Error("DomPainterInput requires resolvedLayout and sourceLayout.");
|
|
249271
|
-
const body = normalizeRequiredBlockMeasurePair("body", input2.blocks, input2.measures);
|
|
249272
|
-
const header = normalizeOptionalBlockMeasurePair("header", input2.headerBlocks, input2.headerMeasures);
|
|
249273
|
-
const footer = normalizeOptionalBlockMeasurePair("footer", input2.footerBlocks, input2.footerMeasures);
|
|
249274
|
-
return {
|
|
249275
|
-
resolvedLayout: input2.resolvedLayout,
|
|
249276
|
-
sourceLayout: input2.sourceLayout,
|
|
249277
|
-
blocks: body.blocks,
|
|
249278
|
-
measures: body.measures,
|
|
249279
|
-
headerBlocks: header?.blocks,
|
|
249280
|
-
headerMeasures: header?.measures,
|
|
249281
|
-
footerBlocks: footer?.blocks,
|
|
249282
|
-
footerMeasures: footer?.measures
|
|
249283
|
-
};
|
|
249441
|
+
function isDomPainterInput(value) {
|
|
249442
|
+
return "resolvedLayout" in value && "sourceLayout" in value;
|
|
249284
249443
|
}
|
|
249285
249444
|
function buildLegacyPaintInput(layout, legacyState, flowMode, pageGap) {
|
|
249286
249445
|
let resolvedLayout;
|
|
@@ -249297,13 +249456,7 @@ function buildLegacyPaintInput(layout, legacyState, flowMode, pageGap) {
|
|
|
249297
249456
|
});
|
|
249298
249457
|
return {
|
|
249299
249458
|
resolvedLayout,
|
|
249300
|
-
sourceLayout: layout
|
|
249301
|
-
blocks: legacyState.blocks,
|
|
249302
|
-
measures: legacyState.measures,
|
|
249303
|
-
headerBlocks: legacyState.headerBlocks,
|
|
249304
|
-
headerMeasures: legacyState.headerMeasures,
|
|
249305
|
-
footerBlocks: legacyState.footerBlocks,
|
|
249306
|
-
footerMeasures: legacyState.footerMeasures
|
|
249459
|
+
sourceLayout: layout
|
|
249307
249460
|
};
|
|
249308
249461
|
}
|
|
249309
249462
|
function appendToArrayMap(map$12, key2, value) {
|
|
@@ -260656,7 +260809,7 @@ function normalizeConverterContext(context, defaultFont, defaultSize) {
|
|
|
260656
260809
|
context.translatedLinkedStyles.docDefaults.runProperties.fontSize = defaultSize * 0.75 * 2;
|
|
260657
260810
|
return context;
|
|
260658
260811
|
}
|
|
260659
|
-
function buildFootnotesInput(editorState, converter, converterContext, themeColors) {
|
|
260812
|
+
function buildFootnotesInput(editorState, converter, converterContext, themeColors, renderOverride = null) {
|
|
260660
260813
|
if (!editorState)
|
|
260661
260814
|
return null;
|
|
260662
260815
|
const footnoteNumberById = converterContext?.footnoteNumberById;
|
|
@@ -260683,14 +260836,11 @@ function buildFootnotesInput(editorState, converter, converterContext, themeColo
|
|
|
260683
260836
|
return null;
|
|
260684
260837
|
const blocksById = /* @__PURE__ */ new Map;
|
|
260685
260838
|
idsInUse.forEach((id2) => {
|
|
260686
|
-
const content3 = findNoteEntryById(importedFootnotes, id2)?.content;
|
|
260687
|
-
if (!Array.isArray(content3) || content3.length === 0)
|
|
260688
|
-
return;
|
|
260689
260839
|
try {
|
|
260690
|
-
const
|
|
260691
|
-
|
|
260692
|
-
|
|
260693
|
-
|
|
260840
|
+
const footnoteDoc = resolveNoteDocJson(id2, importedFootnotes, renderOverride);
|
|
260841
|
+
if (!footnoteDoc)
|
|
260842
|
+
return;
|
|
260843
|
+
const result = toFlowBlocks(footnoteDoc, {
|
|
260694
260844
|
blockIdPrefix: `footnote-${id2}-`,
|
|
260695
260845
|
storyKey: buildStoryKey({
|
|
260696
260846
|
kind: "story",
|
|
@@ -260758,6 +260908,23 @@ function buildMarkerRun$1(markerText, firstTextRun) {
|
|
|
260758
260908
|
markerRun.color = firstTextRun.color;
|
|
260759
260909
|
return markerRun;
|
|
260760
260910
|
}
|
|
260911
|
+
function cloneJsonValue$1(value) {
|
|
260912
|
+
return JSON.parse(JSON.stringify(value));
|
|
260913
|
+
}
|
|
260914
|
+
function cloneNoteContentJson$1(content3) {
|
|
260915
|
+
return cloneJsonValue$1(content3);
|
|
260916
|
+
}
|
|
260917
|
+
function resolveNoteDocJson(id2, importedFootnotes, renderOverride) {
|
|
260918
|
+
if (renderOverride && renderOverride.noteId === id2)
|
|
260919
|
+
return normalizeNotePmJson(cloneJsonValue$1(renderOverride.docJson));
|
|
260920
|
+
const content3 = findNoteEntryById(importedFootnotes, id2)?.content;
|
|
260921
|
+
if (!Array.isArray(content3) || content3.length === 0)
|
|
260922
|
+
return null;
|
|
260923
|
+
return normalizeNotePmJson({
|
|
260924
|
+
type: "doc",
|
|
260925
|
+
content: cloneNoteContentJson$1(content3)
|
|
260926
|
+
});
|
|
260927
|
+
}
|
|
260761
260928
|
function syncMarkerRun$1(target, source) {
|
|
260762
260929
|
target.kind = source.kind;
|
|
260763
260930
|
target.text = source.text;
|
|
@@ -264856,6 +265023,36 @@ function setSurfaceRangeEnd(range, entry, pos) {
|
|
|
264856
265023
|
range.setEndAfter(entry.el);
|
|
264857
265024
|
return true;
|
|
264858
265025
|
}
|
|
265026
|
+
function resolveResult(result) {
|
|
265027
|
+
return resolveHeaderFooterLayout(result.layout, result.blocks, result.measures);
|
|
265028
|
+
}
|
|
265029
|
+
function shiftResolvedPaintItemY(item, yOffset) {
|
|
265030
|
+
if (item.kind === "group")
|
|
265031
|
+
return {
|
|
265032
|
+
...item,
|
|
265033
|
+
y: item.y + yOffset,
|
|
265034
|
+
children: item.children.map((child) => shiftResolvedPaintItemY(child, yOffset))
|
|
265035
|
+
};
|
|
265036
|
+
return {
|
|
265037
|
+
...item,
|
|
265038
|
+
y: item.y + yOffset
|
|
265039
|
+
};
|
|
265040
|
+
}
|
|
265041
|
+
function normalizeDecorationFragments(fragments, layoutMinY) {
|
|
265042
|
+
if (layoutMinY >= 0)
|
|
265043
|
+
return fragments;
|
|
265044
|
+
const yOffset = -layoutMinY;
|
|
265045
|
+
return fragments.map((fragment2) => ({
|
|
265046
|
+
...fragment2,
|
|
265047
|
+
y: fragment2.y + yOffset
|
|
265048
|
+
}));
|
|
265049
|
+
}
|
|
265050
|
+
function normalizeDecorationItems(items, layoutMinY) {
|
|
265051
|
+
if (!items || layoutMinY >= 0)
|
|
265052
|
+
return items;
|
|
265053
|
+
const yOffset = -layoutMinY;
|
|
265054
|
+
return items.map((item) => shiftResolvedPaintItemY(item, yOffset));
|
|
265055
|
+
}
|
|
264859
265056
|
function createStoryHiddenHost(doc$12, widthPx, options = {}) {
|
|
264860
265057
|
const { wrapper, host } = createHiddenHost(doc$12, widthPx);
|
|
264861
265058
|
wrapper.classList.add(STORY_HIDDEN_HOST_WRAPPER_CLASS);
|
|
@@ -264875,7 +265072,7 @@ function getHostEditor(editor) {
|
|
|
264875
265072
|
function resolveSessionHostEditor(editor, runtime) {
|
|
264876
265073
|
return getHostEditor(editor) ?? getHostEditor(runtime.editor) ?? runtime.editor;
|
|
264877
265074
|
}
|
|
264878
|
-
function buildEndnoteBlocks(editorState, converter, converterContext, themeColors) {
|
|
265075
|
+
function buildEndnoteBlocks(editorState, converter, converterContext, themeColors, renderOverride = null) {
|
|
264879
265076
|
if (!editorState)
|
|
264880
265077
|
return [];
|
|
264881
265078
|
const endnoteNumberById = converterContext?.endnoteNumberById;
|
|
@@ -264900,14 +265097,11 @@ function buildEndnoteBlocks(editorState, converter, converterContext, themeColor
|
|
|
264900
265097
|
return [];
|
|
264901
265098
|
const blocks2 = [];
|
|
264902
265099
|
orderedEndnoteIds.forEach((id2) => {
|
|
264903
|
-
const content3 = findNoteEntryById(importedEndnotes, id2)?.content;
|
|
264904
|
-
if (!Array.isArray(content3) || content3.length === 0)
|
|
264905
|
-
return;
|
|
264906
265100
|
try {
|
|
264907
|
-
const
|
|
264908
|
-
|
|
264909
|
-
|
|
264910
|
-
|
|
265101
|
+
const endnoteDoc = resolveEndnoteDocJson(id2, importedEndnotes, renderOverride);
|
|
265102
|
+
if (!endnoteDoc)
|
|
265103
|
+
return;
|
|
265104
|
+
const result = toFlowBlocks(endnoteDoc, {
|
|
264911
265105
|
blockIdPrefix: `endnote-${id2}-`,
|
|
264912
265106
|
storyKey: buildStoryKey({
|
|
264913
265107
|
kind: "story",
|
|
@@ -264982,6 +265176,23 @@ function syncMarkerRun(target, source) {
|
|
|
264982
265176
|
delete target.pmStart;
|
|
264983
265177
|
delete target.pmEnd;
|
|
264984
265178
|
}
|
|
265179
|
+
function cloneJsonValue(value) {
|
|
265180
|
+
return JSON.parse(JSON.stringify(value));
|
|
265181
|
+
}
|
|
265182
|
+
function cloneNoteContentJson(content3) {
|
|
265183
|
+
return cloneJsonValue(content3);
|
|
265184
|
+
}
|
|
265185
|
+
function resolveEndnoteDocJson(id2, importedEndnotes, renderOverride) {
|
|
265186
|
+
if (renderOverride && renderOverride.noteId === id2)
|
|
265187
|
+
return normalizeNotePmJson(cloneJsonValue(renderOverride.docJson));
|
|
265188
|
+
const content3 = findNoteEntryById(importedEndnotes, id2)?.content;
|
|
265189
|
+
if (!Array.isArray(content3) || content3.length === 0)
|
|
265190
|
+
return null;
|
|
265191
|
+
return normalizeNotePmJson({
|
|
265192
|
+
type: "doc",
|
|
265193
|
+
content: cloneNoteContentJson(content3)
|
|
265194
|
+
});
|
|
265195
|
+
}
|
|
264985
265196
|
function ensureEndnoteMarker(blocks2, id2, endnoteNumberById) {
|
|
264986
265197
|
const firstParagraph = blocks2.find((block) => block.kind === "paragraph");
|
|
264987
265198
|
if (!firstParagraph)
|
|
@@ -266953,26 +267164,26 @@ var Node$13 = class Node$14 {
|
|
|
266953
267164
|
cleanup();
|
|
266954
267165
|
headlessCleanupRegisteredEditors.delete(editor);
|
|
266955
267166
|
});
|
|
266956
|
-
}, cloneJsonValue = (value) => {
|
|
267167
|
+
}, cloneJsonValue$2 = (value) => {
|
|
266957
267168
|
if (value == null)
|
|
266958
267169
|
return null;
|
|
266959
267170
|
return JSON.parse(JSON.stringify(value));
|
|
266960
267171
|
}, serializeComparableValue = (value) => JSON.stringify(value ?? null), getEditorBodySectPr = (editor) => editor?.state?.doc?.attrs?.bodySectPr ?? null, setEditorConverterBodySectPr = (editor, bodySectPr) => {
|
|
266961
267172
|
if (!editor?.converter)
|
|
266962
267173
|
return;
|
|
266963
|
-
editor.converter.bodySectPr = cloneJsonValue(bodySectPr);
|
|
267174
|
+
editor.converter.bodySectPr = cloneJsonValue$2(bodySectPr);
|
|
266964
267175
|
}, syncBodySectPrToMetaMap = (ydoc, editor) => {
|
|
266965
267176
|
const metaMap = ydoc.getMap("meta");
|
|
266966
|
-
const nextBodySectPr = cloneJsonValue(getEditorBodySectPr(editor));
|
|
266967
|
-
const currentMetaBodySectPr = cloneJsonValue(metaMap.get(META_BODY_SECT_PR_KEY) ?? null);
|
|
267177
|
+
const nextBodySectPr = cloneJsonValue$2(getEditorBodySectPr(editor));
|
|
267178
|
+
const currentMetaBodySectPr = cloneJsonValue$2(metaMap.get(META_BODY_SECT_PR_KEY) ?? null);
|
|
266968
267179
|
setEditorConverterBodySectPr(editor, nextBodySectPr);
|
|
266969
267180
|
if (serializeComparableValue(nextBodySectPr) === serializeComparableValue(currentMetaBodySectPr))
|
|
266970
267181
|
return false;
|
|
266971
267182
|
metaMap.set(META_BODY_SECT_PR_KEY, nextBodySectPr);
|
|
266972
267183
|
return true;
|
|
266973
267184
|
}, applyBodySectPrFromMetaMap = (editor, ydoc) => {
|
|
266974
|
-
const nextBodySectPr = cloneJsonValue(ydoc.getMap("meta").get(META_BODY_SECT_PR_KEY) ?? null);
|
|
266975
|
-
const currentBodySectPr = cloneJsonValue(getEditorBodySectPr(editor));
|
|
267185
|
+
const nextBodySectPr = cloneJsonValue$2(ydoc.getMap("meta").get(META_BODY_SECT_PR_KEY) ?? null);
|
|
267186
|
+
const currentBodySectPr = cloneJsonValue$2(getEditorBodySectPr(editor));
|
|
266976
267187
|
setEditorConverterBodySectPr(editor, nextBodySectPr);
|
|
266977
267188
|
if (serializeComparableValue(nextBodySectPr) === serializeComparableValue(currentBodySectPr))
|
|
266978
267189
|
return false;
|
|
@@ -267015,8 +267226,8 @@ var Node$13 = class Node$14 {
|
|
|
267015
267226
|
applyBodySectPrFromMetaMap(editor, ydoc);
|
|
267016
267227
|
return;
|
|
267017
267228
|
}
|
|
267018
|
-
const previousBodySectPr = cloneJsonValue(transaction.before?.attrs?.bodySectPr ?? null);
|
|
267019
|
-
const nextBodySectPr = cloneJsonValue(getEditorBodySectPr(editor));
|
|
267229
|
+
const previousBodySectPr = cloneJsonValue$2(transaction.before?.attrs?.bodySectPr ?? null);
|
|
267230
|
+
const nextBodySectPr = cloneJsonValue$2(getEditorBodySectPr(editor));
|
|
267020
267231
|
if (serializeComparableValue(previousBodySectPr) === serializeComparableValue(nextBodySectPr))
|
|
267021
267232
|
return;
|
|
267022
267233
|
syncBodySectPrToMetaMap(ydoc, editor);
|
|
@@ -267149,8 +267360,8 @@ var Node$13 = class Node$14 {
|
|
|
267149
267360
|
}
|
|
267150
267361
|
if (transaction.getMeta?.(BODY_SECT_PR_SYNC_META_KEY))
|
|
267151
267362
|
return;
|
|
267152
|
-
const previousBodySectPr = cloneJsonValue(transaction.before?.attrs?.bodySectPr ?? null);
|
|
267153
|
-
const nextBodySectPr = cloneJsonValue(getEditorBodySectPr(editor));
|
|
267363
|
+
const previousBodySectPr = cloneJsonValue$2(transaction.before?.attrs?.bodySectPr ?? null);
|
|
267364
|
+
const nextBodySectPr = cloneJsonValue$2(getEditorBodySectPr(editor));
|
|
267154
267365
|
const bodySectPrChanged = serializeComparableValue(previousBodySectPr) !== serializeComparableValue(nextBodySectPr);
|
|
267155
267366
|
const binding = ensureInitializedBinding();
|
|
267156
267367
|
if (binding && typeof binding._prosemirrorChanged === "function") {
|
|
@@ -272340,7 +272551,7 @@ var Node$13 = class Node$14 {
|
|
|
272340
272551
|
...node3.attrs,
|
|
272341
272552
|
marksAsAttrs: newMarks
|
|
272342
272553
|
};
|
|
272343
|
-
dispatch(state.tr.setNodeMarkup(pos, undefined, newAttrs));
|
|
272554
|
+
dispatch(state.tr.setNodeMarkup(pos, undefined, newAttrs).setMeta("skipTrackChanges", true).setMeta("addToHistory", false));
|
|
272344
272555
|
}, 0);
|
|
272345
272556
|
}
|
|
272346
272557
|
update(node3) {
|
|
@@ -278216,7 +278427,7 @@ var Node$13 = class Node$14 {
|
|
|
278216
278427
|
console.warn("Failed to initialize developer tools:", error3);
|
|
278217
278428
|
}
|
|
278218
278429
|
}
|
|
278219
|
-
}, BLANK_DOCX_BASE64 = `UEsDBBQAAAAIAAAAIQAykW9XXgEAAKUFAAATABwAW0NvbnRlbnRfVHlwZXNdLnhtbFVUCQADMNDOEjDQzhJ1eAsAAQT1AQAABBQAAAC1lMtqwzAQRfeF/oPRNthKuiilxMmij2UbaPoBijRORPVCmrz+vuM4NaWkMeSxMcgz994zQsxwvLEmW0FM2ruSDYo+y8BJr7Sbl+xz+po/sCyhcEoY76BkW0hsPLq9GU63AVJGapdKtkAMj5wnuQArUuEDOKpUPlqBdIxzHoT8EnPgd/3+PZfeITjMsfZgo+EzVGJpMHvZ0O+GJIJJLHtqGuuskokQjJYCqc5XTv1JyfcJBSl3PWmhQ+pRA+MHE+rK/wF73TtdTdQKsomI+CYsdfG1j4orL5eWlMVxmwOcvqq0hFZfu4XoJaREd25N0Vas0K7XxeGWdgaRlJcHaa07IRJuDaTLEzS+3fGASIJrAOydOxHWMPu4GsUv806QinKnYmbg8hitdScE0hqA5js4m2NncyySOifRh0RrJZ4w9s/eqNU5DRwgoj7+6tpEsj57PqhXkgJ1IJvvluzoG1BLAwQKAAAAAACTZE1bAAAAAAAAAAAAAAAACQAcAGRvY1Byb3BzL1VUCQADhhztaIcc7Wh1eAsAAQT1AQAABBQAAABQSwMEFAAAAAgAAAAhACEYr1llAQAAxQIAABAAHABkb2NQcm9wcy9hcHAueG1sVVQJAAMw0M4SMNDOEnV4CwABBPUBAAAEFAAAAJ1STU/DMAy9I/Efqt63dBwmNHlBaAhx4GPSCpyjxG0j0iRKson9e5wVSoEbOdnP9st7TuDqvTfFAUPUzq7LxbwqC7TSKW3bdflc384uyyImYZUwzuK6PGIsr/j5GWyD8xiSxlgQhY3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AAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==`, BLANK_DOCX_DATA_URI, TAB_LEADER_TO_SEPARATOR, SEPARATOR_TO_TAB_LEADER, DEFAULT_TOC_CONFIG, SWITCH_PATTERN$1, BULLET_FORMATS$1, LOCK_MODE_TO_SDT_LOCK, SNIPPET_PADDING = 30, DUAL_KIND_TYPES, KNOWN_BLOCK_PM_NODE_TYPES, KNOWN_INLINE_PM_NODE_TYPES, MAX_PATTERN_LENGTH = 1024, TOGGLE_MARK_SPECS, CORE_MARK_NAMES, METADATA_MARK_NAMES, CSS_NAMED_COLORS, V3_PREFIX = "text:", V4_PREFIX = "text:v4:", HEADING_STYLE_DEPTH, BULLET_FORMATS, MARK_PRIORITY, remarkProcessor, DEFAULT_UNFLATTEN_LISTS = true, HEADING_STYLE_PATTERN, registry, VALID_CREATE_POSITIONS, REF_HANDLERS, STEP_INTERACTION_MATRIX, MATRIX_EXEMPT_OPS, PARAGRAPH_NODE_TYPES, TEXT_STYLE_CHARACTER_STYLE_ATTR = "styleId", DIRECT_FORMATTING_MARK_NAMES, ALIGNMENT_TO_JUSTIFICATION, DEFAULT_INLINE_POLICY, CORE_SET_MARK_KEYS, DEBUG_TEXT_REWRITE, BOOLEAN_INLINE_MARK_KEYS, TEXT_STYLE_KEYS, PRESERVE_RUN_PROPERTIES_META_KEY = "sdPreserveRunPropertiesKeys", CONTENT_CAPABILITIES, INLINE_CAPABILITIES, SDT_LOCK_TO_LOCK_MODE, BODY_LOCATOR2, STUB_WHERE, EMPTY_RESOLUTION, CONTAINER_NODE_TYPES, VALID_EDGE_NODE_TYPES3, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, FALLBACK_STORE_KEY = "__documentApiComments", TRACKED_CHANGE_ANCHOR_KEY_PREFIX = "tc::", COMMENT_ANCHOR_KEY_PREFIX = "comment::", indexByHost, TrackedChangeIndexImpl = class {
|
|
278430
|
+
}, BLANK_DOCX_BASE64 = `UEsDBBQAAAAIAAAAIQAykW9XXgEAAKUFAAATABwAW0NvbnRlbnRfVHlwZXNdLnhtbFVUCQADMNDOEjDQzhJ1eAsAAQT1AQAABBQAAAC1lMtqwzAQRfeF/oPRNthKuiilxMmij2UbaPoBijRORPVCmrz+vuM4NaWkMeSxMcgz994zQsxwvLEmW0FM2ruSDYo+y8BJr7Sbl+xz+po/sCyhcEoY76BkW0hsPLq9GU63AVJGapdKtkAMj5wnuQArUuEDOKpUPlqBdIxzHoT8EnPgd/3+PZfeITjMsfZgo+EzVGJpMHvZ0O+GJIJJLHtqGuuskokQjJYCqc5XTv1JyfcJBSl3PWmhQ+pRA+MHE+rK/wF73TtdTdQKsomI+CYsdfG1j4orL5eWlMVxmwOcvqq0hFZfu4XoJaREd25N0Vas0K7XxeGWdgaRlJcHaa07IRJuDaTLEzS+3fGASIJrAOydOxHWMPu4GsUv806QinKnYmbg8hitdScE0hqA5js4m2NncyySOifRh0RrJZ4w9s/eqNU5DRwgoj7+6tpEsj57PqhXkgJ1IJvvluzoG1BLAwQKAAAAAACTZE1bAAAAAAAAAAAAAAAACQAcAGRvY1Byb3BzL1VUCQADhhztaIcc7Wh1eAsAAQT1AQAABBQAAABQSwMEFAAAAAgAAAAhACEYr1llAQAAxQIAABAAHABkb2NQcm9wcy9hcHAueG1sVVQJAAMw0M4SMNDOEnV4CwABBPUBAAAEFAAAAJ1STU/DMAy9I/Efqt63dBwmNHlBaAhx4GPSCpyjxG0j0iRKson9e5wVSoEbOdnP9st7TuDqvTfFAUPUzq7LxbwqC7TSKW3bdflc384uyyImYZUwzuK6PGIsr/j5GWyD8xiSxlgQhY3rskvJrxiLssNexDmVLVUaF3qRKA0tc02jJd44ue/RJnZRVUuG7wmtQjXzI2E5MK4O6b+kysmsL77UR098HGrsvREJ+WOeNHPlUg9sR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_TAB_LEADER, DEFAULT_TOC_CONFIG, SWITCH_PATTERN$1, BULLET_FORMATS$1, LOCK_MODE_TO_SDT_LOCK, SNIPPET_PADDING = 30, DUAL_KIND_TYPES, KNOWN_BLOCK_PM_NODE_TYPES, KNOWN_INLINE_PM_NODE_TYPES, MAX_PATTERN_LENGTH = 1024, TOGGLE_MARK_SPECS, CORE_MARK_NAMES, METADATA_MARK_NAMES, CSS_NAMED_COLORS, V3_PREFIX = "text:", V4_PREFIX = "text:v4:", HEADING_STYLE_DEPTH, BULLET_FORMATS, MARK_PRIORITY, remarkProcessor, DEFAULT_UNFLATTEN_LISTS = true, HEADING_STYLE_PATTERN, registry, VALID_CREATE_POSITIONS, REF_HANDLERS, STEP_INTERACTION_MATRIX, MATRIX_EXEMPT_OPS, PARAGRAPH_NODE_TYPES, TEXT_STYLE_CHARACTER_STYLE_ATTR = "styleId", DIRECT_FORMATTING_MARK_NAMES, ALIGNMENT_TO_JUSTIFICATION, DEFAULT_INLINE_POLICY, CORE_SET_MARK_KEYS, DEBUG_TEXT_REWRITE, BOOLEAN_INLINE_MARK_KEYS, TEXT_STYLE_KEYS, PRESERVE_RUN_PROPERTIES_META_KEY = "sdPreserveRunPropertiesKeys", CONTENT_CAPABILITIES, INLINE_CAPABILITIES, SDT_LOCK_TO_LOCK_MODE, BODY_LOCATOR2, STUB_WHERE, EMPTY_RESOLUTION, CONTAINER_NODE_TYPES, VALID_EDGE_NODE_TYPES3, FALLBACK_STORE_KEY = "__documentApiComments", TRACKED_CHANGE_ANCHOR_KEY_PREFIX = "tc::", COMMENT_ANCHOR_KEY_PREFIX = "comment::", indexByHost, TrackedChangeIndexImpl = class {
|
|
278220
278431
|
#hostEditor;
|
|
278221
278432
|
#snapshots = /* @__PURE__ */ new Map;
|
|
278222
278433
|
#aggregated = null;
|
|
@@ -278474,7 +278685,7 @@ var Node$13 = class Node$14 {
|
|
|
278474
278685
|
listener(snapshot2);
|
|
278475
278686
|
} catch {}
|
|
278476
278687
|
}
|
|
278477
|
-
}, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, DEFAULT_LEVEL = 1, SWITCH_PATTERN, TOC_BOOKMARK_PREFIX = "_Toc", DEFAULT_RIGHT_TAB_POS = 9350, TAB_LEADER_MAP, NO_ENTRIES_PLACEHOLDER, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SETTINGS_PART, SPECIAL_NOTE_TYPES, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.28.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, cloneExtensionInstance = (extension3) => {
|
|
278688
|
+
}, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, DEFAULT_LEVEL = 1, SWITCH_PATTERN, TOC_BOOKMARK_PREFIX = "_Toc", DEFAULT_RIGHT_TAB_POS = 9350, TAB_LEADER_MAP, NO_ENTRIES_PLACEHOLDER, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SETTINGS_PART, SPECIAL_NOTE_TYPES, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.28.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, cloneExtensionInstance = (extension3) => {
|
|
278478
278689
|
const extensionLike = extension3;
|
|
278479
278690
|
const config2 = extensionLike?.config;
|
|
278480
278691
|
const ExtensionCtor = extensionLike?.constructor;
|
|
@@ -279731,89 +279942,6 @@ var Node$13 = class Node$14 {
|
|
|
279731
279942
|
if (borders.between)
|
|
279732
279943
|
parts.push(`bw:[${hashParagraphBorder$2(borders.between)}]`);
|
|
279733
279944
|
return parts.join(";");
|
|
279734
|
-
}, isNoneBorder$2 = (value) => {
|
|
279735
|
-
return typeof value === "object" && value !== null && "none" in value && value.none === true;
|
|
279736
|
-
}, isBorderSpec$2 = (value) => {
|
|
279737
|
-
return typeof value === "object" && value !== null && !("none" in value);
|
|
279738
|
-
}, hashBorderSpec$2 = (border) => {
|
|
279739
|
-
const parts = [];
|
|
279740
|
-
if (border.style !== undefined)
|
|
279741
|
-
parts.push(`s:${border.style}`);
|
|
279742
|
-
if (border.width !== undefined)
|
|
279743
|
-
parts.push(`w:${border.width}`);
|
|
279744
|
-
if (border.color !== undefined)
|
|
279745
|
-
parts.push(`c:${border.color}`);
|
|
279746
|
-
if (border.space !== undefined)
|
|
279747
|
-
parts.push(`sp:${border.space}`);
|
|
279748
|
-
return parts.join(",");
|
|
279749
|
-
}, hashTableBorderValue$2 = (borderValue) => {
|
|
279750
|
-
if (borderValue === undefined)
|
|
279751
|
-
return "";
|
|
279752
|
-
if (borderValue === null)
|
|
279753
|
-
return "null";
|
|
279754
|
-
if (isNoneBorder$2(borderValue))
|
|
279755
|
-
return "none";
|
|
279756
|
-
if (isBorderSpec$2(borderValue))
|
|
279757
|
-
return hashBorderSpec$2(borderValue);
|
|
279758
|
-
return "";
|
|
279759
|
-
}, hashTableBorders$2 = (borders) => {
|
|
279760
|
-
if (!borders)
|
|
279761
|
-
return "";
|
|
279762
|
-
const parts = [];
|
|
279763
|
-
if (borders.top !== undefined)
|
|
279764
|
-
parts.push(`t:[${hashTableBorderValue$2(borders.top)}]`);
|
|
279765
|
-
if (borders.right !== undefined)
|
|
279766
|
-
parts.push(`r:[${hashTableBorderValue$2(borders.right)}]`);
|
|
279767
|
-
if (borders.bottom !== undefined)
|
|
279768
|
-
parts.push(`b:[${hashTableBorderValue$2(borders.bottom)}]`);
|
|
279769
|
-
if (borders.left !== undefined)
|
|
279770
|
-
parts.push(`l:[${hashTableBorderValue$2(borders.left)}]`);
|
|
279771
|
-
if (borders.insideH !== undefined)
|
|
279772
|
-
parts.push(`ih:[${hashTableBorderValue$2(borders.insideH)}]`);
|
|
279773
|
-
if (borders.insideV !== undefined)
|
|
279774
|
-
parts.push(`iv:[${hashTableBorderValue$2(borders.insideV)}]`);
|
|
279775
|
-
return parts.join(";");
|
|
279776
|
-
}, hashCellBorders$2 = (borders) => {
|
|
279777
|
-
if (!borders)
|
|
279778
|
-
return "";
|
|
279779
|
-
const parts = [];
|
|
279780
|
-
if (borders.top)
|
|
279781
|
-
parts.push(`t:[${hashBorderSpec$2(borders.top)}]`);
|
|
279782
|
-
if (borders.right)
|
|
279783
|
-
parts.push(`r:[${hashBorderSpec$2(borders.right)}]`);
|
|
279784
|
-
if (borders.bottom)
|
|
279785
|
-
parts.push(`b:[${hashBorderSpec$2(borders.bottom)}]`);
|
|
279786
|
-
if (borders.left)
|
|
279787
|
-
parts.push(`l:[${hashBorderSpec$2(borders.left)}]`);
|
|
279788
|
-
return parts.join(";");
|
|
279789
|
-
}, hasStringProp$1 = (run2, prop) => {
|
|
279790
|
-
return prop in run2 && typeof run2[prop] === "string";
|
|
279791
|
-
}, hasNumberProp$1 = (run2, prop) => {
|
|
279792
|
-
return prop in run2 && typeof run2[prop] === "number";
|
|
279793
|
-
}, hasBooleanProp$1 = (run2, prop) => {
|
|
279794
|
-
return prop in run2 && typeof run2[prop] === "boolean";
|
|
279795
|
-
}, getRunStringProp$1 = (run2, prop) => {
|
|
279796
|
-
if (hasStringProp$1(run2, prop))
|
|
279797
|
-
return run2[prop];
|
|
279798
|
-
return "";
|
|
279799
|
-
}, getRunNumberProp$1 = (run2, prop) => {
|
|
279800
|
-
if (hasNumberProp$1(run2, prop))
|
|
279801
|
-
return run2[prop];
|
|
279802
|
-
return 0;
|
|
279803
|
-
}, getRunBooleanProp$1 = (run2, prop) => {
|
|
279804
|
-
if (hasBooleanProp$1(run2, prop))
|
|
279805
|
-
return run2[prop];
|
|
279806
|
-
return false;
|
|
279807
|
-
}, getRunUnderlineStyle$1 = (run2) => {
|
|
279808
|
-
if ("underline" in run2 && typeof run2.underline === "boolean")
|
|
279809
|
-
return run2.underline ? "single" : "";
|
|
279810
|
-
if ("underline" in run2 && run2.underline && typeof run2.underline === "object")
|
|
279811
|
-
return run2.underline.style ?? "";
|
|
279812
|
-
return "";
|
|
279813
|
-
}, getRunUnderlineColor$1 = (run2) => {
|
|
279814
|
-
if ("underline" in run2 && run2.underline && typeof run2.underline === "object")
|
|
279815
|
-
return run2.underline.color ?? "";
|
|
279816
|
-
return "";
|
|
279817
279945
|
}, isDevelopment = () => {
|
|
279818
279946
|
if (typeof process$1 !== "undefined" && typeof process$1.env !== "undefined")
|
|
279819
279947
|
return process$1.env.NODE_ENV === "development";
|
|
@@ -280498,43 +280626,11 @@ menclose::after {
|
|
|
280498
280626
|
styleEl.textContent = MATH_MENCLOSE_STYLES;
|
|
280499
280627
|
doc$12.head?.appendChild(styleEl);
|
|
280500
280628
|
mathMencloseStylesInjected = true;
|
|
280501
|
-
}, gradientIdCounter = 0,
|
|
280502
|
-
const lookup3 = blockLookup.get(fragment2.blockId);
|
|
280503
|
-
if (!lookup3)
|
|
280504
|
-
return;
|
|
280505
|
-
if (fragment2.kind === "para" && lookup3.block.kind === "paragraph")
|
|
280506
|
-
return lookup3.block.attrs?.borders;
|
|
280507
|
-
if (fragment2.kind === "list-item" && lookup3.block.kind === "list")
|
|
280508
|
-
return lookup3.block.items.find((entry) => entry.id === fragment2.itemId)?.paragraph.attrs?.borders;
|
|
280509
|
-
}, getFragmentHeight$1 = (fragment2, blockLookup) => {
|
|
280510
|
-
if (fragment2.kind === "table" || fragment2.kind === "image" || fragment2.kind === "drawing")
|
|
280511
|
-
return fragment2.height;
|
|
280512
|
-
const lookup3 = blockLookup.get(fragment2.blockId);
|
|
280513
|
-
if (!lookup3)
|
|
280514
|
-
return 0;
|
|
280515
|
-
if (fragment2.kind === "para" && lookup3.measure.kind === "paragraph") {
|
|
280516
|
-
const lines = fragment2.lines ?? lookup3.measure.lines.slice(fragment2.fromLine, fragment2.toLine);
|
|
280517
|
-
let totalHeight = 0;
|
|
280518
|
-
for (const line of lines)
|
|
280519
|
-
totalHeight += line.lineHeight ?? 0;
|
|
280520
|
-
return totalHeight;
|
|
280521
|
-
}
|
|
280522
|
-
if (fragment2.kind === "list-item" && lookup3.measure.kind === "list") {
|
|
280523
|
-
const item = lookup3.measure.items.find((it) => it.itemId === fragment2.itemId);
|
|
280524
|
-
if (!item)
|
|
280525
|
-
return 0;
|
|
280526
|
-
const lines = item.paragraph.lines.slice(fragment2.fromLine, fragment2.toLine);
|
|
280527
|
-
let totalHeight = 0;
|
|
280528
|
-
for (const line of lines)
|
|
280529
|
-
totalHeight += line.lineHeight ?? 0;
|
|
280530
|
-
return totalHeight;
|
|
280531
|
-
}
|
|
280532
|
-
return 0;
|
|
280533
|
-
}, isBetweenBorderNone = (borders) => {
|
|
280629
|
+
}, gradientIdCounter = 0, isBetweenBorderNone = (borders) => {
|
|
280534
280630
|
if (!borders?.between)
|
|
280535
280631
|
return true;
|
|
280536
280632
|
return borders.between.style === "none";
|
|
280537
|
-
}, computeBetweenBorderFlags = (fragments,
|
|
280633
|
+
}, computeBetweenBorderFlags = (fragments, resolvedItems) => {
|
|
280538
280634
|
const pairFlags = /* @__PURE__ */ new Set;
|
|
280539
280635
|
const noBetweenPairs = /* @__PURE__ */ new Set;
|
|
280540
280636
|
for (let i4 = 0;i4 < fragments.length - 1; i4 += 1) {
|
|
@@ -280543,10 +280639,10 @@ menclose::after {
|
|
|
280543
280639
|
continue;
|
|
280544
280640
|
if (frag.continuesOnNext)
|
|
280545
280641
|
continue;
|
|
280546
|
-
const resolvedCur = resolvedItems
|
|
280547
|
-
|
|
280548
|
-
if (!borders)
|
|
280642
|
+
const resolvedCur = resolvedItems[i4];
|
|
280643
|
+
if (!isResolvedFragmentWithBorders(resolvedCur))
|
|
280549
280644
|
continue;
|
|
280645
|
+
const borders = resolvedCur.paragraphBorders;
|
|
280550
280646
|
const next2 = fragments[i4 + 1];
|
|
280551
280647
|
if (next2.kind !== "para" && next2.kind !== "list-item")
|
|
280552
280648
|
continue;
|
|
@@ -280556,11 +280652,11 @@ menclose::after {
|
|
|
280556
280652
|
continue;
|
|
280557
280653
|
if (next2.blockId === frag.blockId && next2.kind === "list-item" && frag.kind === "list-item" && next2.itemId === frag.itemId)
|
|
280558
280654
|
continue;
|
|
280559
|
-
const resolvedNext = resolvedItems
|
|
280560
|
-
|
|
280561
|
-
if (!nextBorders)
|
|
280655
|
+
const resolvedNext = resolvedItems[i4 + 1];
|
|
280656
|
+
if (!isResolvedFragmentWithBorders(resolvedNext))
|
|
280562
280657
|
continue;
|
|
280563
|
-
|
|
280658
|
+
const nextBorders = resolvedNext.paragraphBorders;
|
|
280659
|
+
if (("paragraphBorderHash" in resolvedCur && resolvedCur.paragraphBorderHash ? resolvedCur.paragraphBorderHash : hashParagraphBorders$2(borders)) !== ("paragraphBorderHash" in resolvedNext && resolvedNext.paragraphBorderHash ? resolvedNext.paragraphBorderHash : hashParagraphBorders$2(nextBorders)))
|
|
280564
280660
|
continue;
|
|
280565
280661
|
if (frag.x !== next2.x)
|
|
280566
280662
|
continue;
|
|
@@ -280572,8 +280668,8 @@ menclose::after {
|
|
|
280572
280668
|
for (const i4 of pairFlags) {
|
|
280573
280669
|
const frag = fragments[i4];
|
|
280574
280670
|
const next2 = fragments[i4 + 1];
|
|
280575
|
-
const resolvedCur = resolvedItems
|
|
280576
|
-
const fragHeight = resolvedCur && "height" in resolvedCur && resolvedCur.height != null ? resolvedCur.height :
|
|
280671
|
+
const resolvedCur = resolvedItems[i4];
|
|
280672
|
+
const fragHeight = resolvedCur && "height" in resolvedCur && resolvedCur.height != null ? resolvedCur.height : 0;
|
|
280577
280673
|
const gapBelow = Math.max(0, next2.y - (frag.y + fragHeight));
|
|
280578
280674
|
const isNoBetween = noBetweenPairs.has(i4);
|
|
280579
280675
|
if (!result.has(i4))
|
|
@@ -282491,31 +282587,14 @@ menclose::after {
|
|
|
282491
282587
|
if (value != null)
|
|
282492
282588
|
element3.dataset[key2] = value;
|
|
282493
282589
|
});
|
|
282494
|
-
}, DomPainter,
|
|
282495
|
-
const lookup3 = blockLookup.get(fragment2.blockId);
|
|
282496
|
-
if (!lookup3)
|
|
282497
|
-
return null;
|
|
282498
|
-
const block = lookup3.block;
|
|
282499
|
-
if (fragment2.kind === "para" && block.kind === "paragraph") {
|
|
282500
|
-
const attrs = block.attrs;
|
|
282501
|
-
return getSdtContainerKey(attrs?.sdt, attrs?.containerSdt);
|
|
282502
|
-
}
|
|
282503
|
-
if (fragment2.kind === "list-item" && block.kind === "list") {
|
|
282504
|
-
const attrs = block.items.find((listItem2) => listItem2.id === fragment2.itemId)?.paragraph.attrs;
|
|
282505
|
-
return getSdtContainerKey(attrs?.sdt, attrs?.containerSdt);
|
|
282506
|
-
}
|
|
282507
|
-
if (fragment2.kind === "table" && block.kind === "table") {
|
|
282508
|
-
const attrs = block.attrs;
|
|
282509
|
-
return getSdtContainerKey(attrs?.sdt, attrs?.containerSdt);
|
|
282510
|
-
}
|
|
282511
|
-
return null;
|
|
282512
|
-
}, computeSdtBoundaries = (fragments, blockLookup, sdtLabelsRendered, resolvedItems) => {
|
|
282590
|
+
}, DomPainter, computeSdtBoundaries = (fragments, resolvedItems, sdtLabelsRendered) => {
|
|
282513
282591
|
const boundaries = /* @__PURE__ */ new Map;
|
|
282514
|
-
const containerKeys =
|
|
282515
|
-
|
|
282592
|
+
const containerKeys = fragments.map((_frag, idx) => {
|
|
282593
|
+
const item = resolvedItems[idx];
|
|
282594
|
+
if (item && "sdtContainerKey" in item)
|
|
282516
282595
|
return item.sdtContainerKey ?? null;
|
|
282517
282596
|
return null;
|
|
282518
|
-
})
|
|
282597
|
+
});
|
|
282519
282598
|
let i4 = 0;
|
|
282520
282599
|
while (i4 < fragments.length) {
|
|
282521
282600
|
const currentKey = containerKeys[i4];
|
|
@@ -282538,7 +282617,7 @@ menclose::after {
|
|
|
282538
282617
|
let paddingBottomOverride;
|
|
282539
282618
|
if (!isEnd) {
|
|
282540
282619
|
const nextFragment = fragments[k$1 + 1];
|
|
282541
|
-
const currentHeight = resolvedItems
|
|
282620
|
+
const currentHeight = resolvedItems[k$1]?.height ?? 0;
|
|
282542
282621
|
const currentBottom = fragment2.y + currentHeight;
|
|
282543
282622
|
const gapToNext = nextFragment.y - currentBottom;
|
|
282544
282623
|
if (gapToNext > 0)
|
|
@@ -282572,406 +282651,7 @@ menclose::after {
|
|
|
282572
282651
|
return `table:${fragment2.blockId}:${fragment2.fromRow}:${fragment2.toRow}${partialKey}`;
|
|
282573
282652
|
}
|
|
282574
282653
|
return fragment2;
|
|
282575
|
-
},
|
|
282576
|
-
const base5 = lookup3.get(fragment2.blockId)?.version ?? "missing";
|
|
282577
|
-
if (fragment2.kind === "para")
|
|
282578
|
-
return [
|
|
282579
|
-
base5,
|
|
282580
|
-
fragment2.fromLine,
|
|
282581
|
-
fragment2.toLine,
|
|
282582
|
-
fragment2.continuesFromPrev ? 1 : 0,
|
|
282583
|
-
fragment2.continuesOnNext ? 1 : 0,
|
|
282584
|
-
fragment2.markerWidth ?? ""
|
|
282585
|
-
].join("|");
|
|
282586
|
-
if (fragment2.kind === "list-item")
|
|
282587
|
-
return [
|
|
282588
|
-
base5,
|
|
282589
|
-
fragment2.itemId,
|
|
282590
|
-
fragment2.fromLine,
|
|
282591
|
-
fragment2.toLine,
|
|
282592
|
-
fragment2.continuesFromPrev ? 1 : 0,
|
|
282593
|
-
fragment2.continuesOnNext ? 1 : 0
|
|
282594
|
-
].join("|");
|
|
282595
|
-
if (fragment2.kind === "image")
|
|
282596
|
-
return [
|
|
282597
|
-
base5,
|
|
282598
|
-
fragment2.width,
|
|
282599
|
-
fragment2.height
|
|
282600
|
-
].join("|");
|
|
282601
|
-
if (fragment2.kind === "drawing")
|
|
282602
|
-
return [
|
|
282603
|
-
base5,
|
|
282604
|
-
fragment2.drawingKind,
|
|
282605
|
-
fragment2.drawingContentId ?? "",
|
|
282606
|
-
fragment2.width,
|
|
282607
|
-
fragment2.height,
|
|
282608
|
-
fragment2.geometry.width,
|
|
282609
|
-
fragment2.geometry.height,
|
|
282610
|
-
fragment2.geometry.rotation ?? 0,
|
|
282611
|
-
fragment2.scale ?? 1,
|
|
282612
|
-
fragment2.zIndex ?? ""
|
|
282613
|
-
].join("|");
|
|
282614
|
-
if (fragment2.kind === "table") {
|
|
282615
|
-
const partialSig = fragment2.partialRow ? `${fragment2.partialRow.fromLineByCell.join(",")}-${fragment2.partialRow.toLineByCell.join(",")}-${fragment2.partialRow.partialHeight}` : "";
|
|
282616
|
-
return [
|
|
282617
|
-
base5,
|
|
282618
|
-
fragment2.fromRow,
|
|
282619
|
-
fragment2.toRow,
|
|
282620
|
-
fragment2.width,
|
|
282621
|
-
fragment2.height,
|
|
282622
|
-
fragment2.continuesFromPrev ? 1 : 0,
|
|
282623
|
-
fragment2.continuesOnNext ? 1 : 0,
|
|
282624
|
-
fragment2.repeatHeaderCount ?? 0,
|
|
282625
|
-
partialSig
|
|
282626
|
-
].join("|");
|
|
282627
|
-
}
|
|
282628
|
-
return base5;
|
|
282629
|
-
}, hasFragmentGeometryChanged = (previous3, next2) => previous3.x !== next2.x || previous3.y !== next2.y || previous3.width !== next2.width || ("height" in previous3) && ("height" in next2) && typeof previous3.height === "number" && typeof next2.height === "number" && previous3.height !== next2.height, isNonBodyStoryBlockId = (blockId) => typeof blockId === "string" && (blockId.startsWith("footnote-") || blockId.startsWith("endnote-") || blockId.startsWith("__sd_semantic_footnote-") || blockId.startsWith("__sd_semantic_endnote-")), getSdtMetadataId$1 = (metadata) => {
|
|
282630
|
-
if (!metadata)
|
|
282631
|
-
return "";
|
|
282632
|
-
if ("id" in metadata && metadata.id != null)
|
|
282633
|
-
return String(metadata.id);
|
|
282634
|
-
return "";
|
|
282635
|
-
}, getSdtMetadataLockMode$1 = (metadata) => {
|
|
282636
|
-
if (!metadata)
|
|
282637
|
-
return "";
|
|
282638
|
-
return metadata.type === "structuredContent" ? metadata.lockMode ?? "" : "";
|
|
282639
|
-
}, getSdtMetadataVersion$1 = (metadata) => {
|
|
282640
|
-
if (!metadata)
|
|
282641
|
-
return "";
|
|
282642
|
-
return [
|
|
282643
|
-
metadata.type,
|
|
282644
|
-
getSdtMetadataLockMode$1(metadata),
|
|
282645
|
-
getSdtMetadataId$1(metadata)
|
|
282646
|
-
].join(":");
|
|
282647
|
-
}, hasListMarkerProperties$1 = (attrs) => {
|
|
282648
|
-
if (!attrs || typeof attrs !== "object")
|
|
282649
|
-
return false;
|
|
282650
|
-
const obj = attrs;
|
|
282651
|
-
if (!obj.numberingProperties || typeof obj.numberingProperties !== "object")
|
|
282652
|
-
return false;
|
|
282653
|
-
const numProps = obj.numberingProperties;
|
|
282654
|
-
if ("numId" in numProps) {
|
|
282655
|
-
const numId = numProps.numId;
|
|
282656
|
-
if (typeof numId !== "number" && typeof numId !== "string")
|
|
282657
|
-
return false;
|
|
282658
|
-
}
|
|
282659
|
-
if ("ilvl" in numProps) {
|
|
282660
|
-
if (typeof numProps.ilvl !== "number")
|
|
282661
|
-
return false;
|
|
282662
|
-
}
|
|
282663
|
-
if ("wordLayout" in obj && obj.wordLayout !== undefined) {
|
|
282664
|
-
if (typeof obj.wordLayout !== "object" || obj.wordLayout === null)
|
|
282665
|
-
return false;
|
|
282666
|
-
const wordLayout = obj.wordLayout;
|
|
282667
|
-
if ("marker" in wordLayout && wordLayout.marker !== undefined) {
|
|
282668
|
-
if (typeof wordLayout.marker !== "object" || wordLayout.marker === null)
|
|
282669
|
-
return false;
|
|
282670
|
-
const marker = wordLayout.marker;
|
|
282671
|
-
if ("markerText" in marker && marker.markerText !== undefined) {
|
|
282672
|
-
if (typeof marker.markerText !== "string")
|
|
282673
|
-
return false;
|
|
282674
|
-
}
|
|
282675
|
-
}
|
|
282676
|
-
}
|
|
282677
|
-
return true;
|
|
282678
|
-
}, deriveBlockVersion$1 = (block) => {
|
|
282679
|
-
if (block.kind === "paragraph") {
|
|
282680
|
-
const markerVersion = hasListMarkerProperties$1(block.attrs) ? `marker:${block.attrs.numberingProperties.numId ?? ""}:${block.attrs.numberingProperties.ilvl ?? 0}:${block.attrs.wordLayout?.marker?.markerText ?? ""}` : "";
|
|
282681
|
-
const runsVersion = block.runs.map((run2) => {
|
|
282682
|
-
if (run2.kind === "image") {
|
|
282683
|
-
const imgRun = run2;
|
|
282684
|
-
return [
|
|
282685
|
-
"img",
|
|
282686
|
-
imgRun.src,
|
|
282687
|
-
imgRun.width,
|
|
282688
|
-
imgRun.height,
|
|
282689
|
-
imgRun.alt ?? "",
|
|
282690
|
-
imgRun.title ?? "",
|
|
282691
|
-
imgRun.clipPath ?? "",
|
|
282692
|
-
imgRun.distTop ?? "",
|
|
282693
|
-
imgRun.distBottom ?? "",
|
|
282694
|
-
imgRun.distLeft ?? "",
|
|
282695
|
-
imgRun.distRight ?? "",
|
|
282696
|
-
readClipPathValue$1(imgRun.clipPath)
|
|
282697
|
-
].join(",");
|
|
282698
|
-
}
|
|
282699
|
-
if (run2.kind === "lineBreak")
|
|
282700
|
-
return "linebreak";
|
|
282701
|
-
if (run2.kind === "tab")
|
|
282702
|
-
return [run2.text ?? "", "tab"].join(",");
|
|
282703
|
-
if (run2.kind === "fieldAnnotation") {
|
|
282704
|
-
const size$1 = run2.size ? `${run2.size.width ?? ""}x${run2.size.height ?? ""}` : "";
|
|
282705
|
-
const highlighted = run2.highlighted !== false ? 1 : 0;
|
|
282706
|
-
return [
|
|
282707
|
-
"field",
|
|
282708
|
-
run2.variant ?? "",
|
|
282709
|
-
run2.displayLabel ?? "",
|
|
282710
|
-
run2.fieldColor ?? "",
|
|
282711
|
-
run2.borderColor ?? "",
|
|
282712
|
-
highlighted,
|
|
282713
|
-
run2.hidden ? 1 : 0,
|
|
282714
|
-
run2.visibility ?? "",
|
|
282715
|
-
run2.imageSrc ?? "",
|
|
282716
|
-
run2.linkUrl ?? "",
|
|
282717
|
-
run2.rawHtml ?? "",
|
|
282718
|
-
size$1,
|
|
282719
|
-
run2.fontFamily ?? "",
|
|
282720
|
-
run2.fontSize ?? "",
|
|
282721
|
-
run2.textColor ?? "",
|
|
282722
|
-
run2.textHighlight ?? "",
|
|
282723
|
-
run2.bold ? 1 : 0,
|
|
282724
|
-
run2.italic ? 1 : 0,
|
|
282725
|
-
run2.underline ? 1 : 0,
|
|
282726
|
-
run2.fieldId ?? "",
|
|
282727
|
-
run2.fieldType ?? ""
|
|
282728
|
-
].join(",");
|
|
282729
|
-
}
|
|
282730
|
-
const textRun = run2;
|
|
282731
|
-
const trackedChangeVersion = textRun.trackedChange ? [
|
|
282732
|
-
textRun.trackedChange.kind ?? "",
|
|
282733
|
-
textRun.trackedChange.id ?? "",
|
|
282734
|
-
textRun.trackedChange.storyKey ?? "",
|
|
282735
|
-
textRun.trackedChange.author ?? "",
|
|
282736
|
-
textRun.trackedChange.authorEmail ?? "",
|
|
282737
|
-
textRun.trackedChange.authorImage ?? "",
|
|
282738
|
-
textRun.trackedChange.date ?? "",
|
|
282739
|
-
textRun.trackedChange.before ? JSON.stringify(textRun.trackedChange.before) : "",
|
|
282740
|
-
textRun.trackedChange.after ? JSON.stringify(textRun.trackedChange.after) : ""
|
|
282741
|
-
].join(":") : "";
|
|
282742
|
-
return [
|
|
282743
|
-
textRun.text ?? "",
|
|
282744
|
-
textRun.fontFamily,
|
|
282745
|
-
textRun.fontSize,
|
|
282746
|
-
textRun.bold ? 1 : 0,
|
|
282747
|
-
textRun.italic ? 1 : 0,
|
|
282748
|
-
textRun.color ?? "",
|
|
282749
|
-
textRun.underline?.style ?? "",
|
|
282750
|
-
textRun.underline?.color ?? "",
|
|
282751
|
-
textRun.strike ? 1 : 0,
|
|
282752
|
-
textRun.highlight ?? "",
|
|
282753
|
-
textRun.letterSpacing != null ? textRun.letterSpacing : "",
|
|
282754
|
-
textRun.vertAlign ?? "",
|
|
282755
|
-
textRun.baselineShift != null ? textRun.baselineShift : "",
|
|
282756
|
-
textRun.token ?? "",
|
|
282757
|
-
trackedChangeVersion,
|
|
282758
|
-
textRun.comments?.length ?? 0
|
|
282759
|
-
].join(",");
|
|
282760
|
-
}).join("|");
|
|
282761
|
-
const attrs = block.attrs;
|
|
282762
|
-
const paragraphAttrsVersion = attrs ? [
|
|
282763
|
-
attrs.alignment ?? "",
|
|
282764
|
-
attrs.spacing?.before ?? "",
|
|
282765
|
-
attrs.spacing?.after ?? "",
|
|
282766
|
-
attrs.spacing?.line ?? "",
|
|
282767
|
-
attrs.spacing?.lineRule ?? "",
|
|
282768
|
-
attrs.indent?.left ?? "",
|
|
282769
|
-
attrs.indent?.right ?? "",
|
|
282770
|
-
attrs.indent?.firstLine ?? "",
|
|
282771
|
-
attrs.indent?.hanging ?? "",
|
|
282772
|
-
attrs.borders ? hashParagraphBorders$2(attrs.borders) : "",
|
|
282773
|
-
attrs.shading?.fill ?? "",
|
|
282774
|
-
attrs.shading?.color ?? "",
|
|
282775
|
-
attrs.direction ?? "",
|
|
282776
|
-
attrs.rtl ? "1" : "",
|
|
282777
|
-
attrs.tabs?.length ? JSON.stringify(attrs.tabs) : ""
|
|
282778
|
-
].join(":") : "";
|
|
282779
|
-
const sdtAttrs = block.attrs?.sdt;
|
|
282780
|
-
return [
|
|
282781
|
-
markerVersion,
|
|
282782
|
-
runsVersion,
|
|
282783
|
-
paragraphAttrsVersion,
|
|
282784
|
-
getSdtMetadataVersion$1(sdtAttrs)
|
|
282785
|
-
].filter(Boolean).join("|");
|
|
282786
|
-
}
|
|
282787
|
-
if (block.kind === "list")
|
|
282788
|
-
return block.items.map((item) => `${item.id}:${item.marker.text}:${deriveBlockVersion$1(item.paragraph)}`).join("|");
|
|
282789
|
-
if (block.kind === "image") {
|
|
282790
|
-
const imgSdt = block.attrs?.sdt;
|
|
282791
|
-
const imgSdtVersion = getSdtMetadataVersion$1(imgSdt);
|
|
282792
|
-
return [
|
|
282793
|
-
block.src ?? "",
|
|
282794
|
-
block.width ?? "",
|
|
282795
|
-
block.height ?? "",
|
|
282796
|
-
block.alt ?? "",
|
|
282797
|
-
block.title ?? "",
|
|
282798
|
-
resolveBlockClipPath$1(block),
|
|
282799
|
-
imgSdtVersion
|
|
282800
|
-
].join("|");
|
|
282801
|
-
}
|
|
282802
|
-
if (block.kind === "drawing") {
|
|
282803
|
-
if (block.drawingKind === "image") {
|
|
282804
|
-
const imageLike = block;
|
|
282805
|
-
return [
|
|
282806
|
-
"drawing:image",
|
|
282807
|
-
imageLike.src ?? "",
|
|
282808
|
-
imageLike.width ?? "",
|
|
282809
|
-
imageLike.height ?? "",
|
|
282810
|
-
imageLike.alt ?? "",
|
|
282811
|
-
resolveBlockClipPath$1(imageLike)
|
|
282812
|
-
].join("|");
|
|
282813
|
-
}
|
|
282814
|
-
if (block.drawingKind === "vectorShape") {
|
|
282815
|
-
const vector = block;
|
|
282816
|
-
return [
|
|
282817
|
-
"drawing:vector",
|
|
282818
|
-
vector.shapeKind ?? "",
|
|
282819
|
-
vector.fillColor ?? "",
|
|
282820
|
-
vector.strokeColor ?? "",
|
|
282821
|
-
vector.strokeWidth ?? "",
|
|
282822
|
-
vector.geometry.width,
|
|
282823
|
-
vector.geometry.height,
|
|
282824
|
-
vector.geometry.rotation ?? 0,
|
|
282825
|
-
vector.geometry.flipH ? 1 : 0,
|
|
282826
|
-
vector.geometry.flipV ? 1 : 0
|
|
282827
|
-
].join("|");
|
|
282828
|
-
}
|
|
282829
|
-
if (block.drawingKind === "shapeGroup") {
|
|
282830
|
-
const group = block;
|
|
282831
|
-
const childSignature = group.shapes.map((child) => `${child.shapeType}:${JSON.stringify(child.attrs ?? {})}`).join(";");
|
|
282832
|
-
return [
|
|
282833
|
-
"drawing:group",
|
|
282834
|
-
group.geometry.width,
|
|
282835
|
-
group.geometry.height,
|
|
282836
|
-
group.groupTransform ? JSON.stringify(group.groupTransform) : "",
|
|
282837
|
-
childSignature
|
|
282838
|
-
].join("|");
|
|
282839
|
-
}
|
|
282840
|
-
if (block.drawingKind === "chart")
|
|
282841
|
-
return [
|
|
282842
|
-
"drawing:chart",
|
|
282843
|
-
block.chartData?.chartType ?? "",
|
|
282844
|
-
block.chartData?.series?.length ?? 0,
|
|
282845
|
-
block.geometry.width,
|
|
282846
|
-
block.geometry.height,
|
|
282847
|
-
block.chartRelId ?? ""
|
|
282848
|
-
].join("|");
|
|
282849
|
-
return `drawing:unknown:${block.id}`;
|
|
282850
|
-
}
|
|
282851
|
-
if (block.kind === "table") {
|
|
282852
|
-
const tableBlock = block;
|
|
282853
|
-
const hashString$1 = (seed, value) => {
|
|
282854
|
-
let hash$4 = seed >>> 0;
|
|
282855
|
-
for (let i4 = 0;i4 < value.length; i4++) {
|
|
282856
|
-
hash$4 ^= value.charCodeAt(i4);
|
|
282857
|
-
hash$4 = Math.imul(hash$4, 16777619);
|
|
282858
|
-
}
|
|
282859
|
-
return hash$4 >>> 0;
|
|
282860
|
-
};
|
|
282861
|
-
const hashNumber$1 = (seed, value) => {
|
|
282862
|
-
let hash$4 = seed ^ (Number.isFinite(value) ? value : 0);
|
|
282863
|
-
hash$4 = Math.imul(hash$4, 16777619);
|
|
282864
|
-
hash$4 ^= hash$4 >>> 13;
|
|
282865
|
-
return hash$4 >>> 0;
|
|
282866
|
-
};
|
|
282867
|
-
let hash$3 = 2166136261;
|
|
282868
|
-
hash$3 = hashString$1(hash$3, block.id);
|
|
282869
|
-
hash$3 = hashNumber$1(hash$3, tableBlock.rows.length);
|
|
282870
|
-
hash$3 = (tableBlock.columnWidths ?? []).reduce((acc, width) => hashNumber$1(acc, Math.round(width * 1000)), hash$3);
|
|
282871
|
-
const rows = tableBlock.rows ?? [];
|
|
282872
|
-
for (const row2 of rows) {
|
|
282873
|
-
if (!row2 || !Array.isArray(row2.cells))
|
|
282874
|
-
continue;
|
|
282875
|
-
hash$3 = hashNumber$1(hash$3, row2.cells.length);
|
|
282876
|
-
for (const cell2 of row2.cells) {
|
|
282877
|
-
if (!cell2)
|
|
282878
|
-
continue;
|
|
282879
|
-
const cellBlocks = cell2.blocks ?? (cell2.paragraph ? [cell2.paragraph] : []);
|
|
282880
|
-
hash$3 = hashNumber$1(hash$3, cellBlocks.length);
|
|
282881
|
-
hash$3 = hashNumber$1(hash$3, cell2.rowSpan ?? 1);
|
|
282882
|
-
hash$3 = hashNumber$1(hash$3, cell2.colSpan ?? 1);
|
|
282883
|
-
if (cell2.attrs) {
|
|
282884
|
-
const cellAttrs = cell2.attrs;
|
|
282885
|
-
if (cellAttrs.borders)
|
|
282886
|
-
hash$3 = hashString$1(hash$3, hashCellBorders$2(cellAttrs.borders));
|
|
282887
|
-
if (cellAttrs.padding) {
|
|
282888
|
-
const p$12 = cellAttrs.padding;
|
|
282889
|
-
hash$3 = hashNumber$1(hash$3, p$12.top ?? 0);
|
|
282890
|
-
hash$3 = hashNumber$1(hash$3, p$12.right ?? 0);
|
|
282891
|
-
hash$3 = hashNumber$1(hash$3, p$12.bottom ?? 0);
|
|
282892
|
-
hash$3 = hashNumber$1(hash$3, p$12.left ?? 0);
|
|
282893
|
-
}
|
|
282894
|
-
if (cellAttrs.verticalAlign)
|
|
282895
|
-
hash$3 = hashString$1(hash$3, cellAttrs.verticalAlign);
|
|
282896
|
-
if (cellAttrs.background)
|
|
282897
|
-
hash$3 = hashString$1(hash$3, cellAttrs.background);
|
|
282898
|
-
}
|
|
282899
|
-
for (const cellBlock of cellBlocks) {
|
|
282900
|
-
hash$3 = hashString$1(hash$3, cellBlock?.kind ?? "unknown");
|
|
282901
|
-
if (cellBlock?.kind === "paragraph") {
|
|
282902
|
-
const paragraphBlock = cellBlock;
|
|
282903
|
-
const runs2 = paragraphBlock.runs ?? [];
|
|
282904
|
-
hash$3 = hashNumber$1(hash$3, runs2.length);
|
|
282905
|
-
const attrs = paragraphBlock.attrs;
|
|
282906
|
-
if (attrs) {
|
|
282907
|
-
hash$3 = hashString$1(hash$3, attrs.alignment ?? "");
|
|
282908
|
-
hash$3 = hashNumber$1(hash$3, attrs.spacing?.before ?? 0);
|
|
282909
|
-
hash$3 = hashNumber$1(hash$3, attrs.spacing?.after ?? 0);
|
|
282910
|
-
hash$3 = hashNumber$1(hash$3, attrs.spacing?.line ?? 0);
|
|
282911
|
-
hash$3 = hashString$1(hash$3, attrs.spacing?.lineRule ?? "");
|
|
282912
|
-
hash$3 = hashNumber$1(hash$3, attrs.indent?.left ?? 0);
|
|
282913
|
-
hash$3 = hashNumber$1(hash$3, attrs.indent?.right ?? 0);
|
|
282914
|
-
hash$3 = hashNumber$1(hash$3, attrs.indent?.firstLine ?? 0);
|
|
282915
|
-
hash$3 = hashNumber$1(hash$3, attrs.indent?.hanging ?? 0);
|
|
282916
|
-
hash$3 = hashString$1(hash$3, attrs.shading?.fill ?? "");
|
|
282917
|
-
hash$3 = hashString$1(hash$3, attrs.shading?.color ?? "");
|
|
282918
|
-
hash$3 = hashString$1(hash$3, attrs.direction ?? "");
|
|
282919
|
-
hash$3 = hashString$1(hash$3, attrs.rtl ? "1" : "");
|
|
282920
|
-
if (attrs.borders)
|
|
282921
|
-
hash$3 = hashString$1(hash$3, hashParagraphBorders$2(attrs.borders));
|
|
282922
|
-
}
|
|
282923
|
-
for (const run2 of runs2) {
|
|
282924
|
-
if ("text" in run2 && typeof run2.text === "string")
|
|
282925
|
-
hash$3 = hashString$1(hash$3, run2.text);
|
|
282926
|
-
hash$3 = hashNumber$1(hash$3, run2.pmStart ?? -1);
|
|
282927
|
-
hash$3 = hashNumber$1(hash$3, run2.pmEnd ?? -1);
|
|
282928
|
-
hash$3 = hashString$1(hash$3, getRunStringProp$1(run2, "color"));
|
|
282929
|
-
hash$3 = hashString$1(hash$3, getRunStringProp$1(run2, "highlight"));
|
|
282930
|
-
hash$3 = hashString$1(hash$3, getRunBooleanProp$1(run2, "bold") ? "1" : "");
|
|
282931
|
-
hash$3 = hashString$1(hash$3, getRunBooleanProp$1(run2, "italic") ? "1" : "");
|
|
282932
|
-
hash$3 = hashNumber$1(hash$3, getRunNumberProp$1(run2, "fontSize"));
|
|
282933
|
-
hash$3 = hashString$1(hash$3, getRunStringProp$1(run2, "fontFamily"));
|
|
282934
|
-
hash$3 = hashString$1(hash$3, getRunUnderlineStyle$1(run2));
|
|
282935
|
-
hash$3 = hashString$1(hash$3, getRunUnderlineColor$1(run2));
|
|
282936
|
-
hash$3 = hashString$1(hash$3, getRunBooleanProp$1(run2, "strike") ? "1" : "");
|
|
282937
|
-
hash$3 = hashString$1(hash$3, getRunStringProp$1(run2, "vertAlign"));
|
|
282938
|
-
hash$3 = hashNumber$1(hash$3, getRunNumberProp$1(run2, "baselineShift"));
|
|
282939
|
-
}
|
|
282940
|
-
} else if (cellBlock?.kind)
|
|
282941
|
-
hash$3 = hashString$1(hash$3, deriveBlockVersion$1(cellBlock));
|
|
282942
|
-
}
|
|
282943
|
-
}
|
|
282944
|
-
}
|
|
282945
|
-
if (tableBlock.attrs) {
|
|
282946
|
-
const tblAttrs = tableBlock.attrs;
|
|
282947
|
-
if (tblAttrs.borders)
|
|
282948
|
-
hash$3 = hashString$1(hash$3, hashTableBorders$2(tblAttrs.borders));
|
|
282949
|
-
if (tblAttrs.borderCollapse)
|
|
282950
|
-
hash$3 = hashString$1(hash$3, tblAttrs.borderCollapse);
|
|
282951
|
-
if (tblAttrs.cellSpacing !== undefined) {
|
|
282952
|
-
const cs = tblAttrs.cellSpacing;
|
|
282953
|
-
if (typeof cs === "number")
|
|
282954
|
-
hash$3 = hashNumber$1(hash$3, cs);
|
|
282955
|
-
else {
|
|
282956
|
-
const v = cs.value ?? 0;
|
|
282957
|
-
const t = cs.type ?? "px";
|
|
282958
|
-
hash$3 = hashString$1(hash$3, `cs:${v}:${t}`);
|
|
282959
|
-
}
|
|
282960
|
-
}
|
|
282961
|
-
if (tblAttrs.sdt) {
|
|
282962
|
-
hash$3 = hashString$1(hash$3, tblAttrs.sdt.type);
|
|
282963
|
-
hash$3 = hashString$1(hash$3, getSdtMetadataLockMode$1(tblAttrs.sdt));
|
|
282964
|
-
hash$3 = hashString$1(hash$3, getSdtMetadataId$1(tblAttrs.sdt));
|
|
282965
|
-
}
|
|
282966
|
-
}
|
|
282967
|
-
return [
|
|
282968
|
-
block.id,
|
|
282969
|
-
tableBlock.rows.length,
|
|
282970
|
-
hash$3.toString(16)
|
|
282971
|
-
].join("|");
|
|
282972
|
-
}
|
|
282973
|
-
return block.id;
|
|
282974
|
-
}, DEFAULT_SUPERSCRIPT_RAISE_RATIO = 0.33, DEFAULT_SUBSCRIPT_LOWER_RATIO = 0.14, hasVerticalPositioning = (run2) => normalizeBaselineShift(run2.baselineShift) != null || run2.vertAlign === "superscript" || run2.vertAlign === "subscript", applyRunVerticalPositioning = (element3, run2) => {
|
|
282654
|
+
}, hasFragmentGeometryChanged = (previous3, next2) => previous3.x !== next2.x || previous3.y !== next2.y || previous3.width !== next2.width || ("height" in previous3) && ("height" in next2) && typeof previous3.height === "number" && typeof next2.height === "number" && previous3.height !== next2.height, isNonBodyStoryBlockId = (blockId) => typeof blockId === "string" && (blockId.startsWith("footnote-") || blockId.startsWith("endnote-") || blockId.startsWith("__sd_semantic_footnote-") || blockId.startsWith("__sd_semantic_endnote-")), DEFAULT_SUPERSCRIPT_RAISE_RATIO = 0.33, DEFAULT_SUBSCRIPT_LOWER_RATIO = 0.14, hasVerticalPositioning = (run2) => normalizeBaselineShift(run2.baselineShift) != null || run2.vertAlign === "superscript" || run2.vertAlign === "subscript", applyRunVerticalPositioning = (element3, run2) => {
|
|
282975
282655
|
if (hasVerticalPositioning(run2))
|
|
282976
282656
|
element3.style.lineHeight = "1";
|
|
282977
282657
|
const explicitBaselineShift = normalizeBaselineShift(run2.baselineShift);
|
|
@@ -283698,19 +283378,13 @@ menclose::after {
|
|
|
283698
283378
|
};
|
|
283699
283379
|
return {
|
|
283700
283380
|
paint(input2, mount, mapping) {
|
|
283701
|
-
const normalizedInput =
|
|
283381
|
+
const normalizedInput = isDomPainterInput(input2) ? input2 : buildLegacyPaintInput(input2, legacyState, options.flowMode, options.pageGap);
|
|
283702
283382
|
painter.paint(normalizedInput, mount, mapping);
|
|
283703
283383
|
},
|
|
283704
|
-
setData(blocks2, measures
|
|
283384
|
+
setData(blocks2, measures) {
|
|
283705
283385
|
assertRequiredBlockMeasurePair("body", blocks2, measures);
|
|
283706
|
-
const normalizedHeader = normalizeOptionalBlockMeasurePair("header", headerBlocks, headerMeasures);
|
|
283707
|
-
const normalizedFooter = normalizeOptionalBlockMeasurePair("footer", footerBlocks, footerMeasures);
|
|
283708
283386
|
legacyState.blocks = blocks2;
|
|
283709
283387
|
legacyState.measures = measures;
|
|
283710
|
-
legacyState.headerBlocks = normalizedHeader?.blocks;
|
|
283711
|
-
legacyState.headerMeasures = normalizedHeader?.measures;
|
|
283712
|
-
legacyState.footerBlocks = normalizedFooter?.blocks;
|
|
283713
|
-
legacyState.footerMeasures = normalizedFooter?.measures;
|
|
283714
283388
|
},
|
|
283715
283389
|
setResolvedLayout(resolvedLayout) {
|
|
283716
283390
|
legacyState.resolvedLayout = resolvedLayout;
|
|
@@ -290339,7 +290013,7 @@ menclose::after {
|
|
|
290339
290013
|
}
|
|
290340
290014
|
const region = this.#callbacks.hitTestHeaderFooterRegion?.(normalized.x, normalized.y, normalized.pageIndex, normalized.pageLocalY);
|
|
290341
290015
|
if (region) {
|
|
290342
|
-
if (sessionMode === "body") {
|
|
290016
|
+
if (sessionMode === "body" || this.#isDifferentHeaderFooterRegionFromActiveSession(region)) {
|
|
290343
290017
|
event.preventDefault();
|
|
290344
290018
|
event.stopPropagation();
|
|
290345
290019
|
this.#callbacks.activateHeaderFooterRegion?.(region, {
|
|
@@ -290627,17 +290301,49 @@ menclose::after {
|
|
|
290627
290301
|
this.#callbacks.exitHeaderFooterMode?.();
|
|
290628
290302
|
return false;
|
|
290629
290303
|
}
|
|
290630
|
-
|
|
290304
|
+
const headerFooterRegion = this.#callbacks.hitTestHeaderFooterRegion?.(x, y$1, pageIndex, pageLocalY);
|
|
290305
|
+
if (!headerFooterRegion) {
|
|
290631
290306
|
this.#callbacks.exitHeaderFooterMode?.();
|
|
290632
290307
|
return false;
|
|
290633
290308
|
}
|
|
290634
290309
|
if (visiblePointerSurface?.kind === "headerFooter" && !clickedInsideVisibleActiveSurface) {
|
|
290310
|
+
if (this.#isDifferentHeaderFooterRegionFromActiveSession(headerFooterRegion)) {
|
|
290311
|
+
event.preventDefault();
|
|
290312
|
+
return true;
|
|
290313
|
+
}
|
|
290635
290314
|
this.#callbacks.exitHeaderFooterMode?.();
|
|
290636
290315
|
return false;
|
|
290637
290316
|
}
|
|
290638
290317
|
this.#syncNonBodyCommentSelection(event, event.target, this.#deps.getEditor(), { clearOnMiss: true });
|
|
290639
290318
|
return false;
|
|
290640
290319
|
}
|
|
290320
|
+
#isDifferentHeaderFooterRegionFromActiveSession(region) {
|
|
290321
|
+
const session = this.#deps?.getHeaderFooterSession()?.session;
|
|
290322
|
+
if (!session || session.mode === "body")
|
|
290323
|
+
return true;
|
|
290324
|
+
if (session.mode !== region.kind)
|
|
290325
|
+
return true;
|
|
290326
|
+
if (session.headerFooterRefId && region.headerFooterRefId && session.headerFooterRefId !== region.headerFooterRefId)
|
|
290327
|
+
return true;
|
|
290328
|
+
if (Number.isFinite(session.pageIndex) && Number.isFinite(region.pageIndex) && session.pageIndex !== region.pageIndex)
|
|
290329
|
+
return true;
|
|
290330
|
+
return (session.sectionType ?? null) !== (region.sectionType ?? null);
|
|
290331
|
+
}
|
|
290332
|
+
#isSameHeaderFooterRegion(left$1, right$1) {
|
|
290333
|
+
if (!left$1 || !right$1)
|
|
290334
|
+
return false;
|
|
290335
|
+
if (left$1.kind !== right$1.kind || left$1.pageIndex !== right$1.pageIndex)
|
|
290336
|
+
return false;
|
|
290337
|
+
if ((left$1.sectionId ?? null) !== (right$1.sectionId ?? null))
|
|
290338
|
+
return false;
|
|
290339
|
+
if ((left$1.sectionType ?? null) !== (right$1.sectionType ?? null))
|
|
290340
|
+
return false;
|
|
290341
|
+
const leftRefId = left$1.headerFooterRefId ?? null;
|
|
290342
|
+
const rightRefId = right$1.headerFooterRefId ?? null;
|
|
290343
|
+
if (leftRefId && rightRefId && leftRefId !== rightRefId)
|
|
290344
|
+
return false;
|
|
290345
|
+
return true;
|
|
290346
|
+
}
|
|
290641
290347
|
#handleInlineImageClick(event, targetImg, rawHit, doc$12, epochMapper) {
|
|
290642
290348
|
if (!targetImg)
|
|
290643
290349
|
return false;
|
|
@@ -290829,21 +290535,22 @@ menclose::after {
|
|
|
290829
290535
|
#handleHover(normalized) {
|
|
290830
290536
|
if (!this.#deps)
|
|
290831
290537
|
return;
|
|
290832
|
-
if ((this.#deps.getHeaderFooterSession()?.session?.mode ?? "body") !== "body") {
|
|
290833
|
-
this.#callbacks.clearHoverRegion?.();
|
|
290834
|
-
return;
|
|
290835
|
-
}
|
|
290836
290538
|
if (this.#deps.getDocumentMode() === "viewing") {
|
|
290837
290539
|
this.#callbacks.clearHoverRegion?.();
|
|
290838
290540
|
return;
|
|
290839
290541
|
}
|
|
290542
|
+
const sessionMode = this.#deps.getHeaderFooterSession()?.session?.mode ?? "body";
|
|
290840
290543
|
const region = this.#callbacks.hitTestHeaderFooterRegion?.(normalized.x, normalized.y, normalized.pageIndex, normalized.pageLocalY);
|
|
290841
290544
|
if (!region) {
|
|
290842
290545
|
this.#callbacks.clearHoverRegion?.();
|
|
290843
290546
|
return;
|
|
290844
290547
|
}
|
|
290548
|
+
if (sessionMode !== "body" && !this.#isDifferentHeaderFooterRegionFromActiveSession(region)) {
|
|
290549
|
+
this.#callbacks.clearHoverRegion?.();
|
|
290550
|
+
return;
|
|
290551
|
+
}
|
|
290845
290552
|
const currentHover = this.#deps.getHeaderFooterSession()?.hoverRegion;
|
|
290846
|
-
if (currentHover
|
|
290553
|
+
if (this.#isSameHeaderFooterRegion(currentHover, region))
|
|
290847
290554
|
return;
|
|
290848
290555
|
this.#deps.getHeaderFooterSession()?.renderHover(region);
|
|
290849
290556
|
this.#callbacks.renderHoverRegion?.(region);
|
|
@@ -292283,6 +291990,10 @@ menclose::after {
|
|
|
292283
291990
|
#footerLayoutResults = null;
|
|
292284
291991
|
#headerLayoutsByRId = /* @__PURE__ */ new Map;
|
|
292285
291992
|
#footerLayoutsByRId = /* @__PURE__ */ new Map;
|
|
291993
|
+
#resolvedHeaderLayouts = null;
|
|
291994
|
+
#resolvedFooterLayouts = null;
|
|
291995
|
+
#resolvedHeaderByRId = /* @__PURE__ */ new Map;
|
|
291996
|
+
#resolvedFooterByRId = /* @__PURE__ */ new Map;
|
|
292286
291997
|
#headerDecorationProvider;
|
|
292287
291998
|
#footerDecorationProvider;
|
|
292288
291999
|
#headerRegions = /* @__PURE__ */ new Map;
|
|
@@ -292293,6 +292004,7 @@ menclose::after {
|
|
|
292293
292004
|
#hoverOverlay = null;
|
|
292294
292005
|
#hoverTooltip = null;
|
|
292295
292006
|
#modeBanner = null;
|
|
292007
|
+
#activeBorderLine = null;
|
|
292296
292008
|
#hoverRegion = null;
|
|
292297
292009
|
#documentMode = "editing";
|
|
292298
292010
|
#trackedChangesRenderConfig = {
|
|
@@ -292352,12 +292064,14 @@ menclose::after {
|
|
|
292352
292064
|
}
|
|
292353
292065
|
set headerLayoutResults(results) {
|
|
292354
292066
|
this.#headerLayoutResults = results;
|
|
292067
|
+
this.#resolvedHeaderLayouts = results ? results.map(resolveResult) : null;
|
|
292355
292068
|
}
|
|
292356
292069
|
get footerLayoutResults() {
|
|
292357
292070
|
return this.#footerLayoutResults;
|
|
292358
292071
|
}
|
|
292359
292072
|
set footerLayoutResults(results) {
|
|
292360
292073
|
this.#footerLayoutResults = results;
|
|
292074
|
+
this.#resolvedFooterLayouts = results ? results.map(resolveResult) : null;
|
|
292361
292075
|
}
|
|
292362
292076
|
get headerLayoutsByRId() {
|
|
292363
292077
|
return this.#headerLayoutsByRId;
|
|
@@ -292412,6 +292126,8 @@ menclose::after {
|
|
|
292412
292126
|
setLayoutResults(headerResults, footerResults) {
|
|
292413
292127
|
this.#headerLayoutResults = headerResults;
|
|
292414
292128
|
this.#footerLayoutResults = footerResults;
|
|
292129
|
+
this.#resolvedHeaderLayouts = headerResults ? headerResults.map(resolveResult) : null;
|
|
292130
|
+
this.#resolvedFooterLayouts = footerResults ? footerResults.map(resolveResult) : null;
|
|
292415
292131
|
}
|
|
292416
292132
|
initialize() {
|
|
292417
292133
|
if (!this.#options.editor)
|
|
@@ -292512,6 +292228,7 @@ menclose::after {
|
|
|
292512
292228
|
if (!region.sectionId)
|
|
292513
292229
|
console.error("[HeaderFooterSessionManager] Footer region missing sectionId", region);
|
|
292514
292230
|
}
|
|
292231
|
+
this.#syncActiveBorder();
|
|
292515
292232
|
}
|
|
292516
292233
|
#buildSectionIdMap() {
|
|
292517
292234
|
const map$12 = /* @__PURE__ */ new Map;
|
|
@@ -292739,22 +292456,11 @@ menclose::after {
|
|
|
292739
292456
|
});
|
|
292740
292457
|
return null;
|
|
292741
292458
|
}
|
|
292459
|
+
const shouldRestoreInitialSelection = options?.initialSelection !== "defer";
|
|
292742
292460
|
try {
|
|
292743
292461
|
this.#applyChildEditorDocumentMode(editor, this.#documentMode);
|
|
292744
|
-
if (
|
|
292745
|
-
|
|
292746
|
-
const doc$12 = editor.state?.doc;
|
|
292747
|
-
if (doc$12) {
|
|
292748
|
-
const endPos = doc$12.content.size - 1;
|
|
292749
|
-
const pos = Math.max(1, endPos);
|
|
292750
|
-
editor.commands?.setTextSelection?.({
|
|
292751
|
-
from: pos,
|
|
292752
|
-
to: pos
|
|
292753
|
-
});
|
|
292754
|
-
}
|
|
292755
|
-
} catch (cursorError) {
|
|
292756
|
-
console.warn("[HeaderFooterSessionManager] Could not set cursor to end:", cursorError);
|
|
292757
|
-
}
|
|
292462
|
+
if (shouldRestoreInitialSelection)
|
|
292463
|
+
this.#applyDefaultSelectionAtStoryEnd(editor, "Could not set cursor to end");
|
|
292758
292464
|
} catch (editableError) {
|
|
292759
292465
|
console.error("[HeaderFooterSessionManager] Error setting editor editable:", editableError);
|
|
292760
292466
|
this.clearHover();
|
|
@@ -292780,6 +292486,15 @@ menclose::after {
|
|
|
292780
292486
|
} catch (focusError) {
|
|
292781
292487
|
console.warn("[HeaderFooterSessionManager] Could not focus editor:", focusError);
|
|
292782
292488
|
}
|
|
292489
|
+
if (shouldRestoreInitialSelection) {
|
|
292490
|
+
this.#applyDefaultSelectionAtStoryEnd(editor, "Could not restore cursor after focus");
|
|
292491
|
+
try {
|
|
292492
|
+
editor.view?.focus();
|
|
292493
|
+
} catch (focusError) {
|
|
292494
|
+
console.warn("[HeaderFooterSessionManager] Could not refocus editor after restoring selection:", focusError);
|
|
292495
|
+
}
|
|
292496
|
+
this.#scheduleSelectionRestoreAfterFocus(editor);
|
|
292497
|
+
}
|
|
292783
292498
|
this.#emitModeChanged();
|
|
292784
292499
|
this.#emitEditingContext(editor);
|
|
292785
292500
|
this.#deps?.notifyInputBridgeTargetChanged();
|
|
@@ -292825,6 +292540,45 @@ menclose::after {
|
|
|
292825
292540
|
pm.classList.toggle("view-mode", mode === "viewing");
|
|
292826
292541
|
}
|
|
292827
292542
|
}
|
|
292543
|
+
#getDefaultSelectionAtStoryEnd(editor) {
|
|
292544
|
+
const doc$12 = editor.state?.doc;
|
|
292545
|
+
if (!doc$12)
|
|
292546
|
+
return null;
|
|
292547
|
+
const endPos = doc$12.content.size - 1;
|
|
292548
|
+
const pos = Math.max(1, endPos);
|
|
292549
|
+
return {
|
|
292550
|
+
from: pos,
|
|
292551
|
+
to: pos
|
|
292552
|
+
};
|
|
292553
|
+
}
|
|
292554
|
+
#applyEditorTextSelection(editor, selection, warningMessage) {
|
|
292555
|
+
try {
|
|
292556
|
+
editor.commands?.setTextSelection?.(selection);
|
|
292557
|
+
} catch (error3) {
|
|
292558
|
+
console.warn(`[HeaderFooterSessionManager] ${warningMessage}:`, error3);
|
|
292559
|
+
}
|
|
292560
|
+
}
|
|
292561
|
+
#applyDefaultSelectionAtStoryEnd(editor, warningMessage) {
|
|
292562
|
+
const selection = this.#getDefaultSelectionAtStoryEnd(editor);
|
|
292563
|
+
if (!selection)
|
|
292564
|
+
return;
|
|
292565
|
+
this.#applyEditorTextSelection(editor, selection, warningMessage);
|
|
292566
|
+
}
|
|
292567
|
+
#scheduleSelectionRestoreAfterFocus(editor) {
|
|
292568
|
+
const win = editor.view?.dom?.ownerDocument?.defaultView;
|
|
292569
|
+
if (!win)
|
|
292570
|
+
return;
|
|
292571
|
+
win.requestAnimationFrame(() => {
|
|
292572
|
+
if (this.#activeEditor !== editor || this.#session.mode === "body")
|
|
292573
|
+
return;
|
|
292574
|
+
this.#applyDefaultSelectionAtStoryEnd(editor, "Could not restore cursor on the next frame");
|
|
292575
|
+
try {
|
|
292576
|
+
editor.view?.focus();
|
|
292577
|
+
} catch (focusError) {
|
|
292578
|
+
console.warn("[HeaderFooterSessionManager] Could not refocus editor on the next frame:", focusError);
|
|
292579
|
+
}
|
|
292580
|
+
});
|
|
292581
|
+
}
|
|
292828
292582
|
#validateEditPermission() {
|
|
292829
292583
|
if (this.#deps?.isViewLocked())
|
|
292830
292584
|
return {
|
|
@@ -292857,6 +292611,7 @@ menclose::after {
|
|
|
292857
292611
|
this.#callbacks.onModeChanged?.(this.#session);
|
|
292858
292612
|
this.#callbacks.onUpdateAwarenessSession?.(this.#session);
|
|
292859
292613
|
this.#updateModeBanner();
|
|
292614
|
+
this.#syncActiveBorder();
|
|
292860
292615
|
}
|
|
292861
292616
|
#emitEditingContext(editor) {
|
|
292862
292617
|
this.#callbacks.onEditingContext?.({
|
|
@@ -292960,6 +292715,42 @@ menclose::after {
|
|
|
292960
292715
|
get hoverRegion() {
|
|
292961
292716
|
return this.#hoverRegion;
|
|
292962
292717
|
}
|
|
292718
|
+
#getActiveRegion() {
|
|
292719
|
+
if (this.#session.mode === "header")
|
|
292720
|
+
return this.#headerRegions.get(this.#session.pageIndex ?? -1) ?? null;
|
|
292721
|
+
if (this.#session.mode === "footer")
|
|
292722
|
+
return this.#footerRegions.get(this.#session.pageIndex ?? -1) ?? null;
|
|
292723
|
+
return null;
|
|
292724
|
+
}
|
|
292725
|
+
#hideActiveBorder() {
|
|
292726
|
+
if (this.#activeBorderLine) {
|
|
292727
|
+
this.#activeBorderLine.remove();
|
|
292728
|
+
this.#activeBorderLine = null;
|
|
292729
|
+
}
|
|
292730
|
+
}
|
|
292731
|
+
#syncActiveBorder() {
|
|
292732
|
+
this.#hideActiveBorder();
|
|
292733
|
+
const region = this.#getActiveRegion();
|
|
292734
|
+
if (!region || this.#session.mode === "body")
|
|
292735
|
+
return;
|
|
292736
|
+
const pageElement = this.#deps?.getPageElement(region.pageIndex);
|
|
292737
|
+
if (!pageElement)
|
|
292738
|
+
return;
|
|
292739
|
+
const borderLine = pageElement.ownerDocument.createElement("div");
|
|
292740
|
+
borderLine.className = "superdoc-header-footer-border";
|
|
292741
|
+
Object.assign(borderLine.style, {
|
|
292742
|
+
position: "absolute",
|
|
292743
|
+
left: "0",
|
|
292744
|
+
right: "0",
|
|
292745
|
+
top: `${region.kind === "header" ? region.localY + region.height : region.localY}px`,
|
|
292746
|
+
height: "1px",
|
|
292747
|
+
backgroundColor: "#4472c4",
|
|
292748
|
+
pointerEvents: "none",
|
|
292749
|
+
zIndex: "8"
|
|
292750
|
+
});
|
|
292751
|
+
pageElement.appendChild(borderLine);
|
|
292752
|
+
this.#activeBorderLine = borderLine;
|
|
292753
|
+
}
|
|
292963
292754
|
buildLayoutInput() {
|
|
292964
292755
|
if (!this.#headerFooterAdapter)
|
|
292965
292756
|
return null;
|
|
@@ -293024,10 +292815,16 @@ menclose::after {
|
|
|
293024
292815
|
};
|
|
293025
292816
|
}
|
|
293026
292817
|
async layoutPerRId(headerFooterInput, layout, sectionMetadata) {
|
|
293027
|
-
|
|
292818
|
+
await layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata, {
|
|
293028
292819
|
headerLayoutsByRId: this.#headerLayoutsByRId,
|
|
293029
292820
|
footerLayoutsByRId: this.#footerLayoutsByRId
|
|
293030
292821
|
});
|
|
292822
|
+
this.#resolvedHeaderByRId.clear();
|
|
292823
|
+
for (const [key2, result] of this.#headerLayoutsByRId)
|
|
292824
|
+
this.#resolvedHeaderByRId.set(key2, resolveResult(result));
|
|
292825
|
+
this.#resolvedFooterByRId.clear();
|
|
292826
|
+
for (const [key2, result] of this.#footerLayoutsByRId)
|
|
292827
|
+
this.#resolvedFooterByRId.set(key2, resolveResult(result));
|
|
293031
292828
|
}
|
|
293032
292829
|
#computeMetrics(kind, layoutHeight, box, pageHeight, footerMargin) {
|
|
293033
292830
|
const validatedLayoutHeight = Number.isFinite(layoutHeight) && layoutHeight >= 0 ? layoutHeight : 0;
|
|
@@ -293428,6 +293225,8 @@ menclose::after {
|
|
|
293428
293225
|
createDecorationProvider(kind, layout) {
|
|
293429
293226
|
const results = kind === "header" ? this.#headerLayoutResults : this.#footerLayoutResults;
|
|
293430
293227
|
const layoutsByRId = kind === "header" ? this.#headerLayoutsByRId : this.#footerLayoutsByRId;
|
|
293228
|
+
const resolvedResults = kind === "header" ? this.#resolvedHeaderLayouts : this.#resolvedFooterLayouts;
|
|
293229
|
+
const resolvedByRId = kind === "header" ? this.#resolvedHeaderByRId : this.#resolvedFooterByRId;
|
|
293431
293230
|
if ((!results || results.length === 0) && (!layoutsByRId || layoutsByRId.size === 0))
|
|
293432
293231
|
return;
|
|
293433
293232
|
const multiSectionId = this.#multiSectionIdentifier;
|
|
@@ -293475,6 +293274,10 @@ menclose::after {
|
|
|
293475
293274
|
const slotPage$1 = this.#findPageForNumber(rIdLayout.layout.pages, pageNumber);
|
|
293476
293275
|
if (slotPage$1) {
|
|
293477
293276
|
const fragments$1 = slotPage$1.fragments ?? [];
|
|
293277
|
+
const resolvedItems = resolvedByRId.get(rIdLayoutKey)?.pages.find((p$12) => p$12.number === slotPage$1.number)?.items;
|
|
293278
|
+
if (resolvedItems && resolvedItems.length !== fragments$1.length)
|
|
293279
|
+
console.warn(`[HeaderFooterSessionManager] Resolved items length (${resolvedItems.length}) does not match fragments length (${fragments$1.length}) for rId '${rIdLayoutKey}' page ${pageNumber}. Dropping items.`);
|
|
293280
|
+
const alignedItems = resolvedItems && resolvedItems.length === fragments$1.length ? resolvedItems : undefined;
|
|
293478
293281
|
const pageHeight$1 = page?.size?.h ?? layout.pageSize?.h ?? layoutOptions.pageSize?.h ?? defaultPageSize.h;
|
|
293479
293282
|
const margins$1 = pageMargins ?? layout.pages[0]?.margins ?? layoutOptions.margins ?? defaultMargins;
|
|
293480
293283
|
const decorationMargins$1 = kind === "footer" ? this.#stripFootnoteReserveFromBottomMargin(margins$1, page ?? null) : margins$1;
|
|
@@ -293484,10 +293287,8 @@ menclose::after {
|
|
|
293484
293287
|
const metrics$1 = this.#computeMetrics(kind, rawLayoutHeight$1, box$1, pageHeight$1, margins$1?.footer ?? 0);
|
|
293485
293288
|
const layoutMinY$1 = rIdLayout.layout.minY ?? 0;
|
|
293486
293289
|
return {
|
|
293487
|
-
fragments:
|
|
293488
|
-
|
|
293489
|
-
y: f2.y - layoutMinY$1
|
|
293490
|
-
})) : fragments$1,
|
|
293290
|
+
fragments: normalizeDecorationFragments(fragments$1, layoutMinY$1),
|
|
293291
|
+
items: normalizeDecorationItems(alignedItems, layoutMinY$1),
|
|
293491
293292
|
height: metrics$1.containerHeight,
|
|
293492
293293
|
contentHeight: metrics$1.layoutHeight > 0 ? metrics$1.layoutHeight : metrics$1.containerHeight,
|
|
293493
293294
|
offset: metrics$1.offset,
|
|
@@ -293514,13 +293315,18 @@ menclose::after {
|
|
|
293514
293315
|
}
|
|
293515
293316
|
if (!results || results.length === 0)
|
|
293516
293317
|
return null;
|
|
293517
|
-
const
|
|
293318
|
+
const variantIndex = results.findIndex((entry) => entry.type === headerFooterType);
|
|
293319
|
+
const variant = variantIndex >= 0 ? results[variantIndex] : undefined;
|
|
293518
293320
|
if (!variant || !variant.layout?.pages?.length)
|
|
293519
293321
|
return null;
|
|
293520
293322
|
const slotPage = this.#findPageForNumber(variant.layout.pages, pageNumber);
|
|
293521
293323
|
if (!slotPage)
|
|
293522
293324
|
return null;
|
|
293523
293325
|
const fragments = slotPage.fragments ?? [];
|
|
293326
|
+
const resolvedVariantItems = resolvedResults?.[variantIndex]?.pages.find((p$12) => p$12.number === slotPage.number)?.items;
|
|
293327
|
+
if (resolvedVariantItems && resolvedVariantItems.length !== fragments.length)
|
|
293328
|
+
console.warn(`[HeaderFooterSessionManager] Resolved items length (${resolvedVariantItems.length}) does not match fragments length (${fragments.length}) for variant '${headerFooterType}' page ${pageNumber}. Dropping items.`);
|
|
293329
|
+
const alignedVariantItems = resolvedVariantItems && resolvedVariantItems.length === fragments.length ? resolvedVariantItems : undefined;
|
|
293524
293330
|
const pageHeight = page?.size?.h ?? layout.pageSize?.h ?? layoutOptions.pageSize?.h ?? defaultPageSize.h;
|
|
293525
293331
|
const margins = pageMargins ?? layout.pages[0]?.margins ?? layoutOptions.margins ?? defaultMargins;
|
|
293526
293332
|
const decorationMargins = kind === "footer" ? this.#stripFootnoteReserveFromBottomMargin(margins, page ?? null) : margins;
|
|
@@ -293531,10 +293337,8 @@ menclose::after {
|
|
|
293531
293337
|
const finalHeaderId = sectionRId ?? fallbackId ?? undefined;
|
|
293532
293338
|
const layoutMinY = variant.layout.minY ?? 0;
|
|
293533
293339
|
return {
|
|
293534
|
-
fragments: layoutMinY
|
|
293535
|
-
|
|
293536
|
-
y: f2.y - layoutMinY
|
|
293537
|
-
})) : fragments,
|
|
293340
|
+
fragments: normalizeDecorationFragments(fragments, layoutMinY),
|
|
293341
|
+
items: normalizeDecorationItems(alignedVariantItems, layoutMinY),
|
|
293538
293342
|
height: metrics.containerHeight,
|
|
293539
293343
|
contentHeight: metrics.layoutHeight > 0 ? metrics.layoutHeight : metrics.containerHeight,
|
|
293540
293344
|
offset: metrics.offset,
|
|
@@ -293590,12 +293394,17 @@ menclose::after {
|
|
|
293590
293394
|
this.#footerLayoutResults = null;
|
|
293591
293395
|
this.#headerLayoutsByRId.clear();
|
|
293592
293396
|
this.#footerLayoutsByRId.clear();
|
|
293397
|
+
this.#resolvedHeaderLayouts = null;
|
|
293398
|
+
this.#resolvedFooterLayouts = null;
|
|
293399
|
+
this.#resolvedHeaderByRId.clear();
|
|
293400
|
+
this.#resolvedFooterByRId.clear();
|
|
293593
293401
|
this.#headerDecorationProvider = undefined;
|
|
293594
293402
|
this.#footerDecorationProvider = undefined;
|
|
293595
293403
|
this.#headerRegions.clear();
|
|
293596
293404
|
this.#footerRegions.clear();
|
|
293597
293405
|
this.#session = { mode: "body" };
|
|
293598
293406
|
this.#activeEditor = null;
|
|
293407
|
+
this.#hideActiveBorder();
|
|
293599
293408
|
this.#hoverOverlay = null;
|
|
293600
293409
|
this.#hoverTooltip = null;
|
|
293601
293410
|
this.#modeBanner = null;
|
|
@@ -293797,12 +293606,12 @@ menclose::after {
|
|
|
293797
293606
|
return;
|
|
293798
293607
|
console.log(...args$1);
|
|
293799
293608
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
|
|
293800
|
-
var
|
|
293609
|
+
var init_src_BFNW1Ck5_es = __esm(() => {
|
|
293801
293610
|
init_rolldown_runtime_Bg48TavK_es();
|
|
293802
|
-
|
|
293611
|
+
init_SuperConverter_D54XfHFt_es();
|
|
293803
293612
|
init_jszip_C49i9kUs_es();
|
|
293804
293613
|
init_uuid_qzgm05fK_es();
|
|
293805
|
-
|
|
293614
|
+
init_create_headless_toolbar_DrE9IMiD_es();
|
|
293806
293615
|
init_constants_CGhJRd87_es();
|
|
293807
293616
|
init_dist_B8HfvhaK_es();
|
|
293808
293617
|
init_unified_Dsuw2be5_es();
|
|
@@ -295358,7 +295167,7 @@ ${err.toString()}`);
|
|
|
295358
295167
|
isRightClick = true;
|
|
295359
295168
|
} else {
|
|
295360
295169
|
const relativePoint = getSurfaceRelativePoint(editor, meta2);
|
|
295361
|
-
const surface = editor
|
|
295170
|
+
const surface = getEditorSurfaceElement(editor);
|
|
295362
295171
|
if (relativePoint && surface)
|
|
295363
295172
|
try {
|
|
295364
295173
|
const rect = surface.getBoundingClientRect();
|
|
@@ -295378,7 +295187,7 @@ ${err.toString()}`);
|
|
|
295378
295187
|
return ensureStateShape(value);
|
|
295379
295188
|
}
|
|
295380
295189
|
}
|
|
295381
|
-
const containingBlock = findContainingBlockAncestor(editor
|
|
295190
|
+
const containingBlock = findContainingBlockAncestor(getEditorSurfaceElement(editor));
|
|
295382
295191
|
if (containingBlock)
|
|
295383
295192
|
try {
|
|
295384
295193
|
const cbRect = containingBlock.getBoundingClientRect();
|
|
@@ -316441,11 +316250,15 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
316441
316250
|
"sdt",
|
|
316442
316251
|
"image"
|
|
316443
316252
|
]);
|
|
316444
|
-
SUPPORTED_DELETE_NODE_TYPES3 = new Set(DELETABLE_BLOCK_NODE_TYPES2);
|
|
316445
|
-
REJECTED_DELETE_NODE_TYPES3 = new Set(["tableRow", "tableCell"]);
|
|
316446
|
-
RANGE_DELETE_SAFE_NODE_TYPES = new Set(["passthroughBlock", "passthroughInline"]);
|
|
316447
|
-
HEADING_PATTERN = /^Heading(\d)$/;
|
|
316448
316253
|
indexByHost = /* @__PURE__ */ new WeakMap;
|
|
316254
|
+
EMITTABLE_BLOCK_TYPES = new Set([
|
|
316255
|
+
"paragraph",
|
|
316256
|
+
"heading",
|
|
316257
|
+
"listItem",
|
|
316258
|
+
"image",
|
|
316259
|
+
"tableOfContents"
|
|
316260
|
+
]);
|
|
316261
|
+
SDT_BLOCK_NODE_NAMES = new Set(["structuredContentBlock", "sdt"]);
|
|
316449
316262
|
REQUIRED_COMMANDS = {
|
|
316450
316263
|
"create.paragraph": ["insertParagraphAt"],
|
|
316451
316264
|
"create.heading": ["insertHeadingAt"],
|
|
@@ -316734,6 +316547,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
316734
316547
|
underline: new Set(["color", "w:color"]),
|
|
316735
316548
|
borders: new Set(["color"])
|
|
316736
316549
|
};
|
|
316550
|
+
SUPPORTED_DELETE_NODE_TYPES3 = new Set(DELETABLE_BLOCK_NODE_TYPES2);
|
|
316551
|
+
REJECTED_DELETE_NODE_TYPES3 = new Set(["tableRow", "tableCell"]);
|
|
316552
|
+
RANGE_DELETE_SAFE_NODE_TYPES = new Set(["passthroughBlock", "passthroughInline"]);
|
|
316553
|
+
HEADING_PATTERN = /^Heading(\d)$/;
|
|
316737
316554
|
ORDERED_PRESET_CONFIG = {
|
|
316738
316555
|
decimal: {
|
|
316739
316556
|
numFmt: "decimal",
|
|
@@ -318703,6 +318520,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
318703
318520
|
}
|
|
318704
318521
|
async exportDocx({ isFinalDoc = false, commentsType = "external", exportJsonOnly = false, exportXmlOnly = false, comments, getUpdatedDocs = false, fieldsHighlightColor = null, compression } = {}) {
|
|
318705
318522
|
try {
|
|
318523
|
+
commitLiveStorySessionRuntimes(resolveMainBodyEditor(this));
|
|
318706
318524
|
const preparedComments = (comments ?? this.converter.comments ?? []).map((comment2) => {
|
|
318707
318525
|
const elements = Array.isArray(comment2.elements) && comment2.elements.length ? comment2.elements : undefined;
|
|
318708
318526
|
return {
|
|
@@ -319705,7 +319523,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
319705
319523
|
this.options = options;
|
|
319706
319524
|
this.layoutMode = options.layoutMode ?? "vertical";
|
|
319707
319525
|
this.isSemanticFlow = (options.flowMode ?? "paginated") === "semantic";
|
|
319708
|
-
this.blockLookup = /* @__PURE__ */ new Map;
|
|
319709
319526
|
this.headerProvider = options.headerProvider;
|
|
319710
319527
|
this.footerProvider = options.footerProvider;
|
|
319711
319528
|
const defaultGap = this.layoutMode === "horizontal" ? 20 : 24;
|
|
@@ -319892,45 +319709,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
319892
319709
|
entities: collectPaintSnapshotEntitiesFromDomRoot(rootEl)
|
|
319893
319710
|
};
|
|
319894
319711
|
}
|
|
319895
|
-
normalizeOptionalBlockMeasurePair(label, blocks2, measures) {
|
|
319896
|
-
const hasBlocks = blocks2 !== undefined;
|
|
319897
|
-
const hasMeasures = measures !== undefined;
|
|
319898
|
-
if (hasBlocks !== hasMeasures)
|
|
319899
|
-
throw new Error(`DomPainter.paint requires ${label}Blocks and ${label}Measures to both be provided or both be omitted`);
|
|
319900
|
-
if (!hasBlocks || !hasMeasures)
|
|
319901
|
-
return;
|
|
319902
|
-
return {
|
|
319903
|
-
blocks: blocks2,
|
|
319904
|
-
measures
|
|
319905
|
-
};
|
|
319906
|
-
}
|
|
319907
|
-
updateBlockLookup(input2) {
|
|
319908
|
-
const { blocks: blocks2, measures, headerBlocks, headerMeasures, footerBlocks, footerMeasures } = input2;
|
|
319909
|
-
const resolvedBlockVersions = this.resolvedLayout?.blockVersions;
|
|
319910
|
-
const nextLookup = this.buildBlockLookup(blocks2, measures, resolvedBlockVersions);
|
|
319911
|
-
const normalizedHeader = this.normalizeOptionalBlockMeasurePair("header", headerBlocks, headerMeasures);
|
|
319912
|
-
if (normalizedHeader)
|
|
319913
|
-
this.buildBlockLookup(normalizedHeader.blocks, normalizedHeader.measures, resolvedBlockVersions).forEach((entry, id2) => {
|
|
319914
|
-
nextLookup.set(id2, entry);
|
|
319915
|
-
});
|
|
319916
|
-
const normalizedFooter = this.normalizeOptionalBlockMeasurePair("footer", footerBlocks, footerMeasures);
|
|
319917
|
-
if (normalizedFooter)
|
|
319918
|
-
this.buildBlockLookup(normalizedFooter.blocks, normalizedFooter.measures, resolvedBlockVersions).forEach((entry, id2) => {
|
|
319919
|
-
nextLookup.set(id2, entry);
|
|
319920
|
-
});
|
|
319921
|
-
const changed = /* @__PURE__ */ new Set;
|
|
319922
|
-
nextLookup.forEach((entry, id2) => {
|
|
319923
|
-
const previous3 = this.blockLookup.get(id2);
|
|
319924
|
-
if (!previous3 || previous3.version !== entry.version)
|
|
319925
|
-
changed.add(id2);
|
|
319926
|
-
});
|
|
319927
|
-
this.blockLookup = nextLookup;
|
|
319928
|
-
this.changedBlocks = changed;
|
|
319929
|
-
}
|
|
319930
319712
|
paint(input2, mount, mapping) {
|
|
319931
319713
|
const layout = input2.sourceLayout;
|
|
319932
319714
|
this.resolvedLayout = input2.resolvedLayout;
|
|
319933
|
-
this.
|
|
319715
|
+
this.changedBlocks.clear();
|
|
319934
319716
|
if (!(mount instanceof HTMLElement))
|
|
319935
319717
|
throw new Error("DomPainter.paint requires a valid HTMLElement mount");
|
|
319936
319718
|
const doc$12 = mount.ownerDocument ?? (typeof document !== "undefined" ? document : null);
|
|
@@ -319944,7 +319726,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
319944
319726
|
for (const item of page.items)
|
|
319945
319727
|
if ("blockId" in item)
|
|
319946
319728
|
this.changedBlocks.add(item.blockId);
|
|
319947
|
-
this.blockLookup.forEach((_$1, id2) => this.changedBlocks.add(id2));
|
|
319948
319729
|
this.currentMapping = null;
|
|
319949
319730
|
} else
|
|
319950
319731
|
this.currentMapping = mapping ?? null;
|
|
@@ -320364,8 +320145,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320364
320145
|
pageNumberText: resolvedPage?.numberText ?? page.numberText,
|
|
320365
320146
|
pageIndex
|
|
320366
320147
|
};
|
|
320367
|
-
const
|
|
320368
|
-
const
|
|
320148
|
+
const resolvedItems = resolvedPage?.items ?? [];
|
|
320149
|
+
const sdtBoundaries = computeSdtBoundaries(page.fragments, resolvedItems, this.sdtLabelsRendered);
|
|
320150
|
+
const betweenBorderFlags = computeBetweenBorderFlags(page.fragments, resolvedItems);
|
|
320369
320151
|
page.fragments.forEach((fragment2, index2) => {
|
|
320370
320152
|
const sdtBoundary = sdtBoundaries.get(index2);
|
|
320371
320153
|
const resolvedItem = this.getResolvedFragmentItem(pageIndex, index2);
|
|
@@ -320494,14 +320276,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320494
320276
|
this.renderDecorationSection(pageEl, page, pageIndex, "header", resolvedPage);
|
|
320495
320277
|
this.renderDecorationSection(pageEl, page, pageIndex, "footer", resolvedPage);
|
|
320496
320278
|
}
|
|
320497
|
-
isPageRelativeAnchoredFragment(fragment2) {
|
|
320279
|
+
isPageRelativeAnchoredFragment(fragment2, resolvedItem) {
|
|
320498
320280
|
if (fragment2.kind !== "image" && fragment2.kind !== "drawing")
|
|
320499
320281
|
return false;
|
|
320500
|
-
const
|
|
320501
|
-
if (!
|
|
320502
|
-
return false;
|
|
320503
|
-
const block = lookup3.block;
|
|
320504
|
-
if (block.kind !== "image" && block.kind !== "drawing")
|
|
320282
|
+
const block = resolvedItem && "block" in resolvedItem ? resolvedItem.block : undefined;
|
|
320283
|
+
if (!block || block.kind !== "image" && block.kind !== "drawing")
|
|
320505
320284
|
return false;
|
|
320506
320285
|
return block.anchor?.vRelativeFrom === "page";
|
|
320507
320286
|
}
|
|
@@ -320555,8 +320334,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320555
320334
|
const footerAnchorContainerOffsetY = kind === "footer" ? footerAnchorPageOriginY - effectiveOffset : 0;
|
|
320556
320335
|
let footerYOffset = 0;
|
|
320557
320336
|
if (kind === "footer" && data.fragments.length > 0) {
|
|
320558
|
-
const contentHeight = typeof data.contentHeight === "number" ? data.contentHeight : data.fragments.reduce((max$2, f2) => {
|
|
320559
|
-
const
|
|
320337
|
+
const contentHeight = typeof data.contentHeight === "number" ? data.contentHeight : data.fragments.reduce((max$2, f2, fi) => {
|
|
320338
|
+
const resolvedItem = data.items?.[fi];
|
|
320339
|
+
const fragHeight = "height" in f2 && typeof f2.height === "number" ? f2.height : this.estimateFragmentHeight(f2, resolvedItem);
|
|
320560
320340
|
return Math.max(max$2, f2.y + Math.max(0, fragHeight));
|
|
320561
320341
|
}, 0);
|
|
320562
320342
|
footerYOffset = Math.max(0, effectiveHeight - contentHeight);
|
|
@@ -320568,14 +320348,17 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320568
320348
|
pageNumberText: resolvedPage?.numberText ?? page.numberText,
|
|
320569
320349
|
pageIndex
|
|
320570
320350
|
};
|
|
320571
|
-
const
|
|
320351
|
+
const decorationItems = data.items ?? [];
|
|
320352
|
+
const betweenBorderFlags = computeBetweenBorderFlags(data.fragments, decorationItems);
|
|
320572
320353
|
const behindDocFragments = [];
|
|
320573
320354
|
const normalFragments = [];
|
|
320574
320355
|
for (let fi = 0;fi < data.fragments.length; fi += 1) {
|
|
320575
320356
|
const fragment2 = data.fragments[fi];
|
|
320576
320357
|
let isBehindDoc = false;
|
|
320577
|
-
if (fragment2.kind === "image" || fragment2.kind === "drawing")
|
|
320578
|
-
|
|
320358
|
+
if (fragment2.kind === "image" || fragment2.kind === "drawing") {
|
|
320359
|
+
const resolvedItem = decorationItems[fi];
|
|
320360
|
+
isBehindDoc = fragment2.behindDoc === true || fragment2.behindDoc == null && "zIndex" in fragment2 && fragment2.zIndex === 0 || this.shouldRenderBehindPageContent(fragment2, kind, resolvedItem);
|
|
320361
|
+
}
|
|
320579
320362
|
if (isBehindDoc)
|
|
320580
320363
|
behindDocFragments.push({
|
|
320581
320364
|
fragment: fragment2,
|
|
@@ -320590,8 +320373,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320590
320373
|
const behindDocSelector = `[data-behind-doc-section="${kind}"]`;
|
|
320591
320374
|
pageEl.querySelectorAll(behindDocSelector).forEach((el) => el.remove());
|
|
320592
320375
|
behindDocFragments.forEach(({ fragment: fragment2, originalIndex }) => {
|
|
320593
|
-
const
|
|
320594
|
-
const
|
|
320376
|
+
const resolvedItem = data.items?.[originalIndex];
|
|
320377
|
+
const fragEl = this.renderFragment(fragment2, context, undefined, betweenBorderFlags.get(originalIndex), resolvedItem);
|
|
320378
|
+
const isPageRelative = this.isPageRelativeAnchoredFragment(fragment2, resolvedItem);
|
|
320595
320379
|
let pageY;
|
|
320596
320380
|
if (isPageRelative && kind === "footer")
|
|
320597
320381
|
pageY = footerAnchorPageOriginY + fragment2.y;
|
|
@@ -320606,8 +320390,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320606
320390
|
pageEl.insertBefore(fragEl, pageEl.firstChild);
|
|
320607
320391
|
});
|
|
320608
320392
|
normalFragments.forEach(({ fragment: fragment2, originalIndex }) => {
|
|
320609
|
-
const
|
|
320610
|
-
const
|
|
320393
|
+
const resolvedItem = data.items?.[originalIndex];
|
|
320394
|
+
const fragEl = this.renderFragment(fragment2, context, undefined, betweenBorderFlags.get(originalIndex), resolvedItem);
|
|
320395
|
+
const isPageRelative = this.isPageRelativeAnchoredFragment(fragment2, resolvedItem);
|
|
320611
320396
|
if (isPageRelative && kind === "footer")
|
|
320612
320397
|
fragEl.style.top = `${fragment2.y + footerAnchorContainerOffsetY}px`;
|
|
320613
320398
|
else if (isPageRelative)
|
|
@@ -320707,8 +320492,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320707
320492
|
pageEl.dataset.layoutEpoch = String(this.layoutEpoch);
|
|
320708
320493
|
const existing = new Map(state.fragments.map((frag) => [frag.key, frag]));
|
|
320709
320494
|
const nextFragments = [];
|
|
320710
|
-
const
|
|
320711
|
-
const
|
|
320495
|
+
const resolvedItems = resolvedPage?.items ?? [];
|
|
320496
|
+
const sdtBoundaries = computeSdtBoundaries(page.fragments, resolvedItems, this.sdtLabelsRendered);
|
|
320497
|
+
const betweenBorderFlags = computeBetweenBorderFlags(page.fragments, resolvedItems);
|
|
320712
320498
|
const contextBase = {
|
|
320713
320499
|
pageNumber: page.number,
|
|
320714
320500
|
totalPages: this.totalPages,
|
|
@@ -320722,6 +320508,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320722
320508
|
const sdtBoundary = sdtBoundaries.get(index2);
|
|
320723
320509
|
const betweenInfo = betweenBorderFlags.get(index2);
|
|
320724
320510
|
const resolvedItem = this.getResolvedFragmentItem(pageIndex, index2);
|
|
320511
|
+
const resolvedSig = resolvedItem?.version ?? "";
|
|
320725
320512
|
if (current) {
|
|
320726
320513
|
existing.delete(key2);
|
|
320727
320514
|
const geometryChanged = hasFragmentGeometryChanged(current.fragment, fragment2);
|
|
@@ -320729,12 +320516,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320729
320516
|
const betweenBorderMismatch = current.element.dataset.betweenBorder === "true" !== (betweenInfo?.showBetweenBorder ?? false) || current.element.dataset.suppressTopBorder === "true" !== (betweenInfo?.suppressTopBorder ?? false) || (current.element.dataset.gapBelow ?? "") !== (betweenInfo?.gapBelow ? String(betweenInfo.gapBelow) : "");
|
|
320730
320517
|
const newPmStart = fragment2.pmStart;
|
|
320731
320518
|
const mappingUnreliable = this.currentMapping != null && newPmStart != null && current.element.dataset.pmStart != null && this.currentMapping.map(Number(current.element.dataset.pmStart)) !== newPmStart;
|
|
320732
|
-
|
|
320733
|
-
if (geometryChanged || this.changedBlocks.has(fragment2.blockId) || current.signature !== (resolvedSig ?? fragmentSignature$1(fragment2, this.blockLookup)) || sdtBoundaryMismatch || betweenBorderMismatch || mappingUnreliable) {
|
|
320519
|
+
if (geometryChanged || this.changedBlocks.has(fragment2.blockId) || current.signature !== resolvedSig || sdtBoundaryMismatch || betweenBorderMismatch || mappingUnreliable) {
|
|
320734
320520
|
const replacement = this.renderFragment(fragment2, contextBase, sdtBoundary, betweenInfo, resolvedItem);
|
|
320735
320521
|
pageEl.replaceChild(replacement, current.element);
|
|
320736
320522
|
current.element = replacement;
|
|
320737
|
-
current.signature = resolvedSig
|
|
320523
|
+
current.signature = resolvedSig;
|
|
320738
320524
|
} else if (this.currentMapping)
|
|
320739
320525
|
this.updatePositionAttributes(current.element, this.currentMapping);
|
|
320740
320526
|
this.updateFragmentElement(current.element, fragment2, contextBase.section, resolvedItem);
|
|
@@ -320748,12 +320534,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320748
320534
|
}
|
|
320749
320535
|
const fresh = this.renderFragment(fragment2, contextBase, sdtBoundary, betweenInfo, resolvedItem);
|
|
320750
320536
|
pageEl.insertBefore(fresh, pageEl.children[index2] ?? null);
|
|
320751
|
-
const freshSig = resolvedItem && "version" in resolvedItem ? resolvedItem.version : undefined;
|
|
320752
320537
|
nextFragments.push({
|
|
320753
320538
|
key: key2,
|
|
320754
320539
|
fragment: fragment2,
|
|
320755
320540
|
element: fresh,
|
|
320756
|
-
signature:
|
|
320541
|
+
signature: resolvedSig,
|
|
320757
320542
|
context: contextBase
|
|
320758
320543
|
});
|
|
320759
320544
|
});
|
|
@@ -320815,17 +320600,18 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320815
320600
|
pageNumberText: resolvedPage?.numberText ?? page.numberText,
|
|
320816
320601
|
pageIndex
|
|
320817
320602
|
};
|
|
320818
|
-
const
|
|
320819
|
-
const
|
|
320603
|
+
const resolvedItems = resolvedPage?.items ?? [];
|
|
320604
|
+
const sdtBoundaries = computeSdtBoundaries(page.fragments, resolvedItems, this.sdtLabelsRendered);
|
|
320605
|
+
const betweenBorderFlags = computeBetweenBorderFlags(page.fragments, resolvedItems);
|
|
320820
320606
|
const fragmentStates = page.fragments.map((fragment2, index2) => {
|
|
320821
320607
|
const sdtBoundary = sdtBoundaries.get(index2);
|
|
320822
320608
|
const resolvedItem = this.getResolvedFragmentItem(pageIndex, index2);
|
|
320823
320609
|
const fragmentEl = this.renderFragment(fragment2, contextBase, sdtBoundary, betweenBorderFlags.get(index2), resolvedItem);
|
|
320824
320610
|
el.appendChild(fragmentEl);
|
|
320825
|
-
const initSig = resolvedItem
|
|
320611
|
+
const initSig = resolvedItem?.version ?? "";
|
|
320826
320612
|
return {
|
|
320827
320613
|
key: fragmentKey(fragment2),
|
|
320828
|
-
signature: initSig
|
|
320614
|
+
signature: initSig,
|
|
320829
320615
|
fragment: fragment2,
|
|
320830
320616
|
element: fragmentEl,
|
|
320831
320617
|
context: contextBase
|
|
@@ -320880,7 +320666,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320880
320666
|
try {
|
|
320881
320667
|
if (!this.doc)
|
|
320882
320668
|
throw new Error("DomPainter: document is not available");
|
|
320883
|
-
|
|
320669
|
+
if (resolvedItem?.block?.kind !== "paragraph" || resolvedItem?.measure?.kind !== "paragraph")
|
|
320670
|
+
throw new Error(`DomPainter: missing resolved paragraph block/measure for fragment ${fragment2.blockId}`);
|
|
320671
|
+
const block = resolvedItem.block;
|
|
320672
|
+
const measure = resolvedItem.measure;
|
|
320884
320673
|
const wordLayout = isMinimalWordLayout$1(block.attrs?.wordLayout) ? block.attrs.wordLayout : undefined;
|
|
320885
320674
|
const content3 = resolvedItem?.content;
|
|
320886
320675
|
const paraContinuesFromPrev = resolvedItem?.continuesFromPrev ?? fragment2.continuesFromPrev;
|
|
@@ -321232,7 +321021,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
321232
321021
|
try {
|
|
321233
321022
|
if (!this.doc)
|
|
321234
321023
|
throw new Error("DomPainter: document is not available");
|
|
321235
|
-
|
|
321024
|
+
if (resolvedItem?.block?.kind !== "list" || resolvedItem?.measure?.kind !== "list")
|
|
321025
|
+
throw new Error(`DomPainter: missing resolved list block/measure for fragment ${fragment2.blockId}`);
|
|
321026
|
+
const block = resolvedItem.block;
|
|
321027
|
+
const measure = resolvedItem.measure;
|
|
321236
321028
|
const item = block.items.find((entry) => entry.id === fragment2.itemId);
|
|
321237
321029
|
const itemMeasure = measure.items.find((entry) => entry.itemId === fragment2.itemId);
|
|
321238
321030
|
if (!item || !itemMeasure)
|
|
@@ -321331,7 +321123,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
321331
321123
|
}
|
|
321332
321124
|
renderImageFragment(fragment2, context, resolvedItem) {
|
|
321333
321125
|
try {
|
|
321334
|
-
|
|
321126
|
+
if (resolvedItem?.block?.kind !== "image")
|
|
321127
|
+
throw new Error(`DomPainter: missing resolved image block for fragment ${fragment2.blockId}`);
|
|
321128
|
+
const block = resolvedItem.block;
|
|
321335
321129
|
if (!this.doc)
|
|
321336
321130
|
throw new Error("DomPainter: document is not available");
|
|
321337
321131
|
const fragmentEl = this.doc.createElement("div");
|
|
@@ -321446,7 +321240,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
321446
321240
|
}
|
|
321447
321241
|
renderDrawingFragment(fragment2, context, resolvedItem) {
|
|
321448
321242
|
try {
|
|
321449
|
-
|
|
321243
|
+
if (resolvedItem?.block?.kind !== "drawing")
|
|
321244
|
+
throw new Error(`DomPainter: missing resolved drawing block for fragment ${fragment2.blockId}`);
|
|
321245
|
+
const block = resolvedItem.block;
|
|
321450
321246
|
if (!this.doc)
|
|
321451
321247
|
throw new Error("DomPainter: document is not available");
|
|
321452
321248
|
const fragmentEl = this.doc.createElement("div");
|
|
@@ -322109,23 +321905,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
322109
321905
|
return createChartElement(this.doc, block.chartData, block.geometry);
|
|
322110
321906
|
}
|
|
322111
321907
|
resolveTableRenderData(fragment2, resolvedItem) {
|
|
322112
|
-
if (resolvedItem)
|
|
322113
|
-
|
|
322114
|
-
block: resolvedItem.block,
|
|
322115
|
-
measure: resolvedItem.measure,
|
|
322116
|
-
cellSpacingPx: resolvedItem.cellSpacingPx,
|
|
322117
|
-
effectiveColumnWidths: resolvedItem.effectiveColumnWidths
|
|
322118
|
-
};
|
|
322119
|
-
const lookup3 = this.blockLookup.get(fragment2.blockId);
|
|
322120
|
-
if (!lookup3 || lookup3.block.kind !== "table" || lookup3.measure.kind !== "table")
|
|
322121
|
-
throw new Error(`DomPainter: missing table block for fragment ${fragment2.blockId}`);
|
|
322122
|
-
const block = lookup3.block;
|
|
322123
|
-
const measure = lookup3.measure;
|
|
321908
|
+
if (!resolvedItem)
|
|
321909
|
+
throw new Error(`DomPainter: missing resolved table item for fragment ${fragment2.blockId}`);
|
|
322124
321910
|
return {
|
|
322125
|
-
block,
|
|
322126
|
-
measure,
|
|
322127
|
-
cellSpacingPx:
|
|
322128
|
-
effectiveColumnWidths:
|
|
321911
|
+
block: resolvedItem.block,
|
|
321912
|
+
measure: resolvedItem.measure,
|
|
321913
|
+
cellSpacingPx: resolvedItem.cellSpacingPx,
|
|
321914
|
+
effectiveColumnWidths: resolvedItem.effectiveColumnWidths
|
|
322129
321915
|
};
|
|
322130
321916
|
}
|
|
322131
321917
|
renderTableFragment(fragment2, context, sdtBoundary, resolvedItem) {
|
|
@@ -323323,16 +323109,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
323323
323109
|
isAnchoredMediaFragment(fragment2) {
|
|
323324
323110
|
return (fragment2.kind === "image" || fragment2.kind === "drawing") && fragment2.isAnchored === true;
|
|
323325
323111
|
}
|
|
323326
|
-
shouldRenderBehindPageContent(fragment2, section) {
|
|
323112
|
+
shouldRenderBehindPageContent(fragment2, section, resolvedItem) {
|
|
323327
323113
|
if (fragment2.behindDoc === true || fragment2.behindDoc == null && "zIndex" in fragment2 && fragment2.zIndex === 0)
|
|
323328
323114
|
return true;
|
|
323329
|
-
return section === "header" && fragment2.kind === "drawing" && this.isHeaderWordArtWatermark(
|
|
323115
|
+
return section === "header" && fragment2.kind === "drawing" && this.isHeaderWordArtWatermark(resolvedItem?.block);
|
|
323330
323116
|
}
|
|
323331
|
-
isHeaderWordArtWatermark(
|
|
323332
|
-
|
|
323333
|
-
if (!lookup3 || lookup3.block.kind !== "drawing" || lookup3.block.drawingKind !== "vectorShape")
|
|
323117
|
+
isHeaderWordArtWatermark(block) {
|
|
323118
|
+
if (!block || block.kind !== "drawing" || block.drawingKind !== "vectorShape")
|
|
323334
323119
|
return false;
|
|
323335
|
-
const block = lookup3.block;
|
|
323336
323120
|
const attrs = block.attrs ?? {};
|
|
323337
323121
|
const hasTextContent = Array.isArray(block.textContent?.parts) && block.textContent.parts.length > 0;
|
|
323338
323122
|
return attrs.isWordArt === true && attrs.isTextBox === true && hasTextContent && block.anchor?.isAnchored === true && block.anchor.hRelativeFrom === "page" && block.anchor.alignH === "center" && block.anchor.vRelativeFrom === "page" && block.anchor.alignV === "center" && block.wrap?.type === "None";
|
|
@@ -323363,53 +323147,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
323363
323147
|
el.style.left = `${item.x - mw}px`;
|
|
323364
323148
|
el.style.width = `${item.width + mw}px`;
|
|
323365
323149
|
}
|
|
323366
|
-
estimateFragmentHeight(fragment2) {
|
|
323367
|
-
|
|
323368
|
-
|
|
323369
|
-
|
|
323370
|
-
if (fragment2.kind === "list-item" && measure?.kind === "list")
|
|
323371
|
-
return measure.totalHeight;
|
|
323372
|
-
if (fragment2.kind === "table")
|
|
323373
|
-
return fragment2.height;
|
|
323374
|
-
if (fragment2.kind === "image" || fragment2.kind === "drawing")
|
|
323150
|
+
estimateFragmentHeight(fragment2, resolvedItem) {
|
|
323151
|
+
if (resolvedItem && "height" in resolvedItem && typeof resolvedItem.height === "number")
|
|
323152
|
+
return resolvedItem.height;
|
|
323153
|
+
if (fragment2.kind === "table" || fragment2.kind === "image" || fragment2.kind === "drawing")
|
|
323375
323154
|
return fragment2.height;
|
|
323376
323155
|
return 0;
|
|
323377
323156
|
}
|
|
323378
|
-
resolveBlockAndMeasure(fragment2, resolvedBlock, resolvedMeasure, blockKind, measureKind, errorLabel) {
|
|
323379
|
-
if (resolvedBlock?.kind === blockKind && resolvedMeasure?.kind === measureKind)
|
|
323380
|
-
return {
|
|
323381
|
-
block: resolvedBlock,
|
|
323382
|
-
measure: resolvedMeasure
|
|
323383
|
-
};
|
|
323384
|
-
const lookup3 = this.blockLookup.get(fragment2.blockId);
|
|
323385
|
-
if (!lookup3 || lookup3.block.kind !== blockKind || lookup3.measure.kind !== measureKind)
|
|
323386
|
-
throw new Error(`DomPainter: missing ${errorLabel} for fragment ${fragment2.blockId}`);
|
|
323387
|
-
return {
|
|
323388
|
-
block: lookup3.block,
|
|
323389
|
-
measure: lookup3.measure
|
|
323390
|
-
};
|
|
323391
|
-
}
|
|
323392
|
-
resolveBlock(fragment2, resolvedBlock, blockKind, errorLabel) {
|
|
323393
|
-
if (resolvedBlock?.kind === blockKind)
|
|
323394
|
-
return resolvedBlock;
|
|
323395
|
-
const lookup3 = this.blockLookup.get(fragment2.blockId);
|
|
323396
|
-
if (!lookup3 || lookup3.block.kind !== blockKind)
|
|
323397
|
-
throw new Error(`DomPainter: missing ${errorLabel} for fragment ${fragment2.blockId}`);
|
|
323398
|
-
return lookup3.block;
|
|
323399
|
-
}
|
|
323400
|
-
buildBlockLookup(blocks2, measures, precomputedVersions) {
|
|
323401
|
-
if (blocks2.length !== measures.length)
|
|
323402
|
-
throw new Error("DomPainter requires the same number of blocks and measures");
|
|
323403
|
-
const lookup3 = /* @__PURE__ */ new Map;
|
|
323404
|
-
blocks2.forEach((block, index2) => {
|
|
323405
|
-
lookup3.set(block.id, {
|
|
323406
|
-
block,
|
|
323407
|
-
measure: measures[index2],
|
|
323408
|
-
version: precomputedVersions?.[block.id] ?? deriveBlockVersion$1(block)
|
|
323409
|
-
});
|
|
323410
|
-
});
|
|
323411
|
-
return lookup3;
|
|
323412
|
-
}
|
|
323413
323157
|
static {
|
|
323414
323158
|
this.SDT_DATASET_KEYS = [
|
|
323415
323159
|
"sdtType",
|
|
@@ -324731,6 +324475,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
324731
324475
|
#storySessionSelectionHandler = null;
|
|
324732
324476
|
#storySessionTransactionHandler = null;
|
|
324733
324477
|
#storySessionEditor = null;
|
|
324478
|
+
#activeSurfaceUiEventEditor = null;
|
|
324479
|
+
#activeSurfaceUiUpdateHandler = null;
|
|
324480
|
+
#activeSurfaceUiContextMenuOpenHandler = null;
|
|
324481
|
+
#activeSurfaceUiContextMenuCloseHandler = null;
|
|
324734
324482
|
#lastSelectedFieldAnnotation = null;
|
|
324735
324483
|
#lastSelectedStructuredContentBlock = null;
|
|
324736
324484
|
#lastSelectedStructuredContentInline = null;
|
|
@@ -325124,6 +324872,19 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
325124
324872
|
return null;
|
|
325125
324873
|
return session;
|
|
325126
324874
|
}
|
|
324875
|
+
#buildActiveNoteRenderOverride(storyType) {
|
|
324876
|
+
const session = this.#getActiveNoteStorySession();
|
|
324877
|
+
if (!session || session.locator.storyType !== storyType)
|
|
324878
|
+
return null;
|
|
324879
|
+
const storyEditor = session.editor;
|
|
324880
|
+
const docJson = typeof storyEditor.getUpdatedJson === "function" ? storyEditor.getUpdatedJson() : typeof storyEditor.getJSON === "function" ? storyEditor.getJSON() : null;
|
|
324881
|
+
if (!docJson || typeof docJson !== "object")
|
|
324882
|
+
return null;
|
|
324883
|
+
return {
|
|
324884
|
+
noteId: session.locator.noteId,
|
|
324885
|
+
docJson
|
|
324886
|
+
};
|
|
324887
|
+
}
|
|
325127
324888
|
#getActiveTrackedChangeStorySurface() {
|
|
325128
324889
|
const storySession = this.#getActiveStorySession();
|
|
325129
324890
|
if (storySession)
|
|
@@ -325148,6 +324909,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
325148
324909
|
getStorySessionManager() {
|
|
325149
324910
|
return this.#storySessionManager;
|
|
325150
324911
|
}
|
|
324912
|
+
exitActiveStorySurface() {
|
|
324913
|
+
if ((this.#headerFooterSession?.session?.mode ?? "body") !== "body")
|
|
324914
|
+
this.#exitHeaderFooterMode();
|
|
324915
|
+
if (this.#getActiveStorySession())
|
|
324916
|
+
this.#exitActiveStorySession();
|
|
324917
|
+
}
|
|
325151
324918
|
#resolveActiveSurface() {
|
|
325152
324919
|
const mode = this.#headerFooterSession?.session?.mode ?? "body";
|
|
325153
324920
|
if (mode === "header")
|
|
@@ -325655,13 +325422,16 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
325655
325422
|
}).filter((rect) => Boolean(rect));
|
|
325656
325423
|
if (!rects.length)
|
|
325657
325424
|
return null;
|
|
325658
|
-
const
|
|
325425
|
+
const groupedRects = this.#groupRangeRectsByPage(rects);
|
|
325426
|
+
const preferredPageIndex = this.#getPreferredRenderedTrackedChangePageIndex(storyKey, groupedRects, relativeTo);
|
|
325427
|
+
const anchorRects = groupedRects.get(preferredPageIndex) ?? rects;
|
|
325428
|
+
const bounds = this.#aggregateLayoutBounds(anchorRects);
|
|
325659
325429
|
if (!bounds)
|
|
325660
325430
|
return null;
|
|
325661
325431
|
return {
|
|
325662
325432
|
bounds,
|
|
325663
325433
|
rects,
|
|
325664
|
-
pageIndex:
|
|
325434
|
+
pageIndex: preferredPageIndex
|
|
325665
325435
|
};
|
|
325666
325436
|
}
|
|
325667
325437
|
#findRenderedTrackedChangeElements(rawId, storyKey) {
|
|
@@ -325669,8 +325439,69 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
325669
325439
|
if (!host)
|
|
325670
325440
|
return [];
|
|
325671
325441
|
const baseSelector = `[data-track-change-id="${escapeAttrValue(rawId)}"]`;
|
|
325672
|
-
|
|
325673
|
-
|
|
325442
|
+
if (!storyKey)
|
|
325443
|
+
return Array.from(host.querySelectorAll(baseSelector));
|
|
325444
|
+
const storySelector = `${baseSelector}[data-story-key="${escapeAttrValue(storyKey)}"]`;
|
|
325445
|
+
const exactMatches = Array.from(host.querySelectorAll(storySelector));
|
|
325446
|
+
const allMatches = Array.from(host.querySelectorAll(baseSelector));
|
|
325447
|
+
if (exactMatches.length > 1 || exactMatches.length === allMatches.length || allMatches.length === 0)
|
|
325448
|
+
return exactMatches;
|
|
325449
|
+
return allMatches;
|
|
325450
|
+
}
|
|
325451
|
+
#groupRangeRectsByPage(rects) {
|
|
325452
|
+
const grouped = /* @__PURE__ */ new Map;
|
|
325453
|
+
rects.forEach((rect) => {
|
|
325454
|
+
const pageIndex = Number.isFinite(rect.pageIndex) ? rect.pageIndex : 0;
|
|
325455
|
+
const pageRects = grouped.get(pageIndex);
|
|
325456
|
+
if (pageRects) {
|
|
325457
|
+
pageRects.push(rect);
|
|
325458
|
+
return;
|
|
325459
|
+
}
|
|
325460
|
+
grouped.set(pageIndex, [rect]);
|
|
325461
|
+
});
|
|
325462
|
+
return grouped;
|
|
325463
|
+
}
|
|
325464
|
+
#getPreferredRenderedTrackedChangePageIndex(storyKey, groupedRects, relativeTo) {
|
|
325465
|
+
const activeHeaderFooterSession = this.#headerFooterSession?.session;
|
|
325466
|
+
const activePageIndex = (activeHeaderFooterSession?.mode !== "body" && activeHeaderFooterSession?.headerFooterRefId ? buildStoryKey({
|
|
325467
|
+
kind: "story",
|
|
325468
|
+
storyType: "headerFooterPart",
|
|
325469
|
+
refId: activeHeaderFooterSession.headerFooterRefId
|
|
325470
|
+
}) : null) === storyKey && Number.isFinite(activeHeaderFooterSession?.pageIndex) ? Number(activeHeaderFooterSession?.pageIndex) : null;
|
|
325471
|
+
if (activePageIndex != null && groupedRects.has(activePageIndex))
|
|
325472
|
+
return activePageIndex;
|
|
325473
|
+
const viewportRect = (this.#scrollContainer instanceof Window ? {
|
|
325474
|
+
top: 0,
|
|
325475
|
+
bottom: this.#scrollContainer.innerHeight
|
|
325476
|
+
} : this.#scrollContainer instanceof Element ? this.#scrollContainer.getBoundingClientRect() : this.#visibleHost?.ownerDocument?.defaultView ? {
|
|
325477
|
+
top: 0,
|
|
325478
|
+
bottom: this.#visibleHost.ownerDocument.defaultView.innerHeight
|
|
325479
|
+
} : this.#visibleHost?.getBoundingClientRect?.()) ?? null;
|
|
325480
|
+
if (viewportRect) {
|
|
325481
|
+
const relativeRect = relativeTo?.getBoundingClientRect?.();
|
|
325482
|
+
const visibleTop = viewportRect.top - (relativeRect?.top ?? 0);
|
|
325483
|
+
const visibleBottom = viewportRect.bottom - (relativeRect?.top ?? 0);
|
|
325484
|
+
const viewportCenter = visibleTop + (visibleBottom - visibleTop) / 2;
|
|
325485
|
+
let bestPageIndex = null;
|
|
325486
|
+
let bestIntersection = -1;
|
|
325487
|
+
let bestDistance = Number.POSITIVE_INFINITY;
|
|
325488
|
+
groupedRects.forEach((pageRects, pageIndex) => {
|
|
325489
|
+
const pageBounds = this.#aggregateLayoutBounds(pageRects);
|
|
325490
|
+
if (!pageBounds)
|
|
325491
|
+
return;
|
|
325492
|
+
const intersection = Math.max(0, Math.min(pageBounds.bottom, visibleBottom) - Math.max(pageBounds.top, visibleTop));
|
|
325493
|
+
const pageCenter = pageBounds.top + pageBounds.height / 2;
|
|
325494
|
+
const distance2 = Math.abs(pageCenter - viewportCenter);
|
|
325495
|
+
if (intersection > bestIntersection || intersection === bestIntersection && distance2 < bestDistance || intersection === bestIntersection && distance2 === bestDistance && (bestPageIndex == null || pageIndex < bestPageIndex)) {
|
|
325496
|
+
bestPageIndex = pageIndex;
|
|
325497
|
+
bestIntersection = intersection;
|
|
325498
|
+
bestDistance = distance2;
|
|
325499
|
+
}
|
|
325500
|
+
});
|
|
325501
|
+
if (bestPageIndex != null)
|
|
325502
|
+
return bestPageIndex;
|
|
325503
|
+
}
|
|
325504
|
+
return [...groupedRects.keys()].sort((left$1, right$1) => left$1 - right$1)[0] ?? 0;
|
|
325674
325505
|
}
|
|
325675
325506
|
getLayoutSnapshot() {
|
|
325676
325507
|
return {
|
|
@@ -326427,6 +326258,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326427
326258
|
this.#a11ySelectionAnnounceTimeout = null;
|
|
326428
326259
|
}
|
|
326429
326260
|
this.#teardownStorySessionEventBridge();
|
|
326261
|
+
this.#teardownActiveSurfaceUiEventBridge();
|
|
326430
326262
|
if (this.#registryKey) {
|
|
326431
326263
|
PresentationEditor2.#instances.delete(this.#registryKey);
|
|
326432
326264
|
this.#registryKey = null;
|
|
@@ -326677,6 +326509,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326677
326509
|
event: "stylesDefaultsChanged",
|
|
326678
326510
|
handler: handleStylesDefaultsChanged
|
|
326679
326511
|
});
|
|
326512
|
+
this.#syncActiveSurfaceUiEventBridge(this.#editor);
|
|
326680
326513
|
const handleNotesPartChanged = () => {
|
|
326681
326514
|
this.#flowBlockCache.setHasExternalChanges(true);
|
|
326682
326515
|
this.#pendingDocChange = true;
|
|
@@ -327007,6 +326840,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327007
326840
|
this.#scheduleSelectionUpdate({ immediate: true });
|
|
327008
326841
|
this.#scheduleA11ySelectionAnnouncement({ immediate: true });
|
|
327009
326842
|
}
|
|
326843
|
+
this.#syncActiveSurfaceUiEventBridge();
|
|
327010
326844
|
},
|
|
327011
326845
|
onEditBlocked: (reason) => {
|
|
327012
326846
|
this.emit("headerFooterEditBlocked", { reason });
|
|
@@ -327067,6 +326901,47 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327067
326901
|
this.#storySessionSelectionHandler = null;
|
|
327068
326902
|
this.#storySessionTransactionHandler = null;
|
|
327069
326903
|
}
|
|
326904
|
+
#teardownActiveSurfaceUiEventBridge() {
|
|
326905
|
+
if (this.#activeSurfaceUiEventEditor) {
|
|
326906
|
+
if (this.#activeSurfaceUiUpdateHandler)
|
|
326907
|
+
this.#activeSurfaceUiEventEditor.off?.("update", this.#activeSurfaceUiUpdateHandler);
|
|
326908
|
+
if (this.#activeSurfaceUiContextMenuOpenHandler)
|
|
326909
|
+
this.#activeSurfaceUiEventEditor.off?.("contextMenu:open", this.#activeSurfaceUiContextMenuOpenHandler);
|
|
326910
|
+
if (this.#activeSurfaceUiContextMenuCloseHandler)
|
|
326911
|
+
this.#activeSurfaceUiEventEditor.off?.("contextMenu:close", this.#activeSurfaceUiContextMenuCloseHandler);
|
|
326912
|
+
}
|
|
326913
|
+
this.#activeSurfaceUiEventEditor = null;
|
|
326914
|
+
this.#activeSurfaceUiUpdateHandler = null;
|
|
326915
|
+
this.#activeSurfaceUiContextMenuOpenHandler = null;
|
|
326916
|
+
this.#activeSurfaceUiContextMenuCloseHandler = null;
|
|
326917
|
+
}
|
|
326918
|
+
#syncActiveSurfaceUiEventBridge(editor = this.getActiveEditor()) {
|
|
326919
|
+
const nextEditor = editor ?? null;
|
|
326920
|
+
if (nextEditor === this.#activeSurfaceUiEventEditor)
|
|
326921
|
+
return;
|
|
326922
|
+
this.#teardownActiveSurfaceUiEventBridge();
|
|
326923
|
+
if (!nextEditor)
|
|
326924
|
+
return;
|
|
326925
|
+
const updateHandler = (event) => {
|
|
326926
|
+
this.emit("update", {
|
|
326927
|
+
...event ?? {},
|
|
326928
|
+
editor: this
|
|
326929
|
+
});
|
|
326930
|
+
};
|
|
326931
|
+
const contextMenuOpenHandler = (event) => {
|
|
326932
|
+
this.emit("contextMenu:open", event ?? {});
|
|
326933
|
+
};
|
|
326934
|
+
const contextMenuCloseHandler = () => {
|
|
326935
|
+
this.emit("contextMenu:close");
|
|
326936
|
+
};
|
|
326937
|
+
nextEditor.on?.("update", updateHandler);
|
|
326938
|
+
nextEditor.on?.("contextMenu:open", contextMenuOpenHandler);
|
|
326939
|
+
nextEditor.on?.("contextMenu:close", contextMenuCloseHandler);
|
|
326940
|
+
this.#activeSurfaceUiEventEditor = nextEditor;
|
|
326941
|
+
this.#activeSurfaceUiUpdateHandler = updateHandler;
|
|
326942
|
+
this.#activeSurfaceUiContextMenuOpenHandler = contextMenuOpenHandler;
|
|
326943
|
+
this.#activeSurfaceUiContextMenuCloseHandler = contextMenuCloseHandler;
|
|
326944
|
+
}
|
|
327070
326945
|
#syncStorySessionEventBridge(session) {
|
|
327071
326946
|
this.#teardownStorySessionEventBridge();
|
|
327072
326947
|
if (!session) {
|
|
@@ -327082,7 +326957,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327082
326957
|
return;
|
|
327083
326958
|
if (session.kind === "note") {
|
|
327084
326959
|
this.#invalidateTrackedChangesForStory(session.locator);
|
|
327085
|
-
this.#flowBlockCache.setHasExternalChanges(true);
|
|
327086
326960
|
this.#pendingDocChange = true;
|
|
327087
326961
|
this.#selectionSync.onLayoutStart();
|
|
327088
326962
|
this.#scheduleRerender();
|
|
@@ -327095,6 +326969,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327095
326969
|
this.#storySessionTransactionHandler = transactionHandler;
|
|
327096
326970
|
this.#scheduleSelectionUpdate({ immediate: true });
|
|
327097
326971
|
this.#scheduleA11ySelectionAnnouncement({ immediate: true });
|
|
326972
|
+
this.#syncActiveSurfaceUiEventBridge();
|
|
327098
326973
|
}
|
|
327099
326974
|
#syncActiveStorySessionDocumentMode(session) {
|
|
327100
326975
|
if (!session || session.kind !== "note")
|
|
@@ -327145,6 +327020,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327145
327020
|
this.#wrapOffscreenEditorFocus(activeSession.editor);
|
|
327146
327021
|
this.#syncActiveStorySessionDocumentMode(activeSession);
|
|
327147
327022
|
this.#syncStorySessionEventBridge(activeSession);
|
|
327023
|
+
this.#syncActiveSurfaceUiEventBridge();
|
|
327148
327024
|
this.#inputBridge?.notifyTargetChanged();
|
|
327149
327025
|
}
|
|
327150
327026
|
});
|
|
@@ -327375,9 +327251,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327375
327251
|
this.#applyHtmlAnnotationMeasurements(blocks2);
|
|
327376
327252
|
const isSemanticFlow = this.#isSemanticFlowMode();
|
|
327377
327253
|
const baseLayoutOptions = this.#resolveLayoutOptions(blocks2, sectionMetadata);
|
|
327378
|
-
const
|
|
327254
|
+
const activeFootnoteOverride = this.#buildActiveNoteRenderOverride("footnote");
|
|
327255
|
+
const footnotesLayoutInput = buildFootnotesInput(this.#editor?.state, this.#editor?.converter, converterContext, this.#editor?.converter?.themeColors ?? undefined, activeFootnoteOverride);
|
|
327379
327256
|
const semanticFootnoteBlocks = isSemanticFlow ? buildSemanticFootnoteBlocks(footnotesLayoutInput, this.#layoutOptions.semanticOptions?.footnotesMode) : [];
|
|
327380
|
-
const
|
|
327257
|
+
const activeEndnoteOverride = this.#buildActiveNoteRenderOverride("endnote");
|
|
327258
|
+
const endnoteBlocks = buildEndnoteBlocks(this.#editor?.state, this.#editor?.converter, converterContext, this.#editor?.converter?.themeColors ?? undefined, activeEndnoteOverride);
|
|
327381
327259
|
const blocksForLayout = semanticFootnoteBlocks.length > 0 || endnoteBlocks.length > 0 ? [
|
|
327382
327260
|
...blocks2,
|
|
327383
327261
|
...semanticFootnoteBlocks,
|
|
@@ -327488,45 +327366,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327488
327366
|
this.#ensurePainter();
|
|
327489
327367
|
if (!isSemanticFlow)
|
|
327490
327368
|
this.#painterAdapter.setProviders(this.#headerFooterSession?.headerDecorationProvider, this.#headerFooterSession?.footerDecorationProvider);
|
|
327491
|
-
const headerBlocks = [];
|
|
327492
|
-
const headerMeasures = [];
|
|
327493
|
-
if (headerLayouts)
|
|
327494
|
-
for (const headerResult of headerLayouts) {
|
|
327495
|
-
headerBlocks.push(...headerResult.blocks);
|
|
327496
|
-
headerMeasures.push(...headerResult.measures);
|
|
327497
|
-
}
|
|
327498
|
-
const headerLayoutsByRId = this.#headerFooterSession?.headerLayoutsByRId;
|
|
327499
|
-
if (headerLayoutsByRId)
|
|
327500
|
-
for (const rIdResult of headerLayoutsByRId.values()) {
|
|
327501
|
-
headerBlocks.push(...rIdResult.blocks);
|
|
327502
|
-
headerMeasures.push(...rIdResult.measures);
|
|
327503
|
-
}
|
|
327504
|
-
const footerBlocks = [];
|
|
327505
|
-
const footerMeasures = [];
|
|
327506
|
-
if (footerLayouts)
|
|
327507
|
-
for (const footerResult of footerLayouts) {
|
|
327508
|
-
footerBlocks.push(...footerResult.blocks);
|
|
327509
|
-
footerMeasures.push(...footerResult.measures);
|
|
327510
|
-
}
|
|
327511
|
-
const footerLayoutsByRId = this.#headerFooterSession?.footerLayoutsByRId;
|
|
327512
|
-
if (footerLayoutsByRId)
|
|
327513
|
-
for (const rIdResult of footerLayoutsByRId.values()) {
|
|
327514
|
-
footerBlocks.push(...rIdResult.blocks);
|
|
327515
|
-
footerMeasures.push(...rIdResult.measures);
|
|
327516
|
-
}
|
|
327517
327369
|
this.#domIndexObserverManager?.pause();
|
|
327518
327370
|
const mapping = this.#pendingMapping;
|
|
327519
327371
|
this.#pendingMapping = null;
|
|
327520
327372
|
const painterPaintStart = perfNow();
|
|
327521
327373
|
const paintInput = {
|
|
327522
327374
|
resolvedLayout,
|
|
327523
|
-
sourceLayout: layout
|
|
327524
|
-
blocks: bodyBlocksForPaint,
|
|
327525
|
-
measures: bodyMeasuresForPaint,
|
|
327526
|
-
headerBlocks: headerBlocks.length > 0 ? headerBlocks : undefined,
|
|
327527
|
-
headerMeasures: headerMeasures.length > 0 ? headerMeasures : undefined,
|
|
327528
|
-
footerBlocks: footerBlocks.length > 0 ? footerBlocks : undefined,
|
|
327529
|
-
footerMeasures: footerMeasures.length > 0 ? footerMeasures : undefined
|
|
327375
|
+
sourceLayout: layout
|
|
327530
327376
|
};
|
|
327531
327377
|
this.#painterAdapter.paint(paintInput, this.#painterHost, mapping ?? undefined);
|
|
327532
327378
|
perfLog(`[Perf] painter.paint: ${(perfNow() - painterPaintStart).toFixed(2)}ms`);
|
|
@@ -328472,7 +328318,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328472
328318
|
storyType: target.storyType,
|
|
328473
328319
|
noteId: target.noteId
|
|
328474
328320
|
}, {
|
|
328475
|
-
commitPolicy: "
|
|
328321
|
+
commitPolicy: "onExit",
|
|
328476
328322
|
preferHiddenHost: true,
|
|
328477
328323
|
hostWidthPx: targetContext?.hostWidthPx ?? this.#visibleHost.clientWidth ?? 1,
|
|
328478
328324
|
editorContext: {
|
|
@@ -328716,7 +328562,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328716
328562
|
if (target.entityType === "comment")
|
|
328717
328563
|
return await this.#navigateToComment(target.entityId);
|
|
328718
328564
|
if (target.entityType === "trackedChange")
|
|
328719
|
-
return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story));
|
|
328565
|
+
return await this.#navigateToTrackedChange(target.entityId, resolveStoryKeyFromAddress(target.story), target.pageIndex);
|
|
328720
328566
|
}
|
|
328721
328567
|
return false;
|
|
328722
328568
|
} catch (error3) {
|
|
@@ -328790,18 +328636,18 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328790
328636
|
});
|
|
328791
328637
|
return true;
|
|
328792
328638
|
}
|
|
328793
|
-
async#navigateToTrackedChange(entityId, storyKey) {
|
|
328639
|
+
async#navigateToTrackedChange(entityId, storyKey, preferredPageIndex) {
|
|
328794
328640
|
const editor = this.#editor;
|
|
328795
328641
|
if (!editor)
|
|
328796
328642
|
return false;
|
|
328797
328643
|
if (storyKey && storyKey !== "body") {
|
|
328798
328644
|
if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
|
|
328799
328645
|
return true;
|
|
328800
|
-
if (await this.#activateTrackedChangeStorySurface(entityId, storyKey)) {
|
|
328646
|
+
if (await this.#activateTrackedChangeStorySurface(entityId, storyKey, preferredPageIndex)) {
|
|
328801
328647
|
if (this.#navigateToActiveStoryTrackedChange(entityId, storyKey))
|
|
328802
328648
|
return true;
|
|
328803
328649
|
}
|
|
328804
|
-
return this.#scrollToRenderedTrackedChange(entityId, storyKey);
|
|
328650
|
+
return this.#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex);
|
|
328805
328651
|
}
|
|
328806
328652
|
const setCursorById = editor.commands?.setCursorById;
|
|
328807
328653
|
if (typeof setCursorById === "function" && setCursorById(entityId, { preferredActiveThreadId: entityId })) {
|
|
@@ -328813,7 +328659,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328813
328659
|
}
|
|
328814
328660
|
const resolved = resolveTrackedChange(editor, entityId);
|
|
328815
328661
|
if (!resolved)
|
|
328816
|
-
return this.#scrollToRenderedTrackedChange(entityId);
|
|
328662
|
+
return this.#scrollToRenderedTrackedChange(entityId, undefined, preferredPageIndex);
|
|
328817
328663
|
if (typeof setCursorById === "function" && resolved.rawId !== entityId) {
|
|
328818
328664
|
if (setCursorById(resolved.rawId, { preferredActiveThreadId: resolved.rawId })) {
|
|
328819
328665
|
await this.scrollToPositionAsync(editor.state.selection.from, {
|
|
@@ -328835,7 +328681,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328835
328681
|
editor.view?.focus?.();
|
|
328836
328682
|
return true;
|
|
328837
328683
|
}
|
|
328838
|
-
async#activateTrackedChangeStorySurface(entityId, storyKey) {
|
|
328684
|
+
async#activateTrackedChangeStorySurface(entityId, storyKey, preferredPageIndex) {
|
|
328839
328685
|
let locator = null;
|
|
328840
328686
|
try {
|
|
328841
328687
|
locator = parseStoryKey(storyKey);
|
|
@@ -328844,7 +328690,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328844
328690
|
}
|
|
328845
328691
|
if (!locator || locator.storyType === "body")
|
|
328846
328692
|
return false;
|
|
328847
|
-
const candidate = this.#
|
|
328693
|
+
const candidate = this.#findRenderedTrackedChangeElement(entityId, storyKey, preferredPageIndex);
|
|
328848
328694
|
if (!candidate)
|
|
328849
328695
|
return false;
|
|
328850
328696
|
const rect = candidate.getBoundingClientRect();
|
|
@@ -328922,12 +328768,20 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328922
328768
|
this.#shouldScrollSelectionIntoView = true;
|
|
328923
328769
|
this.#scheduleSelectionUpdate({ immediate: true });
|
|
328924
328770
|
}
|
|
328925
|
-
|
|
328771
|
+
#findRenderedTrackedChangeElement(entityId, storyKey, preferredPageIndex) {
|
|
328926
328772
|
const candidates = this.#findRenderedTrackedChangeElements(entityId, storyKey);
|
|
328927
328773
|
if (!candidates.length)
|
|
328774
|
+
return null;
|
|
328775
|
+
if (!Number.isFinite(preferredPageIndex))
|
|
328776
|
+
return candidates[0] ?? null;
|
|
328777
|
+
return candidates.find((candidate) => this.#resolveRenderedPageIndexForElement(candidate) === preferredPageIndex) ?? candidates[0] ?? null;
|
|
328778
|
+
}
|
|
328779
|
+
async#scrollToRenderedTrackedChange(entityId, storyKey, preferredPageIndex) {
|
|
328780
|
+
const candidate = this.#findRenderedTrackedChangeElement(entityId, storyKey, preferredPageIndex);
|
|
328781
|
+
if (!candidate)
|
|
328928
328782
|
return false;
|
|
328929
328783
|
try {
|
|
328930
|
-
|
|
328784
|
+
candidate.scrollIntoView({
|
|
328931
328785
|
behavior: "auto",
|
|
328932
328786
|
block: "center",
|
|
328933
328787
|
inline: "nearest"
|
|
@@ -329785,11 +329639,11 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
329785
329639
|
|
|
329786
329640
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
329787
329641
|
var init_super_editor_es = __esm(() => {
|
|
329788
|
-
|
|
329789
|
-
|
|
329642
|
+
init_src_BFNW1Ck5_es();
|
|
329643
|
+
init_SuperConverter_D54XfHFt_es();
|
|
329790
329644
|
init_jszip_C49i9kUs_es();
|
|
329791
329645
|
init_xml_js_CqGKpaft_es();
|
|
329792
|
-
|
|
329646
|
+
init_create_headless_toolbar_DrE9IMiD_es();
|
|
329793
329647
|
init_constants_CGhJRd87_es();
|
|
329794
329648
|
init_dist_B8HfvhaK_es();
|
|
329795
329649
|
init_unified_Dsuw2be5_es();
|