Motion operations

7 operations named motion.*. Every one runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.

Updated
OperationWhat it doesPermissionConfirmation
motion.readmotion.read with scene validation and page ownership.site.readnone
motion.replacemotion.replace with scene validation and page ownership.site.editnone
motion.deletemotion.delete with scene validation and page ownership.site.editdestructive
motion.listRecipesList the scene recipes a page can apply: the built-in recipes first, then the site's own.site.readnone
motion.applyRecipeBuild a recipe's scenes on a page from its knobs (a knob left out takes its default; an element knob such as target has none and must be given) and replace the page's scenes built by the same recipe on the same target.site.editnone
motion.saveRecipeSave scenes of a page that one recipe built as a site recipe (site:<key>): the scenes, their source recipe and its knobs, under a label in Italian and English.site.editnone
motion.diagnoseExplain why a page's scenes would not play as authored: one finding per problem, each with a reason code (target-missing, target-ambiguous, stateful-target, overlap, empty-range, hidden-at-rest, never-matches), the scene and the node ref it concerns.site.readnone

motion.read

motion.read with scene validation and page ownership.

permission: site.readreads onlyclass: read

Example input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f"
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character. At most 36 characters.

Output

FieldTypeRequiredNotes
scenesarray of objectyes
scenes[].idstringyesAt least 1 character. At most 36 characters.
scenes[].pageIdstringyesAt least 1 character. At most 36 characters.
scenes[].versionIdstringyesAt least 1 character. At most 50 characters.
scenes[].triggerobject | object | object | object | object | objectyes
scenes[].entriesarray of objectyesAt most 100 items.
scenes[].conditionsobjectno
scenes[].actionsarray of object | objectnoAt most 20 items.
scenes[].seedintegernoAt least 0. At most 4294967295.
scenes[].pushByobjectno
scenes[].recipeobjectno
scenes[].disabledbooleanno
scenes[].defaultsobjectno

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

Try it

yarn splash motion.read '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f"}' --dry-run

motion.replace

motion.replace with scene validation and page ownership.

permission: site.editwrites: tree:{pageId}class: transactionundo: yes

