@superdoc-dev/cli 0.13.0-next.13 → 0.13.0-next.14
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 +50 -22
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -18876,6 +18876,9 @@ function executeAnchoredMetadataList(adapter, query2) {
|
|
|
18876
18876
|
if (query2?.within !== undefined) {
|
|
18877
18877
|
validateWithin(query2.within, "metadata.list");
|
|
18878
18878
|
}
|
|
18879
|
+
if (query2?.resolvedOnly !== undefined && typeof query2.resolvedOnly !== "boolean") {
|
|
18880
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `metadata.list 'resolvedOnly' must be a boolean when provided.`);
|
|
18881
|
+
}
|
|
18879
18882
|
return adapter.list(query2);
|
|
18880
18883
|
}
|
|
18881
18884
|
function executeAnchoredMetadataGet(adapter, input) {
|
|
@@ -67790,7 +67793,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
67790
67793
|
emptyOptions2 = {};
|
|
67791
67794
|
});
|
|
67792
67795
|
|
|
67793
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
67796
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-1HMbTEKL.es.js
|
|
67794
67797
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
67795
67798
|
const fieldValue = extension$1.config[field];
|
|
67796
67799
|
if (typeof fieldValue === "function")
|
|
@@ -74348,6 +74351,8 @@ function executeAnchoredMetadataList2(adapter, query2) {
|
|
|
74348
74351
|
throw new DocumentApiValidationError2("INVALID_INPUT", `metadata.list 'namespace' must be a string when provided.`);
|
|
74349
74352
|
if (query2?.within !== undefined)
|
|
74350
74353
|
validateWithin2(query2.within, "metadata.list");
|
|
74354
|
+
if (query2?.resolvedOnly !== undefined && typeof query2.resolvedOnly !== "boolean")
|
|
74355
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `metadata.list 'resolvedOnly' must be a boolean when provided.`);
|
|
74351
74356
|
return adapter.list(query2);
|
|
74352
74357
|
}
|
|
74353
74358
|
function executeAnchoredMetadataGet2(adapter, input) {
|
|
@@ -122653,7 +122658,7 @@ var isRegExp = (value) => {
|
|
|
122653
122658
|
state.kern = kernNode.attributes["w:val"];
|
|
122654
122659
|
}
|
|
122655
122660
|
}, SuperConverter;
|
|
122656
|
-
var
|
|
122661
|
+
var init_SuperConverter_1HMbTEKL_es = __esm(() => {
|
|
122657
122662
|
init_rolldown_runtime_Bg48TavK_es();
|
|
122658
122663
|
init_jszip_C49i9kUs_es();
|
|
122659
122664
|
init_xml_js_CqGKpaft_es();
|
|
@@ -160967,7 +160972,7 @@ var init_SuperConverter_qtmGhHOJ_es = __esm(() => {
|
|
|
160967
160972
|
};
|
|
160968
160973
|
});
|
|
160969
160974
|
|
|
160970
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
160975
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-Bd3oZr3v.es.js
|
|
160971
160976
|
function parseSizeUnit(val = "0") {
|
|
160972
160977
|
const length3 = val.toString() || "0";
|
|
160973
160978
|
const value = Number.parseFloat(length3);
|
|
@@ -171199,8 +171204,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
171199
171204
|
}
|
|
171200
171205
|
};
|
|
171201
171206
|
};
|
|
171202
|
-
var
|
|
171203
|
-
|
|
171207
|
+
var init_create_headless_toolbar_Bd3oZr3v_es = __esm(() => {
|
|
171208
|
+
init_SuperConverter_1HMbTEKL_es();
|
|
171204
171209
|
init_uuid_qzgm05fK_es();
|
|
171205
171210
|
init_constants_DrU4EASo_es();
|
|
171206
171211
|
init_dist_B8HfvhaK_es();
|
|
@@ -220410,7 +220415,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
220410
220415
|
init_remark_gfm_BhnWr3yf_es();
|
|
220411
220416
|
});
|
|
220412
220417
|
|
|
220413
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
220418
|
+
// ../../packages/superdoc/dist/chunks/src-DC9lS58S.es.js
|
|
220414
220419
|
function deleteProps(obj, propOrProps) {
|
|
220415
220420
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
220416
220421
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -253164,6 +253169,15 @@ function parseMetadataPart(convertedXml, partName) {
|
|
|
253164
253169
|
function listMetadataParts(convertedXml) {
|
|
253165
253170
|
return listCustomXmlParts(convertedXml).map((part) => parseMetadataPart(convertedXml, part.partName)).filter((part) => part !== null);
|
|
253166
253171
|
}
|
|
253172
|
+
function buildFilteredMetadataXml(editor, convertedXml, options) {
|
|
253173
|
+
const filtered = {};
|
|
253174
|
+
const finalDoc = options?.finalDoc === true;
|
|
253175
|
+
for (const part of listMetadataParts(convertedXml)) {
|
|
253176
|
+
const resolvedEntries = finalDoc ? [] : part.entries.filter((entry) => hasAnchor(editor, entry.id));
|
|
253177
|
+
filtered[part.partName] = buildEnvelopeXml(part.namespace, resolvedEntries);
|
|
253178
|
+
}
|
|
253179
|
+
return filtered;
|
|
253180
|
+
}
|
|
253167
253181
|
function findPartByNamespace(convertedXml, namespace) {
|
|
253168
253182
|
return listMetadataParts(convertedXml).find((part) => part.namespace === namespace) ?? null;
|
|
253169
253183
|
}
|
|
@@ -253218,7 +253232,7 @@ function findAnchorsById(editor, id2) {
|
|
|
253218
253232
|
return findAllSdtNodes(editor.state.doc).filter((sdt) => sdt.kind === "inline" && sdt.node.attrs?.tag === id2);
|
|
253219
253233
|
}
|
|
253220
253234
|
function hasAnchor(editor, id2) {
|
|
253221
|
-
return
|
|
253235
|
+
return findAnchorsById(editor, id2).length > 0;
|
|
253222
253236
|
}
|
|
253223
253237
|
function wrapRangeInAnchor(editor, target, id2) {
|
|
253224
253238
|
const { absFrom, absTo } = resolveSelectionTarget(editor, target);
|
|
@@ -253353,11 +253367,12 @@ function removeEntry(editor, id2, dryRun) {
|
|
|
253353
253367
|
markConverterDirty(editor);
|
|
253354
253368
|
return true;
|
|
253355
253369
|
}
|
|
253356
|
-
function toSummary(entry) {
|
|
253370
|
+
function toSummary(entry, editor) {
|
|
253357
253371
|
return {
|
|
253358
253372
|
id: entry.id,
|
|
253359
253373
|
namespace: entry.namespace,
|
|
253360
|
-
partName: entry.partName
|
|
253374
|
+
partName: entry.partName,
|
|
253375
|
+
anchorStatus: hasAnchor(editor, entry.id) ? "resolved" : "orphan"
|
|
253361
253376
|
};
|
|
253362
253377
|
}
|
|
253363
253378
|
function listEntries(editor, query2) {
|
|
@@ -253366,11 +253381,13 @@ function listEntries(editor, query2) {
|
|
|
253366
253381
|
entries2 = entries2.filter((entry) => entry.namespace === query2.namespace);
|
|
253367
253382
|
if (query2?.within !== undefined)
|
|
253368
253383
|
entries2 = entries2.filter((entry) => anchorOverlaps(editor, entry.id, query2.within));
|
|
253384
|
+
if (query2?.resolvedOnly)
|
|
253385
|
+
entries2 = entries2.filter((entry) => hasAnchor(editor, entry.id));
|
|
253369
253386
|
return entries2;
|
|
253370
253387
|
}
|
|
253371
253388
|
function metadataListWrapper(editor, query2) {
|
|
253372
253389
|
const { total, items } = paginate(listEntries(editor, query2).map((entry) => {
|
|
253373
|
-
const summary = toSummary(entry);
|
|
253390
|
+
const summary = toSummary(entry, editor);
|
|
253374
253391
|
return buildDiscoveryItem(summary.id, buildResolvedHandle(`metadata:${summary.id}`, "ephemeral", "ext:anchoredMetadata"), summary);
|
|
253375
253392
|
}), query2?.offset, query2?.limit);
|
|
253376
253393
|
return buildDiscoveryResult({
|
|
@@ -253385,7 +253402,13 @@ function metadataListWrapper(editor, query2) {
|
|
|
253385
253402
|
});
|
|
253386
253403
|
}
|
|
253387
253404
|
function metadataGetWrapper(editor, input2) {
|
|
253388
|
-
|
|
253405
|
+
const entry = findEntry(getConvertedXml2(editor), input2.id);
|
|
253406
|
+
if (!entry)
|
|
253407
|
+
return null;
|
|
253408
|
+
return {
|
|
253409
|
+
...entry,
|
|
253410
|
+
anchorStatus: hasAnchor(editor, entry.id) ? "resolved" : "orphan"
|
|
253411
|
+
};
|
|
253389
253412
|
}
|
|
253390
253413
|
function metadataResolveWrapper(editor, input2) {
|
|
253391
253414
|
if (!hasPayloadEntry(getConvertedXml2(editor), input2.id))
|
|
@@ -313245,13 +313268,13 @@ menclose::after {
|
|
|
313245
313268
|
return;
|
|
313246
313269
|
console.log(...args$1);
|
|
313247
313270
|
}, 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;
|
|
313248
|
-
var
|
|
313271
|
+
var init_src_DC9lS58S_es = __esm(() => {
|
|
313249
313272
|
init_rolldown_runtime_Bg48TavK_es();
|
|
313250
|
-
|
|
313273
|
+
init_SuperConverter_1HMbTEKL_es();
|
|
313251
313274
|
init_jszip_C49i9kUs_es();
|
|
313252
313275
|
init_xml_js_CqGKpaft_es();
|
|
313253
313276
|
init_uuid_qzgm05fK_es();
|
|
313254
|
-
|
|
313277
|
+
init_create_headless_toolbar_Bd3oZr3v_es();
|
|
313255
313278
|
init_constants_DrU4EASo_es();
|
|
313256
313279
|
init_dist_B8HfvhaK_es();
|
|
313257
313280
|
init_unified_Dsuw2be5_es();
|
|
@@ -339022,6 +339045,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
339022
339045
|
if (partData?.elements?.[0])
|
|
339023
339046
|
updatedDocs[path2] = String(this.converter.schemaToXml(partData.elements[0]));
|
|
339024
339047
|
}
|
|
339048
|
+
if (isFinalDoc) {
|
|
339049
|
+
const filteredMetadataParts = buildFilteredMetadataXml(this, this.converter.convertedXml, { finalDoc: true });
|
|
339050
|
+
for (const [path2, xml2] of Object.entries(filteredMetadataParts))
|
|
339051
|
+
updatedDocs[path2] = xml2;
|
|
339052
|
+
}
|
|
339025
339053
|
for (const path2 of Object.keys(this.converter.convertedXml)) {
|
|
339026
339054
|
if (!path2.startsWith("customXml/"))
|
|
339027
339055
|
continue;
|
|
@@ -351278,11 +351306,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
351278
351306
|
]);
|
|
351279
351307
|
});
|
|
351280
351308
|
|
|
351281
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
351309
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-BObTHhKp.es.js
|
|
351282
351310
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
351283
|
-
var
|
|
351284
|
-
|
|
351285
|
-
|
|
351311
|
+
var init_create_super_doc_ui_BObTHhKp_es = __esm(() => {
|
|
351312
|
+
init_SuperConverter_1HMbTEKL_es();
|
|
351313
|
+
init_create_headless_toolbar_Bd3oZr3v_es();
|
|
351286
351314
|
MOD_ALIASES = new Set([
|
|
351287
351315
|
"Mod",
|
|
351288
351316
|
"Meta",
|
|
@@ -351324,16 +351352,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
351324
351352
|
|
|
351325
351353
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
351326
351354
|
var init_super_editor_es = __esm(() => {
|
|
351327
|
-
|
|
351328
|
-
|
|
351355
|
+
init_src_DC9lS58S_es();
|
|
351356
|
+
init_SuperConverter_1HMbTEKL_es();
|
|
351329
351357
|
init_jszip_C49i9kUs_es();
|
|
351330
351358
|
init_xml_js_CqGKpaft_es();
|
|
351331
|
-
|
|
351359
|
+
init_create_headless_toolbar_Bd3oZr3v_es();
|
|
351332
351360
|
init_constants_DrU4EASo_es();
|
|
351333
351361
|
init_dist_B8HfvhaK_es();
|
|
351334
351362
|
init_unified_Dsuw2be5_es();
|
|
351335
351363
|
init_DocxZipper_CZMPWpOp_es();
|
|
351336
|
-
|
|
351364
|
+
init_create_super_doc_ui_BObTHhKp_es();
|
|
351337
351365
|
init_ui_C5PAS9hY_es();
|
|
351338
351366
|
init_eventemitter3_BnGqBE_Q_es();
|
|
351339
351367
|
init_errors_CNaD6vcg_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.13.0-next.
|
|
3
|
+
"version": "0.13.0-next.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@types/node": "22.19.2",
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
|
-
"superdoc": "1.35.0",
|
|
28
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
+
"superdoc": "1.35.0",
|
|
29
29
|
"@superdoc/super-editor": "0.0.1",
|
|
30
30
|
"@superdoc/pm-adapter": "0.0.0"
|
|
31
31
|
},
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.13.0-next.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.13.0-next.
|
|
39
|
-
"@superdoc-dev/cli-linux-x64": "0.13.0-next.
|
|
40
|
-
"@superdoc-dev/cli-linux-arm64": "0.13.0-next.
|
|
41
|
-
"@superdoc-dev/cli-windows-x64": "0.13.0-next.
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.13.0-next.14",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.13.0-next.14",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.13.0-next.14",
|
|
40
|
+
"@superdoc-dev/cli-linux-arm64": "0.13.0-next.14",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.13.0-next.14"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|