@atlaskit/adf-schema 37.0.3 → 37.1.19
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 +145 -0
- package/dist/cjs/next-schema/full-schema.adf.js +1 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +101 -31
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/groups/inlineGroup.js +1 -1
- package/dist/cjs/next-schema/index.js +20 -8
- package/dist/cjs/next-schema/nodes/blockquote.js +3 -2
- package/dist/cjs/next-schema/nodes/bodiedExtension.js +6 -2
- package/dist/cjs/next-schema/nodes/codeBlock.js +10 -3
- package/dist/cjs/next-schema/nodes/date.js +2 -1
- package/dist/cjs/next-schema/nodes/emoji.js +2 -1
- package/dist/cjs/next-schema/nodes/expand.js +11 -3
- package/dist/cjs/next-schema/nodes/extension.js +5 -2
- package/dist/cjs/next-schema/nodes/heading.js +28 -5
- package/dist/cjs/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/cjs/next-schema/nodes/layoutSection.js +15 -2
- package/dist/cjs/next-schema/nodes/list.js +12 -9
- package/dist/cjs/next-schema/nodes/mediaInline.js +2 -1
- package/dist/cjs/next-schema/nodes/mediaSingle.js +75 -4
- package/dist/cjs/next-schema/nodes/mention.js +2 -1
- package/dist/cjs/next-schema/nodes/multiBodiedExtension.js +8 -4
- package/dist/cjs/next-schema/nodes/nestedExpand.js +5 -1
- package/dist/cjs/next-schema/nodes/panel.js +3 -0
- package/dist/cjs/next-schema/nodes/paragraph.js +29 -5
- package/dist/cjs/next-schema/nodes/status.js +2 -1
- package/dist/cjs/next-schema/nodes/tableCell.js +4 -1
- package/dist/cjs/next-schema/nodes/tableHeader.js +5 -2
- package/dist/cjs/next-schema/nodes/task.js +1 -0
- package/dist/cjs/next-schema/nodes/text.js +7 -1
- package/dist/cjs/schema/nodes/media.js +10 -4
- package/dist/cjs/schema/nodes/text.js +1 -0
- package/dist/es2019/next-schema/full-schema.adf.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +100 -30
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/groups/inlineGroup.js +1 -1
- package/dist/es2019/next-schema/index.js +1 -1
- package/dist/es2019/next-schema/nodes/blockquote.js +3 -2
- package/dist/es2019/next-schema/nodes/bodiedExtension.js +6 -2
- package/dist/es2019/next-schema/nodes/codeBlock.js +10 -3
- package/dist/es2019/next-schema/nodes/date.js +2 -1
- package/dist/es2019/next-schema/nodes/emoji.js +2 -1
- package/dist/es2019/next-schema/nodes/expand.js +11 -3
- package/dist/es2019/next-schema/nodes/extension.js +5 -2
- package/dist/es2019/next-schema/nodes/heading.js +27 -4
- package/dist/es2019/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/es2019/next-schema/nodes/layoutSection.js +15 -2
- package/dist/es2019/next-schema/nodes/list.js +12 -9
- package/dist/es2019/next-schema/nodes/mediaInline.js +2 -1
- package/dist/es2019/next-schema/nodes/mediaSingle.js +76 -5
- package/dist/es2019/next-schema/nodes/mention.js +2 -1
- package/dist/es2019/next-schema/nodes/multiBodiedExtension.js +8 -4
- package/dist/es2019/next-schema/nodes/nestedExpand.js +5 -1
- package/dist/es2019/next-schema/nodes/panel.js +3 -0
- package/dist/es2019/next-schema/nodes/paragraph.js +29 -5
- package/dist/es2019/next-schema/nodes/status.js +2 -1
- package/dist/es2019/next-schema/nodes/tableCell.js +4 -1
- package/dist/es2019/next-schema/nodes/tableHeader.js +5 -2
- package/dist/es2019/next-schema/nodes/task.js +1 -0
- package/dist/es2019/next-schema/nodes/text.js +7 -1
- package/dist/es2019/schema/nodes/media.js +3 -1
- package/dist/es2019/schema/nodes/text.js +1 -0
- package/dist/esm/next-schema/full-schema.adf.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +100 -30
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/groups/inlineGroup.js +1 -1
- package/dist/esm/next-schema/index.js +1 -1
- package/dist/esm/next-schema/nodes/blockquote.js +3 -2
- package/dist/esm/next-schema/nodes/bodiedExtension.js +6 -2
- package/dist/esm/next-schema/nodes/codeBlock.js +10 -3
- package/dist/esm/next-schema/nodes/date.js +2 -1
- package/dist/esm/next-schema/nodes/emoji.js +2 -1
- package/dist/esm/next-schema/nodes/expand.js +11 -3
- package/dist/esm/next-schema/nodes/extension.js +5 -2
- package/dist/esm/next-schema/nodes/heading.js +27 -4
- package/dist/esm/next-schema/nodes/inlineExtension.js +1 -0
- package/dist/esm/next-schema/nodes/layoutSection.js +15 -2
- package/dist/esm/next-schema/nodes/list.js +12 -9
- package/dist/esm/next-schema/nodes/mediaInline.js +2 -1
- package/dist/esm/next-schema/nodes/mediaSingle.js +76 -5
- package/dist/esm/next-schema/nodes/mention.js +2 -1
- package/dist/esm/next-schema/nodes/multiBodiedExtension.js +8 -4
- package/dist/esm/next-schema/nodes/nestedExpand.js +5 -1
- package/dist/esm/next-schema/nodes/panel.js +3 -0
- package/dist/esm/next-schema/nodes/paragraph.js +29 -5
- package/dist/esm/next-schema/nodes/status.js +2 -1
- package/dist/esm/next-schema/nodes/tableCell.js +4 -1
- package/dist/esm/next-schema/nodes/tableHeader.js +5 -2
- package/dist/esm/next-schema/nodes/task.js +1 -0
- package/dist/esm/next-schema/nodes/text.js +7 -1
- package/dist/esm/schema/nodes/media.js +9 -4
- package/dist/esm/schema/nodes/text.js +1 -0
- package/dist/types/next-schema/full-schema.adf.d.ts +18 -0
- package/dist/types/next-schema/generated/markTypes.d.ts +20 -20
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +145 -96
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +128 -6
- package/dist/types/next-schema/index.d.ts +2 -2
- package/dist/types/next-schema/nodes/blockCard.d.ts +18 -0
- package/dist/types/next-schema/nodes/blockquote.d.ts +20 -1
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +20 -0
- package/dist/types/next-schema/nodes/caption.d.ts +18 -0
- package/dist/types/next-schema/nodes/codeBlock.d.ts +48 -0
- package/dist/types/next-schema/nodes/confluenceJiraIssue.d.ts +18 -0
- package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +18 -0
- package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +18 -0
- package/dist/types/next-schema/nodes/date.d.ts +18 -0
- package/dist/types/next-schema/nodes/decisionItem.d.ts +18 -0
- package/dist/types/next-schema/nodes/decisionList.d.ts +18 -0
- package/dist/types/next-schema/nodes/embedCard.d.ts +18 -0
- package/dist/types/next-schema/nodes/emoji.d.ts +18 -0
- package/dist/types/next-schema/nodes/expand.d.ts +25 -0
- package/dist/types/next-schema/nodes/extension.d.ts +19 -0
- package/dist/types/next-schema/nodes/extensionFrame.d.ts +18 -0
- package/dist/types/next-schema/nodes/hardBreak.d.ts +18 -0
- package/dist/types/next-schema/nodes/heading.d.ts +80 -0
- package/dist/types/next-schema/nodes/image.d.ts +18 -0
- package/dist/types/next-schema/nodes/inlineCard.d.ts +18 -0
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +18 -0
- package/dist/types/next-schema/nodes/layoutColumn.d.ts +18 -0
- package/dist/types/next-schema/nodes/layoutSection.d.ts +22 -0
- package/dist/types/next-schema/nodes/list.d.ts +36 -0
- package/dist/types/next-schema/nodes/media.d.ts +18 -0
- package/dist/types/next-schema/nodes/mediaGroup.d.ts +18 -0
- package/dist/types/next-schema/nodes/mediaInline.d.ts +18 -0
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +67 -1
- package/dist/types/next-schema/nodes/mention.d.ts +18 -0
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +18 -0
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +22 -0
- package/dist/types/next-schema/nodes/panel.d.ts +22 -1
- package/dist/types/next-schema/nodes/paragraph.d.ts +29 -0
- package/dist/types/next-schema/nodes/placeholder.d.ts +18 -0
- package/dist/types/next-schema/nodes/rule.d.ts +18 -0
- package/dist/types/next-schema/nodes/status.d.ts +18 -0
- package/dist/types/next-schema/nodes/table.d.ts +18 -0
- package/dist/types/next-schema/nodes/tableCell.d.ts +18 -0
- package/dist/types/next-schema/nodes/tableHeader.d.ts +18 -0
- package/dist/types/next-schema/nodes/tableRow.d.ts +18 -0
- package/dist/types/next-schema/nodes/task.d.ts +36 -0
- package/dist/types/next-schema/nodes/text.d.ts +22 -1
- package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +18 -0
- package/dist/types/next-schema/nodes/unsupportedInline.d.ts +18 -0
- package/package.json +8 -3
- package/schema-generators/__tests__/unit/__fixtures__/index.fixture.ts +140 -0
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -45
- package/schema-generators/__tests__/unit/adfToValidatorSpecValidation.unit.ts +88 -0
- package/schema-generators/__tests__/unit/json-full-schema-backwards-compat.unit.ts +70 -61
- package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +152 -46
- package/schema-generators/__tests__/unit/jqueries.md +0 -194
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +0 -2320
@@ -29,11 +29,12 @@ export const blockCard = createPMNodeSpecFactory({
|
|
29
29
|
});
|
30
30
|
export const blockquote = createPMNodeSpecFactory({
|
31
31
|
content: '(paragraph | bulletList | orderedList | unsupportedBlock)+',
|
32
|
+
group: 'block',
|
32
33
|
selectable: false,
|
33
34
|
defining: true
|
34
35
|
});
|
35
|
-
export const
|
36
|
-
content: '(paragraph |
|
36
|
+
export const blockquoteLegacy = createPMNodeSpecFactory({
|
37
|
+
content: '(paragraph | unsupportedBlock)+',
|
37
38
|
group: 'block',
|
38
39
|
selectable: false,
|
39
40
|
defining: true
|
@@ -41,6 +42,7 @@ export const blockquoteWithList = createPMNodeSpecFactory({
|
|
41
42
|
export const bodiedExtension = createPMNodeSpecFactory({
|
42
43
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
43
44
|
marks: 'dataConsumer fragment',
|
45
|
+
group: 'block',
|
44
46
|
attrs: {
|
45
47
|
extensionKey: {
|
46
48
|
default: ''
|
@@ -66,7 +68,6 @@ export const bodiedExtension = createPMNodeSpecFactory({
|
|
66
68
|
isolating: true
|
67
69
|
});
|
68
70
|
export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
69
|
-
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
70
71
|
marks: 'dataConsumer fragment',
|
71
72
|
group: 'block',
|
72
73
|
attrs: {
|
@@ -108,6 +109,7 @@ export const caption = createPMNodeSpecFactory({
|
|
108
109
|
export const codeBlock = createPMNodeSpecFactory({
|
109
110
|
content: '(text | unsupportedInline)*',
|
110
111
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
112
|
+
group: 'block',
|
111
113
|
attrs: {
|
112
114
|
language: {
|
113
115
|
default: null
|
@@ -120,7 +122,6 @@ export const codeBlock = createPMNodeSpecFactory({
|
|
120
122
|
defining: true
|
121
123
|
});
|
122
124
|
export const codeBlockWithNoMarks = createPMNodeSpecFactory({
|
123
|
-
content: '(text | unsupportedInline)*',
|
124
125
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
125
126
|
group: 'block',
|
126
127
|
attrs: {
|
@@ -211,7 +212,7 @@ export const decisionList = createPMNodeSpecFactory({
|
|
211
212
|
});
|
212
213
|
export const doc = createPMNodeSpecFactory({
|
213
214
|
content: '(block | layoutSection | blockRootOnly)+',
|
214
|
-
marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation fragment
|
215
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation dataConsumer fragment breakout'
|
215
216
|
});
|
216
217
|
export const embedCard = createPMNodeSpecFactory({
|
217
218
|
group: 'block',
|
@@ -250,7 +251,7 @@ export const emoji = createPMNodeSpecFactory({
|
|
250
251
|
},
|
251
252
|
selectable: true
|
252
253
|
});
|
253
|
-
export const
|
254
|
+
export const expand = createPMNodeSpecFactory({
|
254
255
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
255
256
|
marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
|
256
257
|
group: 'block',
|
@@ -265,7 +266,21 @@ export const expandWithNoMark = createPMNodeSpecFactory({
|
|
265
266
|
selectable: true,
|
266
267
|
isolating: true
|
267
268
|
});
|
269
|
+
export const expandWithNoMark = createPMNodeSpecFactory({
|
270
|
+
group: 'block',
|
271
|
+
attrs: {
|
272
|
+
title: {
|
273
|
+
default: ''
|
274
|
+
},
|
275
|
+
__expanded: {
|
276
|
+
default: true
|
277
|
+
}
|
278
|
+
},
|
279
|
+
selectable: true,
|
280
|
+
isolating: true
|
281
|
+
});
|
268
282
|
export const extension = createPMNodeSpecFactory({
|
283
|
+
group: 'block',
|
269
284
|
atom: true,
|
270
285
|
attrs: {
|
271
286
|
extensionKey: {
|
@@ -330,6 +345,7 @@ export const hardBreak = createPMNodeSpecFactory({
|
|
330
345
|
});
|
331
346
|
export const heading = createPMNodeSpecFactory({
|
332
347
|
content: 'inline*',
|
348
|
+
group: 'block',
|
333
349
|
attrs: {
|
334
350
|
level: {
|
335
351
|
default: 1
|
@@ -342,7 +358,6 @@ export const heading = createPMNodeSpecFactory({
|
|
342
358
|
defining: true
|
343
359
|
});
|
344
360
|
export const headingWithAlignment = createPMNodeSpecFactory({
|
345
|
-
content: 'inline*',
|
346
361
|
group: 'block',
|
347
362
|
attrs: {
|
348
363
|
level: {
|
@@ -356,7 +371,6 @@ export const headingWithAlignment = createPMNodeSpecFactory({
|
|
356
371
|
defining: true
|
357
372
|
});
|
358
373
|
export const headingWithIndentation = createPMNodeSpecFactory({
|
359
|
-
content: 'inline*',
|
360
374
|
group: 'block',
|
361
375
|
attrs: {
|
362
376
|
level: {
|
@@ -370,7 +384,6 @@ export const headingWithIndentation = createPMNodeSpecFactory({
|
|
370
384
|
defining: true
|
371
385
|
});
|
372
386
|
export const headingWithNoMarks = createPMNodeSpecFactory({
|
373
|
-
content: 'inline*',
|
374
387
|
group: 'block',
|
375
388
|
attrs: {
|
376
389
|
level: {
|
@@ -437,15 +450,22 @@ export const inlineExtensionWithMarks = createPMNodeSpecFactory({
|
|
437
450
|
});
|
438
451
|
export const layoutColumn = createPMNodeSpecFactory({
|
439
452
|
content: '(block | unsupportedBlock)+',
|
440
|
-
marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation fragment
|
453
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation dataConsumer fragment',
|
441
454
|
attrs: {
|
442
|
-
width: {
|
455
|
+
width: {
|
456
|
+
default: undefined
|
457
|
+
}
|
443
458
|
},
|
444
459
|
selectable: false,
|
445
460
|
isolating: true
|
446
461
|
});
|
447
462
|
export const layoutSection = createPMNodeSpecFactory({
|
448
|
-
content: '(layoutColumn | unsupportedBlock){1,3}',
|
463
|
+
content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
464
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
465
|
+
isolating: true
|
466
|
+
});
|
467
|
+
export const layoutSectionFull = createPMNodeSpecFactory({
|
468
|
+
content: '(layoutColumn | unsupportedBlock){2,3}',
|
449
469
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
450
470
|
isolating: true
|
451
471
|
});
|
@@ -455,6 +475,12 @@ export const listItem = createPMNodeSpecFactory({
|
|
455
475
|
selectable: false,
|
456
476
|
defining: true
|
457
477
|
});
|
478
|
+
export const listItemLegacy = createPMNodeSpecFactory({
|
479
|
+
content: '(codeBlock | paragraph | mediaSingle | unsupportedBlock) (codeBlock | paragraph | mediaSingle | bulletList | orderedList | unsupportedBlock)*',
|
480
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
481
|
+
selectable: false,
|
482
|
+
defining: true
|
483
|
+
});
|
458
484
|
export const media = createPMNodeSpecFactory({
|
459
485
|
attrs: {
|
460
486
|
type: {
|
@@ -565,24 +591,37 @@ export const mediaInline = createPMNodeSpecFactory({
|
|
565
591
|
selectable: true
|
566
592
|
});
|
567
593
|
export const mediaSingle = createPMNodeSpecFactory({
|
568
|
-
|
569
|
-
|
570
|
-
atom: false,
|
594
|
+
group: 'block',
|
595
|
+
atom: true,
|
571
596
|
attrs: {
|
597
|
+
layout: {
|
598
|
+
default: 'center'
|
599
|
+
},
|
572
600
|
width: {
|
573
601
|
default: null
|
574
|
-
}
|
602
|
+
}
|
603
|
+
},
|
604
|
+
selectable: true,
|
605
|
+
content: 'media|media|unsupportedBlock+ unsupportedBlock+',
|
606
|
+
marks: 'annotation border link unsupportedMark unsupportedNodeAttribute'
|
607
|
+
});
|
608
|
+
export const mediaSingleCaption = createPMNodeSpecFactory({
|
609
|
+
content: 'media|media|unsupportedBlock+ (caption|unsupportedBlock) unsupportedBlock*',
|
610
|
+
marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
|
611
|
+
group: 'block',
|
612
|
+
atom: false,
|
613
|
+
attrs: {
|
575
614
|
layout: {
|
576
615
|
default: 'center'
|
577
616
|
},
|
578
|
-
|
617
|
+
width: {
|
579
618
|
default: null
|
580
619
|
}
|
581
620
|
},
|
582
621
|
selectable: true
|
583
622
|
});
|
584
|
-
export const
|
585
|
-
content: '
|
623
|
+
export const mediaSingleFull = createPMNodeSpecFactory({
|
624
|
+
content: 'media|media|unsupportedBlock+ (caption|unsupportedBlock) unsupportedBlock*',
|
586
625
|
marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
|
587
626
|
group: 'block',
|
588
627
|
atom: false,
|
@@ -599,11 +638,11 @@ export const mediaSingleCaption = createPMNodeSpecFactory({
|
|
599
638
|
},
|
600
639
|
selectable: true
|
601
640
|
});
|
602
|
-
export const
|
603
|
-
content: 'media',
|
641
|
+
export const mediaSingleWidthType = createPMNodeSpecFactory({
|
642
|
+
content: 'media|media|unsupportedBlock+ unsupportedBlock+',
|
604
643
|
marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
|
605
644
|
group: 'block',
|
606
|
-
atom:
|
645
|
+
atom: true,
|
607
646
|
attrs: {
|
608
647
|
width: {
|
609
648
|
default: null
|
@@ -665,7 +704,7 @@ export const multiBodiedExtension = createPMNodeSpecFactory({
|
|
665
704
|
selectable: true,
|
666
705
|
definingAsContext: true
|
667
706
|
});
|
668
|
-
export const
|
707
|
+
export const nestedExpand = createPMNodeSpecFactory({
|
669
708
|
content: '(codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | unsupportedBlock)+',
|
670
709
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
671
710
|
attrs: {
|
@@ -679,6 +718,18 @@ export const nestedExpandWithNoMarks = createPMNodeSpecFactory({
|
|
679
718
|
selectable: true,
|
680
719
|
isolating: true
|
681
720
|
});
|
721
|
+
export const nestedExpandWithNoMarks = createPMNodeSpecFactory({
|
722
|
+
attrs: {
|
723
|
+
title: {
|
724
|
+
default: ''
|
725
|
+
},
|
726
|
+
__expanded: {
|
727
|
+
default: true
|
728
|
+
}
|
729
|
+
},
|
730
|
+
selectable: true,
|
731
|
+
isolating: true
|
732
|
+
});
|
682
733
|
export const orderedList = createPMNodeSpecFactory({
|
683
734
|
content: 'listItem+',
|
684
735
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
@@ -713,6 +764,29 @@ export const panel = createPMNodeSpecFactory({
|
|
713
764
|
},
|
714
765
|
selectable: true
|
715
766
|
});
|
767
|
+
export const panelLegacy = createPMNodeSpecFactory({
|
768
|
+
content: '(blockCard | paragraph | bulletList | orderedList | heading | unsupportedBlock)+',
|
769
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
770
|
+
group: 'block',
|
771
|
+
attrs: {
|
772
|
+
panelType: {
|
773
|
+
default: 'info'
|
774
|
+
},
|
775
|
+
panelIcon: {
|
776
|
+
default: null
|
777
|
+
},
|
778
|
+
panelIconId: {
|
779
|
+
default: null
|
780
|
+
},
|
781
|
+
panelIconText: {
|
782
|
+
default: null
|
783
|
+
},
|
784
|
+
panelColor: {
|
785
|
+
default: null
|
786
|
+
}
|
787
|
+
},
|
788
|
+
selectable: true
|
789
|
+
});
|
716
790
|
export const paragraph = createPMNodeSpecFactory({
|
717
791
|
content: 'inline*',
|
718
792
|
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
@@ -725,8 +799,7 @@ export const paragraph = createPMNodeSpecFactory({
|
|
725
799
|
selectable: false
|
726
800
|
});
|
727
801
|
export const paragraphWithAlignment = createPMNodeSpecFactory({
|
728
|
-
|
729
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
802
|
+
group: 'block',
|
730
803
|
attrs: {
|
731
804
|
localId: {
|
732
805
|
default: null
|
@@ -734,9 +807,7 @@ export const paragraphWithAlignment = createPMNodeSpecFactory({
|
|
734
807
|
},
|
735
808
|
selectable: false
|
736
809
|
});
|
737
|
-
export const
|
738
|
-
content: 'inline*',
|
739
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
810
|
+
export const paragraphWithIndentation = createPMNodeSpecFactory({
|
740
811
|
group: 'block',
|
741
812
|
attrs: {
|
742
813
|
localId: {
|
@@ -746,8 +817,7 @@ export const paragraphWithMarks = createPMNodeSpecFactory({
|
|
746
817
|
selectable: false
|
747
818
|
});
|
748
819
|
export const paragraphWithNoMarks = createPMNodeSpecFactory({
|
749
|
-
|
750
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
820
|
+
group: 'block',
|
751
821
|
attrs: {
|
752
822
|
localId: {
|
753
823
|
default: null
|
@@ -18,4 +18,4 @@ 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 const blockGroup = adfNodeGroup('block', [
|
21
|
+
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('legacy'), table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_no_mark'), expand.use('with_breakout_mark'), confluenceUnsupportedBlock, unsupportedBlock]);
|
@@ -13,4 +13,4 @@ import { unsupportedInline } from '../nodes/unsupportedInline';
|
|
13
13
|
import { confluenceUnsupportedInline } from '../nodes/confluenceUnsupportedInline';
|
14
14
|
import { image } from '../nodes/image';
|
15
15
|
import { confluenceJiraIssue } from '../nodes/confluenceJiraIssue';
|
16
|
-
export const inlineGroup = adfNodeGroup('inline', [text, text.use('formatted'), text.use('code_inline'), date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension.use('with_marks'), mediaInline, image, confluenceJiraIssue, confluenceUnsupportedInline, unsupportedInline]);
|
16
|
+
export const inlineGroup = adfNodeGroup('inline', [text, text.use('link_inline'), text.use('formatted'), text.use('code_inline'), date, emoji, hardBreak, inlineCard, mention, placeholder, status, inlineExtension.use('with_marks'), mediaInline, image, confluenceJiraIssue, confluenceUnsupportedInline, unsupportedInline]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { alignment, annotation, backgroundColor, border, breakout, code, confluenceInlineComment, dataConsumer, em, fragment, indentation, link, strike, strong, subsup, textColor, typeAheadQuery, underline, unsupportedMark, unsupportedNodeAttribute } from './generated/markTypes';
|
2
|
-
export { blockCard, blockquote,
|
2
|
+
export { blockCard, blockquote, blockquoteLegacy, bulletList, bodiedExtension, bodiedExtensionWithMarks, caption, codeBlock, codeBlockWithNoMarks, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, date, decisionItem, decisionList, doc, embedCard, emoji, expandWithNoMark, extension, extensionFrame, extensionWithMarks, hardBreak, heading, headingWithAlignment, headingWithIndentation, headingWithNoMarks, image, inlineCard, inlineExtensionWithMarks, layoutColumn, layoutSection, layoutSectionFull, listItem, listItemLegacy, media, mediaGroup, mediaInline, mediaSingle, mediaSingleCaption, mediaSingleFull, mention, multiBodiedExtension, nestedExpandWithNoMarks, orderedList, panel, panelLegacy, paragraph, paragraphWithAlignment, paragraphWithNoMarks, placeholder, rule, status, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textCodeInline, textFormatted, unsupportedBlock, unsupportedInline } from './generated/nodeTypes';
|
@@ -9,6 +9,7 @@ export const blockquote = adfNode('blockquote').define({
|
|
9
9
|
selectable: false,
|
10
10
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
11
11
|
content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, unsupportedBlock))]
|
12
|
-
}).variant('
|
13
|
-
|
12
|
+
}).variant('legacy', {
|
13
|
+
ignore: ['json-schema', 'validator-spec'],
|
14
|
+
content: [$onePlus($or(paragraph, unsupportedBlock))]
|
14
15
|
});
|
@@ -9,6 +9,7 @@ export const bodiedExtension = adfNode('bodiedExtension').define({
|
|
9
9
|
selectable: true,
|
10
10
|
isolating: true,
|
11
11
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
12
|
+
hasEmptyMarks: true,
|
12
13
|
attrs: {
|
13
14
|
extensionKey: {
|
14
15
|
minLength: 1,
|
@@ -43,7 +44,10 @@ export const bodiedExtension = adfNode('bodiedExtension').define({
|
|
43
44
|
default: null
|
44
45
|
}
|
45
46
|
},
|
46
|
-
content: [$onePlus($or(...nonNestableBlockContent))]
|
47
|
+
content: [$onePlus($or(...nonNestableBlockContent))],
|
48
|
+
ignore: ['json-schema']
|
47
49
|
}).variant('with_marks', {
|
48
|
-
marks: [dataConsumer, fragment, unsupportedNodeAttribute, unsupportedMark]
|
50
|
+
marks: [dataConsumer, fragment, unsupportedNodeAttribute, unsupportedMark],
|
51
|
+
content: [],
|
52
|
+
ignore: []
|
49
53
|
});
|
@@ -20,8 +20,15 @@ export const codeBlock = adfNode('codeBlock').define({
|
|
20
20
|
optional: true
|
21
21
|
}
|
22
22
|
},
|
23
|
-
content: [$zeroPlus($or(text, unsupportedInline))]
|
23
|
+
content: [$zeroPlus($or(text, unsupportedInline))],
|
24
|
+
ignore: ['json-schema']
|
24
25
|
}).variant('with_marks', {
|
25
|
-
marks: [breakout, unsupportedNodeAttribute, unsupportedMark]
|
26
|
-
|
26
|
+
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
27
|
+
ignore: ['pm-spec']
|
28
|
+
}).variant('with_no_marks', {
|
29
|
+
content: [],
|
30
|
+
marks: [],
|
31
|
+
noMarks: true,
|
32
|
+
ignore: []
|
33
|
+
});
|
27
34
|
export const codeBlockWithNoMarks = codeBlock;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { annotation } from '../marks/annotation';
|
2
3
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
3
4
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
4
5
|
export const date = adfNode('date').define({
|
5
6
|
inline: true,
|
6
7
|
selectable: true,
|
7
|
-
marks: [unsupportedNodeAttribute, unsupportedMark],
|
8
|
+
marks: [unsupportedNodeAttribute, unsupportedMark, annotation],
|
8
9
|
attrs: {
|
9
10
|
timestamp: {
|
10
11
|
minLength: 1,
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { adfNode } from '@atlaskit/adf-schema-generator';
|
2
|
+
import { annotation } from '../marks/annotation';
|
2
3
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
3
4
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
4
5
|
export const emoji = adfNode('emoji').define({
|
5
6
|
inline: true,
|
6
7
|
selectable: true,
|
7
|
-
marks: [unsupportedNodeAttribute, unsupportedMark],
|
8
|
+
marks: [unsupportedNodeAttribute, unsupportedMark, annotation],
|
8
9
|
attrs: {
|
9
10
|
shortName: {
|
10
11
|
type: 'string',
|
@@ -19,7 +19,15 @@ export const expand = adfNode('expand').define({
|
|
19
19
|
optional: true
|
20
20
|
}
|
21
21
|
},
|
22
|
-
content: [$onePlus($or(...nonNestableBlockContent))]
|
22
|
+
content: [$onePlus($or(...nonNestableBlockContent))],
|
23
|
+
ignore: ['json-schema']
|
23
24
|
}).variant('with_breakout_mark', {
|
24
|
-
marks: [breakout, unsupportedNodeAttribute, unsupportedMark]
|
25
|
-
|
25
|
+
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
26
|
+
content: [],
|
27
|
+
ignore: ['pm-spec']
|
28
|
+
}).variant('with_no_mark', {
|
29
|
+
content: [],
|
30
|
+
marks: [],
|
31
|
+
noMarks: true,
|
32
|
+
ignore: []
|
33
|
+
});
|
@@ -7,6 +7,7 @@ export const extension = adfNode('extension').define({
|
|
7
7
|
atom: true,
|
8
8
|
selectable: true,
|
9
9
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
10
|
+
hasEmptyMarks: true,
|
10
11
|
attrs: {
|
11
12
|
extensionKey: {
|
12
13
|
minLength: 1,
|
@@ -40,7 +41,9 @@ export const extension = adfNode('extension').define({
|
|
40
41
|
optional: true,
|
41
42
|
default: null
|
42
43
|
}
|
43
|
-
}
|
44
|
+
},
|
45
|
+
ignore: ['json-schema']
|
44
46
|
}).variant('with_marks', {
|
45
|
-
marks: [dataConsumer, fragment, unsupportedNodeAttribute, unsupportedMark]
|
47
|
+
marks: [dataConsumer, fragment, unsupportedNodeAttribute, unsupportedMark],
|
48
|
+
ignore: []
|
46
49
|
});
|
@@ -7,6 +7,7 @@ export const heading = adfNode('heading').define({
|
|
7
7
|
defining: true,
|
8
8
|
selectable: false,
|
9
9
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
10
|
+
hasEmptyMarks: true,
|
10
11
|
attrs: {
|
11
12
|
level: {
|
12
13
|
type: 'number',
|
@@ -20,9 +21,31 @@ export const heading = adfNode('heading').define({
|
|
20
21
|
default: null
|
21
22
|
}
|
22
23
|
},
|
23
|
-
content: [$zeroPlus($or(inlineGroup))]
|
24
|
+
content: [$zeroPlus($or(inlineGroup))],
|
25
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
26
|
+
'validator-spec': {
|
27
|
+
marks: {
|
28
|
+
value: {
|
29
|
+
type: 'array',
|
30
|
+
items: [],
|
31
|
+
optional: true
|
32
|
+
},
|
33
|
+
reason: 'In old types, some nodes have marks: Array<any>, which is not possible to represent in new DSL'
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
24
37
|
}).variant('with_alignment', {
|
25
|
-
marks: [alignment, unsupportedNodeAttribute, unsupportedMark]
|
38
|
+
marks: [alignment, unsupportedNodeAttribute, unsupportedMark],
|
39
|
+
content: [],
|
40
|
+
ignore: []
|
26
41
|
}).variant('with_indentation', {
|
27
|
-
marks: [indentation, unsupportedNodeAttribute, unsupportedMark]
|
28
|
-
|
42
|
+
marks: [indentation, unsupportedNodeAttribute, unsupportedMark],
|
43
|
+
content: [],
|
44
|
+
ignore: []
|
45
|
+
}).variant('with_no_marks', {
|
46
|
+
content: [],
|
47
|
+
marks: [],
|
48
|
+
noMarks: true,
|
49
|
+
ignore: []
|
50
|
+
});
|
51
|
+
export const headingWithMarks = heading;
|
@@ -7,5 +7,18 @@ import { unsupportedBlock } from './unsupportedBlock';
|
|
7
7
|
export const layoutSection = adfNode('layoutSection').define({
|
8
8
|
isolating: true,
|
9
9
|
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
10
|
-
content: [$range(1, 3, $or(layoutColumn, unsupportedBlock))]
|
11
|
-
|
10
|
+
content: [$range(1, 3, $or(layoutColumn, unsupportedBlock))],
|
11
|
+
ignore: ['json-schema'],
|
12
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
13
|
+
'pm-spec': {
|
14
|
+
content: {
|
15
|
+
value: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
|
16
|
+
reason: `The content expression is not correct or redundant around 'unsupportedBlock* | unsupportedBlock+'. This case is not supported by the DSL.`
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}).variant('full', {
|
21
|
+
marks: [breakout, unsupportedNodeAttribute, unsupportedMark],
|
22
|
+
content: [$range(2, 3, $or(layoutColumn, unsupportedBlock))],
|
23
|
+
ignore: []
|
24
|
+
});
|
@@ -8,7 +8,16 @@ import { taskList } from './task';
|
|
8
8
|
import { unsupportedBlock } from './unsupportedBlock';
|
9
9
|
export const orderedList = adfNode('orderedList');
|
10
10
|
export const bulletList = adfNode('bulletList');
|
11
|
-
const listItem = adfNode('listItem')
|
11
|
+
const listItem = adfNode('listItem').define({
|
12
|
+
defining: true,
|
13
|
+
selectable: false,
|
14
|
+
marks: [unsupportedNodeAttribute, unsupportedMark],
|
15
|
+
contentMinItems: 1,
|
16
|
+
content: [$or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), unsupportedBlock), $zeroPlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, unsupportedBlock))]
|
17
|
+
}).variant('legacy', {
|
18
|
+
content: [$or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), unsupportedBlock), $zeroPlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), bulletList, orderedList, unsupportedBlock))],
|
19
|
+
ignore: ['json-schema', 'validator-spec']
|
20
|
+
});
|
12
21
|
orderedList.define({
|
13
22
|
selectable: false,
|
14
23
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
@@ -20,16 +29,10 @@ orderedList.define({
|
|
20
29
|
optional: true
|
21
30
|
}
|
22
31
|
},
|
23
|
-
content: [$onePlus($or(listItem))]
|
32
|
+
content: [$onePlus($or(listItem, listItem.use('legacy')))]
|
24
33
|
});
|
25
34
|
bulletList.define({
|
26
35
|
selectable: false,
|
27
36
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
28
|
-
content: [$onePlus($or(listItem))]
|
29
|
-
});
|
30
|
-
listItem.define({
|
31
|
-
defining: true,
|
32
|
-
selectable: false,
|
33
|
-
marks: [unsupportedNodeAttribute, unsupportedMark],
|
34
|
-
content: [$or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), unsupportedBlock), $zeroPlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, unsupportedBlock))]
|
37
|
+
content: [$onePlus($or(listItem, listItem.use('legacy')))]
|
35
38
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { $or, adfNode } from '@atlaskit/adf-schema-generator';
|
1
|
+
import { $or, $range, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { link } from '../marks/link';
|
3
3
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
4
4
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
@@ -6,8 +6,9 @@ import { caption } from './caption';
|
|
6
6
|
import { media } from './media';
|
7
7
|
import { unsupportedBlock } from './unsupportedBlock';
|
8
8
|
export const mediaSingle = adfNode('mediaSingle').define({
|
9
|
-
atom:
|
9
|
+
atom: true,
|
10
10
|
selectable: true,
|
11
|
+
ignore: ['json-schema'],
|
11
12
|
marks: [link, unsupportedNodeAttribute, unsupportedMark],
|
12
13
|
attrs: {
|
13
14
|
anyOf: [{
|
@@ -47,8 +48,78 @@ export const mediaSingle = adfNode('mediaSingle').define({
|
|
47
48
|
}
|
48
49
|
}]
|
49
50
|
},
|
50
|
-
|
51
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
52
|
+
'pm-spec': {
|
53
|
+
content: {
|
54
|
+
value: 'media|media|unsupportedBlock+ unsupportedBlock+',
|
55
|
+
reason: 'The content expression is not correct or redundant around `media|media|unsupportedBlock+`. This case is not supported by the DSL.'
|
56
|
+
},
|
57
|
+
attrs: {
|
58
|
+
value: {
|
59
|
+
layout: {
|
60
|
+
default: 'center'
|
61
|
+
},
|
62
|
+
width: {
|
63
|
+
default: null
|
64
|
+
}
|
65
|
+
},
|
66
|
+
reason: 'the widthType was not in attrs of original spec'
|
67
|
+
},
|
68
|
+
marks: {
|
69
|
+
value: 'annotation border link unsupportedMark unsupportedNodeAttribute',
|
70
|
+
reason: "Types and PM Spec don't match, in types base mediaSingle doesn't have children, and in ADF DSL marks are derived from children"
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
51
74
|
}).variant('caption', {
|
52
75
|
atom: false,
|
53
|
-
|
54
|
-
|
76
|
+
ignore: [],
|
77
|
+
marks: [],
|
78
|
+
contentMinItems: 1,
|
79
|
+
contentMaxItems: 2,
|
80
|
+
content: [$or(media, unsupportedBlock), $or(caption, unsupportedBlock)],
|
81
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
82
|
+
'pm-spec': {
|
83
|
+
content: {
|
84
|
+
value: 'media|media|unsupportedBlock+ (caption|unsupportedBlock) unsupportedBlock*',
|
85
|
+
reason: 'The content expression is not correct or redundant around `media|media|unsupportedBlock+`. This case is not supported by the DSL.'
|
86
|
+
},
|
87
|
+
attrs: {
|
88
|
+
value: {
|
89
|
+
layout: {
|
90
|
+
default: 'center'
|
91
|
+
},
|
92
|
+
width: {
|
93
|
+
default: null
|
94
|
+
}
|
95
|
+
},
|
96
|
+
reason: 'the widthType was not in attrs of original spec of mediaSingleWithCaption'
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}).variant('full', {
|
101
|
+
atom: false,
|
102
|
+
content: [$range(1, 1, $or(media, unsupportedBlock))],
|
103
|
+
ignore: [],
|
104
|
+
marks: [],
|
105
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
106
|
+
'pm-spec': {
|
107
|
+
content: {
|
108
|
+
value: 'media|media|unsupportedBlock+ (caption|unsupportedBlock) unsupportedBlock*',
|
109
|
+
reason: 'The content expression is not correct or redundant around `media|media|unsupportedBlock+`. This case is not supported by the DSL.'
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}).variant('width_type', {
|
114
|
+
content: [$range(1, 1, $or(media, unsupportedBlock))],
|
115
|
+
ignore: [],
|
116
|
+
marks: [],
|
117
|
+
DANGEROUS_MANUAL_OVERRIDE: {
|
118
|
+
'pm-spec': {
|
119
|
+
content: {
|
120
|
+
value: 'media|media|unsupportedBlock+ unsupportedBlock+',
|
121
|
+
reason: 'The content expression is not correct or redundant around `media|media|unsupportedBlock+`. This case is not supported by the DSL.'
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
});
|