@atlaskit/adf-schema 45.1.0 → 46.0.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 (41) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/next-schema/full-schema.adf.js +1 -1
  3. package/dist/cjs/next-schema/generated/nodeTypes.js +6 -4
  4. package/dist/cjs/next-schema/groups/blockContentGroup.js +1 -3
  5. package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
  6. package/dist/cjs/next-schema/nodes/codeBlock.js +1 -18
  7. package/dist/cjs/next-schema/nodes/expand.js +4 -10
  8. package/dist/cjs/next-schema/nodes/text.js +3 -0
  9. package/dist/cjs/schema/nodes/expand.js +1 -1
  10. package/dist/cjs/validator-schema/generated/validatorSpec.js +15 -29
  11. package/dist/es2019/next-schema/full-schema.adf.js +1 -1
  12. package/dist/es2019/next-schema/generated/nodeTypes.js +5 -3
  13. package/dist/es2019/next-schema/groups/blockContentGroup.js +1 -3
  14. package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
  15. package/dist/es2019/next-schema/nodes/codeBlock.js +1 -18
  16. package/dist/es2019/next-schema/nodes/expand.js +4 -10
  17. package/dist/es2019/next-schema/nodes/text.js +3 -0
  18. package/dist/es2019/schema/nodes/expand.js +1 -1
  19. package/dist/es2019/validator-schema/generated/validatorSpec.js +14 -28
  20. package/dist/esm/next-schema/full-schema.adf.js +1 -1
  21. package/dist/esm/next-schema/generated/nodeTypes.js +5 -3
  22. package/dist/esm/next-schema/groups/blockContentGroup.js +1 -3
  23. package/dist/esm/next-schema/groups/blockGroup.js +1 -1
  24. package/dist/esm/next-schema/nodes/codeBlock.js +1 -18
  25. package/dist/esm/next-schema/nodes/expand.js +4 -10
  26. package/dist/esm/next-schema/nodes/text.js +3 -0
  27. package/dist/esm/schema/nodes/expand.js +1 -1
  28. package/dist/esm/validator-schema/generated/validatorSpec.js +14 -28
  29. package/dist/json-schema/v1/full.json +56 -63
  30. package/dist/json-schema/v1/stage-0.json +56 -63
  31. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
  32. package/dist/types/next-schema/generated/nodeTypes.d.ts +13 -8
  33. package/dist/types/next-schema/groups/blockContentGroup.d.ts +0 -2
  34. package/dist/types/next-schema/nodes/expand.d.ts +3 -8
  35. package/dist/types/next-schema/nodes/text.d.ts +4 -1
  36. package/dist/types/schema/nodes/doc.d.ts +2 -2
  37. package/dist/types/schema/nodes/expand.d.ts +2 -3
  38. package/dist/types/validator-schema/generated/validatorSpec.d.ts +12 -26
  39. package/json-schema/v1/full.json +56 -63
  40. package/json-schema/v1/stage-0.json +56 -63
  41. package/package.json +2 -2
@@ -17,16 +17,15 @@ export interface ExpandBaseDefinition {
17
17
  * @allowUnsupportedBlock true
18
18
  */
19
19
  content: Array<NonNestableBlockContent | NestedExpandDefinition>;
20
- marks?: Array<any>;
21
20
  }
22
21
  /**
23
22
  * @name expand_with_no_mark_node
24
23
  */
25
24
  export type ExpandDefinition = ExpandBaseDefinition & NoMark;
26
25
  /**
27
- * @name expand_with_breakout_mark_node
26
+ * @name expand_root_only_node
28
27
  */
29
- export type ExpandWithBreakoutDefinition = ExpandBaseDefinition & MarksObject<BreakoutMarkDefinition>;
28
+ export type ExpandRootOnlyDefinition = ExpandBaseDefinition & MarksObject<BreakoutMarkDefinition>;
30
29
  export declare const expand: import("prosemirror-model").NodeSpec;
31
30
  export declare const expandWithNestedExpand: import("prosemirror-model").NodeSpec;