Example input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
  "scenes": []
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character. At most 36 characters.
scenesarray of objectyes
scenes[].idstringyesAt least 1 character. At most 36 characters.
scenes[].pageIdstringyesAt least 1 character. At most 36 characters.
scenes[].versionIdstringyesAt least 1 character. At most 50 characters.
scenes[].triggerobject | object | object | object | object | objectyes
scenes[].entriesarray of objectyesAt most 100 items.
scenes[].conditionsobjectno
scenes[].actionsarray of object | objectnoAt most 20 items.
scenes[].seedintegernoAt least 0. At most 4294967295.
scenes[].pushByobjectno
scenes[].recipeobjectno
scenes[].disabledbooleanno
scenes[].defaultsobjectno
{
  "type": "object",
  "properties": {
    "pageId": {
      "$ref": "#/$defs/__schema0"
    },
    "scenes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/$defs/__schema0"
          },
          "pageId": {
            "$ref": "#/$defs/__schema0"
          },
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "trigger": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "scroll"
                  },
                  "anchor": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/__schema1"
                      },
                      {
                        "type": "string",
                        "const": "viewport"
                      }
                    ]
                  },
                  "start": {
                    "$ref": "#/$defs/__schema3"
                  },
                  "end": {
                    "$ref": "#/$defs/__schema3"
                  },
                  "endAnchor": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "scrub": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 10
                      }
                    ]
                  },
                  "pin": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type",
                  "anchor",
                  "start"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "intersection"
                  },
                  "anchor": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "threshold": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/__schema5"
                      },
                      {
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema5"
                        }
                      }
                    ]
                  },
                  "once": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type",
                  "anchor"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "event"
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "load",
                      "click",
                      "hover"
                    ]
                  },
                  "source": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/__schema1"
                      },
                      {
                        "type": "string",
                        "const": "page"
                      }
                    ]
                  },
                  "once": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type",
                  "event",
                  "source"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "first-interaction"
                  },
                  "inputs": {
                    "minItems": 1,
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema6"
                    }
                  },
                  "keys": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema7"
                    }
                  },
                  "lockScroll": {
                    "type": "boolean"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 600000
                  },
                  "replay": {
                    "type": "string",
                    "enum": [
                      "session",
                      "always"
                    ]
                  }
                },
                "required": [
                  "type",
                  "inputs",
                  "timeoutMs",
                  "replay"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "section-active"
                  },
                  "anchor": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$"
                  }
                },
                "required": [
                  "type",
                  "anchor"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "surface-under"
                  },
                  "probe": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "is": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema8"
                    }
                  }
                },
                "required": [
                  "type",
                  "probe",
                  "is"
                ],
                "additionalProperties": false
              }
            ]
          },
          "entries": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema9"
            }
          },
          "conditions": {
            "type": "object",
            "properties": {
              "minBreakpoint": {
                "type": "string",
                "enum": [
                  "sm",
                  "md",
                  "lg",
                  "xl"
                ]
              },
              "maxBreakpoint": {
                "type": "string",
                "enum": [
                  "sm",
                  "md",
                  "lg",
                  "xl"
                ]
              },
              "hover": {
                "type": "string",
                "enum": [
                  "none",
                  "hover"
                ]
              }
            },
            "additionalProperties": false
          },
          "actions": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema17"
            }
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4294967295
          },
          "pushBy": {
            "type": "object",
            "properties": {
              "by": {
                "$ref": "#/$defs/__schema1"
              },
              "gap": {
                "$ref": "#/$defs/__schema4"
              },
              "target": {
                "$ref": "#/$defs/__schema1"
              }
            },
            "required": [
              "by",
              "gap"
            ],
            "additionalProperties": false
          },
          "recipe": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^(?:site:)?[a-z][a-z0-9-]{0,63}$"
              },
              "knobs": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[a-z][a-zA-Z0-9]{0,39}$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "$ref": "#/$defs/__schema18"
                    },
                    {
                      "$ref": "#/$defs/__schema1"
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "$ref": "#/$defs/__schema13"
                      },
                      "additionalProperties": {
                        "$ref": "#/$defs/__schema18"
                      }
                    }
                  ]
                }
              },
              "custom": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "knobs",
              "custom"
            ],
            "additionalProperties": false
          },
          "disabled": {
            "type": "boolean"
          },
          "defaults": {
            "type": "object",
            "properties": {
              "duration": {
                "$ref": "#/$defs/__schema14"
              },
              "easing": {
                "$ref": "#/$defs/__schema15"
              },
              "reducedMotion": {
                "$ref": "#/$defs/__schema16"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "pageId",
          "versionId",
          "trigger",
          "entries"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "pageId",
    "scenes"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "string",
      "minLength": 1,
      "maxLength": 36
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "nodeId": {
          "type": "string",
          "pattern": "^[0-9a-z]{8}(?:\\.[0-9a-z]{8}){0,3}$"
        },
        "part": {
          "default": "root",
          "$ref": "#/$defs/__schema2"
        },
        "region": {
          "type": "string",
          "enum": [
            "header",
            "footer"
          ]
        }
      },
      "required": [
        "nodeId"
      ],
      "additionalProperties": false
    },
    "__schema2": {
      "type": "string",
      "maxLength": 50,
      "pattern": "^[a-z][a-z0-9-]*$"
    },
    "__schema3": {
      "type": "object",
      "properties": {
        "edge": {
          "type": "string",
          "enum": [
            "top",
            "center",
            "bottom"
          ]
        },
        "viewport": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "offset": {
          "$ref": "#/$defs/__schema4"
        },
        "belowHeader": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "edge",
        "viewport"
      ],
      "additionalProperties": false
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "minimum": -10000,
          "maximum": 10000
        },
        "unit": {
          "type": "string",
          "enum": [
            "vh",
            "px"
          ]
        }
      },
      "required": [
        "value",
        "unit"
      ],
      "additionalProperties": false
    },
    "__schema5": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "__schema6": {
      "type": "string",
      "enum": [
        "wheel",
        "touch",
        "click",
        "key"
      ]
    },
    "__schema7": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20
    },
    "__schema8": {
      "type": "string",
      "enum": [
        "light",
        "dark",
        "media"
      ]
    },
    "__schema9": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "sceneId": {
          "$ref": "#/$defs/__schema0"
        },
        "target": {
          "$ref": "#/$defs/__schema1"
        },
        "keyframes": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema10"
          }
        },
        "moveInto": {
          "type": "object",
          "properties": {
            "into": {
              "$ref": "#/$defs/__schema1"
            },
            "scale": {
              "type": "string",
              "enum": [
                "fit",
                "keep"
              ]
            },
            "align": {
              "type": "string",
              "enum": [
                "center",
                "start"
              ]
            },
            "perBreakpoint": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "enum": [
                  "sm",
                  "md",
                  "lg",
                  "xl"
                ]
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "scale": {
                    "type": "string",
                    "enum": [
                      "fit",
                      "keep"
                    ]
                  }
                },
                "required": [
                  "scale"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "into",
            "scale"
          ],
          "additionalProperties": false
        },
        "effect": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "flicker"
                },
                "part": {
                  "$ref": "#/$defs/__schema2"
                },
                "ratio": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "min": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000
                },
                "settle": {
                  "type": "string",
                  "enum": [
                    "on",
                    "off"
                  ]
                }
              },
              "required": [
                "kind",
                "part"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "assemble"
                },
                "part": {
                  "$ref": "#/$defs/__schema2"
                }
              },
              "required": [
                "kind",
                "part"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "typeErase"
                },
                "words": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/__schema12"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "$ref": "#/$defs/__schema13"
                        },
                        "additionalProperties": {
                          "$ref": "#/$defs/__schema12"
                        }
                      }
                    ]
                  }
                },
                "typeMs": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 2000
                },
                "eraseMs": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 2000
                }
              },
              "required": [
                "kind",
                "words"
              ],
              "additionalProperties": false
            }
          ]
        },
        "position": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "absolute"
            },
            "ms": {
              "type": "number",
              "minimum": 0,
              "maximum": 600000
            }
          },
          "required": [
            "type",
            "ms"
          ],
          "additionalProperties": false
        },
        "duration": {
          "$ref": "#/$defs/__schema14"
        },
        "easing": {
          "$ref": "#/$defs/__schema15"
        },
        "stagger": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "reducedMotion": {
          "$ref": "#/$defs/__schema16"
        }
      },
      "required": [
        "id",
        "sceneId",
        "target",
        "keyframes",
        "position"
      ],
      "additionalProperties": false
    },
    "__schema10": {
      "type": "object",
      "properties": {
        "offset": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "opacity": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "transform": {
          "type": "object",
          "properties": {
            "x": {
              "$ref": "#/$defs/__schema11"
            },
            "y": {
              "$ref": "#/$defs/__schema11"
            },
            "scale": {
              "type": "number"
            },
            "rotate": {
              "$ref": "#/$defs/__schema11"
            }
          },
          "additionalProperties": false
        },
        "blur": {
          "$ref": "#/$defs/__schema11"
        },
        "clipPath": {
          "$ref": "#/$defs/__schema11"
        },
        "color": {
          "$ref": "#/$defs/__schema11"
        },
        "backgroundColor": {
          "$ref": "#/$defs/__schema11"
        },
        "vars": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^--[a-z0-9-]+$"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema11"
          }
        }
      },
      "required": [
        "offset"
      ],
      "additionalProperties": false
    },
    "__schema11": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "__schema12": {
      "type": "string",
      "maxLength": 80
    },
    "__schema13": {
      "type": "string",
      "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|\\d{3}))?$"
    },
    "__schema14": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 600000
        },
        {
          "type": "string",
          "maxLength": 100
        }
      ]
    },
    "__schema15": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        }
      ]
    },
    "__schema16": {
      "type": "string",
      "enum": [
        "skip",
        "fade-only",
        "instant"
      ]
    },
    "__schema17": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "set-state"
            },
            "target": {
              "$ref": "#/$defs/__schema1"
            },
            "state": {
              "$ref": "#/$defs/__schema2"
            }
          },
          "required": [
            "type",
            "target",
            "state"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "threshold"
            },
            "target": {
              "$ref": "#/$defs/__schema1"
            },
            "state": {
              "$ref": "#/$defs/__schema2"
            },
            "clear": {
              "type": "boolean"
            },
            "when": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "progress": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "progress"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "scrollY": {
                      "$ref": "#/$defs/__schema4"
                    }
                  },
                  "required": [
                    "scrollY"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": [
            "type",
            "target",
            "state",
            "when"
          ],
          "additionalProperties": false
        }
      ]
    },
    "__schema18": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema19"
      }
    },
    "__schema19": {
      "type": "string",
      "maxLength": 200
    }
  }
}

