@atlaskit/adf-schema 36.14.0 → 36.15.0
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 +12 -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 +136 -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/caption.js +1 -0
- package/dist/cjs/next-schema/nodes/codeBlock.js +2 -2
- package/dist/cjs/next-schema/nodes/decisionItem.js +1 -0
- 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 +2 -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/cjs/next-schema/nodes/task.js +1 -0
- 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 +135 -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/caption.js +1 -0
- package/dist/es2019/next-schema/nodes/codeBlock.js +1 -1
- package/dist/es2019/next-schema/nodes/decisionItem.js +1 -0
- 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 +2 -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/es2019/next-schema/nodes/task.js +1 -0
- 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 +135 -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/caption.js +1 -0
- package/dist/esm/next-schema/nodes/codeBlock.js +1 -1
- package/dist/esm/next-schema/nodes/decisionItem.js +1 -0
- 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 +2 -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/esm/next-schema/nodes/task.js +1 -0
- package/dist/types/next-schema/full-schema.adf.d.ts +3 -0
- 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/groups/nonNestableBlockContentGroup.d.ts +12 -0
- package/dist/types/next-schema/nodes/blockCard.d.ts +3 -0
- package/dist/types/next-schema/nodes/blockquote.d.ts +3 -0
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +3 -0
- package/dist/types/next-schema/nodes/caption.d.ts +3 -0
- package/dist/types/next-schema/nodes/codeBlock.d.ts +7 -1
- package/dist/types/next-schema/nodes/confluenceUnsupportedBlock.d.ts +3 -0
- package/dist/types/next-schema/nodes/confluenceUnsupportedInline.d.ts +3 -0
- package/dist/types/next-schema/nodes/date.d.ts +3 -0
- package/dist/types/next-schema/nodes/decisionItem.d.ts +3 -0
- package/dist/types/next-schema/nodes/decisionList.d.ts +3 -0
- package/dist/types/next-schema/nodes/embedCard.d.ts +3 -0
- package/dist/types/next-schema/nodes/emoji.d.ts +3 -0
- package/dist/types/next-schema/nodes/expand.d.ts +3 -0
- package/dist/types/next-schema/nodes/extension.d.ts +3 -0
- package/dist/types/next-schema/nodes/extensionFrame.d.ts +3 -0
- package/dist/types/next-schema/nodes/hardBreak.d.ts +3 -0
- package/dist/types/next-schema/nodes/heading.d.ts +3 -0
- package/dist/types/next-schema/nodes/inlineCard.d.ts +3 -0
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +5 -0
- package/dist/types/next-schema/nodes/layoutColumn.d.ts +3 -0
- package/dist/types/next-schema/nodes/layoutSection.d.ts +3 -0
- package/dist/types/next-schema/nodes/list.d.ts +6 -0
- package/dist/types/next-schema/nodes/media.d.ts +3 -0
- package/dist/types/next-schema/nodes/mediaGroup.d.ts +3 -0
- package/dist/types/next-schema/nodes/mediaInline.d.ts +3 -0
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +3 -0
- package/dist/types/next-schema/nodes/mention.d.ts +3 -0
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +3 -0
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +3 -0
- package/dist/types/next-schema/nodes/panel.d.ts +3 -0
- package/dist/types/next-schema/nodes/paragraph.d.ts +3 -0
- package/dist/types/next-schema/nodes/placeholder.d.ts +3 -0
- package/dist/types/next-schema/nodes/rule.d.ts +3 -0
- package/dist/types/next-schema/nodes/status.d.ts +3 -0
- package/dist/types/next-schema/nodes/table.d.ts +3 -0
- package/dist/types/next-schema/nodes/tableCell.d.ts +3 -0
- package/dist/types/next-schema/nodes/tableHeader.d.ts +3 -0
- package/dist/types/next-schema/nodes/tableRow.d.ts +3 -0
- package/dist/types/next-schema/nodes/task.d.ts +6 -0
- package/dist/types/next-schema/nodes/text.d.ts +3 -0
- package/dist/types/next-schema/nodes/unsupportedBlock.d.ts +3 -0
- package/dist/types/next-schema/nodes/unsupportedInline.d.ts +3 -0
- package/package.json +2 -2
- 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 +157 -36
@@ -2,10 +2,18 @@ import { createPMNodeSpecFactory } from '@atlaskit/adf-schema-generator';
|
|
2
2
|
export const 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 const blockCard = createPMNodeSpecFactory({
|
|
13
21
|
selectable: true,
|
14
22
|
draggable: true
|
15
23
|
});
|
16
|
-
export const text = createPMNodeSpecFactory({
|
24
|
+
export const text = createPMNodeSpecFactory({
|
25
|
+
group: 'inline'
|
26
|
+
});
|
17
27
|
export const unsupportedInline = createPMNodeSpecFactory({
|
18
28
|
group: 'inline',
|
19
29
|
inline: true,
|
@@ -24,28 +34,6 @@ export const unsupportedInline = createPMNodeSpecFactory({
|
|
24
34
|
},
|
25
35
|
selectable: true
|
26
36
|
});
|
27
|
-
export const 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 const 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 const codeBlockWithNoMarks = createPMNodeSpecFactory({
|
50
38
|
content: '(text | unsupportedInline)*',
|
51
39
|
group: 'block',
|
@@ -57,22 +45,6 @@ export const codeBlockWithNoMarks = createPMNodeSpecFactory({
|
|
57
45
|
code: true,
|
58
46
|
defining: true
|
59
47
|
});
|
60
|
-
export const 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 const media = createPMNodeSpecFactory({
|
77
49
|
attrs: {
|
78
50
|
type: {
|
@@ -103,7 +75,7 @@ export const 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 const media = createPMNodeSpecFactory({
|
|
123
95
|
},
|
124
96
|
selectable: true
|
125
97
|
});
|
98
|
+
export const 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 const unsupportedBlock = createPMNodeSpecFactory({
|
127
117
|
group: 'block',
|
128
118
|
atom: true,
|
@@ -150,7 +140,9 @@ export const 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
|
},
|
@@ -190,7 +182,9 @@ export const date = createPMNodeSpecFactory({
|
|
190
182
|
selectable: true
|
191
183
|
});
|
192
184
|
export const placeholder = createPMNodeSpecFactory({
|
185
|
+
marks: '',
|
193
186
|
group: 'inline',
|
187
|
+
inline: true,
|
194
188
|
attrs: {
|
195
189
|
text: {
|
196
190
|
default: ''
|
@@ -238,12 +232,12 @@ export const textCodeInline = createPMNodeSpecFactory({
|
|
238
232
|
});
|
239
233
|
export const caption = createPMNodeSpecFactory({
|
240
234
|
content: '(hardBreak | mention | emoji | date | placeholder | inlineCard | status | text | unsupportedInline)*',
|
241
|
-
marks: '
|
235
|
+
marks: '_',
|
242
236
|
selectable: false,
|
243
237
|
isolating: true
|
244
238
|
});
|
245
239
|
export const mediaSingleCaption = createPMNodeSpecFactory({
|
246
|
-
content: 'media | unsupportedBlock caption | unsupportedBlock',
|
240
|
+
content: '(media | unsupportedBlock) (caption | unsupportedBlock)',
|
247
241
|
marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
|
248
242
|
group: 'block',
|
249
243
|
atom: false,
|
@@ -261,6 +255,8 @@ export const mediaSingleCaption = createPMNodeSpecFactory({
|
|
261
255
|
selectable: true
|
262
256
|
});
|
263
257
|
export const mediaSingleFull = createPMNodeSpecFactory({
|
258
|
+
content: 'media',
|
259
|
+
marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
|
264
260
|
group: 'block',
|
265
261
|
atom: false,
|
266
262
|
attrs: {
|
@@ -276,7 +272,7 @@ export const mediaSingleFull = createPMNodeSpecFactory({
|
|
276
272
|
},
|
277
273
|
selectable: true
|
278
274
|
});
|
279
|
-
export const
|
275
|
+
export const inlineExtensionWithMarks = createPMNodeSpecFactory({
|
280
276
|
group: 'inline',
|
281
277
|
inline: true,
|
282
278
|
attrs: {
|
@@ -298,51 +294,56 @@ export const inlineExtension = createPMNodeSpecFactory({
|
|
298
294
|
},
|
299
295
|
selectable: true
|
300
296
|
});
|
301
|
-
export const
|
297
|
+
export const mediaInline = createPMNodeSpecFactory({
|
302
298
|
group: 'inline',
|
303
299
|
inline: true,
|
304
300
|
attrs: {
|
305
|
-
|
301
|
+
data: {},
|
302
|
+
type: {
|
303
|
+
default: 'file'
|
304
|
+
},
|
305
|
+
url: {
|
306
|
+
default: null
|
307
|
+
},
|
308
|
+
id: {
|
306
309
|
default: ''
|
307
310
|
},
|
308
|
-
|
311
|
+
alt: {
|
309
312
|
default: ''
|
310
313
|
},
|
311
|
-
|
312
|
-
default:
|
314
|
+
collection: {
|
315
|
+
default: ''
|
313
316
|
},
|
314
|
-
|
317
|
+
occurrenceKey: {
|
315
318
|
default: null
|
316
319
|
},
|
317
|
-
localId: {
|
318
|
-
default: null
|
319
|
-
}
|
320
|
-
},
|
321
|
-
selectable: true
|
322
|
-
});
|
323
|
-
export const mediaInline = createPMNodeSpecFactory({
|
324
|
-
group: 'inline',
|
325
|
-
atom: false,
|
326
|
-
attrs: {
|
327
|
-
data: {},
|
328
|
-
type: {},
|
329
|
-
id: {},
|
330
|
-
alt: {},
|
331
|
-
collection: {},
|
332
|
-
occurrenceKey: {},
|
333
320
|
width: {
|
334
321
|
default: null
|
335
322
|
},
|
336
323
|
height: {
|
337
324
|
default: null
|
338
325
|
},
|
339
|
-
__fileName: {
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
326
|
+
__fileName: {
|
327
|
+
default: null
|
328
|
+
},
|
329
|
+
__fileSize: {
|
330
|
+
default: null
|
331
|
+
},
|
332
|
+
__fileMimeType: {
|
333
|
+
default: null
|
334
|
+
},
|
335
|
+
__displayType: {
|
336
|
+
default: null
|
337
|
+
},
|
338
|
+
__contextId: {
|
339
|
+
default: null
|
340
|
+
},
|
341
|
+
__mediaTraceId: {
|
342
|
+
default: null
|
343
|
+
},
|
344
|
+
__external: {
|
345
|
+
default: false
|
346
|
+
}
|
346
347
|
},
|
347
348
|
selectable: true
|
348
349
|
});
|
@@ -356,27 +357,27 @@ export const confluenceUnsupportedInline = createPMNodeSpecFactory({
|
|
356
357
|
}
|
357
358
|
}
|
358
359
|
});
|
359
|
-
export const
|
360
|
+
export const paragraph = createPMNodeSpecFactory({
|
360
361
|
content: '(inline | unsupportedInline)*',
|
361
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
362
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
362
363
|
group: 'block',
|
363
364
|
selectable: false
|
364
365
|
});
|
365
|
-
export const
|
366
|
+
export const paragraphWithAlignment = createPMNodeSpecFactory({
|
366
367
|
content: '(inline | unsupportedInline)*',
|
367
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
368
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
368
369
|
group: 'block',
|
369
370
|
selectable: false
|
370
371
|
});
|
371
|
-
export const
|
372
|
+
export const paragraphWithIndentation = createPMNodeSpecFactory({
|
372
373
|
content: '(inline | unsupportedInline)*',
|
373
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
374
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
374
375
|
group: 'block',
|
375
376
|
selectable: false
|
376
377
|
});
|
377
378
|
export const taskItem = createPMNodeSpecFactory({
|
378
379
|
content: '(inline | unsupportedInline)*',
|
379
|
-
marks: '
|
380
|
+
marks: '_',
|
380
381
|
attrs: {
|
381
382
|
localId: {
|
382
383
|
default: ''
|
@@ -400,6 +401,11 @@ export const taskList = createPMNodeSpecFactory({
|
|
400
401
|
selectable: false,
|
401
402
|
defining: true
|
402
403
|
});
|
404
|
+
export const paragraphWithNoMarks = createPMNodeSpecFactory({
|
405
|
+
content: '(inline | unsupportedInline)*',
|
406
|
+
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
407
|
+
selectable: false
|
408
|
+
});
|
403
409
|
export const bulletList = createPMNodeSpecFactory({
|
404
410
|
content: 'listItem+',
|
405
411
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
@@ -407,8 +413,8 @@ export const bulletList = createPMNodeSpecFactory({
|
|
407
413
|
selectable: false
|
408
414
|
});
|
409
415
|
export const listItem = createPMNodeSpecFactory({
|
410
|
-
content: 'codeBlock | paragraph | mediaSingle |
|
411
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
416
|
+
content: '(codeBlock | paragraph | mediaSingle | unsupportedBlock) (codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | unsupportedBlock)*',
|
417
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
412
418
|
selectable: false,
|
413
419
|
defining: true
|
414
420
|
});
|
@@ -423,8 +429,8 @@ export const orderedList = createPMNodeSpecFactory({
|
|
423
429
|
},
|
424
430
|
selectable: false
|
425
431
|
});
|
426
|
-
export const
|
427
|
-
content: '(paragraph |
|
432
|
+
export const blockquoteWithList = createPMNodeSpecFactory({
|
433
|
+
content: '(paragraph | orderedList | bulletList | unsupportedBlock)+',
|
428
434
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
429
435
|
group: 'block',
|
430
436
|
selectable: false,
|
@@ -432,7 +438,7 @@ export const blockquote = createPMNodeSpecFactory({
|
|
432
438
|
});
|
433
439
|
export const decisionItem = createPMNodeSpecFactory({
|
434
440
|
content: '(inline | unsupportedBlock)*',
|
435
|
-
marks: '
|
441
|
+
marks: '_',
|
436
442
|
attrs: {
|
437
443
|
localId: {
|
438
444
|
default: ''
|
@@ -476,31 +482,6 @@ export const embedCard = createPMNodeSpecFactory({
|
|
476
482
|
},
|
477
483
|
selectable: true
|
478
484
|
});
|
479
|
-
export const 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
485
|
export const extensionWithMarks = createPMNodeSpecFactory({
|
505
486
|
group: 'block',
|
506
487
|
atom: true,
|
@@ -528,7 +509,6 @@ export const extensionWithMarks = createPMNodeSpecFactory({
|
|
528
509
|
});
|
529
510
|
export const heading = createPMNodeSpecFactory({
|
530
511
|
content: '(inline | unsupportedInline)*',
|
531
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
532
512
|
group: 'block',
|
533
513
|
attrs: {
|
534
514
|
level: {
|
@@ -540,7 +520,6 @@ export const heading = createPMNodeSpecFactory({
|
|
540
520
|
});
|
541
521
|
export const headingWithNoMarks = createPMNodeSpecFactory({
|
542
522
|
content: '(inline | unsupportedInline)*',
|
543
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
544
523
|
group: 'block',
|
545
524
|
attrs: {
|
546
525
|
level: {
|
@@ -561,7 +540,7 @@ export const rule = createPMNodeSpecFactory({
|
|
561
540
|
});
|
562
541
|
export const panel = createPMNodeSpecFactory({
|
563
542
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | unsupportedBlock)+',
|
564
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
543
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
565
544
|
group: 'block',
|
566
545
|
attrs: {
|
567
546
|
panelType: {
|
@@ -584,7 +563,6 @@ export const panel = createPMNodeSpecFactory({
|
|
584
563
|
});
|
585
564
|
export const headingWithAlignment = createPMNodeSpecFactory({
|
586
565
|
content: '(inline | unsupportedInline)*',
|
587
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
588
566
|
attrs: {
|
589
567
|
level: {
|
590
568
|
default: 1
|
@@ -595,7 +573,6 @@ export const headingWithAlignment = createPMNodeSpecFactory({
|
|
595
573
|
});
|
596
574
|
export const headingWithIndentation = createPMNodeSpecFactory({
|
597
575
|
content: '(inline | unsupportedInline)*',
|
598
|
-
marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code border',
|
599
576
|
attrs: {
|
600
577
|
level: {
|
601
578
|
default: 1
|
@@ -604,9 +581,15 @@ export const headingWithIndentation = createPMNodeSpecFactory({
|
|
604
581
|
selectable: false,
|
605
582
|
defining: true
|
606
583
|
});
|
584
|
+
export const blockquote = createPMNodeSpecFactory({
|
585
|
+
content: '(paragraph | bulletList | orderedList | unsupportedBlock)+',
|
586
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
587
|
+
selectable: false,
|
588
|
+
defining: true
|
589
|
+
});
|
607
590
|
export const nestedExpandWithNoMarks = createPMNodeSpecFactory({
|
608
591
|
content: '(codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | unsupportedBlock)+',
|
609
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
592
|
+
marks: 'unsupportedNodeAttribute unsupportedMark',
|
610
593
|
attrs: {
|
611
594
|
title: {
|
612
595
|
default: ''
|
@@ -620,7 +603,7 @@ export const nestedExpandWithNoMarks = createPMNodeSpecFactory({
|
|
620
603
|
});
|
621
604
|
export const tableCell = createPMNodeSpecFactory({
|
622
605
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | nestedExpand | unsupportedBlock)+',
|
623
|
-
marks: 'unsupportedNodeAttribute unsupportedMark alignment
|
606
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment dataConsumer fragment',
|
624
607
|
attrs: {
|
625
608
|
colspan: {
|
626
609
|
default: 1
|
@@ -629,18 +612,19 @@ export const tableCell = createPMNodeSpecFactory({
|
|
629
612
|
default: 1
|
630
613
|
},
|
631
614
|
colwidth: {
|
632
|
-
default:
|
615
|
+
default: null
|
633
616
|
},
|
634
617
|
background: {
|
635
|
-
default:
|
618
|
+
default: null
|
636
619
|
}
|
637
620
|
},
|
638
621
|
selectable: false,
|
639
|
-
isolating: true
|
622
|
+
isolating: true,
|
623
|
+
tableRole: 'cell'
|
640
624
|
});
|
641
625
|
export const tableHeader = createPMNodeSpecFactory({
|
642
626
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | nestedExpand)+',
|
643
|
-
marks: 'unsupportedNodeAttribute unsupportedMark alignment
|
627
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment dataConsumer fragment',
|
644
628
|
attrs: {
|
645
629
|
colspan: {
|
646
630
|
default: 1
|
@@ -649,19 +633,21 @@ export const tableHeader = createPMNodeSpecFactory({
|
|
649
633
|
default: 1
|
650
634
|
},
|
651
635
|
colwidth: {
|
652
|
-
default:
|
636
|
+
default: null
|
653
637
|
},
|
654
638
|
background: {
|
655
|
-
default:
|
639
|
+
default: null
|
656
640
|
}
|
657
641
|
},
|
658
642
|
selectable: false,
|
659
|
-
isolating: true
|
643
|
+
isolating: true,
|
644
|
+
tableRole: 'header_cell'
|
660
645
|
});
|
661
646
|
export const tableRow = createPMNodeSpecFactory({
|
662
647
|
content: '(tableCell | tableHeader)+',
|
663
648
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
664
|
-
selectable: false
|
649
|
+
selectable: false,
|
650
|
+
tableRole: 'row'
|
665
651
|
});
|
666
652
|
export const table = createPMNodeSpecFactory({
|
667
653
|
content: 'tableRow+',
|
@@ -688,39 +674,12 @@ export const table = createPMNodeSpecFactory({
|
|
688
674
|
}
|
689
675
|
},
|
690
676
|
selectable: true,
|
691
|
-
isolating: true
|
692
|
-
|
693
|
-
export const 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
|
677
|
+
isolating: true,
|
678
|
+
tableRole: 'table'
|
720
679
|
});
|
721
680
|
export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
722
681
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
723
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
682
|
+
marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
|
724
683
|
group: 'block',
|
725
684
|
attrs: {
|
726
685
|
extensionKey: {
|
@@ -746,39 +705,9 @@ export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
746
705
|
defining: true,
|
747
706
|
isolating: true
|
748
707
|
});
|
749
|
-
export const 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 const 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
708
|
export const expandWithNoMark = createPMNodeSpecFactory({
|
780
709
|
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
781
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
710
|
+
marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
|
782
711
|
group: 'block',
|
783
712
|
attrs: {
|
784
713
|
title: {
|
@@ -800,8 +729,8 @@ export const confluenceUnsupportedBlock = createPMNodeSpecFactory({
|
|
800
729
|
}
|
801
730
|
});
|
802
731
|
export const layoutColumn = createPMNodeSpecFactory({
|
803
|
-
content: 'block+',
|
804
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
732
|
+
content: '(block | unsupportedBlock)+',
|
733
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation dataConsumer fragment',
|
805
734
|
attrs: {
|
806
735
|
width: {}
|
807
736
|
},
|
@@ -818,9 +747,9 @@ export const layoutSectionFull = createPMNodeSpecFactory({
|
|
818
747
|
marks: 'unsupportedNodeAttribute unsupportedMark',
|
819
748
|
isolating: true
|
820
749
|
});
|
821
|
-
export const
|
822
|
-
content: '(codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | unsupportedBlock)+',
|
823
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
750
|
+
export const expandWithBreakoutMark = createPMNodeSpecFactory({
|
751
|
+
content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
|
752
|
+
marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
|
824
753
|
attrs: {
|
825
754
|
title: {
|
826
755
|
default: ''
|
@@ -832,12 +761,17 @@ export const nestedExpand = createPMNodeSpecFactory({
|
|
832
761
|
selectable: true,
|
833
762
|
isolating: true
|
834
763
|
});
|
835
|
-
export const
|
836
|
-
content: '(
|
837
|
-
|
838
|
-
|
764
|
+
export const codeBlockWithMarks = createPMNodeSpecFactory({
|
765
|
+
content: '(text | unsupportedInline)*',
|
766
|
+
attrs: {
|
767
|
+
language: {
|
768
|
+
default: null
|
769
|
+
}
|
770
|
+
},
|
771
|
+
code: true,
|
772
|
+
defining: true
|
839
773
|
});
|
840
774
|
export const doc = createPMNodeSpecFactory({
|
841
|
-
content: '(block | layoutSection | blockRootOnly |
|
842
|
-
marks: 'unsupportedNodeAttribute unsupportedMark
|
775
|
+
content: '(block | layoutSection | blockRootOnly | expand | codeBlock | paragraph | unsupportedBlock)+',
|
776
|
+
marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation dataConsumer fragment breakout'
|
843
777
|
});
|
@@ -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 const blockGroup = adfNodeGroup('block', [blockCard, codeBlock
|
21
|
+
export const 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 const 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 const 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 const 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 const 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: {
|
@@ -14,5 +14,6 @@ export const caption = adfNode('caption').define({
|
|
14
14
|
isolating: true,
|
15
15
|
selectable: false,
|
16
16
|
marks: [unsupportedNodeAttribute, unsupportedMark],
|
17
|
+
allowAnyChildMark: true,
|
17
18
|
content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline'), unsupportedInline))]
|
18
19
|
});
|
@@ -19,4 +19,4 @@ export const codeBlock = adfNode('codeBlock').define({
|
|
19
19
|
}).variant('with_marks', {
|
20
20
|
marks: [breakout, unsupportedNodeAttribute, unsupportedMark]
|
21
21
|
}).variant('with_no_marks', {});
|
22
|
-
export const
|
22
|
+
export const codeBlockWithNoMarks = codeBlock;
|