@atlaskit/renderer 136.1.0 → 136.1.1

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,24 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 136.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1eb42bae392d7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1eb42bae392d7) -
8
+ Clean up experiment `platform_editor_remove_bidi_char_warning`. Bidirectional character warnings
9
+ are no longer rendered in code blocks: `codeBidiWarningPlugin` is no longer registered by any
10
+ preset, and the renderer passes `hasBidiWarnings={false}` to `@atlaskit/code` code blocks. Bidi
11
+ warnings on inline `code` marks are unaffected.
12
+
13
+ `codeBidiWarning` has been removed from the plugin lists and plugin options of the Confluence
14
+ full-page, Confluence markdown, and Company Hub presets, so consumers no longer need to pass
15
+ `pluginOptions.codeBidiWarning` or `enabledOptionalPlugins.codeBidiWarning`.
16
+
17
+ `@atlaskit/editor-plugin-code-bidi-warning` is retained but now has no consumers; it is scheduled
18
+ for removal in a follow-up.
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 136.1.0
4
23
 
5
24
  ### Minor Changes
@@ -11,7 +11,6 @@ var _react2 = require("@emotion/react");
11
11
  var _reactIntl = require("react-intl");
12
12
  var _styles = require("@atlaskit/editor-common/styles");
13
13
  var _code = require("@atlaskit/code");
14
- var _messages = require("@atlaskit/editor-common/messages");
15
14
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
15
  var _codeBlockContainer = _interopRequireDefault(require("./components/codeBlockContainer"));
