@atlaskit/adf-schema 42.3.1 → 42.4.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,12 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 42.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6114d78: add attr.text to hr, in order to match it with json schema spec
8
+ - 844e6bd: Filter out empty content groups in json and validator spec and improve min and max item calculation
9
+
3
10
  ## 42.3.1
4
11
 
5
12
  ### Patch Changes
@@ -397,6 +397,11 @@ var extensionFrameStage0 = exports.extensionFrameStage0 = (0, _createPMSpecFacto
397
397
  var hardBreak = exports.hardBreak = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
398
398
  group: 'inline',
399
399
  inline: true,
400
+ attrs: {
401
+ text: {
402
+ default: '\n'
403
+ }
404
+ },
400
405
  selectable: false,
401
406
  linebreakReplacement: true
402
407
  });
@@ -30,7 +30,7 @@ var layoutSection = exports.layoutSection = (0, _adfSchemaGenerator.adfNode)('la
30
30
  }
31
31
  }).variant('with_single_column', {
32
32
  stage0: true,
33
- content: [(0, _adfSchemaGenerator.$range)(1, 5, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock))],
33
+ content: [(0, _adfSchemaGenerator.$range)(1, 5, (0, _adfSchemaGenerator.$or)(_layoutColumn.layoutColumn, _unsupportedBlock.unsupportedBlock)), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_unsupportedBlock.unsupportedBlock))],
34
34
  ignore: [],
35
35
  attrs: {
36
36
  columnRuleStyle: {
@@ -41,12 +41,6 @@ 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
- },
50
44
  'validator-spec': {
51
45
  'props.type': {
52
46
  value: {
@@ -391,6 +391,11 @@ export const extensionFrameStage0 = createPMNodeSpecFactory({
391
391
  export const hardBreak = createPMNodeSpecFactory({
392
392
  group: 'inline',
393
393
  inline: true,
394
+ attrs: {
395
+ text: {
396
+ default: '\n'
397
+ }
398
+ },
394
399
  selectable: false,
395
400
  linebreakReplacement: true
396
401
  });
@@ -1,4 +1,4 @@
1
- import { $or, $range, adfNode } from '@atlaskit/adf-schema-generator';
1
+ import { $or, $range, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { breakout } from '../marks/breakout';
3
3
  import { unsupportedMark } from '../marks/unsupportedMark';
4
4
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
@@ -24,7 +24,7 @@ export const layoutSection = adfNode('layoutSection').define({
24
24
  }
25
25
  }).variant('with_single_column', {
26
26
  stage0: true,
27
- content: [$range(1, 5, $or(layoutColumn, unsupportedBlock))],
27
+ content: [$range(1, 5, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))],
28
28
  ignore: [],
29
29
  attrs: {
30
30
  columnRuleStyle: {
@@ -35,12 +35,6 @@ 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
- },
44
38
  'validator-spec': {
45
39
  'props.type': {
46
40
  value: {
@@ -391,6 +391,11 @@ export var extensionFrameStage0 = createPMNodeSpecFactory({
391
391
  export var hardBreak = createPMNodeSpecFactory({
392
392
  group: 'inline',
393
393
  inline: true,
394
+ attrs: {
395
+ text: {
396
+ default: '\n'
397
+ }
398
+ },
394
399
  selectable: false,
395
400
  linebreakReplacement: true
396
401
  });
@@ -1,4 +1,4 @@
1
- import { $or, $range, adfNode } from '@atlaskit/adf-schema-generator';
1
+ import { $or, $range, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { breakout } from '../marks/breakout';
3
3
  import { unsupportedMark } from '../marks/unsupportedMark';
4
4
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
@@ -24,7 +24,7 @@ export var layoutSection = adfNode('layoutSection').define({
24
24
  }
25
25
  }).variant('with_single_column', {
26
26
  stage0: true,
27
- content: [$range(1, 5, $or(layoutColumn, unsupportedBlock))],
27
+ content: [$range(1, 5, $or(layoutColumn, unsupportedBlock)), $zeroPlus($or(unsupportedBlock))],
28
28
  ignore: [],
29
29
  attrs: {
30
30
  columnRuleStyle: {
@@ -35,12 +35,6 @@ 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
- },
44
38
  'validator-spec': {
45
39
  'props.type': {
46
40
  value: {
@@ -419,7 +419,7 @@ export type LayoutSectionFullNode = PMNode & LayoutSectionFullDefinition;
419
419
  export declare const layoutSectionFull: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<LayoutSectionFullNode>) => import("prosemirror-model").NodeSpec;
420
420
  export interface LayoutSectionWithSingleColumnStage0Definition {
421
421
  type: 'layoutSection';
422
- content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition>;
422
+ content: Array<LayoutColumnDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
423
423
  marks: Array<BreakoutMark | UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
424
424
  attrs: {
425
425
  columnRuleStyle?: 'solid';
@@ -1,6 +1,6 @@
1
1
  export declare const layoutSection: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_single_column", "full"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
2
2
  stage0: true;
3
- content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec[];
3
+ content: (import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentZeroOrMoreSpec | import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentRangeSpec)[];
4
4
  ignore: any[];
5
5
  attrs: {
6
6
  columnRuleStyle: {
@@ -11,12 +11,6 @@ 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
- };
20
14
  'validator-spec': {
21
15
  'props.type': {
22
16
  value: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "42.3.1",
3
+ "version": "42.4.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.33.0",
49
+ "@atlaskit/adf-schema-generator": "^1.34.0",
50
50
  "@atlaskit/codemod-utils": "^4.2.4",
51
51
  "@babel/cli": "^7.22.9",
52
52
  "@babel/core": "^7.22.9",