32
31
  export declare const toJSON: (node: PMNode) => {
@@ -295,16 +295,7 @@ export declare const codeBlock: {
295
295
  };
296
296
  content: {
297
297
  type: string;
298
- items: (string | {
299
- props: {
300
- marks: {
301
- items: any[];
302
- maxItems: number;
303
- optional: boolean;
304
- type: string;
305
- };
306
- };
307
- })[][];
298
+ items: string[];
308
299
  optional: boolean;
309
300
  allowUnsupportedInline: boolean;
310
301
  };
@@ -526,14 +517,9 @@ export declare const expand: {
526
517
  minItems: number;
527
518
  allowUnsupportedBlock: boolean;
528
519
  };
529
- marks: {
530
- type: string;
531
- items: any[];
532
- optional: boolean;
533
- };
534
520
  };
535
521
  };
536
- export declare const expand_with_breakout_mark: (string | {
522
+ export declare const expand_root_only: (string | {
537
523
  props: {
538
524
  marks: {
539
525
  type: string;
@@ -542,16 +528,6 @@ export declare const expand_with_breakout_mark: (string | {
542
528
  };
543
529
  };
544
530
  })[];
545
- export declare const expand_with_no_mark: (string | {
546
- props: {
547
- marks: {
548
- type: string;
549
- maxItems: number;
550
- items: any[];
551
- optional: boolean;
552
- };
553
- };
554
- })[];
555
531
  export declare const extension: {
556
532
  props: {
557
533
  type: {
@@ -1742,6 +1718,16 @@ export declare const text_link_inline: (string | {
1742
1718
  };
1743
1719
  };
1744
1720
  })[];
1721
+ export declare const text_with_no_marks: (string | {
1722
+ props: {
1723
+ marks: {
1724
+ type: string;
1725
+ maxItems: number;
1726
+ items: any[];
1727
+ optional: boolean;
1728
+ };
1729
+ };
1730
+ })[];
1745
1731
  export declare const textColor: {
1746
1732
  props: {
1747
1733
  type: {
@@ -133,7 +133,7 @@
133
133
  "$ref": "#/definitions/table_node"
134
134
  },
135
135
  {
136
- "$ref": "#/definitions/expand_with_no_mark_node"
136
+ "$ref": "#/definitions/expand_node"
137
137
  },
138
138
  {
139
139
  "$ref": "#/definitions/bodiedExtension_with_marks_node"
@@ -507,21 +507,7 @@
507
507
  "content": {
508
508
  "type": "array",
509
509
  "items": {
510
- "allOf": [
511
- {
512
- "$ref": "#/definitions/text_node"
513
- },
514
- {
515
- "type": "object",
516
- "properties": {
517
- "marks": {
518
- "type": "array",
519
- "maxItems": 0
520
- }
521
- },
522
- "additionalProperties": true
523
- }
524
- ]
510
+ "$ref": "#/definitions/text_with_no_marks_node"
525
511
  }
526
512
  }
527
513
  },
@@ -555,21 +541,7 @@
555
541
  "content": {
556
542
  "type": "array",
557
543
  "items": {
558
- "allOf": [
559
- {
560
- "$ref": "#/definitions/text_node"
561
- },
562
- {
563
- "type": "object",
564
- "properties": {
565
- "marks": {
566
- "type": "array",
567
- "maxItems": 0
568
- }
569
- },
570
- "additionalProperties": true
571
- }
572
- ]
544
+ "$ref": "#/definitions/text_with_no_marks_node"
573
545
  }
574
546
  }
575
547
  },
@@ -754,16 +726,16 @@
754
726
  "$ref": "#/definitions/bodiedExtension_with_marks_node"
755
727
  },
756
728
  {
757
- "$ref": "#/definitions/expand_with_no_mark_node"
758
- },
759
- {
760
- "$ref": "#/definitions/expand_with_breakout_mark_node"
729
+ "$ref": "#/definitions/expand_node"
761
730
  },
762
731
  {
763
732
  "$ref": "#/definitions/codeBlock_root_only_node"
764
733
  },
765
734
  {
766
735
  "$ref": "#/definitions/layoutSection_full_node"
736
+ },
737
+ {
738
+ "$ref": "#/definitions/expand_root_only_node"
767
739
  }
768
740
  ]
769
741
  }
@@ -860,7 +832,8 @@
860
832
  "enum": ["expand"]
861
833
  },
862
834
  "marks": {
863
- "type": "array"
835
+ "type": "array",
836
+ "maxItems": 0
864
837
  },
865
838
  "attrs": {
866
839
  "type": "object",
@@ -889,41 +862,44 @@
889
862
  "additionalProperties": false,
890
863
  "required": ["type", "content", "attrs"]
891
864
  },
892
- "expand_with_breakout_mark_node": {
893
- "allOf": [
894
- {
895
- "$ref": "#/definitions/expand_node"
865
+ "expand_root_only_node": {
866
+ "type": "object",
867
+ "properties": {
868
+ "type": {
869
+ "enum": ["expand"]
896
870
  },
897
- {
871
+ "marks": {
872
+ "type": "array",
873
+ "items": {
874
+ "$ref": "#/definitions/breakout_mark"
875
+ }
876
+ },
877
+ "attrs": {
898
878
  "type": "object",
899
879
  "properties": {
900
- "marks": {
901
- "type": "array",
902
- "items": {
903
- "$ref": "#/definitions/breakout_mark"
904
- }
880
+ "title": {
881
+ "type": "string"
905
882
  }
906
883
  },
907
- "additionalProperties": true
908
- }
909
- ]
910
- },
911
- "expand_with_no_mark_node": {
912
- "allOf": [
913
- {
914
- "$ref": "#/definitions/expand_node"
884
+ "additionalProperties": false
915
885
  },
916
- {
917
- "type": "object",
918
- "properties": {
919
- "marks": {
920
- "type": "array",
921
- "maxItems": 0
922
- }
886
+ "content": {
887
+ "type": "array",
888
+ "items": {
889
+ "anyOf": [
890
+ {
891
+ "$ref": "#/definitions/non_nestable_block_content"
892
+ },
893
+ {
894
+ "$ref": "#/definitions/nestedExpand_with_no_marks_node"
895
+ }
896
+ ]
923
897
  },
924
- "additionalProperties": true
898
+ "minItems": 1
925
899
  }
926
- ]
900
+ },
901
+ "additionalProperties": false,
902
+ "required": ["type", "content"]
927
903
  },
928
904
  "extension_node": {
929
905
  "type": "object",
@@ -2532,6 +2508,23 @@
2532
2508
  "additionalProperties": false,
2533
2509
  "required": ["type", "text"]
2534
2510
  },
2511
+ "text_with_no_marks_node": {
2512
+ "allOf": [
2513
+ {
2514
+ "$ref": "#/definitions/text_node"
2515
+ },
2516
+ {
2517
+ "type": "object",
2518
+ "properties": {
2519
+ "marks": {
2520
+ "type": "array",
2521
+ "maxItems": 0
2522
+ }
2523
+ },
2524
+ "additionalProperties": true
2525
+ }
2526
+ ]
2527
+ },
2535
2528
  "textColor_mark": {
2536
2529
  "type": "object",
2537
2530
  "properties": {
@@ -136,7 +136,7 @@
136
136
  "$ref": "#/definitions/table_node"
137
137
  },
138
138
  {
139
- "$ref": "#/definitions/expand_with_no_mark_node"
139
+ "$ref": "#/definitions/expand_node"
140
140
  },
141
141
  {
142
142
  "$ref": "#/definitions/bodiedExtension_with_marks_node"
@@ -517,21 +517,7 @@
517
517
  "content": {
518
518
  "type": "array",
519
519
  "items": {
520
- "allOf": [
521
- {
522
- "$ref": "#/definitions/text_node"
523
- },
524
- {
525
- "type": "object",
526
- "properties": {
527
- "marks": {
528
- "type": "array",
529
- "maxItems": 0
530
- }
531
- },
532
- "additionalProperties": true
533
- }
534
- ]
520
+ "$ref": "#/definitions/text_with_no_marks_node"
535
521
  }
536
522
  }
537
523
  },
@@ -565,21 +551,7 @@
565
551
  "content": {
566
552
  "type": "array",
567
553
  "items": {
568
- "allOf": [
569
- {
570
- "$ref": "#/definitions/text_node"
571
- },
572
- {
573
- "type": "object",
574
- "properties": {
575
- "marks": {
576
- "type": "array",
577
- "maxItems": 0
578
- }
579
- },
580
- "additionalProperties": true
581
- }
582
- ]
554
+ "$ref": "#/definitions/text_with_no_marks_node"
583
555
  }
584
556
  }
585
557
  },
@@ -773,10 +745,7 @@
773
745
  "$ref": "#/definitions/bodiedExtension_with_marks_node"
774
746
  },
775
747
  {
776
- "$ref": "#/definitions/expand_with_no_mark_node"
777
- },
778
- {
779
- "$ref": "#/definitions/expand_with_breakout_mark_node"
748
+ "$ref": "#/definitions/expand_node"
780
749
  },
781
750
  {
782
751
  "$ref": "#/definitions/codeBlock_root_only_node"
@@ -789,6 +758,9 @@
789
758
  },
790
759
  {
791
760
  "$ref": "#/definitions/multiBodiedExtension_node"
761
+ },
762
+ {
763
+ "$ref": "#/definitions/expand_root_only_node"
792
764
  }
793
765
  ]
794
766
  }
@@ -891,7 +863,8 @@
891
863
  "enum": ["expand"]
892
864
  },
893
865
  "marks": {
894
- "type": "array"
866
+ "type": "array",
867
+ "maxItems": 0
895
868
  },
896
869
  "attrs": {
897
870
  "type": "object",
@@ -920,41 +893,44 @@
920
893
  "additionalProperties": false,
921
894
  "required": ["type", "content", "attrs"]
922
895
  },
923
- "expand_with_breakout_mark_node": {
924
- "allOf": [
925
- {
926
- "$ref": "#/definitions/expand_node"
896
+ "expand_root_only_node": {
897
+ "type": "object",
898
+ "properties": {
899
+ "type": {
900
+ "enum": ["expand"]
927
901
  },
928
- {
902
+ "marks": {
903
+ "type": "array",
904
+ "items": {
905
+ "$ref": "#/definitions/breakout_mark"
906
+ }
907
+ },
908
+ "attrs": {
929
909
  "type": "object",
930
910
  "properties": {
931
- "marks": {
932
- "type": "array",
933
- "items": {
934
- "$ref": "#/definitions/breakout_mark"
935
- }
911
+ "title": {
912
+ "type": "string"
936
913
  }
937
914
  },
938
- "additionalProperties": true
939
- }
940
- ]
941
- },
942
- "expand_with_no_mark_node": {
943
- "allOf": [
944
- {
945
- "$ref": "#/definitions/expand_node"
915
+ "additionalProperties": false
946
916
  },
947
- {
948
- "type": "object",
949
- "properties": {
950
- "marks": {
951
- "type": "array",
952
- "maxItems": 0
953
- }
917
+ "content": {
918
+ "type": "array",
919
+ "items": {
920
+ "anyOf": [
921
+ {
922
+ "$ref": "#/definitions/non_nestable_block_content"
923
+ },
924
+ {
925
+ "$ref": "#/definitions/nestedExpand_with_no_marks_node"
926
+ }
927
+ ]
954
928
  },
955
- "additionalProperties": true
929
+ "minItems": 1
956
930
  }
957
- ]
931
+ },
932
+ "additionalProperties": false,
933
+ "required": ["type", "content"]
958
934
  },
959
935
  "extension_node": {
960
936
  "type": "object",
@@ -2901,6 +2877,23 @@
2901
2877
  "additionalProperties": false,
2902
2878
  "required": ["type", "text"]
2903
2879
  },
2880
+ "text_with_no_marks_node": {
2881
+ "allOf": [
2882
+ {
2883
+ "$ref": "#/definitions/text_node"
2884
+ },
2885
+ {
2886
+ "type": "object",
2887
+ "properties": {
2888
+ "marks": {
2889
+ "type": "array",
2890
+ "maxItems": 0
2891
+ }
2892
+ },
2893
+ "additionalProperties": true
2894
+ }
2895
+ ]
2896
+ },
2904
2897
  "textColor_mark": {
2905
2898
  "type": "object",
2906
2899
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "45.1.0",
3
+ "version": "46.0.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.24.0",
49
- "@atlaskit/adf-schema-generator": "^1.38.3",
49
+ "@atlaskit/adf-schema-generator": "^2.0.0",
50
50
  "@atlaskit/codemod-utils": "^4.2.4",
51
51
  "@babel/cli": "^7.22.9",
52
52
  "@babel/core": "^7.22.9",