@superdoc-dev/cli 0.11.1 → 0.12.0-next.4
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 +54 -30
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -2368,7 +2368,7 @@ More content with **bold** and *italic*.`
|
|
|
2368
2368
|
},
|
|
2369
2369
|
"format.paragraph.setAlignment": {
|
|
2370
2370
|
memberPath: "format.paragraph.setAlignment",
|
|
2371
|
-
description: "Set paragraph alignment
|
|
2371
|
+
description: "Set visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values.",
|
|
2372
2372
|
expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the alignment already matches.",
|
|
2373
2373
|
requiresDocumentContext: true,
|
|
2374
2374
|
metadata: mutationOperation({
|
|
@@ -10405,10 +10405,13 @@ var init_schemas = __esm(() => {
|
|
|
10405
10405
|
failure: paragraphMutationFailureSchemaFor("format.paragraph.resetDirectFormatting")
|
|
10406
10406
|
},
|
|
10407
10407
|
"format.paragraph.setAlignment": {
|
|
10408
|
-
input: objectSchema({
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10408
|
+
input: objectSchema({
|
|
10409
|
+
target: paragraphTargetSchema,
|
|
10410
|
+
alignment: {
|
|
10411
|
+
enum: [...PARAGRAPH_ALIGNMENTS],
|
|
10412
|
+
description: "Visual paragraph alignment. In RTL paragraphs, 'left' stores w:jc='right' and 'right' stores w:jc='left' so Word displays the requested side."
|
|
10413
|
+
}
|
|
10414
|
+
}, ["target", "alignment"]),
|
|
10412
10415
|
output: paragraphMutationResultSchemaFor("format.paragraph.setAlignment"),
|
|
10413
10416
|
success: paragraphMutationSuccessSchema,
|
|
10414
10417
|
failure: paragraphMutationFailureSchemaFor("format.paragraph.setAlignment")
|
|
@@ -66775,7 +66778,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
66775
66778
|
emptyOptions2 = {};
|
|
66776
66779
|
});
|
|
66777
66780
|
|
|
66778
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
66781
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-UqLu6KQU.es.js
|
|
66779
66782
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
66780
66783
|
const fieldValue = extension$1.config[field];
|
|
66781
66784
|
if (typeof fieldValue === "function")
|
|
@@ -120751,7 +120754,7 @@ var isRegExp = (value) => {
|
|
|
120751
120754
|
state.kern = kernNode.attributes["w:val"];
|
|
120752
120755
|
}
|
|
120753
120756
|
}, SuperConverter;
|
|
120754
|
-
var
|
|
120757
|
+
var init_SuperConverter_UqLu6KQU_es = __esm(() => {
|
|
120755
120758
|
init_rolldown_runtime_Bg48TavK_es();
|
|
120756
120759
|
init_jszip_C49i9kUs_es();
|
|
120757
120760
|
init_xml_js_CqGKpaft_es();
|
|
@@ -124570,7 +124573,7 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
|
|
|
124570
124573
|
},
|
|
124571
124574
|
"format.paragraph.setAlignment": {
|
|
124572
124575
|
memberPath: "format.paragraph.setAlignment",
|
|
124573
|
-
description: "Set paragraph alignment
|
|
124576
|
+
description: "Set visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values.",
|
|
124574
124577
|
expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the alignment already matches.",
|
|
124575
124578
|
requiresDocumentContext: true,
|
|
124576
124579
|
metadata: mutationOperation2({
|
|
@@ -132500,7 +132503,10 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
|
|
|
132500
132503
|
}
|
|
132501
132504
|
}, ["target", "styleId"]), paragraphMutationResultSchemaFor2("styles.paragraph.setStyle"), paragraphMutationFailureSchemaFor2("styles.paragraph.setStyle"), objectSchema2({ target: paragraphTargetSchema2 }, ["target"]), paragraphMutationResultSchemaFor2("styles.paragraph.clearStyle"), paragraphMutationFailureSchemaFor2("styles.paragraph.clearStyle"), objectSchema2({ target: paragraphTargetSchema2 }, ["target"]), paragraphMutationResultSchemaFor2("format.paragraph.resetDirectFormatting"), paragraphMutationFailureSchemaFor2("format.paragraph.resetDirectFormatting"), objectSchema2({
|
|
132502
132505
|
target: paragraphTargetSchema2,
|
|
132503
|
-
alignment: {
|
|
132506
|
+
alignment: {
|
|
132507
|
+
enum: [...PARAGRAPH_ALIGNMENTS2],
|
|
132508
|
+
description: "Visual paragraph alignment. In RTL paragraphs, 'left' stores w:jc='right' and 'right' stores w:jc='left' so Word displays the requested side."
|
|
132509
|
+
}
|
|
132504
132510
|
}, ["target", "alignment"]), paragraphMutationResultSchemaFor2("format.paragraph.setAlignment"), paragraphMutationFailureSchemaFor2("format.paragraph.setAlignment"), objectSchema2({ target: paragraphTargetSchema2 }, ["target"]), paragraphMutationResultSchemaFor2("format.paragraph.clearAlignment"), paragraphMutationFailureSchemaFor2("format.paragraph.clearAlignment"), { ...objectSchema2({
|
|
132505
132511
|
target: paragraphTargetSchema2,
|
|
132506
132512
|
left: {
|
|
@@ -158928,7 +158934,7 @@ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
|
|
|
158928
158934
|
};
|
|
158929
158935
|
});
|
|
158930
158936
|
|
|
158931
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
158937
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-BAucJwkS.es.js
|
|
158932
158938
|
function parseSizeUnit(val = "0") {
|
|
158933
158939
|
const length3 = val.toString() || "0";
|
|
158934
158940
|
const value = Number.parseFloat(length3);
|
|
@@ -162211,6 +162217,7 @@ function getWordChanges(oldText, newText) {
|
|
|
162211
162217
|
i4++;
|
|
162212
162218
|
continue;
|
|
162213
162219
|
}
|
|
162220
|
+
const groupStart = i4;
|
|
162214
162221
|
let deleteStart = -1;
|
|
162215
162222
|
let deleteEnd = -1;
|
|
162216
162223
|
let insertText2 = "";
|
|
@@ -162239,7 +162246,7 @@ function getWordChanges(oldText, newText) {
|
|
|
162239
162246
|
oldTo: deleteEnd
|
|
162240
162247
|
});
|
|
162241
162248
|
else if (insertText2.length > 0) {
|
|
162242
|
-
const prevStep =
|
|
162249
|
+
const prevStep = groupStart > 0 ? steps[groupStart - 1] : null;
|
|
162243
162250
|
let insertAt = 0;
|
|
162244
162251
|
if (prevStep && prevStep.type === "equal") {
|
|
162245
162252
|
const prevToken = oldTokens[prevStep.oldIdx];
|
|
@@ -168938,8 +168945,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
168938
168945
|
}
|
|
168939
168946
|
};
|
|
168940
168947
|
};
|
|
168941
|
-
var
|
|
168942
|
-
|
|
168948
|
+
var init_create_headless_toolbar_BAucJwkS_es = __esm(() => {
|
|
168949
|
+
init_SuperConverter_UqLu6KQU_es();
|
|
168943
168950
|
init_uuid_qzgm05fK_es();
|
|
168944
168951
|
init_constants_DrU4EASo_es();
|
|
168945
168952
|
init_dist_B8HfvhaK_es();
|
|
@@ -218144,7 +218151,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
218144
218151
|
init_remark_gfm_BhnWr3yf_es();
|
|
218145
218152
|
});
|
|
218146
218153
|
|
|
218147
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
218154
|
+
// ../../packages/superdoc/dist/chunks/src-BfBC9M6d.es.js
|
|
218148
218155
|
function deleteProps(obj, propOrProps) {
|
|
218149
218156
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
218150
218157
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -249784,6 +249791,8 @@ function metadataGetWrapper(editor, input2) {
|
|
|
249784
249791
|
return findEntry(getConvertedXml2(editor), input2.id);
|
|
249785
249792
|
}
|
|
249786
249793
|
function metadataResolveWrapper(editor, input2) {
|
|
249794
|
+
if (!hasPayloadEntry(getConvertedXml2(editor), input2.id))
|
|
249795
|
+
return null;
|
|
249787
249796
|
const target = resolveAnchorTarget(editor, input2.id);
|
|
249788
249797
|
return target ? {
|
|
249789
249798
|
id: input2.id,
|
|
@@ -306531,13 +306540,13 @@ menclose::after {
|
|
|
306531
306540
|
return;
|
|
306532
306541
|
console.log(...args$1);
|
|
306533
306542
|
}, 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;
|
|
306534
|
-
var
|
|
306543
|
+
var init_src_BfBC9M6d_es = __esm(() => {
|
|
306535
306544
|
init_rolldown_runtime_Bg48TavK_es();
|
|
306536
|
-
|
|
306545
|
+
init_SuperConverter_UqLu6KQU_es();
|
|
306537
306546
|
init_jszip_C49i9kUs_es();
|
|
306538
306547
|
init_xml_js_CqGKpaft_es();
|
|
306539
306548
|
init_uuid_qzgm05fK_es();
|
|
306540
|
-
|
|
306549
|
+
init_create_headless_toolbar_BAucJwkS_es();
|
|
306541
306550
|
init_constants_DrU4EASo_es();
|
|
306542
306551
|
init_dist_B8HfvhaK_es();
|
|
306543
306552
|
init_unified_Dsuw2be5_es();
|
|
@@ -344253,11 +344262,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
344253
344262
|
];
|
|
344254
344263
|
});
|
|
344255
344264
|
|
|
344256
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
344265
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-D9Dr5djW.es.js
|
|
344257
344266
|
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;
|
|
344258
|
-
var
|
|
344259
|
-
|
|
344260
|
-
|
|
344267
|
+
var init_create_super_doc_ui_D9Dr5djW_es = __esm(() => {
|
|
344268
|
+
init_SuperConverter_UqLu6KQU_es();
|
|
344269
|
+
init_create_headless_toolbar_BAucJwkS_es();
|
|
344261
344270
|
MOD_ALIASES = new Set([
|
|
344262
344271
|
"Mod",
|
|
344263
344272
|
"Meta",
|
|
@@ -344299,16 +344308,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
344299
344308
|
|
|
344300
344309
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
344301
344310
|
var init_super_editor_es = __esm(() => {
|
|
344302
|
-
|
|
344303
|
-
|
|
344311
|
+
init_src_BfBC9M6d_es();
|
|
344312
|
+
init_SuperConverter_UqLu6KQU_es();
|
|
344304
344313
|
init_jszip_C49i9kUs_es();
|
|
344305
344314
|
init_xml_js_CqGKpaft_es();
|
|
344306
|
-
|
|
344315
|
+
init_create_headless_toolbar_BAucJwkS_es();
|
|
344307
344316
|
init_constants_DrU4EASo_es();
|
|
344308
344317
|
init_dist_B8HfvhaK_es();
|
|
344309
344318
|
init_unified_Dsuw2be5_es();
|
|
344310
344319
|
init_DocxZipper_CZMPWpOp_es();
|
|
344311
|
-
|
|
344320
|
+
init_create_super_doc_ui_D9Dr5djW_es();
|
|
344312
344321
|
init_ui_C5PAS9hY_es();
|
|
344313
344322
|
init_eventemitter3_BnGqBE_Q_es();
|
|
344314
344323
|
init_errors_CNaD6vcg_es();
|
|
@@ -405129,13 +405138,16 @@ var init_invoke2 = __esm(async () => {
|
|
|
405129
405138
|
var exports_server = {};
|
|
405130
405139
|
__export(exports_server, {
|
|
405131
405140
|
runHostStdio: () => runHostStdio,
|
|
405141
|
+
parseHostCommandTokens: () => parseHostCommandTokens,
|
|
405132
405142
|
HostServer: () => HostServer
|
|
405133
405143
|
});
|
|
405134
405144
|
import { createInterface } from "node:readline";
|
|
405135
405145
|
function parseHostCommandTokens(tokens) {
|
|
405136
405146
|
let stdio = false;
|
|
405137
405147
|
let help = false;
|
|
405138
|
-
|
|
405148
|
+
let requestTimeoutMs;
|
|
405149
|
+
for (let i4 = 0;i4 < tokens.length; i4++) {
|
|
405150
|
+
const token2 = tokens[i4];
|
|
405139
405151
|
if (token2 === "--stdio") {
|
|
405140
405152
|
stdio = true;
|
|
405141
405153
|
continue;
|
|
@@ -405144,9 +405156,21 @@ function parseHostCommandTokens(tokens) {
|
|
|
405144
405156
|
help = true;
|
|
405145
405157
|
continue;
|
|
405146
405158
|
}
|
|
405159
|
+
if (token2 === REQUEST_TIMEOUT_FLAG || token2.startsWith(`${REQUEST_TIMEOUT_FLAG}=`)) {
|
|
405160
|
+
const value2 = token2 === REQUEST_TIMEOUT_FLAG ? tokens[++i4] : token2.slice(REQUEST_TIMEOUT_FLAG.length + 1);
|
|
405161
|
+
if (value2 == null || value2 === "") {
|
|
405162
|
+
throw new CliError("INVALID_ARGUMENT", `host: ${REQUEST_TIMEOUT_FLAG} requires a positive finite number of milliseconds.`);
|
|
405163
|
+
}
|
|
405164
|
+
const parsed = Number(value2);
|
|
405165
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
405166
|
+
throw new CliError("INVALID_ARGUMENT", `host: ${REQUEST_TIMEOUT_FLAG} requires a positive finite number of milliseconds (got ${JSON.stringify(value2)}).`);
|
|
405167
|
+
}
|
|
405168
|
+
requestTimeoutMs = parsed;
|
|
405169
|
+
continue;
|
|
405170
|
+
}
|
|
405147
405171
|
throw new CliError("INVALID_ARGUMENT", `host: unknown option ${token2}`);
|
|
405148
405172
|
}
|
|
405149
|
-
return { stdio, help };
|
|
405173
|
+
return { stdio, help, requestTimeoutMs };
|
|
405150
405174
|
}
|
|
405151
405175
|
async function settleWithTimeout(promise, timeoutMs) {
|
|
405152
405176
|
const settled = promise.then((value2) => ({ kind: "success", value: value2 }), (error4) => ({ kind: "error", error: error4 }));
|
|
@@ -405332,7 +405356,7 @@ async function runHostStdio(tokens, io) {
|
|
|
405332
405356
|
if (!parsed.stdio) {
|
|
405333
405357
|
throw new CliError("INVALID_ARGUMENT", "host: only --stdio is supported in v1.");
|
|
405334
405358
|
}
|
|
405335
|
-
const server = new HostServer({ io });
|
|
405359
|
+
const server = new HostServer({ io, requestTimeoutMs: parsed.requestTimeoutMs });
|
|
405336
405360
|
const rl = createInterface({
|
|
405337
405361
|
input: process.stdin,
|
|
405338
405362
|
crlfDelay: Number.POSITIVE_INFINITY
|
|
@@ -405351,8 +405375,8 @@ async function runHostStdio(tokens, io) {
|
|
|
405351
405375
|
return 0;
|
|
405352
405376
|
}
|
|
405353
405377
|
var HOST_HELP = `Usage:
|
|
405354
|
-
superdoc host --stdio
|
|
405355
|
-
`, DEFAULT_REQUEST_TIMEOUT_MS = 30000;
|
|
405378
|
+
superdoc host --stdio [--request-timeout-ms <ms>]
|
|
405379
|
+
`, DEFAULT_REQUEST_TIMEOUT_MS = 30000, REQUEST_TIMEOUT_FLAG = "--request-timeout-ms";
|
|
405356
405380
|
var init_server = __esm(async () => {
|
|
405357
405381
|
init_errors();
|
|
405358
405382
|
init_guards();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-next.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -24,21 +24,21 @@
|
|
|
24
24
|
"@types/node": "22.19.2",
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
|
-
"@superdoc/document-api": "0.0.1",
|
|
28
27
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"
|
|
30
|
-
"superdoc": "
|
|
28
|
+
"superdoc": "1.34.0",
|
|
29
|
+
"@superdoc/document-api": "0.0.1",
|
|
30
|
+
"@superdoc/super-editor": "0.0.1"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.
|
|
39
|
-
"@superdoc-dev/cli-linux-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.12.0-next.4",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.12.0-next.4",
|
|
39
|
+
"@superdoc-dev/cli-linux-arm64": "0.12.0-next.4",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.12.0-next.4",
|
|
41
|
+
"@superdoc-dev/cli-linux-x64": "0.12.0-next.4"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|