Skip to content

Commit

Permalink
Update block.json schema (#62917)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Jul 27, 2024
1 parent c94ce8b commit 7ed4689
Showing 1 changed file with 49 additions and 28 deletions.
77 changes: 49 additions & 28 deletions schemas/json/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,12 @@
},
"heading": {
"type": "boolean",
"description": "This property adds block controls which allow the user to set heading colors in a block, heading color is disabled by default.\n\nHeading color presets are sourced from the editor-color-palette theme support.\n\nWhen the block declares support for color.heading, its attributes definition is extended to include the style attribute",
"description": "This property adds block controls which allow the user to set heading colors in a block. Heading color is disabled by default.\n\nHeading color presets are sourced from the editor-color-palette theme support.\n\nWhen the block declares support for color.heading, its attributes definition is extended to include the style attribute",
"default": false
},
"button": {
"type": "boolean",
"description": "This property adds block controls which allow the user to set button colors in a block, button color is disabled by default.\n\nButton color presets are sourced from the editor-color-palette theme support.\n\nWhen the block declares support for color.heading, its attributes definition is extended to include the style attribute",
"description": "This property adds block controls which allow the user to set button colors in a block. Button color is disabled by default.\n\nButton color presets are sourced from the editor-color-palette theme support.\n\nWhen the block declares support for color.button, its attributes definition is extended to include the style attribute",
"default": false
},
"enableContrastChecker": {
Expand Down Expand Up @@ -482,6 +482,11 @@
"type": "boolean",
"description": "For the `flex` layout type only, determines display of the orientation control in the block toolbar.",
"default": true
},
"allowCustomContentAndWideSize": {
"type": "boolean",
"description": "For the `constrained` layout type only, determines display of the custom content and wide size controls in the block sidebar.",
"default": true
}
}
}
Expand Down Expand Up @@ -572,10 +577,12 @@
}
},
"shadow": {
"default": false,
"description": "Allow blocks to define a box shadow.",
"oneOf": [
{
"type": "boolean"
"type": "boolean",
"description": "Defines whether a box shadow is enabled or not."
},
{
"type": "object"
Expand All @@ -597,6 +604,31 @@
"default": false
}
}
},
"interactivity": {
"description": "Indicates if the block is using Interactivity API features.",
"oneOf": [
{
"type": "boolean",
"description": "Indicates whether the block is using the Interactivity API directives.",
"default": false
},
{
"type": "object",
"properties": {
"clientNavigation": {
"type": "boolean",
"description": "Indicates whether a block is compatible with the Interactivity API client-side navigation.\n\nSet it to true only if the block is not interactive or if it is interactive using the Interactivity API. Set it to false if the block is interactive but uses vanilla JS, jQuery or another JS framework/library other than the Interactivity API.",
"default": false
},
"interactive": {
"type": "boolean",
"description": "Indicates whether the block is using the Interactivity API directives.",
"default": false
}
}
}
]
}
},
"additionalProperties": true
Expand Down Expand Up @@ -697,31 +729,6 @@
}
}
]
},
"interactivity": {
"description": "Indicates if the block is using Interactivity API features.",
"oneOf": [
{
"type": "boolean",
"description": "Indicates whether the block is using the Interactivity API directives.",
"default": false
},
{
"type": "object",
"properties": {
"clientNavigation": {
"type": "boolean",
"description": "Indicates whether a block is compatible with the Interactivity API client-side navigation.\n\nSet it to true only if the block is not interactive or if it is interactive using the Interactivity API. Set it to false if the block is interactive but uses vanilla JS, jQuery or another JS framework/library other than the Interactivity API.",
"default": false
},
"interactive": {
"type": "boolean",
"description": "Indicates whether the block is using the Interactivity API directives.",
"default": false
}
}
}
]
}
}
},
Expand Down Expand Up @@ -817,6 +824,20 @@
}
]
},
"viewScriptModule": {
"description": "Block type frontend script module definition. It will be enqueued only when viewing the content on the front of the site.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"editorStyle": {
"description": "Block type editor style definition. It will only be enqueued in the context of the editor.",
"oneOf": [
Expand Down

0 comments on commit 7ed4689

Please sign in to comment.