@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,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/media-upload-session.schema.json",
|
|
4
|
+
"title": "Studio media upload session",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["contractVersion", "kind", "id", "request", "state", "progress"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
10
|
+
"kind": { "const": "media-upload-session" },
|
|
11
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
12
|
+
"request": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["filename", "mediaType", "byteSize", "purpose"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"filename": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"maxLength": 255,
|
|
21
|
+
"pattern": "^[^\\u0000-\\u001F\\u007F/\\\\]+(?![\\s\\S])"
|
|
22
|
+
},
|
|
23
|
+
"mediaType": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*/[a-z0-9][a-z0-9!#$&^_.+-]*(?![\\s\\S])",
|
|
26
|
+
"maxLength": 120
|
|
27
|
+
},
|
|
28
|
+
"byteSize": { "type": "integer", "minimum": 1, "maximum": 1099511627776 },
|
|
29
|
+
"purpose": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
30
|
+
"checksum": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"plan": { "$ref": "#/$defs/plan" },
|
|
34
|
+
"state": {
|
|
35
|
+
"enum": [
|
|
36
|
+
"requested",
|
|
37
|
+
"authorized",
|
|
38
|
+
"transferring",
|
|
39
|
+
"verifying",
|
|
40
|
+
"complete",
|
|
41
|
+
"failed",
|
|
42
|
+
"cancelled"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"progress": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["transferredBytes", "totalBytes"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"transferredBytes": { "type": "integer", "minimum": 0, "maximum": 1099511627776 },
|
|
51
|
+
"totalBytes": { "type": "integer", "minimum": 0, "maximum": 1099511627776 }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"asset": { "$ref": "#/$defs/acceptedAsset" },
|
|
55
|
+
"failure": { "$ref": "common.schema.json#/$defs/diagnostic" }
|
|
56
|
+
},
|
|
57
|
+
"allOf": [
|
|
58
|
+
{
|
|
59
|
+
"if": { "properties": { "state": { "const": "complete" } }, "required": ["state"] },
|
|
60
|
+
"then": {
|
|
61
|
+
"properties": { "asset": { "$ref": "#/$defs/acceptedAsset" } },
|
|
62
|
+
"required": ["asset"]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"if": { "properties": { "state": { "const": "failed" } }, "required": ["state"] },
|
|
67
|
+
"then": {
|
|
68
|
+
"properties": { "failure": { "$ref": "common.schema.json#/$defs/diagnostic" } },
|
|
69
|
+
"required": ["failure"]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"if": {
|
|
74
|
+
"properties": { "state": { "enum": ["authorized", "transferring", "verifying"] } },
|
|
75
|
+
"required": ["state"]
|
|
76
|
+
},
|
|
77
|
+
"then": {
|
|
78
|
+
"properties": { "plan": { "$ref": "#/$defs/plan" } },
|
|
79
|
+
"required": ["plan"]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"if": { "properties": { "state": { "const": "requested" } }, "required": ["state"] },
|
|
84
|
+
"then": { "not": { "required": ["asset"] } }
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"$defs": {
|
|
88
|
+
"acceptedAsset": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["id", "revision", "state"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
94
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
95
|
+
"state": { "enum": ["processing", "ready", "rejected", "quarantined"] }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"plan": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"required": ["maximumBytes", "resumable"],
|
|
102
|
+
"properties": {
|
|
103
|
+
"maximumBytes": { "type": "integer", "minimum": 1, "maximum": 1099511627776 },
|
|
104
|
+
"chunkBytes": { "type": "integer", "minimum": 1024, "maximum": 1073741824 },
|
|
105
|
+
"resumable": { "type": "boolean" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/pattern.schema.json",
|
|
4
|
+
"title": "Studio composition pattern",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"id",
|
|
11
|
+
"version",
|
|
12
|
+
"revision",
|
|
13
|
+
"owner",
|
|
14
|
+
"label",
|
|
15
|
+
"blockDependencies",
|
|
16
|
+
"roots"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
20
|
+
"kind": { "const": "pattern" },
|
|
21
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
22
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
23
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
24
|
+
"owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
|
|
25
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
26
|
+
"description": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
27
|
+
"blockDependencies": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"maxItems": 200,
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["type", "version", "revision"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
36
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
37
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
38
|
+
"integrity": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"roots": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"minItems": 1,
|
|
45
|
+
"maxItems": 100,
|
|
46
|
+
"items": { "$ref": "blueprint.schema.json#/$defs/node" }
|
|
47
|
+
},
|
|
48
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/plugin-manifest.schema.json",
|
|
4
|
+
"title": "Studio plugin manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"id",
|
|
11
|
+
"version",
|
|
12
|
+
"owner",
|
|
13
|
+
"label",
|
|
14
|
+
"activation",
|
|
15
|
+
"entryModules",
|
|
16
|
+
"contributions",
|
|
17
|
+
"requiredCapabilities",
|
|
18
|
+
"optionalCapabilities",
|
|
19
|
+
"dependencies",
|
|
20
|
+
"permissions"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
24
|
+
"kind": { "const": "plugin-manifest" },
|
|
25
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
26
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
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
|
+
"activation": { "enum": ["declarative", "executable"] },
|
|
31
|
+
"entryModules": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"maxItems": 10,
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["realm", "path", "integrity"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"realm": { "enum": ["application", "worker", "sandboxed-frame"] },
|
|
40
|
+
"path": { "$ref": "common.schema.json#/$defs/packageRelativePath" },
|
|
41
|
+
"integrity": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"contributions": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"maxItems": 5000,
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": ["kind", "id", "version", "resource", "integrity"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"kind": {
|
|
54
|
+
"enum": [
|
|
55
|
+
"block",
|
|
56
|
+
"pattern",
|
|
57
|
+
"panel",
|
|
58
|
+
"inspector",
|
|
59
|
+
"command",
|
|
60
|
+
"field-adapter",
|
|
61
|
+
"transform",
|
|
62
|
+
"locale",
|
|
63
|
+
"renderer-capability",
|
|
64
|
+
"test-fixture"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
68
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
69
|
+
"resource": { "$ref": "common.schema.json#/$defs/packageRelativePath" },
|
|
70
|
+
"integrity": { "$ref": "common.schema.json#/$defs/integrity" },
|
|
71
|
+
"executable": { "type": "boolean", "default": false }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"requiredCapabilities": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"maxItems": 100,
|
|
78
|
+
"items": { "$ref": "#/$defs/capabilityRequirement" }
|
|
79
|
+
},
|
|
80
|
+
"optionalCapabilities": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"maxItems": 100,
|
|
83
|
+
"items": { "$ref": "#/$defs/capabilityRequirement" }
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"maxItems": 100,
|
|
88
|
+
"items": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["id", "versions", "optional"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
94
|
+
"versions": { "$ref": "common.schema.json#/$defs/versionRange" },
|
|
95
|
+
"optional": { "type": "boolean" }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"permissions": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"maxItems": 100,
|
|
102
|
+
"uniqueItems": true,
|
|
103
|
+
"items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
104
|
+
},
|
|
105
|
+
"locales": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"maxItems": 100,
|
|
108
|
+
"uniqueItems": true,
|
|
109
|
+
"items": { "$ref": "common.schema.json#/$defs/locale" }
|
|
110
|
+
},
|
|
111
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
112
|
+
},
|
|
113
|
+
"$defs": {
|
|
114
|
+
"capabilityRequirement": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"required": ["id", "versions"],
|
|
118
|
+
"properties": {
|
|
119
|
+
"id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
120
|
+
"versions": { "$ref": "common.schema.json#/$defs/versionRange" }
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/preview-message.schema.json",
|
|
4
|
+
"title": "Studio preview channel message",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"channelId",
|
|
11
|
+
"sessionGeneration",
|
|
12
|
+
"sequence",
|
|
13
|
+
"type",
|
|
14
|
+
"payload"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
18
|
+
"kind": { "const": "preview-message" },
|
|
19
|
+
"channelId": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
20
|
+
"sessionGeneration": { "$ref": "common.schema.json#/$defs/revision" },
|
|
21
|
+
"sequence": { "type": "integer", "minimum": 0 },
|
|
22
|
+
"type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
23
|
+
"payload": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"maxProperties": 1000,
|
|
26
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
|
|
27
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"allOf": [
|
|
31
|
+
{
|
|
32
|
+
"if": { "properties": { "type": { "const": "studio.preview/ready" } } },
|
|
33
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/ready" } } }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"if": { "properties": { "type": { "const": "studio.preview/render" } } },
|
|
37
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/render" } } }
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"if": { "properties": { "type": { "const": "studio.preview/rendered" } } },
|
|
41
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/rendered" } } }
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"if": { "properties": { "type": { "const": "studio.preview/select" } } },
|
|
45
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/select" } } }
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"if": { "properties": { "type": { "const": "studio.preview/measure" } } },
|
|
49
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/measure" } } }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"if": { "properties": { "type": { "const": "studio.preview/measurements" } } },
|
|
53
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/measurements" } } }
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"if": { "properties": { "type": { "const": "studio.preview/error" } } },
|
|
57
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/error" } } }
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"if": { "properties": { "type": { "const": "studio.preview/reload" } } },
|
|
61
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/reload" } } }
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"if": { "properties": { "type": { "const": "studio.preview/teardown" } } },
|
|
65
|
+
"then": { "properties": { "payload": { "$ref": "#/$defs/teardown" } } }
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"$defs": {
|
|
69
|
+
"ready": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["protocolVersion", "renderer", "viewports"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"protocolVersion": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
75
|
+
"renderer": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
76
|
+
"viewports": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"maxItems": 20,
|
|
79
|
+
"items": { "$ref": "common.schema.json#/$defs/localName" }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"render": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": ["artifactId", "draftDigest", "viewport"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"artifactId": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
89
|
+
"draftDigest": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"pattern": "^[a-f0-9]{64}(?![\\s\\S])"
|
|
92
|
+
},
|
|
93
|
+
"draftRevision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
94
|
+
"viewport": { "$ref": "common.schema.json#/$defs/localName" }
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"rendered": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": ["draftDigest", "markers", "diagnostics"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"draftDigest": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"pattern": "^[a-f0-9]{64}(?![\\s\\S])"
|
|
105
|
+
},
|
|
106
|
+
"markers": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"maxItems": 100000,
|
|
109
|
+
"items": { "$ref": "common.schema.json#/$defs/stableId" }
|
|
110
|
+
},
|
|
111
|
+
"markerMap": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"maxProperties": 100000,
|
|
114
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
115
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/stableId" }
|
|
116
|
+
},
|
|
117
|
+
"diagnostics": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"maxItems": 10000,
|
|
120
|
+
"items": { "$ref": "common.schema.json#/$defs/diagnostic" }
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"select": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"required": ["nodeId"],
|
|
128
|
+
"properties": {
|
|
129
|
+
"nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
130
|
+
"reveal": { "type": "boolean", "default": true }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"measure": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": ["requestId", "markers"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"requestId": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
139
|
+
"markers": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"maxItems": 1000,
|
|
142
|
+
"items": { "$ref": "common.schema.json#/$defs/stableId" }
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"measurements": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"required": ["requestId", "draftDigest", "measurements", "unknown", "viewport"],
|
|
150
|
+
"properties": {
|
|
151
|
+
"requestId": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
152
|
+
"draftDigest": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"pattern": "^[a-f0-9]{64}(?![\\s\\S])"
|
|
155
|
+
},
|
|
156
|
+
"measurements": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"maxProperties": 1000,
|
|
159
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
160
|
+
"additionalProperties": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"minItems": 1,
|
|
163
|
+
"maxItems": 1000,
|
|
164
|
+
"items": { "$ref": "#/$defs/markerRect" }
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"unknown": {
|
|
168
|
+
"type": "array",
|
|
169
|
+
"maxItems": 1000,
|
|
170
|
+
"items": { "$ref": "common.schema.json#/$defs/stableId" }
|
|
171
|
+
},
|
|
172
|
+
"viewport": { "$ref": "#/$defs/viewportMetrics" }
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"markerRect": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"additionalProperties": false,
|
|
178
|
+
"required": ["x", "y", "width", "height"],
|
|
179
|
+
"properties": {
|
|
180
|
+
"x": { "type": "number", "minimum": -100000000, "maximum": 100000000 },
|
|
181
|
+
"y": { "type": "number", "minimum": -100000000, "maximum": 100000000 },
|
|
182
|
+
"width": { "type": "number", "minimum": 0, "maximum": 100000000 },
|
|
183
|
+
"height": { "type": "number", "minimum": 0, "maximum": 100000000 }
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"viewportMetrics": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"additionalProperties": false,
|
|
189
|
+
"required": ["width", "height", "scrollX", "scrollY", "devicePixelRatio"],
|
|
190
|
+
"properties": {
|
|
191
|
+
"width": { "type": "number", "minimum": 0, "maximum": 100000000 },
|
|
192
|
+
"height": { "type": "number", "minimum": 0, "maximum": 100000000 },
|
|
193
|
+
"scrollX": { "type": "number", "minimum": -100000000, "maximum": 100000000 },
|
|
194
|
+
"scrollY": { "type": "number", "minimum": -100000000, "maximum": 100000000 },
|
|
195
|
+
"devicePixelRatio": { "type": "number", "exclusiveMinimum": 0, "maximum": 100 }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"error": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"required": ["code", "message", "retryable"],
|
|
202
|
+
"properties": {
|
|
203
|
+
"code": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
204
|
+
"message": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
205
|
+
"retryable": { "type": "boolean" },
|
|
206
|
+
"correlationId": { "$ref": "common.schema.json#/$defs/stableId" }
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"reload": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": false,
|
|
212
|
+
"required": ["reason"],
|
|
213
|
+
"properties": {
|
|
214
|
+
"reason": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"teardown": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"additionalProperties": false,
|
|
220
|
+
"required": ["reason"],
|
|
221
|
+
"properties": {
|
|
222
|
+
"reason": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/provenance.schema.json",
|
|
4
|
+
"title": "Studio artifact provenance record",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["contractVersion", "kind", "artifact", "chain"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
10
|
+
"kind": { "const": "provenance" },
|
|
11
|
+
"artifact": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["id", "revision"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
17
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"chain": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"minItems": 1,
|
|
23
|
+
"maxItems": 10000,
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["origin", "toRevision", "recordedAt", "actor"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"origin": {
|
|
30
|
+
"enum": ["authoring", "import", "migration", "pattern", "plugin", "system"]
|
|
31
|
+
},
|
|
32
|
+
"fromRevision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
33
|
+
"toRevision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
34
|
+
"recordedAt": { "$ref": "common.schema.json#/$defs/rfc3339Instant" },
|
|
35
|
+
"actor": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["id"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
41
|
+
"displayName": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"maxLength": 200
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"sessionId": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
49
|
+
"commandCount": { "type": "integer", "minimum": 0, "maximum": 100000 },
|
|
50
|
+
"source": { "$ref": "common.schema.json#/$defs/artifactReference" },
|
|
51
|
+
"migrationId": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/rich-text-projection.schema.json",
|
|
4
|
+
"title": "Studio rich-text renderer-conformance fixture",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["description", "document", "projection"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"description": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"maxLength": 500
|
|
13
|
+
},
|
|
14
|
+
"document": { "$ref": "rich-text.schema.json" },
|
|
15
|
+
"projection": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"maxItems": 100000,
|
|
18
|
+
"items": { "$ref": "#/$defs/blockProjection" }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"$defs": {
|
|
22
|
+
"blockProjection": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["type", "text", "spans", "embeds"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"type": { "enum": ["heading", "horizontalRule", "paragraph"] },
|
|
28
|
+
"text": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"maxLength": 250000
|
|
31
|
+
},
|
|
32
|
+
"spans": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"maxItems": 100000,
|
|
35
|
+
"items": { "$ref": "#/$defs/span" }
|
|
36
|
+
},
|
|
37
|
+
"embeds": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"maxItems": 100000,
|
|
40
|
+
"items": { "$ref": "#/$defs/embed" }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"span": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["start", "end", "marks"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"start": { "type": "integer", "minimum": 0, "maximum": 250000 },
|
|
50
|
+
"end": { "type": "integer", "minimum": 1, "maximum": 250000 },
|
|
51
|
+
"marks": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"minItems": 1,
|
|
54
|
+
"maxItems": 4,
|
|
55
|
+
"uniqueItems": true,
|
|
56
|
+
"items": { "enum": ["bold", "code", "italic", "strike"] }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"embed": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["index", "kind"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"index": { "type": "integer", "minimum": 0, "maximum": 250000 },
|
|
66
|
+
"kind": { "enum": ["hardBreak"] }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|