@atlaskit/adf-schema 42.2.1 → 42.3.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
+ ## 42.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8aff3bc: [ED-25105] This change aligns the node attributes between schema and next-schema for these nodes: codeblock, expand and nested expand, media and media inline.
8
+
3
9
  ## 42.2.1
4
10
 
5
11
  ### Patch Changes
@@ -56,7 +56,8 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
56
56
  optional: true
57
57
  },
58
58
  __displayType: {
59
- type: 'string',
59
+ type: 'enum',
60
+ values: ['file', 'thumbnail'],
60
61
  default: null,
61
62
  optional: true
62
63
  },
@@ -71,7 +72,7 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
71
72
  optional: true
72
73
  },
73
74
  __fileName: {
74
- type: 'string',
75
+ type: 'number',
75
76
  default: null,
76
77
  optional: true
77
78
  },
@@ -109,6 +110,11 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
109
110
  url: {
110
111
  type: 'string',
111
112
  default: null
113
+ },
114
+ __external: {
115
+ type: 'boolean',
116
+ default: false,
117
+ optional: true
112
118
  }
113
119
  }]
114
120
  }
@@ -50,7 +50,8 @@ export const media = adfNode('media').define({
50
50
  optional: true
51
51
  },
52
52
  __displayType: {
53
- type: 'string',
53
+ type: 'enum',
54
+ values: ['file', 'thumbnail'],
54
55
  default: null,
55
56
  optional: true
56
57
  },
@@ -65,7 +66,7 @@ export const media = adfNode('media').define({
65
66
  optional: true
66
67
  },
67
68
  __fileName: {
68
- type: 'string',
69
+ type: 'number',
69
70
  default: null,
70
71
  optional: true
71
72
  },
@@ -103,6 +104,11 @@ export const media = adfNode('media').define({
103
104
  url: {
104
105
  type: 'string',
105
106
  default: null
107
+ },
108
+ __external: {
109
+ type: 'boolean',
110
+ default: false,
111
+ optional: true
106
112
  }
107
113
  }]
108
114
  }
@@ -50,7 +50,8 @@ export var media = adfNode('media').define({
50
50
  optional: true
51
51
  },
52
52
  __displayType: {
53
- type: 'string',
53
+ type: 'enum',
54
+ values: ['file', 'thumbnail'],
54
55
  default: null,
55
56
  optional: true
56
57
  },
@@ -65,7 +66,7 @@ export var media = adfNode('media').define({
65
66
  optional: true
66
67
  },
67
68
  __fileName: {
68
- type: 'string',
69
+ type: 'number',
69
70
  default: null,
70
71
  optional: true
71
72
  },
@@ -103,6 +104,11 @@ export var media = adfNode('media').define({
103
104
  url: {
104
105
  type: 'string',
105
106
  default: null
107
+ },
108
+ __external: {
109
+ type: 'boolean',
110
+ default: false,
111
+ optional: true
106
112
  }
107
113
  }]
108
114
  }
@@ -457,10 +457,10 @@ export interface MediaNodeAttributes0 {
457
457
  occurrenceKey?: string;
458
458
  width?: number;
459
459
  __contextId?: string;
460
- __displayType?: string;
460
+ __displayType?: 'file' | 'thumbnail';
461
461
  __external?: boolean;
462
462
  __fileMimeType?: string;
463
- __fileName?: string;
463
+ __fileName?: number;
464
464
  __fileSize?: string;
465
465
  __mediaTraceId?: string;
466
466
  }
@@ -470,6 +470,7 @@ export interface MediaNodeAttributes1 {
470
470
  height?: number;
471
471
  width?: number;
472
472
  url: string;
473
+ __external?: boolean;
473
474
  }
474
475
  export interface MediaDefinition {
475
476
  type: 'media';
@@ -16,6 +16,7 @@ export type CodeBlockBaseDefinition = {
16
16
  };
17
17
  export type CodeBlockAttrs = {
18
18
  language?: string;
19
+ uniqueId?: string;
19
20
  };
20
21
  /**
21
22
  * @name codeBlock_with_no_marks_node
@@ -10,6 +10,7 @@ export interface ExpandBaseDefinition {
10
10
  type: 'expand';
11
11
  attrs: {
12
12
  title?: string;
13
+ __expanded?: boolean;
13
14
  };
14
15
  /**
15
16
  * @minItems 1
@@ -6,6 +6,7 @@ import { AnnotationMarkDefinition } from '../marks/annotation';
6
6
  export interface MediaInlineAttributes extends MediaBaseAttributes {
7
7
  data?: object;
8
8
  type?: 'file' | 'link' | 'image';
9
+ url?: string | null;
9
10
  }
10
11
  /**
11
12
  * @name mediaInline_node
@@ -23,6 +23,7 @@ export interface NestedExpandBaseDefinition {
23
23
  type: 'nestedExpand';
24
24
  attrs: {
25
25
  title?: string;
26
+ __expanded?: boolean;
26
27
  };
27
28
  content: NestedExpandContent;
28
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "42.2.1",
3
+ "version": "42.3.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/"
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@atlassian/adf-schema-json": "^1.22.0",
49
- "@atlaskit/adf-schema-generator": "^1.32.1",
49
+ "@atlaskit/adf-schema-generator": "^1.33.0",
50
50
  "@atlaskit/codemod-utils": "^4.2.4",
51
51
  "@babel/cli": "^7.22.9",
52
52
  "@babel/core": "^7.22.9",