@atlaskit/editor-plugin-alignment 17.0.6 → 17.0.8
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 +12 -0
- package/dist/cjs/alignmentPlugin.js +2 -2
- package/dist/cjs/ui/FloatingToolbarComponent.js +2 -2
- package/dist/cjs/ui/ToolbarAlignment/index.js +4 -4
- package/dist/es2019/alignmentPlugin.js +1 -1
- package/dist/es2019/ui/FloatingToolbarComponent.js +1 -1
- package/dist/es2019/ui/ToolbarAlignment/index.js +2 -2
- package/dist/esm/alignmentPlugin.js +1 -1
- package/dist/esm/ui/FloatingToolbarComponent.js +1 -1
- package/dist/esm/ui/ToolbarAlignment/index.js +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ exports.alignmentPlugin = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
|
-
var
|
|
11
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
12
12
|
var _keymap = require("./pm-plugins/keymap");
|
|
13
13
|
var _main = require("./pm-plugins/main");
|
|
14
14
|
var _FloatingToolbarComponent = require("./ui/FloatingToolbarComponent");
|
|
@@ -86,7 +86,7 @@ var alignmentPlugin = exports.alignmentPlugin = function alignmentPlugin(_ref) {
|
|
|
86
86
|
selectionToolbar: isToolbarAIFCEnabled ? undefined : function () {
|
|
87
87
|
var _api$userPreferences, _api$selectionToolbar;
|
|
88
88
|
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;
|
|
89
|
-
if (toolbarDocking === 'none' && (0,
|
|
89
|
+
if (toolbarDocking === 'none' && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
90
90
|
exposure: true
|
|
91
91
|
})) {
|
|
92
92
|
var toolbarCustom = {
|
|
@@ -9,7 +9,7 @@ exports.FloatingToolbarComponent = FloatingToolbarComponent;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
12
|
-
var
|
|
12
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
13
13
|
var _editorCommands = require("../editor-commands");
|
|
14
14
|
var _types = require("../pm-plugins/types");
|
|
15
15
|
var _ToolbarAlignment = _interopRequireDefault(require("./ToolbarAlignment"));
|
|
@@ -35,7 +35,7 @@ function FloatingToolbarComponent(_ref) {
|
|
|
35
35
|
}, [editorView, api]);
|
|
36
36
|
return /*#__PURE__*/_react.default.createElement(_ToolbarAlignment.default, {
|
|
37
37
|
align: align,
|
|
38
|
-
isReducedSpacing: (0,
|
|
38
|
+
isReducedSpacing: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? false : FloatingToolbarSettings.isToolbarReducedSpacing,
|
|
39
39
|
changeAlignment: changeAlignmentCallback,
|
|
40
40
|
disabled: FloatingToolbarSettings.disabled || !isEnabled,
|
|
41
41
|
toolbarType: _types.ToolbarType.FLOATING,
|
|
@@ -22,7 +22,7 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
|
22
22
|
var _alignTextCenter = _interopRequireDefault(require("@atlaskit/icon/core/align-text-center"));
|
|
23
23
|
var _alignTextLeft = _interopRequireDefault(require("@atlaskit/icon/core/align-text-left"));
|
|
24
24
|
var _alignTextRight = _interopRequireDefault(require("@atlaskit/icon/core/align-text-right"));
|
|
25
|
-
var
|
|
25
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
26
26
|
var _types = require("../../pm-plugins/types");
|
|
27
27
|
var _Alignment = _interopRequireDefault(require("../Alignment"));
|
|
28
28
|
var _iconMap = require("./icon-map");
|
|
@@ -108,7 +108,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
108
108
|
end: intl.formatMessage(_messages.alignmentMessages.alignRight)
|
|
109
109
|
};
|
|
110
110
|
var ariaLabel = "".concat(title, ", ").concat((_alignmentLabelMap$al = alignmentLabelMap[alignment]) !== null && _alignmentLabelMap$al !== void 0 ? _alignmentLabelMap$al : '');
|
|
111
|
-
var reducedSpacing = (0,
|
|
111
|
+
var reducedSpacing = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
112
112
|
exposure: true
|
|
113
113
|
}) ? 'compact' : 'none';
|
|
114
114
|
var items = [{
|
|
@@ -145,7 +145,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
145
145
|
label: ""
|
|
146
146
|
})
|
|
147
147
|
}];
|
|
148
|
-
return /*#__PURE__*/_react.default.createElement(_ui.ToolbarDropdownWrapper, null, (0,
|
|
148
|
+
return /*#__PURE__*/_react.default.createElement(_ui.ToolbarDropdownWrapper, null, (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownMenuWithKeyboardNavigation
|
|
149
149
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
150
150
|
, {
|
|
151
151
|
arrowKeyNavigationProviderOptions: {
|
|
@@ -253,7 +253,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
}]);
|
|
256
|
-
}(_react.default.Component); // eslint-disable-next-line @typescript-eslint/
|
|
256
|
+
}(_react.default.Component); // eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
257
257
|
(0, _defineProperty2.default)(AlignmentToolbar, "displayName", 'AlignmentToolbar');
|
|
258
258
|
var _default_1 = (0, _reactIntl.injectIntl)(AlignmentToolbar);
|
|
259
259
|
var _default = exports.default = _default_1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { alignment } 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 { keymapPlugin } from './pm-plugins/keymap';
|
|
6
6
|
import { createPlugin, pluginKey } from './pm-plugins/main';
|
|
7
7
|
import { FloatingToolbarComponent } from './ui/FloatingToolbarComponent';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
5
5
|
import { changeAlignment } from '../editor-commands';
|
|
6
6
|
import { ToolbarType } from '../pm-plugins/types';
|
|
7
7
|
import ToolbarAlignment from './ToolbarAlignment';
|
|
@@ -10,7 +10,7 @@ import { ArrowKeyNavigationType, DropdownContainer as Dropdown, DropdownMenuWith
|
|
|
10
10
|
import AlignTextCenterIcon from '@atlaskit/icon/core/align-text-center';
|
|
11
11
|
import AlignTextLeftIcon from '@atlaskit/icon/core/align-text-left';
|
|
12
12
|
import AlignTextRightIcon from '@atlaskit/icon/core/align-text-right';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
14
|
import { ToolbarType } from '../../pm-plugins/types';
|
|
15
15
|
import Alignment from '../Alignment';
|
|
16
16
|
import { IconMap } from './icon-map';
|
|
@@ -224,7 +224,7 @@ class AlignmentToolbar extends React.Component {
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
227
|
+
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
228
228
|
_defineProperty(AlignmentToolbar, "displayName", 'AlignmentToolbar');
|
|
229
229
|
const _default_1 = injectIntl(AlignmentToolbar);
|
|
230
230
|
export default _default_1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { alignment } 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 { keymapPlugin } from './pm-plugins/keymap';
|
|
6
6
|
import { createPlugin, pluginKey } from './pm-plugins/main';
|
|
7
7
|
import { FloatingToolbarComponent } from './ui/FloatingToolbarComponent';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
5
5
|
import { changeAlignment } from '../editor-commands';
|
|
6
6
|
import { ToolbarType } from '../pm-plugins/types';
|
|
7
7
|
import ToolbarAlignment from './ToolbarAlignment';
|
|
@@ -17,7 +17,7 @@ import { ArrowKeyNavigationType, DropdownContainer as Dropdown, DropdownMenuWith
|
|
|
17
17
|
import AlignTextCenterIcon from '@atlaskit/icon/core/align-text-center';
|
|
18
18
|
import AlignTextLeftIcon from '@atlaskit/icon/core/align-text-left';
|
|
19
19
|
import AlignTextRightIcon from '@atlaskit/icon/core/align-text-right';
|
|
20
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
20
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
21
21
|
import { ToolbarType } from '../../pm-plugins/types';
|
|
22
22
|
import Alignment from '../Alignment';
|
|
23
23
|
import { IconMap } from './icon-map';
|
|
@@ -246,7 +246,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
}]);
|
|
249
|
-
}(React.Component); // eslint-disable-next-line @typescript-eslint/
|
|
249
|
+
}(React.Component); // eslint-disable-next-line @typescript-eslint/no-restricted-types
|
|
250
250
|
_defineProperty(AlignmentToolbar, "displayName", 'AlignmentToolbar');
|
|
251
251
|
var _default_1 = injectIntl(AlignmentToolbar);
|
|
252
252
|
export default _default_1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.8",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"@atlaskit/icon": "^37.5.0",
|
|
40
40
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
43
|
-
"@atlaskit/tokens": "^16.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
43
|
+
"@atlaskit/tokens": "^16.9.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@compiled/react": "^1.0.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^120.
|
|
48
|
+
"@atlaskit/editor-common": "^120.7.0",
|
|
49
49
|
"react": "^18.2.0 || ^19.2.0",
|
|
50
50
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
51
51
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|