@atlaskit/adf-schema 36.8.1 → 36.8.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/CHANGELOG.md +6 -0
- package/dist/cjs/next-schema/nodes/tableCell.js +1 -1
- package/dist/cjs/next-schema/nodes/tableHeader.js +1 -1
- package/dist/cjs/next-schema/nodes/tableRow.js +1 -1
- package/dist/es2019/next-schema/nodes/tableCell.js +1 -1
- package/dist/es2019/next-schema/nodes/tableHeader.js +1 -1
- package/dist/es2019/next-schema/nodes/tableRow.js +1 -1
- package/dist/esm/next-schema/nodes/tableCell.js +1 -1
- package/dist/esm/next-schema/nodes/tableHeader.js +1 -1
- package/dist/esm/next-schema/nodes/tableRow.js +1 -1
- package/package.json +2 -2
- package/schema-generators/__tests__/unit/jqueries.md +6 -0
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +280 -0
package/CHANGELOG.md
CHANGED
@@ -20,7 +20,7 @@ var _panel = require("./panel");
|
|
20
20
|
var _paragraph = require("./paragraph");
|
21
21
|
var _rule = require("./rule");
|
22
22
|
var _task = require("./task");
|
23
|
-
var tableCell = exports.tableCell = (0, _adfSchemaGenerator.adfNode)('
|
23
|
+
var tableCell = exports.tableCell = (0, _adfSchemaGenerator.adfNode)('tableCell').define({
|
24
24
|
isolating: true,
|
25
25
|
selectable: false,
|
26
26
|
tableRole: 'cell',
|
@@ -20,7 +20,7 @@ var _panel = require("./panel");
|
|
20
20
|
var _paragraph = require("./paragraph");
|
21
21
|
var _rule = require("./rule");
|
22
22
|
var _task = require("./task");
|
23
|
-
var tableHeader = exports.tableHeader = (0, _adfSchemaGenerator.adfNode)('
|
23
|
+
var tableHeader = exports.tableHeader = (0, _adfSchemaGenerator.adfNode)('tableHeader').define({
|
24
24
|
isolating: true,
|
25
25
|
selectable: false,
|
26
26
|
tableRole: 'header_cell',
|
@@ -7,7 +7,7 @@ exports.tableRow = void 0;
|
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
8
|
var _tableCell = require("./tableCell");
|
9
9
|
var _tableHeader = require("./tableHeader");
|
10
|
-
var tableRow = exports.tableRow = (0, _adfSchemaGenerator.adfNode)('
|
10
|
+
var tableRow = exports.tableRow = (0, _adfSchemaGenerator.adfNode)('tableRow').define({
|
11
11
|
selectable: false,
|
12
12
|
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_tableCell.tableCell, _tableHeader.tableHeader))]
|
13
13
|
});
|
@@ -14,7 +14,7 @@ import { panel } from './panel';
|
|
14
14
|
import { paragraph } from './paragraph';
|
15
15
|
import { rule } from './rule';
|
16
16
|
import { taskList } from './task';
|
17
|
-
export const tableCell = adfNode('
|
17
|
+
export const tableCell = adfNode('tableCell').define({
|
18
18
|
isolating: true,
|
19
19
|
selectable: false,
|
20
20
|
tableRole: 'cell',
|
@@ -14,7 +14,7 @@ import { panel } from './panel';
|
|
14
14
|
import { paragraph } from './paragraph';
|
15
15
|
import { rule } from './rule';
|
16
16
|
import { taskList } from './task';
|
17
|
-
export const tableHeader = adfNode('
|
17
|
+
export const tableHeader = adfNode('tableHeader').define({
|
18
18
|
isolating: true,
|
19
19
|
selectable: false,
|
20
20
|
tableRole: 'header_cell',
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { tableCell } from './tableCell';
|
3
3
|
import { tableHeader } from './tableHeader';
|
4
|
-
export const tableRow = adfNode('
|
4
|
+
export const tableRow = adfNode('tableRow').define({
|
5
5
|
selectable: false,
|
6
6
|
content: [$onePlus($or(tableCell, tableHeader))]
|
7
7
|
});
|
@@ -14,7 +14,7 @@ import { panel } from './panel';
|
|
14
14
|
import { paragraph } from './paragraph';
|
15
15
|
import { rule } from './rule';
|
16
16
|
import { taskList } from './task';
|
17
|
-
export var tableCell = adfNode('
|
17
|
+
export var tableCell = adfNode('tableCell').define({
|
18
18
|
isolating: true,
|
19
19
|
selectable: false,
|
20
20
|
tableRole: 'cell',
|
@@ -14,7 +14,7 @@ import { panel } from './panel';
|
|
14
14
|
import { paragraph } from './paragraph';
|
15
15
|
import { rule } from './rule';
|
16
16
|
import { taskList } from './task';
|
17
|
-
export var tableHeader = adfNode('
|
17
|
+
export var tableHeader = adfNode('tableHeader').define({
|
18
18
|
isolating: true,
|
19
19
|
selectable: false,
|
20
20
|
tableRole: 'header_cell',
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { tableCell } from './tableCell';
|
3
3
|
import { tableHeader } from './tableHeader';
|
4
|
-
export var tableRow = adfNode('
|
4
|
+
export var tableRow = adfNode('tableRow').define({
|
5
5
|
selectable: false,
|
6
6
|
content: [$onePlus($or(tableCell, tableHeader))]
|
7
7
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.8.
|
3
|
+
"version": "36.8.2",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -44,7 +44,7 @@
|
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@atlassian/adf-schema-json": "^1.15.0",
|
47
|
-
"@atlaskit/adf-schema-generator": "^1.7.
|
47
|
+
"@atlaskit/adf-schema-generator": "^1.7.1",
|
48
48
|
"@babel/cli": "^7.22.9",
|
49
49
|
"@babel/core": "^7.22.9",
|
50
50
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
@@ -19,3 +19,9 @@ Delete all subfields except for type. Content objects are also deleted. Inline i
|
|
19
19
|
```sh
|
20
20
|
cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .properties, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .items, .minItems, .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node) else . end)'
|
21
21
|
```
|
22
|
+
|
23
|
+
Delete all subfields except for type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
|
24
|
+
|
25
|
+
```sh
|
26
|
+
cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(.content, .text, .marks, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .items, .minItems, .block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node) else . end)'
|
27
|
+
```
|
@@ -15,190 +15,470 @@ const jsonWithTypes = {
|
|
15
15
|
definitions: {
|
16
16
|
text_node: {
|
17
17
|
type: 'object',
|
18
|
+
properties: {
|
19
|
+
type: {
|
20
|
+
enum: ['text'],
|
21
|
+
},
|
22
|
+
},
|
18
23
|
},
|
19
24
|
breakout_mark: {
|
20
25
|
type: 'object',
|
26
|
+
properties: {
|
27
|
+
type: {
|
28
|
+
enum: ['breakout'],
|
29
|
+
},
|
30
|
+
},
|
21
31
|
},
|
22
32
|
codeBlock_node: {
|
23
33
|
type: 'object',
|
34
|
+
properties: {
|
35
|
+
type: {
|
36
|
+
enum: ['codeBlock'],
|
37
|
+
},
|
38
|
+
},
|
24
39
|
},
|
25
40
|
codeBlock_with_no_marks_node: {},
|
26
41
|
codeBlock_with_marks_node: {},
|
27
42
|
em_mark: {
|
28
43
|
type: 'object',
|
44
|
+
properties: {
|
45
|
+
type: {
|
46
|
+
enum: ['em'],
|
47
|
+
},
|
48
|
+
},
|
29
49
|
},
|
30
50
|
code_mark: {
|
31
51
|
type: 'object',
|
52
|
+
properties: {
|
53
|
+
type: {
|
54
|
+
enum: ['code'],
|
55
|
+
},
|
56
|
+
},
|
32
57
|
},
|
33
58
|
strike_mark: {
|
34
59
|
type: 'object',
|
60
|
+
properties: {
|
61
|
+
type: {
|
62
|
+
enum: ['strike'],
|
63
|
+
},
|
64
|
+
},
|
35
65
|
},
|
36
66
|
strong_mark: {
|
37
67
|
type: 'object',
|
68
|
+
properties: {
|
69
|
+
type: {
|
70
|
+
enum: ['strong'],
|
71
|
+
},
|
72
|
+
},
|
38
73
|
},
|
39
74
|
underline_mark: {
|
40
75
|
type: 'object',
|
76
|
+
properties: {
|
77
|
+
type: {
|
78
|
+
enum: ['underline'],
|
79
|
+
},
|
80
|
+
},
|
41
81
|
},
|
42
82
|
link_mark: {
|
43
83
|
type: 'object',
|
84
|
+
properties: {
|
85
|
+
type: {
|
86
|
+
enum: ['link'],
|
87
|
+
},
|
88
|
+
},
|
44
89
|
},
|
45
90
|
subsup_mark: {
|
46
91
|
type: 'object',
|
92
|
+
properties: {
|
93
|
+
type: {
|
94
|
+
enum: ['subsup'],
|
95
|
+
},
|
96
|
+
},
|
47
97
|
},
|
48
98
|
textColor_mark: {
|
49
99
|
type: 'object',
|
100
|
+
properties: {
|
101
|
+
type: {
|
102
|
+
enum: ['textColor'],
|
103
|
+
},
|
104
|
+
},
|
50
105
|
},
|
51
106
|
alignment_mark: {
|
52
107
|
type: 'object',
|
108
|
+
properties: {
|
109
|
+
type: {
|
110
|
+
enum: ['alignment'],
|
111
|
+
},
|
112
|
+
},
|
53
113
|
},
|
54
114
|
indentation_mark: {
|
55
115
|
type: 'object',
|
116
|
+
properties: {
|
117
|
+
type: {
|
118
|
+
enum: ['indentation'],
|
119
|
+
},
|
120
|
+
},
|
56
121
|
},
|
57
122
|
annotation_mark: {
|
58
123
|
type: 'object',
|
124
|
+
properties: {
|
125
|
+
type: {
|
126
|
+
enum: ['annotation'],
|
127
|
+
},
|
128
|
+
},
|
59
129
|
},
|
60
130
|
dataConsumer_mark: {
|
61
131
|
type: 'object',
|
132
|
+
properties: {
|
133
|
+
type: {
|
134
|
+
enum: ['dataConsumer'],
|
135
|
+
},
|
136
|
+
},
|
62
137
|
},
|
63
138
|
fragment_mark: {
|
64
139
|
type: 'object',
|
140
|
+
properties: {
|
141
|
+
type: {
|
142
|
+
enum: ['fragment'],
|
143
|
+
},
|
144
|
+
},
|
65
145
|
},
|
66
146
|
border_mark: {
|
67
147
|
type: 'object',
|
148
|
+
properties: {
|
149
|
+
type: {
|
150
|
+
enum: ['border'],
|
151
|
+
},
|
152
|
+
},
|
68
153
|
},
|
69
154
|
backgroundColor_mark: {
|
70
155
|
type: 'object',
|
156
|
+
properties: {
|
157
|
+
type: {
|
158
|
+
enum: ['backgroundColor'],
|
159
|
+
},
|
160
|
+
},
|
71
161
|
},
|
72
162
|
hardBreak_node: {
|
73
163
|
type: 'object',
|
164
|
+
properties: {
|
165
|
+
type: {
|
166
|
+
enum: ['hardBreak'],
|
167
|
+
},
|
168
|
+
},
|
74
169
|
},
|
75
170
|
mention_node: {
|
76
171
|
type: 'object',
|
172
|
+
properties: {
|
173
|
+
type: {
|
174
|
+
enum: ['mention'],
|
175
|
+
},
|
176
|
+
},
|
77
177
|
},
|
78
178
|
emoji_node: {
|
79
179
|
type: 'object',
|
180
|
+
properties: {
|
181
|
+
type: {
|
182
|
+
enum: ['emoji'],
|
183
|
+
},
|
184
|
+
},
|
80
185
|
},
|
81
186
|
inlineExtension_node: {
|
82
187
|
type: 'object',
|
188
|
+
properties: {
|
189
|
+
type: {
|
190
|
+
enum: ['inlineExtension'],
|
191
|
+
},
|
192
|
+
},
|
83
193
|
},
|
84
194
|
inlineExtension_with_marks_node: {},
|
85
195
|
date_node: {
|
86
196
|
type: 'object',
|
197
|
+
properties: {
|
198
|
+
type: {
|
199
|
+
enum: ['date'],
|
200
|
+
},
|
201
|
+
},
|
87
202
|
},
|
88
203
|
placeholder_node: {
|
89
204
|
type: 'object',
|
205
|
+
properties: {
|
206
|
+
type: {
|
207
|
+
enum: ['placeholder'],
|
208
|
+
},
|
209
|
+
},
|
90
210
|
},
|
91
211
|
blockCard_node: {
|
92
212
|
type: 'object',
|
213
|
+
properties: {
|
214
|
+
type: {
|
215
|
+
enum: ['blockCard'],
|
216
|
+
},
|
217
|
+
},
|
93
218
|
},
|
94
219
|
inlineCard_node: {
|
95
220
|
type: 'object',
|
221
|
+
properties: {
|
222
|
+
type: {
|
223
|
+
enum: ['inlineCard'],
|
224
|
+
},
|
225
|
+
},
|
96
226
|
},
|
97
227
|
status_node: {
|
98
228
|
type: 'object',
|
229
|
+
properties: {
|
230
|
+
type: {
|
231
|
+
enum: ['status'],
|
232
|
+
},
|
233
|
+
},
|
99
234
|
},
|
100
235
|
media_node: {
|
101
236
|
type: 'object',
|
237
|
+
properties: {
|
238
|
+
type: {
|
239
|
+
enum: ['media'],
|
240
|
+
},
|
241
|
+
},
|
102
242
|
},
|
103
243
|
mediaInline_node: {
|
104
244
|
type: 'object',
|
245
|
+
properties: {
|
246
|
+
type: {
|
247
|
+
enum: ['mediaInline'],
|
248
|
+
},
|
249
|
+
},
|
105
250
|
},
|
106
251
|
formatted_text_inline_node: {},
|
107
252
|
code_inline_node: {},
|
108
253
|
paragraph_node: {
|
109
254
|
type: 'object',
|
255
|
+
properties: {
|
256
|
+
type: {
|
257
|
+
enum: ['paragraph'],
|
258
|
+
},
|
259
|
+
},
|
110
260
|
},
|
111
261
|
paragraph_with_no_marks_node: {},
|
112
262
|
paragraph_with_alignment_node: {},
|
113
263
|
paragraph_with_indentation_node: {},
|
114
264
|
caption_node: {
|
115
265
|
type: 'object',
|
266
|
+
properties: {
|
267
|
+
type: {
|
268
|
+
enum: ['caption'],
|
269
|
+
},
|
270
|
+
},
|
116
271
|
},
|
117
272
|
mediaSingle_node: {
|
118
273
|
type: 'object',
|
274
|
+
properties: {
|
275
|
+
type: {
|
276
|
+
enum: ['mediaSingle'],
|
277
|
+
},
|
278
|
+
},
|
119
279
|
},
|
120
280
|
mediaSingle_caption_node: {},
|
121
281
|
mediaSingle_full_node: {},
|
122
282
|
taskItem_node: {
|
123
283
|
type: 'object',
|
284
|
+
properties: {
|
285
|
+
type: {
|
286
|
+
enum: ['taskItem'],
|
287
|
+
},
|
288
|
+
},
|
124
289
|
},
|
125
290
|
taskList_node: {
|
126
291
|
type: 'object',
|
292
|
+
properties: {
|
293
|
+
type: {
|
294
|
+
enum: ['taskList'],
|
295
|
+
},
|
296
|
+
},
|
127
297
|
},
|
128
298
|
listItem_node: {
|
129
299
|
type: 'object',
|
300
|
+
properties: {
|
301
|
+
type: {
|
302
|
+
enum: ['listItem'],
|
303
|
+
},
|
304
|
+
},
|
130
305
|
},
|
131
306
|
bulletList_node: {
|
132
307
|
type: 'object',
|
308
|
+
properties: {
|
309
|
+
type: {
|
310
|
+
enum: ['bulletList'],
|
311
|
+
},
|
312
|
+
},
|
133
313
|
},
|
134
314
|
orderedList_node: {
|
135
315
|
type: 'object',
|
316
|
+
properties: {
|
317
|
+
type: {
|
318
|
+
enum: ['orderedList'],
|
319
|
+
},
|
320
|
+
},
|
136
321
|
},
|
137
322
|
heading_node: {
|
138
323
|
type: 'object',
|
324
|
+
properties: {
|
325
|
+
type: {
|
326
|
+
enum: ['heading'],
|
327
|
+
},
|
328
|
+
},
|
139
329
|
},
|
140
330
|
heading_with_no_marks_node: {},
|
141
331
|
heading_with_alignment_node: {},
|
142
332
|
heading_with_indentation_node: {},
|
143
333
|
mediaGroup_node: {
|
144
334
|
type: 'object',
|
335
|
+
properties: {
|
336
|
+
type: {
|
337
|
+
enum: ['mediaGroup'],
|
338
|
+
},
|
339
|
+
},
|
145
340
|
},
|
146
341
|
decisionItem_node: {
|
147
342
|
type: 'object',
|
343
|
+
properties: {
|
344
|
+
type: {
|
345
|
+
enum: ['decisionItem'],
|
346
|
+
},
|
347
|
+
},
|
148
348
|
},
|
149
349
|
decisionList_node: {
|
150
350
|
type: 'object',
|
351
|
+
properties: {
|
352
|
+
type: {
|
353
|
+
enum: ['decisionList'],
|
354
|
+
},
|
355
|
+
},
|
151
356
|
},
|
152
357
|
rule_node: {
|
153
358
|
type: 'object',
|
359
|
+
properties: {
|
360
|
+
type: {
|
361
|
+
enum: ['rule'],
|
362
|
+
},
|
363
|
+
},
|
154
364
|
},
|
155
365
|
panel_node: {
|
156
366
|
type: 'object',
|
367
|
+
properties: {
|
368
|
+
type: {
|
369
|
+
enum: ['panel'],
|
370
|
+
},
|
371
|
+
},
|
157
372
|
},
|
158
373
|
blockquote_node: {
|
159
374
|
type: 'object',
|
375
|
+
properties: {
|
376
|
+
type: {
|
377
|
+
enum: ['blockquote'],
|
378
|
+
},
|
379
|
+
},
|
160
380
|
},
|
161
381
|
extension_node: {
|
162
382
|
type: 'object',
|
383
|
+
properties: {
|
384
|
+
type: {
|
385
|
+
enum: ['extension'],
|
386
|
+
},
|
387
|
+
},
|
163
388
|
},
|
164
389
|
extension_with_marks_node: {},
|
165
390
|
embedCard_node: {
|
166
391
|
type: 'object',
|
392
|
+
properties: {
|
393
|
+
type: {
|
394
|
+
enum: ['embedCard'],
|
395
|
+
},
|
396
|
+
},
|
167
397
|
},
|
168
398
|
nestedExpand_node: {
|
169
399
|
type: 'object',
|
400
|
+
properties: {
|
401
|
+
type: {
|
402
|
+
enum: ['nestedExpand'],
|
403
|
+
},
|
404
|
+
},
|
170
405
|
},
|
171
406
|
nestedExpand_with_no_marks_node: {},
|
172
407
|
table_node: {
|
173
408
|
type: 'object',
|
409
|
+
properties: {
|
410
|
+
type: {
|
411
|
+
enum: ['table'],
|
412
|
+
},
|
413
|
+
},
|
174
414
|
},
|
175
415
|
table_row_node: {
|
176
416
|
type: 'object',
|
417
|
+
properties: {
|
418
|
+
type: {
|
419
|
+
enum: ['tableRow'],
|
420
|
+
},
|
421
|
+
},
|
177
422
|
},
|
178
423
|
table_cell_node: {
|
179
424
|
type: 'object',
|
425
|
+
properties: {
|
426
|
+
type: {
|
427
|
+
enum: ['tableCell'],
|
428
|
+
},
|
429
|
+
},
|
180
430
|
},
|
181
431
|
table_header_node: {
|
182
432
|
type: 'object',
|
433
|
+
properties: {
|
434
|
+
type: {
|
435
|
+
enum: ['tableHeader'],
|
436
|
+
},
|
437
|
+
},
|
183
438
|
},
|
184
439
|
expand_node: {
|
185
440
|
type: 'object',
|
441
|
+
properties: {
|
442
|
+
type: {
|
443
|
+
enum: ['expand'],
|
444
|
+
},
|
445
|
+
},
|
186
446
|
},
|
187
447
|
expand_with_no_mark_node: {},
|
188
448
|
expand_with_breakout_mark_node: {},
|
189
449
|
bodiedExtension_node: {
|
190
450
|
type: 'object',
|
451
|
+
properties: {
|
452
|
+
type: {
|
453
|
+
enum: ['bodiedExtension'],
|
454
|
+
},
|
455
|
+
},
|
191
456
|
},
|
192
457
|
bodiedExtension_with_marks_node: {},
|
193
458
|
layoutColumn_node: {
|
194
459
|
type: 'object',
|
460
|
+
properties: {
|
461
|
+
type: {
|
462
|
+
enum: ['layoutColumn'],
|
463
|
+
},
|
464
|
+
},
|
195
465
|
},
|
196
466
|
layoutSection_node: {
|
197
467
|
type: 'object',
|
468
|
+
properties: {
|
469
|
+
type: {
|
470
|
+
enum: ['layoutSection'],
|
471
|
+
},
|
472
|
+
},
|
198
473
|
},
|
199
474
|
layoutSection_full_node: {},
|
200
475
|
doc_node: {
|
201
476
|
type: 'object',
|
477
|
+
properties: {
|
478
|
+
type: {
|
479
|
+
enum: ['doc'],
|
480
|
+
},
|
481
|
+
},
|
202
482
|
},
|
203
483
|
},
|
204
484
|
};
|