Design kit command

dev.focus

Focus view

Shows only one top-level frame or section on the canvas (or the next or previous ready-for-dev one); answers which.

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 dev.focus
NameTypeRequiredDescription
direction"next" | "previous"nothe next ready-for-dev one, across pages
idinteger | stringnoan id (a number, or its digits as text)

Call through design_run

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

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

Result

Result of dev.focus
NameTypeRequiredDescription
countnumberno
idnumberno
indexanyno
namestringno
pagenumberno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "count": {
      "type": "number"
    },
    "id": {
      "type": "number"
    },
    "index": {},
    "name": {
      "type": "string"
    },
    "page": {
      "type": "number"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "direction": {
      "description": "the next ready-for-dev one, across pages",
      "enum": [
        "next",
        "previous"
      ],
      "type": "string"
    },
    "id": {
      "description": "an id (a number, or its digits as text)",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    }
  },
  "returns": "{id, name, page, index, count}  show only that layer on the canvas (Escape or `dev.unfocus` ends it)",
  "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.