-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpattern.schema.json
More file actions
135 lines (135 loc) · 4.13 KB
/
Copy pathpattern.schema.json
File metadata and controls
135 lines (135 loc) · 4.13 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
133
134
135
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://zwhy149.github.io/bead-grid-studio/schemas/pattern.schema.json",
"title": "BeadGridStudioPattern",
"description": "JSON Schema for Bead Grid Studio open pattern exchange format (v1).",
"type": "object",
"required": ["schemaVersion", "type", "version", "grid", "palette"],
"properties": {
"schemaVersion": {
"type": "integer",
"minimum": 1,
"default": 1,
"description": "Schema format version for exchange stability."
},
"type": {
"type": "string",
"const": "bead-grid-studio",
"description": "Application signature."
},
"version": {
"type": "integer",
"minimum": 1,
"maximum": 2,
"description": "Internal project file format version (2 is current; 1 is legacy auto-migrated)."
},
"appVersion": {
"type": "string",
"description": "Version of the software or engine that created the pattern."
},
"title": {
"type": "string",
"maxLength": 80,
"description": "User-facing title of the pattern."
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 creation or export timestamp."
},
"grid": {
"type": "object",
"required": ["cols", "rows", "cells"],
"properties": {
"cols": {
"type": "integer",
"minimum": 4,
"maximum": 160,
"description": "Number of grid columns."
},
"rows": {
"type": "integer",
"minimum": 4,
"maximum": 160,
"description": "Number of grid rows."
},
"cells": {
"type": "array",
"description": "Linear array of cells of length cols * rows. Contains color code string (e.g. 'A1', 'H7') or null for empty cells.",
"items": {
"type": ["string", "null"]
}
}
},
"additionalProperties": false
},
"palette": {
"type": "object",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "Identifier of the palette provider used."
},
"name": {
"type": "string",
"description": "Human-readable palette name."
},
"source": {
"type": "string",
"description": "Provenance or source of palette colors."
}
},
"additionalProperties": true
},
"statistics": {
"type": "object",
"properties": {
"totalBeads": { "type": "integer", "minimum": 0 },
"emptyCells": { "type": "integer", "minimum": 0 },
"usedColors": { "type": "integer", "minimum": 0 },
"density": { "type": "number", "minimum": 0, "maximum": 1 },
"beadCounts": {
"type": "object",
"additionalProperties": { "type": "integer", "minimum": 0 }
},
"colors": {
"type": "array",
"items": {
"type": "object",
"required": ["code", "count"],
"properties": {
"code": { "type": "string" },
"name": { "type": "string" },
"hex": { "type": "string" },
"count": { "type": "integer", "minimum": 0 },
"share": { "type": "number", "minimum": 0, "maximum": 1 }
}
}
}
}
},
"settings": {
"type": "object",
"description": "Optional editor and generation settings persisted with the project.",
"properties": {
"processMode": { "type": "string" },
"fitMode": { "type": "string" },
"whiteMode": { "type": "string" },
"maxColors": { "type": "integer" },
"mergeStrength": { "type": "integer" },
"protectDark": { "type": "boolean" },
"boardProfile": { "type": "string" },
"boardTilesX": { "type": "integer" },
"boardTilesY": { "type": "integer" }
},
"additionalProperties": true
},
"metadata": {
"type": "object",
"description": "Arbitrary user or third-party metadata.",
"additionalProperties": true
}
},
"additionalProperties": false
}