@jami-studio/registry-schema 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +182 -0
- package/package.json +41 -0
- package/src/index.d.ts +296 -0
- package/src/index.mjs +237 -0
- package/src/json-source.mjs +156 -0
- package/src/part-taxonomy.mjs +158 -0
- package/src/schemas/agent-manifest.schema.json +186 -0
- package/src/schemas/item-graph.schema.json +59 -0
- package/src/schemas/registry-item.schema.json +69 -0
- package/src/schemas/registry-ref.schema.json +34 -0
- package/src/schemas/shadcn-registry-item.schema.json +319 -0
- package/src/schemas/theme-ref.schema.json +25 -0
- package/src/schemas/workbench-state.schema.json +73 -0
- package/src/schemas/workspace-ref.schema.json +28 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jami.studio/schemas/registry/agent-manifest.schema.json",
|
|
4
|
+
"title": "Studio UI agent manifest",
|
|
5
|
+
"description": "Resident-renderer manifest that maps a Jami component prop contract and action-slot schemas to a fail-closed runtime binding and the default renderer allowlist.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["$schema", "schemaVersion", "manifestId", "component", "propContract", "actionSlots", "runtimeBinding", "residentRenderer"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "https://jami.studio/schemas/registry/agent-manifest.schema.json" },
|
|
11
|
+
"schemaVersion": { "const": "2026-06-23.agent-manifest" },
|
|
12
|
+
"manifestId": { "type": "string", "pattern": "^agm_[a-z0-9][a-z0-9_-]*$" },
|
|
13
|
+
"component": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["namespace", "name", "version"],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"namespace": { "const": "@jami-studio/ui" },
|
|
19
|
+
"name": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": [
|
|
22
|
+
"accordion",
|
|
23
|
+
"agent-panel",
|
|
24
|
+
"button",
|
|
25
|
+
"calendar",
|
|
26
|
+
"chart",
|
|
27
|
+
"data-list",
|
|
28
|
+
"date-control",
|
|
29
|
+
"dialog",
|
|
30
|
+
"docs-source-panel",
|
|
31
|
+
"dropdown-menu",
|
|
32
|
+
"media-grid",
|
|
33
|
+
"panel",
|
|
34
|
+
"popover",
|
|
35
|
+
"select",
|
|
36
|
+
"tabs",
|
|
37
|
+
"text-field",
|
|
38
|
+
"tooltip"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"version": { "type": "string", "minLength": 1 }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"propContract": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": ["schemaVersion", "additionalProperties", "required", "properties"],
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"properties": {
|
|
49
|
+
"schemaVersion": { "type": "string", "minLength": 1 },
|
|
50
|
+
"additionalProperties": { "const": false },
|
|
51
|
+
"required": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]*$" },
|
|
54
|
+
"uniqueItems": true
|
|
55
|
+
},
|
|
56
|
+
"properties": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"minProperties": 1,
|
|
59
|
+
"additionalProperties": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": ["type"],
|
|
62
|
+
"additionalProperties": true,
|
|
63
|
+
"properties": {
|
|
64
|
+
"type": { "enum": ["string", "boolean", "array", "object", "number", "integer"] },
|
|
65
|
+
"enum": { "type": "array", "items": { "type": ["string", "number", "boolean"] }, "uniqueItems": true },
|
|
66
|
+
"pattern": { "type": "string", "minLength": 1 },
|
|
67
|
+
"nullable": { "type": "boolean" },
|
|
68
|
+
"items": { "type": "object" }
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"actionSlots": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"description": "Harness-owned action slots this resident component may display as typed actionRef data. Studio UI declares schemas only; execution, policy, audit, and side effects stay in Jami Harness.",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": [
|
|
80
|
+
"slotId",
|
|
81
|
+
"name",
|
|
82
|
+
"label",
|
|
83
|
+
"harnessRoute",
|
|
84
|
+
"risk",
|
|
85
|
+
"policyScope",
|
|
86
|
+
"confirmationMode",
|
|
87
|
+
"inputSchema",
|
|
88
|
+
"outputSchema",
|
|
89
|
+
"safetyConstraints"
|
|
90
|
+
],
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"properties": {
|
|
93
|
+
"slotId": { "type": "string", "pattern": "^slot_[a-z0-9][a-z0-9_]*$" },
|
|
94
|
+
"name": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]*$" },
|
|
95
|
+
"label": { "type": "string", "minLength": 1 },
|
|
96
|
+
"harnessRoute": { "type": "string", "pattern": "^harness://actions/[a-z0-9][a-z0-9-]*$" },
|
|
97
|
+
"risk": { "enum": ["read", "write", "destructive", "external", "secret_adjacent"] },
|
|
98
|
+
"policyScope": { "type": "string", "minLength": 1 },
|
|
99
|
+
"confirmationMode": { "enum": ["none", "confirm", "approval_required", "owner_required"] },
|
|
100
|
+
"inputSchema": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"required": ["type", "additionalProperties", "properties"],
|
|
103
|
+
"additionalProperties": true,
|
|
104
|
+
"properties": {
|
|
105
|
+
"type": { "const": "object" },
|
|
106
|
+
"additionalProperties": { "const": false },
|
|
107
|
+
"required": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
108
|
+
"properties": { "type": "object" }
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"outputSchema": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"required": ["type", "additionalProperties", "required", "properties"],
|
|
114
|
+
"additionalProperties": true,
|
|
115
|
+
"properties": {
|
|
116
|
+
"type": { "const": "object" },
|
|
117
|
+
"additionalProperties": { "const": false },
|
|
118
|
+
"required": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
119
|
+
"properties": { "type": "object", "minProperties": 1 }
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"safetyConstraints": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"minItems": 1,
|
|
125
|
+
"items": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"enum": [
|
|
128
|
+
"policy-required",
|
|
129
|
+
"audit-required",
|
|
130
|
+
"evidence-required",
|
|
131
|
+
"no-inline-secret-values",
|
|
132
|
+
"no-model-provided-code",
|
|
133
|
+
"schema-validated-input",
|
|
134
|
+
"schema-validated-output"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"uniqueItems": true
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"runtimeBinding": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"required": ["renderer", "bindingMode", "payloadSchemaVersion", "vocabularyHandshakeVersion", "execution"],
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"properties": {
|
|
147
|
+
"renderer": { "const": "resident-renderer" },
|
|
148
|
+
"bindingMode": { "const": "resident-component" },
|
|
149
|
+
"payloadSchemaVersion": { "const": "2026-06-09" },
|
|
150
|
+
"vocabularyHandshakeVersion": { "const": "2026-06-09.vocabulary-handshake" },
|
|
151
|
+
"execution": { "const": "display-only-data-never-code" }
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"residentRenderer": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"required": ["allowlistMode", "allowedComponents", "unknownComponentState", "unsafePayloadState"],
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"properties": {
|
|
159
|
+
"allowlistMode": { "const": "default-allowlist" },
|
|
160
|
+
"allowedComponents": {
|
|
161
|
+
"const": [
|
|
162
|
+
"accordion",
|
|
163
|
+
"agent-panel",
|
|
164
|
+
"button",
|
|
165
|
+
"calendar",
|
|
166
|
+
"chart",
|
|
167
|
+
"data-list",
|
|
168
|
+
"date-control",
|
|
169
|
+
"dialog",
|
|
170
|
+
"docs-source-panel",
|
|
171
|
+
"dropdown-menu",
|
|
172
|
+
"media-grid",
|
|
173
|
+
"panel",
|
|
174
|
+
"popover",
|
|
175
|
+
"select",
|
|
176
|
+
"tabs",
|
|
177
|
+
"text-field",
|
|
178
|
+
"tooltip"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"unknownComponentState": { "const": "unsupported" },
|
|
182
|
+
"unsafePayloadState": { "const": "invalid" }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jami.studio/schemas/registry/item-graph.schema.json",
|
|
4
|
+
"title": "registryItemGraph",
|
|
5
|
+
"description": "Resolved dependency graph for a registry item: the root item plus every registry node it pulls in, the level (install depth) of each node, and the directed edges between them. Used to verify per-level install/update/remove behavior and provenance.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["root", "nodes", "edges"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"root": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
13
|
+
"description": "Short name of the graph root item."
|
|
14
|
+
},
|
|
15
|
+
"nodes": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["name", "type", "level", "registryDependencies"],
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
24
|
+
"type": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": [
|
|
27
|
+
"registry:ui",
|
|
28
|
+
"registry:component",
|
|
29
|
+
"registry:block",
|
|
30
|
+
"registry:page",
|
|
31
|
+
"registry:theme",
|
|
32
|
+
"registry:font",
|
|
33
|
+
"registry:app",
|
|
34
|
+
"registry:workspace",
|
|
35
|
+
"registry:item"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"level": { "type": "integer", "minimum": 0 },
|
|
39
|
+
"registryDependencies": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": { "type": "string" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"edges": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": ["from", "to"],
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"properties": {
|
|
53
|
+
"from": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
54
|
+
"to": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jami.studio/schemas/registry/registry-item.schema.json",
|
|
4
|
+
"title": "Studio UI registry item",
|
|
5
|
+
"description": "Authored Jami Studio registry source item: lifecycle, provenance, compatibility, token requirements, dependency graph, and installable files.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["$schema", "name", "type", "title", "lifecycle", "provenance", "compatibility", "tokenRequirements", "dependencies", "files"],
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "https://jami.studio/schemas/registry/registry-item.schema.json" },
|
|
11
|
+
"name": { "type": "string", "pattern": "^@jami-studio/[a-z0-9][a-z0-9-]*$" },
|
|
12
|
+
"type": { "enum": ["primitive", "component", "block", "page", "theme", "font", "app", "workspace"] },
|
|
13
|
+
"title": { "type": "string", "minLength": 1 },
|
|
14
|
+
"description": { "type": "string" },
|
|
15
|
+
"workspace": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
16
|
+
"registryRef": { "$ref": "https://jami.studio/schemas/registry/registry-ref.schema.json" },
|
|
17
|
+
"lifecycle": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["id", "version", "schemaVersion", "sourceHash", "migrationNotes"],
|
|
20
|
+
"additionalProperties": true,
|
|
21
|
+
"properties": {
|
|
22
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9.-]*$" },
|
|
23
|
+
"version": { "type": "string", "minLength": 1 },
|
|
24
|
+
"schemaVersion": { "type": "string", "minLength": 1 },
|
|
25
|
+
"sourceHash": { "type": "string", "pattern": "^sha256:.+" },
|
|
26
|
+
"migrationNotes": { "type": "string" }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"provenance": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": ["source", "license", "reviewedAt", "copiedSource"],
|
|
32
|
+
"additionalProperties": true,
|
|
33
|
+
"properties": {
|
|
34
|
+
"source": { "type": "string" },
|
|
35
|
+
"license": { "type": "string" },
|
|
36
|
+
"reviewedAt": { "type": "string" },
|
|
37
|
+
"copiedSource": { "type": "boolean" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"compatibility": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": ["shadcn", "tailwind", "react"],
|
|
43
|
+
"additionalProperties": true,
|
|
44
|
+
"properties": {
|
|
45
|
+
"shadcn": { "type": "string" },
|
|
46
|
+
"tailwind": { "type": "string" },
|
|
47
|
+
"react": { "type": "string" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"tokenRequirements": { "type": "array", "items": { "type": "string" } },
|
|
51
|
+
"dependencies": { "type": "array", "items": { "type": "string" } },
|
|
52
|
+
"registryDependencies": { "type": "array", "items": { "type": "string" } },
|
|
53
|
+
"agentManifest": { "$ref": "https://jami.studio/schemas/registry/agent-manifest.schema.json" },
|
|
54
|
+
"files": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"minItems": 1,
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"required": ["path", "target", "kind"],
|
|
60
|
+
"additionalProperties": true,
|
|
61
|
+
"properties": {
|
|
62
|
+
"path": { "type": "string", "minLength": 1 },
|
|
63
|
+
"target": { "type": "string", "minLength": 1 },
|
|
64
|
+
"kind": { "type": "string", "minLength": 1 }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jami.studio/schemas/registry/registry-ref.schema.json",
|
|
4
|
+
"title": "registryRef",
|
|
5
|
+
"description": "Stable handshake reference to a single registry item: which registry, namespace, item name, and version. Mirrors the Jami Harness ui-payload/workspace/theme handshake so the harness and Studio UI resolve the same item identity.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["registryId", "namespace", "name", "version"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"registryId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"pattern": "^@?[a-z0-9][a-z0-9.-]*(?:/[a-z0-9][a-z0-9.-]*)?$",
|
|
14
|
+
"default": "@jami-studio/registry",
|
|
15
|
+
"description": "Identifier of the publishing registry. Defaults to the canonical Jami Studio registry."
|
|
16
|
+
},
|
|
17
|
+
"namespace": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"pattern": "^@[a-z0-9][a-z0-9-]*(/[a-z0-9][a-z0-9-]*)?$",
|
|
20
|
+
"default": "@jami-studio/ui",
|
|
21
|
+
"description": "Package namespace the item is published under."
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
26
|
+
"description": "Short item name within the namespace."
|
|
27
|
+
},
|
|
28
|
+
"version": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"description": "Resolved item version."
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$comment": "Vendored copy of the shadcn registry-item.json schema (https://ui.shadcn.com/schema/registry-item.json) so the registry generator can validate the flat /r export offline and deterministically, with no network access in CI or the gate.",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"name": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "The name of the item. This is used to identify the item in the registry. It should be unique for your registry."
|
|
9
|
+
},
|
|
10
|
+
"type": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": [
|
|
13
|
+
"registry:lib",
|
|
14
|
+
"registry:block",
|
|
15
|
+
"registry:component",
|
|
16
|
+
"registry:ui",
|
|
17
|
+
"registry:hook",
|
|
18
|
+
"registry:theme",
|
|
19
|
+
"registry:page",
|
|
20
|
+
"registry:file",
|
|
21
|
+
"registry:style",
|
|
22
|
+
"registry:base",
|
|
23
|
+
"registry:font",
|
|
24
|
+
"registry:item"
|
|
25
|
+
],
|
|
26
|
+
"description": "The type of the item. This is used to determine the type and target path of the item when resolved for a project."
|
|
27
|
+
},
|
|
28
|
+
"description": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "The description of the item. This is used to provide a brief overview of the item."
|
|
31
|
+
},
|
|
32
|
+
"title": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The human-readable title for your registry item. Keep it short and descriptive."
|
|
35
|
+
},
|
|
36
|
+
"author": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "The author of the item. Recommended format: username <url>"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"description": "An array of NPM dependencies required by the registry item.",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"description": "An array of NPM dev dependencies required by the registry item.",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"registryDependencies": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"description": "An array of registry items that this item depends on. Use the name of the item to reference shadcn/ui components and urls to reference other registries.",
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"files": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"description": "The main payload of the registry item. This is an array of files that are part of the registry item. Each file is an object with a path, content, type, and target.",
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"path": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "The path to the file relative to the registry root."
|
|
70
|
+
},
|
|
71
|
+
"content": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "The content of the file."
|
|
74
|
+
},
|
|
75
|
+
"type": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"enum": [
|
|
78
|
+
"registry:lib",
|
|
79
|
+
"registry:block",
|
|
80
|
+
"registry:component",
|
|
81
|
+
"registry:ui",
|
|
82
|
+
"registry:hook",
|
|
83
|
+
"registry:theme",
|
|
84
|
+
"registry:page",
|
|
85
|
+
"registry:file",
|
|
86
|
+
"registry:style",
|
|
87
|
+
"registry:base",
|
|
88
|
+
"registry:item"
|
|
89
|
+
],
|
|
90
|
+
"description": "The type of the file. This is used to determine the type of the file when resolved for a project."
|
|
91
|
+
},
|
|
92
|
+
"target": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "The target path of the file. This is the path to the file in the project. Supports registry target placeholders @components/, @ui/, @lib/, and @hooks/, which resolve to the corresponding aliases configured in components.json. These placeholders are independent of the project's import prefix."
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"if": {
|
|
98
|
+
"properties": {
|
|
99
|
+
"type": {
|
|
100
|
+
"enum": ["registry:file", "registry:page"]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"then": {
|
|
105
|
+
"required": ["path", "type", "target"]
|
|
106
|
+
},
|
|
107
|
+
"else": {
|
|
108
|
+
"required": ["path", "type"]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"tailwind": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"description": "The tailwind configuration for the registry item. This is an object with a config property. Use cssVars for Tailwind v4 projects.",
|
|
115
|
+
"properties": {
|
|
116
|
+
"config": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"properties": {
|
|
119
|
+
"content": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"items": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"theme": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"additionalProperties": true
|
|
128
|
+
},
|
|
129
|
+
"plugins": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "string"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"cssVars": {
|
|
140
|
+
"type": "object",
|
|
141
|
+
"description": "The css variables for the registry item. This will be merged with the project's css variables.",
|
|
142
|
+
"properties": {
|
|
143
|
+
"theme": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"description": "CSS variables for the @theme directive. For Tailwind v4 projects only. Use tailwind for older projects.",
|
|
146
|
+
"additionalProperties": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"light": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"description": "CSS variables for the light theme.",
|
|
153
|
+
"additionalProperties": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"dark": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"description": "CSS variables for the dark theme.",
|
|
160
|
+
"additionalProperties": {
|
|
161
|
+
"type": "string"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"css": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"description": "CSS definitions to be added to the project's CSS file. Supports at-rules, selectors, nested rules, utilities, layers, and more.",
|
|
169
|
+
"additionalProperties": {
|
|
170
|
+
"$ref": "#/definitions/cssValue"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"envVars": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"description": "Environment variables required by the registry item. Key-value pairs that will be added to the project's .env file.",
|
|
176
|
+
"additionalProperties": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"meta": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"description": "Additional metadata for the registry item. This is an object with any key value pairs.",
|
|
183
|
+
"additionalProperties": true
|
|
184
|
+
},
|
|
185
|
+
"docs": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"description": "The documentation for the registry item. This is a markdown string."
|
|
188
|
+
},
|
|
189
|
+
"categories": {
|
|
190
|
+
"type": "array",
|
|
191
|
+
"items": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"description": "The categories of the registry item. This is an array of strings."
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"extends": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"description": "The name of the registry item to extend. This is used to extend the base shadcn/ui style. Set to none to start fresh. This is available for registry:style items only."
|
|
199
|
+
},
|
|
200
|
+
"style": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"description": "The style configuration for the base. This is available for registry:base items only."
|
|
203
|
+
},
|
|
204
|
+
"iconLibrary": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "The icon library to use for the base. This is available for registry:base items only."
|
|
207
|
+
},
|
|
208
|
+
"baseColor": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"description": "The base color configuration. This is available for registry:base items only."
|
|
211
|
+
},
|
|
212
|
+
"theme": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"description": "The theme configuration. This is available for registry:base items only."
|
|
215
|
+
},
|
|
216
|
+
"font": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"description": "Font metadata for registry:font items. Required for registry:font type.",
|
|
219
|
+
"properties": {
|
|
220
|
+
"family": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"description": "The font family name (e.g., 'Inter', 'JetBrains Mono')."
|
|
223
|
+
},
|
|
224
|
+
"provider": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"enum": ["google"],
|
|
227
|
+
"description": "The font provider. Currently only 'google' is supported."
|
|
228
|
+
},
|
|
229
|
+
"import": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"description": "The import name for the font from next/font/google (e.g., 'Inter', 'JetBrains_Mono')."
|
|
232
|
+
},
|
|
233
|
+
"variable": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"description": "The CSS variable name for the font (e.g., '--font-sans', '--font-mono')."
|
|
236
|
+
},
|
|
237
|
+
"weight": {
|
|
238
|
+
"type": "array",
|
|
239
|
+
"items": {
|
|
240
|
+
"type": "string"
|
|
241
|
+
},
|
|
242
|
+
"description": "Array of font weights to include (e.g., ['400', '500', '600', '700'])."
|
|
243
|
+
},
|
|
244
|
+
"subsets": {
|
|
245
|
+
"type": "array",
|
|
246
|
+
"items": {
|
|
247
|
+
"type": "string"
|
|
248
|
+
},
|
|
249
|
+
"description": "Array of font subsets to include (e.g., ['latin', 'latin-ext'])."
|
|
250
|
+
},
|
|
251
|
+
"selector": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"description": "CSS selector to apply the font utility class to (e.g., 'h1, h2, h3'). Defaults to 'html'."
|
|
254
|
+
},
|
|
255
|
+
"dependency": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "The npm package to install for the font in non-Next.js projects (e.g., '@fontsource-variable/inter', '@fontsource/lato')."
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"required": ["family", "provider", "import", "variable"]
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"required": ["name", "type"],
|
|
264
|
+
"allOf": [
|
|
265
|
+
{
|
|
266
|
+
"if": {
|
|
267
|
+
"properties": {
|
|
268
|
+
"type": {
|
|
269
|
+
"const": "registry:font"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"then": {
|
|
274
|
+
"required": ["name", "type", "font"]
|
|
275
|
+
},
|
|
276
|
+
"else": {
|
|
277
|
+
"properties": {
|
|
278
|
+
"font": false
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"if": {
|
|
284
|
+
"not": {
|
|
285
|
+
"properties": {
|
|
286
|
+
"type": {
|
|
287
|
+
"const": "registry:base"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"then": {
|
|
293
|
+
"properties": {
|
|
294
|
+
"style": false,
|
|
295
|
+
"iconLibrary": false,
|
|
296
|
+
"baseColor": false,
|
|
297
|
+
"theme": false
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
"definitions": {
|
|
303
|
+
"cssValue": {
|
|
304
|
+
"oneOf": [
|
|
305
|
+
{
|
|
306
|
+
"type": "string",
|
|
307
|
+
"description": "CSS property value or direct CSS string"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"type": "object",
|
|
311
|
+
"description": "Nested CSS properties, selectors, or at-rules. Empty objects are allowed for at-rules with no body.",
|
|
312
|
+
"additionalProperties": {
|
|
313
|
+
"$ref": "#/definitions/cssValue"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|