-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstance.schema.json
More file actions
132 lines (132 loc) · 4.33 KB
/
Copy pathinstance.schema.json
File metadata and controls
132 lines (132 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://zaati-os.dev/schemas/instance.schema.json",
"title": "Zaati OS instance configuration",
"type": "object",
"additionalProperties": false,
"required": [
"brand_name",
"brand_mark",
"tagline",
"timezone",
"locale",
"currency",
"week_starts_on",
"enabled_sources",
"theme",
"storage"
],
"properties": {
"$schema": { "type": "string" },
"brand_name": { "type": "string", "minLength": 1, "maxLength": 40 },
"brand_mark": { "type": "string", "minLength": 1, "maxLength": 3 },
"tagline": { "type": "string", "minLength": 1, "maxLength": 100 },
"timezone": { "type": "string", "minLength": 1, "maxLength": 80 },
"locale": {
"type": "string",
"maxLength": 35,
"pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?(?:-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*$"
},
"currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
"week_starts_on": { "enum": ["monday", "sunday"] },
"enabled_sources": {
"type": "array",
"uniqueItems": true,
"items": { "type": "string", "pattern": "^[a-z0-9-]+:[a-z0-9-]+$" }
},
"experience": {
"type": "object",
"additionalProperties": false,
"required": ["mode", "show_tour"],
"properties": {
"mode": { "enum": ["demo", "private"] },
"show_tour": { "type": "boolean" }
}
},
"theme": {
"type": "object",
"additionalProperties": false,
"required": ["preset", "default_mode", "density", "radius", "font_family", "heading_style", "custom_tokens"],
"properties": {
"preset": { "enum": ["sage", "ocean", "plum", "sand", "custom"] },
"default_mode": { "enum": ["system", "light", "dark"] },
"density": { "enum": ["compact", "comfortable"] },
"radius": { "type": "string", "pattern": "^[0-9]+(?:\\.[0-9]+)?(?:px|rem)$" },
"font_family": { "enum": ["system", "humanist", "editorial", "rounded", "mono"] },
"heading_style": { "enum": ["plain", "compact", "expressive"] },
"custom_tokens": {
"type": "object",
"additionalProperties": false,
"properties": {
"light": { "$ref": "#/$defs/customTokenSet" },
"dark": { "$ref": "#/$defs/customTokenSet" }
}
}
},
"allOf": [
{
"if": { "properties": { "preset": { "const": "custom" } }, "required": ["preset"] },
"then": {
"properties": {
"custom_tokens": {
"type": "object",
"required": ["light", "dark"],
"properties": {
"light": { "$ref": "#/$defs/customTokenSet" },
"dark": { "$ref": "#/$defs/customTokenSet" }
}
}
}
}
}
]
},
"storage": {
"type": "object",
"additionalProperties": false,
"required": ["snapshot_encryption"],
"properties": {
"snapshot_encryption": { "type": "boolean", "default": false }
}
}
},
"$defs": {
"color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" },
"customTokenSet": {
"type": "object",
"additionalProperties": false,
"required": [
"primary",
"primary_foreground",
"accent",
"accent_foreground",
"background",
"foreground",
"card",
"card_foreground",
"border",
"sidebar",
"sidebar_foreground",
"chart_1",
"chart_2",
"chart_3"
],
"properties": {
"primary": { "$ref": "#/$defs/color" },
"primary_foreground": { "$ref": "#/$defs/color" },
"accent": { "$ref": "#/$defs/color" },
"accent_foreground": { "$ref": "#/$defs/color" },
"background": { "$ref": "#/$defs/color" },
"foreground": { "$ref": "#/$defs/color" },
"card": { "$ref": "#/$defs/color" },
"card_foreground": { "$ref": "#/$defs/color" },
"border": { "$ref": "#/$defs/color" },
"sidebar": { "$ref": "#/$defs/color" },
"sidebar_foreground": { "$ref": "#/$defs/color" },
"chart_1": { "$ref": "#/$defs/color" },
"chart_2": { "$ref": "#/$defs/color" },
"chart_3": { "$ref": "#/$defs/color" }
}
}
}
}