17
16
  /**
@@ -35,7 +34,6 @@ function CodeBlock(props) {
35
34
  hideLineNumbers = _props$hideLineNumber === void 0 ? false : _props$hideLineNumber,
36
35
  localId = props.localId,
37
36
  wrap = props.wrap;
38
- var codeBidiWarningLabel = props.intl.formatMessage(_messages.codeBidiWarningMessages.label);
39
37
  var className = [_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, props.className].join(' ');
40
38
  var _useState = (0, _react.useState)(function () {
41
39
  return (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap);
@@ -59,11 +57,10 @@ function CodeBlock(props) {
59
57
  testId: "renderer-code-block",
60
58
  language: language,
61
59
  text: text,
62
- codeBidiWarningLabel: codeBidiWarningLabel,
63
60
  codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
64
61
  shouldWrapLongLines: allowWrapCodeBlock && wrapLongLines,
65
62
  shouldShowLineNumbers: !((0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers),
66
- hasBidiWarnings: (0, _expValEquals.expValEquals)('platform_editor_remove_bidi_char_warning', 'isEnabled', true) ? false : undefined
63
+ hasBidiWarnings: false
67
64
  }));
68
65
  }
69
66
  var _default_1 = (0, _reactIntl.injectIntl)(CodeBlock);
@@ -12,7 +12,6 @@ var _react = _interopRequireWildcard(require("react"));
12
12
  var _react2 = require("@emotion/react");
13
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
14
  var _styles = require("@atlaskit/editor-common/styles");
15
- var _useBidiWarnings2 = require("../../../hooks/use-bidi-warnings");
16
15
  var _consts = require("../../../../consts");
17
16
  var _templateObject;
18
17
  /* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
@@ -146,18 +145,12 @@ var getLightWeightCodeBlockStylesForRootRendererStyleSheet = exports.getLightWei
146
145
  };
147
146
  var LightWeightCodeBlock = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
148
147
  var text = _ref.text,
149
- _ref$codeBidiWarningT = _ref.codeBidiWarningTooltipEnabled,
150
- codeBidiWarningTooltipEnabled = _ref$codeBidiWarningT === void 0 ? true : _ref$codeBidiWarningT,
151
148
  _ref$hideLineNumbers = _ref.hideLineNumbers,
152
149
  hideLineNumbers = _ref$hideLineNumbers === void 0 ? false : _ref$hideLineNumbers,
153
150
  className = _ref.className;
154
151
  var textRows = (0, _react.useMemo)(function () {
155
152
  return (text !== null && text !== void 0 ? text : '').split('\n');
156
153
  }, [text]);
157
- var _useBidiWarnings = (0, _useBidiWarnings2.useBidiWarnings)({
158
- enableWarningTooltip: codeBidiWarningTooltipEnabled
159
- }),
160
- renderBidiWarnings = _useBidiWarnings.renderBidiWarnings;
161
154
  var classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
162
155
  var codeBlockBackgroundImage = (0, _editorSharedStyles.overflowShadow)({
163
156
  leftCoverWidth: "var(--ds-space-300, 24px)"
@@ -190,6 +183,6 @@ var LightWeightCodeBlock = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
190
183
  );
191
184
  })), (0, _react2.jsx)("div", {
192
185
  className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
193
- }, (0, _react2.jsx)("code", null, renderBidiWarnings(text))))));
186
+ }, (0, _react2.jsx)("code", null, text)))));
194
187
  });
195
188
  var _default = exports.default = LightWeightCodeBlock;
@@ -14,7 +14,6 @@ var _react2 = require("@emotion/react");
14
14
  var _styles = require("@atlaskit/editor-common/styles");
15
15
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
16
  var _useInViewport2 = require("../../hooks/use-in-viewport");
17
- var _useBidiWarnings2 = require("../../hooks/use-bidi-warnings");
18
17
  var _lightWeightCodeBlock = _interopRequireDefault(require("./components/lightWeightCodeBlock"));
19
18
  var _codeBlockContainer = _interopRequireDefault(require("./components/codeBlockContainer"));
20
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } /**
@@ -58,10 +57,6 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
58
57
  hideLineNumbers = _ref2$hideLineNumbers === void 0 ? false : _ref2$hideLineNumbers,
59
58
  rootClassName = _ref2.className,
60
59
  wrap = _ref2.wrap;
61
- var _useBidiWarnings = (0, _useBidiWarnings2.useBidiWarnings)({
62
- enableWarningTooltip: codeBidiWarningTooltipEnabled
63
- }),
64
- warningLabel = _useBidiWarnings.warningLabel;
65
60
  var _useInViewport = (0, _useInViewport2.useInViewport)(),
66
61
  isInViewport = _useInViewport.isInViewport,
67
62
  trackingRef = _useInViewport.trackingRef;
@@ -69,7 +64,6 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
69
64
  var memoizedLightWeightCodeBlock = (0, _react2.jsx)(MemoizedLightWeightCodeBlock, {
70
65
  ref: trackingRef,
71
66
  text: text,
72
- codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
73
67
  hideLineNumbers: (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers
74
68
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
75
69
  ,
@@ -97,11 +91,10 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
97
91
  }, (0, _react2.jsx)(LazyAkCodeBlock, {
98
92
  language: language,
99
93
  text: text,
100
- codeBidiWarningLabel: warningLabel,
101
94
  codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
102
95
  shouldWrapLongLines: allowWrapCodeBlock && wrapLongLines,
103
96
  shouldShowLineNumbers: !((0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers),
104
- hasBidiWarnings: (0, _expValEquals.expValEquals)('platform_editor_remove_bidi_char_warning', 'isEnabled', true) ? false : undefined
97
+ hasBidiWarnings: false
105
98
  })))) : memoizedLightWeightCodeBlock;
106
99
  };
107
100
  var _default = exports.default = WindowedCodeBlock;
@@ -73,7 +73,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
73
73
  var TABLE_INFO_TIMEOUT = 10000;
74
74
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
75
75
  var packageName = "@atlaskit/renderer";
76
- var packageVersion = "136.0.7";
76
+ var packageVersion = "136.1.0";
77
77
  var setAsQueryContainerStyles = (0, _react2.css)({
78
78
  containerName: 'ak-renderer-wrapper',
79
79
  containerType: 'inline-size'
@@ -8,7 +8,6 @@ import { jsx } from '@emotion/react';
8
8
  import { injectIntl } from 'react-intl';
9
9
  import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
10
10
  import { CodeBlock as AkCodeBlock } from '@atlaskit/code';
11
- import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
12
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import CodeBlockContainer from './components/codeBlockContainer';
14
13
  function CodeBlock(props) {
@@ -23,7 +22,6 @@ function CodeBlock(props) {
23
22
  localId,
24
23
  wrap
25
24
  } = props;
26
- const codeBidiWarningLabel = props.intl.formatMessage(codeBidiWarningMessages.label);
27
25
  const className = [CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, props.className].join(' ');
28
26
  const [wrapLongLines, setWrapLongLines] = useState(() => expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap));
29
27
  return jsx(CodeBlockContainer, {
@@ -42,11 +40,10 @@ function CodeBlock(props) {
42
40
  testId: "renderer-code-block",
43
41
  language: language,
44
42
  text: text,
45
- codeBidiWarningLabel: codeBidiWarningLabel,
46
43
  codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
47
44
  shouldWrapLongLines: allowWrapCodeBlock && wrapLongLines,
48
45
  shouldShowLineNumbers: !(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers),
49
- hasBidiWarnings: expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true) ? false : undefined
46
+ hasBidiWarnings: false
50
47
  }));
51
48
  }
52
49
  const _default_1 = injectIntl(CodeBlock);
@@ -10,7 +10,6 @@ import React, { forwardRef, useMemo } from 'react';
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow } from '@atlaskit/editor-shared-styles';
12
12
  import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
13
- import { useBidiWarnings } from '../../../hooks/use-bidi-warnings';
14
13
  import { RendererCssClassName } from '../../../../consts';
15
14
  const codeBlockSharedStyles = css({
16
15
  [`.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED}
@@ -175,16 +174,10 @@ export const getLightWeightCodeBlockStylesForRootRendererStyleSheet = () => {
175
174
  };
176
175
  const LightWeightCodeBlock = /*#__PURE__*/forwardRef(({
177
176
  text,
178
- codeBidiWarningTooltipEnabled = true,
179
177
  hideLineNumbers = false,
180
178
  className
181
179
  }, ref) => {
182
180
  const textRows = useMemo(() => (text !== null && text !== void 0 ? text : '').split('\n'), [text]);
183
- const {
184
- renderBidiWarnings
185
- } = useBidiWarnings({
186
- enableWarningTooltip: codeBidiWarningTooltipEnabled
187
- });
188
181
  const classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
189
182
  const codeBlockBackgroundImage = overflowShadow({
190
183
  leftCoverWidth: "var(--ds-space-300, 24px)"
@@ -214,6 +207,6 @@ const LightWeightCodeBlock = /*#__PURE__*/forwardRef(({
214
207
  key: index
215
208
  }))), jsx("div", {
216
209
  className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
217
- }, jsx("code", null, renderBidiWarnings(text))))));
210
+ }, jsx("code", null, text)))));
218
211
  });
