@atlaskit/editor-plugin-text-formatting 15.0.13 → 15.0.15

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/editor-plugin-text-formatting
2
2
 
3
+ ## 15.0.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 15.0.14
10
+
11
+ ### Patch Changes
12
+
13
+ - [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
14
+ VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
15
+ voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
16
+ changes.
17
+ - Updated dependencies
18
+
3
19
  ## 15.0.13
4
20
 
5
21
  ### Patch Changes
@@ -7,7 +7,7 @@ exports.nextToggleMark = exports.nextApplyMarkOnRange = void 0;
7
7
  var _mark = require("@atlaskit/editor-common/mark");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
11
11
  /**
12
12
  * A custom version of the ProseMirror toggleMark, where we only toggle marks
13
13
  * on text nodes in the selection rather than all inline nodes.
@@ -84,7 +84,7 @@ var nextApplyMarkOnRange = exports.nextApplyMarkOnRange = function nextApplyMark
84
84
  * We should refactor this so text formatting doesn't reference plugins it doesn't know about.
85
85
  */
86
86
  tr.doc.nodesBetween(tr.mapping.map(from), tr.mapping.map(to), function (node, pos) {
87
- if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
87
+ if ((0, _fg.fg)('editor_inline_comments_on_inline_nodes')) {
88
88
  if (!node.isText) {
89
89
  var isAllowedInlineNode = ['emoji', 'status', 'date', 'mention', 'inlineCard'].includes(node.type.name);
90
90
  if (!isAllowedInlineNode) {
@@ -8,7 +8,7 @@ exports.textFormattingPlugin = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _adfSchema = require("@atlaskit/adf-schema");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
12
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
13
  var _toggleMark = require("./editor-commands/toggle-mark");
14
14
  var _clearFormatting = require("./pm-plugins/clear-formatting");
@@ -148,7 +148,7 @@ var textFormattingPlugin = exports.textFormattingPlugin = function textFormattin
148
148
  pluginsOptions: isToolbarAIFCEnabled ? {} : {
149
149
  selectionToolbar: function selectionToolbar() {
150
150
  var _api$userPreferences, _api$selectionToolbar;
151
- var toolbarDocking = (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.preferences) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.toolbarDockingPosition : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
151
+ var toolbarDocking = (0, _fg.fg)('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.preferences) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.toolbarDockingPosition : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
152
152
  if (toolbarDocking === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
153
153
  exposure: true
154
154
  })) {
@@ -13,7 +13,7 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
13
13
  var _messages = require("@atlaskit/editor-common/messages");
14
14
  var _toolbar = require("@atlaskit/editor-common/toolbar");
15
15
  var _editorToolbar = require("@atlaskit/editor-toolbar");
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
17
17
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
18
18
  var _toggleMark = require("../../../editor-commands/toggle-mark");
19
19
  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; }
@@ -64,7 +64,7 @@ var useComponentInfo = exports.useComponentInfo = function useComponentInfo(_ref
64
64
  shortcut = _ref.shortcut,
65
65
  toggleMarkWithAnalyticsCallback = _ref.toggleMarkWithAnalyticsCallback,
66
66
  parents = _ref.parents;
67
- var isMarkdownBridgeEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_markdown_compatible_toolbar');
67
+ var isMarkdownBridgeEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true) && (0, _fg.fg)('platform_editor_markdown_compatible_toolbar');
68
68
  var pluginStateKeys = isMarkdownBridgeEnabled ? TEXT_FORMATTING_MARKDOWN_PLUGIN_STATE_KEYS : TEXT_FORMATTING_PLUGIN_STATE_KEYS;
69
69
  var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, pluginStateKeys, function (states) {
70
70
  var _states$textFormattin, _states$textFormattin2, _states$textFormattin3, _states$textFormattin4, _states$markdownModeS, _states$markdownModeS2;
@@ -1,7 +1,7 @@
1
1
  import { entireSelectionContainsMark } from '@atlaskit/editor-common/mark';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
- import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
5
5
  /**
6
6
  * A custom version of the ProseMirror toggleMark, where we only toggle marks
7
7
  * on text nodes in the selection rather than all inline nodes.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { code, em, strike, strong, subsup, underline } from '@atlaskit/adf-schema';
3
- import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
4
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
5
  import { toggleCodeWithAnalytics, toggleEmWithAnalytics, toggleStrikeWithAnalytics, toggleStrongWithAnalytics, toggleSubscriptWithAnalytics, toggleSuperscriptWithAnalytics, toggleUnderlineWithAnalytics } from './editor-commands/toggle-mark';
6
6
  import { plugin as clearFormattingPlugin, pluginKey as clearFormattingPluginKey } from './pm-plugins/clear-formatting';
@@ -7,7 +7,7 @@ import { BOLD_MENU_ITEM, CODE_MENU_ITEM, ITALIC_MENU_ITEM, STRIKE_MENU_ITEM, SUB
7
7
  // oxlint-disable-next-line import/no-duplicates
8
8
 
9
9
  import { BoldIcon, ItalicIcon, UnderlineIcon, CodeIcon, StrikeThroughIcon, SubscriptIcon, SuperscriptIcon } from '@atlaskit/editor-toolbar';
10
- import { fg } from '@atlaskit/platform-feature-flags';
10
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
11
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
12
12
  import { toggleStrongWithAnalytics, toggleEmWithAnalytics, toggleUnderlineWithAnalytics, toggleCodeWithAnalytics, toggleStrikeWithAnalytics, toggleSubscriptWithAnalytics, toggleSuperscriptWithAnalytics } from '../../../editor-commands/toggle-mark';
13
13
 
@@ -1,7 +1,7 @@
1
1
  import { entireSelectionContainsMark } from '@atlaskit/editor-common/mark';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
4
- import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
5
5
  /**
6
6
  * A custom version of the ProseMirror toggleMark, where we only toggle marks
7
7
  * on text nodes in the selection rather than all inline nodes.
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
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 React from 'react';
5
5
  import { code, em, strike, strong, subsup, underline } from '@atlaskit/adf-schema';
6
- import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
8
  import { toggleCodeWithAnalytics, toggleEmWithAnalytics, toggleStrikeWithAnalytics, toggleStrongWithAnalytics, toggleSubscriptWithAnalytics, toggleSuperscriptWithAnalytics, toggleUnderlineWithAnalytics } from './editor-commands/toggle-mark';
9
9
  import { plugin as clearFormattingPlugin, pluginKey as clearFormattingPluginKey } from './pm-plugins/clear-formatting';
@@ -10,7 +10,7 @@ import { BOLD_MENU_ITEM, CODE_MENU_ITEM, ITALIC_MENU_ITEM, STRIKE_MENU_ITEM, SUB
10
10
  // oxlint-disable-next-line import/no-duplicates
11
11
 
12
12
  import { BoldIcon, ItalicIcon, UnderlineIcon, CodeIcon, StrikeThroughIcon, SubscriptIcon, SuperscriptIcon } from '@atlaskit/editor-toolbar';
13
- import { fg } from '@atlaskit/platform-feature-flags';
13
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
14
14
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
15
15
  import { toggleStrongWithAnalytics, toggleEmWithAnalytics, toggleUnderlineWithAnalytics, toggleCodeWithAnalytics, toggleStrikeWithAnalytics, toggleSubscriptWithAnalytics, toggleSuperscriptWithAnalytics } from '../../../editor-commands/toggle-mark';
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-formatting",
3
- "version": "15.0.13",
3
+ "version": "15.0.15",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/icon": "^37.5.0",
39
39
  "@atlaskit/platform-feature-flags": "^2.1.0",
40
40
  "@atlaskit/prosemirror-input-rules": "^4.0.0",
41
- "@atlaskit/tmp-editor-statsig": "^159.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^160.0.0",
42
42
  "@atlaskit/tokens": "^16.8.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1"