Operazioni sugli effetti
3 operazioni di nome effect.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| effect.list | List the effect presets the editor offers, the built-in effects first, then the site's own: each a reveal (meta.reveal), transitions (one transition value in scope, base when absent) or both. | site.read | none |
| effect.save | Save the reveal and the transition declarations of a page node as a site effect preset. | site.edit | none |
| effect.delete | Delete a site effect preset; nodes it was applied to keep their reveal and transitions. | site.edit | destructive |
effect.list
List the effect presets the editor offers, the built-in effects first, then the site's own: each a reveal (meta.reveal), transitions (one transition value in scope, base when absent) or both. Apply one with tree.commit: set_meta with the reveal, set_style with the transitions.
Esempio di input
{}Input
L’input è un record: vedi lo schema qui sotto.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|
Provala
yarn splash effect.list '{}' --dry-runeffect.save
Save the reveal and the transition declarations of a page node as a site effect preset. The transitions are read from scope, else from the first scope of the node that declares one; a node with neither is refused.
Esempio di input
{
"pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
"nodeId": "claim001",
"label": "Soft lift",
"scope": "s::hover"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| pageId | string | yes | At least 1 character. |
| nodeId | string | yes | |
| label | string | yes | At least 1 character. At most 80 characters. |
| id | string | no | |
| scope | string | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | yes | |
| label | string | yes | At least 1 character. At most 80 characters. |
| reveal | object | object | no | |
| transitions | array of object | no | At least 1 item. |
| transitions[].property | string | yes | |
| transitions[].duration | string | yes | At least 1 character. |
| transitions[].easing | string | no | At least 1 character. |
| transitions[].delay | string | no | At least 1 character. |
| scope | string | no | |
| source | string | yes | One of "builtin", "site". |
Provala
yarn splash effect.save '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f","nodeId":"claim001","label":"Soft lift","scope":"s::hover"}' --dry-runeffect.delete
Delete a site effect preset; nodes it was applied to keep their reveal and transitions.
Esempio di input
{
"effectId": "soft-lift"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| effectId | string | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| success | true | yes |
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.
Generato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 29edf0002cbbde1c).
Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.