219
212
  export default LightWeightCodeBlock;
@@ -8,7 +8,6 @@ import { jsx } from '@emotion/react';
8
8
  import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
9
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
10
  import { useInViewport } from '../../hooks/use-in-viewport';
11
- import { useBidiWarnings } from '../../hooks/use-bidi-warnings';
12
11
  import LightWeightCodeBlock from './components/lightWeightCodeBlock';
13
12
  import CodeBlockContainer from './components/codeBlockContainer';
14
13
  const LazyAkCodeBlock = /*#__PURE__*/lazy(
@@ -29,11 +28,6 @@ const WindowedCodeBlock = ({
29
28
  className: rootClassName,
30
29
  wrap
31
30
  }) => {
32
- const {
33
- warningLabel
34
- } = useBidiWarnings({
35
- enableWarningTooltip: codeBidiWarningTooltipEnabled
36
- });
37
31
  const {
38
32
  isInViewport,
39
33
  trackingRef
@@ -42,7 +36,6 @@ const WindowedCodeBlock = ({
42
36
  const memoizedLightWeightCodeBlock = jsx(MemoizedLightWeightCodeBlock, {
43
37
  ref: trackingRef,
44
38
  text: text,
45
- codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
46
39
  hideLineNumbers: expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers
47
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
48
41
  ,
@@ -65,11 +58,10 @@ const WindowedCodeBlock = ({
65
58
  }, jsx(LazyAkCodeBlock, {
66
59
  language: language,
67
60
  text: text,
68
- codeBidiWarningLabel: warningLabel,
69
61
  codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
70
62
  shouldWrapLongLines: allowWrapCodeBlock && wrapLongLines,
71
63
  shouldShowLineNumbers: !(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers),
72
- hasBidiWarnings: expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true) ? false : undefined
64
+ hasBidiWarnings: false
73
65
  })))) : memoizedLightWeightCodeBlock;
74
66
  };
75
67
  export default WindowedCodeBlock;
@@ -59,7 +59,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
59
59
  const TABLE_INFO_TIMEOUT = 10000;
60
60
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
61
61
  const packageName = "@atlaskit/renderer";
62
- const packageVersion = "136.0.7";
62
+ const packageVersion = "136.1.0";
63
63
  const setAsQueryContainerStyles = css({
64
64
  containerName: 'ak-renderer-wrapper',
65
65
  containerType: 'inline-size'
@@ -9,7 +9,6 @@ import { jsx } from '@emotion/react';
9
9
  import { injectIntl } from 'react-intl';
10
10
  import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
11
11
  import { CodeBlock as AkCodeBlock } from '@atlaskit/code';
12
- import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
13
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
13
  import CodeBlockContainer from './components/codeBlockContainer';
15
14
  function CodeBlock(props) {
@@ -26,7 +25,6 @@ function CodeBlock(props) {
26
25
  hideLineNumbers = _props$hideLineNumber === void 0 ? false : _props$hideLineNumber,
27
26
  localId = props.localId,
28
27
  wrap = props.wrap;
29
- var codeBidiWarningLabel = props.intl.formatMessage(codeBidiWarningMessages.label);
30
28
  var className = [CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, props.className].join(' ');
31
29
  var _useState = useState(function () {
32
30
  return expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && Boolean(wrap);
@@ -50,11 +48,10 @@ function CodeBlock(props) {
50
48
  testId: "renderer-code-block",
51
49
  language: language,
52
50
  text: text,
53
- codeBidiWarningLabel: codeBidiWarningLabel,
54
51
  codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
55
52
  shouldWrapLongLines: allowWrapCodeBlock && wrapLongLines,
56
53
  shouldShowLineNumbers: !(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers),
57
- hasBidiWarnings: expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true) ? false : undefined
54
+ hasBidiWarnings: false
58
55
  }));
59
56
  }
60
57
  var _default_1 = injectIntl(CodeBlock);
@@ -13,7 +13,6 @@ import React, { forwardRef, useMemo } from 'react';
13
13
  import { css, jsx } from '@emotion/react';
14
14
  import { akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow } from '@atlaskit/editor-shared-styles';
15
15
  import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
16
- import { useBidiWarnings } from '../../../hooks/use-bidi-warnings';
17
16
  import { RendererCssClassName } from '../../../../consts';
18
17
  var codeBlockSharedStyles = css(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED, "\n\t\t> .").concat(CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "\n\t\t> .").concat(CodeBlockSharedCssClassName.CODEBLOCK_CONTENT), {
19
18
  marginRight: "var(--ds-space-100, 8px)",
@@ -137,18 +136,12 @@ export var getLightWeightCodeBlockStylesForRootRendererStyleSheet = function get
137
136
  };
138
137
  var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
139
138
  var text = _ref.text,
140
- _ref$codeBidiWarningT = _ref.codeBidiWarningTooltipEnabled,
141
- codeBidiWarningTooltipEnabled = _ref$codeBidiWarningT === void 0 ? true : _ref$codeBidiWarningT,
142
139
  _ref$hideLineNumbers = _ref.hideLineNumbers,
143
140
  hideLineNumbers = _ref$hideLineNumbers === void 0 ? false : _ref$hideLineNumbers,
144
141
  className = _ref.className;
145
142
  var textRows = useMemo(function () {
146
143
  return (text !== null && text !== void 0 ? text : '').split('\n');
147
144
  }, [text]);
148
- var _useBidiWarnings = useBidiWarnings({
149
- enableWarningTooltip: codeBidiWarningTooltipEnabled
150
- }),
151
- renderBidiWarnings = _useBidiWarnings.renderBidiWarnings;
152
145
  var classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
153
146
  var codeBlockBackgroundImage = overflowShadow({
154
147
  leftCoverWidth: "var(--ds-space-300, 24px)"
@@ -181,6 +174,6 @@ var LightWeightCodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
181
174
  );
182
175
  })), jsx("div", {
183
176
  className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
184
- }, jsx("code", null, renderBidiWarnings(text))))));
177
+ }, jsx("code", null, text)))));
185
178
  });
