@superdoc-dev/sdk 1.6.0-next.5 → 1.6.0-next.50
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/generated/client.d.ts +5743 -16
- package/dist/generated/client.d.ts.map +1 -1
- package/dist/generated/contract.cjs +2577 -486
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js +2580 -486
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tools.cjs +53 -5
- package/dist/tools.d.ts +12 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +52 -5
- package/package.json +6 -6
- package/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/__pycache__/intent_dispatch_generated.cpython-312.pyc +0 -0
- package/tools/catalog.json +584 -79
- package/tools/prompt-templates/system-prompt-core.md +276 -0
- package/tools/prompt-templates/system-prompt-mcp-header.md +50 -0
- package/tools/prompt-templates/system-prompt-sdk-header.md +5 -0
- package/tools/system-prompt-mcp.md +325 -0
- package/tools/system-prompt.md +101 -15
- package/tools/tools-policy.json +1 -1
- package/tools/tools.anthropic.json +584 -79
- package/tools/tools.generic.json +584 -79
- package/tools/tools.openai.json +584 -79
- package/tools/tools.vercel.json +584 -79
package/tools/tools.openai.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "function",
|
|
6
6
|
"function": {
|
|
7
7
|
"name": "superdoc_get_content",
|
|
8
|
-
"description": "Read document content in various formats. Call this first in any workflow to understand document structure before making edits. Action \"blocks\" returns structured block data with nodeId, nodeType, textPreview, formatting properties (fontFamily, fontSize, color, bold, underline, alignment), and ref handles for immediate use with superdoc_edit or superdoc_format. Action \"text\" and \"markdown\" return the full document as plain text or Markdown. Action \"html\" returns HTML. Action \"info\" returns document metadata: word count, paragraph count, page count, outline, available styles, and capability flags. The \"blocks\" action supports pagination via \"offset\" and \"limit\", and filtering via \"nodeTypes\". Other actions ignore these parameters. This tool never modifies the document. Do NOT call superdoc_edit or superdoc_format without first reading blocks to get valid refs and formatting reference values.",
|
|
8
|
+
"description": "Read document content in various formats. Call this first in any workflow to understand document structure before making edits. Action \"blocks\" returns structured block data with nodeId, nodeType, textPreview, optional full text when includeText:true, formatting properties (fontFamily, fontSize, color, bold, underline, alignment), and ref handles for immediate use with superdoc_edit or superdoc_format. When you need to evaluate or rewrite existing paragraphs or clauses, prefer action \"blocks\" with includeText:true so you can identify the correct block and then target it by nodeId. Action \"text\" and \"markdown\" return the full document as plain text or Markdown. Action \"html\" returns HTML. Action \"info\" returns document metadata: word count, paragraph count, page count, outline, available styles, and capability flags. The \"blocks\" action supports pagination via \"offset\" and \"limit\", and filtering via \"nodeTypes\". Other actions ignore these parameters. This tool never modifies the document. Do NOT call superdoc_edit or superdoc_format without first reading blocks to get valid refs and formatting reference values.",
|
|
9
9
|
"parameters": {
|
|
10
10
|
"type": "object",
|
|
11
11
|
"properties": {
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"description": "Filter by block types (e.g. ['paragraph', 'heading']). Omit for all types. Only for action 'blocks'. Omit for other actions."
|
|
52
|
+
},
|
|
53
|
+
"includeText": {
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"description": "When true, includes the full flattened block text in each block entry. Only for action 'blocks'. Omit for other actions."
|
|
52
56
|
}
|
|
53
57
|
},
|
|
54
58
|
"required": [
|
|
@@ -62,7 +66,7 @@
|
|
|
62
66
|
"type": "function",
|
|
63
67
|
"function": {
|
|
64
68
|
"name": "superdoc_edit",
|
|
65
|
-
"description": "
|
|
69
|
+
"description": "The primary tool for inserting content into documents. ALWAYS use action \"insert\" with type \"markdown\" to create headings, paragraphs, or any block content — this is faster and creates proper document structure in one call. Do NOT use superdoc_create for headings or paragraphs. The markdown parser creates headings from # markers (# = Heading1, ## = Heading2), bold from **text**, italic from *text*, and numbered/bullet lists. Position markdown inserts with \"target\" (a BlockNodeAddress like {kind:\"block\", nodeType, nodeId}) and \"placement\" (before, after, insideStart, insideEnd). Without a target, content appends at the end of the document. IMPORTANT: After a markdown insert, analyze the document context (what kind of document, how titles and body text are styled) and follow up with ONE superdoc_mutations call to format inserted blocks so they look like they belong. Each format.apply step accepts \"inline\" (fontFamily, fontSize, bold, underline, color), \"alignment\", and \"scope\" in the same step. Use scope: \"block\" so formatting covers the entire paragraph. Copy the exact property values from the existing get_content blocks (fontFamily, fontSize, color, alignment, bold, underline). Do NOT invent values — use what the blocks show. Also supports replace, delete, and undo/redo. For replace and delete, pass a \"ref\" from superdoc_search or superdoc_get_content blocks. A search ref covers only the matched substring; a block ref covers the entire block text, so use block refs when rewriting or shortening whole paragraphs. For multi-step redlines or whole-clause rewrites, prefer superdoc_mutations with where:{by:\"block\", nodeType, nodeId} from superdoc_get_content action \"blocks\" includeText:true rather than relying on text selectors. Refs expire after any mutation; always re-search before the next edit. For 2+ edits that must succeed or fail atomically, use superdoc_mutations instead. Supports \"dryRun\" to preview changes and \"changeMode: tracked\" to record edits as tracked changes (not supported for markdown/html inserts). Do NOT build \"target\" objects manually when a ref is available; prefer \"ref\" for simpler, more reliable targeting.",
|
|
66
70
|
"parameters": {
|
|
67
71
|
"type": "object",
|
|
68
72
|
"properties": {
|
|
@@ -365,7 +369,7 @@
|
|
|
365
369
|
"type": "function",
|
|
366
370
|
"function": {
|
|
367
371
|
"name": "superdoc_format",
|
|
368
|
-
"description": "Change text and paragraph formatting.
|
|
372
|
+
"description": "Change text and paragraph formatting. To format multiple items at once, use superdoc_mutations with format.apply steps instead of calling this tool repeatedly. Use require \"all\" with a node selector to format every heading or paragraph in one batch. Use this tool for single-item formatting when you have a valid ref or nodeId. Action \"inline\" applies character formatting (bold, italic, underline, color, fontSize, fontFamily, highlight, strike, vertAlign) to a text range via \"ref\". Action \"set_style\" applies a named paragraph style by styleId (get available styles from superdoc_get_content info). Actions \"set_alignment\", \"set_indentation\", \"set_spacing\", \"set_direction\", and \"set_flow_options\" change paragraph-level properties and require a block target: {kind:\"block\", nodeType:\"paragraph\", nodeId:\"<nodeId>\"}, NOT a ref. Use \"set_flow_options\" with pageBreakBefore:true to start a paragraph on a new page. Supports \"dryRun\" and \"changeMode: tracked\" for inline formatting. Paragraph-level actions do NOT support tracked changes. Do NOT use a search ref for paragraph-level actions; they require a block target with nodeId. Do NOT use {kind:\"block\", start:{kind:\"nodeEdge\",...}} or selection-like structures for paragraph actions. ONLY {kind:\"block\", nodeType, nodeId} is accepted. Do NOT issue multiple superdoc_format calls in parallel; each call invalidates refs for subsequent calls.",
|
|
369
373
|
"parameters": {
|
|
370
374
|
"type": "object",
|
|
371
375
|
"properties": {
|
|
@@ -913,7 +917,7 @@
|
|
|
913
917
|
"type": "function",
|
|
914
918
|
"function": {
|
|
915
919
|
"name": "superdoc_create",
|
|
916
|
-
"description": "
|
|
920
|
+
"description": "IMPORTANT: For headings and paragraphs, use superdoc_edit with type \"markdown\" instead — it is faster, creates proper styles, and handles positioning via target + placement. Only use superdoc_create for tables or when markdown cannot express the content. Creates a single paragraph, heading, or table. Returns nodeId and ref for the created block. After creating, the returned ref is valid for ONE immediate superdoc_format call. For subsequent operations, re-fetch blocks with superdoc_get_content to get fresh refs (refs expire after any mutation). When the user asks for a \"heading\", use action \"heading\" with a level (default 1). Use action \"paragraph\" for regular body text. Position with \"at\": {kind:\"documentEnd\"} (default), {kind:\"documentStart\"}, or {kind:\"after\"/\"before\", target:{kind:\"block\", nodeType, nodeId}} for relative placement. When creating multiple items in sequence, use the previous response nodeId as the next \"at\" target to maintain correct ordering. Do NOT use newlines in \"text\" to create multiple paragraphs; call this tool separately for each one.",
|
|
917
921
|
"parameters": {
|
|
918
922
|
"type": "object",
|
|
919
923
|
"properties": {
|
|
@@ -1509,6 +1513,153 @@
|
|
|
1509
1513
|
"properties": {
|
|
1510
1514
|
"id": {
|
|
1511
1515
|
"type": "string"
|
|
1516
|
+
},
|
|
1517
|
+
"story": {
|
|
1518
|
+
"oneOf": [
|
|
1519
|
+
{
|
|
1520
|
+
"type": "object",
|
|
1521
|
+
"properties": {
|
|
1522
|
+
"kind": {
|
|
1523
|
+
"const": "story",
|
|
1524
|
+
"type": "string"
|
|
1525
|
+
},
|
|
1526
|
+
"storyType": {
|
|
1527
|
+
"const": "body",
|
|
1528
|
+
"type": "string"
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1531
|
+
"required": [
|
|
1532
|
+
"kind",
|
|
1533
|
+
"storyType"
|
|
1534
|
+
]
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"type": "object",
|
|
1538
|
+
"properties": {
|
|
1539
|
+
"kind": {
|
|
1540
|
+
"const": "story",
|
|
1541
|
+
"type": "string"
|
|
1542
|
+
},
|
|
1543
|
+
"storyType": {
|
|
1544
|
+
"const": "headerFooterSlot",
|
|
1545
|
+
"type": "string"
|
|
1546
|
+
},
|
|
1547
|
+
"section": {
|
|
1548
|
+
"type": "object",
|
|
1549
|
+
"properties": {
|
|
1550
|
+
"kind": {
|
|
1551
|
+
"const": "section",
|
|
1552
|
+
"type": "string"
|
|
1553
|
+
},
|
|
1554
|
+
"sectionId": {
|
|
1555
|
+
"type": "string"
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1558
|
+
"required": [
|
|
1559
|
+
"kind",
|
|
1560
|
+
"sectionId"
|
|
1561
|
+
]
|
|
1562
|
+
},
|
|
1563
|
+
"headerFooterKind": {
|
|
1564
|
+
"enum": [
|
|
1565
|
+
"header",
|
|
1566
|
+
"footer"
|
|
1567
|
+
]
|
|
1568
|
+
},
|
|
1569
|
+
"variant": {
|
|
1570
|
+
"enum": [
|
|
1571
|
+
"default",
|
|
1572
|
+
"first",
|
|
1573
|
+
"even"
|
|
1574
|
+
]
|
|
1575
|
+
},
|
|
1576
|
+
"resolution": {
|
|
1577
|
+
"enum": [
|
|
1578
|
+
"effective",
|
|
1579
|
+
"explicit"
|
|
1580
|
+
]
|
|
1581
|
+
},
|
|
1582
|
+
"onWrite": {
|
|
1583
|
+
"enum": [
|
|
1584
|
+
"materializeIfInherited",
|
|
1585
|
+
"editResolvedPart",
|
|
1586
|
+
"error"
|
|
1587
|
+
]
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1590
|
+
"required": [
|
|
1591
|
+
"kind",
|
|
1592
|
+
"storyType",
|
|
1593
|
+
"section",
|
|
1594
|
+
"headerFooterKind",
|
|
1595
|
+
"variant"
|
|
1596
|
+
]
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"type": "object",
|
|
1600
|
+
"properties": {
|
|
1601
|
+
"kind": {
|
|
1602
|
+
"const": "story",
|
|
1603
|
+
"type": "string"
|
|
1604
|
+
},
|
|
1605
|
+
"storyType": {
|
|
1606
|
+
"const": "headerFooterPart",
|
|
1607
|
+
"type": "string"
|
|
1608
|
+
},
|
|
1609
|
+
"refId": {
|
|
1610
|
+
"type": "string"
|
|
1611
|
+
}
|
|
1612
|
+
},
|
|
1613
|
+
"required": [
|
|
1614
|
+
"kind",
|
|
1615
|
+
"storyType",
|
|
1616
|
+
"refId"
|
|
1617
|
+
]
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"type": "object",
|
|
1621
|
+
"properties": {
|
|
1622
|
+
"kind": {
|
|
1623
|
+
"const": "story",
|
|
1624
|
+
"type": "string"
|
|
1625
|
+
},
|
|
1626
|
+
"storyType": {
|
|
1627
|
+
"const": "footnote",
|
|
1628
|
+
"type": "string"
|
|
1629
|
+
},
|
|
1630
|
+
"noteId": {
|
|
1631
|
+
"type": "string"
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
"required": [
|
|
1635
|
+
"kind",
|
|
1636
|
+
"storyType",
|
|
1637
|
+
"noteId"
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"type": "object",
|
|
1642
|
+
"properties": {
|
|
1643
|
+
"kind": {
|
|
1644
|
+
"const": "story",
|
|
1645
|
+
"type": "string"
|
|
1646
|
+
},
|
|
1647
|
+
"storyType": {
|
|
1648
|
+
"const": "endnote",
|
|
1649
|
+
"type": "string"
|
|
1650
|
+
},
|
|
1651
|
+
"noteId": {
|
|
1652
|
+
"type": "string"
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
"required": [
|
|
1656
|
+
"kind",
|
|
1657
|
+
"storyType",
|
|
1658
|
+
"noteId"
|
|
1659
|
+
]
|
|
1660
|
+
}
|
|
1661
|
+
],
|
|
1662
|
+
"description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes."
|
|
1512
1663
|
}
|
|
1513
1664
|
},
|
|
1514
1665
|
"required": [
|
|
@@ -1543,7 +1694,7 @@
|
|
|
1543
1694
|
"type": "function",
|
|
1544
1695
|
"function": {
|
|
1545
1696
|
"name": "superdoc_search",
|
|
1546
|
-
"description": "
|
|
1697
|
+
"description": "Find text patterns or nodes in the document and get ref handles for targeting edits and formatting. Refs expire after any mutation that changes the document. Re-search before the next edit when using individual tools (superdoc_edit, superdoc_format). Within a superdoc_mutations batch, selectors in \"where\" clauses resolve automatically at compile time; no manual re-searching needed between steps. Text search returns handle.ref covering only the matched substring. Node search finds blocks by type (paragraph, heading, table, listItem, etc.). The \"require\" parameter controls match cardinality: \"first\" returns one match, \"all\" returns every match, \"exactlyOne\" fails if not exactly one match. Supports scoping via \"within\" to search inside a single block. Do NOT use regex or markdown formatting markers (#, **, etc.) in search patterns; patterns are plain text only. Do NOT use this tool when you already have a ref from superdoc_get_content blocks or superdoc_create; use that ref directly.",
|
|
1547
1698
|
"parameters": {
|
|
1548
1699
|
"type": "object",
|
|
1549
1700
|
"properties": {
|
|
@@ -1701,7 +1852,7 @@
|
|
|
1701
1852
|
"type": "function",
|
|
1702
1853
|
"function": {
|
|
1703
1854
|
"name": "superdoc_mutations",
|
|
1704
|
-
"description": "All steps succeed or all fail; no partial application. Execute multiple
|
|
1855
|
+
"description": "All steps succeed or all fail; no partial application. Execute multiple operations atomically in one batch. Use this for any workflow needing 2+ changes. Supported step types: text (text.rewrite, text.insert, text.delete), format (format.apply), create (create.heading, create.paragraph, create.table), assert. Each step has an id, an op, a \"where\" clause for targeting ({by:\"select\", select:{...}, require:\"first\"|\"exactlyOne\"|\"all\"} or {by:\"ref\", ref:\"...\"} or {by:\"block\", nodeType:\"paragraph\", nodeId:\"...\"}), and \"args\" with operation-specific parameters. Use {by:\"block\", nodeType, nodeId} when you want to rewrite, delete, format, or anchor against a whole known block from superdoc_get_content action \"blocks\" without relying on text matching. For full-paragraph or full-clause rewrites, first call superdoc_get_content with action:\"blocks\" and includeText:true, then rewrite the matching block by nodeId. Use {by:\"select\"} only for substring edits, discovery, or insertion relative to a sentence fragment; do NOT use a shortened text selector to replace an entire known block. For create steps, \"where\" targets an existing anchor block and args.position (\"before\" or \"after\") controls placement. Sequential creates targeting the same anchor maintain correct order via internal position mapping. For format.apply with require \"all\", use a node selector to format every heading or paragraph at once: {by:\"select\", select:{type:\"node\", nodeType:\"heading\"}, require:\"all\"}. Selectors resolve at compile time (before execution). This means format.apply steps CANNOT target content created by earlier create steps in the same batch. Split creates and formatting into separate batches: first a mutations call with creates, then a mutations call with format.apply. Action \"preview\" dry-runs the plan. Action \"apply\" executes it. If a selector matches nothing, the failure reports the step id plus selector details so you can retry with a shorter or more distinctive anchor. Do NOT create two steps that target overlapping text in the same block; combine them into a single text.rewrite step.",
|
|
1705
1856
|
"parameters": {
|
|
1706
1857
|
"type": "object",
|
|
1707
1858
|
"properties": {
|
|
@@ -2092,6 +2243,36 @@
|
|
|
2092
2243
|
"by",
|
|
2093
2244
|
"target"
|
|
2094
2245
|
]
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
"type": "object",
|
|
2249
|
+
"properties": {
|
|
2250
|
+
"by": {
|
|
2251
|
+
"const": "block",
|
|
2252
|
+
"type": "string"
|
|
2253
|
+
},
|
|
2254
|
+
"nodeType": {
|
|
2255
|
+
"enum": [
|
|
2256
|
+
"paragraph",
|
|
2257
|
+
"heading",
|
|
2258
|
+
"listItem",
|
|
2259
|
+
"table",
|
|
2260
|
+
"tableRow",
|
|
2261
|
+
"tableCell",
|
|
2262
|
+
"tableOfContents",
|
|
2263
|
+
"image",
|
|
2264
|
+
"sdt"
|
|
2265
|
+
]
|
|
2266
|
+
},
|
|
2267
|
+
"nodeId": {
|
|
2268
|
+
"type": "string"
|
|
2269
|
+
}
|
|
2270
|
+
},
|
|
2271
|
+
"required": [
|
|
2272
|
+
"by",
|
|
2273
|
+
"nodeType",
|
|
2274
|
+
"nodeId"
|
|
2275
|
+
]
|
|
2095
2276
|
}
|
|
2096
2277
|
]
|
|
2097
2278
|
},
|
|
@@ -2242,53 +2423,102 @@
|
|
|
2242
2423
|
"type": "string"
|
|
2243
2424
|
},
|
|
2244
2425
|
"where": {
|
|
2245
|
-
"
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
"
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
{
|
|
2254
|
-
"
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
"
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2426
|
+
"oneOf": [
|
|
2427
|
+
{
|
|
2428
|
+
"type": "object",
|
|
2429
|
+
"properties": {
|
|
2430
|
+
"by": {
|
|
2431
|
+
"const": "select",
|
|
2432
|
+
"type": "string"
|
|
2433
|
+
},
|
|
2434
|
+
"select": {
|
|
2435
|
+
"oneOf": [
|
|
2436
|
+
{
|
|
2437
|
+
"type": "object",
|
|
2438
|
+
"properties": {
|
|
2439
|
+
"type": {
|
|
2440
|
+
"const": "text",
|
|
2441
|
+
"description": "Must be 'text' for text pattern search.",
|
|
2442
|
+
"type": "string"
|
|
2443
|
+
},
|
|
2444
|
+
"pattern": {
|
|
2445
|
+
"type": "string",
|
|
2446
|
+
"description": "Text or regex pattern to match."
|
|
2447
|
+
},
|
|
2448
|
+
"mode": {
|
|
2449
|
+
"description": "Match mode: 'contains' (substring) or 'regex'.",
|
|
2450
|
+
"enum": [
|
|
2451
|
+
"contains",
|
|
2452
|
+
"regex"
|
|
2453
|
+
]
|
|
2454
|
+
},
|
|
2455
|
+
"caseSensitive": {
|
|
2456
|
+
"type": "boolean",
|
|
2457
|
+
"description": "Case-sensitive matching. Default: false."
|
|
2458
|
+
}
|
|
2459
|
+
},
|
|
2460
|
+
"required": [
|
|
2461
|
+
"type",
|
|
2462
|
+
"pattern"
|
|
2270
2463
|
]
|
|
2271
2464
|
},
|
|
2272
|
-
|
|
2273
|
-
"type": "
|
|
2274
|
-
"
|
|
2465
|
+
{
|
|
2466
|
+
"type": "object",
|
|
2467
|
+
"properties": {
|
|
2468
|
+
"type": {
|
|
2469
|
+
"const": "node",
|
|
2470
|
+
"description": "Must be 'node' for node type search.",
|
|
2471
|
+
"type": "string"
|
|
2472
|
+
},
|
|
2473
|
+
"nodeType": {
|
|
2474
|
+
"description": "Block type to match (paragraph, heading, table, listItem, etc.).",
|
|
2475
|
+
"enum": [
|
|
2476
|
+
"paragraph",
|
|
2477
|
+
"heading",
|
|
2478
|
+
"listItem",
|
|
2479
|
+
"table",
|
|
2480
|
+
"tableRow",
|
|
2481
|
+
"tableCell",
|
|
2482
|
+
"tableOfContents",
|
|
2483
|
+
"image",
|
|
2484
|
+
"sdt",
|
|
2485
|
+
"run",
|
|
2486
|
+
"bookmark",
|
|
2487
|
+
"comment",
|
|
2488
|
+
"hyperlink",
|
|
2489
|
+
"footnoteRef",
|
|
2490
|
+
"endnoteRef",
|
|
2491
|
+
"crossRef",
|
|
2492
|
+
"indexEntry",
|
|
2493
|
+
"citation",
|
|
2494
|
+
"authorityEntry",
|
|
2495
|
+
"sequenceField",
|
|
2496
|
+
"tab",
|
|
2497
|
+
"lineBreak"
|
|
2498
|
+
]
|
|
2499
|
+
},
|
|
2500
|
+
"kind": {
|
|
2501
|
+
"description": "Filter: 'block' or 'inline'.",
|
|
2502
|
+
"enum": [
|
|
2503
|
+
"block",
|
|
2504
|
+
"inline"
|
|
2505
|
+
]
|
|
2506
|
+
}
|
|
2507
|
+
},
|
|
2508
|
+
"required": [
|
|
2509
|
+
"type"
|
|
2510
|
+
]
|
|
2275
2511
|
}
|
|
2276
|
-
},
|
|
2277
|
-
"required": [
|
|
2278
|
-
"type",
|
|
2279
|
-
"pattern"
|
|
2280
2512
|
]
|
|
2281
2513
|
},
|
|
2282
|
-
{
|
|
2514
|
+
"within": {
|
|
2283
2515
|
"type": "object",
|
|
2284
2516
|
"properties": {
|
|
2285
|
-
"
|
|
2286
|
-
"const": "
|
|
2287
|
-
"description": "Must be 'node' for node type search.",
|
|
2517
|
+
"kind": {
|
|
2518
|
+
"const": "block",
|
|
2288
2519
|
"type": "string"
|
|
2289
2520
|
},
|
|
2290
2521
|
"nodeType": {
|
|
2291
|
-
"description": "Block type to match (paragraph, heading, table, listItem, etc.).",
|
|
2292
2522
|
"enum": [
|
|
2293
2523
|
"paragraph",
|
|
2294
2524
|
"heading",
|
|
@@ -2298,40 +2528,253 @@
|
|
|
2298
2528
|
"tableCell",
|
|
2299
2529
|
"tableOfContents",
|
|
2300
2530
|
"image",
|
|
2301
|
-
"sdt"
|
|
2302
|
-
"run",
|
|
2303
|
-
"bookmark",
|
|
2304
|
-
"comment",
|
|
2305
|
-
"hyperlink",
|
|
2306
|
-
"footnoteRef",
|
|
2307
|
-
"endnoteRef",
|
|
2308
|
-
"crossRef",
|
|
2309
|
-
"indexEntry",
|
|
2310
|
-
"citation",
|
|
2311
|
-
"authorityEntry",
|
|
2312
|
-
"sequenceField",
|
|
2313
|
-
"tab",
|
|
2314
|
-
"lineBreak"
|
|
2531
|
+
"sdt"
|
|
2315
2532
|
]
|
|
2316
2533
|
},
|
|
2534
|
+
"nodeId": {
|
|
2535
|
+
"type": "string"
|
|
2536
|
+
}
|
|
2537
|
+
},
|
|
2538
|
+
"required": [
|
|
2539
|
+
"kind",
|
|
2540
|
+
"nodeType",
|
|
2541
|
+
"nodeId"
|
|
2542
|
+
]
|
|
2543
|
+
},
|
|
2544
|
+
"require": {
|
|
2545
|
+
"enum": [
|
|
2546
|
+
"first",
|
|
2547
|
+
"exactlyOne"
|
|
2548
|
+
]
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
"required": [
|
|
2552
|
+
"by",
|
|
2553
|
+
"select",
|
|
2554
|
+
"require"
|
|
2555
|
+
]
|
|
2556
|
+
},
|
|
2557
|
+
{
|
|
2558
|
+
"type": "object",
|
|
2559
|
+
"properties": {
|
|
2560
|
+
"by": {
|
|
2561
|
+
"const": "ref",
|
|
2562
|
+
"type": "string"
|
|
2563
|
+
},
|
|
2564
|
+
"ref": {
|
|
2565
|
+
"type": "string"
|
|
2566
|
+
},
|
|
2567
|
+
"within": {
|
|
2568
|
+
"type": "object",
|
|
2569
|
+
"properties": {
|
|
2317
2570
|
"kind": {
|
|
2318
|
-
"
|
|
2571
|
+
"const": "block",
|
|
2572
|
+
"type": "string"
|
|
2573
|
+
},
|
|
2574
|
+
"nodeType": {
|
|
2319
2575
|
"enum": [
|
|
2320
|
-
"
|
|
2321
|
-
"
|
|
2576
|
+
"paragraph",
|
|
2577
|
+
"heading",
|
|
2578
|
+
"listItem",
|
|
2579
|
+
"table",
|
|
2580
|
+
"tableRow",
|
|
2581
|
+
"tableCell",
|
|
2582
|
+
"tableOfContents",
|
|
2583
|
+
"image",
|
|
2584
|
+
"sdt"
|
|
2322
2585
|
]
|
|
2586
|
+
},
|
|
2587
|
+
"nodeId": {
|
|
2588
|
+
"type": "string"
|
|
2323
2589
|
}
|
|
2324
2590
|
},
|
|
2325
2591
|
"required": [
|
|
2326
|
-
"
|
|
2592
|
+
"kind",
|
|
2593
|
+
"nodeType",
|
|
2594
|
+
"nodeId"
|
|
2327
2595
|
]
|
|
2328
2596
|
}
|
|
2597
|
+
},
|
|
2598
|
+
"required": [
|
|
2599
|
+
"by",
|
|
2600
|
+
"ref"
|
|
2329
2601
|
]
|
|
2330
2602
|
},
|
|
2331
|
-
|
|
2603
|
+
{
|
|
2332
2604
|
"type": "object",
|
|
2333
2605
|
"properties": {
|
|
2334
|
-
"
|
|
2606
|
+
"by": {
|
|
2607
|
+
"const": "target",
|
|
2608
|
+
"type": "string"
|
|
2609
|
+
},
|
|
2610
|
+
"target": {
|
|
2611
|
+
"type": "object",
|
|
2612
|
+
"properties": {
|
|
2613
|
+
"kind": {
|
|
2614
|
+
"const": "selection",
|
|
2615
|
+
"type": "string"
|
|
2616
|
+
},
|
|
2617
|
+
"start": {
|
|
2618
|
+
"oneOf": [
|
|
2619
|
+
{
|
|
2620
|
+
"type": "object",
|
|
2621
|
+
"properties": {
|
|
2622
|
+
"kind": {
|
|
2623
|
+
"const": "text",
|
|
2624
|
+
"type": "string"
|
|
2625
|
+
},
|
|
2626
|
+
"blockId": {
|
|
2627
|
+
"type": "string"
|
|
2628
|
+
},
|
|
2629
|
+
"offset": {
|
|
2630
|
+
"type": "number"
|
|
2631
|
+
}
|
|
2632
|
+
},
|
|
2633
|
+
"required": [
|
|
2634
|
+
"kind",
|
|
2635
|
+
"blockId",
|
|
2636
|
+
"offset"
|
|
2637
|
+
]
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
"type": "object",
|
|
2641
|
+
"properties": {
|
|
2642
|
+
"kind": {
|
|
2643
|
+
"const": "nodeEdge",
|
|
2644
|
+
"type": "string"
|
|
2645
|
+
},
|
|
2646
|
+
"node": {
|
|
2647
|
+
"type": "object",
|
|
2648
|
+
"properties": {
|
|
2649
|
+
"kind": {
|
|
2650
|
+
"const": "block",
|
|
2651
|
+
"type": "string"
|
|
2652
|
+
},
|
|
2653
|
+
"nodeType": {
|
|
2654
|
+
"enum": [
|
|
2655
|
+
"paragraph",
|
|
2656
|
+
"heading",
|
|
2657
|
+
"table",
|
|
2658
|
+
"tableOfContents",
|
|
2659
|
+
"sdt",
|
|
2660
|
+
"image"
|
|
2661
|
+
]
|
|
2662
|
+
},
|
|
2663
|
+
"nodeId": {
|
|
2664
|
+
"type": "string"
|
|
2665
|
+
}
|
|
2666
|
+
},
|
|
2667
|
+
"required": [
|
|
2668
|
+
"kind",
|
|
2669
|
+
"nodeType",
|
|
2670
|
+
"nodeId"
|
|
2671
|
+
]
|
|
2672
|
+
},
|
|
2673
|
+
"edge": {
|
|
2674
|
+
"enum": [
|
|
2675
|
+
"before",
|
|
2676
|
+
"after"
|
|
2677
|
+
]
|
|
2678
|
+
}
|
|
2679
|
+
},
|
|
2680
|
+
"required": [
|
|
2681
|
+
"kind",
|
|
2682
|
+
"node",
|
|
2683
|
+
"edge"
|
|
2684
|
+
]
|
|
2685
|
+
}
|
|
2686
|
+
],
|
|
2687
|
+
"description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
|
|
2688
|
+
},
|
|
2689
|
+
"end": {
|
|
2690
|
+
"oneOf": [
|
|
2691
|
+
{
|
|
2692
|
+
"type": "object",
|
|
2693
|
+
"properties": {
|
|
2694
|
+
"kind": {
|
|
2695
|
+
"const": "text",
|
|
2696
|
+
"type": "string"
|
|
2697
|
+
},
|
|
2698
|
+
"blockId": {
|
|
2699
|
+
"type": "string"
|
|
2700
|
+
},
|
|
2701
|
+
"offset": {
|
|
2702
|
+
"type": "number"
|
|
2703
|
+
}
|
|
2704
|
+
},
|
|
2705
|
+
"required": [
|
|
2706
|
+
"kind",
|
|
2707
|
+
"blockId",
|
|
2708
|
+
"offset"
|
|
2709
|
+
]
|
|
2710
|
+
},
|
|
2711
|
+
{
|
|
2712
|
+
"type": "object",
|
|
2713
|
+
"properties": {
|
|
2714
|
+
"kind": {
|
|
2715
|
+
"const": "nodeEdge",
|
|
2716
|
+
"type": "string"
|
|
2717
|
+
},
|
|
2718
|
+
"node": {
|
|
2719
|
+
"type": "object",
|
|
2720
|
+
"properties": {
|
|
2721
|
+
"kind": {
|
|
2722
|
+
"const": "block",
|
|
2723
|
+
"type": "string"
|
|
2724
|
+
},
|
|
2725
|
+
"nodeType": {
|
|
2726
|
+
"enum": [
|
|
2727
|
+
"paragraph",
|
|
2728
|
+
"heading",
|
|
2729
|
+
"table",
|
|
2730
|
+
"tableOfContents",
|
|
2731
|
+
"sdt",
|
|
2732
|
+
"image"
|
|
2733
|
+
]
|
|
2734
|
+
},
|
|
2735
|
+
"nodeId": {
|
|
2736
|
+
"type": "string"
|
|
2737
|
+
}
|
|
2738
|
+
},
|
|
2739
|
+
"required": [
|
|
2740
|
+
"kind",
|
|
2741
|
+
"nodeType",
|
|
2742
|
+
"nodeId"
|
|
2743
|
+
]
|
|
2744
|
+
},
|
|
2745
|
+
"edge": {
|
|
2746
|
+
"enum": [
|
|
2747
|
+
"before",
|
|
2748
|
+
"after"
|
|
2749
|
+
]
|
|
2750
|
+
}
|
|
2751
|
+
},
|
|
2752
|
+
"required": [
|
|
2753
|
+
"kind",
|
|
2754
|
+
"node",
|
|
2755
|
+
"edge"
|
|
2756
|
+
]
|
|
2757
|
+
}
|
|
2758
|
+
],
|
|
2759
|
+
"description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries."
|
|
2760
|
+
}
|
|
2761
|
+
},
|
|
2762
|
+
"required": [
|
|
2763
|
+
"kind",
|
|
2764
|
+
"start",
|
|
2765
|
+
"end"
|
|
2766
|
+
]
|
|
2767
|
+
}
|
|
2768
|
+
},
|
|
2769
|
+
"required": [
|
|
2770
|
+
"by",
|
|
2771
|
+
"target"
|
|
2772
|
+
]
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
"type": "object",
|
|
2776
|
+
"properties": {
|
|
2777
|
+
"by": {
|
|
2335
2778
|
"const": "block",
|
|
2336
2779
|
"type": "string"
|
|
2337
2780
|
},
|
|
@@ -2353,22 +2796,11 @@
|
|
|
2353
2796
|
}
|
|
2354
2797
|
},
|
|
2355
2798
|
"required": [
|
|
2356
|
-
"
|
|
2799
|
+
"by",
|
|
2357
2800
|
"nodeType",
|
|
2358
2801
|
"nodeId"
|
|
2359
2802
|
]
|
|
2360
|
-
},
|
|
2361
|
-
"require": {
|
|
2362
|
-
"enum": [
|
|
2363
|
-
"first",
|
|
2364
|
-
"exactlyOne"
|
|
2365
|
-
]
|
|
2366
2803
|
}
|
|
2367
|
-
},
|
|
2368
|
-
"required": [
|
|
2369
|
-
"by",
|
|
2370
|
-
"select",
|
|
2371
|
-
"require"
|
|
2372
2804
|
]
|
|
2373
2805
|
},
|
|
2374
2806
|
"args": {
|
|
@@ -2820,6 +3252,36 @@
|
|
|
2820
3252
|
"by",
|
|
2821
3253
|
"target"
|
|
2822
3254
|
]
|
|
3255
|
+
},
|
|
3256
|
+
{
|
|
3257
|
+
"type": "object",
|
|
3258
|
+
"properties": {
|
|
3259
|
+
"by": {
|
|
3260
|
+
"const": "block",
|
|
3261
|
+
"type": "string"
|
|
3262
|
+
},
|
|
3263
|
+
"nodeType": {
|
|
3264
|
+
"enum": [
|
|
3265
|
+
"paragraph",
|
|
3266
|
+
"heading",
|
|
3267
|
+
"listItem",
|
|
3268
|
+
"table",
|
|
3269
|
+
"tableRow",
|
|
3270
|
+
"tableCell",
|
|
3271
|
+
"tableOfContents",
|
|
3272
|
+
"image",
|
|
3273
|
+
"sdt"
|
|
3274
|
+
]
|
|
3275
|
+
},
|
|
3276
|
+
"nodeId": {
|
|
3277
|
+
"type": "string"
|
|
3278
|
+
}
|
|
3279
|
+
},
|
|
3280
|
+
"required": [
|
|
3281
|
+
"by",
|
|
3282
|
+
"nodeType",
|
|
3283
|
+
"nodeId"
|
|
3284
|
+
]
|
|
2823
3285
|
}
|
|
2824
3286
|
]
|
|
2825
3287
|
},
|
|
@@ -3201,6 +3663,36 @@
|
|
|
3201
3663
|
"by",
|
|
3202
3664
|
"target"
|
|
3203
3665
|
]
|
|
3666
|
+
},
|
|
3667
|
+
{
|
|
3668
|
+
"type": "object",
|
|
3669
|
+
"properties": {
|
|
3670
|
+
"by": {
|
|
3671
|
+
"const": "block",
|
|
3672
|
+
"type": "string"
|
|
3673
|
+
},
|
|
3674
|
+
"nodeType": {
|
|
3675
|
+
"enum": [
|
|
3676
|
+
"paragraph",
|
|
3677
|
+
"heading",
|
|
3678
|
+
"listItem",
|
|
3679
|
+
"table",
|
|
3680
|
+
"tableRow",
|
|
3681
|
+
"tableCell",
|
|
3682
|
+
"tableOfContents",
|
|
3683
|
+
"image",
|
|
3684
|
+
"sdt"
|
|
3685
|
+
]
|
|
3686
|
+
},
|
|
3687
|
+
"nodeId": {
|
|
3688
|
+
"type": "string"
|
|
3689
|
+
}
|
|
3690
|
+
},
|
|
3691
|
+
"required": [
|
|
3692
|
+
"by",
|
|
3693
|
+
"nodeType",
|
|
3694
|
+
"nodeId"
|
|
3695
|
+
]
|
|
3204
3696
|
}
|
|
3205
3697
|
]
|
|
3206
3698
|
},
|
|
@@ -3466,11 +3958,24 @@
|
|
|
3466
3958
|
"type": "boolean"
|
|
3467
3959
|
}
|
|
3468
3960
|
}
|
|
3961
|
+
},
|
|
3962
|
+
"alignment": {
|
|
3963
|
+
"description": "Set paragraph alignment on the target block(s). Can be combined with inline formatting in the same step.",
|
|
3964
|
+
"enum": [
|
|
3965
|
+
"left",
|
|
3966
|
+
"center",
|
|
3967
|
+
"right",
|
|
3968
|
+
"justify"
|
|
3969
|
+
]
|
|
3970
|
+
},
|
|
3971
|
+
"scope": {
|
|
3972
|
+
"description": "When \"block\", inline formatting expands to cover the entire parent paragraph(s), not just the matched text. Use \"block\" after markdown inserts to format whole paragraphs with a short identifying pattern. Default: \"match\".",
|
|
3973
|
+
"enum": [
|
|
3974
|
+
"match",
|
|
3975
|
+
"block"
|
|
3976
|
+
]
|
|
3469
3977
|
}
|
|
3470
|
-
}
|
|
3471
|
-
"required": [
|
|
3472
|
-
"inline"
|
|
3473
|
-
]
|
|
3978
|
+
}
|
|
3474
3979
|
}
|
|
3475
3980
|
},
|
|
3476
3981
|
"required": [
|