From 032502b5b777f81a45ce784d2bd0bfbcc3bf20d5 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Wed, 15 Oct 2025 11:41:36 +0100 Subject: [PATCH] Chore: regenerate theme schema + ignore in prettier (#112414) regenerate theme schema + ignore in prettier --- .prettierignore | 1 + .../theme-playground/schema.generated.json | 1030 +++++++++-------- 2 files changed, 536 insertions(+), 495 deletions(-) diff --git a/.prettierignore b/.prettierignore index 726f8613700..7d9575558d9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -26,6 +26,7 @@ vendor # Auto-generated theme files theme.light.generated.json theme.dark.generated.json +public/app/features/theme-playground/schema.generated.json # Generated Swagger API specs public/api-merged.json diff --git a/public/app/features/theme-playground/schema.generated.json b/public/app/features/theme-playground/schema.generated.json index 1b1850a10f3..936471ba6ea 100644 --- a/public/app/features/theme-playground/schema.generated.json +++ b/public/app/features/theme-playground/schema.generated.json @@ -1,511 +1,551 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "DeepPartial>": { - "properties": { - "action": { - "$ref": "#/definitions/DeepPartial<{selected:string;selectedBorder:string;hover:string;hoverOpacity:number;focus:string;disabledBackground:string;disabledText:string;disabledOpacity:number;}>" - }, - "background": { - "$ref": "#/definitions/DeepPartial<{canvas:string;primary:string;secondary:string;elevated:string;}>" - }, - "border": { - "$ref": "#/definitions/DeepPartial<{weak:string;medium:string;strong:string;}>" - }, - "contrastThreshold": { - "type": "number" - }, - "error": { - "$ref": "#/definitions/DeepPartial" - }, - "gradients": { - "$ref": "#/definitions/DeepPartial<{brandVertical:string;brandHorizontal:string;}>" - }, - "hoverFactor": { - "type": "number" - }, - "info": { - "$ref": "#/definitions/DeepPartial" - }, - "mode": { - "enum": ["dark", "light"], - "type": "string" - }, - "primary": { - "$ref": "#/definitions/DeepPartial" - }, - "secondary": { - "$ref": "#/definitions/DeepPartial" - }, - "success": { - "$ref": "#/definitions/DeepPartial" - }, - "text": { - "$ref": "#/definitions/DeepPartial<{primary:string;secondary:string;disabled:string;link:string;maxContrast:string;}>" - }, - "tonalOffset": { - "type": "number" - }, - "warning": { - "$ref": "#/definitions/DeepPartial" - } - }, - "type": "object" - }, - "DeepPartial": { - "properties": { - "border": { - "description": "Used for borders", - "type": "string" - }, - "borderTransparent": { - "description": "Used for weak colored borders like larger alert/banner boxes and smaller badges and tags", - "type": "string" - }, - "contrastText": { - "description": "Text color for text ontop of main", - "type": "string" - }, - "main": { - "description": "Main color", - "type": "string" - }, - "name": { - "description": "color intent (primary, secondary, info, error, etc)", - "type": "string" - }, - "shade": { - "description": "Used for hover", - "type": "string" - }, - "text": { - "description": "Used for text", - "type": "string" - }, - "transparent": { - "description": "Used subtly colored backgrounds", - "type": "string" - } - }, - "type": "object" - }, - "DeepPartial<{brandVertical:string;brandHorizontal:string;}>": { - "properties": { - "brandHorizontal": { - "type": "string" - }, - "brandVertical": { - "type": "string" - } - }, - "type": "object" - }, - "DeepPartial<{canvas:string;primary:string;secondary:string;elevated:string;}>": { - "properties": { - "canvas": { - "description": "Dashboard and body background", - "type": "string" - }, - "elevated": { - "description": "For popovers and menu backgrounds. This is the same color as primary in most light themes but in dark\nthemes it has a brighter shade to help give it contrast against the primary background.", - "type": "string" - }, - "primary": { - "description": "Primary content pane background (panels etc)", - "type": "string" - }, - "secondary": { - "description": "Cards and elements that need to stand out on the primary background", - "type": "string" - } - }, - "type": "object" - }, - "DeepPartial<{primary:string;secondary:string;disabled:string;link:string;maxContrast:string;}>": { - "properties": { - "disabled": { - "type": "string" - }, - "link": { - "type": "string" - }, - "maxContrast": { - "description": "Used for auto white or dark text on colored backgrounds", - "type": "string" - }, - "primary": { - "type": "string" - }, - "secondary": { - "type": "string" - } - }, - "type": "object" - }, - "DeepPartial<{selected:string;selectedBorder:string;hover:string;hoverOpacity:number;focus:string;disabledBackground:string;disabledText:string;disabledOpacity:number;}>": { - "properties": { - "disabledBackground": { - "description": "Used for disabled buttons and inputs", - "type": "string" - }, - "disabledOpacity": { - "description": "Disablerd opacity", - "type": "number" - }, - "disabledText": { - "description": "Disabled text", - "type": "string" - }, - "focus": { - "description": "Used focused menu item / select option", - "type": "string" - }, - "hover": { - "description": "Used for hovered menu item / select option", - "type": "string" - }, - "hoverOpacity": { - "description": "Used for button/colored background hover opacity", - "type": "number" - }, - "selected": { - "description": "Used for selected menu item / select option", - "type": "string" - }, - "selectedBorder": { - "type": "string" - } - }, - "type": "object" - }, - "DeepPartial<{weak:string;medium:string;strong:string;}>": { - "properties": { - "medium": { - "type": "string" - }, - "strong": { - "type": "string" - }, - "weak": { - "type": "string" - } - }, - "type": "object" - }, - "ThemeShapeInput": { - "properties": { - "borderRadius": { - "type": "number" - } - }, - "type": "object" - }, - "ThemeTypographyInput": { - "properties": { - "fontFamily": { - "type": "string" - }, - "fontFamilyMonospace": { - "type": "string" - }, - "fontSize": { - "type": "number" - }, - "fontWeightBold": { - "type": "number" - }, - "fontWeightLight": { - "type": "number" - }, - "fontWeightMedium": { - "type": "number" - }, - "fontWeightRegular": { - "type": "number" - }, - "htmlFontSize": { - "type": "number" - } - }, - "type": "object" - }, - "ThemeVizColor<\"blue\">": { - "properties": { - "aliases": { - "items": { - "type": "string" - }, - "type": "array" - }, - "color": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/ThemeVizColorShadeName_4" - }, - "primary": { - "type": "boolean" - } - }, - "type": "object" - }, - "ThemeVizColor<\"green\">": { - "properties": { - "aliases": { - "items": { - "type": "string" - }, - "type": "array" - }, - "color": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/ThemeVizColorShadeName_3" - }, - "primary": { - "type": "boolean" - } - }, - "type": "object" - }, - "ThemeVizColor<\"orange\">": { - "properties": { - "aliases": { - "items": { - "type": "string" - }, - "type": "array" - }, - "color": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/ThemeVizColorShadeName_1" - }, - "primary": { - "type": "boolean" - } - }, - "type": "object" - }, - "ThemeVizColor<\"purple\">": { - "properties": { - "aliases": { - "items": { - "type": "string" - }, - "type": "array" - }, - "color": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/ThemeVizColorShadeName_5" - }, - "primary": { - "type": "boolean" - } - }, - "type": "object" - }, - "ThemeVizColor<\"red\">": { - "properties": { - "aliases": { - "items": { - "type": "string" - }, - "type": "array" - }, - "color": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/ThemeVizColorShadeName" - }, - "primary": { - "type": "boolean" - } - }, - "type": "object" - }, - "ThemeVizColor<\"yellow\">": { - "properties": { - "aliases": { - "items": { - "type": "string" - }, - "type": "array" - }, - "color": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/ThemeVizColorShadeName_2" - }, - "primary": { - "type": "boolean" - } - }, - "type": "object" - }, - "ThemeVizColorShadeName": { - "enum": ["dark-red", "light-red", "red", "semi-dark-red", "super-light-red"], - "type": "string" - }, - "ThemeVizColorShadeName_1": { - "enum": ["dark-orange", "light-orange", "orange", "semi-dark-orange", "super-light-orange"], - "type": "string" - }, - "ThemeVizColorShadeName_2": { - "enum": ["dark-yellow", "light-yellow", "semi-dark-yellow", "super-light-yellow", "yellow"], - "type": "string" - }, - "ThemeVizColorShadeName_3": { - "enum": ["dark-green", "green", "light-green", "semi-dark-green", "super-light-green"], - "type": "string" - }, - "ThemeVizColorShadeName_4": { - "enum": ["blue", "dark-blue", "light-blue", "semi-dark-blue", "super-light-blue"], - "type": "string" - }, - "ThemeVizColorShadeName_5": { - "enum": ["dark-purple", "light-purple", "purple", "semi-dark-purple", "super-light-purple"], - "type": "string" - }, - "ThemeVizHue": { - "anyOf": [ - { - "properties": { - "name": { - "const": "red", - "type": "string" + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "DeepPartial>": { + "properties": { + "action": { + "$ref": "#/definitions/DeepPartial<{selected:string;selectedBorder:string;hover:string;hoverOpacity:number;focus:string;disabledBackground:string;disabledText:string;disabledOpacity:number;}>" + }, + "background": { + "$ref": "#/definitions/DeepPartial<{canvas:string;primary:string;secondary:string;elevated:string;}>" + }, + "border": { + "$ref": "#/definitions/DeepPartial<{weak:string;medium:string;strong:string;}>" + }, + "contrastThreshold": { + "type": "number" + }, + "error": { + "$ref": "#/definitions/DeepPartial" + }, + "gradients": { + "$ref": "#/definitions/DeepPartial<{brandVertical:string;brandHorizontal:string;}>" + }, + "hoverFactor": { + "type": "number" + }, + "info": { + "$ref": "#/definitions/DeepPartial" + }, + "mode": { + "enum": [ + "dark", + "light" + ], + "type": "string" + }, + "primary": { + "$ref": "#/definitions/DeepPartial" + }, + "secondary": { + "$ref": "#/definitions/DeepPartial" + }, + "success": { + "$ref": "#/definitions/DeepPartial" + }, + "text": { + "$ref": "#/definitions/DeepPartial<{primary:string;secondary:string;disabled:string;link:string;maxContrast:string;}>" + }, + "tonalOffset": { + "type": "number" + }, + "warning": { + "$ref": "#/definitions/DeepPartial" + } }, - "shades": { - "items": { - "$ref": "#/definitions/ThemeVizColor<\"red\">" - }, - "type": "array" - } - }, - "type": "object" + "type": "object" }, - { - "properties": { - "name": { - "const": "orange", - "type": "string" + "DeepPartial": { + "properties": { + "border": { + "description": "Used for borders", + "type": "string" + }, + "borderTransparent": { + "description": "Used for weak colored borders like larger alert/banner boxes and smaller badges and tags", + "type": "string" + }, + "contrastText": { + "description": "Text color for text ontop of main", + "type": "string" + }, + "main": { + "description": "Main color", + "type": "string" + }, + "name": { + "description": "color intent (primary, secondary, info, error, etc)", + "type": "string" + }, + "shade": { + "description": "Used for hover", + "type": "string" + }, + "text": { + "description": "Used for text", + "type": "string" + }, + "transparent": { + "description": "Used subtly colored backgrounds", + "type": "string" + } }, - "shades": { - "items": { - "$ref": "#/definitions/ThemeVizColor<\"orange\">" - }, - "type": "array" - } - }, - "type": "object" + "type": "object" }, - { - "properties": { - "name": { - "const": "yellow", - "type": "string" + "DeepPartial<{brandVertical:string;brandHorizontal:string;}>": { + "properties": { + "brandHorizontal": { + "type": "string" + }, + "brandVertical": { + "type": "string" + } }, - "shades": { - "items": { - "$ref": "#/definitions/ThemeVizColor<\"yellow\">" - }, - "type": "array" - } - }, - "type": "object" + "type": "object" }, - { - "properties": { - "name": { - "const": "green", - "type": "string" + "DeepPartial<{canvas:string;primary:string;secondary:string;elevated:string;}>": { + "properties": { + "canvas": { + "description": "Dashboard and body background", + "type": "string" + }, + "elevated": { + "description": "For popovers and menu backgrounds. This is the same color as primary in most light themes but in dark\nthemes it has a brighter shade to help give it contrast against the primary background.", + "type": "string" + }, + "primary": { + "description": "Primary content pane background (panels etc)", + "type": "string" + }, + "secondary": { + "description": "Cards and elements that need to stand out on the primary background", + "type": "string" + } }, - "shades": { - "items": { - "$ref": "#/definitions/ThemeVizColor<\"green\">" - }, - "type": "array" - } - }, - "type": "object" + "type": "object" }, - { - "properties": { - "name": { - "const": "blue", - "type": "string" + "DeepPartial<{primary:string;secondary:string;disabled:string;link:string;maxContrast:string;}>": { + "properties": { + "disabled": { + "type": "string" + }, + "link": { + "type": "string" + }, + "maxContrast": { + "description": "Used for auto white or dark text on colored backgrounds", + "type": "string" + }, + "primary": { + "type": "string" + }, + "secondary": { + "type": "string" + } }, - "shades": { - "items": { - "$ref": "#/definitions/ThemeVizColor<\"blue\">" - }, - "type": "array" - } - }, - "type": "object" + "type": "object" }, - { - "properties": { - "name": { - "const": "purple", - "type": "string" + "DeepPartial<{selected:string;selectedBorder:string;hover:string;hoverOpacity:number;focus:string;disabledBackground:string;disabledText:string;disabledOpacity:number;}>": { + "properties": { + "disabledBackground": { + "description": "Used for disabled buttons and inputs", + "type": "string" + }, + "disabledOpacity": { + "description": "Disablerd opacity", + "type": "number" + }, + "disabledText": { + "description": "Disabled text", + "type": "string" + }, + "focus": { + "description": "Used focused menu item / select option", + "type": "string" + }, + "hover": { + "description": "Used for hovered menu item / select option", + "type": "string" + }, + "hoverOpacity": { + "description": "Used for button/colored background hover opacity", + "type": "number" + }, + "selected": { + "description": "Used for selected menu item / select option", + "type": "string" + }, + "selectedBorder": { + "type": "string" + } }, - "shades": { - "items": { - "$ref": "#/definitions/ThemeVizColor<\"purple\">" - }, - "type": "array" - } - }, - "type": "object" - } - ] - } - }, - "properties": { - "colors": { - "$ref": "#/definitions/DeepPartial>" - }, - "name": { - "type": "string" - }, - "shape": { - "$ref": "#/definitions/ThemeShapeInput" - }, - "spacing": { - "properties": { - "gridSize": { - "type": "number" - } - }, - "type": "object" - }, - "typography": { - "$ref": "#/definitions/ThemeTypographyInput" - }, - "visualization": { - "properties": { - "hues": { - "items": { - "$ref": "#/definitions/ThemeVizHue" - }, - "type": "array" + "type": "object" }, - "palette": { - "items": { + "DeepPartial<{weak:string;medium:string;strong:string;}>": { + "properties": { + "medium": { + "type": "string" + }, + "strong": { + "type": "string" + }, + "weak": { + "type": "string" + } + }, + "type": "object" + }, + "ThemeShapeInput": { + "properties": { + "borderRadius": { + "type": "number" + } + }, + "type": "object" + }, + "ThemeTypographyInput": { + "properties": { + "fontFamily": { + "type": "string" + }, + "fontFamilyMonospace": { + "type": "string" + }, + "fontSize": { + "type": "number" + }, + "fontWeightBold": { + "type": "number" + }, + "fontWeightLight": { + "type": "number" + }, + "fontWeightMedium": { + "type": "number" + }, + "fontWeightRegular": { + "type": "number" + }, + "htmlFontSize": { + "type": "number" + } + }, + "type": "object" + }, + "ThemeVizColor<\"blue\">": { + "properties": { + "aliases": { + "items": { + "type": "string" + }, + "type": "array" + }, + "color": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/ThemeVizColorShadeName_4" + }, + "primary": { + "type": "boolean" + } + }, + "type": "object" + }, + "ThemeVizColor<\"green\">": { + "properties": { + "aliases": { + "items": { + "type": "string" + }, + "type": "array" + }, + "color": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/ThemeVizColorShadeName_3" + }, + "primary": { + "type": "boolean" + } + }, + "type": "object" + }, + "ThemeVizColor<\"orange\">": { + "properties": { + "aliases": { + "items": { + "type": "string" + }, + "type": "array" + }, + "color": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/ThemeVizColorShadeName_1" + }, + "primary": { + "type": "boolean" + } + }, + "type": "object" + }, + "ThemeVizColor<\"purple\">": { + "properties": { + "aliases": { + "items": { + "type": "string" + }, + "type": "array" + }, + "color": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/ThemeVizColorShadeName_5" + }, + "primary": { + "type": "boolean" + } + }, + "type": "object" + }, + "ThemeVizColor<\"red\">": { + "properties": { + "aliases": { + "items": { + "type": "string" + }, + "type": "array" + }, + "color": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/ThemeVizColorShadeName" + }, + "primary": { + "type": "boolean" + } + }, + "type": "object" + }, + "ThemeVizColor<\"yellow\">": { + "properties": { + "aliases": { + "items": { + "type": "string" + }, + "type": "array" + }, + "color": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/ThemeVizColorShadeName_2" + }, + "primary": { + "type": "boolean" + } + }, + "type": "object" + }, + "ThemeVizColorShadeName": { + "enum": [ + "dark-red", + "light-red", + "red", + "semi-dark-red", + "super-light-red" + ], "type": "string" - }, - "type": "array" + }, + "ThemeVizColorShadeName_1": { + "enum": [ + "dark-orange", + "light-orange", + "orange", + "semi-dark-orange", + "super-light-orange" + ], + "type": "string" + }, + "ThemeVizColorShadeName_2": { + "enum": [ + "dark-yellow", + "light-yellow", + "semi-dark-yellow", + "super-light-yellow", + "yellow" + ], + "type": "string" + }, + "ThemeVizColorShadeName_3": { + "enum": [ + "dark-green", + "green", + "light-green", + "semi-dark-green", + "super-light-green" + ], + "type": "string" + }, + "ThemeVizColorShadeName_4": { + "enum": [ + "blue", + "dark-blue", + "light-blue", + "semi-dark-blue", + "super-light-blue" + ], + "type": "string" + }, + "ThemeVizColorShadeName_5": { + "enum": [ + "dark-purple", + "light-purple", + "purple", + "semi-dark-purple", + "super-light-purple" + ], + "type": "string" + }, + "ThemeVizHue": { + "anyOf": [ + { + "properties": { + "name": { + "const": "red", + "type": "string" + }, + "shades": { + "items": { + "$ref": "#/definitions/ThemeVizColor<\"red\">" + }, + "type": "array" + } + }, + "type": "object" + }, + { + "properties": { + "name": { + "const": "orange", + "type": "string" + }, + "shades": { + "items": { + "$ref": "#/definitions/ThemeVizColor<\"orange\">" + }, + "type": "array" + } + }, + "type": "object" + }, + { + "properties": { + "name": { + "const": "yellow", + "type": "string" + }, + "shades": { + "items": { + "$ref": "#/definitions/ThemeVizColor<\"yellow\">" + }, + "type": "array" + } + }, + "type": "object" + }, + { + "properties": { + "name": { + "const": "green", + "type": "string" + }, + "shades": { + "items": { + "$ref": "#/definitions/ThemeVizColor<\"green\">" + }, + "type": "array" + } + }, + "type": "object" + }, + { + "properties": { + "name": { + "const": "blue", + "type": "string" + }, + "shades": { + "items": { + "$ref": "#/definitions/ThemeVizColor<\"blue\">" + }, + "type": "array" + } + }, + "type": "object" + }, + { + "properties": { + "name": { + "const": "purple", + "type": "string" + }, + "shades": { + "items": { + "$ref": "#/definitions/ThemeVizColor<\"purple\">" + }, + "type": "array" + } + }, + "type": "object" + } + ] } - }, - "type": "object" - } - }, - "type": "object" + }, + "properties": { + "colors": { + "$ref": "#/definitions/DeepPartial>" + }, + "name": { + "type": "string" + }, + "shape": { + "$ref": "#/definitions/ThemeShapeInput" + }, + "spacing": { + "properties": { + "gridSize": { + "type": "number" + } + }, + "type": "object" + }, + "typography": { + "$ref": "#/definitions/ThemeTypographyInput" + }, + "visualization": { + "properties": { + "hues": { + "items": { + "$ref": "#/definitions/ThemeVizHue" + }, + "type": "array" + }, + "palette": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "type": "object" } +