Board kit command
shape.previews
Shape library
Answers the shape library without changing anything: the shapeType values in their four groups (basic, flowchart, arrows, marks), each with a small SVG picture the engine draws of it.
- Kit
- Board 0.1.0 (.kboard)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
size | number (≥ 8, ≤ 128) | no | Each picture's width in pixels, 8 to 128 (28 by default); its height is three quarters of it |
Call through board_run
text
board_run {
"path": "<file>.kboard",
"steps": [{ "command": "shape.previews" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: size. board_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
groups | object[] | yes | The shape library's groups, in the order the editor shows them |
Result JSON Schema
json
{
"additionalProperties": false,
"properties": {
"groups": {
"description": "The shape library's groups, in the order the editor shows them",
"items": {
"additionalProperties": false,
"properties": {
"id": {
"description": "basic, flowchart, arrows or marks",
"type": "string"
},
"shapes": {
"items": {
"additionalProperties": false,
"properties": {
"outline": {
"description": "What a bound connector end meets, absent for the box: \"ellipse\", the polygon's corners as [fx, fy] fractions of the box, or { \"slant\": [fx, fy] } for a parallelogram whose inset is min(w * fx, h * fy)"
},
"shape": {
"description": "A shapeType value",
"type": "string"
},
"svg": {
"description": "The shape's outline as an SVG document, stroked in currentColor and not filled",
"type": "string"
}
},
"required": [
"shape",
"svg"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"id",
"shapes"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"groups"
],
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"size": {
"description": "Each picture's width in pixels, 8 to 128 (28 by default); its height is three quarters of it",
"maximum": 128,
"minimum": 8,
"type": "number"
}
},
"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.