@atlaskit/adf-schema 23.3.1 → 24.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 (131) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/schema/confluence-schema.js +1 -1
  3. package/dist/cjs/schema/jira-schema.js +2 -2
  4. package/dist/cjs/schema/nodes/media.js +2 -1
  5. package/dist/cjs/schema/nodes/tableNodes.js +1 -1
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/es2019/schema/confluence-schema.js +1 -1
  8. package/dist/es2019/schema/jira-schema.js +2 -2
  9. package/dist/es2019/schema/nodes/media.js +2 -1
  10. package/dist/es2019/schema/nodes/tableNodes.js +1 -1
  11. package/dist/es2019/version.json +1 -1
  12. package/dist/esm/schema/confluence-schema.js +1 -1
  13. package/dist/esm/schema/jira-schema.js +2 -2
  14. package/dist/esm/schema/nodes/media.js +2 -1
  15. package/dist/esm/schema/nodes/tableNodes.js +1 -1
  16. package/dist/esm/version.json +1 -1
  17. package/dist/json-schema/package.json +8 -1
  18. package/dist/types-ts4.0/index.d.ts +4 -0
  19. package/dist/types-ts4.0/json-schema/index.d.ts +2 -0
  20. package/dist/types-ts4.0/schema/bitbucket-schema.d.ts +2 -0
  21. package/dist/types-ts4.0/schema/confluence-schema.d.ts +3 -0
  22. package/dist/types-ts4.0/schema/create-schema.d.ts +32 -0
  23. package/dist/types-ts4.0/schema/default-schema.d.ts +7 -0
  24. package/dist/types-ts4.0/schema/groups.d.ts +6 -0
  25. package/dist/types-ts4.0/schema/index.d.ts +7 -0
  26. package/dist/types-ts4.0/schema/inline-nodes.d.ts +1 -0
  27. package/dist/types-ts4.0/schema/jira-schema.d.ts +26 -0
  28. package/dist/types-ts4.0/schema/marks/alignment.d.ts +16 -0
  29. package/dist/types-ts4.0/schema/marks/annotation.d.ts +32 -0
  30. package/dist/types-ts4.0/schema/marks/breakout.d.ts +12 -0
  31. package/dist/types-ts4.0/schema/marks/code.d.ts +8 -0
  32. package/dist/types-ts4.0/schema/marks/confluence-inline-comment.d.ts +12 -0
  33. package/dist/types-ts4.0/schema/marks/data-consumer.d.ts +48 -0
  34. package/dist/types-ts4.0/schema/marks/em.d.ts +8 -0
  35. package/dist/types-ts4.0/schema/marks/fragment.d.ts +29 -0
  36. package/dist/types-ts4.0/schema/marks/indentation.d.ts +16 -0
  37. package/dist/types-ts4.0/schema/marks/index.d.ts +32 -0
  38. package/dist/types-ts4.0/schema/marks/link.d.ts +35 -0
  39. package/dist/types-ts4.0/schema/marks/strike.d.ts +8 -0
  40. package/dist/types-ts4.0/schema/marks/strong.d.ts +8 -0
  41. package/dist/types-ts4.0/schema/marks/subsup.d.ts +15 -0
  42. package/dist/types-ts4.0/schema/marks/text-color.d.ts +21 -0
  43. package/dist/types-ts4.0/schema/marks/type-ahead-query.d.ts +2 -0
  44. package/dist/types-ts4.0/schema/marks/underline.d.ts +8 -0
  45. package/dist/types-ts4.0/schema/marks/unsupported-mark.d.ts +2 -0
  46. package/dist/types-ts4.0/schema/marks/unsupported-node-attributes.d.ts +2 -0
  47. package/dist/types-ts4.0/schema/nodes/block-card.d.ts +22 -0
  48. package/dist/types-ts4.0/schema/nodes/blockquote.d.ts +14 -0
  49. package/dist/types-ts4.0/schema/nodes/bodied-extension.d.ts +24 -0
  50. package/dist/types-ts4.0/schema/nodes/bullet-list.d.ts +14 -0
  51. package/dist/types-ts4.0/schema/nodes/caption.d.ts +20 -0
  52. package/dist/types-ts4.0/schema/nodes/code-block.d.ts +31 -0
  53. package/dist/types-ts4.0/schema/nodes/confluence-jira-issue.d.ts +2 -0
  54. package/dist/types-ts4.0/schema/nodes/confluence-unsupported-block.d.ts +2 -0
  55. package/dist/types-ts4.0/schema/nodes/confluence-unsupported-inline.d.ts +2 -0
  56. package/dist/types-ts4.0/schema/nodes/date.d.ts +14 -0
  57. package/dist/types-ts4.0/schema/nodes/decision-item.d.ts +17 -0
  58. package/dist/types-ts4.0/schema/nodes/decision-list.d.ts +18 -0
  59. package/dist/types-ts4.0/schema/nodes/doc.d.ts +18 -0
  60. package/dist/types-ts4.0/schema/nodes/embed-card.d.ts +18 -0
  61. package/dist/types-ts4.0/schema/nodes/emoji.d.ts +14 -0
  62. package/dist/types-ts4.0/schema/nodes/expand.d.ts +33 -0
  63. package/dist/types-ts4.0/schema/nodes/extension.d.ts +18 -0
  64. package/dist/types-ts4.0/schema/nodes/hard-break.d.ts +11 -0
  65. package/dist/types-ts4.0/schema/nodes/heading.d.ts +36 -0
  66. package/dist/types-ts4.0/schema/nodes/image.d.ts +2 -0
  67. package/dist/types-ts4.0/schema/nodes/index.d.ts +93 -0
  68. package/dist/types-ts4.0/schema/nodes/inline-card.d.ts +10 -0
  69. package/dist/types-ts4.0/schema/nodes/inline-extension.d.ts +18 -0
  70. package/dist/types-ts4.0/schema/nodes/layout-column.d.ts +21 -0
  71. package/dist/types-ts4.0/schema/nodes/layout-section.d.ts +44 -0
  72. package/dist/types-ts4.0/schema/nodes/list-item.d.ts +20 -0
  73. package/dist/types-ts4.0/schema/nodes/media-group.d.ts +14 -0
  74. package/dist/types-ts4.0/schema/nodes/media-inline.d.ts +16 -0
  75. package/dist/types-ts4.0/schema/nodes/media-single.d.ts +61 -0
  76. package/dist/types-ts4.0/schema/nodes/media.d.ts +60 -0
  77. package/dist/types-ts4.0/schema/nodes/mention.d.ts +26 -0
  78. package/dist/types-ts4.0/schema/nodes/nested-expand.d.ts +27 -0
  79. package/dist/types-ts4.0/schema/nodes/ordered-list.d.ts +20 -0
  80. package/dist/types-ts4.0/schema/nodes/panel.d.ts +38 -0
  81. package/dist/types-ts4.0/schema/nodes/paragraph.d.ts +37 -0
  82. package/dist/types-ts4.0/schema/nodes/placeholder.d.ts +11 -0
  83. package/dist/types-ts4.0/schema/nodes/rule.d.ts +8 -0
  84. package/dist/types-ts4.0/schema/nodes/status.d.ts +20 -0
  85. package/dist/types-ts4.0/schema/nodes/tableNodes.d.ts +113 -0
  86. package/dist/types-ts4.0/schema/nodes/task-item.d.ts +17 -0
  87. package/dist/types-ts4.0/schema/nodes/task-list.d.ts +21 -0
  88. package/dist/types-ts4.0/schema/nodes/text.d.ts +15 -0
  89. package/dist/types-ts4.0/schema/nodes/types/block-content.d.ts +22 -0
  90. package/dist/types-ts4.0/schema/nodes/types/extensions.d.ts +34 -0
  91. package/dist/types-ts4.0/schema/nodes/types/inline-content.d.ts +32 -0
  92. package/dist/types-ts4.0/schema/nodes/types/mark.d.ts +15 -0
  93. package/dist/types-ts4.0/schema/nodes/types/non-nestable-block-content.d.ts +20 -0
  94. package/dist/types-ts4.0/schema/nodes/types/rich-media-common.d.ts +9 -0
  95. package/dist/types-ts4.0/schema/nodes/unknown-block.d.ts +3 -0
  96. package/dist/types-ts4.0/schema/nodes/unsupported-block.d.ts +2 -0
  97. package/dist/types-ts4.0/schema/nodes/unsupported-inline.d.ts +2 -0
  98. package/dist/types-ts4.0/schema/unsupported.d.ts +1 -0
  99. package/dist/types-ts4.0/steps/analytics.d.ts +59 -0
  100. package/dist/types-ts4.0/steps/set-attrs.d.ts +23 -0
  101. package/dist/types-ts4.0/steps/table/add-column.d.ts +88 -0
  102. package/dist/types-ts4.0/steps/table/constants.d.ts +4 -0
  103. package/dist/types-ts4.0/steps/table/sort-column.d.ts +18 -0
  104. package/dist/types-ts4.0/steps/table/types.d.ts +39 -0
  105. package/dist/types-ts4.0/steps/table/utils/cell-step.d.ts +51 -0
  106. package/dist/types-ts4.0/steps/table/utils/cells-at-column.d.ts +20 -0
  107. package/dist/types-ts4.0/steps/table/utils/find-column.d.ts +8 -0
  108. package/dist/types-ts4.0/steps/table/utils/get-table-rect-from-doc.d.ts +8 -0
  109. package/dist/types-ts4.0/steps/table/utils/side-effects/rows.d.ts +25 -0
  110. package/dist/types-ts4.0/steps/table/utils/side-effects/side-effects.d.ts +15 -0
  111. package/dist/types-ts4.0/steps/table/utils/side-effects/table.d.ts +16 -0
  112. package/dist/types-ts4.0/steps/table/utils/side-effects/types.d.ts +33 -0
  113. package/dist/types-ts4.0/steps/table/utils/table-map.d.ts +6 -0
  114. package/dist/types-ts4.0/steps/type-ahead.d.ts +35 -0
  115. package/dist/types-ts4.0/steps.d.ts +8 -0
  116. package/dist/types-ts4.0/utils/colors.d.ts +71 -0
  117. package/dist/types-ts4.0/utils/confluence/emoji.d.ts +50 -0
  118. package/dist/types-ts4.0/utils/extensions.d.ts +3 -0
  119. package/dist/types-ts4.0/utils/index.d.ts +6 -0
  120. package/dist/types-ts4.0/utils/parseDOM.d.ts +1 -0
  121. package/dist/types-ts4.0/utils/url.d.ts +23 -0
  122. package/dist/types-ts4.0/utils/uuid.d.ts +5 -0
  123. package/json-schema/package.json +8 -1
  124. package/package.json +11 -4
  125. package/schema/package.json +8 -1
  126. package/schema-bitbucket/package.json +8 -1
  127. package/schema-confluence/package.json +8 -1
  128. package/schema-default/package.json +8 -1
  129. package/schema-jira/package.json +8 -1
  130. package/steps/package.json +8 -1
  131. package/url/package.json +8 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 24.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
