@hussmartinez/image-sdk 0.2.0 → 0.4.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/README.md +136 -6
- package/dist/assets/image/render.worker.js +2 -1
- package/dist/element.d.ts +879 -339
- package/dist/element.js +5 -3
- package/dist/element.js.map +1 -1
- package/dist/index.d.ts +825 -180
- package/dist/index.js +76 -11
- package/dist/index.js.map +1 -1
- package/dist/lazy/inline-worker-DsBNkr8Q.js +30 -0
- package/dist/lazy/{inline-worker-Cvw0Gpxf.js.map → inline-worker-DsBNkr8Q.js.map} +1 -1
- package/dist/react.d.ts +977 -341
- package/dist/react.js +1 -1
- package/dist/shared/core-BlFeJWak.js +2612 -0
- package/dist/shared/core-BlFeJWak.js.map +1 -0
- package/dist/shared/editor-Bjv32UmV.js +3817 -0
- package/dist/shared/editor-Bjv32UmV.js.map +1 -0
- package/dist/styles.css +288 -33
- package/formats/hm-image-command/v2.schema.json +266 -0
- package/formats/hm-image-plan/v2.schema.json +877 -0
- package/package.json +4 -4
- package/dist/lazy/inline-worker-Cvw0Gpxf.js +0 -30
- package/dist/shared/core-CAX3GOaj.js +0 -1444
- package/dist/shared/core-CAX3GOaj.js.map +0 -1
- package/dist/shared/editor-DziYqEP3.js +0 -1748
- package/dist/shared/editor-DziYqEP3.js.map +0 -1
|
@@ -0,0 +1,877 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/ie-huss-martinez/image-sdk/blob/main/formats/hm-image-plan/v2.schema.json",
|
|
4
|
+
"title": "hm-image-plan, version 2",
|
|
5
|
+
"description": "An image-sdk plan: one source, its crop, orientation, develop adjustments and filter, the layers over it, the redactions over those, the export's size, and the metadata fields the user keeps (docs/formats/hm-image-plan.md, sdk-core ADR 0045). Positions are whole pixels of the oriented source, which is also the scene that layers and redactions are placed in. An animation arrives in a later version: here animation is null. Beyond this schema, readers check that the base's source and every image layer's are ones the document lists, that their crops fit inside them, that a shape has a fill or a stroke, that no two items share a key, and that layers and redactions together are at most 1,024.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"format",
|
|
9
|
+
"version",
|
|
10
|
+
"sources",
|
|
11
|
+
"base",
|
|
12
|
+
"layers",
|
|
13
|
+
"redactions",
|
|
14
|
+
"animation",
|
|
15
|
+
"output",
|
|
16
|
+
"metadata"
|
|
17
|
+
],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"format": {
|
|
21
|
+
"const": "hm-image-plan"
|
|
22
|
+
},
|
|
23
|
+
"version": {
|
|
24
|
+
"const": 2
|
|
25
|
+
},
|
|
26
|
+
"sources": {
|
|
27
|
+
"description": "The sources by id. The base names one of them.",
|
|
28
|
+
"type": "object",
|
|
29
|
+
"propertyNames": {
|
|
30
|
+
"minLength": 1
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": {
|
|
33
|
+
"$ref": "#/$defs/source"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"base": {
|
|
37
|
+
"$ref": "#/$defs/base"
|
|
38
|
+
},
|
|
39
|
+
"layers": {
|
|
40
|
+
"description": "The layers over the base, bottom to top.",
|
|
41
|
+
"type": "array",
|
|
42
|
+
"maxItems": 1024,
|
|
43
|
+
"items": {
|
|
44
|
+
"$ref": "#/$defs/layer"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"redactions": {
|
|
48
|
+
"description": "The redactions, applied over everything else, in order.",
|
|
49
|
+
"type": "array",
|
|
50
|
+
"maxItems": 1024,
|
|
51
|
+
"items": {
|
|
52
|
+
"$ref": "#/$defs/redaction"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"animation": {
|
|
56
|
+
"description": "The animation. Always null in this version.",
|
|
57
|
+
"type": "null"
|
|
58
|
+
},
|
|
59
|
+
"output": {
|
|
60
|
+
"$ref": "#/$defs/output"
|
|
61
|
+
},
|
|
62
|
+
"metadata": {
|
|
63
|
+
"$ref": "#/$defs/metadata"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"$defs": {
|
|
67
|
+
"pixels": {
|
|
68
|
+
"description": "A whole number of pixels from 0.",
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 0,
|
|
71
|
+
"maximum": 9007199254740991
|
|
72
|
+
},
|
|
73
|
+
"size": {
|
|
74
|
+
"description": "A whole number of pixels from 1.",
|
|
75
|
+
"type": "integer",
|
|
76
|
+
"minimum": 1,
|
|
77
|
+
"maximum": 9007199254740991
|
|
78
|
+
},
|
|
79
|
+
"asset": {
|
|
80
|
+
"description": "A content-addressed reference to a source's bytes. Documents never inline them.",
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["asset", "mediaType", "size"],
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"properties": {
|
|
85
|
+
"asset": {
|
|
86
|
+
"description": "sha256: and the lowercase hex SHA-256 of the bytes.",
|
|
87
|
+
"type": "string",
|
|
88
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
89
|
+
},
|
|
90
|
+
"mediaType": {
|
|
91
|
+
"description": "The bytes' media type, in lowercase.",
|
|
92
|
+
"type": "string",
|
|
93
|
+
"maxLength": 255,
|
|
94
|
+
"pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*/[a-z0-9][a-z0-9!#$&^_.+-]*$"
|
|
95
|
+
},
|
|
96
|
+
"size": {
|
|
97
|
+
"description": "The size of the bytes.",
|
|
98
|
+
"type": "integer",
|
|
99
|
+
"minimum": 0,
|
|
100
|
+
"maximum": 9007199254740991
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"source": {
|
|
105
|
+
"description": "A source's oriented size, after its EXIF orientation, which a crop must fit inside.",
|
|
106
|
+
"type": "object",
|
|
107
|
+
"required": ["width", "height"],
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"properties": {
|
|
110
|
+
"width": {
|
|
111
|
+
"$ref": "#/$defs/size"
|
|
112
|
+
},
|
|
113
|
+
"height": {
|
|
114
|
+
"$ref": "#/$defs/size"
|
|
115
|
+
},
|
|
116
|
+
"asset": {
|
|
117
|
+
"$ref": "#/$defs/asset"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"crop": {
|
|
122
|
+
"description": "A rectangle in whole pixels of the oriented source.",
|
|
123
|
+
"type": "object",
|
|
124
|
+
"required": ["x", "y", "width", "height"],
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"properties": {
|
|
127
|
+
"x": {
|
|
128
|
+
"$ref": "#/$defs/pixels"
|
|
129
|
+
},
|
|
130
|
+
"y": {
|
|
131
|
+
"$ref": "#/$defs/pixels"
|
|
132
|
+
},
|
|
133
|
+
"width": {
|
|
134
|
+
"$ref": "#/$defs/size"
|
|
135
|
+
},
|
|
136
|
+
"height": {
|
|
137
|
+
"$ref": "#/$defs/size"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"orientation": {
|
|
142
|
+
"description": "The plan's rotation, then its flips.",
|
|
143
|
+
"type": "object",
|
|
144
|
+
"required": ["rotate", "flipX", "flipY"],
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"properties": {
|
|
147
|
+
"rotate": {
|
|
148
|
+
"description": "Clockwise, in degrees.",
|
|
149
|
+
"enum": [0, 90, 180, 270]
|
|
150
|
+
},
|
|
151
|
+
"flipX": {
|
|
152
|
+
"type": "boolean"
|
|
153
|
+
},
|
|
154
|
+
"flipY": {
|
|
155
|
+
"type": "boolean"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"level": {
|
|
160
|
+
"description": "A develop adjustment: a whole number from -100 to 100, where 0 is unchanged.",
|
|
161
|
+
"type": "integer",
|
|
162
|
+
"minimum": -100,
|
|
163
|
+
"maximum": 100
|
|
164
|
+
},
|
|
165
|
+
"develop": {
|
|
166
|
+
"description": "Every develop adjustment, in the order they're applied.",
|
|
167
|
+
"type": "object",
|
|
168
|
+
"required": [
|
|
169
|
+
"temperature",
|
|
170
|
+
"tint",
|
|
171
|
+
"exposure",
|
|
172
|
+
"highlights",
|
|
173
|
+
"shadows",
|
|
174
|
+
"contrast",
|
|
175
|
+
"saturation",
|
|
176
|
+
"vibrance"
|
|
177
|
+
],
|
|
178
|
+
"additionalProperties": false,
|
|
179
|
+
"properties": {
|
|
180
|
+
"temperature": {
|
|
181
|
+
"$ref": "#/$defs/level"
|
|
182
|
+
},
|
|
183
|
+
"tint": {
|
|
184
|
+
"$ref": "#/$defs/level"
|
|
185
|
+
},
|
|
186
|
+
"exposure": {
|
|
187
|
+
"$ref": "#/$defs/level"
|
|
188
|
+
},
|
|
189
|
+
"highlights": {
|
|
190
|
+
"$ref": "#/$defs/level"
|
|
191
|
+
},
|
|
192
|
+
"shadows": {
|
|
193
|
+
"$ref": "#/$defs/level"
|
|
194
|
+
},
|
|
195
|
+
"contrast": {
|
|
196
|
+
"$ref": "#/$defs/level"
|
|
197
|
+
},
|
|
198
|
+
"saturation": {
|
|
199
|
+
"$ref": "#/$defs/level"
|
|
200
|
+
},
|
|
201
|
+
"vibrance": {
|
|
202
|
+
"$ref": "#/$defs/level"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"developValues": {
|
|
207
|
+
"description": "Some develop adjustments; the others keep their values.",
|
|
208
|
+
"type": "object",
|
|
209
|
+
"required": [],
|
|
210
|
+
"additionalProperties": false,
|
|
211
|
+
"properties": {
|
|
212
|
+
"temperature": {
|
|
213
|
+
"$ref": "#/$defs/level"
|
|
214
|
+
},
|
|
215
|
+
"tint": {
|
|
216
|
+
"$ref": "#/$defs/level"
|
|
217
|
+
},
|
|
218
|
+
"exposure": {
|
|
219
|
+
"$ref": "#/$defs/level"
|
|
220
|
+
},
|
|
221
|
+
"highlights": {
|
|
222
|
+
"$ref": "#/$defs/level"
|
|
223
|
+
},
|
|
224
|
+
"shadows": {
|
|
225
|
+
"$ref": "#/$defs/level"
|
|
226
|
+
},
|
|
227
|
+
"contrast": {
|
|
228
|
+
"$ref": "#/$defs/level"
|
|
229
|
+
},
|
|
230
|
+
"saturation": {
|
|
231
|
+
"$ref": "#/$defs/level"
|
|
232
|
+
},
|
|
233
|
+
"vibrance": {
|
|
234
|
+
"$ref": "#/$defs/level"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"filter": {
|
|
239
|
+
"description": "A filter preset and its strength, or null for none.",
|
|
240
|
+
"oneOf": [
|
|
241
|
+
{
|
|
242
|
+
"type": "null"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"type": "object",
|
|
246
|
+
"required": ["preset", "strength"],
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"properties": {
|
|
249
|
+
"preset": {
|
|
250
|
+
"enum": ["vivid", "warm", "cool", "fade", "mono", "noir", "sepia"]
|
|
251
|
+
},
|
|
252
|
+
"strength": {
|
|
253
|
+
"type": "integer",
|
|
254
|
+
"minimum": 0,
|
|
255
|
+
"maximum": 100
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
"output": {
|
|
262
|
+
"description": "The export's size: the composition scaled by a factor up to 1, or fitted inside a box without enlarging it. The scale is copied, never computed, so it compares exactly.",
|
|
263
|
+
"oneOf": [
|
|
264
|
+
{
|
|
265
|
+
"type": "object",
|
|
266
|
+
"required": ["kind", "scale"],
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"properties": {
|
|
269
|
+
"kind": {
|
|
270
|
+
"const": "scale"
|
|
271
|
+
},
|
|
272
|
+
"scale": {
|
|
273
|
+
"type": "number",
|
|
274
|
+
"exclusiveMinimum": 0,
|
|
275
|
+
"maximum": 1
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"type": "object",
|
|
281
|
+
"required": ["kind", "width", "height"],
|
|
282
|
+
"additionalProperties": false,
|
|
283
|
+
"properties": {
|
|
284
|
+
"kind": {
|
|
285
|
+
"const": "fit"
|
|
286
|
+
},
|
|
287
|
+
"width": {
|
|
288
|
+
"$ref": "#/$defs/size"
|
|
289
|
+
},
|
|
290
|
+
"height": {
|
|
291
|
+
"$ref": "#/$defs/size"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
"metadataValue": {
|
|
298
|
+
"description": "Text to keep, or empty to keep nothing. Its length is in Unicode code points, as maxLength counts it.",
|
|
299
|
+
"type": "string",
|
|
300
|
+
"maxLength": 2000
|
|
301
|
+
},
|
|
302
|
+
"metadataField": {
|
|
303
|
+
"enum": ["title", "description", "artist", "copyright"]
|
|
304
|
+
},
|
|
305
|
+
"metadata": {
|
|
306
|
+
"description": "The fields the user keeps on export. Never a location.",
|
|
307
|
+
"type": "object",
|
|
308
|
+
"required": ["title", "description", "artist", "copyright"],
|
|
309
|
+
"additionalProperties": false,
|
|
310
|
+
"properties": {
|
|
311
|
+
"title": {
|
|
312
|
+
"$ref": "#/$defs/metadataValue"
|
|
313
|
+
},
|
|
314
|
+
"description": {
|
|
315
|
+
"$ref": "#/$defs/metadataValue"
|
|
316
|
+
},
|
|
317
|
+
"artist": {
|
|
318
|
+
"$ref": "#/$defs/metadataValue"
|
|
319
|
+
},
|
|
320
|
+
"copyright": {
|
|
321
|
+
"$ref": "#/$defs/metadataValue"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"base": {
|
|
326
|
+
"description": "The image being edited.",
|
|
327
|
+
"type": "object",
|
|
328
|
+
"required": ["source", "crop", "orientation", "develop", "filter"],
|
|
329
|
+
"additionalProperties": false,
|
|
330
|
+
"properties": {
|
|
331
|
+
"source": {
|
|
332
|
+
"description": "The id of a source the document lists.",
|
|
333
|
+
"type": "string",
|
|
334
|
+
"minLength": 1
|
|
335
|
+
},
|
|
336
|
+
"crop": {
|
|
337
|
+
"oneOf": [
|
|
338
|
+
{
|
|
339
|
+
"type": "null"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"$ref": "#/$defs/crop"
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
"orientation": {
|
|
347
|
+
"$ref": "#/$defs/orientation"
|
|
348
|
+
},
|
|
349
|
+
"develop": {
|
|
350
|
+
"$ref": "#/$defs/develop"
|
|
351
|
+
},
|
|
352
|
+
"filter": {
|
|
353
|
+
"$ref": "#/$defs/filter"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"key": {
|
|
358
|
+
"description": "An item's identity: any text of 1 to 64 Unicode code points, unique in the document.",
|
|
359
|
+
"type": "string",
|
|
360
|
+
"minLength": 1,
|
|
361
|
+
"maxLength": 64
|
|
362
|
+
},
|
|
363
|
+
"scenePosition": {
|
|
364
|
+
"description": "A position in whole pixels of the scene, which may be outside it.",
|
|
365
|
+
"type": "integer",
|
|
366
|
+
"minimum": -65536,
|
|
367
|
+
"maximum": 65536
|
|
368
|
+
},
|
|
369
|
+
"sceneLength": {
|
|
370
|
+
"description": "A length in whole pixels of the scene.",
|
|
371
|
+
"type": "integer",
|
|
372
|
+
"minimum": 1,
|
|
373
|
+
"maximum": 65536
|
|
374
|
+
},
|
|
375
|
+
"colour": {
|
|
376
|
+
"description": "A colour as #rrggbb, in lower case.",
|
|
377
|
+
"type": "string",
|
|
378
|
+
"pattern": "^#[0-9a-f]{6}$"
|
|
379
|
+
},
|
|
380
|
+
"redactionMode": {
|
|
381
|
+
"enum": ["solid", "pixelate"]
|
|
382
|
+
},
|
|
383
|
+
"redaction": {
|
|
384
|
+
"description": "A region an export doesn't show: a rectangle of the scene, filled with a colour or with coarse blocks.",
|
|
385
|
+
"oneOf": [
|
|
386
|
+
{
|
|
387
|
+
"type": "object",
|
|
388
|
+
"required": ["key", "mode", "x", "y", "width", "height", "colour"],
|
|
389
|
+
"additionalProperties": false,
|
|
390
|
+
"properties": {
|
|
391
|
+
"key": {
|
|
392
|
+
"$ref": "#/$defs/key"
|
|
393
|
+
},
|
|
394
|
+
"x": {
|
|
395
|
+
"$ref": "#/$defs/scenePosition"
|
|
396
|
+
},
|
|
397
|
+
"y": {
|
|
398
|
+
"$ref": "#/$defs/scenePosition"
|
|
399
|
+
},
|
|
400
|
+
"width": {
|
|
401
|
+
"$ref": "#/$defs/sceneLength"
|
|
402
|
+
},
|
|
403
|
+
"height": {
|
|
404
|
+
"$ref": "#/$defs/sceneLength"
|
|
405
|
+
},
|
|
406
|
+
"mode": {
|
|
407
|
+
"const": "solid"
|
|
408
|
+
},
|
|
409
|
+
"colour": {
|
|
410
|
+
"$ref": "#/$defs/colour"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"type": "object",
|
|
416
|
+
"required": ["key", "mode", "x", "y", "width", "height"],
|
|
417
|
+
"additionalProperties": false,
|
|
418
|
+
"properties": {
|
|
419
|
+
"key": {
|
|
420
|
+
"$ref": "#/$defs/key"
|
|
421
|
+
},
|
|
422
|
+
"x": {
|
|
423
|
+
"$ref": "#/$defs/scenePosition"
|
|
424
|
+
},
|
|
425
|
+
"y": {
|
|
426
|
+
"$ref": "#/$defs/scenePosition"
|
|
427
|
+
},
|
|
428
|
+
"width": {
|
|
429
|
+
"$ref": "#/$defs/sceneLength"
|
|
430
|
+
},
|
|
431
|
+
"height": {
|
|
432
|
+
"$ref": "#/$defs/sceneLength"
|
|
433
|
+
},
|
|
434
|
+
"mode": {
|
|
435
|
+
"const": "pixelate"
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
},
|
|
441
|
+
"redactionProps": {
|
|
442
|
+
"description": "Some of a redaction's fields. Beyond this schema, the reducer checks the result: setting mode to pixelate drops the colour, so a colour can't be set on a pixelated redaction, and setting mode to solid needs a colour.",
|
|
443
|
+
"type": "object",
|
|
444
|
+
"additionalProperties": false,
|
|
445
|
+
"properties": {
|
|
446
|
+
"mode": {
|
|
447
|
+
"$ref": "#/$defs/redactionMode"
|
|
448
|
+
},
|
|
449
|
+
"x": {
|
|
450
|
+
"$ref": "#/$defs/scenePosition"
|
|
451
|
+
},
|
|
452
|
+
"y": {
|
|
453
|
+
"$ref": "#/$defs/scenePosition"
|
|
454
|
+
},
|
|
455
|
+
"width": {
|
|
456
|
+
"$ref": "#/$defs/sceneLength"
|
|
457
|
+
},
|
|
458
|
+
"height": {
|
|
459
|
+
"$ref": "#/$defs/sceneLength"
|
|
460
|
+
},
|
|
461
|
+
"colour": {
|
|
462
|
+
"$ref": "#/$defs/colour"
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"keys": {
|
|
467
|
+
"description": "At least one key, none repeated.",
|
|
468
|
+
"type": "array",
|
|
469
|
+
"minItems": 1,
|
|
470
|
+
"uniqueItems": true,
|
|
471
|
+
"items": {
|
|
472
|
+
"$ref": "#/$defs/key"
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"text": {
|
|
476
|
+
"description": "Text with no control character other than a line feed, and no bidirectional embedding, override or isolate control.",
|
|
477
|
+
"type": "string",
|
|
478
|
+
"pattern": "^[^\\u0000-\\u0009\\u000B-\\u001F\\u007F\\u202A-\\u202E\\u2066-\\u2069]*$"
|
|
479
|
+
},
|
|
480
|
+
"opacity": {
|
|
481
|
+
"type": "integer",
|
|
482
|
+
"minimum": 0,
|
|
483
|
+
"maximum": 100
|
|
484
|
+
},
|
|
485
|
+
"rotation": {
|
|
486
|
+
"description": "Tenths of a degree, clockwise about the box's centre.",
|
|
487
|
+
"type": "integer",
|
|
488
|
+
"minimum": 0,
|
|
489
|
+
"maximum": 3599
|
|
490
|
+
},
|
|
491
|
+
"flipX": {
|
|
492
|
+
"description": "Whether the layer is mirrored left to right, about its box's own vertical axis, before it's turned.",
|
|
493
|
+
"type": "boolean"
|
|
494
|
+
},
|
|
495
|
+
"font": {
|
|
496
|
+
"enum": ["sans-serif", "serif", "monospace"]
|
|
497
|
+
},
|
|
498
|
+
"align": {
|
|
499
|
+
"enum": ["start", "center", "end"]
|
|
500
|
+
},
|
|
501
|
+
"shape": {
|
|
502
|
+
"enum": ["rectangle", "ellipse"]
|
|
503
|
+
},
|
|
504
|
+
"stroke": {
|
|
505
|
+
"type": "object",
|
|
506
|
+
"required": ["colour", "width"],
|
|
507
|
+
"additionalProperties": false,
|
|
508
|
+
"properties": {
|
|
509
|
+
"colour": {
|
|
510
|
+
"$ref": "#/$defs/colour"
|
|
511
|
+
},
|
|
512
|
+
"width": {
|
|
513
|
+
"type": "integer",
|
|
514
|
+
"minimum": 1,
|
|
515
|
+
"maximum": 1024
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"layer": {
|
|
520
|
+
"description": "A layer over the base: text, a shape or another image, in a box of the scene turned about its centre.",
|
|
521
|
+
"oneOf": [
|
|
522
|
+
{
|
|
523
|
+
"type": "object",
|
|
524
|
+
"required": [
|
|
525
|
+
"key",
|
|
526
|
+
"kind",
|
|
527
|
+
"name",
|
|
528
|
+
"visible",
|
|
529
|
+
"opacity",
|
|
530
|
+
"x",
|
|
531
|
+
"y",
|
|
532
|
+
"width",
|
|
533
|
+
"height",
|
|
534
|
+
"rotation",
|
|
535
|
+
"flipX",
|
|
536
|
+
"text",
|
|
537
|
+
"font",
|
|
538
|
+
"bold",
|
|
539
|
+
"colour",
|
|
540
|
+
"align"
|
|
541
|
+
],
|
|
542
|
+
"additionalProperties": false,
|
|
543
|
+
"properties": {
|
|
544
|
+
"key": {
|
|
545
|
+
"$ref": "#/$defs/key"
|
|
546
|
+
},
|
|
547
|
+
"name": {
|
|
548
|
+
"allOf": [
|
|
549
|
+
{
|
|
550
|
+
"$ref": "#/$defs/text"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"type": "string",
|
|
554
|
+
"maxLength": 100
|
|
555
|
+
}
|
|
556
|
+
]
|
|
557
|
+
},
|
|
558
|
+
"visible": {
|
|
559
|
+
"type": "boolean"
|
|
560
|
+
},
|
|
561
|
+
"opacity": {
|
|
562
|
+
"$ref": "#/$defs/opacity"
|
|
563
|
+
},
|
|
564
|
+
"x": {
|
|
565
|
+
"$ref": "#/$defs/scenePosition"
|
|
566
|
+
},
|
|
567
|
+
"y": {
|
|
568
|
+
"$ref": "#/$defs/scenePosition"
|
|
569
|
+
},
|
|
570
|
+
"width": {
|
|
571
|
+
"$ref": "#/$defs/sceneLength"
|
|
572
|
+
},
|
|
573
|
+
"height": {
|
|
574
|
+
"$ref": "#/$defs/sceneLength"
|
|
575
|
+
},
|
|
576
|
+
"rotation": {
|
|
577
|
+
"$ref": "#/$defs/rotation"
|
|
578
|
+
},
|
|
579
|
+
"flipX": {
|
|
580
|
+
"$ref": "#/$defs/flipX"
|
|
581
|
+
},
|
|
582
|
+
"kind": {
|
|
583
|
+
"const": "text"
|
|
584
|
+
},
|
|
585
|
+
"text": {
|
|
586
|
+
"allOf": [
|
|
587
|
+
{
|
|
588
|
+
"$ref": "#/$defs/text"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"type": "string",
|
|
592
|
+
"maxLength": 1000
|
|
593
|
+
}
|
|
594
|
+
]
|
|
595
|
+
},
|
|
596
|
+
"font": {
|
|
597
|
+
"$ref": "#/$defs/font"
|
|
598
|
+
},
|
|
599
|
+
"bold": {
|
|
600
|
+
"type": "boolean"
|
|
601
|
+
},
|
|
602
|
+
"colour": {
|
|
603
|
+
"$ref": "#/$defs/colour"
|
|
604
|
+
},
|
|
605
|
+
"align": {
|
|
606
|
+
"$ref": "#/$defs/align"
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"type": "object",
|
|
612
|
+
"required": [
|
|
613
|
+
"key",
|
|
614
|
+
"kind",
|
|
615
|
+
"name",
|
|
616
|
+
"visible",
|
|
617
|
+
"opacity",
|
|
618
|
+
"x",
|
|
619
|
+
"y",
|
|
620
|
+
"width",
|
|
621
|
+
"height",
|
|
622
|
+
"rotation",
|
|
623
|
+
"flipX",
|
|
624
|
+
"shape",
|
|
625
|
+
"fill",
|
|
626
|
+
"stroke"
|
|
627
|
+
],
|
|
628
|
+
"additionalProperties": false,
|
|
629
|
+
"properties": {
|
|
630
|
+
"key": {
|
|
631
|
+
"$ref": "#/$defs/key"
|
|
632
|
+
},
|
|
633
|
+
"name": {
|
|
634
|
+
"allOf": [
|
|
635
|
+
{
|
|
636
|
+
"$ref": "#/$defs/text"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"type": "string",
|
|
640
|
+
"maxLength": 100
|
|
641
|
+
}
|
|
642
|
+
]
|
|
643
|
+
},
|
|
644
|
+
"visible": {
|
|
645
|
+
"type": "boolean"
|
|
646
|
+
},
|
|
647
|
+
"opacity": {
|
|
648
|
+
"$ref": "#/$defs/opacity"
|
|
649
|
+
},
|
|
650
|
+
"x": {
|
|
651
|
+
"$ref": "#/$defs/scenePosition"
|
|
652
|
+
},
|
|
653
|
+
"y": {
|
|
654
|
+
"$ref": "#/$defs/scenePosition"
|
|
655
|
+
},
|
|
656
|
+
"width": {
|
|
657
|
+
"$ref": "#/$defs/sceneLength"
|
|
658
|
+
},
|
|
659
|
+
"height": {
|
|
660
|
+
"$ref": "#/$defs/sceneLength"
|
|
661
|
+
},
|
|
662
|
+
"rotation": {
|
|
663
|
+
"$ref": "#/$defs/rotation"
|
|
664
|
+
},
|
|
665
|
+
"flipX": {
|
|
666
|
+
"$ref": "#/$defs/flipX"
|
|
667
|
+
},
|
|
668
|
+
"kind": {
|
|
669
|
+
"const": "shape"
|
|
670
|
+
},
|
|
671
|
+
"shape": {
|
|
672
|
+
"$ref": "#/$defs/shape"
|
|
673
|
+
},
|
|
674
|
+
"fill": {
|
|
675
|
+
"oneOf": [
|
|
676
|
+
{
|
|
677
|
+
"type": "null"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"$ref": "#/$defs/colour"
|
|
681
|
+
}
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
"stroke": {
|
|
685
|
+
"oneOf": [
|
|
686
|
+
{
|
|
687
|
+
"type": "null"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"$ref": "#/$defs/stroke"
|
|
691
|
+
}
|
|
692
|
+
]
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"type": "object",
|
|
698
|
+
"required": [
|
|
699
|
+
"key",
|
|
700
|
+
"kind",
|
|
701
|
+
"name",
|
|
702
|
+
"visible",
|
|
703
|
+
"opacity",
|
|
704
|
+
"x",
|
|
705
|
+
"y",
|
|
706
|
+
"width",
|
|
707
|
+
"height",
|
|
708
|
+
"rotation",
|
|
709
|
+
"flipX",
|
|
710
|
+
"source",
|
|
711
|
+
"crop"
|
|
712
|
+
],
|
|
713
|
+
"additionalProperties": false,
|
|
714
|
+
"properties": {
|
|
715
|
+
"key": {
|
|
716
|
+
"$ref": "#/$defs/key"
|
|
717
|
+
},
|
|
718
|
+
"name": {
|
|
719
|
+
"allOf": [
|
|
720
|
+
{
|
|
721
|
+
"$ref": "#/$defs/text"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"type": "string",
|
|
725
|
+
"maxLength": 100
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
},
|
|
729
|
+
"visible": {
|
|
730
|
+
"type": "boolean"
|
|
731
|
+
},
|
|
732
|
+
"opacity": {
|
|
733
|
+
"$ref": "#/$defs/opacity"
|
|
734
|
+
},
|
|
735
|
+
"x": {
|
|
736
|
+
"$ref": "#/$defs/scenePosition"
|
|
737
|
+
},
|
|
738
|
+
"y": {
|
|
739
|
+
"$ref": "#/$defs/scenePosition"
|
|
740
|
+
},
|
|
741
|
+
"width": {
|
|
742
|
+
"$ref": "#/$defs/sceneLength"
|
|
743
|
+
},
|
|
744
|
+
"height": {
|
|
745
|
+
"$ref": "#/$defs/sceneLength"
|
|
746
|
+
},
|
|
747
|
+
"rotation": {
|
|
748
|
+
"$ref": "#/$defs/rotation"
|
|
749
|
+
},
|
|
750
|
+
"flipX": {
|
|
751
|
+
"$ref": "#/$defs/flipX"
|
|
752
|
+
},
|
|
753
|
+
"kind": {
|
|
754
|
+
"const": "image"
|
|
755
|
+
},
|
|
756
|
+
"source": {
|
|
757
|
+
"type": "string",
|
|
758
|
+
"minLength": 1
|
|
759
|
+
},
|
|
760
|
+
"crop": {
|
|
761
|
+
"oneOf": [
|
|
762
|
+
{
|
|
763
|
+
"type": "null"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"$ref": "#/$defs/crop"
|
|
767
|
+
}
|
|
768
|
+
]
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
]
|
|
773
|
+
},
|
|
774
|
+
"layerProps": {
|
|
775
|
+
"description": "Some of a layer's fields: any but its key and its kind. Beyond this schema, the reducer checks that each field is one the layer's kind has, and the layer that results.",
|
|
776
|
+
"type": "object",
|
|
777
|
+
"additionalProperties": false,
|
|
778
|
+
"properties": {
|
|
779
|
+
"name": {
|
|
780
|
+
"allOf": [
|
|
781
|
+
{
|
|
782
|
+
"$ref": "#/$defs/text"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"type": "string",
|
|
786
|
+
"maxLength": 100
|
|
787
|
+
}
|
|
788
|
+
]
|
|
789
|
+
},
|
|
790
|
+
"visible": {
|
|
791
|
+
"type": "boolean"
|
|
792
|
+
},
|
|
793
|
+
"opacity": {
|
|
794
|
+
"$ref": "#/$defs/opacity"
|
|
795
|
+
},
|
|
796
|
+
"x": {
|
|
797
|
+
"$ref": "#/$defs/scenePosition"
|
|
798
|
+
},
|
|
799
|
+
"y": {
|
|
800
|
+
"$ref": "#/$defs/scenePosition"
|
|
801
|
+
},
|
|
802
|
+
"width": {
|
|
803
|
+
"$ref": "#/$defs/sceneLength"
|
|
804
|
+
},
|
|
805
|
+
"height": {
|
|
806
|
+
"$ref": "#/$defs/sceneLength"
|
|
807
|
+
},
|
|
808
|
+
"rotation": {
|
|
809
|
+
"$ref": "#/$defs/rotation"
|
|
810
|
+
},
|
|
811
|
+
"flipX": {
|
|
812
|
+
"$ref": "#/$defs/flipX"
|
|
813
|
+
},
|
|
814
|
+
"text": {
|
|
815
|
+
"allOf": [
|
|
816
|
+
{
|
|
817
|
+
"$ref": "#/$defs/text"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"type": "string",
|
|
821
|
+
"maxLength": 1000
|
|
822
|
+
}
|
|
823
|
+
]
|
|
824
|
+
},
|
|
825
|
+
"font": {
|
|
826
|
+
"$ref": "#/$defs/font"
|
|
827
|
+
},
|
|
828
|
+
"bold": {
|
|
829
|
+
"type": "boolean"
|
|
830
|
+
},
|
|
831
|
+
"colour": {
|
|
832
|
+
"$ref": "#/$defs/colour"
|
|
833
|
+
},
|
|
834
|
+
"align": {
|
|
835
|
+
"$ref": "#/$defs/align"
|
|
836
|
+
},
|
|
837
|
+
"shape": {
|
|
838
|
+
"$ref": "#/$defs/shape"
|
|
839
|
+
},
|
|
840
|
+
"fill": {
|
|
841
|
+
"oneOf": [
|
|
842
|
+
{
|
|
843
|
+
"type": "null"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"$ref": "#/$defs/colour"
|
|
847
|
+
}
|
|
848
|
+
]
|
|
849
|
+
},
|
|
850
|
+
"stroke": {
|
|
851
|
+
"oneOf": [
|
|
852
|
+
{
|
|
853
|
+
"type": "null"
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"$ref": "#/$defs/stroke"
|
|
857
|
+
}
|
|
858
|
+
]
|
|
859
|
+
},
|
|
860
|
+
"source": {
|
|
861
|
+
"type": "string",
|
|
862
|
+
"minLength": 1
|
|
863
|
+
},
|
|
864
|
+
"crop": {
|
|
865
|
+
"oneOf": [
|
|
866
|
+
{
|
|
867
|
+
"type": "null"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"$ref": "#/$defs/crop"
|
|
871
|
+
}
|
|
872
|
+
]
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|