@atlaskit/editor-plugin-text-formatting 16.0.7 → 16.1.0
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 +17 -0
- package/dist/cjs/pm-plugins/keymap.js +2 -2
- package/dist/cjs/pm-plugins/main.js +2 -2
- package/dist/cjs/textFormattingPlugin.js +2 -2
- package/dist/cjs/ui/FloatingToolbarComponent.js +3 -3
- package/dist/cjs/ui/Toolbar/dropdown-menu.js +3 -3
- package/dist/cjs/ui/Toolbar/hooks/clear-formatting-icon.js +2 -2
- package/dist/cjs/ui/Toolbar/hooks/formatting-icons.js +2 -2
- package/dist/cjs/ui/Toolbar/index.js +4 -4
- package/dist/es2019/pm-plugins/keymap.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/textFormattingPlugin.js +1 -1
- package/dist/es2019/ui/FloatingToolbarComponent.js +2 -2
- package/dist/es2019/ui/Toolbar/dropdown-menu.js +1 -1
- package/dist/es2019/ui/Toolbar/hooks/clear-formatting-icon.js +1 -1
- package/dist/es2019/ui/Toolbar/hooks/formatting-icons.js +1 -1
- package/dist/es2019/ui/Toolbar/index.js +1 -1
- package/dist/esm/pm-plugins/keymap.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/textFormattingPlugin.js +1 -1
- package/dist/esm/ui/FloatingToolbarComponent.js +2 -2
- package/dist/esm/ui/Toolbar/dropdown-menu.js +1 -1
- package/dist/esm/ui/Toolbar/hooks/clear-formatting-icon.js +1 -1
- package/dist/esm/ui/Toolbar/hooks/formatting-icons.js +1 -1
- package/dist/esm/ui/Toolbar/index.js +1 -1
- package/package.json +12 -12
- package/report.api.md +0 -67
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-formatting
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) -
|
|
8
|
+
Remove stale API report artifacts from published Platform packages.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 16.0.8
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 16.0.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -8,7 +8,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
8
8
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
9
9
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
10
10
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
11
|
-
var
|
|
11
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
12
12
|
var _toggleMark = require("../editor-commands/toggle-mark");
|
|
13
13
|
var _pluginKey = require("./plugin-key");
|
|
14
14
|
function keymapPlugin(schema, editorAnalyticsAPI) {
|
|
@@ -92,7 +92,7 @@ function keymapPlugin(schema, editorAnalyticsAPI) {
|
|
|
92
92
|
props: {
|
|
93
93
|
handleKeyDown: function handleKeyDown(view, event) {
|
|
94
94
|
var keyboardEvent = (0, _keymaps.isCapsLockOnAndModifyKeyboardEvent)(event);
|
|
95
|
-
var keymapList = (0,
|
|
95
|
+
var keymapList = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? getEnabledKeylist(view) : list;
|
|
96
96
|
return (0, _keymap.keydownHandler)(keymapList)(view, keyboardEvent);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -15,7 +15,7 @@ var _commands = require("@atlaskit/editor-prosemirror/commands");
|
|
|
15
15
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
16
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
|
-
var
|
|
18
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
19
19
|
var _textFormatting = _interopRequireWildcard(require("../editor-commands/text-formatting"));
|
|
20
20
|
var commands = _textFormatting;
|
|
21
21
|
var _pluginKey = require("./plugin-key");
|
|
@@ -154,7 +154,7 @@ var plugin = exports.plugin = function plugin(dispatch, editorAnalyticsAPI) {
|
|
|
154
154
|
return commands.moveRight()(state, dispatch);
|
|
155
155
|
} else if (event.key === _keymaps.moveLeft.common && !event.metaKey) {
|
|
156
156
|
return commands.moveLeft()(state, dispatch);
|
|
157
|
-
} else if (event.key === 'u' && event.metaKey && (_pluginKey$getState = _pluginKey.pluginKey.getState(state)) !== null && _pluginKey$getState !== void 0 && _pluginKey$getState.underlineDisabled && (0,
|
|
157
|
+
} else if (event.key === 'u' && event.metaKey && (_pluginKey$getState = _pluginKey.pluginKey.getState(state)) !== null && _pluginKey$getState !== void 0 && _pluginKey$getState.underlineDisabled && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
158
158
|
// This is a workaround for browser behaviour with cmd+u (in Chrome only) where the underline mark being applied around the selection
|
|
159
159
|
event.preventDefault();
|
|
160
160
|
}
|
|
@@ -9,7 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
11
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
|
-
var
|
|
12
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
13
13
|
var _toggleMark = require("./editor-commands/toggle-mark");
|
|
14
14
|
var _clearFormatting = require("./pm-plugins/clear-formatting");
|
|
15
15
|
var _clearFormattingKeymap = _interopRequireDefault(require("./pm-plugins/clear-formatting-keymap"));
|
|
@@ -149,7 +149,7 @@ var textFormattingPlugin = exports.textFormattingPlugin = function textFormattin
|
|
|
149
149
|
selectionToolbar: function selectionToolbar() {
|
|
150
150
|
var _api$userPreferences, _api$selectionToolbar;
|
|
151
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
|
-
if (toolbarDocking === 'none' && (0,
|
|
152
|
+
if (toolbarDocking === 'none' && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
153
153
|
exposure: true
|
|
154
154
|
})) {
|
|
155
155
|
var toolbarCustom = {
|
|
@@ -12,7 +12,7 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
14
14
|
var _types = require("@atlaskit/editor-common/types");
|
|
15
|
-
var
|
|
15
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
16
16
|
var _constants = require("./Toolbar/constants");
|
|
17
17
|
var _dropdownMenu = require("./Toolbar/dropdown-menu");
|
|
18
18
|
var _clearFormattingIcon = require("./Toolbar/hooks/clear-formatting-icon");
|
|
@@ -112,7 +112,7 @@ var FloatingToolbarTextFormat = function FloatingToolbarTextFormat(_ref) {
|
|
|
112
112
|
}), (0, _react2.jsx)(_dropdownMenu.FormattingTextDropdownMenu, {
|
|
113
113
|
editorView: editorView,
|
|
114
114
|
items: items,
|
|
115
|
-
isReducedSpacing: (0,
|
|
115
|
+
isReducedSpacing: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? false : FloatingToolbarSettings.isReducedSpacing,
|
|
116
116
|
moreButtonLabel: FloatingToolbarSettings.moreButtonLabel,
|
|
117
117
|
hasFormattingActive: FloatingToolbarSettings.hasMoreButton,
|
|
118
118
|
hasMoreButton: FloatingToolbarSettings.hasMoreButton,
|
|
@@ -121,5 +121,5 @@ var FloatingToolbarTextFormat = function FloatingToolbarTextFormat(_ref) {
|
|
|
121
121
|
}));
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
125
125
|
var FloatingToolbarTextFormalWithIntl = exports.FloatingToolbarTextFormalWithIntl = (0, _reactIntl.injectIntl)(FloatingToolbarTextFormat);
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
13
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
14
|
-
var
|
|
14
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
15
15
|
var _dropdownToolbarButton = require("./dropdown-toolbar-button");
|
|
16
16
|
var _menuState = require("./hooks/menu-state");
|
|
17
17
|
var _moreButton = require("./more-button");
|
|
@@ -53,7 +53,7 @@ var FormattingTextDropdownMenu = exports.FormattingTextDropdownMenu = /*#__PURE_
|
|
|
53
53
|
var activeItem = items[0].items.find(function (item) {
|
|
54
54
|
return item.isActive;
|
|
55
55
|
});
|
|
56
|
-
var defaultIcon = (0,
|
|
56
|
+
var defaultIcon = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? (_items$0$items$ = items[0].items[0]) === null || _items$0$items$ === void 0 ? void 0 : _items$0$items$.elemBefore : undefined;
|
|
57
57
|
var defaultIconName = (_items$0$items$2 = items[0].items[0]) === null || _items$0$items$2 === void 0 ? void 0 : _items$0$items$2.value.name;
|
|
58
58
|
var iconBefore = activeItem ? activeItem === null || activeItem === void 0 ? void 0 : activeItem.elemBefore : defaultIcon;
|
|
59
59
|
var activeIconName = (activeItem === null || activeItem === void 0 ? void 0 : activeItem.value.name) || defaultIconName;
|
|
@@ -67,7 +67,7 @@ var FormattingTextDropdownMenu = exports.FormattingTextDropdownMenu = /*#__PURE_
|
|
|
67
67
|
items: items,
|
|
68
68
|
zIndex: _editorSharedStyles.akEditorMenuZIndex,
|
|
69
69
|
fitHeight: 188,
|
|
70
|
-
fitWidth: (0,
|
|
70
|
+
fitWidth: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control') ? 136 : 230,
|
|
71
71
|
shouldUseDefaultRole: true
|
|
72
72
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
73
73
|
,
|
|
@@ -11,7 +11,7 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
13
13
|
var _tableCellClear = _interopRequireDefault(require("@atlaskit/icon/core/table-cell-clear"));
|
|
14
|
-
var
|
|
14
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
15
15
|
var _clearFormatting = require("../../../editor-commands/clear-formatting");
|
|
16
16
|
var _inputMethodUtils = require("../input-method-utils");
|
|
17
17
|
/**
|
|
@@ -41,7 +41,7 @@ var useClearIcon = exports.useClearIcon = function useClearIcon(_ref) {
|
|
|
41
41
|
key: 'clearFormatting',
|
|
42
42
|
command: clearFormattingToolbar,
|
|
43
43
|
content: clearFormattingLabel,
|
|
44
|
-
elemBefore: (0,
|
|
44
|
+
elemBefore: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _react2.jsx)(_tableCellClear.default, {
|
|
45
45
|
label: ""
|
|
46
46
|
}) : undefined,
|
|
47
47
|
elemAfter:
|
|
@@ -18,7 +18,7 @@ var _textBold = _interopRequireDefault(require("@atlaskit/icon/core/text-bold"))
|
|
|
18
18
|
var _textItalic = _interopRequireDefault(require("@atlaskit/icon/core/text-italic"));
|
|
19
19
|
var _textStrikethrough = _interopRequireDefault(require("@atlaskit/icon/core/text-strikethrough"));
|
|
20
20
|
var _textUnderline = _interopRequireDefault(require("@atlaskit/icon/core/text-underline"));
|
|
21
|
-
var
|
|
21
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
22
22
|
var _toggleMark = require("../../../editor-commands/toggle-mark");
|
|
23
23
|
var _icons = require("../icons");
|
|
24
24
|
var _inputMethodUtils = require("../input-method-utils");
|
|
@@ -159,7 +159,7 @@ var getIcon = function getIcon(_ref) {
|
|
|
159
159
|
description: content,
|
|
160
160
|
keymap: tooltipKeymap
|
|
161
161
|
}) : undefined,
|
|
162
|
-
elemBefore: (0,
|
|
162
|
+
elemBefore: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? iconBefore : undefined,
|
|
163
163
|
elemAfter: tooltipKeymap ?
|
|
164
164
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
165
165
|
(0, _react2.jsx)("div", {
|
|
@@ -15,7 +15,7 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
15
15
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
16
16
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
17
17
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
18
|
-
var
|
|
18
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
19
19
|
var _utils = require("../../editor-commands/utils");
|
|
20
20
|
var _dropdownMenu = require("./dropdown-menu");
|
|
21
21
|
var _clearFormattingIcon = require("./hooks/clear-formatting-icon");
|
|
@@ -166,7 +166,7 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
|
|
|
166
166
|
}), (0, _react2.jsx)("span", {
|
|
167
167
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage
|
|
168
168
|
css: _styles.wrapperStyle
|
|
169
|
-
}, isToolbarDisabled && !(0,
|
|
169
|
+
}, isToolbarDisabled && !(0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _react2.jsx)("div", null, (0, _react2.jsx)(_moreButton.MoreButton, {
|
|
170
170
|
label: moreFormattingButtonLabel,
|
|
171
171
|
isReducedSpacing: isReducedSpacing,
|
|
172
172
|
isDisabled: true,
|
|
@@ -181,11 +181,11 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
|
|
|
181
181
|
isReducedSpacing: isReducedSpacing,
|
|
182
182
|
moreButtonLabel: moreFormattingButtonLabel,
|
|
183
183
|
hasFormattingActive: hasFormattingActive,
|
|
184
|
-
hasMoreButton: !(0,
|
|
184
|
+
hasMoreButton: !(0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1'),
|
|
185
185
|
items: items,
|
|
186
186
|
intl: intl,
|
|
187
187
|
toolbarType: toolbarType,
|
|
188
|
-
isDisabled: (0,
|
|
188
|
+
isDisabled: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? isToolbarDisabled : false
|
|
189
189
|
}))), !(api !== null && api !== void 0 && api.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
|
|
190
190
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
191
191
|
(0, _react2.jsx)("span", {
|
|
@@ -2,7 +2,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { bindKeymapWithEditorCommand, findShortcutByKeymap, isCapsLockOnAndModifyKeyboardEvent, toggleBold, toggleCode, toggleItalic, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleUnderline } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { toggleCodeWithAnalytics, toggleEmWithAnalytics, toggleStrikeWithAnalytics, toggleStrongWithAnalytics, toggleSubscriptWithAnalytics, toggleSuperscriptWithAnalytics, toggleUnderlineWithAnalytics } from '../editor-commands/toggle-mark';
|
|
7
7
|
import { pluginKey } from './plugin-key';
|
|
8
8
|
export default function keymapPlugin(schema, editorAnalyticsAPI) {
|
|
@@ -9,7 +9,7 @@ import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
|
|
|
9
9
|
import { MarkType } from '@atlaskit/editor-prosemirror/model';
|
|
10
10
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
12
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
13
|
import { createInlineCodeFromTextInputWithAnalytics } from '../editor-commands/text-formatting';
|
|
14
14
|
// Ignored via go/ees005
|
|
15
15
|
// eslint-disable-next-line import/no-namespace
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { code, em, strike, strong, subsup, underline } from '@atlaskit/adf-schema';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
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
|
import clearFormattingKeymapPlugin from './pm-plugins/clear-formatting-keymap';
|
|
@@ -9,7 +9,7 @@ import { jsx } from '@emotion/react';
|
|
|
9
9
|
import { injectIntl } from 'react-intl';
|
|
10
10
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
12
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
13
|
import { ToolbarButtonsStrong } from './Toolbar/constants';
|
|
14
14
|
import { FormattingTextDropdownMenu } from './Toolbar/dropdown-menu';
|
|
15
15
|
import { useClearIcon } from './Toolbar/hooks/clear-formatting-icon';
|
|
@@ -115,5 +115,5 @@ const FloatingToolbarTextFormat = ({
|
|
|
115
115
|
}));
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
119
119
|
export const FloatingToolbarTextFormalWithIntl = injectIntl(FloatingToolbarTextFormat);
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useState } from 'react';
|
|
|
2
2
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
3
3
|
import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
|
|
4
4
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { DropdownToolbarButton } from './dropdown-toolbar-button';
|
|
7
7
|
import { useMenuState } from './hooks/menu-state';
|
|
8
8
|
import { MoreButton } from './more-button';
|
|
@@ -10,7 +10,7 @@ import { clearFormatting as clearFormattingKeymap, tooltip } from '@atlaskit/edi
|
|
|
10
10
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
12
12
|
import TableCellClearIcon from '@atlaskit/icon/core/table-cell-clear';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
14
|
import { clearFormattingWithAnalytics } from '../../../editor-commands/clear-formatting';
|
|
15
15
|
import { getInputMethod } from '../input-method-utils';
|
|
16
16
|
export const useClearIcon = ({
|
|
@@ -16,7 +16,7 @@ import BoldIcon from '@atlaskit/icon/core/text-bold';
|
|
|
16
16
|
import ItalicIcon from '@atlaskit/icon/core/text-italic';
|
|
17
17
|
import TextStrikethroughIcon from '@atlaskit/icon/core/text-strikethrough';
|
|
18
18
|
import UnderlineIcon from '@atlaskit/icon/core/text-underline';
|
|
19
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
19
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
20
20
|
import { toggleCodeWithAnalytics, toggleEmWithAnalytics, toggleStrikeWithAnalytics, toggleStrongWithAnalytics, toggleSubscriptWithAnalytics, toggleSuperscriptWithAnalytics, toggleUnderlineWithAnalytics } from '../../../editor-commands/toggle-mark';
|
|
21
21
|
import { Subscript, Superscript } from '../icons';
|
|
22
22
|
import { getInputMethod } from '../input-method-utils';
|
|
@@ -10,7 +10,7 @@ import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
|
10
10
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { buttonGroupStyle, separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { Announcer } from '@atlaskit/editor-common/ui';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
14
|
import { compareItemsArrays, isArrayContainsContent } from '../../editor-commands/utils';
|
|
15
15
|
import { FormattingTextDropdownMenu } from './dropdown-menu';
|
|
16
16
|
import { useClearIcon } from './hooks/clear-formatting-icon';
|
|
@@ -2,7 +2,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { bindKeymapWithEditorCommand, findShortcutByKeymap, isCapsLockOnAndModifyKeyboardEvent, toggleBold, toggleCode, toggleItalic, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleUnderline } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { toggleCodeWithAnalytics, toggleEmWithAnalytics, toggleStrikeWithAnalytics, toggleStrongWithAnalytics, toggleSubscriptWithAnalytics, toggleSuperscriptWithAnalytics, toggleUnderlineWithAnalytics } from '../editor-commands/toggle-mark';
|
|
7
7
|
import { pluginKey } from './plugin-key';
|
|
8
8
|
export default function keymapPlugin(schema, editorAnalyticsAPI) {
|
|
@@ -13,7 +13,7 @@ import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
|
|
|
13
13
|
import { MarkType } from '@atlaskit/editor-prosemirror/model';
|
|
14
14
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
16
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
17
17
|
import { createInlineCodeFromTextInputWithAnalytics } from '../editor-commands/text-formatting';
|
|
18
18
|
// Ignored via go/ees005
|
|
19
19
|
// eslint-disable-next-line import/no-namespace
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { code, em, strike, strong, subsup, underline } from '@atlaskit/adf-schema';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
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
10
|
import clearFormattingKeymapPlugin from './pm-plugins/clear-formatting-keymap';
|
|
@@ -11,7 +11,7 @@ import { jsx } from '@emotion/react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl';
|
|
12
12
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
13
13
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
14
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
14
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
15
15
|
import { ToolbarButtonsStrong } from './Toolbar/constants';
|
|
16
16
|
import { FormattingTextDropdownMenu } from './Toolbar/dropdown-menu';
|
|
17
17
|
import { useClearIcon } from './Toolbar/hooks/clear-formatting-icon';
|
|
@@ -113,5 +113,5 @@ var FloatingToolbarTextFormat = function FloatingToolbarTextFormat(_ref) {
|
|
|
113
113
|
}));
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
117
117
|
export var FloatingToolbarTextFormalWithIntl = injectIntl(FloatingToolbarTextFormat);
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useState } from 'react';
|
|
|
3
3
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
|
|
5
5
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { DropdownToolbarButton } from './dropdown-toolbar-button';
|
|
8
8
|
import { useMenuState } from './hooks/menu-state';
|
|
9
9
|
import { MoreButton } from './more-button';
|
|
@@ -10,7 +10,7 @@ import { clearFormatting as clearFormattingKeymap, tooltip } from '@atlaskit/edi
|
|
|
10
10
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
12
12
|
import TableCellClearIcon from '@atlaskit/icon/core/table-cell-clear';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
14
|
import { clearFormattingWithAnalytics } from '../../../editor-commands/clear-formatting';
|
|
15
15
|
import { getInputMethod } from '../input-method-utils';
|
|
16
16
|
export var useClearIcon = function useClearIcon(_ref) {
|
|
@@ -17,7 +17,7 @@ import BoldIcon from '@atlaskit/icon/core/text-bold';
|
|
|
17
17
|
import ItalicIcon from '@atlaskit/icon/core/text-italic';
|
|
18
18
|
import TextStrikethroughIcon from '@atlaskit/icon/core/text-strikethrough';
|
|
19
19
|
import UnderlineIcon from '@atlaskit/icon/core/text-underline';
|
|
20
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
20
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
21
21
|
import { toggleCodeWithAnalytics, toggleEmWithAnalytics, toggleStrikeWithAnalytics, toggleStrongWithAnalytics, toggleSubscriptWithAnalytics, toggleSuperscriptWithAnalytics, toggleUnderlineWithAnalytics } from '../../../editor-commands/toggle-mark';
|
|
22
22
|
import { Subscript, Superscript } from '../icons';
|
|
23
23
|
import { getInputMethod } from '../input-method-utils';
|
|
@@ -14,7 +14,7 @@ import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
|
14
14
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
15
15
|
import { buttonGroupStyle, separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
16
16
|
import { Announcer } from '@atlaskit/editor-common/ui';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
17
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
18
|
import { compareItemsArrays, isArrayContainsContent } from '../../editor-commands/utils';
|
|
19
19
|
import { FormattingTextDropdownMenu } from './dropdown-menu';
|
|
20
20
|
import { useClearIcon } from './hooks/clear-formatting-icon';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-formatting",
|
|
3
|
-
"version": "16.0
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "Text-formatting plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,26 +25,26 @@
|
|
|
25
25
|
"atlaskit:src": "src/index.ts",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/adf-schema": "^57.2.0",
|
|
28
|
-
"@atlaskit/editor-plugin-analytics": "^16.
|
|
29
|
-
"@atlaskit/editor-plugin-base": "^17.
|
|
28
|
+
"@atlaskit/editor-plugin-analytics": "^16.1.0",
|
|
29
|
+
"@atlaskit/editor-plugin-base": "^17.1.0",
|
|
30
30
|
"@atlaskit/editor-plugin-primary-toolbar": "^17.0.0",
|
|
31
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^17.
|
|
31
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^17.1.0",
|
|
32
32
|
"@atlaskit/editor-plugin-toolbar": "^13.0.0",
|
|
33
33
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
34
|
-
"@atlaskit/editor-shared-styles": "^4.
|
|
35
|
-
"@atlaskit/editor-tables": "^3.
|
|
34
|
+
"@atlaskit/editor-shared-styles": "^4.1.0",
|
|
35
|
+
"@atlaskit/editor-tables": "^3.1.0",
|
|
36
36
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
37
37
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
38
|
-
"@atlaskit/icon": "^37.
|
|
39
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
40
|
-
"@atlaskit/prosemirror-input-rules": "^4.
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
42
|
-
"@atlaskit/tokens": "^16.
|
|
38
|
+
"@atlaskit/icon": "^37.6.0",
|
|
39
|
+
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
40
|
+
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
42
|
+
"@atlaskit/tokens": "^16.10.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@atlaskit/editor-common": "^120.
|
|
47
|
+
"@atlaskit/editor-common": "^120.9.0",
|
|
48
48
|
"react": "^18.2.0 || ^19.2.0",
|
|
49
49
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
50
50
|
},
|
package/report.api.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<!-- API Report Version: 2.3 -->
|
|
2
|
-
|
|
3
|
-
## API Report File for "@atlaskit/editor-plugin-text-formatting"
|
|
4
|
-
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
6
|
-
> [API Extractor](https://api-extractor.com/).
|
|
7
|
-
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
8
|
-
|
|
9
|
-
### Table of contents
|
|
10
|
-
|
|
11
|
-
- [Main Entry Types](#main-entry-types)
|
|
12
|
-
- [Peer Dependencies](#peer-dependencies)
|
|
13
|
-
|
|
14
|
-
### Main Entry Types
|
|
15
|
-
|
|
16
|
-
<!--SECTION START: Main Entry Types-->
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
20
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
21
|
-
import type { InputMethodBasic } from '@atlaskit/editor-common/types';
|
|
22
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
23
|
-
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
24
|
-
import type { TextFormattingOptions } from '@atlaskit/editor-common/types';
|
|
25
|
-
import type { TextFormattingState } from '@atlaskit/editor-common/types';
|
|
26
|
-
|
|
27
|
-
// @public (undocumented)
|
|
28
|
-
export type TextFormattingPlugin = NextEditorPlugin<
|
|
29
|
-
'textFormatting',
|
|
30
|
-
{
|
|
31
|
-
pluginConfiguration: TextFormattingOptions | undefined;
|
|
32
|
-
dependencies: [OptionalPlugin<typeof analyticsPlugin>];
|
|
33
|
-
commands: {
|
|
34
|
-
toggleSuperscript: ToggleMarkEditorCommand;
|
|
35
|
-
toggleSubscript: ToggleMarkEditorCommand;
|
|
36
|
-
toggleStrike: ToggleMarkEditorCommand;
|
|
37
|
-
toggleCode: ToggleMarkEditorCommand;
|
|
38
|
-
toggleUnderline: ToggleMarkEditorCommand;
|
|
39
|
-
toggleEm: ToggleMarkEditorCommand;
|
|
40
|
-
toggleStrong: ToggleMarkEditorCommand;
|
|
41
|
-
};
|
|
42
|
-
sharedState: TextFormattingState | undefined;
|
|
43
|
-
}
|
|
44
|
-
>;
|
|
45
|
-
|
|
46
|
-
// @public
|
|
47
|
-
export const textFormattingPlugin: TextFormattingPlugin;
|
|
48
|
-
|
|
49
|
-
// @public (undocumented)
|
|
50
|
-
export type ToggleMarkEditorCommand = (inputMethod: InputMethodBasic) => EditorCommand;
|
|
51
|
-
|
|
52
|
-
// (No @packageDocumentation comment for this package)
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
<!--SECTION END: Main Entry Types-->
|
|
56
|
-
|
|
57
|
-
### Peer Dependencies
|
|
58
|
-
|
|
59
|
-
<!--SECTION START: Peer Dependencies-->
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"react": "^16.8.0"
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
<!--SECTION END: Peer Dependencies-->
|