@atlaskit/adf-schema 35.12.1 → 35.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 35.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cac3a5b: Add optional localId attribute to paragraph and heading nodes
8
+
9
+ ## 35.12.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 05ba2ed: [ED-23102] Add background color mark to default schema and move it up in mark order to the inline marks
14
+
3
15
  ## 35.12.1
4
16
 
5
17
  ### Patch Changes
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.confluenceSchemaWithMediaSingle = exports.confluenceSchema = void 0;
7
7
  var _createSchema = require("./create-schema");
8
8
  var nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', 'mediaInline', 'mediaGroup', 'mediaSingle', 'media', 'caption', 'confluenceUnsupportedBlock', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'listItem', 'mention', 'text', 'confluenceUnsupportedInline', 'media', 'rule', 'table', 'tableCell', 'tableHeader', 'tableRow', 'emoji', 'taskList', 'taskItem', 'date', 'placeholder', 'decisionList', 'decisionItem', 'layoutSection', 'layoutColumn', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'];
9
- var marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
9
+ var marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
10
10
 
11
11
  /**
12
12
  * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
@@ -224,6 +224,9 @@ var marksInOrder = [{
224
224
  }, {
225
225
  name: 'textColor',
226
226
  spec: _marks.textColor
227
+ }, {
228
+ name: 'backgroundColor',
229
+ spec: _marks.backgroundColor
227
230
  }, {
228
231
  name: 'strike',
229
232
  spec: _marks.strike
@@ -263,9 +266,6 @@ var marksInOrder = [{
263
266
  }, {
264
267
  name: 'border',
265
268
  spec: _marks.border
266
- }, {
267
- name: 'backgroundColor',
268
- spec: _marks.backgroundColor
269
269
  }, {
270
270
  name: 'unsupportedMark',
271
271
  spec: _marks.unsupportedMark
@@ -11,7 +11,7 @@ var _createSchema = require("./create-schema");
11
11
  var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
12
12
  var defaultSchemaConfig = {
13
13
  nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
14
- marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
14
+ marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
15
15
  // https://product-fabric.atlassian.net/browse/ED-10214,
16
16
  'fragment']
17
17
  };
@@ -21,10 +21,19 @@ exports.heading = void 0;
21
21
  * @name heading_with_indentation_node
22
22
  */
23
23
 
