@superdoc-dev/cli 0.8.0-next.7 → 0.8.0-next.8
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 +148 -27
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -65501,7 +65501,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
65501
65501
|
emptyOptions2 = {};
|
|
65502
65502
|
});
|
|
65503
65503
|
|
|
65504
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
65504
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-BAHIipyN.es.js
|
|
65505
65505
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
65506
65506
|
const fieldValue = extension$1.config[field];
|
|
65507
65507
|
if (typeof fieldValue === "function")
|
|
@@ -92965,7 +92965,19 @@ function parseDisplay(instruction) {
|
|
|
92965
92965
|
function extractResolvedText$2(content$2) {
|
|
92966
92966
|
if (!Array.isArray(content$2))
|
|
92967
92967
|
return "";
|
|
92968
|
-
|
|
92968
|
+
let out = "";
|
|
92969
|
+
const walk = (nodes) => {
|
|
92970
|
+
for (const node3 of nodes) {
|
|
92971
|
+
if (!node3)
|
|
92972
|
+
continue;
|
|
92973
|
+
if (node3.type === "text")
|
|
92974
|
+
out += node3.text || "";
|
|
92975
|
+
else if (Array.isArray(node3.content))
|
|
92976
|
+
walk(node3.content);
|
|
92977
|
+
}
|
|
92978
|
+
};
|
|
92979
|
+
walk(content$2);
|
|
92980
|
+
return out;
|
|
92969
92981
|
}
|
|
92970
92982
|
function parseCitationSourceIds(instruction) {
|
|
92971
92983
|
const parts = instruction.trim().split(/\s+/);
|
|
@@ -115488,7 +115500,7 @@ var isRegExp = (value) => {
|
|
|
115488
115500
|
}),
|
|
115489
115501
|
consumed: 1
|
|
115490
115502
|
};
|
|
115491
|
-
}, alternateChoiceHandler, autoPageHandlerEntity, autoTotalPageCountEntity, documentStatFieldHandlerEntity, pageReferenceEntity, handlePictNode = (params3) => {
|
|
115503
|
+
}, alternateChoiceHandler, autoPageHandlerEntity, autoTotalPageCountEntity, documentStatFieldHandlerEntity, pageReferenceEntity, crossReferenceEntity, handlePictNode = (params3) => {
|
|
115492
115504
|
const { nodes } = params3;
|
|
115493
115505
|
if (!Array.isArray(nodes) || nodes.length === 0 || nodes[0]?.name !== "w:pict")
|
|
115494
115506
|
return {
|
|
@@ -116301,6 +116313,7 @@ var isRegExp = (value) => {
|
|
|
116301
116313
|
autoTotalPageCountEntity,
|
|
116302
116314
|
documentStatFieldHandlerEntity,
|
|
116303
116315
|
pageReferenceEntity,
|
|
116316
|
+
crossReferenceEntity,
|
|
116304
116317
|
permStartHandlerEntity,
|
|
116305
116318
|
permEndHandlerEntity,
|
|
116306
116319
|
mathNodeHandlerEntity,
|
|
@@ -117383,7 +117396,7 @@ var isRegExp = (value) => {
|
|
|
117383
117396
|
state.kern = kernNode.attributes["w:val"];
|
|
117384
117397
|
}
|
|
117385
117398
|
}, SuperConverter;
|
|
117386
|
-
var
|
|
117399
|
+
var init_SuperConverter_BAHIipyN_es = __esm(() => {
|
|
117387
117400
|
init_rolldown_runtime_Bg48TavK_es();
|
|
117388
117401
|
init_jszip_C49i9kUs_es();
|
|
117389
117402
|
init_xml_js_CqGKpaft_es();
|
|
@@ -153318,6 +153331,7 @@ var init_SuperConverter_C9KA8XsK_es = __esm(() => {
|
|
|
153318
153331
|
autoTotalPageCountEntity = generateV2HandlerEntity("autoTotalPageCountEntity", translator$26);
|
|
153319
153332
|
documentStatFieldHandlerEntity = generateV2HandlerEntity("documentStatFieldHandler", translator$27);
|
|
153320
153333
|
pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$15);
|
|
153334
|
+
crossReferenceEntity = generateV2HandlerEntity("crossReferenceNodeHandler", translator$16);
|
|
153321
153335
|
pictNodeHandlerEntity = {
|
|
153322
153336
|
handlerName: "handlePictNode",
|
|
153323
153337
|
handler: handlePictNode
|
|
@@ -154745,7 +154759,7 @@ var init_SuperConverter_C9KA8XsK_es = __esm(() => {
|
|
|
154745
154759
|
};
|
|
154746
154760
|
});
|
|
154747
154761
|
|
|
154748
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
154762
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-Cbz5y5Sr.es.js
|
|
154749
154763
|
function parseSizeUnit(val = "0") {
|
|
154750
154764
|
const length3 = val.toString() || "0";
|
|
154751
154765
|
const value = Number.parseFloat(length3);
|
|
@@ -157337,8 +157351,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
157337
157351
|
}
|
|
157338
157352
|
};
|
|
157339
157353
|
};
|
|
157340
|
-
var
|
|
157341
|
-
|
|
157354
|
+
var init_create_headless_toolbar_Cbz5y5Sr_es = __esm(() => {
|
|
157355
|
+
init_SuperConverter_BAHIipyN_es();
|
|
157342
157356
|
init_constants_CGhJRd87_es();
|
|
157343
157357
|
init_dist_B8HfvhaK_es();
|
|
157344
157358
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -206025,7 +206039,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
206025
206039
|
init_remark_gfm_BhnWr3yf_es();
|
|
206026
206040
|
});
|
|
206027
206041
|
|
|
206028
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
206042
|
+
// ../../packages/superdoc/dist/chunks/src-CV2l3MQF.es.js
|
|
206029
206043
|
function deleteProps(obj, propOrProps) {
|
|
206030
206044
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
206031
206045
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -257754,6 +257768,15 @@ function pageReferenceNodeToBlock(params$1) {
|
|
|
257754
257768
|
bookmarkId,
|
|
257755
257769
|
instruction
|
|
257756
257770
|
};
|
|
257771
|
+
if (/\\h\b/i.test(instruction)) {
|
|
257772
|
+
const synthesized = buildFlowRunLink({ anchor: bookmarkId });
|
|
257773
|
+
if (synthesized)
|
|
257774
|
+
tokenRun.link = tokenRun.link ? {
|
|
257775
|
+
...tokenRun.link,
|
|
257776
|
+
...synthesized,
|
|
257777
|
+
anchor: bookmarkId
|
|
257778
|
+
} : synthesized;
|
|
257779
|
+
}
|
|
257757
257780
|
if (sdtMetadata)
|
|
257758
257781
|
tokenRun.sdt = sdtMetadata;
|
|
257759
257782
|
return tokenRun;
|
|
@@ -257860,7 +257883,8 @@ function fieldAnnotationNodeToRun({ node: node3, positions }) {
|
|
|
257860
257883
|
run2.sdt = fieldMetadata;
|
|
257861
257884
|
return run2;
|
|
257862
257885
|
}
|
|
257863
|
-
function bookmarkStartNodeToBlocks(
|
|
257886
|
+
function bookmarkStartNodeToBlocks(params$1) {
|
|
257887
|
+
const { node: node3, positions, bookmarks, visitNode, inheritedMarks, sdtMetadata, runProperties, converterContext } = params$1;
|
|
257864
257888
|
const nodeAttrs = typeof node3.attrs === "object" && node3.attrs !== null ? node3.attrs : {};
|
|
257865
257889
|
const bookmarkName = typeof nodeAttrs.name === "string" ? nodeAttrs.name : undefined;
|
|
257866
257890
|
if (bookmarkName && bookmarks) {
|
|
@@ -257868,8 +257892,54 @@ function bookmarkStartNodeToBlocks({ node: node3, positions, bookmarks, visitNod
|
|
|
257868
257892
|
if (nodePos)
|
|
257869
257893
|
bookmarks.set(bookmarkName, nodePos.start);
|
|
257870
257894
|
}
|
|
257895
|
+
const shouldRender = converterContext?.showBookmarks === true && typeof bookmarkName === "string" && !bookmarkName.startsWith("_");
|
|
257896
|
+
let run2;
|
|
257897
|
+
if (shouldRender) {
|
|
257898
|
+
run2 = textNodeToRun({
|
|
257899
|
+
...params$1,
|
|
257900
|
+
node: {
|
|
257901
|
+
type: "text",
|
|
257902
|
+
text: "[",
|
|
257903
|
+
marks: [...node3.marks ?? []]
|
|
257904
|
+
}
|
|
257905
|
+
});
|
|
257906
|
+
run2.dataAttrs = {
|
|
257907
|
+
...run2.dataAttrs ?? {},
|
|
257908
|
+
"data-bookmark-name": bookmarkName,
|
|
257909
|
+
"data-bookmark-marker": "start"
|
|
257910
|
+
};
|
|
257911
|
+
const bookmarkIdRaw = nodeAttrs.id;
|
|
257912
|
+
const bookmarkId = typeof bookmarkIdRaw === "string" || typeof bookmarkIdRaw === "number" ? String(bookmarkIdRaw) : "";
|
|
257913
|
+
if (bookmarkId && converterContext?.renderedBookmarkIds)
|
|
257914
|
+
converterContext.renderedBookmarkIds.add(bookmarkId);
|
|
257915
|
+
}
|
|
257871
257916
|
if (Array.isArray(node3.content))
|
|
257872
257917
|
node3.content.forEach((child) => visitNode(child, inheritedMarks, sdtMetadata, runProperties));
|
|
257918
|
+
return run2;
|
|
257919
|
+
}
|
|
257920
|
+
function bookmarkEndNodeToRun(params$1) {
|
|
257921
|
+
const { node: node3, converterContext } = params$1;
|
|
257922
|
+
if (converterContext?.showBookmarks !== true)
|
|
257923
|
+
return;
|
|
257924
|
+
const nodeAttrs = typeof node3.attrs === "object" && node3.attrs !== null ? node3.attrs : {};
|
|
257925
|
+
const bookmarkId = typeof nodeAttrs.id === "string" || typeof nodeAttrs.id === "number" ? String(nodeAttrs.id) : "";
|
|
257926
|
+
const rendered = converterContext?.renderedBookmarkIds;
|
|
257927
|
+
if (rendered && bookmarkId && !rendered.has(bookmarkId))
|
|
257928
|
+
return;
|
|
257929
|
+
const run2 = textNodeToRun({
|
|
257930
|
+
...params$1,
|
|
257931
|
+
node: {
|
|
257932
|
+
type: "text",
|
|
257933
|
+
text: "]",
|
|
257934
|
+
marks: [...node3.marks ?? []]
|
|
257935
|
+
}
|
|
257936
|
+
});
|
|
257937
|
+
run2.dataAttrs = {
|
|
257938
|
+
...run2.dataAttrs ?? {},
|
|
257939
|
+
"data-bookmark-marker": "end",
|
|
257940
|
+
...bookmarkId ? { "data-bookmark-id": bookmarkId } : {}
|
|
257941
|
+
};
|
|
257942
|
+
return run2;
|
|
257873
257943
|
}
|
|
257874
257944
|
function tabNodeToRun({ node: node3, positions, tabOrdinal, paragraphAttrs, inheritedMarks, sdtMetadata }) {
|
|
257875
257945
|
const pos = positions.get(node3);
|
|
@@ -258010,11 +258080,11 @@ function isInlineImage(node3) {
|
|
|
258010
258080
|
return false;
|
|
258011
258081
|
}
|
|
258012
258082
|
function crossReferenceNodeToRun(params$1) {
|
|
258013
|
-
const { node: node3, positions,
|
|
258083
|
+
const { node: node3, positions, sdtMetadata } = params$1;
|
|
258014
258084
|
const attrs = node3.attrs ?? {};
|
|
258015
|
-
const resolvedText = attrs.resolvedText
|
|
258016
|
-
|
|
258017
|
-
|
|
258085
|
+
const resolvedText = typeof attrs.resolvedText === "string" ? attrs.resolvedText : "";
|
|
258086
|
+
const target = typeof attrs.target === "string" ? attrs.target : "";
|
|
258087
|
+
const instruction = typeof attrs.instruction === "string" ? attrs.instruction : "";
|
|
258018
258088
|
const run2 = textNodeToRun({
|
|
258019
258089
|
...params$1,
|
|
258020
258090
|
node: {
|
|
@@ -258023,6 +258093,15 @@ function crossReferenceNodeToRun(params$1) {
|
|
|
258023
258093
|
marks: [...node3.marks ?? []]
|
|
258024
258094
|
}
|
|
258025
258095
|
});
|
|
258096
|
+
if (target && /\\h\b/i.test(instruction)) {
|
|
258097
|
+
const synthesized = buildFlowRunLink({ anchor: target });
|
|
258098
|
+
if (synthesized)
|
|
258099
|
+
run2.link = run2.link ? {
|
|
258100
|
+
...run2.link,
|
|
258101
|
+
...synthesized,
|
|
258102
|
+
anchor: target
|
|
258103
|
+
} : synthesized;
|
|
258104
|
+
}
|
|
258026
258105
|
const pos = positions.get(node3);
|
|
258027
258106
|
if (pos) {
|
|
258028
258107
|
run2.pmStart = pos.start;
|
|
@@ -259130,6 +259209,10 @@ function toFlowBlocks(pmDoc, options) {
|
|
|
259130
259209
|
const enableComments = options?.enableComments ?? true;
|
|
259131
259210
|
const themeColors = options?.themeColors;
|
|
259132
259211
|
const converterContext = normalizeConverterContext(options?.converterContext, defaultFont, defaultSize);
|
|
259212
|
+
if (options?.showBookmarks !== undefined)
|
|
259213
|
+
converterContext.showBookmarks = options.showBookmarks;
|
|
259214
|
+
if (converterContext.showBookmarks)
|
|
259215
|
+
converterContext.renderedBookmarkIds = /* @__PURE__ */ new Set;
|
|
259133
259216
|
const blocks2 = [];
|
|
259134
259217
|
const bookmarks = /* @__PURE__ */ new Map;
|
|
259135
259218
|
const positions = options?.positions ?? (options?.atomNodeTypes ? buildPositionMap(doc$12, { atomNodeTypes: options.atomNodeTypes }) : buildPositionMap(doc$12));
|
|
@@ -267966,7 +268049,10 @@ var Node$13 = class Node$14 {
|
|
|
267966
268049
|
};
|
|
267967
268050
|
}
|
|
267968
268051
|
#updateListStyles() {
|
|
267969
|
-
|
|
268052
|
+
const listRendering = this.node.attrs.listRendering;
|
|
268053
|
+
if (!listRendering)
|
|
268054
|
+
return true;
|
|
268055
|
+
let { suffix, justification } = listRendering;
|
|
267970
268056
|
suffix = suffix ?? "tab";
|
|
267971
268057
|
this.#calculateMarkerStyle(justification);
|
|
267972
268058
|
if (suffix === "tab") {
|
|
@@ -267996,6 +268082,8 @@ var Node$13 = class Node$14 {
|
|
|
267996
268082
|
return false;
|
|
267997
268083
|
}
|
|
267998
268084
|
#initList(listRendering) {
|
|
268085
|
+
if (!listRendering)
|
|
268086
|
+
return;
|
|
267999
268087
|
this.#createMarker(listRendering.markerText);
|
|
268000
268088
|
this.#createSeparator(listRendering.suffix);
|
|
268001
268089
|
}
|
|
@@ -278048,6 +278136,21 @@ var Node$13 = class Node$14 {
|
|
|
278048
278136
|
}
|
|
278049
278137
|
}
|
|
278050
278138
|
|
|
278139
|
+
/* SD-2454: bookmark bracket indicators.
|
|
278140
|
+
* When the showBookmarks layout option is enabled, the pm-adapter emits
|
|
278141
|
+
* [ and ] marker TextRuns at bookmark start/end positions. Mirror Word's
|
|
278142
|
+
* visual treatment: subtle gray, non-selectable so users can't accidentally
|
|
278143
|
+
* include the brackets in copied text. The bookmark name is surfaced via
|
|
278144
|
+
* the native title tooltip on the opening bracket. */
|
|
278145
|
+
[data-bookmark-marker="start"],
|
|
278146
|
+
[data-bookmark-marker="end"] {
|
|
278147
|
+
color: #8b8b8b;
|
|
278148
|
+
user-select: none;
|
|
278149
|
+
cursor: default;
|
|
278150
|
+
font-weight: normal;
|
|
278151
|
+
}
|
|
278152
|
+
|
|
278153
|
+
|
|
278051
278154
|
/* Reduced motion support */
|
|
278052
278155
|
@media (prefers-reduced-motion: reduce) {
|
|
278053
278156
|
.superdoc-link {
|
|
@@ -280690,7 +280793,7 @@ menclose::after {
|
|
|
280690
280793
|
].join("|");
|
|
280691
280794
|
}
|
|
280692
280795
|
return base5;
|
|
280693
|
-
}, getSdtMetadataId = (metadata) => {
|
|
280796
|
+
}, 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, getSdtMetadataId = (metadata) => {
|
|
280694
280797
|
if (!metadata)
|
|
280695
280798
|
return "";
|
|
280696
280799
|
if ("id" in metadata && metadata.id != null)
|
|
@@ -287811,9 +287914,7 @@ menclose::after {
|
|
|
287811
287914
|
}
|
|
287812
287915
|
#handleLinkClick(event, linkEl) {
|
|
287813
287916
|
const href = linkEl.getAttribute("href") ?? "";
|
|
287814
|
-
|
|
287815
|
-
const isTocLink = linkEl.closest(".superdoc-toc-entry") !== null;
|
|
287816
|
-
if (isAnchorLink && isTocLink) {
|
|
287917
|
+
if (href.startsWith("#") && href.length > 1) {
|
|
287817
287918
|
event.preventDefault();
|
|
287818
287919
|
event.stopPropagation();
|
|
287819
287920
|
this.#callbacks.goToAnchor?.(href);
|
|
@@ -290745,12 +290846,12 @@ menclose::after {
|
|
|
290745
290846
|
return;
|
|
290746
290847
|
console.log(...args$1);
|
|
290747
290848
|
}, 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;
|
|
290748
|
-
var
|
|
290849
|
+
var init_src_CV2l3MQF_es = __esm(() => {
|
|
290749
290850
|
init_rolldown_runtime_Bg48TavK_es();
|
|
290750
|
-
|
|
290851
|
+
init_SuperConverter_BAHIipyN_es();
|
|
290751
290852
|
init_jszip_C49i9kUs_es();
|
|
290752
290853
|
init_uuid_qzgm05fK_es();
|
|
290753
|
-
|
|
290854
|
+
init_create_headless_toolbar_Cbz5y5Sr_es();
|
|
290754
290855
|
init_constants_CGhJRd87_es();
|
|
290755
290856
|
init_dist_B8HfvhaK_es();
|
|
290756
290857
|
init_unified_Dsuw2be5_es();
|
|
@@ -317651,11 +317752,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
317651
317752
|
const resolvedItem = this.getResolvedFragmentItem(pageIndex, index2);
|
|
317652
317753
|
if (current) {
|
|
317653
317754
|
existing.delete(key2);
|
|
317755
|
+
const geometryChanged = hasFragmentGeometryChanged(current.fragment, fragment2);
|
|
317654
317756
|
const sdtBoundaryMismatch = shouldRebuildForSdtBoundary(current.element, sdtBoundary);
|
|
317655
317757
|
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) : "");
|
|
317656
317758
|
const newPmStart = fragment2.pmStart;
|
|
317657
317759
|
const mappingUnreliable = this.currentMapping != null && newPmStart != null && current.element.dataset.pmStart != null && this.currentMapping.map(Number(current.element.dataset.pmStart)) !== newPmStart;
|
|
317658
|
-
if (this.changedBlocks.has(fragment2.blockId) || current.signature !== fragmentSignature(fragment2, this.blockLookup) || sdtBoundaryMismatch || betweenBorderMismatch || mappingUnreliable) {
|
|
317760
|
+
if (geometryChanged || this.changedBlocks.has(fragment2.blockId) || current.signature !== fragmentSignature(fragment2, this.blockLookup) || sdtBoundaryMismatch || betweenBorderMismatch || mappingUnreliable) {
|
|
317659
317761
|
const replacement = this.renderFragment(fragment2, contextBase, sdtBoundary, betweenInfo, resolvedItem);
|
|
317660
317762
|
pageEl.replaceChild(replacement, current.element);
|
|
317661
317763
|
current.element = replacement;
|
|
@@ -319330,6 +319432,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
319330
319432
|
}
|
|
319331
319433
|
elem.style.zIndex = "1";
|
|
319332
319434
|
applyRunDataAttributes(elem, run2.dataAttrs);
|
|
319435
|
+
const bookmarkName = run2.dataAttrs?.["data-bookmark-name"];
|
|
319436
|
+
if (bookmarkName)
|
|
319437
|
+
elem.title = bookmarkName;
|
|
319333
319438
|
assertPmPositions(run2, "paragraph text run");
|
|
319334
319439
|
if (run2.pmStart != null)
|
|
319335
319440
|
elem.dataset.pmStart = String(run2.pmStart);
|
|
@@ -320784,6 +320889,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
320784
320889
|
citation: { inlineConverter: citationNodeToRun },
|
|
320785
320890
|
authorityEntry: { inlineConverter: authorityEntryNodeToRun },
|
|
320786
320891
|
bookmarkStart: { inlineConverter: bookmarkStartNodeToBlocks },
|
|
320892
|
+
bookmarkEnd: { inlineConverter: bookmarkEndNodeToRun },
|
|
320787
320893
|
tab: { inlineConverter: tabNodeToRun },
|
|
320788
320894
|
image: {
|
|
320789
320895
|
inlineConverter: imageNodeToRun,
|
|
@@ -321657,7 +321763,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
321657
321763
|
trackedChanges: options.layoutEngineOptions?.trackedChanges,
|
|
321658
321764
|
emitCommentPositionsInViewing: options.layoutEngineOptions?.emitCommentPositionsInViewing,
|
|
321659
321765
|
enableCommentsInViewing: options.layoutEngineOptions?.enableCommentsInViewing,
|
|
321660
|
-
presence: validatedPresence
|
|
321766
|
+
presence: validatedPresence,
|
|
321767
|
+
showBookmarks: options.layoutEngineOptions?.showBookmarks ?? false
|
|
321661
321768
|
};
|
|
321662
321769
|
this.#trackedChangesOverrides = options.layoutEngineOptions?.trackedChanges;
|
|
321663
321770
|
this.#viewportHost = doc$12.createElement("div");
|
|
@@ -322438,6 +322545,15 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
322438
322545
|
this.#pendingDocChange = true;
|
|
322439
322546
|
this.#scheduleRerender();
|
|
322440
322547
|
}
|
|
322548
|
+
setShowBookmarks(showBookmarks) {
|
|
322549
|
+
const next2 = !!showBookmarks;
|
|
322550
|
+
if (this.#layoutOptions.showBookmarks === next2)
|
|
322551
|
+
return;
|
|
322552
|
+
this.#layoutOptions.showBookmarks = next2;
|
|
322553
|
+
this.#flowBlockCache?.clear();
|
|
322554
|
+
this.#pendingDocChange = true;
|
|
322555
|
+
this.#scheduleRerender();
|
|
322556
|
+
}
|
|
322441
322557
|
hitTest(clientX, clientY) {
|
|
322442
322558
|
const normalized = this.#normalizeClientPoint(clientX, clientY);
|
|
322443
322559
|
if (!normalized)
|
|
@@ -323798,6 +323914,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
323798
323914
|
themeColors: this.#editor?.converter?.themeColors ?? undefined,
|
|
323799
323915
|
converterContext,
|
|
323800
323916
|
flowBlockCache: this.#flowBlockCache,
|
|
323917
|
+
showBookmarks: this.#layoutOptions.showBookmarks ?? false,
|
|
323801
323918
|
...positionMap ? { positions: positionMap } : {},
|
|
323802
323919
|
...atomNodeTypes.length > 0 ? { atomNodeTypes } : {}
|
|
323803
323920
|
});
|
|
@@ -324904,7 +325021,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
324904
325021
|
const pageHeight = layout.pages[i4]?.size?.h ?? defaultHeight;
|
|
324905
325022
|
yPosition += pageHeight + virtualGap;
|
|
324906
325023
|
}
|
|
324907
|
-
if (this.#
|
|
325024
|
+
if (this.#scrollContainer instanceof Window)
|
|
325025
|
+
this.#scrollContainer.scrollTo({ top: yPosition });
|
|
325026
|
+
else if (this.#scrollContainer)
|
|
325027
|
+
this.#scrollContainer.scrollTop = yPosition;
|
|
325028
|
+
if (this.#visibleHost && this.#visibleHost !== this.#scrollContainer)
|
|
324908
325029
|
this.#visibleHost.scrollTop = yPosition;
|
|
324909
325030
|
}
|
|
324910
325031
|
static {
|
|
@@ -325702,11 +325823,11 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
325702
325823
|
|
|
325703
325824
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
325704
325825
|
var init_super_editor_es = __esm(() => {
|
|
325705
|
-
|
|
325706
|
-
|
|
325826
|
+
init_src_CV2l3MQF_es();
|
|
325827
|
+
init_SuperConverter_BAHIipyN_es();
|
|
325707
325828
|
init_jszip_C49i9kUs_es();
|
|
325708
325829
|
init_xml_js_CqGKpaft_es();
|
|
325709
|
-
|
|
325830
|
+
init_create_headless_toolbar_Cbz5y5Sr_es();
|
|
325710
325831
|
init_constants_CGhJRd87_es();
|
|
325711
325832
|
init_dist_B8HfvhaK_es();
|
|
325712
325833
|
init_unified_Dsuw2be5_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.8.0-next.
|
|
3
|
+
"version": "0.8.0-next.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
28
|
"superdoc": "1.28.0",
|
|
29
|
-
"@superdoc/
|
|
30
|
-
"@superdoc/
|
|
29
|
+
"@superdoc/pm-adapter": "0.0.0",
|
|
30
|
+
"@superdoc/super-editor": "0.0.1"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.
|
|
39
|
-
"@superdoc-dev/cli-linux-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.8",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.8",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.8",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.8",
|
|
41
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.8"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|