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
| Name | Type | Required | Description |
|---|---|---|---|
adj | number[] | no | the preset's adjust values, file units |
flip | any | no | h|v|hv |
preset | string | no | a preset name: rect, roundRect, ellipse, triangle, rightArrow, star5, …; see shape.presets |
rect | number[] | no | [x, y, w, h] in pt |
text | string | no |
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.