24
+ var _getAttrs = function getAttrs(level, domNode) {
25
+ return {
26
+ level: level,
27
+ localId: domNode.getAttribute('data-local-id') || heading.attrs.localId.default
28
+ };
29
+ };
24
30
  var heading = exports.heading = {
25
31
  attrs: {
26
32
  level: {
27
33
  default: 1
34
+ },
35
+ localId: {
36
+ default: null
28
37
  }
29
38
  },
30
39
  content: "inline*",
@@ -33,36 +42,40 @@ var heading = exports.heading = {
33
42
  selectable: false,
34
43
  parseDOM: [{
35
44
  tag: 'h1',
36
- attrs: {
37
- level: 1
45
+ getAttrs: function getAttrs(domNode) {
46
+ return _getAttrs(1, domNode);
38
47
  }
39
48
  }, {
40
49
  tag: 'h2',
41
- attrs: {
42
- level: 2
50
+ getAttrs: function getAttrs(domNode) {
51
+ return _getAttrs(2, domNode);
43
52
  }
44
53
  }, {
45
54
  tag: 'h3',
46
- attrs: {
47
- level: 3
55
+ getAttrs: function getAttrs(domNode) {
56
+ return _getAttrs(3, domNode);
48
57
  }
49
58
  }, {
50
59
  tag: 'h4',
51
- attrs: {
52
- level: 4
60
+ getAttrs: function getAttrs(domNode) {
61
+ return _getAttrs(4, domNode);
53
62
  }
54
63
  }, {
55
64
  tag: 'h5',
56
- attrs: {
57
- level: 5
65
+ getAttrs: function getAttrs(domNode) {
66
+ return _getAttrs(5, domNode);
58
67
  }
59
68
  }, {
60
69
  tag: 'h6',
61
- attrs: {
62
- level: 6
70
+ getAttrs: function getAttrs(domNode) {
71
+ return _getAttrs(6, domNode);
63
72
  }
64
73
  }],
65
74
  toDOM: function toDOM(node) {
66
- return ['h' + node.attrs['level'], 0];
75
+ var localId = node.attrs.localId;
76
+ var attrs = localId !== undefined ? {
77
+ 'data-local-id': localId
78
+ } : undefined;
79
+ return ['h' + node.attrs['level'], attrs, 0];
67
80
  }
68
81
  };
@@ -29,16 +29,31 @@ exports.paragraph = void 0;
29
29
  * @name paragraph_with_indentation_node
30
30
  */
31
31
 
32
- var pDOM = ['p', 0];
33
32
  var paragraph = exports.paragraph = {
34
33
  selectable: false,
35
34
  content: 'inline*',
36
35
  group: 'block',
37
- marks: 'strong code em link border strike subsup textColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment backgroundColor',
36
+ attrs: {
37
+ localId: {
38
+ default: null
39
+ }
40
+ },
41
+ marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
38
42
  parseDOM: [{
39
- tag: 'p'
43
+ tag: 'p',
44
+ getAttrs: function getAttrs(domNode) {
45
+ var dom = domNode;
46
+ var attrs = {
47
+ localId: dom.getAttribute('data-local-id') || paragraph.attrs.localId.default
48
+ };
49
+ return attrs;
50
+ }
40
51
  }],
41
- toDOM: function toDOM() {
42
- return pDOM;
52
+ toDOM: function toDOM(node) {
53
+ var localId = node.attrs.localId;
54
+ var attrs = localId !== undefined ? {
55
+ 'data-local-id': localId
56
+ } : undefined;
57
+ return ['p', attrs, 0];
43
58
  }
44
59
  };
@@ -1,6 +1,6 @@
1
1
  import { createSchema } from './create-schema';
2
2
  const nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', 'mediaInline', 'mediaGroup', 'mediaSingle', 'media', 'caption', 'confluenceUnsupportedBlock', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'listItem', 'mention', 'text', 'confluenceUnsupportedInline', 'media', 'rule', 'table', 'tableCell', 'tableHeader', 'tableRow', 'emoji', 'taskList', 'taskItem', 'date', 'placeholder', 'decisionList', 'decisionItem', 'layoutSection', 'layoutColumn', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'];
3
- const marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
3
+ const marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
4
4
 
5
5
  /**
6
6
  * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
@@ -209,6 +209,9 @@ const marksInOrder = [{
209
209
  }, {
210
210
  name: 'textColor',
211
211
  spec: textColor
212
+ }, {
213
+ name: 'backgroundColor',
214
+ spec: backgroundColor
212
215
  }, {
213
216
  name: 'strike',
214
217
  spec: strike
@@ -248,9 +251,6 @@ const marksInOrder = [{
248
251
  }, {
249
252
  name: 'border',
250
253
  spec: border
251
- }, {
252
- name: 'backgroundColor',
253
- spec: backgroundColor
254
254
  }, {
255
255
  name: 'unsupportedMark',
256
256
  spec: unsupportedMark
@@ -4,7 +4,7 @@ import { createSchema } from './create-schema';
4
4
  const getDefaultSchemaConfig = () => {
5
5
  const defaultSchemaConfig = {
6
6
  nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
7
- marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
7
+ marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
8
8
  // https://product-fabric.atlassian.net/browse/ED-10214,
9
9
  'fragment']
10
10
  };
@@ -15,10 +15,17 @@
15
15
  * @name heading_with_indentation_node
16
16
  */
17
17
 
18
+ const getAttrs = (level, domNode) => ({
19
+ level,
20
+ localId: domNode.getAttribute('data-local-id') || heading.attrs.localId.default
21
+ });
18
22
  export const heading = {
19
23
  attrs: {
20
24
  level: {
21
25
  default: 1
26
+ },
27
+ localId: {
28
+ default: null
22
29
  }
23
30
  },
24
31
  content: `inline*`,
@@ -27,36 +34,30 @@ export const heading = {
27
34
  selectable: false,
28
35
  parseDOM: [{
29
36
  tag: 'h1',
30
- attrs: {
31
- level: 1
32
- }
37
+ getAttrs: domNode => getAttrs(1, domNode)
33
38
  }, {
34
39
  tag: 'h2',
35
- attrs: {
36
- level: 2
37
- }
40
+ getAttrs: domNode => getAttrs(2, domNode)
38
41
  }, {
39
42
  tag: 'h3',
40
- attrs: {
41
- level: 3
42
- }
43
+ getAttrs: domNode => getAttrs(3, domNode)
43
44
  }, {
44
45
  tag: 'h4',
45
- attrs: {
46
- level: 4
47
- }
46
+ getAttrs: domNode => getAttrs(4, domNode)
48
47
  }, {
49
48
  tag: 'h5',
50
- attrs: {
51
- level: 5
52
- }
49
+ getAttrs: domNode => getAttrs(5, domNode)
53
50
  }, {
54
51
  tag: 'h6',
55
- attrs: {
56
- level: 6
57
- }
52
+ getAttrs: domNode => getAttrs(6, domNode)
58
53
  }],
59
54
  toDOM(node) {
60
- return ['h' + node.attrs['level'], 0];
55
+ const {
56
+ localId
57
+ } = node.attrs;
58
+ const attrs = localId !== undefined ? {
59
+ 'data-local-id': localId
60
+ } : undefined;
61
+ return ['h' + node.attrs['level'], attrs, 0];
61
62
  }
62
63
  };
@@ -23,16 +23,33 @@
23
23
  * @name paragraph_with_indentation_node
24
24
  */
25
25
 
26
- const pDOM = ['p', 0];
27
26
  export const paragraph = {
28
27
  selectable: false,
29
28
  content: 'inline*',
30
29
  group: 'block',
31
- marks: 'strong code em link border strike subsup textColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment backgroundColor',
30
+ attrs: {
31
+ localId: {
32
+ default: null
33
+ }
34
+ },
35
+ marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
32
36
  parseDOM: [{
33
- tag: 'p'
37
+ tag: 'p',
38
+ getAttrs: domNode => {
39
+ const dom = domNode;
40
+ const attrs = {
41
+ localId: dom.getAttribute('data-local-id') || paragraph.attrs.localId.default
42
+ };
43
+ return attrs;
44
+ }
34
45
  }],
35
- toDOM() {
36
- return pDOM;
46
+ toDOM(node) {
47
+ const {
48
+ localId
49
+ } = node.attrs;
50
+ const attrs = localId !== undefined ? {
51
+ 'data-local-id': localId
52
+ } : undefined;
53
+ return ['p', attrs, 0];
37
54
  }
38
55
  };
@@ -1,6 +1,6 @@
1
1
  import { createSchema } from './create-schema';
2
2
  var nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', 'mediaInline', 'mediaGroup', 'mediaSingle', 'media', 'caption', 'confluenceUnsupportedBlock', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'listItem', 'mention', 'text', 'confluenceUnsupportedInline', 'media', 'rule', 'table', 'tableCell', 'tableHeader', 'tableRow', 'emoji', 'taskList', 'taskItem', 'date', 'placeholder', 'decisionList', 'decisionItem', 'layoutSection', 'layoutColumn', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'];
3
- var marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
3
+ var marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
4
4
 
5
5
  /**
6
6
  * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
@@ -214,6 +214,9 @@ var marksInOrder = [{
214
214
  }, {
215
215
  name: 'textColor',
216
216
  spec: textColor
217
+ }, {
218
+ name: 'backgroundColor',
219
+ spec: backgroundColor
217
220
  }, {
218
221
  name: 'strike',
219
222
  spec: strike
@@ -253,9 +256,6 @@ var marksInOrder = [{
253
256
  }, {
254
257
  name: 'border',
255
258
  spec: border
256
- }, {
257
- name: 'backgroundColor',
258
- spec: backgroundColor
259
259
  }, {
260
260
  name: 'unsupportedMark',
261
261
  spec: unsupportedMark
@@ -4,7 +4,7 @@ import { createSchema } from './create-schema';
4
4
  var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
5
5
  var defaultSchemaConfig = {
6
6
  nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
7
- marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
7
+ marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
8
8
  // https://product-fabric.atlassian.net/browse/ED-10214,
9
9
  'fragment']
10
10
  };
@@ -15,10 +15,19 @@
15
15
  * @name heading_with_indentation_node
16
16
  */
17
17
 
18
+ var _getAttrs = function getAttrs(level, domNode) {
19
+ return {
20
+ level: level,
21
+ localId: domNode.getAttribute('data-local-id') || heading.attrs.localId.default
22
+ };
23
+ };
18
24
  export var heading = {
19
25
  attrs: {
20
26
  level: {
21
27
  default: 1
28
+ },
29
+ localId: {
30
+ default: null
22
31
  }
23
32
  },
24
33
  content: "inline*",
@@ -27,36 +36,40 @@ export var heading = {
27
36
  selectable: false,
28
37
  parseDOM: [{
29
38
  tag: 'h1',
30
- attrs: {
31
- level: 1
39
+ getAttrs: function getAttrs(domNode) {
40
+ return _getAttrs(1, domNode);
32
41
  }
33
42
  }, {
34
43
  tag: 'h2',
35
- attrs: {
36
- level: 2
44
+ getAttrs: function getAttrs(domNode) {
45
+ return _getAttrs(2, domNode);
37
46
  }
38
47
  }, {
39
48
  tag: 'h3',
40
- attrs: {
41
- level: 3
49
+ getAttrs: function getAttrs(domNode) {
50
+ return _getAttrs(3, domNode);
42
51
  }
43
52
  }, {
44
53
  tag: 'h4',
45
- attrs: {
46
- level: 4
54
+ getAttrs: function getAttrs(domNode) {
55
+ return _getAttrs(4, domNode);
47
56
  }
48
57
  }, {
49
58
  tag: 'h5',
50
- attrs: {
51
- level: 5
59
+ getAttrs: function getAttrs(domNode) {
60
+ return _getAttrs(5, domNode);
52
61
  }
53
62
  }, {
54
63
  tag: 'h6',
55
- attrs: {
56
- level: 6
64
+ getAttrs: function getAttrs(domNode) {
65
+ return _getAttrs(6, domNode);
57
66
  }
58
67
  }],
59
68
  toDOM: function toDOM(node) {
60
- return ['h' + node.attrs['level'], 0];
69
+ var localId = node.attrs.localId;
70
+ var attrs = localId !== undefined ? {
71
+ 'data-local-id': localId
72
+ } : undefined;
73
+ return ['h' + node.attrs['level'], attrs, 0];
61
74
  }
62
75
  };
@@ -23,16 +23,31 @@
23
23
  * @name paragraph_with_indentation_node
24
24
  */
25
25
 
26
- var pDOM = ['p', 0];
27
26
  export var paragraph = {
28
27
  selectable: false,
29
28
  content: 'inline*',
30
29
  group: 'block',
31
- marks: 'strong code em link border strike subsup textColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment backgroundColor',
30
+ attrs: {
31
+ localId: {
32
+ default: null
33
+ }
34
+ },
35
+ marks: 'strong code em link border strike subsup textColor backgroundColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
32
36
  parseDOM: [{
33
- tag: 'p'
37
+ tag: 'p',
38
+ getAttrs: function getAttrs(domNode) {
39
+ var dom = domNode;
40
+ var attrs = {
41
+ localId: dom.getAttribute('data-local-id') || paragraph.attrs.localId.default
42
+ };
43
+ return attrs;
44
+ }
34
45
  }],
35
- toDOM: function toDOM() {
36
- return pDOM;
46
+ toDOM: function toDOM(node) {
47
+ var localId = node.attrs.localId;
48
+ var attrs = localId !== undefined ? {
49
+ 'data-local-id': localId
50
+ } : undefined;
51
+ return ['p', attrs, 0];
37
52
  }
38
53
  };
@@ -1232,6 +1232,15 @@
1232
1232
  "$ref": "#/definitions/inline_node"
1233
1233
  }
1234
1234
  },
1235
+ "attrs": {
1236
+ "type": "object",
1237
+ "properties": {
1238
+ "localId": {
1239
+ "type": "string"
1240
+ }
1241
+ },
1242
+ "additionalProperties": false
1243
+ },
1235
1244
  "marks": {
1236
1245
  "type": "array"
1237
1246
  }
@@ -1711,6 +1720,9 @@
1711
1720
  "type": "number",
1712
1721
  "minimum": 1,
1713
1722
  "maximum": 6
1723
+ },
1724
+ "localId": {
1725
+ "type": "string"
1714
1726
  }
1715
1727
  },
1716
1728
  "required": [
@@ -1,6 +1,6 @@
1
1
  import { SchemaConfig } from './create-schema';
2
2
  type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'unsupportedBlock' | 'unsupportedInline';
3
- type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
3
+ type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'backgroundColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
4
4
  export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
5
5
  export declare const getSchemaBasedOnStage: import("memoize-one").MemoizedFn<(this: any, stage?: any) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
6
6
  export declare const defaultSchema: import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
@@ -18,6 +18,10 @@ export interface HeadingBaseDefinition {
18
18
  * @maximum 6
19
19
  */
20
20
  level: number;
21
+ /**
22
+ * @stage 0
23
+ */
24
+ localId?: string;
21
25
  };
22
26
  }
23
27
  /**
@@ -2,6 +2,12 @@ import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
2
  import { AlignmentMarkDefinition, IndentationMarkDefinition } from '../marks';
3
3
  import { MarksObject, NoMark } from './types/mark';
4
4
  import { Inline } from './types/inline-content';
5
+ export interface ParagraphAttributes {
6
+ /**
7
+ * @stage 0
8
+ */
9
+ localId?: string;
10
+ }
5
11
  /**
6
12
  * @name paragraph_node
7
13
  */
@@ -11,6 +17,10 @@ export interface ParagraphBaseDefinition {
11
17
  * @allowUnsupportedInline true
12
18
  */
13
19
  content?: Array<Inline>;
20
+ /**
21
+ * @stage 0
22
+ */
23
+ attrs?: ParagraphAttributes;
14
24
  marks?: Array<any>;
15
25
  }
16
26
  /**
@@ -1232,6 +1232,15 @@
1232
1232
  "$ref": "#/definitions/inline_node"
1233
1233
  }
1234
1234
  },
1235
+ "attrs": {
1236
+ "type": "object",
1237
+ "properties": {
1238
+ "localId": {
1239
+ "type": "string"
1240
+ }
1241
+ },
1242
+ "additionalProperties": false
1243
+ },
1235
1244
  "marks": {
1236
1245
  "type": "array"
1237
1246
  }
@@ -1711,6 +1720,9 @@
1711
1720
  "type": "number",
1712
1721
  "minimum": 1,
1713
1722
  "maximum": 6
1723
+ },
1724
+ "localId": {
1725
+ "type": "string"
1714
1726
  }
1715
1727
  },
1716
1728
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "35.12.1",
3
+ "version": "35.13.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/"
@@ -41,7 +41,7 @@
41
41
  "memoize-one": "^6.0.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@atlassian/adf-schema-json": "^1.10.0",
44
+ "@atlassian/adf-schema-json": "^1.11.0",
45
45
  "@babel/cli": "^7.22.9",
46
46
  "@babel/core": "^7.22.9",
47
47
  "@babel/plugin-proposal-class-properties": "^7.18.6",