8
+
9
+ ## 24.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [`bd524db3926`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bd524db3926) - ED-15380 Update fragment prosemirror-schema to match ADF schema
14
+
15
+ ### Minor Changes
16
+
17
+ - [`1f99f6b79d3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1f99f6b79d3) - Support media inline for jira transformer and minor schema changes
18
+
3
19
  ## 23.3.1
4
20
 
5
21
  ### Patch Changes
@@ -7,7 +7,7 @@ exports.confluenceSchemaWithMediaSingle = exports.confluenceSchema = void 0;
7
7
 
8
8
  var _createSchema = require("./create-schema");
9
9
 
10
- var nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', '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'];
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
12
  var confluenceSchema = (0, _createSchema.createSchema)({
13
13
  nodes: nodes,
@@ -56,7 +56,7 @@ function makeSchema(config) {
56
56
  }
57
57
 
58
58
  if (config.allowMedia) {
59
- nodes.push('mediaGroup', 'mediaSingle', 'media', 'caption');
59
+ nodes.push('mediaGroup', 'mediaSingle', 'media', 'caption', 'mediaInline');
60
60
  }
61
61
 
62
62
  if (config.allowTextColor) {
@@ -106,7 +106,7 @@ function isSchemaWithBlockQuotes(schema) {
106
106
  }
107
107
 
108
108
  function isSchemaWithMedia(schema) {
109
- return !!schema.nodes.mediaGroup && !!schema.nodes.media;
109
+ return !!schema.nodes.mediaGroup && !!schema.nodes.media && !!schema.nodes.mediaInline;
110
110
  }
111
111
 
112
112
  function isSchemaWithTextColor(schema) {
@@ -179,7 +179,8 @@ var externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt'];
179
179
 
180
180
  var toJSON = function toJSON(node) {
181
181
  return {
182
- attrs: Object.keys(node.attrs).filter(function (key) {
182
+ attrs: Object.keys(node.attrs) // Strip private attributes e.g. __fileName, __fileSize, __fileMimeType, etc.
183
+ .filter(function (key) {
183
184
  return !(key[0] === '_' && key[1] === '_');
184
185
  }).reduce(function (obj, key) {
185
186
  if (node.attrs.type === 'external' && externalOnlyAttributes.indexOf(key) === -1) {
@@ -135,7 +135,7 @@ var createTableSpec = function createTableSpec() {
135
135
  var tableNodeSpec = {
136
136
  content: 'tableRow+',
137
137
  attrs: attrs,
138
- marks: 'fragment unsupportedMark unsupportedNodeAttribute',
138
+ marks: 'unsupportedMark unsupportedNodeAttribute',
139
139
  tableRole: 'table',
140
140
  isolating: true,
141
141
  selectable: false,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "23.3.1",
3
+ "version": "24.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { createSchema } from './create-schema';
2
- const nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', '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'];
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
4
  export const confluenceSchema = createSchema({
5
5
  nodes,
@@ -37,7 +37,7 @@ export default function makeSchema(config) {
37
37
  }
38
38
 
39
39
  if (config.allowMedia) {
40
- nodes.push('mediaGroup', 'mediaSingle', 'media', 'caption');
40
+ nodes.push('mediaGroup', 'mediaSingle', 'media', 'caption', 'mediaInline');
41
41
  }
42
42
 
43
43
  if (config.allowTextColor) {
@@ -78,7 +78,7 @@ export function isSchemaWithBlockQuotes(schema) {
78
78
  return !!schema.nodes.blockquote;
79
79
  }
80
80
  export function isSchemaWithMedia(schema) {
81
- return !!schema.nodes.mediaGroup && !!schema.nodes.media;
81
+ return !!schema.nodes.mediaGroup && !!schema.nodes.media && !!schema.nodes.mediaInline;
82
82
  }
83
83
  export function isSchemaWithTextColor(schema) {
84
84
  return !!schema.marks.textColor;
@@ -153,7 +153,8 @@ export const copyPrivateAttributes = (from, to, map) => {
153
153
  const optionalAttributes = ['occurrenceKey', 'width', 'height', 'url', 'alt'];
154
154
  const externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt'];
155
155
  export const toJSON = node => ({
156
- attrs: Object.keys(node.attrs).filter(key => !(key[0] === '_' && key[1] === '_')).reduce((obj, key) => {
156
+ attrs: Object.keys(node.attrs) // Strip private attributes e.g. __fileName, __fileSize, __fileMimeType, etc.
157
+ .filter(key => !(key[0] === '_' && key[1] === '_')).reduce((obj, key) => {
157
158
  if (node.attrs.type === 'external' && externalOnlyAttributes.indexOf(key) === -1) {
158
159
  return obj;
159
160
  }
@@ -103,7 +103,7 @@ const createTableSpec = () => {
103
103
  const tableNodeSpec = {
104
104
  content: 'tableRow+',
105
105
  attrs: attrs,
106
- marks: 'fragment unsupportedMark unsupportedNodeAttribute',
106
+ marks: 'unsupportedMark unsupportedNodeAttribute',
107
107
  tableRole: 'table',
108
108
  isolating: true,
109
109
  selectable: false,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "23.3.1",
3
+ "version": "24.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { createSchema } from './create-schema';
2
- var nodes = ['doc', 'paragraph', 'blockquote', 'codeBlock', 'panel', 'hardBreak', 'orderedList', 'bulletList', 'heading', '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'];
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
3
  var marks = ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'mentionQuery', 'code', 'textColor', 'confluenceInlineComment', 'annotation', 'unsupportedMark', 'unsupportedNodeAttribute'];
4
4
  export var confluenceSchema = createSchema({
5
5
  nodes: nodes,
@@ -37,7 +37,7 @@ export default function makeSchema(config) {
37
37
  }
38
38
 
39
39
  if (config.allowMedia) {
40
- nodes.push('mediaGroup', 'mediaSingle', 'media', 'caption');
40
+ nodes.push('mediaGroup', 'mediaSingle', 'media', 'caption', 'mediaInline');
41
41
  }
42
42
 
43
43
  if (config.allowTextColor) {
@@ -78,7 +78,7 @@ export function isSchemaWithBlockQuotes(schema) {
78
78
  return !!schema.nodes.blockquote;
79
79
  }
80
80
  export function isSchemaWithMedia(schema) {
81
- return !!schema.nodes.mediaGroup && !!schema.nodes.media;
81
+ return !!schema.nodes.mediaGroup && !!schema.nodes.media && !!schema.nodes.mediaInline;
82
82
  }
83
83
  export function isSchemaWithTextColor(schema) {
84
84
  return !!schema.marks.textColor;
@@ -159,7 +159,8 @@ var optionalAttributes = ['occurrenceKey', 'width', 'height', 'url', 'alt'];
159
159
  var externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt'];
160
160
  export var toJSON = function toJSON(node) {
161
161
  return {
162
- attrs: Object.keys(node.attrs).filter(function (key) {
162
+ attrs: Object.keys(node.attrs) // Strip private attributes e.g. __fileName, __fileSize, __fileMimeType, etc.
163
+ .filter(function (key) {
163
164
  return !(key[0] === '_' && key[1] === '_');
164
165
  }).reduce(function (obj, key) {
165
166
  if (node.attrs.type === 'external' && externalOnlyAttributes.indexOf(key) === -1) {
@@ -107,7 +107,7 @@ var createTableSpec = function createTableSpec() {
107
107
  var tableNodeSpec = {
108
108
  content: 'tableRow+',
109
109
  attrs: attrs,
110
- marks: 'fragment unsupportedMark unsupportedNodeAttribute',
110
+ marks: 'unsupportedMark unsupportedNodeAttribute',
111
111
  tableRole: 'table',
112
112
  isolating: true,
113
113
  selectable: false,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "23.3.1",
3
+ "version": "24.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/json-schema/index.js",
5
5
  "module:es2019": "../dist/es2019/json-schema/index.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/json-schema/index.d.ts"
7
+ "types": "../dist/types/json-schema/index.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/json-schema/index.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -0,0 +1,4 @@
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';
2
+ export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, 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, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, } from './schema';
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, } from './utils';
4
+ export type { Match, NameToEmoji } from './utils';
@@ -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';
@@ -0,0 +1,2 @@
1
+ import { Schema } from 'prosemirror-model';
2
+ export declare const bitbucketSchema: Schema;
@@ -0,0 +1,3 @@
1
+ import { Schema } from 'prosemirror-model';
2
+ export declare const confluenceSchema: Schema;
3
+ export declare const confluenceSchemaWithMediaSingle: Schema;
@@ -0,0 +1,32 @@
1
+ import { NodeSpec, MarkSpec, Schema } from 'prosemirror-model';
2
+ /**
3
+ * Creates a schema preserving order of marks and nodes.
4
+ */
5
+ export declare function createSchema<N extends string = string, M extends string = string>(config: SchemaConfig<N, M>): Schema<N, M>;
6
+ export declare function sanitizeNodes(nodes: {
7
+ [key: string]: NodeSpec;
8
+ }, supportedMarks: {
9
+ [key: string]: MarkSpec;
10
+ }): {
11
+ [key: string]: NodeSpec;
12
+ };
13
+ export declare function sanitizeNodeSpecContent(nodes: {
14
+ [key: string]: NodeSpec;
15
+ }, rawContent: string): string;
16
+ export interface SchemaConfig<N = string, M = string> {
17
+ nodes: N[];
18
+ customNodeSpecs?: SchemaCustomNodeSpecs;
19
+ marks?: M[];
20
+ customMarkSpecs?: SchemaCustomMarkSpecs;
21
+ }
22
+ export interface SchemaBuiltInItem {
23
+ name: string;
24
+ spec: NodeSpec | MarkSpec;
25
+ }
26
+ export interface SchemaCustomNodeSpecs {
27
+ [name: string]: NodeSpec;
28
+ }
29
+ export interface SchemaCustomMarkSpecs {
30
+ [name: string]: MarkSpec;
31
+ }
32
+ export declare const allowCustomPanel: boolean;
@@ -0,0 +1,7 @@
1
+ import { SchemaConfig } from './create-schema';
2
+ declare 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
+ declare type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer';
4
+ export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
5
+ export declare const getSchemaBasedOnStage: (stage?: string) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
6
+ export declare const defaultSchema: import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare const FONT_STYLE = "fontStyle";
2
+ export declare const SEARCH_QUERY = "searchQuery";
3
+ export declare const LINK = "link";
4
+ export declare const COLOR = "color";
5
+ export declare const ALIGNMENT = "alignment";
6
+ export declare const INDENTATION = "indentation";
@@ -0,0 +1,7 @@
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';
2
+ export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, 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, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
3
+ 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';
4
+ export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, CodeDefinition, EmDefinition, FragmentAttributes, FragmentDefinition, IndentationMarkAttributes, IndentationMarkDefinition, LinkAttributes, LinkDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TextColorAttributes, TextColorDefinition, UnderlineDefinition, AnnotationId, AnnotationDataAttributes, DataConsumerAttributes, DataConsumerDefinition, } from './marks';
5
+ export { unsupportedNodeTypesForMediaCards } from './unsupported';
6
+ export { inlineNodes } from './inline-nodes';
7
+ export { sanitizeNodes, createSchema } from './create-schema';
@@ -0,0 +1 @@
1
+ export declare const inlineNodes: Set<string>;
@@ -0,0 +1,26 @@
1
+ import { Schema } from 'prosemirror-model';
2
+ export interface JIRASchemaConfig {
3
+ allowLists?: boolean;
4
+ allowMentions?: boolean;
5
+ allowEmojis?: boolean;
6
+ allowLinks?: boolean;
7
+ allowAdvancedTextFormatting?: boolean;
8
+ allowCodeBlock?: boolean;
9
+ allowBlockQuote?: boolean;
10
+ allowSubSup?: boolean;
11
+ allowMedia?: boolean;
12
+ allowTextColor?: boolean;
13
+ allowTables?: boolean;
14
+ }
15
+ export default function makeSchema(config: JIRASchemaConfig): Schema<string, string>;
16
+ export declare function isSchemaWithLists(schema: Schema): boolean;
17
+ export declare function isSchemaWithMentions(schema: Schema): boolean;
18
+ export declare function isSchemaWithEmojis(schema: Schema): boolean;
19
+ export declare function isSchemaWithLinks(schema: Schema): boolean;
20
+ export declare function isSchemaWithAdvancedTextFormattingMarks(schema: Schema): boolean;
21
+ export declare function isSchemaWithSubSupMark(schema: Schema): boolean;
22
+ export declare function isSchemaWithCodeBlock(schema: Schema): boolean;
23
+ export declare function isSchemaWithBlockQuotes(schema: Schema): boolean;
24
+ export declare function isSchemaWithMedia(schema: Schema): boolean;
25
+ export declare function isSchemaWithTextColor(schema: Schema): boolean;
26
+ export declare function isSchemaWithTables(schema: Schema): boolean;
@@ -0,0 +1,16 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ /** TODO: Flip these positions for RTL */
3
+ export declare const alignmentPositionMap: {
4
+ [key: string]: string;
5
+ };
6
+ export interface AlignmentAttributes {
7
+ align: 'center' | 'end';
8
+ }
9
+ /**
10
+ * @name alignment_mark
11
+ */
12
+ export interface AlignmentMarkDefinition {
13
+ type: 'alignment';
14
+ attrs: AlignmentAttributes;
15
+ }
16
+ export declare const alignment: MarkSpec;
@@ -0,0 +1,32 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name annotation_mark
4
+ */
5
+ export interface AnnotationMarkDefinition {
6
+ type: 'annotation';
7
+ attrs: AnnotationMarkAttributes;
8
+ }
9
+ export interface AnnotationMarkAttributes {
10
+ id: AnnotationId;
11
+ annotationType: AnnotationTypes;
12
+ }
13
+ export declare type AnnotationId = string;
14
+ export declare enum AnnotationTypes {
15
+ INLINE_COMMENT = "inlineComment"
16
+ }
17
+ export declare enum AnnotationMarkStates {
18
+ RESOLVED = "resolved",
19
+ ACTIVE = "active"
20
+ }
21
+ export declare type AnnotationDataAttributes = {
22
+ 'data-mark-type': string;
23
+ 'data-mark-annotation-type': AnnotationTypes;
24
+ 'data-id': AnnotationId;
25
+ 'data-mark-annotation-state'?: AnnotationMarkStates;
26
+ };
27
+ declare type BuildDataAttributesProps = AnnotationMarkAttributes & {
28
+ state?: AnnotationMarkStates | undefined | null;
29
+ };
30
+ export declare function buildDataAttributes({ id, annotationType, state, }: BuildDataAttributesProps): AnnotationDataAttributes;
31
+ export declare const annotation: MarkSpec;
32
+ export {};
@@ -0,0 +1,12 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export declare type BreakoutMarkAttrs = {
3
+ mode: 'wide' | 'full-width';
4
+ };
5
+ /**
6
+ * @name breakout_mark
7
+ */
8
+ export interface BreakoutMarkDefinition {
9
+ type: 'breakout';
10
+ attrs: BreakoutMarkAttrs;
11
+ }
12
+ export declare const breakout: MarkSpec;
@@ -0,0 +1,8 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name code_mark
4
+ */
5
+ export interface CodeDefinition {
6
+ type: 'code';
7
+ }
8
+ export declare const code: MarkSpec;
@@ -0,0 +1,12 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name inline_comment_marker
4
+ * @description This temporary mark represents a Confluence-backed inline comment that wraps a piece of text. It will be replaced with a cross-product inline comment solution at later date.
5
+ */
6
+ export interface ConfluenceInlineCommentDefinition {
7
+ type: 'confluenceInlineComment';
8
+ attrs: {
9
+ reference: string;
10
+ };
11
+ }
12
+ export declare const confluenceInlineComment: MarkSpec;
@@ -0,0 +1,48 @@
1
+ import { Mark, MarkSpec } from 'prosemirror-model';
2
+ /**
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
11
+ */
12
+ declare type DataConsumerSource = string;
13
+ export interface DataConsumerAttributes {
14
+ /**
15
+ * @minItems 1
16
+ */
17
+ sources: Array<DataConsumerSource>;
18
+ }
19
+ /**
20
+ * @name dataConsumer_mark
21
+ * @description This mark is used for metadata surrounding a node consuming data
22
+ * from a given source node
23
+ */
24
+ export interface DataConsumerDefinition {
25
+ type: 'dataConsumer';
26
+ attrs: DataConsumerAttributes;
27
+ }
28
+ export interface DataConsumerMark extends Mark {
29
+ attrs: DataConsumerAttributes;
30
+ }
31
+ export declare const dataConsumer: MarkSpec;
32
+ /**
33
+ * We want to ensure any "invalid ADF" doesn't get serialised, but the entire
34
+ * mark itself is not valid without a non-empty `sources`.
35
+ *
36
+ * We _almost could_ simply return `null` if sources length is < 0 & would fit
37
+ * the type signature of prosemirror-model's `fragment` but not `mark`'s toJSON.
38
+ *
39
+ * So we'll leave any extra transformation checks in
40
+ * `editor-json-transformer`(?)
41
+ */
42
+ export declare const toJSON: (mark: Mark) => {
43
+ type: string;
44
+ attrs: {
45
+ [key: string]: any;
46
+ };
47
+ };
48
+ export {};
@@ -0,0 +1,8 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name em_mark
4
+ */
5
+ export interface EmDefinition {
6
+ type: 'em';
7
+ }
8
+ export declare const em: MarkSpec;
@@ -0,0 +1,29 @@
1
+ import { Mark, MarkSpec } from 'prosemirror-model';
2
+ export declare type LocalId = string;
3
+ export interface FragmentAttributes {
4
+ /**
5
+ * @minLength 1
6
+ */
7
+ localId: LocalId;
8
+ name?: string;
9
+ }
10
+ /**
11
+ * @name fragment_mark
12
+ * @description Indicates that the elements decorated with this mark belong to a "fragment" entity, which represents a collection of ADF nodes.
13
+ * This entity can be referred to later by its `localId` attribute.
14
+ */
15
+ export interface FragmentDefinition {
16
+ type: 'fragment';
17
+ attrs: FragmentAttributes;
18
+ }
19
+ export interface FragmentMark extends Mark {
20
+ attrs: FragmentAttributes;
21
+ }
22
+ export declare const fragment: MarkSpec;
23
+ export declare const toJSON: (mark: Mark) => {
24
+ type: string;
25
+ attrs: {
26
+ name?: any;
27
+ localId: any;
28
+ };
29
+ };
@@ -0,0 +1,16 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ export interface IndentationMarkAttributes {
3
+ /**
4
+ * @minimum 1
5
+ * @maximum 6
6
+ */
7
+ level: number;
8
+ }
9
+ /**
10
+ * @name indentation_mark
11
+ */
12
+ export interface IndentationMarkDefinition {
13
+ type: 'indentation';
14
+ attrs: IndentationMarkAttributes;
15
+ }
16
+ export declare const indentation: MarkSpec;
@@ -0,0 +1,32 @@
1
+ export { em } from './em';
2
+ export type { EmDefinition } from './em';
3
+ export { code } from './code';
4
+ export type { CodeDefinition } from './code';
5
+ export { strike } from './strike';
6
+ export type { StrikeDefinition } from './strike';
7
+ export { strong } from './strong';
8
+ export type { StrongDefinition } from './strong';
9
+ export { underline } from './underline';
10
+ export type { UnderlineDefinition } from './underline';
11
+ export { link, toJSON as linkToJSON } from './link';
12
+ export type { LinkAttributes, LinkDefinition } from './link';
13
+ export { typeAheadQuery } from './type-ahead-query';
14
+ export { subsup } from './subsup';
15
+ export type { SubSupDefinition, SubSupAttributes } from './subsup';
16
+ export { textColor, colorPalette, colorPaletteExtended } from './text-color';
17
+ export type { TextColorDefinition, TextColorAttributes } from './text-color';
18
+ export { confluenceInlineComment } from './confluence-inline-comment';
19
+ export { breakout } from './breakout';
20
+ export type { BreakoutMarkAttrs, BreakoutMarkDefinition } from './breakout';
21
+ export { alignment, alignmentPositionMap } from './alignment';
22
+ export type { AlignmentAttributes, AlignmentMarkDefinition } from './alignment';
23
+ export { indentation } from './indentation';
24
+ export type { IndentationMarkAttributes, IndentationMarkDefinition, } from './indentation';
25
+ export { annotation, AnnotationMarkStates, buildDataAttributes as buildAnnotationMarkDataAttributes, AnnotationTypes, } from './annotation';
26
+ export type { AnnotationMarkDefinition, AnnotationMarkAttributes, AnnotationId, AnnotationDataAttributes, } from './annotation';
27
+ export { unsupportedMark } from './unsupported-mark';
28
+ export { unsupportedNodeAttribute } from './unsupported-node-attributes';
29
+ export type { DataConsumerAttributes, DataConsumerDefinition, } from './data-consumer';
30
+ export { dataConsumer, toJSON as dataConsumerToJSON } from './data-consumer';
31
+ export type { FragmentAttributes, FragmentDefinition, LocalId, } from './fragment';
32
+ export { fragment, toJSON as fragmentToJSON } from './fragment';
@@ -0,0 +1,35 @@
1
+ import { MarkSpec, Mark } from 'prosemirror-model';
2
+ export interface ConfluenceLinkMetadata {
3
+ linkType: string;
4
+ versionAtSave?: string | null;
5
+ fileName?: string | null;
6
+ spaceKey?: string | null;
7
+ contentTitle?: string | null;
8
+ isRenamedTitle?: boolean;
9
+ anchorName?: string | null;
10
+ contentId?: string | null;
11
+ container?: ConfluenceLinkMetadata;
12
+ }
13
+ export interface LinkAttributes {
14
+ /**
15
+ * @validatorFn safeUrl
16
+ */
17
+ href: string;
18
+ title?: string;
19
+ id?: string;
20
+ collection?: string;
21
+ occurrenceKey?: string;
22
+ __confluenceMetadata?: ConfluenceLinkMetadata;
23
+ }
24
+ /**
25
+ * @name link_mark
26
+ */
27
+ export interface LinkDefinition {
28
+ type: 'link';
29
+ attrs: LinkAttributes;
30
+ }
31
+ export declare const link: MarkSpec;
32
+ export declare const toJSON: (mark: Mark) => {
33
+ type: string;
34
+ attrs: Record<string, string>;
35
+ };
@@ -0,0 +1,8 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name strike_mark
4
+ */
5
+ export interface StrikeDefinition {
6
+ type: 'strike';
7
+ }
8
+ export declare const strike: MarkSpec;
@@ -0,0 +1,8 @@
1
+ import { MarkSpec } from 'prosemirror-model';
2
+ /**
3
+ * @name strong_mark
4
+ */
5
+ export interface StrongDefinition {
6
+ type: 'strong';
7
+ }
8
+ export declare const strong: MarkSpec;