@superdoc-dev/cli 0.8.0-next.84 → 0.8.0-next.85
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 +986 -154
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1362,7 +1362,81 @@ More content with **bold** and *italic*.`
|
|
|
1362
1362
|
}
|
|
1363
1363
|
]
|
|
1364
1364
|
},
|
|
1365
|
-
table: {
|
|
1365
|
+
table: {
|
|
1366
|
+
toolName: "superdoc_table",
|
|
1367
|
+
description: `Create and modify table structure, content, and styling. Find table/row/cell nodeIds via superdoc_get_content({action:"blocks"}) or superdoc_search.
|
|
1368
|
+
` + `
|
|
1369
|
+
` + `ACTIONS:
|
|
1370
|
+
` + `• Structure: delete, insert_row, delete_row, insert_column, delete_column, merge_cells, unmerge_cells.
|
|
1371
|
+
` + `• Cell content: set_cell_text (text). set_cell (vAlign / wrap / fit / preferred width).
|
|
1372
|
+
` + `• Row / column: set_row (height + rule), set_row_options (repeat-header, allow-break), set_column (widthPt).
|
|
1373
|
+
` + `• Table styling: set_borders, set_shading, set_style_options (headerRow / bandedRows / firstColumn / lastColumn / lastRow / bandedColumns), set_layout (autofit / alignment / direction / preferredWidth), set_options (default cell margins + cell spacing).
|
|
1374
|
+
` + `
|
|
1375
|
+
` + `LOCATORS (the shapes ops accept):
|
|
1376
|
+
` + `• insert_row append shorthand: { nodeId: "<tableId>" } with no rowIndex/position appends at the end. Three other forms: target a row + position, table + rowIndex + position, or any of the above with count:N for multiple.
|
|
1377
|
+
` + `• insert_column shorthand: position:"first"|"last" with no columnIndex. Otherwise columnIndex + position:"left"|"right".
|
|
1378
|
+
` + `• merge_cells: table target + start:{rowIndex, columnIndex} + end:{rowIndex, columnIndex}.
|
|
1379
|
+
` + `• set_cell_text: table target + rowIndex + columnIndex (preferred) OR cell target.
|
|
1380
|
+
` + `• set_cell: cell target only. Does NOT accept table+rowIndex+columnIndex.
|
|
1381
|
+
` + `• set_borders / set_shading: table OR cell target. NOT a row target.
|
|
1382
|
+
` + `
|
|
1383
|
+
` + `COLOR FORMAT:
|
|
1384
|
+
` + 'Hex strings accept #RRGGBB, RRGGBB, #RGB, or 3-digit RGB; also "auto"; also null to clear (where supported). Stored canonically as uppercase RRGGBB. Always pass a concrete color when one is implied. Never call set_borders with `auto` for a "make it look [X]" ask.\n' + `
|
|
1385
|
+
` + `STYLING (TWO MODES):
|
|
1386
|
+
` + `
|
|
1387
|
+
` + `A. STRUCTURAL CHANGE → re-apply the existing styling.
|
|
1388
|
+
` + ` Triggers: insert_row / insert_column / delete_row / delete_column / merge_cells / unmerge_cells. (NOT set_cell_text or set_cell: those don't disturb borders/shading.)
|
|
1389
|
+
` + ` Recipe: read the current borders/shading/cnf flags via superdoc_get_content({action:"blocks"}) before the change, then re-apply the SAME values after with set_borders + set_shading + set_style_options. The goal is consistency, not a redesign.
|
|
1390
|
+
` + ` Skip on a freshly created table. A new table starts un-styled.
|
|
1391
|
+
` + `
|
|
1392
|
+
` + `B. STYLE-CHANGE REQUEST ("make it look [X]" / "style the whole table") → apply the FULL set with concrete colors.
|
|
1393
|
+
` + ` Touch every axis: borders, shading, text alignment, font color/weight, cnf flags, spacing. A single set_borders call without shading and font tweaks always looks half-finished. That's the #1 cause of "no visual change" complaints.
|
|
1394
|
+
` + ` Color palette: discover the document's palette by reading superdoc_get_content({action:"blocks"}) and reusing the colors on existing tables/headings. When no palette is obvious, default to corporate blue "1F3864" or dark grey "444444" for accents and "F2F2F2" / "E7E6E6" for banding.
|
|
1395
|
+
` + ` Recipe (call ALL of these):
|
|
1396
|
+
` + ` 1. set_borders applyTo:"all" with an explicit color and weight.
|
|
1397
|
+
` + ` 2. set_shading on the header row cells with the accent color. Add banding on alternate body rows if appropriate.
|
|
1398
|
+
` + ` 3. set_style_options { headerRow: true, bandedRows?: true } so cnf regions are recognized.
|
|
1399
|
+
` + ` 4. Cell-text alignment via superdoc_format action:"set_alignment". Center the header, left-align body, right-align numeric columns. Paragraph-level: target the paragraph inside each cell.
|
|
1400
|
+
` + ` 5. Font color + weight via superdoc_format action:"inline". Header gets a contrasting color (white on dark fill, accent on light fill) plus bold:true.
|
|
1401
|
+
` + ` 6. set_options if the user asks for tighter or looser spacing.
|
|
1402
|
+
` + ` Steps 4–5 cross to superdoc_format. Use superdoc_mutations to batch many format.apply steps in one call.
|
|
1403
|
+
` + `
|
|
1404
|
+
` + `AFTER set_cell_text, match the new cell to its siblings:
|
|
1405
|
+
` + `set_cell_text writes plain text with the document's default font/size/color and no weight. Always follow up with one superdoc_format inline call copying fontFamily/fontSize/color/bold from a sibling cell (or any non-empty body paragraph if the table is fresh and has no sibling content). If sibling cells show a bold-prefix pattern like "Label: value", replicate it on the new cell via superdoc_search + superdoc_format inline (or one superdoc_mutations batch with format.apply steps).
|
|
1406
|
+
` + `
|
|
1407
|
+
` + `LIST-TO-TABLE:
|
|
1408
|
+
` + `(1) superdoc_create action:"table" with the desired rows/columns. (2) Populate cells with set_cell_text using rowIndex/columnIndex (one call per cell). (3) DELETE THE WHOLE LIST in one call: superdoc_list({action:"delete", target:{kind:"block", nodeType:"listItem", nodeId:"<any-item-id>"}}). The op walks the contiguous list and removes all items.
|
|
1409
|
+
` + 'Wrong paths for list deletion (all leave bullets/empty paragraphs behind): text.delete, superdoc_edit action:"delete" on text refs, lists.detach, lists.convertToText.',
|
|
1410
|
+
inputExamples: [
|
|
1411
|
+
{ action: "insert_row", nodeId: "<tableNodeId>" },
|
|
1412
|
+
{ action: "insert_column", nodeId: "<tableNodeId>", position: "last" },
|
|
1413
|
+
{
|
|
1414
|
+
action: "merge_cells",
|
|
1415
|
+
nodeId: "<tableNodeId>",
|
|
1416
|
+
start: { rowIndex: 0, columnIndex: 0 },
|
|
1417
|
+
end: { rowIndex: 1, columnIndex: 1 }
|
|
1418
|
+
},
|
|
1419
|
+
{ action: "set_cell_text", nodeId: "<tableNodeId>", rowIndex: 0, columnIndex: 0, text: "Q1 Revenue" },
|
|
1420
|
+
{ action: "set_row", nodeId: "<tableNodeId>", rowIndex: 0, heightPt: 24, rule: "atLeast" },
|
|
1421
|
+
{
|
|
1422
|
+
action: "set_borders",
|
|
1423
|
+
nodeId: "<tableNodeId>",
|
|
1424
|
+
mode: "applyTo",
|
|
1425
|
+
applyTo: "all",
|
|
1426
|
+
border: { lineStyle: "single", lineWeightPt: 1, color: "#000000" }
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
action: "set_shading",
|
|
1430
|
+
target: { kind: "block", nodeType: "tableCell", nodeId: "<cellNodeId>" },
|
|
1431
|
+
color: "#E3F2FD"
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
action: "set_style_options",
|
|
1435
|
+
nodeId: "<tableNodeId>",
|
|
1436
|
+
styleOptions: { headerRow: true, bandedRows: true }
|
|
1437
|
+
}
|
|
1438
|
+
]
|
|
1439
|
+
},
|
|
1366
1440
|
list: {
|
|
1367
1441
|
toolName: "superdoc_list",
|
|
1368
1442
|
description: "Create and manipulate bullet and numbered lists. " + 'Most actions require a list-item target: {kind:"block", nodeType:"listItem", nodeId:"<id>"}. ' + 'Exceptions: "create" and "attach" operate on paragraph targets (they turn paragraphs into list items). ' + `Find nodeIds via superdoc_get_content({action:"blocks"}): pick listItem blocks for most actions, paragraph blocks for create/attach.
|
|
@@ -2664,6 +2738,23 @@ More content with **bold** and *italic*.`
|
|
|
2664
2738
|
intentGroup: "list",
|
|
2665
2739
|
intentAction: "detach"
|
|
2666
2740
|
},
|
|
2741
|
+
"lists.delete": {
|
|
2742
|
+
memberPath: "lists.delete",
|
|
2743
|
+
description: "Delete the entire list that contains the targeted list item. Removes ALL items in the same numbered sequence (the contiguous run of list items sharing the target's numbering) AND their text content from the document. " + "Pass any single list item from the list as `target`; the op walks adjacent siblings to find the full list. " + 'Use this for "remove the list" / "delete this list" intents and for the cleanup step of a list-to-table conversion.',
|
|
2744
|
+
expectedResult: "Returns a ListsDeleteResult with `deletedCount` (number of items removed). Reports failure (INVALID_TARGET) if the target is not a list item.",
|
|
2745
|
+
requiresDocumentContext: true,
|
|
2746
|
+
metadata: mutationOperation({
|
|
2747
|
+
idempotency: "conditional",
|
|
2748
|
+
supportsDryRun: true,
|
|
2749
|
+
supportsTrackedMode: false,
|
|
2750
|
+
possibleFailureCodes: ["INVALID_TARGET"],
|
|
2751
|
+
throws: [...T_NOT_FOUND_CAPABLE, "INVALID_TARGET"]
|
|
2752
|
+
}),
|
|
2753
|
+
referenceDocPath: "lists/delete.mdx",
|
|
2754
|
+
referenceGroup: "lists",
|
|
2755
|
+
intentGroup: "list",
|
|
2756
|
+
intentAction: "delete"
|
|
2757
|
+
},
|
|
2667
2758
|
"lists.indent": {
|
|
2668
2759
|
memberPath: "lists.indent",
|
|
2669
2760
|
description: "Increase the indentation level of a list item.",
|
|
@@ -3422,7 +3513,9 @@ More content with **bold** and *italic*.`
|
|
|
3422
3513
|
throws: [...T_NOT_FOUND_COMMAND, "INVALID_TARGET"]
|
|
3423
3514
|
}),
|
|
3424
3515
|
referenceDocPath: "tables/delete.mdx",
|
|
3425
|
-
referenceGroup: "tables"
|
|
3516
|
+
referenceGroup: "tables",
|
|
3517
|
+
intentGroup: "table",
|
|
3518
|
+
intentAction: "delete"
|
|
3426
3519
|
},
|
|
3427
3520
|
"tables.clearContents": {
|
|
3428
3521
|
memberPath: "tables.clearContents",
|
|
@@ -3497,11 +3590,13 @@ More content with **bold** and *italic*.`
|
|
|
3497
3590
|
throws: T_NOT_FOUND_COMMAND
|
|
3498
3591
|
}),
|
|
3499
3592
|
referenceDocPath: "tables/set-layout.mdx",
|
|
3500
|
-
referenceGroup: "tables"
|
|
3593
|
+
referenceGroup: "tables",
|
|
3594
|
+
intentGroup: "table",
|
|
3595
|
+
intentAction: "set_layout"
|
|
3501
3596
|
},
|
|
3502
3597
|
"tables.insertRow": {
|
|
3503
3598
|
memberPath: "tables.insertRow",
|
|
3504
|
-
description: "Insert a new row into the target table.",
|
|
3599
|
+
description: "Insert a new row into the target table. The new row is cloned from an adjacent row, so it inherits the existing cell shading, borders, alignment, and padding. No follow-up styling call is needed unless the new row should look different from the rest of the table.",
|
|
3505
3600
|
expectedResult: "Returns a TableMutationResult receipt confirming a row was inserted.",
|
|
3506
3601
|
requiresDocumentContext: true,
|
|
3507
3602
|
metadata: mutationOperation({
|
|
@@ -3512,7 +3607,9 @@ More content with **bold** and *italic*.`
|
|
|
3512
3607
|
throws: [...T_NOT_FOUND_COMMAND, "INVALID_TARGET"]
|
|
3513
3608
|
}),
|
|
3514
3609
|
referenceDocPath: "tables/insert-row.mdx",
|
|
3515
|
-
referenceGroup: "tables"
|
|
3610
|
+
referenceGroup: "tables",
|
|
3611
|
+
intentGroup: "table",
|
|
3612
|
+
intentAction: "insert_row"
|
|
3516
3613
|
},
|
|
3517
3614
|
"tables.deleteRow": {
|
|
3518
3615
|
memberPath: "tables.deleteRow",
|
|
@@ -3527,7 +3624,9 @@ More content with **bold** and *italic*.`
|
|
|
3527
3624
|
throws: [...T_NOT_FOUND_COMMAND, "INVALID_TARGET"]
|
|
3528
3625
|
}),
|
|
3529
3626
|
referenceDocPath: "tables/delete-row.mdx",
|
|
3530
|
-
referenceGroup: "tables"
|
|
3627
|
+
referenceGroup: "tables",
|
|
3628
|
+
intentGroup: "table",
|
|
3629
|
+
intentAction: "delete_row"
|
|
3531
3630
|
},
|
|
3532
3631
|
"tables.setRowHeight": {
|
|
3533
3632
|
memberPath: "tables.setRowHeight",
|
|
@@ -3542,7 +3641,9 @@ More content with **bold** and *italic*.`
|
|
|
3542
3641
|
throws: T_NOT_FOUND_COMMAND
|
|
3543
3642
|
}),
|
|
3544
3643
|
referenceDocPath: "tables/set-row-height.mdx",
|
|
3545
|
-
referenceGroup: "tables"
|
|
3644
|
+
referenceGroup: "tables",
|
|
3645
|
+
intentGroup: "table",
|
|
3646
|
+
intentAction: "set_row"
|
|
3546
3647
|
},
|
|
3547
3648
|
"tables.distributeRows": {
|
|
3548
3649
|
memberPath: "tables.distributeRows",
|
|
@@ -3572,11 +3673,13 @@ More content with **bold** and *italic*.`
|
|
|
3572
3673
|
throws: T_NOT_FOUND_COMMAND
|
|
3573
3674
|
}),
|
|
3574
3675
|
referenceDocPath: "tables/set-row-options.mdx",
|
|
3575
|
-
referenceGroup: "tables"
|
|
3676
|
+
referenceGroup: "tables",
|
|
3677
|
+
intentGroup: "table",
|
|
3678
|
+
intentAction: "set_row_options"
|
|
3576
3679
|
},
|
|
3577
3680
|
"tables.insertColumn": {
|
|
3578
3681
|
memberPath: "tables.insertColumn",
|
|
3579
|
-
description: "Insert a new column into the target table.",
|
|
3682
|
+
description: "Insert a new column into the target table. The new column is cloned from an adjacent column, so it inherits the existing cell shading, borders, alignment, and width. No follow-up styling call is needed unless the new column should look different from the rest of the table.",
|
|
3580
3683
|
expectedResult: "Returns a TableMutationResult receipt confirming a column was inserted.",
|
|
3581
3684
|
requiresDocumentContext: true,
|
|
3582
3685
|
metadata: mutationOperation({
|
|
@@ -3587,7 +3690,9 @@ More content with **bold** and *italic*.`
|
|
|
3587
3690
|
throws: [...T_NOT_FOUND_COMMAND, "INVALID_TARGET"]
|
|
3588
3691
|
}),
|
|
3589
3692
|
referenceDocPath: "tables/insert-column.mdx",
|
|
3590
|
-
referenceGroup: "tables"
|
|
3693
|
+
referenceGroup: "tables",
|
|
3694
|
+
intentGroup: "table",
|
|
3695
|
+
intentAction: "insert_column"
|
|
3591
3696
|
},
|
|
3592
3697
|
"tables.deleteColumn": {
|
|
3593
3698
|
memberPath: "tables.deleteColumn",
|
|
@@ -3602,7 +3707,9 @@ More content with **bold** and *italic*.`
|
|
|
3602
3707
|
throws: [...T_NOT_FOUND_COMMAND, "INVALID_TARGET"]
|
|
3603
3708
|
}),
|
|
3604
3709
|
referenceDocPath: "tables/delete-column.mdx",
|
|
3605
|
-
referenceGroup: "tables"
|
|
3710
|
+
referenceGroup: "tables",
|
|
3711
|
+
intentGroup: "table",
|
|
3712
|
+
intentAction: "delete_column"
|
|
3606
3713
|
},
|
|
3607
3714
|
"tables.setColumnWidth": {
|
|
3608
3715
|
memberPath: "tables.setColumnWidth",
|
|
@@ -3617,7 +3724,9 @@ More content with **bold** and *italic*.`
|
|
|
3617
3724
|
throws: T_NOT_FOUND_COMMAND
|
|
3618
3725
|
}),
|
|
3619
3726
|
referenceDocPath: "tables/set-column-width.mdx",
|
|
3620
|
-
referenceGroup: "tables"
|
|
3727
|
+
referenceGroup: "tables",
|
|
3728
|
+
intentGroup: "table",
|
|
3729
|
+
intentAction: "set_column"
|
|
3621
3730
|
},
|
|
3622
3731
|
"tables.distributeColumns": {
|
|
3623
3732
|
memberPath: "tables.distributeColumns",
|
|
@@ -3677,7 +3786,9 @@ More content with **bold** and *italic*.`
|
|
|
3677
3786
|
throws: T_NOT_FOUND_COMMAND
|
|
3678
3787
|
}),
|
|
3679
3788
|
referenceDocPath: "tables/merge-cells.mdx",
|
|
3680
|
-
referenceGroup: "tables"
|
|
3789
|
+
referenceGroup: "tables",
|
|
3790
|
+
intentGroup: "table",
|
|
3791
|
+
intentAction: "merge_cells"
|
|
3681
3792
|
},
|
|
3682
3793
|
"tables.unmergeCells": {
|
|
3683
3794
|
memberPath: "tables.unmergeCells",
|
|
@@ -3692,7 +3803,9 @@ More content with **bold** and *italic*.`
|
|
|
3692
3803
|
throws: T_NOT_FOUND_COMMAND
|
|
3693
3804
|
}),
|
|
3694
3805
|
referenceDocPath: "tables/unmerge-cells.mdx",
|
|
3695
|
-
referenceGroup: "tables"
|
|
3806
|
+
referenceGroup: "tables",
|
|
3807
|
+
intentGroup: "table",
|
|
3808
|
+
intentAction: "unmerge_cells"
|
|
3696
3809
|
},
|
|
3697
3810
|
"tables.splitCell": {
|
|
3698
3811
|
memberPath: "tables.splitCell",
|
|
@@ -3711,7 +3824,7 @@ More content with **bold** and *italic*.`
|
|
|
3711
3824
|
},
|
|
3712
3825
|
"tables.setCellProperties": {
|
|
3713
3826
|
memberPath: "tables.setCellProperties",
|
|
3714
|
-
description: "Set properties on a table cell
|
|
3827
|
+
description: "Set non-text properties on a single table cell: vertical alignment, text wrapping, fit-text, or preferred width. " + "Requires a cell-level target (a tableCell block address with kind, nodeType, nodeId). Does NOT accept a table target with rowIndex/columnIndex. " + 'To set the text content of a cell, use action "set_cell_text" instead.',
|
|
3715
3828
|
expectedResult: "Returns a TableMutationResult receipt; reports NO_OP if cell properties already match.",
|
|
3716
3829
|
requiresDocumentContext: true,
|
|
3717
3830
|
metadata: mutationOperation({
|
|
@@ -3722,7 +3835,26 @@ More content with **bold** and *italic*.`
|
|
|
3722
3835
|
throws: T_NOT_FOUND_COMMAND
|
|
3723
3836
|
}),
|
|
3724
3837
|
referenceDocPath: "tables/set-cell-properties.mdx",
|
|
3725
|
-
referenceGroup: "tables"
|
|
3838
|
+
referenceGroup: "tables",
|
|
3839
|
+
intentGroup: "table",
|
|
3840
|
+
intentAction: "set_cell"
|
|
3841
|
+
},
|
|
3842
|
+
"tables.setCellText": {
|
|
3843
|
+
memberPath: "tables.setCellText",
|
|
3844
|
+
description: "Replace the text content of a single table cell with plain text (one paragraph). " + "Accepts either a direct cell locator (a tableCell block address with kind, nodeType, nodeId) OR a table target with rowIndex + columnIndex. " + "Cell properties (vertical alignment, shading, borders, colspan/rowspan) are preserved. " + "Use this for filling cells with values, replacing cell text, or populating empty tables. Much simpler than walking paragraphs and runs through superdoc_edit.",
|
|
3845
|
+
expectedResult: "Returns a TableMutationResult receipt; reports NO_OP if the cell already contains exactly this text.",
|
|
3846
|
+
requiresDocumentContext: true,
|
|
3847
|
+
metadata: mutationOperation({
|
|
3848
|
+
idempotency: "idempotent",
|
|
3849
|
+
supportsDryRun: true,
|
|
3850
|
+
supportsTrackedMode: false,
|
|
3851
|
+
possibleFailureCodes: ["INVALID_TARGET", "NO_OP"],
|
|
3852
|
+
throws: T_NOT_FOUND_COMMAND
|
|
3853
|
+
}),
|
|
3854
|
+
referenceDocPath: "tables/set-cell-text.mdx",
|
|
3855
|
+
referenceGroup: "tables",
|
|
3856
|
+
intentGroup: "table",
|
|
3857
|
+
intentAction: "set_cell_text"
|
|
3726
3858
|
},
|
|
3727
3859
|
"tables.sort": {
|
|
3728
3860
|
memberPath: "tables.sort",
|
|
@@ -3857,7 +3989,9 @@ More content with **bold** and *italic*.`
|
|
|
3857
3989
|
throws: T_NOT_FOUND_COMMAND
|
|
3858
3990
|
}),
|
|
3859
3991
|
referenceDocPath: "tables/set-shading.mdx",
|
|
3860
|
-
referenceGroup: "tables"
|
|
3992
|
+
referenceGroup: "tables",
|
|
3993
|
+
intentGroup: "table",
|
|
3994
|
+
intentAction: "set_shading"
|
|
3861
3995
|
},
|
|
3862
3996
|
"tables.clearShading": {
|
|
3863
3997
|
memberPath: "tables.clearShading",
|
|
@@ -3936,7 +4070,7 @@ More content with **bold** and *italic*.`
|
|
|
3936
4070
|
},
|
|
3937
4071
|
"tables.applyStyle": {
|
|
3938
4072
|
memberPath: "tables.applyStyle",
|
|
3939
|
-
description: "
|
|
4073
|
+
description: "Toggle conditional-format flags (header row, banded rows/columns, first/last column, last row) on a table. " + "Pass `styleOptions` with the flags you want to set or clear (omitted flags stay unchanged). " + 'For "format the first row as a header" use `styleOptions: { headerRow: true }`. ' + "Optional `styleId` applies a named table style. Leave it unset unless you have a styleId from `superdoc_get_content` (no need to invent one).",
|
|
3940
4074
|
expectedResult: "Returns a TableMutationResult receipt; reports NO_OP if the style and all provided options already match.",
|
|
3941
4075
|
requiresDocumentContext: true,
|
|
3942
4076
|
metadata: mutationOperation({
|
|
@@ -3947,7 +4081,9 @@ More content with **bold** and *italic*.`
|
|
|
3947
4081
|
throws: T_NOT_FOUND_COMMAND
|
|
3948
4082
|
}),
|
|
3949
4083
|
referenceDocPath: "tables/apply-style.mdx",
|
|
3950
|
-
referenceGroup: "tables"
|
|
4084
|
+
referenceGroup: "tables",
|
|
4085
|
+
intentGroup: "table",
|
|
4086
|
+
intentAction: "set_style_options"
|
|
3951
4087
|
},
|
|
3952
4088
|
"tables.setBorders": {
|
|
3953
4089
|
memberPath: "tables.setBorders",
|
|
@@ -3962,7 +4098,9 @@ More content with **bold** and *italic*.`
|
|
|
3962
4098
|
throws: T_NOT_FOUND_COMMAND
|
|
3963
4099
|
}),
|
|
3964
4100
|
referenceDocPath: "tables/set-borders.mdx",
|
|
3965
|
-
referenceGroup: "tables"
|
|
4101
|
+
referenceGroup: "tables",
|
|
4102
|
+
intentGroup: "table",
|
|
4103
|
+
intentAction: "set_borders"
|
|
3966
4104
|
},
|
|
3967
4105
|
"tables.setTableOptions": {
|
|
3968
4106
|
memberPath: "tables.setTableOptions",
|
|
@@ -3977,6 +4115,23 @@ More content with **bold** and *italic*.`
|
|
|
3977
4115
|
throws: T_NOT_FOUND_COMMAND
|
|
3978
4116
|
}),
|
|
3979
4117
|
referenceDocPath: "tables/set-table-options.mdx",
|
|
4118
|
+
referenceGroup: "tables",
|
|
4119
|
+
intentGroup: "table",
|
|
4120
|
+
intentAction: "set_options"
|
|
4121
|
+
},
|
|
4122
|
+
"tables.applyPreset": {
|
|
4123
|
+
memberPath: "tables.applyPreset",
|
|
4124
|
+
description: 'Apply a named visual preset to a table. Presets: "grid" (1pt black borders all around), "minimal" (no outer borders, hairline grey row separators + thicker bottom), "striped" (banded rows on, 0.5pt grey borders), "accent" (filled header row + thick accent top/bottom; defaults to dark blue, override with `accentColor`). ' + "Composes set_borders + set_style_options + header-row shading in one call. Available via the document API and `superdoc_mutations` (intentionally NOT exposed as a top-level action on `superdoc_table`. Agents should compose explicit set_borders / set_shading / set_style_options calls so they always pick concrete colors that match the document context).",
|
|
4125
|
+
expectedResult: "Returns a TableMutationResult receipt.",
|
|
4126
|
+
requiresDocumentContext: true,
|
|
4127
|
+
metadata: mutationOperation({
|
|
4128
|
+
idempotency: "idempotent",
|
|
4129
|
+
supportsDryRun: true,
|
|
4130
|
+
supportsTrackedMode: false,
|
|
4131
|
+
possibleFailureCodes: ["INVALID_TARGET"],
|
|
4132
|
+
throws: T_NOT_FOUND_COMMAND
|
|
4133
|
+
}),
|
|
4134
|
+
referenceDocPath: "tables/apply-preset.mdx",
|
|
3980
4135
|
referenceGroup: "tables"
|
|
3981
4136
|
},
|
|
3982
4137
|
"tables.get": {
|
|
@@ -6675,6 +6830,12 @@ var init_command_catalog = __esm(() => {
|
|
|
6675
6830
|
OPERATION_EXPECTED_RESULT_MAP = projectFromDefinitions((_id, entry) => entry.expectedResult);
|
|
6676
6831
|
});
|
|
6677
6832
|
|
|
6833
|
+
// ../../packages/document-api/src/tables/color-formats.ts
|
|
6834
|
+
var TABLE_COLOR_PATTERN_SOURCE = "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$", TABLE_COLOR_PATTERN;
|
|
6835
|
+
var init_color_formats = __esm(() => {
|
|
6836
|
+
TABLE_COLOR_PATTERN = new RegExp(TABLE_COLOR_PATTERN_SOURCE, "u");
|
|
6837
|
+
});
|
|
6838
|
+
|
|
6678
6839
|
// ../../packages/document-api/src/write/write.ts
|
|
6679
6840
|
function normalizeMutationOptions(options) {
|
|
6680
6841
|
return {
|
|
@@ -8401,13 +8562,14 @@ function buildInternalContractSchemas() {
|
|
|
8401
8562
|
operations
|
|
8402
8563
|
};
|
|
8403
8564
|
}
|
|
8404
|
-
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, storyLocatorSchema, 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, documentStyleInfoSchema, documentStylesSchema, documentDefaultsSchema, 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, trackChangeWordRevisionIdsSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern
|
|
8565
|
+
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, storyLocatorSchema, 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, documentStyleInfoSchema, documentStylesSchema, documentDefaultsSchema, 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, trackChangeWordRevisionIdsSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern, tableBorderSpecSchema, nullableTableBorderSpecSchema, 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, refListQueryProperties, 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;
|
|
8405
8566
|
var init_schemas = __esm(() => {
|
|
8406
8567
|
init_command_catalog();
|
|
8407
8568
|
init_types2();
|
|
8408
8569
|
init_base();
|
|
8409
8570
|
init_address();
|
|
8410
8571
|
init_inline_run_patch();
|
|
8572
|
+
init_color_formats();
|
|
8411
8573
|
init_style_policy_types();
|
|
8412
8574
|
init_paragraphs();
|
|
8413
8575
|
init_styles();
|
|
@@ -9211,6 +9373,7 @@ var init_schemas = __esm(() => {
|
|
|
9211
9373
|
planEngine: planEngineCapabilitiesSchema
|
|
9212
9374
|
}, ["global", "format", "operations", "planEngine"]);
|
|
9213
9375
|
strictEmptyObjectSchema = objectSchema({});
|
|
9376
|
+
tableBorderColorPattern = TABLE_COLOR_PATTERN_SOURCE;
|
|
9214
9377
|
tableBorderSpecSchema = objectSchema({
|
|
9215
9378
|
lineStyle: { type: "string" },
|
|
9216
9379
|
lineWeightPt: { type: "number", exclusiveMinimum: 0 },
|
|
@@ -10749,6 +10912,25 @@ var init_schemas = __esm(() => {
|
|
|
10749
10912
|
success: objectSchema({ success: { const: true }, paragraph: ref("ParagraphAddress") }, ["success", "paragraph"]),
|
|
10750
10913
|
failure: listsFailureSchemaFor("lists.detach")
|
|
10751
10914
|
},
|
|
10915
|
+
"lists.delete": {
|
|
10916
|
+
input: objectSchema({
|
|
10917
|
+
target: listItemAddressSchema
|
|
10918
|
+
}, ["target"]),
|
|
10919
|
+
output: {
|
|
10920
|
+
oneOf: [
|
|
10921
|
+
objectSchema({ success: { const: true }, deletedCount: { type: "integer", minimum: 0 } }, [
|
|
10922
|
+
"success",
|
|
10923
|
+
"deletedCount"
|
|
10924
|
+
]),
|
|
10925
|
+
listsFailureSchemaFor("lists.delete")
|
|
10926
|
+
]
|
|
10927
|
+
},
|
|
10928
|
+
success: objectSchema({ success: { const: true }, deletedCount: { type: "integer", minimum: 0 } }, [
|
|
10929
|
+
"success",
|
|
10930
|
+
"deletedCount"
|
|
10931
|
+
]),
|
|
10932
|
+
failure: listsFailureSchemaFor("lists.delete")
|
|
10933
|
+
},
|
|
10752
10934
|
"lists.indent": {
|
|
10753
10935
|
input: objectSchema({
|
|
10754
10936
|
target: listItemAddressSchema
|
|
@@ -11708,10 +11890,36 @@ var init_schemas = __esm(() => {
|
|
|
11708
11890
|
failure: tableMutationFailureSchema
|
|
11709
11891
|
},
|
|
11710
11892
|
"tables.insertRow": {
|
|
11711
|
-
input:
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
|
|
11893
|
+
input: {
|
|
11894
|
+
oneOf: [
|
|
11895
|
+
objectSchema({
|
|
11896
|
+
target: tableRowAddressSchema,
|
|
11897
|
+
position: { enum: ["above", "below"] },
|
|
11898
|
+
count: { type: "integer", minimum: 1 }
|
|
11899
|
+
}, ["target", "position"]),
|
|
11900
|
+
objectSchema({
|
|
11901
|
+
target: tableAddressSchema,
|
|
11902
|
+
rowIndex: { type: "integer", minimum: 0 },
|
|
11903
|
+
position: { enum: ["above", "below"] },
|
|
11904
|
+
count: { type: "integer", minimum: 1 }
|
|
11905
|
+
}, ["target", "rowIndex", "position"]),
|
|
11906
|
+
objectSchema({
|
|
11907
|
+
nodeId: { type: "string" },
|
|
11908
|
+
rowIndex: { type: "integer", minimum: 0 },
|
|
11909
|
+
position: { enum: ["above", "below"] },
|
|
11910
|
+
count: { type: "integer", minimum: 1 }
|
|
11911
|
+
}, ["nodeId", "rowIndex", "position"]),
|
|
11912
|
+
{
|
|
11913
|
+
...objectSchema({
|
|
11914
|
+
target: tableAddressSchema,
|
|
11915
|
+
nodeId: { type: "string" },
|
|
11916
|
+
count: { type: "integer", minimum: 1 }
|
|
11917
|
+
}, []),
|
|
11918
|
+
oneOf: [{ required: ["target"] }, { required: ["nodeId"] }],
|
|
11919
|
+
not: { anyOf: [{ required: ["rowIndex"] }, { required: ["position"] }] }
|
|
11920
|
+
}
|
|
11921
|
+
]
|
|
11922
|
+
},
|
|
11715
11923
|
output: tableMutationResultSchema,
|
|
11716
11924
|
success: tableMutationSuccessSchema,
|
|
11717
11925
|
failure: tableMutationFailureSchema
|
|
@@ -11752,9 +11960,9 @@ var init_schemas = __esm(() => {
|
|
|
11752
11960
|
target: tableAddressSchema,
|
|
11753
11961
|
nodeId: { type: "string" },
|
|
11754
11962
|
columnIndex: { type: "integer", minimum: 0 },
|
|
11755
|
-
position: { enum: ["left", "right"] },
|
|
11963
|
+
position: { enum: ["left", "right", "first", "last"] },
|
|
11756
11964
|
count: { type: "integer", minimum: 1 }
|
|
11757
|
-
}, ["
|
|
11965
|
+
}, ["position"]),
|
|
11758
11966
|
oneOf: [{ required: ["target"] }, { required: ["nodeId"] }]
|
|
11759
11967
|
},
|
|
11760
11968
|
output: tableMutationResultSchema,
|
|
@@ -11872,6 +12080,35 @@ var init_schemas = __esm(() => {
|
|
|
11872
12080
|
success: tableMutationSuccessSchema,
|
|
11873
12081
|
failure: tableMutationFailureSchema
|
|
11874
12082
|
},
|
|
12083
|
+
"tables.setCellText": {
|
|
12084
|
+
input: {
|
|
12085
|
+
oneOf: [
|
|
12086
|
+
objectSchema({
|
|
12087
|
+
target: tableCellAddressSchema,
|
|
12088
|
+
text: { type: "string" }
|
|
12089
|
+
}, ["target", "text"]),
|
|
12090
|
+
objectSchema({
|
|
12091
|
+
nodeId: { type: "string" },
|
|
12092
|
+
text: { type: "string" }
|
|
12093
|
+
}, ["nodeId", "text"]),
|
|
12094
|
+
objectSchema({
|
|
12095
|
+
target: tableAddressSchema,
|
|
12096
|
+
rowIndex: { type: "integer", minimum: 0 },
|
|
12097
|
+
columnIndex: { type: "integer", minimum: 0 },
|
|
12098
|
+
text: { type: "string" }
|
|
12099
|
+
}, ["target", "rowIndex", "columnIndex", "text"]),
|
|
12100
|
+
objectSchema({
|
|
12101
|
+
nodeId: { type: "string" },
|
|
12102
|
+
rowIndex: { type: "integer", minimum: 0 },
|
|
12103
|
+
columnIndex: { type: "integer", minimum: 0 },
|
|
12104
|
+
text: { type: "string" }
|
|
12105
|
+
}, ["nodeId", "rowIndex", "columnIndex", "text"])
|
|
12106
|
+
]
|
|
12107
|
+
},
|
|
12108
|
+
output: tableMutationResultSchema,
|
|
12109
|
+
success: tableMutationSuccessSchema,
|
|
12110
|
+
failure: tableMutationFailureSchema
|
|
12111
|
+
},
|
|
11875
12112
|
"tables.sort": {
|
|
11876
12113
|
input: {
|
|
11877
12114
|
...objectSchema({
|
|
@@ -11946,7 +12183,7 @@ var init_schemas = __esm(() => {
|
|
|
11946
12183
|
edge: { enum: ["top", "bottom", "left", "right", "insideH", "insideV", "diagonalDown", "diagonalUp"] },
|
|
11947
12184
|
lineStyle: { type: "string" },
|
|
11948
12185
|
lineWeightPt: { type: "number", exclusiveMinimum: 0 },
|
|
11949
|
-
color: { type: "string", pattern:
|
|
12186
|
+
color: { type: "string", pattern: tableBorderColorPattern }
|
|
11950
12187
|
}, ["edge", "lineStyle", "lineWeightPt", "color"]),
|
|
11951
12188
|
oneOf: [{ required: ["target"] }, { required: ["nodeId"] }]
|
|
11952
12189
|
},
|
|
@@ -11985,7 +12222,9 @@ var init_schemas = __esm(() => {
|
|
|
11985
12222
|
...objectSchema({
|
|
11986
12223
|
target: tableOrCellAddressSchema,
|
|
11987
12224
|
nodeId: { type: "string" },
|
|
11988
|
-
color: {
|
|
12225
|
+
color: {
|
|
12226
|
+
oneOf: [{ type: "string", pattern: tableBorderColorPattern }, { type: "null" }]
|
|
12227
|
+
}
|
|
11989
12228
|
}, ["color"]),
|
|
11990
12229
|
oneOf: [{ required: ["target"] }, { required: ["nodeId"] }]
|
|
11991
12230
|
},
|
|
@@ -12128,6 +12367,20 @@ var init_schemas = __esm(() => {
|
|
|
12128
12367
|
success: tableMutationSuccessSchema,
|
|
12129
12368
|
failure: tableMutationFailureSchema
|
|
12130
12369
|
},
|
|
12370
|
+
"tables.applyPreset": {
|
|
12371
|
+
input: {
|
|
12372
|
+
...objectSchema({
|
|
12373
|
+
target: tableAddressSchema,
|
|
12374
|
+
nodeId: { type: "string" },
|
|
12375
|
+
preset: { enum: ["grid", "minimal", "striped", "accent"] },
|
|
12376
|
+
accentColor: { type: "string", pattern: tableBorderColorPattern }
|
|
12377
|
+
}, ["preset"]),
|
|
12378
|
+
oneOf: [{ required: ["target"] }, { required: ["nodeId"] }]
|
|
12379
|
+
},
|
|
12380
|
+
output: tableMutationResultSchema,
|
|
12381
|
+
success: tableMutationSuccessSchema,
|
|
12382
|
+
failure: tableMutationFailureSchema
|
|
12383
|
+
},
|
|
12131
12384
|
"tables.get": {
|
|
12132
12385
|
input: tableLocatorSchema,
|
|
12133
12386
|
output: objectSchema({
|
|
@@ -15190,6 +15443,10 @@ function executeListsDetach(adapter, input, options) {
|
|
|
15190
15443
|
validateListItemTarget(input, "lists.detach");
|
|
15191
15444
|
return adapter.detach(input, normalizeMutationOptions(options));
|
|
15192
15445
|
}
|
|
15446
|
+
function executeListsDelete(adapter, input, options) {
|
|
15447
|
+
validateListItemTarget(input, "lists.delete");
|
|
15448
|
+
return adapter.delete(input, normalizeMutationOptions(options));
|
|
15449
|
+
}
|
|
15193
15450
|
function executeListsJoin(adapter, input, options) {
|
|
15194
15451
|
validateListItemTarget(input, "lists.join");
|
|
15195
15452
|
requireEnum(input.direction, "direction", VALID_JOIN_DIRECTIONS, "lists.join");
|
|
@@ -15934,6 +16191,7 @@ function buildDispatchTable(api) {
|
|
|
15934
16191
|
"lists.create": (input, options) => api.lists.create(input, options),
|
|
15935
16192
|
"lists.attach": (input, options) => api.lists.attach(input, options),
|
|
15936
16193
|
"lists.detach": (input, options) => api.lists.detach(input, options),
|
|
16194
|
+
"lists.delete": (input, options) => api.lists.delete(input, options),
|
|
15937
16195
|
"lists.indent": (input, options) => api.lists.indent(input, options),
|
|
15938
16196
|
"lists.outdent": (input, options) => api.lists.outdent(input, options),
|
|
15939
16197
|
"lists.join": (input, options) => api.lists.join(input, options),
|
|
@@ -16024,6 +16282,7 @@ function buildDispatchTable(api) {
|
|
|
16024
16282
|
"tables.unmergeCells": (input, options) => api.tables.unmergeCells(input, options),
|
|
16025
16283
|
"tables.splitCell": (input, options) => api.tables.splitCell(input, options),
|
|
16026
16284
|
"tables.setCellProperties": (input, options) => api.tables.setCellProperties(input, options),
|
|
16285
|
+
"tables.setCellText": (input, options) => api.tables.setCellText(input, options),
|
|
16027
16286
|
"tables.sort": (input, options) => api.tables.sort(input, options),
|
|
16028
16287
|
"tables.setAltText": (input, options) => api.tables.setAltText(input, options),
|
|
16029
16288
|
"tables.setStyle": (input, options) => api.tables.setStyle(input, options),
|
|
@@ -16041,6 +16300,7 @@ function buildDispatchTable(api) {
|
|
|
16041
16300
|
"tables.applyStyle": (input, options) => api.tables.applyStyle(input, options),
|
|
16042
16301
|
"tables.setBorders": (input, options) => api.tables.setBorders(input, options),
|
|
16043
16302
|
"tables.setTableOptions": (input, options) => api.tables.setTableOptions(input, options),
|
|
16303
|
+
"tables.applyPreset": (input, options) => api.tables.applyPreset(input, options),
|
|
16044
16304
|
"tables.get": (input) => api.tables.get(input),
|
|
16045
16305
|
"tables.getCells": (input) => api.tables.getCells(input),
|
|
16046
16306
|
"tables.getProperties": (input) => api.tables.getProperties(input),
|
|
@@ -16336,20 +16596,23 @@ function validateTableLocator(input, operationName) {
|
|
|
16336
16596
|
});
|
|
16337
16597
|
}
|
|
16338
16598
|
}
|
|
16339
|
-
function validateRowLocator(input, operationName) {
|
|
16599
|
+
function validateRowLocator(input, operationName, options = {}) {
|
|
16340
16600
|
validateTableLocator(input, operationName);
|
|
16601
|
+
const hasPosition = input.position != null;
|
|
16602
|
+
const hasRowIndex = input.rowIndex != null;
|
|
16603
|
+
const isAppendShorthand = !!options.allowAppendShorthand && !hasRowIndex && !hasPosition;
|
|
16341
16604
|
if (input.nodeId != null) {
|
|
16342
|
-
if (
|
|
16605
|
+
if (!hasRowIndex && !isAppendShorthand) {
|
|
16343
16606
|
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName}: rowIndex is required when using nodeId for row operations. ` + `Use target to address a row directly, or pass nodeId + rowIndex to address a row within a table.`);
|
|
16344
16607
|
}
|
|
16345
16608
|
return;
|
|
16346
16609
|
}
|
|
16347
16610
|
if (!isObjectRecord2(input.target) || input.target.kind !== "block")
|
|
16348
16611
|
return;
|
|
16349
|
-
if (input.target.nodeType === "table" &&
|
|
16612
|
+
if (input.target.nodeType === "table" && !hasRowIndex && !isAppendShorthand) {
|
|
16350
16613
|
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName}: rowIndex is required when target is a table.`);
|
|
16351
16614
|
}
|
|
16352
|
-
if (input.target.nodeType === "tableRow" &&
|
|
16615
|
+
if (input.target.nodeType === "tableRow" && hasRowIndex) {
|
|
16353
16616
|
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.`);
|
|
16354
16617
|
}
|
|
16355
16618
|
}
|
|
@@ -16387,8 +16650,8 @@ function executeTableLocatorOp(operationName, adapter, input, options) {
|
|
|
16387
16650
|
validateTableLocator(input, operationName);
|
|
16388
16651
|
return adapter(input, normalizeMutationOptions(options));
|
|
16389
16652
|
}
|
|
16390
|
-
function executeRowLocatorOp(operationName, adapter, input, options) {
|
|
16391
|
-
validateRowLocator(input, operationName);
|
|
16653
|
+
function executeRowLocatorOp(operationName, adapter, input, options, rowLocatorOptions) {
|
|
16654
|
+
validateRowLocator(input, operationName, rowLocatorOptions);
|
|
16392
16655
|
return adapter(input, normalizeMutationOptions(options));
|
|
16393
16656
|
}
|
|
16394
16657
|
function executeCellOrTableScopedCellLocatorOp(operationName, adapter, input, options) {
|
|
@@ -16426,7 +16689,7 @@ function validateBorderSpec(spec, fieldPath, operationName) {
|
|
|
16426
16689
|
field: `${fieldPath}.color`
|
|
16427
16690
|
});
|
|
16428
16691
|
}
|
|
16429
|
-
if (!
|
|
16692
|
+
if (!TABLE_COLOR_PATTERN.test(spec.color)) {
|
|
16430
16693
|
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName}: ${fieldPath}.color must be a 6-digit hex color without "#" or "auto".`, {
|
|
16431
16694
|
field: `${fieldPath}.color`
|
|
16432
16695
|
});
|
|
@@ -16532,9 +16795,10 @@ function executeTablesSetTableOptions(operationName, adapter, input, options) {
|
|
|
16532
16795
|
}
|
|
16533
16796
|
return adapter(input, normalizeMutationOptions(options));
|
|
16534
16797
|
}
|
|
16535
|
-
var VALID_STYLE_OPTION_FLAGS,
|
|
16798
|
+
var VALID_STYLE_OPTION_FLAGS, VALID_APPLY_TO_VALUES, VALID_BORDER_EDGE_KEYS;
|
|
16536
16799
|
var init_tables = __esm(() => {
|
|
16537
16800
|
init_errors2();
|
|
16801
|
+
init_color_formats();
|
|
16538
16802
|
VALID_STYLE_OPTION_FLAGS = new Set([
|
|
16539
16803
|
"headerRow",
|
|
16540
16804
|
"lastRow",
|
|
@@ -16544,7 +16808,6 @@ var init_tables = __esm(() => {
|
|
|
16544
16808
|
"bandedRows",
|
|
16545
16809
|
"bandedColumns"
|
|
16546
16810
|
]);
|
|
16547
|
-
TABLE_BORDER_COLOR_PATTERN = /^([0-9A-Fa-f]{6}|auto)$/u;
|
|
16548
16811
|
VALID_APPLY_TO_VALUES = new Set([
|
|
16549
16812
|
"all",
|
|
16550
16813
|
"outside",
|
|
@@ -18895,6 +19158,9 @@ function createDocumentApi(adapters) {
|
|
|
18895
19158
|
detach(input, options) {
|
|
18896
19159
|
return executeListsDetach(adapters.lists, input, options);
|
|
18897
19160
|
},
|
|
19161
|
+
delete(input, options) {
|
|
19162
|
+
return executeListsDelete(adapters.lists, input, options);
|
|
19163
|
+
},
|
|
18898
19164
|
indent(input, options) {
|
|
18899
19165
|
return executeListsIndent(adapters.lists, input, options);
|
|
18900
19166
|
},
|
|
@@ -19072,7 +19338,7 @@ function createDocumentApi(adapters) {
|
|
|
19072
19338
|
return executeTableLocatorOp("tables.setLayout", adapters.tables.setLayout.bind(adapters.tables), input, options);
|
|
19073
19339
|
},
|
|
19074
19340
|
insertRow(input, options) {
|
|
19075
|
-
return executeRowLocatorOp("tables.insertRow", adapters.tables.insertRow.bind(adapters.tables), input, options);
|
|
19341
|
+
return executeRowLocatorOp("tables.insertRow", adapters.tables.insertRow.bind(adapters.tables), input, options, { allowAppendShorthand: true });
|
|
19076
19342
|
},
|
|
19077
19343
|
deleteRow(input, options) {
|
|
19078
19344
|
return executeRowLocatorOp("tables.deleteRow", adapters.tables.deleteRow.bind(adapters.tables), input, options);
|
|
@@ -19116,6 +19382,9 @@ function createDocumentApi(adapters) {
|
|
|
19116
19382
|
setCellProperties(input, options) {
|
|
19117
19383
|
return executeTableLocatorOp("tables.setCellProperties", adapters.tables.setCellProperties.bind(adapters.tables), input, options);
|
|
19118
19384
|
},
|
|
19385
|
+
setCellText(input, options) {
|
|
19386
|
+
return executeCellOrTableScopedCellLocatorOp("tables.setCellText", adapters.tables.setCellText.bind(adapters.tables), input, options);
|
|
19387
|
+
},
|
|
19119
19388
|
sort(input, options) {
|
|
19120
19389
|
return executeTableLocatorOp("tables.sort", adapters.tables.sort.bind(adapters.tables), input, options);
|
|
19121
19390
|
},
|
|
@@ -19167,6 +19436,9 @@ function createDocumentApi(adapters) {
|
|
|
19167
19436
|
setTableOptions(input, options) {
|
|
19168
19437
|
return executeTablesSetTableOptions("tables.setTableOptions", adapters.tables.setTableOptions.bind(adapters.tables), input, options);
|
|
19169
19438
|
},
|
|
19439
|
+
applyPreset(input, options) {
|
|
19440
|
+
return executeTableLocatorOp("tables.applyPreset", adapters.tables.applyPreset.bind(adapters.tables), input, options);
|
|
19441
|
+
},
|
|
19170
19442
|
get(input) {
|
|
19171
19443
|
return adapters.tables.get(input);
|
|
19172
19444
|
},
|
|
@@ -65823,7 +66095,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
65823
66095
|
emptyOptions2 = {};
|
|
65824
66096
|
});
|
|
65825
66097
|
|
|
65826
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
66098
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-C9I74vtg.es.js
|
|
65827
66099
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
65828
66100
|
const fieldValue = extension$1.config[field];
|
|
65829
66101
|
if (typeof fieldValue === "function")
|
|
@@ -69690,6 +69962,10 @@ function executeListsDetach2(adapter, input, options) {
|
|
|
69690
69962
|
validateListItemTarget2(input, "lists.detach");
|
|
69691
69963
|
return adapter.detach(input, normalizeMutationOptions2(options));
|
|
69692
69964
|
}
|
|
69965
|
+
function executeListsDelete2(adapter, input, options) {
|
|
69966
|
+
validateListItemTarget2(input, "lists.delete");
|
|
69967
|
+
return adapter.delete(input, normalizeMutationOptions2(options));
|
|
69968
|
+
}
|
|
69693
69969
|
function executeListsJoin2(adapter, input, options) {
|
|
69694
69970
|
validateListItemTarget2(input, "lists.join");
|
|
69695
69971
|
requireEnum2(input.direction, "direction", VALID_JOIN_DIRECTIONS2, "lists.join");
|
|
@@ -70334,6 +70610,7 @@ function buildDispatchTable2(api) {
|
|
|
70334
70610
|
"lists.create": (input, options) => api.lists.create(input, options),
|
|
70335
70611
|
"lists.attach": (input, options) => api.lists.attach(input, options),
|
|
70336
70612
|
"lists.detach": (input, options) => api.lists.detach(input, options),
|
|
70613
|
+
"lists.delete": (input, options) => api.lists.delete(input, options),
|
|
70337
70614
|
"lists.indent": (input, options) => api.lists.indent(input, options),
|
|
70338
70615
|
"lists.outdent": (input, options) => api.lists.outdent(input, options),
|
|
70339
70616
|
"lists.join": (input, options) => api.lists.join(input, options),
|
|
@@ -70424,6 +70701,7 @@ function buildDispatchTable2(api) {
|
|
|
70424
70701
|
"tables.unmergeCells": (input, options) => api.tables.unmergeCells(input, options),
|
|
70425
70702
|
"tables.splitCell": (input, options) => api.tables.splitCell(input, options),
|
|
70426
70703
|
"tables.setCellProperties": (input, options) => api.tables.setCellProperties(input, options),
|
|
70704
|
+
"tables.setCellText": (input, options) => api.tables.setCellText(input, options),
|
|
70427
70705
|
"tables.sort": (input, options) => api.tables.sort(input, options),
|
|
70428
70706
|
"tables.setAltText": (input, options) => api.tables.setAltText(input, options),
|
|
70429
70707
|
"tables.setStyle": (input, options) => api.tables.setStyle(input, options),
|
|
@@ -70441,6 +70719,7 @@ function buildDispatchTable2(api) {
|
|
|
70441
70719
|
"tables.applyStyle": (input, options) => api.tables.applyStyle(input, options),
|
|
70442
70720
|
"tables.setBorders": (input, options) => api.tables.setBorders(input, options),
|
|
70443
70721
|
"tables.setTableOptions": (input, options) => api.tables.setTableOptions(input, options),
|
|
70722
|
+
"tables.applyPreset": (input, options) => api.tables.applyPreset(input, options),
|
|
70444
70723
|
"tables.get": (input) => api.tables.get(input),
|
|
70445
70724
|
"tables.getCells": (input) => api.tables.getCells(input),
|
|
70446
70725
|
"tables.getProperties": (input) => api.tables.getProperties(input),
|
|
@@ -70704,18 +70983,21 @@ function validateTableLocator2(input, operationName) {
|
|
|
70704
70983
|
value: input.nodeId
|
|
70705
70984
|
});
|
|
70706
70985
|
}
|
|
70707
|
-
function validateRowLocator2(input, operationName) {
|
|
70986
|
+
function validateRowLocator2(input, operationName, options = {}) {
|
|
70708
70987
|
validateTableLocator2(input, operationName);
|
|
70988
|
+
const hasPosition = input.position != null;
|
|
70989
|
+
const hasRowIndex = input.rowIndex != null;
|
|
70990
|
+
const isAppendShorthand = !!options.allowAppendShorthand && !hasRowIndex && !hasPosition;
|
|
70709
70991
|
if (input.nodeId != null) {
|
|
70710
|
-
if (
|
|
70992
|
+
if (!hasRowIndex && !isAppendShorthand)
|
|
70711
70993
|
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}: rowIndex is required when using nodeId for row operations. Use target to address a row directly, or pass nodeId + rowIndex to address a row within a table.`);
|
|
70712
70994
|
return;
|
|
70713
70995
|
}
|
|
70714
70996
|
if (!isObjectRecord3(input.target) || input.target.kind !== "block")
|
|
70715
70997
|
return;
|
|
70716
|
-
if (input.target.nodeType === "table" &&
|
|
70998
|
+
if (input.target.nodeType === "table" && !hasRowIndex && !isAppendShorthand)
|
|
70717
70999
|
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}: rowIndex is required when target is a table.`);
|
|
70718
|
-
if (input.target.nodeType === "tableRow" &&
|
|
71000
|
+
if (input.target.nodeType === "tableRow" && hasRowIndex)
|
|
70719
71001
|
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.`);
|
|
70720
71002
|
}
|
|
70721
71003
|
function hasTableScopedCellCoordinates2(input) {
|
|
@@ -70749,8 +71031,8 @@ function executeTableLocatorOp2(operationName, adapter, input, options) {
|
|
|
70749
71031
|
validateTableLocator2(input, operationName);
|
|
70750
71032
|
return adapter(input, normalizeMutationOptions2(options));
|
|
70751
71033
|
}
|
|
70752
|
-
function executeRowLocatorOp2(operationName, adapter, input, options) {
|
|
70753
|
-
validateRowLocator2(input, operationName);
|
|
71034
|
+
function executeRowLocatorOp2(operationName, adapter, input, options, rowLocatorOptions) {
|
|
71035
|
+
validateRowLocator2(input, operationName, rowLocatorOptions);
|
|
70754
71036
|
return adapter(input, normalizeMutationOptions2(options));
|
|
70755
71037
|
}
|
|
70756
71038
|
function executeCellOrTableScopedCellLocatorOp2(operationName, adapter, input, options) {
|
|
@@ -70781,7 +71063,7 @@ function validateBorderSpec$1(spec, fieldPath, operationName) {
|
|
|
70781
71063
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName}: ${fieldPath}.lineWeightPt must be a positive number.`, { field: `${fieldPath}.lineWeightPt` });
|
|
70782
71064
|
if (typeof spec.color !== "string" || spec.color.length === 0)
|
|
70783
71065
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName}: ${fieldPath}.color must be a non-empty string.`, { field: `${fieldPath}.color` });
|
|
70784
|
-
if (!
|
|
71066
|
+
if (!TABLE_COLOR_PATTERN2.test(spec.color))
|
|
70785
71067
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName}: ${fieldPath}.color must be a 6-digit hex color without "#" or "auto".`, { field: `${fieldPath}.color` });
|
|
70786
71068
|
}
|
|
70787
71069
|
function validateBorderPatchEdge2(value, edgeName, operationName) {
|
|
@@ -72941,6 +73223,9 @@ function createDocumentApi2(adapters) {
|
|
|
72941
73223
|
detach(input, options) {
|
|
72942
73224
|
return executeListsDetach2(adapters.lists, input, options);
|
|
72943
73225
|
},
|
|
73226
|
+
delete(input, options) {
|
|
73227
|
+
return executeListsDelete2(adapters.lists, input, options);
|
|
73228
|
+
},
|
|
72944
73229
|
indent(input, options) {
|
|
72945
73230
|
return executeListsIndent2(adapters.lists, input, options);
|
|
72946
73231
|
},
|
|
@@ -73118,7 +73403,7 @@ function createDocumentApi2(adapters) {
|
|
|
73118
73403
|
return executeTableLocatorOp2("tables.setLayout", adapters.tables.setLayout.bind(adapters.tables), input, options);
|
|
73119
73404
|
},
|
|
73120
73405
|
insertRow(input, options) {
|
|
73121
|
-
return executeRowLocatorOp2("tables.insertRow", adapters.tables.insertRow.bind(adapters.tables), input, options);
|
|
73406
|
+
return executeRowLocatorOp2("tables.insertRow", adapters.tables.insertRow.bind(adapters.tables), input, options, { allowAppendShorthand: true });
|
|
73122
73407
|
},
|
|
73123
73408
|
deleteRow(input, options) {
|
|
73124
73409
|
return executeRowLocatorOp2("tables.deleteRow", adapters.tables.deleteRow.bind(adapters.tables), input, options);
|
|
@@ -73162,6 +73447,9 @@ function createDocumentApi2(adapters) {
|
|
|
73162
73447
|
setCellProperties(input, options) {
|
|
73163
73448
|
return executeTableLocatorOp2("tables.setCellProperties", adapters.tables.setCellProperties.bind(adapters.tables), input, options);
|
|
73164
73449
|
},
|
|
73450
|
+
setCellText(input, options) {
|
|
73451
|
+
return executeCellOrTableScopedCellLocatorOp2("tables.setCellText", adapters.tables.setCellText.bind(adapters.tables), input, options);
|
|
73452
|
+
},
|
|
73165
73453
|
sort(input, options) {
|
|
73166
73454
|
return executeTableLocatorOp2("tables.sort", adapters.tables.sort.bind(adapters.tables), input, options);
|
|
73167
73455
|
},
|
|
@@ -73213,6 +73501,9 @@ function createDocumentApi2(adapters) {
|
|
|
73213
73501
|
setTableOptions(input, options) {
|
|
73214
73502
|
return executeTablesSetTableOptions2("tables.setTableOptions", adapters.tables.setTableOptions.bind(adapters.tables), input, options);
|
|
73215
73503
|
},
|
|
73504
|
+
applyPreset(input, options) {
|
|
73505
|
+
return executeTableLocatorOp2("tables.applyPreset", adapters.tables.applyPreset.bind(adapters.tables), input, options);
|
|
73506
|
+
},
|
|
73216
73507
|
get(input) {
|
|
73217
73508
|
return adapters.tables.get(input);
|
|
73218
73509
|
},
|
|
@@ -104184,7 +104475,7 @@ var isRegExp = (value) => {
|
|
|
104184
104475
|
tracked: false,
|
|
104185
104476
|
carrier: runAttributeCarrier2(runPropertyKey ?? key),
|
|
104186
104477
|
schema
|
|
104187
|
-
}), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, PROPERTY_VALIDATOR_MAP2, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_STORY2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, T_PROTECTION_READ2, T_PROTECTION_MUTATION2, T_PERM_RANGE_READ2, T_PERM_RANGE_MUTATION2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_DIRECTIONS2, ALIGNMENT_POLICIES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, SET_DIRECTION_KEYS2, CLEAR_DIRECTION_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY2, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, storyLocatorSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStylesSchema2, documentDefaultsSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, trackChangeWordRevisionIdsSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refListQueryProperties2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, SELECTION_CURRENT_ALLOWED_KEYS2, CREATE_COMMENT_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, VALID_BEHAVIORS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, TEXT_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LIST_KINDS2, LIST_INSERT_POSITIONS2, JOIN_DIRECTIONS2, MUTATION_SCOPES2, LEVEL_ALIGNMENTS2, TRAILING_CHARACTERS2, LIST_PRESET_IDS2, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS2, VALID_INSERT_POSITIONS2, VALID_JOIN_DIRECTIONS2, VALID_MUTATION_SCOPES2, VALID_LEVEL_ALIGNMENTS2, VALID_TRAILING_CHARACTERS2, VALID_LIST_PRESETS2, VALID_CONTINUITY_VALUES2, VALID_SEQUENCE_MODES2, VALID_LIST_CREATE_MODES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, VALID_HEADING_LEVELS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES3, SNAPSHOT_VERSIONS2, PAYLOAD_VERSIONS2, VALID_STYLE_OPTION_FLAGS2,
|
|
104478
|
+
}), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, PROPERTY_VALIDATOR_MAP2, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_STORY2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, T_PROTECTION_READ2, T_PROTECTION_MUTATION2, T_PERM_RANGE_READ2, T_PERM_RANGE_MUTATION2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, TABLE_COLOR_PATTERN_SOURCE2 = "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$", TABLE_COLOR_PATTERN2, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_DIRECTIONS2, ALIGNMENT_POLICIES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, SET_DIRECTION_KEYS2, CLEAR_DIRECTION_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY2, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, storyLocatorSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStylesSchema2, documentDefaultsSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, trackChangeWordRevisionIdsSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, tableBorderColorPattern2, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refListQueryProperties2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, SELECTION_CURRENT_ALLOWED_KEYS2, CREATE_COMMENT_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, VALID_BEHAVIORS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, TEXT_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LIST_KINDS2, LIST_INSERT_POSITIONS2, JOIN_DIRECTIONS2, MUTATION_SCOPES2, LEVEL_ALIGNMENTS2, TRAILING_CHARACTERS2, LIST_PRESET_IDS2, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS2, VALID_INSERT_POSITIONS2, VALID_JOIN_DIRECTIONS2, VALID_MUTATION_SCOPES2, VALID_LEVEL_ALIGNMENTS2, VALID_TRAILING_CHARACTERS2, VALID_LIST_PRESETS2, VALID_CONTINUITY_VALUES2, VALID_SEQUENCE_MODES2, VALID_LIST_CREATE_MODES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, VALID_HEADING_LEVELS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES3, SNAPSHOT_VERSIONS2, PAYLOAD_VERSIONS2, VALID_STYLE_OPTION_FLAGS2, VALID_APPLY_TO_VALUES2, VALID_BORDER_EDGE_KEYS2, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2, HEADER_FOOTER_KINDS3, HEADER_FOOTER_VARIANTS3, LINE_NUMBER_RESTARTS2, PAGE_NUMBER_FORMATS2, PAGE_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, VALID_TOC_UPDATE_MODES2, EDIT_ENTRY_PATCH_ALLOWED_KEYS2, PATCH_FIELDS2, CONTENT_CONTROL_TYPES2, LOCK_MODES2, CONTENT_CONTROL_APPEARANCES2, VALID_NODE_KINDS2, VALID_LOCK_MODES$1, VALID_CC_TYPES2, VALID_CC_APPEARANCES2, VALID_CONTENT_FORMATS2, VALID_RAW_PATCH_OPS2, VALID_SET_MODES2, VALID_CREATE_LOCATION_KINDS2, DEFAULT_PROTECTION_STATE, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$218) => ({
|
|
104188
104479
|
handlerName,
|
|
104189
104480
|
handler: (params3) => {
|
|
104190
104481
|
const { nodes } = params3;
|
|
@@ -118806,7 +119097,7 @@ var isRegExp = (value) => {
|
|
|
118806
119097
|
state.kern = kernNode.attributes["w:val"];
|
|
118807
119098
|
}
|
|
118808
119099
|
}, SuperConverter;
|
|
118809
|
-
var
|
|
119100
|
+
var init_SuperConverter_C9I74vtg_es = __esm(() => {
|
|
118810
119101
|
init_rolldown_runtime_Bg48TavK_es();
|
|
118811
119102
|
init_jszip_C49i9kUs_es();
|
|
118812
119103
|
init_xml_js_CqGKpaft_es();
|
|
@@ -123008,6 +123299,23 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
123008
123299
|
intentGroup: "list",
|
|
123009
123300
|
intentAction: "detach"
|
|
123010
123301
|
},
|
|
123302
|
+
"lists.delete": {
|
|
123303
|
+
memberPath: "lists.delete",
|
|
123304
|
+
description: 'Delete the entire list that contains the targeted list item. Removes ALL items in the same numbered sequence (the contiguous run of list items sharing the target\'s numbering) AND their text content from the document. Pass any single list item from the list as `target`; the op walks adjacent siblings to find the full list. Use this for "remove the list" / "delete this list" intents and for the cleanup step of a list-to-table conversion.',
|
|
123305
|
+
expectedResult: "Returns a ListsDeleteResult with `deletedCount` (number of items removed). Reports failure (INVALID_TARGET) if the target is not a list item.",
|
|
123306
|
+
requiresDocumentContext: true,
|
|
123307
|
+
metadata: mutationOperation2({
|
|
123308
|
+
idempotency: "conditional",
|
|
123309
|
+
supportsDryRun: true,
|
|
123310
|
+
supportsTrackedMode: false,
|
|
123311
|
+
possibleFailureCodes: ["INVALID_TARGET"],
|
|
123312
|
+
throws: [...T_NOT_FOUND_CAPABLE2, "INVALID_TARGET"]
|
|
123313
|
+
}),
|
|
123314
|
+
referenceDocPath: "lists/delete.mdx",
|
|
123315
|
+
referenceGroup: "lists",
|
|
123316
|
+
intentGroup: "list",
|
|
123317
|
+
intentAction: "delete"
|
|
123318
|
+
},
|
|
123011
123319
|
"lists.indent": {
|
|
123012
123320
|
memberPath: "lists.indent",
|
|
123013
123321
|
description: "Increase the indentation level of a list item.",
|
|
@@ -123950,7 +124258,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
123950
124258
|
throws: [...T_NOT_FOUND_COMMAND2, "INVALID_TARGET"]
|
|
123951
124259
|
}),
|
|
123952
124260
|
referenceDocPath: "tables/delete.mdx",
|
|
123953
|
-
referenceGroup: "tables"
|
|
124261
|
+
referenceGroup: "tables",
|
|
124262
|
+
intentGroup: "table",
|
|
124263
|
+
intentAction: "delete"
|
|
123954
124264
|
},
|
|
123955
124265
|
"tables.clearContents": {
|
|
123956
124266
|
memberPath: "tables.clearContents",
|
|
@@ -124025,11 +124335,13 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124025
124335
|
throws: T_NOT_FOUND_COMMAND2
|
|
124026
124336
|
}),
|
|
124027
124337
|
referenceDocPath: "tables/set-layout.mdx",
|
|
124028
|
-
referenceGroup: "tables"
|
|
124338
|
+
referenceGroup: "tables",
|
|
124339
|
+
intentGroup: "table",
|
|
124340
|
+
intentAction: "set_layout"
|
|
124029
124341
|
},
|
|
124030
124342
|
"tables.insertRow": {
|
|
124031
124343
|
memberPath: "tables.insertRow",
|
|
124032
|
-
description: "Insert a new row into the target table.",
|
|
124344
|
+
description: "Insert a new row into the target table. The new row is cloned from an adjacent row, so it inherits the existing cell shading, borders, alignment, and padding. No follow-up styling call is needed unless the new row should look different from the rest of the table.",
|
|
124033
124345
|
expectedResult: "Returns a TableMutationResult receipt confirming a row was inserted.",
|
|
124034
124346
|
requiresDocumentContext: true,
|
|
124035
124347
|
metadata: mutationOperation2({
|
|
@@ -124040,7 +124352,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124040
124352
|
throws: [...T_NOT_FOUND_COMMAND2, "INVALID_TARGET"]
|
|
124041
124353
|
}),
|
|
124042
124354
|
referenceDocPath: "tables/insert-row.mdx",
|
|
124043
|
-
referenceGroup: "tables"
|
|
124355
|
+
referenceGroup: "tables",
|
|
124356
|
+
intentGroup: "table",
|
|
124357
|
+
intentAction: "insert_row"
|
|
124044
124358
|
},
|
|
124045
124359
|
"tables.deleteRow": {
|
|
124046
124360
|
memberPath: "tables.deleteRow",
|
|
@@ -124055,7 +124369,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124055
124369
|
throws: [...T_NOT_FOUND_COMMAND2, "INVALID_TARGET"]
|
|
124056
124370
|
}),
|
|
124057
124371
|
referenceDocPath: "tables/delete-row.mdx",
|
|
124058
|
-
referenceGroup: "tables"
|
|
124372
|
+
referenceGroup: "tables",
|
|
124373
|
+
intentGroup: "table",
|
|
124374
|
+
intentAction: "delete_row"
|
|
124059
124375
|
},
|
|
124060
124376
|
"tables.setRowHeight": {
|
|
124061
124377
|
memberPath: "tables.setRowHeight",
|
|
@@ -124070,7 +124386,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124070
124386
|
throws: T_NOT_FOUND_COMMAND2
|
|
124071
124387
|
}),
|
|
124072
124388
|
referenceDocPath: "tables/set-row-height.mdx",
|
|
124073
|
-
referenceGroup: "tables"
|
|
124389
|
+
referenceGroup: "tables",
|
|
124390
|
+
intentGroup: "table",
|
|
124391
|
+
intentAction: "set_row"
|
|
124074
124392
|
},
|
|
124075
124393
|
"tables.distributeRows": {
|
|
124076
124394
|
memberPath: "tables.distributeRows",
|
|
@@ -124100,11 +124418,13 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124100
124418
|
throws: T_NOT_FOUND_COMMAND2
|
|
124101
124419
|
}),
|
|
124102
124420
|
referenceDocPath: "tables/set-row-options.mdx",
|
|
124103
|
-
referenceGroup: "tables"
|
|
124421
|
+
referenceGroup: "tables",
|
|
124422
|
+
intentGroup: "table",
|
|
124423
|
+
intentAction: "set_row_options"
|
|
124104
124424
|
},
|
|
124105
124425
|
"tables.insertColumn": {
|
|
124106
124426
|
memberPath: "tables.insertColumn",
|
|
124107
|
-
description: "Insert a new column into the target table.",
|
|
124427
|
+
description: "Insert a new column into the target table. The new column is cloned from an adjacent column, so it inherits the existing cell shading, borders, alignment, and width. No follow-up styling call is needed unless the new column should look different from the rest of the table.",
|
|
124108
124428
|
expectedResult: "Returns a TableMutationResult receipt confirming a column was inserted.",
|
|
124109
124429
|
requiresDocumentContext: true,
|
|
124110
124430
|
metadata: mutationOperation2({
|
|
@@ -124115,7 +124435,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124115
124435
|
throws: [...T_NOT_FOUND_COMMAND2, "INVALID_TARGET"]
|
|
124116
124436
|
}),
|
|
124117
124437
|
referenceDocPath: "tables/insert-column.mdx",
|
|
124118
|
-
referenceGroup: "tables"
|
|
124438
|
+
referenceGroup: "tables",
|
|
124439
|
+
intentGroup: "table",
|
|
124440
|
+
intentAction: "insert_column"
|
|
124119
124441
|
},
|
|
124120
124442
|
"tables.deleteColumn": {
|
|
124121
124443
|
memberPath: "tables.deleteColumn",
|
|
@@ -124130,7 +124452,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124130
124452
|
throws: [...T_NOT_FOUND_COMMAND2, "INVALID_TARGET"]
|
|
124131
124453
|
}),
|
|
124132
124454
|
referenceDocPath: "tables/delete-column.mdx",
|
|
124133
|
-
referenceGroup: "tables"
|
|
124455
|
+
referenceGroup: "tables",
|
|
124456
|
+
intentGroup: "table",
|
|
124457
|
+
intentAction: "delete_column"
|
|
124134
124458
|
},
|
|
124135
124459
|
"tables.setColumnWidth": {
|
|
124136
124460
|
memberPath: "tables.setColumnWidth",
|
|
@@ -124145,7 +124469,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124145
124469
|
throws: T_NOT_FOUND_COMMAND2
|
|
124146
124470
|
}),
|
|
124147
124471
|
referenceDocPath: "tables/set-column-width.mdx",
|
|
124148
|
-
referenceGroup: "tables"
|
|
124472
|
+
referenceGroup: "tables",
|
|
124473
|
+
intentGroup: "table",
|
|
124474
|
+
intentAction: "set_column"
|
|
124149
124475
|
},
|
|
124150
124476
|
"tables.distributeColumns": {
|
|
124151
124477
|
memberPath: "tables.distributeColumns",
|
|
@@ -124205,7 +124531,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124205
124531
|
throws: T_NOT_FOUND_COMMAND2
|
|
124206
124532
|
}),
|
|
124207
124533
|
referenceDocPath: "tables/merge-cells.mdx",
|
|
124208
|
-
referenceGroup: "tables"
|
|
124534
|
+
referenceGroup: "tables",
|
|
124535
|
+
intentGroup: "table",
|
|
124536
|
+
intentAction: "merge_cells"
|
|
124209
124537
|
},
|
|
124210
124538
|
"tables.unmergeCells": {
|
|
124211
124539
|
memberPath: "tables.unmergeCells",
|
|
@@ -124220,7 +124548,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124220
124548
|
throws: T_NOT_FOUND_COMMAND2
|
|
124221
124549
|
}),
|
|
124222
124550
|
referenceDocPath: "tables/unmerge-cells.mdx",
|
|
124223
|
-
referenceGroup: "tables"
|
|
124551
|
+
referenceGroup: "tables",
|
|
124552
|
+
intentGroup: "table",
|
|
124553
|
+
intentAction: "unmerge_cells"
|
|
124224
124554
|
},
|
|
124225
124555
|
"tables.splitCell": {
|
|
124226
124556
|
memberPath: "tables.splitCell",
|
|
@@ -124239,7 +124569,7 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124239
124569
|
},
|
|
124240
124570
|
"tables.setCellProperties": {
|
|
124241
124571
|
memberPath: "tables.setCellProperties",
|
|
124242
|
-
description:
|
|
124572
|
+
description: 'Set non-text properties on a single table cell: vertical alignment, text wrapping, fit-text, or preferred width. Requires a cell-level target (a tableCell block address with kind, nodeType, nodeId). Does NOT accept a table target with rowIndex/columnIndex. To set the text content of a cell, use action "set_cell_text" instead.',
|
|
124243
124573
|
expectedResult: "Returns a TableMutationResult receipt; reports NO_OP if cell properties already match.",
|
|
124244
124574
|
requiresDocumentContext: true,
|
|
124245
124575
|
metadata: mutationOperation2({
|
|
@@ -124250,7 +124580,26 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124250
124580
|
throws: T_NOT_FOUND_COMMAND2
|
|
124251
124581
|
}),
|
|
124252
124582
|
referenceDocPath: "tables/set-cell-properties.mdx",
|
|
124253
|
-
referenceGroup: "tables"
|
|
124583
|
+
referenceGroup: "tables",
|
|
124584
|
+
intentGroup: "table",
|
|
124585
|
+
intentAction: "set_cell"
|
|
124586
|
+
},
|
|
124587
|
+
"tables.setCellText": {
|
|
124588
|
+
memberPath: "tables.setCellText",
|
|
124589
|
+
description: "Replace the text content of a single table cell with plain text (one paragraph). Accepts either a direct cell locator (a tableCell block address with kind, nodeType, nodeId) OR a table target with rowIndex + columnIndex. Cell properties (vertical alignment, shading, borders, colspan/rowspan) are preserved. Use this for filling cells with values, replacing cell text, or populating empty tables. Much simpler than walking paragraphs and runs through superdoc_edit.",
|
|
124590
|
+
expectedResult: "Returns a TableMutationResult receipt; reports NO_OP if the cell already contains exactly this text.",
|
|
124591
|
+
requiresDocumentContext: true,
|
|
124592
|
+
metadata: mutationOperation2({
|
|
124593
|
+
idempotency: "idempotent",
|
|
124594
|
+
supportsDryRun: true,
|
|
124595
|
+
supportsTrackedMode: false,
|
|
124596
|
+
possibleFailureCodes: ["INVALID_TARGET", "NO_OP"],
|
|
124597
|
+
throws: T_NOT_FOUND_COMMAND2
|
|
124598
|
+
}),
|
|
124599
|
+
referenceDocPath: "tables/set-cell-text.mdx",
|
|
124600
|
+
referenceGroup: "tables",
|
|
124601
|
+
intentGroup: "table",
|
|
124602
|
+
intentAction: "set_cell_text"
|
|
124254
124603
|
},
|
|
124255
124604
|
"tables.sort": {
|
|
124256
124605
|
memberPath: "tables.sort",
|
|
@@ -124385,7 +124734,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124385
124734
|
throws: T_NOT_FOUND_COMMAND2
|
|
124386
124735
|
}),
|
|
124387
124736
|
referenceDocPath: "tables/set-shading.mdx",
|
|
124388
|
-
referenceGroup: "tables"
|
|
124737
|
+
referenceGroup: "tables",
|
|
124738
|
+
intentGroup: "table",
|
|
124739
|
+
intentAction: "set_shading"
|
|
124389
124740
|
},
|
|
124390
124741
|
"tables.clearShading": {
|
|
124391
124742
|
memberPath: "tables.clearShading",
|
|
@@ -124464,7 +124815,7 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124464
124815
|
},
|
|
124465
124816
|
"tables.applyStyle": {
|
|
124466
124817
|
memberPath: "tables.applyStyle",
|
|
124467
|
-
description:
|
|
124818
|
+
description: 'Toggle conditional-format flags (header row, banded rows/columns, first/last column, last row) on a table. Pass `styleOptions` with the flags you want to set or clear (omitted flags stay unchanged). For "format the first row as a header" use `styleOptions: { headerRow: true }`. Optional `styleId` applies a named table style. Leave it unset unless you have a styleId from `superdoc_get_content` (no need to invent one).',
|
|
124468
124819
|
expectedResult: "Returns a TableMutationResult receipt; reports NO_OP if the style and all provided options already match.",
|
|
124469
124820
|
requiresDocumentContext: true,
|
|
124470
124821
|
metadata: mutationOperation2({
|
|
@@ -124479,7 +124830,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124479
124830
|
throws: T_NOT_FOUND_COMMAND2
|
|
124480
124831
|
}),
|
|
124481
124832
|
referenceDocPath: "tables/apply-style.mdx",
|
|
124482
|
-
referenceGroup: "tables"
|
|
124833
|
+
referenceGroup: "tables",
|
|
124834
|
+
intentGroup: "table",
|
|
124835
|
+
intentAction: "set_style_options"
|
|
124483
124836
|
},
|
|
124484
124837
|
"tables.setBorders": {
|
|
124485
124838
|
memberPath: "tables.setBorders",
|
|
@@ -124494,7 +124847,9 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124494
124847
|
throws: T_NOT_FOUND_COMMAND2
|
|
124495
124848
|
}),
|
|
124496
124849
|
referenceDocPath: "tables/set-borders.mdx",
|
|
124497
|
-
referenceGroup: "tables"
|
|
124850
|
+
referenceGroup: "tables",
|
|
124851
|
+
intentGroup: "table",
|
|
124852
|
+
intentAction: "set_borders"
|
|
124498
124853
|
},
|
|
124499
124854
|
"tables.setTableOptions": {
|
|
124500
124855
|
memberPath: "tables.setTableOptions",
|
|
@@ -124513,6 +124868,23 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
124513
124868
|
throws: T_NOT_FOUND_COMMAND2
|
|
124514
124869
|
}),
|
|
124515
124870
|
referenceDocPath: "tables/set-table-options.mdx",
|
|
124871
|
+
referenceGroup: "tables",
|
|
124872
|
+
intentGroup: "table",
|
|
124873
|
+
intentAction: "set_options"
|
|
124874
|
+
},
|
|
124875
|
+
"tables.applyPreset": {
|
|
124876
|
+
memberPath: "tables.applyPreset",
|
|
124877
|
+
description: 'Apply a named visual preset to a table. Presets: "grid" (1pt black borders all around), "minimal" (no outer borders, hairline grey row separators + thicker bottom), "striped" (banded rows on, 0.5pt grey borders), "accent" (filled header row + thick accent top/bottom; defaults to dark blue, override with `accentColor`). Composes set_borders + set_style_options + header-row shading in one call. Available via the document API and `superdoc_mutations` (intentionally NOT exposed as a top-level action on `superdoc_table`. Agents should compose explicit set_borders / set_shading / set_style_options calls so they always pick concrete colors that match the document context).',
|
|
124878
|
+
expectedResult: "Returns a TableMutationResult receipt.",
|
|
124879
|
+
requiresDocumentContext: true,
|
|
124880
|
+
metadata: mutationOperation2({
|
|
124881
|
+
idempotency: "idempotent",
|
|
124882
|
+
supportsDryRun: true,
|
|
124883
|
+
supportsTrackedMode: false,
|
|
124884
|
+
possibleFailureCodes: ["INVALID_TARGET"],
|
|
124885
|
+
throws: T_NOT_FOUND_COMMAND2
|
|
124886
|
+
}),
|
|
124887
|
+
referenceDocPath: "tables/apply-preset.mdx",
|
|
124516
124888
|
referenceGroup: "tables"
|
|
124517
124889
|
},
|
|
124518
124890
|
"tables.get": {
|
|
@@ -127241,6 +127613,7 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
127241
127613
|
projectFromDefinitions2((_id, entry) => entry.description);
|
|
127242
127614
|
projectFromDefinitions2((_id, entry) => entry.requiresDocumentContext);
|
|
127243
127615
|
projectFromDefinitions2((_id, entry) => entry.expectedResult);
|
|
127616
|
+
TABLE_COLOR_PATTERN2 = new RegExp(TABLE_COLOR_PATTERN_SOURCE2, "u");
|
|
127244
127617
|
PARAGRAPH_ALIGNMENTS2 = [
|
|
127245
127618
|
"left",
|
|
127246
127619
|
"center",
|
|
@@ -129133,6 +129506,7 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
129133
129506
|
"planEngine"
|
|
129134
129507
|
]);
|
|
129135
129508
|
objectSchema2({});
|
|
129509
|
+
tableBorderColorPattern2 = TABLE_COLOR_PATTERN_SOURCE2;
|
|
129136
129510
|
nullableTableBorderSpecSchema2 = { oneOf: [objectSchema2({
|
|
129137
129511
|
lineStyle: { type: "string" },
|
|
129138
129512
|
lineWeightPt: {
|
|
@@ -129141,7 +129515,7 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
129141
129515
|
},
|
|
129142
129516
|
color: {
|
|
129143
129517
|
type: "string",
|
|
129144
|
-
pattern:
|
|
129518
|
+
pattern: tableBorderColorPattern2
|
|
129145
129519
|
}
|
|
129146
129520
|
}, [
|
|
129147
129521
|
"lineStyle",
|
|
@@ -130756,7 +131130,19 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
130756
131130
|
}, ["success", "paragraph"]), listsFailureSchemaFor2("lists.detach"), objectSchema2({
|
|
130757
131131
|
success: { const: true },
|
|
130758
131132
|
paragraph: ref2("ParagraphAddress")
|
|
130759
|
-
}, ["success", "paragraph"]), listsFailureSchemaFor2("lists.detach"), objectSchema2({ target: listItemAddressSchema2 }, ["target"]),
|
|
131133
|
+
}, ["success", "paragraph"]), listsFailureSchemaFor2("lists.detach"), objectSchema2({ target: listItemAddressSchema2 }, ["target"]), objectSchema2({
|
|
131134
|
+
success: { const: true },
|
|
131135
|
+
deletedCount: {
|
|
131136
|
+
type: "integer",
|
|
131137
|
+
minimum: 0
|
|
131138
|
+
}
|
|
131139
|
+
}, ["success", "deletedCount"]), listsFailureSchemaFor2("lists.delete"), objectSchema2({
|
|
131140
|
+
success: { const: true },
|
|
131141
|
+
deletedCount: {
|
|
131142
|
+
type: "integer",
|
|
131143
|
+
minimum: 0
|
|
131144
|
+
}
|
|
131145
|
+
}, ["success", "deletedCount"]), listsFailureSchemaFor2("lists.delete"), objectSchema2({ target: listItemAddressSchema2 }, ["target"]), listsMutateItemResultSchemaFor2("lists.indent"), listsFailureSchemaFor2("lists.indent"), objectSchema2({ target: listItemAddressSchema2 }, ["target"]), listsMutateItemResultSchemaFor2("lists.outdent"), listsFailureSchemaFor2("lists.outdent"), objectSchema2({
|
|
130760
131146
|
target: listItemAddressSchema2,
|
|
130761
131147
|
direction: { enum: ["withPrevious", "withNext"] }
|
|
130762
131148
|
}, ["target", "direction"]), objectSchema2({
|
|
@@ -131819,13 +132205,51 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
131819
132205
|
"fitWindow"
|
|
131820
132206
|
] },
|
|
131821
132207
|
tableDirection: { enum: ["ltr", "rtl"] }
|
|
131822
|
-
}) },
|
|
132208
|
+
}) }, objectSchema2({
|
|
132209
|
+
target: tableRowAddressSchema2,
|
|
132210
|
+
position: { enum: ["above", "below"] },
|
|
132211
|
+
count: {
|
|
132212
|
+
type: "integer",
|
|
132213
|
+
minimum: 1
|
|
132214
|
+
}
|
|
132215
|
+
}, ["target", "position"]), objectSchema2({
|
|
132216
|
+
target: tableAddressSchema2,
|
|
132217
|
+
rowIndex: {
|
|
132218
|
+
type: "integer",
|
|
132219
|
+
minimum: 0
|
|
132220
|
+
},
|
|
132221
|
+
position: { enum: ["above", "below"] },
|
|
132222
|
+
count: {
|
|
132223
|
+
type: "integer",
|
|
132224
|
+
minimum: 1
|
|
132225
|
+
}
|
|
132226
|
+
}, [
|
|
132227
|
+
"target",
|
|
132228
|
+
"rowIndex",
|
|
132229
|
+
"position"
|
|
132230
|
+
]), objectSchema2({
|
|
132231
|
+
nodeId: { type: "string" },
|
|
132232
|
+
rowIndex: {
|
|
132233
|
+
type: "integer",
|
|
132234
|
+
minimum: 0
|
|
132235
|
+
},
|
|
131823
132236
|
position: { enum: ["above", "below"] },
|
|
131824
132237
|
count: {
|
|
131825
132238
|
type: "integer",
|
|
131826
132239
|
minimum: 1
|
|
131827
132240
|
}
|
|
131828
|
-
}, [
|
|
132241
|
+
}, [
|
|
132242
|
+
"nodeId",
|
|
132243
|
+
"rowIndex",
|
|
132244
|
+
"position"
|
|
132245
|
+
]), { ...objectSchema2({
|
|
132246
|
+
target: tableAddressSchema2,
|
|
132247
|
+
nodeId: { type: "string" },
|
|
132248
|
+
count: {
|
|
132249
|
+
type: "integer",
|
|
132250
|
+
minimum: 1
|
|
132251
|
+
}
|
|
132252
|
+
}, []) }, rowOperationInputSchema2({}), rowOperationInputSchema2({
|
|
131829
132253
|
heightPt: {
|
|
131830
132254
|
type: "number",
|
|
131831
132255
|
exclusiveMinimum: 0
|
|
@@ -131845,12 +132269,17 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
131845
132269
|
type: "integer",
|
|
131846
132270
|
minimum: 0
|
|
131847
132271
|
},
|
|
131848
|
-
position: { enum: [
|
|
132272
|
+
position: { enum: [
|
|
132273
|
+
"left",
|
|
132274
|
+
"right",
|
|
132275
|
+
"first",
|
|
132276
|
+
"last"
|
|
132277
|
+
] },
|
|
131849
132278
|
count: {
|
|
131850
132279
|
type: "integer",
|
|
131851
132280
|
minimum: 1
|
|
131852
132281
|
}
|
|
131853
|
-
}, ["
|
|
132282
|
+
}, ["position"]) }, { ...objectSchema2({
|
|
131854
132283
|
target: tableAddressSchema2,
|
|
131855
132284
|
nodeId: { type: "string" },
|
|
131856
132285
|
columnIndex: {
|
|
@@ -131911,7 +132340,45 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
131911
132340
|
] },
|
|
131912
132341
|
wrapText: { type: "boolean" },
|
|
131913
132342
|
fitText: { type: "boolean" }
|
|
131914
|
-
}) },
|
|
132343
|
+
}) }, objectSchema2({
|
|
132344
|
+
target: tableCellAddressSchema2,
|
|
132345
|
+
text: { type: "string" }
|
|
132346
|
+
}, ["target", "text"]), objectSchema2({
|
|
132347
|
+
nodeId: { type: "string" },
|
|
132348
|
+
text: { type: "string" }
|
|
132349
|
+
}, ["nodeId", "text"]), objectSchema2({
|
|
132350
|
+
target: tableAddressSchema2,
|
|
132351
|
+
rowIndex: {
|
|
132352
|
+
type: "integer",
|
|
132353
|
+
minimum: 0
|
|
132354
|
+
},
|
|
132355
|
+
columnIndex: {
|
|
132356
|
+
type: "integer",
|
|
132357
|
+
minimum: 0
|
|
132358
|
+
},
|
|
132359
|
+
text: { type: "string" }
|
|
132360
|
+
}, [
|
|
132361
|
+
"target",
|
|
132362
|
+
"rowIndex",
|
|
132363
|
+
"columnIndex",
|
|
132364
|
+
"text"
|
|
132365
|
+
]), objectSchema2({
|
|
132366
|
+
nodeId: { type: "string" },
|
|
132367
|
+
rowIndex: {
|
|
132368
|
+
type: "integer",
|
|
132369
|
+
minimum: 0
|
|
132370
|
+
},
|
|
132371
|
+
columnIndex: {
|
|
132372
|
+
type: "integer",
|
|
132373
|
+
minimum: 0
|
|
132374
|
+
},
|
|
132375
|
+
text: { type: "string" }
|
|
132376
|
+
}, [
|
|
132377
|
+
"nodeId",
|
|
132378
|
+
"rowIndex",
|
|
132379
|
+
"columnIndex",
|
|
132380
|
+
"text"
|
|
132381
|
+
]), { ...objectSchema2({
|
|
131915
132382
|
target: tableAddressSchema2,
|
|
131916
132383
|
nodeId: { type: "string" },
|
|
131917
132384
|
keys: arraySchema2(objectSchema2({
|
|
@@ -131972,7 +132439,7 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
131972
132439
|
},
|
|
131973
132440
|
color: {
|
|
131974
132441
|
type: "string",
|
|
131975
|
-
pattern:
|
|
132442
|
+
pattern: tableBorderColorPattern2
|
|
131976
132443
|
}
|
|
131977
132444
|
}, [
|
|
131978
132445
|
"edge",
|
|
@@ -132005,10 +132472,10 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
132005
132472
|
}, ["preset"]) }, { ...objectSchema2({
|
|
132006
132473
|
target: tableOrCellAddressSchema2,
|
|
132007
132474
|
nodeId: { type: "string" },
|
|
132008
|
-
color: {
|
|
132475
|
+
color: { oneOf: [{
|
|
132009
132476
|
type: "string",
|
|
132010
|
-
pattern:
|
|
132011
|
-
}
|
|
132477
|
+
pattern: tableBorderColorPattern2
|
|
132478
|
+
}, { type: "null" }] }
|
|
132012
132479
|
}, ["color"]) }, { ...objectSchema2({
|
|
132013
132480
|
target: tableAddressSchema2,
|
|
132014
132481
|
nodeId: { type: "string" },
|
|
@@ -132139,7 +132606,20 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
132139
132606
|
type: "number",
|
|
132140
132607
|
minimum: 0
|
|
132141
132608
|
}, { type: "null" }] }
|
|
132142
|
-
}) }, objectSchema2({
|
|
132609
|
+
}) }, { ...objectSchema2({
|
|
132610
|
+
target: tableAddressSchema2,
|
|
132611
|
+
nodeId: { type: "string" },
|
|
132612
|
+
preset: { enum: [
|
|
132613
|
+
"grid",
|
|
132614
|
+
"minimal",
|
|
132615
|
+
"striped",
|
|
132616
|
+
"accent"
|
|
132617
|
+
] },
|
|
132618
|
+
accentColor: {
|
|
132619
|
+
type: "string",
|
|
132620
|
+
pattern: tableBorderColorPattern2
|
|
132621
|
+
}
|
|
132622
|
+
}, ["preset"]) }, objectSchema2({
|
|
132143
132623
|
nodeId: { type: "string" },
|
|
132144
132624
|
address: tableAddressSchema2,
|
|
132145
132625
|
rows: {
|
|
@@ -133685,7 +134165,6 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
133685
134165
|
"bandedRows",
|
|
133686
134166
|
"bandedColumns"
|
|
133687
134167
|
]);
|
|
133688
|
-
TABLE_BORDER_COLOR_PATTERN2 = /^([0-9A-Fa-f]{6}|auto)$/u;
|
|
133689
134168
|
VALID_APPLY_TO_VALUES2 = new Set([
|
|
133690
134169
|
"all",
|
|
133691
134170
|
"outside",
|
|
@@ -156478,7 +156957,7 @@ var init_SuperConverter_CzqEoFT1_es = __esm(() => {
|
|
|
156478
156957
|
};
|
|
156479
156958
|
});
|
|
156480
156959
|
|
|
156481
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
156960
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-B7nufamW.es.js
|
|
156482
156961
|
function parseSizeUnit(val = "0") {
|
|
156483
156962
|
const length3 = val.toString() || "0";
|
|
156484
156963
|
const value = Number.parseFloat(length3);
|
|
@@ -159145,8 +159624,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
159145
159624
|
}
|
|
159146
159625
|
};
|
|
159147
159626
|
};
|
|
159148
|
-
var
|
|
159149
|
-
|
|
159627
|
+
var init_create_headless_toolbar_B7nufamW_es = __esm(() => {
|
|
159628
|
+
init_SuperConverter_C9I74vtg_es();
|
|
159150
159629
|
init_constants_DrU4EASo_es();
|
|
159151
159630
|
init_dist_B8HfvhaK_es();
|
|
159152
159631
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -207843,7 +208322,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
207843
208322
|
init_remark_gfm_BhnWr3yf_es();
|
|
207844
208323
|
});
|
|
207845
208324
|
|
|
207846
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
208325
|
+
// ../../packages/superdoc/dist/chunks/src-BE-DiVIy.es.js
|
|
207847
208326
|
function deleteProps(obj, propOrProps) {
|
|
207848
208327
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
207849
208328
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -233639,6 +234118,37 @@ function listsDetachWrapper(editor, input2, options) {
|
|
|
233639
234118
|
}
|
|
233640
234119
|
};
|
|
233641
234120
|
}
|
|
234121
|
+
function listsDeleteWrapper(editor, input2, options) {
|
|
234122
|
+
rejectTrackedMode("lists.delete", options);
|
|
234123
|
+
const sequence = getContiguousSequence(editor, resolveListItem(editor, input2.target));
|
|
234124
|
+
if (sequence.length === 0)
|
|
234125
|
+
return toListsFailure$1("INVALID_TARGET", "List sequence could not be resolved.", { target: input2.target });
|
|
234126
|
+
if (options?.dryRun)
|
|
234127
|
+
return {
|
|
234128
|
+
success: true,
|
|
234129
|
+
deletedCount: sequence.length
|
|
234130
|
+
};
|
|
234131
|
+
if (executeDomainCommand(editor, () => {
|
|
234132
|
+
const { tr } = editor.state;
|
|
234133
|
+
const sortedDesc = [...sequence].sort((a2, b$1) => b$1.candidate.pos - a2.candidate.pos);
|
|
234134
|
+
for (const item of sortedDesc) {
|
|
234135
|
+
const start$1 = item.candidate.pos;
|
|
234136
|
+
const end$1 = start$1 + item.candidate.node.nodeSize;
|
|
234137
|
+
const mappedStart = tr.mapping.map(start$1, -1);
|
|
234138
|
+
const mappedEnd = tr.mapping.map(end$1, 1);
|
|
234139
|
+
if (mappedEnd > mappedStart)
|
|
234140
|
+
tr.delete(mappedStart, mappedEnd);
|
|
234141
|
+
}
|
|
234142
|
+
dispatchEditorTransaction$2(editor, tr);
|
|
234143
|
+
clearIndexCache(editor);
|
|
234144
|
+
return true;
|
|
234145
|
+
}, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
|
|
234146
|
+
return toListsFailure$1("INVALID_TARGET", "List deletion could not be applied.", { target: input2.target });
|
|
234147
|
+
return {
|
|
234148
|
+
success: true,
|
|
234149
|
+
deletedCount: sequence.length
|
|
234150
|
+
};
|
|
234151
|
+
}
|
|
233642
234152
|
function listsJoinWrapper(editor, input2, options) {
|
|
233643
234153
|
rejectTrackedMode("lists.join", options);
|
|
233644
234154
|
const target = resolveListItem(editor, input2.target);
|
|
@@ -235761,6 +236271,13 @@ function normalizeCellAttrsForSingleCell(attrs) {
|
|
|
235761
236271
|
tableCellProperties
|
|
235762
236272
|
};
|
|
235763
236273
|
}
|
|
236274
|
+
function stripMergeMetadataFromTableCellProperties(attrs) {
|
|
236275
|
+
const { gridSpan: _g, vMerge: _v, ...cleanedTcp } = attrs.tableCellProperties ?? {};
|
|
236276
|
+
return {
|
|
236277
|
+
...attrs,
|
|
236278
|
+
tableCellProperties: cleanedTcp
|
|
236279
|
+
};
|
|
236280
|
+
}
|
|
235764
236281
|
function normalizeClonedRowInsertCellAttrs(sourceAttrs, fromHeaderToBody) {
|
|
235765
236282
|
const normalizedAttrs = {
|
|
235766
236283
|
...sourceAttrs,
|
|
@@ -235770,6 +236287,16 @@ function normalizeClonedRowInsertCellAttrs(sourceAttrs, fromHeaderToBody) {
|
|
|
235770
236287
|
delete normalizedAttrs.borders;
|
|
235771
236288
|
return normalizedAttrs;
|
|
235772
236289
|
}
|
|
236290
|
+
function normalizeClonedColumnInsertCellAttrs(sourceAttrs) {
|
|
236291
|
+
const normalizedAttrs = {
|
|
236292
|
+
...stripMergeMetadataFromTableCellProperties(sourceAttrs),
|
|
236293
|
+
colspan: 1,
|
|
236294
|
+
rowspan: 1
|
|
236295
|
+
};
|
|
236296
|
+
if (Array.isArray(normalizedAttrs.colwidth))
|
|
236297
|
+
delete normalizedAttrs.colwidth;
|
|
236298
|
+
return normalizedAttrs;
|
|
236299
|
+
}
|
|
235773
236300
|
function expandMergedCellIntoSingles({ tr, tablePos, tableNode, cellPos, cellNode, rowIndex, columnIndex, rowspan, colspan, schema }) {
|
|
235774
236301
|
const tableStart = tablePos + 1;
|
|
235775
236302
|
const map$12 = TableMap.get(tableNode);
|
|
@@ -235909,6 +236436,66 @@ function applyTableBorderPresetToCellBorders(tr, tablePos, tableNode, preset) {
|
|
|
235909
236436
|
});
|
|
235910
236437
|
}
|
|
235911
236438
|
}
|
|
236439
|
+
function buildPresetSpec(preset, accentColorInput) {
|
|
236440
|
+
if (preset === "accent") {
|
|
236441
|
+
const accentColor = normalizeColorInput(accentColorInput ?? "1F3864");
|
|
236442
|
+
return {
|
|
236443
|
+
borders: {
|
|
236444
|
+
top: {
|
|
236445
|
+
lineStyle: "single",
|
|
236446
|
+
lineWeightPt: 2,
|
|
236447
|
+
color: accentColor
|
|
236448
|
+
},
|
|
236449
|
+
bottom: {
|
|
236450
|
+
lineStyle: "single",
|
|
236451
|
+
lineWeightPt: 2,
|
|
236452
|
+
color: accentColor
|
|
236453
|
+
},
|
|
236454
|
+
left: null,
|
|
236455
|
+
right: null,
|
|
236456
|
+
insideV: null,
|
|
236457
|
+
insideH: {
|
|
236458
|
+
lineStyle: "single",
|
|
236459
|
+
lineWeightPt: 0.5,
|
|
236460
|
+
color: PRESET_GREY
|
|
236461
|
+
}
|
|
236462
|
+
},
|
|
236463
|
+
styleOptions: { headerRow: true },
|
|
236464
|
+
headerRowFill: accentColor
|
|
236465
|
+
};
|
|
236466
|
+
}
|
|
236467
|
+
return STATIC_PRESETS[preset] ?? null;
|
|
236468
|
+
}
|
|
236469
|
+
function applyShadingToCells(tr, tableNode, tableStart, fill, cellPositions) {
|
|
236470
|
+
const map$12 = TableMap.get(tableNode);
|
|
236471
|
+
const positions = cellPositions ?? map$12.map;
|
|
236472
|
+
const seen = /* @__PURE__ */ new Set;
|
|
236473
|
+
const mapFrom = tr.mapping.maps.length;
|
|
236474
|
+
for (const relPos of positions) {
|
|
236475
|
+
if (seen.has(relPos))
|
|
236476
|
+
continue;
|
|
236477
|
+
seen.add(relPos);
|
|
236478
|
+
const cellNode = tableNode.nodeAt(relPos);
|
|
236479
|
+
if (!cellNode)
|
|
236480
|
+
continue;
|
|
236481
|
+
const cellAttrs = cellNode.attrs;
|
|
236482
|
+
const cellProps = { ...cellAttrs.tableCellProperties ?? {} };
|
|
236483
|
+
cellProps.shading = {
|
|
236484
|
+
fill,
|
|
236485
|
+
val: "clear",
|
|
236486
|
+
color: "auto"
|
|
236487
|
+
};
|
|
236488
|
+
const nextCellAttrs = {
|
|
236489
|
+
...cellAttrs,
|
|
236490
|
+
tableCellProperties: cellProps
|
|
236491
|
+
};
|
|
236492
|
+
if (fill === "auto")
|
|
236493
|
+
delete nextCellAttrs.background;
|
|
236494
|
+
else
|
|
236495
|
+
nextCellAttrs.background = { color: fill };
|
|
236496
|
+
tr.setNodeMarkup(tr.mapping.slice(mapFrom).map(tableStart + relPos), null, nextCellAttrs);
|
|
236497
|
+
}
|
|
236498
|
+
}
|
|
235912
236499
|
function removeColSpan2(attrs, pos, n = 1) {
|
|
235913
236500
|
const result = {
|
|
235914
236501
|
...attrs,
|
|
@@ -235958,6 +236545,7 @@ function addColumnToTable(tr, tablePos, col) {
|
|
|
235958
236545
|
const map$12 = TableMap.get(tableNode);
|
|
235959
236546
|
const tableStart = tablePos + 1;
|
|
235960
236547
|
const mapStart = tr.mapping.maps.length;
|
|
236548
|
+
const sourceCol = col > 0 ? col - 1 : map$12.width > 0 ? 0 : -1;
|
|
235961
236549
|
for (let row2 = 0;row2 < map$12.height; row2++) {
|
|
235962
236550
|
const index2 = row2 * map$12.width + col;
|
|
235963
236551
|
if (col > 0 && col < map$12.width && map$12.map[index2 - 1] === map$12.map[index2]) {
|
|
@@ -235971,8 +236559,21 @@ function addColumnToTable(tr, tablePos, col) {
|
|
|
235971
236559
|
const refType = resolveInsertedColumnCellType(tableNode, map$12, index2, col);
|
|
235972
236560
|
if (!refType)
|
|
235973
236561
|
continue;
|
|
236562
|
+
let clonedAttrs = null;
|
|
236563
|
+
if (sourceCol >= 0) {
|
|
236564
|
+
const sourceIdx = row2 * map$12.width + sourceCol;
|
|
236565
|
+
const sourcePos = map$12.map[sourceIdx];
|
|
236566
|
+
if (sourcePos != null) {
|
|
236567
|
+
const sourceCell = tableNode.nodeAt(sourcePos);
|
|
236568
|
+
if (sourceCell)
|
|
236569
|
+
clonedAttrs = normalizeClonedColumnInsertCellAttrs(sourceCell.attrs);
|
|
236570
|
+
}
|
|
236571
|
+
}
|
|
235974
236572
|
const cellPos = map$12.positionAt(row2, col, tableNode);
|
|
235975
|
-
|
|
236573
|
+
const newCell = refType.createAndFill(clonedAttrs ?? undefined);
|
|
236574
|
+
if (!newCell)
|
|
236575
|
+
continue;
|
|
236576
|
+
tr.insert(tr.mapping.slice(mapStart).map(tableStart + cellPos), newCell);
|
|
235976
236577
|
}
|
|
235977
236578
|
}
|
|
235978
236579
|
}
|
|
@@ -236346,20 +236947,32 @@ function tablesInsertRowAdapter(editor, input2, options) {
|
|
|
236346
236947
|
const mode = options?.changeMode ?? "direct";
|
|
236347
236948
|
if (mode === "tracked")
|
|
236348
236949
|
ensureTrackedCapability(editor, { operation: "tables.insertRow" });
|
|
236349
|
-
|
|
236950
|
+
let normalizedInput = input2;
|
|
236951
|
+
const inputAny = input2;
|
|
236952
|
+
if (inputAny.rowIndex == null && inputAny.position == null) {
|
|
236953
|
+
const lastIndex = resolveTableLocator(editor, input2, "tables.insertRow").candidate.node.childCount - 1;
|
|
236954
|
+
normalizedInput = {
|
|
236955
|
+
...input2,
|
|
236956
|
+
rowIndex: lastIndex,
|
|
236957
|
+
position: "below"
|
|
236958
|
+
};
|
|
236959
|
+
}
|
|
236960
|
+
const { table: table2, rowIndex } = resolveRowLocator(editor, normalizedInput, "tables.insertRow");
|
|
236350
236961
|
if (options?.dryRun)
|
|
236351
236962
|
return buildTableSuccess(table2.address);
|
|
236352
236963
|
try {
|
|
236353
236964
|
const tr = editor.state.tr;
|
|
236354
236965
|
const tablePos = table2.candidate.pos;
|
|
236355
|
-
const
|
|
236966
|
+
const normalizedAny = normalizedInput;
|
|
236967
|
+
const count2 = normalizedAny.count ?? 1;
|
|
236968
|
+
const position4 = normalizedAny.position ?? "below";
|
|
236356
236969
|
const schema = editor.state.schema;
|
|
236357
236970
|
for (let i4 = 0;i4 < count2; i4++) {
|
|
236358
236971
|
const currentTableNode = tr.doc.nodeAt(tablePos);
|
|
236359
236972
|
if (!currentTableNode || currentTableNode.type.name !== "table")
|
|
236360
236973
|
break;
|
|
236361
|
-
const insertIdx =
|
|
236362
|
-
const sourceIdx =
|
|
236974
|
+
const insertIdx = position4 === "above" ? rowIndex + i4 : rowIndex + 1 + i4;
|
|
236975
|
+
const sourceIdx = position4 === "above" ? rowIndex + i4 : rowIndex;
|
|
236363
236976
|
if (!insertRowInTable(tr, tablePos, Math.min(sourceIdx, currentTableNode.childCount - 1), Math.min(insertIdx, currentTableNode.childCount), schema))
|
|
236364
236977
|
return toTableFailure("INVALID_TARGET", "Row insertion could not be applied.");
|
|
236365
236978
|
}
|
|
@@ -236548,16 +237161,30 @@ function tablesInsertColumnAdapter(editor, input2, options) {
|
|
|
236548
237161
|
const mode = options?.changeMode ?? "direct";
|
|
236549
237162
|
if (mode === "tracked")
|
|
236550
237163
|
ensureTrackedCapability(editor, { operation: "tables.insertColumn" });
|
|
236551
|
-
|
|
237164
|
+
let normalizedInput = input2;
|
|
237165
|
+
const inputAny = input2;
|
|
237166
|
+
if (inputAny.position === "first" || inputAny.position === "last" || (inputAny.position === "left" || inputAny.position === "right") && inputAny.columnIndex == null) {
|
|
237167
|
+
const tableResolved = resolveTableLocator(editor, input2, "tables.insertColumn");
|
|
237168
|
+
const lastColumnIndex = Math.max(0, getTableColumnCount(tableResolved.candidate.node) - 1);
|
|
237169
|
+
const insertAtStart = inputAny.position === "first" || inputAny.position === "left";
|
|
237170
|
+
normalizedInput = {
|
|
237171
|
+
...input2,
|
|
237172
|
+
columnIndex: insertAtStart ? 0 : lastColumnIndex,
|
|
237173
|
+
position: insertAtStart ? "left" : "right"
|
|
237174
|
+
};
|
|
237175
|
+
}
|
|
237176
|
+
const { table: table2, columnIndex } = resolveColumnLocator(editor, normalizedInput, "tables.insertColumn");
|
|
236552
237177
|
if (options?.dryRun)
|
|
236553
237178
|
return buildTableSuccess(table2.address);
|
|
236554
237179
|
try {
|
|
236555
237180
|
const tr = editor.state.tr;
|
|
236556
237181
|
const tablePos = table2.candidate.pos;
|
|
236557
|
-
const
|
|
237182
|
+
const normalizedAny = normalizedInput;
|
|
237183
|
+
const count2 = normalizedAny.count ?? 1;
|
|
237184
|
+
const position4 = normalizedAny.position ?? "right";
|
|
236558
237185
|
let updatedGrid = table2.candidate.node.attrs.grid;
|
|
236559
237186
|
for (let c = 0;c < count2; c++) {
|
|
236560
|
-
const insertCol =
|
|
237187
|
+
const insertCol = position4 === "left" ? columnIndex + c : columnIndex + 1 + c;
|
|
236561
237188
|
addColumnToTable(tr, tablePos, insertCol);
|
|
236562
237189
|
updatedGrid = insertGridColumnWidth(updatedGrid, insertCol) ?? updatedGrid;
|
|
236563
237190
|
}
|
|
@@ -237164,32 +237791,28 @@ function tablesMergeCellsAdapter(editor, input2, options) {
|
|
|
237164
237791
|
return toTableFailure("INVALID_TARGET", "Cell merge could not be applied.");
|
|
237165
237792
|
}
|
|
237166
237793
|
}
|
|
237167
|
-
function
|
|
237168
|
-
|
|
237169
|
-
|
|
237170
|
-
}
|
|
237171
|
-
function resolveUnmergeInput(editor, input2) {
|
|
237172
|
-
if (!hasDefinedUnmergeCoordinates(input2))
|
|
237173
|
-
return resolveCellLocator(editor, input2, "tables.unmergeCells");
|
|
237794
|
+
function resolveCellOrTableScopedInput(editor, input2, operationName) {
|
|
237795
|
+
if (!(input2.rowIndex != null && input2.columnIndex != null))
|
|
237796
|
+
return resolveCellLocator(editor, input2, operationName);
|
|
237174
237797
|
const target = input2.target;
|
|
237175
237798
|
if (target && typeof target === "object" && !Array.isArray(target)) {
|
|
237176
237799
|
const blockTarget = target;
|
|
237177
237800
|
if (blockTarget.kind === "block" && blockTarget.nodeType === "table")
|
|
237178
|
-
return resolveTableScopedCellLocator(editor, input2,
|
|
237179
|
-
return resolveCellLocator(editor, { target },
|
|
237801
|
+
return resolveTableScopedCellLocator(editor, input2, operationName);
|
|
237802
|
+
return resolveCellLocator(editor, { target }, operationName);
|
|
237180
237803
|
}
|
|
237181
237804
|
const nodeId = input2.nodeId;
|
|
237182
237805
|
if (typeof nodeId === "string") {
|
|
237183
237806
|
const candidate = findBlockByNodeIdOnly(getBlockIndex(editor), nodeId);
|
|
237184
237807
|
if (!candidate)
|
|
237185
|
-
throw new DocumentApiAdapterError("TARGET_NOT_FOUND",
|
|
237186
|
-
return candidate.nodeType === "table" ? resolveTableScopedCellLocator(editor, input2,
|
|
237808
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `${operationName}: target was not found.`, { target: nodeId });
|
|
237809
|
+
return candidate.nodeType === "table" ? resolveTableScopedCellLocator(editor, input2, operationName) : resolveCellLocator(editor, { nodeId }, operationName);
|
|
237187
237810
|
}
|
|
237188
|
-
return resolveCellLocator(editor, {},
|
|
237811
|
+
return resolveCellLocator(editor, {}, operationName);
|
|
237189
237812
|
}
|
|
237190
237813
|
function tablesUnmergeCellsAdapter(editor, input2, options) {
|
|
237191
237814
|
rejectTrackedMode("tables.unmergeCells", options);
|
|
237192
|
-
const { table: table2, cellPos, cellNode, rowIndex, columnIndex } =
|
|
237815
|
+
const { table: table2, cellPos, cellNode, rowIndex, columnIndex } = resolveCellOrTableScopedInput(editor, input2, "tables.unmergeCells");
|
|
237193
237816
|
const attrs = cellNode.attrs;
|
|
237194
237817
|
const colspan = attrs.colspan || 1;
|
|
237195
237818
|
const rowspan = attrs.rowspan || 1;
|
|
@@ -237355,6 +237978,65 @@ function tablesSetCellPropertiesAdapter(editor, input2, options) {
|
|
|
237355
237978
|
return toTableFailure("INVALID_TARGET", "Cell properties update could not be applied.");
|
|
237356
237979
|
}
|
|
237357
237980
|
}
|
|
237981
|
+
function buildSetCellTextParagraph(schema, text5) {
|
|
237982
|
+
const paragraphType = schema.nodes.paragraph;
|
|
237983
|
+
if (!paragraphType)
|
|
237984
|
+
return null;
|
|
237985
|
+
return text5.length === 0 ? paragraphType.createAndFill() : paragraphType.createAndFill(null, schema.text(text5));
|
|
237986
|
+
}
|
|
237987
|
+
function cellContentEqualsIgnoringIdentity(a2, b$1) {
|
|
237988
|
+
if (a2.type !== b$1.type)
|
|
237989
|
+
return false;
|
|
237990
|
+
if (a2.text !== b$1.text)
|
|
237991
|
+
return false;
|
|
237992
|
+
if (a2.marks.length !== b$1.marks.length)
|
|
237993
|
+
return false;
|
|
237994
|
+
for (let i4 = 0;i4 < a2.marks.length; i4++)
|
|
237995
|
+
if (!a2.marks[i4].eq(b$1.marks[i4]))
|
|
237996
|
+
return false;
|
|
237997
|
+
const aAttrs = a2.attrs;
|
|
237998
|
+
const bAttrs = b$1.attrs;
|
|
237999
|
+
const keys$1 = new Set([...Object.keys(aAttrs), ...Object.keys(bAttrs)]);
|
|
238000
|
+
for (const key2 of keys$1) {
|
|
238001
|
+
if (IDENTITY_BLOCK_ATTRS.has(key2))
|
|
238002
|
+
continue;
|
|
238003
|
+
if (JSON.stringify(aAttrs[key2]) !== JSON.stringify(bAttrs[key2]))
|
|
238004
|
+
return false;
|
|
238005
|
+
}
|
|
238006
|
+
if (a2.childCount !== b$1.childCount)
|
|
238007
|
+
return false;
|
|
238008
|
+
for (let i4 = 0;i4 < a2.childCount; i4++)
|
|
238009
|
+
if (!cellContentEqualsIgnoringIdentity(a2.child(i4), b$1.child(i4)))
|
|
238010
|
+
return false;
|
|
238011
|
+
return true;
|
|
238012
|
+
}
|
|
238013
|
+
function tablesSetCellTextAdapter(editor, input2, options) {
|
|
238014
|
+
rejectTrackedMode("tables.setCellText", options);
|
|
238015
|
+
const { table: table2, cellPos, cellNode } = resolveCellOrTableScopedInput(editor, input2, "tables.setCellText");
|
|
238016
|
+
const candidateParagraph = buildSetCellTextParagraph(editor.state.schema, input2.text);
|
|
238017
|
+
if (!candidateParagraph)
|
|
238018
|
+
return toTableFailure("INVALID_TARGET", "tables.setCellText: paragraph node type is unavailable.");
|
|
238019
|
+
try {
|
|
238020
|
+
const tr = editor.state.tr;
|
|
238021
|
+
const cellStart = cellPos + 1;
|
|
238022
|
+
const cellEnd = cellStart + cellNode.content.size;
|
|
238023
|
+
tr.replaceWith(cellStart, cellEnd, candidateParagraph);
|
|
238024
|
+
const stateApply = editor.state.apply;
|
|
238025
|
+
if (typeof stateApply === "function") {
|
|
238026
|
+
const projectedCell = stateApply.call(editor.state, tr).doc.nodeAt(cellPos);
|
|
238027
|
+
if (projectedCell && cellContentEqualsIgnoringIdentity(cellNode, projectedCell))
|
|
238028
|
+
return toTableFailure("NO_OP", "tables.setCellText: cell already contains this text.");
|
|
238029
|
+
}
|
|
238030
|
+
if (options?.dryRun)
|
|
238031
|
+
return buildTableSuccess(table2.address);
|
|
238032
|
+
applyDirectMutationMeta(tr);
|
|
238033
|
+
editor.dispatch(tr);
|
|
238034
|
+
clearIndexCache(editor);
|
|
238035
|
+
return buildTableSuccess(resolvePostMutationTableAddress(editor, table2.candidate.pos, table2.address.nodeId, tr));
|
|
238036
|
+
} catch {
|
|
238037
|
+
return toTableFailure("INVALID_TARGET", "Cell text update could not be applied.");
|
|
238038
|
+
}
|
|
238039
|
+
}
|
|
237358
238040
|
function tablesSortAdapter(editor, input2, options) {
|
|
237359
238041
|
rejectTrackedMode("tables.sort", options);
|
|
237360
238042
|
const { candidate, address: address2 } = resolveTableLocator(editor, input2, "tables.sort");
|
|
@@ -237547,7 +238229,7 @@ function tablesSetBorderAdapter(editor, input2, options) {
|
|
|
237547
238229
|
currentBorders[input2.edge] = {
|
|
237548
238230
|
val: input2.lineStyle,
|
|
237549
238231
|
size: Math.round(input2.lineWeightPt * 8),
|
|
237550
|
-
color: input2.color
|
|
238232
|
+
color: normalizeColorInput(input2.color)
|
|
237551
238233
|
};
|
|
237552
238234
|
currentProps.borders = currentBorders;
|
|
237553
238235
|
const syncAttrs = resolved.scope === "table" ? syncExtractedTableAttrs(currentProps) : {};
|
|
@@ -237680,19 +238362,27 @@ function tablesApplyBorderPresetAdapter(editor, input2, options) {
|
|
|
237680
238362
|
}
|
|
237681
238363
|
}
|
|
237682
238364
|
function tablesSetShadingAdapter(editor, input2, options) {
|
|
238365
|
+
if (input2.color === null)
|
|
238366
|
+
return tablesClearShadingAdapter(editor, {
|
|
238367
|
+
target: input2.target,
|
|
238368
|
+
nodeId: input2.nodeId
|
|
238369
|
+
}, options);
|
|
238370
|
+
if (typeof input2.color !== "string")
|
|
238371
|
+
return toTableFailure("INVALID_INPUT", 'tables.setShading: color is required (hex string, "auto", or null to clear).');
|
|
237683
238372
|
rejectTrackedMode("tables.setShading", options);
|
|
237684
238373
|
const resolved = resolveTableOrCellTarget(editor, input2, "tables.setShading");
|
|
237685
238374
|
if (resolved.scope === "invalid")
|
|
237686
238375
|
return toTableFailure("INVALID_TARGET", "tables.setShading: target must be a table or tableCell.");
|
|
237687
238376
|
if (options?.dryRun)
|
|
237688
238377
|
return buildTableSuccess(resolved.address);
|
|
238378
|
+
const normalizedColor = normalizeColorInput(input2.color);
|
|
237689
238379
|
try {
|
|
237690
238380
|
const tr = editor.state.tr;
|
|
237691
238381
|
const currentAttrs = resolved.node.attrs;
|
|
237692
238382
|
const propsKey = resolved.scope === "table" ? "tableProperties" : "tableCellProperties";
|
|
237693
238383
|
const currentProps = { ...currentAttrs[propsKey] ?? {} };
|
|
237694
238384
|
currentProps.shading = {
|
|
237695
|
-
fill:
|
|
238385
|
+
fill: normalizedColor,
|
|
237696
238386
|
val: "clear",
|
|
237697
238387
|
color: "auto"
|
|
237698
238388
|
};
|
|
@@ -237702,38 +238392,8 @@ function tablesSetShadingAdapter(editor, input2, options) {
|
|
|
237702
238392
|
[propsKey]: currentProps,
|
|
237703
238393
|
...syncAttrs
|
|
237704
238394
|
});
|
|
237705
|
-
if (resolved.scope === "table")
|
|
237706
|
-
|
|
237707
|
-
const tableStart = resolved.pos + 1;
|
|
237708
|
-
const map$12 = TableMap.get(tableNode);
|
|
237709
|
-
const seen = /* @__PURE__ */ new Set;
|
|
237710
|
-
const mapFrom = tr.mapping.maps.length;
|
|
237711
|
-
for (let i4 = 0;i4 < map$12.map.length; i4++) {
|
|
237712
|
-
const relPos = map$12.map[i4];
|
|
237713
|
-
if (seen.has(relPos))
|
|
237714
|
-
continue;
|
|
237715
|
-
seen.add(relPos);
|
|
237716
|
-
const cellNode = tableNode.nodeAt(relPos);
|
|
237717
|
-
if (!cellNode)
|
|
237718
|
-
continue;
|
|
237719
|
-
const cellAttrs = cellNode.attrs;
|
|
237720
|
-
const cellProps = { ...cellAttrs.tableCellProperties ?? {} };
|
|
237721
|
-
cellProps.shading = {
|
|
237722
|
-
fill: input2.color,
|
|
237723
|
-
val: "clear",
|
|
237724
|
-
color: "auto"
|
|
237725
|
-
};
|
|
237726
|
-
const nextCellAttrs = {
|
|
237727
|
-
...cellAttrs,
|
|
237728
|
-
tableCellProperties: cellProps
|
|
237729
|
-
};
|
|
237730
|
-
if (input2.color === "auto")
|
|
237731
|
-
delete nextCellAttrs.background;
|
|
237732
|
-
else
|
|
237733
|
-
nextCellAttrs.background = { color: input2.color };
|
|
237734
|
-
tr.setNodeMarkup(tr.mapping.slice(mapFrom).map(tableStart + relPos), null, nextCellAttrs);
|
|
237735
|
-
}
|
|
237736
|
-
}
|
|
238395
|
+
if (resolved.scope === "table")
|
|
238396
|
+
applyShadingToCells(tr, resolved.node, resolved.pos + 1, normalizedColor);
|
|
237737
238397
|
applyDirectMutationMeta(tr);
|
|
237738
238398
|
editor.dispatch(tr);
|
|
237739
238399
|
clearIndexCache(editor);
|
|
@@ -237959,11 +238619,17 @@ function writeTableLook(currentLook, patch3) {
|
|
|
237959
238619
|
delete result.val;
|
|
237960
238620
|
return result;
|
|
237961
238621
|
}
|
|
238622
|
+
function normalizeColorInput(color2) {
|
|
238623
|
+
if (color2 === "auto")
|
|
238624
|
+
return "auto";
|
|
238625
|
+
const stripped = color2.startsWith("#") ? color2.slice(1) : color2;
|
|
238626
|
+
return (stripped.length === 3 ? stripped[0] + stripped[0] + stripped[1] + stripped[1] + stripped[2] + stripped[2] : stripped).toUpperCase();
|
|
238627
|
+
}
|
|
237962
238628
|
function normalizeBorderSpecFromApi(spec) {
|
|
237963
238629
|
return {
|
|
237964
238630
|
val: spec.lineStyle,
|
|
237965
238631
|
size: Math.round(spec.lineWeightPt * 8),
|
|
237966
|
-
color: spec.color
|
|
238632
|
+
color: normalizeColorInput(spec.color)
|
|
237967
238633
|
};
|
|
237968
238634
|
}
|
|
237969
238635
|
function normalizeBorderSpecToApi(border) {
|
|
@@ -238244,6 +238910,57 @@ function tablesSetTableOptionsAdapter(editor, input2, options) {
|
|
|
238244
238910
|
return toTableFailure("INVALID_TARGET", "Table options could not be applied.");
|
|
238245
238911
|
}
|
|
238246
238912
|
}
|
|
238913
|
+
function tablesApplyPresetAdapter(editor, input2, options) {
|
|
238914
|
+
rejectTrackedMode("tables.applyPreset", options);
|
|
238915
|
+
const { candidate, address: address2 } = resolveTableLocator(editor, input2, "tables.applyPreset");
|
|
238916
|
+
if (options?.dryRun)
|
|
238917
|
+
return buildTableSuccess(address2);
|
|
238918
|
+
const spec = buildPresetSpec(input2.preset, input2.accentColor);
|
|
238919
|
+
if (!spec)
|
|
238920
|
+
return toTableFailure("INVALID_TARGET", `tables.applyPreset: unknown preset "${input2.preset}".`);
|
|
238921
|
+
try {
|
|
238922
|
+
const tr = editor.state.tr;
|
|
238923
|
+
const tableNode = candidate.node;
|
|
238924
|
+
const tablePos = candidate.pos;
|
|
238925
|
+
const currentAttrs = tableNode.attrs;
|
|
238926
|
+
const currentTableProps = { ...currentAttrs.tableProperties ?? {} };
|
|
238927
|
+
currentTableProps.borders = buildOoxmlBorderPatch(currentTableProps.borders ?? {}, spec.borders);
|
|
238928
|
+
if (Object.keys(spec.styleOptions).length > 0) {
|
|
238929
|
+
const updatedLook = { ...currentTableProps.tblLook ?? { ...WORD_DEFAULT_TBL_LOOK } };
|
|
238930
|
+
for (const [flag, value] of Object.entries(spec.styleOptions)) {
|
|
238931
|
+
if (value === undefined)
|
|
238932
|
+
continue;
|
|
238933
|
+
const ooxmlKey = resolveStyleOptionFlag(flag);
|
|
238934
|
+
updatedLook[ooxmlKey] = INVERTED_FLAGS.has(flag) ? !value : value;
|
|
238935
|
+
}
|
|
238936
|
+
currentTableProps.tblLook = updatedLook;
|
|
238937
|
+
}
|
|
238938
|
+
tr.setNodeMarkup(tablePos, null, {
|
|
238939
|
+
...currentAttrs,
|
|
238940
|
+
tableProperties: currentTableProps,
|
|
238941
|
+
...syncExtractedTableAttrs(currentTableProps)
|
|
238942
|
+
});
|
|
238943
|
+
const patchEntries = Object.entries(spec.borders);
|
|
238944
|
+
for (const [edge, value] of patchEntries) {
|
|
238945
|
+
if (value === undefined)
|
|
238946
|
+
continue;
|
|
238947
|
+
if (!isBoundaryEdge(edge))
|
|
238948
|
+
continue;
|
|
238949
|
+
applyTableEdgeToCellBorders(tr, tablePos, tableNode, edge, value === null ? { ...CLEARED_BORDER_OOXML } : normalizeBorderSpecFromApi(value));
|
|
238950
|
+
}
|
|
238951
|
+
if (spec.headerRowFill && tableNode.childCount > 0) {
|
|
238952
|
+
const map$12 = TableMap.get(tableNode);
|
|
238953
|
+
const headerCellPositions = map$12.map.slice(0, map$12.width);
|
|
238954
|
+
applyShadingToCells(tr, tableNode, tablePos + 1, spec.headerRowFill, headerCellPositions);
|
|
238955
|
+
}
|
|
238956
|
+
applyDirectMutationMeta(tr);
|
|
238957
|
+
editor.dispatch(tr);
|
|
238958
|
+
clearIndexCache(editor);
|
|
238959
|
+
return buildTableSuccess(resolvePostMutationTableAddress(editor, tablePos, address2.nodeId, tr));
|
|
238960
|
+
} catch {
|
|
238961
|
+
return toTableFailure("INVALID_TARGET", "Table preset could not be applied.");
|
|
238962
|
+
}
|
|
238963
|
+
}
|
|
238247
238964
|
function resolveCreatedTable(editor, tableId) {
|
|
238248
238965
|
const index2 = getBlockIndex(editor);
|
|
238249
238966
|
const resolved = index2.byId.get(`table:${tableId}`);
|
|
@@ -239496,6 +240213,9 @@ function tablesSplitCellWrapper(editor, input2, options) {
|
|
|
239496
240213
|
function tablesSetCellPropertiesWrapper(editor, input2, options) {
|
|
239497
240214
|
return executeTableCommand(editor, "tables.setCellProperties", tablesSetCellPropertiesAdapter, input2, options);
|
|
239498
240215
|
}
|
|
240216
|
+
function tablesSetCellTextWrapper(editor, input2, options) {
|
|
240217
|
+
return executeTableCommand(editor, "tables.setCellText", tablesSetCellTextAdapter, input2, options);
|
|
240218
|
+
}
|
|
239499
240219
|
function tablesSortWrapper(editor, input2, options) {
|
|
239500
240220
|
return executeTableCommand(editor, "tables.sort", tablesSortAdapter, input2, options);
|
|
239501
240221
|
}
|
|
@@ -239547,6 +240267,9 @@ function tablesSetBordersWrapper(editor, input2, options) {
|
|
|
239547
240267
|
function tablesSetTableOptionsWrapper(editor, input2, options) {
|
|
239548
240268
|
return executeTableCommand(editor, "tables.setTableOptions", tablesSetTableOptionsAdapter, input2, options);
|
|
239549
240269
|
}
|
|
240270
|
+
function tablesApplyPresetWrapper(editor, input2, options) {
|
|
240271
|
+
return executeTableCommand(editor, "tables.applyPreset", tablesApplyPresetAdapter, input2, options);
|
|
240272
|
+
}
|
|
239550
240273
|
function getRootPresentationHistoryOwner(editor) {
|
|
239551
240274
|
const withPresentation = editor;
|
|
239552
240275
|
const presentationEditor = withPresentation.presentationEditor ?? withPresentation._presentationEditor ?? null;
|
|
@@ -248327,6 +249050,7 @@ function assembleDocumentApiAdapters(editor) {
|
|
|
248327
249050
|
create: (input2, options) => listsCreateWrapper(editor, input2, options),
|
|
248328
249051
|
attach: (input2, options) => listsAttachWrapper(editor, input2, options),
|
|
248329
249052
|
detach: (input2, options) => listsDetachWrapper(editor, input2, options),
|
|
249053
|
+
delete: (input2, options) => listsDeleteWrapper(editor, input2, options),
|
|
248330
249054
|
indent: (input2, options) => listsIndentWrapper(editor, input2, options),
|
|
248331
249055
|
outdent: (input2, options) => listsOutdentWrapper(editor, input2, options),
|
|
248332
249056
|
join: (input2, options) => listsJoinWrapper(editor, input2, options),
|
|
@@ -248403,6 +249127,7 @@ function assembleDocumentApiAdapters(editor) {
|
|
|
248403
249127
|
unmergeCells: (input2, options) => tablesUnmergeCellsWrapper(editor, input2, options),
|
|
248404
249128
|
splitCell: (input2, options) => tablesSplitCellWrapper(editor, input2, options),
|
|
248405
249129
|
setCellProperties: (input2, options) => tablesSetCellPropertiesWrapper(editor, input2, options),
|
|
249130
|
+
setCellText: (input2, options) => tablesSetCellTextWrapper(editor, input2, options),
|
|
248406
249131
|
sort: (input2, options) => tablesSortWrapper(editor, input2, options),
|
|
248407
249132
|
setAltText: (input2, options) => tablesSetAltTextWrapper(editor, input2, options),
|
|
248408
249133
|
setStyle: (input2, options) => tablesSetStyleWrapper(editor, input2, options),
|
|
@@ -248420,6 +249145,7 @@ function assembleDocumentApiAdapters(editor) {
|
|
|
248420
249145
|
applyStyle: (input2, options) => tablesApplyStyleWrapper(editor, input2, options),
|
|
248421
249146
|
setBorders: (input2, options) => tablesSetBordersWrapper(editor, input2, options),
|
|
248422
249147
|
setTableOptions: (input2, options) => tablesSetTableOptionsWrapper(editor, input2, options),
|
|
249148
|
+
applyPreset: (input2, options) => tablesApplyPresetWrapper(editor, input2, options),
|
|
248423
249149
|
get: (input2) => tablesGetAdapter(editor, input2),
|
|
248424
249150
|
getCells: (input2) => tablesGetCellsAdapter(editor, input2),
|
|
248425
249151
|
getProperties: (input2) => tablesGetPropertiesAdapter(editor, input2),
|
|
@@ -284508,7 +285234,7 @@ var Node$13 = class Node$14 {
|
|
|
284508
285234
|
listener(snapshot2);
|
|
284509
285235
|
} catch {}
|
|
284510
285236
|
}
|
|
284511
|
-
}, TRACK_MARK_TYPE_BY_NAME, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, SYMBOL_FONT_NAMES, RFONTS_FAMILY_ATTRS, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, COMMENT_MARK_NAME2 = "commentMark", TRACK_CHANGE_MARK_NAMES, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, BatchHistoryAdapter = class {
|
|
285237
|
+
}, TRACK_MARK_TYPE_BY_NAME, EMITTABLE_BLOCK_TYPES, SDT_BLOCK_NODE_NAMES, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, HEADING_PATTERN, OOXML_DEFAULT_FONT_SIZE_PT = 10, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, SYMBOL_FONT_NAMES, RFONTS_FAMILY_ATTRS, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, PRESET_KIND_MAP, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, _setValueDelegate, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES$1, COMMENT_MARK_NAME2 = "commentMark", TRACK_CHANGE_MARK_NAMES, POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART$1 = "word/settings.xml", PRESET_GREY = "999999", PRESET_BLACK = "000000", STATIC_PRESETS, IDENTITY_BLOCK_ATTRS, WORD_DEFAULT_TBL_LOOK, FLAG_TO_OOXML_KEY, INVERTED_FLAGS, XML_KEY_TO_STYLE_OPTION, CLEARED_BORDER_OOXML, TABLE_MARGIN_KEY_GROUPS, TABLE_ADAPTER_DISPATCH, ROW_TARGETED_TABLE_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, BatchHistoryAdapter = class {
|
|
284512
285238
|
#done = [];
|
|
284513
285239
|
#redone = [];
|
|
284514
285240
|
#listeners = /* @__PURE__ */ new Set;
|
|
@@ -300629,12 +301355,12 @@ menclose::after {
|
|
|
300629
301355
|
return;
|
|
300630
301356
|
console.log(...args$1);
|
|
300631
301357
|
}, 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;
|
|
300632
|
-
var
|
|
301358
|
+
var init_src_BE_DiVIy_es = __esm(() => {
|
|
300633
301359
|
init_rolldown_runtime_Bg48TavK_es();
|
|
300634
|
-
|
|
301360
|
+
init_SuperConverter_C9I74vtg_es();
|
|
300635
301361
|
init_jszip_C49i9kUs_es();
|
|
300636
301362
|
init_uuid_qzgm05fK_es();
|
|
300637
|
-
|
|
301363
|
+
init_create_headless_toolbar_B7nufamW_es();
|
|
300638
301364
|
init_constants_DrU4EASo_es();
|
|
300639
301365
|
init_dist_B8HfvhaK_es();
|
|
300640
301366
|
init_unified_Dsuw2be5_es();
|
|
@@ -323716,6 +324442,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
323716
324442
|
"lists.create": [],
|
|
323717
324443
|
"lists.attach": [],
|
|
323718
324444
|
"lists.detach": [],
|
|
324445
|
+
"lists.delete": [],
|
|
323719
324446
|
"lists.join": [],
|
|
323720
324447
|
"lists.separate": [],
|
|
323721
324448
|
"lists.setLevel": [],
|
|
@@ -324117,6 +324844,111 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
324117
324844
|
]);
|
|
324118
324845
|
POINTS_TO_PIXELS = 96 / 72;
|
|
324119
324846
|
PIXELS_TO_TWIPS = 1440 / 96;
|
|
324847
|
+
STATIC_PRESETS = {
|
|
324848
|
+
grid: {
|
|
324849
|
+
borders: {
|
|
324850
|
+
top: {
|
|
324851
|
+
lineStyle: "single",
|
|
324852
|
+
lineWeightPt: 1,
|
|
324853
|
+
color: PRESET_BLACK
|
|
324854
|
+
},
|
|
324855
|
+
bottom: {
|
|
324856
|
+
lineStyle: "single",
|
|
324857
|
+
lineWeightPt: 1,
|
|
324858
|
+
color: PRESET_BLACK
|
|
324859
|
+
},
|
|
324860
|
+
left: {
|
|
324861
|
+
lineStyle: "single",
|
|
324862
|
+
lineWeightPt: 1,
|
|
324863
|
+
color: PRESET_BLACK
|
|
324864
|
+
},
|
|
324865
|
+
right: {
|
|
324866
|
+
lineStyle: "single",
|
|
324867
|
+
lineWeightPt: 1,
|
|
324868
|
+
color: PRESET_BLACK
|
|
324869
|
+
},
|
|
324870
|
+
insideH: {
|
|
324871
|
+
lineStyle: "single",
|
|
324872
|
+
lineWeightPt: 1,
|
|
324873
|
+
color: PRESET_BLACK
|
|
324874
|
+
},
|
|
324875
|
+
insideV: {
|
|
324876
|
+
lineStyle: "single",
|
|
324877
|
+
lineWeightPt: 1,
|
|
324878
|
+
color: PRESET_BLACK
|
|
324879
|
+
}
|
|
324880
|
+
},
|
|
324881
|
+
styleOptions: {},
|
|
324882
|
+
headerRowFill: null
|
|
324883
|
+
},
|
|
324884
|
+
minimal: {
|
|
324885
|
+
borders: {
|
|
324886
|
+
top: null,
|
|
324887
|
+
left: null,
|
|
324888
|
+
right: null,
|
|
324889
|
+
insideV: null,
|
|
324890
|
+
insideH: {
|
|
324891
|
+
lineStyle: "single",
|
|
324892
|
+
lineWeightPt: 0.25,
|
|
324893
|
+
color: PRESET_GREY
|
|
324894
|
+
},
|
|
324895
|
+
bottom: {
|
|
324896
|
+
lineStyle: "single",
|
|
324897
|
+
lineWeightPt: 1,
|
|
324898
|
+
color: PRESET_BLACK
|
|
324899
|
+
}
|
|
324900
|
+
},
|
|
324901
|
+
styleOptions: {},
|
|
324902
|
+
headerRowFill: null
|
|
324903
|
+
},
|
|
324904
|
+
striped: {
|
|
324905
|
+
borders: {
|
|
324906
|
+
top: {
|
|
324907
|
+
lineStyle: "single",
|
|
324908
|
+
lineWeightPt: 0.5,
|
|
324909
|
+
color: PRESET_GREY
|
|
324910
|
+
},
|
|
324911
|
+
bottom: {
|
|
324912
|
+
lineStyle: "single",
|
|
324913
|
+
lineWeightPt: 0.5,
|
|
324914
|
+
color: PRESET_GREY
|
|
324915
|
+
},
|
|
324916
|
+
left: {
|
|
324917
|
+
lineStyle: "single",
|
|
324918
|
+
lineWeightPt: 0.5,
|
|
324919
|
+
color: PRESET_GREY
|
|
324920
|
+
},
|
|
324921
|
+
right: {
|
|
324922
|
+
lineStyle: "single",
|
|
324923
|
+
lineWeightPt: 0.5,
|
|
324924
|
+
color: PRESET_GREY
|
|
324925
|
+
},
|
|
324926
|
+
insideH: {
|
|
324927
|
+
lineStyle: "single",
|
|
324928
|
+
lineWeightPt: 0.5,
|
|
324929
|
+
color: PRESET_GREY
|
|
324930
|
+
},
|
|
324931
|
+
insideV: {
|
|
324932
|
+
lineStyle: "single",
|
|
324933
|
+
lineWeightPt: 0.5,
|
|
324934
|
+
color: PRESET_GREY
|
|
324935
|
+
}
|
|
324936
|
+
},
|
|
324937
|
+
styleOptions: { bandedRows: true },
|
|
324938
|
+
headerRowFill: null
|
|
324939
|
+
}
|
|
324940
|
+
};
|
|
324941
|
+
IDENTITY_BLOCK_ATTRS = new Set([
|
|
324942
|
+
"sdBlockId",
|
|
324943
|
+
"sdBlockRev",
|
|
324944
|
+
"paraId",
|
|
324945
|
+
"textId",
|
|
324946
|
+
"rsidR",
|
|
324947
|
+
"rsidRDefault",
|
|
324948
|
+
"rsidP",
|
|
324949
|
+
"rsidRPr",
|
|
324950
|
+
"rsidDel"
|
|
324951
|
+
]);
|
|
324120
324952
|
WORD_DEFAULT_TBL_LOOK = {
|
|
324121
324953
|
firstRow: true,
|
|
324122
324954
|
lastRow: false,
|
|
@@ -338272,11 +339104,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338272
339104
|
];
|
|
338273
339105
|
});
|
|
338274
339106
|
|
|
338275
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
339107
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-CmG_8rWP.es.js
|
|
338276
339108
|
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;
|
|
338277
|
-
var
|
|
338278
|
-
|
|
338279
|
-
|
|
339109
|
+
var init_create_super_doc_ui_CmG_8rWP_es = __esm(() => {
|
|
339110
|
+
init_SuperConverter_C9I74vtg_es();
|
|
339111
|
+
init_create_headless_toolbar_B7nufamW_es();
|
|
338280
339112
|
MOD_ALIASES = new Set([
|
|
338281
339113
|
"Mod",
|
|
338282
339114
|
"Meta",
|
|
@@ -338318,16 +339150,16 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
338318
339150
|
|
|
338319
339151
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
338320
339152
|
var init_super_editor_es = __esm(() => {
|
|
338321
|
-
|
|
338322
|
-
|
|
339153
|
+
init_src_BE_DiVIy_es();
|
|
339154
|
+
init_SuperConverter_C9I74vtg_es();
|
|
338323
339155
|
init_jszip_C49i9kUs_es();
|
|
338324
339156
|
init_xml_js_CqGKpaft_es();
|
|
338325
|
-
|
|
339157
|
+
init_create_headless_toolbar_B7nufamW_es();
|
|
338326
339158
|
init_constants_DrU4EASo_es();
|
|
338327
339159
|
init_dist_B8HfvhaK_es();
|
|
338328
339160
|
init_unified_Dsuw2be5_es();
|
|
338329
339161
|
init_DocxZipper_Dh4RtvcE_es();
|
|
338330
|
-
|
|
339162
|
+
init_create_super_doc_ui_CmG_8rWP_es();
|
|
338331
339163
|
init_ui_CGB3qmy3_es();
|
|
338332
339164
|
init_eventemitter3_UwU_CLPU_es();
|
|
338333
339165
|
init_errors_C_DoKMoN_es();
|