{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"title": "LFDS Parsed Tokens",
	"type": "object",
	"required": ["schemaVersion", "generatedAt", "source", "counts", "tokens"],
	"properties": {
		"schemaVersion": { "type": "string" },
		"generatedAt": { "type": "string", "format": "date-time" },
		"source": {
			"type": "object",
			"properties": {
				"files": {
					"type": "array",
					"items": {
						"type": "object",
						"properties": {
							"file": { "type": "string" },
							"mode": { "type": "string" }
						},
						"required": ["file", "mode"]
					}
				}
			},
			"required": ["files"]
		},
		"counts": {
			"type": "object",
			"properties": {
				"total": { "type": "number" },
				"byGroup": {
					"type": "object",
					"additionalProperties": { "type": "number" }
				},
				"byCategory": {
					"type": "object",
					"additionalProperties": { "type": "number" }
				}
			},
			"required": ["total", "byGroup", "byCategory"]
		},
		"tokens": {
			"type": "array",
			"items": {
				"type": "object",
				"required": ["id", "path", "group", "category", "modes", "resolved"],
				"properties": {
					"id": { "type": "string" },
					"path": {
						"type": "array",
						"items": { "type": "string" }
					},
					"originalPath": {
						"type": "array",
						"items": { "type": "string" }
					},
					"group": { "type": "string" },
					"category": { "type": "string" },
					"subCategory": { "type": ["string", "null"] },
					"type": { "type": ["string", "null"] },
					"description": { "type": ["string", "null"] },
					"tags": {
						"type": "array",
						"items": { "type": "string" }
					},
					"sourceFiles": {
						"type": "array",
						"items": { "type": "string" }
					},
					"modes": {
						"type": "object",
						"additionalProperties": true
					},
					"resolved": {
						"type": "object",
						"properties": {
							"base": {},
							"light": {},
							"dark": {},
							"min": {},
							"max": {}
						},
						"additionalProperties": true
					},
					"aliasChain": {
						"type": "array",
						"items": { "type": "string" }
					},
					"cssVariable": { "type": "string" },
					"visibility": {
						"type": "object",
						"properties": {
							"isComponent": { "type": "boolean" },
							"isPrimitive": { "type": "boolean" }
						}
					},
					"metadata": {
						"type": "object",
						"properties": {
							"extensions": {
								"type": "object",
								"additionalProperties": true
							}
						},
						"additionalProperties": true
					}
				}
			}
		}
	}
}
