@atlaskit/adf-schema 36.13.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/next-schema/full-schema.adf.js +3 -2
  3. package/dist/cjs/next-schema/generated/markTypes.js +38 -21
  4. package/dist/cjs/next-schema/generated/nodeTypes.js +210 -226
  5. package/dist/cjs/next-schema/groups/blockGroup.js +5 -1
  6. package/dist/cjs/next-schema/groups/inlineGroup.js +1 -3
  7. package/dist/cjs/next-schema/nodes/blockCard.js +7 -3
  8. package/dist/cjs/next-schema/nodes/codeBlock.js +2 -2
  9. package/dist/cjs/next-schema/nodes/inlineExtension.js +5 -1
  10. package/dist/cjs/next-schema/nodes/layoutColumn.js +2 -1
  11. package/dist/cjs/next-schema/nodes/media.js +2 -2
  12. package/dist/cjs/next-schema/nodes/mediaInline.js +29 -12
  13. package/dist/cjs/next-schema/nodes/mediaSingle.js +2 -1
  14. package/dist/cjs/next-schema/nodes/mention.js +2 -1
  15. package/dist/cjs/next-schema/nodes/placeholder.js +1 -0
  16. package/dist/cjs/next-schema/nodes/table.js +1 -0
  17. package/dist/cjs/next-schema/nodes/tableCell.js +2 -2
  18. package/dist/cjs/next-schema/nodes/tableHeader.js +2 -2
  19. package/dist/cjs/next-schema/nodes/tableRow.js +2 -1
  20. package/dist/es2019/next-schema/full-schema.adf.js +3 -2
  21. package/dist/es2019/next-schema/generated/markTypes.js +37 -20
  22. package/dist/es2019/next-schema/generated/nodeTypes.js +209 -225
  23. package/dist/es2019/next-schema/groups/blockGroup.js +5 -1
  24. package/dist/es2019/next-schema/groups/inlineGroup.js +1 -3
  25. package/dist/es2019/next-schema/nodes/blockCard.js +7 -3
  26. package/dist/es2019/next-schema/nodes/codeBlock.js +1 -1
  27. package/dist/es2019/next-schema/nodes/inlineExtension.js +5 -1
  28. package/dist/es2019/next-schema/nodes/layoutColumn.js +2 -1
  29. package/dist/es2019/next-schema/nodes/media.js +2 -2
  30. package/dist/es2019/next-schema/nodes/mediaInline.js +29 -12
  31. package/dist/es2019/next-schema/nodes/mediaSingle.js +2 -1
  32. package/dist/es2019/next-schema/nodes/mention.js +2 -1
  33. package/dist/es2019/next-schema/nodes/placeholder.js +1 -0
  34. package/dist/es2019/next-schema/nodes/table.js +1 -0
  35. package/dist/es2019/next-schema/nodes/tableCell.js +2 -2
  36. package/dist/es2019/next-schema/nodes/tableHeader.js +2 -2
  37. package/dist/es2019/next-schema/nodes/tableRow.js +2 -1
  38. package/dist/esm/next-schema/full-schema.adf.js +3 -2
  39. package/dist/esm/next-schema/generated/markTypes.js +37 -20
  40. package/dist/esm/next-schema/generated/nodeTypes.js +209 -225
  41. package/dist/esm/next-schema/groups/blockGroup.js +5 -1
  42. package/dist/esm/next-schema/groups/inlineGroup.js +1 -3
  43. package/dist/esm/next-schema/nodes/blockCard.js +7 -3
  44. package/dist/esm/next-schema/nodes/codeBlock.js +1 -1
  45. package/dist/esm/next-schema/nodes/inlineExtension.js +5 -1
  46. package/dist/esm/next-schema/nodes/layoutColumn.js +2 -1
  47. package/dist/esm/next-schema/nodes/media.js +2 -2
  48. package/dist/esm/next-schema/nodes/mediaInline.js +29 -12
  49. package/dist/esm/next-schema/nodes/mediaSingle.js +2 -1
  50. package/dist/esm/next-schema/nodes/mention.js +2 -1
  51. package/dist/esm/next-schema/nodes/placeholder.js +1 -0
  52. package/dist/esm/next-schema/nodes/table.js +1 -0
  53. package/dist/esm/next-schema/nodes/tableCell.js +2 -2
  54. package/dist/esm/next-schema/nodes/tableHeader.js +2 -2
  55. package/dist/esm/next-schema/nodes/tableRow.js +2 -1
  56. package/dist/types/next-schema/generated/markTypes.d.ts +56 -33
  57. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +4 -4
  58. package/dist/types/next-schema/generated/nodeTypes.d.ts +165 -156
  59. package/dist/types/next-schema/nodes/codeBlock.d.ts +1 -1
  60. package/dist/types/next-schema/nodes/inlineExtension.d.ts +2 -0
  61. package/package.json +2 -2
  62. package/schema-generators/__tests__/helpers/_utils.ts +123 -0
  63. package/schema-generators/__tests__/helpers/utils.unit.ts +66 -0
  64. package/schema-generators/__tests__/unit/json-full-schema.unit.ts +1142 -1231
  65. package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +162 -36
