@openplanr/protocol 0.5.0 → 0.6.1

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.
@@ -0,0 +1,395 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-presentation.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-presentation",
6
+ "version": "1.13.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "diagram-presentation"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.13.0"
19
+ },
20
+ "diagramId": {
21
+ "type": "string",
22
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
23
+ "minLength": 1,
24
+ "maxLength": 128
25
+ },
26
+ "semanticDigest": {
27
+ "type": "string",
28
+ "pattern": "^sha256:[a-f0-9]{64}$"
29
+ },
30
+ "coordinateSystem": {
31
+ "const": "global-canvas"
32
+ },
33
+ "layout": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "direction": {
38
+ "enum": [
39
+ "top-down",
40
+ "left-right",
41
+ "right-left",
42
+ "bottom-up"
43
+ ]
44
+ },
45
+ "detailTier": {
46
+ "enum": [
47
+ "simplified",
48
+ "balanced",
49
+ "faithful"
50
+ ]
51
+ }
52
+ },
53
+ "required": [
54
+ "direction",
55
+ "detailTier"
56
+ ]
57
+ },
58
+ "theme": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "themeId": {
63
+ "enum": [
64
+ "paper",
65
+ "slate",
66
+ "midnight"
67
+ ]
68
+ },
69
+ "mode": {
70
+ "enum": [
71
+ "light",
72
+ "dark",
73
+ "auto"
74
+ ]
75
+ }
76
+ },
77
+ "required": [
78
+ "themeId",
79
+ "mode"
80
+ ]
81
+ },
82
+ "elements": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "properties": {
88
+ "elementId": {
89
+ "type": "string",
90
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
91
+ "minLength": 1,
92
+ "maxLength": 128
93
+ },
94
+ "bounds": {
95
+ "anyOf": [
96
+ {
97
+ "type": "null"
98
+ },
99
+ {
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "properties": {
103
+ "x": {
104
+ "type": "number",
105
+ "minimum": -1000000,
106
+ "maximum": 1000000
107
+ },
108
+ "y": {
109
+ "type": "number",
110
+ "minimum": -1000000,
111
+ "maximum": 1000000
112
+ },
113
+ "width": {
114
+ "type": "number",
115
+ "minimum": 0.01,
116
+ "maximum": 1000000
117
+ },
118
+ "height": {
119
+ "type": "number",
120
+ "minimum": 0.01,
121
+ "maximum": 1000000
122
+ }
123
+ },
124
+ "required": [
125
+ "x",
126
+ "y",
127
+ "width",
128
+ "height"
129
+ ]
130
+ }
131
+ ]
132
+ },
133
+ "route": {
134
+ "anyOf": [
135
+ {
136
+ "type": "null"
137
+ },
138
+ {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "properties": {
142
+ "mode": {
143
+ "enum": [
144
+ "automatic",
145
+ "manual"
146
+ ]
147
+ },
148
+ "strategy": {
149
+ "enum": [
150
+ "straight",
151
+ "orthogonal"
152
+ ]
153
+ },
154
+ "from": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "properties": {
158
+ "side": {
159
+ "enum": [
160
+ "top",
161
+ "right",
162
+ "bottom",
163
+ "left"
164
+ ]
165
+ },
166
+ "offset": {
167
+ "type": "number",
168
+ "minimum": 0,
169
+ "maximum": 1
170
+ }
171
+ },
172
+ "required": [
173
+ "side",
174
+ "offset"
175
+ ]
176
+ },
177
+ "to": {
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "properties": {
181
+ "side": {
182
+ "enum": [
183
+ "top",
184
+ "right",
185
+ "bottom",
186
+ "left"
187
+ ]
188
+ },
189
+ "offset": {
190
+ "type": "number",
191
+ "minimum": 0,
192
+ "maximum": 1
193
+ }
194
+ },
195
+ "required": [
196
+ "side",
197
+ "offset"
198
+ ]
199
+ },
200
+ "points": {
201
+ "type": "array",
202
+ "items": {
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "properties": {
206
+ "x": {
207
+ "type": "number",
208
+ "minimum": -1000000,
209
+ "maximum": 1000000
210
+ },
211
+ "y": {
212
+ "type": "number",
213
+ "minimum": -1000000,
214
+ "maximum": 1000000
215
+ }
216
+ },
217
+ "required": [
218
+ "x",
219
+ "y"
220
+ ]
221
+ },
222
+ "minItems": 0,
223
+ "maxItems": 256
224
+ }
225
+ },
226
+ "required": [
227
+ "mode",
228
+ "strategy",
229
+ "from",
230
+ "to",
231
+ "points"
232
+ ]
233
+ }
234
+ ]
235
+ },
236
+ "label": {
237
+ "anyOf": [
238
+ {
239
+ "type": "null"
240
+ },
241
+ {
242
+ "type": "object",
243
+ "additionalProperties": false,
244
+ "properties": {
245
+ "x": {
246
+ "type": "number",
247
+ "minimum": -1000000,
248
+ "maximum": 1000000
249
+ },
250
+ "y": {
251
+ "type": "number",
252
+ "minimum": -1000000,
253
+ "maximum": 1000000
254
+ },
255
+ "width": {
256
+ "type": "number",
257
+ "minimum": 0.01,
258
+ "maximum": 1000000
259
+ }
260
+ },
261
+ "required": [
262
+ "x",
263
+ "y",
264
+ "width"
265
+ ]
266
+ }
267
+ ]
268
+ },
269
+ "zIndex": {
270
+ "type": "integer",
271
+ "minimum": 0,
272
+ "maximum": 10000
273
+ },
274
+ "appearance": {
275
+ "type": "object",
276
+ "additionalProperties": false,
277
+ "properties": {
278
+ "shape": {
279
+ "enum": [
280
+ "rectangle",
281
+ "rounded-rectangle",
282
+ "ellipse",
283
+ "diamond",
284
+ "cylinder",
285
+ "text",
286
+ "container",
287
+ "connector"
288
+ ]
289
+ },
290
+ "fill": {
291
+ "enum": [
292
+ "surface",
293
+ "accent",
294
+ "success",
295
+ "warning",
296
+ "danger",
297
+ "transparent"
298
+ ]
299
+ },
300
+ "stroke": {
301
+ "enum": [
302
+ "default",
303
+ "accent",
304
+ "muted",
305
+ "danger",
306
+ "none"
307
+ ]
308
+ },
309
+ "strokeWidth": {
310
+ "type": "number",
311
+ "minimum": 0,
312
+ "maximum": 16
313
+ },
314
+ "strokeStyle": {
315
+ "enum": [
316
+ "solid",
317
+ "dashed",
318
+ "dotted"
319
+ ]
320
+ },
321
+ "fontSize": {
322
+ "type": "integer",
323
+ "minimum": 8,
324
+ "maximum": 72
325
+ },
326
+ "textAlign": {
327
+ "enum": [
328
+ "left",
329
+ "center",
330
+ "right"
331
+ ]
332
+ }
333
+ },
334
+ "required": [
335
+ "shape",
336
+ "fill",
337
+ "stroke",
338
+ "strokeWidth",
339
+ "strokeStyle",
340
+ "fontSize",
341
+ "textAlign"
342
+ ]
343
+ },
344
+ "locks": {
345
+ "type": "object",
346
+ "additionalProperties": false,
347
+ "properties": {
348
+ "position": {
349
+ "type": "boolean"
350
+ },
351
+ "size": {
352
+ "type": "boolean"
353
+ },
354
+ "route": {
355
+ "type": "boolean"
356
+ }
357
+ },
358
+ "required": [
359
+ "position",
360
+ "size",
361
+ "route"
362
+ ]
363
+ }
364
+ },
365
+ "required": [
366
+ "elementId",
367
+ "bounds",
368
+ "route",
369
+ "label",
370
+ "zIndex",
371
+ "appearance",
372
+ "locks"
373
+ ]
374
+ },
375
+ "minItems": 0,
376
+ "maxItems": 10000
377
+ },
378
+ "presentationDigest": {
379
+ "type": "string",
380
+ "pattern": "^sha256:[a-f0-9]{64}$"
381
+ }
382
+ },
383
+ "required": [
384
+ "kind",
385
+ "schemaVersion",
386
+ "protocolVersion",
387
+ "diagramId",
388
+ "semanticDigest",
389
+ "coordinateSystem",
390
+ "layout",
391
+ "theme",
392
+ "elements",
393
+ "presentationDigest"
394
+ ]
395
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-publication-state.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-publication-state",
6
+ "version": "1.13.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "diagram-publication-state"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.13.0"
19
+ },
20
+ "diagramId": {
21
+ "type": "string",
22
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
23
+ "minLength": 1,
24
+ "maxLength": 128
25
+ },
26
+ "draft": {
27
+ "anyOf": [
28
+ {
29
+ "type": "null"
30
+ },
31
+ {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "properties": {
35
+ "bundleDigest": {
36
+ "type": "string",
37
+ "pattern": "^sha256:[a-f0-9]{64}$"
38
+ },
39
+ "semanticDigest": {
40
+ "type": "string",
41
+ "pattern": "^sha256:[a-f0-9]{64}$"
42
+ },
43
+ "presentationDigest": {
44
+ "type": "string",
45
+ "pattern": "^sha256:[a-f0-9]{64}$"
46
+ }
47
+ },
48
+ "required": [
49
+ "bundleDigest",
50
+ "semanticDigest",
51
+ "presentationDigest"
52
+ ]
53
+ }
54
+ ]
55
+ },
56
+ "published": {
57
+ "anyOf": [
58
+ {
59
+ "type": "null"
60
+ },
61
+ {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "properties": {
65
+ "bundleDigest": {
66
+ "type": "string",
67
+ "pattern": "^sha256:[a-f0-9]{64}$"
68
+ },
69
+ "semanticDigest": {
70
+ "type": "string",
71
+ "pattern": "^sha256:[a-f0-9]{64}$"
72
+ },
73
+ "presentationDigest": {
74
+ "type": "string",
75
+ "pattern": "^sha256:[a-f0-9]{64}$"
76
+ }
77
+ },
78
+ "required": [
79
+ "bundleDigest",
80
+ "semanticDigest",
81
+ "presentationDigest"
82
+ ]
83
+ }
84
+ ]
85
+ },
86
+ "audience": {
87
+ "enum": [
88
+ "private",
89
+ "company",
90
+ "public"
91
+ ]
92
+ },
93
+ "capabilitySemantics": {
94
+ "const": "descriptive-only-requires-host-authorization"
95
+ }
96
+ },
97
+ "required": [
98
+ "kind",
99
+ "schemaVersion",
100
+ "protocolVersion",
101
+ "diagramId",
102
+ "draft",
103
+ "published",
104
+ "audience",
105
+ "capabilitySemantics"
106
+ ]
107
+ }
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-source-map.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-source-map",
6
+ "version": "1.13.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "diagram-source-map"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "protocolVersion": {
18
+ "const": "1.13.0"
19
+ },
20
+ "diagramId": {
21
+ "type": "string",
22
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
23
+ "minLength": 1,
24
+ "maxLength": 128
25
+ },
26
+ "semanticDigest": {
27
+ "type": "string",
28
+ "pattern": "^sha256:[a-f0-9]{64}$"
29
+ },
30
+ "sourceDigest": {
31
+ "type": "string",
32
+ "pattern": "^sha256:[a-f0-9]{64}$"
33
+ },
34
+ "sourceByteLength": {
35
+ "type": "integer",
36
+ "minimum": 0,
37
+ "maximum": 1048576
38
+ },
39
+ "encoding": {
40
+ "const": "utf-8"
41
+ },
42
+ "parser": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "id": {
47
+ "type": "string",
48
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
49
+ "maxLength": 64
50
+ },
51
+ "version": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "maxLength": 64
55
+ }
56
+ },
57
+ "required": [
58
+ "id",
59
+ "version"
60
+ ]
61
+ },
62
+ "certificationVersion": {
63
+ "const": "flowchart-copy-v1"
64
+ },
65
+ "entries": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "properties": {
71
+ "sourceId": {
72
+ "anyOf": [
73
+ {
74
+ "type": "null"
75
+ },
76
+ {
77
+ "type": "string",
78
+ "minLength": 1,
79
+ "maxLength": 128
80
+ }
81
+ ]
82
+ },
83
+ "elementIds": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string",
87
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
88
+ "minLength": 1,
89
+ "maxLength": 128
90
+ },
91
+ "minItems": 0,
92
+ "maxItems": 10000,
93
+ "uniqueItems": true
94
+ },
95
+ "range": {
96
+ "anyOf": [
97
+ {
98
+ "type": "null"
99
+ },
100
+ {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "properties": {
104
+ "startByte": {
105
+ "type": "integer",
106
+ "minimum": 0,
107
+ "maximum": 1048576
108
+ },
109
+ "endByte": {
110
+ "type": "integer",
111
+ "minimum": 0,
112
+ "maximum": 1048576
113
+ }
114
+ },
115
+ "required": [
116
+ "startByte",
117
+ "endByte"
118
+ ]
119
+ }
120
+ ]
121
+ },
122
+ "construct": {
123
+ "type": "string",
124
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
125
+ "maxLength": 64
126
+ },
127
+ "confidence": {
128
+ "enum": [
129
+ "exact",
130
+ "ambiguous"
131
+ ]
132
+ },
133
+ "losses": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "maxLength": 512
139
+ },
140
+ "minItems": 0,
141
+ "maxItems": 64
142
+ }
143
+ },
144
+ "required": [
145
+ "sourceId",
146
+ "elementIds",
147
+ "range",
148
+ "construct",
149
+ "confidence",
150
+ "losses"
151
+ ]
152
+ },
153
+ "minItems": 0,
154
+ "maxItems": 10000
155
+ }
156
+ },
157
+ "required": [
158
+ "kind",
159
+ "schemaVersion",
160
+ "protocolVersion",
161
+ "diagramId",
162
+ "semanticDigest",
163
+ "sourceDigest",
164
+ "sourceByteLength",
165
+ "encoding",
166
+ "parser",
167
+ "certificationVersion",
168
+ "entries"
169
+ ]
170
+ }
@@ -3,4 +3,5 @@ export declare const PROTOCOL_V16_CONTRACTS: Readonly<Record<string, string>>;
3
3
  export declare const PROTOCOL_V17_CONTRACTS: Readonly<Record<string, string>>;
4
4
  export declare const PROTOCOL_V18_CONTRACTS: Readonly<Record<string, string>>;
5
5
  export declare const PROTOCOL_V111_CONTRACTS: Readonly<Record<string, string>>;
6
- export declare function protocolAssetUrl(kind: string, options?: { protocolVersion?: '1.5.0' | '1.6.0' | '1.7.0' | '1.8.0' | '1.11.0' }): URL;
6
+ export declare function protocolAssetUrl(kind: string, options?: { protocolVersion?: '1.5.0' | '1.6.0' | '1.7.0' | '1.8.0' | '1.11.0' | '1.13.0' }): URL;
7
+ export declare const PROTOCOL_V113_CONTRACTS: Readonly<Record<string, string>>;