@atlaskit/adf-schema 20.1.3 → 22.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/cjs/json-schema/index.js +23 -0
  3. package/dist/cjs/schema/nodes/bodied-extension.js +1 -1
  4. package/dist/cjs/schema/nodes/doc.js +1 -1
  5. package/dist/cjs/schema/nodes/emoji.js +5 -5
  6. package/dist/cjs/schema/nodes/expand.js +1 -1
  7. package/dist/cjs/schema/nodes/layout-column.js +1 -1
  8. package/dist/cjs/schema/nodes/list-item.js +1 -1
  9. package/dist/cjs/schema/nodes/media-group.js +1 -1
  10. package/dist/cjs/schema/nodes/nested-expand.js +1 -1
  11. package/dist/cjs/schema/nodes/panel.js +10 -0
  12. package/dist/cjs/schema/nodes/paragraph.js +24 -145
  13. package/dist/cjs/schema/nodes/tableNodes.js +2 -2
  14. package/dist/cjs/version.json +1 -1
  15. package/dist/es2019/json-schema/index.js +2 -0
  16. package/dist/es2019/schema/marks/data-consumer.js +8 -1
  17. package/dist/es2019/schema/nodes/bodied-extension.js +1 -1
  18. package/dist/es2019/schema/nodes/doc.js +1 -1
  19. package/dist/es2019/schema/nodes/emoji.js +5 -5
  20. package/dist/es2019/schema/nodes/expand.js +1 -1
  21. package/dist/es2019/schema/nodes/layout-column.js +1 -1
  22. package/dist/es2019/schema/nodes/list-item.js +1 -1
  23. package/dist/es2019/schema/nodes/media-group.js +1 -1
  24. package/dist/es2019/schema/nodes/nested-expand.js +1 -1
  25. package/dist/es2019/schema/nodes/panel.js +10 -0
  26. package/dist/es2019/schema/nodes/paragraph.js +24 -142
  27. package/dist/es2019/schema/nodes/tableNodes.js +2 -2
  28. package/dist/es2019/version.json +1 -1
  29. package/dist/esm/json-schema/index.js +2 -0
  30. package/dist/esm/schema/marks/data-consumer.js +8 -1
  31. package/dist/esm/schema/nodes/bodied-extension.js +1 -1
  32. package/dist/esm/schema/nodes/doc.js +1 -1
  33. package/dist/esm/schema/nodes/emoji.js +5 -5
  34. package/dist/esm/schema/nodes/expand.js +1 -1
  35. package/dist/esm/schema/nodes/layout-column.js +1 -1
  36. package/dist/esm/schema/nodes/list-item.js +1 -1
  37. package/dist/esm/schema/nodes/media-group.js +1 -1
  38. package/dist/esm/schema/nodes/nested-expand.js +1 -1
  39. package/dist/esm/schema/nodes/panel.js +10 -0
  40. package/dist/esm/schema/nodes/paragraph.js +24 -144
  41. package/dist/esm/schema/nodes/tableNodes.js +2 -2
  42. package/dist/esm/version.json +1 -1
  43. package/dist/json-schema/package.json +7 -0
  44. package/dist/json-schema/v1/full.json +67 -3
  45. package/dist/json-schema/v1/stage-0.json +36 -81
  46. package/dist/types/index.d.ts +1 -1
  47. package/dist/types/json-schema/index.d.ts +2 -0
  48. package/dist/types/schema/index.d.ts +1 -1
  49. package/dist/types/schema/marks/data-consumer.d.ts +8 -1
  50. package/dist/types/schema/marks/fragment.d.ts +0 -1
  51. package/dist/types/schema/nodes/bodied-extension.d.ts +1 -6
  52. package/dist/types/schema/nodes/extension.d.ts +1 -6
  53. package/dist/types/schema/nodes/index.d.ts +3 -3
  54. package/dist/types/schema/nodes/inline-extension.d.ts +1 -6
  55. package/dist/types/schema/nodes/panel.d.ts +2 -0
  56. package/dist/types/schema/nodes/tableNodes.d.ts +4 -2
  57. package/dist/types/schema/nodes/types/block-content.d.ts +3 -3
  58. package/dist/types/schema/nodes/types/inline-content.d.ts +3 -3
  59. package/dist/types/schema/nodes/types/non-nestable-block-content.d.ts +2 -2
  60. package/json-schema/package.json +7 -0
  61. package/json-schema/v1/full.json +67 -3
  62. package/json-schema/v1/stage-0.json +36 -81
  63. package/package.json +10 -3
  64. package/schema/package.json +7 -0
  65. package/url/package.json +7 -0
  66. package/test-helpers/html-helpers.ts +0 -40
  67. package/test-helpers/matches.ts +0 -8
  68. package/test-helpers/schema-builder.ts +0 -329
  69. package/test-helpers/schema.ts +0 -80
