Skip to content

Commit 0e62b6e

Browse files
authored
Add devup (#5254)
1 parent 44a1d76 commit 0e62b6e

File tree

3 files changed

+904
-0
lines changed

3 files changed

+904
-0
lines changed

src/api/json/catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9088,6 +9088,12 @@
90889088
"description": "Changepacks are a way to package changes to a project",
90899089
"fileMatch": ["**/.changepacks/config.json"],
90909090
"url": "https://www.schemastore.org/changepacks.json"
9091+
},
9092+
{
9093+
"name": "Devup",
9094+
"description": "JSX Zero-Runtime UI Styling Library",
9095+
"fileMatch": ["devup.json"],
9096+
"url": "https://www.schemastore.org/devup.json"
90919097
}
90929098
]
90939099
}

src/schemas/json/devup.json

Lines changed: 304 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,304 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://www.schemastore.org/devup.json",
4+
"$defs": {
5+
"ColorValue": {
6+
"oneOf": [
7+
{
8+
"type": "string"
9+
},
10+
{
11+
"type": "object",
12+
"additionalProperties": {
13+
"$ref": "#/$defs/ColorValue"
14+
}
15+
}
16+
]
17+
},
18+
"ColorTheme": {
19+
"description": "Color theme with color name to value mappings. Supports nested objects for color scales.",
20+
"type": "object",
21+
"additionalProperties": {
22+
"oneOf": [
23+
{
24+
"description": "Color value (e.g., '#000', 'rgb(0,0,0)')",
25+
"type": "string"
26+
},
27+
{
28+
"description": "Nested color object",
29+
"type": "object",
30+
"additionalProperties": {
31+
"$ref": "#/$defs/ColorValue"
32+
}
33+
}
34+
]
35+
}
36+
},
37+
"Theme": {
38+
"type": "object",
39+
"properties": {
40+
"breakpoints": {
41+
"description": "Breakpoints in pixels for responsive typography (default: [0, 480, 768, 992, 1280, 1600])",
42+
"type": "array",
43+
"default": [0, 480, 768, 992, 1280, 1600],
44+
"items": {
45+
"type": "integer",
46+
"maximum": 65535,
47+
"minimum": 0
48+
}
49+
},
50+
"colors": {
51+
"description": "Color themes by mode name (e.g., \"light\", \"dark\")",
52+
"type": "object",
53+
"additionalProperties": {
54+
"$ref": "#/$defs/ColorTheme"
55+
},
56+
"default": {}
57+
},
58+
"typography": {
59+
"description": "Typography definitions by name (e.g., \"h1\", \"body\", \"caption\")",
60+
"type": "object",
61+
"additionalProperties": {
62+
"$ref": "#/$defs/Typographies"
63+
},
64+
"default": {}
65+
}
66+
}
67+
},
68+
"Typographies": {
69+
"description": "Typography definition supporting both traditional array format and compact object format",
70+
"oneOf": [
71+
{
72+
"description": "Traditional array format: array of Typography objects or null for each breakpoint",
73+
"type": "array",
74+
"items": {
75+
"oneOf": [
76+
{
77+
"$ref": "#/$defs/Typography"
78+
},
79+
{
80+
"type": "null"
81+
}
82+
]
83+
}
84+
},
85+
{
86+
"description": "Compact object format: each property can be a single value or array of values per breakpoint",
87+
"type": "object",
88+
"properties": {
89+
"fontFamily": {
90+
"oneOf": [
91+
{
92+
"type": "string"
93+
},
94+
{
95+
"type": "array",
96+
"items": {
97+
"oneOf": [
98+
{
99+
"type": "string"
100+
},
101+
{
102+
"type": "null"
103+
}
104+
]
105+
}
106+
},
107+
{
108+
"type": "null"
109+
}
110+
]
111+
},
112+
"fontSize": {
113+
"oneOf": [
114+
{
115+
"type": "string"
116+
},
117+
{
118+
"type": "array",
119+
"items": {
120+
"oneOf": [
121+
{
122+
"type": "string"
123+
},
124+
{
125+
"type": "null"
126+
}
127+
]
128+
}
129+
},
130+
{
131+
"type": "null"
132+
}
133+
]
134+
},
135+
"fontStyle": {
136+
"oneOf": [
137+
{
138+
"type": "string"
139+
},
140+
{
141+
"type": "array",
142+
"items": {
143+
"oneOf": [
144+
{
145+
"type": "string"
146+
},
147+
{
148+
"type": "null"
149+
}
150+
]
151+
}
152+
},
153+
{
154+
"type": "null"
155+
}
156+
]
157+
},
158+
"fontWeight": {
159+
"oneOf": [
160+
{
161+
"type": "string"
162+
},
163+
{
164+
"type": "number"
165+
},
166+
{
167+
"type": "array",
168+
"items": {
169+
"oneOf": [
170+
{
171+
"type": "string"
172+
},
173+
{
174+
"type": "number"
175+
},
176+
{
177+
"type": "null"
178+
}
179+
]
180+
}
181+
},
182+
{
183+
"type": "null"
184+
}
185+
]
186+
},
187+
"letterSpacing": {
188+
"oneOf": [
189+
{
190+
"type": "string"
191+
},
192+
{
193+
"type": "array",
194+
"items": {
195+
"oneOf": [
196+
{
197+
"type": "string"
198+
},
199+
{
200+
"type": "null"
201+
}
202+
]
203+
}
204+
},
205+
{
206+
"type": "null"
207+
}
208+
]
209+
},
210+
"lineHeight": {
211+
"oneOf": [
212+
{
213+
"type": "string"
214+
},
215+
{
216+
"type": "number"
217+
},
218+
{
219+
"type": "array",
220+
"items": {
221+
"oneOf": [
222+
{
223+
"type": "string"
224+
},
225+
{
226+
"type": "number"
227+
},
228+
{
229+
"type": "null"
230+
}
231+
]
232+
}
233+
},
234+
{
235+
"type": "null"
236+
}
237+
]
238+
}
239+
},
240+
"additionalProperties": false
241+
}
242+
]
243+
},
244+
"Typography": {
245+
"type": "object",
246+
"properties": {
247+
"fontFamily": {
248+
"type": ["string", "null"]
249+
},
250+
"fontSize": {
251+
"type": ["string", "null"]
252+
},
253+
"fontWeight": {
254+
"default": null,
255+
"oneOf": [
256+
{
257+
"type": "string"
258+
},
259+
{
260+
"type": "number"
261+
},
262+
{
263+
"type": "null"
264+
}
265+
]
266+
},
267+
"letterSpacing": {
268+
"type": ["string", "null"]
269+
},
270+
"lineHeight": {
271+
"default": null,
272+
"oneOf": [
273+
{
274+
"type": "string"
275+
},
276+
{
277+
"type": "number"
278+
},
279+
{
280+
"type": "null"
281+
}
282+
]
283+
}
284+
}
285+
}
286+
},
287+
"title": "DevupJson",
288+
"description": "Root devup.json configuration",
289+
"type": "object",
290+
"properties": {
291+
"theme": {
292+
"description": "Theme configuration including colors, typography, and breakpoints",
293+
"anyOf": [
294+
{
295+
"$ref": "#/$defs/Theme"
296+
},
297+
{
298+
"type": "null"
299+
}
300+
],
301+
"default": null
302+
}
303+
}
304+
}

0 commit comments

Comments
 (0)