186
179
  export default LightWeightCodeBlock;
@@ -11,7 +11,6 @@ import { jsx } from '@emotion/react';
11
11
  import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
13
  import { useInViewport } from '../../hooks/use-in-viewport';
14
- import { useBidiWarnings } from '../../hooks/use-bidi-warnings';
15
14
  import LightWeightCodeBlock from './components/lightWeightCodeBlock';
16
15
  import CodeBlockContainer from './components/codeBlockContainer';
17
16
  var LazyAkCodeBlock = /*#__PURE__*/lazy(
@@ -49,10 +48,6 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
49
48
  hideLineNumbers = _ref2$hideLineNumbers === void 0 ? false : _ref2$hideLineNumbers,
50
49
  rootClassName = _ref2.className,
51
50
  wrap = _ref2.wrap;
52
- var _useBidiWarnings = useBidiWarnings({
53
- enableWarningTooltip: codeBidiWarningTooltipEnabled
54
- }),
55
- warningLabel = _useBidiWarnings.warningLabel;
56
51
  var _useInViewport = useInViewport(),
57
52
  isInViewport = _useInViewport.isInViewport,
58
53
  trackingRef = _useInViewport.trackingRef;
@@ -60,7 +55,6 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
60
55
  var memoizedLightWeightCodeBlock = jsx(MemoizedLightWeightCodeBlock, {
61
56
  ref: trackingRef,
62
57
  text: text,
63
- codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
64
58
  hideLineNumbers: expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers
65
59
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
66
60
  ,
@@ -88,11 +82,10 @@ var WindowedCodeBlock = function WindowedCodeBlock(_ref2) {
88
82
  }, jsx(LazyAkCodeBlock, {
89
83
  language: language,
90
84
  text: text,
91
- codeBidiWarningLabel: warningLabel,
92
85
  codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled,
93
86
  shouldWrapLongLines: allowWrapCodeBlock && wrapLongLines,
94
87
  shouldShowLineNumbers: !(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && hideLineNumbers),
95
- hasBidiWarnings: expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true) ? false : undefined
88
+ hasBidiWarnings: false
96
89
  })))) : memoizedLightWeightCodeBlock;
