textmode.export.js 1.9.0-beta.2 → 1.9.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 +1 -5
- package/dist/textmode.export.esm.js +1 -1
- package/dist/textmode.export.umd.js +1 -1
- package/dist/types/exporters/base/LayerTarget.d.ts +1 -1
- package/dist/types/exporters/json/JSONExporter.d.ts +2 -1
- package/dist/types/exporters/json/index.d.ts +1 -2
- package/dist/types/exporters/json/types.d.ts +10 -5
- package/dist/types/index.d.ts +1 -3
- package/dist/types/types.d.ts +7 -4
- package/package.json +5 -38
- package/dist/textmode.document.esm.js +0 -1
- package/dist/types/document/constants.d.ts +0 -32
- package/dist/types/document/decode-shapes.d.ts +0 -4
- package/dist/types/document/decode.d.ts +0 -5
- package/dist/types/document/index.d.ts +0 -13
- package/dist/types/document/parse.d.ts +0 -3
- package/dist/types/document/types.d.ts +0 -209
- package/dist/types/document/validation.d.ts +0 -37
- package/protocol/textmode-document/2.0/SPECIFICATION.md +0 -233
- package/protocol/textmode-document/2.0/fixture.d.ts +0 -3
- package/protocol/textmode-document/2.0/fixtures/textmode-document-all-v2.json +0 -94
- package/protocol/textmode-document/2.0/fixtures/textmode-document-create-integration-v2.json +0 -112
- package/protocol/textmode-document/2.0/fixtures/textmode-document-selected-v2.json +0 -86
- package/protocol/textmode-document/2.0/fixtures/textmode-layer-all-v1.1.json +0 -46
- package/protocol/textmode-document/2.0/fixtures/textmode-layer-selected-v1.json +0 -38
- package/protocol/textmode-document/2.0/textmode-document-2.0.schema.d.ts +0 -3
- package/protocol/textmode-document/2.0/textmode-document-2.0.schema.json +0 -171
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://textmode.art/schemas/textmode-document-2.0.schema.json",
|
|
4
|
-
"title": "Textmode document 2.0",
|
|
5
|
-
"description": "Editable textmode cell snapshots and layer stacks.",
|
|
6
|
-
"oneOf": [{ "$ref": "#/$defs/selectedDocument" }, { "$ref": "#/$defs/allDocument" }],
|
|
7
|
-
"$defs": {
|
|
8
|
-
"positiveSafeInteger": {
|
|
9
|
-
"type": "integer",
|
|
10
|
-
"minimum": 1,
|
|
11
|
-
"maximum": 9007199254740991
|
|
12
|
-
},
|
|
13
|
-
"canvas": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"required": ["width", "height"],
|
|
16
|
-
"properties": {
|
|
17
|
-
"width": { "$ref": "#/$defs/positiveSafeInteger" },
|
|
18
|
-
"height": { "$ref": "#/$defs/positiveSafeInteger" }
|
|
19
|
-
},
|
|
20
|
-
"additionalProperties": true
|
|
21
|
-
},
|
|
22
|
-
"grid": {
|
|
23
|
-
"type": "object",
|
|
24
|
-
"required": ["cols", "rows", "cellWidth", "cellHeight"],
|
|
25
|
-
"properties": {
|
|
26
|
-
"cols": { "$ref": "#/$defs/positiveSafeInteger" },
|
|
27
|
-
"rows": { "$ref": "#/$defs/positiveSafeInteger" },
|
|
28
|
-
"cellWidth": { "$ref": "#/$defs/positiveSafeInteger" },
|
|
29
|
-
"cellHeight": { "$ref": "#/$defs/positiveSafeInteger" }
|
|
30
|
-
},
|
|
31
|
-
"additionalProperties": true
|
|
32
|
-
},
|
|
33
|
-
"rgba": {
|
|
34
|
-
"type": "object",
|
|
35
|
-
"required": ["r", "g", "b", "a"],
|
|
36
|
-
"properties": {
|
|
37
|
-
"r": { "type": "integer", "minimum": 0, "maximum": 255 },
|
|
38
|
-
"g": { "type": "integer", "minimum": 0, "maximum": 255 },
|
|
39
|
-
"b": { "type": "integer", "minimum": 0, "maximum": 255 },
|
|
40
|
-
"a": { "type": "integer", "minimum": 0, "maximum": 255 }
|
|
41
|
-
},
|
|
42
|
-
"additionalProperties": true
|
|
43
|
-
},
|
|
44
|
-
"color": {
|
|
45
|
-
"oneOf": [
|
|
46
|
-
{ "type": "string", "pattern": "^#[0-9A-Fa-f]{6}(?:[0-9A-Fa-f]{2})?$" },
|
|
47
|
-
{ "$ref": "#/$defs/rgba" }
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"transform": {
|
|
51
|
-
"type": "object",
|
|
52
|
-
"required": ["invert", "flipX", "flipY", "rotation"],
|
|
53
|
-
"properties": {
|
|
54
|
-
"invert": { "type": "boolean" },
|
|
55
|
-
"flipX": { "type": "boolean" },
|
|
56
|
-
"flipY": { "type": "boolean" },
|
|
57
|
-
"rotation": { "type": "number" }
|
|
58
|
-
},
|
|
59
|
-
"additionalProperties": true
|
|
60
|
-
},
|
|
61
|
-
"cell": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"required": ["x", "y", "character", "foreground", "background", "transform"],
|
|
64
|
-
"properties": {
|
|
65
|
-
"x": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
66
|
-
"y": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
67
|
-
"character": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"minLength": 1,
|
|
70
|
-
"maxLength": 64
|
|
71
|
-
},
|
|
72
|
-
"foreground": { "$ref": "#/$defs/color" },
|
|
73
|
-
"background": { "$ref": "#/$defs/color" },
|
|
74
|
-
"transform": { "$ref": "#/$defs/transform" }
|
|
75
|
-
},
|
|
76
|
-
"additionalProperties": true
|
|
77
|
-
},
|
|
78
|
-
"cells": {
|
|
79
|
-
"type": "object",
|
|
80
|
-
"required": ["encoding", "rows"],
|
|
81
|
-
"properties": {
|
|
82
|
-
"encoding": { "const": "object-rows-v1" },
|
|
83
|
-
"rows": {
|
|
84
|
-
"type": "array",
|
|
85
|
-
"items": {
|
|
86
|
-
"type": "array",
|
|
87
|
-
"items": { "$ref": "#/$defs/cell" }
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"additionalProperties": true
|
|
92
|
-
},
|
|
93
|
-
"metadata": {
|
|
94
|
-
"type": "object",
|
|
95
|
-
"required": ["createdAt", "generator"],
|
|
96
|
-
"properties": {
|
|
97
|
-
"createdAt": {
|
|
98
|
-
"type": "string",
|
|
99
|
-
"format": "date-time",
|
|
100
|
-
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$"
|
|
101
|
-
},
|
|
102
|
-
"generator": {
|
|
103
|
-
"type": "object",
|
|
104
|
-
"required": ["name", "version"],
|
|
105
|
-
"properties": {
|
|
106
|
-
"name": { "type": "string", "minLength": 1 },
|
|
107
|
-
"version": { "type": "string", "minLength": 1 }
|
|
108
|
-
},
|
|
109
|
-
"additionalProperties": true
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
"additionalProperties": true
|
|
113
|
-
},
|
|
114
|
-
"selectedLayer": {
|
|
115
|
-
"type": "object",
|
|
116
|
-
"required": ["id", "cells"],
|
|
117
|
-
"properties": {
|
|
118
|
-
"id": { "type": "string", "minLength": 1 },
|
|
119
|
-
"cells": { "$ref": "#/$defs/cells" }
|
|
120
|
-
},
|
|
121
|
-
"additionalProperties": true
|
|
122
|
-
},
|
|
123
|
-
"stackLayer": {
|
|
124
|
-
"type": "object",
|
|
125
|
-
"required": ["id", "visible", "opacity", "blendMode", "offsetX", "offsetY", "rotationZ", "grid", "cells"],
|
|
126
|
-
"properties": {
|
|
127
|
-
"id": { "type": "string", "minLength": 1 },
|
|
128
|
-
"visible": { "type": "boolean" },
|
|
129
|
-
"opacity": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
130
|
-
"blendMode": { "type": "string", "minLength": 1 },
|
|
131
|
-
"offsetX": { "type": "number" },
|
|
132
|
-
"offsetY": { "type": "number" },
|
|
133
|
-
"rotationZ": { "type": "number" },
|
|
134
|
-
"grid": { "$ref": "#/$defs/grid" },
|
|
135
|
-
"cells": { "$ref": "#/$defs/cells" }
|
|
136
|
-
},
|
|
137
|
-
"additionalProperties": true
|
|
138
|
-
},
|
|
139
|
-
"selectedDocument": {
|
|
140
|
-
"type": "object",
|
|
141
|
-
"required": ["format", "formatVersion", "target", "canvas", "grid", "layer"],
|
|
142
|
-
"properties": {
|
|
143
|
-
"format": { "const": "textmode.document" },
|
|
144
|
-
"formatVersion": { "const": "2.0.0" },
|
|
145
|
-
"target": { "const": "selected" },
|
|
146
|
-
"metadata": { "$ref": "#/$defs/metadata" },
|
|
147
|
-
"canvas": { "$ref": "#/$defs/canvas" },
|
|
148
|
-
"grid": { "$ref": "#/$defs/grid" },
|
|
149
|
-
"layer": { "$ref": "#/$defs/selectedLayer" }
|
|
150
|
-
},
|
|
151
|
-
"additionalProperties": true
|
|
152
|
-
},
|
|
153
|
-
"allDocument": {
|
|
154
|
-
"type": "object",
|
|
155
|
-
"required": ["format", "formatVersion", "target", "canvas", "layers"],
|
|
156
|
-
"properties": {
|
|
157
|
-
"format": { "const": "textmode.document" },
|
|
158
|
-
"formatVersion": { "const": "2.0.0" },
|
|
159
|
-
"target": { "const": "all" },
|
|
160
|
-
"metadata": { "$ref": "#/$defs/metadata" },
|
|
161
|
-
"canvas": { "$ref": "#/$defs/canvas" },
|
|
162
|
-
"layers": {
|
|
163
|
-
"type": "array",
|
|
164
|
-
"minItems": 1,
|
|
165
|
-
"items": { "$ref": "#/$defs/stackLayer" }
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
"additionalProperties": true
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|