@atlaskit/adf-schema 36.9.1 → 36.10.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,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 36.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4cdf270: [ED-23332] Exclude other `color` group marks from the `backgroundColor` mark
8
+
9
+ ## 36.9.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 6e9e5d6: migrated uuid function to use uuid npm package instead of custom random logic
14
+
3
15
  ## 36.9.1
4
16
 
5
17
  ### Patch Changes
@@ -43,6 +43,7 @@ var backgroundColor = exports.backgroundColor = {
43
43
  },
44
44
  inclusive: true,
45
45
  group: _groups.COLOR,
46
+ excludes: "".concat(_groups.COLOR),
46
47
  parseDOM: [{
47
48
  style: 'background-color',
48
49
  getAttrs: function getAttrs(maybeValue) {
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.uuid = exports.generateUuid = void 0;
7
- /* eslint-disable no-bitwise */
7
+ var _uuid = require("uuid");
8
8
  var generateUuid = exports.generateUuid = function generateUuid() {
9
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
10
- var r = Math.random() * 16 | 0;
11
- return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
12
- });
9
+ return (0, _uuid.v4)();
13
10
  };
14
- /* eslint-enable no-bitwise */
15
-
16
11
  var staticValue = false;
17
12
  var uuid = exports.uuid = {
18
13
  setStatic: function setStatic(value) {
@@ -30,6 +30,7 @@ export const backgroundColor = {
30
30
  },
31
31
  inclusive: true,
32
32
  group: COLOR,
33
+ excludes: `${COLOR}`,
33
34
  parseDOM: [{
34
35
  style: 'background-color',
35
36
  getAttrs: maybeValue => {
@@ -1,10 +1,7 @@
1
- /* eslint-disable no-bitwise */
2
- export const generateUuid = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
3
- const r = Math.random() * 16 | 0;
4
- return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
5
- });
6
- /* eslint-enable no-bitwise */
7
-
1
+ import { v4 as uuidGen } from 'uuid';
2
+ export const generateUuid = () => {
3
+ return uuidGen();
4
+ };
8
5
  let staticValue = false;
9
6
  export const uuid = {
10
7
  setStatic(value) {
@@ -37,6 +37,7 @@ export var backgroundColor = {
37
37
  },
38
38
  inclusive: true,
39
39
  group: COLOR,
40
+ excludes: "".concat(COLOR),
40
41
  parseDOM: [{
41
42
  style: 'background-color',
42
43
  getAttrs: function getAttrs(maybeValue) {
@@ -1,12 +1,7 @@
1
- /* eslint-disable no-bitwise */
1
+ import { v4 as uuidGen } from 'uuid';
2
2
  export var generateUuid = function generateUuid() {
3
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
4
- var r = Math.random() * 16 | 0;
5
- return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
6
- });
3
+ return uuidGen();
7
4
  };
8
- /* eslint-enable no-bitwise */
9
-
10
5
  var staticValue = false;
11
6
  export var uuid = {
12
7
  setStatic: function setStatic(value) {
@@ -1,5 +1,5 @@
1
- export declare const generateUuid: () => string;
1
+ export declare const generateUuid: () => any;
2
2
  export declare const uuid: {
3
3
  setStatic(value: string | false): void;
4
- generate(): string;
4
+ generate(): any;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "36.9.1",
3
+ "version": "36.10.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,8 @@
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "css-color-names": "0.0.4",
42
42
  "linkify-it": "^2.0.3",
43
- "memoize-one": "^6.0.0"
43
+ "memoize-one": "^6.0.0",
44
+ "uuid": "^9.0.1"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@atlassian/adf-schema-json": "^1.15.0",