97
90
  };
98
91
  export default WindowedCodeBlock;
@@ -64,7 +64,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
64
64
  var TABLE_INFO_TIMEOUT = 10000;
65
65
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
66
66
  var packageName = "@atlaskit/renderer";
67
- var packageVersion = "136.0.7";
67
+ var packageVersion = "136.1.0";
68
68
  var setAsQueryContainerStyles = css({
69
69
  containerName: 'ak-renderer-wrapper',
70
70
  containerType: 'inline-size'
@@ -13,5 +13,5 @@ export declare const LightWeightCodeBlockCssClassName: {
13
13
  * @deprecated styles are moved to RendererStyleContainer
14
14
  */
15
15
  export declare const getLightWeightCodeBlockStylesForRootRendererStyleSheet: () => SerializedStyles;
16
- declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, 'text' | 'className' | 'codeBidiWarningTooltipEnabled' | 'hideLineNumbers'> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, 'text' | 'className' | 'hideLineNumbers'> & React.RefAttributes<HTMLDivElement>>;
17
17
  export default LightWeightCodeBlock;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "136.1.0",
3
+ "version": "136.1.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/editor-smart-link-draggable": "^1.2.0",
48
48
  "@atlaskit/emoji": "^72.0.0",
49
49
  "@atlaskit/feature-gate-js-client": "^6.0.0",
50
- "@atlaskit/icon": "^37.3.0",
50
+ "@atlaskit/icon": "^37.4.0",
51
51
  "@atlaskit/link": "^5.0.0",
52
52
  "@atlaskit/link-datasource": "^6.4.0",
53
53
  "@atlaskit/link-extractors": "^4.0.0",
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/status": "^5.8.0",
70
70
  "@atlaskit/task-decision": "^21.8.0",
71
71
  "@atlaskit/theme": "^28.0.0",
72
- "@atlaskit/tmp-editor-statsig": "^150.0.0",
72
+ "@atlaskit/tmp-editor-statsig": "^151.0.0",
73
73
  "@atlaskit/tokens": "^16.7.0",
74
74
  "@atlaskit/tooltip": "^24.0.0",
75
75
  "@atlaskit/visually-hidden": "^4.2.0",
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.useBidiWarnings = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _reactIntl = require("react-intl");
10
- var _bidiWarning = _interopRequireDefault(require("@atlaskit/code/bidi-warning"));
11
- var _messages = require("@atlaskit/editor-common/messages");
12
- var _bidiWarningDecorator = _interopRequireDefault(require("@atlaskit/code/bidi-warning-decorator"));
13
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
- var useBidiWarnings = exports.useBidiWarnings = function useBidiWarnings(_ref) {
15
- var _ref$enableWarningToo = _ref.enableWarningTooltip,
16
- enableWarningTooltip = _ref$enableWarningToo === void 0 ? true : _ref$enableWarningToo;
17
- var intl = (0, _reactIntl.useIntl)();
18
- var warningLabel = intl.formatMessage(_messages.codeBidiWarningMessages.label);
19
- var renderBidiWarnings = function renderBidiWarnings(text) {
20
- if ((0, _expValEquals.expValEquals)('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
21
- return text;
22
- }
23
- return (0, _bidiWarningDecorator.default)(text, function (_ref2) {
24
- var bidiCharacter = _ref2.bidiCharacter,
25
- index = _ref2.index;
26
- return /*#__PURE__*/_react.default.createElement(_bidiWarning.default, {
27
- bidiCharacter: bidiCharacter,
28
- key: index,
29
- label: warningLabel,
30
- tooltipEnabled: enableWarningTooltip
31
- });
32
- });
33
- };
34
- return {
35
- renderBidiWarnings: renderBidiWarnings,
36
- warningLabel: warningLabel
37
- };
38
- };
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { useIntl } from 'react-intl';
3
- import CodeBidiWarning from '@atlaskit/code/bidi-warning';
4
- import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
5
- import codeBidiWarningDecorator from '@atlaskit/code/bidi-warning-decorator';
6
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
- export const useBidiWarnings = ({
8
- enableWarningTooltip = true
9
- }) => {
10
- const intl = useIntl();
11
- const warningLabel = intl.formatMessage(codeBidiWarningMessages.label);
12
- const renderBidiWarnings = text => {
13
- if (expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
14
- return text;
15
- }
16
- return codeBidiWarningDecorator(text, ({
17
- bidiCharacter,
18
- index
19
- }) => /*#__PURE__*/React.createElement(CodeBidiWarning, {
20
- bidiCharacter: bidiCharacter,
21
- key: index,
22
- label: warningLabel,
23
- tooltipEnabled: enableWarningTooltip
24
- }));
25
- };
26
- return {
27
- renderBidiWarnings,
28
- warningLabel
29
- };
30
- };
@@ -1,31 +0,0 @@
1
- import React from 'react';
2
- import { useIntl } from 'react-intl';
3
- import CodeBidiWarning from '@atlaskit/code/bidi-warning';
4
- import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
5
- import codeBidiWarningDecorator from '@atlaskit/code/bidi-warning-decorator';
6
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
- export var useBidiWarnings = function useBidiWarnings(_ref) {
8
- var _ref$enableWarningToo = _ref.enableWarningTooltip,
9
- enableWarningTooltip = _ref$enableWarningToo === void 0 ? true : _ref$enableWarningToo;
10
- var intl = useIntl();
11
- var warningLabel = intl.formatMessage(codeBidiWarningMessages.label);
12
- var renderBidiWarnings = function renderBidiWarnings(text) {
13
- if (expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
14
- return text;
15
- }
16
- return codeBidiWarningDecorator(text, function (_ref2) {
17
- var bidiCharacter = _ref2.bidiCharacter,
18
- index = _ref2.index;
19
- return /*#__PURE__*/React.createElement(CodeBidiWarning, {
20
- bidiCharacter: bidiCharacter,
21
- key: index,
22
- label: warningLabel,
23
- tooltipEnabled: enableWarningTooltip
24
- });
25
- });
26
- };
27
- return {
28
- renderBidiWarnings: renderBidiWarnings,
29
- warningLabel: warningLabel
30
- };
31
- };
@@ -1,10 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- interface Config {
3
- enableWarningTooltip: boolean;
4
- }
5
- interface Result {
6
- renderBidiWarnings: (text: string) => ReactNode;
7
- warningLabel: string;
8
- }
9
- export declare const useBidiWarnings: ({ enableWarningTooltip }: Config) => Result;
10
- export {};