@atlaskit/adf-schema 52.5.4 → 52.6.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,32 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 52.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`a0b1822615d7e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a0b1822615d7e) -
8
+ Refactor inline editor AI image generation loading state to use ProseMirror decorations:
9
+ - Add AI generating decoration plugin to editor-plugin-media for transient visual state tracking
10
+ via ProseMirror decorations instead of ADF schema attributes
11
+ - Remove \_\_isAIGenerating transient attribute from ADF media node schema
12
+ - Update editor-rovo-bridge to dispatch decoration meta instead of mutating node attributes
13
+ - Media NodeView reads decoration state and passes isAIGenerating prop to media-card
14
+ - AIBorder component with pulsing gradient border and translucent blanket during AI image
15
+ generation
16
+ - Internationalized AI generating progress bar aria label
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 52.5.5
23
+
24
+ ### Patch Changes
25
+
26
+ - [`f7d7098ecbcbf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f7d7098ecbcbf) -
27
+ Cleanup exp platform_editor_copy_paste_issue_fix
28
+ - Updated dependencies
29
+
3
30
  ## 52.5.4
4
31
 
5
32
  ### Patch Changes
@@ -15,7 +15,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
15
15
  * @name media_node
16
16
  */
17
17
 
18
- var defaultAttrs = exports.defaultAttrs = (0, _nodeTypes.media)({}).attrs;
18
+ var defaultAttrs = exports.defaultAttrs = _objectSpread({}, (0, _nodeTypes.media)({}).attrs);
19
19
  var camelCaseToKebabCase = exports.camelCaseToKebabCase = function camelCaseToKebabCase(str) {
20
20
  return (
21
21
  // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
@@ -46,8 +46,9 @@ var createMediaSpec = exports.createMediaSpec = function createMediaSpec(attribu
46
46
  // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
47
47
  // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
48
48
  var key = camelCaseToKebabCase(k).replace(/^__/, '');
49
+ var value =
49
50
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
50
- var value = dom.getAttribute("data-".concat(key)) || '';
51
+ dom.getAttribute("data-".concat(key)) || '';
51
52
  if (value) {
52
53
  attrs[k] = value;
53
54
  }
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.status = void 0;
7
7
  var _uuid = require("../../utils/uuid");
8
8
  var _nodeTypes = require("../../next-schema/generated/nodeTypes");
9
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
9
  /**
11
10
  * @name status_node
12
11
  */
@@ -24,7 +23,7 @@ var status = exports.status = (0, _nodeTypes.status)({
24
23
 
25
24
  // Prefer data-text attribute over textContent
26
25
  // When NodeView DOM is copied, inner text content may not be preserved
27
- var text = (0, _expValEquals.expValEquals)('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? dom.getAttribute('data-text') || textContent : textContent;
26
+ var text = dom.getAttribute('data-text') || textContent;
28
27
  return {
29
28
  text: text,
30
29
  color: dom.getAttribute('data-color'),
@@ -6,7 +6,9 @@ import { uuid } from '../../utils/uuid';
6
6
  * @name media_node
7
7
  */
8
8
 
9
- export const defaultAttrs = mediaFactory({}).attrs;
9
+ export const defaultAttrs = {
10
+ ...mediaFactory({}).attrs
11
+ };
10
12
  export const camelCaseToKebabCase = str =>
11
13
  // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
12
14
  str.replace(/([^A-Z]+)([A-Z])/gu, (_, x, y) => `${x}-${y.toLowerCase()}`);
@@ -30,8 +32,9 @@ export const createMediaSpec = (attributes, inline = false, generateLocalId = fa
30
32
  // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
31
33
  // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
32
34
  const key = camelCaseToKebabCase(k).replace(/^__/u, '');
35
+ const value =
33
36
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
34
- const value = dom.getAttribute(`data-${key}`) || '';
37
+ dom.getAttribute(`data-${key}`) || '';
35
38
  if (value) {
36
39
  attrs[k] = value;
37
40
  }
@@ -1,6 +1,5 @@
1
1
  import { uuid } from '../../utils/uuid';
2
2
  import { status as statusFactory } from '../../next-schema/generated/nodeTypes';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
 
5
4
  /**
6
5
  * @name status_node
@@ -19,7 +18,7 @@ export const status = statusFactory({
19
18
 
20
19
  // Prefer data-text attribute over textContent
21
20
  // When NodeView DOM is copied, inner text content may not be preserved
22
- const text = expValEquals('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? dom.getAttribute('data-text') || textContent : textContent;
21
+ const text = dom.getAttribute('data-text') || textContent;
23
22
  return {
24
23
  text,
25
24
  color: dom.getAttribute('data-color'),
@@ -9,7 +9,7 @@ import { uuid } from '../../utils/uuid';
9
9
  * @name media_node
10
10
  */
11
11
 
12
- export var defaultAttrs = mediaFactory({}).attrs;
12
+ export var defaultAttrs = _objectSpread({}, mediaFactory({}).attrs);
13
13
  export var camelCaseToKebabCase = function camelCaseToKebabCase(str) {
14
14
  return (
15
15
  // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
@@ -40,8 +40,9 @@ export var createMediaSpec = function createMediaSpec(attributes) {
40
40
  // @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
41
41
  // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
42
42
  var key = camelCaseToKebabCase(k).replace(/^__/, '');
43
+ var value =
43
44
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
44
- var value = dom.getAttribute("data-".concat(key)) || '';
45
+ dom.getAttribute("data-".concat(key)) || '';
45
46
  if (value) {
46
47
  attrs[k] = value;
47
48
  }
@@ -1,6 +1,5 @@
1
1
  import { uuid } from '../../utils/uuid';
2
2
  import { status as statusFactory } from '../../next-schema/generated/nodeTypes';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
 
5
4
  /**
6
5
  * @name status_node
@@ -19,7 +18,7 @@ export var status = statusFactory({
19
18
 
20
19
  // Prefer data-text attribute over textContent
21
20
  // When NodeView DOM is copied, inner text content may not be preserved
22
- var text = expValEquals('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? dom.getAttribute('data-text') || textContent : textContent;
21
+ var text = dom.getAttribute('data-text') || textContent;
23
22
  return {
24
23
  text: text,
25
24
  color: dom.getAttribute('data-color'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "52.5.4",
3
+ "version": "52.6.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/"
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@atlaskit/adf-schema-generator": "^2.2.0",
44
44
  "@atlaskit/editor-prosemirror": "^7.3.0",
45
- "@atlaskit/tmp-editor-statsig": "^66.0.0",
45
+ "@atlaskit/tmp-editor-statsig": "^68.0.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "css-color-names": "0.0.4",
48
48
  "linkify-it": "^3.0.3",