@atlaskit/editor-plugin-code-bidi-warning 15.0.3 → 15.0.5

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,34 @@
1
1
  # @atlaskit/editor-plugin-code-bidi-warning
2
2
 
3
+ ## 15.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
8
+ VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
9
+ voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
10
+ changes.
11
+ - Updated dependencies
12
+
13
+ ## 15.0.4
14
+
15
+ ### Patch Changes
16
+
17
+ - [`1eb42bae392d7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1eb42bae392d7) -
18
+ Clean up experiment `platform_editor_remove_bidi_char_warning`. Bidirectional character warnings
19
+ are no longer rendered in code blocks: `codeBidiWarningPlugin` is no longer registered by any
20
+ preset, and the renderer passes `hasBidiWarnings={false}` to `@atlaskit/code` code blocks. Bidi
21
+ warnings on inline `code` marks are unaffected.
22
+
23
+ `codeBidiWarning` has been removed from the plugin lists and plugin options of the Confluence
24
+ full-page, Confluence markdown, and Company Hub presets, so consumers no longer need to pass
25
+ `pluginOptions.codeBidiWarning` or `enabledOptionalPlugins.codeBidiWarning`.
26
+
27
+ `@atlaskit/editor-plugin-code-bidi-warning` is retained but now has no consumers; it is scheduled
28
+ for removal in a follow-up.
29
+
30
+ - Updated dependencies
31
+
3
32
  ## 15.0.3
4
33
 
5
34
  ### Patch Changes
@@ -7,7 +7,6 @@ exports.createPlugin = void 0;
7
7
  var _messages = require("@atlaskit/editor-common/messages");
8
8
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
9
9
  var _view = require("@atlaskit/editor-prosemirror/view");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
10
  var _pluginKey = require("./plugin-key");
12
11
  var _reactPluginFactory = require("./react-plugin-factory");
13
12
  var createPlugin = exports.createPlugin = function createPlugin(api, _ref, _ref2) {
@@ -24,13 +23,6 @@ var createPlugin = exports.createPlugin = function createPlugin(api, _ref, _ref2
24
23
  key: _pluginKey.codeBidiWarningPluginKey,
25
24
  state: createPluginState(dispatch, function (state) {
26
25
  var _api$limitedMode;
27
- if ((0, _expValEquals.expValEquals)('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
28
- return {
29
- decorationSet: _view.DecorationSet.empty,
30
- codeBidiWarningLabel: '',
31
- tooltipEnabled: false
32
- };
33
- }
34
26
  if (api !== null && api !== void 0 && (_api$limitedMode = api.limitedMode) !== null && _api$limitedMode !== void 0 && (_api$limitedMode = _api$limitedMode.sharedState.currentState()) !== null && _api$limitedMode !== void 0 && _api$limitedMode.enabled) {
35
27
  return {
36
28
  decorationSet: _view.DecorationSet.empty,
@@ -51,9 +43,6 @@ var createPlugin = exports.createPlugin = function createPlugin(api, _ref, _ref2
51
43
  }),
52
44
  props: {
53
45
  decorations: function decorations(state) {
54
- if ((0, _expValEquals.expValEquals)('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
55
- return _view.DecorationSet.empty;
56
- }
57
46
  var _getPluginState = getPluginState(state),
58
47
  decorationSet = _getPluginState.decorationSet;
59
48
  return decorationSet;
@@ -9,8 +9,8 @@ exports.pluginFactoryCreator = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _v = _interopRequireDefault(require("uuid/v4"));
12
- var _bidiWarning = _interopRequireDefault(require("@atlaskit/code/bidi-warning"));
13
- var _bidiWarningDecorator = _interopRequireDefault(require("@atlaskit/code/bidi-warning-decorator"));
12
+ var _bidiWarningUi = _interopRequireDefault(require("@atlaskit/code/bidi-warning-ui"));
13
+ var _bidiWarningDecorator = _interopRequireDefault(require("@atlaskit/code/bidi-warning/bidi-warning-decorator"));
14
14
  var _utils = require("@atlaskit/editor-common/utils");
15
15
  var _view = require("@atlaskit/editor-prosemirror/view");
16
16
  var _pluginKey = require("./plugin-key");
@@ -118,7 +118,7 @@ function renderDOM(_ref5) {
118
118
  renderKey = _ref5.renderKey;
119
119
  var element = document.createElement('span');
120
120
  nodeViewPortalProviderAPI.render(function () {
121
- return /*#__PURE__*/_react.default.createElement(_bidiWarning.default, {
121
+ return /*#__PURE__*/_react.default.createElement(_bidiWarningUi.default, {
122
122
  bidiCharacter: bidiCharacter,
123
123
  skipChildren: true,
124
124
  label: codeBidiWarningLabel,
@@ -1,7 +1,6 @@
1
1
  import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { codeBidiWarningPluginKey } from './plugin-key';
6
5
  import { createBidiWarningsDecorationSetFromDoc as reactCreateBidiWarningsDecorationSetFromDoc, pluginFactoryCreator as reactPluginFactoryCreator } from './react-plugin-factory';
7
6
  export const createPlugin = (api, {
@@ -21,13 +20,6 @@ export const createPlugin = (api, {
21
20
  key: codeBidiWarningPluginKey,
22
21
  state: createPluginState(dispatch, state => {
23
22
  var _api$limitedMode, _api$limitedMode$shar;
24
- if (expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
25
- return {
26
- decorationSet: DecorationSet.empty,
27
- codeBidiWarningLabel: '',
28
- tooltipEnabled: false
29
- };
30
- }
31
23
  if (api !== null && api !== void 0 && (_api$limitedMode = api.limitedMode) !== null && _api$limitedMode !== void 0 && (_api$limitedMode$shar = _api$limitedMode.sharedState.currentState()) !== null && _api$limitedMode$shar !== void 0 && _api$limitedMode$shar.enabled) {
32
24
  return {
33
25
  decorationSet: DecorationSet.empty,
@@ -48,9 +40,6 @@ export const createPlugin = (api, {
48
40
  }),
49
41
  props: {
50
42
  decorations: state => {
51
- if (expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
52
- return DecorationSet.empty;
53
- }
54
43
  const {
55
44
  decorationSet
56
45
  } = getPluginState(state);
@@ -2,8 +2,8 @@ import React from 'react';
2
2
 
3
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
4
  import uuid from 'uuid/v4';
5
- import CodeBidiWarning from '@atlaskit/code/bidi-warning';
6
- import codeBidiWarningDecorator from '@atlaskit/code/bidi-warning-decorator';
5
+ import CodeBidiWarning from '@atlaskit/code/bidi-warning-ui';
6
+ import codeBidiWarningDecorator from '@atlaskit/code/bidi-warning/bidi-warning-decorator';
7
7
  import { pluginFactory, stepHasSlice } from '@atlaskit/editor-common/utils';
8
8
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
9
9
  import { codeBidiWarningPluginKey } from './plugin-key';
@@ -1,7 +1,6 @@
1
1
  import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { codeBidiWarningPluginKey } from './plugin-key';
6
5
  import { createBidiWarningsDecorationSetFromDoc as reactCreateBidiWarningsDecorationSetFromDoc, pluginFactoryCreator as reactPluginFactoryCreator } from './react-plugin-factory';
7
6
  export var createPlugin = function createPlugin(api, _ref, _ref2) {
@@ -18,13 +17,6 @@ export var createPlugin = function createPlugin(api, _ref, _ref2) {
18
17
  key: codeBidiWarningPluginKey,
19
18
  state: createPluginState(dispatch, function (state) {
20
19
  var _api$limitedMode;
21
- if (expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
22
- return {
23
- decorationSet: DecorationSet.empty,
24
- codeBidiWarningLabel: '',
25
- tooltipEnabled: false
26
- };
27
- }
28
20
  if (api !== null && api !== void 0 && (_api$limitedMode = api.limitedMode) !== null && _api$limitedMode !== void 0 && (_api$limitedMode = _api$limitedMode.sharedState.currentState()) !== null && _api$limitedMode !== void 0 && _api$limitedMode.enabled) {
29
21
  return {
30
22
  decorationSet: DecorationSet.empty,
@@ -45,9 +37,6 @@ export var createPlugin = function createPlugin(api, _ref, _ref2) {
45
37
  }),
46
38
  props: {
47
39
  decorations: function decorations(state) {
48
- if (expValEquals('platform_editor_remove_bidi_char_warning', 'isEnabled', true)) {
49
- return DecorationSet.empty;
50
- }
51
40
  var _getPluginState = getPluginState(state),
52
41
  decorationSet = _getPluginState.decorationSet;
53
42
  return decorationSet;
@@ -5,8 +5,8 @@ import React from 'react';
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
7
7
  import uuid from 'uuid/v4';
8
- import CodeBidiWarning from '@atlaskit/code/bidi-warning';
9
- import codeBidiWarningDecorator from '@atlaskit/code/bidi-warning-decorator';
8
+ import CodeBidiWarning from '@atlaskit/code/bidi-warning-ui';
9
+ import codeBidiWarningDecorator from '@atlaskit/code/bidi-warning/bidi-warning-decorator';
10
10
  import { pluginFactory, stepHasSlice } from '@atlaskit/editor-common/utils';
11
11
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
12
12
  import { codeBidiWarningPluginKey } from './plugin-key';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-code-bidi-warning",
3
- "version": "15.0.3",
3
+ "version": "15.0.5",
4
4
  "description": "Code bidi warning plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -19,16 +19,15 @@
19
19
  "sideEffects": false,
20
20
  "atlaskit:src": "src/index.ts",
21
21
  "dependencies": {
22
- "@atlaskit/code": "^19.0.0",
22
+ "@atlaskit/code": "^19.1.0",
23
23
  "@atlaskit/editor-plugin-limited-mode": "^12.0.0",
24
24
  "@atlaskit/editor-prosemirror": "^8.0.0",
25
25
  "@atlaskit/platform-feature-flags": "^2.1.0",
26
- "@atlaskit/tmp-editor-statsig": "^150.0.0",
27
26
  "@babel/runtime": "^7.0.0",
28
27
  "uuid": "^3.1.0"
29
28
  },
30
29
  "peerDependencies": {
31
- "@atlaskit/editor-common": "^119.9.0",
30
+ "@atlaskit/editor-common": "^119.16.0",
32
31
  "react": "^18.2.0 || ^19.2.0",
33
32
  "react-dom": "^18.2.0 || ^19.2.0"
34
33
  },