@kumwe/studio-protocol 0.1.0-alpha.2
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/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/guards.d.ts +4 -0
- package/dist/guards.d.ts.map +1 -0
- package/dist/guards.js +288 -0
- package/dist/guards.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas.d.ts +24 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +66 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +989 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +38 -0
- package/schemas/block-definition.schema.json +218 -0
- package/schemas/blueprint.schema.json +236 -0
- package/schemas/command-vector.schema.json +64 -0
- package/schemas/command.schema.json +373 -0
- package/schemas/common.schema.json +222 -0
- package/schemas/content-model.schema.json +216 -0
- package/schemas/entry.schema.json +32 -0
- package/schemas/host-capabilities.schema.json +64 -0
- package/schemas/host-error.schema.json +42 -0
- package/schemas/manifest.json +117 -0
- package/schemas/media-asset.schema.json +83 -0
- package/schemas/media-reference.schema.json +112 -0
- package/schemas/media-upload-session.schema.json +109 -0
- package/schemas/pattern.schema.json +50 -0
- package/schemas/plugin-manifest.schema.json +124 -0
- package/schemas/preview-message.schema.json +226 -0
- package/schemas/provenance.schema.json +57 -0
- package/schemas/rich-text-projection.schema.json +70 -0
- package/schemas/rich-text.schema.json +174 -0
- package/schemas/schema-profile.schema.json +161 -0
- package/schemas/studio-config.schema.json +244 -0
- package/schemas/theme.schema.json +164 -0
- package/schemas/unresolved-contribution.schema.json +48 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/theme.schema.json",
|
|
4
|
+
"title": "Studio theme design profile",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"id",
|
|
11
|
+
"version",
|
|
12
|
+
"revision",
|
|
13
|
+
"owner",
|
|
14
|
+
"label",
|
|
15
|
+
"viewports",
|
|
16
|
+
"designControls",
|
|
17
|
+
"recipes",
|
|
18
|
+
"renderers",
|
|
19
|
+
"blockSupport"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
23
|
+
"kind": { "const": "theme" },
|
|
24
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
25
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
26
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
27
|
+
"owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
|
|
28
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
29
|
+
"description": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
30
|
+
"viewports": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"minItems": 1,
|
|
33
|
+
"maxItems": 20,
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["id", "label", "order", "base", "previewWidth"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"id": { "$ref": "common.schema.json#/$defs/localName" },
|
|
40
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
41
|
+
"order": { "type": "integer", "minimum": 0, "maximum": 1000 },
|
|
42
|
+
"base": { "type": "boolean" },
|
|
43
|
+
"previewWidth": { "type": "integer", "minimum": 240, "maximum": 10000 }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"designControls": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"maxItems": 1000,
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["id", "kind", "label", "choices"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"id": { "$ref": "common.schema.json#/$defs/localName" },
|
|
56
|
+
"kind": {
|
|
57
|
+
"enum": [
|
|
58
|
+
"color-role",
|
|
59
|
+
"typography-role",
|
|
60
|
+
"spacing-role",
|
|
61
|
+
"size-role",
|
|
62
|
+
"radius-role",
|
|
63
|
+
"shadow-role",
|
|
64
|
+
"motion-role",
|
|
65
|
+
"layer-role",
|
|
66
|
+
"enum",
|
|
67
|
+
"boolean",
|
|
68
|
+
"integer"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
72
|
+
"description": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
73
|
+
"choices": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"minItems": 1,
|
|
76
|
+
"maxItems": 500,
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"required": ["id", "label"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"id": { "$ref": "common.schema.json#/$defs/localName" },
|
|
83
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
84
|
+
"deprecated": { "type": "boolean" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"recipes": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"maxItems": 1000,
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["id", "blockType", "label", "designValues"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"id": { "$ref": "common.schema.json#/$defs/localName" },
|
|
100
|
+
"blockType": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
101
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
102
|
+
"designValues": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"maxProperties": 100,
|
|
105
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
|
|
106
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"renderers": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"minItems": 1,
|
|
114
|
+
"maxItems": 100,
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"required": ["id", "version", "surfaces", "exactPreview"],
|
|
119
|
+
"properties": {
|
|
120
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
121
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
122
|
+
"surfaces": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"minItems": 1,
|
|
125
|
+
"maxItems": 20,
|
|
126
|
+
"uniqueItems": true,
|
|
127
|
+
"items": { "enum": ["web", "email", "document", "native", "preview"] }
|
|
128
|
+
},
|
|
129
|
+
"exactPreview": { "type": "boolean" }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"blockSupport": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"maxItems": 5000,
|
|
136
|
+
"items": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["type", "versions", "renderer"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
142
|
+
"versions": { "$ref": "common.schema.json#/$defs/versionRange" },
|
|
143
|
+
"renderer": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"aliases": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"maxItems": 1000,
|
|
150
|
+
"items": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"required": ["kind", "from", "to", "equivalentMeaning"],
|
|
154
|
+
"properties": {
|
|
155
|
+
"kind": { "enum": ["viewport", "design-control", "choice", "recipe"] },
|
|
156
|
+
"from": { "$ref": "common.schema.json#/$defs/localName" },
|
|
157
|
+
"to": { "$ref": "common.schema.json#/$defs/localName" },
|
|
158
|
+
"equivalentMeaning": { "type": "boolean", "const": true }
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/unresolved-contribution.schema.json",
|
|
4
|
+
"title": "Studio unresolved contribution",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["contractVersion", "kind", "reference", "reason"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
10
|
+
"kind": { "const": "unresolved-contribution" },
|
|
11
|
+
"reference": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["contribution", "id", "version"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"contribution": {
|
|
17
|
+
"enum": [
|
|
18
|
+
"block",
|
|
19
|
+
"command",
|
|
20
|
+
"field-adapter",
|
|
21
|
+
"inspector",
|
|
22
|
+
"locale",
|
|
23
|
+
"panel",
|
|
24
|
+
"pattern",
|
|
25
|
+
"renderer-capability",
|
|
26
|
+
"transform"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
30
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"reason": {
|
|
34
|
+
"enum": ["incompatible", "not-installed", "owner-disabled", "owner-revoked"]
|
|
35
|
+
},
|
|
36
|
+
"owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
|
|
37
|
+
"affectedNodes": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"maxItems": 10000,
|
|
40
|
+
"items": { "$ref": "common.schema.json#/$defs/stableId" }
|
|
41
|
+
},
|
|
42
|
+
"diagnostics": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"maxItems": 1000,
|
|
45
|
+
"items": { "$ref": "common.schema.json#/$defs/diagnostic" }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|