@atlaskit/adf-schema 36.18.3 → 37.0.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/index.js +0 -24
  3. package/dist/cjs/next-schema/generated/nodeTypes.js +32 -0
  4. package/dist/cjs/next-schema/nodes/heading.js +5 -0
  5. package/dist/cjs/next-schema/nodes/paragraph.js +7 -0
  6. package/dist/cjs/schema/create-schema.js +2 -2
  7. package/dist/cjs/schema/default-schema.js +1 -3
  8. package/dist/cjs/schema/index.js +0 -24
  9. package/dist/cjs/schema/nodes/heading.js +2 -51
  10. package/dist/cjs/schema/nodes/index.js +0 -24
  11. package/dist/cjs/schema/nodes/paragraph.js +2 -18
  12. package/dist/es2019/index.js +1 -1
  13. package/dist/es2019/next-schema/generated/nodeTypes.js +32 -0
  14. package/dist/es2019/next-schema/nodes/heading.js +5 -0
  15. package/dist/es2019/next-schema/nodes/paragraph.js +7 -0
  16. package/dist/es2019/schema/create-schema.js +3 -3
  17. package/dist/es2019/schema/default-schema.js +2 -4
  18. package/dist/es2019/schema/index.js +1 -1
  19. package/dist/es2019/schema/nodes/heading.js +2 -48
  20. package/dist/es2019/schema/nodes/index.js +2 -2
  21. package/dist/es2019/schema/nodes/paragraph.js +2 -15
  22. package/dist/esm/index.js +1 -1
  23. package/dist/esm/next-schema/generated/nodeTypes.js +32 -0
  24. package/dist/esm/next-schema/nodes/heading.js +5 -0
  25. package/dist/esm/next-schema/nodes/paragraph.js +7 -0
  26. package/dist/esm/schema/create-schema.js +3 -3
  27. package/dist/esm/schema/default-schema.js +2 -4
  28. package/dist/esm/schema/index.js +1 -1
  29. package/dist/esm/schema/nodes/heading.js +1 -50
  30. package/dist/esm/schema/nodes/index.js +2 -2
  31. package/dist/esm/schema/nodes/paragraph.js +1 -17
  32. package/dist/json-schema/v1/full.json +12 -0
  33. package/dist/types/index.d.ts +1 -1
  34. package/dist/types/next-schema/generated/nodeTypes.d.ts +16 -0
  35. package/dist/types/schema/index.d.ts +1 -1
  36. package/dist/types/schema/nodes/heading.d.ts +1 -3
  37. package/dist/types/schema/nodes/index.d.ts +2 -2
  38. package/dist/types/schema/nodes/paragraph.d.ts +1 -6
  39. package/json-schema/v1/full.json +12 -0
  40. package/package.json +2 -2
  41. package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +7 -1
  42. package/schema-generators/__tests__/unit/json-full-schema.unit.ts +12 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 37.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - bb1cbf4: Promote optional localId attribute in heading and paragraph nodes to full schema
8
+
3
9
  ## 36.18.3
4
10
 
5
11
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -621,18 +621,6 @@ Object.defineProperty(exports, "heading", {
621
621
  return _schema.heading;
622
622
  }
623
623
  });
