@superdoc-dev/cli 0.2.0-next.70 → 0.2.0-next.72
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 +49 -16
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -30540,7 +30540,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
|
|
|
30540
30540
|
emptyOptions2 = {};
|
|
30541
30541
|
});
|
|
30542
30542
|
|
|
30543
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
30543
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-CN811zC3.es.js
|
|
30544
30544
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
30545
30545
|
const fieldValue = extension$1.config[field];
|
|
30546
30546
|
if (typeof fieldValue === "function")
|
|
@@ -47784,6 +47784,8 @@ function collectReferencedNumIds(convertedXml) {
|
|
|
47784
47784
|
if (!Array.isArray(elements))
|
|
47785
47785
|
return;
|
|
47786
47786
|
for (const el of elements) {
|
|
47787
|
+
if (!el || typeof el !== "object")
|
|
47788
|
+
continue;
|
|
47787
47789
|
if (el.name === "w:numId" && el.attributes?.["w:val"] != null)
|
|
47788
47790
|
numIds.add(Number(el.attributes["w:val"]));
|
|
47789
47791
|
if (el.elements)
|
|
@@ -60956,7 +60958,7 @@ var isRegExp = (value) => {
|
|
|
60956
60958
|
state.kern = kernNode.attributes["w:val"];
|
|
60957
60959
|
}
|
|
60958
60960
|
}, SuperConverter;
|
|
60959
|
-
var
|
|
60961
|
+
var init_SuperConverter_CN811zC3_es = __esm(() => {
|
|
60960
60962
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
60961
60963
|
init_jszip_ChlR43oI_es();
|
|
60962
60964
|
init_xml_js_DLE8mr0n_es();
|
|
@@ -79257,6 +79259,12 @@ var init_SuperConverter_DLewdNXt_es = __esm(() => {
|
|
|
79257
79259
|
editor,
|
|
79258
79260
|
fieldsHighlightColor
|
|
79259
79261
|
});
|
|
79262
|
+
const currentDocument = this.convertedXml["word/document.xml"] || {};
|
|
79263
|
+
this.convertedXml["word/document.xml"] = {
|
|
79264
|
+
...currentDocument,
|
|
79265
|
+
...result,
|
|
79266
|
+
declaration: result?.declaration ?? currentDocument.declaration
|
|
79267
|
+
};
|
|
79260
79268
|
if (exportJsonOnly)
|
|
79261
79269
|
return result;
|
|
79262
79270
|
const xml = new DocxExporter(this).schemaToXml(result);
|
|
@@ -105834,9 +105842,9 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
105834
105842
|
init_remark_gfm_z_sDF4ss_es();
|
|
105835
105843
|
});
|
|
105836
105844
|
|
|
105837
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
105838
|
-
var
|
|
105839
|
-
__export(
|
|
105845
|
+
// ../../packages/superdoc/dist/chunks/src-Cz_HGh8D.es.js
|
|
105846
|
+
var exports_src_Cz_HGh8D_es = {};
|
|
105847
|
+
__export(exports_src_Cz_HGh8D_es, {
|
|
105840
105848
|
zt: () => defineMark,
|
|
105841
105849
|
z: () => cM,
|
|
105842
105850
|
yt: () => removeAwarenessStates,
|
|
@@ -166688,6 +166696,9 @@ var Node$13 = class Node$14 {
|
|
|
166688
166696
|
},
|
|
166689
166697
|
setZoom(zoom) {
|
|
166690
166698
|
painter.setZoom(zoom);
|
|
166699
|
+
},
|
|
166700
|
+
setScrollContainer(el) {
|
|
166701
|
+
painter.setScrollContainer(el);
|
|
166691
166702
|
}
|
|
166692
166703
|
};
|
|
166693
166704
|
}, DEFAULT_CONFIG, levelOrder, HUD_DATA_ATTR = "data-superdoc-selection-debug-hud", import_lodash, DomPositionIndex = class {
|
|
@@ -180519,9 +180530,9 @@ var Node$13 = class Node$14 {
|
|
|
180519
180530
|
trackedChanges: context.trackedChanges ?? []
|
|
180520
180531
|
});
|
|
180521
180532
|
}, _hoisted_1$6, _hoisted_2$2, _hoisted_3, _hoisted_4, ContextMenu_default, _hoisted_1$5, BasicUpload_default, _hoisted_1$4, MIN_WIDTH = 200, PPI = 96, alignment = "flex-end", Ruler_default, GenericPopover_default, _hoisted_1$3, _hoisted_2$1, RESIZE_HANDLE_WIDTH_PX = 9, RESIZE_HANDLE_HEIGHT_PX = 9, RESIZE_HANDLE_OFFSET_PX = 4, DRAG_OVERLAY_EXTENSION_PX = 1000, MIN_DRAG_OVERLAY_WIDTH_PX = 2000, THROTTLE_INTERVAL_MS = 16, MIN_RESIZE_DELTA_PX = 1, TableResizeOverlay_default, _hoisted_1$2, OVERLAY_EXPANSION_PX = 2000, RESIZE_HANDLE_SIZE_PX = 12, MOUSE_MOVE_THROTTLE_MS = 16, DIMENSION_CHANGE_THRESHOLD_PX = 1, Z_INDEX_OVERLAY = 10, Z_INDEX_HANDLE = 15, Z_INDEX_GUIDELINE = 20, ImageResizeOverlay_default, LINK_CLICK_DEBOUNCE_MS = 300, CURSOR_UPDATE_TIMEOUT_MS = 10, POPOVER_VERTICAL_OFFSET_PX = 15, LinkClickHandler_default, _hoisted_1$1, _hoisted_2, DOCX2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", TABLE_RESIZE_HOVER_THRESHOLD = 8, TABLE_RESIZE_THROTTLE_MS = 16, SuperEditor_default, _hoisted_1, SuperInput_default, SlashMenu, Extensions;
|
|
180522
|
-
var
|
|
180533
|
+
var init_src_Cz_HGh8D_es = __esm(() => {
|
|
180523
180534
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
180524
|
-
|
|
180535
|
+
init_SuperConverter_CN811zC3_es();
|
|
180525
180536
|
init_jszip_ChlR43oI_es();
|
|
180526
180537
|
init_uuid_2IzDu5nl_es();
|
|
180527
180538
|
init_constants_CqvgVEDh_es();
|
|
@@ -194652,6 +194663,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
194652
194663
|
this.onWindowScrollHandler = null;
|
|
194653
194664
|
this.onResizeHandler = null;
|
|
194654
194665
|
this.zoomFactor = 1;
|
|
194666
|
+
this.scrollContainer = null;
|
|
194655
194667
|
this.sdtHover = new SdtGroupedHover;
|
|
194656
194668
|
this.activeCommentId = null;
|
|
194657
194669
|
this.paintSnapshotBuilder = null;
|
|
@@ -194693,6 +194705,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
194693
194705
|
this.updateVirtualWindow();
|
|
194694
194706
|
}
|
|
194695
194707
|
}
|
|
194708
|
+
setScrollContainer(el) {
|
|
194709
|
+
if (el !== this.scrollContainer) {
|
|
194710
|
+
this.scrollContainer = el;
|
|
194711
|
+
if (this.virtualEnabled && this.mount)
|
|
194712
|
+
this.updateVirtualWindow();
|
|
194713
|
+
}
|
|
194714
|
+
}
|
|
194696
194715
|
setActiveComment(commentId) {
|
|
194697
194716
|
if (this.activeCommentId !== commentId) {
|
|
194698
194717
|
this.activeCommentId = commentId;
|
|
@@ -195054,7 +195073,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
195054
195073
|
let scrollY;
|
|
195055
195074
|
if (this.mount.scrollHeight > this.mount.clientHeight + 1)
|
|
195056
195075
|
scrollY = Math.max(0, this.mount.scrollTop - paddingTop);
|
|
195057
|
-
else {
|
|
195076
|
+
else if (this.scrollContainer) {
|
|
195077
|
+
const mountRect = this.mount.getBoundingClientRect();
|
|
195078
|
+
const containerRect = this.scrollContainer.getBoundingClientRect();
|
|
195079
|
+
scrollY = Math.max(0, (containerRect.top - mountRect.top) / zoom - paddingTop);
|
|
195080
|
+
} else {
|
|
195058
195081
|
const rect = this.mount.getBoundingClientRect();
|
|
195059
195082
|
scrollY = Math.max(0, -rect.top / zoom - paddingTop);
|
|
195060
195083
|
}
|
|
@@ -200710,6 +200733,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
200710
200733
|
const currentZoom = this.#layoutOptions.zoom ?? 1;
|
|
200711
200734
|
if (currentZoom !== 1)
|
|
200712
200735
|
this.#domPainter.setZoom(currentZoom);
|
|
200736
|
+
if (this.#scrollContainer && this.#scrollContainer instanceof HTMLElement)
|
|
200737
|
+
this.#domPainter.setScrollContainer?.(this.#scrollContainer);
|
|
200713
200738
|
}
|
|
200714
200739
|
return this.#domPainter;
|
|
200715
200740
|
}
|
|
@@ -211848,8 +211873,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
211848
211873
|
return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
211849
211874
|
};
|
|
211850
211875
|
stubFalse_default = stubFalse;
|
|
211851
|
-
freeExports$2 = typeof
|
|
211852
|
-
freeModule$2 = freeExports$2 && typeof
|
|
211876
|
+
freeExports$2 = typeof exports_src_Cz_HGh8D_es == "object" && exports_src_Cz_HGh8D_es && !exports_src_Cz_HGh8D_es.nodeType && exports_src_Cz_HGh8D_es;
|
|
211877
|
+
freeModule$2 = freeExports$2 && typeof module_src_Cz_HGh8D_es == "object" && module_src_Cz_HGh8D_es && !module_src_Cz_HGh8D_es.nodeType && module_src_Cz_HGh8D_es;
|
|
211853
211878
|
Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
|
|
211854
211879
|
isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
|
|
211855
211880
|
typedArrayTags = {};
|
|
@@ -211857,8 +211882,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
211857
211882
|
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
|
|
211858
211883
|
_baseIsTypedArray_default = baseIsTypedArray;
|
|
211859
211884
|
_baseUnary_default = baseUnary;
|
|
211860
|
-
freeExports$1 = typeof
|
|
211861
|
-
freeModule$1 = freeExports$1 && typeof
|
|
211885
|
+
freeExports$1 = typeof exports_src_Cz_HGh8D_es == "object" && exports_src_Cz_HGh8D_es && !exports_src_Cz_HGh8D_es.nodeType && exports_src_Cz_HGh8D_es;
|
|
211886
|
+
freeModule$1 = freeExports$1 && typeof module_src_Cz_HGh8D_es == "object" && module_src_Cz_HGh8D_es && !module_src_Cz_HGh8D_es.nodeType && module_src_Cz_HGh8D_es;
|
|
211862
211887
|
freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
|
|
211863
211888
|
_nodeUtil_default = function() {
|
|
211864
211889
|
try {
|
|
@@ -211963,8 +211988,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
211963
211988
|
Stack.prototype.has = _stackHas_default;
|
|
211964
211989
|
Stack.prototype.set = _stackSet_default;
|
|
211965
211990
|
_Stack_default = Stack;
|
|
211966
|
-
freeExports = typeof
|
|
211967
|
-
freeModule = freeExports && typeof
|
|
211991
|
+
freeExports = typeof exports_src_Cz_HGh8D_es == "object" && exports_src_Cz_HGh8D_es && !exports_src_Cz_HGh8D_es.nodeType && exports_src_Cz_HGh8D_es;
|
|
211992
|
+
freeModule = freeExports && typeof module_src_Cz_HGh8D_es == "object" && module_src_Cz_HGh8D_es && !module_src_Cz_HGh8D_es.nodeType && module_src_Cz_HGh8D_es;
|
|
211968
211993
|
Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
|
|
211969
211994
|
allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
|
|
211970
211995
|
_cloneBuffer_default = cloneBuffer;
|
|
@@ -220044,8 +220069,8 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
220044
220069
|
|
|
220045
220070
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
220046
220071
|
var init_super_editor_es = __esm(() => {
|
|
220047
|
-
|
|
220048
|
-
|
|
220072
|
+
init_src_Cz_HGh8D_es();
|
|
220073
|
+
init_SuperConverter_CN811zC3_es();
|
|
220049
220074
|
init_jszip_ChlR43oI_es();
|
|
220050
220075
|
init_xml_js_DLE8mr0n_es();
|
|
220051
220076
|
init_constants_CqvgVEDh_es();
|
|
@@ -268022,6 +268047,8 @@ function collectReferencedNumIds2(convertedXml) {
|
|
|
268022
268047
|
if (!Array.isArray(elements))
|
|
268023
268048
|
return;
|
|
268024
268049
|
for (const el of elements) {
|
|
268050
|
+
if (!el || typeof el !== "object")
|
|
268051
|
+
continue;
|
|
268025
268052
|
if (el.name === "w:numId" && el.attributes?.["w:val"] != null) {
|
|
268026
268053
|
numIds.add(Number(el.attributes["w:val"]));
|
|
268027
268054
|
}
|
|
@@ -268759,6 +268786,12 @@ var init_SuperConverter = __esm(() => {
|
|
|
268759
268786
|
editor,
|
|
268760
268787
|
fieldsHighlightColor
|
|
268761
268788
|
});
|
|
268789
|
+
const currentDocument = this.convertedXml["word/document.xml"] || {};
|
|
268790
|
+
this.convertedXml["word/document.xml"] = {
|
|
268791
|
+
...currentDocument,
|
|
268792
|
+
...result,
|
|
268793
|
+
declaration: result?.declaration ?? currentDocument.declaration
|
|
268794
|
+
};
|
|
268762
268795
|
if (exportJsonOnly)
|
|
268763
268796
|
return result;
|
|
268764
268797
|
const exporter = new DocxExporter2(this);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.72",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"typescript": "^5.9.2",
|
|
22
22
|
"@superdoc/document-api": "0.0.1",
|
|
23
23
|
"@superdoc/pm-adapter": "0.0.0",
|
|
24
|
-
"superdoc": "
|
|
25
|
-
"
|
|
24
|
+
"@superdoc/super-editor": "0.0.1",
|
|
25
|
+
"superdoc": "1.17.0"
|
|
26
26
|
},
|
|
27
27
|
"module": "src/index.ts",
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
-
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.
|
|
33
|
-
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.
|
|
34
|
-
"@superdoc-dev/cli-linux-x64": "0.2.0-next.
|
|
35
|
-
"@superdoc-dev/cli-
|
|
36
|
-
"@superdoc-dev/cli-
|
|
32
|
+
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.72",
|
|
33
|
+
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.72",
|
|
34
|
+
"@superdoc-dev/cli-linux-x64": "0.2.0-next.72",
|
|
35
|
+
"@superdoc-dev/cli-windows-x64": "0.2.0-next.72",
|
|
36
|
+
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.72"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"dev": "bun run src/index.ts",
|