@superdoc-dev/cli 0.16.0-next.24 → 0.16.0-next.26
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 +390 -93
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -59714,7 +59714,7 @@ var init_uuid_qzgm05fK_es = __esm(() => {
|
|
|
59714
59714
|
v5_default = v35("v5", 80, sha1);
|
|
59715
59715
|
});
|
|
59716
59716
|
|
|
59717
|
-
// ../../packages/superdoc/dist/chunks/constants-
|
|
59717
|
+
// ../../packages/superdoc/dist/chunks/constants-D9qj59G2.es.js
|
|
59718
59718
|
function toProtocolSet(values) {
|
|
59719
59719
|
const result = /* @__PURE__ */ new Set;
|
|
59720
59720
|
if (!values)
|
|
@@ -60300,7 +60300,7 @@ var DEFAULT_ALLOWED_PROTOCOLS, OPTIONAL_PROTOCOLS, BLOCKED_PROTOCOLS, DEFAULT_MA
|
|
|
60300
60300
|
return a.length === 1 ? "0" + a : a;
|
|
60301
60301
|
}, rgbToHex = (rgb) => {
|
|
60302
60302
|
return "#" + rgb.match(/\d+/g).map(componentToHex).join("");
|
|
60303
|
-
}, DEFAULT_SHADING_FOREGROUND_COLOR = "#000000", hexToRgb = (hex) => {
|
|
60303
|
+
}, DEFAULT_SHADING_FOREGROUND_COLOR = "#000000", DEFAULT_SHADING_FILL_COLOR = "#FFFFFF", hexToRgb = (hex) => {
|
|
60304
60304
|
const normalized = normalizeHexColor(hex);
|
|
60305
60305
|
if (!normalized)
|
|
60306
60306
|
return null;
|
|
@@ -60327,16 +60327,19 @@ var DEFAULT_ALLOWED_PROTOCOLS, OPTIONAL_PROTOCOLS, BLOCKED_PROTOCOLS, DEFAULT_MA
|
|
|
60327
60327
|
}, resolveShadingFillColor = (shading) => {
|
|
60328
60328
|
if (!shading || typeof shading !== "object")
|
|
60329
60329
|
return null;
|
|
60330
|
-
const
|
|
60331
|
-
if (
|
|
60330
|
+
const val = typeof shading.val === "string" ? shading.val.trim().toLowerCase() : "";
|
|
60331
|
+
if (val === "nil" || val === "none")
|
|
60332
60332
|
return null;
|
|
60333
|
-
const
|
|
60334
|
-
|
|
60335
|
-
|
|
60336
|
-
|
|
60333
|
+
const fillHex = typeof shading.fill === "string" && shading.fill.trim().toLowerCase() === "auto" ? null : normalizeHexColor(shading.fill);
|
|
60334
|
+
const pctMatch = val.match(/^pct(\d{1,3})$/);
|
|
60335
|
+
if (!(Boolean(pctMatch) || val === "solid"))
|
|
60336
|
+
return fillHex;
|
|
60337
|
+
const baseHex = fillHex ?? DEFAULT_SHADING_FILL_COLOR;
|
|
60338
|
+
const foregroundHex = typeof shading.color !== "string" || shading.color.trim() === "" || shading.color.trim().toLowerCase() === "auto" ? DEFAULT_SHADING_FOREGROUND_COLOR : normalizeHexColor(shading.color) ?? DEFAULT_SHADING_FOREGROUND_COLOR;
|
|
60339
|
+
const pct = pctMatch ? Number.parseInt(pctMatch[1], 10) : 100;
|
|
60337
60340
|
if (!Number.isFinite(pct) || pct < 0 || pct > 100)
|
|
60338
|
-
return
|
|
60339
|
-
return blendHexColors(
|
|
60341
|
+
return fillHex;
|
|
60342
|
+
return blendHexColors(baseHex, foregroundHex, pct / 100) ?? fillHex;
|
|
60340
60343
|
}, deobfuscateFont = (arrayBuffer, guidHex) => {
|
|
60341
60344
|
const dta = new Uint8Array(arrayBuffer);
|
|
60342
60345
|
const guidStr = guidHex.replace(/[-{}]/g, "");
|
|
@@ -60382,7 +60385,7 @@ var DEFAULT_ALLOWED_PROTOCOLS, OPTIONAL_PROTOCOLS, BLOCKED_PROTOCOLS, DEFAULT_MA
|
|
|
60382
60385
|
return "webp";
|
|
60383
60386
|
return null;
|
|
60384
60387
|
}, COMMENT_FILE_BASENAMES, DEFAULT_XML_DECLARATION, COMMENT_RELATIONSHIP_TYPES;
|
|
60385
|
-
var
|
|
60388
|
+
var init_constants_D9qj59G2_es = __esm(() => {
|
|
60386
60389
|
init_jszip_C49i9kUs_es();
|
|
60387
60390
|
init_xml_js_CqGKpaft_es();
|
|
60388
60391
|
init_dist4();
|
|
@@ -68342,7 +68345,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
68342
68345
|
emptyOptions2 = {};
|
|
68343
68346
|
});
|
|
68344
68347
|
|
|
68345
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
68348
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-DBsJeu9t.es.js
|
|
68346
68349
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
68347
68350
|
const fieldValue = extension$1.config[field];
|
|
68348
68351
|
if (typeof fieldValue === "function")
|
|
@@ -127970,6 +127973,44 @@ var isRegExp = (value) => {
|
|
|
127970
127973
|
...comment,
|
|
127971
127974
|
commentParaId: generateDocxRandomId()
|
|
127972
127975
|
};
|
|
127976
|
+
}, getCommentIds = (comment) => {
|
|
127977
|
+
if (!comment)
|
|
127978
|
+
return [];
|
|
127979
|
+
return [
|
|
127980
|
+
comment.commentId,
|
|
127981
|
+
comment.importedId,
|
|
127982
|
+
comment.internalId
|
|
127983
|
+
].filter((id2) => id2 != null).map((id2) => String(id2));
|
|
127984
|
+
}, buildCommentLookup = (comments = []) => {
|
|
127985
|
+
const byId = /* @__PURE__ */ new Map;
|
|
127986
|
+
for (const comment of comments)
|
|
127987
|
+
getCommentIds(comment).forEach((id2) => byId.set(id2, comment));
|
|
127988
|
+
return byId;
|
|
127989
|
+
}, findCommentById = (comments = [], id2) => {
|
|
127990
|
+
if (id2 == null)
|
|
127991
|
+
return null;
|
|
127992
|
+
return buildCommentLookup(comments).get(String(id2)) || null;
|
|
127993
|
+
}, isCommentResolvedInThread = (comment, allComments = []) => {
|
|
127994
|
+
const isDone = (c$1) => Boolean(c$1?.resolvedTime || c$1?.isDone);
|
|
127995
|
+
if (isDone(comment))
|
|
127996
|
+
return true;
|
|
127997
|
+
const byId = buildCommentLookup(allComments);
|
|
127998
|
+
const seen = /* @__PURE__ */ new Set;
|
|
127999
|
+
let current = comment;
|
|
128000
|
+
while (current) {
|
|
128001
|
+
const parentId = current.threadingParentCommentId || current.parentCommentId;
|
|
128002
|
+
const parentKey = parentId != null ? String(parentId) : null;
|
|
128003
|
+
if (parentKey == null || seen.has(parentKey))
|
|
128004
|
+
break;
|
|
128005
|
+
seen.add(parentKey);
|
|
128006
|
+
const parent = byId.get(parentKey);
|
|
128007
|
+
if (!parent)
|
|
128008
|
+
break;
|
|
128009
|
+
if (isDone(parent))
|
|
128010
|
+
return true;
|
|
128011
|
+
current = parent;
|
|
128012
|
+
}
|
|
128013
|
+
return false;
|
|
127973
128014
|
}, getCommentDefinition = (comment, commentId, allComments, editor) => {
|
|
127974
128015
|
const translatedParagraphs = (Array.isArray(comment.commentJSON) ? comment.commentJSON : comment.commentJSON ? [comment.commentJSON] : []).map((node3) => translator.decode({
|
|
127975
128016
|
editor,
|
|
@@ -127980,7 +128021,7 @@ var isRegExp = (value) => {
|
|
|
127980
128021
|
"w:author": comment.creatorName || comment.importedAuthor?.name,
|
|
127981
128022
|
"w:date": toIsoNoFractional(comment.createdTime),
|
|
127982
128023
|
"w:initials": getInitials(comment.creatorName),
|
|
127983
|
-
"w:done": comment
|
|
128024
|
+
"w:done": isCommentResolvedInThread(comment, allComments) ? "1" : "0",
|
|
127984
128025
|
"w15:paraId": comment.commentParaId,
|
|
127985
128026
|
"custom:internalId": comment.commentId || comment.internalId,
|
|
127986
128027
|
"custom:trackedChange": comment.trackedChange,
|
|
@@ -127991,7 +128032,7 @@ var isRegExp = (value) => {
|
|
|
127991
128032
|
"custom:email": comment.creatorEmail || comment.importedAuthor?.email
|
|
127992
128033
|
};
|
|
127993
128034
|
if (comment?.parentCommentId) {
|
|
127994
|
-
const parentComment = allComments
|
|
128035
|
+
const parentComment = findCommentById(allComments, comment.parentCommentId);
|
|
127995
128036
|
if (parentComment && !parentComment.trackedChange)
|
|
127996
128037
|
attributes["w15:paraIdParent"] = parentComment.commentParaId;
|
|
127997
128038
|
}
|
|
@@ -128067,7 +128108,7 @@ var isRegExp = (value) => {
|
|
|
128067
128108
|
return null;
|
|
128068
128109
|
const xmlCopy = carbonCopy(commentsExtendedXml);
|
|
128069
128110
|
const commentsEx = comments.map((comment) => {
|
|
128070
|
-
const isResolved = comment
|
|
128111
|
+
const isResolved = isCommentResolvedInThread(comment, comments);
|
|
128071
128112
|
const attributes = {
|
|
128072
128113
|
"w15:paraId": comment.commentParaId,
|
|
128073
128114
|
"w15:done": isResolved ? "1" : "0"
|
|
@@ -128075,7 +128116,7 @@ var isRegExp = (value) => {
|
|
|
128075
128116
|
const parentId = comment.threadingParentCommentId || comment.parentCommentId;
|
|
128076
128117
|
const threadingStyle = resolveThreadingStyle(comment, profile);
|
|
128077
128118
|
if (parentId && (threadingStyle === "commentsExtended" || shouldIncludeForThreads)) {
|
|
128078
|
-
const parentComment = comments
|
|
128119
|
+
const parentComment = findCommentById(comments, parentId);
|
|
128079
128120
|
const allowTrackedParent = profile?.defaultStyle === "commentsExtended";
|
|
128080
128121
|
if (parentComment && (allowTrackedParent || !parentComment.trackedChange))
|
|
128081
128122
|
attributes["w15:paraIdParent"] = parentComment.commentParaId;
|
|
@@ -131096,15 +131137,17 @@ var isRegExp = (value) => {
|
|
|
131096
131137
|
}
|
|
131097
131138
|
}
|
|
131098
131139
|
if (!cellBackgroundColor && resolvedTcProps?.shading) {
|
|
131099
|
-
const { fill, themeFill, themeFillTint, themeFillShade } = resolvedTcProps.shading;
|
|
131100
|
-
|
|
131101
|
-
if (
|
|
131102
|
-
|
|
131103
|
-
|
|
131104
|
-
|
|
131105
|
-
|
|
131106
|
-
|
|
131107
|
-
}
|
|
131140
|
+
const { fill, color: color2, val, themeFill, themeFillTint, themeFillShade } = resolvedTcProps.shading;
|
|
131141
|
+
let fillBase = normalizeShadingColor(fill);
|
|
131142
|
+
if (!fillBase && themeFill && context.themeColors)
|
|
131143
|
+
fillBase = normalizeShadingColor(resolveThemeColorValue(themeFill, themeFillTint, themeFillShade, context.themeColors));
|
|
131144
|
+
const resolved = resolveShadingFillColor({
|
|
131145
|
+
val,
|
|
131146
|
+
color: color2,
|
|
131147
|
+
fill: fillBase ?? fill
|
|
131148
|
+
});
|
|
131149
|
+
if (resolved)
|
|
131150
|
+
cellBackgroundColor = resolved.startsWith("#") ? resolved : `#${resolved}`;
|
|
131108
131151
|
}
|
|
131109
131152
|
const cellConverterContext = tableInfo || cellBackgroundColor ? {
|
|
131110
131153
|
...context.converterContext,
|
|
@@ -131358,9 +131401,12 @@ var isRegExp = (value) => {
|
|
|
131358
131401
|
return null;
|
|
131359
131402
|
const rowProps = rowNode.attrs?.tableRowProperties;
|
|
131360
131403
|
const rowHeight = normalizeRowHeight(rowProps);
|
|
131404
|
+
const tblPrExBordersRaw = rowProps?.tblPrExBorders;
|
|
131405
|
+
const rowBorders = tblPrExBordersRaw && typeof tblPrExBordersRaw === "object" ? extractTableBorders(tblPrExBordersRaw, { unit: "eighthPoints" }) : undefined;
|
|
131361
131406
|
const attrs = rowProps && typeof rowProps === "object" ? {
|
|
131362
131407
|
tableRowProperties: rowProps,
|
|
131363
|
-
...rowHeight ? { rowHeight } : {}
|
|
131408
|
+
...rowHeight ? { rowHeight } : {},
|
|
131409
|
+
...rowBorders ? { borders: rowBorders } : {}
|
|
131364
131410
|
} : rowHeight ? { rowHeight } : undefined;
|
|
131365
131411
|
return {
|
|
131366
131412
|
id: context.nextBlockId(`row-${rowIndex}`),
|
|
@@ -131677,12 +131723,12 @@ var isRegExp = (value) => {
|
|
|
131677
131723
|
state.kern = kernNode.attributes["w:val"];
|
|
131678
131724
|
}
|
|
131679
131725
|
}, SuperConverter;
|
|
131680
|
-
var
|
|
131726
|
+
var init_SuperConverter_DBsJeu9t_es = __esm(() => {
|
|
131681
131727
|
init_rolldown_runtime_Bg48TavK_es();
|
|
131682
131728
|
init_jszip_C49i9kUs_es();
|
|
131683
131729
|
init_xml_js_CqGKpaft_es();
|
|
131684
131730
|
init_uuid_qzgm05fK_es();
|
|
131685
|
-
|
|
131731
|
+
init_constants_D9qj59G2_es();
|
|
131686
131732
|
init_dist_B8HfvhaK_es();
|
|
131687
131733
|
init_unified_Dsuw2be5_es();
|
|
131688
131734
|
init_lib_CYqLdG4z_es();
|
|
@@ -170712,7 +170758,7 @@ var init_SuperConverter_BSMYiYJm_es = __esm(() => {
|
|
|
170712
170758
|
};
|
|
170713
170759
|
});
|
|
170714
170760
|
|
|
170715
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
170761
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-BiY_0zZP.es.js
|
|
170716
170762
|
function parseSizeUnit(val = "0") {
|
|
170717
170763
|
const length3 = val.toString() || "0";
|
|
170718
170764
|
const value = Number.parseFloat(length3);
|
|
@@ -181045,10 +181091,10 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
181045
181091
|
}
|
|
181046
181092
|
};
|
|
181047
181093
|
};
|
|
181048
|
-
var
|
|
181049
|
-
|
|
181094
|
+
var init_create_headless_toolbar_BiY_0zZP_es = __esm(() => {
|
|
181095
|
+
init_SuperConverter_DBsJeu9t_es();
|
|
181050
181096
|
init_uuid_qzgm05fK_es();
|
|
181051
|
-
|
|
181097
|
+
init_constants_D9qj59G2_es();
|
|
181052
181098
|
init_dist_B8HfvhaK_es();
|
|
181053
181099
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
181054
181100
|
DOM_SIZE_UNITS = [
|
|
@@ -182945,7 +182991,7 @@ var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
|
|
|
182945
182991
|
]);
|
|
182946
182992
|
});
|
|
182947
182993
|
|
|
182948
|
-
// ../../packages/superdoc/dist/chunks/DocxZipper-
|
|
182994
|
+
// ../../packages/superdoc/dist/chunks/DocxZipper-Bu2Fhqkw.es.js
|
|
182949
182995
|
function sniffEncoding(u8) {
|
|
182950
182996
|
if (u8.length >= 2) {
|
|
182951
182997
|
const b0 = u8[0], b1 = u8[1];
|
|
@@ -183618,11 +183664,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
|
|
|
183618
183664
|
return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
|
|
183619
183665
|
}
|
|
183620
183666
|
}, DocxZipper_default;
|
|
183621
|
-
var
|
|
183667
|
+
var init_DocxZipper_Bu2Fhqkw_es = __esm(() => {
|
|
183622
183668
|
init_rolldown_runtime_Bg48TavK_es();
|
|
183623
183669
|
init_jszip_C49i9kUs_es();
|
|
183624
183670
|
init_xml_js_CqGKpaft_es();
|
|
183625
|
-
|
|
183671
|
+
init_constants_D9qj59G2_es();
|
|
183626
183672
|
init_dist_B8HfvhaK_es();
|
|
183627
183673
|
MANAGED_PACKAGE_PARTS = [
|
|
183628
183674
|
{
|
|
@@ -230209,7 +230255,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
230209
230255
|
init_remark_gfm_BhnWr3yf_es();
|
|
230210
230256
|
});
|
|
230211
230257
|
|
|
230212
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
230258
|
+
// ../../packages/superdoc/dist/chunks/src-DYT7-l3i.es.js
|
|
230213
230259
|
function deleteProps(obj, propOrProps) {
|
|
230214
230260
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
230215
230261
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -275289,8 +275335,15 @@ function calculateChainHeight(chain, blocks2, measures, state) {
|
|
|
275289
275335
|
const firstLineHeight = anchorMeasure.lines[0]?.lineHeight;
|
|
275290
275336
|
const anchorHeight = typeof firstLineHeight === "number" && Number.isFinite(firstLineHeight) && firstLineHeight > 0 ? firstLineHeight : getMeasureHeight(anchorBlock, anchorMeasure);
|
|
275291
275337
|
totalHeight += interParagraphSpacing + anchorHeight;
|
|
275292
|
-
} else if (!(anchorBlock.kind === "table" && anchorBlock.anchor?.isAnchored === true))
|
|
275293
|
-
|
|
275338
|
+
} else if (!(anchorBlock.kind === "table" && anchorBlock.anchor?.isAnchored === true)) {
|
|
275339
|
+
let anchorHeight = getMeasureHeight(anchorBlock, anchorMeasure);
|
|
275340
|
+
if (anchorBlock.kind === "table" && anchorMeasure.kind === "table" && anchorMeasure.rows.length > 0) {
|
|
275341
|
+
const firstRowHeight = anchorMeasure.rows[0]?.height;
|
|
275342
|
+
if (typeof firstRowHeight === "number" && Number.isFinite(firstRowHeight) && firstRowHeight > 0)
|
|
275343
|
+
anchorHeight = firstRowHeight;
|
|
275344
|
+
}
|
|
275345
|
+
totalHeight += prevSpacingAfter + anchorHeight;
|
|
275346
|
+
}
|
|
275294
275347
|
}
|
|
275295
275348
|
}
|
|
275296
275349
|
return totalHeight;
|
|
@@ -292255,28 +292308,61 @@ var Node$13 = class Node$14 {
|
|
|
292255
292308
|
ranges
|
|
292256
292309
|
};
|
|
292257
292310
|
}, resolveCommentById = ({ commentId, importedId, state, tr, dispatch }) => {
|
|
292311
|
+
const converted = resolveCommentsInTr({
|
|
292312
|
+
items: [{
|
|
292313
|
+
commentId,
|
|
292314
|
+
importedId
|
|
292315
|
+
}],
|
|
292316
|
+
state,
|
|
292317
|
+
tr
|
|
292318
|
+
});
|
|
292319
|
+
if (converted)
|
|
292320
|
+
dispatch(tr);
|
|
292321
|
+
return converted;
|
|
292322
|
+
}, resolveCommentsInTr = ({ items = [], state, tr }) => {
|
|
292258
292323
|
const { schema } = state;
|
|
292259
292324
|
const markType = schema.marks?.[CommentMarkName];
|
|
292260
292325
|
if (!markType)
|
|
292261
292326
|
return false;
|
|
292262
|
-
const { segments, ranges } = getCommentMarkRangesById(commentId, state.doc, importedId);
|
|
292263
|
-
if (!segments.length)
|
|
292264
|
-
return false;
|
|
292265
|
-
segments.forEach(({ from: from$1, to, attrs }) => {
|
|
292266
|
-
tr.removeMark(from$1, to, markType.create(attrs));
|
|
292267
|
-
});
|
|
292268
292327
|
const startType = schema.nodes?.commentRangeStart;
|
|
292269
292328
|
const endType = schema.nodes?.commentRangeEnd;
|
|
292270
|
-
|
|
292271
|
-
|
|
292272
|
-
|
|
292273
|
-
|
|
292329
|
+
const insertions = [];
|
|
292330
|
+
const seen = /* @__PURE__ */ new Set;
|
|
292331
|
+
let converted = false;
|
|
292332
|
+
for (const item of items) {
|
|
292333
|
+
if (!item)
|
|
292334
|
+
continue;
|
|
292335
|
+
const { commentId, importedId } = item;
|
|
292336
|
+
if (commentId == null)
|
|
292337
|
+
continue;
|
|
292338
|
+
const key2 = `${commentId}:${importedId ?? ""}`;
|
|
292339
|
+
if (seen.has(key2))
|
|
292340
|
+
continue;
|
|
292341
|
+
seen.add(key2);
|
|
292342
|
+
const { segments, ranges } = getCommentMarkRangesById(commentId, state.doc, importedId);
|
|
292343
|
+
if (!segments.length)
|
|
292344
|
+
continue;
|
|
292345
|
+
converted = true;
|
|
292346
|
+
segments.forEach(({ from: from$1, to, attrs }) => {
|
|
292347
|
+
tr.removeMark(from$1, to, markType.create(attrs));
|
|
292348
|
+
});
|
|
292349
|
+
if (startType && endType && item.preserveAnchor !== false)
|
|
292350
|
+
ranges.forEach(({ from: from$1, to, internal }) => insertions.push({
|
|
292351
|
+
from: from$1,
|
|
292352
|
+
to,
|
|
292353
|
+
internal,
|
|
292354
|
+
commentId
|
|
292355
|
+
}));
|
|
292356
|
+
}
|
|
292357
|
+
if (startType && endType && insertions.length)
|
|
292358
|
+
insertions.sort((a2, b$1) => b$1.from - a2.from || b$1.to - a2.to).forEach(({ from: from$1, to, internal, commentId }) => {
|
|
292359
|
+
tr.insert(tr.mapping.map(to), endType.create({ "w:id": commentId }));
|
|
292360
|
+
tr.insert(tr.mapping.map(from$1), startType.create({
|
|
292274
292361
|
"w:id": commentId,
|
|
292275
292362
|
internal
|
|
292276
292363
|
}));
|
|
292277
292364
|
});
|
|
292278
|
-
|
|
292279
|
-
return true;
|
|
292365
|
+
return converted;
|
|
292280
292366
|
}, getCommentRangeAnchorsById = (commentId, doc$12, importedId) => {
|
|
292281
292367
|
const anchors = [];
|
|
292282
292368
|
doc$12.descendants((node3, pos) => {
|
|
@@ -292571,6 +292657,60 @@ var Node$13 = class Node$14 {
|
|
|
292571
292657
|
});
|
|
292572
292658
|
});
|
|
292573
292659
|
}
|
|
292660
|
+
const nodeAnchorsById = /* @__PURE__ */ new Map;
|
|
292661
|
+
doc$12.descendants((node3, pos) => {
|
|
292662
|
+
const typeName = node3.type?.name;
|
|
292663
|
+
if (typeName !== "commentRangeStart" && typeName !== "commentRangeEnd")
|
|
292664
|
+
return;
|
|
292665
|
+
const anchorId = node3.attrs?.["w:id"];
|
|
292666
|
+
if (anchorId == null)
|
|
292667
|
+
return;
|
|
292668
|
+
const entry = nodeAnchorsById.get(anchorId) || {};
|
|
292669
|
+
if (typeName === "commentRangeStart")
|
|
292670
|
+
entry.startPos = pos;
|
|
292671
|
+
else
|
|
292672
|
+
entry.endPos = pos;
|
|
292673
|
+
nodeAnchorsById.set(anchorId, entry);
|
|
292674
|
+
});
|
|
292675
|
+
const isRepresented = (c) => seen.has(c.commentId) || c.importedId != null && seen.has(c.importedId) || nodeAnchorsById.has(c.commentId) || c.importedId != null && nodeAnchorsById.has(c.importedId);
|
|
292676
|
+
const findAncestorNodeAnchor = (comment2) => {
|
|
292677
|
+
let current = comment2;
|
|
292678
|
+
const visited = /* @__PURE__ */ new Set;
|
|
292679
|
+
while (current) {
|
|
292680
|
+
const parentId = getThreadingParentId(current);
|
|
292681
|
+
if (parentId == null || visited.has(parentId))
|
|
292682
|
+
return null;
|
|
292683
|
+
visited.add(parentId);
|
|
292684
|
+
const parent = commentMap.get(parentId) || comments.find((c) => c.importedId === parentId || c.commentId === parentId);
|
|
292685
|
+
const anchor = nodeAnchorsById.get(parentId) ?? (parent ? nodeAnchorsById.get(parent.commentId) ?? nodeAnchorsById.get(parent.importedId) : undefined);
|
|
292686
|
+
if (anchor?.startPos != null && anchor?.endPos != null)
|
|
292687
|
+
return anchor;
|
|
292688
|
+
current = parent;
|
|
292689
|
+
}
|
|
292690
|
+
return null;
|
|
292691
|
+
};
|
|
292692
|
+
comments.filter((c) => !c.trackedChange && c.commentId != null && !isRepresented(c)).sort((a2, b$1) => (a2.createdTime || 0) - (b$1.createdTime || 0)).forEach((c) => {
|
|
292693
|
+
const anchor = findAncestorNodeAnchor(c);
|
|
292694
|
+
if (!anchor)
|
|
292695
|
+
return;
|
|
292696
|
+
seen.add(c.commentId);
|
|
292697
|
+
const childAttrs = getPreparedComment({
|
|
292698
|
+
commentId: c.commentId,
|
|
292699
|
+
internal: c.isInternal
|
|
292700
|
+
});
|
|
292701
|
+
startNodes.push({
|
|
292702
|
+
pos: anchor.startPos + 1,
|
|
292703
|
+
node: schema.nodes.commentRangeStart.create(childAttrs),
|
|
292704
|
+
commentId: c.commentId,
|
|
292705
|
+
parentCommentId: getThreadingParentId(c)
|
|
292706
|
+
});
|
|
292707
|
+
endNodes.push({
|
|
292708
|
+
pos: anchor.endPos + 1,
|
|
292709
|
+
node: schema.nodes.commentRangeEnd.create(childAttrs),
|
|
292710
|
+
commentId: c.commentId,
|
|
292711
|
+
parentCommentId: getThreadingParentId(c)
|
|
292712
|
+
});
|
|
292713
|
+
});
|
|
292574
292714
|
startNodes.sort((a2, b$1) => {
|
|
292575
292715
|
if (a2.pos !== b$1.pos)
|
|
292576
292716
|
return a2.pos - b$1.pos;
|
|
@@ -310127,6 +310267,45 @@ menclose::after {
|
|
|
310127
310267
|
if (explicitSpec)
|
|
310128
310268
|
return explicitSpec;
|
|
310129
310269
|
return borderValueToSpec(fallback);
|
|
310270
|
+
}, BORDER_STYLE_NUMBER, BORDER_STYLE_LINES, isPresentBorder = (b$1) => !!b$1 && b$1.style !== undefined && b$1.style !== "none" && (b$1.width === undefined || b$1.width > 0), isExplicitNoneBorder = (b$1) => {
|
|
310271
|
+
if (!b$1 || typeof b$1 !== "object")
|
|
310272
|
+
return false;
|
|
310273
|
+
const r$1 = b$1;
|
|
310274
|
+
return r$1.style === "none" || r$1.none === true;
|
|
310275
|
+
}, borderWeight = (b$1) => (BORDER_STYLE_LINES[b$1.style] ?? 1) * (BORDER_STYLE_NUMBER[b$1.style] ?? 1), colorBrightness = (color2, formula) => {
|
|
310276
|
+
const hex = (color2 ?? "#000000").replace("#", "");
|
|
310277
|
+
if (hex.length < 6)
|
|
310278
|
+
return 0;
|
|
310279
|
+
return formula(parseInt(hex.slice(0, 2), 16), parseInt(hex.slice(2, 4), 16), parseInt(hex.slice(4, 6), 16));
|
|
310280
|
+
}, resolveBorderConflict = (a2, b$1) => {
|
|
310281
|
+
const pa = isPresentBorder(a2);
|
|
310282
|
+
const pb = isPresentBorder(b$1);
|
|
310283
|
+
if (!pa && !pb)
|
|
310284
|
+
return;
|
|
310285
|
+
if (!pa)
|
|
310286
|
+
return b$1;
|
|
310287
|
+
if (!pb)
|
|
310288
|
+
return a2;
|
|
310289
|
+
const wa = borderWeight(a2);
|
|
310290
|
+
const wb = borderWeight(b$1);
|
|
310291
|
+
if (wa !== wb)
|
|
310292
|
+
return wa > wb ? a2 : b$1;
|
|
310293
|
+
const na = BORDER_STYLE_NUMBER[a2.style] ?? 99;
|
|
310294
|
+
const nb = BORDER_STYLE_NUMBER[b$1.style] ?? 99;
|
|
310295
|
+
if (na !== nb)
|
|
310296
|
+
return na < nb ? a2 : b$1;
|
|
310297
|
+
const formulas = [
|
|
310298
|
+
(r$1, g$1, bl) => r$1 + bl + 2 * g$1,
|
|
310299
|
+
(_r, g$1, bl) => bl + 2 * g$1,
|
|
310300
|
+
(_r, g$1) => g$1
|
|
310301
|
+
];
|
|
310302
|
+
for (const f2 of formulas) {
|
|
310303
|
+
const ba = colorBrightness(a2.color, f2);
|
|
310304
|
+
const bb = colorBrightness(b$1.color, f2);
|
|
310305
|
+
if (ba !== bb)
|
|
310306
|
+
return ba < bb ? a2 : b$1;
|
|
310307
|
+
}
|
|
310308
|
+
return a2;
|
|
310130
310309
|
}, hasExplicitCellBorders = (cellBorders) => Boolean(cellBorders && (cellBorders.top !== undefined || cellBorders.right !== undefined || cellBorders.bottom !== undefined || cellBorders.left !== undefined)), resolveTableCellBorders = (tableBorders, cellPosition) => {
|
|
310131
310310
|
const cellBounds = getTableCellGridBounds(cellPosition);
|
|
310132
310311
|
return {
|
|
@@ -311966,8 +312145,21 @@ menclose::after {
|
|
|
311966
312145
|
}
|
|
311967
312146
|
}
|
|
311968
312147
|
return { cellElement: cellEl };
|
|
311969
|
-
}, hasAnyResolvedBorder = (borders) => Boolean(borders.top || borders.right || borders.bottom || borders.left), resolveRenderedCellBorders = ({ cellBorders, hasBordersAttribute, tableBorders, cellPosition, cellSpacingPx, continuesFromPrev, continuesOnNext }) => {
|
|
312148
|
+
}, hasAnyResolvedBorder = (borders) => Boolean(borders.top || borders.right || borders.bottom || borders.left), resolveRenderedCellBorders = ({ cellBorders, hasBordersAttribute, tableBorders, cellPosition, cellSpacingPx, continuesFromPrev, continuesOnNext, aboveCellBorders, leftCellBorders, rightCellBorders, nextRowLeavesRightGap, deferTopToAboveCell, nextRowSuppressesSharedTop }) => {
|
|
311970
312149
|
const hasExplicitBorders = hasExplicitCellBorders(cellBorders);
|
|
312150
|
+
const cellBounds = getTableCellGridBounds(cellPosition);
|
|
312151
|
+
const touchesTopBoundary = cellBounds.touchesTopEdge || continuesFromPrev;
|
|
312152
|
+
const touchesBottomBoundary = cellBounds.touchesBottomEdge || continuesOnNext || nextRowLeavesRightGap === true;
|
|
312153
|
+
const hasInteriorNeighborBorder = !touchesTopBoundary && !deferTopToAboveCell && isPresentBorder(aboveCellBorders?.bottom) || !cellBounds.touchesLeftEdge && isPresentBorder(leftCellBorders?.right);
|
|
312154
|
+
if (cellSpacingPx === 0 && (hasExplicitBorders || hasInteriorNeighborBorder)) {
|
|
312155
|
+
const cb = cellBorders ?? {};
|
|
312156
|
+
return {
|
|
312157
|
+
top: touchesTopBoundary ? resolveTableBorderValue(cb.top, tableBorders?.top) : deferTopToAboveCell ? undefined : resolveBorderConflict(cb.top, aboveCellBorders?.bottom) ?? (isExplicitNoneBorder(cb.top) && isExplicitNoneBorder(aboveCellBorders?.bottom) ? undefined : borderValueToSpec(tableBorders?.insideH)),
|
|
312158
|
+
left: cellBounds.touchesLeftEdge ? resolveTableBorderValue(cb.left, tableBorders?.left) : isPresentBorder(cb.left) ? resolveBorderConflict(cb.left, leftCellBorders?.right) ?? borderValueToSpec(tableBorders?.insideV) : isPresentBorder(leftCellBorders?.right) ? undefined : isExplicitNoneBorder(cb.left) && isExplicitNoneBorder(leftCellBorders?.right) ? undefined : borderValueToSpec(tableBorders?.insideV),
|
|
312159
|
+
right: cellBounds.touchesRightEdge ? resolveTableBorderValue(cb.right, tableBorders?.right) : isPresentBorder(cb.right) && !isPresentBorder(rightCellBorders?.left) ? cb.right : undefined,
|
|
312160
|
+
bottom: touchesBottomBoundary ? resolveTableBorderValue(cb.bottom, tableBorders?.bottom) : undefined
|
|
312161
|
+
};
|
|
312162
|
+
}
|
|
311971
312163
|
if (hasBordersAttribute && !hasExplicitBorders)
|
|
311972
312164
|
return;
|
|
311973
312165
|
if (!tableBorders)
|
|
@@ -311977,24 +312169,13 @@ menclose::after {
|
|
|
311977
312169
|
bottom: cellBorders.bottom,
|
|
311978
312170
|
left: cellBorders.left
|
|
311979
312171
|
} : undefined;
|
|
311980
|
-
|
|
311981
|
-
const touchesTopBoundary = cellBounds.touchesTopEdge || continuesFromPrev;
|
|
311982
|
-
const touchesBottomBoundary = cellBounds.touchesBottomEdge || continuesOnNext;
|
|
311983
|
-
if (hasExplicitBorders) {
|
|
311984
|
-
if (cellSpacingPx === 0)
|
|
311985
|
-
return {
|
|
311986
|
-
top: resolveTableBorderValue(cellBorders.top, touchesTopBoundary ? tableBorders.top : tableBorders.insideH),
|
|
311987
|
-
right: cellBounds.touchesRightEdge ? resolveTableBorderValue(cellBorders.right, tableBorders.right) : undefined,
|
|
311988
|
-
bottom: touchesBottomBoundary ? resolveTableBorderValue(cellBorders.bottom, tableBorders.bottom) : undefined,
|
|
311989
|
-
left: resolveTableBorderValue(cellBorders.left, cellBounds.touchesLeftEdge ? tableBorders.left : tableBorders.insideV)
|
|
311990
|
-
};
|
|
312172
|
+
if (hasExplicitBorders)
|
|
311991
312173
|
return {
|
|
311992
312174
|
top: resolveTableBorderValue(cellBorders.top, touchesTopBoundary ? tableBorders.top : tableBorders.insideH),
|
|
311993
312175
|
right: resolveTableBorderValue(cellBorders.right, cellBounds.touchesRightEdge ? tableBorders.right : undefined),
|
|
311994
312176
|
bottom: resolveTableBorderValue(cellBorders.bottom, touchesBottomBoundary ? tableBorders.bottom : undefined),
|
|
311995
312177
|
left: resolveTableBorderValue(cellBorders.left, cellBounds.touchesLeftEdge ? tableBorders.left : tableBorders.insideV)
|
|
311996
312178
|
};
|
|
311997
|
-
}
|
|
311998
312179
|
if (cellSpacingPx > 0) {
|
|
311999
312180
|
const interiorBorders = {
|
|
312000
312181
|
top: touchesTopBoundary ? undefined : borderValueToSpec(tableBorders.insideH),
|
|
@@ -312005,15 +312186,29 @@ menclose::after {
|
|
|
312005
312186
|
return hasAnyResolvedBorder(interiorBorders) ? interiorBorders : undefined;
|
|
312006
312187
|
}
|
|
312007
312188
|
const baseBorders = resolveTableCellBorders(tableBorders, cellPosition);
|
|
312189
|
+
const insideHSpec = borderValueToSpec(tableBorders.insideH);
|
|
312190
|
+
const interiorBottom = nextRowSuppressesSharedTop && isPresentBorder(insideHSpec) ? insideHSpec : baseBorders.bottom;
|
|
312008
312191
|
return {
|
|
312009
312192
|
top: touchesTopBoundary ? borderValueToSpec(tableBorders.top) : baseBorders.top,
|
|
312010
312193
|
right: baseBorders.right,
|
|
312011
|
-
bottom: touchesBottomBoundary ? borderValueToSpec(tableBorders.bottom) :
|
|
312194
|
+
bottom: touchesBottomBoundary ? borderValueToSpec(tableBorders.bottom) : interiorBottom,
|
|
312012
312195
|
left: baseBorders.left
|
|
312013
312196
|
};
|
|
312014
312197
|
}, renderTableRow = (deps) => {
|
|
312015
|
-
const { doc: doc$12, container, rowIndex, y: y$1, rowMeasure, row: row2, totalRows, tableBorders, columnWidths, allRowHeights, tableIndent, isRtl, context, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applySdtDataset: applySdtDataset$1, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, continuesFromPrev, continuesOnNext, partialRow, cellSpacingPx = 0, chrome: chrome2, resolvePhysical } = deps;
|
|
312198
|
+
const { doc: doc$12, container, rowIndex, y: y$1, rowMeasure, row: row2, prevRow, prevRowMeasure, nextRow, nextRowMeasure, rowOccupiedRightCol, nextRowOccupiedRightCol, totalRows, tableBorders, columnWidths, allRowHeights, tableIndent, isRtl, context, renderLine: renderLine$1, captureLineSnapshot, renderDrawingContent, applySdtDataset: applySdtDataset$1, ancestorContainerKey, ancestorContainerSdt, ancestorContainerKeys, ancestorContainerSdts, onSdtContainerChrome, continuesFromPrev, continuesOnNext, partialRow, cellSpacingPx = 0, chrome: chrome2, resolvePhysical } = deps;
|
|
312016
312199
|
const totalCols = columnWidths.length;
|
|
312200
|
+
const rowRightEdgeCol = rowOccupiedRightCol != null && rowOccupiedRightCol > 0 ? Math.min(totalCols, rowOccupiedRightCol) : rowMeasure.cells.length ? Math.min(totalCols, Math.max(...rowMeasure.cells.map((c) => (c.gridColumnStart ?? 0) + (c.colSpan ?? 1)))) : totalCols;
|
|
312201
|
+
const rowBorderOverride = row2?.attrs?.borders;
|
|
312202
|
+
const effectiveTableBorders = rowBorderOverride ? {
|
|
312203
|
+
...tableBorders ?? {},
|
|
312204
|
+
...rowBorderOverride
|
|
312205
|
+
} : tableBorders;
|
|
312206
|
+
const nextRowBorderOverride = nextRow?.attrs?.borders;
|
|
312207
|
+
const nextRowEffectiveInsideH = nextRowBorderOverride ? {
|
|
312208
|
+
...tableBorders ?? {},
|
|
312209
|
+
...nextRowBorderOverride
|
|
312210
|
+
}.insideH : undefined;
|
|
312211
|
+
const nextRowSuppressesSharedTop = nextRowBorderOverride !== undefined && !isPresentBorder(borderValueToSpec(nextRowEffectiveInsideH));
|
|
312017
312212
|
const calculateXPosition = (gridColumnStart) => {
|
|
312018
312213
|
let x = cellSpacingPx;
|
|
312019
312214
|
for (let i4 = 0;i4 < gridColumnStart && i4 < columnWidths.length; i4++)
|
|
@@ -312038,6 +312233,27 @@ menclose::after {
|
|
|
312038
312233
|
width += columnWidths[i4];
|
|
312039
312234
|
return width;
|
|
312040
312235
|
};
|
|
312236
|
+
const findCellBordersAtColumn = (cells, measureCells, gridCol) => {
|
|
312237
|
+
if (!cells || !measureCells)
|
|
312238
|
+
return;
|
|
312239
|
+
for (let i4 = 0;i4 < measureCells.length; i4++) {
|
|
312240
|
+
const start$1 = measureCells[i4].gridColumnStart ?? i4;
|
|
312241
|
+
const span = measureCells[i4].colSpan ?? 1;
|
|
312242
|
+
if (gridCol >= start$1 && gridCol < start$1 + span)
|
|
312243
|
+
return cells[i4]?.attrs?.borders;
|
|
312244
|
+
}
|
|
312245
|
+
};
|
|
312246
|
+
const findCellRightEdgeAtColumn = (measureCells, gridCol) => {
|
|
312247
|
+
if (!measureCells)
|
|
312248
|
+
return;
|
|
312249
|
+
for (let i4 = 0;i4 < measureCells.length; i4++) {
|
|
312250
|
+
const start$1 = measureCells[i4].gridColumnStart ?? i4;
|
|
312251
|
+
const span = measureCells[i4].colSpan ?? 1;
|
|
312252
|
+
if (gridCol >= start$1 && gridCol < start$1 + span)
|
|
312253
|
+
return start$1 + span;
|
|
312254
|
+
}
|
|
312255
|
+
};
|
|
312256
|
+
const nextRowMaxCol = nextRowOccupiedRightCol != null && nextRowOccupiedRightCol > 0 ? nextRowOccupiedRightCol : nextRowMeasure?.cells?.length ? Math.max(...nextRowMeasure.cells.map((c) => (c.gridColumnStart ?? 0) + (c.colSpan ?? 1))) : Infinity;
|
|
312041
312257
|
for (let cellIndex = 0;cellIndex < rowMeasure.cells.length; cellIndex += 1) {
|
|
312042
312258
|
const cellMeasure = rowMeasure.cells[cellIndex];
|
|
312043
312259
|
const cell2 = row2?.cells?.[cellIndex];
|
|
@@ -312046,21 +312262,34 @@ menclose::after {
|
|
|
312046
312262
|
const colSpan = cellMeasure.colSpan ?? 1;
|
|
312047
312263
|
let x = calculateXPosition(gridColumnStart);
|
|
312048
312264
|
const cellBordersAttr = cell2?.attrs?.borders;
|
|
312265
|
+
const hasBordersAttribute = cellBordersAttr !== undefined;
|
|
312266
|
+
const cellPosition = {
|
|
312267
|
+
rowIndex,
|
|
312268
|
+
rowSpan,
|
|
312269
|
+
gridColumnStart,
|
|
312270
|
+
colSpan,
|
|
312271
|
+
totalRows,
|
|
312272
|
+
totalCols: rowRightEdgeCol
|
|
312273
|
+
};
|
|
312274
|
+
const aboveCellBorders = findCellBordersAtColumn(prevRow?.cells, prevRowMeasure?.cells, gridColumnStart);
|
|
312275
|
+
const leftCellBorders = gridColumnStart > 0 ? findCellBordersAtColumn(row2?.cells, rowMeasure.cells, gridColumnStart - 1) : undefined;
|
|
312276
|
+
const rightCellBorders = findCellBordersAtColumn(row2?.cells, rowMeasure.cells, gridColumnStart + colSpan);
|
|
312277
|
+
const nextRowLeavesRightGap = gridColumnStart + colSpan > nextRowMaxCol;
|
|
312278
|
+
const aboveCellRightEdge = findCellRightEdgeAtColumn(prevRowMeasure?.cells, gridColumnStart);
|
|
312049
312279
|
const resolvedBorders = resolveRenderedCellBorders({
|
|
312050
312280
|
cellBorders: cellBordersAttr,
|
|
312051
|
-
hasBordersAttribute
|
|
312052
|
-
tableBorders,
|
|
312053
|
-
cellPosition
|
|
312054
|
-
rowIndex,
|
|
312055
|
-
rowSpan,
|
|
312056
|
-
gridColumnStart,
|
|
312057
|
-
colSpan,
|
|
312058
|
-
totalRows,
|
|
312059
|
-
totalCols
|
|
312060
|
-
},
|
|
312281
|
+
hasBordersAttribute,
|
|
312282
|
+
tableBorders: effectiveTableBorders,
|
|
312283
|
+
cellPosition,
|
|
312061
312284
|
cellSpacingPx,
|
|
312062
312285
|
continuesFromPrev: continuesFromPrev === true,
|
|
312063
|
-
continuesOnNext: continuesOnNext === true
|
|
312286
|
+
continuesOnNext: continuesOnNext === true,
|
|
312287
|
+
aboveCellBorders,
|
|
312288
|
+
leftCellBorders,
|
|
312289
|
+
rightCellBorders,
|
|
312290
|
+
nextRowLeavesRightGap,
|
|
312291
|
+
deferTopToAboveCell: aboveCellRightEdge !== undefined && aboveCellRightEdge > rowRightEdgeCol,
|
|
312292
|
+
nextRowSuppressesSharedTop
|
|
312064
312293
|
});
|
|
312065
312294
|
const finalBorders = isRtl && resolvedBorders ? swapCellBordersLR(resolvedBorders) : resolvedBorders;
|
|
312066
312295
|
let cellHeight;
|
|
@@ -312193,12 +312422,22 @@ menclose::after {
|
|
|
312193
312422
|
if (!rowMeasure)
|
|
312194
312423
|
continue;
|
|
312195
312424
|
const boundariesInRow = /* @__PURE__ */ new Set;
|
|
312425
|
+
const occupiedCols = /* @__PURE__ */ new Set;
|
|
312426
|
+
for (const cellMeasure of rowMeasure.cells) {
|
|
312427
|
+
const s2 = cellMeasure.gridColumnStart ?? 0;
|
|
312428
|
+
const sp = cellMeasure.colSpan ?? 1;
|
|
312429
|
+
for (let c = s2;c < s2 + sp; c++)
|
|
312430
|
+
occupiedCols.add(c);
|
|
312431
|
+
}
|
|
312432
|
+
const lastColIndex = columnCount - 1;
|
|
312433
|
+
const lastColMeta = fragment2.metadata.columnBoundaries[lastColIndex];
|
|
312434
|
+
const skipTrailingSpacerBoundary = lastColIndex > 0 && !occupiedCols.has(lastColIndex) && !!lastColMeta && typeof lastColMeta.width === "number" && typeof lastColMeta.minWidth === "number" && lastColMeta.width < lastColMeta.minWidth;
|
|
312196
312435
|
for (const cellMeasure of rowMeasure.cells) {
|
|
312197
312436
|
const startCol = cellMeasure.gridColumnStart ?? 0;
|
|
312198
312437
|
const endCol = startCol + (cellMeasure.colSpan ?? 1);
|
|
312199
312438
|
if (startCol > 0)
|
|
312200
312439
|
boundariesInRow.add(startCol);
|
|
312201
|
-
if (endCol < columnCount)
|
|
312440
|
+
if (endCol < columnCount && !(skipTrailingSpacerBoundary && endCol === lastColIndex))
|
|
312202
312441
|
boundariesInRow.add(endCol);
|
|
312203
312442
|
}
|
|
312204
312443
|
for (const boundaryCol of boundariesInRow) {
|
|
@@ -312255,6 +312494,16 @@ menclose::after {
|
|
|
312255
312494
|
return fragment2.partialRow.partialHeight;
|
|
312256
312495
|
return r$1?.height ?? 0;
|
|
312257
312496
|
});
|
|
312497
|
+
const rowOccupiedRightCols = new Array(measure.rows.length).fill(0);
|
|
312498
|
+
measure.rows.forEach((rowM, r$1) => {
|
|
312499
|
+
for (const c of rowM?.cells ?? []) {
|
|
312500
|
+
const right$1 = (c.gridColumnStart ?? 0) + (c.colSpan ?? 1);
|
|
312501
|
+
const lastRow = Math.min(measure.rows.length - 1, r$1 + (c.rowSpan ?? 1) - 1);
|
|
312502
|
+
for (let rr = r$1;rr <= lastRow; rr += 1)
|
|
312503
|
+
if (right$1 > rowOccupiedRightCols[rr])
|
|
312504
|
+
rowOccupiedRightCols[rr] = right$1;
|
|
312505
|
+
}
|
|
312506
|
+
});
|
|
312258
312507
|
let y$1 = cellSpacingPx;
|
|
312259
312508
|
if (fragment2.repeatHeaderCount && fragment2.repeatHeaderCount > 0)
|
|
312260
312509
|
for (let r$1 = 0;r$1 < fragment2.repeatHeaderCount; r$1 += 1) {
|
|
@@ -312268,6 +312517,12 @@ menclose::after {
|
|
|
312268
312517
|
y: y$1,
|
|
312269
312518
|
rowMeasure,
|
|
312270
312519
|
row: block.rows[r$1],
|
|
312520
|
+
prevRow: r$1 > 0 ? block.rows[r$1 - 1] : undefined,
|
|
312521
|
+
prevRowMeasure: r$1 > 0 ? measure.rows[r$1 - 1] : undefined,
|
|
312522
|
+
nextRow: r$1 < block.rows.length - 1 ? block.rows[r$1 + 1] : undefined,
|
|
312523
|
+
nextRowMeasure: r$1 < block.rows.length - 1 ? measure.rows[r$1 + 1] : undefined,
|
|
312524
|
+
rowOccupiedRightCol: rowOccupiedRightCols[r$1],
|
|
312525
|
+
nextRowOccupiedRightCol: rowOccupiedRightCols[r$1 + 1],
|
|
312271
312526
|
totalRows: block.rows.length,
|
|
312272
312527
|
tableBorders,
|
|
312273
312528
|
columnWidths: effectiveColumnWidths,
|
|
@@ -312386,6 +312641,12 @@ menclose::after {
|
|
|
312386
312641
|
y: y$1,
|
|
312387
312642
|
rowMeasure,
|
|
312388
312643
|
row: block.rows[r$1],
|
|
312644
|
+
prevRow: r$1 > 0 ? block.rows[r$1 - 1] : undefined,
|
|
312645
|
+
prevRowMeasure: r$1 > 0 ? measure.rows[r$1 - 1] : undefined,
|
|
312646
|
+
nextRow: r$1 < block.rows.length - 1 ? block.rows[r$1 + 1] : undefined,
|
|
312647
|
+
nextRowMeasure: r$1 < block.rows.length - 1 ? measure.rows[r$1 + 1] : undefined,
|
|
312648
|
+
rowOccupiedRightCol: rowOccupiedRightCols[r$1],
|
|
312649
|
+
nextRowOccupiedRightCol: rowOccupiedRightCols[r$1 + 1],
|
|
312389
312650
|
totalRows: block.rows.length,
|
|
312390
312651
|
tableBorders,
|
|
312391
312652
|
columnWidths: effectiveColumnWidths,
|
|
@@ -326263,19 +326524,19 @@ menclose::after {
|
|
|
326263
326524
|
return;
|
|
326264
326525
|
console.log(...args$1);
|
|
326265
326526
|
}, 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, TRACKED_MARK_NAMES;
|
|
326266
|
-
var
|
|
326527
|
+
var init_src_DYT7_l3i_es = __esm(() => {
|
|
326267
326528
|
init_rolldown_runtime_Bg48TavK_es();
|
|
326268
|
-
|
|
326529
|
+
init_SuperConverter_DBsJeu9t_es();
|
|
326269
326530
|
init_jszip_C49i9kUs_es();
|
|
326270
326531
|
init_xml_js_CqGKpaft_es();
|
|
326271
326532
|
init_uuid_qzgm05fK_es();
|
|
326272
|
-
|
|
326273
|
-
|
|
326533
|
+
init_create_headless_toolbar_BiY_0zZP_es();
|
|
326534
|
+
init_constants_D9qj59G2_es();
|
|
326274
326535
|
init_dist_B8HfvhaK_es();
|
|
326275
326536
|
init_unified_Dsuw2be5_es();
|
|
326276
326537
|
init_remark_gfm_BhnWr3yf_es();
|
|
326277
326538
|
init_remark_stringify_6MMJfY0k_es();
|
|
326278
|
-
|
|
326539
|
+
init_DocxZipper_Bu2Fhqkw_es();
|
|
326279
326540
|
init__plugin_vue_export_helper_5t5P5NuM_es();
|
|
326280
326541
|
init_eventemitter3_BnGqBE_Q_es();
|
|
326281
326542
|
init_errors_CNaD6vcg_es();
|
|
@@ -329350,6 +329611,17 @@ ${err.toString()}`);
|
|
|
329350
329611
|
dispatch
|
|
329351
329612
|
});
|
|
329352
329613
|
},
|
|
329614
|
+
resolveCommentThread: ({ comments } = {}) => ({ tr, dispatch, state }) => {
|
|
329615
|
+
tr.setMeta(CommentsPluginKey, { event: "update" });
|
|
329616
|
+
const converted = resolveCommentsInTr({
|
|
329617
|
+
items: comments,
|
|
329618
|
+
state,
|
|
329619
|
+
tr
|
|
329620
|
+
});
|
|
329621
|
+
if (converted)
|
|
329622
|
+
dispatch(tr);
|
|
329623
|
+
return converted;
|
|
329624
|
+
},
|
|
329353
329625
|
reopenComment: ({ commentId, importedId, internal }) => ({ tr, dispatch, state }) => {
|
|
329354
329626
|
tr.setMeta(CommentsPluginKey, { event: "update" });
|
|
329355
329627
|
return reopenCommentById({
|
|
@@ -353138,6 +353410,30 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
353138
353410
|
"wave",
|
|
353139
353411
|
"doubleWave"
|
|
353140
353412
|
]);
|
|
353413
|
+
BORDER_STYLE_NUMBER = {
|
|
353414
|
+
single: 1,
|
|
353415
|
+
thick: 2,
|
|
353416
|
+
double: 3,
|
|
353417
|
+
dotted: 4,
|
|
353418
|
+
dashed: 5,
|
|
353419
|
+
dotDash: 6,
|
|
353420
|
+
dotDotDash: 7,
|
|
353421
|
+
triple: 8,
|
|
353422
|
+
wave: 18,
|
|
353423
|
+
doubleWave: 19
|
|
353424
|
+
};
|
|
353425
|
+
BORDER_STYLE_LINES = {
|
|
353426
|
+
single: 1,
|
|
353427
|
+
thick: 1,
|
|
353428
|
+
double: 2,
|
|
353429
|
+
dotted: 1,
|
|
353430
|
+
dashed: 1,
|
|
353431
|
+
dotDash: 1,
|
|
353432
|
+
dotDotDash: 1,
|
|
353433
|
+
triple: 3,
|
|
353434
|
+
wave: 1,
|
|
353435
|
+
doubleWave: 2
|
|
353436
|
+
};
|
|
353141
353437
|
SETTLED_STATUSES = [
|
|
353142
353438
|
"loaded",
|
|
353143
353439
|
"failed",
|
|
@@ -353149,7 +353445,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
353149
353445
|
cambria: "Caladea",
|
|
353150
353446
|
arial: "Liberation Sans",
|
|
353151
353447
|
"times new roman": "Liberation Serif",
|
|
353152
|
-
"courier new": "Liberation Mono"
|
|
353448
|
+
"courier new": "Liberation Mono",
|
|
353449
|
+
helvetica: "Liberation Sans"
|
|
353153
353450
|
});
|
|
353154
353451
|
defaultResolver = new FontResolver;
|
|
353155
353452
|
DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
|
|
@@ -360978,11 +361275,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
360978
361275
|
]);
|
|
360979
361276
|
});
|
|
360980
361277
|
|
|
360981
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
361278
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-k5vyPmpN.es.js
|
|
360982
361279
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
360983
|
-
var
|
|
360984
|
-
|
|
360985
|
-
|
|
361280
|
+
var init_create_super_doc_ui_k5vyPmpN_es = __esm(() => {
|
|
361281
|
+
init_SuperConverter_DBsJeu9t_es();
|
|
361282
|
+
init_create_headless_toolbar_BiY_0zZP_es();
|
|
360986
361283
|
MOD_ALIASES = new Set([
|
|
360987
361284
|
"Mod",
|
|
360988
361285
|
"Meta",
|
|
@@ -361024,16 +361321,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
361024
361321
|
|
|
361025
361322
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
361026
361323
|
var init_super_editor_es = __esm(() => {
|
|
361027
|
-
|
|
361028
|
-
|
|
361324
|
+
init_src_DYT7_l3i_es();
|
|
361325
|
+
init_SuperConverter_DBsJeu9t_es();
|
|
361029
361326
|
init_jszip_C49i9kUs_es();
|
|
361030
361327
|
init_xml_js_CqGKpaft_es();
|
|
361031
|
-
|
|
361032
|
-
|
|
361328
|
+
init_create_headless_toolbar_BiY_0zZP_es();
|
|
361329
|
+
init_constants_D9qj59G2_es();
|
|
361033
361330
|
init_dist_B8HfvhaK_es();
|
|
361034
361331
|
init_unified_Dsuw2be5_es();
|
|
361035
|
-
|
|
361036
|
-
|
|
361332
|
+
init_DocxZipper_Bu2Fhqkw_es();
|
|
361333
|
+
init_create_super_doc_ui_k5vyPmpN_es();
|
|
361037
361334
|
init_ui_C5PAS9hY_es();
|
|
361038
361335
|
init_eventemitter3_BnGqBE_Q_es();
|
|
361039
361336
|
init_errors_CNaD6vcg_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.16.0-next.
|
|
3
|
+
"version": "0.16.0-next.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@superdoc-dev/cli-darwin-arm64": "0.16.0-next.
|
|
37
|
-
"@superdoc-dev/cli-darwin-x64": "0.16.0-next.
|
|
38
|
-
"@superdoc-dev/cli-linux-arm64": "0.16.0-next.
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
36
|
+
"@superdoc-dev/cli-darwin-arm64": "0.16.0-next.26",
|
|
37
|
+
"@superdoc-dev/cli-darwin-x64": "0.16.0-next.26",
|
|
38
|
+
"@superdoc-dev/cli-linux-arm64": "0.16.0-next.26",
|
|
39
|
+
"@superdoc-dev/cli-windows-x64": "0.16.0-next.26",
|
|
40
|
+
"@superdoc-dev/cli-linux-x64": "0.16.0-next.26"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"predev": "node scripts/ensure-superdoc-build.js",
|