@atlaskit/adf-schema 35.6.0 → 35.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 35.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1502335: Added annotation mark to media and mediaInline
8
+
3
9
  ## 35.6.0
4
10
 
5
11
  ### Minor Changes
@@ -16,7 +16,7 @@ var mediaGroup = {
16
16
  group: 'block',
17
17
  content: '(media|unsupportedBlock)+',
18
18
  attrs: {},
19
- marks: 'unsupportedMark unsupportedNodeAttribute border link',
19
+ marks: 'unsupportedMark unsupportedNodeAttribute annotation border link',
20
20
  selectable: false,
21
21
  parseDOM: [{
22
22
  tag: 'div[data-node-type="mediaGroup"]'
@@ -108,7 +108,7 @@ var mediaSingleSpec = function mediaSingleSpec(_ref) {
108
108
  default: null
109
109
  }
110
110
  }) : defaultAttrs,
111
- marks: 'unsupportedMark unsupportedNodeAttribute border link',
111
+ marks: 'unsupportedMark unsupportedNodeAttribute annotation border link',
112
112
  parseDOM: [{
113
113
  tag: 'div[data-node-type="mediaSingle"]',
114
114
  getAttrs: getAttrs
@@ -10,7 +10,7 @@ export const mediaGroup = {
10
10
  group: 'block',
11
11
  content: '(media|unsupportedBlock)+',
12
12
  attrs: {},
13
- marks: 'unsupportedMark unsupportedNodeAttribute border link',
13
+ marks: 'unsupportedMark unsupportedNodeAttribute annotation border link',
14
14
  selectable: false,
15
15
  parseDOM: [{
16
16
  tag: 'div[data-node-type="mediaGroup"]'
@@ -102,7 +102,7 @@ export const mediaSingleSpec = ({
102
102
  default: null
103
103
  }
104
104
  } : defaultAttrs,
105
- marks: 'unsupportedMark unsupportedNodeAttribute border link',
105
+ marks: 'unsupportedMark unsupportedNodeAttribute annotation border link',
106
106
  parseDOM: [{
107
107
  tag: 'div[data-node-type="mediaSingle"]',
108
108
  getAttrs
@@ -10,7 +10,7 @@ export var mediaGroup = {
10
10
  group: 'block',
11
11
  content: '(media|unsupportedBlock)+',
12
12
  attrs: {},
13
- marks: 'unsupportedMark unsupportedNodeAttribute border link',
13
+ marks: 'unsupportedMark unsupportedNodeAttribute annotation border link',
14
14
  selectable: false,
15
15
  parseDOM: [{
16
16
  tag: 'div[data-node-type="mediaGroup"]'
@@ -101,7 +101,7 @@ export var mediaSingleSpec = function mediaSingleSpec(_ref) {
101
101
  default: null
102
102
  }
103
103
  }) : defaultAttrs,
104
- marks: 'unsupportedMark unsupportedNodeAttribute border link',
104
+ marks: 'unsupportedMark unsupportedNodeAttribute annotation border link',
105
105
  parseDOM: [{
106
106
  tag: 'div[data-node-type="mediaSingle"]',
107
107
  getAttrs: getAttrs
@@ -983,6 +983,9 @@
983
983
  {
984
984
  "$ref": "#/definitions/link_mark"
985
985
  },
986
+ {
987
+ "$ref": "#/definitions/annotation_mark"
988
+ },
986
989
  {
987
990
  "$ref": "#/definitions/border_mark"
988
991
  }
@@ -1049,6 +1052,9 @@
1049
1052
  {
1050
1053
  "$ref": "#/definitions/link_mark"
1051
1054
  },
1055
+ {
1056
+ "$ref": "#/definitions/annotation_mark"
1057
+ },
1052
1058
  {
1053
1059
  "$ref": "#/definitions/border_mark"
1054
1060
  }
@@ -989,6 +989,9 @@
989
989
  {
990
990
  "$ref": "#/definitions/link_mark"
991
991
  },
992
+ {
993
+ "$ref": "#/definitions/annotation_mark"
994
+ },
992
995
  {
993
996
  "$ref": "#/definitions/border_mark"
994
997
  }
@@ -1055,6 +1058,9 @@
1055
1058
  {
1056
1059
  "$ref": "#/definitions/link_mark"
1057
1060
  },
1061
+ {
1062
+ "$ref": "#/definitions/annotation_mark"
1063
+ },
1058
1064
  {
1059
1065
  "$ref": "#/definitions/border_mark"
1060
1066
  }
@@ -2,6 +2,7 @@ import { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
2
  import { LinkDefinition } from '../marks/link';
3
3
  import { MediaBaseAttributes } from './media';
4
4
  import { BorderMarkDefinition } from '../marks/border';
5
+ import { AnnotationMarkDefinition } from '../marks/annotation';
5
6
  export interface MediaInlineAttributes extends MediaBaseAttributes {
6
7
  data?: object;
7
8
  type?: 'file' | 'link' | 'image';
@@ -12,6 +13,6 @@ export interface MediaInlineAttributes extends MediaBaseAttributes {
12
13
  export interface MediaInlineDefinition {
13
14
  type: 'mediaInline';
14
15
  attrs: MediaInlineAttributes;
15
- marks?: Array<LinkDefinition | BorderMarkDefinition>;
16
+ marks?: Array<LinkDefinition | BorderMarkDefinition | AnnotationMarkDefinition>;
16
17
  }
17
18
  export declare const mediaInline: NodeSpec;
@@ -1,6 +1,7 @@
1
1
  import { NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import { BorderMarkDefinition } from '../marks/border';
3
3
  import { LinkDefinition } from '../marks/link';
4
+ import { AnnotationMarkDefinition } from '../marks/annotation';
4
5
  export type MediaType = 'file' | 'link' | 'external';
5
6
  export type DisplayType = 'file' | 'thumbnail';
6
7
  export type DefaultAttributes<T> = {
@@ -17,7 +18,7 @@ export interface MediaDefinition {
17
18
  * @minItems 1
18
19
  */
19
20
  attrs: MediaADFAttrs;
20
- marks?: Array<LinkDefinition | BorderMarkDefinition>;
21
+ marks?: Array<LinkDefinition | BorderMarkDefinition | AnnotationMarkDefinition>;
21
22
  }
22
23
  export interface MediaBaseAttributes {
23
24
  /**
@@ -983,6 +983,9 @@
983
983
  {
984
984
  "$ref": "#/definitions/link_mark"
985
985
  },
986
+ {
987
+ "$ref": "#/definitions/annotation_mark"
988
+ },
986
989
  {
987
990
  "$ref": "#/definitions/border_mark"
988
991
  }
@@ -1049,6 +1052,9 @@
1049
1052
  {
1050
1053
  "$ref": "#/definitions/link_mark"
1051
1054
  },
1055
+ {
1056
+ "$ref": "#/definitions/annotation_mark"
1057
+ },
1052
1058
  {
1053
1059
  "$ref": "#/definitions/border_mark"
1054
1060
  }
@@ -989,6 +989,9 @@
989
989
  {
990
990
  "$ref": "#/definitions/link_mark"
991
991
  },
992
+ {
993
+ "$ref": "#/definitions/annotation_mark"
994
+ },
992
995
  {
993
996
  "$ref": "#/definitions/border_mark"
994
997
  }
@@ -1055,6 +1058,9 @@
1055
1058
  {
1056
1059
  "$ref": "#/definitions/link_mark"
1057
1060
  },
1061
+ {
1062
+ "$ref": "#/definitions/annotation_mark"
1063
+ },
1058
1064
  {
1059
1065
  "$ref": "#/definitions/border_mark"
1060
1066
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "35.6.0",
3
+ "version": "35.7.0",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "memoize-one": "^6.0.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@atlassian/adf-schema-json": "^1.6.0",
44
+ "@atlassian/adf-schema-json": "^1.7.0",
45
45
  "@babel/cli": "^7.22.9",
46
46
  "@babel/core": "^7.22.9",
47
47
  "@babel/plugin-proposal-class-properties": "^7.18.6",