Skip to content

Commit 129332c

Browse files
author
deutschmark-sync
committed
sync: from monorepo @ 2b3f943
1 parent 7f74fa2 commit 129332c

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

schema/theme-pack.schema.json

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://github.com/thedeutschmark/toolset-sdk/blob/main/schema/theme-pack.schema.json",
4+
"title": "ThemePack",
5+
"description": "A multi-widget theme. Bundles per-widget entries plus shared metadata so the user can apply one theme to many of their sources in a single click.",
6+
"type": "object",
7+
"required": ["schemaVersion", "kind", "name", "author", "description", "previewHero", "widgets"],
8+
"additionalProperties": false,
9+
"properties": {
10+
"schemaVersion": {
11+
"type": "integer",
12+
"const": 2,
13+
"description": "Schema version. Always 2 for ThemePack."
14+
},
15+
"kind": {
16+
"type": "string",
17+
"const": "theme-pack",
18+
"description": "Artifact kind discriminator."
19+
},
20+
"name": {
21+
"type": "string",
22+
"minLength": 1,
23+
"maxLength": 80
24+
},
25+
"author": {
26+
"type": "string",
27+
"minLength": 1,
28+
"maxLength": 64
29+
},
30+
"description": {
31+
"type": "string",
32+
"minLength": 1,
33+
"maxLength": 200
34+
},
35+
"previewHero": {
36+
"type": "string",
37+
"pattern": "^[^/][^:]*\\.png$",
38+
"description": "Relative path to the hero preview PNG. Required. ≤512KB."
39+
},
40+
"palette": {
41+
"type": "object",
42+
"additionalProperties": false,
43+
"description": "Optional shared palette. Cosmetic only — for catalog swatches.",
44+
"properties": {
45+
"primary": { "type": "string" },
46+
"secondary": { "type": "string" },
47+
"accent": { "type": "string" },
48+
"background": { "type": "string" },
49+
"fontFamily": { "type": "string" }
50+
}
51+
},
52+
"widgets": {
53+
"type": "object",
54+
"minProperties": 1,
55+
"description": "Per-widget entries. Keys must be values from the WidgetType enum.",
56+
"additionalProperties": false,
57+
"patternProperties": {
58+
"^(player|chat-box|death-counter|lurk-peek|emote-rain|shoutout|brb-player|clip-play|stream|event-list|timer)$": {
59+
"type": "object",
60+
"required": ["previewImage", "fields"],
61+
"additionalProperties": false,
62+
"properties": {
63+
"previewImage": {
64+
"type": "string",
65+
"pattern": "^[^/][^:]*\\.png$"
66+
},
67+
"fields": {
68+
"type": "object",
69+
"additionalProperties": {
70+
"oneOf": [
71+
{ "type": "string" },
72+
{ "type": "number" },
73+
{ "type": "boolean" }
74+
]
75+
}
76+
},
77+
"overridesCSS": {
78+
"type": "string",
79+
"pattern": "^[^/][^:]*\\.css$"
80+
}
81+
}
82+
}
83+
}
84+
},
85+
"sharedCSS": {
86+
"type": "string",
87+
"pattern": "^[^/][^:]*\\.css$",
88+
"description": "Optional shared CSS scoped to all widgets in the pack at apply time."
89+
}
90+
}
91+
}

0 commit comments

Comments
 (0)