@atlaskit/adf-schema 57.4.17 → 57.5.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,25 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 57.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`b24442bfe4b79`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b24442bfe4b79) -
8
+ EDITOR-8898: Promote the status `color` attribute change from stage-0 to the full ADF schema.
9
+ `status.attrs.color` is now a string matching
10
+ `neutral | purple | blue | red | yellow | green | #RRGGBB` in full ADF, not just on stage-0. All
11
+ six previously valid names still validate, so existing documents are unaffected.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
17
+ ## 57.4.18
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 57.4.17
4
24
 
5
25
  ### Patch Changes
@@ -1,52 +1,40 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.status = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
7
  var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
10
8
  var _annotation = require("../marks/annotation");
11
9
  var _unsupportedMark = require("../marks/unsupportedMark");
12
10
  var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
13
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
- var statusAttrs = {
16
- text: {
17
- minLength: 1,
18
- type: 'string',
19
- default: ''
20
- },
21
- color: {
22
- type: 'enum',
23
- values: ['neutral', 'purple', 'blue', 'red', 'yellow', 'green'],
24
- default: ''
25
- },
26
- localId: {
27
- type: 'string',
28
- optional: true,
29
- default: ''
30
- },
31
- style: {
32
- type: 'string',
33
- optional: true,
34
- default: ''
35
- }
36
- };
37
11
  var status = exports.status = (0, _adfSchemaGenerator.adfNode)('status').define({
38
12
  inline: true,
39
13
  selectable: true,
40
14
  marks: [_unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark],
41
- attrs: statusAttrs,
15
+ attrs: {
16
+ text: {
17
+ minLength: 1,
18
+ type: 'string',
19
+ default: ''
20
+ },
21
+ color: {
22
+ type: 'string',
23
+ pattern: '^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$',
24
+ default: ''
25
+ },
26
+ localId: {
27
+ type: 'string',
28
+ optional: true,
29
+ default: ''
30
+ },
31
+ style: {
32
+ type: 'string',
33
+ optional: true,
34
+ default: ''
35
+ }
36
+ },
42
37
  stage0: {
43
- marks: [_unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark, _annotation.annotation],
44
- attrs: _objectSpread(_objectSpread({}, statusAttrs), {}, {
45
- color: {
46
- type: 'string',
47
- pattern: '^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$',
48
- default: ''
49
- }
50
- })
38
+ marks: [_unsupportedNodeAttribute.unsupportedNodeAttribute, _unsupportedMark.unsupportedMark, _annotation.annotation]
51
39
  }
52
40
  });
@@ -2,42 +2,33 @@ import { adfNode } from '@atlaskit/adf-schema-generator';
2
2
  import { annotation } from '../marks/annotation';
3
3
  import { unsupportedMark } from '../marks/unsupportedMark';
