@superdoc-dev/cli 0.3.0-next.31 → 0.3.0-next.33
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 +147 -13
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -7730,7 +7730,7 @@ function buildInternalContractSchemas() {
|
|
|
7730
7730
|
operations
|
|
7731
7731
|
};
|
|
7732
7732
|
}
|
|
7733
|
-
var nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, knownTargetKindValues, SHARED_DEFS, rangeSchema, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema, textTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, paragraphTargetSchema, sectionAddressSchema, inlineNodeAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, targetLocatorSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchRunSchema, matchBlockSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, headingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema, nodeSelectorSchema, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentInfoSchema, listKindSchema, listInsertPositionSchema, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, sdFragmentSchema, placementSchema, nestingPolicySchema, insertInputSchema, tableLocatorSchema, cellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableCreateLocationSchema, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas, tocMutationFailureCodes, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkDestinationSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema, hyperlinkInfoSchema, contentControlTargetSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccListResultSchema, ccInfoSchema, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffPayloadSchema, diffApplyResultSchema, operationSchemas;
|
|
7733
|
+
var nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, knownTargetKindValues, SHARED_DEFS, rangeSchema, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema, textTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, paragraphTargetSchema, sectionAddressSchema, inlineNodeAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, targetLocatorSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchRunSchema, matchBlockSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, headingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema, nodeSelectorSchema, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentInfoSchema, listKindSchema, listInsertPositionSchema, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, sdFragmentSchema, placementSchema, nestingPolicySchema, insertInputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableCreateLocationSchema, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas, tocMutationFailureCodes, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkDestinationSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema, hyperlinkInfoSchema, contentControlTargetSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccListResultSchema, ccInfoSchema, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffPayloadSchema, diffApplyResultSchema, operationSchemas;
|
|
7734
7734
|
var init_schemas = __esm(() => {
|
|
7735
7735
|
init_command_catalog();
|
|
7736
7736
|
init_types2();
|
|
@@ -8489,6 +8489,21 @@ var init_schemas = __esm(() => {
|
|
|
8489
8489
|
}),
|
|
8490
8490
|
oneOf: [{ required: ["target"] }, { required: ["nodeId"] }]
|
|
8491
8491
|
};
|
|
8492
|
+
cellOrTableScopedCellLocatorSchema = {
|
|
8493
|
+
oneOf: [
|
|
8494
|
+
cellLocatorSchema,
|
|
8495
|
+
objectSchema({
|
|
8496
|
+
target: tableAddressSchema,
|
|
8497
|
+
rowIndex: { type: "integer", minimum: 0 },
|
|
8498
|
+
columnIndex: { type: "integer", minimum: 0 }
|
|
8499
|
+
}, ["target", "rowIndex", "columnIndex"]),
|
|
8500
|
+
objectSchema({
|
|
8501
|
+
nodeId: { type: "string" },
|
|
8502
|
+
rowIndex: { type: "integer", minimum: 0 },
|
|
8503
|
+
columnIndex: { type: "integer", minimum: 0 }
|
|
8504
|
+
}, ["nodeId", "rowIndex", "columnIndex"])
|
|
8505
|
+
]
|
|
8506
|
+
};
|
|
8492
8507
|
tableOrCellLocatorSchema = {
|
|
8493
8508
|
...objectSchema({
|
|
8494
8509
|
target: tableOrCellAddressSchema,
|
|
@@ -10663,7 +10678,7 @@ var init_schemas = __esm(() => {
|
|
|
10663
10678
|
failure: tableMutationFailureSchema
|
|
10664
10679
|
},
|
|
10665
10680
|
"tables.unmergeCells": {
|
|
10666
|
-
input:
|
|
10681
|
+
input: cellOrTableScopedCellLocatorSchema,
|
|
10667
10682
|
output: tableMutationResultSchema,
|
|
10668
10683
|
success: tableMutationSuccessSchema,
|
|
10669
10684
|
failure: tableMutationFailureSchema
|
|
@@ -14364,6 +14379,26 @@ function validateRowLocator(input, operationName) {
|
|
|
14364
14379
|
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName}: rowIndex must not be provided when target is a row node. ` + `Either pass a table target with rowIndex, or pass a row target without rowIndex.`);
|
|
14365
14380
|
}
|
|
14366
14381
|
}
|
|
14382
|
+
function hasTableScopedCellCoordinates(input) {
|
|
14383
|
+
return input.rowIndex != null && input.columnIndex != null;
|
|
14384
|
+
}
|
|
14385
|
+
function validateCellOrTableScopedCellLocator(input, operationName) {
|
|
14386
|
+
validateTableLocator(input, operationName);
|
|
14387
|
+
const hasRowIndex = input.rowIndex != null;
|
|
14388
|
+
const hasColumnIndex = input.columnIndex != null;
|
|
14389
|
+
if (hasRowIndex !== hasColumnIndex) {
|
|
14390
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName}: both rowIndex and columnIndex are required when using table-scoped cell targeting. ` + `Provide both or neither.`, { fields: ["rowIndex", "columnIndex"] });
|
|
14391
|
+
}
|
|
14392
|
+
const hasCoordinates = hasTableScopedCellCoordinates(input);
|
|
14393
|
+
if (isObjectRecord(input.target) && input.target.kind === "block") {
|
|
14394
|
+
if (input.target.nodeType === "tableCell" && hasCoordinates) {
|
|
14395
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName}: rowIndex/columnIndex must not be provided when target is a cell node. ` + `Either pass a table target with coordinates, or pass a cell target without coordinates.`, { fields: ["rowIndex", "columnIndex"] });
|
|
14396
|
+
}
|
|
14397
|
+
if (input.target.nodeType === "table" && !hasCoordinates) {
|
|
14398
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName}: rowIndex and columnIndex are required when target is a table.`, { fields: ["rowIndex", "columnIndex"] });
|
|
14399
|
+
}
|
|
14400
|
+
}
|
|
14401
|
+
}
|
|
14367
14402
|
function executeTableLocatorOp(operationName, adapter, input, options) {
|
|
14368
14403
|
validateTableLocator(input, operationName);
|
|
14369
14404
|
return adapter(input, normalizeMutationOptions(options));
|
|
@@ -14372,6 +14407,10 @@ function executeRowLocatorOp(operationName, adapter, input, options) {
|
|
|
14372
14407
|
validateRowLocator(input, operationName);
|
|
14373
14408
|
return adapter(input, normalizeMutationOptions(options));
|
|
14374
14409
|
}
|
|
14410
|
+
function executeCellOrTableScopedCellLocatorOp(operationName, adapter, input, options) {
|
|
14411
|
+
validateCellOrTableScopedCellLocator(input, operationName);
|
|
14412
|
+
return adapter(input, normalizeMutationOptions(options));
|
|
14413
|
+
}
|
|
14375
14414
|
function executeDocumentLevelTableOp(adapter, input, options) {
|
|
14376
14415
|
return adapter(input, normalizeMutationOptions(options));
|
|
14377
14416
|
}
|
|
@@ -16385,7 +16424,7 @@ function createDocumentApi(adapters) {
|
|
|
16385
16424
|
return executeTableLocatorOp("tables.mergeCells", adapters.tables.mergeCells.bind(adapters.tables), input, options);
|
|
16386
16425
|
},
|
|
16387
16426
|
unmergeCells(input, options) {
|
|
16388
|
-
return
|
|
16427
|
+
return executeCellOrTableScopedCellLocatorOp("tables.unmergeCells", adapters.tables.unmergeCells.bind(adapters.tables), input, options);
|
|
16389
16428
|
},
|
|
16390
16429
|
splitCell(input, options) {
|
|
16391
16430
|
return executeTableLocatorOp("tables.splitCell", adapters.tables.splitCell.bind(adapters.tables), input, options);
|
|
@@ -39328,7 +39367,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
|
|
|
39328
39367
|
emptyOptions2 = {};
|
|
39329
39368
|
});
|
|
39330
39369
|
|
|
39331
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
39370
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-BrfbGHMj.es.js
|
|
39332
39371
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
39333
39372
|
const fieldValue = extension$1.config[field];
|
|
39334
39373
|
if (typeof fieldValue === "function")
|
|
@@ -43491,6 +43530,21 @@ function validateRowLocator2(input, operationName) {
|
|
|
43491
43530
|
if (input.target.nodeType === "tableRow" && input.rowIndex != null)
|
|
43492
43531
|
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}: rowIndex must not be provided when target is a row node. Either pass a table target with rowIndex, or pass a row target without rowIndex.`);
|
|
43493
43532
|
}
|
|
43533
|
+
function hasTableScopedCellCoordinates2(input) {
|
|
43534
|
+
return input.rowIndex != null && input.columnIndex != null;
|
|
43535
|
+
}
|
|
43536
|
+
function validateCellOrTableScopedCellLocator2(input, operationName) {
|
|
43537
|
+
validateTableLocator2(input, operationName);
|
|
43538
|
+
if (input.rowIndex != null !== (input.columnIndex != null))
|
|
43539
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}: both rowIndex and columnIndex are required when using table-scoped cell targeting. Provide both or neither.`, { fields: ["rowIndex", "columnIndex"] });
|
|
43540
|
+
const hasCoordinates = hasTableScopedCellCoordinates2(input);
|
|
43541
|
+
if (isObjectRecord2(input.target) && input.target.kind === "block") {
|
|
43542
|
+
if (input.target.nodeType === "tableCell" && hasCoordinates)
|
|
43543
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}: rowIndex/columnIndex must not be provided when target is a cell node. Either pass a table target with coordinates, or pass a cell target without coordinates.`, { fields: ["rowIndex", "columnIndex"] });
|
|
43544
|
+
if (input.target.nodeType === "table" && !hasCoordinates)
|
|
43545
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}: rowIndex and columnIndex are required when target is a table.`, { fields: ["rowIndex", "columnIndex"] });
|
|
43546
|
+
}
|
|
43547
|
+
}
|
|
43494
43548
|
function executeTableLocatorOp2(operationName, adapter, input, options) {
|
|
43495
43549
|
validateTableLocator2(input, operationName);
|
|
43496
43550
|
return adapter(input, normalizeMutationOptions2(options));
|
|
@@ -43499,6 +43553,10 @@ function executeRowLocatorOp2(operationName, adapter, input, options) {
|
|
|
43499
43553
|
validateRowLocator2(input, operationName);
|
|
43500
43554
|
return adapter(input, normalizeMutationOptions2(options));
|
|
43501
43555
|
}
|
|
43556
|
+
function executeCellOrTableScopedCellLocatorOp2(operationName, adapter, input, options) {
|
|
43557
|
+
validateCellOrTableScopedCellLocator2(input, operationName);
|
|
43558
|
+
return adapter(input, normalizeMutationOptions2(options));
|
|
43559
|
+
}
|
|
43502
43560
|
function executeDocumentLevelTableOp2(adapter, input, options) {
|
|
43503
43561
|
return adapter(input, normalizeMutationOptions2(options));
|
|
43504
43562
|
}
|
|
@@ -45288,7 +45346,7 @@ function createDocumentApi2(adapters) {
|
|
|
45288
45346
|
return executeTableLocatorOp2("tables.mergeCells", adapters.tables.mergeCells.bind(adapters.tables), input, options);
|
|
45289
45347
|
},
|
|
45290
45348
|
unmergeCells(input, options) {
|
|
45291
|
-
return
|
|
45349
|
+
return executeCellOrTableScopedCellLocatorOp2("tables.unmergeCells", adapters.tables.unmergeCells.bind(adapters.tables), input, options);
|
|
45292
45350
|
},
|
|
45293
45351
|
splitCell(input, options) {
|
|
45294
45352
|
return executeTableLocatorOp2("tables.splitCell", adapters.tables.splitCell.bind(adapters.tables), input, options);
|
|
@@ -85214,7 +85272,7 @@ var isRegExp = (value) => {
|
|
|
85214
85272
|
state.kern = kernNode.attributes["w:val"];
|
|
85215
85273
|
}
|
|
85216
85274
|
}, SuperConverter;
|
|
85217
|
-
var
|
|
85275
|
+
var init_SuperConverter_BrfbGHMj_es = __esm(() => {
|
|
85218
85276
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
85219
85277
|
init_jszip_ChlR43oI_es();
|
|
85220
85278
|
init_xml_js_BtmJ6bNs_es();
|
|
@@ -95105,7 +95163,35 @@ var init_SuperConverter_CFk0pxVl_es = __esm(() => {
|
|
|
95105
95163
|
({ ...objectSchema2({
|
|
95106
95164
|
target: tableCellAddressSchema2,
|
|
95107
95165
|
nodeId: { type: "string" }
|
|
95108
|
-
}) }
|
|
95166
|
+
}) }, objectSchema2({
|
|
95167
|
+
target: tableAddressSchema2,
|
|
95168
|
+
rowIndex: {
|
|
95169
|
+
type: "integer",
|
|
95170
|
+
minimum: 0
|
|
95171
|
+
},
|
|
95172
|
+
columnIndex: {
|
|
95173
|
+
type: "integer",
|
|
95174
|
+
minimum: 0
|
|
95175
|
+
}
|
|
95176
|
+
}, [
|
|
95177
|
+
"target",
|
|
95178
|
+
"rowIndex",
|
|
95179
|
+
"columnIndex"
|
|
95180
|
+
])), objectSchema2({
|
|
95181
|
+
nodeId: { type: "string" },
|
|
95182
|
+
rowIndex: {
|
|
95183
|
+
type: "integer",
|
|
95184
|
+
minimum: 0
|
|
95185
|
+
},
|
|
95186
|
+
columnIndex: {
|
|
95187
|
+
type: "integer",
|
|
95188
|
+
minimum: 0
|
|
95189
|
+
}
|
|
95190
|
+
}, [
|
|
95191
|
+
"nodeId",
|
|
95192
|
+
"rowIndex",
|
|
95193
|
+
"columnIndex"
|
|
95194
|
+
]);
|
|
95109
95195
|
({ ...objectSchema2({
|
|
95110
95196
|
target: tableOrCellAddressSchema2,
|
|
95111
95197
|
nodeId: { type: "string" }
|
|
@@ -147595,7 +147681,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
147595
147681
|
init_remark_gfm_z_sDF4ss_es();
|
|
147596
147682
|
});
|
|
147597
147683
|
|
|
147598
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
147684
|
+
// ../../packages/superdoc/dist/chunks/src-DsoBnhF3.es.js
|
|
147599
147685
|
function deleteProps(obj, propOrProps) {
|
|
147600
147686
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
147601
147687
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -164479,6 +164565,28 @@ function resolveMergeRangeLocator(editor, input2, operationName) {
|
|
|
164479
164565
|
endCol
|
|
164480
164566
|
};
|
|
164481
164567
|
}
|
|
164568
|
+
function resolveTableScopedCellLocator(editor, input2, operationName) {
|
|
164569
|
+
const table2 = resolveTableLocator(editor, input2, operationName);
|
|
164570
|
+
const map$12 = TableMap.get(table2.candidate.node);
|
|
164571
|
+
if (input2.rowIndex < 0 || input2.rowIndex >= map$12.height || input2.columnIndex < 0 || input2.columnIndex >= map$12.width)
|
|
164572
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", `${operationName}: cell (${input2.rowIndex}, ${input2.columnIndex}) is out of bounds (table is ${map$12.height}×${map$12.width}).`);
|
|
164573
|
+
const requestedIndex = input2.rowIndex * map$12.width + input2.columnIndex;
|
|
164574
|
+
const cellOffset = map$12.map[requestedIndex];
|
|
164575
|
+
const anchorIndex = map$12.map.indexOf(cellOffset);
|
|
164576
|
+
const anchorRow = Math.floor(anchorIndex / map$12.width);
|
|
164577
|
+
const anchorCol = anchorIndex % map$12.width;
|
|
164578
|
+
const cellPos = table2.candidate.pos + 1 + cellOffset;
|
|
164579
|
+
const cellNode = table2.candidate.node.nodeAt(cellOffset);
|
|
164580
|
+
if (!cellNode)
|
|
164581
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `${operationName}: cell at (${input2.rowIndex}, ${input2.columnIndex}) could not be resolved.`);
|
|
164582
|
+
return {
|
|
164583
|
+
table: table2,
|
|
164584
|
+
cellNode,
|
|
164585
|
+
cellPos,
|
|
164586
|
+
rowIndex: anchorRow,
|
|
164587
|
+
columnIndex: anchorCol
|
|
164588
|
+
};
|
|
164589
|
+
}
|
|
164482
164590
|
function resolveColumnLocator(editor, input2, operationName) {
|
|
164483
164591
|
const table2 = resolveTableLocator(editor, input2, operationName);
|
|
164484
164592
|
const columnCount = getTableColumnCount(table2.candidate.node);
|
|
@@ -166057,9 +166165,32 @@ function tablesMergeCellsAdapter(editor, input2, options) {
|
|
|
166057
166165
|
return toTableFailure("INVALID_TARGET", "Cell merge could not be applied.");
|
|
166058
166166
|
}
|
|
166059
166167
|
}
|
|
166168
|
+
function hasDefinedUnmergeCoordinates(input2) {
|
|
166169
|
+
const inputRecord = input2;
|
|
166170
|
+
return inputRecord.rowIndex != null && inputRecord.columnIndex != null;
|
|
166171
|
+
}
|
|
166172
|
+
function resolveUnmergeInput(editor, input2) {
|
|
166173
|
+
if (!hasDefinedUnmergeCoordinates(input2))
|
|
166174
|
+
return resolveCellLocator(editor, input2, "tables.unmergeCells");
|
|
166175
|
+
const target = input2.target;
|
|
166176
|
+
if (target && typeof target === "object" && !Array.isArray(target)) {
|
|
166177
|
+
const blockTarget = target;
|
|
166178
|
+
if (blockTarget.kind === "block" && blockTarget.nodeType === "table")
|
|
166179
|
+
return resolveTableScopedCellLocator(editor, input2, "tables.unmergeCells");
|
|
166180
|
+
return resolveCellLocator(editor, { target }, "tables.unmergeCells");
|
|
166181
|
+
}
|
|
166182
|
+
const nodeId = input2.nodeId;
|
|
166183
|
+
if (typeof nodeId === "string") {
|
|
166184
|
+
const candidate = findBlockByNodeIdOnly(getBlockIndex(editor), nodeId);
|
|
166185
|
+
if (!candidate)
|
|
166186
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "tables.unmergeCells: target was not found.", { target: nodeId });
|
|
166187
|
+
return candidate.nodeType === "table" ? resolveTableScopedCellLocator(editor, input2, "tables.unmergeCells") : resolveCellLocator(editor, { nodeId }, "tables.unmergeCells");
|
|
166188
|
+
}
|
|
166189
|
+
return resolveCellLocator(editor, {}, "tables.unmergeCells");
|
|
166190
|
+
}
|
|
166060
166191
|
function tablesUnmergeCellsAdapter(editor, input2, options) {
|
|
166061
166192
|
rejectTrackedMode("tables.unmergeCells", options);
|
|
166062
|
-
const { table: table2, cellPos, cellNode, rowIndex, columnIndex } =
|
|
166193
|
+
const { table: table2, cellPos, cellNode, rowIndex, columnIndex } = resolveUnmergeInput(editor, input2);
|
|
166063
166194
|
const attrs = cellNode.attrs;
|
|
166064
166195
|
const colspan = attrs.colspan || 1;
|
|
166065
166196
|
const rowspan = attrs.rowspan || 1;
|
|
@@ -227371,9 +227502,9 @@ var Node$13 = class Node$14 {
|
|
|
227371
227502
|
return false;
|
|
227372
227503
|
return Boolean(checker(attrs));
|
|
227373
227504
|
}, SuperToolbar, ICONS, TEXTS, tableActionsOptions;
|
|
227374
|
-
var
|
|
227505
|
+
var init_src_DsoBnhF3_es = __esm(() => {
|
|
227375
227506
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
227376
|
-
|
|
227507
|
+
init_SuperConverter_BrfbGHMj_es();
|
|
227377
227508
|
init_jszip_ChlR43oI_es();
|
|
227378
227509
|
init_uuid_qzgm05fK_es();
|
|
227379
227510
|
init_constants_ep1_Gwqi_es();
|
|
@@ -245655,6 +245786,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
245655
245786
|
}
|
|
245656
245787
|
const beforeX = win.scrollX;
|
|
245657
245788
|
const beforeY = win.scrollY;
|
|
245789
|
+
const alreadyFocused = view.hasFocus();
|
|
245658
245790
|
let focused = false;
|
|
245659
245791
|
try {
|
|
245660
245792
|
view.dom.focus({ preventScroll: true });
|
|
@@ -245684,6 +245816,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
245684
245816
|
strategy: "original"
|
|
245685
245817
|
});
|
|
245686
245818
|
}
|
|
245819
|
+
if (!alreadyFocused)
|
|
245820
|
+
view.domObserver.suppressSelectionUpdates();
|
|
245687
245821
|
if (win.scrollX !== beforeX || win.scrollY !== beforeY)
|
|
245688
245822
|
win.scrollTo(beforeX, beforeY);
|
|
245689
245823
|
if (this.#focusScrollRafId != null)
|
|
@@ -260642,8 +260776,8 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
260642
260776
|
|
|
260643
260777
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
260644
260778
|
var init_super_editor_es = __esm(() => {
|
|
260645
|
-
|
|
260646
|
-
|
|
260779
|
+
init_src_DsoBnhF3_es();
|
|
260780
|
+
init_SuperConverter_BrfbGHMj_es();
|
|
260647
260781
|
init_jszip_ChlR43oI_es();
|
|
260648
260782
|
init_xml_js_BtmJ6bNs_es();
|
|
260649
260783
|
init_constants_ep1_Gwqi_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@types/node": "22.19.2",
|
|
22
22
|
"typescript": "^5.9.2",
|
|
23
23
|
"@superdoc/document-api": "0.0.1",
|
|
24
|
-
"@superdoc/super-editor": "0.0.1",
|
|
25
24
|
"@superdoc/pm-adapter": "0.0.0",
|
|
25
|
+
"@superdoc/super-editor": "0.0.1",
|
|
26
26
|
"superdoc": "1.20.0"
|
|
27
27
|
},
|
|
28
28
|
"module": "src/index.ts",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@superdoc-dev/cli-darwin-arm64": "0.3.0-next.
|
|
34
|
-
"@superdoc-dev/cli-darwin-x64": "0.3.0-next.
|
|
35
|
-
"@superdoc-dev/cli-linux-
|
|
36
|
-
"@superdoc-dev/cli-linux-
|
|
37
|
-
"@superdoc-dev/cli-windows-x64": "0.3.0-next.
|
|
33
|
+
"@superdoc-dev/cli-darwin-arm64": "0.3.0-next.33",
|
|
34
|
+
"@superdoc-dev/cli-darwin-x64": "0.3.0-next.33",
|
|
35
|
+
"@superdoc-dev/cli-linux-x64": "0.3.0-next.33",
|
|
36
|
+
"@superdoc-dev/cli-linux-arm64": "0.3.0-next.33",
|
|
37
|
+
"@superdoc-dev/cli-windows-x64": "0.3.0-next.33"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"predev": "node scripts/ensure-superdoc-build.js",
|