Output

FieldTypeRequiredNotes
successtrueyes

Try it

yarn splash motion.replace '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f","scenes":[]}' --dry-run

motion.delete

motion.delete with scene validation and page ownership.

permission: site.editwrites: tree:{pageId}class: transactionconfirm: destructiveundo: yes

Example input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
  "sceneId": "scene-1"
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character. At most 36 characters.
sceneIdstringyesAt least 1 character. At most 36 characters.

Output

FieldTypeRequiredNotes
successtrueyes

Needs confirmed: ["destructive"] on the batch, which the single-operation CLI form does not set: put it in a batch file and run yarn splash apply <file> --dry-run.

motion.listRecipes

List the scene recipes a page can apply: the built-in recipes first, then the site's own. Each has a label and a description in Italian and English, and two to four knobs (a number, a choice, a list of words, a node or a distance in screens) with working defaults.

permission: site.readreads onlyclass: read

Example input

{}

Input

The input is a record; see the schema below.

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Output

FieldTypeRequiredNotes
recipesarray of objectyes
recipes[].idstringyes
recipes[].labelobjectyes
recipes[].descriptionobjectyes
recipes[].sourcestringyesOne of "built-in", "site".
recipes[].knobsarray of object | object | object | object | objectyesAt most 8 items.

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

