Layout operations

1 operation, layout.update. It runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.

Updated
OperationWhat it doesPermissionConfirmation
layout.updatelayout.update with validated settings and revisioned undo.site.structurenone

layout.update

layout.update with validated settings and revisioned undo.

permission: site.structurewrites: settingsclass: transactionundo: yes

Example input

{
  "layoutId": "default",
  "layout": {
    "id": "default",
    "label": {
      "en-US": "Default"
    }
  }
}

Input

FieldTypeRequiredNotes
layoutIdstringyesAt least 1 character.
layoutobjectyes
layout.idstringyesAt least 1 character.
layout.labelrecord of stringyes
layout.chromeobjectno
layout.frameobjectno
layout.canvasPresetvalueno
layout.headerobjectno
layout.footerobjectno
layout.backgroundobjectno
layout.scrollobjectno
layout.overridePolicyobjectno
{
  "type": "object",
  "properties": {
    "layoutId": {
      "type": "string",
      "minLength": 1
    },
    "layout": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string"
          }
        },
        "chrome": {
          "type": "object",
          "properties": {
            "elements": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            }
          }
        },
        "frame": {
          "type": "object",
          "properties": {
            "responsiveMode": {
              "type": "string",
              "enum": [
                "breakpoint",
                "scale"
              ]
            },
            "scaleOrigin": {
              "type": "string",
              "enum": [
                "top-left",
                "top-center"
              ]
            },
            "containerMode": {
              "type": "string",
              "enum": [
                "measure",
                "content",
                "wide",
                "full-bleed"
              ]
            },
            "sectionSpacingDefault": {
              "type": "string",
              "enum": [
                "none",
                "sm",
                "md",
                "lg",
                "xl"
              ]
            },
            "designWidth": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "maxWidth": {
              "type": "string"
            },
            "insetX": {
              "type": "string"
            },
            "minHeight": {
              "type": "string"
            },
            "overflowX": {
              "type": "string",
              "enum": [
                "visible",
                "hidden",
                "clip"
              ]
            },
            "minScale": {
              "type": "number"
            },
            "maxScale": {
              "type": "number"
            },
            "scaleFromWidth": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000
            },
            "scaleRegions": {
              "type": "boolean"
            }
          }
        },
        "canvasPreset": {},
        "header": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "variant": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]*$"
            },
            "palette": {
              "type": "object",
              "properties": {
                "bgColor": {
                  "type": "string"
                },
                "textColor": {
                  "type": "string"
                },
                "navLinkColor": {
                  "type": "string"
                },
                "navLinkHoverColor": {
                  "type": "string"
                },
                "accentBarColor": {
                  "type": "string"
                },
                "scrollFade": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "footer": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "position": {
              "type": "string",
              "enum": [
                "normal",
                "sticky-bottom"
              ]
            },
            "palette": {
              "type": "object",
              "properties": {
                "bgColor": {
                  "type": "string"
                },
                "textColor": {
                  "type": "string"
                },
                "linkColor": {
                  "type": "string"
                }
              }
            }
          }
        },
        "background": {
          "type": "object",
          "properties": {
            "color": {
              "type": "string"
            },
            "image": {
              "type": "object",
              "properties": {
                "src": {
                  "type": "string"
                },
                "repeat": {
                  "type": "string",
                  "enum": [
                    "none",
                    "repeat",
                    "repeat-x",
                    "repeat-y"
                  ]
                },
                "size": {
                  "type": "string"
                },
                "position": {
                  "type": "string"
                },
                "attachment": {
                  "type": "string",
                  "enum": [
                    "scroll",
                    "fixed"
                  ]
                },
                "opacity": {
                  "type": "number"
                }
              }
            },
            "overlay": {
              "type": "object",
              "properties": {
                "color": {
                  "type": "string"
                },
                "opacity": {
                  "type": "number"
                },
                "blendMode": {
                  "type": "string"
                }
              }
            },
            "texture": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "noise",
                    "grain"
                  ]
                },
                "opacity": {
                  "type": "number"
                }
              }
            }
          }
        },
        "scroll": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "normal",
                "snap-y",
                "magnet"
              ]
            },
            "magnet": {
              "type": "object",
              "properties": {
                "idleMs": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5000
                },
                "coarseIdleMs": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5000
                },
                "windowVh": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "minPx": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 500
                },
                "exclude": {
                  "type": "string",
                  "enum": [
                    "first",
                    "none"
                  ]
                },
                "includeFooter": {
                  "type": "boolean"
                }
              }
            },
            "snapType": {
              "type": "string",
              "enum": [
                "mandatory",
                "proximity"
              ]
            },
            "snapAlign": {
              "type": "string",
              "enum": [
                "start",
                "center"
              ]
            },
            "smoothScroll": {
              "type": "boolean"
            }
          }
        },
        "overridePolicy": {
          "type": "object",
          "properties": {
            "allowPageHeaderOverride": {
              "type": "boolean"
            },
            "allowPageFooterOverride": {
              "type": "boolean"
            },
            "allowPageBackgroundOverride": {
              "type": "boolean"
            },
            "allowPageChromeOverride": {
              "type": "boolean"
            },
            "allowPageChromeAdditions": {
              "type": "boolean"
            },
            "allowPageScrollOverride": {
              "type": "boolean"
            }
          }
        }
      },
      "required": [
        "id",
        "label"
      ]
    }
  },
  "required": [
    "layoutId",
    "layout"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema1"
        },
        "type": {
          "$ref": "#/$defs/__schema2"
        },
        "enabled": {
          "$ref": "#/$defs/__schema3"
        },
        "position": {
          "$ref": "#/$defs/__schema4"
        },
        "coordSpace": {
          "$ref": "#/$defs/__schema5"
        },
        "anchor": {
          "$ref": "#/$defs/__schema6"
        },
        "offsetX": {
          "$ref": "#/$defs/__schema7"
        },
        "offsetY": {
          "$ref": "#/$defs/__schema8"
        },
        "zIndex": {
          "$ref": "#/$defs/__schema9"
        },
        "opacity": {
          "$ref": "#/$defs/__schema10"
        },
        "blendMode": {
          "$ref": "#/$defs/__schema11"
        },
        "pointerEvents": {
          "$ref": "#/$defs/__schema12"
        },
        "hideBelow": {
          "$ref": "#/$defs/__schema13"
        },
        "layer": {
          "$ref": "#/$defs/__schema14"
        },
        "positionMode": {
          "$ref": "#/$defs/__schema15"
        },
        "orientation": {
          "$ref": "#/$defs/__schema16"
        },
        "color": {
          "$ref": "#/$defs/__schema17"
        },
        "thickness": {
          "$ref": "#/$defs/__schema18"
        },
        "length": {
          "$ref": "#/$defs/__schema19"
        },
        "shape": {
          "$ref": "#/$defs/__schema20"
        },
        "width": {
          "$ref": "#/$defs/__schema21"
        },
        "height": {
          "$ref": "#/$defs/__schema22"
        },
        "radius": {
          "$ref": "#/$defs/__schema23"
        },
        "rotation": {
          "$ref": "#/$defs/__schema24"
        },
        "src": {
          "$ref": "#/$defs/__schema25"
        },
        "alt": {
          "$ref": "#/$defs/__schema26"
        },
        "objectFit": {
          "$ref": "#/$defs/__schema27"
        },
        "text": {
          "$ref": "#/$defs/__schema28"
        },
        "indicator": {
          "$ref": "#/$defs/__schema29"
        },
        "trackColor": {
          "$ref": "#/$defs/__schema30"
        },
        "edge": {
          "$ref": "#/$defs/__schema31"
        },
        "size": {
          "$ref": "#/$defs/__schema32"
        },
        "showLabel": {
          "$ref": "#/$defs/__schema33"
        }
      },
      "required": [
        "id",
        "type",
        "enabled",
        "position"
      ]
    },
    "__schema1": {
      "type": "string",
      "minLength": 1
    },
    "__schema2": {
      "type": "string",
      "enum": [
        "line",
        "shape",
        "image",
        "text",
        "progress"
      ]
    },
    "__schema3": {
      "type": "boolean"
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "fixed",
        "absolute"
      ]
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "viewport",
        "design"
      ]
    },
    "__schema6": {
      "type": "string",
      "enum": [
        "top-left",
        "top-right",
        "bottom-left",
        "bottom-right",
        "center"
      ]
    },
    "__schema7": {
      "type": "string"
    },
    "__schema8": {
      "type": "string"
    },
    "__schema9": {
      "type": "number"
    },
    "__schema10": {
      "type": "number"
    },
    "__schema11": {
      "type": "string"
    },
    "__schema12": {
      "type": "string",
      "enum": [
        "none",
        "auto"
      ]
    },
    "__schema13": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "sm",
            "md",
            "lg"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema14": {
      "type": "string",
      "enum": [
        "background",
        "foreground"
      ]
    },
    "__schema15": {
      "type": "string",
      "enum": [
        "viewport-fixed",
        "flow"
      ]
    },
    "__schema16": {
      "type": "string",
      "enum": [
        "vertical",
        "horizontal"
      ]
    },
    "__schema17": {
      "type": "string"
    },
    "__schema18": {
      "type": "string"
    },
    "__schema19": {
      "type": "string"
    },
    "__schema20": {
      "type": "string",
      "enum": [
        "rectangle",
        "circle",
        "pill"
      ]
    },
    "__schema21": {
      "type": "string"
    },
    "__schema22": {
      "type": "string"
    },
    "__schema23": {
      "type": "string"
    },
    "__schema24": {
      "type": "string"
    },
    "__schema25": {
      "type": "string"
    },
    "__schema26": {
      "type": "string"
    },
    "__schema27": {
      "type": "string",
      "enum": [
        "contain",
        "cover"
      ]
    },
    "__schema28": {
      "type": "string"
    },
    "__schema29": {
      "type": "string",
      "enum": [
        "bar",
        "ring"
      ]
    },
    "__schema30": {
      "type": "string"
    },
    "__schema31": {
      "type": "string",
      "enum": [
        "top",
        "bottom"
      ]
    },
    "__schema32": {
      "type": "string"
    },
    "__schema33": {
      "type": "boolean"
    }
  }
}

