@atlaskit/adf-schema 57.6.18 → 57.6.20

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,21 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 57.6.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 57.6.19
10
+
11
+ ### Patch Changes
12
+
13
+ - [`281a2188b8d83`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/281a2188b8d83) -
14
+ [ux] [EDITOR-8348] this change adds a color picker to the divider floating toolbar behind
15
+ `platform_editor_lovability_dividers`. the selected color is applied behind
16
+ `platform_editor_lovability_dividers_attributes`.
17
+ - Updated dependencies
18
+
3
19
  ## 57.6.18
4
20
 
5
21
  ### 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.20",
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/"
@@ -31,16 +31,16 @@
31
31
  "build:all": "yarn build:cjs && yarn build:esm && yarn build:es2019 && yarn build:types",
32
32
  "build": "yarn clean:build && afm workspace @atlaskit/editor-prosemirror build && afm workspace @atlaskit/adf-schema-generator build && yarn run build:all && yarn run build:schema:all",
33
33
  "build:move:json-schema": "mkdir -p dist && cp -r json-schema dist",
34
- "build:schema:pm": "yarn run -T run-ts ./schema-generators/pm-full-schema.ts && prettier --write --no-editorconfig './src/next-schema/generated/**/*.ts'",
35
- "build:schema:json": "mkdir -p json-schema/v1/ && yarn run -T run-ts ./schema-generators/json-full-schema.ts && prettier --write --no-editorconfig './json-schema/v1/*.json' && yarn run build:move:json-schema",
36
- "build:schema:validator": "yarn run -T run-ts ./schema-generators/validator-full-schema.ts && prettier --write --no-editorconfig './src/validator-schema/generated/**/*.ts'",
34
+ "build:schema:pm": "run-ts ./schema-generators/pm-full-schema.ts && prettier --write --no-editorconfig './src/next-schema/generated/**/*.ts'",
35
+ "build:schema:json": "mkdir -p json-schema/v1/ && run-ts ./schema-generators/json-full-schema.ts && prettier --write --no-editorconfig './json-schema/v1/*.json' && yarn run build:move:json-schema",
36
+ "build:schema:validator": "run-ts ./schema-generators/validator-full-schema.ts && prettier --write --no-editorconfig './src/validator-schema/generated/**/*.ts'",
37
37
  "build:schema:all": "yarn build:schema:pm && yarn build:schema:json && yarn build:schema:validator"
38
38
  },
39
39
  "dependencies": {
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": "^220.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "css-color-names": "0.0.4",
46
46
  "linkify-it": "^5.0.2",
@@ -59,6 +59,7 @@
59
59
  "@atlaskit/codemod-utils": "^5.1.0",
60
60
  "@atlassian/adf-schema-json": "^1.35.0",
61
61
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
62
+ "@atlassian/ts-loader": "^0.1.0",
62
63
  "@babel/cli": "^7.20.0",
63
64
  "@babel/core": "7.24.9",
64
65
  "@babel/plugin-proposal-class-properties": "^7.18.6",