4
4
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
5
- const statusAttrs = {
6
- text: {
7
- minLength: 1,
8
- type: 'string',
9
- default: ''
10
- },
11
- color: {
12
- type: 'enum',
13
- values: ['neutral', 'purple', 'blue', 'red', 'yellow', 'green'],
14
- default: ''
15
- },
16
- localId: {
17
- type: 'string',
18
- optional: true,
19
- default: ''
20
- },
21
- style: {
22
- type: 'string',
23
- optional: true,
24
- default: ''
25
- }
26
- };
27
5
  export const status = adfNode('status').define({
28
6
  inline: true,
29
7
  selectable: true,
30
8
  marks: [unsupportedNodeAttribute, unsupportedMark],
31
- attrs: statusAttrs,
32
- stage0: {
33
- marks: [unsupportedNodeAttribute, unsupportedMark, annotation],
34
- attrs: {
35
- ...statusAttrs,
36
- color: {
37
- type: 'string',
38
- pattern: '^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$',
39
- default: ''
40
- }
9
+ attrs: {
10
+ text: {
11
+ minLength: 1,
12
+ type: 'string',
13
+ default: ''
14
+ },
15
+ color: {
16
+ type: 'string',
17
+ pattern: '^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$',
18
+ default: ''
19
+ },
20
+ localId: {
21
+ type: 'string',
22
+ optional: true,
23
+ default: ''
24
+ },
25
+ style: {
26
+ type: 'string',
27
+ optional: true,
28
+ default: ''
41
29
  }
30
+ },
31
+ stage0: {
32
+ marks: [unsupportedNodeAttribute, unsupportedMark, annotation]
42
33
  }
43
34
  });
@@ -1,45 +1,34 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
1
  import { adfNode } from '@atlaskit/adf-schema-generator';
5
2
  import { annotation } from '../marks/annotation';
6
3
  import { unsupportedMark } from '../marks/unsupportedMark';
7
4
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
8
- var statusAttrs = {
9
- text: {
10
- minLength: 1,
11
- type: 'string',
12
- default: ''
13
- },
14
- color: {
15
- type: 'enum',
16
- values: ['neutral', 'purple', 'blue', 'red', 'yellow', 'green'],
17
- default: ''
18
- },
19
- localId: {
20
- type: 'string',
21
- optional: true,
22
- default: ''
23
- },
24
- style: {
25
- type: 'string',
26
- optional: true,
27
- default: ''
28
- }
29
- };
30
5
  export var status = adfNode('status').define({
31
6
  inline: true,
32
7
  selectable: true,
33
8
  marks: [unsupportedNodeAttribute, unsupportedMark],
34
- attrs: statusAttrs,
9
+ attrs: {
10
+ text: {
11
+ minLength: 1,
12
+ type: 'string',
13
+ default: ''
14
+ },
15
+ color: {
16
+ type: 'string',
17
+ pattern: '^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$',
18
+ default: ''
19
+ },
20
+ localId: {
21
+ type: 'string',
22
+ optional: true,
23
+ default: ''
24
+ },
25
+ style: {
26
+ type: 'string',
27
+ optional: true,
28
+ default: ''
29
+ }
30
+ },
35
31
  stage0: {
36
- marks: [unsupportedNodeAttribute, unsupportedMark, annotation],
37
- attrs: _objectSpread(_objectSpread({}, statusAttrs), {}, {
38
- color: {
39
- type: 'string',
40
- pattern: '^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$',
41
- default: ''
42
- }
43
- })
32
+ marks: [unsupportedNodeAttribute, unsupportedMark, annotation]
44
33
  }
45
34
  });
@@ -2532,7 +2532,8 @@
2532
2532
  "type": "string"
2533
2533
  },
2534
2534
  "color": {
2535
- "enum": ["neutral", "purple", "blue", "red", "yellow", "green"]
2535
+ "type": "string",
2536
+ "pattern": "^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$"
2536
2537
  },
2537
2538
  "localId": {
2538
2539
  "type": "string"
@@ -934,7 +934,7 @@ export interface StatusDefinition {
934
934
  marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
935
935
  attrs: {
936
936
  text: string;
937
- color: 'neutral' | 'purple' | 'blue' | 'red' | 'yellow' | 'green';
937
+ color: string;
938
938
  localId?: string;
939
939
  style?: string;
940
940
  };
@@ -5,6 +5,9 @@ import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
5
5
  */
6
6
  export interface StatusDefinition {
7
7
  attrs: {
8
+ /**
9
+ * @pattern "^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$"
10
+ */
8
11
  color: string;
9
12
  localId?: string;
10
13
  /**
@@ -2532,7 +2532,8 @@
2532
2532
  "type": "string"
2533
2533
  },
2534
2534
  "color": {
2535
- "enum": ["neutral", "purple", "blue", "red", "yellow", "green"]
2535
+ "type": "string",
2536
+ "pattern": "^(neutral|purple|blue|red|yellow|green|#[0-9a-fA-F]{6})$"
2536
2537
  },
2537
2538
  "localId": {
2538
2539
  "type": "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "57.4.17",
3
+ "version": "57.5.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/"
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/adf-schema-generator": "^4.0.0",
41
41
  "@atlaskit/editor-prosemirror": "^8.0.0",
42
42
  "@atlaskit/platform-feature-flags": "^2.2.0",
43
- "@atlaskit/tmp-editor-statsig": "^196.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^198.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "css-color-names": "0.0.4",
46
46
  "linkify-it": "^5.0.2",
@@ -69,7 +69,7 @@
69
69
  "@babel/preset-env": "^7.20.0",
70
70
  "@babel/preset-react": "^7.18.6",
71
71
  "@babel/preset-typescript": "^7.20.0",
72
- "@compiled/babel-plugin": "^3.0.1",
72
+ "@compiled/babel-plugin": "^3.0.2",
73
73
  "@manypkg/find-root": "^1.1.0",
74
74
  "@types/jest": "^30.0.0",
75
75
  "@types/json-schema": "^7.0.15",