@atlaskit/editor-plugin-text-formatting 15.0.13 → 15.0.14
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 +10 -0
- package/dist/cjs/editor-commands/utils/marks.js +2 -2
- package/dist/cjs/textFormattingPlugin.js +2 -2
- package/dist/cjs/ui/Toolbar/components/utils.js +2 -2
- package/dist/es2019/editor-commands/utils/marks.js +1 -1
- package/dist/es2019/textFormattingPlugin.js +1 -1
- package/dist/es2019/ui/Toolbar/components/utils.js +1 -1
- package/dist/esm/editor-commands/utils/marks.js +1 -1
- package/dist/esm/textFormattingPlugin.js +1 -1
- package/dist/esm/ui/Toolbar/components/utils.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-formatting
|
|
2
2
|
|
|
3
|
+
## 15.0.14
|
|
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
|
+
|
|
3
13
|
## 15.0.13
|
|
4
14
|
|
|
5
15
|
### 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
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|