@atlaskit/adf-schema 42.2.1 → 42.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 42.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - dfa64c8: Add override for pm.spec to ensure unsupportedBlock is correct for layoutSection_single_column
8
+
9
+ ## 42.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 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.
14
+
3
15
  ## 42.2.1
4
16
 
5
17
  ### Patch Changes
@@ -563,7 +563,7 @@ var layoutSectionFull = exports.layoutSectionFull = (0, _createPMSpecFactory.cre
563
563
  isolating: true
564
564
  });
565
565
  var layoutSectionWithSingleColumnStage0 = exports.layoutSectionWithSingleColumnStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
566
- content: '(layoutColumn | unsupportedBlock){1,5}',
566
+ content: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
567
567
  marks: 'unsupportedMark unsupportedNodeAttribute',
568
568
  attrs: {
569
569
  columnRuleStyle: {
@@ -41,6 +41,12 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
41
41
  }
42
42
  },
43
43
  DANGEROUS_MANUAL_OVERRIDE: {
44
+ 'pm-spec': {
45
+ content: {
46
+ value: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
47
+ reason: "The content expression is not correct or redundant around 'unsupportedBlock*'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM."
48
+ }
49
+ },
44
50
  'validator-spec': {
45
51
  'props.type': {
46
52
  value: {
@@ -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
  }
@@ -557,7 +557,7 @@ export const layoutSectionFull = createPMNodeSpecFactory({
557
557
  isolating: true
558
558
  });
559
559
  export const layoutSectionWithSingleColumnStage0 = createPMNodeSpecFactory({
560
- content: '(layoutColumn | unsupportedBlock){1,5}',
560
+ content: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
561
561
  marks: 'unsupportedMark unsupportedNodeAttribute',
562
562
  attrs: {
563
563
  columnRuleStyle: {
@@ -35,6 +35,12 @@ export const layoutSection = adfNode('layoutSection').define({
35
35
  }
36
36
  },
37
37
  DANGEROUS_MANUAL_OVERRIDE: {
38
+ 'pm-spec': {
39
+ content: {
40
+ value: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
41
+ reason: `The content expression is not correct or redundant around 'unsupportedBlock*'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM.`
42
+ }
43
+ },
38
44
  'validator-spec': {
39
45
  'props.type': {
40
46
  value: {
@@ -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
  }
@@ -557,7 +557,7 @@ export var layoutSectionFull = createPMNodeSpecFactory({
557
557
  isolating: true
558
558
  });
559
559
  export var layoutSectionWithSingleColumnStage0 = createPMNodeSpecFactory({
560
- content: '(layoutColumn | unsupportedBlock){1,5}',
560
+ content: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
561
561
  marks: 'unsupportedMark unsupportedNodeAttribute',
562
562
  attrs: {
563
563
  columnRuleStyle: {
@@ -35,6 +35,12 @@ export var layoutSection = adfNode('layoutSection').define({
35
35
  }
36
36
  },
37
37
  DANGEROUS_MANUAL_OVERRIDE: {
38
+ 'pm-spec': {
39
+ content: {
40
+ value: '(layoutColumn | unsupportedBlock){1,5} unsupportedBlock*',
41
+ reason: "The content expression is not correct or redundant around 'unsupportedBlock*'. This case is not supported by the DSL. Also in JSON schema there is no range for the items, so theres a mismatch between JSON and PM."
42
+ }
43
+ },
38
44
  'validator-spec': {
39
45
  'props.type': {
40
46
  value: {
@@ -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';
@@ -11,6 +11,12 @@ export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/
11
11
  };
12
12
  };
13
13
  DANGEROUS_MANUAL_OVERRIDE: {
14
+ 'pm-spec': {
15
+ content: {
16
+ value: string;
17
+ reason: string;
18
+ };
19
+ };
14
20
  'validator-spec': {
15
21
  'props.type': {
16
22
  value: {
@@ -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.1",
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",