Operazioni sul design system
20 operazioni di nome designSystem.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| designSystem.promoteVariant | Promote authored component overrides to a reusable variant and reattach the node. | designSystem.promote | none |
| designSystem.setToken | Write one token ({ set, path, type, value }), under the AA contrast gate and the token group rules. | designSystem.operation | none |
| designSystem.setTokens | Write many tokens as one change, gated once for AA contrast on the end state, so one undo restores the lot. | designSystem.operation | none |
| designSystem.setComponentCell | Set cells of one design-system component in one save: each { cell, value }, the cell key <variant>.<size>.<state>.<part>.<breakpoint>.<property> (primary.all.hover.container.base.background: all when the value does not vary by size, base or a breakpoint id). | designSystem.operation | none |
| designSystem.createVariant | Add a variant to a design-system component, such as a light or a small button, a pill tag or a dark card: variant (its key, kebab case), label, and from, the variant whose cells it copies as the same aliases, so the new one follows the system until one of its cells changes. | designSystem.operation | none |
| designSystem.createTheme | Add a theme ({ key, label, sets in precedence order, activation? }) as a draft, under the AA contrast gate: the previews show it, and a publish ships it only where a node names it (node theme, an instance's $theme, a data-theme attribute; the publish answer lists it in draftThemes). | designSystem.operation | none |
| designSystem.activateSet | Add a token set to the sets of a theme (theme, set): the set takes its place in the precedence order the sets follow, so there is no position to choose, and its tokens apply wherever the theme does. | designSystem.operation | none |
| designSystem.setScheme | Set the design-system theme a page node and its subtree draw in (pageId, nodeId, theme; null makes the node inherit its parent's again), as tree.commit set_theme does: the write goes through the tree commit's gates and needs the page's tree:<pageId> base revision. | designSystem.operation | none |
| designSystem.resetToBlueprint | Remove site overrides so the blueprint's values apply again, in one revision. | designSystem.operation | destructive |
| designSystem.importTokens | Import tokens from DTCG files in the Tokens Studio layout (one file per set plus $themes, loose or zipped as base64) or from a Figma variables export (collections become sets, modes themes); mapping renames imported paths to existing ones. | designSystem.operation | none |
| designSystem.diff | Read every override the draft holds over its blueprint (tokens, cells, variants, themes, sets, mixins). | designSystem.operation | none |
| designSystem.lint | Check the draft design system: every contrast pair below AA or AAA, the pairs that cannot be judged, the missing media assets and the lint rules' findings, with the draft's overrides. | designSystem.operation | none |
| designSystem.createSet | Add an empty token set key after set after in the precedence order. | designSystem.operation | none |
| designSystem.updateTheme | Edit a theme: its label, its sets in precedence order, its activation rule, isDefault (the former default stops being it; a default takes no rule and is never a draft) or draft. | designSystem.operation | none |
| designSystem.updateVariant | Relabel a component variant or hide it (hidden: true): a hidden variant still draws wherever a node uses it, and the pickers leave it out. | designSystem.operation | none |
| designSystem.deleteVariant | Delete a variant the site added, with its cells. | designSystem.operation | destructive |
| designSystem.setMixin | Create or update a mixin, a surface nodes apply by key with tree.commit set_mixins (a pattern background, a card surface): key, label and sheet, CSS property to value in the order written, with tokens as {path}. | designSystem.operation | none |
| designSystem.deleteMixin | Delete a mixin the site added. | designSystem.operation | destructive |
| designSystem.read | Read the draft design system's index: its revision, sets, themes, every component with its variant keys, and every token group with its number of paths. | designSystem.operation | none |
| designSystem.readComponent | Read the cells of one design-system component, filtered and paged: variant, size, state, part, breakpoint and property keep the cells whose key segment equals them (a cell key is <variant>.<size>.<state>.<part>.<breakpoint>.<property>), and own: true keeps only the cells set at their own key, leaving out the inherited ones. | designSystem.operation | none |
designSystem.promoteVariant
Promote authored component overrides to a reusable variant and reattach the node.
Esempio di input
{
"pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
"nodeId": "claim001",
"variant": "claim",
"label": "Claim"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| pageId | string | yes | At least 1 character. |
| nodeId | string | yes | |
| variant | string | yes | |
| label | string | yes | At least 1 character. At most 120 characters. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.promoteVariant '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f","nodeId":"claim001","variant":"claim","label":"Claim"}' --dry-rundesignSystem.setToken
Write one token ({ set, path, type, value }), under the AA contrast gate and the token group rules. A dimension token (a type.*.fontSize, a space step, a radius) may be fluid: its value may be a clamp(), calc(), min() or max(), such as clamp(2.125rem, 1.2rem + 3.9vw, 6.4rem). A fluid size suits pages on a breakpoint frame; on a page whose frame scales (responsiveMode: "scale") the canvas already scales, so a vw size there scales twice. To scale spacing, write a scale factor instead of every step: a number token named scale in a space group multiplies every dimension of that group and its subgroups (space.section-y.scale: 0.75 makes every section spacing 25 % tighter, space.scale scales all spacing; above 0).
Esempio di input
{
"set": "core",
"path": "radius.md",
"type": "dimension",
"value": "9px"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| set | string | yes | At least 1 character. |
| path | string | yes | At least 1 character. |
| type | string | yes | At least 1 character. |
| value | value | yes | |
| description | string | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.setToken '{"set":"core","path":"radius.md","type":"dimension","value":"9px"}' --dry-rundesignSystem.setTokens
Write many tokens as one change, gated once for AA contrast on the end state, so one undo restores the lot. A dimension token (a type.*.fontSize, a space step, a radius) may be fluid: its value may be a clamp(), calc(), min() or max(), such as clamp(2.125rem, 1.2rem + 3.9vw, 6.4rem). A fluid size suits pages on a breakpoint frame; on a page whose frame scales (responsiveMode: "scale") the canvas already scales, so a vw size there scales twice. To scale spacing, write a scale factor instead of every step: a number token named scale in a space group multiplies every dimension of that group and its subgroups (space.section-y.scale: 0.75 makes every section spacing 25 % tighter, space.scale scales all spacing; above 0).
Esempio di input
{
"writes": [
{
"set": "core",
"path": "color.palette.neutral.900",
"type": "color",
"value": "#4a4a4a"
},
{
"set": "semantic-dark",
"path": "color.text.faint",
"type": "color",
"value": "rgba(255, 255, 255, 0.7)"
}
]
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| writes | array of object | yes | At least 1 item. |
| writes[].layer | string | no | One of "site", "blueprint". |
| writes[].set | string | yes | At least 1 character. |
| writes[].path | string | yes | At least 1 character. |
| writes[].type | string | yes | At least 1 character. |
| writes[].value | value | yes | |
| writes[].description | string | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.setTokens '{"writes":[{"set":"core","path":"color.palette.neutral.900","type":"color","value":"#4a4a4a"},{"set":"semantic-dark","path":"color.text.faint","type":"color","value":"rgba(255, 255, 255, 0.7)"}]}' --dry-rundesignSystem.setComponentCell
Set cells of one design-system component in one save: each { cell, value }, the cell key <variant>.<size>.<state>.<part>.<breakpoint>.<property> (primary.all.hover.container.base.background: all when the value does not vary by size, base or a breakpoint id). A value is a token alias such as {color.bg.accent} (a semantic or foundation token, never a palette step or a raw literal), a bare keyword for a property whose values are modes (a link underline's none, always, hover), or { component, variant } for a part that embeds another component. Read the cell keys of a component with the component/<key> resource (designSystem.readComponent) and the segments with designSystem.read components: true. The menu dialog's drawer is the drawer-nav component: its overlay cells (background, opacity, blur), panel cells (background, width, padding, shadow, z, radius, offset-x, offset-y, fit) and motion cells (delay, duration, easing, fade) style it, such as full.all.default.overlay.base.blur. Every save runs the AA contrast gate.
Esempio di input
{
"component": "button",
"cells": [
{
"cell": "primary.all.hover.container.base.background",
"value": "{color.bg.accent-strong}"
}
]
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| component | string | yes | At least 1 character. |
| cells | array of object | yes | At least 1 item. |
| cells[].cell | string | yes | At least 1 character. |
| cells[].value | string | object | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.setComponentCell '{"component":"button","cells":[{"cell":"primary.all.hover.container.base.background","value":"{color.bg.accent-strong}"}]}' --dry-rundesignSystem.createVariant
Add a variant to a design-system component, such as a light or a small button, a pill tag or a dark card: variant (its key, kebab case), label, and from, the variant whose cells it copies as the same aliases, so the new one follows the system until one of its cells changes. Change its cells with setComponentCell and draw it on a node with tree.commit set_variant { id, variant }. Under the AA contrast gate.
Esempio di input
{
"component": "button",
"variant": "ghost",
"label": "Ghost",
"from": "primary"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| component | string | yes | At least 1 character. |
| variant | string | yes | At least 1 character. |
| label | string | yes | At least 1 character. |
| from | string | yes | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.createVariant '{"component":"button","variant":"ghost","label":"Ghost","from":"primary"}' --dry-rundesignSystem.createTheme
Add a theme ({ key, label, sets in precedence order, activation? }) as a draft, under the AA contrast gate: the previews show it, and a publish ships it only where a node names it (node theme, an instance's $theme, a data-theme attribute; the publish answer lists it in draftThemes). A draft's activation rule never applies on the public site: clear the draft flag with updateTheme to make the theme live by its rule.
Esempio di input
{
"key": "night",
"label": "Night",
"sets": [
"core",
"semantic-dark"
]
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| key | string | yes | At least 1 character. |
| label | string | yes | At least 1 character. |
| sets | array of string | yes | At least 1 item. |
| activation | object | no | |
| activation.prefersColorScheme | string | no | One of "light", "dark". |
| activation.hostname | string | no | |
| activation.pathPrefix | string | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.createTheme '{"key":"night","label":"Night","sets":["core","semantic-dark"]}' --dry-rundesignSystem.activateSet
Add a token set to the sets of a theme (theme, set): the set takes its place in the precedence order the sets follow, so there is no position to choose, and its tokens apply wherever the theme does. Under the AA contrast gate.
Esempio di input
{
"theme": "night",
"set": "semantic-dark"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| theme | string | yes | At least 1 character. |
| set | string | yes | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.activateSet '{"theme":"night","set":"semantic-dark"}' --dry-rundesignSystem.setScheme
Set the design-system theme a page node and its subtree draw in (pageId, nodeId, theme; null makes the node inherit its parent's again), as tree.commit set_theme does: the write goes through the tree commit's gates and needs the page's tree:<pageId> base revision.
Esempio di input
{
"pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
"nodeId": "claim001",
"theme": "night"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| pageId | string | yes | At least 1 character. |
| nodeId | string | yes | |
| theme | string | null | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.setScheme '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f","nodeId":"claim001","theme":"night"}' --dry-rundesignSystem.resetToBlueprint
Remove site overrides so the blueprint's values apply again, in one revision. scope names what: { kind: "all" }, one token ({ set, path }), every token under a path prefix, a component, some cells of a component, a variant, a theme, a site set, or many of these. A token the site added is deleted, which is refused (409) while a cell still aliases it.
Esempio di input
{
"scope": {
"kind": "prefix",
"prefix": "color.brand"
}
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| scope | object | object | object | object | object | object | object | object | object | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
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.
designSystem.importTokens
Import tokens from DTCG files in the Tokens Studio layout (one file per set plus $themes, loose or zipped as base64) or from a Figma variables export (collections become sets, modes themes); mapping renames imported paths to existing ones. Run it as a dry run first: the answer's report lists the adds, the changes, the type conflicts and the unknown names, and nothing is written. A confirmed import lands as one revision under the AA contrast gate.
Esempio di input
{
"format": "dtcg",
"files": [
{
"name": "tokens.json",
"text": "{\"color\":{\"brand\":{\"$type\":\"color\",\"$value\":\"#1e3d4f\"}}}"
}
]
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| format | string | yes | One of "dtcg", "figma". |
| files | array of object | object | yes | At least 1 item. |
| mapping | record of string | no | Default {}. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.importTokens '{"format":"dtcg","files":[{"name":"tokens.json","text":"{\"color\":{\"brand\":{\"$type\":\"color\",\"$value\":\"#1e3d4f\"}}}"}]}' --dry-rundesignSystem.diff
Read every override the draft holds over its blueprint (tokens, cells, variants, themes, sets, mixins). Over MCP it answers a summary (their count and names, the stylesheet's size); pass full: true for every override with its blueprint and site values, and the stylesheet.
Esempio di input
{}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| full | boolean | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.diff '{}' --dry-rundesignSystem.lint
Check the draft design system: every contrast pair below AA or AAA, the pairs that cannot be judged, the missing media assets and the lint rules' findings, with the draft's overrides. Over MCP it answers a summary (counts by severity and reason, the worst findings first, the override names, the stylesheet's size); pass full: true for every finding, every override and the stylesheet.
Esempio di input
{}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| full | boolean | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.lint '{}' --dry-rundesignSystem.createSet
Add an empty token set key after set after in the precedence order. No theme uses it until activateSet or updateTheme lists it.
Esempio di input
{
"key": "brand-sub",
"label": "Sub-brand",
"after": "semantic-light"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| key | string | yes | At least 1 character. |
| label | string | yes | At least 1 character. |
| after | string | yes | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.createSet '{"key":"brand-sub","label":"Sub-brand","after":"semantic-light"}' --dry-rundesignSystem.updateTheme
Edit a theme: its label, its sets in precedence order, its activation rule, isDefault (the former default stops being it; a default takes no rule and is never a draft) or draft. draft: false makes the theme live: published wherever its rule applies or a node names it. A draft theme is published only where a node names it.
Esempio di input
{
"key": "night",
"label": "Night",
"isDefault": false
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| key | string | yes | At least 1 character. |
| label | string | no | At least 1 character. |
| sets | array of string | no | At least 1 item. |
| isDefault | boolean | no | |
| draft | boolean | no | |
| activation | object | no | |
| activation.prefersColorScheme | string | no | One of "light", "dark". |
| activation.hostname | string | no | |
| activation.pathPrefix | string | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.updateTheme '{"key":"night","label":"Night","isDefault":false}' --dry-rundesignSystem.updateVariant
Relabel a component variant or hide it (hidden: true): a hidden variant still draws wherever a node uses it, and the pickers leave it out.
Esempio di input
{
"component": "button",
"variant": "ghost",
"label": "Ghost, quiet"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| component | string | yes | At least 1 character. |
| variant | string | yes | At least 1 character. |
| label | string | no | At least 1 character. |
| hidden | boolean | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.updateVariant '{"component":"button","variant":"ghost","label":"Ghost, quiet"}' --dry-rundesignSystem.deleteVariant
Delete a variant the site added, with its cells. A variant the blueprint ships is refused (hide it with updateVariant), and so is one a cell or a node uses (409, with the usage).
Esempio di input
{
"component": "button",
"variant": "ghost"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| component | string | yes | At least 1 character. |
| variant | string | yes | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
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.
designSystem.setMixin
Create or update a mixin, a surface nodes apply by key with tree.commit set_mixins (a pattern background, a card surface): key, label and sheet, CSS property to value in the order written, with tokens as {path}. The sheet takes the properties of the style catalogue, no !important, and semantic or foundation tokens of a group the property takes, each defined in some theme of the draft.
Esempio di input
{
"key": "band",
"label": "Band",
"sheet": {
"padding-block": "{space.md}",
"border-top": "1px solid {color.border.default}"
}
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| key | string | yes | |
| label | string | yes | At least 1 character. |
| sheet | record of string | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.setMixin '{"key":"band","label":"Band","sheet":{"padding-block":"{space.md}","border-top":"1px solid {color.border.default}"}}' --dry-rundesignSystem.deleteMixin
Delete a mixin the site added. A mixin the blueprint ships is refused, and so is one a draft node applies (the refusal names the nodes).
Esempio di input
{
"key": "band"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| layer | string | no | One of "site", "blueprint". |
| key | string | yes |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
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.
designSystem.read
Read the draft design system's index: its revision, sets, themes, every component with its variant keys, and every token group with its number of paths. Ask for more with tokens (the groups whose paths and values to include, such as ["color.palette", "space"]), components: true (each component's sizes, states and parts, the segments of a setComponentCell key), css: true (the compiled stylesheet, about 240 KB on a large site) or embeds: true. The default answer stays small; read one component's cells with designSystem.readComponent.
Esempio di input
{
"tokens": [
"color.palette"
]
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| index | boolean | no | |
| tokens | array of string | no | At most 32 items. |
| components | boolean | no | Default false. |
| css | boolean | no | Default false. |
| embeds | boolean | no | Default false. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| revision | integer | yes | |
| detached | array of object | no | |
| detached[].component | string | yes | |
| detached[].count | integer | yes | At least 0. |
| sets | array of object | no | |
| sets[].key | string | yes | |
| sets[].label | string | yes | |
| sets[].position | integer | yes | |
| sets[].siteAdded | boolean | yes | |
| themes | array of object | no | |
| themes[].key | string | yes | |
| themes[].label | string | yes | |
| themes[].sets | array of string | yes | |
| themes[].isDefault | boolean | no | |
| themes[].draft | boolean | no | |
| themes[].activation | object | no | |
| components | array of object | no | |
| components[].key | string | yes | |
| components[].label | string | yes | |
| components[].group | string | yes | |
| components[].variants | array of string | yes | |
| components[].hiddenVariants | array of string | yes | |
| tokenGroups | array of object | no | |
| tokenGroups[].group | string | yes | |
| tokenGroups[].count | integer | yes | At least 0. |
| tokens | array of object | no | |
| tokens[].group | string | yes | |
| tokens[].tokens | array of object | yes | |
| componentSpecs | array of object | no | |
| componentSpecs[].key | string | yes | |
| componentSpecs[].label | string | yes | |
| componentSpecs[].group | string | yes | |
| componentSpecs[].variants | array of object | yes | |
| componentSpecs[].sizes | array of string | yes | |
| componentSpecs[].states | array of string | yes | |
| componentSpecs[].parts | array of object | object | yes | |
| css | string | no | |
| embeds | record of record of object | no |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.read '{"tokens":["color.palette"]}' --dry-rundesignSystem.readComponent
Read the cells of one design-system component, filtered and paged: variant, size, state, part, breakpoint and property keep the cells whose key segment equals them (a cell key is <variant>.<size>.<state>.<part>.<breakpoint>.<property>), and own: true keeps only the cells set at their own key, leaving out the inherited ones. Each cell has its own value (null when it inherits), the key it inherits from and the blueprint's value; resolved: true adds its value in every theme, css: true the blueprint's baseline stylesheet. limit cells (100 by default) from cursor; total counts every match and nextCursor names the next page. A large component has thousands of cells: filter by variant and state first.
Esempio di input
{
"component": "button",
"variant": "primary",
"state": "hover",
"own": true
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| component | string | yes | At least 1 character. |
| variant | string | no | At least 1 character. |
| size | string | no | At least 1 character. |
| state | string | no | At least 1 character. |
| part | string | no | At least 1 character. |
| breakpoint | string | no | At least 1 character. |
| property | string | no | At least 1 character. |
| own | boolean | no | Default false. |
| resolved | boolean | no | Default false. |
| css | boolean | no | Default false. |
| limit | integer | no | At least 1. At most 1000. Default 100. |
| cursor | integer | no | At least 0. Default 0. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| revision | integer | yes | |
| component | string | yes | |
| total | integer | yes | At least 0. |
| nextCursor | integer | null | yes | |
| cells | array of object | yes | |
| cells[].cell | string | yes | |
| cells[].value | string | object | null | yes | |
| cells[].source | object | yes | |
| cells[].blueprint | string | object | null | yes | |
| cells[].resolved | record of value | no | |
| blueprint | object | yes | |
| blueprint.variants | array of string | yes | |
| blueprint.css | string | no | |
| blueprint.embeds | record of record of object | no |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash designSystem.readComponent '{"component":"button","variant":"primary","state":"hover","own":true}' --dry-runGenerato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 49d903577e51777f).
Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.