@superdoc-dev/cli 0.2.0-next.1 → 0.2.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +223 -156
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -656,7 +656,7 @@ var init_operation_definitions = __esm(() => {
|
|
|
656
656
|
},
|
|
657
657
|
"format.apply": {
|
|
658
658
|
memberPath: "format.apply",
|
|
659
|
-
description: "Apply explicit
|
|
659
|
+
description: "Apply explicit inline style changes (bold, italic, underline, strike) to the target range using boolean patch semantics.",
|
|
660
660
|
requiresDocumentContext: true,
|
|
661
661
|
metadata: mutationOperation({
|
|
662
662
|
idempotency: "conditional",
|
|
@@ -825,7 +825,7 @@ var init_operation_definitions = __esm(() => {
|
|
|
825
825
|
supportsDryRun: false,
|
|
826
826
|
supportsTrackedMode: false,
|
|
827
827
|
possibleFailureCodes: ["INVALID_TARGET", "NO_OP"],
|
|
828
|
-
throws: [...T_NOT_FOUND_COMMAND, "INVALID_TARGET"]
|
|
828
|
+
throws: [...T_NOT_FOUND_COMMAND, "INVALID_TARGET", "INVALID_INPUT"]
|
|
829
829
|
}),
|
|
830
830
|
referenceDocPath: "comments/patch.mdx",
|
|
831
831
|
referenceGroup: "comments"
|
|
@@ -886,8 +886,8 @@ var init_operation_definitions = __esm(() => {
|
|
|
886
886
|
referenceDocPath: "track-changes/get.mdx",
|
|
887
887
|
referenceGroup: "trackChanges"
|
|
888
888
|
},
|
|
889
|
-
"
|
|
890
|
-
memberPath: "
|
|
889
|
+
"trackChanges.decide": {
|
|
890
|
+
memberPath: "trackChanges.decide",
|
|
891
891
|
description: "Accept or reject a tracked change (by ID or scope: all).",
|
|
892
892
|
requiresDocumentContext: true,
|
|
893
893
|
metadata: mutationOperation({
|
|
@@ -895,10 +895,10 @@ var init_operation_definitions = __esm(() => {
|
|
|
895
895
|
supportsDryRun: false,
|
|
896
896
|
supportsTrackedMode: false,
|
|
897
897
|
possibleFailureCodes: ["NO_OP"],
|
|
898
|
-
throws: T_NOT_FOUND_COMMAND
|
|
898
|
+
throws: [...T_NOT_FOUND_COMMAND, "INVALID_INPUT", "INVALID_TARGET"]
|
|
899
899
|
}),
|
|
900
|
-
referenceDocPath: "
|
|
901
|
-
referenceGroup: "
|
|
900
|
+
referenceDocPath: "track-changes/decide.mdx",
|
|
901
|
+
referenceGroup: "trackChanges"
|
|
902
902
|
},
|
|
903
903
|
"query.match": {
|
|
904
904
|
memberPath: "query.match",
|
|
@@ -1580,7 +1580,7 @@ var init_schemas = __esm(() => {
|
|
|
1580
1580
|
"format.apply": {
|
|
1581
1581
|
input: objectSchema({
|
|
1582
1582
|
target: textAddressSchema,
|
|
1583
|
-
|
|
1583
|
+
inline: (() => {
|
|
1584
1584
|
const markProperties = Object.fromEntries(MARK_KEYS.map((key) => [key, { type: "boolean" }]));
|
|
1585
1585
|
return {
|
|
1586
1586
|
type: "object",
|
|
@@ -1589,7 +1589,7 @@ var init_schemas = __esm(() => {
|
|
|
1589
1589
|
minProperties: 1
|
|
1590
1590
|
};
|
|
1591
1591
|
})()
|
|
1592
|
-
}, ["target", "
|
|
1592
|
+
}, ["target", "inline"]),
|
|
1593
1593
|
output: textMutationResultSchemaFor("format.apply"),
|
|
1594
1594
|
success: textMutationSuccessSchema,
|
|
1595
1595
|
failure: textMutationFailureSchemaFor("format.apply")
|
|
@@ -1757,7 +1757,7 @@ var init_schemas = __esm(() => {
|
|
|
1757
1757
|
input: objectSchema({ id: { type: "string" } }, ["id"]),
|
|
1758
1758
|
output: trackChangeInfoSchema
|
|
1759
1759
|
},
|
|
1760
|
-
"
|
|
1760
|
+
"trackChanges.decide": {
|
|
1761
1761
|
input: {
|
|
1762
1762
|
type: "object",
|
|
1763
1763
|
properties: {
|
|
@@ -1772,9 +1772,9 @@ var init_schemas = __esm(() => {
|
|
|
1772
1772
|
required: ["decision", "target"],
|
|
1773
1773
|
additionalProperties: false
|
|
1774
1774
|
},
|
|
1775
|
-
output: receiptResultSchemaFor("
|
|
1775
|
+
output: receiptResultSchemaFor("trackChanges.decide"),
|
|
1776
1776
|
success: receiptSuccessSchema,
|
|
1777
|
-
failure: receiptFailureResultSchemaFor("
|
|
1777
|
+
failure: receiptFailureResultSchemaFor("trackChanges.decide")
|
|
1778
1778
|
},
|
|
1779
1779
|
"query.match": {
|
|
1780
1780
|
input: objectSchema({
|
|
@@ -1893,14 +1893,9 @@ var init_reference_doc_map = __esm(() => {
|
|
|
1893
1893
|
},
|
|
1894
1894
|
trackChanges: {
|
|
1895
1895
|
title: "Track Changes",
|
|
1896
|
-
description: "Tracked-change inspection operations.",
|
|
1896
|
+
description: "Tracked-change inspection and review operations.",
|
|
1897
1897
|
pagePath: "track-changes/index.mdx"
|
|
1898
1898
|
},
|
|
1899
|
-
review: {
|
|
1900
|
-
title: "Review",
|
|
1901
|
-
description: "Accept or reject tracked changes.",
|
|
1902
|
-
pagePath: "review/index.mdx"
|
|
1903
|
-
},
|
|
1904
1899
|
query: {
|
|
1905
1900
|
title: "Query",
|
|
1906
1901
|
description: "Deterministic selector-based queries for mutation targeting.",
|
|
@@ -1918,6 +1913,9 @@ var init_reference_doc_map = __esm(() => {
|
|
|
1918
1913
|
operations: OPERATION_IDS.filter((id) => OPERATION_DEFINITIONS[id].referenceGroup === key)
|
|
1919
1914
|
}));
|
|
1920
1915
|
});
|
|
1916
|
+
|
|
1917
|
+
// ../../packages/document-api/src/contract/reference-aliases.ts
|
|
1918
|
+
var init_reference_aliases = () => {};
|
|
1921
1919
|
// ../../packages/document-api/src/contract/index.ts
|
|
1922
1920
|
var init_contract = __esm(() => {
|
|
1923
1921
|
init_types2();
|
|
@@ -1925,6 +1923,7 @@ var init_contract = __esm(() => {
|
|
|
1925
1923
|
init_schemas();
|
|
1926
1924
|
init_operation_map();
|
|
1927
1925
|
init_reference_doc_map();
|
|
1926
|
+
init_reference_aliases();
|
|
1928
1927
|
});
|
|
1929
1928
|
|
|
1930
1929
|
// ../../packages/document-api/src/capabilities/capabilities.ts
|
|
@@ -2017,7 +2016,12 @@ function validateCreateCommentInput(input) {
|
|
|
2017
2016
|
}
|
|
2018
2017
|
return;
|
|
2019
2018
|
}
|
|
2020
|
-
if (hasTarget
|
|
2019
|
+
if (!hasTarget) {
|
|
2020
|
+
throw new DocumentApiValidationError("INVALID_TARGET", "comments.create requires a target for root comments.", {
|
|
2021
|
+
field: "target"
|
|
2022
|
+
});
|
|
2023
|
+
}
|
|
2024
|
+
if (!isTextAddress(target)) {
|
|
2021
2025
|
throw new DocumentApiValidationError("INVALID_TARGET", "target must be a text address object.", {
|
|
2022
2026
|
field: "target",
|
|
2023
2027
|
value: target
|
|
@@ -2037,6 +2041,14 @@ function validatePatchCommentInput(input) {
|
|
|
2037
2041
|
value: commentId
|
|
2038
2042
|
});
|
|
2039
2043
|
}
|
|
2044
|
+
const mutationFields = ["text", "target", "status", "isInternal"];
|
|
2045
|
+
const providedFields = mutationFields.filter((f) => input[f] !== undefined);
|
|
2046
|
+
if (providedFields.length === 0) {
|
|
2047
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "comments.patch requires exactly one mutation field (text, target, status, or isInternal).", { allowedFields: [...mutationFields] });
|
|
2048
|
+
}
|
|
2049
|
+
if (providedFields.length > 1) {
|
|
2050
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `comments.patch accepts exactly one mutation field per call, got ${providedFields.length}: ${providedFields.join(", ")}.`, { providedFields: [...providedFields] });
|
|
2051
|
+
}
|
|
2040
2052
|
const { status } = input;
|
|
2041
2053
|
if (status !== undefined && status !== "resolved") {
|
|
2042
2054
|
throw new DocumentApiValidationError("INVALID_TARGET", `status must be "resolved", got "${String(status)}".`, {
|
|
@@ -2060,20 +2072,19 @@ function executeCommentsCreate(adapter, input, options) {
|
|
|
2060
2072
|
}
|
|
2061
2073
|
function executeCommentsPatch(adapter, input, options) {
|
|
2062
2074
|
validatePatchCommentInput(input);
|
|
2063
|
-
let lastReceipt = { success: true };
|
|
2064
2075
|
if (input.text !== undefined) {
|
|
2065
|
-
|
|
2076
|
+
return adapter.edit({ commentId: input.commentId, text: input.text }, options);
|
|
2066
2077
|
}
|
|
2067
2078
|
if (input.target !== undefined) {
|
|
2068
|
-
|
|
2079
|
+
return adapter.move({ commentId: input.commentId, target: input.target }, options);
|
|
2069
2080
|
}
|
|
2070
2081
|
if (input.status === "resolved") {
|
|
2071
|
-
|
|
2082
|
+
return adapter.resolve({ commentId: input.commentId }, options);
|
|
2072
2083
|
}
|
|
2073
2084
|
if (input.isInternal !== undefined) {
|
|
2074
|
-
|
|
2085
|
+
return adapter.setInternal({ commentId: input.commentId, isInternal: input.isInternal }, options);
|
|
2075
2086
|
}
|
|
2076
|
-
return
|
|
2087
|
+
return { success: true };
|
|
2077
2088
|
}
|
|
2078
2089
|
function executeCommentsDelete(adapter, input, options) {
|
|
2079
2090
|
return adapter.remove({ commentId: input.commentId }, options);
|
|
@@ -2153,7 +2164,7 @@ function validateStyleApplyInput(input) {
|
|
|
2153
2164
|
throw new DocumentApiValidationError("INVALID_INPUT", "format.apply input must be a non-null object.");
|
|
2154
2165
|
}
|
|
2155
2166
|
assertNoUnknownFields(input, STYLE_APPLY_INPUT_ALLOWED_KEYS, "format.apply");
|
|
2156
|
-
const { target,
|
|
2167
|
+
const { target, inline } = input;
|
|
2157
2168
|
if (target === undefined) {
|
|
2158
2169
|
throw new DocumentApiValidationError("INVALID_TARGET", "format.apply requires a target.");
|
|
2159
2170
|
}
|
|
@@ -2163,30 +2174,30 @@ function validateStyleApplyInput(input) {
|
|
|
2163
2174
|
value: target
|
|
2164
2175
|
});
|
|
2165
2176
|
}
|
|
2166
|
-
if (
|
|
2167
|
-
throw new DocumentApiValidationError("INVALID_INPUT", "format.apply requires
|
|
2177
|
+
if (inline === undefined || inline === null) {
|
|
2178
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "format.apply requires an inline object.");
|
|
2168
2179
|
}
|
|
2169
|
-
if (!isRecord(
|
|
2170
|
-
throw new DocumentApiValidationError("INVALID_INPUT", "
|
|
2171
|
-
field: "
|
|
2172
|
-
value:
|
|
2180
|
+
if (!isRecord(inline)) {
|
|
2181
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "inline must be a non-null object.", {
|
|
2182
|
+
field: "inline",
|
|
2183
|
+
value: inline
|
|
2173
2184
|
});
|
|
2174
2185
|
}
|
|
2175
|
-
const
|
|
2176
|
-
if (
|
|
2177
|
-
throw new DocumentApiValidationError("INVALID_INPUT", "
|
|
2186
|
+
const inlineKeys = Object.keys(inline);
|
|
2187
|
+
if (inlineKeys.length === 0) {
|
|
2188
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "inline must include at least one known key.");
|
|
2178
2189
|
}
|
|
2179
|
-
for (const key of
|
|
2190
|
+
for (const key of inlineKeys) {
|
|
2180
2191
|
if (!MARK_KEY_SET.has(key)) {
|
|
2181
|
-
throw new DocumentApiValidationError("INVALID_INPUT", `Unknown
|
|
2182
|
-
field: "
|
|
2192
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `Unknown inline style key "${key}". Known keys: bold, italic, underline, strike.`, {
|
|
2193
|
+
field: "inline",
|
|
2183
2194
|
key
|
|
2184
2195
|
});
|
|
2185
2196
|
}
|
|
2186
|
-
const value =
|
|
2197
|
+
const value = inline[key];
|
|
2187
2198
|
if (typeof value !== "boolean") {
|
|
2188
|
-
throw new DocumentApiValidationError("INVALID_INPUT", `
|
|
2189
|
-
field: "
|
|
2199
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `Inline style "${key}" must be a boolean, got ${typeof value}.`, {
|
|
2200
|
+
field: "inline",
|
|
2190
2201
|
key,
|
|
2191
2202
|
value
|
|
2192
2203
|
});
|
|
@@ -2202,7 +2213,7 @@ var init_format = __esm(() => {
|
|
|
2202
2213
|
init_style_policy_types();
|
|
2203
2214
|
init_errors2();
|
|
2204
2215
|
init_validation_primitives();
|
|
2205
|
-
STYLE_APPLY_INPUT_ALLOWED_KEYS = new Set(["target", "
|
|
2216
|
+
STYLE_APPLY_INPUT_ALLOWED_KEYS = new Set(["target", "inline"]);
|
|
2206
2217
|
});
|
|
2207
2218
|
|
|
2208
2219
|
// ../../packages/document-api/src/get-node/get-node.ts
|
|
@@ -2429,17 +2440,39 @@ function executeTrackChangesList(adapter, input) {
|
|
|
2429
2440
|
function executeTrackChangesGet(adapter, input) {
|
|
2430
2441
|
return adapter.get(input);
|
|
2431
2442
|
}
|
|
2432
|
-
function
|
|
2433
|
-
const
|
|
2443
|
+
function executeTrackChangesDecide(adapter, rawInput, options) {
|
|
2444
|
+
const raw = rawInput;
|
|
2445
|
+
if (typeof raw !== "object" || raw == null) {
|
|
2446
|
+
throw new DocumentApiValidationError("INVALID_INPUT", "trackChanges.decide input must be a non-null object.", {
|
|
2447
|
+
value: raw
|
|
2448
|
+
});
|
|
2449
|
+
}
|
|
2450
|
+
const input = raw;
|
|
2451
|
+
if (input.decision !== "accept" && input.decision !== "reject") {
|
|
2452
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `trackChanges.decide decision must be "accept" or "reject", got "${String(input.decision)}".`, { field: "decision", value: input.decision });
|
|
2453
|
+
}
|
|
2454
|
+
if (typeof input.target !== "object" || input.target == null) {
|
|
2455
|
+
throw new DocumentApiValidationError("INVALID_TARGET", 'trackChanges.decide target must be an object with { id: string } or { scope: "all" }.', { field: "target", value: input.target });
|
|
2456
|
+
}
|
|
2457
|
+
const target = input.target;
|
|
2458
|
+
const isAll = target.scope === "all";
|
|
2459
|
+
if (!isAll) {
|
|
2460
|
+
if (typeof target.id !== "string" || target.id.length === 0) {
|
|
2461
|
+
throw new DocumentApiValidationError("INVALID_TARGET", 'trackChanges.decide target must have { id: string } or { scope: "all" }.', { field: "target", value: input.target });
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2434
2464
|
if (input.decision === "accept") {
|
|
2435
2465
|
if (isAll)
|
|
2436
2466
|
return adapter.acceptAll({}, options);
|
|
2437
|
-
return adapter.accept({ id:
|
|
2467
|
+
return adapter.accept({ id: target.id }, options);
|
|
2438
2468
|
}
|
|
2439
2469
|
if (isAll)
|
|
2440
2470
|
return adapter.rejectAll({}, options);
|
|
2441
|
-
return adapter.reject({ id:
|
|
2471
|
+
return adapter.reject({ id: target.id }, options);
|
|
2442
2472
|
}
|
|
2473
|
+
var init_track_changes = __esm(() => {
|
|
2474
|
+
init_errors2();
|
|
2475
|
+
});
|
|
2443
2476
|
|
|
2444
2477
|
// ../../packages/document-api/src/invoke/invoke.ts
|
|
2445
2478
|
function buildDispatchTable(api) {
|
|
@@ -2470,7 +2503,7 @@ function buildDispatchTable(api) {
|
|
|
2470
2503
|
"comments.list": (input) => api.comments.list(input),
|
|
2471
2504
|
"trackChanges.list": (input) => api.trackChanges.list(input),
|
|
2472
2505
|
"trackChanges.get": (input) => api.trackChanges.get(input),
|
|
2473
|
-
"
|
|
2506
|
+
"trackChanges.decide": (input, options) => api.trackChanges.decide(input, options),
|
|
2474
2507
|
"query.match": (input) => api.query.match(input),
|
|
2475
2508
|
"mutations.preview": (input) => api.mutations.preview(input),
|
|
2476
2509
|
"mutations.apply": (input) => api.mutations.apply(input),
|
|
@@ -2533,16 +2566,16 @@ function createDocumentApi(adapters) {
|
|
|
2533
2566
|
},
|
|
2534
2567
|
format: {
|
|
2535
2568
|
bold(input, options) {
|
|
2536
|
-
return executeStyleApply(adapters.format, { ...input,
|
|
2569
|
+
return executeStyleApply(adapters.format, { ...input, inline: { bold: true } }, options);
|
|
2537
2570
|
},
|
|
2538
2571
|
italic(input, options) {
|
|
2539
|
-
return executeStyleApply(adapters.format, { ...input,
|
|
2572
|
+
return executeStyleApply(adapters.format, { ...input, inline: { italic: true } }, options);
|
|
2540
2573
|
},
|
|
2541
2574
|
underline(input, options) {
|
|
2542
|
-
return executeStyleApply(adapters.format, { ...input,
|
|
2575
|
+
return executeStyleApply(adapters.format, { ...input, inline: { underline: true } }, options);
|
|
2543
2576
|
},
|
|
2544
2577
|
strikethrough(input, options) {
|
|
2545
|
-
return executeStyleApply(adapters.format, { ...input,
|
|
2578
|
+
return executeStyleApply(adapters.format, { ...input, inline: { strike: true } }, options);
|
|
2546
2579
|
},
|
|
2547
2580
|
apply(input, options) {
|
|
2548
2581
|
return executeStyleApply(adapters.format, input, options);
|
|
@@ -2554,11 +2587,9 @@ function createDocumentApi(adapters) {
|
|
|
2554
2587
|
},
|
|
2555
2588
|
get(input) {
|
|
2556
2589
|
return executeTrackChangesGet(adapters.trackChanges, input);
|
|
2557
|
-
}
|
|
2558
|
-
},
|
|
2559
|
-
review: {
|
|
2590
|
+
},
|
|
2560
2591
|
decide(input, options) {
|
|
2561
|
-
return
|
|
2592
|
+
return executeTrackChangesDecide(adapters.trackChanges, input, options);
|
|
2562
2593
|
}
|
|
2563
2594
|
},
|
|
2564
2595
|
create: {
|
|
@@ -2628,6 +2659,7 @@ var init_src = __esm(() => {
|
|
|
2628
2659
|
init_lists();
|
|
2629
2660
|
init_replace();
|
|
2630
2661
|
init_create();
|
|
2662
|
+
init_track_changes();
|
|
2631
2663
|
init_capabilities();
|
|
2632
2664
|
init_lists_types();
|
|
2633
2665
|
init_errors2();
|
|
@@ -3278,7 +3310,7 @@ var init_operation_hints = __esm(() => {
|
|
|
3278
3310
|
"comments.list": "listed comments",
|
|
3279
3311
|
"trackChanges.list": "listed tracked changes",
|
|
3280
3312
|
"trackChanges.get": "resolved tracked change",
|
|
3281
|
-
"
|
|
3313
|
+
"trackChanges.decide": "reviewed tracked change",
|
|
3282
3314
|
"query.match": "matched selectors",
|
|
3283
3315
|
"mutations.preview": "previewed mutations",
|
|
3284
3316
|
"mutations.apply": "applied mutations",
|
|
@@ -3311,7 +3343,7 @@ var init_operation_hints = __esm(() => {
|
|
|
3311
3343
|
"comments.list": "commentList",
|
|
3312
3344
|
"trackChanges.list": "trackChangeList",
|
|
3313
3345
|
"trackChanges.get": "trackChangeInfo",
|
|
3314
|
-
"
|
|
3346
|
+
"trackChanges.decide": "trackChangeMutationReceipt",
|
|
3315
3347
|
"query.match": "plain",
|
|
3316
3348
|
"mutations.preview": "plain",
|
|
3317
3349
|
"mutations.apply": "plain",
|
|
@@ -3344,7 +3376,7 @@ var init_operation_hints = __esm(() => {
|
|
|
3344
3376
|
"comments.list": "result",
|
|
3345
3377
|
"trackChanges.list": "result",
|
|
3346
3378
|
"trackChanges.get": "change",
|
|
3347
|
-
"
|
|
3379
|
+
"trackChanges.decide": "receipt",
|
|
3348
3380
|
"query.match": "result",
|
|
3349
3381
|
"mutations.preview": "result",
|
|
3350
3382
|
"mutations.apply": "result",
|
|
@@ -3383,7 +3415,7 @@ var init_operation_hints = __esm(() => {
|
|
|
3383
3415
|
"comments.list": "comments",
|
|
3384
3416
|
"trackChanges.list": "trackChanges",
|
|
3385
3417
|
"trackChanges.get": "trackChanges",
|
|
3386
|
-
"
|
|
3418
|
+
"trackChanges.decide": "trackChanges",
|
|
3387
3419
|
"query.match": "query",
|
|
3388
3420
|
"mutations.preview": "general",
|
|
3389
3421
|
"mutations.apply": "general",
|
|
@@ -3695,8 +3727,6 @@ function deriveCategoryFromDocApi(docApiId) {
|
|
|
3695
3727
|
if (group === "core" || group === "mutations") {
|
|
3696
3728
|
return COMMAND_CATALOG[docApiId].mutates ? "mutation" : "query";
|
|
3697
3729
|
}
|
|
3698
|
-
if (group === "review")
|
|
3699
|
-
return "trackChanges";
|
|
3700
3730
|
return group;
|
|
3701
3731
|
}
|
|
3702
3732
|
function cliCategory(cliOpId) {
|
|
@@ -87138,9 +87168,9 @@ var init_remark_gfm_RDxetNVS_es = __esm(() => {
|
|
|
87138
87168
|
emptyOptions4 = {};
|
|
87139
87169
|
});
|
|
87140
87170
|
|
|
87141
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
87142
|
-
var
|
|
87143
|
-
__export(
|
|
87171
|
+
// ../../packages/superdoc/dist/chunks/src-CYnAk7Cg.es.js
|
|
87172
|
+
var exports_src_CYnAk7Cg_es = {};
|
|
87173
|
+
__export(exports_src_CYnAk7Cg_es, {
|
|
87144
87174
|
zt: () => defineMark,
|
|
87145
87175
|
z: () => cM,
|
|
87146
87176
|
yt: () => removeAwarenessStates,
|
|
@@ -93916,7 +93946,9 @@ function validateCreateCommentInput2(input2) {
|
|
|
93916
93946
|
throw new DocumentApiValidationError2("INVALID_TARGET", "Cannot combine parentCommentId with target. Replies do not take a target.", { fields: ["parentCommentId", "target"] });
|
|
93917
93947
|
return;
|
|
93918
93948
|
}
|
|
93919
|
-
if (hasTarget
|
|
93949
|
+
if (!hasTarget)
|
|
93950
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", "comments.create requires a target for root comments.", { field: "target" });
|
|
93951
|
+
if (!isTextAddress2(target))
|
|
93920
93952
|
throw new DocumentApiValidationError2("INVALID_TARGET", "target must be a text address object.", {
|
|
93921
93953
|
field: "target",
|
|
93922
93954
|
value: target
|
|
@@ -93933,6 +93965,17 @@ function validatePatchCommentInput2(input2) {
|
|
|
93933
93965
|
field: "commentId",
|
|
93934
93966
|
value: commentId
|
|
93935
93967
|
});
|
|
93968
|
+
const mutationFields = [
|
|
93969
|
+
"text",
|
|
93970
|
+
"target",
|
|
93971
|
+
"status",
|
|
93972
|
+
"isInternal"
|
|
93973
|
+
];
|
|
93974
|
+
const providedFields = mutationFields.filter((f) => input2[f] !== undefined);
|
|
93975
|
+
if (providedFields.length === 0)
|
|
93976
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", "comments.patch requires exactly one mutation field (text, target, status, or isInternal).", { allowedFields: [...mutationFields] });
|
|
93977
|
+
if (providedFields.length > 1)
|
|
93978
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `comments.patch accepts exactly one mutation field per call, got ${providedFields.length}: ${providedFields.join(", ")}.`, { providedFields: [...providedFields] });
|
|
93936
93979
|
const { status } = input2;
|
|
93937
93980
|
if (status !== undefined && status !== "resolved")
|
|
93938
93981
|
throw new DocumentApiValidationError2("INVALID_TARGET", `status must be "resolved", got "${String(status)}".`, {
|
|
@@ -93956,25 +93999,24 @@ function executeCommentsCreate2(adapter, input2, options) {
|
|
|
93956
93999
|
}
|
|
93957
94000
|
function executeCommentsPatch2(adapter, input2, options) {
|
|
93958
94001
|
validatePatchCommentInput2(input2);
|
|
93959
|
-
let lastReceipt = { success: true };
|
|
93960
94002
|
if (input2.text !== undefined)
|
|
93961
|
-
|
|
94003
|
+
return adapter.edit({
|
|
93962
94004
|
commentId: input2.commentId,
|
|
93963
94005
|
text: input2.text
|
|
93964
94006
|
}, options);
|
|
93965
94007
|
if (input2.target !== undefined)
|
|
93966
|
-
|
|
94008
|
+
return adapter.move({
|
|
93967
94009
|
commentId: input2.commentId,
|
|
93968
94010
|
target: input2.target
|
|
93969
94011
|
}, options);
|
|
93970
94012
|
if (input2.status === "resolved")
|
|
93971
|
-
|
|
94013
|
+
return adapter.resolve({ commentId: input2.commentId }, options);
|
|
93972
94014
|
if (input2.isInternal !== undefined)
|
|
93973
|
-
|
|
94015
|
+
return adapter.setInternal({
|
|
93974
94016
|
commentId: input2.commentId,
|
|
93975
94017
|
isInternal: input2.isInternal
|
|
93976
94018
|
}, options);
|
|
93977
|
-
return
|
|
94019
|
+
return { success: true };
|
|
93978
94020
|
}
|
|
93979
94021
|
function executeCommentsDelete2(adapter, input2, options) {
|
|
93980
94022
|
return adapter.remove({ commentId: input2.commentId }, options);
|
|
@@ -94045,7 +94087,7 @@ function validateStyleApplyInput2(input2) {
|
|
|
94045
94087
|
if (!isRecord3(input2))
|
|
94046
94088
|
throw new DocumentApiValidationError2("INVALID_INPUT", "format.apply input must be a non-null object.");
|
|
94047
94089
|
assertNoUnknownFields2(input2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, "format.apply");
|
|
94048
|
-
const { target,
|
|
94090
|
+
const { target, inline } = input2;
|
|
94049
94091
|
if (target === undefined)
|
|
94050
94092
|
throw new DocumentApiValidationError2("INVALID_TARGET", "format.apply requires a target.");
|
|
94051
94093
|
if (!isTextAddress2(target))
|
|
@@ -94053,26 +94095,26 @@ function validateStyleApplyInput2(input2) {
|
|
|
94053
94095
|
field: "target",
|
|
94054
94096
|
value: target
|
|
94055
94097
|
});
|
|
94056
|
-
if (
|
|
94057
|
-
throw new DocumentApiValidationError2("INVALID_INPUT", "format.apply requires
|
|
94058
|
-
if (!isRecord3(
|
|
94059
|
-
throw new DocumentApiValidationError2("INVALID_INPUT", "
|
|
94060
|
-
field: "
|
|
94061
|
-
value:
|
|
94062
|
-
});
|
|
94063
|
-
const
|
|
94064
|
-
if (
|
|
94065
|
-
throw new DocumentApiValidationError2("INVALID_INPUT", "
|
|
94066
|
-
for (const key$1 of
|
|
94098
|
+
if (inline === undefined || inline === null)
|
|
94099
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", "format.apply requires an inline object.");
|
|
94100
|
+
if (!isRecord3(inline))
|
|
94101
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", "inline must be a non-null object.", {
|
|
94102
|
+
field: "inline",
|
|
94103
|
+
value: inline
|
|
94104
|
+
});
|
|
94105
|
+
const inlineKeys = Object.keys(inline);
|
|
94106
|
+
if (inlineKeys.length === 0)
|
|
94107
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", "inline must include at least one known key.");
|
|
94108
|
+
for (const key$1 of inlineKeys) {
|
|
94067
94109
|
if (!MARK_KEY_SET2.has(key$1))
|
|
94068
|
-
throw new DocumentApiValidationError2("INVALID_INPUT", `Unknown
|
|
94069
|
-
field: "
|
|
94110
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `Unknown inline style key "${key$1}". Known keys: bold, italic, underline, strike.`, {
|
|
94111
|
+
field: "inline",
|
|
94070
94112
|
key: key$1
|
|
94071
94113
|
});
|
|
94072
|
-
const value =
|
|
94114
|
+
const value = inline[key$1];
|
|
94073
94115
|
if (typeof value !== "boolean")
|
|
94074
|
-
throw new DocumentApiValidationError2("INVALID_INPUT", `
|
|
94075
|
-
field: "
|
|
94116
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `Inline style "${key$1}" must be a boolean, got ${typeof value}.`, {
|
|
94117
|
+
field: "inline",
|
|
94076
94118
|
key: key$1,
|
|
94077
94119
|
value
|
|
94078
94120
|
});
|
|
@@ -94263,16 +94305,38 @@ function executeTrackChangesList2(adapter, input2) {
|
|
|
94263
94305
|
function executeTrackChangesGet2(adapter, input2) {
|
|
94264
94306
|
return adapter.get(input2);
|
|
94265
94307
|
}
|
|
94266
|
-
function
|
|
94267
|
-
const
|
|
94308
|
+
function executeTrackChangesDecide2(adapter, rawInput, options) {
|
|
94309
|
+
const raw = rawInput;
|
|
94310
|
+
if (typeof raw !== "object" || raw == null)
|
|
94311
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", "trackChanges.decide input must be a non-null object.", { value: raw });
|
|
94312
|
+
const input2 = raw;
|
|
94313
|
+
if (input2.decision !== "accept" && input2.decision !== "reject")
|
|
94314
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `trackChanges.decide decision must be "accept" or "reject", got "${String(input2.decision)}".`, {
|
|
94315
|
+
field: "decision",
|
|
94316
|
+
value: input2.decision
|
|
94317
|
+
});
|
|
94318
|
+
if (typeof input2.target !== "object" || input2.target == null)
|
|
94319
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", 'trackChanges.decide target must be an object with { id: string } or { scope: "all" }.', {
|
|
94320
|
+
field: "target",
|
|
94321
|
+
value: input2.target
|
|
94322
|
+
});
|
|
94323
|
+
const target = input2.target;
|
|
94324
|
+
const isAll = target.scope === "all";
|
|
94325
|
+
if (!isAll) {
|
|
94326
|
+
if (typeof target.id !== "string" || target.id.length === 0)
|
|
94327
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", 'trackChanges.decide target must have { id: string } or { scope: "all" }.', {
|
|
94328
|
+
field: "target",
|
|
94329
|
+
value: input2.target
|
|
94330
|
+
});
|
|
94331
|
+
}
|
|
94268
94332
|
if (input2.decision === "accept") {
|
|
94269
94333
|
if (isAll)
|
|
94270
94334
|
return adapter.acceptAll({}, options);
|
|
94271
|
-
return adapter.accept({ id:
|
|
94335
|
+
return adapter.accept({ id: target.id }, options);
|
|
94272
94336
|
}
|
|
94273
94337
|
if (isAll)
|
|
94274
94338
|
return adapter.rejectAll({}, options);
|
|
94275
|
-
return adapter.reject({ id:
|
|
94339
|
+
return adapter.reject({ id: target.id }, options);
|
|
94276
94340
|
}
|
|
94277
94341
|
function buildDispatchTable2(api) {
|
|
94278
94342
|
return {
|
|
@@ -94302,7 +94366,7 @@ function buildDispatchTable2(api) {
|
|
|
94302
94366
|
"comments.list": (input2) => api.comments.list(input2),
|
|
94303
94367
|
"trackChanges.list": (input2) => api.trackChanges.list(input2),
|
|
94304
94368
|
"trackChanges.get": (input2) => api.trackChanges.get(input2),
|
|
94305
|
-
"
|
|
94369
|
+
"trackChanges.decide": (input2, options) => api.trackChanges.decide(input2, options),
|
|
94306
94370
|
"query.match": (input2) => api.query.match(input2),
|
|
94307
94371
|
"mutations.preview": (input2) => api.mutations.preview(input2),
|
|
94308
94372
|
"mutations.apply": (input2) => api.mutations.apply(input2),
|
|
@@ -94357,25 +94421,25 @@ function createDocumentApi2(adapters) {
|
|
|
94357
94421
|
bold(input2, options) {
|
|
94358
94422
|
return executeStyleApply$1(adapters.format, {
|
|
94359
94423
|
...input2,
|
|
94360
|
-
|
|
94424
|
+
inline: { bold: true }
|
|
94361
94425
|
}, options);
|
|
94362
94426
|
},
|
|
94363
94427
|
italic(input2, options) {
|
|
94364
94428
|
return executeStyleApply$1(adapters.format, {
|
|
94365
94429
|
...input2,
|
|
94366
|
-
|
|
94430
|
+
inline: { italic: true }
|
|
94367
94431
|
}, options);
|
|
94368
94432
|
},
|
|
94369
94433
|
underline(input2, options) {
|
|
94370
94434
|
return executeStyleApply$1(adapters.format, {
|
|
94371
94435
|
...input2,
|
|
94372
|
-
|
|
94436
|
+
inline: { underline: true }
|
|
94373
94437
|
}, options);
|
|
94374
94438
|
},
|
|
94375
94439
|
strikethrough(input2, options) {
|
|
94376
94440
|
return executeStyleApply$1(adapters.format, {
|
|
94377
94441
|
...input2,
|
|
94378
|
-
|
|
94442
|
+
inline: { strike: true }
|
|
94379
94443
|
}, options);
|
|
94380
94444
|
},
|
|
94381
94445
|
apply(input2, options) {
|
|
@@ -94388,11 +94452,11 @@ function createDocumentApi2(adapters) {
|
|
|
94388
94452
|
},
|
|
94389
94453
|
get(input2) {
|
|
94390
94454
|
return executeTrackChangesGet2(adapters.trackChanges, input2);
|
|
94455
|
+
},
|
|
94456
|
+
decide(input2, options) {
|
|
94457
|
+
return executeTrackChangesDecide2(adapters.trackChanges, input2, options);
|
|
94391
94458
|
}
|
|
94392
94459
|
},
|
|
94393
|
-
review: { decide(input2, options) {
|
|
94394
|
-
return executeReviewDecide2(adapters.trackChanges, input2, options);
|
|
94395
|
-
} },
|
|
94396
94460
|
create: {
|
|
94397
94461
|
paragraph(input2, options) {
|
|
94398
94462
|
return executeCreateParagraph2(adapters.create, input2, options);
|
|
@@ -96392,22 +96456,22 @@ function executeStyleApply2(editor, tr, target, step, mapping) {
|
|
|
96392
96456
|
const markEntries = [
|
|
96393
96457
|
[
|
|
96394
96458
|
"bold",
|
|
96395
|
-
step.args.
|
|
96459
|
+
step.args.inline.bold,
|
|
96396
96460
|
schema.marks.bold
|
|
96397
96461
|
],
|
|
96398
96462
|
[
|
|
96399
96463
|
"italic",
|
|
96400
|
-
step.args.
|
|
96464
|
+
step.args.inline.italic,
|
|
96401
96465
|
schema.marks.italic
|
|
96402
96466
|
],
|
|
96403
96467
|
[
|
|
96404
96468
|
"underline",
|
|
96405
|
-
step.args.
|
|
96469
|
+
step.args.inline.underline,
|
|
96406
96470
|
schema.marks.underline
|
|
96407
96471
|
],
|
|
96408
96472
|
[
|
|
96409
96473
|
"strike",
|
|
96410
|
-
step.args.
|
|
96474
|
+
step.args.inline.strike,
|
|
96411
96475
|
schema.marks.strike
|
|
96412
96476
|
]
|
|
96413
96477
|
];
|
|
@@ -96495,22 +96559,22 @@ function executeSpanStyleApply(editor, tr, target, step, mapping) {
|
|
|
96495
96559
|
const markEntries = [
|
|
96496
96560
|
[
|
|
96497
96561
|
"bold",
|
|
96498
|
-
step.args.
|
|
96562
|
+
step.args.inline.bold,
|
|
96499
96563
|
schema.marks.bold
|
|
96500
96564
|
],
|
|
96501
96565
|
[
|
|
96502
96566
|
"italic",
|
|
96503
|
-
step.args.
|
|
96567
|
+
step.args.inline.italic,
|
|
96504
96568
|
schema.marks.italic
|
|
96505
96569
|
],
|
|
96506
96570
|
[
|
|
96507
96571
|
"underline",
|
|
96508
|
-
step.args.
|
|
96572
|
+
step.args.inline.underline,
|
|
96509
96573
|
schema.marks.underline
|
|
96510
96574
|
],
|
|
96511
96575
|
[
|
|
96512
96576
|
"strike",
|
|
96513
|
-
step.args.
|
|
96577
|
+
step.args.inline.strike,
|
|
96514
96578
|
schema.marks.strike
|
|
96515
96579
|
]
|
|
96516
96580
|
];
|
|
@@ -97155,7 +97219,7 @@ function styleApplyWrapper(editor, input2, options) {
|
|
|
97155
97219
|
message: "format.apply requires a non-collapsed target range."
|
|
97156
97220
|
}
|
|
97157
97221
|
};
|
|
97158
|
-
const markKeys$1 = Object.keys(input2.
|
|
97222
|
+
const markKeys$1 = Object.keys(input2.inline).filter((k$1) => input2.inline[k$1] !== undefined);
|
|
97159
97223
|
for (const key$1 of markKeys$1) {
|
|
97160
97224
|
const schemaName = MARK_KEY_TO_SCHEMA_NAME[key$1];
|
|
97161
97225
|
if (schemaName)
|
|
@@ -97179,7 +97243,7 @@ function styleApplyWrapper(editor, input2, options) {
|
|
|
97179
97243
|
id: stepId,
|
|
97180
97244
|
op: "format.apply",
|
|
97181
97245
|
where: STUB_WHERE,
|
|
97182
|
-
args: {
|
|
97246
|
+
args: { inline: input2.inline }
|
|
97183
97247
|
},
|
|
97184
97248
|
targets: [{
|
|
97185
97249
|
kind: "range",
|
|
@@ -152068,7 +152132,7 @@ var Node$13 = class Node$14 {
|
|
|
152068
152132
|
trackedChanges: context.trackedChanges ?? []
|
|
152069
152133
|
});
|
|
152070
152134
|
}, _hoisted_1$6, _hoisted_2$1, _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, RESIZE_HANDLE_WIDTH_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, 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;
|
|
152071
|
-
var
|
|
152135
|
+
var init_src_CYnAk7Cg_es = __esm(() => {
|
|
152072
152136
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
152073
152137
|
init_SuperConverter_D9XMPi6H_es();
|
|
152074
152138
|
init_jszip_ChlR43oI_es();
|
|
@@ -160298,7 +160362,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
160298
160362
|
},
|
|
160299
160363
|
"format.apply": {
|
|
160300
160364
|
memberPath: "format.apply",
|
|
160301
|
-
description: "Apply explicit
|
|
160365
|
+
description: "Apply explicit inline style changes (bold, italic, underline, strike) to the target range using boolean patch semantics.",
|
|
160302
160366
|
requiresDocumentContext: true,
|
|
160303
160367
|
metadata: mutationOperation2({
|
|
160304
160368
|
idempotency: "conditional",
|
|
@@ -160479,7 +160543,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
160479
160543
|
supportsDryRun: false,
|
|
160480
160544
|
supportsTrackedMode: false,
|
|
160481
160545
|
possibleFailureCodes: ["INVALID_TARGET", "NO_OP"],
|
|
160482
|
-
throws: [
|
|
160546
|
+
throws: [
|
|
160547
|
+
...T_NOT_FOUND_COMMAND2,
|
|
160548
|
+
"INVALID_TARGET",
|
|
160549
|
+
"INVALID_INPUT"
|
|
160550
|
+
]
|
|
160483
160551
|
}),
|
|
160484
160552
|
referenceDocPath: "comments/patch.mdx",
|
|
160485
160553
|
referenceGroup: "comments"
|
|
@@ -160536,8 +160604,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
160536
160604
|
referenceDocPath: "track-changes/get.mdx",
|
|
160537
160605
|
referenceGroup: "trackChanges"
|
|
160538
160606
|
},
|
|
160539
|
-
"
|
|
160540
|
-
memberPath: "
|
|
160607
|
+
"trackChanges.decide": {
|
|
160608
|
+
memberPath: "trackChanges.decide",
|
|
160541
160609
|
description: "Accept or reject a tracked change (by ID or scope: all).",
|
|
160542
160610
|
requiresDocumentContext: true,
|
|
160543
160611
|
metadata: mutationOperation2({
|
|
@@ -160545,10 +160613,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
160545
160613
|
supportsDryRun: false,
|
|
160546
160614
|
supportsTrackedMode: false,
|
|
160547
160615
|
possibleFailureCodes: ["NO_OP"],
|
|
160548
|
-
throws:
|
|
160616
|
+
throws: [
|
|
160617
|
+
...T_NOT_FOUND_COMMAND2,
|
|
160618
|
+
"INVALID_INPUT",
|
|
160619
|
+
"INVALID_TARGET"
|
|
160620
|
+
]
|
|
160549
160621
|
}),
|
|
160550
|
-
referenceDocPath: "
|
|
160551
|
-
referenceGroup: "
|
|
160622
|
+
referenceDocPath: "track-changes/decide.mdx",
|
|
160623
|
+
referenceGroup: "trackChanges"
|
|
160552
160624
|
},
|
|
160553
160625
|
"query.match": {
|
|
160554
160626
|
memberPath: "query.match",
|
|
@@ -161097,7 +161169,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
161097
161169
|
text: { type: "string" }
|
|
161098
161170
|
}, ["target", "text"]), textMutationResultSchemaFor2("replace"), textMutationFailureSchemaFor2("replace"), objectSchema2({ target: textAddressSchema2 }, ["target"]), textMutationResultSchemaFor2("delete"), textMutationFailureSchemaFor2("delete"), objectSchema2({
|
|
161099
161171
|
target: textAddressSchema2,
|
|
161100
|
-
|
|
161172
|
+
inline: (() => {
|
|
161101
161173
|
return {
|
|
161102
161174
|
type: "object",
|
|
161103
161175
|
properties: Object.fromEntries(MARK_KEYS2.map((key$1) => [key$1, { type: "boolean" }])),
|
|
@@ -161105,7 +161177,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
161105
161177
|
minProperties: 1
|
|
161106
161178
|
};
|
|
161107
161179
|
})()
|
|
161108
|
-
}, ["target", "
|
|
161180
|
+
}, ["target", "inline"]), textMutationResultSchemaFor2("format.apply"), textMutationFailureSchemaFor2("format.apply"), objectSchema2({
|
|
161109
161181
|
at: { oneOf: [
|
|
161110
161182
|
objectSchema2({ kind: { const: "documentStart" } }, ["kind"]),
|
|
161111
161183
|
objectSchema2({ kind: { const: "documentEnd" } }, ["kind"]),
|
|
@@ -161170,7 +161242,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
161170
161242
|
"delete",
|
|
161171
161243
|
"format"
|
|
161172
161244
|
] }
|
|
161173
|
-
}), objectSchema2({ id: { type: "string" } }, ["id"]), objectSchema2({ id: { type: "string" } }, ["id"]), objectSchema2({ scope: { enum: ["all"] } }, ["scope"]), receiptResultSchemaFor2("
|
|
161245
|
+
}), objectSchema2({ id: { type: "string" } }, ["id"]), objectSchema2({ id: { type: "string" } }, ["id"]), objectSchema2({ scope: { enum: ["all"] } }, ["scope"]), receiptResultSchemaFor2("trackChanges.decide"), receiptFailureResultSchemaFor2("trackChanges.decide"), objectSchema2({
|
|
161174
161246
|
select: { oneOf: [textSelectorSchema2, nodeSelectorSchema2] },
|
|
161175
161247
|
within: nodeAddressSchema2,
|
|
161176
161248
|
require: { enum: [
|
|
@@ -161310,14 +161382,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
161310
161382
|
},
|
|
161311
161383
|
trackChanges: {
|
|
161312
161384
|
title: "Track Changes",
|
|
161313
|
-
description: "Tracked-change inspection operations.",
|
|
161385
|
+
description: "Tracked-change inspection and review operations.",
|
|
161314
161386
|
pagePath: "track-changes/index.mdx"
|
|
161315
161387
|
},
|
|
161316
|
-
review: {
|
|
161317
|
-
title: "Review",
|
|
161318
|
-
description: "Accept or reject tracked changes.",
|
|
161319
|
-
pagePath: "review/index.mdx"
|
|
161320
|
-
},
|
|
161321
161388
|
query: {
|
|
161322
161389
|
title: "Query",
|
|
161323
161390
|
description: "Deterministic selector-based queries for mutation targeting.",
|
|
@@ -161362,7 +161429,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
161362
161429
|
"status",
|
|
161363
161430
|
"isInternal"
|
|
161364
161431
|
]);
|
|
161365
|
-
STYLE_APPLY_INPUT_ALLOWED_KEYS2 = new Set(["target", "
|
|
161432
|
+
STYLE_APPLY_INPUT_ALLOWED_KEYS2 = new Set(["target", "inline"]);
|
|
161366
161433
|
DELETE_INPUT_ALLOWED_KEYS2 = new Set(["target"]);
|
|
161367
161434
|
INSERT_INPUT_ALLOWED_KEYS2 = new Set(["text", "target"]);
|
|
161368
161435
|
REPLACE_INPUT_ALLOWED_KEYS2 = new Set(["text", "target"]);
|
|
@@ -161387,7 +161454,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
161387
161454
|
"setCommentInternal"
|
|
161388
161455
|
],
|
|
161389
161456
|
"comments.delete": ["removeComment"],
|
|
161390
|
-
"
|
|
161457
|
+
"trackChanges.decide": [
|
|
161391
161458
|
"acceptTrackedChangeById",
|
|
161392
161459
|
"rejectTrackedChangeById",
|
|
161393
161460
|
"acceptAllTrackedChanges",
|
|
@@ -183515,8 +183582,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
183515
183582
|
return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
183516
183583
|
};
|
|
183517
183584
|
stubFalse_default = stubFalse;
|
|
183518
|
-
freeExports$2 = typeof
|
|
183519
|
-
freeModule$2 = freeExports$2 && typeof
|
|
183585
|
+
freeExports$2 = typeof exports_src_CYnAk7Cg_es == "object" && exports_src_CYnAk7Cg_es && !exports_src_CYnAk7Cg_es.nodeType && exports_src_CYnAk7Cg_es;
|
|
183586
|
+
freeModule$2 = freeExports$2 && typeof module_src_CYnAk7Cg_es == "object" && module_src_CYnAk7Cg_es && !module_src_CYnAk7Cg_es.nodeType && module_src_CYnAk7Cg_es;
|
|
183520
183587
|
Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
|
|
183521
183588
|
isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
|
|
183522
183589
|
typedArrayTags = {};
|
|
@@ -183524,8 +183591,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
183524
183591
|
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;
|
|
183525
183592
|
_baseIsTypedArray_default = baseIsTypedArray;
|
|
183526
183593
|
_baseUnary_default = baseUnary;
|
|
183527
|
-
freeExports$1 = typeof
|
|
183528
|
-
freeModule$1 = freeExports$1 && typeof
|
|
183594
|
+
freeExports$1 = typeof exports_src_CYnAk7Cg_es == "object" && exports_src_CYnAk7Cg_es && !exports_src_CYnAk7Cg_es.nodeType && exports_src_CYnAk7Cg_es;
|
|
183595
|
+
freeModule$1 = freeExports$1 && typeof module_src_CYnAk7Cg_es == "object" && module_src_CYnAk7Cg_es && !module_src_CYnAk7Cg_es.nodeType && module_src_CYnAk7Cg_es;
|
|
183529
183596
|
freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
|
|
183530
183597
|
_nodeUtil_default = function() {
|
|
183531
183598
|
try {
|
|
@@ -183630,8 +183697,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
183630
183697
|
Stack.prototype.has = _stackHas_default;
|
|
183631
183698
|
Stack.prototype.set = _stackSet_default;
|
|
183632
183699
|
_Stack_default = Stack;
|
|
183633
|
-
freeExports = typeof
|
|
183634
|
-
freeModule = freeExports && typeof
|
|
183700
|
+
freeExports = typeof exports_src_CYnAk7Cg_es == "object" && exports_src_CYnAk7Cg_es && !exports_src_CYnAk7Cg_es.nodeType && exports_src_CYnAk7Cg_es;
|
|
183701
|
+
freeModule = freeExports && typeof module_src_CYnAk7Cg_es == "object" && module_src_CYnAk7Cg_es && !module_src_CYnAk7Cg_es.nodeType && module_src_CYnAk7Cg_es;
|
|
183635
183702
|
Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
|
|
183636
183703
|
allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
|
|
183637
183704
|
_cloneBuffer_default = cloneBuffer;
|
|
@@ -191250,7 +191317,7 @@ var init_zipper_BJHqrQMq_es = __esm(() => {
|
|
|
191250
191317
|
|
|
191251
191318
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
191252
191319
|
var init_super_editor_es = __esm(() => {
|
|
191253
|
-
|
|
191320
|
+
init_src_CYnAk7Cg_es();
|
|
191254
191321
|
init_SuperConverter_D9XMPi6H_es();
|
|
191255
191322
|
init_jszip_ChlR43oI_es();
|
|
191256
191323
|
init_xml_js_DLE8mr0n_es();
|
|
@@ -191408,7 +191475,7 @@ var init_capabilities_adapter = __esm(() => {
|
|
|
191408
191475
|
"comments.create": ["addComment", "setTextSelection", "addCommentReply"],
|
|
191409
191476
|
"comments.patch": ["editComment", "moveComment", "resolveComment", "setCommentInternal"],
|
|
191410
191477
|
"comments.delete": ["removeComment"],
|
|
191411
|
-
"
|
|
191478
|
+
"trackChanges.decide": [
|
|
191412
191479
|
"acceptTrackedChangeById",
|
|
191413
191480
|
"rejectTrackedChangeById",
|
|
191414
191481
|
"acceptAllTrackedChanges",
|
|
@@ -198013,10 +198080,10 @@ function executeStyleApply3(editor, tr, target, step, mapping) {
|
|
|
198013
198080
|
const { schema } = editor.state;
|
|
198014
198081
|
let changed = false;
|
|
198015
198082
|
const markEntries = [
|
|
198016
|
-
["bold", step.args.
|
|
198017
|
-
["italic", step.args.
|
|
198018
|
-
["underline", step.args.
|
|
198019
|
-
["strike", step.args.
|
|
198083
|
+
["bold", step.args.inline.bold, schema.marks.bold],
|
|
198084
|
+
["italic", step.args.inline.italic, schema.marks.italic],
|
|
198085
|
+
["underline", step.args.inline.underline, schema.marks.underline],
|
|
198086
|
+
["strike", step.args.inline.strike, schema.marks.strike]
|
|
198020
198087
|
];
|
|
198021
198088
|
for (const [, value, markType] of markEntries) {
|
|
198022
198089
|
if (value === undefined || !markType)
|
|
@@ -198106,10 +198173,10 @@ function executeSpanStyleApply2(editor, tr, target, step, mapping) {
|
|
|
198106
198173
|
const absFrom = mapping.map(firstSeg.absFrom, 1);
|
|
198107
198174
|
const absTo = mapping.map(lastSeg.absTo, -1);
|
|
198108
198175
|
const markEntries = [
|
|
198109
|
-
["bold", step.args.
|
|
198110
|
-
["italic", step.args.
|
|
198111
|
-
["underline", step.args.
|
|
198112
|
-
["strike", step.args.
|
|
198176
|
+
["bold", step.args.inline.bold, schema.marks.bold],
|
|
198177
|
+
["italic", step.args.inline.italic, schema.marks.italic],
|
|
198178
|
+
["underline", step.args.inline.underline, schema.marks.underline],
|
|
198179
|
+
["strike", step.args.inline.strike, schema.marks.strike]
|
|
198113
198180
|
];
|
|
198114
198181
|
for (const [, value, markType] of markEntries) {
|
|
198115
198182
|
if (value === undefined || !markType)
|
|
@@ -198717,7 +198784,7 @@ function styleApplyWrapper2(editor, input2, options) {
|
|
|
198717
198784
|
failure: { code: "INVALID_TARGET", message: "format.apply requires a non-collapsed target range." }
|
|
198718
198785
|
};
|
|
198719
198786
|
}
|
|
198720
|
-
const markKeys2 = Object.keys(input2.
|
|
198787
|
+
const markKeys2 = Object.keys(input2.inline).filter((k3) => input2.inline[k3] !== undefined);
|
|
198721
198788
|
for (const key2 of markKeys2) {
|
|
198722
198789
|
const schemaName = MARK_KEY_TO_SCHEMA_NAME2[key2];
|
|
198723
198790
|
if (schemaName) {
|
|
@@ -198736,7 +198803,7 @@ function styleApplyWrapper2(editor, input2, options) {
|
|
|
198736
198803
|
id: stepId,
|
|
198737
198804
|
op: "format.apply",
|
|
198738
198805
|
where: STUB_WHERE2,
|
|
198739
|
-
args: {
|
|
198806
|
+
args: { inline: input2.inline }
|
|
198740
198807
|
};
|
|
198741
198808
|
const target = {
|
|
198742
198809
|
kind: "range",
|
|
@@ -238980,7 +239047,7 @@ var resolveTrackChangeId = (input2, context) => {
|
|
|
238980
239047
|
var init_special_handlers = __esm(() => {
|
|
238981
239048
|
PRE_INVOKE_HOOKS = {
|
|
238982
239049
|
"trackChanges.get": resolveTrackChangeId,
|
|
238983
|
-
"
|
|
239050
|
+
"trackChanges.decide": resolveReviewDecideId
|
|
238984
239051
|
};
|
|
238985
239052
|
POST_INVOKE_HOOKS = {
|
|
238986
239053
|
"trackChanges.list": normalizeTrackChangesListIds,
|
|
@@ -239609,7 +239676,7 @@ var init_helper_commands = __esm(() => {
|
|
|
239609
239676
|
{
|
|
239610
239677
|
tokens: ["format", "bold"],
|
|
239611
239678
|
canonicalOperationId: "format.apply",
|
|
239612
|
-
defaultInput: {
|
|
239679
|
+
defaultInput: { inline: { bold: true } },
|
|
239613
239680
|
description: "Apply bold formatting to a text range.",
|
|
239614
239681
|
category: "format",
|
|
239615
239682
|
mutates: true,
|
|
@@ -239621,7 +239688,7 @@ var init_helper_commands = __esm(() => {
|
|
|
239621
239688
|
{
|
|
239622
239689
|
tokens: ["format", "italic"],
|
|
239623
239690
|
canonicalOperationId: "format.apply",
|
|
239624
|
-
defaultInput: {
|
|
239691
|
+
defaultInput: { inline: { italic: true } },
|
|
239625
239692
|
description: "Apply italic formatting to a text range.",
|
|
239626
239693
|
category: "format",
|
|
239627
239694
|
mutates: true,
|
|
@@ -239630,7 +239697,7 @@ var init_helper_commands = __esm(() => {
|
|
|
239630
239697
|
{
|
|
239631
239698
|
tokens: ["format", "underline"],
|
|
239632
239699
|
canonicalOperationId: "format.apply",
|
|
239633
|
-
defaultInput: {
|
|
239700
|
+
defaultInput: { inline: { underline: true } },
|
|
239634
239701
|
description: "Apply underline formatting to a text range.",
|
|
239635
239702
|
category: "format",
|
|
239636
239703
|
mutates: true,
|
|
@@ -239639,7 +239706,7 @@ var init_helper_commands = __esm(() => {
|
|
|
239639
239706
|
{
|
|
239640
239707
|
tokens: ["format", "strikethrough"],
|
|
239641
239708
|
canonicalOperationId: "format.apply",
|
|
239642
|
-
defaultInput: {
|
|
239709
|
+
defaultInput: { inline: { strike: true } },
|
|
239643
239710
|
description: "Apply strikethrough formatting to a text range.",
|
|
239644
239711
|
category: "format",
|
|
239645
239712
|
mutates: true,
|
|
@@ -239647,7 +239714,7 @@ var init_helper_commands = __esm(() => {
|
|
|
239647
239714
|
},
|
|
239648
239715
|
{
|
|
239649
239716
|
tokens: ["track-changes", "accept"],
|
|
239650
|
-
canonicalOperationId: "
|
|
239717
|
+
canonicalOperationId: "trackChanges.decide",
|
|
239651
239718
|
defaultInput: { decision: "accept" },
|
|
239652
239719
|
description: "Accept a tracked change by ID.",
|
|
239653
239720
|
category: "trackChanges",
|
|
@@ -239658,7 +239725,7 @@ var init_helper_commands = __esm(() => {
|
|
|
239658
239725
|
},
|
|
239659
239726
|
{
|
|
239660
239727
|
tokens: ["track-changes", "reject"],
|
|
239661
|
-
canonicalOperationId: "
|
|
239728
|
+
canonicalOperationId: "trackChanges.decide",
|
|
239662
239729
|
defaultInput: { decision: "reject" },
|
|
239663
239730
|
description: "Reject a tracked change by ID.",
|
|
239664
239731
|
category: "trackChanges",
|
|
@@ -239669,7 +239736,7 @@ var init_helper_commands = __esm(() => {
|
|
|
239669
239736
|
},
|
|
239670
239737
|
{
|
|
239671
239738
|
tokens: ["track-changes", "accept-all"],
|
|
239672
|
-
canonicalOperationId: "
|
|
239739
|
+
canonicalOperationId: "trackChanges.decide",
|
|
239673
239740
|
defaultInput: { decision: "accept", target: { scope: "all" } },
|
|
239674
239741
|
description: "Accept all tracked changes.",
|
|
239675
239742
|
category: "trackChanges",
|
|
@@ -239678,7 +239745,7 @@ var init_helper_commands = __esm(() => {
|
|
|
239678
239745
|
},
|
|
239679
239746
|
{
|
|
239680
239747
|
tokens: ["track-changes", "reject-all"],
|
|
239681
|
-
canonicalOperationId: "
|
|
239748
|
+
canonicalOperationId: "trackChanges.decide",
|
|
239682
239749
|
defaultInput: { decision: "reject", target: { scope: "all" } },
|
|
239683
239750
|
description: "Reject all tracked changes.",
|
|
239684
239751
|
category: "trackChanges",
|
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.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@superdoc-dev/cli-darwin-
|
|
32
|
-
"@superdoc-dev/cli-darwin-
|
|
33
|
-
"@superdoc-dev/cli-linux-x64": "0.2.0-next.
|
|
34
|
-
"@superdoc-dev/cli-
|
|
35
|
-
"@superdoc-dev/cli-
|
|
31
|
+
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.2",
|
|
32
|
+
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.2",
|
|
33
|
+
"@superdoc-dev/cli-linux-x64": "0.2.0-next.2",
|
|
34
|
+
"@superdoc-dev/cli-windows-x64": "0.2.0-next.2",
|
|
35
|
+
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.2"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"dev": "bun run src/index.ts",
|