|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://hyperframes.heygen.com/schema/registry-item.json", |
| 4 | + "title": "Hyperframes Registry Item", |
| 5 | + "description": "Manifest for a single distributable item (example, block, or component).", |
| 6 | + "type": "object", |
| 7 | + "required": ["name", "type", "title", "description", "files"], |
| 8 | + "properties": { |
| 9 | + "$schema": { |
| 10 | + "type": "string", |
| 11 | + "format": "uri" |
| 12 | + }, |
| 13 | + "name": { |
| 14 | + "type": "string", |
| 15 | + "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$", |
| 16 | + "description": "Item name in kebab-case, must start and end with alphanumeric." |
| 17 | + }, |
| 18 | + "type": { |
| 19 | + "type": "string", |
| 20 | + "enum": ["hyperframes:example", "hyperframes:block", "hyperframes:component"] |
| 21 | + }, |
| 22 | + "title": { |
| 23 | + "type": "string", |
| 24 | + "minLength": 1 |
| 25 | + }, |
| 26 | + "description": { |
| 27 | + "type": "string", |
| 28 | + "minLength": 1 |
| 29 | + }, |
| 30 | + "tags": { |
| 31 | + "type": "array", |
| 32 | + "items": { "type": "string", "minLength": 1 } |
| 33 | + }, |
| 34 | + "author": { |
| 35 | + "type": "string", |
| 36 | + "minLength": 1 |
| 37 | + }, |
| 38 | + "license": { |
| 39 | + "type": "string", |
| 40 | + "minLength": 1, |
| 41 | + "description": "SPDX license identifier (e.g. \"Apache-2.0\", \"MIT\")." |
| 42 | + }, |
| 43 | + "minCliVersion": { |
| 44 | + "type": "string", |
| 45 | + "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$", |
| 46 | + "description": "Minimum `hyperframes` CLI version required to install this item." |
| 47 | + }, |
| 48 | + "deprecated": { |
| 49 | + "type": "string", |
| 50 | + "minLength": 1, |
| 51 | + "description": "If set, the item is deprecated; the value is the reason or migration note." |
| 52 | + }, |
| 53 | + "dimensions": { |
| 54 | + "type": "object", |
| 55 | + "required": ["width", "height"], |
| 56 | + "additionalProperties": false, |
| 57 | + "properties": { |
| 58 | + "width": { "type": "integer", "minimum": 1 }, |
| 59 | + "height": { "type": "integer", "minimum": 1 } |
| 60 | + } |
| 61 | + }, |
| 62 | + "duration": { |
| 63 | + "type": "number", |
| 64 | + "exclusiveMinimum": 0, |
| 65 | + "description": "Duration in seconds. Must be > 0." |
| 66 | + }, |
| 67 | + "registryDependencies": { |
| 68 | + "type": "array", |
| 69 | + "items": { |
| 70 | + "type": "string", |
| 71 | + "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" |
| 72 | + } |
| 73 | + }, |
| 74 | + "files": { |
| 75 | + "type": "array", |
| 76 | + "minItems": 1, |
| 77 | + "items": { |
| 78 | + "type": "object", |
| 79 | + "required": ["path", "target", "type"], |
| 80 | + "additionalProperties": false, |
| 81 | + "properties": { |
| 82 | + "path": { |
| 83 | + "type": "string", |
| 84 | + "minLength": 1, |
| 85 | + "description": "Source path, relative to registry-item.json." |
| 86 | + }, |
| 87 | + "target": { |
| 88 | + "type": "string", |
| 89 | + "minLength": 1, |
| 90 | + "description": "Destination path in the user's project, relative to project root. Must not traverse outside the project (no `..` segments, no absolute paths).", |
| 91 | + "not": { |
| 92 | + "anyOf": [ |
| 93 | + { "pattern": "(^|[/\\\\])\\.\\.([/\\\\]|$)" }, |
| 94 | + { "pattern": "^[/\\\\]" }, |
| 95 | + { "pattern": "^[A-Za-z]:[/\\\\]" } |
| 96 | + ] |
| 97 | + } |
| 98 | + }, |
| 99 | + "type": { |
| 100 | + "type": "string", |
| 101 | + "enum": [ |
| 102 | + "hyperframes:composition", |
| 103 | + "hyperframes:asset", |
| 104 | + "hyperframes:snippet", |
| 105 | + "hyperframes:style", |
| 106 | + "hyperframes:timeline" |
| 107 | + ] |
| 108 | + } |
| 109 | + } |
| 110 | + } |
| 111 | + }, |
| 112 | + "preview": { |
| 113 | + "type": "object", |
| 114 | + "additionalProperties": false, |
| 115 | + "properties": { |
| 116 | + "video": { "type": "string" }, |
| 117 | + "poster": { "type": "string" } |
| 118 | + } |
| 119 | + }, |
| 120 | + "relatedSkill": { |
| 121 | + "type": "string", |
| 122 | + "minLength": 1 |
| 123 | + } |
| 124 | + }, |
| 125 | + "allOf": [ |
| 126 | + { |
| 127 | + "if": { |
| 128 | + "required": ["type"], |
| 129 | + "properties": { "type": { "const": "hyperframes:component" } } |
| 130 | + }, |
| 131 | + "then": { |
| 132 | + "not": { |
| 133 | + "anyOf": [{ "required": ["dimensions"] }, { "required": ["duration"] }] |
| 134 | + } |
| 135 | + }, |
| 136 | + "else": { |
| 137 | + "required": ["dimensions", "duration"] |
| 138 | + } |
| 139 | + } |
| 140 | + ] |
| 141 | +} |
0 commit comments