@superdoc-dev/cli 0.3.0-next.1 → 0.3.0-next.2
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 +188 -44
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -38858,7 +38858,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
|
|
|
38858
38858
|
emptyOptions2 = {};
|
|
38859
38859
|
});
|
|
38860
38860
|
|
|
38861
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
38861
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-i9G7_t3u.es.js
|
|
38862
38862
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
38863
38863
|
const fieldValue = extension$1.config[field];
|
|
38864
38864
|
if (typeof fieldValue === "function")
|
|
@@ -75103,7 +75103,11 @@ var isRegExp = (value) => {
|
|
|
75103
75103
|
}
|
|
75104
75104
|
#generate_xml_as_list(data, debug = false) {
|
|
75105
75105
|
const json = JSON.parse(JSON.stringify(data));
|
|
75106
|
-
const declaration = this.converter.declaration
|
|
75106
|
+
const declaration = this.converter.declaration?.attributes ?? {
|
|
75107
|
+
version: "1.0",
|
|
75108
|
+
encoding: "UTF-8",
|
|
75109
|
+
standalone: "yes"
|
|
75110
|
+
};
|
|
75107
75111
|
return [`<?xml${Object.entries(declaration).map(([key, value]) => ` ${key}="${value}"`).join("")}?>`, ...this.#generateXml(json, debug)];
|
|
75108
75112
|
}
|
|
75109
75113
|
#replaceSpecialCharacters(text$2) {
|
|
@@ -75686,7 +75690,7 @@ var isRegExp = (value) => {
|
|
|
75686
75690
|
state.kern = kernNode.attributes["w:val"];
|
|
75687
75691
|
}
|
|
75688
75692
|
}, SuperConverter;
|
|
75689
|
-
var
|
|
75693
|
+
var init_SuperConverter_i9G7_t3u_es = __esm(() => {
|
|
75690
75694
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
75691
75695
|
init_jszip_ChlR43oI_es();
|
|
75692
75696
|
init_xml_js_BtmJ6bNs_es();
|
|
@@ -110431,7 +110435,7 @@ var init_remark_stringify_D8vxv_XI_es = __esm(() => {
|
|
|
110431
110435
|
eol = /\r?\n|\r/g;
|
|
110432
110436
|
});
|
|
110433
110437
|
|
|
110434
|
-
// ../../packages/superdoc/dist/chunks/DocxZipper-
|
|
110438
|
+
// ../../packages/superdoc/dist/chunks/DocxZipper-DcuMk8AE.es.js
|
|
110435
110439
|
function getLens2(b64) {
|
|
110436
110440
|
var len$1 = b64.length;
|
|
110437
110441
|
if (len$1 % 4 > 0)
|
|
@@ -111002,6 +111006,8 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
|
|
|
111002
111006
|
});
|
|
111003
111007
|
}
|
|
111004
111008
|
async exportFromCollaborativeDocx(docx, updatedDocs, media, fonts) {
|
|
111009
|
+
if (!Array.isArray(docx))
|
|
111010
|
+
throw new Error("Collaborative DOCX export requires base package entries");
|
|
111005
111011
|
const zip = new import_jszip_min.default;
|
|
111006
111012
|
for (const file of docx) {
|
|
111007
111013
|
const content2 = file.content;
|
|
@@ -111067,7 +111073,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
|
|
|
111067
111073
|
return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
|
|
111068
111074
|
}
|
|
111069
111075
|
}, DocxZipper_default;
|
|
111070
|
-
var
|
|
111076
|
+
var init_DocxZipper_DcuMk8AE_es = __esm(() => {
|
|
111071
111077
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
111072
111078
|
init_jszip_ChlR43oI_es();
|
|
111073
111079
|
init_xml_js_BtmJ6bNs_es();
|
|
@@ -136170,7 +136176,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
136170
136176
|
init_remark_gfm_z_sDF4ss_es();
|
|
136171
136177
|
});
|
|
136172
136178
|
|
|
136173
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
136179
|
+
// ../../packages/superdoc/dist/chunks/src-CL8tC0je.es.js
|
|
136174
136180
|
function deleteProps(obj, propOrProps) {
|
|
136175
136181
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
136176
136182
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -214293,13 +214299,19 @@ var Node$13 = class Node$14 {
|
|
|
214293
214299
|
return;
|
|
214294
214300
|
if (event.button !== 0)
|
|
214295
214301
|
return;
|
|
214296
|
-
const
|
|
214302
|
+
const target = event.target;
|
|
214303
|
+
const annotationEl = target?.closest?.(".annotation[data-pm-start]");
|
|
214297
214304
|
if (annotationEl) {
|
|
214298
214305
|
event.preventDefault();
|
|
214299
214306
|
event.stopPropagation();
|
|
214300
214307
|
this.#handleAnnotationDoubleClick(event, annotationEl);
|
|
214301
214308
|
return;
|
|
214302
214309
|
}
|
|
214310
|
+
if ((this.#deps.getHeaderFooterSession()?.session?.mode ?? "body") !== "body") {
|
|
214311
|
+
const activeEditorHost = this.#deps.getHeaderFooterSession()?.overlayManager?.getActiveEditorHost?.();
|
|
214312
|
+
if (activeEditorHost && (activeEditorHost.contains(target) || activeEditorHost === target))
|
|
214313
|
+
return;
|
|
214314
|
+
}
|
|
214303
214315
|
if (!this.#deps.getLayoutState().layout)
|
|
214304
214316
|
return;
|
|
214305
214317
|
const normalized = this.#callbacks.normalizeClientPoint?.(event.clientX, event.clientY);
|
|
@@ -216358,6 +216370,18 @@ var Node$13 = class Node$14 {
|
|
|
216358
216370
|
try {
|
|
216359
216371
|
editor.setEditable(true);
|
|
216360
216372
|
editor.setOptions({ documentMode: "editing" });
|
|
216373
|
+
try {
|
|
216374
|
+
const editorView = editor.view;
|
|
216375
|
+
if (editorView && editorHost) {
|
|
216376
|
+
const focusHandler = () => {
|
|
216377
|
+
try {
|
|
216378
|
+
editorView.focus();
|
|
216379
|
+
} catch {}
|
|
216380
|
+
};
|
|
216381
|
+
editorHost.addEventListener("mousedown", focusHandler);
|
|
216382
|
+
this.#managerCleanups.push(() => editorHost.removeEventListener("mousedown", focusHandler));
|
|
216383
|
+
}
|
|
216384
|
+
} catch {}
|
|
216361
216385
|
try {
|
|
216362
216386
|
const doc$2 = editor.state?.doc;
|
|
216363
216387
|
if (doc$2) {
|
|
@@ -216381,7 +216405,6 @@ var Node$13 = class Node$14 {
|
|
|
216381
216405
|
});
|
|
216382
216406
|
return;
|
|
216383
216407
|
}
|
|
216384
|
-
this.#overlayManager.hideSelectionOverlay();
|
|
216385
216408
|
this.#activeEditor = editor;
|
|
216386
216409
|
this.#setupActiveEditorEventBridge(editor);
|
|
216387
216410
|
this.#session = {
|
|
@@ -216684,6 +216707,12 @@ var Node$13 = class Node$14 {
|
|
|
216684
216707
|
};
|
|
216685
216708
|
}
|
|
216686
216709
|
computeSelectionRects(from$1, to) {
|
|
216710
|
+
if (this.#session.mode === "body")
|
|
216711
|
+
return [];
|
|
216712
|
+
const activeEditor = this.#activeEditor;
|
|
216713
|
+
if (!activeEditor?.view)
|
|
216714
|
+
return [];
|
|
216715
|
+
const view = activeEditor.view;
|
|
216687
216716
|
const context = this.getContext();
|
|
216688
216717
|
if (!context) {
|
|
216689
216718
|
console.warn("[HeaderFooterSessionManager] Header/footer context unavailable for selection rects", {
|
|
@@ -216692,19 +216721,48 @@ var Node$13 = class Node$14 {
|
|
|
216692
216721
|
});
|
|
216693
216722
|
return [];
|
|
216694
216723
|
}
|
|
216724
|
+
const region = context.region;
|
|
216725
|
+
const pageIndex = region.pageIndex;
|
|
216726
|
+
const domSelection = view.dom.ownerDocument?.getSelection?.();
|
|
216727
|
+
let domRectList = [];
|
|
216728
|
+
if (domSelection && domSelection.rangeCount > 0) {
|
|
216729
|
+
for (let i$1 = 0;i$1 < domSelection.rangeCount; i$1 += 1) {
|
|
216730
|
+
const range = domSelection.getRangeAt(i$1);
|
|
216731
|
+
if (!range)
|
|
216732
|
+
continue;
|
|
216733
|
+
const rangeRects = Array.from(range.getClientRects());
|
|
216734
|
+
domRectList.push(...rangeRects);
|
|
216735
|
+
}
|
|
216736
|
+
domRectList = deduplicateOverlappingRects(domRectList);
|
|
216737
|
+
}
|
|
216738
|
+
if (!domRectList.length)
|
|
216739
|
+
return [];
|
|
216740
|
+
const editorHostRect = view.dom.getBoundingClientRect();
|
|
216695
216741
|
const bodyPageHeight = this.#deps?.getBodyPageHeight() ?? this.#options.defaultPageSize.h;
|
|
216696
|
-
const
|
|
216697
|
-
const
|
|
216698
|
-
|
|
216699
|
-
|
|
216700
|
-
|
|
216701
|
-
|
|
216702
|
-
|
|
216703
|
-
|
|
216704
|
-
|
|
216705
|
-
|
|
216706
|
-
|
|
216707
|
-
|
|
216742
|
+
const layoutOptions = this.#deps?.getLayoutOptions() ?? {};
|
|
216743
|
+
const zoom = typeof layoutOptions.zoom === "number" && Number.isFinite(layoutOptions.zoom) && layoutOptions.zoom > 0 ? layoutOptions.zoom : 1;
|
|
216744
|
+
const toLayoutUnits = (viewportPixels) => viewportPixels / zoom;
|
|
216745
|
+
const layoutRects = [];
|
|
216746
|
+
for (const clientRect$1 of domRectList) {
|
|
216747
|
+
const horizontallyOverlaps = clientRect$1.right > editorHostRect.left && clientRect$1.left < editorHostRect.right;
|
|
216748
|
+
const verticallyOverlaps = clientRect$1.bottom > editorHostRect.top && clientRect$1.top < editorHostRect.bottom;
|
|
216749
|
+
if (!horizontallyOverlaps || !verticallyOverlaps)
|
|
216750
|
+
continue;
|
|
216751
|
+
const localX = toLayoutUnits(clientRect$1.left - editorHostRect.left);
|
|
216752
|
+
const localY = toLayoutUnits(clientRect$1.top - editorHostRect.top);
|
|
216753
|
+
const width = toLayoutUnits(clientRect$1.width);
|
|
216754
|
+
const height = toLayoutUnits(clientRect$1.height);
|
|
216755
|
+
if (!Number.isFinite(localX) || !Number.isFinite(localY) || width <= 0 || height <= 0)
|
|
216756
|
+
continue;
|
|
216757
|
+
layoutRects.push({
|
|
216758
|
+
pageIndex,
|
|
216759
|
+
x: region.localX + localX,
|
|
216760
|
+
y: pageIndex * bodyPageHeight + region.localY + localY,
|
|
216761
|
+
width,
|
|
216762
|
+
height
|
|
216763
|
+
});
|
|
216764
|
+
}
|
|
216765
|
+
return layoutRects;
|
|
216708
216766
|
}
|
|
216709
216767
|
getContext() {
|
|
216710
216768
|
if (this.#session.mode === "body")
|
|
@@ -222083,16 +222141,16 @@ var Node$13 = class Node$14 {
|
|
|
222083
222141
|
return false;
|
|
222084
222142
|
return Boolean(checker(attrs));
|
|
222085
222143
|
}, SuperToolbar, ICONS, TEXTS, tableActionsOptions;
|
|
222086
|
-
var
|
|
222144
|
+
var init_src_CL8tC0je_es = __esm(() => {
|
|
222087
222145
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
222088
|
-
|
|
222146
|
+
init_SuperConverter_i9G7_t3u_es();
|
|
222089
222147
|
init_jszip_ChlR43oI_es();
|
|
222090
222148
|
init_uuid_qzgm05fK_es();
|
|
222091
222149
|
init_constants_ep1_Gwqi_es();
|
|
222092
222150
|
init_unified_BRHLwnjP_es();
|
|
222093
222151
|
init_remark_gfm_z_sDF4ss_es();
|
|
222094
222152
|
init_remark_stringify_D8vxv_XI_es();
|
|
222095
|
-
|
|
222153
|
+
init_DocxZipper_DcuMk8AE_es();
|
|
222096
222154
|
init_vue_DQHWm9lq_es();
|
|
222097
222155
|
init__plugin_vue_export_helper_HmhZBO0u_es();
|
|
222098
222156
|
init_eventemitter3_DGBTyUUP_es();
|
|
@@ -231724,18 +231782,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
231724
231782
|
this.#sourcePath = null;
|
|
231725
231783
|
}
|
|
231726
231784
|
} else if (resolvedMode === "docx" && !options?.content && !options?.html && !options?.markdown) {
|
|
231727
|
-
const
|
|
231728
|
-
|
|
231729
|
-
const uint8Array = new Uint8Array(arrayBuffer);
|
|
231730
|
-
let fileSource;
|
|
231731
|
-
if (canUseBuffer)
|
|
231732
|
-
fileSource = Buffer3.from(uint8Array);
|
|
231733
|
-
else if (typeof Blob !== "undefined")
|
|
231734
|
-
fileSource = new Blob([uint8Array]);
|
|
231735
|
-
else
|
|
231736
|
-
throw new Error("Blob is not available to create blank DOCX");
|
|
231737
|
-
const [docx, _media, mediaFiles, fonts] = await Editor2.loadXmlData(fileSource, canUseBuffer);
|
|
231738
|
-
resolvedOptions.content = docx;
|
|
231785
|
+
const { content: content3, mediaFiles, fonts, fileSource } = await this.#loadBlankDocxTemplate();
|
|
231786
|
+
resolvedOptions.content = content3;
|
|
231739
231787
|
resolvedOptions.mediaFiles = {
|
|
231740
231788
|
...mediaFiles,
|
|
231741
231789
|
...options?.mediaFiles ?? {}
|
|
@@ -232224,6 +232272,40 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
232224
232272
|
isNewFile: this.options.isNewFile ?? false
|
|
232225
232273
|
});
|
|
232226
232274
|
}
|
|
232275
|
+
async#loadBlankDocxTemplate() {
|
|
232276
|
+
const arrayBuffer = await getArrayBufferFromUrl(BLANK_DOCX_DATA_URI);
|
|
232277
|
+
const canUseBuffer = typeof process$1$1 !== "undefined" && !!process$1$1.versions?.node && typeof Buffer3 !== "undefined";
|
|
232278
|
+
const uint8Array = new Uint8Array(arrayBuffer);
|
|
232279
|
+
let fileSource;
|
|
232280
|
+
if (canUseBuffer)
|
|
232281
|
+
fileSource = Buffer3.from(uint8Array);
|
|
232282
|
+
else if (typeof Blob !== "undefined")
|
|
232283
|
+
fileSource = new Blob([uint8Array]);
|
|
232284
|
+
else
|
|
232285
|
+
throw new Error("Blob is not available to create blank DOCX");
|
|
232286
|
+
const [content3, _media, mediaFiles, fonts] = await Editor2.loadXmlData(fileSource, canUseBuffer);
|
|
232287
|
+
return {
|
|
232288
|
+
content: content3,
|
|
232289
|
+
mediaFiles,
|
|
232290
|
+
fonts,
|
|
232291
|
+
fileSource
|
|
232292
|
+
};
|
|
232293
|
+
}
|
|
232294
|
+
async#getBaseDocxEntriesForExport() {
|
|
232295
|
+
if (Array.isArray(this.options.content))
|
|
232296
|
+
return this.options.content;
|
|
232297
|
+
const blankDocx = await this.#loadBlankDocxTemplate();
|
|
232298
|
+
this.options.content = blankDocx.content;
|
|
232299
|
+
this.options.mediaFiles = {
|
|
232300
|
+
...blankDocx.mediaFiles,
|
|
232301
|
+
...this.options.mediaFiles ?? {}
|
|
232302
|
+
};
|
|
232303
|
+
this.options.fonts = {
|
|
232304
|
+
...blankDocx.fonts,
|
|
232305
|
+
...this.options.fonts ?? {}
|
|
232306
|
+
};
|
|
232307
|
+
return blankDocx.content;
|
|
232308
|
+
}
|
|
232227
232309
|
#initMedia() {
|
|
232228
232310
|
if (this.options.isChildEditor)
|
|
232229
232311
|
return;
|
|
@@ -232810,8 +232892,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
232810
232892
|
updatedDocs["_rels/.rels"] = relsXml;
|
|
232811
232893
|
return updatedDocs;
|
|
232812
232894
|
}
|
|
232895
|
+
const baseDocxEntries = !this.options.fileSource && !Array.isArray(this.options.content) ? await this.#getBaseDocxEntriesForExport() : this.options.content;
|
|
232813
232896
|
return await zipper.updateZip({
|
|
232814
|
-
docx:
|
|
232897
|
+
docx: baseDocxEntries,
|
|
232815
232898
|
updatedDocs,
|
|
232816
232899
|
originalDocxFile: this.options.fileSource,
|
|
232817
232900
|
media: media2,
|
|
@@ -241031,6 +241114,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
241031
241114
|
#ariaLiveRegion = null;
|
|
241032
241115
|
#a11ySelectionAnnounceTimeout = null;
|
|
241033
241116
|
#a11yLastAnnouncedSelectionKey = null;
|
|
241117
|
+
#headerFooterSelectionHandler = null;
|
|
241118
|
+
#headerFooterEditor = null;
|
|
241034
241119
|
#lastSelectedFieldAnnotation = null;
|
|
241035
241120
|
#lastSelectedStructuredContentBlock = null;
|
|
241036
241121
|
#lastSelectedStructuredContentInline = null;
|
|
@@ -242651,7 +242736,27 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
242651
242736
|
},
|
|
242652
242737
|
onEditingContext: (data) => {
|
|
242653
242738
|
this.emit("headerFooterEditingContext", data);
|
|
242654
|
-
this.#
|
|
242739
|
+
if (this.#headerFooterEditor && this.#headerFooterSelectionHandler) {
|
|
242740
|
+
this.#headerFooterEditor.off?.("selectionUpdate", this.#headerFooterSelectionHandler);
|
|
242741
|
+
this.#headerFooterEditor = null;
|
|
242742
|
+
this.#headerFooterSelectionHandler = null;
|
|
242743
|
+
}
|
|
242744
|
+
if (data.kind === "body") {
|
|
242745
|
+
this.#announce("Exited header/footer edit mode.");
|
|
242746
|
+
this.#scheduleSelectionUpdate({ immediate: true });
|
|
242747
|
+
} else {
|
|
242748
|
+
this.#announce(`Editing ${data.kind === "header" ? "Header" : "Footer"} (${data.sectionType ?? "default"})`);
|
|
242749
|
+
const headerFooterEditor = data.editor;
|
|
242750
|
+
const handler2 = () => {
|
|
242751
|
+
this.#scheduleSelectionUpdate();
|
|
242752
|
+
this.#scheduleA11ySelectionAnnouncement();
|
|
242753
|
+
};
|
|
242754
|
+
headerFooterEditor.on?.("selectionUpdate", handler2);
|
|
242755
|
+
this.#headerFooterEditor = headerFooterEditor;
|
|
242756
|
+
this.#headerFooterSelectionHandler = handler2;
|
|
242757
|
+
this.#scheduleSelectionUpdate({ immediate: true });
|
|
242758
|
+
this.#scheduleA11ySelectionAnnouncement({ immediate: true });
|
|
242759
|
+
}
|
|
242655
242760
|
},
|
|
242656
242761
|
onEditBlocked: (reason) => {
|
|
242657
242762
|
this.emit("headerFooterEditBlocked", { reason });
|
|
@@ -243407,7 +243512,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
243407
243512
|
const shouldScrollIntoView = this.#shouldScrollSelectionIntoView;
|
|
243408
243513
|
this.#shouldScrollSelectionIntoView = false;
|
|
243409
243514
|
if ((this.#headerFooterSession?.session?.mode ?? "body") !== "body") {
|
|
243410
|
-
this.#
|
|
243515
|
+
this.#updateHeaderFooterSelection();
|
|
243411
243516
|
return;
|
|
243412
243517
|
}
|
|
243413
243518
|
if (!this.#localSelectionLayer)
|
|
@@ -243820,8 +243925,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
243820
243925
|
#announceSelectionNow() {
|
|
243821
243926
|
if (!this.#ariaLiveRegion)
|
|
243822
243927
|
return;
|
|
243823
|
-
if ((this.#headerFooterSession?.session?.mode ?? "body") !== "body")
|
|
243824
|
-
return;
|
|
243825
243928
|
const announcement = computeA11ySelectionAnnouncement(this.getActiveEditor().state);
|
|
243826
243929
|
if (!announcement)
|
|
243827
243930
|
return;
|
|
@@ -244378,6 +244481,43 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
244378
244481
|
this.#errorBannerMessage.textContent += ` (${this.#layoutOptions.debugLabel}: ${error.message})`;
|
|
244379
244482
|
}
|
|
244380
244483
|
}
|
|
244484
|
+
#updateHeaderFooterSelection() {
|
|
244485
|
+
this.#clearSelectedFieldAnnotationClass();
|
|
244486
|
+
if (!this.#localSelectionLayer)
|
|
244487
|
+
return;
|
|
244488
|
+
const selection = this.getActiveEditor()?.state?.selection;
|
|
244489
|
+
if (!selection) {
|
|
244490
|
+
try {
|
|
244491
|
+
this.#localSelectionLayer.innerHTML = "";
|
|
244492
|
+
} catch {}
|
|
244493
|
+
return;
|
|
244494
|
+
}
|
|
244495
|
+
const { from: from$1, to } = selection;
|
|
244496
|
+
if (from$1 === to) {
|
|
244497
|
+
try {
|
|
244498
|
+
this.#localSelectionLayer.innerHTML = "";
|
|
244499
|
+
} catch {}
|
|
244500
|
+
return;
|
|
244501
|
+
}
|
|
244502
|
+
const rects = this.#computeHeaderFooterSelectionRects(from$1, to);
|
|
244503
|
+
if (!rects.length)
|
|
244504
|
+
return;
|
|
244505
|
+
const pageHeight = this.#getBodyPageHeight();
|
|
244506
|
+
const pageGap = 0;
|
|
244507
|
+
try {
|
|
244508
|
+
this.#localSelectionLayer.innerHTML = "";
|
|
244509
|
+
renderSelectionRects({
|
|
244510
|
+
localSelectionLayer: this.#localSelectionLayer,
|
|
244511
|
+
rects,
|
|
244512
|
+
pageHeight,
|
|
244513
|
+
pageGap,
|
|
244514
|
+
convertPageLocalToOverlayCoords: (pageIndex, x, y$1) => this.#convertPageLocalToOverlayCoords(pageIndex, x, y$1)
|
|
244515
|
+
});
|
|
244516
|
+
} catch (error) {
|
|
244517
|
+
if (process$1$1.env.NODE_ENV === "development")
|
|
244518
|
+
console.warn("[PresentationEditor] Failed to render header/footer selection rects:", error);
|
|
244519
|
+
}
|
|
244520
|
+
}
|
|
244381
244521
|
#dismissErrorBanner() {
|
|
244382
244522
|
this.#errorBanner?.remove();
|
|
244383
244523
|
this.#errorBanner = null;
|
|
@@ -255992,13 +256132,13 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
255992
256132
|
|
|
255993
256133
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
255994
256134
|
var init_super_editor_es = __esm(() => {
|
|
255995
|
-
|
|
255996
|
-
|
|
256135
|
+
init_src_CL8tC0je_es();
|
|
256136
|
+
init_SuperConverter_i9G7_t3u_es();
|
|
255997
256137
|
init_jszip_ChlR43oI_es();
|
|
255998
256138
|
init_xml_js_BtmJ6bNs_es();
|
|
255999
256139
|
init_constants_ep1_Gwqi_es();
|
|
256000
256140
|
init_unified_BRHLwnjP_es();
|
|
256001
|
-
|
|
256141
|
+
init_DocxZipper_DcuMk8AE_es();
|
|
256002
256142
|
init_vue_DQHWm9lq_es();
|
|
256003
256143
|
init_eventemitter3_DGBTyUUP_es();
|
|
256004
256144
|
init_zipper_DqXT7uTa_es();
|
|
@@ -317799,7 +317939,11 @@ class DocxExporter2 {
|
|
|
317799
317939
|
}
|
|
317800
317940
|
#generate_xml_as_list(data, debug = false) {
|
|
317801
317941
|
const json = JSON.parse(JSON.stringify(data));
|
|
317802
|
-
const declaration = this.converter.declaration
|
|
317942
|
+
const declaration = this.converter.declaration?.attributes ?? {
|
|
317943
|
+
version: "1.0",
|
|
317944
|
+
encoding: "UTF-8",
|
|
317945
|
+
standalone: "yes"
|
|
317946
|
+
};
|
|
317803
317947
|
const xmlTag = `<?xml${Object.entries(declaration).map(([key2, value]) => ` ${key2}="${value}"`).join("")}?>`;
|
|
317804
317948
|
const result = this.#generateXml(json, debug);
|
|
317805
317949
|
const final = [xmlTag, ...result];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
"@types/bun": "^1.3.8",
|
|
21
21
|
"@types/node": "22.19.2",
|
|
22
22
|
"typescript": "^5.9.2",
|
|
23
|
-
"@superdoc/pm-adapter": "0.0.0",
|
|
24
23
|
"@superdoc/document-api": "0.0.1",
|
|
24
|
+
"superdoc": "1.19.0",
|
|
25
25
|
"@superdoc/super-editor": "0.0.1",
|
|
26
|
-
"superdoc": "
|
|
26
|
+
"@superdoc/pm-adapter": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"module": "src/index.ts",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@superdoc-dev/cli-darwin-arm64": "0.3.0-next.
|
|
34
|
-
"@superdoc-dev/cli-
|
|
35
|
-
"@superdoc-dev/cli-
|
|
36
|
-
"@superdoc-dev/cli-
|
|
37
|
-
"@superdoc-dev/cli-linux-
|
|
33
|
+
"@superdoc-dev/cli-darwin-arm64": "0.3.0-next.2",
|
|
34
|
+
"@superdoc-dev/cli-linux-x64": "0.3.0-next.2",
|
|
35
|
+
"@superdoc-dev/cli-darwin-x64": "0.3.0-next.2",
|
|
36
|
+
"@superdoc-dev/cli-windows-x64": "0.3.0-next.2",
|
|
37
|
+
"@superdoc-dev/cli-linux-arm64": "0.3.0-next.2"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"dev": "bun run src/index.ts",
|