Output

FieldTypeRequiredNotes
oktrueyes
layoutobjectyes
layout.idstringyesAt least 1 character.
layout.labelrecord of stringyes
layout.chromeobjectno
layout.frameobjectno
layout.canvasPresetvalueno
layout.headerobjectno
layout.footerobjectno
layout.backgroundobjectno
layout.scrollobjectno
layout.overridePolicyobjectno
warningsarray of stringyes

Fields nested deeper are in the output schema that discover_operations answers with outputSchemas: true.

Try it

yarn splash layout.update '{"layoutId":"default","layout":{"id":"default","label":{"en-US":"Default"}}}' --dry-run

Generated from the operation registry and the MCP tool catalogue (source 45d6431b5b0a6d38).

Something wrong on this page? Write to docs@librettocms.com.

Libretto docs

Colophon. These docs are a Libretto site: 68 pages in two languages, 20 guide pages imported from Markdown and 41 reference pages generated from the operation registry. Set in Softcore, with code in IBM Plex Mono. Its outline:

/ Libretto docs /start Get started /start/request-access Request access /start/workspace Your workspace /start/first-site Your first site /start/invite-a-client Invite a client /start/connect-claude Connect Claude to Libretto /build Build /build/first-page Build a page /build/layers-and-canvas Layers and canvas /build/site-components Site components /design-system Design system /design-system/tokens Colours, space and themes /design-system/components Components and variants /design-system/fonts Typography and fonts /motion Motion /motion/scenes Scenes and recipes /motion/image-sequences Image sequences /motion/reduced-motion Reduced motion /publish Publish /publish/languages Site languages /publish/versions Publish and versions /publish/members-and-forms Members and forms /publish/domains Domains /handover Hand a site to a client /glossary Glossary /agents Agents and API /agents/mcp MCP server /agents/cli CLI /agents/batches Batches /agents/errors Errors and findings /agents/operations Operations /search Search