Operazioni sulle animazioni

7 operazioni di nome motion.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.

Aggiornato il
OperationWhat it doesPermissionConfirmation
motion.readRead the draft scenes of a page: each scene with its id, trigger, entries and options, as motion.replace writes them.site.readnone
motion.replaceReplace every scene of a page with scenes (at most 500; scene and entry ids unique, each scene's pageId the page and versionId "_draft").site.editnone
motion.deleteDelete one scene of a page by sceneId (404 scene_not_found when the page has none with it); the other scenes stay.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

Read the draft scenes of a page: each scene with its id, trigger, entries and options, as motion.replace writes them. A scene write shares the page tree's revision, and publish copies the scenes with the page.

permission: site.readreads onlyclass: read

Esempio di 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

I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.

Provala

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

motion.replace

Replace every scene of a page with scenes (at most 500; scene and entry ids unique, each scene's pageId the page and versionId "_draft"). Each scene is validated against the nodes of the page and of its header and footer: a target none of them holds, or a node id two of them hold (422 scene_target_ambiguous), is refused. For the common effects prefer motion.applyRecipe. A scene write shares the page tree's revision, and publish copies the scenes with the page.

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

Esempio di 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

Provala

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

motion.delete

Delete one scene of a page by sceneId (404 scene_not_found when the page has none with it); the other scenes stay. A scene write shares the page tree's revision, and publish copies the scenes with the page.

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

Esempio di 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

Vuole confirmed: ["destructive"] sul batch, che la forma della CLI per una sola operazione non imposta: mettila in un file di batch ed esegui 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

Esempio di input

{}

Input

L’input è un record: vedi lo schema qui sotto.

{
  "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.

I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.

Provala

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

Esempio di 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

I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.

Provala

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

Esempio di 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.

Provala

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

Esempio di 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.

I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.

Provala

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

Generato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 38169a78fa9fa578).

Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.

Guida di Libretto

Colophon. Questa guida è un sito Libretto: 70 pagine in due lingue, 21 pagine della guida importate da Markdown e 42 pagine di riferimento generate dal registro delle operazioni. Composta in Softcore, il codice in IBM Plex Mono. La sua struttura:

/it/ Guida di Libretto /it/start Per iniziare /it/start/request-access Richiedere l'accesso /it/start/workspace Il tuo spazio di lavoro /it/start/first-site Il tuo primo sito /it/start/invite-a-client Invitare un cliente /it/start/connect-claude Connettere Claude a Libretto /it/build Costruire /it/build/first-page Costruire una pagina /it/build/layers-and-canvas Livelli e canvas /it/build/site-components Componenti del sito /it/design-system Design system /it/design-system/tokens Colori, spazi e temi /it/design-system/components Componenti e varianti /it/design-system/fonts Tipografia e font /it/motion Movimento /it/motion/scenes Scene e ricette /it/motion/image-sequences Sequenze di immagini /it/motion/reduced-motion Movimento ridotto /it/publish Pubblicazione /it/publish/languages Le lingue del sito /it/publish/versions Pubblicazione e versioni /it/publish/members-and-forms Iscritti e moduli /it/publish/domains Domini /it/publish/redirects Reindirizzamenti /it/handover Consegnare un sito al cliente /it/glossary Glossario /it/agents Agenti e API /it/agents/mcp Server MCP /it/agents/cli CLI /it/agents/batches Batch /it/agents/errors Errori e segnalazioni /it/agents/operations Operazioni /it/search Cerca