@atlaskit/adf-schema 25.4.0 → 25.5.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 (96) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/schema/jira-schema.js +4 -0
  3. package/dist/cjs/schema/marks/alignment.js +4 -0
  4. package/dist/cjs/schema/marks/border.js +6 -0
  5. package/dist/cjs/schema/marks/breakout.js +5 -0
  6. package/dist/cjs/schema/marks/code.js +4 -0
  7. package/dist/cjs/schema/marks/data-consumer.js +17 -0
  8. package/dist/cjs/schema/marks/em.js +4 -0
  9. package/dist/cjs/schema/marks/fragment.js +6 -0
  10. package/dist/cjs/schema/marks/indentation.js +4 -0
  11. package/dist/cjs/schema/marks/link.js +4 -0
  12. package/dist/cjs/schema/marks/strike.js +4 -0
  13. package/dist/cjs/schema/marks/strong.js +4 -0
  14. package/dist/cjs/schema/marks/subsup.js +4 -0
  15. package/dist/cjs/schema/marks/text-color.js +4 -0
  16. package/dist/cjs/schema/marks/underline.js +4 -0
  17. package/dist/cjs/schema/nodes/bodied-extension.js +8 -0
  18. package/dist/cjs/schema/nodes/code-block.js +12 -0
  19. package/dist/cjs/schema/nodes/decision-item.js +4 -0
  20. package/dist/cjs/schema/nodes/decision-list.js +4 -0
  21. package/dist/cjs/schema/nodes/emoji.js +4 -0
  22. package/dist/cjs/schema/nodes/extension.js +8 -0
  23. package/dist/cjs/schema/nodes/inline-extension.js +8 -0
  24. package/dist/cjs/schema/nodes/media-inline.js +4 -0
  25. package/dist/cjs/schema/nodes/media.js +4 -0
  26. package/dist/cjs/schema/nodes/mention.js +3 -0
  27. package/dist/cjs/schema/nodes/panel.js +3 -0
  28. package/dist/cjs/schema/nodes/paragraph.js +0 -3
  29. package/dist/cjs/schema/nodes/status.js +4 -0
  30. package/dist/cjs/schema/nodes/tableNodes.js +23 -0
  31. package/dist/cjs/schema/nodes/task-item.js +4 -0
  32. package/dist/cjs/schema/nodes/task-list.js +4 -0
  33. package/dist/cjs/steps/link-meta-step.js +112 -0
  34. package/dist/cjs/steps/table/utils/cells-at-column.js +4 -4
  35. package/dist/cjs/steps.js +8 -1
  36. package/dist/cjs/version.json +1 -1
  37. package/dist/es2019/schema/jira-schema.js +5 -0
  38. package/dist/es2019/schema/marks/alignment.js +5 -0
  39. package/dist/es2019/schema/marks/border.js +7 -0
  40. package/dist/es2019/schema/marks/breakout.js +5 -0
  41. package/dist/es2019/schema/marks/data-consumer.js +6 -0
  42. package/dist/es2019/schema/marks/fragment.js +7 -0
  43. package/dist/es2019/schema/marks/indentation.js +5 -0
  44. package/dist/es2019/schema/marks/link.js +5 -0
  45. package/dist/es2019/schema/marks/subsup.js +5 -0
  46. package/dist/es2019/schema/marks/text-color.js +5 -0
  47. package/dist/es2019/schema/nodes/bodied-extension.js +9 -0
  48. package/dist/es2019/schema/nodes/code-block.js +13 -0
  49. package/dist/es2019/schema/nodes/decision-item.js +5 -0
  50. package/dist/es2019/schema/nodes/extension.js +9 -0
  51. package/dist/es2019/schema/nodes/heading.js +0 -2
  52. package/dist/es2019/schema/nodes/inline-extension.js +9 -0
  53. package/dist/es2019/schema/nodes/layout-section.js +0 -3
  54. package/dist/es2019/schema/nodes/media-inline.js +5 -0
  55. package/dist/es2019/schema/nodes/media.js +5 -0
  56. package/dist/es2019/schema/nodes/mention.js +3 -0
  57. package/dist/es2019/schema/nodes/panel.js +3 -0
  58. package/dist/es2019/schema/nodes/paragraph.js +0 -3
  59. package/dist/es2019/schema/nodes/tableNodes.js +23 -0
  60. package/dist/es2019/schema/nodes/task-item.js +5 -0
  61. package/dist/es2019/schema/nodes/task-list.js +5 -0
  62. package/dist/es2019/steps/link-meta-step.js +71 -0
  63. package/dist/es2019/steps.js +2 -1
  64. package/dist/es2019/version.json +1 -1
  65. package/dist/esm/schema/jira-schema.js +5 -0
  66. package/dist/esm/schema/marks/alignment.js +5 -0
  67. package/dist/esm/schema/marks/border.js +7 -0
  68. package/dist/esm/schema/marks/breakout.js +5 -0
  69. package/dist/esm/schema/marks/data-consumer.js +6 -0
  70. package/dist/esm/schema/marks/fragment.js +7 -0
  71. package/dist/esm/schema/marks/indentation.js +5 -0
  72. package/dist/esm/schema/marks/link.js +5 -0
  73. package/dist/esm/schema/marks/subsup.js +5 -0
  74. package/dist/esm/schema/marks/text-color.js +5 -0
  75. package/dist/esm/schema/nodes/bodied-extension.js +9 -0
  76. package/dist/esm/schema/nodes/code-block.js +13 -0
  77. package/dist/esm/schema/nodes/decision-item.js +5 -0
  78. package/dist/esm/schema/nodes/extension.js +9 -0
  79. package/dist/esm/schema/nodes/heading.js +0 -2
  80. package/dist/esm/schema/nodes/inline-extension.js +9 -0
  81. package/dist/esm/schema/nodes/layout-section.js +0 -3
  82. package/dist/esm/schema/nodes/media-inline.js +5 -0
  83. package/dist/esm/schema/nodes/media.js +5 -0
  84. package/dist/esm/schema/nodes/mention.js +3 -0
  85. package/dist/esm/schema/nodes/panel.js +3 -0
  86. package/dist/esm/schema/nodes/paragraph.js +0 -3
  87. package/dist/esm/schema/nodes/tableNodes.js +23 -0
  88. package/dist/esm/schema/nodes/task-item.js +5 -0
  89. package/dist/esm/schema/nodes/task-list.js +5 -0
  90. package/dist/esm/steps/link-meta-step.js +103 -0
  91. package/dist/esm/steps/table/utils/cells-at-column.js +4 -3
  92. package/dist/esm/steps.js +2 -1
  93. package/dist/esm/version.json +1 -1
  94. package/dist/types/steps/link-meta-step.d.ts +51 -0
  95. package/dist/types/steps.d.ts +2 -0
  96. package/package.json +2 -2
