@atlaskit/editor-plugin-media 14.2.9 → 14.2.11

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,20 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 14.2.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 14.2.10
10
+
11
+ ### Patch Changes
12
+
13
+ - [`46ee61dd53e91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/46ee61dd53e91) -
14
+ Remove stale experiment confluence_compact_text_format (FFCLEANUP-85812): inline final values
15
+ (flag enabled), simplify conditions, remove experiment config entries.
16
+ - Updated dependencies
17
+
3
18
  ## 14.2.9
4
19
 
5
20
  ### Patch Changes
@@ -12,10 +12,12 @@ var _react2 = require("@emotion/react");
12
12
  var _reactIntl = require("react-intl");
13
13
  var _media = require("@atlaskit/editor-common/media");
14
14
  var _mediaSingle = require("@atlaskit/editor-common/media-single");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _primitives = require("@atlaskit/primitives");
17
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
16
  var _templateObject;
17
+ /* eslint-disable @atlaskit/design-system/use-primitives-text */
18
+ // This had to be disabled to add an id and styles to a component that could not be replaced with Text
19
+ // This was added in a experiment cleanup and should be removed if possible
20
+ // Be sure to use primitives in this file as needed
19
21
  /**
20
22
  * @jsxRuntime classic
21
23
  * @jsx jsx
@@ -54,7 +56,7 @@ var CaptionPlaceholder = exports.CaptionPlaceholder = /*#__PURE__*/_react.defaul
54
56
  // This id is just used for setting styles at the moment, if it's needed for anything more specific
55
57
  // It may need to be generated to avoid overlap
56
58
  ,
57
- id: (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? _mediaSingle.CAPTION_PLACEHOLDER_ID : undefined,
59
+ id: _mediaSingle.CAPTION_PLACEHOLDER_ID,
58
60
  "data-id": _mediaSingle.CAPTION_PLACEHOLDER_ID,
59
61
  "data-testid": "caption-placeholder"
60
62
  }, (0, _react2.jsx)(_reactIntl.FormattedMessage
@@ -66,7 +68,6 @@ var CaptionPlaceholder = exports.CaptionPlaceholder = /*#__PURE__*/_react.defaul
66
68
  var CaptionPlaceholderButton = exports.CaptionPlaceholderButton = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
67
69
  var onClick = _ref2.onClick,
68
70
  placeholderMessage = _ref2.placeholderMessage;
69
- var intl = (0, _reactIntl.useIntl)();
70
71
  var handleMouseDown = (0, _react.useCallback)(function (e) {
71
72
  // In firefox, button is focused when mouse down, which make editor lose focus
72
73
  // Hence we want to disabled it so that user can type in caption directly after click
@@ -82,18 +83,11 @@ var CaptionPlaceholderButton = exports.CaptionPlaceholderButton = /*#__PURE__*/_
82
83
  testId: "caption-placeholder",
83
84
  padding: "space.0",
84
85
  xcss: placeholderButton
85
- }, (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ?
86
- // This id is just used for setting styles at the moment, if it's needed for anything more specific
87
- // It may need to be generated to avoid overlap
88
- // eslint-disable-next-line @atlaskit/design-system/use-primitives-text
89
- (0, _react2.jsx)("span", {
86
+ }, (0, _react2.jsx)("span", {
90
87
  css: placeholderText,
91
88
  id: _mediaSingle.CAPTION_PLACEHOLDER_ID
92
89
  }, (0, _react2.jsx)(_reactIntl.FormattedMessage
93
90
  // Ignored via go/ees005
94
91
  // eslint-disable-next-line react/jsx-props-no-spreading
95
- , computedPlaceholderMessage)) : (0, _react2.jsx)(_primitives.Text, {
96
- color: "color.text.subtlest",
97
- size: "large"
98
- }, intl.formatMessage(computedPlaceholderMessage)));
92
+ , computedPlaceholderMessage)));
99
93
  });
@@ -1,3 +1,7 @@
1
+ /* eslint-disable @atlaskit/design-system/use-primitives-text */
2
+ // This had to be disabled to add an id and styles to a component that could not be replaced with Text
3
+ // This was added in a experiment cleanup and should be removed if possible
4
+ // Be sure to use primitives in this file as needed
1
5
  /**
2
6
  * @jsxRuntime classic
3
7
  * @jsx jsx
@@ -6,13 +10,11 @@ import React, { useCallback } from 'react';
6
10
 
7
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
12
  import { css, jsx } from '@emotion/react';
9
- import { FormattedMessage, useIntl } from 'react-intl';
13
+ import { FormattedMessage } from 'react-intl';
10
14
  import { captionMessages as messages } from '@atlaskit/editor-common/media';
11
15
  import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
12
- import { fg } from '@atlaskit/platform-feature-flags';
13
16
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
14
- import { Pressable, Text, xcss } from '@atlaskit/primitives';
15
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
+ import { Pressable, xcss } from '@atlaskit/primitives';
16
18
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
17
19
  const placeholder = css`
18
20
  color: ${"var(--ds-text-subtlest, #6B6E76)"};
@@ -51,7 +53,7 @@ export const CaptionPlaceholder = /*#__PURE__*/React.forwardRef(({
51
53
  // This id is just used for setting styles at the moment, if it's needed for anything more specific
52
54
  // It may need to be generated to avoid overlap
53
55
  ,
54
- id: expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? CAPTION_PLACEHOLDER_ID : undefined,
56
+ id: CAPTION_PLACEHOLDER_ID,
55
57
  "data-id": CAPTION_PLACEHOLDER_ID,
56
58
  "data-testid": "caption-placeholder"
57
59
  }, jsx(FormattedMessage
@@ -64,7 +66,6 @@ export const CaptionPlaceholderButton = /*#__PURE__*/React.forwardRef(({
64
66
  onClick,
65
67
  placeholderMessage
66
68
  }, ref) => {
67
- const intl = useIntl();
68
69
  const handleMouseDown = useCallback(e => {
69
70
  // In firefox, button is focused when mouse down, which make editor lose focus
70
71
  // Hence we want to disabled it so that user can type in caption directly after click
@@ -80,18 +81,11 @@ export const CaptionPlaceholderButton = /*#__PURE__*/React.forwardRef(({
80
81
  testId: "caption-placeholder",
81
82
  padding: "space.0",
82
83
  xcss: placeholderButton
83
- }, expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ?
84
- // This id is just used for setting styles at the moment, if it's needed for anything more specific
85
- // It may need to be generated to avoid overlap
86
- // eslint-disable-next-line @atlaskit/design-system/use-primitives-text
87
- jsx("span", {
84
+ }, jsx("span", {
88
85
  css: placeholderText,
89
86
  id: CAPTION_PLACEHOLDER_ID
90
87
  }, jsx(FormattedMessage
91
88
  // Ignored via go/ees005
92
89
  // eslint-disable-next-line react/jsx-props-no-spreading
93
- , computedPlaceholderMessage)) : jsx(Text, {
94
- color: "color.text.subtlest",
95
- size: "large"
96
- }, intl.formatMessage(computedPlaceholderMessage)));
90
+ , computedPlaceholderMessage)));
97
91
  });
@@ -1,5 +1,9 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject;
3
+ /* eslint-disable @atlaskit/design-system/use-primitives-text */
4
+ // This had to be disabled to add an id and styles to a component that could not be replaced with Text
5
+ // This was added in a experiment cleanup and should be removed if possible
6
+ // Be sure to use primitives in this file as needed
3
7
  /**
4
8
  * @jsxRuntime classic
5
9
  * @jsx jsx
@@ -8,13 +12,11 @@ import React, { useCallback } from 'react';
8
12
 
9
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
14
  import { css, jsx } from '@emotion/react';
11
- import { FormattedMessage, useIntl } from 'react-intl';
15
+ import { FormattedMessage } from 'react-intl';
12
16
  import { captionMessages as messages } from '@atlaskit/editor-common/media';
13
17
  import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
18
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
16
- import { Pressable, Text, xcss } from '@atlaskit/primitives';
17
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
+ import { Pressable, xcss } from '@atlaskit/primitives';
18
20
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
19
21
  var placeholder = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: ", ";\n\twidth: 100%;\n\ttext-align: center;\n\tmargin-top: ", " !important;\n\tdisplay: block;\n"])), "var(--ds-text-subtlest, #6B6E76)", "var(--ds-space-100, 8px)");
20
22
  var placeholderText = css({
@@ -46,7 +48,7 @@ export var CaptionPlaceholder = /*#__PURE__*/React.forwardRef(function (_ref, re
46
48
  // This id is just used for setting styles at the moment, if it's needed for anything more specific
47
49
  // It may need to be generated to avoid overlap
48
50
  ,
49
- id: expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? CAPTION_PLACEHOLDER_ID : undefined,
51
+ id: CAPTION_PLACEHOLDER_ID,
50
52
  "data-id": CAPTION_PLACEHOLDER_ID,
51
53
  "data-testid": "caption-placeholder"
52
54
  }, jsx(FormattedMessage
@@ -58,7 +60,6 @@ export var CaptionPlaceholder = /*#__PURE__*/React.forwardRef(function (_ref, re
58
60
  export var CaptionPlaceholderButton = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
59
61
  var onClick = _ref2.onClick,
60
62
  placeholderMessage = _ref2.placeholderMessage;
61
- var intl = useIntl();
62
63
  var handleMouseDown = useCallback(function (e) {
63
64
  // In firefox, button is focused when mouse down, which make editor lose focus
64
65
  // Hence we want to disabled it so that user can type in caption directly after click
@@ -74,18 +75,11 @@ export var CaptionPlaceholderButton = /*#__PURE__*/React.forwardRef(function (_r
74
75
  testId: "caption-placeholder",
75
76
  padding: "space.0",
76
77
  xcss: placeholderButton
77
- }, expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ?
78
- // This id is just used for setting styles at the moment, if it's needed for anything more specific
79
- // It may need to be generated to avoid overlap
80
- // eslint-disable-next-line @atlaskit/design-system/use-primitives-text
81
- jsx("span", {
78
+ }, jsx("span", {
82
79
  css: placeholderText,
83
80
  id: CAPTION_PLACEHOLDER_ID
84
81
  }, jsx(FormattedMessage
85
82
  // Ignored via go/ees005
86
83
  // eslint-disable-next-line react/jsx-props-no-spreading
87
- , computedPlaceholderMessage)) : jsx(Text, {
88
- color: "color.text.subtlest",
89
- size: "large"
90
- }, intl.formatMessage(computedPlaceholderMessage)));
84
+ , computedPlaceholderMessage)));
91
85
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "14.2.9",
3
+ "version": "14.2.11",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/platform-feature-flags": "^2.0.0",
58
58
  "@atlaskit/primitives": "^20.3.0",
59
59
  "@atlaskit/textfield": "^9.1.0",
60
- "@atlaskit/tmp-editor-statsig": "^117.0.0",
60
+ "@atlaskit/tmp-editor-statsig": "^119.0.0",
61
61
  "@atlaskit/tokens": "^15.3.0",
62
62
  "@atlaskit/tooltip": "^23.1.0",
63
63
  "@babel/runtime": "^7.0.0",
@@ -69,7 +69,7 @@
69
69
  "uuid": "^3.1.0"
70
70
  },
71
71
  "peerDependencies": {
72
- "@atlaskit/editor-common": "^116.18.0",
72
+ "@atlaskit/editor-common": "^116.19.0",
73
73
  "@atlaskit/media-core": "^38.0.0",
74
74
  "react": "^18.2.0",
75
75
  "react-dom": "^18.2.0",