@@ -1,68 +1,27 @@
1
- import { Fragment } from 'prosemirror-model';
2
- import { isSafeUrl } from '../../utils/url';
3
-
4
- const getLinkContent = (node, schema) => {
5
- if (!(node instanceof HTMLAnchorElement)) {
6
- return Fragment.empty;
7
- }
8
-
9
- const href = node.getAttribute('href') || '';
10
- const text = node.innerText;
11
-
12
- if (!text || text.length === 0) {
13
- return Fragment.empty;
14
- }
15
-
16
- const marks = isSafeUrl(href) ? [schema.marks.link.create({
17
- href
18
- })] : [];
19
- const textNode = schema.text(text, marks);
20
- return Fragment.from(textNode);
21
- };
22
-
23
- const blockTags = {
24
- address: true,
25
- article: true,
26
- aside: true,
27
- blockquote: true,
28
- canvas: true,
29
- dd: true,
30
- div: true,
31
- dl: true,
32
- fieldset: true,
33
- figcaption: true,
34
- figure: true,
35
- footer: true,
36
- form: true,
37
- h1: true,
38
- h2: true,
39
- h3: true,
40
- h4: true,
41
- h5: true,
42
- h6: true,
43
- header: true,
44
- hgroup: true,
45
- hr: true,
46
- li: true,
47
- noscript: true,
48
- ol: true,
49
- output: true,
50
- p: true,
51
- pre: true,
52
- section: true,
53
- table: true,
54
- tfoot: true,
55
- ul: true
56
- };
57
-
58
- const isListItemNode = node => {
59
- return Boolean(node && node.nodeName.toLowerCase() === 'li');
60
- };
61
-
62
- const isTextNode = node => {
63
- return Boolean(node && node.nodeType === Node.TEXT_NODE);
64
- };
65
-
1
+ /**
2
+ * @name paragraph_node
3
+ */
4
+
5
+ /**
6
+ * @name paragraph_with_no_marks_node
7
+ */
8
+
9
+ /**
10
+ * NOTE: Need this because TS is too smart and inline everything.
11
+ * So we need to give them separate identity.
12
+ * Probably there's a way to solve it but that will need time and exploration.
13
+ * // http://bit.ly/2raXFX5
14
+ * type T1 = X | Y
15
+ * type T2 = A | T1 | B // T2 = A | X | Y | B
16
+ */
17
+
18
+ /**
19
+ * @name paragraph_with_alignment_node
20
+ */
21
+
22
+ /**
23
+ * @name paragraph_with_indentation_node
24
+ */
66
25
  const isImageNode = node => {
67
26
  return Boolean(node && node.nodeName.toLowerCase() === 'img');
68
27
  };
@@ -83,21 +42,6 @@ const hasInlineImage = node => {
83
42
  });
84
43
  };
85
44
 
86
- const hasWhiteSpacePre = node => {
87
- return Boolean(node instanceof HTMLElement && node.style.whiteSpace === 'pre');
88
- };
89
-
90
- const hasFontFamilyMonospace = node => {
91
- return Boolean(node instanceof HTMLElement && node.style.fontFamily.includes('monospace'));
92
- };
93
-
94
- const isBlockLevelNode = node => {
95
- return Boolean(node && blockTags.hasOwnProperty(node.nodeName.toLowerCase()));
96
- };
97
-
98
- const NOT_INTERNAL_LINKS = [':not([data-inline-card])', ':not([data-block-card])', ':not([data-block-link])', ':not([data-skip-paste])'].join('');
99
- const ANCHOR_LINK = `a[href]${NOT_INTERNAL_LINKS}`;
100
- const NOT_INTERNAL_ELEMENTS = [':not(.code-block)', ':not([data-node-type])', ':not([data-embed-card])', ':not([data-layout-section])', ':not([data-task-local-id])', ':not([data-task-state])', ':not([data-pm-slice])', ':not([data-mark-type])', ':not([data-layout-content])', ':not([data-panel-content])'].join('');
101
45
  const pDOM = ['p', 0];
