@atlaskit/adf-schema 36.14.0 → 36.14.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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/next-schema/full-schema.adf.js +3 -2
- package/dist/cjs/next-schema/generated/markTypes.js +23 -23
- package/dist/cjs/next-schema/generated/nodeTypes.js +135 -202
- package/dist/cjs/next-schema/groups/blockGroup.js +5 -1
- package/dist/cjs/next-schema/groups/inlineGroup.js +1 -3
- package/dist/cjs/next-schema/nodes/blockCard.js +7 -3
- package/dist/cjs/next-schema/nodes/codeBlock.js +2 -2
- package/dist/cjs/next-schema/nodes/inlineExtension.js +5 -1
- package/dist/cjs/next-schema/nodes/layoutColumn.js +2 -1
- package/dist/cjs/next-schema/nodes/media.js +2 -2
- package/dist/cjs/next-schema/nodes/mediaInline.js +29 -12
- package/dist/cjs/next-schema/nodes/mediaSingle.js +2 -1
- package/dist/cjs/next-schema/nodes/mention.js +2 -1
- package/dist/cjs/next-schema/nodes/placeholder.js +1 -0
- package/dist/cjs/next-schema/nodes/table.js +1 -0
- package/dist/cjs/next-schema/nodes/tableCell.js +2 -2
- package/dist/cjs/next-schema/nodes/tableHeader.js +2 -2
- package/dist/cjs/next-schema/nodes/tableRow.js +2 -1
- package/dist/es2019/next-schema/full-schema.adf.js +3 -2
- package/dist/es2019/next-schema/generated/markTypes.js +23 -23
- package/dist/es2019/next-schema/generated/nodeTypes.js +134 -201
- package/dist/es2019/next-schema/groups/blockGroup.js +5 -1
- package/dist/es2019/next-schema/groups/inlineGroup.js +1 -3
- package/dist/es2019/next-schema/nodes/blockCard.js +7 -3
- package/dist/es2019/next-schema/nodes/codeBlock.js +1 -1
- package/dist/es2019/next-schema/nodes/inlineExtension.js +5 -1
- package/dist/es2019/next-schema/nodes/layoutColumn.js +2 -1
- package/dist/es2019/next-schema/nodes/media.js +2 -2
- package/dist/es2019/next-schema/nodes/mediaInline.js +29 -12
- package/dist/es2019/next-schema/nodes/mediaSingle.js +2 -1
- package/dist/es2019/next-schema/nodes/mention.js +2 -1
- package/dist/es2019/next-schema/nodes/placeholder.js +1 -0
- package/dist/es2019/next-schema/nodes/table.js +1 -0
- package/dist/es2019/next-schema/nodes/tableCell.js +2 -2
- package/dist/es2019/next-schema/nodes/tableHeader.js +2 -2
- package/dist/es2019/next-schema/nodes/tableRow.js +2 -1
- package/dist/esm/next-schema/full-schema.adf.js +3 -2
- package/dist/esm/next-schema/generated/markTypes.js +23 -23
- package/dist/esm/next-schema/generated/nodeTypes.js +134 -201
- package/dist/esm/next-schema/groups/blockGroup.js +5 -1
- package/dist/esm/next-schema/groups/inlineGroup.js +1 -3
- package/dist/esm/next-schema/nodes/blockCard.js +7 -3
- package/dist/esm/next-schema/nodes/codeBlock.js +1 -1
- package/dist/esm/next-schema/nodes/inlineExtension.js +5 -1
- package/dist/esm/next-schema/nodes/layoutColumn.js +2 -1
- package/dist/esm/next-schema/nodes/media.js +2 -2
- package/dist/esm/next-schema/nodes/mediaInline.js +29 -12
- package/dist/esm/next-schema/nodes/mediaSingle.js +2 -1
- package/dist/esm/next-schema/nodes/mention.js +2 -1
- package/dist/esm/next-schema/nodes/placeholder.js +1 -0
- package/dist/esm/next-schema/nodes/table.js +1 -0
- package/dist/esm/next-schema/nodes/tableCell.js +2 -2
- package/dist/esm/next-schema/nodes/tableHeader.js +2 -2
- package/dist/esm/next-schema/nodes/tableRow.js +2 -1
- package/dist/types/next-schema/generated/markTypes.d.ts +36 -36
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +4 -4
- package/dist/types/next-schema/generated/nodeTypes.d.ts +59 -120
- package/dist/types/next-schema/nodes/codeBlock.d.ts +1 -1
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +2 -0
- package/package.json +1 -1
- package/schema-generators/__tests__/helpers/_utils.ts +123 -0
- package/schema-generators/__tests__/helpers/utils.unit.ts +66 -0
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +1142 -1231
- package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +162 -36
@@ -2,10 +2,18 @@ import { createPMNodeSpecFactory } from '@atlaskit/adf-schema-generator';
|
|
2
2
|
export var blockCard = createPMNodeSpecFactory({
|
3
3
|
group: 'block',
|
4
4
|
attrs: {
|
5
|
-
url: {
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
url: {
|
6
|
+
default: null
|
7
|
+
},
|
8
|
+
datasource: {
|
9
|
+
default: null
|
10
|
+
},
|
11
|
+
width: {
|
12
|
+
default: null
|
13
|
+
},
|
14
|
+
layout: {
|
15
|
+
default: null
|
16
|
+
},
|
9
17
|
data: {
|
10
18
|
default: null
|
11
19
|
}
|
@@ -13,7 +21,9 @@ export var blockCard = createPMNodeSpecFactory({
|
|
13
21
|
selectable: true,
|
14
22
|
draggable: true
|
15
23
|
});
|
16
|
-
export var text = createPMNodeSpecFactory({
|
24
|
+
export var text = createPMNodeSpecFactory({
|
25
|
+
group: 'inline'
|
26
|
+
});
|
17
27
|
export var unsupportedInline = createPMNodeSpecFactory({
|
18
28
|
group: 'inline',
|
19
29
|
inline: true,
|
@@ -24,28 +34,6 @@ export var unsupportedInline = createPMNodeSpecFactory({
|
|
24
34
|
},
|
25
35
|
selectable: true
|
26
36
|
});
|
27
|
-
export var codeBlock = createPMNodeSpecFactory({
|
28
|
-
content: '(text | unsupportedInline)*',
|
29
|
-
group: 'block',
|
30
|
-
attrs: {
|
31
|
-
language: {
|
32
|
-
default: null
|
33
|
-
}
|
34
|
-
},
|
35
|
-
code: true,
|
36
|
-
defining: true
|
37
|
-
});
|
38
|
-
export var codeBlockWithMarks = createPMNodeSpecFactory({
|
39
|
-
content: '(text | unsupportedInline)*',
|
40
|
-
group: 'block',
|
41
|
-
attrs: {
|
42
|
-
language: {
|
43
|
-
default: null
|
44
|
-
}
|
45
|
-
},
|
46
|
-
code: true,
|
47
|
-
defining: true
|
48
|
-
});
|
49
37
|
export var codeBlockWithNoMarks = createPMNodeSpecFactory({
|
50
38
|
content: '(text | unsupportedInline)*',
|
51
39
|
group: 'block',
|
@@ -57,22 +45,6 @@ export var codeBlockWithNoMarks = createPMNodeSpecFactory({
|
|
57
45
|
code: true,
|
58
46
|
defining: true
|
59
47
|
});
|
60
|
-
export var mediaSingle = createPMNodeSpecFactory({
|
61
|
-
group: 'block',
|
62
|
-
atom: false,
|
63
|
-
attrs: {
|
64
|
-
width: {
|
65
|
-
default: null
|
66
|
-
},
|
67
|
-
layout: {
|
68
|
-
default: 'center'
|
69
|
-
},
|
70
|
-
widthType: {
|
71
|
-
default: 'pixel'
|
72
|
-
}
|
73
|
-
},
|
74
|
-
selectable: true
|
75
|
-
});
|
76
48
|
export var media = createPMNodeSpecFactory({
|
77
49
|
attrs: {
|
78
50
|
type: {
|
@@ -103,7 +75,7 @@ export var media = createPMNodeSpecFactory({
|
|
103
75
|
default: null
|
104
76
|
},
|
105
77
|
__external: {
|
106
|
-
default:
|
78
|
+
default: false
|
107
79
|
},
|
108
80
|
__fileMimeType: {
|
109
81
|
default: null
|
@@ -123,6 +95,24 @@ export var media = createPMNodeSpecFactory({
|
|
123
95
|
},
|
124
96
|
selectable: true
|
125
97
|
});
|
98
|
+
export var mediaSingle = createPMNodeSpecFactory({
|
99
|
+
content: 'media',
|
100
|
+
marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
|
101
|
+
group: 'block',
|
102
|
+
atom: false,
|
103
|
+
attrs: {
|
104
|
+
width: {
|
105
|
+
default: null
|
106
|
+
},
|
107
|
+
layout: {
|
108
|
+
default: 'center'
|
109
|
+
},
|
110
|
+
widthType: {
|
111
|
+
default: 'pixel'
|
112
|
+
}
|
113
|
+
},
|
114
|
+
selectable: true
|
115
|
+
});
|
126
116
|
export var unsupportedBlock = createPMNodeSpecFactory({
|
127
117
|
group: 'block',
|
128
118
|
atom: true,
|
@@ -150,7 +140,9 @@ export var mention = createPMNodeSpecFactory({
|
|
150
140
|
id: {
|
151
141
|
default: ''
|
152
142
|
},
|
153
|
-
localId: {
|
143
|
+
localId: {
|
144
|
+
default: null
|
145
|
+
},
|
154
146
|
text: {
|
155
147
|
default: ''
|
156
148
|
},
|
@@ -191,6 +183,7 @@ export var date = createPMNodeSpecFactory({
|
|
191
183
|
});
|
192
184
|
export var placeholder = createPMNodeSpecFactory({
|
193
185
|
group: 'inline',
|
186
|
+
inline: true,
|
194
187
|
attrs: {
|
195
188
|
text: {
|
196
189
|
default: ''
|
@@ -238,12 +231,12 @@ export var textCodeInline = createPMNodeSpecFactory({
|
|
238
231
|
});
|
239
232
|
export var caption = createPMNodeSpecFactory({
|
240
233
|
content: '(hardBreak | mention | emoji | date | placeholder | inlineCard | status | text | unsupportedInline)*',
|
241
|
-
marks: '
|
234
|
+
marks: '_',
|
242
235
|
selectable: false,
|
243
236
|
isolating: true
|
244
237
|
});
|
245
238
|
export var mediaSingleCaption = createPMNodeSpecFactory({
|
246
|
-
content: 'media | unsupportedBlock caption | unsupportedBlock',
|
239
|
+
content: '(media | unsupportedBlock) (caption | unsupportedBlock)',
|
247
240
|
marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
|
248
241
|
group: 'block',
|
249
242
|
atom: false,
|
@@ -261,6 +254,8 @@ export var mediaSingleCaption = createPMNodeSpecFactory({
|
|
261
254
|
selectable: true
|
262
255
|
});
|
263
256
|
export var mediaSingleFull = createPMNodeSpecFactory({
|
257
|
+
content: 'media',
|
258
|
+
marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
|
264
259
|
group: 'block',
|
265
260
|
atom: false,
|
266
261
|
attrs: {
|
@@ -276,7 +271,7 @@ export var mediaSingleFull = createPMNodeSpecFactory({
|
|
276
271
|
},
|
277
272
|
selectable: true
|
278
273
|
});
|
279
|
-
export var
|
274
|
+
export var inlineExtensionWithMarks = createPMNodeSpecFactory({
|
280
275
|
group: 'inline',
|
281
276
|
inline: true,
|
282
277
|
attrs: {
|
@@ -298,51 +293,56 @@ export var inlineExtension = createPMNodeSpecFactory({
|
|
298
293
|
},
|
299
294
|
selectable: true
|
300
295
|
});
|
301
|
-
export var
|
296
|
+
export var mediaInline = createPMNodeSpecFactory({
|
302
297
|
group: 'inline',
|
303
298
|
inline: true,
|
304
299
|
attrs: {
|
305
|
-
|
300
|
+
data: {},
|
301
|
+
type: {
|
302
|
+
default: 'file'
|
303
|
+
},
|
304
|
+
url: {
|
305
|
+
default: null
|
306
|
+
},
|
307
|
+
id: {
|
306
308
|
default: ''
|
307
309
|
},
|
308
|
-
|
310
|
+
alt: {
|
309
311
|
default: ''
|
310
312
|
},
|
311
|
-
|
312
|
-
default:
|
313
|
+
collection: {
|
314
|
+
default: ''
|
313
315
|
},
|
314
|
-
|
316
|
+
occurrenceKey: {
|
315
317
|
default: null
|
316
318
|
},
|
317
|
-
localId: {
|
318
|
-
default: null
|
319
|
-
}
|
320
|
-
},
|
321
|
-
selectable: true
|
322
|
-
});
|
323
|
-
export var mediaInline = createPMNodeSpecFactory({
|
324
|
-
group: 'inline',
|
325
|
-
atom: false,
|
326
|
-
attrs: {
|
327
|
-
data: {},
|
328
|
-
type: {},
|
329
|
-
id: {},
|
330
|
-
alt: {},
|
331
|
-
collection: {},
|
332
|
-
occurrenceKey: {},
|
333
319
|
width: {
|
334
320
|
default: null
|
335
321
|
},
|
336
322
|
height: {
|
337
323
|
default: null
|
338
324
|
},
|
339
|
-
__fileName: {
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
325
|
+
__fileName: {
|
326
|
+
default: null
|
327
|
+
},
|
328
|
+
__fileSize: {
|
329
|
+
default: null
|
330
|
+
},
|
331
|
+
__fileMimeType: {
|
332
|
+
default: null
|
333
|
+
},
|
334
|
+
__displayType: {
|
335
|
+
default: null
|
336
|
+
},
|
337
|
+
__contextId: {
|
338
|
+
default: null
|
339
|
+
},
|
340
|
+
__mediaTraceId: {
|
341
|
+
default: null
|
342
|
+
},
|
343
|
+
__external: {
|
344
|
+
default: false
|
345
|
+
}
|
346
346
|
},
|
347
347
|
selectable: true
|
348
348
|
});
|
@@ -356,27 +356,27 @@ export var confluenceUnsupportedInline = createPMNodeSpecFactory({
|
|
356
356
|
}
|
357
357
|
}
|
358
358
|
});
|
359
|
-
export var
|
359
|
+
export var paragraph = createPMNodeSpecFactory({
|
360
360
|
content: '(inline | unsupportedInline)*',
|
361
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
361
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
362
362
|
group: 'block',
|
363
363
|
selectable: false
|
364
364
|
});
|
365
|
-
export var
|
365
|
+
export var paragraphWithAlignment = createPMNodeSpecFactory({
|
366
366
|
content: '(inline | unsupportedInline)*',
|
367
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
367
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
368
368
|
group: 'block',
|
369
369
|
selectable: false
|
370
370
|
});
|
371
|
-
export var
|
371
|
+
export var paragraphWithIndentation = createPMNodeSpecFactory({
|
372
372
|
content: '(inline | unsupportedInline)*',
|
373
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
373
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
374
374
|
group: 'block',
|
375
375
|
selectable: false
|
376
376
|
});
|
377
377
|
export var taskItem = createPMNodeSpecFactory({
|
378
378
|
content: '(inline | unsupportedInline)*',
|
379
|
-
marks: '
|
379
|
+
marks: '_',
|
380
380
|
attrs: {
|
381
381
|
localId: {
|
382
382
|
default: ''
|
@@ -400,6 +400,11 @@ export var taskList = createPMNodeSpecFactory({
|
|
400
400
|
selectable: false,
|
401
401
|
defining: true
|
402
402
|
});
|
403
|
+
export var paragraphWithNoMarks = createPMNodeSpecFactory({
|
404
|
+
content: '(inline | unsupportedInline)*',
|
405
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
406
|
+
selectable: false
|
407
|
+
});
|
403
408
|
export var bulletList = createPMNodeSpecFactory({
|
404
409
|
content: 'listItem+',
|
405
410
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
@@ -407,8 +412,8 @@ export var bulletList = createPMNodeSpecFactory({
|
|
407
412
|
selectable: false
|
408
413
|
});
|
409
414
|
export var listItem = createPMNodeSpecFactory({
|
410
|
-
content: 'codeBlock | paragraph | mediaSingle |
|
411
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
415
|
+
content: '(codeBlock | paragraph | mediaSingle | unsupportedBlock) (codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | unsupportedBlock)*',
|
416
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
412
417
|
selectable: false,
|
413
418
|
defining: true
|
414
419
|
});
|
@@ -423,8 +428,8 @@ export var orderedList = createPMNodeSpecFactory({
|
|
423
428
|
},
|
424
429
|
selectable: false
|
425
430
|
});
|
426
|
-
export var
|
427
|
-
content: '(paragraph |
|
431
|
+
export var blockquoteWithList = createPMNodeSpecFactory({
|
432
|
+
content: '(paragraph | orderedList | bulletList | unsupportedBlock)+',
|
428
433
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
429
434
|
group: 'block',
|
430
435
|
selectable: false,
|
@@ -432,7 +437,7 @@ export var blockquote = createPMNodeSpecFactory({
|
|
432
437
|
});
|
433
438
|
export var decisionItem = createPMNodeSpecFactory({
|
434
439
|
content: '(inline | unsupportedBlock)*',
|
435
|
-
marks: '
|
440
|
+
marks: '_',
|
436
441
|
attrs: {
|
437
442
|
localId: {
|
438
443
|
default: ''
|
@@ -476,31 +481,6 @@ export var embedCard = createPMNodeSpecFactory({
|
|
476
481
|
},
|
477
482
|
selectable: true
|
478
483
|
});
|
479
|
-
export var extension = createPMNodeSpecFactory({
|
480
|
-
group: 'block',
|
481
|
-
atom: true,
|
482
|
-
attrs: {
|
483
|
-
extensionKey: {
|
484
|
-
default: ''
|
485
|
-
},
|
486
|
-
extensionType: {
|
487
|
-
default: ''
|
488
|
-
},
|
489
|
-
parameters: {
|
490
|
-
default: null
|
491
|
-
},
|
492
|
-
text: {
|
493
|
-
default: null
|
494
|
-
},
|
495
|
-
layout: {
|
496
|
-
default: 'default'
|
497
|
-
},
|
498
|
-
localId: {
|
499
|
-
default: null
|
500
|
-
}
|
501
|
-
},
|
502
|
-
selectable: true
|
503
|
-
});
|
504
484
|
export var extensionWithMarks = createPMNodeSpecFactory({
|
505
485
|
group: 'block',
|
506
486
|
atom: true,
|
@@ -528,7 +508,6 @@ export var extensionWithMarks = createPMNodeSpecFactory({
|
|
528
508
|
});
|
529
509
|
export var heading = createPMNodeSpecFactory({
|
530
510
|
content: '(inline | unsupportedInline)*',
|
531
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
532
511
|
group: 'block',
|
533
512
|
attrs: {
|
534
513
|
level: {
|
@@ -540,7 +519,6 @@ export var heading = createPMNodeSpecFactory({
|
|
540
519
|
});
|
541
520
|
export var headingWithNoMarks = createPMNodeSpecFactory({
|
542
521
|
content: '(inline | unsupportedInline)*',
|
543
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
544
522
|
group: 'block',
|
545
523
|
attrs: {
|
546
524
|
level: {
|
@@ -561,7 +539,7 @@ export var rule = createPMNodeSpecFactory({
|
|
561
539
|
});
|
562
540
|
export var panel = createPMNodeSpecFactory({
|
563
541
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | unsupportedBlock)+',
|
564
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
542
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
565
543
|
group: 'block',
|
566
544
|
attrs: {
|
567
545
|
panelType: {
|
@@ -584,7 +562,6 @@ export var panel = createPMNodeSpecFactory({
|
|
584
562
|
});
|
585
563
|
export var headingWithAlignment = createPMNodeSpecFactory({
|
586
564
|
content: '(inline | unsupportedInline)*',
|
587
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
588
565
|
attrs: {
|
589
566
|
level: {
|
590
567
|
default: 1
|
@@ -595,7 +572,6 @@ export var headingWithAlignment = createPMNodeSpecFactory({
|
|
595
572
|
});
|
596
573
|
export var headingWithIndentation = createPMNodeSpecFactory({
|
597
574
|
content: '(inline | unsupportedInline)*',
|
598
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
599
575
|
attrs: {
|
600
576
|
level: {
|
601
577
|
default: 1
|
@@ -604,9 +580,15 @@ export var headingWithIndentation = createPMNodeSpecFactory({
|
|
604
580
|
selectable: false,
|
605
581
|
defining: true
|
606
582
|
});
|
583
|
+
export var blockquote = createPMNodeSpecFactory({
|
584
|
+
content: '(paragraph | bulletList | orderedList | unsupportedBlock)+',
|
585
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
586
|
+
selectable: false,
|
587
|
+
defining: true
|
588
|
+
});
|
607
589
|
export var nestedExpandWithNoMarks = createPMNodeSpecFactory({
|
608
590
|
content: '(codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | unsupportedBlock)+',
|
609
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
591
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
610
592
|
attrs: {
|
611
593
|
title: {
|
612
594
|
default: ''
|
@@ -620,7 +602,7 @@ export var nestedExpandWithNoMarks = createPMNodeSpecFactory({
|
|
620
602
|
});
|
621
603
|
export var tableCell = createPMNodeSpecFactory({
|
622
604
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | nestedExpand | unsupportedBlock)+',
|
623
|
-
marks: 'unsupportedNodeAttribute unsupportedMark alignment
|
605
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment dataConsumer fragment',
|
624
606
|
attrs: {
|
625
607
|
colspan: {
|
626
608
|
default: 1
|
@@ -629,18 +611,19 @@ export var tableCell = createPMNodeSpecFactory({
|
|
629
611
|
default: 1
|
630
612
|
},
|
631
613
|
colwidth: {
|
632
|
-
default:
|
614
|
+
default: null
|
633
615
|
},
|
634
616
|
background: {
|
635
|
-
default:
|
617
|
+
default: null
|
636
618
|
}
|
637
619
|
},
|
638
620
|
selectable: false,
|
639
|
-
isolating: true
|
621
|
+
isolating: true,
|
622
|
+
tableRole: 'cell'
|
640
623
|
});
|
641
624
|
export var tableHeader = createPMNodeSpecFactory({
|
642
625
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | nestedExpand)+',
|
643
|
-
marks: 'unsupportedNodeAttribute unsupportedMark alignment
|
626
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment dataConsumer fragment',
|
644
627
|
attrs: {
|
645
628
|
colspan: {
|
646
629
|
default: 1
|
@@ -649,19 +632,21 @@ export var tableHeader = createPMNodeSpecFactory({
|
|
649
632
|
default: 1
|
650
633
|
},
|
651
634
|
colwidth: {
|
652
|
-
default:
|
635
|
+
default: null
|
653
636
|
},
|
654
637
|
background: {
|
655
|
-
default:
|
638
|
+
default: null
|
656
639
|
}
|
657
640
|
},
|
658
641
|
selectable: false,
|
659
|
-
isolating: true
|
642
|
+
isolating: true,
|
643
|
+
tableRole: 'header_cell'
|
660
644
|
});
|
661
645
|
export var tableRow = createPMNodeSpecFactory({
|
662
646
|
content: '(tableCell | tableHeader)+',
|
663
647
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
664
|
-
selectable: false
|
648
|
+
selectable: false,
|
649
|
+
tableRole: 'row'
|
665
650
|
});
|
666
651
|
export var table = createPMNodeSpecFactory({
|
667
652
|
content: 'tableRow+',
|
@@ -688,39 +673,12 @@ export var table = createPMNodeSpecFactory({
|
|
688
673
|
}
|
689
674
|
},
|
690
675
|
selectable: true,
|
691
|
-
isolating: true
|
692
|
-
|
693
|
-
export var bodiedExtension = createPMNodeSpecFactory({
|
694
|
-
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
695
|
-
marks: 'unsupportedNodeAttribute unsupportedMark link dataConsumer fragment',
|
696
|
-
group: 'block',
|
697
|
-
attrs: {
|
698
|
-
extensionKey: {
|
699
|
-
default: ''
|
700
|
-
},
|
701
|
-
extensionType: {
|
702
|
-
default: ''
|
703
|
-
},
|
704
|
-
parameters: {
|
705
|
-
default: null
|
706
|
-
},
|
707
|
-
text: {
|
708
|
-
default: null
|
709
|
-
},
|
710
|
-
layout: {
|
711
|
-
default: 'default'
|
712
|
-
},
|
713
|
-
localId: {
|
714
|
-
default: null
|
715
|
-
}
|
716
|
-
},
|
717
|
-
selectable: true,
|
718
|
-
defining: true,
|
719
|
-
isolating: true
|
676
|
+
isolating: true,
|
677
|
+
tableRole: 'table'
|
720
678
|
});
|
721
679
|
export var bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
722
680
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
723
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
681
|
+
marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
|
724
682
|
group: 'block',
|
725
683
|
attrs: {
|
726
684
|
extensionKey: {
|
@@ -746,39 +704,9 @@ export var bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
746
704
|
defining: true,
|
747
705
|
isolating: true
|
748
706
|
});
|
749
|
-
export var expand = createPMNodeSpecFactory({
|
750
|
-
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
751
|
-
marks: 'unsupportedNodeAttribute unsupportedMark link dataConsumer fragment',
|
752
|
-
group: 'block',
|
753
|
-
attrs: {
|
754
|
-
title: {
|
755
|
-
default: ''
|
756
|
-
},
|
757
|
-
__expanded: {
|
758
|
-
default: true
|
759
|
-
}
|
760
|
-
},
|
761
|
-
selectable: true,
|
762
|
-
isolating: true
|
763
|
-
});
|
764
|
-
export var expandWithBreakoutMark = createPMNodeSpecFactory({
|
765
|
-
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
766
|
-
marks: 'unsupportedNodeAttribute unsupportedMark link dataConsumer fragment',
|
767
|
-
group: 'block',
|
768
|
-
attrs: {
|
769
|
-
title: {
|
770
|
-
default: ''
|
771
|
-
},
|
772
|
-
__expanded: {
|
773
|
-
default: true
|
774
|
-
}
|
775
|
-
},
|
776
|
-
selectable: true,
|
777
|
-
isolating: true
|
778
|
-
});
|
779
707
|
export var expandWithNoMark = createPMNodeSpecFactory({
|
780
708
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
781
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
709
|
+
marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
|
782
710
|
group: 'block',
|
783
711
|
attrs: {
|
784
712
|
title: {
|
@@ -800,8 +728,8 @@ export var confluenceUnsupportedBlock = createPMNodeSpecFactory({
|
|
800
728
|
}
|
801
729
|
});
|
802
730
|
export var layoutColumn = createPMNodeSpecFactory({
|
803
|
-
content: 'block+',
|
804
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
731
|
+
content: '(block | unsupportedBlock)+',
|
732
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation dataConsumer fragment',
|
805
733
|
attrs: {
|
806
734
|
width: {}
|
807
735
|
},
|
@@ -818,9 +746,9 @@ export var layoutSectionFull = createPMNodeSpecFactory({
|
|
818
746
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
819
747
|
isolating: true
|
820
748
|
});
|
821
|
-
export var
|
822
|
-
content: '(codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | unsupportedBlock)+',
|
823
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
749
|
+
export var expandWithBreakoutMark = createPMNodeSpecFactory({
|
750
|
+
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
751
|
+
marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
|
824
752
|
attrs: {
|
825
753
|
title: {
|
826
754
|
default: ''
|
@@ -832,12 +760,17 @@ export var nestedExpand = createPMNodeSpecFactory({
|
|
832
760
|
selectable: true,
|
833
761
|
isolating: true
|
834
762
|
});
|
835
|
-
export var
|
836
|
-
content: '(
|
837
|
-
|
838
|
-
|
763
|
+
export var codeBlockWithMarks = createPMNodeSpecFactory({
|
764
|
+
content: '(text | unsupportedInline)*',
|
765
|
+
attrs: {
|
766
|
+
language: {
|
767
|
+
default: null
|
768
|
+
}
|
769
|
+
},
|
770
|
+
code: true,
|
771
|
+
defining: true
|
839
772
|
});
|
840
773
|
export var doc = createPMNodeSpecFactory({
|
841
|
-
content: '(block | layoutSection | blockRootOnly |
|
842
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
774
|
+
content: '(block | layoutSection | blockRootOnly | expand | codeBlock | paragraph | unsupportedBlock)+',
|
775
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation dataConsumer fragment breakout'
|
843
776
|
});
|
@@ -18,4 +18,8 @@ import { rule } from '../nodes/rule';
|
|
18
18
|
import { table } from '../nodes/table';
|
19
19
|
import { taskList } from '../nodes/task';
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
21
|
-
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock
|
21
|
+
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), taskList, orderedList, bulletList, blockquote.use('with_list'), decisionList, embedCard,
|
22
|
+
// extension,
|
23
|
+
extension.use('with_marks'), heading, heading.use('with_no_marks'), mediaGroup, rule, panel, table,
|
24
|
+
// bodiedExtension,
|
25
|
+
bodiedExtension.use('with_marks'), expand.use('with_no_mark'), confluenceUnsupportedBlock, unsupportedBlock]);
|
@@ -11,6 +11,4 @@ import { inlineExtension } from '../nodes/inlineExtension';
|
|
11
11
|
import { mediaInline } from '../nodes/mediaInline';
|
12
12
|
import { unsupportedInline } from '../nodes/unsupportedInline';
|
13
13
|
import { confluenceUnsupportedInline } from '../nodes/confluenceUnsupportedInline';
|
14
|
-
export var inlineGroup = adfNodeGroup('inline', [
|
15
|
-
// text,
|
16
|
-
text.use('formatted'), text.use('code_inline'), date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension, inlineExtension.use('with_marks'), mediaInline, confluenceUnsupportedInline, unsupportedInline]);
|
14
|
+
export var inlineGroup = adfNodeGroup('inline', [text, text.use('formatted'), text.use('code_inline'), date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension.use('with_marks'), mediaInline, confluenceUnsupportedInline, unsupportedInline]);
|
@@ -9,10 +9,12 @@ export var blockCard = adfNode('blockCard').define({
|
|
9
9
|
anyOf: [{
|
10
10
|
url: {
|
11
11
|
type: 'string',
|
12
|
-
optional: true
|
12
|
+
optional: true,
|
13
|
+
default: null
|
13
14
|
},
|
14
15
|
datasource: {
|
15
16
|
type: 'object',
|
17
|
+
default: null,
|
16
18
|
additionalProperties: false,
|
17
19
|
properties: {
|
18
20
|
id: {
|
@@ -41,12 +43,14 @@ export var blockCard = adfNode('blockCard').define({
|
|
41
43
|
},
|
42
44
|
width: {
|
43
45
|
type: 'number',
|
44
|
-
optional: true
|
46
|
+
optional: true,
|
47
|
+
default: null
|
45
48
|
},
|
46
49
|
layout: {
|
47
50
|
type: 'enum',
|
48
51
|
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
|
49
|
-
optional: true
|
52
|
+
optional: true,
|
53
|
+
default: null
|
50
54
|
}
|
51
55
|
}, {
|
52
56
|
url: {
|
@@ -19,4 +19,4 @@ export var codeBlock = adfNode('codeBlock').define({
|
|
19
19
|
}).variant('with_marks', {
|
20
20
|
marks: [breakout, unsupportedNodeAttribute, unsupportedMark]
|
21
21
|
}).variant('with_no_marks', {});
|
22
|
-
export var
|
22
|
+
export var codeBlockWithNoMarks = codeBlock;
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { dataConsumer } from '../marks/dataConsumer';
|
3
|
+
import { fragment } from '../marks/fragment';
|
2
4
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
3
5
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
4
6
|
export var inlineExtension = adfNode('inlineExtension').define({
|
@@ -32,4 +34,6 @@ export var inlineExtension = adfNode('inlineExtension').define({
|
|
32
34
|
default: null
|
33
35
|
}
|
34
36
|
}
|
35
|
-
}).variant('with_marks', {
|
37
|
+
}).variant('with_marks', {
|
38
|
+
marks: [dataConsumer, fragment, unsupportedNodeAttribute, unsupportedMark]
|
39
|
+
});
|