@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kumwe Studio contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# `@kumwe/studio-protocol`
|
|
2
|
+
|
|
3
|
+
Status: pre-Gate-A foundation alpha. Its draft contracts may change and are not a supported protocol.
|
|
4
|
+
|
|
5
|
+
Serializable contracts shared by Studio hosts, renderers, extensions, and non-JavaScript clients.
|
|
6
|
+
The package deliberately contains no DOM or framework dependency. JSON Schemas are published under
|
|
7
|
+
the `schemas` export for authoritative validation outside TypeScript.
|
|
8
|
+
|
|
9
|
+
The initial contract covers blueprints, block definitions, design profiles, host capabilities,
|
|
10
|
+
commands and canonical command vectors, preview messages, host port errors, media asset
|
|
11
|
+
projections, persisted media references, media upload sessions, portable rich text, plugin
|
|
12
|
+
manifests, and entries. `MediaAsset` describes host-owned library state; the smaller
|
|
13
|
+
`MediaReference` is the portable value stored in an artifact. Consumers validate the document's
|
|
14
|
+
`contractVersion` and separately negotiate the SemVer wire `protocolVersion`; neither value may be
|
|
15
|
+
inferred from the other or from the `/studio/v1/` schema epoch URI.
|
|
16
|
+
|
|
17
|
+
Beyond document shapes, the package projects the host adapter surface (`HostAdapter` and its nine
|
|
18
|
+
typed ports sharing one request envelope), the stable host error taxonomy with the
|
|
19
|
+
`isHostPortError` guard, the extension lifecycle state vocabulary, and the preview message guard.
|
|
20
|
+
`schemas/manifest.json` records the schema epoch plus the file, canonical `$id`, and sha256 digest
|
|
21
|
+
of every published schema so generated SDKs can pin the exact corpus they were built against.
|
|
22
|
+
Canonical command vectors and the negative-fixture corpus ship through `@kumwe/studio-testkit`.
|
package/dist/guards.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type HostPortError, type PreviewMessage } from './types.js';
|
|
2
|
+
export declare function isHostPortError(value: unknown): value is HostPortError;
|
|
3
|
+
export declare function isPreviewMessage(value: unknown): value is PreviewMessage;
|
|
4
|
+
//# sourceMappingURL=guards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAoBpB,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAqBtE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CA4CxE"}
|
package/dist/guards.js
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { STUDIO_CONTRACT_VERSION, STUDIO_WIRE_PROTOCOL_VERSION, } from './types.js';
|
|
2
|
+
const qualifiedName = /^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*\/[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$/u;
|
|
3
|
+
const localName = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/u;
|
|
4
|
+
const hostErrorCategories = new Set([
|
|
5
|
+
'cancelled',
|
|
6
|
+
'conflict',
|
|
7
|
+
'forbidden',
|
|
8
|
+
'incompatible',
|
|
9
|
+
'internal',
|
|
10
|
+
'invalid-request',
|
|
11
|
+
'limit-exceeded',
|
|
12
|
+
'not-found',
|
|
13
|
+
'rate-limited',
|
|
14
|
+
'unauthenticated',
|
|
15
|
+
'unavailable',
|
|
16
|
+
'validation-failed',
|
|
17
|
+
]);
|
|
18
|
+
export function isHostPortError(value) {
|
|
19
|
+
return (isRecord(value) &&
|
|
20
|
+
hasExactKeys(value, ['contractVersion', 'kind', 'category', 'message', 'retryable'], ['correlationId', 'diagnostics', 'retryAfterMilliseconds', 'revision']) &&
|
|
21
|
+
value.contractVersion === STUDIO_CONTRACT_VERSION &&
|
|
22
|
+
value.kind === 'host-error' &&
|
|
23
|
+
typeof value.category === 'string' &&
|
|
24
|
+
hostErrorCategories.has(value.category) &&
|
|
25
|
+
isMessageReference(value.message) &&
|
|
26
|
+
typeof value.retryable === 'boolean' &&
|
|
27
|
+
(value.correlationId === undefined || isStableId(value.correlationId)) &&
|
|
28
|
+
(value.revision === undefined || isRevision(value.revision)) &&
|
|
29
|
+
(value.retryAfterMilliseconds === undefined ||
|
|
30
|
+
(isNonNegativeInteger(value.retryAfterMilliseconds) &&
|
|
31
|
+
value.retryAfterMilliseconds <= 86_400_000)) &&
|
|
32
|
+
(value.diagnostics === undefined || isArrayOf(value.diagnostics, isDiagnostic, 1_000)));
|
|
33
|
+
}
|
|
34
|
+
export function isPreviewMessage(value) {
|
|
35
|
+
if (!isRecord(value) ||
|
|
36
|
+
!hasExactKeys(value, [
|
|
37
|
+
'contractVersion',
|
|
38
|
+
'kind',
|
|
39
|
+
'channelId',
|
|
40
|
+
'sessionGeneration',
|
|
41
|
+
'sequence',
|
|
42
|
+
'type',
|
|
43
|
+
'payload',
|
|
44
|
+
]) ||
|
|
45
|
+
value.contractVersion !== STUDIO_CONTRACT_VERSION ||
|
|
46
|
+
value.kind !== 'preview-message' ||
|
|
47
|
+
!isStableId(value.channelId) ||
|
|
48
|
+
!isRevision(value.sessionGeneration) ||
|
|
49
|
+
!isNonNegativeInteger(value.sequence) ||
|
|
50
|
+
typeof value.type !== 'string' ||
|
|
51
|
+
!isRecord(value.payload)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
switch (value.type) {
|
|
55
|
+
case 'studio.preview/ready':
|
|
56
|
+
return isReadyPayload(value.payload);
|
|
57
|
+
case 'studio.preview/render':
|
|
58
|
+
return isRenderPayload(value.payload);
|
|
59
|
+
case 'studio.preview/rendered':
|
|
60
|
+
return isRenderedPayload(value.payload);
|
|
61
|
+
case 'studio.preview/select':
|
|
62
|
+
return isSelectPayload(value.payload);
|
|
63
|
+
case 'studio.preview/measure':
|
|
64
|
+
return isMeasurePayload(value.payload);
|
|
65
|
+
case 'studio.preview/measurements':
|
|
66
|
+
return isMeasurementsPayload(value.payload);
|
|
67
|
+
case 'studio.preview/error':
|
|
68
|
+
return isErrorPayload(value.payload);
|
|
69
|
+
case 'studio.preview/reload':
|
|
70
|
+
case 'studio.preview/teardown':
|
|
71
|
+
return isReasonPayload(value.payload);
|
|
72
|
+
default:
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function isReasonPayload(value) {
|
|
77
|
+
return hasExactKeys(value, ['reason']) && isQualifiedName(value.reason);
|
|
78
|
+
}
|
|
79
|
+
function isReadyPayload(value) {
|
|
80
|
+
return (hasExactKeys(value, ['protocolVersion', 'renderer', 'viewports']) &&
|
|
81
|
+
value.protocolVersion === STUDIO_WIRE_PROTOCOL_VERSION &&
|
|
82
|
+
isQualifiedName(value.renderer) &&
|
|
83
|
+
isStringArray(value.viewports, isLocalName, 20));
|
|
84
|
+
}
|
|
85
|
+
function isRenderPayload(value) {
|
|
86
|
+
return (hasExactKeys(value, ['artifactId', 'draftDigest', 'viewport'], ['draftRevision']) &&
|
|
87
|
+
isStableId(value.artifactId) &&
|
|
88
|
+
typeof value.draftDigest === 'string' &&
|
|
89
|
+
/^[a-f0-9]{64}$/u.test(value.draftDigest) &&
|
|
90
|
+
isLocalName(value.viewport) &&
|
|
91
|
+
(value.draftRevision === undefined || isRevision(value.draftRevision)));
|
|
92
|
+
}
|
|
93
|
+
function isRenderedPayload(value) {
|
|
94
|
+
return (hasExactKeys(value, ['draftDigest', 'markers', 'diagnostics'], ['markerMap']) &&
|
|
95
|
+
typeof value.draftDigest === 'string' &&
|
|
96
|
+
/^[a-f0-9]{64}$/u.test(value.draftDigest) &&
|
|
97
|
+
isStringArray(value.markers, isStableId, 100_000) &&
|
|
98
|
+
isArrayOf(value.diagnostics, isDiagnostic, 10_000) &&
|
|
99
|
+
(value.markerMap === undefined || isMarkerMap(value.markerMap)));
|
|
100
|
+
}
|
|
101
|
+
function isMarkerMap(value) {
|
|
102
|
+
if (!isRecord(value)) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
const entries = Object.entries(value);
|
|
106
|
+
return (entries.length <= 100_000 &&
|
|
107
|
+
entries.every(([marker, nodeId]) => isStableId(marker) && isStableId(nodeId)));
|
|
108
|
+
}
|
|
109
|
+
function isMeasurePayload(value) {
|
|
110
|
+
return (hasExactKeys(value, ['requestId', 'markers']) &&
|
|
111
|
+
isStableId(value.requestId) &&
|
|
112
|
+
isStringArray(value.markers, isStableId, 1_000));
|
|
113
|
+
}
|
|
114
|
+
function isMeasurementsPayload(value) {
|
|
115
|
+
return (hasExactKeys(value, ['requestId', 'draftDigest', 'measurements', 'unknown', 'viewport']) &&
|
|
116
|
+
isStableId(value.requestId) &&
|
|
117
|
+
typeof value.draftDigest === 'string' &&
|
|
118
|
+
/^[a-f0-9]{64}$/u.test(value.draftDigest) &&
|
|
119
|
+
isMeasurementMap(value.measurements) &&
|
|
120
|
+
isStringArray(value.unknown, isStableId, 1_000) &&
|
|
121
|
+
isViewportMetrics(value.viewport));
|
|
122
|
+
}
|
|
123
|
+
function isMeasurementMap(value) {
|
|
124
|
+
if (!isRecord(value)) {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
const entries = Object.entries(value);
|
|
128
|
+
return (entries.length <= 1_000 &&
|
|
129
|
+
entries.every(([marker, rects]) => isStableId(marker) && isArrayOf(rects, isMarkerRect, 1_000) && rects.length >= 1));
|
|
130
|
+
}
|
|
131
|
+
function isMarkerRect(value) {
|
|
132
|
+
return (isRecord(value) &&
|
|
133
|
+
hasExactKeys(value, ['x', 'y', 'width', 'height']) &&
|
|
134
|
+
isCssCoordinate(value.x) &&
|
|
135
|
+
isCssCoordinate(value.y) &&
|
|
136
|
+
isCssExtent(value.width) &&
|
|
137
|
+
isCssExtent(value.height));
|
|
138
|
+
}
|
|
139
|
+
function isViewportMetrics(value) {
|
|
140
|
+
return (isRecord(value) &&
|
|
141
|
+
hasExactKeys(value, ['width', 'height', 'scrollX', 'scrollY', 'devicePixelRatio']) &&
|
|
142
|
+
isCssExtent(value.width) &&
|
|
143
|
+
isCssExtent(value.height) &&
|
|
144
|
+
isCssCoordinate(value.scrollX) &&
|
|
145
|
+
isCssCoordinate(value.scrollY) &&
|
|
146
|
+
typeof value.devicePixelRatio === 'number' &&
|
|
147
|
+
Number.isFinite(value.devicePixelRatio) &&
|
|
148
|
+
value.devicePixelRatio > 0 &&
|
|
149
|
+
value.devicePixelRatio <= 100);
|
|
150
|
+
}
|
|
151
|
+
function isSelectPayload(value) {
|
|
152
|
+
return (hasExactKeys(value, ['nodeId'], ['reveal']) &&
|
|
153
|
+
isStableId(value.nodeId) &&
|
|
154
|
+
(value.reveal === undefined || typeof value.reveal === 'boolean'));
|
|
155
|
+
}
|
|
156
|
+
function isErrorPayload(value) {
|
|
157
|
+
return (hasExactKeys(value, ['code', 'message', 'retryable'], ['correlationId']) &&
|
|
158
|
+
isQualifiedName(value.code) &&
|
|
159
|
+
isMessageReference(value.message) &&
|
|
160
|
+
typeof value.retryable === 'boolean' &&
|
|
161
|
+
(value.correlationId === undefined || isStableId(value.correlationId)));
|
|
162
|
+
}
|
|
163
|
+
function isDiagnostic(value) {
|
|
164
|
+
if (!isRecord(value) ||
|
|
165
|
+
!hasExactKeys(value, ['code', 'severity', 'message'], ['location', 'parameters', 'remediations']) ||
|
|
166
|
+
!isQualifiedName(value.code) ||
|
|
167
|
+
typeof value.severity !== 'string' ||
|
|
168
|
+
!['information', 'warning', 'error', 'blocking'].includes(value.severity) ||
|
|
169
|
+
!isMessageReference(value.message)) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
if (value.location !== undefined && !isDiagnosticLocation(value.location)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
if (value.parameters !== undefined &&
|
|
176
|
+
(!isRecord(value.parameters) ||
|
|
177
|
+
Object.keys(value.parameters).length > 20 ||
|
|
178
|
+
!Object.keys(value.parameters).every((key) => isSafeJsonMemberName(key)) ||
|
|
179
|
+
!Object.values(value.parameters).every((entry) => entry === null ||
|
|
180
|
+
typeof entry === 'boolean' ||
|
|
181
|
+
typeof entry === 'string' ||
|
|
182
|
+
(typeof entry === 'number' && Number.isFinite(entry))))) {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
return value.remediations === undefined || isStringArray(value.remediations, isQualifiedName, 10);
|
|
186
|
+
}
|
|
187
|
+
function isDiagnosticLocation(value) {
|
|
188
|
+
if (!isRecord(value) ||
|
|
189
|
+
!hasExactKeys(value, [], ['artifactId', 'nodeId', 'fieldPath', 'jsonPointer'])) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
return ((value.artifactId === undefined || isStableId(value.artifactId)) &&
|
|
193
|
+
(value.nodeId === undefined || isStableId(value.nodeId)) &&
|
|
194
|
+
(value.fieldPath === undefined || isStringArray(value.fieldPath, isLocalName, 32)) &&
|
|
195
|
+
(value.jsonPointer === undefined ||
|
|
196
|
+
(typeof value.jsonPointer === 'string' && value.jsonPointer.length <= 1_000)));
|
|
197
|
+
}
|
|
198
|
+
function isMessageReference(value) {
|
|
199
|
+
return (isRecord(value) &&
|
|
200
|
+
hasExactKeys(value, ['key'], ['defaultMessage']) &&
|
|
201
|
+
isQualifiedName(value.key) &&
|
|
202
|
+
(value.defaultMessage === undefined ||
|
|
203
|
+
(typeof value.defaultMessage === 'string' &&
|
|
204
|
+
value.defaultMessage.length > 0 &&
|
|
205
|
+
value.defaultMessage.length <= 500)));
|
|
206
|
+
}
|
|
207
|
+
function hasExactKeys(value, required, optional = []) {
|
|
208
|
+
const allowed = new Set([...required, ...optional]);
|
|
209
|
+
return (required.every((key) => Object.hasOwn(value, key)) &&
|
|
210
|
+
Object.keys(value).every((key) => allowed.has(key)));
|
|
211
|
+
}
|
|
212
|
+
function isRecord(value) {
|
|
213
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
const prototype = Object.getPrototypeOf(value);
|
|
217
|
+
return prototype === Object.prototype || prototype === null;
|
|
218
|
+
}
|
|
219
|
+
function isNonNegativeInteger(value) {
|
|
220
|
+
return typeof value === 'number' && Number.isSafeInteger(value) && value >= 0;
|
|
221
|
+
}
|
|
222
|
+
// CSS-pixel geometry stays finite and bounded so a hostile responder cannot smuggle
|
|
223
|
+
// NaN, infinities, or absurd magnitudes into overlay arithmetic.
|
|
224
|
+
const cssPixelLimit = 100_000_000;
|
|
225
|
+
function isCssCoordinate(value) {
|
|
226
|
+
return typeof value === 'number' && Number.isFinite(value) && Math.abs(value) <= cssPixelLimit;
|
|
227
|
+
}
|
|
228
|
+
function isCssExtent(value) {
|
|
229
|
+
return (typeof value === 'number' && Number.isFinite(value) && value >= 0 && value <= cssPixelLimit);
|
|
230
|
+
}
|
|
231
|
+
function isQualifiedName(value) {
|
|
232
|
+
return typeof value === 'string' && value.length <= 160 && qualifiedName.test(value);
|
|
233
|
+
}
|
|
234
|
+
function isLocalName(value) {
|
|
235
|
+
return (typeof value === 'string' &&
|
|
236
|
+
value.length <= 100 &&
|
|
237
|
+
!isForbiddenObjectMemberName(value) &&
|
|
238
|
+
localName.test(value));
|
|
239
|
+
}
|
|
240
|
+
function isStableId(value) {
|
|
241
|
+
return (typeof value === 'string' &&
|
|
242
|
+
value.length <= 240 &&
|
|
243
|
+
!isForbiddenObjectMemberName(value) &&
|
|
244
|
+
/^[A-Za-z0-9][A-Za-z0-9._:/-]*$/u.test(value));
|
|
245
|
+
}
|
|
246
|
+
function isRevision(value) {
|
|
247
|
+
return typeof value === 'string' && value.length >= 1 && value.length <= 200;
|
|
248
|
+
}
|
|
249
|
+
function isStringArray(value, predicate, maximumItems) {
|
|
250
|
+
return isArrayOf(value, predicate, maximumItems);
|
|
251
|
+
}
|
|
252
|
+
function isArrayOf(value, predicate, maximumItems) {
|
|
253
|
+
if (!Array.isArray(value) || value.length > maximumItems || !isDenseArray(value)) {
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
for (const entry of value) {
|
|
257
|
+
if (!predicate(entry)) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
function isDenseArray(value) {
|
|
264
|
+
if (Object.getPrototypeOf(value) !== Array.prototype ||
|
|
265
|
+
Object.getOwnPropertySymbols(value).length) {
|
|
266
|
+
return false;
|
|
267
|
+
}
|
|
268
|
+
const names = Object.getOwnPropertyNames(value);
|
|
269
|
+
return (names.length === value.length + 1 &&
|
|
270
|
+
names[value.length] === 'length' &&
|
|
271
|
+
names.slice(0, -1).every((name, index) => name === String(index)));
|
|
272
|
+
}
|
|
273
|
+
function isSafeJsonMemberName(value) {
|
|
274
|
+
if (value.length === 0 || value.length > 200 || isForbiddenObjectMemberName(value)) {
|
|
275
|
+
return false;
|
|
276
|
+
}
|
|
277
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
278
|
+
const code = value.charCodeAt(index);
|
|
279
|
+
if (code <= 0x1f || code === 0x7f) {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return true;
|
|
284
|
+
}
|
|
285
|
+
function isForbiddenObjectMemberName(value) {
|
|
286
|
+
return value === '__proto__' || value === 'prototype' || value === 'constructor';
|
|
287
|
+
}
|
|
288
|
+
//# sourceMappingURL=guards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,4BAA4B,GAG7B,MAAM,YAAY,CAAC;AAEpB,MAAM,aAAa,GAAG,uEAAuE,CAAC;AAC9F,MAAM,SAAS,GAAG,sCAAsC,CAAC;AAEzD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,WAAW;IACX,UAAU;IACV,WAAW;IACX,cAAc;IACd,UAAU;IACV,iBAAiB;IACjB,gBAAgB;IAChB,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,aAAa;IACb,mBAAmB;CACpB,CAAC,CAAC;AAEH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,YAAY,CACV,KAAK,EACL,CAAC,iBAAiB,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,EAC/D,CAAC,eAAe,EAAE,aAAa,EAAE,wBAAwB,EAAE,UAAU,CAAC,CACvE;QACD,KAAK,CAAC,eAAe,KAAK,uBAAuB;QACjD,KAAK,CAAC,IAAI,KAAK,YAAY;QAC3B,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ;QAClC,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC;QACvC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC;QACjC,OAAO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AO,KAAK,CAAC;IACf,CAAC;IACD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,2BAA2B,CAAC,KAAa;IAChD,OAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,aAAa,CAAC;AACnF,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { isHostPortError, isPreviewMessage } from './guards.js';
|
|
2
|
+
export { blockDefinitionSchema, blueprintSchema, commandSchema, commandVectorSchema, commonSchema, contentModelSchema, entrySchema, hostCapabilitiesSchema, hostErrorSchema, mediaAssetSchema, mediaReferenceSchema, mediaUploadSessionSchema, patternSchema, pluginManifestSchema, previewMessageSchema, protocolSchemas, provenanceSchema, richTextSchema, schemaProfileSchema, studioConfigurationSchema, themeSchema, unresolvedContributionSchema, } from './schemas.js';
|
|
3
|
+
export { STUDIO_CONTRACT_VERSION, STUDIO_WIRE_PROTOCOL_VERSION, type AddModelFieldCommand, type AddModelFieldPayload, type ApplyPatternCommand, type ApplyPatternPayload, type ArtifactPort, type ArtifactReference, type BatchCommand, type BatchOperation, type BatchPayload, type BindingSource, type BindingTransform, type BlockAccessibilityContract, type BlockDefinition, type BlockFallback, type BlockIcon, type BlockPortDefinition, type BlockPropertyControl, type BlockSlotAcceptance, type BlockSlotDefinition, type BlockType, type BlueprintBatchOperation, type BlueprintBlockLock, type BlueprintCommand, type BlueprintDependencyLock, type BlueprintDocument, type BlueprintNode, type CommandBase, type CommandDestination, type ContextValueBindingSource, type ContentFieldKind, type ContentModelDocument, type ContentModelEnumValue, type DiagnosticLocation, type DuplicateNodeCommand, type DuplicateNodePayload, type EntryDocument, type EntryFieldBindingSource, type ExperimentalShellConfiguration, type ExtensionLifecycleState, type FieldAuthoringMetadata, type FieldBinding, type FieldConstraints, type FieldDefinition, type HostAdapter, type HostCapabilities, type HostErrorCategory, type HostFeatureCapability, type HostPortCapability, type HostPortError, type HostPortResult, type HostRequestContext, type InsertNodeCommand, type InsertNodePayload, type JsonObject, type JsonPrimitive, type JsonSchema, type JsonValue, type LocalizationPort, type LocalName, type LockedArtifactReference, type MediaAsset, type MediaAccessibility, type MediaHostPort, type MediaCropIntent, type MediaMetadata, type MediaPage, type MediaQuery, type MediaReference, type MediaRendition, type MediaRenditionIntent, type MediaUploadAcceptedAsset, type MediaUploadPlan, type MediaUploadProgress, type MediaUploadRequestDescriptor, type MediaUploadSession, type MediaUploadSessionState, type MessageReference, type ModelPort, type MoveNodeCommand, type MoveNodePayload, type NodeAuthoringPolicy, type NodeId, type OwnerReference, type PackageRelativePath, type PatternDocument, type PatternReference, type PermissionExplanation, type PermissionPort, type PermissionSnapshot, type PluginActivation, type PluginCapabilityRequirement, type PluginContributionDeclaration, type PluginContributionKind, type PluginDependency, type PluginEntryModule, type PluginEntryRealm, type PluginManifest, type PreviewErrorMessage, type PreviewErrorPayload, type PreviewMarkerRect, type PreviewMeasureMessage, type PreviewMeasurePayload, type PreviewMeasurementsMessage, type PreviewMeasurementsPayload, type PreviewMessage, type PreviewMessageBase, type PreviewPort, type PreviewReadyMessage, type PreviewReadyPayload, type PreviewReloadMessage, type PreviewReloadPayload, type PreviewRenderMessage, type PreviewRenderedMessage, type PreviewRenderedPayload, type PreviewRenderPayload, type PreviewSelectMessage, type PreviewSelectPayload, type PreviewTeardownMessage, type PreviewTeardownPayload, type PreviewViewportMetrics, type ProvenanceActor, type ProvenanceEntry, type ProvenanceOrigin, type ProvenanceRecord, type QualifiedName, type QueryReferenceBindingSource, type RecoveryPort, type RelationshipAuthoringMetadata, type RelationshipDefinition, type RemoveBindingCommand, type RemoveBindingPayload, type RemoveNodeCommand, type RemoveNodePayload, type RendererRequirement, type ReorderChildrenCommand, type ReorderChildrenPayload, type ResetInheritedPropertyCommand, type ResetInheritedPropertyPayload, type ResourcePort, type ResourceReferenceBindingSource, type ResourceSearchHit, type ResourceSearchPage, type ResourceSearchQuery, type ResolvedEntryReference, type RestoreNodeCommand, type RestoreNodePayload, type Revision, type SemanticVersion, type SetBindingCommand, type SetBindingPayload, type SetFieldValueCommand, type SetFieldValuePayload, type SetPropertyCommand, type SetPropertyPayload, type StableId, type StaticValueBindingSource, type StudioArtifact, type StudioAuthoringMode, type StudioCommand, type StudioConfiguration, type StudioContractVersion, type StudioDiagnostic, type StudioDisplayPreferences, type StudioLimits, type StudioResourceContext, type StudioResourceScope, type StudioWireProtocolVersion, type TelemetryEvent, type TelemetryPort, type ThemeAlias, type ThemeBlockSupport, type ThemeDesignChoice, type ThemeDesignControl, type ThemeDesignControlKind, type ThemeDocument, type ThemeRecipe, type ThemeRendererDeclaration, type ThemeViewport, type UnresolvedContribution, type UnresolvedContributionReason, type UnresolvedContributionReference, type UnsetPropertyCommand, type UnsetPropertyPayload, } from './types.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACn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C,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { isHostPortError, isPreviewMessage } from './guards.js';
|
|
2
|
+
export { blockDefinitionSchema, blueprintSchema, commandSchema, commandVectorSchema, commonSchema, contentModelSchema, entrySchema, hostCapabilitiesSchema, hostErrorSchema, mediaAssetSchema, mediaReferenceSchema, mediaUploadSessionSchema, patternSchema, pluginManifestSchema, previewMessageSchema, protocolSchemas, provenanceSchema, richTextSchema, schemaProfileSchema, studioConfigurationSchema, themeSchema, unresolvedContributionSchema, } from './schemas.js';
|
|
3
|
+
export { STUDIO_CONTRACT_VERSION, STUDIO_WIRE_PROTOCOL_VERSION, } from './types.js';
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EACzB,WAAW,EACX,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,uBAAuB,EACvB,4BAA4B,GAwL7B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { JsonSchema } from './types.js';
|
|
2
|
+
export declare const blockDefinitionSchema: JsonSchema;
|
|
3
|
+
export declare const blueprintSchema: JsonSchema;
|
|
4
|
+
export declare const commandSchema: JsonSchema;
|
|
5
|
+
export declare const commandVectorSchema: JsonSchema;
|
|
6
|
+
export declare const commonSchema: JsonSchema;
|
|
7
|
+
export declare const contentModelSchema: JsonSchema;
|
|
8
|
+
export declare const entrySchema: JsonSchema;
|
|
9
|
+
export declare const hostCapabilitiesSchema: JsonSchema;
|
|
10
|
+
export declare const hostErrorSchema: JsonSchema;
|
|
11
|
+
export declare const mediaAssetSchema: JsonSchema;
|
|
12
|
+
export declare const mediaReferenceSchema: JsonSchema;
|
|
13
|
+
export declare const mediaUploadSessionSchema: JsonSchema;
|
|
14
|
+
export declare const patternSchema: JsonSchema;
|
|
15
|
+
export declare const pluginManifestSchema: JsonSchema;
|
|
16
|
+
export declare const previewMessageSchema: JsonSchema;
|
|
17
|
+
export declare const provenanceSchema: JsonSchema;
|
|
18
|
+
export declare const richTextSchema: JsonSchema;
|
|
19
|
+
export declare const schemaProfileSchema: JsonSchema;
|
|
20
|
+
export declare const studioConfigurationSchema: JsonSchema;
|
|
21
|
+
export declare const themeSchema: JsonSchema;
|
|
22
|
+
export declare const unresolvedContributionSchema: JsonSchema;
|
|
23
|
+
export declare const protocolSchemas: readonly JsonSchema[];
|
|
24
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,UAA0C,CAAC;AAC/E,eAAO,MAAM,eAAe,EAAE,UAAoC,CAAC;AACnE,eAAO,MAAM,aAAa,EAAE,UAAkC,CAAC;AAC/D,eAAO,MAAM,mBAAmB,EAAE,UAAwC,CAAC;AAC3E,eAAO,MAAM,YAAY,EAAE,UAAiC,CAAC;AAC7D,eAAO,MAAM,kBAAkB,EAAE,UAAuC,CAAC;AACzE,eAAO,MAAM,WAAW,EAAE,UAAgC,CAAC;AAC3D,eAAO,MAAM,sBAAsB,EAAE,UAA2C,CAAC;AACjF,eAAO,MAAM,eAAe,EAAE,UAAoC,CAAC;AACnE,eAAO,MAAM,gBAAgB,EAAE,UAAqC,CAAC;AACrE,eAAO,MAAM,oBAAoB,EAAE,UAAyC,CAAC;AAC7E,eAAO,MAAM,wBAAwB,EAAE,UAA6C,CAAC;AACrF,eAAO,MAAM,aAAa,EAAE,UAAkC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,EAAE,UAAyC,CAAC;AAC7E,eAAO,MAAM,oBAAoB,EAAE,UAAyC,CAAC;AAC7E,eAAO,MAAM,gBAAgB,EAAE,UAAqC,CAAC;AACrE,eAAO,MAAM,cAAc,EAAE,UAAmC,CAAC;AACjE,eAAO,MAAM,mBAAmB,EAAE,UAAwC,CAAC;AAC3E,eAAO,MAAM,yBAAyB,EAAE,UAA8C,CAAC;AACvF,eAAO,MAAM,WAAW,EAAE,UAAgC,CAAC;AAC3D,eAAO,MAAM,4BAA4B,EAAE,UAAiD,CAAC;AAE7F,eAAO,MAAM,eAAe,EAAE,SAAS,UAAU,EAsB/C,CAAC"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import blockDefinitionSchemaDocument from '../schemas/block-definition.schema.json' with { type: 'json' };
|
|
2
|
+
import blueprintSchemaDocument from '../schemas/blueprint.schema.json' with { type: 'json' };
|
|
3
|
+
import commandSchemaDocument from '../schemas/command.schema.json' with { type: 'json' };
|
|
4
|
+
import commandVectorSchemaDocument from '../schemas/command-vector.schema.json' with { type: 'json' };
|
|
5
|
+
import commonSchemaDocument from '../schemas/common.schema.json' with { type: 'json' };
|
|
6
|
+
import contentModelSchemaDocument from '../schemas/content-model.schema.json' with { type: 'json' };
|
|
7
|
+
import entrySchemaDocument from '../schemas/entry.schema.json' with { type: 'json' };
|
|
8
|
+
import hostCapabilitiesSchemaDocument from '../schemas/host-capabilities.schema.json' with { type: 'json' };
|
|
9
|
+
import hostErrorSchemaDocument from '../schemas/host-error.schema.json' with { type: 'json' };
|
|
10
|
+
import mediaAssetSchemaDocument from '../schemas/media-asset.schema.json' with { type: 'json' };
|
|
11
|
+
import mediaReferenceSchemaDocument from '../schemas/media-reference.schema.json' with { type: 'json' };
|
|
12
|
+
import mediaUploadSessionSchemaDocument from '../schemas/media-upload-session.schema.json' with { type: 'json' };
|
|
13
|
+
import patternSchemaDocument from '../schemas/pattern.schema.json' with { type: 'json' };
|
|
14
|
+
import pluginManifestSchemaDocument from '../schemas/plugin-manifest.schema.json' with { type: 'json' };
|
|
15
|
+
import previewMessageSchemaDocument from '../schemas/preview-message.schema.json' with { type: 'json' };
|
|
16
|
+
import provenanceSchemaDocument from '../schemas/provenance.schema.json' with { type: 'json' };
|
|
17
|
+
import richTextSchemaDocument from '../schemas/rich-text.schema.json' with { type: 'json' };
|
|
18
|
+
import schemaProfileSchemaDocument from '../schemas/schema-profile.schema.json' with { type: 'json' };
|
|
19
|
+
import studioConfigurationSchemaDocument from '../schemas/studio-config.schema.json' with { type: 'json' };
|
|
20
|
+
import themeSchemaDocument from '../schemas/theme.schema.json' with { type: 'json' };
|
|
21
|
+
import unresolvedContributionSchemaDocument from '../schemas/unresolved-contribution.schema.json' with { type: 'json' };
|
|
22
|
+
export const blockDefinitionSchema = blockDefinitionSchemaDocument;
|
|
23
|
+
export const blueprintSchema = blueprintSchemaDocument;
|
|
24
|
+
export const commandSchema = commandSchemaDocument;
|
|
25
|
+
export const commandVectorSchema = commandVectorSchemaDocument;
|
|
26
|
+
export const commonSchema = commonSchemaDocument;
|
|
27
|
+
export const contentModelSchema = contentModelSchemaDocument;
|
|
28
|
+
export const entrySchema = entrySchemaDocument;
|
|
29
|
+
export const hostCapabilitiesSchema = hostCapabilitiesSchemaDocument;
|
|
30
|
+
export const hostErrorSchema = hostErrorSchemaDocument;
|
|
31
|
+
export const mediaAssetSchema = mediaAssetSchemaDocument;
|
|
32
|
+
export const mediaReferenceSchema = mediaReferenceSchemaDocument;
|
|
33
|
+
export const mediaUploadSessionSchema = mediaUploadSessionSchemaDocument;
|
|
34
|
+
export const patternSchema = patternSchemaDocument;
|
|
35
|
+
export const pluginManifestSchema = pluginManifestSchemaDocument;
|
|
36
|
+
export const previewMessageSchema = previewMessageSchemaDocument;
|
|
37
|
+
export const provenanceSchema = provenanceSchemaDocument;
|
|
38
|
+
export const richTextSchema = richTextSchemaDocument;
|
|
39
|
+
export const schemaProfileSchema = schemaProfileSchemaDocument;
|
|
40
|
+
export const studioConfigurationSchema = studioConfigurationSchemaDocument;
|
|
41
|
+
export const themeSchema = themeSchemaDocument;
|
|
42
|
+
export const unresolvedContributionSchema = unresolvedContributionSchemaDocument;
|
|
43
|
+
export const protocolSchemas = Object.freeze([
|
|
44
|
+
commonSchema,
|
|
45
|
+
blockDefinitionSchema,
|
|
46
|
+
blueprintSchema,
|
|
47
|
+
commandSchema,
|
|
48
|
+
commandVectorSchema,
|
|
49
|
+
contentModelSchema,
|
|
50
|
+
entrySchema,
|
|
51
|
+
hostCapabilitiesSchema,
|
|
52
|
+
hostErrorSchema,
|
|
53
|
+
mediaAssetSchema,
|
|
54
|
+
mediaReferenceSchema,
|
|
55
|
+
mediaUploadSessionSchema,
|
|
56
|
+
patternSchema,
|
|
57
|
+
pluginManifestSchema,
|
|
58
|
+
previewMessageSchema,
|
|
59
|
+
provenanceSchema,
|
|
60
|
+
richTextSchema,
|
|
61
|
+
schemaProfileSchema,
|
|
62
|
+
studioConfigurationSchema,
|
|
63
|
+
themeSchema,
|
|
64
|
+
unresolvedContributionSchema,
|
|
65
|
+
]);
|
|
66
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1G,OAAO,uBAAuB,MAAM,kCAAkC,CAAC,O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