@atlaskit/adf-schema 24.0.3 → 25.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 (74) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/cjs/index.js +6 -0
  3. package/dist/cjs/schema/bitbucket-schema.js +3 -0
  4. package/dist/cjs/schema/confluence-schema.js +8 -0
  5. package/dist/cjs/schema/create-schema.js +1 -1
  6. package/dist/cjs/schema/index.js +6 -0
  7. package/dist/cjs/schema/jira-schema.js +47 -0
  8. package/dist/cjs/schema/marks/alignment.js +1 -1
  9. package/dist/cjs/schema/marks/annotation.js +1 -1
  10. package/dist/cjs/schema/nodes/bullet-list.js +0 -5
  11. package/dist/cjs/schema/nodes/index.js +6 -0
  12. package/dist/cjs/schema/nodes/list-item.js +0 -6
  13. package/dist/cjs/schema/nodes/media.js +3 -0
  14. package/dist/cjs/schema/nodes/ordered-list.js +66 -6
  15. package/dist/cjs/schema/nodes/tableNodes.js +11 -6
  16. package/dist/cjs/schema/nodes/types/list.js +5 -0
  17. package/dist/cjs/utils/url.js +7 -2
  18. package/dist/cjs/version.json +1 -1
  19. package/dist/es2019/index.js +1 -1
  20. package/dist/es2019/schema/bitbucket-schema.js +4 -0
  21. package/dist/es2019/schema/confluence-schema.js +8 -0
  22. package/dist/es2019/schema/create-schema.js +2 -2
  23. package/dist/es2019/schema/index.js +1 -1
  24. package/dist/es2019/schema/jira-schema.js +48 -0
  25. package/dist/es2019/schema/marks/alignment.js +1 -1
  26. package/dist/es2019/schema/marks/annotation.js +1 -1
  27. package/dist/es2019/schema/nodes/bullet-list.js +0 -5
  28. package/dist/es2019/schema/nodes/index.js +1 -1
  29. package/dist/es2019/schema/nodes/list-item.js +0 -6
  30. package/dist/es2019/schema/nodes/media.js +3 -0
  31. package/dist/es2019/schema/nodes/ordered-list.js +55 -5
  32. package/dist/es2019/schema/nodes/tableNodes.js +11 -6
  33. package/dist/es2019/schema/nodes/types/list.js +1 -0
  34. package/dist/es2019/utils/url.js +7 -2
  35. package/dist/es2019/version.json +1 -1
  36. package/dist/esm/index.js +1 -1
  37. package/dist/esm/schema/bitbucket-schema.js +4 -0
  38. package/dist/esm/schema/confluence-schema.js +8 -0
  39. package/dist/esm/schema/create-schema.js +2 -2
  40. package/dist/esm/schema/index.js +1 -1
  41. package/dist/esm/schema/jira-schema.js +48 -0
  42. package/dist/esm/schema/marks/alignment.js +1 -1
  43. package/dist/esm/schema/marks/annotation.js +1 -1
  44. package/dist/esm/schema/nodes/bullet-list.js +0 -5
  45. package/dist/esm/schema/nodes/index.js +1 -1
  46. package/dist/esm/schema/nodes/list-item.js +0 -6
  47. package/dist/esm/schema/nodes/media.js +3 -0
  48. package/dist/esm/schema/nodes/ordered-list.js +59 -5
  49. package/dist/esm/schema/nodes/tableNodes.js +11 -6
  50. package/dist/esm/schema/nodes/types/list.js +1 -0
  51. package/dist/esm/utils/url.js +7 -2
  52. package/dist/esm/version.json +1 -1
  53. package/dist/json-schema/v1/full.json +38 -41
  54. package/dist/json-schema/v1/stage-0.json +38 -41
  55. package/dist/types/index.d.ts +1 -1
  56. package/dist/types/schema/bitbucket-schema.d.ts +3 -0
  57. package/dist/types/schema/confluence-schema.d.ts +6 -0
  58. package/dist/types/schema/index.d.ts +1 -1
  59. package/dist/types/schema/jira-schema.d.ts +39 -0
  60. package/dist/types/schema/nodes/bullet-list.d.ts +0 -11
  61. package/dist/types/schema/nodes/index.d.ts +4 -4
  62. package/dist/types/schema/nodes/list-item.d.ts +0 -18
  63. package/dist/types/schema/nodes/media.d.ts +1 -0
  64. package/dist/types/schema/nodes/ordered-list.d.ts +1 -17
  65. package/dist/types/schema/nodes/panel.d.ts +2 -2
  66. package/dist/types/schema/nodes/tableNodes.d.ts +2 -2
  67. package/dist/types/schema/nodes/types/block-content.d.ts +2 -2
  68. package/dist/types/schema/nodes/types/list.d.ts +42 -0
  69. package/dist/types/schema/nodes/types/non-nestable-block-content.d.ts +2 -2
  70. package/dist/types/utils/url.d.ts +4 -0
  71. package/json-schema/v1/full.json +38 -41
  72. package/json-schema/v1/stage-0.json +38 -41
  73. package/package.json +3 -3
  74. package/report.api.md +7 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 25.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`5d317ed8aa3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5d317ed8aa3) - [ux] ED-15882: Implement custom starting numbers for orderedList nodes in adf-schema, editor, renderer, transformers behind restartNumberedLists feature flag. Users will be able to set a custom starting number when typing to create a numbered list in the Editor and this will be persisted across Renderer and other format transformations.
8
+
9
+ Note: restartNumberedLists will be off by default. To enable it, consumers will need to set <Editor featureFlags={{ restartNumberedLists: true }}> or <Renderer featureFlags={{ restartNumberedLists: true }}>
10
+
11
+ ### Minor Changes
12
+
13
+ - [`92613b1f023`](https://bitbucket.org/atlassian/atlassian-frontend/commits/92613b1f023) - ED-15018 and ED-13913 - Remove all circular dependencies and ignored warnings in editor
14
+
15
+ ### Patch Changes
16
+
17
+ - [`aa3c130c43a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/aa3c130c43a) - Changes the annotation mark to inclusive in order to fix the annotation being deleted when doing composition
18
+ - [`7590e54ccc2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7590e54ccc2) - ED-15676 deprecated product-specific schema exports from @atlaskit/adf-schema (`schema-bitbucket`, `schema-confluence` and `schema-jira`). Use `@atlaskit/adf-schema/schema-default` instead.
19
+
20
+ From `@atlaskit/adf-schema/schema-bitbucket`
21
+
22
+ - `default (bitbucketSchema)`
23
+
24
+ From `@atlaskit/adf-schema/schema-confluence`
25
+
26
+ - `default (confluenceSchema)`
27
+ - `confluenceSchemaWithMediaSingle`
28
+
29
+ From `@atlaskit/adf-schema/schema-jira`
30
+
31
+ - `default (jiraSchema)`
32
+ - `JIRASchemaConfig`
33
+ - `isSchemaWithLists`
34
+ - `isSchemaWithMentions`
35
+ - `isSchemaWithEmojis`
36
+ - `isSchemaWithLinks`
37
+ - `isSchemaWithAdvancedTextFormattingMarks`
38
+ - `isSchemaWithSubSupMark`
39
+ - `isSchemaWithCodeBlock`
40
+ - `isSchemaWithBlockQuotes`
41
+ - `isSchemaWithMedia`
42
+ - `isSchemaWithTextColor`
43
+ - `isSchemaWithTables`
44
+
45
+ - [`ec05886ac07`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ec05886ac07) - [ux] ED-15871 Fixed issue with pasting a table from renderer does not respect theme mode
46
+ - [`3a35da6c331`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a35da6c331) - DTR-825 ED-9775: added jamfselfservice:// to whitelistedURLPatterns
47
+ - [`1267ffe2c42`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1267ffe2c42) - Add media traceId into copy/paste operations
48
+ - [`b2fa6d3e611`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2fa6d3e611) - [ED-16106] Fix margin top when paragraph has alignment marks
49
+
3
50
  ## 24.0.3
4
51
 
5
52
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -759,6 +759,12 @@ Object.defineProperty(exports, "orderedListSelector", {
759
759
  return _schema.orderedListSelector;
760
760
  }
761
761
  });
762
+ Object.defineProperty(exports, "orderedListWithOrder", {
763
+ enumerable: true,
764
+ get: function get() {
765
+ return _schema.orderedListWithOrder;
766
+ }
767
+ });
762
768
  Object.defineProperty(exports, "panel", {
763
769
  enumerable: true,
764
770
  get: function get() {
@@ -7,6 +7,9 @@ exports.bitbucketSchema = void 0;
7
7
 
8
8
  var _createSchema = require("./create-schema");
9
9
 
10
+ /**
11
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
12
+ **/
10
13
  var bitbucketSchema = (0, _createSchema.createSchema)({
11
14
  nodes: ['doc', 'caption', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'hardBreak', 'rule', 'image', 'media', 'mediaSingle', 'mention', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'],
12
15
  marks: ['em', 'strong', 'strike', 'link', 'code', 'unsupportedMark', 'unsupportedNodeAttribute']
@@ -9,10 +9,18 @@ var _createSchema = require("./create-schema");
9
9
 
10
10
  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'];
11
11
  var marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
12
+ /**
13
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
14
+ **/
15
+
12
16
  var confluenceSchema = (0, _createSchema.createSchema)({
13
17
  nodes: nodes,
14
18
  marks: marks
15
19
  });
20
+ /**
21
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
22
+ **/
23
+
16
24
  exports.confluenceSchema = confluenceSchema;
17
25
  var confluenceSchemaWithMediaSingle = (0, _createSchema.createSchema)({
18
26
  nodes: nodes.concat('mediaSingle'),
@@ -93,7 +93,7 @@ var nodesInOrder = [{
93
93
  spec: _nodes.bulletList
94
94
  }, {
95
95
  name: 'orderedList',
96
- spec: _nodes.orderedList
96
+ spec: _nodes.orderedListWithOrder
97
97
  }, {
98
98
  name: 'listItem',
99
99
  spec: _nodes.listItem
@@ -405,6 +405,12 @@ Object.defineProperty(exports, "orderedListSelector", {
405
405
  return _nodes.orderedListSelector;
406
406
  }
407
407
  });
408
+ Object.defineProperty(exports, "orderedListWithOrder", {
409
+ enumerable: true,
410
+ get: function get() {
411
+ return _nodes.orderedListWithOrder;
412
+ }
413
+ });
408
414
  Object.defineProperty(exports, "panel", {
409
415
  enumerable: true,
410
416
  get: function get() {
@@ -18,6 +18,9 @@ exports.isSchemaWithTextColor = isSchemaWithTextColor;
18
18
 
19
19
  var _createSchema = require("./create-schema");
20
20
 
21
+ /**
22
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
23
+ **/
21
24
  function makeSchema(config) {
22
25
  var nodes = ['doc', 'paragraph', 'text', 'hardBreak', 'heading', 'rule'];
23
26
  var marks = ['strong', 'em', 'underline', 'typeAheadQuery', 'unsupportedMark', 'unsupportedNodeAttribute'];
@@ -72,46 +75,90 @@ function makeSchema(config) {
72
75
  marks: marks
73
76
  });
74
77
  }
78
+ /**
79
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
80
+ **/
81
+
75
82
 
76
83
  function isSchemaWithLists(schema) {
77
84
  return !!schema.nodes.bulletList;
78
85
  }
86
+ /**
87
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
88
+ **/
89
+
79
90
 
80
91
  function isSchemaWithMentions(schema) {
81
92
  return !!schema.nodes.mention;
82
93
  }
94
+ /**
95
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
96
+ **/
97
+
83
98
 
84
99
  function isSchemaWithEmojis(schema) {
85
100
  return !!schema.nodes.emoji;
86
101
  }
102
+ /**
103
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
104
+ **/
105
+
87
106
 
88
107
  function isSchemaWithLinks(schema) {
89
108
  return !!schema.marks.link;
90
109
  }
110
+ /**
111
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
112
+ **/
113
+
91
114
 
92
115
  function isSchemaWithAdvancedTextFormattingMarks(schema) {
93
116
  return !!schema.marks.code && !!schema.marks.strike;
94
117
  }
118
+ /**
119
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
120
+ **/
121
+
95
122
 
96
123
  function isSchemaWithSubSupMark(schema) {
97
124
  return !!schema.marks.subsup;
98
125
  }
126
+ /**
127
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
128
+ **/
129
+
99
130
 
100
131
  function isSchemaWithCodeBlock(schema) {
101
132
  return !!schema.nodes.codeBlock;
102
133
  }
134
+ /**
135
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
136
+ **/
137
+
103
138
 
104
139
  function isSchemaWithBlockQuotes(schema) {
105
140
  return !!schema.nodes.blockquote;
106
141
  }
142
+ /**
143
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
144
+ **/
145
+
107
146
 
108
147
  function isSchemaWithMedia(schema) {
109
148
  return !!schema.nodes.mediaGroup && !!schema.nodes.media && !!schema.nodes.mediaInline;
110
149
  }
150
+ /**
151
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
152
+ **/
153
+
111
154
 
112
155
  function isSchemaWithTextColor(schema) {
113
156
  return !!schema.marks.textColor;
114
157
  }
158
+ /**
159
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
160
+ **/
161
+
115
162
 
116
163
  function isSchemaWithTables(schema) {
117
164
  return !!schema.nodes.table && !!schema.nodes.tableCell && !!schema.nodes.tableHeader && !!schema.nodes.tableRow;
@@ -31,7 +31,7 @@ var alignment = {
31
31
  }],
32
32
  toDOM: function toDOM(mark) {
33
33
  return ['div', {
34
- class: "fabric-editor-block-mark fabric-editor-align-".concat(mark.attrs.align),
34
+ class: "fabric-editor-block-mark fabric-editor-alignment fabric-editor-align-".concat(mark.attrs.align),
35
35
  'data-align': mark.attrs.align
36
36
  }, 0];
37
37
  }
@@ -52,7 +52,7 @@ function buildDataAttributes(_ref) {
52
52
  }
53
53
 
54
54
  var annotation = {
55
- inclusive: false,
55
+ inclusive: true,
56
56
  group: 'annotation',
57
57
  excludes: '',
58
58
  attrs: {
@@ -4,11 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bulletListSelector = exports.bulletList = void 0;
7
- // eslint-disable-next-line import/no-cycle
8
-
9
- /**
10
- * @name bulletList_node
11
- */
12
7
  var bulletListSelector = '.ak-ul';
13
8
  exports.bulletListSelector = bulletListSelector;
14
9
  var bulletList = {
@@ -281,6 +281,12 @@ Object.defineProperty(exports, "orderedListSelector", {
281
281
  return _orderedList.orderedListSelector;
282
282
  }
283
283
  });
284
+ Object.defineProperty(exports, "orderedListWithOrder", {
285
+ enumerable: true,
286
+ get: function get() {
287
+ return _orderedList.orderedListWithOrder;
288
+ }
289
+ });
284
290
  Object.defineProperty(exports, "panel", {
285
291
  enumerable: true,
286
292
  get: function get() {
@@ -4,12 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.listItem = void 0;
7
- // eslint-disable-next-line import/no-cycle
8
- // eslint-disable-next-line import/no-cycle
9
-
10
- /**
11
- * @name listItem_node
12
- */
13
7
  var listItem = {
14
8
  content: '(paragraph | mediaSingle | codeBlock) (paragraph | bulletList | orderedList | mediaSingle | codeBlock)*',
15
9
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -47,6 +47,9 @@ var defaultAttrs = {
47
47
  __contextId: {
48
48
  default: null
49
49
  },
50
+ __mediaTraceId: {
51
+ default: null
52
+ },
50
53
  __external: {
51
54
  default: false
52
55
  }
@@ -1,18 +1,27 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
- exports.orderedListSelector = exports.orderedList = void 0;
7
- // eslint-disable-next-line import/no-cycle
8
+ exports.orderedListWithOrder = exports.orderedListSelector = exports.orderedList = void 0;
9
+
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+
12
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
+
14
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
15
 
9
- /**
10
- * @name orderedList_node
11
- */
12
16
  var orderedListSelector = '.ak-ol';
13
17
  exports.orderedListSelector = orderedListSelector;
14
18
  var orderedList = {
15
19
  group: 'block',
20
+ attrs: {
21
+ order: {
22
+ default: 1
23
+ }
24
+ },
16
25
  content: 'listItem+',
17
26
  marks: 'unsupportedMark unsupportedNodeAttribute',
18
27
  selectable: false,
@@ -25,5 +34,56 @@ var orderedList = {
25
34
  };
26
35
  return ['ol', attrs, 0];
27
36
  }
37
+ }; // resolve "start" to a safe, 0+ integer, otherwise return undefined
38
+ // Note: Any changes to this function should also be made to "resolveOrder"
39
+ // in packages/editor/editor-common/src/utils/list.ts
40
+
41
+ exports.orderedList = orderedList;
42
+
43
+ var resolveStart = function resolveStart(start) {
44
+ var num = Number(start);
45
+
46
+ if (Number.isNaN(num)) {
47
+ return;
48
+ }
49
+
50
+ if (num < 0) {
51
+ return;
52
+ }
53
+
54
+ return Math.floor(Math.max(num, 0));
28
55
  };
29
- exports.orderedList = orderedList;
56
+
57
+ var orderedListWithOrder = _objectSpread(_objectSpread({}, orderedList), {}, {
58
+ parseDOM: [{
59
+ tag: 'ol',
60
+ getAttrs: function getAttrs(domNode) {
61
+ var dom = domNode;
62
+ var startDOMAttr = dom.getAttribute('start');
63
+
64
+ if (startDOMAttr) {
65
+ var start = resolveStart(startDOMAttr);
66
+
67
+ if (typeof start === 'number') {
68
+ return {
69
+ order: start
70
+ };
71
+ }
72
+ }
73
+
74
+ return null;
75
+ }
76
+ }],
77
+ toDOM: function toDOM(node) {
78
+ var _node$attrs;
79
+
80
+ var start = resolveStart(node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order);
81
+ var attrs = {
82
+ start: typeof start === 'number' ? String(start) : undefined,
83
+ class: orderedListSelector.substr(1)
84
+ };
85
+ return ['ol', attrs, 0];
86
+ }
87
+ });
88
+
89
+ exports.orderedListWithOrder = orderedListWithOrder;
@@ -33,13 +33,17 @@ var getCellAttrs = function getCellAttrs(dom) {
33
33
  return Number(str);
34
34
  }) : null;
35
35
  var colspan = Number(dom.getAttribute('colspan') || 1);
36
- var backgroundColor = dom.style.backgroundColor;
36
+ var backgroundColor = dom.style.backgroundColor; // ignore setting background attr if ds neutral token is detected
37
37
 
38
- if (backgroundColor && (0, _colors.isRgb)(backgroundColor)) {
39
- var result = (0, _colors.rgbToHex)(backgroundColor);
38
+ if (backgroundColor.includes('--ds-background-neutral')) {
39
+ backgroundColor = '';
40
+ } else {
41
+ if (backgroundColor && (0, _colors.isRgb)(backgroundColor)) {
42
+ var result = (0, _colors.rgbToHex)(backgroundColor);
40
43
 
41
- if (result !== null) {
42
- backgroundColor = result;
44
+ if (result !== null) {
45
+ backgroundColor = result;
46
+ }
43
47
  }
44
48
  }
45
49
 
@@ -77,8 +81,9 @@ var getCellDomAttrs = function getCellDomAttrs(node) {
77
81
  var background = node.attrs.background; // to ensure that we don't overwrite product's style:
78
82
  // - it clears background color for <th> if its set to gray
79
83
  // - it clears background color for <td> if its set to white
84
+ // - it clears background color for <th> if ds neutral token is detected
80
85
 
81
- var ignored = nodeType === 'tableHeader' && background === tableBackgroundColorNames.get('light gray') || nodeType === 'tableCell' && background === tableBackgroundColorNames.get('white');
86
+ var ignored = nodeType === 'tableHeader' && background === tableBackgroundColorNames.get('light gray') || nodeType === 'tableCell' && background === tableBackgroundColorNames.get('white') || nodeType === 'tableHeader' && background.includes('--ds-background-neutral');
82
87
 
83
88
  if (ignored) {
84
89
  attrs.style = '';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -12,7 +12,11 @@ exports.normalizeUrl = normalizeUrl;
12
12
 
13
13
  var _linkifyIt = _interopRequireDefault(require("linkify-it"));
14
14
 
15
- var whitelistedURLPatterns = [/^https?:\/\//im, /^ftps?:\/\//im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:/im, /^facetime:/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^#/im];
15
+ /**
16
+ * This file has been duplicated in packages/linking-platform/link-picker/src/common/utils/url.ts
17
+ * Any changes made here should be mirrored there.
18
+ */
19
+ var whitelistedURLPatterns = [/^https?:\/\//im, /^ftps?:\/\//im, /^jamfselfservice:\/\//im, /^\//im, /^mailto:/im, /^skype:/im, /^callto:/im, /^facetime:/im, /^git:/im, /^irc6?:/im, /^news:/im, /^nntp:/im, /^feed:/im, /^cvs:/im, /^svn:/im, /^mvn:/im, /^ssh:/im, /^scp:\/\//im, /^sftp:\/\//im, /^itms:/im, /^notes:/im, /^hipchat:\/\//im, /^sourcetree:/im, /^urn:/im, /^tel:/im, /^xmpp:/im, /^telnet:/im, /^vnc:/im, /^rdp:/im, /^whatsapp:/im, /^slack:/im, /^sips?:/im, /^magnet:/im, /^#/im];
16
20
  /**
17
21
  * Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
18
22
  */
@@ -33,11 +37,12 @@ exports.isSafeUrl = isSafeUrl;
33
37
  var linkify = (0, _linkifyIt.default)();
34
38
  exports.linkify = linkify;
35
39
  linkify.add('sourcetree:', 'http:');
40
+ linkify.add('jamfselfservice:', 'http:');
36
41
  var tlds = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
37
42
  var tlds2Char = 'a[cdefgilmnoqrtuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrtuvwxyz]|n[acefgilopruz]|om|p[aefghkmnrtw]|qa|r[eosuw]|s[abcdegijklmnrtuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';
38
43
  tlds.push(tlds2Char);
39
44
  linkify.tlds(tlds, false);
40
- var LINK_REGEXP = /(https?|ftp):\/\/[^\s]+/;
45
+ var LINK_REGEXP = /(https?|ftp|jamfselfservice):\/\/[^\s]+/;
41
46
  exports.LINK_REGEXP = LINK_REGEXP;
42
47
 
43
48
  var linkifyMatch = function linkifyMatch(text) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "24.0.3",
3
+ "version": "25.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,2 +1,2 @@
1
- export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, 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, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, 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 } from './schema';
1
+ export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, 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, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, 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 } from './schema';
2
2
  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 } from './utils';
@@ -1,4 +1,8 @@
1
1
  import { createSchema } from './create-schema';
2
+ /**
3
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
4
+ **/
5
+
2
6
  export const bitbucketSchema = createSchema({
3
7
  nodes: ['doc', 'caption', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'hardBreak', 'rule', 'image', 'media', 'mediaSingle', 'mention', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'inlineCard', 'unsupportedBlock', 'unsupportedInline'],
4
8
  marks: ['em', 'strong', 'strike', 'link', 'code', 'unsupportedMark', 'unsupportedNodeAttribute']
@@ -1,10 +1,18 @@
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
3
  const marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
4
+ /**
5
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
6
+ **/
7
+
4
8
  export const confluenceSchema = createSchema({
5
9
  nodes,
6
10
  marks
7
11
  });
12
+ /**
13
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
14
+ **/
15
+
8
16
  export const confluenceSchemaWithMediaSingle = createSchema({
9
17
  nodes: nodes.concat('mediaSingle'),
10
18
  marks
@@ -1,7 +1,7 @@
1
1
  import { Schema } from '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 } from './marks';
4
- import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedList, listItem, heading, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline, mediaGroup, mediaSingleWithCaption, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, 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, listItem, heading, blockquote, codeBlock, panel, rule, image, mention, media, mediaInline, mediaGroup, mediaSingleWithCaption, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
5
5
 
6
6
  function addItems(builtInItems, config, customSpecs = {}) {
7
7
  if (!config) {
@@ -68,7 +68,7 @@ const nodesInOrder = [{
68
68
  spec: bulletList
69
69
  }, {
70
70
  name: 'orderedList',
71
- spec: orderedList
71
+ spec: orderedListWithOrder
72
72
  }, {
73
73
  name: 'listItem',
74
74
  spec: listItem
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, 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, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline } from './nodes';
1
+ export { PanelType, blockCard, blockquote, 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, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline } from './nodes';
2
2
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute } from './marks';
3
3
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
4
4
  export { inlineNodes } from './inline-nodes';
@@ -1,4 +1,8 @@
1
1
  import { createSchema } from './create-schema';
2
+
3
+ /**
4
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
5
+ **/
2
6
  export default function makeSchema(config) {
3
7
  const nodes = ['doc', 'paragraph', 'text', 'hardBreak', 'heading', 'rule'];
4
8
  const marks = ['strong', 'em', 'underline', 'typeAheadQuery', 'unsupportedMark', 'unsupportedNodeAttribute'];
@@ -53,36 +57,80 @@ export default function makeSchema(config) {
53
57
  marks
54
58
  });
55
59
  }
60
+ /**
61
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
62
+ **/
63
+
56
64
  export function isSchemaWithLists(schema) {
57
65
  return !!schema.nodes.bulletList;
58
66
  }
67
+ /**
68
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
69
+ **/
70
+
59
71
  export function isSchemaWithMentions(schema) {
60
72
  return !!schema.nodes.mention;
61
73
  }
74
+ /**
75
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
76
+ **/
77
+
62
78
  export function isSchemaWithEmojis(schema) {
63
79
  return !!schema.nodes.emoji;
64
80
  }
81
+ /**
82
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
83
+ **/
84
+
65
85
  export function isSchemaWithLinks(schema) {
66
86
  return !!schema.marks.link;
67
87
  }
88
+ /**
89
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
90
+ **/
91
+
68
92
  export function isSchemaWithAdvancedTextFormattingMarks(schema) {
69
93
  return !!schema.marks.code && !!schema.marks.strike;
70
94
  }
95
+ /**
96
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
97
+ **/
98
+
71
99
  export function isSchemaWithSubSupMark(schema) {
72
100
  return !!schema.marks.subsup;
73
101
  }
102
+ /**
103
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
104
+ **/
105
+
74
106
  export function isSchemaWithCodeBlock(schema) {
75
107
  return !!schema.nodes.codeBlock;
76
108
  }
109
+ /**
110
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
111
+ **/
112
+
77
113
  export function isSchemaWithBlockQuotes(schema) {
78
114
  return !!schema.nodes.blockquote;
79
115
  }
116
+ /**
117
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
118
+ **/
119
+
80
120
  export function isSchemaWithMedia(schema) {
81
121
  return !!schema.nodes.mediaGroup && !!schema.nodes.media && !!schema.nodes.mediaInline;
82
122
  }
123
+ /**
124
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
125
+ **/
126
+
83
127
  export function isSchemaWithTextColor(schema) {
84
128
  return !!schema.marks.textColor;
85
129
  }
130
+ /**
131
+ * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
132
+ **/
133
+
86
134
  export function isSchemaWithTables(schema) {
87
135
  return !!schema.nodes.table && !!schema.nodes.tableCell && !!schema.nodes.tableHeader && !!schema.nodes.tableRow;
88
136
  }
@@ -24,7 +24,7 @@ export const alignment = {
24
24
 
25
25
  toDOM(mark) {
26
26
  return ['div', {
27
- class: `fabric-editor-block-mark fabric-editor-align-${mark.attrs.align}`,
27
+ class: `fabric-editor-block-mark fabric-editor-alignment fabric-editor-align-${mark.attrs.align}`,
28
28
  'data-align': mark.attrs.align
29
29
  }, 0];
30
30
  }
@@ -34,7 +34,7 @@ export function buildDataAttributes({
34
34
  return data;
35
35
  }
36
36
  export const annotation = {
37
- inclusive: false,
37
+ inclusive: true,
38
38
  group: 'annotation',
39
39
  excludes: '',
40
40
  attrs: {