Slide kit command

shape.insert

Shapes

Inserts a preset shape (rect, roundRect, ellipse, rightArrow, star5, …; see `shape.presets`) on the current slide at `rect` [x, y, w, h] in points, with optional text, and selects it.

Kit
Slide 0.1.0 (.kslide and .pptx)
Changes the document
yes

Parameters

Parameters of shape.insert
NameTypeRequiredDescription
adjnumber[]nothe preset's adjust values, file units
flipanynoh|v|hv
presetstringnoa preset name: rect, roundRect, ellipse, triangle, rightArrow, star5, …; see shape.presets
rectnumber[]no[x, y, w, h] in pt
textstringno

Call through slide_run

text
slide_run {
  "path": "<file>.pptx",
  "steps": [{ "command": "shape.insert" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: adj, flip, preset, rect, text. slide_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": {
    "adj": {
      "description": "the preset's adjust values, file units",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "flip": {
      "description": "h|v|hv"
    },
    "preset": {
      "description": "a preset name: rect, roundRect, ellipse, triangle, rightArrow, star5, …; see shape.presets",
      "type": "string"
    },
    "rect": {
      "description": "[x, y, w, h] in pt",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "text": {
      "type": "string"
    }
  },
  "type": "object"
}

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