102
46
  export const paragraph = {
103
47
  selectable: false,
@@ -106,68 +50,6 @@ export const paragraph = {
106
50
  marks: 'strong code em link strike subsup textColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
107
51
  parseDOM: [{
108
52
  tag: 'p'
109
- }, {
110
- tag: `div${NOT_INTERNAL_ELEMENTS}, li:not([data-pm-slice])`,
111
- priority: 100,
112
- getAttrs: node => {
113
- if (!(node instanceof Node)) {
114
- return false;
115
- }
116
-
117
- const isCodeBlock = hasWhiteSpacePre(node) || hasFontFamilyMonospace(node);
118
-
119
- if (isCodeBlock || !node.hasChildNodes()) {
120
- return false;
121
- }
122
-
123
- const hasInlineChildren = Array.from(node.childNodes).every(child => !isBlockLevelNode(child) && // IMG is considered block for mediaSingle
124
- !isImageNode(child));
125
-
126
- if (!hasInlineChildren) {
127
- return false;
128
- }
129
-
130
- if ( // We can skip this rule for pure list items
131
- isListItemNode(node) && Array.from(node.childNodes).every(isTextNode)) {
132
- return false;
133
- }
134
-
135
- return null;
136
- }
137
- }, {
138
- tag: `:not(span) + ${ANCHOR_LINK}`,
139
- priority: 100,
140
- getContent: getLinkContent
141
- }, {
142
- tag: `:not(span) > ${ANCHOR_LINK}:first-child`,
143
- getAttrs: node => {
144
- if (!(node instanceof Node)) {
145
- return false;
146
- }
147
-
148
- if (isBlockLevelNode(node.firstChild)) {
149
- return null;
150
- }
151
-
152
- if (hasInlineImage(node)) {
153
- return false;
154
- }
155
-
156
- const isNextSiblingValid = node.nextSibling === null || node.nextSibling instanceof Text && (node.nextSibling.textContent || '').trim().length === 0;
157
-
158
- if (isNextSiblingValid) {
159
- return null;
160
- } // This rule should not match when there is any sibling after the anchor
161
-
162
-
163
- if (!isBlockLevelNode(node.nextSibling)) {
164
- return false;
165
- }
166
-
167
- return null;
168
- },
169
- priority: 100,
170
- getContent: getLinkContent
171
53
  }],
172
54
 
173
55
  toDOM() {
@@ -183,7 +183,7 @@ export const tableCell = {
183
183
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
184
184
  attrs: cellAttrs,
185
185
  tableRole: 'cell',
186
- marks: 'link alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
186
+ marks: 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
187
187
  isolating: true,
188
188
  parseDOM: [// Ignore number cell copied from renderer
189
189
  {
@@ -210,7 +210,7 @@ export const tableHeader = {
210
210
  attrs: cellAttrs,
211
211
  tableRole: 'header_cell',
212
212
  isolating: true,
213
- marks: 'link alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
213
+ marks: 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
214
214
  parseDOM: [{
215
215
  tag: 'th',
216
216
  getAttrs: dom => getCellAttrs(dom, {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "20.1.3",
3
+ "version": "22.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,2 @@
1
+ export { default as fullSchema } from '../../json-schema/v1/full.json';
2
+ export { default as stageZeroSchema } from '../../json-schema/v1/stage-0.json';
@@ -1,6 +1,13 @@
1
1
  import { isDOMElement } from '../../utils/parseDOM';
2
2
  /**
3
- * @minLength 1
3
+ * This annotation is purely for reference, & does _nothing_ given annotating
4
+ * `minLength` on an array of strings is not supported with our schema+spec
5
+ * generator.
6
+ *
7
+ * We're keeping it to signal that data consumer `sources` shouldn't be empty
8
+ * strings
9
+ *
10
+ * // @minLength 1
4
11
  */
5
12
 
6
13
  var parseDataConsumer = function parseDataConsumer(maybeValue) {
@@ -4,7 +4,7 @@ var createBodiedExtensionNodeSpec = function createBodiedExtensionNodeSpec() {
4
4
  var nodeSpec = {
5
5
  inline: false,
6
6
  group: 'block',
7
- marks: 'link dataConsumer fragment',
7
+ marks: 'dataConsumer fragment',
8
8
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | extension | unsupportedBlock | embedCard)+',
9
9
  defining: true,
10
10
  selectable: true,
@@ -3,5 +3,5 @@
3
3
  */
4
4
  export var doc = {
5
5
  content: '(block|layoutSection)+',
6
- marks: 'alignment breakout dataConsumer fragment indentation link unsupportedMark unsupportedNodeAttribute'
6
+ marks: 'alignment breakout dataConsumer fragment indentation unsupportedMark unsupportedNodeAttribute'
7
7
  };
@@ -18,7 +18,11 @@ export var emoji = {
18
18
  default: ''
19
19
  }
20
20
  },
21
- parseDOM: [{
21
+ parseDOM: [// Handle copy/paste beautiful panel from renderer />
22
+ {
23
+ tag: 'div.ak-editor-panel__icon span',
24
+ ignore: true
25
+ }, {
22
26
  tag: 'span[data-emoji-short-name]',
23
27
  getAttrs: function getAttrs(domNode) {
24
28
  var dom = domNode;
@@ -28,10 +32,6 @@ export var emoji = {
28
32
  text: dom.getAttribute('data-emoji-text') || emoji.attrs.text.default
29
33
  };
30
34
  }
31
- }, // Handle copy/paste beautiful panel from renderer />
32
- {
33
- tag: 'div.ak-editor-panel__icon',
34
- ignore: true
35
35
  }, // Handle copy/paste from old <ac:emoticon />
36
36
  {
37
37
  tag: 'img[data-emoticon-name]',
@@ -20,7 +20,7 @@ function getExpandAttrs(domNode) {
20
20
  export var expand = {
21
21
  inline: false,
22
22
  group: 'block',
23
- marks: 'link dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
23
+ marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
24
24
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
25
25
  isolating: true,
26
26
  selectable: true,
@@ -4,7 +4,7 @@
4
4
  export var layoutColumn = {
5
5
  content: '(block|unsupportedBlock)+',
6
6
  isolating: true,
7
- marks: 'link alignment indentation dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
7
+ marks: 'alignment indentation dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
8
8
  selectable: false,
9
9
  attrs: {
10
10
  width: {
@@ -6,7 +6,7 @@
6
6
  */
7
7
  export var listItem = {
8
8
  content: '(paragraph | mediaSingle | codeBlock) (paragraph | bulletList | orderedList | mediaSingle | codeBlock)*',
9
- marks: 'link unsupportedMark unsupportedNodeAttribute',
9
+ marks: 'unsupportedMark unsupportedNodeAttribute',
10
10
  defining: true,
11
11
  selectable: false,
12
12
  parseDOM: [{
@@ -6,7 +6,7 @@ export var mediaGroup = {
6
6
  group: 'block',
7
7
  content: '(media|unsupportedBlock)+',
8
8
  attrs: {},
9
- marks: 'unsupportedMark unsupportedNodeAttribute link',
9
+ marks: 'unsupportedMark unsupportedNodeAttribute',
10
10
  selectable: false,
11
11
  parseDOM: [{
12
12
  tag: 'div[data-node-type="mediaGroup"]'
@@ -13,7 +13,7 @@
13
13
  */
14
14
  export var nestedExpand = {
15
15
  inline: false,
16
- marks: 'link unsupportedMark unsupportedNodeAttribute',
16
+ marks: 'unsupportedMark unsupportedNodeAttribute',
17
17
  content: '(paragraph | heading | mediaSingle | mediaGroup | unsupportedBlock)+',
18
18
  isolating: true,
19
19
  selectable: true,
@@ -24,6 +24,12 @@ var getDefaultAttrs = function getDefaultAttrs() {
24
24
  panelIcon: {
25
25
  default: null
26
26
  },
27
+ panelIconId: {
28
+ default: null
29
+ },
30
+ panelIconText: {
31
+ default: null
32
+ },
27
33
  panelColor: {
28
34
  default: null
29
35
  }
@@ -35,6 +41,8 @@ var getDomAttrs = function getDomAttrs(nodeAttrs) {
35
41
  var attrs = {
36
42
  'data-panel-type': nodeAttrs.panelType,
37
43
  'data-panel-icon': nodeAttrs.panelIcon,
44
+ 'data-panel-icon-id': nodeAttrs.panelIconId,
45
+ 'data-panel-icon-text': nodeAttrs.panelIconText,
38
46
  'data-panel-color': nodeAttrs.panelColor
39
47
  };
40
48
  return attrs;
@@ -48,6 +56,8 @@ var getParseDOMAttrs = function getParseDOMAttrs(allowCustomPanel, dom) {
48
56
  if (allowCustomPanel) {
49
57
  parseDOMAttrs = _objectSpread(_objectSpread({}, parseDOMAttrs), {}, {
50
58
  panelIcon: dom.getAttribute('data-panel-icon'),
59
+ panelIconId: dom.getAttribute('data-panel-icon-id'),
60
+ panelIconText: dom.getAttribute('data-panel-icon-text'),
51
61
  panelColor: dom.getAttribute('data-panel-color')
52
62
  });
53
63
  } else {
@@ -1,68 +1,27 @@
1
- import { Fragment } from 'prosemirror-model';
2
- import { isSafeUrl } from '../../utils/url';
3
-
4
- var getLinkContent = function getLinkContent(node, schema) {
5
- if (!(node instanceof HTMLAnchorElement)) {
6
- return Fragment.empty;
7
- }
8
-
9
- var href = node.getAttribute('href') || '';
10
- var text = node.innerText;
11
-
12
- if (!text || text.length === 0) {
13
- return Fragment.empty;
14
- }
15
-
16
- var marks = isSafeUrl(href) ? [schema.marks.link.create({
17
- href: href
18
- })] : [];
19
- var textNode = schema.text(text, marks);
20
- return Fragment.from(textNode);
21
- };
22
-
23
- var blockTags = {
24
- address: true,
25
- article: true,
26
- aside: true,
27
- blockquote: true,
28
- canvas: true,
29
- dd: true,
30
- div: true,
31
- dl: true,
32
- fieldset: true,
33
- figcaption: true,
34
- figure: true,
35
- footer: true,
36
- form: true,
37
- h1: true,
38
- h2: true,
39
- h3: true,
40
- h4: true,
41
- h5: true,
42
- h6: true,
43
- header: true,
44
- hgroup: true,
45
- hr: true,
46
- li: true,
47
- noscript: true,
48
- ol: true,
49
- output: true,
50
- p: true,
51
- pre: true,
52
- section: true,
53
- table: true,
54
- tfoot: true,
55
- ul: true
56
- };
57
-
58
- var isListItemNode = function isListItemNode(node) {
59
- return Boolean(node && node.nodeName.toLowerCase() === 'li');
60
- };
61
-
62
- var isTextNode = function isTextNode(node) {
63
- return Boolean(node && node.nodeType === Node.TEXT_NODE);
64
- };
65
-
1
+ /**
2
+ * @name paragraph_node
3
+ */
4
+
5
+ /**
6
+ * @name paragraph_with_no_marks_node
7
+ */
8
+
9
+ /**
10
+ * NOTE: Need this because TS is too smart and inline everything.
11
+ * So we need to give them separate identity.
12
+ * Probably there's a way to solve it but that will need time and exploration.
13
+ * // http://bit.ly/2raXFX5
14
+ * type T1 = X | Y
15
+ * type T2 = A | T1 | B // T2 = A | X | Y | B
16
+ */
17
+
18
+ /**
19
+ * @name paragraph_with_alignment_node
20
+ */
21
+
22
+ /**
23
+ * @name paragraph_with_indentation_node
24
+ */
66
25
  var isImageNode = function isImageNode(node) {
67
26
  return Boolean(node && node.nodeName.toLowerCase() === 'img');
68
27
  };
@@ -85,21 +44,6 @@ var hasInlineImage = function hasInlineImage(node) {
85
44
  });
86
45
  };
87
46
 
88
- var hasWhiteSpacePre = function hasWhiteSpacePre(node) {
89
- return Boolean(node instanceof HTMLElement && node.style.whiteSpace === 'pre');
90
- };
91
-
92
- var hasFontFamilyMonospace = function hasFontFamilyMonospace(node) {
93
- return Boolean(node instanceof HTMLElement && node.style.fontFamily.includes('monospace'));
94
- };
95
-
96
- var isBlockLevelNode = function isBlockLevelNode(node) {
97
- return Boolean(node && blockTags.hasOwnProperty(node.nodeName.toLowerCase()));
98
- };
99
-
100
- var NOT_INTERNAL_LINKS = [':not([data-inline-card])', ':not([data-block-card])', ':not([data-block-link])', ':not([data-skip-paste])'].join('');
101
- var ANCHOR_LINK = "a[href]".concat(NOT_INTERNAL_LINKS);
102
- var NOT_INTERNAL_ELEMENTS = [':not(.code-block)', ':not([data-node-type])', ':not([data-embed-card])', ':not([data-layout-section])', ':not([data-task-local-id])', ':not([data-task-state])', ':not([data-pm-slice])', ':not([data-mark-type])', ':not([data-layout-content])', ':not([data-panel-content])'].join('');
103
47
  var pDOM = ['p', 0];
104
48
  export var paragraph = {
105
49
  selectable: false,
@@ -108,70 +52,6 @@ export var paragraph = {
108
52
  marks: 'strong code em link strike subsup textColor typeAheadQuery underline confluenceInlineComment action annotation unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
109
53
  parseDOM: [{
110
54
  tag: 'p'
111
- }, {
112
- tag: "div".concat(NOT_INTERNAL_ELEMENTS, ", li:not([data-pm-slice])"),
113
- priority: 100,
114
- getAttrs: function getAttrs(node) {
115
- if (!(node instanceof Node)) {
116
- return false;
117
- }
118
-
119
- var isCodeBlock = hasWhiteSpacePre(node) || hasFontFamilyMonospace(node);
120
-
121
- if (isCodeBlock || !node.hasChildNodes()) {
122
- return false;
123
- }
124
-
125
- var hasInlineChildren = Array.from(node.childNodes).every(function (child) {
126
- return !isBlockLevelNode(child) && // IMG is considered block for mediaSingle
127
- !isImageNode(child);
128
- });
129
-
130
- if (!hasInlineChildren) {
131
- return false;
132
- }
133
-
134
- if ( // We can skip this rule for pure list items
135
- isListItemNode(node) && Array.from(node.childNodes).every(isTextNode)) {
136
- return false;
137
- }
138
-
139
- return null;
140
- }
141
- }, {
142
- tag: ":not(span) + ".concat(ANCHOR_LINK),
143
- priority: 100,
144
- getContent: getLinkContent
145
- }, {
146
- tag: ":not(span) > ".concat(ANCHOR_LINK, ":first-child"),
147
- getAttrs: function getAttrs(node) {
148
- if (!(node instanceof Node)) {
149
- return false;
150
- }
151
-
152
- if (isBlockLevelNode(node.firstChild)) {
153
- return null;
154
- }
155
-
156
- if (hasInlineImage(node)) {
157
- return false;
158
- }
159
-
160
- var isNextSiblingValid = node.nextSibling === null || node.nextSibling instanceof Text && (node.nextSibling.textContent || '').trim().length === 0;
161
-
162
- if (isNextSiblingValid) {
163
- return null;
164
- } // This rule should not match when there is any sibling after the anchor
165
-
166
-
167
- if (!isBlockLevelNode(node.nextSibling)) {
168
- return false;
169
- }
170
-
171
- return null;
172
- },
173
- priority: 100,
174
- getContent: getLinkContent
175
55
  }],
176
56
  toDOM: function toDOM() {
177
57
  return pDOM;
@@ -189,7 +189,7 @@ export var tableCell = {
189
189
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
190
190
  attrs: cellAttrs,
191
191
  tableRole: 'cell',
192
- marks: 'link alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
192
+ marks: 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
193
193
  isolating: true,
194
194
  parseDOM: [// Ignore number cell copied from renderer
195
195
  {
@@ -222,7 +222,7 @@ export var tableHeader = {
222
222
  attrs: cellAttrs,
223
223
  tableRole: 'header_cell',
224
224
  isolating: true,
225
- marks: 'link alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
225
+ marks: 'alignment dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
226
226
  parseDOM: [{
227
227
  tag: 'th',
228
228
  getAttrs: function getAttrs(dom) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "20.1.3",
3
+ "version": "22.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/adf-schema/json-schema",
3
+ "main": "../dist/cjs/json-schema/index.js",
4
+ "module": "../dist/esm/json-schema/index.js",
5
+ "module:es2019": "../dist/es2019/json-schema/index.js",
6
+ "types": "../dist/types/json-schema/index.d.ts"
7
+ }