Design kit command

inspect.properties

Inspect properties

Answers a layer's inspect properties (layout, auto layout, typography, fills, strokes, effects) as sections of rows.

Kit
Design 0.1.0 (.kdesign)
Changes the document
no
Acts on
id (one id), which a run step’s on fills

Parameters

Parameters of inspect.properties
NameTypeRequiredDescription
colorFormat"hex" | "rgb" | "css" | "hsl" | "hsb"no
idinteger | stringno
idsany[]noread by the command beside its listed parameters
targetstringnoread by the command beside its listed parameters

Call through design_run

text
design_run {
  "path": "<file>.kdesign",
  "steps": [{ "command": "inspect.properties" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: colorFormat, id, ids, target. design_run answers the step’s result in completed[i].result.

Result

Result of inspect.properties
NameTypeRequiredDescription
sectionsobject[]no
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "sections": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "rows": {
            "type": "array"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "colorFormat": {
      "enum": [
        "hex",
        "rgb",
        "css",
        "hsl",
        "hsb"
      ],
      "type": "string"
    },
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "read by the command beside its listed parameters",
      "type": "array"
    },
    "target": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    }
  },
  "returns": "{sections: [{title, rows: [{label, value, color?, token?}]}]}  layout (positions from the frame around the layer), auto layout, typography, fills, strokes and effects, with style and variable names",
  "type": "object"
}

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