mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-16 14:18:29 +00:00
* feat(metadata): reuse metadata from a base icon with `$extends:` Icon metadata can reference a base icon with an inline `$extends:<icon-name>` marker in `tags`, `categories` or `contributors`. The marker is replaced in place with the base icon's resolved values at build time. - Resolve markers in `readAllMetadata` and `getIconMetaData`, failing on unknown icons, self references and circular chains - Accept markers in `icon.schema.json` - `pnpm checkIcons` fails on duplicate markers and on literals a marker already provides, and runs in CI - Docs read the resolved metadata index instead of the raw icon JSON - Use `$extends:alarm-clock` in `alarm-clock-minus` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(metadata): reuse metadata from a base icon with `$extends:` Icon metadata can reference a base icon with an inline `$extends:<icon-name>` marker in `tags`, `categories` or `contributors`. The marker is replaced in place with the base icon's resolved values at build time. - Resolve markers in `readAllMetadata` and `getIconMetaData`, failing on unknown icons, self references and circular chains - Accept markers in `icon.schema.json` - `pnpm checkIcons` fails on duplicate markers and on literals a marker already provides, and runs in CI - Docs read the resolved metadata index instead of the raw icon JSON - Use `$extends:alarm-clock` in `alarm-clock-minus` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix comments * Format code * Update tools/build-helpers/src/resolveMetadataExtends.ts Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix resolving icon metadata * feat(metadata): reuse metadata from a base icon with `$extends:` Icon metadata can reference a base icon with an inline `$extends:<icon-name>` marker in `tags`, `categories` or `contributors`. The marker is replaced in place with the base icon's resolved values at build time. - Resolve markers in `readAllMetadata` and `getIconMetaData`, failing on unknown icons, self references and circular chains - Accept markers in `icon.schema.json` - `pnpm checkIcons` fails on duplicate markers and on literals a marker already provides, and runs in CI - Docs read the resolved metadata index instead of the raw icon JSON - Use `$extends:alarm-clock` in `alarm-clock-minus` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix comments * Format code * Update tools/build-helpers/src/resolveMetadataExtends.ts Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix resolving icon metadata * Fix comments * Format code * Update tools/build-helpers/src/resolveMetadataExtends.ts Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
178 lines
4.6 KiB
JSON
178 lines
4.6 KiB
JSON
{
|
|
"$id": "https://lucide.dev/icons.schema.json",
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$vocabulary": {
|
|
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
},
|
|
"title": "Lucide Icons icon schema",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["$schema", "contributors", "categories", "tags", "use-cases"],
|
|
"properties": {
|
|
"$schema": {
|
|
"type": "string"
|
|
},
|
|
"aliases": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["name"],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"deprecated": {
|
|
"const": true
|
|
},
|
|
"deprecationReason": {
|
|
"$ref": "#/$defs/aliasDeprecationReasons"
|
|
},
|
|
"toBeRemovedInVersion": {
|
|
"$ref": "#/$defs/versionNumber",
|
|
"description": "The version this icon will be removed in."
|
|
}
|
|
},
|
|
"dependentRequired": {
|
|
"deprecated": ["deprecationReason"],
|
|
"deprecationReason": ["deprecated"],
|
|
"toBeRemovedInVersion": ["deprecated"]
|
|
}
|
|
},
|
|
"uniqueItems": true
|
|
},
|
|
"categories": {
|
|
"type": "array",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": [
|
|
"accessibility",
|
|
"account",
|
|
"animals",
|
|
"arrows",
|
|
"buildings",
|
|
"charts",
|
|
"communication",
|
|
"connectivity",
|
|
"cursors",
|
|
"design",
|
|
"development",
|
|
"devices",
|
|
"emoji",
|
|
"files",
|
|
"finance",
|
|
"food-beverage",
|
|
"gaming",
|
|
"home",
|
|
"layout",
|
|
"letters-digits",
|
|
"mail",
|
|
"math",
|
|
"medical",
|
|
"multimedia",
|
|
"nature",
|
|
"navigation",
|
|
"notifications",
|
|
"people",
|
|
"photography",
|
|
"science",
|
|
"seasons",
|
|
"security",
|
|
"shapes",
|
|
"shopping",
|
|
"social",
|
|
"sports",
|
|
"sustainability",
|
|
"text",
|
|
"time",
|
|
"tools",
|
|
"transportation",
|
|
"travel",
|
|
"weather"
|
|
]
|
|
},
|
|
{
|
|
"type": "string",
|
|
"pattern": "^\\$extends:[a-z0-9]+(-[a-z0-9]+)*$"
|
|
}
|
|
]
|
|
},
|
|
"uniqueItems": true
|
|
},
|
|
"contributors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"if": {
|
|
"pattern": "^\\$[a-zA-Z]"
|
|
},
|
|
"then": {
|
|
"pattern": "^\\$extends:[a-z0-9]+(-[a-z0-9]+)*$"
|
|
}
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"if": {
|
|
"pattern": "^\\$[a-zA-Z]"
|
|
},
|
|
"then": {
|
|
"pattern": "^\\$extends:[a-z0-9]+(-[a-z0-9]+)*$"
|
|
}
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"use-cases": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 0,
|
|
"uniqueItems": true
|
|
},
|
|
"deprecated": {
|
|
"const": true
|
|
},
|
|
"deprecationReason": {
|
|
"$ref": "#/$defs/iconDeprecationReasons"
|
|
},
|
|
"toBeRemovedInVersion": {
|
|
"$ref": "#/$defs/versionNumber",
|
|
"description": "The version this icon will be removed in."
|
|
}
|
|
},
|
|
"dependentRequired": {
|
|
"deprecated": ["deprecationReason"],
|
|
"deprecationReason": ["deprecated"],
|
|
"toBeRemovedInVersion": ["deprecated"]
|
|
},
|
|
"$defs": {
|
|
"iconDeprecationReasons": {
|
|
"type": "string",
|
|
"enum": ["icon.design", "icon.use-case"]
|
|
},
|
|
"aliasDeprecationReasons": {
|
|
"type": "string",
|
|
"enum": ["alias.typo", "alias.name", "alias.duplicate"]
|
|
},
|
|
"versionNumber": {
|
|
"type": "string",
|
|
"pattern": "v[0-9]+(\\.[0-9]+)+"
|
|
}
|
|
},
|
|
"description": "A JSON Schema for icons defined by Lucide Icons."
|
|
}
|