624
- Object.defineProperty(exports, "headingNodeSpec", {
625
- enumerable: true,
626
- get: function get() {
627
- return _schema.headingNodeSpec;
628
- }
629
- });
630
- Object.defineProperty(exports, "headingStage0", {
631
- enumerable: true,
632
- get: function get() {
633
- return _schema.headingStage0;
634
- }
635
- });
636
624
  Object.defineProperty(exports, "hexToRgb", {
637
625
  enumerable: true,
638
626
  get: function get() {
@@ -867,18 +855,6 @@ Object.defineProperty(exports, "paragraph", {
867
855
  return _schema.paragraph;
868
856
  }
869
857
  });
870
- Object.defineProperty(exports, "paragraphNodeSpec", {
871
- enumerable: true,
872
- get: function get() {
873
- return _schema.paragraphNodeSpec;
874
- }
875
- });
876
- Object.defineProperty(exports, "paragraphStage0", {
877
- enumerable: true,
878
- get: function get() {
879
- return _schema.paragraphStage0;
880
- }
881
- });
882
858
  Object.defineProperty(exports, "placeholder", {
883
859
  enumerable: true,
884
860
  get: function get() {
@@ -289,6 +289,11 @@ var confluenceUnsupportedInline = exports.confluenceUnsupportedInline = (0, _adf
289
289
  var paragraphWithNoMarks = exports.paragraphWithNoMarks = (0, _adfSchemaGenerator.createPMNodeSpecFactory)({
290
290
  content: 'inline*',
291
291
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
292
+ attrs: {
293
+ localId: {
294
+ default: null
295
+ }
296
+ },
292
297
  selectable: false
293
298
  });
294
299
  var media = exports.media = (0, _adfSchemaGenerator.createPMNodeSpecFactory)({
@@ -448,6 +453,9 @@ var headingWithNoMarks = exports.headingWithNoMarks = (0, _adfSchemaGenerator.cr
448
453
  attrs: {
449
454
  level: {
450
455
  default: 1
456
+ },
457
+ localId: {
458
+ default: null
451
459
  }
452
460
  },
453
461
  selectable: false,
@@ -515,12 +523,22 @@ var paragraph = exports.paragraph = (0, _adfSchemaGenerator.createPMNodeSpecFact
515
523
  content: 'inline*',
516
524
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
517
525
  group: 'block',
526
+ attrs: {
527
+ localId: {
528
+ default: null
529
+ }
530
+ },
518
531
  selectable: false
519
532
  });
520
533
  var paragraphWithMarks = exports.paragraphWithMarks = (0, _adfSchemaGenerator.createPMNodeSpecFactory)({
521
534
  content: 'inline*',
522
535
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
523
536
  group: 'block',
537
+ attrs: {
538
+ localId: {
539
+ default: null
540
+ }
541
+ },
524
542
  selectable: false
525
543
  });
526
544
  var blockquoteWithList = exports.blockquoteWithList = (0, _adfSchemaGenerator.createPMNodeSpecFactory)({
@@ -535,6 +553,9 @@ var headingWithAlignment = exports.headingWithAlignment = (0, _adfSchemaGenerato
535
553
  attrs: {
536
554
  level: {
537
555
  default: 1
556
+ },
557
+ localId: {
558
+ default: null
538
559
  }
539
560
  },
540
561
  selectable: false,
@@ -546,6 +567,9 @@ var headingWithIndentation = exports.headingWithIndentation = (0, _adfSchemaGene
546
567
  attrs: {
547
568
  level: {
548
569
  default: 1
570
+ },
571
+ localId: {
572
+ default: null
549
573
  }
550
574
  },
551
575
  selectable: false,
@@ -554,6 +578,11 @@ var headingWithIndentation = exports.headingWithIndentation = (0, _adfSchemaGene
554
578
  var paragraphWithAlignment = exports.paragraphWithAlignment = (0, _adfSchemaGenerator.createPMNodeSpecFactory)({
555
579
  content: 'inline*',
556
580
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
581
+ attrs: {
582
+ localId: {
583
+ default: null
584
+ }
585
+ },
557
586
  selectable: false
558
587
  });
559
588
  var blockquote = exports.blockquote = (0, _adfSchemaGenerator.createPMNodeSpecFactory)({
@@ -794,6 +823,9 @@ var heading = exports.heading = (0, _adfSchemaGenerator.createPMNodeSpecFactory)
794
823
  attrs: {
795
824
  level: {
796
825
  default: 1
826
+ },
827
+ localId: {
828
+ default: null
797
829
  }
798
830
  },
799
831
  selectable: false,
@@ -19,6 +19,11 @@ var heading = exports.heading = (0, _adfSchemaGenerator.adfNode)('heading').defi
19
19
  default: 1,
20
20
  minimum: 1,
21
21
  maximum: 6
22
+ },
23
+ localId: {
24
+ type: 'string',
25
+ optional: true,
26
+ default: null
22
27
  }
23
28
  },
24
29
  content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup))]
@@ -10,6 +10,13 @@ var _alignmentAndIndentation = require("../marks/alignmentAndIndentation");
10
10
  var _unsupportedMark = require("../marks/unsupportedMark");
11
11
  var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
12
12
  var paragraph = exports.paragraph = (0, _adfSchemaGenerator.adfNode)('paragraph').define({
13
+ attrs: {
14
+ localId: {
15
+ type: 'string',
16
+ optional: true,
17
+ default: null
18
+ }
19
+ },
13
20
  selectable: false,
14
21
  marks: [_unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
15
22
  content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup))]
@@ -70,7 +70,7 @@ var nodesInOrder = [{
70
70
  spec: _nodes.doc
71
71
  }, {
72
72
  name: 'paragraph',
73
- spec: (0, _nodes.paragraphNodeSpec)()
73
+ spec: _nodes.paragraph
74
74
  }, {
75
75
  name: 'text',
76
76
  spec: _nodes.text
@@ -85,7 +85,7 @@ var nodesInOrder = [{
85
85
  spec: _nodes.listItemWithTask
86
86
  }, {
87
87
  name: 'heading',
88
- spec: (0, _nodes.headingNodeSpec)()
88
+ spec: _nodes.heading
89
89
  }, {
90
90
  name: 'blockquote',
91
91
  spec: _nodes.blockquoteWithList
@@ -25,9 +25,7 @@ var getSchemaBasedOnStage = exports.getSchemaBasedOnStage = (0, _memoizeOne.defa
25
25
  defaultSchemaConfig.customNodeSpecs = {
26
26
  layoutSection: _nodes.layoutSectionWithSingleColumn,
27
27
  multiBodiedExtension: _nodes.multiBodiedExtension,
28
- extensionFrame: _nodes.extensionFrame,
29
- heading: (0, _nodes.headingNodeSpec)('stage0'),
30
- paragraph: (0, _nodes.paragraphNodeSpec)('stage0')
28
+ extensionFrame: _nodes.extensionFrame
31
29
  };
32
30
  }
33
31
  return (0, _createSchema.createSchema)(defaultSchemaConfig);
@@ -309,18 +309,6 @@ Object.defineProperty(exports, "heading", {
309
309
  return _nodes.heading;
310
310
  }
311
311
  });
312
- Object.defineProperty(exports, "headingNodeSpec", {
313
- enumerable: true,
314
- get: function get() {
315
- return _nodes.headingNodeSpec;
316
- }
317
- });
318
- Object.defineProperty(exports, "headingStage0", {
319
- enumerable: true,
320
- get: function get() {
321
- return _nodes.headingStage0;
322
- }
323
- });
324
312
  Object.defineProperty(exports, "image", {
325
313
  enumerable: true,
326
314
  get: function get() {
@@ -507,18 +495,6 @@ Object.defineProperty(exports, "paragraph", {
507
495
  return _nodes.paragraph;
508
496
  }
509
497
  });
510
- Object.defineProperty(exports, "paragraphNodeSpec", {
511
- enumerable: true,
512
- get: function get() {
513
- return _nodes.paragraphNodeSpec;
514
- }
515
- });
516
- Object.defineProperty(exports, "paragraphStage0", {
517
- enumerable: true,
518
- get: function get() {
519
- return _nodes.paragraphStage0;
520
- }
521
- });
522
498
  Object.defineProperty(exports, "placeholder", {
523
499
  enumerable: true,
524
500
  get: function get() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.headingStage0 = exports.headingNodeSpec = exports.heading = void 0;
6
+ exports.heading = void 0;
7
7
  /**
8
8
  * @name heading_node
9
9
  */
@@ -30,7 +30,7 @@ var getAttrs = function getAttrs(level) {
30
30
  };
31
31
  };
32
32
  };
33
- var headingStage0 = exports.headingStage0 = {
33
+ var heading = exports.heading = {
34
34
  attrs: {
35
35
  level: {
36
36
  default: 1
@@ -72,53 +72,4 @@ var headingStage0 = exports.headingStage0 = {
72
72
  }] : [];
73
73
  return [name].concat(attrs, [0]);
74
74
  }
75
- };
76
- var heading = exports.heading = {
77
- attrs: {
78
- level: {
79
- default: 1
80
- }
81
- },
82
- content: "inline*",
83
- group: 'block',
84
- defining: true,
85
- selectable: false,
86
- parseDOM: [{
87
- tag: 'h1',
88
- attrs: {
89
- level: 1
90
- }
91
- }, {
92
- tag: 'h2',
93
- attrs: {
94
- level: 2
95
- }
96
- }, {
97
- tag: 'h3',
98
- attrs: {
99
- level: 3
100
- }
101
- }, {
102
- tag: 'h4',
103
- attrs: {
104
- level: 4
105
- }
106
- }, {
107
- tag: 'h5',
108
- attrs: {
109
- level: 5
110
- }
111
- }, {
112
- tag: 'h6',
113
- attrs: {
114
- level: 6
115
- }
116
- }],
117
- toDOM: function toDOM(node) {
118
- return ['h' + node.attrs['level'], 0];
119
- }
120
- };
121
- var headingNodeSpec = exports.headingNodeSpec = function headingNodeSpec() {
122
- var adfStage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'full';
123
- return adfStage === 'stage0' ? headingStage0 : heading;
124
75
  };
@@ -184,18 +184,6 @@ Object.defineProperty(exports, "heading", {
184
184
  return _heading.heading;
185
185
  }
186
186
  });
187
- Object.defineProperty(exports, "headingNodeSpec", {
188
- enumerable: true,
189
- get: function get() {
190
- return _heading.headingNodeSpec;
191
- }
192
- });
193
- Object.defineProperty(exports, "headingStage0", {
194
- enumerable: true,
195
- get: function get() {
196
- return _heading.headingStage0;
197
- }
198
- });
199
187
  Object.defineProperty(exports, "image", {
200
188
  enumerable: true,
201
189
  get: function get() {
@@ -358,18 +346,6 @@ Object.defineProperty(exports, "paragraph", {
358
346
  return _paragraph.paragraph;
359
347
  }
360
348
  });
361
- Object.defineProperty(exports, "paragraphNodeSpec", {
362
- enumerable: true,
363
- get: function get() {
364
- return _paragraph.paragraphNodeSpec;
365
- }
366
- });
367
- Object.defineProperty(exports, "paragraphStage0", {
368
- enumerable: true,
369
- get: function get() {
370
- return _paragraph.paragraphStage0;
371
- }
372
- });
373
349
  Object.defineProperty(exports, "placeholder", {
374
350
  enumerable: true,
375
351
  get: function get() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.paragraphStage0 = exports.paragraphNodeSpec = exports.paragraph = void 0;
6
+ exports.paragraph = void 0;
7
7
  /**
8
8
  * @name paragraph_node
9
9
  */
@@ -29,7 +29,7 @@ exports.paragraphStage0 = exports.paragraphNodeSpec = exports.paragraph = void 0
29
29
  * @name paragraph_with_indentation_node
30
30
  */
31
31
 
32
- var paragraphStage0 = exports.paragraphStage0 = {
32
+ var paragraph = exports.paragraph = {
33
33
  selectable: false,
34
34
  content: 'inline*',
35
35
  group: 'block',
@@ -58,20 +58,4 @@ var paragraphStage0 = exports.paragraphStage0 = {
58
58
  }] : [];
59
59
  return [name].concat(attrs, [0]);
60
60
  }
61
- };
62
- var paragraph = exports.paragraph = {
63
- selectable: false,
64
- content: 'inline*',
65
- group: 'block',
66
- marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
67
- parseDOM: [{
68
- tag: 'p'
69
- }],
70
- toDOM: function toDOM() {
71
- return ['p', 0];
72
- }
73
- };
74
- var paragraphNodeSpec = exports.paragraphNodeSpec = function paragraphNodeSpec() {
75
- var adfStage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'full';
76
- return adfStage === 'stage0' ? paragraphStage0 : paragraph;
77
61
  };
@@ -1,3 +1,3 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, headingNodeSpec, headingStage0, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, paragraphStage0, paragraphNodeSpec, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette } from './schema';
3
3
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
@@ -283,6 +283,11 @@ export const confluenceUnsupportedInline = createPMNodeSpecFactory({
283
283
  export const paragraphWithNoMarks = createPMNodeSpecFactory({
284
284
  content: 'inline*',
285
285
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
286
+ attrs: {
287
+ localId: {
288
+ default: null
289
+ }
290
+ },
286
291
  selectable: false
287
292
  });
288
293
  export const media = createPMNodeSpecFactory({
@@ -442,6 +447,9 @@ export const headingWithNoMarks = createPMNodeSpecFactory({
442
447
  attrs: {
443
448
  level: {
444
449
  default: 1
450
+ },
451
+ localId: {
452
+ default: null
445
453
  }
446
454
  },
447
455
  selectable: false,
@@ -509,12 +517,22 @@ export const paragraph = createPMNodeSpecFactory({
509
517
  content: 'inline*',
510
518
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
511
519
  group: 'block',
520
+ attrs: {
521
+ localId: {
522
+ default: null
523
+ }
524
+ },
512
525
  selectable: false
513
526
  });
514
527
  export const paragraphWithMarks = createPMNodeSpecFactory({
515
528
  content: 'inline*',
516
529
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
517
530
  group: 'block',
531
+ attrs: {
532
+ localId: {
533
+ default: null
534
+ }
535
+ },
518
536
  selectable: false
519
537
  });
520
538
  export const blockquoteWithList = createPMNodeSpecFactory({
@@ -529,6 +547,9 @@ export const headingWithAlignment = createPMNodeSpecFactory({
529
547
  attrs: {
530
548
  level: {
531
549
  default: 1
550
+ },
551
+ localId: {
552
+ default: null
532
553
  }
533
554
  },
534
555
  selectable: false,
@@ -540,6 +561,9 @@ export const headingWithIndentation = createPMNodeSpecFactory({
540
561
  attrs: {
541
562
  level: {
542
563
  default: 1
564
+ },
565
+ localId: {
566
+ default: null
543
567
  }
544
568
  },
545
569
  selectable: false,
@@ -548,6 +572,11 @@ export const headingWithIndentation = createPMNodeSpecFactory({
548
572
  export const paragraphWithAlignment = createPMNodeSpecFactory({
549
573
  content: 'inline*',
550
574
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
575
+ attrs: {
576
+ localId: {
577
+ default: null
578
+ }
579
+ },
551
580
  selectable: false
552
581
  });
553
582
  export const blockquote = createPMNodeSpecFactory({
@@ -788,6 +817,9 @@ export const heading = createPMNodeSpecFactory({
788
817
  attrs: {
789
818
  level: {
790
819
  default: 1
820
+ },
821
+ localId: {
822
+ default: null
791
823
  }
792
824
  },
793
825
  selectable: false,
@@ -13,6 +13,11 @@ export const heading = adfNode('heading').define({
13
13
  default: 1,
14
14
  minimum: 1,
15
15
  maximum: 6
16
+ },
17
+ localId: {
18
+ type: 'string',
19
+ optional: true,
20
+ default: null
16
21
  }
17
22
  },
18
23
  content: [$zeroPlus($or(inlineGroup))]
@@ -4,6 +4,13 @@ import { alignment, indentation } from '../marks/alignmentAndIndentation';
4
4
  import { unsupportedMark } from '../marks/unsupportedMark';
5
5
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
6
6
  export const paragraph = adfNode('paragraph').define({
7
+ attrs: {
8
+ localId: {
9
+ type: 'string',
10
+ optional: true,
11
+ default: null
12
+ }
13
+ },
7
14
  selectable: false,
8
15
  marks: [unsupportedNodeAttribute, unsupportedMark],
9
16
  content: [$zeroPlus($or(inlineGroup))]
@@ -1,7 +1,7 @@
1
1
  import { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
3
3
  import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
4
- import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraphNodeSpec, text, bulletList, orderedListWithOrder, listItemWithTask, headingNodeSpec, blockquoteWithList, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
4
+ import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItemWithTask, heading, blockquoteWithList, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
5
5
  function addItems(builtInItems, config, customSpecs = {}) {
6
6
  if (!config) {
7
7
  return {};
@@ -54,7 +54,7 @@ const nodesInOrder = [{
54
54
  spec: doc
55
55
  }, {
56
56
  name: 'paragraph',
57
- spec: paragraphNodeSpec()
57
+ spec: paragraph
58
58
  }, {
59
59
  name: 'text',
60
60
  spec: text
@@ -69,7 +69,7 @@ const nodesInOrder = [{
69
69
  spec: listItemWithTask
70
70
  }, {
71
71
  name: 'heading',
72
- spec: headingNodeSpec()
72
+ spec: heading
73
73
  }, {
74
74
  name: 'blockquote',
75
75
  spec: blockquoteWithList
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, headingNodeSpec, layoutSectionWithSingleColumn, multiBodiedExtension, paragraphNodeSpec } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  const getDefaultSchemaConfig = () => {
5
5
  const defaultSchemaConfig = {
@@ -17,9 +17,7 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
17
17
  defaultSchemaConfig.customNodeSpecs = {
18
18
  layoutSection: layoutSectionWithSingleColumn,
19
19
  multiBodiedExtension: multiBodiedExtension,
20
- extensionFrame: extensionFrame,
21
- heading: headingNodeSpec('stage0'),
22
- paragraph: paragraphNodeSpec('stage0')
20
+ extensionFrame: extensionFrame
23
21
  };
24
22
  }
25
23
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, headingNodeSpec, headingStage0, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, paragraphStage0, paragraphNodeSpec, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
1
+ export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
2
2
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
3
  colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette } from './marks';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -22,7 +22,7 @@ const getAttrs = level => domNode => {
22
22
  localId: domNode.getAttribute('data-local-id') || ((_heading$attrs = heading.attrs) === null || _heading$attrs === void 0 ? void 0 : (_heading$attrs$localI = _heading$attrs.localId) === null || _heading$attrs$localI === void 0 ? void 0 : _heading$attrs$localI.default)
23
23
  };
24
24
  };
25
- export const headingStage0 = {
25
+ export const heading = {
26
26
  attrs: {
27
27
  level: {
28
28
  default: 1
@@ -65,50 +65,4 @@ export const headingStage0 = {
65
65
  }] : [];
66
66
  return [name, ...attrs, 0];
67
67
  }
68
- };
69
- export const heading = {
70
- attrs: {
71
- level: {
72
- default: 1
73
- }
74
- },
75
- content: `inline*`,
76
- group: 'block',
77
- defining: true,
78
- selectable: false,
79
- parseDOM: [{
80
- tag: 'h1',
81
- attrs: {
82
- level: 1
83
- }
84
- }, {
85
- tag: 'h2',
86
- attrs: {
87
- level: 2
88
- }
89
- }, {
90
- tag: 'h3',
91
- attrs: {
92
- level: 3
93
- }
94
- }, {
95
- tag: 'h4',
96
- attrs: {
97
- level: 4
98
- }
99
- }, {
100
- tag: 'h5',
101
- attrs: {
102
- level: 5
103
- }
104
- }, {
105
- tag: 'h6',
106
- attrs: {
107
- level: 6
108
- }
109
- }],
110
- toDOM(node) {
111
- return ['h' + node.attrs['level'], 0];
112
- }
113
- };
114
- export const headingNodeSpec = (adfStage = 'full') => adfStage === 'stage0' ? headingStage0 : heading;
68
+ };
@@ -8,10 +8,10 @@ export { blockquoteWithList } from './blockquote';
8
8
  export { bulletList, bulletListSelector } from './bullet-list';
9
9
  export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
10
10
  export { hardBreak } from './hard-break';
11
- export { headingNodeSpec, heading, headingStage0 } from './heading';
11
+ export { heading } from './heading';
12
12
  export { rule } from './rule';
13
13
  export { orderedList, orderedListSelector, orderedListWithOrder } from './ordered-list';
14
- export { paragraph, paragraphStage0, paragraphNodeSpec } from './paragraph';
14
+ export { paragraph } from './paragraph';
15
15
  export { emoji } from './emoji';
16
16
  export { image } from './image';
17
17
  export { mention, toJSON as mentionToJSON } from './mention';
@@ -23,7 +23,7 @@
23
23
  * @name paragraph_with_indentation_node
24
24
  */
25
25
 
26
- export const paragraphStage0 = {
26
+ export const paragraph = {
27
27
  selectable: false,
28
28
  content: 'inline*',
29
29
  group: 'block',
@@ -54,17 +54,4 @@ export const paragraphStage0 = {
54
54
  }] : [];
55
55
  return [name, ...attrs, 0];
56
56
  }
57
- };
58
- export const paragraph = {
59
- selectable: false,
60
- content: 'inline*',
61
- group: 'block',
62
- marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
63
- parseDOM: [{
64
- tag: 'p'
65
- }],
66
- toDOM() {
67
- return ['p', 0];
68
- }
69
- };
70
- export const paragraphNodeSpec = (adfStage = 'full') => adfStage === 'stage0' ? paragraphStage0 : paragraph;
57
+ };
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, headingNodeSpec, headingStage0, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, paragraphStage0, paragraphNodeSpec, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette } from './schema';
3
3
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
@@ -283,6 +283,11 @@ export var confluenceUnsupportedInline = createPMNodeSpecFactory({
283
283
  export var paragraphWithNoMarks = createPMNodeSpecFactory({
284
284
  content: 'inline*',
285
285
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
286
+ attrs: {
287
+ localId: {
288
+ default: null
289
+ }
290
+ },
286
291
  selectable: false
287
292
  });
288
293
  export var media = createPMNodeSpecFactory({
@@ -442,6 +447,9 @@ export var headingWithNoMarks = createPMNodeSpecFactory({
442
447
  attrs: {
443
448
  level: {
444
449
  default: 1
450
+ },
451
+ localId: {
452
+ default: null
445
453
  }
446
454
  },
447
455
  selectable: false,
@@ -509,12 +517,22 @@ export var paragraph = createPMNodeSpecFactory({
509
517
  content: 'inline*',
510
518
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
511
519
  group: 'block',
520
+ attrs: {
521
+ localId: {
522
+ default: null
523
+ }
524
+ },
512
525
  selectable: false
513
526
  });
514
527
  export var paragraphWithMarks = createPMNodeSpecFactory({
515
528
  content: 'inline*',
516
529
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
517
530
  group: 'block',
531
+ attrs: {
532
+ localId: {
533
+ default: null
534
+ }
535
+ },
518
536
  selectable: false
519
537
  });
520
538
  export var blockquoteWithList = createPMNodeSpecFactory({
@@ -529,6 +547,9 @@ export var headingWithAlignment = createPMNodeSpecFactory({
529
547
  attrs: {
530
548
  level: {
531
549
  default: 1
550
+ },
551
+ localId: {
552
+ default: null
532
553
  }
533
554
  },
534
555
  selectable: false,
@@ -540,6 +561,9 @@ export var headingWithIndentation = createPMNodeSpecFactory({
540
561
  attrs: {
541
562
  level: {
542
563
  default: 1
564
+ },
565
+ localId: {
566
+ default: null
543
567
  }
544
568
  },
545
569
  selectable: false,
@@ -548,6 +572,11 @@ export var headingWithIndentation = createPMNodeSpecFactory({
548
572
  export var paragraphWithAlignment = createPMNodeSpecFactory({
549
573
  content: 'inline*',
550
574
  marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
575
+ attrs: {
576
+ localId: {
577
+ default: null
578
+ }
579
+ },
551
580
  selectable: false
552
581
  });
553
582
  export var blockquote = createPMNodeSpecFactory({
@@ -788,6 +817,9 @@ export var heading = createPMNodeSpecFactory({
788
817
  attrs: {
789
818
  level: {
790
819
  default: 1
820
+ },
821
+ localId: {
822
+ default: null
791
823
  }
792
824
  },
793
825
  selectable: false,
@@ -13,6 +13,11 @@ export var heading = adfNode('heading').define({
13
13
  default: 1,
14
14
  minimum: 1,
15
15
  maximum: 6
16
+ },
17
+ localId: {
18
+ type: 'string',
19
+ optional: true,
20
+ default: null
16
21
  }
17
22
  },
18
23
  content: [$zeroPlus($or(inlineGroup))]
@@ -4,6 +4,13 @@ import { alignment, indentation } from '../marks/alignmentAndIndentation';
4
4
  import { unsupportedMark } from '../marks/unsupportedMark';
5
5
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
6
6
  export var paragraph = adfNode('paragraph').define({
7
+ attrs: {
8
+ localId: {
9
+ type: 'string',
10
+ optional: true,
11
+ default: null
12
+ }
13
+ },
7
14
  selectable: false,
8
15
  marks: [unsupportedNodeAttribute, unsupportedMark],
9
16
  content: [$zeroPlus($or(inlineGroup))]
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { Schema } from '@atlaskit/editor-prosemirror/model';
5
5
  import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
6
6
  import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
7
- import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraphNodeSpec, text, bulletList, orderedListWithOrder, listItemWithTask, headingNodeSpec, blockquoteWithList, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
7
+ import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItemWithTask, heading, blockquoteWithList, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
8
8
  function addItems(builtInItems, config) {
9
9
  var customSpecs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
10
10
  if (!config) {
@@ -59,7 +59,7 @@ var nodesInOrder = [{
59
59
  spec: doc
60
60
  }, {
61
61
  name: 'paragraph',
62
- spec: paragraphNodeSpec()
62
+ spec: paragraph
63
63
  }, {
64
64
  name: 'text',
65
65
  spec: text
@@ -74,7 +74,7 @@ var nodesInOrder = [{
74
74
  spec: listItemWithTask
75
75
  }, {
76
76
  name: 'heading',
77
- spec: headingNodeSpec()
77
+ spec: heading
78
78
  }, {
79
79
  name: 'blockquote',
80
80
  spec: blockquoteWithList
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, headingNodeSpec, layoutSectionWithSingleColumn, multiBodiedExtension, paragraphNodeSpec } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
5
5
  var defaultSchemaConfig = {
@@ -18,9 +18,7 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
18
18
  defaultSchemaConfig.customNodeSpecs = {
19
19
  layoutSection: layoutSectionWithSingleColumn,
20
20
  multiBodiedExtension: multiBodiedExtension,
21
- extensionFrame: extensionFrame,
22
- heading: headingNodeSpec('stage0'),
23
- paragraph: paragraphNodeSpec('stage0')
21
+ extensionFrame: extensionFrame
24
22
  };
25
23
  }
26
24
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, headingNodeSpec, headingStage0, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, paragraphStage0, paragraphNodeSpec, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
1
+ export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
2
2
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
3
  colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette } from './marks';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -24,7 +24,7 @@ var getAttrs = function getAttrs(level) {
24
24
  };
25
25
  };
26
26
  };
27
- export var headingStage0 = {
27
+ export var heading = {
28
28
  attrs: {
29
29
  level: {
30
30
  default: 1
@@ -66,53 +66,4 @@ export var headingStage0 = {
66
66
  }] : [];
67
67
  return [name].concat(attrs, [0]);
68
68
  }
69
- };
70
- export var heading = {
71
- attrs: {
72
- level: {
73
- default: 1
74
- }
75
- },
76
- content: "inline*",
77
- group: 'block',
78
- defining: true,
79
- selectable: false,
80
- parseDOM: [{
81
- tag: 'h1',
82
- attrs: {
83
- level: 1
84
- }
85
- }, {
86
- tag: 'h2',
87
- attrs: {
88
- level: 2
89
- }
90
- }, {
91
- tag: 'h3',
92
- attrs: {
93
- level: 3
94
- }
95
- }, {
96
- tag: 'h4',
97
- attrs: {
98
- level: 4
99
- }
100
- }, {
101
- tag: 'h5',
102
- attrs: {
103
- level: 5
104
- }
105
- }, {
106
- tag: 'h6',
107
- attrs: {
108
- level: 6
109
- }
110
- }],
111
- toDOM: function toDOM(node) {
112
- return ['h' + node.attrs['level'], 0];
113
- }
114
- };
115
- export var headingNodeSpec = function headingNodeSpec() {
116
- var adfStage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'full';
117
- return adfStage === 'stage0' ? headingStage0 : heading;
118
69
  };
@@ -8,10 +8,10 @@ export { blockquoteWithList } from './blockquote';
8
8
  export { bulletList, bulletListSelector } from './bullet-list';
9
9
  export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
10
10
  export { hardBreak } from './hard-break';
11
- export { headingNodeSpec, heading, headingStage0 } from './heading';
11
+ export { heading } from './heading';
12
12
  export { rule } from './rule';
13
13
  export { orderedList, orderedListSelector, orderedListWithOrder } from './ordered-list';
14
- export { paragraph, paragraphStage0, paragraphNodeSpec } from './paragraph';
14
+ export { paragraph } from './paragraph';
15
15
  export { emoji } from './emoji';
16
16
  export { image } from './image';
17
17
  export { mention, toJSON as mentionToJSON } from './mention';
@@ -23,7 +23,7 @@
23
23
  * @name paragraph_with_indentation_node
24
24
  */
25
25
 
26
- export var paragraphStage0 = {
26
+ export var paragraph = {
27
27
  selectable: false,
28
28
  content: 'inline*',
29
29
  group: 'block',
@@ -52,20 +52,4 @@ export var paragraphStage0 = {
52
52
  }] : [];
53
53
  return [name].concat(attrs, [0]);
54
54
  }
55
- };
56
- export var paragraph = {
57
- selectable: false,
58
- content: 'inline*',
59
- group: 'block',
60
- marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
61
- parseDOM: [{
62
- tag: 'p'
63
- }],
64
- toDOM: function toDOM() {
65
- return ['p', 0];
66
- }
67
- };
68
- export var paragraphNodeSpec = function paragraphNodeSpec() {
69
- var adfStage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'full';
70
- return adfStage === 'stage0' ? paragraphStage0 : paragraph;
71
55
  };
@@ -1226,6 +1226,15 @@
1226
1226
  "$ref": "#/definitions/inline_node"
1227
1227
  }
1228
1228
  },
1229
+ "attrs": {
1230
+ "type": "object",
1231
+ "properties": {
1232
+ "localId": {
1233
+ "type": "string"
1234
+ }
1235
+ },
1236
+ "additionalProperties": false
1237
+ },
1229
1238
  "marks": {
1230
1239
  "type": "array"
1231
1240
  }
@@ -1705,6 +1714,9 @@
1705
1714
  "type": "number",
1706
1715
  "minimum": 1,
1707
1716
  "maximum": 6
1717
+ },
1718
+ "localId": {
1719
+ "type": "string"
1708
1720
  }
1709
1721
  },
1710
1722
  "required": [
@@ -1,6 +1,6 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
2
2
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, headingNodeSpec, headingStage0, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, paragraphStage0, paragraphNodeSpec, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, } from './schema';
3
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, } from './schema';
4
4
  export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, MultiBodiedExtensionDefinition, ExtensionFrameDefinition, BackgroundColorDefinition, } from './schema';
5
5
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor, } from './utils';
6
6
  export type { Match, NameToEmoji } from './utils';
@@ -207,6 +207,9 @@ export interface ParagraphWithNoMarksDefinition {
207
207
  type: 'paragraph';
208
208
  content: Array<InlineDefinition>;
209
209
  marks: Array<UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
210
+ attrs: {
211
+ localId?: string;
212
+ };
210
213
  }
211
214
  export type ParagraphWithNoMarksNode = PMNode & ParagraphWithNoMarksDefinition;
212
215
  export declare const paragraphWithNoMarks: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<ParagraphWithNoMarksNode>) => import("prosemirror-model").NodeSpec;
@@ -342,6 +345,7 @@ export interface HeadingWithNoMarksDefinition {
342
345
  marks: Array<UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
343
346
  attrs: {
344
347
  level: number;
348
+ localId?: string;
345
349
  };
346
350
  }
347
351
  export type HeadingWithNoMarksNode = PMNode & HeadingWithNoMarksDefinition;
@@ -397,6 +401,9 @@ export interface ParagraphDefinition {
397
401
  type: 'paragraph';
398
402
  content: Array<InlineDefinition>;
399
403
  marks: Array<UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
404
+ attrs: {
405
+ localId?: string;
406
+ };
400
407
  }
401
408
  export type ParagraphNode = PMNode & ParagraphDefinition;
402
409
  export declare const paragraph: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<ParagraphNode>) => import("prosemirror-model").NodeSpec;
@@ -404,6 +411,9 @@ export interface ParagraphWithMarksDefinition {
404
411
  type: 'paragraph';
405
412
  content: Array<InlineDefinition>;
406
413
  marks: Array<AlignmentMark | IndentationMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
414
+ attrs: {
415
+ localId?: string;
416
+ };
407
417
  }
408
418
  export type ParagraphWithMarksNode = PMNode & ParagraphWithMarksDefinition;
409
419
  export declare const paragraphWithMarks: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<ParagraphWithMarksNode>) => import("prosemirror-model").NodeSpec;
@@ -420,6 +430,7 @@ export interface HeadingWithAlignmentDefinition {
420
430
  marks: Array<AlignmentMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
421
431
  attrs: {
422
432
  level: number;
433
+ localId?: string;
423
434
  };
424
435
  }
425
436
  export type HeadingWithAlignmentNode = PMNode & HeadingWithAlignmentDefinition;
@@ -430,6 +441,7 @@ export interface HeadingWithIndentationDefinition {
430
441
  marks: Array<IndentationMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
431
442
  attrs: {
432
443
  level: number;
444
+ localId?: string;
433
445
  };
434
446
  }
435
447
  export type HeadingWithIndentationNode = PMNode & HeadingWithIndentationDefinition;
@@ -438,6 +450,9 @@ export interface ParagraphWithAlignmentDefinition {
438
450
  type: 'paragraph';
439
451
  content: Array<InlineDefinition>;
440
452
  marks: Array<AlignmentMark | UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
453
+ attrs: {
454
+ localId?: string;
455
+ };
441
456
  }
442
457
  export type ParagraphWithAlignmentNode = PMNode & ParagraphWithAlignmentDefinition;
443
458
  export declare const paragraphWithAlignment: ({ parseDOM, toDOM }: import("@atlaskit/adf-schema-generator").NodeSpecOptions<ParagraphWithAlignmentNode>) => import("prosemirror-model").NodeSpec;
@@ -606,6 +621,7 @@ export interface HeadingDefinition {
606
621
  marks: Array<UnsupportedNodeAttributeMark | UnsupportedMarkMark>;
607
622
  attrs: {
608
623
  level: number;
624
+ localId?: string;
609
625
  };
610
626
  }
611
627
  export type HeadingNode = PMNode & HeadingDefinition;
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, headingNodeSpec, headingStage0, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, paragraphStage0, paragraphNodeSpec, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, } from './nodes';
1
+ export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, } from './nodes';
2
2
  export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
3
3
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
4
4
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
@@ -19,7 +19,7 @@ export interface HeadingBaseDefinition {
19
19
  */
20
20
  level: number;
21
21
  /**
22
- * @stage 0
22
+ * An optional UUID for unique identification of the node
23
23
  */
24
24
  localId?: string;
25
25
  };
@@ -37,6 +37,4 @@ export type HeadingWithAlignmentDefinition = HeadingBaseDefinition & MarksObject
37
37
  */
38
38
  export type HeadingWithIndentationDefinition = HeadingBaseDefinition & MarksObject<IndentationMarkDefinition>;
39
39
  export type HeadingWithMarksDefinition = HeadingWithAlignmentDefinition | HeadingWithIndentationDefinition;
40
- export declare const headingStage0: NodeSpec;
41
40
  export declare const heading: NodeSpec;
42
- export declare const headingNodeSpec: (adfStage?: string) => NodeSpec;
@@ -14,13 +14,13 @@ export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
14
14
  export type { CodeBlockDefinition, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockWithMarksDefinition, } from './code-block';
15
15
  export { hardBreak } from './hard-break';
16
16
  export type { HardBreakDefinition } from './hard-break';
17
- export { headingNodeSpec, heading, headingStage0 } from './heading';
17
+ export { heading } from './heading';
18
18
  export type { HeadingDefinition, HeadingBaseDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, } from './heading';
19
19
  export { rule } from './rule';
20
20
  export type { RuleDefinition } from './rule';
21
21
  export { orderedList, orderedListSelector, orderedListWithOrder, } from './ordered-list';
22
22
  export type { OrderedListDefinition } from './types/list';
23
- export { paragraph, paragraphStage0, paragraphNodeSpec } from './paragraph';
23
+ export { paragraph } from './paragraph';
24
24
  export type { ParagraphDefinition, ParagraphBaseDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, } from './paragraph';
25
25
  export { emoji } from './emoji';
26
26
  export type { EmojiAttributes, EmojiDefinition } from './emoji';
@@ -4,7 +4,7 @@ import { MarksObject, NoMark } from './types/mark';
4
4
  import { Inline } from './types/inline-content';
5
5
  export interface ParagraphAttributes {
6
6
  /**
7
- * @stage 0
7
+ * An optional UUID for unique identification of the node
8
8
  */
9
9
  localId?: string;
10
10
  }
@@ -17,9 +17,6 @@ export interface ParagraphBaseDefinition {
17
17
  * @allowUnsupportedInline true
18
18
  */
19
19
  content?: Array<Inline>;
20
- /**
21
- * @stage 0
22
- */
23
20
  attrs?: ParagraphAttributes;
24
21
  marks?: Array<any>;
25
22
  }
@@ -44,6 +41,4 @@ export type ParagraphWithAlignmentDefinition = ParagraphBaseDefinition & MarksOb
44
41
  */
45
42
  export type ParagraphWithIndentationDefinition = ParagraphBaseDefinition & MarksObject<IndentationMarkDefinition>;
46
43
  export type ParagraphWithMarksDefinition = ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition;
47
- export declare const paragraphStage0: NodeSpec;
48
44
  export declare const paragraph: NodeSpec;
49
- export declare const paragraphNodeSpec: (adfStage?: string) => NodeSpec;
@@ -1226,6 +1226,15 @@
1226
1226
  "$ref": "#/definitions/inline_node"
1227
1227
  }
1228
1228
  },
1229
+ "attrs": {
1230
+ "type": "object",
1231
+ "properties": {
1232
+ "localId": {
1233
+ "type": "string"
1234
+ }
1235
+ },
1236
+ "additionalProperties": false
1237
+ },
1229
1238
  "marks": {
1230
1239
  "type": "array"
1231
1240
  }
@@ -1705,6 +1714,9 @@
1705
1714
  "type": "number",
1706
1715
  "minimum": 1,
1707
1716
  "maximum": 6
1717
+ },
1718
+ "localId": {
1719
+ "type": "string"
1708
1720
  }
1709
1721
  },
1710
1722
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "36.18.3",
3
+ "version": "37.0.0",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "memoize-one": "^6.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@atlassian/adf-schema-json": "^1.15.0",
46
+ "@atlassian/adf-schema-json": "^1.16.0",
47
47
  "@atlaskit/adf-schema-generator": "^1.17.2",
48
48
  "@atlaskit/codemod-utils": "^4.2.4",
49
49
  "@atlaskit/json-schema-generator": "^3.3.9",
@@ -64,6 +64,7 @@ const paragraph = {
64
64
  optional: true,
65
65
  },
66
66
  marks: { type: 'array', items: [], optional: true },
67
+ attrs: { props: { localId: { type: 'string', optional: true } } },
67
68
  },
68
69
  };
69
70
 
@@ -142,6 +143,11 @@ const heading = {
142
143
  optional: true,
143
144
  },
144
145
  marks: { type: 'array', items: [], optional: true },
145
- attrs: { props: { level: { type: 'number', minimum: 1, maximum: 6 } } },
146
+ attrs: {
147
+ props: {
148
+ level: { type: 'number', minimum: 1, maximum: 6 },
149
+ localId: { type: 'string', optional: true },
150
+ },
151
+ },
146
152
  },
147
153
  };
@@ -822,6 +822,9 @@ const jsonWithTypes = {
822
822
  minimum: 1,
823
823
  type: 'number',
824
824
  },
825
+ localId: {
826
+ type: 'string',
827
+ },
825
828
  },
826
829
  required: ['level'],
827
830
  type: 'object',
@@ -1480,6 +1483,15 @@ const jsonWithTypes = {
1480
1483
  type: {
1481
1484
  enum: ['paragraph'],
1482
1485
  },
1486
+ attrs: {
1487
+ additionalProperties: false,
1488
+ properties: {
1489
+ localId: {
1490
+ type: 'string',
1491
+ },
1492
+ },
1493
+ type: 'object',
1494
+ },
1483
1495
  },
1484
1496
  required: ['type'],
1485
1497
  type: 'object',