@superdoc-dev/cli 0.16.0-next.32 → 0.16.0-next.34
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 +211 -112
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -3382,7 +3382,7 @@ More content with **bold** and *italic*.`
|
|
|
3382
3382
|
"trackChanges.list": {
|
|
3383
3383
|
memberPath: "trackChanges.list",
|
|
3384
3384
|
description: "List all tracked changes in the document.",
|
|
3385
|
-
expectedResult: "Returns a TrackChangesListResult with tracked change entries (`insert`, `delete`, `replacement`, `format
|
|
3385
|
+
expectedResult: "Returns a TrackChangesListResult with tracked change entries (`insert`, `delete`, `replacement`, `format`), total count, and raw imported Word OOXML revision IDs (`w:id`) when available. Whole-table tracked insertions and deletions are surfaced through the legacy `insert` / `delete` types.",
|
|
3386
3386
|
requiresDocumentContext: true,
|
|
3387
3387
|
metadata: readOperation({
|
|
3388
3388
|
idempotency: "idempotent",
|
|
@@ -3396,7 +3396,7 @@ More content with **bold** and *italic*.`
|
|
|
3396
3396
|
"trackChanges.get": {
|
|
3397
3397
|
memberPath: "trackChanges.get",
|
|
3398
3398
|
description: "Retrieve a single tracked change by ID.",
|
|
3399
|
-
expectedResult: "Returns a TrackChangeInfo object with the change type (`insert`, `delete`, `replacement`, `format
|
|
3399
|
+
expectedResult: "Returns a TrackChangeInfo object with the change type (`insert`, `delete`, `replacement`, `format`), author, date, affected content, and raw imported Word OOXML revision IDs (`w:id`) when available. Whole-table tracked insertions and deletions are surfaced through the legacy `insert` / `delete` types.",
|
|
3400
3400
|
requiresDocumentContext: true,
|
|
3401
3401
|
metadata: readOperation({
|
|
3402
3402
|
idempotency: "idempotent",
|
|
@@ -3416,6 +3416,7 @@ More content with **bold** and *italic*.`
|
|
|
3416
3416
|
supportsTrackedMode: false,
|
|
3417
3417
|
possibleFailureCodes: [
|
|
3418
3418
|
"NO_OP",
|
|
3419
|
+
"INVALID_INPUT",
|
|
3419
3420
|
"INVALID_TARGET",
|
|
3420
3421
|
"TARGET_NOT_FOUND",
|
|
3421
3422
|
"CAPABILITY_UNAVAILABLE",
|
|
@@ -8780,7 +8781,7 @@ var init_schemas = __esm(() => {
|
|
|
8780
8781
|
init_style_policy_types();
|
|
8781
8782
|
init_paragraphs();
|
|
8782
8783
|
init_styles();
|
|
8783
|
-
trackChangeTypeValues = ["insert", "delete", "replacement", "format"
|
|
8784
|
+
trackChangeTypeValues = ["insert", "delete", "replacement", "format"];
|
|
8784
8785
|
nodeTypeValues = NODE_TYPES;
|
|
8785
8786
|
blockNodeTypeValues = BLOCK_NODE_TYPES;
|
|
8786
8787
|
deletableBlockNodeTypeValues = DELETABLE_BLOCK_NODE_TYPES;
|
|
@@ -9550,10 +9551,6 @@ var init_schemas = __esm(() => {
|
|
|
9550
9551
|
address: trackedChangeAddressSchema,
|
|
9551
9552
|
id: { type: "string" },
|
|
9552
9553
|
type: { enum: [...trackChangeTypeValues] },
|
|
9553
|
-
subtype: {
|
|
9554
|
-
enum: ["table-insert", "table-delete"],
|
|
9555
|
-
description: "Finer classification for structural changes (type === 'structural')."
|
|
9556
|
-
},
|
|
9557
9554
|
grouping: { enum: ["standalone", "replacement-pair", "unknown"] },
|
|
9558
9555
|
pairedWithChangeId: { type: ["string", "null"] },
|
|
9559
9556
|
wordRevisionIds: trackChangeWordRevisionIdsSchema,
|
|
@@ -9568,10 +9565,6 @@ var init_schemas = __esm(() => {
|
|
|
9568
9565
|
trackChangeDomainItemSchema = discoveryItemSchema({
|
|
9569
9566
|
address: trackedChangeAddressSchema,
|
|
9570
9567
|
type: { enum: [...trackChangeTypeValues] },
|
|
9571
|
-
subtype: {
|
|
9572
|
-
enum: ["table-insert", "table-delete"],
|
|
9573
|
-
description: "Finer classification for structural changes (type === 'structural')."
|
|
9574
|
-
},
|
|
9575
9568
|
grouping: { enum: ["standalone", "replacement-pair", "unknown"] },
|
|
9576
9569
|
pairedWithChangeId: { type: ["string", "null"] },
|
|
9577
9570
|
wordRevisionIds: trackChangeWordRevisionIdsSchema,
|
|
@@ -11885,7 +11878,7 @@ var init_schemas = __esm(() => {
|
|
|
11885
11878
|
offset: { type: "integer", description: "Number of tracked changes to skip for pagination." },
|
|
11886
11879
|
type: {
|
|
11887
11880
|
enum: [...trackChangeTypeValues],
|
|
11888
|
-
description: "Filter by change type: 'insert', 'delete', 'replacement',
|
|
11881
|
+
description: "Filter by change type: 'insert', 'delete', 'replacement', or 'format'."
|
|
11889
11882
|
},
|
|
11890
11883
|
in: {
|
|
11891
11884
|
oneOf: [storyLocatorSchema, { const: "all" }],
|
|
@@ -68373,7 +68366,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
68373
68366
|
emptyOptions2 = {};
|
|
68374
68367
|
});
|
|
68375
68368
|
|
|
68376
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
68369
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-DOoAJ6Zk.es.js
|
|
68377
68370
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
68378
68371
|
const fieldValue = extension$1.config[field];
|
|
68379
68372
|
if (typeof fieldValue === "function")
|
|
@@ -108582,6 +108575,9 @@ function writeSectPrPageNumbering(sectPr, numbering) {
|
|
|
108582
108575
|
if (numbering.chapterSeparator !== undefined)
|
|
108583
108576
|
setStringAttr(pgNumType, "w:chapSep", numbering.chapterSeparator);
|
|
108584
108577
|
}
|
|
108578
|
+
function readSectPrTitlePage(sectPr) {
|
|
108579
|
+
return Boolean(findChild(sectPr, "w:titlePg"));
|
|
108580
|
+
}
|
|
108585
108581
|
function writeSectPrTitlePage(sectPr, enabled) {
|
|
108586
108582
|
if (enabled) {
|
|
108587
108583
|
ensureChild(sectPr, "w:titlePg");
|
|
@@ -111263,6 +111259,13 @@ function getTextAdapter(editor, input) {
|
|
|
111263
111259
|
`, `
|
|
111264
111260
|
`, { textModel: "visible" });
|
|
111265
111261
|
}
|
|
111262
|
+
function projectInternalTrackChangeType(type, structural) {
|
|
111263
|
+
if (type !== "structural")
|
|
111264
|
+
return type;
|
|
111265
|
+
if (structural?.subtype === "table-delete" || structural?.side === "deletion")
|
|
111266
|
+
return "delete";
|
|
111267
|
+
return "insert";
|
|
111268
|
+
}
|
|
111266
111269
|
function rangesOverlap(a, b) {
|
|
111267
111270
|
return a[0] < b[1] && b[0] < a[1];
|
|
111268
111271
|
}
|
|
@@ -111366,17 +111369,18 @@ function buildPublicTrackedChangeIdMap(grouped, replacements) {
|
|
|
111366
111369
|
return publicIdByChange;
|
|
111367
111370
|
}
|
|
111368
111371
|
function layerFromChange(change, relationship) {
|
|
111372
|
+
const type = resolveTrackedChangeType(change);
|
|
111369
111373
|
return {
|
|
111370
111374
|
id: change.id,
|
|
111371
111375
|
rawId: change.rawId,
|
|
111372
111376
|
commandRawId: change.commandRawId,
|
|
111373
|
-
type:
|
|
111377
|
+
type: projectInternalTrackChangeType(type, change.structural),
|
|
111374
111378
|
relationship
|
|
111375
111379
|
};
|
|
111376
111380
|
}
|
|
111377
111381
|
function compareOverlapChildren(a, b) {
|
|
111378
|
-
const aType = resolveTrackedChangeType(a);
|
|
111379
|
-
const bType = resolveTrackedChangeType(b);
|
|
111382
|
+
const aType = projectInternalTrackChangeType(resolveTrackedChangeType(a), a.structural);
|
|
111383
|
+
const bType = projectInternalTrackChangeType(resolveTrackedChangeType(b), b.structural);
|
|
111380
111384
|
if (aType !== bType) {
|
|
111381
111385
|
if (aType === "delete")
|
|
111382
111386
|
return -1;
|
|
@@ -134033,7 +134037,7 @@ var isRegExp = (value) => {
|
|
|
134033
134037
|
state.kern = kernNode.attributes["w:val"];
|
|
134034
134038
|
}
|
|
134035
134039
|
}, SuperConverter;
|
|
134036
|
-
var
|
|
134040
|
+
var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
|
|
134037
134041
|
init_rolldown_runtime_Bg48TavK_es();
|
|
134038
134042
|
init_jszip_C49i9kUs_es();
|
|
134039
134043
|
init_xml_js_CqGKpaft_es();
|
|
@@ -139049,7 +139053,7 @@ var init_SuperConverter_BVWG4qnQ_es = __esm(() => {
|
|
|
139049
139053
|
"trackChanges.list": {
|
|
139050
139054
|
memberPath: "trackChanges.list",
|
|
139051
139055
|
description: "List all tracked changes in the document.",
|
|
139052
|
-
expectedResult: "Returns a TrackChangesListResult with tracked change entries (`insert`, `delete`, `replacement`, `format
|
|
139056
|
+
expectedResult: "Returns a TrackChangesListResult with tracked change entries (`insert`, `delete`, `replacement`, `format`), total count, and raw imported Word OOXML revision IDs (`w:id`) when available. Whole-table tracked insertions and deletions are surfaced through the legacy `insert` / `delete` types.",
|
|
139053
139057
|
requiresDocumentContext: true,
|
|
139054
139058
|
metadata: readOperation2({
|
|
139055
139059
|
idempotency: "idempotent",
|
|
@@ -139063,7 +139067,7 @@ var init_SuperConverter_BVWG4qnQ_es = __esm(() => {
|
|
|
139063
139067
|
"trackChanges.get": {
|
|
139064
139068
|
memberPath: "trackChanges.get",
|
|
139065
139069
|
description: "Retrieve a single tracked change by ID.",
|
|
139066
|
-
expectedResult: "Returns a TrackChangeInfo object with the change type (`insert`, `delete`, `replacement`, `format
|
|
139070
|
+
expectedResult: "Returns a TrackChangeInfo object with the change type (`insert`, `delete`, `replacement`, `format`), author, date, affected content, and raw imported Word OOXML revision IDs (`w:id`) when available. Whole-table tracked insertions and deletions are surfaced through the legacy `insert` / `delete` types.",
|
|
139067
139071
|
requiresDocumentContext: true,
|
|
139068
139072
|
metadata: readOperation2({
|
|
139069
139073
|
idempotency: "idempotent",
|
|
@@ -139083,6 +139087,7 @@ var init_SuperConverter_BVWG4qnQ_es = __esm(() => {
|
|
|
139083
139087
|
supportsTrackedMode: false,
|
|
139084
139088
|
possibleFailureCodes: [
|
|
139085
139089
|
"NO_OP",
|
|
139090
|
+
"INVALID_INPUT",
|
|
139086
139091
|
"INVALID_TARGET",
|
|
139087
139092
|
"TARGET_NOT_FOUND",
|
|
139088
139093
|
"CAPABILITY_UNAVAILABLE",
|
|
@@ -143562,8 +143567,7 @@ var init_SuperConverter_BVWG4qnQ_es = __esm(() => {
|
|
|
143562
143567
|
"insert",
|
|
143563
143568
|
"delete",
|
|
143564
143569
|
"replacement",
|
|
143565
|
-
"format"
|
|
143566
|
-
"structural"
|
|
143570
|
+
"format"
|
|
143567
143571
|
];
|
|
143568
143572
|
nodeTypeValues2 = NODE_TYPES2;
|
|
143569
143573
|
blockNodeTypeValues2 = BLOCK_NODE_TYPES2;
|
|
@@ -144593,10 +144597,6 @@ var init_SuperConverter_BVWG4qnQ_es = __esm(() => {
|
|
|
144593
144597
|
address: trackedChangeAddressSchema2,
|
|
144594
144598
|
id: { type: "string" },
|
|
144595
144599
|
type: { enum: [...trackChangeTypeValues2] },
|
|
144596
|
-
subtype: {
|
|
144597
|
-
enum: ["table-insert", "table-delete"],
|
|
144598
|
-
description: "Finer classification for structural changes (type === 'structural')."
|
|
144599
|
-
},
|
|
144600
144600
|
grouping: { enum: [
|
|
144601
144601
|
"standalone",
|
|
144602
144602
|
"replacement-pair",
|
|
@@ -144619,10 +144619,6 @@ var init_SuperConverter_BVWG4qnQ_es = __esm(() => {
|
|
|
144619
144619
|
discoveryResultSchema2(discoveryItemSchema2({
|
|
144620
144620
|
address: trackedChangeAddressSchema2,
|
|
144621
144621
|
type: { enum: [...trackChangeTypeValues2] },
|
|
144622
|
-
subtype: {
|
|
144623
|
-
enum: ["table-insert", "table-delete"],
|
|
144624
|
-
description: "Finer classification for structural changes (type === 'structural')."
|
|
144625
|
-
},
|
|
144626
144622
|
grouping: { enum: [
|
|
144627
144623
|
"standalone",
|
|
144628
144624
|
"replacement-pair",
|
|
@@ -147117,7 +147113,7 @@ var init_SuperConverter_BVWG4qnQ_es = __esm(() => {
|
|
|
147117
147113
|
},
|
|
147118
147114
|
type: {
|
|
147119
147115
|
enum: [...trackChangeTypeValues2],
|
|
147120
|
-
description: "Filter by change type: 'insert', 'delete', 'replacement',
|
|
147116
|
+
description: "Filter by change type: 'insert', 'delete', 'replacement', or 'format'."
|
|
147121
147117
|
},
|
|
147122
147118
|
in: {
|
|
147123
147119
|
oneOf: [storyLocatorSchema2, { const: "all" }],
|
|
@@ -173378,7 +173374,7 @@ var init_SuperConverter_BVWG4qnQ_es = __esm(() => {
|
|
|
173378
173374
|
};
|
|
173379
173375
|
});
|
|
173380
173376
|
|
|
173381
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
173377
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-pilP-Jq-.es.js
|
|
173382
173378
|
function parseSizeUnit(val = "0") {
|
|
173383
173379
|
const length3 = val.toString() || "0";
|
|
173384
173380
|
const value = Number.parseFloat(length3);
|
|
@@ -182822,6 +182818,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
182822
182818
|
disabled: !context,
|
|
182823
182819
|
value: typeof superdoc?.getZoom === "function" ? superdoc.getZoom() : 100
|
|
182824
182820
|
};
|
|
182821
|
+
}, createZoomFitWidthStateDeriver = () => ({ context, superdoc }) => {
|
|
182822
|
+
return {
|
|
182823
|
+
active: (typeof superdoc?.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined) === "fit-width",
|
|
182824
|
+
disabled: !context || typeof superdoc?.setZoomMode !== "function"
|
|
182825
|
+
};
|
|
182825
182826
|
}, createDocumentModeStateDeriver = () => ({ context, superdoc }) => {
|
|
182826
182827
|
return {
|
|
182827
182828
|
active: false,
|
|
@@ -182842,6 +182843,12 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
182842
182843
|
return false;
|
|
182843
182844
|
superdoc.setZoom?.(normalizedPayload);
|
|
182844
182845
|
return true;
|
|
182846
|
+
}, createZoomFitWidthExecute = () => ({ superdoc }) => {
|
|
182847
|
+
if (typeof superdoc?.setZoomMode !== "function")
|
|
182848
|
+
return false;
|
|
182849
|
+
const mode = typeof superdoc.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined;
|
|
182850
|
+
superdoc.setZoomMode(mode === "fit-width" ? "manual" : "fit-width");
|
|
182851
|
+
return true;
|
|
182845
182852
|
}, createDocumentModeExecute = () => ({ superdoc, payload }) => {
|
|
182846
182853
|
const validModes = [
|
|
182847
182854
|
"editing",
|
|
@@ -183515,6 +183522,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
183515
183522
|
state: createZoomStateDeriver(),
|
|
183516
183523
|
execute: createZoomExecute()
|
|
183517
183524
|
},
|
|
183525
|
+
"zoom-fit-width": {
|
|
183526
|
+
id: "zoom-fit-width",
|
|
183527
|
+
state: createZoomFitWidthStateDeriver(),
|
|
183528
|
+
execute: createZoomFitWidthExecute()
|
|
183529
|
+
},
|
|
183518
183530
|
"document-mode": {
|
|
183519
183531
|
id: "document-mode",
|
|
183520
183532
|
state: createDocumentModeStateDeriver(),
|
|
@@ -183711,8 +183723,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
183711
183723
|
}
|
|
183712
183724
|
};
|
|
183713
183725
|
};
|
|
183714
|
-
var
|
|
183715
|
-
|
|
183726
|
+
var init_create_headless_toolbar_pilP_Jq_es = __esm(() => {
|
|
183727
|
+
init_SuperConverter_DOoAJ6Zk_es();
|
|
183716
183728
|
init_uuid_qzgm05fK_es();
|
|
183717
183729
|
init_constants_D9qj59G2_es();
|
|
183718
183730
|
init_dist_B8HfvhaK_es();
|
|
@@ -184900,7 +184912,7 @@ var init_remark_stringify_6MMJfY0k_es = __esm(() => {
|
|
|
184900
184912
|
eol = /\r?\n|\r/g;
|
|
184901
184913
|
});
|
|
184902
184914
|
|
|
184903
|
-
// ../../packages/superdoc/dist/chunks/detect-container-
|
|
184915
|
+
// ../../packages/superdoc/dist/chunks/detect-container-sTWXwOzh.es.js
|
|
184904
184916
|
function matchesMagic(bytes, magic) {
|
|
184905
184917
|
if (bytes.length < magic.length)
|
|
184906
184918
|
return false;
|
|
@@ -184918,7 +184930,7 @@ function detectContainerType(data) {
|
|
|
184918
184930
|
return "unknown";
|
|
184919
184931
|
}
|
|
184920
184932
|
var ZIP_MAGIC, CFB_MAGIC;
|
|
184921
|
-
var
|
|
184933
|
+
var init_detect_container_sTWXwOzh_es = __esm(() => {
|
|
184922
184934
|
ZIP_MAGIC = [
|
|
184923
184935
|
80,
|
|
184924
184936
|
75,
|
|
@@ -184937,13 +184949,13 @@ var init_detect_container_B6sqy7HZ_es = __esm(() => {
|
|
|
184937
184949
|
];
|
|
184938
184950
|
});
|
|
184939
184951
|
|
|
184940
|
-
// ../../packages/superdoc/dist/chunks/detect-container-
|
|
184941
|
-
var
|
|
184942
|
-
__export(
|
|
184952
|
+
// ../../packages/superdoc/dist/chunks/detect-container-0tUwtCR4.es.js
|
|
184953
|
+
var exports_detect_container_0tUwtCR4_es = {};
|
|
184954
|
+
__export(exports_detect_container_0tUwtCR4_es, {
|
|
184943
184955
|
detectContainerType: () => detectContainerType
|
|
184944
184956
|
});
|
|
184945
|
-
var
|
|
184946
|
-
|
|
184957
|
+
var init_detect_container_0tUwtCR4_es = __esm(() => {
|
|
184958
|
+
init_detect_container_sTWXwOzh_es();
|
|
184947
184959
|
});
|
|
184948
184960
|
|
|
184949
184961
|
// ../../packages/superdoc/dist/chunks/errors-CNaD6vcg.es.js
|
|
@@ -184996,9 +185008,9 @@ var init_errors_CNaD6vcg_es = __esm(() => {
|
|
|
184996
185008
|
};
|
|
184997
185009
|
});
|
|
184998
185010
|
|
|
184999
|
-
// ../../packages/superdoc/dist/chunks/decrypt-docx-
|
|
185000
|
-
var
|
|
185001
|
-
__export(
|
|
185011
|
+
// ../../packages/superdoc/dist/chunks/decrypt-docx-CPcaRl5W.es.js
|
|
185012
|
+
var exports_decrypt_docx_CPcaRl5W_es = {};
|
|
185013
|
+
__export(exports_decrypt_docx_CPcaRl5W_es, {
|
|
185002
185014
|
decryptDocxIfNeeded: () => decryptDocxIfNeeded
|
|
185003
185015
|
});
|
|
185004
185016
|
function concatUint8Arrays(chunks) {
|
|
@@ -185539,10 +185551,10 @@ async function decryptDocxIfNeeded(data, options) {
|
|
|
185539
185551
|
};
|
|
185540
185552
|
}
|
|
185541
185553
|
var CFB_SIGNATURE, CFB_END_OF_CHAIN = 4294967294, CFB_OBJECT_TYPE, utf16LeDecoder, AGILE_VERSION = 4, AGILE_RESERVED = 4, STANDARD_VERSION_3 = 3, STANDARD_VERSION_4 = 4, STANDARD_RESERVED = 3, MIN_HEADER_SIZE = 8, BLOCK_KEY_VERIFIER_INPUT, BLOCK_KEY_VERIFIER_VALUE, BLOCK_KEY_ENCRYPTED_KEY, BLOCK_KEY_HMAC_KEY, BLOCK_KEY_HMAC_VALUE, SEGMENT_SIZE = 4096, PACKAGE_HEADER_SIZE = 8;
|
|
185542
|
-
var
|
|
185554
|
+
var init_decrypt_docx_CPcaRl5W_es = __esm(() => {
|
|
185543
185555
|
init_dist_B8HfvhaK_es();
|
|
185544
185556
|
init_errors_CNaD6vcg_es();
|
|
185545
|
-
|
|
185557
|
+
init_detect_container_sTWXwOzh_es();
|
|
185546
185558
|
CFB_SIGNATURE = new Uint8Array([
|
|
185547
185559
|
208,
|
|
185548
185560
|
207,
|
|
@@ -185611,7 +185623,7 @@ var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
|
|
|
185611
185623
|
]);
|
|
185612
185624
|
});
|
|
185613
185625
|
|
|
185614
|
-
// ../../packages/superdoc/dist/chunks/DocxZipper-
|
|
185626
|
+
// ../../packages/superdoc/dist/chunks/DocxZipper-FUsfThjV.es.js
|
|
185615
185627
|
function sniffEncoding(u8) {
|
|
185616
185628
|
if (u8.length >= 2) {
|
|
185617
185629
|
const b0 = u8[0], b1 = u8[1];
|
|
@@ -185927,11 +185939,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
|
|
|
185927
185939
|
return new Uint8Array(0);
|
|
185928
185940
|
}
|
|
185929
185941
|
async getDocxData(file, isNode3 = false, options = {}) {
|
|
185930
|
-
const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (
|
|
185942
|
+
const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_0tUwtCR4_es(), exports_detect_container_0tUwtCR4_es));
|
|
185931
185943
|
const containerType = detectContainerType2(await this.#peekBytes(file, 8));
|
|
185932
185944
|
let fileData = file;
|
|
185933
185945
|
if (containerType === "cfb") {
|
|
185934
|
-
const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (
|
|
185946
|
+
const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_CPcaRl5W_es(), exports_decrypt_docx_CPcaRl5W_es));
|
|
185935
185947
|
const result = await decryptDocxIfNeeded2(file instanceof Uint8Array ? file : file instanceof ArrayBuffer ? new Uint8Array(file) : new Uint8Array(await file.arrayBuffer()), { password: options.password });
|
|
185936
185948
|
fileData = result.data;
|
|
185937
185949
|
this.decryptedFileData = result.data;
|
|
@@ -186284,7 +186296,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
|
|
|
186284
186296
|
return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
|
|
186285
186297
|
}
|
|
186286
186298
|
}, DocxZipper_default;
|
|
186287
|
-
var
|
|
186299
|
+
var init_DocxZipper_FUsfThjV_es = __esm(() => {
|
|
186288
186300
|
init_rolldown_runtime_Bg48TavK_es();
|
|
186289
186301
|
init_jszip_C49i9kUs_es();
|
|
186290
186302
|
init_xml_js_CqGKpaft_es();
|
|
@@ -222163,9 +222175,9 @@ var init_unified_vFnLRfAM_es = __esm(() => {
|
|
|
222163
222175
|
init_unified_Dsuw2be5_es();
|
|
222164
222176
|
});
|
|
222165
222177
|
|
|
222166
|
-
// ../../packages/superdoc/dist/chunks/rehype-parse-
|
|
222167
|
-
var
|
|
222168
|
-
__export(
|
|
222178
|
+
// ../../packages/superdoc/dist/chunks/rehype-parse-DTSDs3kr.es.js
|
|
222179
|
+
var exports_rehype_parse_DTSDs3kr_es = {};
|
|
222180
|
+
__export(exports_rehype_parse_DTSDs3kr_es, {
|
|
222169
222181
|
default: () => rehypeParse
|
|
222170
222182
|
});
|
|
222171
222183
|
function merge2(definitions, space) {
|
|
@@ -228114,7 +228126,7 @@ var Schema2 = class {
|
|
|
228114
228126
|
}
|
|
228115
228127
|
}
|
|
228116
228128
|
}, TABLE_VOID_ELEMENTS, errors, base3 = "https://html.spec.whatwg.org/multipage/parsing.html#parse-error-", dashToCamelRe, formatCRe, formatXRe, fatalities, emptyOptions3;
|
|
228117
|
-
var
|
|
228129
|
+
var init_rehype_parse_DTSDs3kr_es = __esm(() => {
|
|
228118
228130
|
init_rolldown_runtime_Bg48TavK_es();
|
|
228119
228131
|
init_default_BqgWzMfR_es();
|
|
228120
228132
|
init_lib_CYqLdG4z_es();
|
|
@@ -230859,9 +230871,9 @@ var init_rehype_parse_q8NfsLv7_es = __esm(() => {
|
|
|
230859
230871
|
emptyOptions3 = {};
|
|
230860
230872
|
});
|
|
230861
230873
|
|
|
230862
|
-
// ../../packages/superdoc/dist/chunks/rehype-remark-
|
|
230863
|
-
var
|
|
230864
|
-
__export(
|
|
230874
|
+
// ../../packages/superdoc/dist/chunks/rehype-remark-Bt5njn02.es.js
|
|
230875
|
+
var exports_rehype_remark_Bt5njn02_es = {};
|
|
230876
|
+
__export(exports_rehype_remark_Bt5njn02_es, {
|
|
230865
230877
|
default: () => rehypeRemark
|
|
230866
230878
|
});
|
|
230867
230879
|
function anyFactory2(tests) {
|
|
@@ -232481,7 +232493,7 @@ var env, deserializer = ($2, _2) => {
|
|
|
232481
232493
|
if (is(parent.children[index2], index2, parent))
|
|
232482
232494
|
return parent.children[index2];
|
|
232483
232495
|
}, searchLineFeeds, searchTabOrSpaces, br$1, cell, p$1, row, notRendered, blockOrCaption, prefix = "language-", defaultChecked = "[x]", defaultUnchecked = "[ ]", own$12, list$1, basic, meta, defaultQuotes, nodeHandlers2, handlers2, own6, emptyOptions4, defaults;
|
|
232484
|
-
var
|
|
232496
|
+
var init_rehype_remark_Bt5njn02_es = __esm(() => {
|
|
232485
232497
|
init_lib_DEff_P2k_es();
|
|
232486
232498
|
env = typeof self === "object" ? self : globalThis;
|
|
232487
232499
|
({ toString: toString$1 } = {});
|
|
@@ -232875,7 +232887,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
232875
232887
|
init_remark_gfm_BhnWr3yf_es();
|
|
232876
232888
|
});
|
|
232877
232889
|
|
|
232878
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
232890
|
+
// ../../packages/superdoc/dist/chunks/src-CWo3dWd9.es.js
|
|
232879
232891
|
function deleteProps(obj, propOrProps) {
|
|
232880
232892
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
232881
232893
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -249667,7 +249679,7 @@ function buildChangedTextFields(type, excerpt) {
|
|
|
249667
249679
|
}
|
|
249668
249680
|
function buildProjectedInfo(snapshot2, options = {}) {
|
|
249669
249681
|
const id2 = options.id ?? snapshot2.address.entityId;
|
|
249670
|
-
const type = options.type ?? snapshot2.type;
|
|
249682
|
+
const type = options.type ?? projectInternalTrackChangeType(snapshot2.type, { subtype: snapshot2.subtype });
|
|
249671
249683
|
return {
|
|
249672
249684
|
info: {
|
|
249673
249685
|
address: {
|
|
@@ -249676,7 +249688,6 @@ function buildProjectedInfo(snapshot2, options = {}) {
|
|
|
249676
249688
|
},
|
|
249677
249689
|
id: id2,
|
|
249678
249690
|
type,
|
|
249679
|
-
...type === "structural" && snapshot2.subtype ? { subtype: snapshot2.subtype } : {},
|
|
249680
249691
|
grouping: options.grouping,
|
|
249681
249692
|
pairedWithChangeId: options.pairedWithChangeId ?? undefined,
|
|
249682
249693
|
wordRevisionIds: normalizeWordRevisionIds(snapshot2.wordRevisionIds),
|
|
@@ -249707,7 +249718,7 @@ function replacementPairKey2(snapshot2) {
|
|
|
249707
249718
|
return null;
|
|
249708
249719
|
}
|
|
249709
249720
|
function projectedSnapshotType(snapshot2) {
|
|
249710
|
-
return isCombinedReplacementSnapshot(snapshot2) ? "replacement" : snapshot2.type;
|
|
249721
|
+
return isCombinedReplacementSnapshot(snapshot2) ? "replacement" : projectInternalTrackChangeType(snapshot2.type, { subtype: snapshot2.subtype });
|
|
249711
249722
|
}
|
|
249712
249723
|
function snapshotGrouping(snapshot2) {
|
|
249713
249724
|
return isCombinedReplacementSnapshot(snapshot2) ? "replacement-pair" : "standalone";
|
|
@@ -249932,11 +249943,10 @@ function trackChangesListWrapper(editor, input2) {
|
|
|
249932
249943
|
const items = paged.items.map((row2) => {
|
|
249933
249944
|
const info = row2.info;
|
|
249934
249945
|
const handle3 = buildResolvedHandle(row2.handleKey, "stable", "trackedChange");
|
|
249935
|
-
const { address: address2, type,
|
|
249946
|
+
const { address: address2, type, grouping, pairedWithChangeId, wordRevisionIds, overlap, author, authorEmail, authorImage, date, excerpt, insertedText, deletedText, origin, imported } = info;
|
|
249936
249947
|
return buildDiscoveryItem(info.id, handle3, {
|
|
249937
249948
|
address: address2,
|
|
249938
249949
|
type,
|
|
249939
|
-
...subtype ? { subtype } : {},
|
|
249940
249950
|
grouping,
|
|
249941
249951
|
pairedWithChangeId,
|
|
249942
249952
|
wordRevisionIds,
|
|
@@ -249987,7 +249997,7 @@ function trackChangesGetWrapper(editor, input2) {
|
|
|
249987
249997
|
const snapshot2 = snapshots.find((item) => item.anchorKey === anchorKey || item.address.entityId === baseId);
|
|
249988
249998
|
if (snapshot2)
|
|
249989
249999
|
return snapshotToInfo(snapshot2);
|
|
249990
|
-
const type = resolveTrackedChangeType(resolved.change);
|
|
250000
|
+
const type = projectInternalTrackChangeType(resolveTrackedChangeType(resolved.change), resolved.change.structural);
|
|
249991
250001
|
const excerpt = (resolved.change.excerpt !== undefined ? resolved.change.excerpt : undefined) ?? normalizeExcerpt(resolved.editor.state.doc.textBetween(resolved.change.from, resolved.change.to, " ", ""));
|
|
249992
250002
|
const grouping = resolved.change.hasInsert && resolved.change.hasDelete && !resolved.change.hasFormat ? "replacement-pair" : undefined;
|
|
249993
250003
|
return {
|
|
@@ -249999,7 +250009,6 @@ function trackChangesGetWrapper(editor, input2) {
|
|
|
249999
250009
|
},
|
|
250000
250010
|
id: resolved.change.id,
|
|
250001
250011
|
type,
|
|
250002
|
-
...type === "structural" && resolved.change.structural ? { subtype: resolved.change.structural.subtype } : {},
|
|
250003
250012
|
grouping,
|
|
250004
250013
|
wordRevisionIds: normalizeWordRevisionIds(resolved.change.wordRevisionIds),
|
|
250005
250014
|
overlap: resolved.change.overlap,
|
|
@@ -250238,12 +250247,20 @@ function isTrackedChangeCommentTargetShape(target) {
|
|
|
250238
250247
|
return false;
|
|
250239
250248
|
return typeof value.trackedChangeId === "string" && value.trackedChangeId.length > 0;
|
|
250240
250249
|
}
|
|
250250
|
+
function trackedChangeDisplayType(snapshot2) {
|
|
250251
|
+
if (snapshot2.type !== "structural")
|
|
250252
|
+
return null;
|
|
250253
|
+
return snapshot2.subtype === "table-delete" ? "tableDelete" : "tableInsert";
|
|
250254
|
+
}
|
|
250255
|
+
function publicTrackedChangeType(snapshot2) {
|
|
250256
|
+
return projectInternalTrackChangeType(snapshot2.type, { subtype: snapshot2.subtype });
|
|
250257
|
+
}
|
|
250241
250258
|
function buildTrackedChangeLink(snapshot2) {
|
|
250242
250259
|
const { trackedChangeText, deletedText } = trackedChangeTextFields(snapshot2);
|
|
250243
250260
|
return {
|
|
250244
250261
|
trackedChange: true,
|
|
250245
|
-
trackedChangeType: snapshot2
|
|
250246
|
-
trackedChangeDisplayType:
|
|
250262
|
+
trackedChangeType: publicTrackedChangeType(snapshot2),
|
|
250263
|
+
trackedChangeDisplayType: trackedChangeDisplayType(snapshot2),
|
|
250247
250264
|
trackedChangeStory: snapshot2.story,
|
|
250248
250265
|
trackedChangeAnchorKey: snapshot2.anchorKey,
|
|
250249
250266
|
trackedChangeText,
|
|
@@ -250287,7 +250304,7 @@ function choosePreferredTrackedChangeSnapshot(snapshots, preferredId) {
|
|
|
250287
250304
|
const rightLength = Math.max(0, right$1.range.to - right$1.range.from);
|
|
250288
250305
|
if (leftLength !== rightLength)
|
|
250289
250306
|
return leftLength - rightLength;
|
|
250290
|
-
const typeDelta = trackedChangeTypePriority(left$1
|
|
250307
|
+
const typeDelta = trackedChangeTypePriority(publicTrackedChangeType(left$1)) - trackedChangeTypePriority(publicTrackedChangeType(right$1));
|
|
250291
250308
|
if (typeDelta !== 0)
|
|
250292
250309
|
return typeDelta;
|
|
250293
250310
|
if (left$1.range.from !== right$1.range.from)
|
|
@@ -250504,7 +250521,7 @@ function parseCreatedTime(value) {
|
|
|
250504
250521
|
}
|
|
250505
250522
|
function trackedChangeTextFields(snapshot2) {
|
|
250506
250523
|
const excerpt = snapshot2.excerpt ?? "";
|
|
250507
|
-
if (snapshot2
|
|
250524
|
+
if (publicTrackedChangeType(snapshot2) === "delete")
|
|
250508
250525
|
return {
|
|
250509
250526
|
trackedChangeText: "",
|
|
250510
250527
|
deletedText: excerpt
|
|
@@ -250531,7 +250548,8 @@ function toTrackedChangeCommentInfo(snapshot2) {
|
|
|
250531
250548
|
anchoredText: snapshot2.excerpt,
|
|
250532
250549
|
story: snapshot2.story,
|
|
250533
250550
|
trackedChange: true,
|
|
250534
|
-
trackedChangeType: snapshot2
|
|
250551
|
+
trackedChangeType: publicTrackedChangeType(snapshot2),
|
|
250552
|
+
trackedChangeDisplayType: trackedChangeDisplayType(snapshot2),
|
|
250535
250553
|
trackedChangeStory: snapshot2.story,
|
|
250536
250554
|
trackedChangeAnchorKey: snapshot2.anchorKey,
|
|
250537
250555
|
trackedChangeText,
|
|
@@ -251398,7 +251416,7 @@ function listCommentsHandler(editor, query2) {
|
|
|
251398
251416
|
const paged = paginate(filtered, query2?.offset, query2?.limit);
|
|
251399
251417
|
const items = paged.items.map((comment2) => {
|
|
251400
251418
|
const handle3 = buildResolvedHandle(`comment:${comment2.commentId}`, "stable", "comment");
|
|
251401
|
-
const { importedId, parentCommentId, text: text5, isInternal, status, target, anchoredText, createdTime, creatorName, creatorEmail, address: address2, story, trackedChange, trackedChangeType, trackedChangeDisplayType, trackedChangeStory, trackedChangeAnchorKey, trackedChangeText, deletedText, trackedChangeLink } = comment2;
|
|
251419
|
+
const { importedId, parentCommentId, text: text5, isInternal, status, target, anchoredText, createdTime, creatorName, creatorEmail, address: address2, story, trackedChange, trackedChangeType, trackedChangeDisplayType: trackedChangeDisplayType$1, trackedChangeStory, trackedChangeAnchorKey, trackedChangeText, deletedText, trackedChangeLink } = comment2;
|
|
251402
251420
|
return buildDiscoveryItem(comment2.commentId, handle3, {
|
|
251403
251421
|
address: address2,
|
|
251404
251422
|
importedId,
|
|
@@ -251414,7 +251432,7 @@ function listCommentsHandler(editor, query2) {
|
|
|
251414
251432
|
story,
|
|
251415
251433
|
trackedChange,
|
|
251416
251434
|
trackedChangeType,
|
|
251417
|
-
trackedChangeDisplayType,
|
|
251435
|
+
trackedChangeDisplayType: trackedChangeDisplayType$1,
|
|
251418
251436
|
trackedChangeStory,
|
|
251419
251437
|
trackedChangeAnchorKey,
|
|
251420
251438
|
trackedChangeText,
|
|
@@ -252351,6 +252369,27 @@ function rewriteImportedStyleNumbering(importedStyleEls, numRemap) {
|
|
|
252351
252369
|
function numAttr(el, attr) {
|
|
252352
252370
|
return el.attributes?.[attr];
|
|
252353
252371
|
}
|
|
252372
|
+
function reorderNumberingChildren(numberingEl) {
|
|
252373
|
+
if (!numberingEl.elements)
|
|
252374
|
+
return;
|
|
252375
|
+
const other = [];
|
|
252376
|
+
const abstracts = [];
|
|
252377
|
+
const nums = [];
|
|
252378
|
+
for (const el of numberingEl.elements) {
|
|
252379
|
+
const ln = localName$1(el);
|
|
252380
|
+
if (ln === "abstractNum")
|
|
252381
|
+
abstracts.push(el);
|
|
252382
|
+
else if (ln === "num")
|
|
252383
|
+
nums.push(el);
|
|
252384
|
+
else
|
|
252385
|
+
other.push(el);
|
|
252386
|
+
}
|
|
252387
|
+
numberingEl.elements = [
|
|
252388
|
+
...other,
|
|
252389
|
+
...abstracts,
|
|
252390
|
+
...nums
|
|
252391
|
+
];
|
|
252392
|
+
}
|
|
252354
252393
|
function mergeNumberingGraph(currentRoot, sourceRoot) {
|
|
252355
252394
|
const result = {
|
|
252356
252395
|
numRemap: /* @__PURE__ */ new Map,
|
|
@@ -252434,6 +252473,7 @@ function mergeNumberingGraph(currentRoot, sourceRoot) {
|
|
|
252434
252473
|
usedNum.add(id2);
|
|
252435
252474
|
cur.elements.push(next2);
|
|
252436
252475
|
}
|
|
252476
|
+
reorderNumberingChildren(cur);
|
|
252437
252477
|
return result;
|
|
252438
252478
|
}
|
|
252439
252479
|
function reconcileSettings(currentRoot, sourceRoot) {
|
|
@@ -252623,18 +252663,21 @@ function importHeaderFooterAssets(editor, converter, byName, dryRun) {
|
|
|
252623
252663
|
usedMedia.add(allocated);
|
|
252624
252664
|
return allocated;
|
|
252625
252665
|
};
|
|
252626
|
-
const
|
|
252666
|
+
const sourceRelIdsByTarget = /* @__PURE__ */ new Map;
|
|
252627
252667
|
for (const rel of srcRelEls) {
|
|
252628
252668
|
const type = rel.attributes?.Type;
|
|
252629
252669
|
const target = rel.attributes?.Target;
|
|
252630
252670
|
const id2 = rel.attributes?.Id;
|
|
252631
252671
|
if (!type || !target || !id2)
|
|
252632
252672
|
continue;
|
|
252633
|
-
if (type === HEADER_REL_TYPE2 || type === FOOTER_REL_TYPE2)
|
|
252634
|
-
|
|
252635
|
-
|
|
252636
|
-
|
|
252637
|
-
|
|
252673
|
+
if (type === HEADER_REL_TYPE2 || type === FOOTER_REL_TYPE2) {
|
|
252674
|
+
const sourceTarget = relTargetToWordPath(target).replace(/^word\//, "");
|
|
252675
|
+
const existing = sourceRelIdsByTarget.get(sourceTarget);
|
|
252676
|
+
if (existing)
|
|
252677
|
+
existing.push(id2);
|
|
252678
|
+
else
|
|
252679
|
+
sourceRelIdsByTarget.set(sourceTarget, [id2]);
|
|
252680
|
+
}
|
|
252638
252681
|
}
|
|
252639
252682
|
const setHeaderIdsArray = (idsHolder, relId) => {
|
|
252640
252683
|
if (!Array.isArray(idsHolder.ids))
|
|
@@ -252725,12 +252768,12 @@ function importHeaderFooterAssets(editor, converter, byName, dryRun) {
|
|
|
252725
252768
|
}
|
|
252726
252769
|
});
|
|
252727
252770
|
docRelsChanged = true;
|
|
252728
|
-
const
|
|
252729
|
-
|
|
252730
|
-
result.relIdRemap.set(
|
|
252771
|
+
const sourceRelIds = sourceRelIdsByTarget.get(sourceTarget) ?? [];
|
|
252772
|
+
for (const sourceRelId of sourceRelIds) {
|
|
252773
|
+
result.relIdRemap.set(sourceRelId, relId);
|
|
252731
252774
|
result.mappings.push({
|
|
252732
252775
|
kind: "relationship",
|
|
252733
|
-
from:
|
|
252776
|
+
from: sourceRelId,
|
|
252734
252777
|
to: relId
|
|
252735
252778
|
});
|
|
252736
252779
|
}
|
|
@@ -252780,6 +252823,29 @@ function ensureContentTypeOverride$1(converter, partPath, contentType) {
|
|
|
252780
252823
|
});
|
|
252781
252824
|
return true;
|
|
252782
252825
|
}
|
|
252826
|
+
function toSectionXmlElement(node3) {
|
|
252827
|
+
if (!node3.name)
|
|
252828
|
+
throw new Error("Expected named XML element.");
|
|
252829
|
+
return {
|
|
252830
|
+
type: node3.type,
|
|
252831
|
+
name: node3.name,
|
|
252832
|
+
attributes: node3.attributes ? { ...node3.attributes } : undefined,
|
|
252833
|
+
elements: node3.elements?.filter((child) => typeof child.name === "string").map((child) => toSectionXmlElement(child))
|
|
252834
|
+
};
|
|
252835
|
+
}
|
|
252836
|
+
function mergePageOneHeaderFooterModel(targetSectPr, sourceSectPr) {
|
|
252837
|
+
const mergedSectPr = ensureSectPrElement(targetSectPr);
|
|
252838
|
+
for (const kind of HEADER_FOOTER_KINDS4)
|
|
252839
|
+
for (const variant of HEADER_FOOTER_VARIANTS$2) {
|
|
252840
|
+
const sourceRef = getSectPrHeaderFooterRef(sourceSectPr, kind, variant);
|
|
252841
|
+
if (sourceRef)
|
|
252842
|
+
setSectPrHeaderFooterRef(mergedSectPr, kind, variant, sourceRef);
|
|
252843
|
+
else
|
|
252844
|
+
clearSectPrHeaderFooterRef(mergedSectPr, kind, variant);
|
|
252845
|
+
}
|
|
252846
|
+
writeSectPrTitlePage(mergedSectPr, readSectPrTitlePage(sourceSectPr));
|
|
252847
|
+
return mergedSectPr;
|
|
252848
|
+
}
|
|
252783
252849
|
function applyPageOneSectionDefaults(editor, sourceDocumentXml, relIdRemap, parseXml2, dryRun) {
|
|
252784
252850
|
const result = {
|
|
252785
252851
|
detected: false,
|
|
@@ -252798,8 +252864,18 @@ function applyPageOneSectionDefaults(editor, sourceDocumentXml, relIdRemap, pars
|
|
|
252798
252864
|
if (!sourceSectPr)
|
|
252799
252865
|
return result;
|
|
252800
252866
|
result.detected = true;
|
|
252801
|
-
|
|
252802
|
-
|
|
252867
|
+
let sectPr;
|
|
252868
|
+
try {
|
|
252869
|
+
const rewrittenSectPr = clone(sourceSectPr);
|
|
252870
|
+
rewriteSectPrRefs(rewrittenSectPr, relIdRemap);
|
|
252871
|
+
sectPr = toSectionXmlElement(rewrittenSectPr);
|
|
252872
|
+
} catch {
|
|
252873
|
+
result.warnings.push({
|
|
252874
|
+
code: "SECTION_DEFAULTS_UNAVAILABLE",
|
|
252875
|
+
message: "Could not normalize the source page-1 sectPr."
|
|
252876
|
+
});
|
|
252877
|
+
return result;
|
|
252878
|
+
}
|
|
252803
252879
|
let projections;
|
|
252804
252880
|
try {
|
|
252805
252881
|
projections = resolveSectionProjections(editor);
|
|
@@ -252810,26 +252886,43 @@ function applyPageOneSectionDefaults(editor, sourceDocumentXml, relIdRemap, pars
|
|
|
252810
252886
|
});
|
|
252811
252887
|
return result;
|
|
252812
252888
|
}
|
|
252813
|
-
|
|
252814
|
-
if (!bodyProjection) {
|
|
252889
|
+
if (projections.length === 0) {
|
|
252815
252890
|
result.warnings.push({
|
|
252816
252891
|
code: "SECTION_DEFAULTS_UNAVAILABLE",
|
|
252817
|
-
message: "No
|
|
252892
|
+
message: "No section projections found for page-1 sectPr adoption."
|
|
252818
252893
|
});
|
|
252819
252894
|
return result;
|
|
252820
252895
|
}
|
|
252821
|
-
|
|
252896
|
+
const bodyProjection = [...projections].reverse().find((projection) => projection.target.kind === "body") ?? projections[projections.length - 1];
|
|
252897
|
+
const sectionUpdates = projections.map((projection) => {
|
|
252898
|
+
const currentSectPr = readTargetSectPr(editor, projection);
|
|
252899
|
+
const nextSectPr = projection.sectionId === bodyProjection.sectionId ? clone(sectPr) : mergePageOneHeaderFooterModel(currentSectPr, sectPr);
|
|
252900
|
+
if (xmlDeepEqual(currentSectPr, nextSectPr))
|
|
252901
|
+
return null;
|
|
252902
|
+
return {
|
|
252903
|
+
sectionId: projection.sectionId,
|
|
252904
|
+
nextSectPr
|
|
252905
|
+
};
|
|
252906
|
+
}).filter((update) => Boolean(update));
|
|
252907
|
+
if (sectionUpdates.length === 0)
|
|
252822
252908
|
return result;
|
|
252823
252909
|
result.changed = true;
|
|
252824
252910
|
result.changedParts.push({
|
|
252825
252911
|
part: "word/document.xml",
|
|
252826
252912
|
scope: "sectionDefaults",
|
|
252827
|
-
change: "replaced"
|
|
252913
|
+
change: sectionUpdates.some((update) => update.sectionId !== bodyProjection.sectionId) ? "merged" : "replaced"
|
|
252828
252914
|
});
|
|
252829
252915
|
if (dryRun)
|
|
252830
252916
|
return result;
|
|
252831
252917
|
try {
|
|
252832
|
-
|
|
252918
|
+
for (let index2 = 0;index2 < sectionUpdates.length; index2 += 1) {
|
|
252919
|
+
const update = sectionUpdates[index2];
|
|
252920
|
+
const liveProjection = resolveSectionProjections(editor).find((projection) => projection.sectionId === update.sectionId);
|
|
252921
|
+
if (!liveProjection)
|
|
252922
|
+
throw new Error(`Section ${update.sectionId} disappeared during page-1 sectPr adoption.`);
|
|
252923
|
+
applySectPrToProjection(editor, liveProjection, clone(update.nextSectPr), { addToHistory: index2 === sectionUpdates.length - 1 });
|
|
252924
|
+
}
|
|
252925
|
+
clearIndexCache(editor);
|
|
252833
252926
|
result.applied = true;
|
|
252834
252927
|
} catch (err) {
|
|
252835
252928
|
result.changed = false;
|
|
@@ -253297,7 +253390,7 @@ async function applyTemplateAsync(editor, converter, input2, options) {
|
|
|
253297
253390
|
});
|
|
253298
253391
|
} else if (sec.detected) {
|
|
253299
253392
|
warnings.push(...sec.warnings);
|
|
253300
|
-
pushNoChangeSkip(skippedScopes, "sectionDefaults", "word/document.xml", sec.warnings.length > 0 ? "Source page-1 section defaults could not be applied." : "Source page-1 section defaults already match the active section defaults.");
|
|
253393
|
+
pushNoChangeSkip(skippedScopes, "sectionDefaults", "word/document.xml", sec.warnings.length > 0 ? "Source page-1 section defaults could not be applied." : "Source page-1 section defaults already match the current document's active section defaults and section header/footer visibility model.");
|
|
253301
253394
|
}
|
|
253302
253395
|
}
|
|
253303
253396
|
if (styleMappings.length > 0)
|
|
@@ -296564,7 +296657,7 @@ var Node$13 = class Node$14 {
|
|
|
296564
296657
|
}, getTrackedChangeText = ({ nodes, mark: mark2, trackedChangeType, isReplacement }) => {
|
|
296565
296658
|
let trackedChangeText = "";
|
|
296566
296659
|
let deletionText = "";
|
|
296567
|
-
let trackedChangeDisplayType = null;
|
|
296660
|
+
let trackedChangeDisplayType$1 = null;
|
|
296568
296661
|
if (trackedChangeType === "trackDelete" || isReplacement)
|
|
296569
296662
|
deletionText = nodes.reduce((acc, node3) => {
|
|
296570
296663
|
if (!node3.marks.find((nodeMark) => nodeMark.type.name === "trackDelete"))
|
|
@@ -296589,14 +296682,14 @@ var Node$13 = class Node$14 {
|
|
|
296589
296682
|
});
|
|
296590
296683
|
if (trackedFormatDisplay) {
|
|
296591
296684
|
trackedChangeText = trackedFormatDisplay.trackedChangeText;
|
|
296592
|
-
trackedChangeDisplayType = trackedFormatDisplay.trackedChangeDisplayType;
|
|
296685
|
+
trackedChangeDisplayType$1 = trackedFormatDisplay.trackedChangeDisplayType;
|
|
296593
296686
|
} else
|
|
296594
296687
|
trackedChangeText = translateFormatChangesToEnglish(normalizedFormatAttrs);
|
|
296595
296688
|
}
|
|
296596
296689
|
return {
|
|
296597
296690
|
deletionText,
|
|
296598
296691
|
trackedChangeText,
|
|
296599
|
-
trackedChangeDisplayType
|
|
296692
|
+
trackedChangeDisplayType: trackedChangeDisplayType$1
|
|
296600
296693
|
};
|
|
296601
296694
|
}, createOrUpdateTrackedChangeComment = ({ event, marks, deletionNodes, nodes, newEditorState, documentId, trackedChangesForId }) => {
|
|
296602
296695
|
const node3 = nodes[0];
|
|
@@ -296640,7 +296733,7 @@ var Node$13 = class Node$14 {
|
|
|
296640
296733
|
nodesToUse = nodesWithMark.length ? nodesWithMark : node3 ? [node3] : [];
|
|
296641
296734
|
if (!nodesToUse.length)
|
|
296642
296735
|
return;
|
|
296643
|
-
const { deletionText, trackedChangeText, trackedChangeDisplayType } = getTrackedChangeText({
|
|
296736
|
+
const { deletionText, trackedChangeText, trackedChangeDisplayType: trackedChangeDisplayType$1 } = getTrackedChangeText({
|
|
296644
296737
|
nodes: nodesToUse,
|
|
296645
296738
|
mark: trackedMark,
|
|
296646
296739
|
trackedChangeType,
|
|
@@ -296656,7 +296749,7 @@ var Node$13 = class Node$14 {
|
|
|
296656
296749
|
changeId: id2,
|
|
296657
296750
|
trackedChangeType: isReplacement ? "both" : trackedChangeType,
|
|
296658
296751
|
trackedChangeText,
|
|
296659
|
-
trackedChangeDisplayType,
|
|
296752
|
+
trackedChangeDisplayType: trackedChangeDisplayType$1,
|
|
296660
296753
|
deletedText: isReplacement || marks.deletionMark ? deletionText : null,
|
|
296661
296754
|
author,
|
|
296662
296755
|
...authorId && { authorId },
|
|
@@ -310343,7 +310436,7 @@ var Node$13 = class Node$14 {
|
|
|
310343
310436
|
listener(snapshot2);
|
|
310344
310437
|
} catch {}
|
|
310345
310438
|
}
|
|
310346
|
-
}, projectedTrackedChangeCache, TRACK_MARK_TYPE_BY_NAME, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, import_jszip_min2, LAYOUT_AFFECTING_SETTING_NAMES, HEADER_REL_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_REL_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", IMAGE_REL_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", HEADER_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml", FOOTER_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml", CONTENT_TYPES_PART$1 = "[Content_Types].xml", DOCUMENT_RELS_PART$1 = "word/_rels/document.xml.rels", SUBSTRATE_SCOPE_ORDER, CONTENT_TYPE_BY_SCOPE, REL_TYPE_BY_PART, CONTENT_TYPES_PART = "[Content_Types].xml", DOCUMENT_RELS_PART = "word/_rels/document.xml.rels", SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, SYMBOL_FONT_NAMES, RFONTS_FAMILY_ATTRS, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, COMMENT_MARK_NAME2 = "commentMark", TRACK_CHANGE_MARK_NAMES, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", PRESET_GREY = "999999", PRESET_BLACK = "000000", STATIC_PRESETS, IDENTITY_BLOCK_ATTRS, WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, BatchHistoryAdapter = class {
|
|
310439
|
+
}, projectedTrackedChangeCache, TRACK_MARK_TYPE_BY_NAME, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, import_jszip_min2, LAYOUT_AFFECTING_SETTING_NAMES, HEADER_REL_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_REL_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", IMAGE_REL_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", HEADER_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml", FOOTER_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml", CONTENT_TYPES_PART$1 = "[Content_Types].xml", DOCUMENT_RELS_PART$1 = "word/_rels/document.xml.rels", HEADER_FOOTER_KINDS4, HEADER_FOOTER_VARIANTS$2, SUBSTRATE_SCOPE_ORDER, CONTENT_TYPE_BY_SCOPE, REL_TYPE_BY_PART, CONTENT_TYPES_PART = "[Content_Types].xml", DOCUMENT_RELS_PART = "word/_rels/document.xml.rels", SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, SYMBOL_FONT_NAMES, RFONTS_FAMILY_ATTRS, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, COMMENT_MARK_NAME2 = "commentMark", TRACK_CHANGE_MARK_NAMES, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", PRESET_GREY = "999999", PRESET_BLACK = "000000", STATIC_PRESETS, IDENTITY_BLOCK_ATTRS, WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, BatchHistoryAdapter = class {
|
|
310347
310440
|
#done = [];
|
|
310348
310441
|
#redone = [];
|
|
310349
310442
|
#listeners = /* @__PURE__ */ new Set;
|
|
@@ -330112,19 +330205,19 @@ menclose::after {
|
|
|
330112
330205
|
return;
|
|
330113
330206
|
console.log(...args$1);
|
|
330114
330207
|
}, 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;
|
|
330115
|
-
var
|
|
330208
|
+
var init_src_CWo3dWd9_es = __esm(() => {
|
|
330116
330209
|
init_rolldown_runtime_Bg48TavK_es();
|
|
330117
|
-
|
|
330210
|
+
init_SuperConverter_DOoAJ6Zk_es();
|
|
330118
330211
|
init_jszip_C49i9kUs_es();
|
|
330119
330212
|
init_xml_js_CqGKpaft_es();
|
|
330120
330213
|
init_uuid_qzgm05fK_es();
|
|
330121
|
-
|
|
330214
|
+
init_create_headless_toolbar_pilP_Jq_es();
|
|
330122
330215
|
init_constants_D9qj59G2_es();
|
|
330123
330216
|
init_dist_B8HfvhaK_es();
|
|
330124
330217
|
init_unified_Dsuw2be5_es();
|
|
330125
330218
|
init_remark_gfm_BhnWr3yf_es();
|
|
330126
330219
|
init_remark_stringify_6MMJfY0k_es();
|
|
330127
|
-
|
|
330220
|
+
init_DocxZipper_FUsfThjV_es();
|
|
330128
330221
|
init__plugin_vue_export_helper_5t5P5NuM_es();
|
|
330129
330222
|
init_eventemitter3_BnGqBE_Q_es();
|
|
330130
330223
|
init_errors_CNaD6vcg_es();
|
|
@@ -353787,6 +353880,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
353787
353880
|
"noPunctuationKerning",
|
|
353788
353881
|
"kerning"
|
|
353789
353882
|
]);
|
|
353883
|
+
HEADER_FOOTER_KINDS4 = ["header", "footer"];
|
|
353884
|
+
HEADER_FOOTER_VARIANTS$2 = [
|
|
353885
|
+
"default",
|
|
353886
|
+
"first",
|
|
353887
|
+
"even"
|
|
353888
|
+
];
|
|
353790
353889
|
SUBSTRATE_SCOPE_ORDER = [
|
|
353791
353890
|
"styles",
|
|
353792
353891
|
"numbering",
|
|
@@ -356101,8 +356200,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
356101
356200
|
try {
|
|
356102
356201
|
const [{ unified: unified$1 }, { default: rehypeParse2 }, { default: rehypeRemark2 }, { default: remarkStringify$1 }, { default: remarkGfm$1 }] = await Promise.all([
|
|
356103
356202
|
Promise.resolve().then(() => (init_unified_vFnLRfAM_es(), exports_unified_vFnLRfAM_es)),
|
|
356104
|
-
Promise.resolve().then(() => (
|
|
356105
|
-
Promise.resolve().then(() => (
|
|
356203
|
+
Promise.resolve().then(() => (init_rehype_parse_DTSDs3kr_es(), exports_rehype_parse_DTSDs3kr_es)),
|
|
356204
|
+
Promise.resolve().then(() => (init_rehype_remark_Bt5njn02_es(), exports_rehype_remark_Bt5njn02_es)),
|
|
356106
356205
|
Promise.resolve().then(() => (init_remark_stringify_B_orWEvD_es(), exports_remark_stringify_B_orWEvD_es)),
|
|
356107
356206
|
Promise.resolve().then(() => (init_remark_gfm_eZN6yzWQ_es(), exports_remark_gfm_eZN6yzWQ_es))
|
|
356108
356207
|
]);
|
|
@@ -364952,11 +365051,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
364952
365051
|
]);
|
|
364953
365052
|
});
|
|
364954
365053
|
|
|
364955
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
365054
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-DUlu2DFj.es.js
|
|
364956
365055
|
var headlessToolbarConstants, 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;
|
|
364957
|
-
var
|
|
364958
|
-
|
|
364959
|
-
|
|
365056
|
+
var init_create_super_doc_ui_DUlu2DFj_es = __esm(() => {
|
|
365057
|
+
init_SuperConverter_DOoAJ6Zk_es();
|
|
365058
|
+
init_create_headless_toolbar_pilP_Jq_es();
|
|
364960
365059
|
headlessToolbarConstants = {
|
|
364961
365060
|
DEFAULT_TEXT_ALIGN_OPTIONS: [
|
|
364962
365061
|
{
|
|
@@ -365238,16 +365337,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
365238
365337
|
|
|
365239
365338
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
365240
365339
|
var init_super_editor_es = __esm(() => {
|
|
365241
|
-
|
|
365242
|
-
|
|
365340
|
+
init_src_CWo3dWd9_es();
|
|
365341
|
+
init_SuperConverter_DOoAJ6Zk_es();
|
|
365243
365342
|
init_jszip_C49i9kUs_es();
|
|
365244
365343
|
init_xml_js_CqGKpaft_es();
|
|
365245
|
-
|
|
365344
|
+
init_create_headless_toolbar_pilP_Jq_es();
|
|
365246
365345
|
init_constants_D9qj59G2_es();
|
|
365247
365346
|
init_dist_B8HfvhaK_es();
|
|
365248
365347
|
init_unified_Dsuw2be5_es();
|
|
365249
|
-
|
|
365250
|
-
|
|
365348
|
+
init_DocxZipper_FUsfThjV_es();
|
|
365349
|
+
init_create_super_doc_ui_DUlu2DFj_es();
|
|
365251
365350
|
init_ui_C5PAS9hY_es();
|
|
365252
365351
|
init_eventemitter3_BnGqBE_Q_es();
|
|
365253
365352
|
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.34",
|
|
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-
|
|
37
|
-
"@superdoc-dev/cli-darwin-
|
|
38
|
-
"@superdoc-dev/cli-linux-x64": "0.16.0-next.
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
36
|
+
"@superdoc-dev/cli-darwin-x64": "0.16.0-next.34",
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.16.0-next.34",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.16.0-next.34",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.16.0-next.34",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.16.0-next.34"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"predev": "node scripts/ensure-superdoc-build.js",
|