@atlaskit/adf-schema 57.6.18 → 57.6.19

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,15 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 57.6.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [`281a2188b8d83`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/281a2188b8d83) -
8
+ [ux] [EDITOR-8348] this change adds a color picker to the divider floating toolbar behind
9
+ `platform_editor_lovability_dividers`. the selected color is applied behind
10
+ `platform_editor_lovability_dividers_attributes`.
11
+ - Updated dependencies
12
+
3
13
  ## 57.6.18
4
14
 
5
15
  ### Patch Changes
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.ruleWithLocalId = exports.ruleWithAttrsRootOnlyStage0 = exports.ruleWithAttrs = exports.ruleRootOnlyStage0 = exports.rule = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _nodeTypes = require("../../next-schema/generated/nodeTypes");
10
+ var _hexToEditorTextPaletteColor = require("../../utils/hex-to-editor-text-palette-color");
10
11
  var _uuid = require("../../utils/uuid");
11
12
  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; }
12
13
  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; }
@@ -79,16 +80,19 @@ var ruleWithAttrs = exports.ruleWithAttrs = _objectSpread(_objectSpread({}, rule
79
80
  getAttrs: getAttrs
80
81
  }],
81
82
  toDOM: function toDOM(node) {
83
+ var _hexToEditorTextPalet;
82
84
  var _node$attrs2 = node.attrs,
83
85
  color = _node$attrs2.color,
84
86
  localId = _node$attrs2.localId,
85
87
  style = _node$attrs2.style,
86
88
  weight = _node$attrs2.weight;
89
+ var paletteColorValue = color && ((_hexToEditorTextPalet = (0, _hexToEditorTextPaletteColor.hexToEditorTextPaletteColor)(color)) !== null && _hexToEditorTextPalet !== void 0 ? _hexToEditorTextPalet : color);
87
90
  return ['hr', {
88
91
  'data-color': color || undefined,
89
92
  'data-local-id': localId || undefined,
90
93
  'data-style': style || undefined,
91
- 'data-weight': weight !== null && weight !== void 0 ? weight : undefined
94
+ 'data-weight': weight !== null && weight !== void 0 ? weight : undefined,
95
+ style: paletteColorValue ? "--custom-palette-color: ".concat(paletteColorValue) : undefined
92
96
  }];
93
97
  }
94
98
  });
@@ -1,4 +1,5 @@
1
1
  import { rule as ruleFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { hexToEditorTextPaletteColor } from '../../utils/hex-to-editor-text-palette-color';
2
3
  import { uuid } from '../../utils/uuid';
3
4
 
4
5
  /**
@@ -70,17 +71,20 @@ export const ruleWithAttrs = {
70
71
  getAttrs
71
72
  }],
72
73
  toDOM(node) {
74
+ var _hexToEditorTextPalet;
73
75
  const {
74
76
  color,
75
77
  localId,
76
78
  style,
77
79
  weight
78
80
  } = node.attrs;
81
+ const paletteColorValue = color && ((_hexToEditorTextPalet = hexToEditorTextPaletteColor(color)) !== null && _hexToEditorTextPalet !== void 0 ? _hexToEditorTextPalet : color);
79
82
  return ['hr', {
80
83
  'data-color': color || undefined,
81
84
  'data-local-id': localId || undefined,
82
85
  'data-style': style || undefined,
83
- 'data-weight': weight !== null && weight !== void 0 ? weight : undefined
86
+ 'data-weight': weight !== null && weight !== void 0 ? weight : undefined,
87
+ style: paletteColorValue ? `--custom-palette-color: ${paletteColorValue}` : undefined
84
88
  }];
85
89
  }
86
90
  };
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
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
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
4
  import { rule as ruleFactory } from '../../next-schema/generated/nodeTypes';
5
+ import { hexToEditorTextPaletteColor } from '../../utils/hex-to-editor-text-palette-color';
5
6
  import { uuid } from '../../utils/uuid';
6
7
 
7
8
  /**
@@ -73,16 +74,19 @@ export var ruleWithAttrs = _objectSpread(_objectSpread({}, ruleWithLocalId), {},
73
74
  getAttrs: getAttrs
74
75
  }],
75
76
  toDOM: function toDOM(node) {
77
+ var _hexToEditorTextPalet;
76
78
  var _node$attrs2 = node.attrs,
77
79
  color = _node$attrs2.color,
78
80
  localId = _node$attrs2.localId,
79
81
  style = _node$attrs2.style,
80
82
  weight = _node$attrs2.weight;
83
+ var paletteColorValue = color && ((_hexToEditorTextPalet = hexToEditorTextPaletteColor(color)) !== null && _hexToEditorTextPalet !== void 0 ? _hexToEditorTextPalet : color);
81
84
  return ['hr', {
82
85
  'data-color': color || undefined,
83
86
  'data-local-id': localId || undefined,
84
87
  'data-style': style || undefined,
85
- 'data-weight': weight !== null && weight !== void 0 ? weight : undefined
88
+ 'data-weight': weight !== null && weight !== void 0 ? weight : undefined,
89
+ style: paletteColorValue ? "--custom-palette-color: ".concat(paletteColorValue) : undefined
86
90
  }];
87
91
  }
88
92
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "57.6.18",
3
+ "version": "57.6.19",
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": "^9.0.0",
42
42
  "@atlaskit/platform-feature-flags": "^2.2.0",
43
- "@atlaskit/tmp-editor-statsig": "^218.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^219.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "css-color-names": "0.0.4",
46
46
  "linkify-it": "^5.0.2",