@@ -2,40 +2,40 @@ import { createPMNodeSpecFactory } from '@atlaskit/adf-schema-generator';
2
2
  export const blockCard = createPMNodeSpecFactory({
3
3
  group: 'block',
4
4
  attrs: {
5
- url: {},
6
- datasource: {},
7
- width: {},
8
- layout: {},
9
- data: {}
5
+ url: {
6
+ default: null
7
+ },
8
+ datasource: {
9
+ default: null
10
+ },
11
+ width: {
12
+ default: null
13
+ },
14
+ layout: {
15
+ default: null
16
+ },
17
+ data: {
18
+ default: null
19
+ }
10
20
  },
11
21
  selectable: true,
12
22
  draggable: true
13
23
  });
14
- export const text = createPMNodeSpecFactory({});
15
- export const codeBlock = createPMNodeSpecFactory({
16
- content: 'text*',
17
- group: 'block',
18
- attrs: {
19
- language: {
20
- default: null
21
- }
22
- },
23
- code: true,
24
- defining: true
24
+ export const text = createPMNodeSpecFactory({
25
+ group: 'inline'
25
26
  });
26
- export const codeBlockWithMarks = createPMNodeSpecFactory({
27
- content: 'text*',
28
- group: 'block',
27
+ export const unsupportedInline = createPMNodeSpecFactory({
28
+ group: 'inline',
29
+ inline: true,
29
30
  attrs: {
30
- language: {
31
- default: null
31
+ originalValue: {
32
+ default: {}
32
33
  }
33
34
  },
34
- code: true,
35
- defining: true
35
+ selectable: true
36
36
  });
37
37
  export const codeBlockWithNoMarks = createPMNodeSpecFactory({
38
- content: 'text*',
38
+ content: '(text | unsupportedInline)*',
39
39
  group: 'block',
40
40
  attrs: {
41
41
  language: {
@@ -45,34 +45,18 @@ export const codeBlockWithNoMarks = createPMNodeSpecFactory({
45
45
  code: true,
46
46
  defining: true
47
47
  });
48
- export const mediaSingle = createPMNodeSpecFactory({
49
- group: 'block',
50
- atom: false,
51
- attrs: {
52
- width: {
53
- default: null
54
- },
55
- layout: {
56
- default: 'center'
57
- },
58
- widthType: {
59
- default: 'pixel'
60
- }
61
- },
62
- selectable: true
63
- });
64
48
  export const media = createPMNodeSpecFactory({
65
49
  attrs: {
66
50
  type: {
67
51
  default: 'file'
68
52
  },
69
- alt: {
53
+ id: {
70
54
  default: ''
71
55
  },
72
- collection: {
56
+ alt: {
73
57
  default: ''
74
58
  },
75
- id: {
59
+ collection: {
76
60
  default: ''
77
61
  },
78
62
  height: {
@@ -91,7 +75,7 @@ export const media = createPMNodeSpecFactory({
91
75
  default: null
92
76
  },
93
77
  __external: {
94
- default: null
78
+ default: false
95
79
  },
96
80
  __fileMimeType: {
97
81
  default: null
@@ -111,6 +95,34 @@ export const media = createPMNodeSpecFactory({
111
95
  },
112
96
  selectable: true
113
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
+ });
116
+ export const unsupportedBlock = createPMNodeSpecFactory({
117
+ group: 'block',
118
+ atom: true,
119
+ attrs: {
120
+ originalValue: {
121
+ default: {}
122
+ }
123
+ },
124
+ selectable: true
125
+ });
114
126
  export const hardBreak = createPMNodeSpecFactory({
115
127
  group: 'inline',
116
128
  inline: true,
@@ -128,7 +140,9 @@ export const mention = createPMNodeSpecFactory({
128
140
  id: {
129
141
  default: ''
130
142
  },
131
- localId: {},
143
+ localId: {
144
+ default: null
145
+ },
132
146
  text: {
133
147
  default: ''
134
148
  },
@@ -169,6 +183,7 @@ export const date = createPMNodeSpecFactory({
169
183
  });
170
184
  export const placeholder = createPMNodeSpecFactory({
171
185
  group: 'inline',
186
+ inline: true,
172
187
  attrs: {
173
188
  text: {
174
189
  default: ''
@@ -215,14 +230,14 @@ export const textCodeInline = createPMNodeSpecFactory({
215
230
  group: 'inline'
216
231
  });
217
232
  export const caption = createPMNodeSpecFactory({
218
- content: '(hardBreak | mention | emoji | date | placeholder | inlineCard | status | text)*',
219
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code',
233
+ content: '(hardBreak | mention | emoji | date | placeholder | inlineCard | status | text | unsupportedInline)*',
234
+ marks: '_',
220
235
  selectable: false,
221
236
  isolating: true
222
237
  });
223
238
  export const mediaSingleCaption = createPMNodeSpecFactory({
224
- content: 'media caption',
225
- marks: 'link annotation border',
239
+ content: '(media | unsupportedBlock) (caption | unsupportedBlock)',
240
+ marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
226
241
  group: 'block',
227
242
  atom: false,
228
243
  attrs: {
@@ -239,6 +254,8 @@ export const mediaSingleCaption = createPMNodeSpecFactory({
239
254
  selectable: true
240
255
  });
241
256
  export const mediaSingleFull = createPMNodeSpecFactory({
257
+ content: 'media',
258
+ marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
242
259
  group: 'block',
243
260
  atom: false,
244
261
  attrs: {
@@ -254,14 +271,14 @@ export const mediaSingleFull = createPMNodeSpecFactory({
254
271
  },
255
272
  selectable: true
256
273
  });
257
- export const inlineExtension = createPMNodeSpecFactory({
274
+ export const inlineExtensionWithMarks = createPMNodeSpecFactory({
258
275
  group: 'inline',
259
276
  inline: true,
260
277
  attrs: {
261
- extensionType: {
278
+ extensionKey: {
262
279
  default: ''
263
280
  },
264
- extensionKey: {
281
+ extensionType: {
265
282
  default: ''
266
283
  },
267
284
  parameters: {
@@ -276,75 +293,90 @@ export const inlineExtension = createPMNodeSpecFactory({
276
293
  },
277
294
  selectable: true
278
295
  });
279
- export const inlineExtensionWithMarks = createPMNodeSpecFactory({
296
+ export const mediaInline = createPMNodeSpecFactory({
280
297
  group: 'inline',
281
298
  inline: true,
282
299
  attrs: {
283
- extensionType: {
300
+ data: {},
301
+ type: {
302
+ default: 'file'
303
+ },
304
+ url: {
305
+ default: null
306
+ },
307
+ id: {
284
308
  default: ''
285
309
  },
286
- extensionKey: {
310
+ alt: {
287
311
  default: ''
288
312
  },
289
- parameters: {
313
+ collection: {
314
+ default: ''
315
+ },
316
+ occurrenceKey: {
290
317
  default: null
291
318
  },
292
- text: {
319
+ width: {
293
320
  default: null
294
321
  },
295
- localId: {
322
+ height: {
323
+ default: null
324
+ },
325
+ __fileName: {
326
+ default: null
327
+ },
328
+ __fileSize: {
329
+ default: null
330
+ },
331
+ __fileMimeType: {
332
+ default: null
333
+ },
334
+ __displayType: {
296
335
  default: null
336
+ },
337
+ __contextId: {
338
+ default: null
339
+ },
340
+ __mediaTraceId: {
341
+ default: null
342
+ },
343
+ __external: {
344
+ default: false
297
345
  }
298
346
  },
299
347
  selectable: true
300
348
  });
301
- export const mediaInline = createPMNodeSpecFactory({
349
+ export const confluenceUnsupportedInline = createPMNodeSpecFactory({
302
350
  group: 'inline',
303
- atom: false,
351
+ inline: true,
352
+ atom: true,
304
353
  attrs: {
305
- data: {},
306
- type: {},
307
- id: {},
308
- alt: {},
309
- collection: {},
310
- occurrenceKey: {},
311
- width: {
354
+ cxhtml: {
312
355
  default: null
313
- },
314
- height: {
315
- default: null
316
- },
317
- __fileName: {},
318
- __fileSize: {},
319
- __fileMimeType: {},
320
- __displayType: {},
321
- __contextId: {},
322
- __mediaTraceId: {},
323
- __external: {}
324
- },
325
- selectable: true
356
+ }
357
+ }
326
358
  });
327
- export const paragraphWithAlignment = createPMNodeSpecFactory({
328
- content: 'inline*',
329
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
359
+ export const paragraph = createPMNodeSpecFactory({
360
+ content: '(inline | unsupportedInline)*',
361
+ marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
330
362
  group: 'block',
331
363
  selectable: false
332
364
  });
333
- export const paragraphWithIndentation = createPMNodeSpecFactory({
334
- content: 'inline*',
335
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
365
+ export const paragraphWithAlignment = createPMNodeSpecFactory({
366
+ content: '(inline | unsupportedInline)*',
367
+ marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
336
368
  group: 'block',
337
369
  selectable: false
338
370
  });
339
- export const paragraphWithNoMarks = createPMNodeSpecFactory({
340
- content: 'inline*',
341
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
371
+ export const paragraphWithIndentation = createPMNodeSpecFactory({
372
+ content: '(inline | unsupportedInline)*',
373
+ marks: 'link em strong strike subsup underline textColor annotation backgroundColor unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
342
374
  group: 'block',
343
375
  selectable: false
344
376
  });
345
377
  export const taskItem = createPMNodeSpecFactory({
346
- content: 'inline*',
347
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
378
+ content: '(inline | unsupportedInline)*',
379
+ marks: '_',
348
380
  attrs: {
349
381
  localId: {
350
382
  default: ''
@@ -357,7 +389,8 @@ export const taskItem = createPMNodeSpecFactory({
357
389
  defining: true
358
390
  });
359
391
  export const taskList = createPMNodeSpecFactory({
360
- content: 'taskItem+ (taskItem | taskList)*',
392
+ content: '(taskItem | unsupportedBlock)+ (taskItem | taskList | unsupportedBlock)*',
393
+ marks: 'unsupportedNodeAttribute unsupportedMark',
361
394
  group: 'block',
362
395
  attrs: {
363
396
  localId: {
@@ -367,19 +400,26 @@ export const taskList = createPMNodeSpecFactory({
367
400
  selectable: false,
368
401
  defining: true
369
402
  });
403
+ export const 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
+ });
370
408
  export const bulletList = createPMNodeSpecFactory({
371
409
  content: 'listItem+',
410
+ marks: 'unsupportedNodeAttribute unsupportedMark',
372
411
  group: 'block',
373
412
  selectable: false
374
413
  });
375
414
  export const listItem = createPMNodeSpecFactory({
376
- content: 'codeBlock | paragraph | mediaSingle | mediaSingle (codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList)*',
377
- marks: 'link',
415
+ content: '(codeBlock | paragraph | mediaSingle | unsupportedBlock) (codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | unsupportedBlock)*',
416
+ marks: 'unsupportedNodeAttribute unsupportedMark',
378
417
  selectable: false,
379
418
  defining: true
380
419
  });
381
420
  export const orderedList = createPMNodeSpecFactory({
382
421
  content: 'listItem+',
422
+ marks: 'unsupportedNodeAttribute unsupportedMark',
383
423
  group: 'block',
384
424
  attrs: {
385
425
  order: {
@@ -388,15 +428,16 @@ export const orderedList = createPMNodeSpecFactory({
388
428
  },
389
429
  selectable: false
390
430
  });
391
- export const blockquote = createPMNodeSpecFactory({
392
- content: '(paragraph | bulletList | orderedList)+',
431
+ export const blockquoteWithList = createPMNodeSpecFactory({
432
+ content: '(paragraph | orderedList | bulletList | unsupportedBlock)+',
433
+ marks: 'unsupportedNodeAttribute unsupportedMark',
393
434
  group: 'block',
394
435
  selectable: false,
395
436
  defining: true
396
437
  });
397
438
  export const decisionItem = createPMNodeSpecFactory({
398
- content: 'inline*',
399
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
439
+ content: '(inline | unsupportedBlock)*',
440
+ marks: '_',
400
441
  attrs: {
401
442
  localId: {
402
443
  default: ''
@@ -408,7 +449,8 @@ export const decisionItem = createPMNodeSpecFactory({
408
449
  defining: true
409
450
  });
410
451
  export const decisionList = createPMNodeSpecFactory({
411
- content: 'decisionItem+',
452
+ content: '(decisionItem | unsupportedBlock)+',
453
+ marks: 'unsupportedNodeAttribute unsupportedMark',
412
454
  group: 'block',
413
455
  attrs: {
414
456
  localId: {
@@ -439,41 +481,16 @@ export const embedCard = createPMNodeSpecFactory({
439
481
  },
440
482
  selectable: true
441
483
  });
442
- export const extension = createPMNodeSpecFactory({
484
+ export const extensionWithMarks = createPMNodeSpecFactory({
443
485
  group: 'block',
444
486
  atom: true,
445
487
  attrs: {
446
- extensionType: {
447
- default: ''
448
- },
449
488
  extensionKey: {
450
489
  default: ''
451
490
  },
452
- parameters: {
453
- default: null
454
- },
455
- text: {
456
- default: null
457
- },
458
- layout: {
459
- default: 'default'
460
- },
461
- localId: {
462
- default: null
463
- }
464
- },
465
- selectable: true
466
- });
467
- export const extensionWithMarks = createPMNodeSpecFactory({
468
- group: 'block',
469
- atom: true,
470
- attrs: {
471
491
  extensionType: {
472
492
  default: ''
473
493
  },
474
- extensionKey: {
475
- default: ''
476
- },
477
494
  parameters: {
478
495
  default: null
479
496
  },
@@ -490,8 +507,7 @@ export const extensionWithMarks = createPMNodeSpecFactory({
490
507
  selectable: true
491
508
  });
492
509
  export const heading = createPMNodeSpecFactory({
493
- content: 'inline*',
494
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
510
+ content: '(inline | unsupportedInline)*',
495
511
  group: 'block',
496
512
  attrs: {
497
513
  level: {
@@ -502,8 +518,7 @@ export const heading = createPMNodeSpecFactory({
502
518
  defining: true
503
519
  });
504
520
  export const headingWithNoMarks = createPMNodeSpecFactory({
505
- content: 'inline*',
506
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
521
+ content: '(inline | unsupportedInline)*',
507
522
  group: 'block',
508
523
  attrs: {
509
524
  level: {
@@ -514,8 +529,8 @@ export const headingWithNoMarks = createPMNodeSpecFactory({
514
529
  defining: true
515
530
  });
516
531
  export const mediaGroup = createPMNodeSpecFactory({
517
- content: 'media+',
518
- marks: 'link annotation border',
532
+ content: '(media | unsupportedBlock)+',
533
+ marks: 'link annotation border unsupportedNodeAttribute unsupportedMark',
519
534
  group: 'block',
520
535
  selectable: false
521
536
  });
@@ -523,8 +538,8 @@ export const rule = createPMNodeSpecFactory({
523
538
  group: 'block'
524
539
  });
525
540
  export const panel = createPMNodeSpecFactory({
526
- content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule)+',
527
- marks: 'link',
541
+ content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | unsupportedBlock)+',
542
+ marks: 'unsupportedNodeAttribute unsupportedMark',
528
543
  group: 'block',
529
544
  attrs: {
530
545
  panelType: {
@@ -546,8 +561,7 @@ export const panel = createPMNodeSpecFactory({
546
561
  selectable: true
547
562
  });
548
563
  export const headingWithAlignment = createPMNodeSpecFactory({
549
- content: 'inline*',
550
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
564
+ content: '(inline | unsupportedInline)*',
551
565
  attrs: {
552
566
  level: {
553
567
  default: 1
@@ -557,8 +571,7 @@ export const headingWithAlignment = createPMNodeSpecFactory({
557
571
  defining: true
558
572
  });
559
573
  export const headingWithIndentation = createPMNodeSpecFactory({
560
- content: 'inline*',
561
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
574
+ content: '(inline | unsupportedInline)*',
562
575
  attrs: {
563
576
  level: {
564
577
  default: 1
@@ -567,9 +580,15 @@ export const headingWithIndentation = createPMNodeSpecFactory({
567
580
  selectable: false,
568
581
  defining: true
569
582
  });
583
+ export const blockquote = createPMNodeSpecFactory({
584
+ content: '(paragraph | bulletList | orderedList | unsupportedBlock)+',
585
+ marks: 'unsupportedNodeAttribute unsupportedMark',
586
+ selectable: false,
587
+ defining: true
588
+ });
570
589
  export const nestedExpandWithNoMarks = createPMNodeSpecFactory({
571
- content: '(codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote)+',
572
- marks: 'link',
590
+ content: '(codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | unsupportedBlock)+',
591
+ marks: 'unsupportedNodeAttribute unsupportedMark',
573
592
  attrs: {
574
593
  title: {
575
594
  default: ''
@@ -582,8 +601,8 @@ export const nestedExpandWithNoMarks = createPMNodeSpecFactory({
582
601
  isolating: true
583
602
  });
584
603
  export const tableCell = createPMNodeSpecFactory({
585
- content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | nestedExpand)+',
586
- marks: 'alignment link indentation dataConsumer fragment',
604
+ content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | nestedExpand | unsupportedBlock)+',
605
+ marks: 'unsupportedNodeAttribute unsupportedMark alignment dataConsumer fragment',
587
606
  attrs: {
588
607
  colspan: {
589
608
  default: 1
@@ -592,18 +611,19 @@ export const tableCell = createPMNodeSpecFactory({
592
611
  default: 1
593
612
  },
594
613
  colwidth: {
595
- default: []
614
+ default: null
596
615
  },
597
616
  background: {
598
- default: ''
617
+ default: null
599
618
  }
600
619
  },
601
620
  selectable: false,
602
- isolating: true
621
+ isolating: true,
622
+ tableRole: 'cell'
603
623
  });
604
624
  export const tableHeader = createPMNodeSpecFactory({
605
625
  content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | nestedExpand)+',
606
- marks: 'alignment link indentation dataConsumer fragment',
626
+ marks: 'unsupportedNodeAttribute unsupportedMark alignment dataConsumer fragment',
607
627
  attrs: {
608
628
  colspan: {
609
629
  default: 1
@@ -612,24 +632,30 @@ export const tableHeader = createPMNodeSpecFactory({
612
632
  default: 1
613
633
  },
614
634
  colwidth: {
615
- default: []
635
+ default: null
616
636
  },
617
637
  background: {
618
- default: ''
638
+ default: null
619
639
  }
620
640
  },
621
641
  selectable: false,
622
- isolating: true
642
+ isolating: true,
643
+ tableRole: 'header_cell'
623
644
  });
624
645
  export const tableRow = createPMNodeSpecFactory({
625
- content: '(tableCell | tableHeader)*',
626
- selectable: false
646
+ content: '(tableCell | tableHeader)+',
647
+ marks: 'unsupportedNodeAttribute unsupportedMark',
648
+ selectable: false,
649
+ tableRole: 'row'
627
650
  });
628
651
  export const table = createPMNodeSpecFactory({
629
652
  content: 'tableRow+',
653
+ marks: 'unsupportedNodeAttribute unsupportedMark',
630
654
  group: 'block',
631
655
  attrs: {
632
- displayMode: {},
656
+ displayMode: {
657
+ default: 'default'
658
+ },
633
659
  isNumberColumnEnabled: {
634
660
  default: false
635
661
  },
@@ -647,47 +673,20 @@ export const table = createPMNodeSpecFactory({
647
673
  }
648
674
  },
649
675
  selectable: true,
650
- isolating: true
676
+ isolating: true,
677
+ tableRole: 'table'
651
678
  });
652
- export const bodiedExtension = createPMNodeSpecFactory({
653
- content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table)+',
654
- marks: 'link dataConsumer fragment',
679
+ export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
680
+ content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
681
+ marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
655
682
  group: 'block',
656
683
  attrs: {
657
- extensionType: {
658
- default: ''
659
- },
660
684
  extensionKey: {
661
685
  default: ''
662
686
  },
663
- parameters: {
664
- default: null
665
- },
666
- text: {
667
- default: null
668
- },
669
- layout: {
670
- default: 'default'
671
- },
672
- localId: {
673
- default: null
674
- }
675
- },
676
- selectable: true,
677
- defining: true,
678
- isolating: true
679
- });
680
- export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
681
- content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table)+',
682
- marks: 'link dataConsumer fragment',
683
- group: 'block',
684
- attrs: {
685
687
  extensionType: {
686
688
  default: ''
687
689
  },
688
- extensionKey: {
689
- default: ''
690
- },
691
690
  parameters: {
692
691
  default: null
693
692
  },
@@ -705,24 +704,9 @@ export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
705
704
  defining: true,
706
705
  isolating: true
707
706
  });
708
- export const expand = createPMNodeSpecFactory({
709
- content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table)+',
710
- marks: 'link dataConsumer fragment',
711
- group: 'block',
712
- attrs: {
713
- title: {
714
- default: ''
715
- },
716
- __expanded: {
717
- default: true
718
- }
719
- },
720
- selectable: true,
721
- isolating: true
722
- });
723
- export const expandWithBreakoutMark = createPMNodeSpecFactory({
724
- content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table)+',
725
- marks: 'link dataConsumer fragment',
707
+ export const expandWithNoMark = createPMNodeSpecFactory({
708
+ content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table | unsupportedBlock)+',
709
+ marks: 'unsupportedNodeAttribute unsupportedMark dataConsumer fragment',
726
710
  group: 'block',
727
711
  attrs: {
728
712
  title: {
@@ -735,24 +719,17 @@ export const expandWithBreakoutMark = createPMNodeSpecFactory({
735
719
  selectable: true,
736
720
  isolating: true
737
721
  });
738
- export const expandWithNoMark = createPMNodeSpecFactory({
739
- content: '(codeBlock | blockCard | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote | extension | embedCard | table)+',
740
- marks: 'link dataConsumer fragment',
722
+ export const confluenceUnsupportedBlock = createPMNodeSpecFactory({
741
723
  group: 'block',
742
724
  attrs: {
743
- title: {
744
- default: ''
745
- },
746
- __expanded: {
747
- default: true
725
+ cxhtml: {
726
+ default: null
748
727
  }
749
- },
750
- selectable: true,
751
- isolating: true
728
+ }
752
729
  });
753
730
  export const layoutColumn = createPMNodeSpecFactory({
754
- content: 'block+',
755
- marks: 'breakout link alignment indentation dataConsumer fragment',
731
+ content: '(block | unsupportedBlock)+',
732
+ marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation dataConsumer fragment',
756
733
  attrs: {
757
734
  width: {}
758
735
  },
@@ -760,16 +737,18 @@ export const layoutColumn = createPMNodeSpecFactory({
760
737
  isolating: true
761
738
  });
762
739
  export const layoutSection = createPMNodeSpecFactory({
763
- content: 'layoutColumn{1,3}',
740
+ content: '(layoutColumn | unsupportedBlock){1,3}',
741
+ marks: 'unsupportedNodeAttribute unsupportedMark',
764
742
  isolating: true
765
743
  });
766
744
  export const layoutSectionFull = createPMNodeSpecFactory({
767
- content: 'layoutColumn{1,3}',
745
+ content: '(layoutColumn | unsupportedBlock){1,3}',
746
+ marks: 'unsupportedNodeAttribute unsupportedMark',
768
747
  isolating: true
769
748
  });
770
- export const nestedExpand = createPMNodeSpecFactory({
771
- content: '(codeBlock | paragraph | mediaSingle | taskList | bulletList | orderedList | heading | mediaGroup | decisionList | rule | panel | blockquote)+',
772
- marks: 'link',
749
+ export const 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',
773
752
  attrs: {
774
753
  title: {
775
754
  default: ''
@@ -781,12 +760,17 @@ export const nestedExpand = createPMNodeSpecFactory({
781
760
  selectable: true,
782
761
  isolating: true
783
762
  });
784
- export const paragraph = createPMNodeSpecFactory({
785
- content: 'inline*',
786
- marks: 'link em strong strike subsup underline textColor annotation backgroundColor code border',
787
- selectable: false
763
+ export const codeBlockWithMarks = createPMNodeSpecFactory({
764
+ content: '(text | unsupportedInline)*',
765
+ attrs: {
766
+ language: {
767
+ default: null
768
+ }
769
+ },
770
+ code: true,
771
+ defining: true
788
772
  });
789
773
  export const doc = createPMNodeSpecFactory({
790
- content: '(block | layoutSection | blockRootOnly | nestedExpand | paragraph)*',
791
- marks: 'breakout link alignment indentation dataConsumer fragment'
774
+ content: '(block | layoutSection | blockRootOnly | expand | codeBlock | paragraph | unsupportedBlock)+',
775
+ marks: 'unsupportedNodeAttribute unsupportedMark alignment indentation dataConsumer fragment breakout'
792
776
  });