{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://swing-ui.com/schemas/ui-definition/1.0/schema.json",
	"title": "swing-ui UI Definition",
	"description": "Schema for a swing-ui UI definition file (e.g. settings.ui.json), which pairs with a host JavaScript class of the same base name that extends Window (e.g. settings.js). Declaratively defines the component tree, layout, initial state, and event handler bindings for one Window or Panel. At runtime, swing-ui parses this file and: (1) instantiates each component per its type and properties, (2) binds each declared event to the named method on the host class instance, and (3) assigns each component with a 'ref' to a same-named property on that host class instance, making it directly accessible as 'this.<ref>'. Author this file by hand, AI, or generate it from a visual designer; do not generate it dynamically at runtime.",
	"type": "object",
	"required": [
		"version",
		"metadata",
		"component"
	],
	"additionalProperties": false,
	"properties": {
		"$schema": {
			"type": "string",
			"description": "Optional reference back to this schema for IDE tooling."
		},
		"version": {
			"const": "1.0",
			"description": "UI definition file format version. Always '1.0' for this schema."
		},
		"metadata": {
			"$ref": "#/$defs/Metadata"
		},
		"component": {
			"oneOf": [
				{
					"$ref": "#/$defs/Window"
				},
				{
					"$ref": "#/$defs/Panel"
				}
			],
			"description": "The root component of this UI. Typically a Window, but may be a Panel for reusable sub-layouts."
		},
		"contextMenus": {
			"type": "array",
			"items": {
				"$ref": "#/$defs/ContextMenu"
			},
			"description": "Component-level context menus."
		},
		"trayIcons": {
			"type": "array",
			"items": {
				"$ref": "#/$defs/TrayIcon"
			},
			"description": "Application-level system tray icons. Can be created once at app startup regardless of window state. Only rendered when ui.systemTraySupported is true."
		}
	},
	"$defs": {
		"Metadata": {
			"type": "object",
			"description": "Optional descriptive information about this UI definition file.",
			"additionalProperties": false,
			"properties": {
				"name": {
					"type": "string",
					"description": "Human-readable name for this UI screen or component."
				},
				"description": {
					"type": "string"
				}
			}
		},
		"Color": {
			"type": "string",
			"pattern": "^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$",
			"description": "Hex color string with optional alpha value. Accepts full (#RRGGBB) form or $(RRGGBBAA), e.g. '#FF0000' or '#FF000044'."
		},
		"ColorOrNull": {
			"description": "A hex color string or null for transparent / no color.",
			"oneOf": [
				{
					"$ref": "#/$defs/Color"
				},
				{
					"type": "null"
				}
			]
		},
		"Background": {
			"type": "string",
			"description": "Background for Window or Panel components consisting of one or more of: hex color with optional alpha value, image, and gradients, like background CSS property. For other components just hex color like #000000."
		},
		"ImagePath": {
			"type": "string",
			"description": "Path to an image file relative to the application's root directory (the directory from which the app is run), absolute path, or a URL, e.g. 'images/icon.png'."
		},
		"EventRef": {
			"type": "string",
			"pattern": "^[A-Za-z_$][A-Za-z0-9_$.]*$",
			"description": "Name of a method on the host JavaScript class to invoke when this event fires. The method receives a single event-object argument. Example: 'labelAnimalIcon_onMouseEvents'."
		},
		"Anchor": {
			"type": "string",
			"description": "Responsive layout anchoring. List the edges this component should stay pinned to as a space-separated string. When an edge is anchored the component stretches to maintain the distance to that edge as the parent resizes. Default is 'top left' (fixed position).",
			"examples": [
				"top left",
				"top right",
				"bottom right",
				"top right bottom left",
				"top bottom",
				"left right",
				"bottom left"
			]
		},
		"Size": {
			"type": "object",
			"description": "Size of a 2 dimensional object, such as a component or shape.",
			"additionalProperties": false,
			"required": [
				"width",
				"height"
			],
			"properties": {
				"width": {
					"type": "number",
					"description": "Positive number"
				},
				"height": {
					"type": "number",
					"description": "Positive number"
				}
			}
		},
		"Position": {
			"type": "object",
			"description": "Position of a component relative to it's container, position of a Window relative to a main screen, or position of a Shape relative to its container component.",
			"additionalProperties": false,
			"properties": {
				"x": {
					"type": "number",
					"description": "Positive number"
				},
				"y": {
					"type": "number",
					"description": "Positive number"
				}
			}
		},
		"Orientation": {
			"type": "integer",
			"default": 0,
			"description": "Component orientation, determining whether it is laid out horizontally or vertically.",
			"oneOf": [
				{
					"const": 0,
					"description": "Horizontal (Default)."
				},
				{
					"const": 1,
					"description": "Vertical"
				}
			]
		},
		"SelectionMode": {
			"type": "integer",
			"default": 0,
			"description": "Selection mode for components that support item or row selection.",
			"oneOf": [
				{
					"const": 0,
					"description": "Single - Single item selection."
				},
				{
					"const": 1,
					"description": "Range - Range selection (shift-click)."
				},
				{
					"const": 2,
					"description": "Multiple - Multiple selection (ctrl/cmd-click)."
				}
			]
		},
		"DragDropAction": {
			"type": "string",
			"default": "None",
			"description": "Enum for drag action and drop action values",
			"oneOf": [
				{
					"const": "None",
					"description": "Disables dragging for the component or dropping to the component (default)"
				},
				{
					"const": "Copy",
					"description": "Only copy is allowed"
				},
				{
					"const": "Move",
					"description": "Only move is allowed"
				},
				{
					"const": "CopyOrMove",
					"description": "Copy of move is allowed"
				},
				{
					"const": "Link",
					"description": "Only link is allowed"
				}
			]
		},
		"DropMode": {
			"type": "string",
			"oneOf": [
				{
					"const": "On",
					"title": "On",
					"description": "Drop on items."
				},
				{
					"const": "Insert",
					"title": "Insert",
					"description": "Insert between items."
				},
				{
					"const": "OnOrInsert",
					"title": "OnOrInsert",
					"description": "Drop on items and between items."
				}
			],
			"description": "Drop target behavior during drag-and-drop onto Table, List, and Tree components."
		},
		"LineWrap": {
			"type": "integer",
			"default": 0,
			"description": "Controls how text wraps when it reaches the edge of the component's visible area.",
			"oneOf": [
				{
					"const": 0,
					"description": "None - Disable line wrapping; text continues horizontally (Default)."
				},
				{
					"const": 1,
					"description": "Word - Wrap lines at word boundaries when they exceed the component width."
				},
				{
					"const": 2,
					"description": "Character - Wrap lines at any character when they exceed the component width."
				}
			]
		},
		"Font": {
			"type": "object",
			"description": "Font specification. Any subset of properties may be given; omitted properties are used from the existing font of the component. For cross-platform safety FontFamily generic names can be used.",
			"additionalProperties": false,
			"properties": {
				"name": {
					"type": "string",
					"description": "Font family name or a generic family keyword: 'serif', 'sans-serif', 'monospace', 'cursive', 'system-ui', 'fantasy'."
				},
				"size": {
					"type": "number",
					"exclusiveMinimum": 0,
					"description": "Font size in points."
				},
				"bold": {
					"type": "boolean"
				},
				"italic": {
					"type": "boolean"
				},
				"underlined": {
					"type": "boolean"
				},
				"strikethrough": {
					"type": "boolean"
				},
				"direction": {
					"enum": [
						"ltr",
						"rtl"
					],
					"description": "Text direction. 'ltr' (left-to-right) is the default."
				}
			}
		},
		"Border": {
			"type": "object",
			"description": "Border style applied around a component.",
			"additionalProperties": false,
			"required": [
				"style"
			],
			"properties": {
				"style": {
					"enum": [
						"none",
						"line",
						"dashed",
						"metal",
						"etched_raised",
						"etched_lowered",
						"bevel_raised",
						"bevel_lowered",
						"soft_raised",
						"soft_lowered"
					],
					"description": "Border style. Maps to the BorderStyle enum."
				},
				"size": {
					"type": "integer",
					"minimum": 1,
					"description": "Border thickness in pixels. Applicable only when style is not ``none`."
				},
				"padding": {
					"type": "string",
					"pattern": "^\\d+ \\d+ \\d+ \\d+$",
					"description": "Inner padding as 'top right bottom left'. Example: '5 10 5 10'. Applicable even if type is `none` or size is 0."
				},
				"color": {
					"$ref": "#/$defs/Color",
					"description": "Only applicable for 'line' or 'dashed' styles."
				},
				"rounded": {
					"type": "boolean",
					"description": "Renders rounded corners or dashes. Only applicable for 'line' or 'dashed' styles. Rounds corners just a tiny bit, barely noticeable."
				},
				"length": {
					"type": "number",
					"description": "Length of each dash. Only applicable for 'dashed' style."
				},
				"spacing": {
					"type": "number",
					"description": "Length of gaps between dashes. Only applicable for 'dashed' style."
				},
				"offset": {
					"type": "number",
					"description": "Starting offset of the dash pattern. Can be used to animate dashes animation. Only applicable for 'dashed' style."
				},
				"text": {
					"type": "string",
					"description": "Label text for a titled border effect."
				},
				"alignment": {
					"type": "string",
					"default": "top left",
					"description": "Placement of the border label text described by one vertical alignment and one horizontal consisting of two of these keywords: `top`, `bottom`, `left`, `center`, `right`, `leading`, `trailing`. (e.g., 'top center', 'bottom right', 'top left', 'top trailing', 'bottom leading')."
				},
				"font": {
					"$ref": "#/$defs/Font",
					"description": "Font used to render the border label text."
				}
			}
		},
		"Events": {
			"type": "object",
			"description": "Map of event names to handler method references on the host class. All entries are optional.",
			"additionalProperties": false,
			"properties": {
				"onAction": {
					"$ref": "#/$defs/EventRef",
					"description": "Primary action: button click, Enter key in text fields, etc. Receives ActionEvent."
				},
				"onChange": {
					"$ref": "#/$defs/EventRef",
					"description": "Value or selection changed. Receives ChangeEvent."
				},
				"onMouseEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Mouse press, release, click, enter, or exit. Receives MouseEvent."
				},
				"onMouseMotion": {
					"$ref": "#/$defs/EventRef",
					"description": "Mouse move or drag. Receives MouseMotionEvent."
				},
				"onMouseWheel": {
					"$ref": "#/$defs/EventRef",
					"description": "Mouse wheel rotation. Receives MouseWheelEvent."
				},
				"onKey": {
					"$ref": "#/$defs/EventRef",
					"description": "Keyboard key events. Receives KeyEvent."
				},
				"onFocusEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Focus gained or lost. Receives FocusEvent."
				},
				"onScroll": {
					"$ref": "#/$defs/EventRef",
					"description": "Scroll position changes. Receives ScrollEvent."
				},
				"onDispose": {
					"$ref": "#/$defs/EventRef",
					"description": "Component destruction event. Receives DisposeEvent."
				},
				"onError": {
					"$ref": "#/$defs/EventRef",
					"description": "Triggered when a component error occurs. Receives ErrorEvent."
				},
				"onWindowEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Window lifecycle (close, minimize, etc). Receives WindowEvent."
				},
				"onStateChange": {
					"$ref": "#/$defs/EventRef",
					"description": "Window state changes (Maximized, etc). Receives WindowStateEvent."
				},
				"onRowEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Table row modifications. Receives RowEvent. (Table only.)"
				},
				"onColumnEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Table column modifications. Receives ColumnEvent. (Table only.)"
				},
				"onSort": {
					"$ref": "#/$defs/EventRef",
					"description": "Table sorting changed. Receives SortEvent. (Table only)"
				},
				"onDropEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Drag-and-drop target events. Receives DropEvent."
				},
				"onDragEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Drag-and-drop source events. Receives DragEvent."
				},
				"onCaretEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Text caret or selection changes. Receives CaretEvent."
				},
				"onAncestorEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Parent hierarchy changes. Receives AncestorEvent."
				},
				"onComponentEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Resizing, moving, showing, or hiding. Receives ComponentEvent."
				},
				"onContainerEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Children added or removed. Receives ContainerEvent."
				},
				"onPropertyChange": {
					"$ref": "#/$defs/EventRef",
					"description": "Generic property value change. Receives PropertyChangeEvent."
				},
				"onPopupEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Popup visibility/state changes. Receives PopupEvent. (ComboBox, Menu, ContextMenu.)"
				},
				"onLinkEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Hyperlink interactions. Receives LinkEvent. (DocumentEditor only.)"
				},
				"onPlayerEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Media playback events. Receives PlayerEvent. (MediaPlayer only.)"
				},
				"onItemsEvents": {
					"$ref": "#/$defs/EventRef",
					"description": "Event handler for events emitted when list items are added or removed to a List, Tree or ComboBox components."
				},
				"onShortcut": {
					"$ref": "#/$defs/EventRef",
					"description": "Event handler for a ShortcutEvent that's emitted when a pre-defined keyboard shortcut is performed by the user."
				}
			}
		},
		"Shortcut": {
			"type": "object",
			"description": "Defines a keyboard shortcut binding: a key combination that triggers a ShortcutEvent, with an optional action identifier and an optional scope that controls when the shortcut is active.",
			"additionalProperties": false,
			"required": [
				"key"
			],
			"properties": {
				"key": {
					"type": "string",
					"description": "The key combination the user must press to trigger the ShortcutEvent (e.g. 'Ctrl+S', 'Alt+F4')."
				},
				"action": {
					"type": "string",
					"description": "Optional identifier included in the ShortcutEvent payload to distinguish which action should be performed when the shortcut is triggered."
				},
				"scope": {
					"type": "integer",
					"description": "Optional scope controlling when this shortcut is active and will emit a ShortcutEvent. Corresponds to a ShortcutScope enum value. Defaults to a component-type-appropriate value if omitted.",
					"oneOf": [
						{
							"const": 0,
							"description": "Focused — Shortcut is active only when this component itself has focus. Default for non-container components."
						},
						{
							"const": 1,
							"description": "Ancestor — Shortcut is active when this component or any of its descendants has focus. Default for container components other than Window."
						},
						{
							"const": 2,
							"description": "Window — Shortcut is active whenever the window containing this component has focus, regardless of which element is focused within it. Default for Window components."
						}
					]
				}
			}
		},
		"AnyComponent": {
			"description": "Discriminated union of every available swing-ui component. The 'type' field determines which component is instantiated.",
			"oneOf": [
				{
					"$ref": "#/$defs/MenuBar"
				},
				{
					"$ref": "#/$defs/Button"
				},
				{
					"$ref": "#/$defs/CheckBox"
				},
				{
					"$ref": "#/$defs/CheckBoxMenuItem"
				},
				{
					"$ref": "#/$defs/ComboBox"
				},
				{
					"$ref": "#/$defs/DocumentEditor"
				},
				{
					"$ref": "#/$defs/InternalWindow"
				},
				{
					"$ref": "#/$defs/InternalWindowContainer"
				},
				{
					"$ref": "#/$defs/Label"
				},
				{
					"$ref": "#/$defs/List"
				},
				{
					"$ref": "#/$defs/MediaPlayer"
				},
				{
					"$ref": "#/$defs/Menu"
				},
				{
					"$ref": "#/$defs/MenuItem"
				},
				{
					"$ref": "#/$defs/Panel"
				},
				{
					"$ref": "#/$defs/PasswordField"
				},
				{
					"$ref": "#/$defs/ProgressBar"
				},
				{
					"$ref": "#/$defs/RadioButton"
				},
				{
					"$ref": "#/$defs/RadioButtonMenuItem"
				},
				{
					"$ref": "#/$defs/ScrollPane"
				},
				{
					"$ref": "#/$defs/Separator"
				},
				{
					"$ref": "#/$defs/Slider"
				},
				{
					"$ref": "#/$defs/Spinner"
				},
				{
					"$ref": "#/$defs/SplitView"
				},
				{
					"$ref": "#/$defs/Table"
				},
				{
					"$ref": "#/$defs/Tabs"
				},
				{
					"$ref": "#/$defs/TextArea"
				},
				{
					"$ref": "#/$defs/TextField"
				},
				{
					"$ref": "#/$defs/ToggleButton"
				},
				{
					"$ref": "#/$defs/ToolBar"
				},
				{
					"$ref": "#/$defs/Tree"
				}
			]
		},
		"ComponentBase": {
			"type": "object",
			"description": "Properties shared by every UIComponent. All are optional unless noted.",
			"required": [
				"ref",
				"type"
			],
			"properties": {
				"type": {
					"type": "string",
					"description": "Component type discriminator. Must exactly match one of the defined swing-ui component class names."
				},
				"ref": {
					"type": "string",
					"pattern": "^[A-Za-z_$][A-Za-z0-9_$]*$",
					"description": "JavaScript property name to assign this component to on the host class instance (this.ref). Enables direct code access: 'this.myButton.text(\"OK\")'. Must be a valid JS identifier."
				},
				"text": {
					"type": "string",
					"description": "Primary text content: label text, button label, window title, tab name, field value, etc. If the component is added to Tabs, the text value becomes the text of its Tab."
				},
				"visible": {
					"type": "boolean",
					"default": true,
					"description": "Whether the component is rendered. Hidden components still exist in the tree."
				},
				"enabled": {
					"type": "boolean",
					"default": true,
					"description": "Whether the component responds to user input."
				},
				"icon": {
					"$ref": "#/$defs/ImagePath",
					"description": "Icon image displayed on or alongside the component."
				},
				"tooltip": {
					"type": "string",
					"description": "Short hint text shown in a popup when the user hovers over the component."
				},
				"background": {
					"$ref": "#/$defs/Background",
					"description": "Background fill color. For Window or Panel use alpha value to set transparency."
				},
				"color": {
					"$ref": "#/$defs/Color",
					"description": "Foreground / text color."
				},
				"font": {
					"$ref": "#/$defs/Font"
				},
				"cursor": {
					"type": "integer",
					"description": "Mouse cursor shape when hovering over this component. Cursor names are same as in Java Swing.",
					"oneOf": [
						{
							"const": 0,
							"description": "Default"
						},
						{
							"const": 1,
							"description": "Crosshair"
						},
						{
							"const": 2,
							"description": "Text"
						},
						{
							"const": 3,
							"description": "Wait"
						},
						{
							"const": 4,
							"description": "ResizeSW"
						},
						{
							"const": 5,
							"description": "ResizeSE"
						},
						{
							"const": 6,
							"description": "ResizeNW"
						},
						{
							"const": 7,
							"description": "ResizeNE"
						},
						{
							"const": 8,
							"description": "ResizeN"
						},
						{
							"const": 9,
							"description": "ResizeS"
						},
						{
							"const": 10,
							"description": "ResizeW"
						},
						{
							"const": 11,
							"description": "ResizeE"
						},
						{
							"const": 12,
							"description": "Hand"
						},
						{
							"const": 13,
							"description": "Move"
						}
					]
				},
				"contextMenu": {
					"type": "string",
					"pattern": "^[A-Za-z_$][A-Za-z0-9_$]*$",
					"description": "A 'ref' property of one of the content menus."
				},
				"shortcuts": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Shortcut"
					},
					"minItems": 1,
					"description": "Keyboard shortcuts mapped to action string. Then emit a ShortcutEvent handled by a callback registered with component.onShortcut(callback) method."
				},
				"events": {
					"$ref": "#/$defs/Events"
				}
			}
		},
		"ComponentWithDragDrop": {
			"type": "object",
			"description": "Properties shared by UIComponent that support dragging and dropping.",
			"properties": {
				"dragAction": {
					"$ref": "#/$defs/DragDropAction",
					"description": "Enable dragging from this component. Set to 'None' to deactivate dragging or something else to activate dragging. Default is 'None'. Maps to DragDropAction enum."
				},
				"dropAction": {
					"$ref": "#/$defs/DragDropAction",
					"description": "Enable dropping onto this component. Set to 'None' to deactivate dropping or something else to activate dropping. Maps to DragDropAction enum."
				},
				"dragDataType": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/DataType"
					},
					"minItems": 1,
					"description": "The type(s) of data that can be dragged from this component. Can be a single DataType or an array of DataTypes. Maps to DataType enum."
				},
				"dropDataType": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/DataType"
					},
					"minItems": 1,
					"description": "The type(s) of data this component will accept when dropped onto. Use 'All' to accept anything. Can be a single DataType or an array of DataTypes. Maps to DataType enum."
				},
				"dragData": {
					"type": "string",
					"description": "A custom data to drag of dragging is enabled. Overrides component data, such as List items, Tree items, Table rows."
				}
			}
		},
		"ComponentWithBounds": {
			"type": "object",
			"description": "Properties shared by UIComponent that have location and size, such as Label, Button, Panel, Window. (unlike MenuItem, Menu, ContextMenu, TrayIcon)",
			"properties": {
				"size": {
					"$ref": "#/$defs/Size",
					"description": "Size of a component."
				},
				"position": {
					"$ref": "#/$defs/Position",
					"description": "Component's position relative to parent component's position, or Window position relative o main screen's top left corner."
				},
				"minSize": {
					"$ref": "#/$defs/Size",
					"description": "Minimum size of a component.",
				},
				"maxSize": {
					"$ref": "#/$defs/Size",
					"description": "Maximum size of a component."
				},
				"anchor": {
					"$ref": "#/$defs/Anchor"
				},
				"border": {
					"$ref": "#/$defs/Border"
				}
			}
		},
		"ComponentWithAlignments": {
			"type": "object",
			"description": "Properties shared by components whose content and icon/checkbox/radiobox alignment can be changed, such as Label, Button, CheckBox, RadioBox, List.",
			"properties": {
				"alignment": {
					"type": "string",
					"default": "leading",
					"description": "Placement of the component content described by one vertical alignment and one horizontal consisting of two of these keywords: `top`, `bottom`, `left`, `center`, `right`, `leading`, `trailing`. (e.g., 'top center', 'bottom right', 'top left', 'top trailing', 'bottom leading')."
				},
				"iconAlignment": {
					"type": "string",
					"default": "leading",
					"description": "Placement of the check box in relation to the text by one or two of these keywords: `top`, `bottom`, `left`, `center`, `right`, `leading`, `trailing`. (e.g., 'leading', 'top', 'top left', 'top trailing', 'bottom leading')."
				},
				"iconTextGap": {
					"type": "number",
					"description": "A gap in pixel between icon/checkbox/radio/box and text of a List item, Button, Label, ComboBox, CheckBox, and RadioBox."
				}
			}
		},
		"ComponentWithScrollBars": {
			"type": "object",
			"description": "Properties shared by components that have scroll bars, such as TextArea, DocumentEditor, List, Table, Tree, InternalWindowContainer, and ScrollPane.",
			"properties": {
				"scrollbars": {
					"type": "object",
					"description": "Visibility settings for scrollbars.",
					"properties": {
						"horizontal": {
							"type": [
								"boolean",
								"null"
							],
							"description": "Horizontal scrollbar visibility. True to show, false to hide, null for automatic (default)."
						},
						"vertical": {
							"type": [
								"boolean",
								"null"
							],
							"description": "Vertical scrollbar visibility. True to show, false to hide, null for automatic (default)."
						}
					},
					"additionalProperties": false,
					"default": {
						"horizontal": null,
						"vertical": null
					}
				}
			}
		},
		"ComponentWithUndoRedo": {
			"type": "object",
			"description": "Components with text editors that can undo and redo text changes",
			"properties": {
				"undoEnabled": {
					"type": "boolean",
					"description": "Enabled/disabled the ability to undo and redo text changes."
				},
				"undoLimit": {
					"type": "number",
					"default": 100,
					"description": "Sets the maximum amount of last text edits user can undo and redo."
				}
			}
		},
		"ComponentsWithMultiItemSelection": {
			"type": "object",
			"description": "Components with multiple list items or rows, such as List, Tree, and Table",
			"properties": {
				"selectionMode": {
					"type": "integer",
					"default": 0,
					"description": "Determines how items or rows can be selected within the component.",
					"oneOf": [
						{
							"const": 0,
							"description": "Single - Only one item can be selected at a time (Default)."
						},
						{
							"const": 1,
							"description": "Range - Allows selecting a continuous block of items using Shift-click."
						},
						{
							"const": 2,
							"description": "Multiple - Allows selecting multiple individual items using Ctrl/Cmd-click."
						}
					]
				}
			}
		},
		"DataType": {
			"type": "string",
			"description": "Data transfer type for drag-and-drop operations. Maps to DataType enum. 'Components' enables transferring references to other UI components within same application.",
			"oneOf": [
				{
					"const": "None",
					"description": "No data type specified; dragging/dropping of data is disabled"
				},
				{
					"const": "All",
					"description": "Accepts or provides any supported data type"
				},
				{
					"const": "Text",
					"description": "Plain text data"
				},
				{
					"const": "HTML",
					"description": "HTML-formatted content. Table content gets converted to HTML <table> tags."
				},
				{
					"const": "Image",
					"description": "Image data. For example you can drag an image from Microsoft Word to your component."
				},
				{
					"const": "Files",
					"description": "A list of file references. Allows to drag or drop files."
				},
				{
					"const": "URIList",
					"description": "A list of URIs"
				},
				{
					"const": "URL",
					"description": "A single URL"
				},
				{
					"const": "JSON",
					"description": "JSON-formatted data. Required for dragging or accepting data from components like Table, List, or to accept Component data type."
				},
				{
					"const": "component/*",
					"description": "References to another UI component within the same application. Allows to drag-drop a component, or receive data which component the data was dragged from."
				}
			]
		},
		"ListItem": {
			"type": "object",
			"description": "An item in List, Tree, or ComboBox components.",
			"required": [
				"text"
			],
			"additionalProperties": false,
			"properties": {
				"text": {
					"type": "string"
				},
				"icon": {
					"$ref": "#/$defs/ImagePath"
				},
				"id": {
					"description": "Custom identifier attached to this item",
					"type": "string"
				},
				"value": {
					"description": "Custom identifier attached to this item",
					"anyOf": [
						{
							"type": "number"
						},
						{
							"type": "string"
						}
					]
				},
				"tooltip": {
					"type": "string"
				},
				"background": {
					"$ref": "#/$defs/Color"
				},
				"color": {
					"$ref": "#/$defs/Color"
				},
				"font": {
					"$ref": "#/$defs/Font"
				},
				"editable": {
					"type": "boolean",
					"description": "Applicable for Tree node item only. Allows editing the item's text interactively."
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ListItem"
					},
					"description": "Applicable for Tree node item only. Nested child nodes."
				}
			}
		},
		"TableColumn": {
			"type": "object",
			"required": [
				"text"
			],
			"description": "Column definition for a Table. 'text' is the only required field.",
			"additionalProperties": false,
			"properties": {
				"text": {
					"type": "string",
					"description": "Column header label."
				},
				"type": {
					"enum": [
						"text",
						"password",
						"textarea",
						"icon",
						"button",
						"checkbox",
						"combobox",
						"progress"
					],
					"default": "text",
					"description": "Cell renderer/editor type. 'text': plain text or HTML wrapped in <html> tags. 'checkbox': string 'true' or 'false'. 'combobox': dropdown (set options[]). 'progress': integer 0–100. 'icon': image path (relative, absolute, or URL). 'button': pipe-separated button labels. 'password': masked text. 'textarea': multi-line plain text."
				},
				"width": {
					"type": "integer",
					"exclusiveMinimum": 0
				},
				"minWidth": {
					"type": "integer",
					"minimum": 0
				},
				"maxWidth": {
					"type": "integer",
					"minimum": 0
				},
				"editable": {
					"type": "boolean",
					"default": false,
					"description": "Allow in-place editing of cells in this column."
				},
				"clicksToEdit": {
					"type": "integer",
					"enum": [
						1,
						2,
						3
					],
					"default": 2,
					"description": "Number of clicks required to start editing a cell."
				},
				"resizable": {
					"type": "boolean",
					"default": true,
					"description": "Allow user to resize this column."
				},
				"autoResize": {
					"type": "boolean",
					"default": false,
					"description": "Automatically resize this column when the table is resized (subject to table's autoResizeColumns setting). Only one column can be auto-resized. Has no effect if the table's auto-resize mode is Table.AutoResize.None"
				},
				"hidden": {
					"type": "boolean",
					"default": false,
					"description": "Hide this column (width set to 0)."
				},
				"primary": {
					"type": "boolean",
					"default": false,
					"description": "Mark this column as the primary data column for drag-and-drop payloads."
				},
				"sorting": {
					"type": "integer",
					"default": 1,
					"description": "Sort algorithm for this column.",
					"oneOf": [
						{
							"const": 0,
							"description": "None"
						},
						{
							"const": 1,
							"description": "Natural (Default)"
						},
						{
							"const": 2,
							"description": "CaseInsensitive"
						},
						{
							"const": 3,
							"description": "Integer"
						},
						{
							"const": 4,
							"description": "Float"
						}
					]
				},
				"options": {
					"type": "array",
					"items": {
						"type": "string"
					},
					"description": "Dropdown values for 'combobox' column type only."
				},
				"character": {
					"type": "string",
					"maxLength": 1,
					"description": "Masking character for 'password' column type. Defaults to bullet."
				},
				"iconSize": {
					"type": "integer",
					"exclusiveMinimum": 0,
					"description": "For 'icon' column type: fixed size (height or width, whichever is larger) in pixels. Aspect ratio is preserved."
				},
				"cacheCapacity": {
					"type": "integer",
					"minimum": 1,
					"default": 10,
					"description": "For 'icon' column type: number of images to keep in RAM cache. It's especially important when icons are loaded from URL."
				},
				"icon": {
					"$ref": "#/$defs/ImagePath",
					"description": "Icon shown in the column header."
				},
				"tooltip": {
					"type": "string",
					"description": "Tooltip for the column header."
				},
				"color": {
					"$ref": "#/$defs/Color",
					"description": "Text color of cells of the column."
				},
				"background": {
					"$ref": "#/$defs/Color",
					"description": "Background color of cells of the column."
				},
				"headerColor": {
					"$ref": "#/$defs/Color",
					"description": "Text color of a column header."
				},
				"headerBackground": {
					"$ref": "#/$defs/Color",
					"description": "Background color of a column header."
				},
				"font": {
					"$ref": "#/$defs/Font",
					"description": "Font of cells of a column."
				},
				"headerFont": {
					"$ref": "#/$defs/Font",
					"description": "Font of a column header."
				},
				"min": {
					"type": "integer",
					"description": "Minimum value for progress bar component when column type is 'progress'."
				},
				"max": {
					"type": "integer",
					"description": "Maximum value for progress bar component when column type is 'progress'."
				},
				"showText": {
					"type": "boolean",
					"default": true,
					"description": "Whether to display the value as text inside the progress bar component when type is `progress`."
				},
				"align": {
					"type": "string",
					"description": "Text alignment inside cells of this column. Maximum one horizontal and one vertical alignment keywords: 'center','left','right','leading','trailing','top','bottom'."
				},
				"headerAlign": {
					"type": "string",
					"description": "Text alignment of the column header. Maximum one horizontal and one vertical alignment keywords: 'center','left','right','leading','trailing','top','bottom'."
				}
			}
		},
		"TableRow": {
			"type": "array",
			"description": "One data row in a Table. An ordered array of cell values, one per column in the order columns were defined. Cell type must match the column type: string for 'text'/'combobox'/'button'/'icon'/'checkbox', integer 0–100 for 'progress'.",
			"items": {}
		},
		"Shape": {
			"description": "A 2-D shape drawn directly on a Panel or Window canvas. The 'type' property identifies the shape.",
			"type": "object",
			"required": [
				"type"
			],
			"properties": {
				"type": {
					"enum": [
						"Rectangle",
						"Ellipse",
						"Line",
						"Text",
						"Arc",
						"Polygon",
						"Polyline",
						"Shape"
					],
					"description": "Shape discriminator."
				},
				"position": {
					"$ref": "#/$defs/Position",
					"description": "Position of the Shape relative to its container component's top-left corner."
				},
				"background": {
					"$ref": "#/$defs/Background"
				},
				"opacity": {
					"type": "number",
					"minimum": 0,
					"maximum": 1,
					"description": "A decimal between 0 and 1 inclusively that specified opacity percentage."
				},
				"stroke": {
					"$ref": "#/$defs/Stroke",
					"additionalProperties": false
				}
			}
		},
		"Stroke": {
			"description": "Outline of a Shape.",
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"width": {
					"type": "number",
					"description": "Thickness of the stroke"
				},
				"background": {
					"$ref": "#/$defs/Color"
				},
				"alignment": {
					"oneOf": [
						{
							"const": -1,
							"title": "Inside",
							"description": "Stroke fully inside the shape path."
						},
						{
							"const": 0,
							"title": "Center",
							"description": "Stroke centered on the shape path."
						},
						{
							"const": 1,
							"title": "Outside",
							"description": "Stroke fully outside the shape path."
						}
					],
					"default": 0,
					"description": "Defines how the stroke is positioned relative to the shape’s outline."
				},
				"cap": {
					"title": "Cap",
					"description": "Defines how the ends of open subpaths are drawn.",
					"oneOf": [
						{
							"const": 0,
							"title": "Butt",
							"description": "Flat end, no extension beyond the end point."
						},
						{
							"const": 1,
							"title": "Round",
							"description": "Rounded end with a half-circle extension."
						},
						{
							"const": 2,
							"title": "Square",
							"description": "Flat end extended by half the line width."
						}
					],
					"default": 0
				},
				"join": {
					"title": "Join",
					"description": "Defines how two connected line segments are joined.",
					"oneOf": [
						{
							"const": 0,
							"title": "Miter",
							"description": "Sharp corner with extended outer edges."
						},
						{
							"const": 1,
							"title": "Round",
							"description": "Rounded corner with a circular arc."
						},
						{
							"const": 2,
							"title": "Bevel",
							"description": "Flattened corner with a straight cut."
						}
					],
					"default": 0
				}
			}
		},
		"ContextMenu": {
			"type": "object",
			"description": "A popup context menu shown on right-click. Attach to any component via its 'contextMenu' property.",
			"required": [
				"type",
				"ref"
			],
			"additionalProperties": false,
			"properties": {
				"type": {
					"const": "ContextMenu"
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/MenuChildComponent"
					},
					"description": "Menu items, sub-menus, and separators."
				}
			}
		},
		"MenuChildComponent": {
			"description": "Valid children of a Menu or ContextMenu: MenuItem, CheckBoxMenuItem, RadioButtonMenuItem, Separator, or a nested Menu.",
			"oneOf": [
				{
					"$ref": "#/$defs/MenuItem"
				},
				{
					"$ref": "#/$defs/CheckBoxMenuItem"
				},
				{
					"$ref": "#/$defs/RadioButtonMenuItem"
				},
				{
					"$ref": "#/$defs/Separator"
				},
				{
					"$ref": "#/$defs/Menu"
				}
			]
		},
		"Button": {
			"description": "A clickable push button. Supports HTML text wrapped in <html> tags, and an optional icon image.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithAlignments"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "Button"
				},
				"command": {
					"type": "string",
					"description": "Custom command string included in the ActionEvent fired when the button is clicked. Defaults to the button label text."
				}
			}
		},
		"CheckBox": {
			"description": "A toggle checkbox with a text label.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithAlignments"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "CheckBox"
				},
				"text": {
					"type": "string"
				},
				"selected": {
					"type": "boolean",
					"default": false,
					"description": "Initial checked state."
				}
			}
		},
		"CheckBoxMenuItem": {
			"description": "A checkable item in a Menu or ContextMenu.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "CheckBoxMenuItem"
				},
				"selected": {
					"type": "boolean",
					"default": false
				}
			}
		},
		"ComboBox": {
			"description": "A dropdown selection list. Can optionally be editable to allow typing a custom value.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithUndoRedo"
				}
			],
			"properties": {
				"type": {
					"const": "ComboBox"
				},
				"items": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ListItem"
					},
					"description": "Initial dropdown items. Set only if not empty, more than 0 items."
				},
				"selected": {
					"oneOf": [
						{
							"type": "integer",
							"minimum": 0,
							"description": "Zero-based index of the initially selected item."
						},
						{
							"type": "string",
							"description": "Text of the initially selected item."
						}
					]
				},
				"editable": {
					"type": "boolean",
					"default": false,
					"description": "Allow the user to type a custom value not present in the list."
				},
				"popupSize": {
					"type": "number",
					"default": 8,
					"description": "The maximum number of items to show in a popup list without having to scroll."
				},
				"itemPadding": {
					"type": "string",
					"description": "A padding on each side of items in the list. Format: 'top right bottom left'. For example '5 0 6 3'."
				}
			}
		},
		"DocumentEditor": {
			"description": "A rich-text document editor with optional HTML rendering mode and built-in scrollbars. Cannot be placed inside a ScrollPane.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithScrollBars"
				},
				{
					"$ref": "#/$defs/ComponentWithUndoRedo"
				}
			],
			"properties": {
				"type": {
					"const": "DocumentEditor"
				},
				"html": {
					"type": "boolean",
					"default": false,
					"description": "Enable HTML rendering and rich-text editing."
				},
				"editable": {
					"type": "boolean",
					"default": true
				},
				"lineWrap": {
					"$ref": "#/$defs/LineWrap",
					"description": "Line wrap mode. Maps to LineWrap enum."
				}
			}
		},
		"InternalWindow": {
			"description": "A floating mini-window hosted inside an InternalWindowContainer, providing an MDI (Multiple Document Interface) experience.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "InternalWindow"
				},
				"closeOperation": {
					"type": "integer",
					"default": 1,
					"description": "Action when the internal window's close button is clicked or close() is called.",
					"oneOf": [
						{
							"const": 0,
							"description": "Nothing - Do nothing; the close button has no effect. WindowEvent with type 'closing' still gets emitted."
						},
						{
							"const": 1,
							"description": "Hide - Hide the window instead of closing it. (Default)"
						},
						{
							"const": 2,
							"description": "Dispose - Release window resources and remove it from display. Emits 'closing' and 'close' events."
						},
						{
							"const": 3,
							"description": "Exit - Terminate the entire application. Emits 'closing' and 'close' events."
						}
					]
				},
				"state": {
					"enum": [
						"Normal",
						"Minimized",
						"Maximized"
					],
					"default": "Normal"
				},
				"resizable": {
					"type": "boolean",
					"default": true,
					"description": "Show resize handles."
				},
				"minimizable": {
					"type": "boolean",
					"default": true,
					"description": "Show minimize button."
				},
				"maximizable": {
					"type": "boolean",
					"default": true,
					"description": "Show maximize button."
				},
				"closable": {
					"type": "boolean",
					"default": true,
					"description": "Show close button."
				},
				"movable": {
					"type": "boolean",
					"default": true,
					"description": "Allow the user to drag the window by its title bar."
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AnyComponent"
					}
				}
			}
		},
		"InternalWindowContainer": {
			"description": "Desktop workspace that hosts InternalWindow components for an MDI layout. Includes built-in scrollbars. Cannot be placed inside a ScrollPane.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithScrollBars"
				}
			],
			"properties": {
				"type": {
					"const": "InternalWindowContainer"
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/InternalWindow"
					},
					"description": "InternalWindow components hosted in this desktop."
				}
			}
		},
		"Label": {
			"description": "A non-interactive text and/or icon display. Supports HTML markup for rich formatting.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithAlignments"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "Label"
				},
				"text": {
					"type": "string",
					"description": "Label text. HTML is supported, e.g. '<html><b>Bold</b> text</html>'."
				},
				"icon": {
					"$ref": "#/$defs/ImagePath"
				}
			}
		},
		"List": {
			"description": "A scrollable list of selectable items with built-in scroll bars. Cannot be placed inside a ScrollPane.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithAlignments"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithScrollBars"
				},
				{
					"$ref": "#/$defs/ComponentsWithMultiItemSelection"
				}
			],
			"properties": {
				"type": {
					"const": "List"
				},
				"items": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ListItem"
					},
					"description": "Initial list items. Set only if not empty, more than 0 items."
				},
				"selectionMode": {
					"$ref": "#/$defs/SelectionMode"
				},
				"dropMode": {
					"$ref": "#/$defs/DropMode"
				},
				"itemPadding": {
					"type": "string",
					"description": "A padding on each side of items in the list. Format: 'top right bottom left'. For example '5 0 6 3'."
				}
			}
		},
		"MediaPlayer": {
			"description": "A media player for audio and video. Requires FFmpeg to be installed and on the system PATH.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "MediaPlayer"
				},
				"source": {
					"type": "string",
					"description": "Path or URL of the media file to load on creation."
				},
				"autoPlay": {
					"type": "boolean",
					"default": false,
					"description": "Start playback immediately after loading."
				},
				"loop": {
					"type": "boolean",
					"default": false,
					"description": "Repeat playback when end is reached."
				},
				"volume": {
					"type": "number",
					"minimum": 0,
					"maximum": 1,
					"default": 1,
					"description": "Initial playback volume. 0 = silent, 1 = full."
				},
				"muted": {
					"type": "boolean",
					"default": false
				},
				"controls": {
					"type": "boolean",
					"default": true,
					"description": "Show the built-in playback control bar."
				}
			}
		},
		"Menu": {
			"description": "A pull-down menu containing items, separators, and sub-menus. Add to a MenuBar or nest inside another Menu.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				}
			],
			"properties": {
				"type": {
					"const": "Menu"
				},
				"text": {
					"type": "string",
					"description": "Menu label shown in the menu bar or parent menu."
				},
				"icon": {
					"$ref": "#/$defs/ImagePath"
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/MenuChildComponent"
					}
				}
			}
		},
		"MenuBar": {
			"description": "Application menu bar. On macOS, it appears in the system menu bar.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "MenuBar"
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Menu"
					},
					"description": "Top-level Menu items."
				}
			}
		},
		"MenuItem": {
			"description": "A clickable action item inside a Menu or ContextMenu.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "MenuItem"
				},
				"text": {
					"type": "string"
				},
				"icon": {
					"$ref": "#/$defs/ImagePath"
				},
				"accelerator": {
					"type": "string",
					"description": "Keyboard shortcut in lower case, keys joined by a + sign. e.g. 'control+v', 'meta+q', 'alt+f4'. For modifiers use `control`, `shift`, `alt` and `meta`. `meta` maps to command on macOS and control on Windows/Linux. "
				}
			}
		},
		"Panel": {
			"description": "General-purpose container. Use it for grouping components, as a scrollable canvas when inside a ScrollPane, canvas for containing shapes, or as a Tabs page (set Panel's text to the desired tab label, and same with icon.).",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "Panel"
				},
				"opacity": {
					"type": "number",
					"minimum": 0,
					"maximum": 1,
					"description": "Opacity of a whole component including all child components."
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AnyComponent"
					},
					"description": "Direct child components placed inside this Panel, except for Window, TrayIcon, ContextMenu, Menu, MenuItem, Separator, CheckBoxMenuItem, RadioButtonMenuItem, InternalWindow."
				},
				"shapes": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Shape"
					},
					"description": "Shapes drawn on this Panel as a canvas layer beneath the child components."
				}
			}
		},
		"PasswordField": {
			"description": "A single-line text input that masks its content with bullet characters.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithUndoRedo"
				}
			],
			"properties": {
				"type": {
					"const": "PasswordField"
				},
				"text": {
					"type": "string",
					"description": "Initial password value (displayed as masked characters)."
				},
				"character": {
					"type": "string",
					"description": "Mask character to use instead of default one (single character)."
				},
				"editable": {
					"type": "boolean",
					"default": true
				}
			}
		},
		"ProgressBar": {
			"description": "A visual progress indicator bar.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "ProgressBar"
				},
				"value": {
					"type": "number",
					"default": 0,
					"description": "Current value between 0 and 100."
				},
				"orientation": {
					"$ref": "#/$defs/Orientation",
					"description": "Bar orientation. Default is 0 - horizontal. Maps to Orientation enum."
				}
			}
		},
		"RadioButton": {
			"description": "A radio button for single-choice selection. Group multiple RadioButtons by setting each one's 'group' to another RadioButton's 'ref'.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithAlignments"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "RadioButton"
				},
				"text": {
					"type": "string"
				},
				"selected": {
					"type": "boolean",
					"default": false
				},
				"value": {
					"type": "string",
					"description": "Custom value returned by selectedValue() on any member of the group when this button is selected."
				},
				"group": {
					"type": "string",
					"description": "ref of another RadioButton to group with. All buttons sharing a group form a mutually-exclusive set."
				}
			}
		},
		"RadioButtonMenuItem": {
			"description": "A radio-button-style item inside a Menu or ContextMenu. Group with another RadioButtonMenuItem via 'group'.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "RadioButtonMenuItem"
				},
				"text": {
					"type": "string"
				},
				"selected": {
					"type": "boolean",
					"default": false
				},
				"value": {
					"type": "string",
					"description": "Custom value returned by selectedValue() on any member of the group when this button is selected."
				},
				"group": {
					"type": "string",
					"description": "ref of another RadioButtonMenuItem in the same group."
				},
				"icon": {
					"$ref": "#/$defs/ImagePath"
				}
			}
		},
		"ScrollPane": {
			"$comment": "IMPORTANT: TextArea, List, Table, Tree, DocumentEditor, and InternalWindowContainer already have built-in scrollbars and must NOT be wrapped in a ScrollPane.",
			"description": "Wraps exactly one child component and adds horizontal and vertical scrollbars to it.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithScrollBars"
				}
			],
			"properties": {
				"type": {
					"const": "ScrollPane"
				},
				"children": {
					"type": "array",
					"minItems": 1,
					"maxItems": 1,
					"items": {
						"anyOf": [
							{
								"$ref": "#/$defs/Panel"
							},
							{
								"$ref": "#/$defs/Label"
							}
						]
					},
					"description": "Exactly one component to wrap with scrollbars. Do NOT use TextArea, List, Table, Tree, DocumentEditor, or InternalWindowContainer here, because they already have scroll bars."
				}
			}
		},
		"Separator": {
			"description": "A visual divider line. Used in menus (horizontal divider between items), toolbars, and panels.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				}
			],
			"properties": {
				"type": {
					"const": "Separator"
				},
				"orientation": {
					"$ref": "#/$defs/Orientation",
					"default": "0"
				}
			}
		},
		"Slider": {
			"description": "A draggable slider knob for choosing a value within a range.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "Slider"
				},
				"min": {
					"type": "number",
					"default": 0
				},
				"max": {
					"type": "number",
					"default": 100
				},
				"value": {
					"type": "number",
					"default": 50
				},
				"step": {
					"type": "number",
					"exclusiveMinimum": 0,
					"description": "Snap increment for keyboard and scroll wheel adjustments."
				},
				"orientation": {
					"$ref": "#/$defs/Orientation"
				},
				"showTicks": {
					"type": "boolean",
					"default": false,
					"description": "Render tick marks along the slider track."
				},
				"showLabels": {
					"type": "boolean",
					"default": false,
					"description": "Render numeric labels at each major tick mark."
				}
			}
		},
		"Spinner": {
			"description": "A numeric input field with increment (+) and decrement (−) arrow buttons.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "Spinner"
				},
				"min": {
					"type": "number",
					"description": "Minimum allowed value."
				},
				"max": {
					"type": "number",
					"description": "Maximum allowed value."
				},
				"value": {
					"type": "number"
				},
				"text": {
					"type": "string",
					"default": "0",
					"description": "Text value of the spinner."
				},
				"step": {
					"type": "number",
					"exclusiveMinimum": 0,
					"default": 1,
					"description": "Amount to increment/decrement on each arrow click."
				}
			}
		},
		"SplitView": {
			"description": "Divides its area between exactly two child components with a user-draggable divider bar.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "SplitView"
				},
				"orientation": {
					"$ref": "#/$defs/Orientation",
					"description": "0 - Horizontal: children are side-by-side (left|right). 1 - Vertical: children are stacked (top|bottom)."
				},
				"dividerPosition": {
					"type": "integer",
					"minimum": 0,
					"description": "Initial divider offset in pixels from the left (horizontal) or top (vertical) edge."
				},
				"dividerSize": {
					"type": "integer",
					"minimum": 0,
					"description": "Thickness of the draggable divider bar in pixels."
				},
				"children": {
					"type": "array",
					"minItems": 2,
					"maxItems": 2,
					"items": {
						"$ref": "#/$defs/AnyComponent"
					},
					"description": "Exactly two children required: [0] is the left/top panel, [1] is the right/bottom panel."
				}
			}
		},
		"Table": {
			"description": "A scrollable data grid with typed, sortable, resizable columns and multiple selection modes. Includes built-in scrollbars. Cannot be placed inside a ScrollPane.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithScrollBars"
				},
				{
					"$ref": "#/$defs/ComponentWithUndoRedo"
				},
				{
					"$ref": "#/$defs/ComponentsWithMultiItemSelection"
				}
			],
			"properties": {
				"type": {
					"const": "Table"
				},
				"columns": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/TableColumn"
					},
					"description": "Column definitions, in left-to-right display order."
				},
				"rows": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/TableRow"
					},
					"description": "Initial data rows. Each row is an array of cell values matching column order and type. Set only if not empty, more than 0 rows."
				},
				"selectionMode": {
					"$ref": "#/$defs/SelectionMode"
				},
				"gridLines": {
					"enum": [
						"None",
						"Horizontal",
						"Vertical",
						"Both"
					],
					"default": "Both",
					"description": "Which grid lines to display. Maps to Table.GridLines enum."
				},
				"showHeader": {
					"type": "boolean",
					"default": true,
					"description": "Show the column header row."
				},
				"rowHeight": {
					"type": "integer",
					"exclusiveMinimum": 0
				},
				"autoResizeColumns": {
					"type": "integer",
					"default": 3,
					"description": "How columns are auto-resized when the table width changes. Maps to Table.AutoResize enum.",
					"oneOf": [
						{
							"const": 0,
							"title": "None",
							"description": "Do not auto-resize columns when one of the columns is resized."
						},
						{
							"const": 1,
							"title": "NextColumn",
							"description": "Resize the next column when current column changes."
						},
						{
							"const": 2,
							"title": "SubsequentColumns",
							"description": "Resize all columns to the right of the changed column."
						},
						{
							"const": 3,
							"title": "LastColumn",
							"description": "Resize only the last column."
						},
						{
							"const": 4,
							"title": "AllColumns",
							"description": "Resize all other columns equally to adapt to the new size of the column being resized."
						}
					]
				},
				"dropMode": {
					"$ref": "#/$defs/DropMode"
				}
			}
		},
		"Tabs": {
			"description": "A tabbed pane. Each child Panel becomes one tab; the Panel's 'text' property is used as the tab label and its 'icon' as the tab icon.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "Tabs"
				},
				"selected": {
					"type": "integer",
					"minimum": 0,
					"default": 0,
					"description": "Zero-based index of the initially visible tab."
				},
				"tabPosition": {
					"enum": [
						"top",
						"bottom",
						"left",
						"right"
					],
					"default": "top",
					"description": "Location of the tab strip relative to the content area."
				},
				"verticalText": {
					"type": "boolean",
					"default": false,
					"description": "Rotate tab label text 90°. Useful when tabPosition is 'left' or 'right'."
				},
				"children": {
					"type": "array",
					"items": {
						"anyOf": [
							{
								"$ref": "#/$defs/Panel"
							},
							{
								"$ref": "#/$defs/ScrollPane"
							},
							{
								"$ref": "#/$defs/Label"
							},
							{
								"$ref": "#/$defs/TextArea"
							},
							{
								"$ref": "#/$defs/DocumentEditor"
							},
							{
								"$ref": "#/$defs/Tabs"
							},
							{
								"$ref": "#/$defs/InternalWindowContainer"
							},
							{
								"$ref": "#/$defs/List"
							},
							{
								"$ref": "#/$defs/Table"
							},
							{
								"$ref": "#/$defs/Tree"
							},
							{
								"$ref": "#/$defs/MediaPlayer"
							},
							{
								"$ref": "#/$defs/SplitView"
							}
						]
					},
					"description": "Panel components, one per tab. Set each child component's 'text' to the desired tab label and 'icon' for a tab icon. Set 'tooltip' on the child component for a tab tooltip."
				}
			}
		},
		"TextArea": {
			"description": "A multi-line plain text editor with built-in scrollbars. Cannot be placed inside a ScrollPane.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithUndoRedo"
				},
				{
					"$ref": "#/$defs/ComponentWithScrollBars"
				}
			],
			"properties": {
				"type": {
					"const": "TextArea"
				},
				"lineWrap": {
					"$ref": "#/$defs/LineWrap",
					"description": "Line wrap mode. Maps to LineWrap enum."
				}
			}
		},
		"TextField": {
			"description": "A single-line text input field.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithAlignments"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithUndoRedo"
				}
			],
			"properties": {
				"type": {
					"const": "TextField"
				}
			}
		},
		"ToggleButton": {
			"description": "A button that toggles between a pressed (selected) and unpressed state on each click.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "ToggleButton"
				},
				"text": {
					"type": "string"
				},
				"selected": {
					"type": "boolean",
					"default": false,
					"description": "Initial pressed state."
				},
				"icon": {
					"$ref": "#/$defs/ImagePath"
				}
			}
		},
		"ToolBar": {
			"description": "A dockable toolbar strip that holds buttons, separators, and other compact controls.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"properties": {
				"type": {
					"const": "ToolBar"
				},
				"orientation": {
					"enum": [
						"Horizontal",
						"Vertical"
					],
					"default": "Horizontal"
				},
				"floatable": {
					"type": "boolean",
					"default": true,
					"description": "Allow the user to drag the toolbar out of its docked position."
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AnyComponent"
					},
					"description": "Toolbar contents. Typically Button, ToggleButton, Separator, Label, ComboBox, RadioButton, CheckBox, Spinner, PasswordField, or TextField."
				}
			}
		},
		"TrayIcon": {
			"type": "object",
			"description": "\"Application-level system tray icons. Created once at app startup regardless of window state. Only rendered when ui.systemTraySupported is true.",
			"required": [
				"ref",
				"type"
			],
			"properties": {
				"ref": {
					"type": "string",
					"pattern": "^[A-Za-z_$][A-Za-z0-9_$]*$",
					"description": "JavaScript property name to assign this component to on the host class instance (this.ref). Enables direct code access: 'this.myTrayIcon.icon(\"icon.png\")'. Must be a valid JS identifier."
				},
				"type": {
					"const": "TrayIcon"
				},
				"icon": {
					"$ref": "#/$defs/ImagePath",
					"description": "Tray icon image path."
				},
				"tooltip": {
					"type": "string",
					"description": "Text shown when hovering over the tray icon."
				},
				"contextMenu": {
					"$ref": "#/$defs/ContextMenu",
					"description": "Right-click menu for the tray icon."
				},
				"visible": {
					"type": "boolean",
					"description": "Makes the TrayIcon visible or hidden."
				}
			}
		},
		"Tree": {
			"description": "A scrollable tree view with expandable/collapsible nodes. Includes built-in scrollbars. Cannot be placed inside a ScrollPane.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				},
				{
					"$ref": "#/$defs/ComponentWithScrollBars"
				},
				{
					"$ref": "#/$defs/ComponentWithUndoRedo"
				},
				{
					"$ref": "#/$defs/ComponentsWithMultiItemSelection"
				}
			],
			"properties": {
				"type": {
					"const": "Tree"
				},
				"items": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/ListItem"
					},
					"description": "Tree nodes. Set only if not empty, more than 0 items."
				},
				"selectionMode": {
					"$ref": "#/$defs/SelectionMode"
				},
				"editable": {
					"type": "boolean",
					"default": false,
					"description": "Allow in-place editing of node label text."
				},
				"clicksToEdit": {
					"type": "integer",
					"enum": [
						1,
						2,
						3
					],
					"default": 2,
					"description": "Number of clicks to begin editing a node label. Only relevant when editable is true."
				},
				"rootVisible": {
					"type": "boolean",
					"default": false,
					"description": "Show or hide the invisible root node connector line."
				},
				"dropMode": {
					"$ref": "#/$defs/DropMode"
				}
			}
		},
		"Window": {
			"description": "Top-level application window. The root component in most .ui.json files.",
			"allOf": [
				{
					"$ref": "#/$defs/ComponentBase"
				},
				{
					"$ref": "#/$defs/ComponentWithBounds"
				},
				{
					"$ref": "#/$defs/ComponentWithDragDrop"
				}
			],
			"required": [
				"type"
			],
			"properties": {
				"type": {
					"const": "Window"
				},,
				"menuBar": {
					"$ref": "#/$defs/MenuBar",
					"description": "MenuBar component attached to this window. On macOS it is rendered as the system menu bar."
				},
				"closeOperation": {
					"type": "integer",
					"default": 3,
					"description": "Action when the window's close button is clicked or close() is called.",
					"oneOf": [
						{
							"const": 0,
							"description": "Nothing - Do nothing; the close button has no effect. WindowEvent with type 'closing' still gets emitted."
						},
						{
							"const": 1,
							"description": "Hide - Hide the window instead of closing it."
						},
						{
							"const": 2,
							"description": "Dispose - Release window resources and remove it from display. Emits 'closing' and 'close' events."
						},
						{
							"const": 3,
							"description": "Exit - Terminate the entire application (Default). Emits 'closing' and 'close' events."
						}
					]
				},
				"windowType": {
					"type": "integer",
					"default": 0,
					"description": "Window decoration style and appearance behavior.",
					"oneOf": [
						{
							"const": 0,
							"description": "Normal - A standard, resizable window with borders, title bar, and a taskbar button (Default)."
						},
						{
							"const": 1,
							"description": "Borderless - A window with a taskbar button, but without borders and title bar."
						},
						{
							"const": 2,
							"description": "Utility - A smaller utility window without a taskbar button, typically used for tools or palettes."
						},
						{
							"const": 3,
							"description": "Popup - A popup window, usually without a title bar, borders, or taskbar button."
						}
					]
				},
				"state": {
					"type": "integer",
					"default": 0,
					"description": "Initial window state. Maps to Window.State enum.",
					"oneOf": [
						{
							"const": 0,
							"description": "Normal - The window is in its normal, restored state (Default)."
						},
						{
							"const": 1,
							"description": "Minimized - The window is minimized to the taskbar or dock."
						},
						{
							"const": 2,
							"description": "Maximized - The window is maximized to fill the screen."
						},
						{
							"const": 3,
							"description": "MaximizedHorizontally - Maximized horizontally only."
						},
						{
							"const": 4,
							"description": "MaximizedVertically - Maximized vertically only"
						}
					]
				},
				"position": {
					"$ref": "#/$defs/Position",
					"description": "Component's position relative to parent component's position, or Window position relative o main screen's top left corner."
				},
				"size": {
					"$ref": "#/$defs/Size",
					"description": "Size of a component."
				},
				"innerSize": {
					"$ref": "#/$defs/Size",
					"description": "Sets a content area of the Window to a specified size. Use it instead of 'size' property to make sure the content area will be exactly your desired size."
				},
				"minInnerSize": {
					"$ref": "#/$defs/Size",
					"description": "Minimum size of a component.",
				},
				"maxInnerSize": {
					"$ref": "#/$defs/Size",
					"description": "Maximum size of a component."
				},
				"border": {
					"$ref": "#/$defs/Border"
				},
				"resizable": {
					"type": "boolean",
					"default": true
				},
				"alwaysOnTop": {
					"type": "boolean",
					"default": false
				},
				"opacity": {
					"type": "number",
					"minimum": 0,
					"maximum": 1,
					"default": 1,
					"description": "Window transparency. 0 = invisible, 1 = fully opaque."
				},
				"defaultButton": {
					"type": "string",
					"description": "ref of a Button inside this window to activate when the user presses Enter."
				},
				"children": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/AnyComponent"
					},
					"description": "Direct child components placed inside this window, except for Window, TrayIcon, ContextMenu, Menu, MenuItem, Separator, CheckBoxMenuItem, RadioBottonMenuItem, InternalWindow."
				},
				"shapes": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Shape"
					},
					"description": "Shapes drawn directly on the Window canvas or Panel."
				}
			}
		}
	},
	"examples": [
	]
}