Try it

yarn splash motion.listRecipes '{}' --dry-run

motion.applyRecipe

Build a recipe's scenes on a page from its knobs (a knob left out takes its default; an element knob such as target has none and must be given) and replace the page's scenes built by the same recipe on the same target. The scenes carry the recipe meta (recipe: { id, knobs, custom: false }) and are validated like motion.replace. The snap recipe writes the page's scroll setting instead, so its batch also needs the pages base revision. An unknown recipe is 404 recipe_not_found; refused knobs are 422 recipe_knobs_invalid.

permission: site.editwrites: tree:{pageId}class: transactionundo: yes

Example input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
  "recipeId": "dock",
  "knobs": {
    "target": {
      "nodeId": "mark0001",
      "part": "root"
    },
    "slot": {
      "nodeId": "logo0001",
      "part": "root",
      "region": "header"
    },
    "start": 0.95,
    "duration": 0.75
  }
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character. At most 36 characters.
recipeIdstringyes
knobsrecord of number | string | boolean | array of string | object | record of array of valueno

Output

FieldTypeRequiredNotes
scenesarray of objectyes
scenes[].idstringyesAt least 1 character. At most 36 characters.
scenes[].pageIdstringyesAt least 1 character. At most 36 characters.
scenes[].versionIdstringyesAt least 1 character. At most 50 characters.
scenes[].triggerobject | object | object | object | object | objectyes
scenes[].entriesarray of objectyesAt most 100 items.
scenes[].conditionsobjectno
scenes[].actionsarray of object | objectnoAt most 20 items.
scenes[].seedintegernoAt least 0. At most 4294967295.
scenes[].pushByobjectno
scenes[].recipeobjectno
scenes[].disabledbooleanno
scenes[].defaultsobjectno

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

Try it

yarn splash motion.applyRecipe '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f","recipeId":"dock","knobs":{"target":{"nodeId":"mark0001","part":"root"},"slot":{"nodeId":"logo0001","part":"root","region":"header"},"start":0.95,"duration":0.75}}' --dry-run

motion.saveRecipe

Save scenes of a page that one recipe built as a site recipe (site:<key>): the scenes, their source recipe and its knobs, under a label in Italian and English. A site recipe has no knobs of its own; applying it writes its scenes again.

permission: site.editwrites: presetsclass: transactionundo: yes

Example input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
  "sceneIds": [
    "scene-1"
  ],
  "label": {
    "it": "Logo che si aggancia",
    "en": "Docking logo"
  }
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character. At most 36 characters.
sceneIdsarray of stringyesAt least 1 item. At most 20 items.
labelobjectyes
label.itstringyesAt least 1 character. At most 120 characters.
label.enstringyesAt least 1 character. At most 120 characters.
descriptionobjectno
description.itstringyesAt least 1 character. At most 120 characters.
description.enstringyesAt least 1 character. At most 120 characters.

Output

FieldTypeRequiredNotes
idstringyes
labelobjectyes
label.itstringyesAt least 1 character. At most 120 characters.
label.enstringyesAt least 1 character. At most 120 characters.
descriptionobjectyes
description.itstringyesAt least 1 character. At most 120 characters.
description.enstringyesAt least 1 character. At most 120 characters.
sourcestringyesOne of "built-in", "site".
knobsarray of object | object | object | object | objectyesAt most 8 items.

Try it

yarn splash motion.saveRecipe '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f","sceneIds":["scene-1"],"label":{"it":"Logo che si aggancia","en":"Docking logo"}}' --dry-run

motion.diagnose

Explain why a page's scenes would not play as authored: one finding per problem, each with a reason code (target-missing, target-ambiguous, stateful-target, overlap, empty-range, hidden-at-rest, never-matches), the scene and the node ref it concerns.

permission: site.readreads onlyclass: read

Example input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f"
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character. At most 36 characters.

Output

FieldTypeRequiredNotes
findingsarray of objectyes
findings[].sceneIdstringyesAt least 1 character. At most 36 characters.
findings[].codestringyesOne of "target-missing", "target-ambiguous", "stateful-target", "overlap", "empty-range", "hidden-at-rest", "never-matches".
findings[].refobjectno
findings[].messagestringyesAt least 1 character. At most 500 characters.

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

Try it

yarn splash motion.diagnose '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f"}' --dry-run

Generated from the operation registry and the MCP tool catalogue (source 50a582a74dcfa6cf).

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