@@ -6,6 +6,11 @@ export const alignmentPositionMap = {
6
6
  right: 'end',
7
7
  center: 'center'
8
8
  };
9
+
10
+ /**
11
+ * @name alignment_mark
12
+ */
13
+
9
14
  export const alignment = {
10
15
  excludes: `alignment ${INDENTATION}`,
11
16
  group: ALIGNMENT,
@@ -1,5 +1,12 @@
1
1
  import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
2
2
  import { N300A, N600, N1000 } from '../../utils/colors';
3
+
4
+ /**
5
+ * @name border_mark
6
+ * @stage 0
7
+ * @description This mark adds decoration to an element, and any element decorated with it will also have a border style.
8
+ */
9
+
3
10
  const borderColorArrayPalette = [[N300A, 'Subtle gray'], [N600, 'Gray'], [N1000, 'Bold gray']];
4
11
  export const borderColorPalette = new Map();
5
12
  borderColorArrayPalette.forEach(([color, label]) => borderColorPalette.set(color.toLowerCase(), label));
@@ -1,4 +1,9 @@
1
1
  const allowedTypes = ['wide', 'full-width'];
2
+
3
+ /**
4
+ * @name breakout_mark
5
+ */
6
+
2
7
  export const breakout = {
3
8
  spanning: false,
4
9
  inclusive: false,
@@ -11,6 +11,12 @@ import { isDOMElement } from '../../utils/parseDOM';
11
11
  * // @minLength 1
12
12
  */
13
13
 
14
+ /**
15
+ * @name dataConsumer_mark
16
+ * @description This mark is used for metadata surrounding a node consuming data
17
+ * from a given source node
18
+ */
19
+
14
20
  const parseDataConsumer = maybeValue => {
15
21
  const sources = isDOMElement(maybeValue) && maybeValue.getAttribute('data-sources');
16
22
  try {
@@ -1,4 +1,11 @@
1
1
  import { isDOMElement } from '../../utils/parseDOM';
2
+
3
+ /**
4
+ * @name fragment_mark
5
+ * @description Indicates that the elements decorated with this mark belong to a "fragment" entity, which represents a collection of ADF nodes.
6
+ * This entity can be referred to later by its `localId` attribute.
7
+ */
8
+
2
9
  const parseFragment = maybeValue => {
3
10
  var _maybeValue$getAttrib;
4
11
  if (!isDOMElement(maybeValue)) {
@@ -1,4 +1,9 @@
1
1
  import { ALIGNMENT, INDENTATION } from '../groups';
2
+
3
+ /**
4
+ * @name indentation_mark
5
+ */
6
+
2
7
  export const indentation = {
3
8
  excludes: `indentation ${ALIGNMENT}`,
4
9
  group: INDENTATION,
@@ -1,5 +1,10 @@
1
1
  import { LINK } from '../groups';
2
2
  import { isRootRelative, isSafeUrl, normalizeUrl } from '../../utils/url';
3
+
4
+ /**
5
+ * @name link_mark
6
+ */
7
+
3
8
  const getLinkAttrs = attribute => domNode => {
4
9
  const dom = domNode;
5
10
  const href = dom.getAttribute(attribute) || '';
@@ -1,4 +1,9 @@
1
1
  import { FONT_STYLE } from '../groups';
2
+
3
+ /**
4
+ * @name subsup_mark
5
+ */
6
+
2
7
  function getAttrFromVerticalAlign(node) {
3
8
  if (node.style.verticalAlign) {
4
9
  const type = node.style.verticalAlign.slice(0, 3);
@@ -1,6 +1,11 @@
1
1
  import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
2
2
  import { COLOR } from '../groups';
3
3
  import { rgbToHex, N0, N80, P50, P300, P500, T75, T300, T500, G75, G300, G500, R75, R300, R500, Y75, Y200, Y400, B75, B100, B500 } from '../../utils/colors';
4
+
5
+ /**
6
+ * @name textColor_mark
7
+ */
8
+
4
9
  // used for extended palette in text color picker
5
10
  const colorArrayPalette = [
6
11
  // default row - first color is added programatically
@@ -1,4 +1,13 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+
3
+ /**
4
+ * @name bodiedExtension_node
5
+ */
6
+
7
+ /**
8
+ * @name bodiedExtension_with_marks_node
9
+ */
10
+
2
11
  const createBodiedExtensionNodeSpec = () => {
3
12
  const nodeSpec = {
4
13
  inline: false,
@@ -1,4 +1,17 @@
1
1
  import { Fragment } from 'prosemirror-model';
2
+
3
+ /**
4
+ * @name codeBlock_node
5
+ */
6
+
7
+ /**
8
+ * @name codeBlock_with_no_marks_node
9
+ */
10
+
11
+ /**
12
+ * @name codeBlock_with_marks_node
13
+ */
14
+
2
15
  const getLanguageFromEditorStyle = dom => {
3
16
  return dom.getAttribute('data-language') || undefined;
4
17
  };
@@ -1,4 +1,9 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+
3
+ /**
4
+ * @name decisionItem_node
5
+ */
6
+
2
7
  export const decisionItem = {
3
8
  content: 'inline*',
4
9
  defining: true,
@@ -1,4 +1,13 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+
3
+ /**
4
+ * @name extension_node
5
+ */
6
+
7
+ /**
8
+ * @name extension_with_marks_node
9
+ */
10
+
2
11
  const createExtensionNodeSpec = () => {
3
12
  const nodeSpec = {
4
13
  inline: false,
@@ -10,11 +10,9 @@
10
10
  /**
11
11
  * @name heading_with_alignment_node
12
12
  */
13
-
14
13
  /**
15
14
  * @name heading_with_indentation_node
16
15
  */
17
-
18
16
  export const heading = {
19
17
  attrs: {
20
18
  level: {
@@ -1,4 +1,13 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+
3
+ /**
4
+ * @name inlineExtension_node
5
+ */
6
+
7
+ /**
8
+ * @name inlineExtension_with_marks_node
9
+ */
10
+
2
11
  const createInlineExtensionNodeSpec = () => {
3
12
  const nodeSpec = {
4
13
  inline: true,
@@ -5,16 +5,13 @@
5
5
  /**
6
6
  * Need duplicate `type` and `marks` to make both validator and json-schema satisfied
7
7
  */
8
-
9
8
  /**
10
9
  * @name layoutSection_full_node
11
10
  */
12
-
13
11
  /**
14
12
  * @stage 0
15
13
  * @name layoutSection_with_single_column_node
16
14
  */
17
-
18
15
  export const layoutSection = {
19
16
  content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
20
17
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -1,2 +1,7 @@
1
1
  import { createMediaSpec, defaultAttrs } from './media';
2
+
3
+ /**
4
+ * @name mediaInline_node
5
+ */
6
+
2
7
  export const mediaInline = createMediaSpec(defaultAttrs, true);
@@ -1,4 +1,9 @@
1
1
  import { N30 } from '../../utils/colors';
2
+
3
+ /**
4
+ * @name media_node
5
+ */
6
+
2
7
  export const defaultAttrs = {
3
8
  id: {
4
9
  default: ''
@@ -4,6 +4,9 @@ export let USER_TYPES;
4
4
  USER_TYPES["SPECIAL"] = "SPECIAL";
5
5
  USER_TYPES["APP"] = "APP";
6
6
  })(USER_TYPES || (USER_TYPES = {}));
7
+ /**
8
+ * @name mention_node
9
+ */
7
10
  export const mention = {
8
11
  inline: true,
9
12
  group: 'inline',
@@ -8,6 +8,9 @@ export let PanelType;
8
8
  PanelType["SUCCESS"] = "success";
9
9
  PanelType["CUSTOM"] = "custom";
10
10
  })(PanelType || (PanelType = {}));
11
+ /**
12
+ * @name panel_node
13
+ */
11
14
  const getDefaultAttrs = () => {
12
15
  let attrs = {
13
16
  panelType: {
@@ -14,15 +14,12 @@
14
14
  * type T1 = X | Y
15
15
  * type T2 = A | T1 | B // T2 = A | X | Y | B
16
16
  */
17
-
18
17
  /**
19
18
  * @name paragraph_with_alignment_node
20
19
  */
21
-
22
20
  /**
23
21
  * @name paragraph_with_indentation_node
24
22
  */
25
-
26
23
  const isImageNode = node => {
27
24
  return Boolean(node && node.nodeName.toLowerCase() === 'img');
28
25
  };
@@ -114,6 +114,29 @@ export const tableBackgroundColorNames = new Map();
114
114
  tableBackgroundColorPalette.set(colorValue.toLowerCase(), colorName);
115
115
  tableBackgroundColorNames.set(colorName.toLowerCase(), colorValue.toLowerCase());
116
116
  });
117
+
118
+ /**
119
+ * @name table_node
120
+ */
121
+
122
+ /**
123
+ * @name table_row_node
124
+ */
125
+
126
+ /**
127
+ * @name table_cell_content
128
+ * @minItems 1
129
+ * @allowUnsupportedBlock true
130
+ */
131
+
132
+ /**
133
+ * @name table_cell_node
134
+ */
135
+
136
+ /**
137
+ * @name table_header_node
138
+ */
139
+
117
140
  // TODO: Fix any, potential issue. ED-5048
118
141
  const createTableSpec = () => {
119
142
  const attrs = {
@@ -1,4 +1,9 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+
3
+ /**
4
+ * @name taskItem_node
5
+ */
6
+
2
7
  export const taskItem = {
3
8
  content: 'inline*',
4
9
  defining: true,
@@ -1,4 +1,9 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+
3
+ /**
4
+ * @name taskList_node
5
+ */
6
+
2
7
  const name = 'actionList';
3
8
  export const taskListSelector = `[data-node-type="${name}"]`;
4
9
  export const taskList = {
@@ -0,0 +1,71 @@
1
+ import { Slice } from 'prosemirror-model';
2
+ import { ReplaceStep, Step, StepMap, StepResult } from 'prosemirror-transform';
3
+ export const stepType = 'editor-linking-meta';
4
+ export const invertStepType = 'editor-linking-meta-invert';
5
+ /**
6
+ * Custom Prosemirror Step to attach metadata about user interactions with links
7
+ * Using a Step means that it will work with prosemirror-history and we get utilise when
8
+ * firing events on history change
9
+ */
10
+ export class LinkMetaStep extends Step {
11
+ constructor(pos, metadata, isInverted = false) {
12
+ super();
13
+ this.pos = pos;
14
+ this.metadata = metadata;
15
+ this.isInverted = isInverted;
16
+ }
17
+ getMetadata() {
18
+ return this.metadata;
19
+ }
20
+
21
+ /**
22
+ * Generate new undo/redo analytics event when step is inverted
23
+ */
24
+ invert() {
25
+ /**
26
+ * Omit sourceEvent in history
27
+ */
28
+ const {
29
+ sourceEvent,
30
+ ...metadata
31
+ } = this.metadata;
32
+ return new LinkMetaStep(this.pos, metadata, true);
33
+ }
34
+
35
+ // Should make no modifications to the doc
36
+ apply(doc) {
37
+ return StepResult.ok(doc);
38
+ }
39
+ map(mapping) {
40
+ let newPos = this.pos;
41
+ if (typeof newPos === 'number') {
42
+ newPos = mapping.map(newPos);
43
+ }
44
+ // Return the same events, this step will never be removed
45
+ return new LinkMetaStep(newPos, this.metadata, this.isInverted);
46
+ }
47
+ getMap() {
48
+ return new StepMap([this.pos || 0, 0, 0]);
49
+ }
50
+
51
+ // Return null to avoid merging events
52
+ merge() {
53
+ return null;
54
+ }
55
+ toJSON() {
56
+ // When serialized we should create a noop Replace step
57
+ return {
58
+ stepType: 'replace',
59
+ from: 0,
60
+ to: 0
61
+ };
62
+ }
63
+ static fromJSON(_, __) {
64
+ // This is a "local custom step" once serialized
65
+ // we need to transform it in a no-operation action
66
+ return new ReplaceStep(0, 0, Slice.empty);
67
+ }
68
+ }
69
+
70
+ /** Register this step with Prosemirror */
71
+ Step.jsonID(stepType, LinkMetaStep);
@@ -3,4 +3,5 @@ export { TableSortStep } from './steps/table/sort-column';
3
3
  export { InsertTypeAheadStages, InsertTypeAheadStep } from './steps/type-ahead';
4
4
  export { AddColumnStep } from './steps/table/add-column';
5
5
  export { SetAttrsStep } from './steps/set-attrs';
6
- export { AnalyticsStep } from './steps/analytics';
6
+ export { AnalyticsStep } from './steps/analytics';
7
+ export { LinkMetaStep } from './steps/link-meta-step';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "25.4.0",
3
+ "version": "25.5.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,9 @@
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
+ **/
6
+
2
7
  /**
3
8
  * @deprecated [ED-15676] We have stopped supporting product specific schemas. Use `@atlaskit/adf-schema/schema-default` instead.
4
9
  **/
@@ -6,6 +6,11 @@ export var alignmentPositionMap = {
6
6
  right: 'end',
7
7
  center: 'center'
8
8
  };
9
+
10
+ /**
11
+ * @name alignment_mark
12
+ */
13
+
9
14
  export var alignment = {
10
15
  excludes: "alignment ".concat(INDENTATION),
11
16
  group: ALIGNMENT,
@@ -1,6 +1,13 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
3
3
  import { N300A, N600, N1000 } from '../../utils/colors';
4
+
5
+ /**
6
+ * @name border_mark
7
+ * @stage 0
8
+ * @description This mark adds decoration to an element, and any element decorated with it will also have a border style.
9
+ */
10
+
4
11
  var borderColorArrayPalette = [[N300A, 'Subtle gray'], [N600, 'Gray'], [N1000, 'Bold gray']];
5
12
  export var borderColorPalette = new Map();
6
13
  borderColorArrayPalette.forEach(function (_ref) {
@@ -1,4 +1,9 @@
1
1
  var allowedTypes = ['wide', 'full-width'];
2
+
3
+ /**
4
+ * @name breakout_mark
5
+ */
6
+
2
7
  export var breakout = {
3
8
  spanning: false,
4
9
  inclusive: false,
@@ -11,6 +11,12 @@ import { isDOMElement } from '../../utils/parseDOM';
11
11
  * // @minLength 1
12
12
  */
13
13
 
14
+ /**
15
+ * @name dataConsumer_mark
16
+ * @description This mark is used for metadata surrounding a node consuming data
17
+ * from a given source node
18
+ */
19
+
14
20
  var parseDataConsumer = function parseDataConsumer(maybeValue) {
15
21
  var sources = isDOMElement(maybeValue) && maybeValue.getAttribute('data-sources');
16
22
  try {
@@ -2,6 +2,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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) { _defineProperty(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; }
4
4
  import { isDOMElement } from '../../utils/parseDOM';
5
+
6
+ /**
7
+ * @name fragment_mark
8
+ * @description Indicates that the elements decorated with this mark belong to a "fragment" entity, which represents a collection of ADF nodes.
9
+ * This entity can be referred to later by its `localId` attribute.
10
+ */
11
+
5
12
  var parseFragment = function parseFragment(maybeValue) {
6
13
  var _maybeValue$getAttrib;
7
14
  if (!isDOMElement(maybeValue)) {
@@ -1,4 +1,9 @@
1
1
  import { ALIGNMENT, INDENTATION } from '../groups';
2
+
3
+ /**
4
+ * @name indentation_mark
5
+ */
6
+
2
7
  export var indentation = {
3
8
  excludes: "indentation ".concat(ALIGNMENT),
4
9
  group: INDENTATION,
@@ -3,6 +3,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
3
3
  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) { _defineProperty(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; }
4
4
  import { LINK } from '../groups';
5
5
  import { isRootRelative, isSafeUrl, normalizeUrl } from '../../utils/url';
6
+
7
+ /**
8
+ * @name link_mark
9
+ */
10
+
6
11
  var getLinkAttrs = function getLinkAttrs(attribute) {
7
12
  return function (domNode) {
8
13
  var dom = domNode;
@@ -1,4 +1,9 @@
1
1
  import { FONT_STYLE } from '../groups';
2
+
3
+ /**
4
+ * @name subsup_mark
5
+ */
6
+
2
7
  function getAttrFromVerticalAlign(node) {
3
8
  if (node.style.verticalAlign) {
4
9
  var type = node.style.verticalAlign.slice(0, 3);
@@ -3,6 +3,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
4
4
  import { COLOR } from '../groups';
5
5
  import { rgbToHex, N0, N80, P50, P300, P500, T75, T300, T500, G75, G300, G500, R75, R300, R500, Y75, Y200, Y400, B75, B100, B500 } from '../../utils/colors';
6
+
7
+ /**
8
+ * @name textColor_mark
9
+ */
10
+
6
11
  // used for extended palette in text color picker
7
12
  var colorArrayPalette = [
8
13
  // default row - first color is added programatically
@@ -1,4 +1,13 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+
3
+ /**
4
+ * @name bodiedExtension_node
5
+ */
6
+
7
+ /**
8
+ * @name bodiedExtension_with_marks_node
9
+ */
10
+
2
11
  var createBodiedExtensionNodeSpec = function createBodiedExtensionNodeSpec() {
3
12
  var nodeSpec = {
4
13
  inline: false,
@@ -1,4 +1,17 @@
1
1
  import { Fragment } from 'prosemirror-model';
2
+
3
+ /**
4
+ * @name codeBlock_node
5
+ */
6
+
7
+ /**
8
+ * @name codeBlock_with_no_marks_node
9
+ */
10
+
11
+ /**
12
+ * @name codeBlock_with_marks_node
13
+ */
14
+
2
15
  var getLanguageFromEditorStyle = function getLanguageFromEditorStyle(dom) {
3
16
  return dom.getAttribute('data-language') || undefined;
4
17
  };
@@ -1,4 +1,9 @@
1
1
  import { uuid } from '../../utils/uuid';
2
+
3
+ /**
4
+ * @name decisionItem_node
5
+ */
6
+
2
7
  export var decisionItem = {
3
8
  content: 'inline*',
4
9
  defining: true,
@@ -1,4 +1,13 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+
3
+ /**
4
+ * @name extension_node
5
+ */
6
+
7
+ /**
8
+ * @name extension_with_marks_node
9
+ */
10
+
2
11
  var createExtensionNodeSpec = function createExtensionNodeSpec() {
3
12
  var nodeSpec = {
4
13
  inline: false,
@@ -10,11 +10,9 @@
10
10
  /**
11
11
  * @name heading_with_alignment_node
12
12
  */
13
-
14
13
  /**
15
14
  * @name heading_with_indentation_node
16
15
  */
17
-
18
16
  export var heading = {
19
17
  attrs: {
20
18
  level: {
@@ -1,4 +1,13 @@
1
1
  import { getExtensionAttrs } from '../../utils/extensions';
2
+
3
+ /**
4
+ * @name inlineExtension_node
5
+ */
6
+
7
+ /**
8
+ * @name inlineExtension_with_marks_node
9
+ */
10
+
2
11
  var createInlineExtensionNodeSpec = function createInlineExtensionNodeSpec() {
3
12
  var nodeSpec = {
4
13
  inline: true,
@@ -5,16 +5,13 @@
5
5
  /**
6
6
  * Need duplicate `type` and `marks` to make both validator and json-schema satisfied
7
7
  */
8
-
9
8
  /**
10
9
  * @name layoutSection_full_node
11
10
  */
12
-
13
11
  /**
14
12
  * @stage 0
15
13
  * @name layoutSection_with_single_column_node
16
14
  */
17
-
18
15
  export var layoutSection = {
19
16
  content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
20
17
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -1,2 +1,7 @@
1
1
  import { createMediaSpec, defaultAttrs } from './media';
2
+
3
+ /**
4
+ * @name mediaInline_node
5
+ */
6
+
2
7
  export var mediaInline = createMediaSpec(defaultAttrs, true);