Layout kit command
style.table.add
New Table Style
Creates a table style with cell styles for header, body, footer and columns, and borders.
- Kit
- Layout 0.1.0 (.klayout)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
altRows | object | no | {first, firstColor, next, nextColor} |
basedOn | string | no | read by the command beside its listed parameters |
body | string | no | |
border | object | no | |
footer | string | no | a cell style name |
header | string | no | a cell style name |
leftColumn | string | no | a cell style name |
name | string | no | |
rightColumn | string | no | a cell style name |
spaceAfter | number | no | |
spaceBefore | number | no |
Call through layout_run
text
layout_run {
"path": "<file>.klayout",
"steps": [{ "command": "style.table.add" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: altRows, basedOn, body, border, footer, header, leftColumn, name, rightColumn, spaceAfter, spaceBefore. layout_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": {
"altRows": {
"additionalProperties": true,
"description": "{first, firstColor, next, nextColor}",
"properties": {
"first": {},
"firstColor": {
"x-khp-name": "name",
"x-khp-role": "object",
"x-khp-types": [
"Swatch"
]
},
"next": {},
"nextColor": {
"x-khp-name": "name",
"x-khp-role": "object",
"x-khp-types": [
"Swatch"
]
}
},
"type": "object"
},
"basedOn": {
"description": "read by the command beside its listed parameters",
"type": "string",
"x-khp-name": "tableName",
"x-khp-types": [
"Style"
]
},
"body": {
"type": "string",
"x-khp-name": "cellName",
"x-khp-types": [
"Style"
]
},
"border": {
"additionalProperties": true,
"properties": {
"color": {
"type": "string",
"x-khp-name": "name",
"x-khp-role": "object",
"x-khp-types": [
"Swatch"
]
},
"weight": {
"type": "number"
}
},
"type": "object"
},
"footer": {
"description": "a cell style name",
"type": "string",
"x-khp-name": "cellName",
"x-khp-types": [
"Style"
]
},
"header": {
"description": "a cell style name",
"type": "string",
"x-khp-name": "cellName",
"x-khp-types": [
"Style"
]
},
"leftColumn": {
"description": "a cell style name",
"type": "string",
"x-khp-name": "cellName",
"x-khp-types": [
"Style"
]
},
"name": {
"type": "string"
},
"rightColumn": {
"description": "a cell style name",
"type": "string",
"x-khp-name": "cellName",
"x-khp-types": [
"Style"
]
},
"spaceAfter": {
"type": "number"
},
"spaceBefore": {
"type": "number"
}
},
"returns": "{name}",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (layout_commands through @kition/[email protected], built from KitionAI/kition-layout@8767a18). As data: commands.jsonl.