Board kit command

diagram.import

Diagram from text

Makes a whole diagram from text in one step: a Markdown outline (headings and nested list items) as one mind map, or a Mermaid flowchart (nodes, shapes, edges, labels, subgraphs as frames) laid out without coordinates; leaves out styling lines (classDef, style, linkStyle, class, ::: classes) and says how many; refuses what it does not understand with the line number, changing nothing.

Kit
Board 0.1.0 (.kboard)
Changes the document
yes

Parameters

Parameters of diagram.import
NameTypeRequiredDescription
atnumber[] | objectno[x, y] for the diagram's centre; right of the page's content when absent
format"outline" | "mermaid"yesoutline: a Markdown outline (headings and nested list items) made into one mind map; mermaid: a Mermaid flowchart (graph or flowchart) made into a laid-out flow chart
pagestringnoThe page's id; the shown page when absent
textstringyesThe outline or the flowchart, at most 100000 characters; a line it does not understand is refused with its number

Call through board_run

text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "diagram.import", "params": { "format": <"outline" | "mermaid">, "text": <string> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: at, page. board_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "at": {
      "description": "[x, y] for the diagram's centre; right of the page's content when absent",
      "oneOf": [
        {
          "items": {
            "description": "One component",
            "maximum": 1000000,
            "minimum": -1000000,
            "type": "number"
          },
          "type": "array"
        },
        {
          "additionalProperties": false,
          "properties": {
            "x": {
              "description": "One component",
              "maximum": 1000000,
              "minimum": -1000000,
              "type": "number"
            },
            "y": {
              "description": "One component",
              "maximum": 1000000,
              "minimum": -1000000,
              "type": "number"
            }
          },
          "required": [
            "x",
            "y"
          ],
          "type": "object"
        }
      ]
    },
    "format": {
      "description": "outline: a Markdown outline (headings and nested list items) made into one mind map; mermaid: a Mermaid flowchart (graph or flowchart) made into a laid-out flow chart",
      "enum": [
        "outline",
        "mermaid"
      ],
      "type": "string"
    },
    "page": {
      "description": "The page's id; the shown page when absent",
      "type": "string",
      "x-khp-types": [
        "Page"
      ]
    },
    "text": {
      "description": "The outline or the flowchart, at most 100000 characters; a line it does not understand is refused with its number",
      "type": "string"
    }
  },
  "required": [
    "format",
    "text"
  ],
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (board_commands through @kition/[email protected], built from KitionAI/kition-board@e78c190). As data: commands.jsonl.