@atlaskit/editor-core 217.8.3 → 217.9.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 +16 -0
- package/dist/cjs/presets/universal.js +4 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +8 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +14 -3
- package/dist/cjs/ui/EditorContentContainer/styles/codeMarkStyles.js +9 -1
- package/dist/cjs/ui/EditorContentContainer/styles/expandStyles.js +17 -9
- package/dist/cjs/ui/EditorContentContainer/styles/syncBlockStyles.js +12 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/universal.js +4 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +8 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +17 -6
- package/dist/es2019/ui/EditorContentContainer/styles/codeMarkStyles.js +8 -0
- package/dist/es2019/ui/EditorContentContainer/styles/expandStyles.js +16 -8
- package/dist/es2019/ui/EditorContentContainer/styles/syncBlockStyles.js +14 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/universal.js +4 -2
- package/dist/esm/ui/Appearance/Comment/Comment.js +8 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +7 -2
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +17 -6
- package/dist/esm/ui/EditorContentContainer/styles/codeMarkStyles.js +8 -0
- package/dist/esm/ui/EditorContentContainer/styles/expandStyles.js +16 -8
- package/dist/esm/ui/EditorContentContainer/styles/syncBlockStyles.js +11 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/presets/universal.d.ts +5 -1
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +3 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +7 -1
- package/dist/types/ui/EditorContentContainer/EditorContentContainer.d.ts +5 -0
- package/dist/types/ui/EditorContentContainer/styles/codeMarkStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/expandStyles.d.ts +4 -0
- package/dist/types/ui/EditorContentContainer/styles/syncBlockStyles.d.ts +1 -0
- package/dist/types-ts4.5/presets/universal.d.ts +5 -1
- package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +3 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +7 -4
- package/dist/types-ts4.5/ui/EditorContentContainer/EditorContentContainer.d.ts +5 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/codeMarkStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/expandStyles.d.ts +4 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/syncBlockStyles.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 217.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`87bb2de1fb74d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/87bb2de1fb74d) -
|
|
8
|
+
Fix scrollable-region-focusable a11y violation on inline code by removing overflow:auto from code
|
|
9
|
+
mark styles in EditorContentContainer behind the platform_editor_a11y_scrollable_region
|
|
10
|
+
experiment. Removing overflow:auto eliminates the scrollable region entirely (text wraps naturally
|
|
11
|
+
via overflow-wrap:break-word and white-space:pre-wrap),
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`32a165c38d466`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/32a165c38d466) -
|
|
16
|
+
Add an option to the block menu so that nodes can change width as required
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 217.8.3
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -87,7 +87,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
87
87
|
* @returns a full featured preset configured according to the provided props - basis for create-plugins-list
|
|
88
88
|
*/
|
|
89
89
|
function createUniversalPresetInternal(_ref) {
|
|
90
|
-
var _featureFlags$lpLinkP, _initialPluginConfigu, _initialPluginConfigu2, _initialPluginConfigu3, _initialPluginConfigu4, _initialPluginConfigu5, _initialPluginConfigu6, _props$media, _props$media2, _props$media3, _props$media4, _props$media5, _props$media6, _props$media7, _props$mention$insert, _props$mention, _props$mention2, _props$mention3, _props$collabEdit$EXP, _props$collabEdit, _props$linking, _props$linking2, _featureFlags$lpLinkP2, _props$linking3, _props$primaryToolbar;
|
|
90
|
+
var _featureFlags$lpLinkP, _initialPluginConfigu, _initialPluginConfigu2, _initialPluginConfigu3, _initialPluginConfigu4, _initialPluginConfigu5, _initialPluginConfigu6, _initialPluginConfigu7, _initialPluginConfigu8, _props$media, _props$media2, _props$media3, _props$media4, _props$media5, _props$media6, _props$media7, _props$mention$insert, _props$mention, _props$mention2, _props$mention3, _props$collabEdit$EXP, _props$collabEdit, _props$linking, _props$linking2, _featureFlags$lpLinkP2, _props$linking3, _props$primaryToolbar;
|
|
91
91
|
var appearance = _ref.appearance,
|
|
92
92
|
props = _ref.props,
|
|
93
93
|
featureFlags = _ref.featureFlags,
|
|
@@ -119,7 +119,9 @@ function createUniversalPresetInternal(_ref) {
|
|
|
119
119
|
};
|
|
120
120
|
var finalPreset = defaultPreset.add(_ufo.ufoPlugin).add(_dataConsumer.dataConsumerPlugin).add(_accessibilityUtils.accessibilityUtilsPlugin).add(_contentInsertion.contentInsertionPlugin).add(_batchAttributeUpdates.batchAttributeUpdatesPlugin).maybeAdd([_blockControls.blockControlsPlugin, {
|
|
121
121
|
quickInsertButtonEnabled: (_initialPluginConfigu = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu2 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu2 === void 0 ? void 0 : _initialPluginConfigu2.quickInsertButtonEnabled) !== null && _initialPluginConfigu !== void 0 ? _initialPluginConfigu : true
|
|
122
|
-
}], Boolean((_initialPluginConfigu3 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu4 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu4 === void 0 ? void 0 : _initialPluginConfigu4.enabled) !== null && _initialPluginConfigu3 !== void 0 ? _initialPluginConfigu3 : false)).maybeAdd([_blockMenu.blockMenuPlugin, {
|
|
122
|
+
}], Boolean((_initialPluginConfigu3 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu4 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu4 === void 0 ? void 0 : _initialPluginConfigu4.enabled) !== null && _initialPluginConfigu3 !== void 0 ? _initialPluginConfigu3 : false)).maybeAdd([_blockMenu.blockMenuPlugin, {
|
|
123
|
+
useStandardNodeWidth: (_initialPluginConfigu5 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu6 = initialPluginConfiguration.blockMenuPlugin) === null || _initialPluginConfigu6 === void 0 ? void 0 : _initialPluginConfigu6.useStandardNodeWidth) !== null && _initialPluginConfigu5 !== void 0 ? _initialPluginConfigu5 : false
|
|
124
|
+
}], Boolean((_initialPluginConfigu7 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu8 = initialPluginConfiguration.blockMenuPlugin) === null || _initialPluginConfigu8 === void 0 ? void 0 : _initialPluginConfigu8.enabled) !== null && _initialPluginConfigu7 !== void 0 ? _initialPluginConfigu7 : false)).maybeAdd([_breakout.breakoutPlugin, {
|
|
123
125
|
allowBreakoutButton: appearance === 'full-page',
|
|
124
126
|
appearance: appearance
|
|
125
127
|
}], Boolean(props.allowBreakout && (isFullPage || appearance === 'max' && ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('confluence_max_width_content_appearance', 'isEnabled', true)) && (0, _platformFeatureFlags.fg)('platform_editor_breakout_in_universal_preset')))).maybeAdd(_alignment.alignmentPlugin, Boolean(props.allowTextAlignment)).maybeAdd([_textColor.textColorPlugin, props.allowTextColor], Boolean(props.allowTextColor)).add(_list.listPlugin).maybeAdd(_rule.rulePlugin, Boolean(props.allowRule)).maybeAdd([_expand.expandPlugin, {
|
|
@@ -20,6 +20,7 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
20
20
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
21
21
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
23
24
|
var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
|
|
24
25
|
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
25
26
|
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
|
|
@@ -103,7 +104,12 @@ var mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = (0, _react2.css)((0,
|
|
|
103
104
|
}));
|
|
104
105
|
var appearance = 'comment';
|
|
105
106
|
var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
107
|
+
var _editorAPI$blockMenu$, _editorAPI$blockMenu;
|
|
106
108
|
var editorAPI = props.editorAPI;
|
|
109
|
+
|
|
110
|
+
// Get useStandardNodeWidth from block menu plugin shared state
|
|
111
|
+
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
112
|
+
var useStandardNodeWidth = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.currentState()) === null || _editorAPI$blockMenu === void 0 ? void 0 : _editorAPI$blockMenu.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
|
|
107
113
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
|
|
108
114
|
var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
|
|
109
115
|
return {
|
|
@@ -286,7 +292,8 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
286
292
|
}),
|
|
287
293
|
featureFlags: featureFlags,
|
|
288
294
|
viewMode: editorViewMode,
|
|
289
|
-
appearance: appearance
|
|
295
|
+
appearance: appearance,
|
|
296
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
290
297
|
}, customContentComponents && 'before' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents), (0, _react2.jsx)(_PluginSlot.default, {
|
|
291
298
|
editorView: editorView,
|
|
292
299
|
editorActions: editorActions,
|
|
@@ -207,7 +207,7 @@ var contentAreaHeightNoToolbar = (0, _react2.css)({
|
|
|
207
207
|
var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
208
208
|
var EDITOR_CONTAINER = exports.EDITOR_CONTAINER = 'ak-editor-container';
|
|
209
209
|
var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
210
|
-
var _props$editorAPI, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
210
|
+
var _props$editorAPI, _props$editorAPI$bloc, _props$editorAPI2, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
211
211
|
var theme = (0, _react2.useTheme)();
|
|
212
212
|
var fullWidthMode = props.appearance === 'full-width';
|
|
213
213
|
var maxWidthMode = props.appearance === 'max';
|
|
@@ -216,6 +216,10 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
216
216
|
var containerRef = (0, _react.useRef)(null);
|
|
217
217
|
var allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.base) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.sharedState.currentState()) === null || _props$editorAPI === void 0 ? void 0 : _props$editorAPI.allowScrollGutter;
|
|
218
218
|
var contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : theme.layoutMaxWidth : akEditorFullWidthLayoutWidth);
|
|
219
|
+
|
|
220
|
+
// Get useStandardNodeWidth from block menu plugin shared state
|
|
221
|
+
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
222
|
+
var useStandardNodeWidth = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.blockMenu) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.sharedState) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.currentState()) === null || _props$editorAPI2 === void 0 ? void 0 : _props$editorAPI2.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false);
|
|
219
223
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
220
224
|
return {
|
|
221
225
|
get scrollContainer() {
|
|
@@ -248,7 +252,8 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
248
252
|
viewMode: props === null || props === void 0 ? void 0 : props.viewMode,
|
|
249
253
|
isScrollable: true,
|
|
250
254
|
appearance: props.appearance,
|
|
251
|
-
contentMode: props.contentMode
|
|
255
|
+
contentMode: props.contentMode,
|
|
256
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
252
257
|
}, (0, _react2.jsx)(_ClickAreaBlock.default, {
|
|
253
258
|
editorView: props.editorView,
|
|
254
259
|
editorDisabled: props.disabled
|
|
@@ -117,7 +117,8 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
117
117
|
viewMode = props.viewMode,
|
|
118
118
|
isScrollable = props.isScrollable,
|
|
119
119
|
appearance = props.appearance,
|
|
120
|
-
contentMode = props.contentMode
|
|
120
|
+
contentMode = props.contentMode,
|
|
121
|
+
useStandardNodeWidth = props.useStandardNodeWidth;
|
|
121
122
|
var theme = (0, _react2.useTheme)();
|
|
122
123
|
var _useThemeObserver = (0, _tokens.useThemeObserver)(),
|
|
123
124
|
colorMode = _useThemeObserver.colorMode;
|
|
@@ -226,7 +227,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
226
227
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
227
228
|
_blockTypeStyles.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes,
|
|
228
229
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
229
|
-
_codeMarkStyles.codeMarkStyles,
|
|
230
|
+
_codeMarkStyles.codeMarkStyles, (0, _expValEquals.expValEquals)('platform_editor_a11y_scrollable_region', 'isEnabled', true) &&
|
|
231
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
232
|
+
_codeMarkStyles.codeMarkStylesA11yFix,
|
|
230
233
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
231
234
|
_textColorStyles.textColorStyles,
|
|
232
235
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -300,7 +303,10 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
300
303
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
301
304
|
_extensionStyles.extensionDiffStyles,
|
|
302
305
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
303
|
-
_expandStyles.
|
|
306
|
+
_expandStyles.expandStylesBase,
|
|
307
|
+
// Apply expand delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
308
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
309
|
+
!useStandardNodeWidth && _expandStyles.expandStyles, contentMode === 'compact' && ((0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) ||
|
|
304
310
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
305
311
|
(0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp')) &&
|
|
306
312
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -376,6 +382,11 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
376
382
|
// merge alignMultipleWrappedImageInLayoutStyles with layoutBaseStyles when clean up platform_editor_fix_media_in_renderer
|
|
377
383
|
(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && alignMultipleWrappedImageInLayoutStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) &&
|
|
378
384
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
385
|
+
_syncBlockStyles.syncBlockStylesBase, (0, _experiments.editorExperiment)('platform_synced_block', true) &&
|
|
386
|
+
// Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
387
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
388
|
+
!useStandardNodeWidth &&
|
|
389
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
379
390
|
_syncBlockStyles.syncBlockStyles,
|
|
380
391
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
381
392
|
(0, _experiments.editorExperiment)('platform_synced_block', true) && _syncBlockStyles.syncBlockOverflowStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) &&
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.codeMarkStyles = void 0;
|
|
6
|
+
exports.codeMarkStylesA11yFix = exports.codeMarkStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled */
|
|
9
9
|
|
|
@@ -28,4 +28,12 @@ var codeMarkStyles = exports.codeMarkStyles = (0, _react.css)({
|
|
|
28
28
|
overflowWrap: 'break-word',
|
|
29
29
|
whiteSpace: 'pre-wrap'
|
|
30
30
|
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
34
|
+
var codeMarkStylesA11yFix = exports.codeMarkStylesA11yFix = (0, _react.css)({
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
36
|
+
'.code': {
|
|
37
|
+
overflow: 'unset'
|
|
38
|
+
}
|
|
31
39
|
});
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getDenseExpandTitleStyles = exports.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_fg_platform_visual_refresh_icons = exports.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_experiment_platform_editor_chromeless_expand_fix = exports.expandStyles = void 0;
|
|
6
|
+
exports.getDenseExpandTitleStyles = exports.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_fg_platform_visual_refresh_icons = exports.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_experiment_platform_editor_chromeless_expand_fix = exports.expandStylesBase = exports.expandStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
9
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled */
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Base expand styles, always applied.
|
|
13
|
+
*/
|
|
11
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
12
|
-
var
|
|
15
|
+
var expandStylesBase = exports.expandStylesBase = (0, _react.css)({
|
|
13
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
14
17
|
'.ak-editor-expand__icon > div': {
|
|
15
18
|
display: 'flex'
|
|
@@ -83,11 +86,6 @@ var expandStyles = exports.expandStyles = (0, _react.css)({
|
|
|
83
86
|
}
|
|
84
87
|
},
|
|
85
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
86
|
-
'.ProseMirror > .ak-editor-expand__type-expand, .fabric-editor-breakout-mark-dom > .ak-editor-expand__type-expand': {
|
|
87
|
-
marginLeft: "var(--ds-space-negative-150, -12px)",
|
|
88
|
-
marginRight: "var(--ds-space-negative-150, -12px)"
|
|
89
|
-
},
|
|
90
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
91
89
|
'.ak-editor-expand__content': {
|
|
92
90
|
// sharedExpandStyles.contentStyles({ expanded: false, focused: false })(),
|
|
93
91
|
paddingTop: "var(--ds-space-0, 0px)",
|
|
@@ -96,8 +94,8 @@ var expandStyles = exports.expandStyles = (0, _react.css)({
|
|
|
96
94
|
marginLeft: "var(--ds-space-050, 4px)",
|
|
97
95
|
display: 'flow-root',
|
|
98
96
|
/* The follow rules inside @supports block are added as a part of ED-8893
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
The fix is targeting mobile bridge on iOS 12 or below,
|
|
98
|
+
We should consider remove this fix when we no longer support iOS 12 */
|
|
101
99
|
'@supports not (display: flow-root)': {
|
|
102
100
|
width: '100%',
|
|
103
101
|
boxSizing: 'border-box'
|
|
@@ -245,6 +243,16 @@ var expandStyles = exports.expandStyles = (0, _react.css)({
|
|
|
245
243
|
}
|
|
246
244
|
});
|
|
247
245
|
|
|
246
|
+
// Export the default styles with negative margins (original behavior)
|
|
247
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
248
|
+
var expandStyles = exports.expandStyles = (0, _react.css)({
|
|
249
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
250
|
+
'.ProseMirror > .ak-editor-expand__type-expand, .fabric-editor-breakout-mark-dom > .ak-editor-expand__type-expand': {
|
|
251
|
+
marginLeft: "var(--ds-space-negative-150, -12px)",
|
|
252
|
+
marginRight: "var(--ds-space-negative-150, -12px)"
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
|
|
248
256
|
/**
|
|
249
257
|
* This function gets the dynamic styles that scale the expand title font size based on the base font size.
|
|
250
258
|
* If the base font size is not the default font size, we want the expand title font size to match the base font size.
|
|
@@ -4,14 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.syncBlockStyles = exports.syncBlockOverflowStyles = exports.syncBlockFirstNodeStyles = void 0;
|
|
7
|
+
exports.syncBlockStylesBase = exports.syncBlockStyles = exports.syncBlockOverflowStyles = exports.syncBlockFirstNodeStyles = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
11
11
|
var _$concat$concat;
|
|
12
12
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled */
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
14
|
-
var
|
|
14
|
+
var syncBlockStylesBase = exports.syncBlockStylesBase = (0, _react.css)((0, _defineProperty2.default)({
|
|
15
15
|
'@property --angle': {
|
|
16
16
|
syntax: '"<angle>"',
|
|
17
17
|
initialValue: '0deg',
|
|
@@ -22,8 +22,6 @@ var syncBlockStyles = exports.syncBlockStyles = (0, _react.css)((0, _definePrope
|
|
|
22
22
|
position: 'relative',
|
|
23
23
|
cursor: 'pointer',
|
|
24
24
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
25
|
-
marginRight: "-18px",
|
|
26
|
-
marginLeft: "-18px",
|
|
27
25
|
marginBottom: 0,
|
|
28
26
|
marginTop: "var(--ds-space-075, 6px)",
|
|
29
27
|
paddingBlock: "var(--ds-space-150, 12px)",
|
|
@@ -155,6 +153,16 @@ var syncBlockStyles = exports.syncBlockStyles = (0, _react.css)((0, _definePrope
|
|
|
155
153
|
maxWidth: '140px'
|
|
156
154
|
}));
|
|
157
155
|
|
|
156
|
+
// Export the default styles with negative margins (original behavior)
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
158
|
+
var syncBlockStyles = exports.syncBlockStyles = (0, _react.css)({
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
160
|
+
'.ProseMirror': (0, _defineProperty2.default)({}, ".".concat(_syncBlock.SyncBlockSharedCssClassName.prefix, ", .").concat(_syncBlock.BodiedSyncBlockSharedCssClassName.prefix), {
|
|
161
|
+
marginRight: "-18px",
|
|
162
|
+
marginLeft: "-18px"
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
|
|
158
166
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
159
167
|
var syncBlockOverflowStyles = exports.syncBlockOverflowStyles = (0, _react.css)({
|
|
160
168
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -83,7 +83,7 @@ export default function createUniversalPresetInternal({
|
|
|
83
83
|
prevAppearance,
|
|
84
84
|
createAnalyticsEvent
|
|
85
85
|
}) {
|
|
86
|
-
var _featureFlags$lpLinkP, _initialPluginConfigu, _initialPluginConfigu2, _initialPluginConfigu3, _initialPluginConfigu4, _initialPluginConfigu5, _initialPluginConfigu6, _props$media, _props$media2, _props$media3, _props$media4, _props$media5, _props$media6, _props$media7, _props$mention$insert, _props$mention, _props$mention2, _props$mention3, _props$collabEdit$EXP, _props$collabEdit, _props$linking, _props$linking2, _featureFlags$lpLinkP2, _props$linking3, _props$primaryToolbar;
|
|
86
|
+
var _featureFlags$lpLinkP, _initialPluginConfigu, _initialPluginConfigu2, _initialPluginConfigu3, _initialPluginConfigu4, _initialPluginConfigu5, _initialPluginConfigu6, _initialPluginConfigu7, _initialPluginConfigu8, _props$media, _props$media2, _props$media3, _props$media4, _props$media5, _props$media6, _props$media7, _props$mention$insert, _props$mention, _props$mention2, _props$mention3, _props$collabEdit$EXP, _props$collabEdit, _props$linking, _props$linking2, _featureFlags$lpLinkP2, _props$linking3, _props$primaryToolbar;
|
|
87
87
|
const isComment = appearance === 'comment';
|
|
88
88
|
const isChromeless = appearance === 'chromeless';
|
|
89
89
|
const isFullPage = fullPageCheck(appearance);
|
|
@@ -112,7 +112,9 @@ export default function createUniversalPresetInternal({
|
|
|
112
112
|
};
|
|
113
113
|
const finalPreset = defaultPreset.add(ufoPlugin).add(dataConsumerPlugin).add(accessibilityUtilsPlugin).add(contentInsertionPlugin).add(batchAttributeUpdatesPlugin).maybeAdd([blockControlsPlugin, {
|
|
114
114
|
quickInsertButtonEnabled: (_initialPluginConfigu = initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : (_initialPluginConfigu2 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu2 === void 0 ? void 0 : _initialPluginConfigu2.quickInsertButtonEnabled) !== null && _initialPluginConfigu !== void 0 ? _initialPluginConfigu : true
|
|
115
|
-
}], Boolean((_initialPluginConfigu3 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : (_initialPluginConfigu4 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu4 === void 0 ? void 0 : _initialPluginConfigu4.enabled) !== null && _initialPluginConfigu3 !== void 0 ? _initialPluginConfigu3 : false)).maybeAdd([blockMenuPlugin, {
|
|
115
|
+
}], Boolean((_initialPluginConfigu3 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : (_initialPluginConfigu4 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu4 === void 0 ? void 0 : _initialPluginConfigu4.enabled) !== null && _initialPluginConfigu3 !== void 0 ? _initialPluginConfigu3 : false)).maybeAdd([blockMenuPlugin, {
|
|
116
|
+
useStandardNodeWidth: (_initialPluginConfigu5 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : (_initialPluginConfigu6 = initialPluginConfiguration.blockMenuPlugin) === null || _initialPluginConfigu6 === void 0 ? void 0 : _initialPluginConfigu6.useStandardNodeWidth) !== null && _initialPluginConfigu5 !== void 0 ? _initialPluginConfigu5 : false
|
|
117
|
+
}], Boolean((_initialPluginConfigu7 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : (_initialPluginConfigu8 = initialPluginConfiguration.blockMenuPlugin) === null || _initialPluginConfigu8 === void 0 ? void 0 : _initialPluginConfigu8.enabled) !== null && _initialPluginConfigu7 !== void 0 ? _initialPluginConfigu7 : false)).maybeAdd([breakoutPlugin, {
|
|
116
118
|
allowBreakoutButton: appearance === 'full-page',
|
|
117
119
|
appearance: appearance
|
|
118
120
|
}], Boolean(props.allowBreakout && (isFullPage || appearance === 'max' && (expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEqualsNoExposure('confluence_max_width_content_appearance', 'isEnabled', true)) && fg('platform_editor_breakout_in_universal_preset')))).maybeAdd(alignmentPlugin, Boolean(props.allowTextAlignment)).maybeAdd([textColorPlugin, props.allowTextColor], Boolean(props.allowTextColor)).add(listPlugin).maybeAdd(rulePlugin, Boolean(props.allowRule)).maybeAdd([expandPlugin, {
|
|
@@ -16,6 +16,7 @@ import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
16
16
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
17
17
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
18
18
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
20
|
// Ignored via go/ees005
|
|
20
21
|
// eslint-disable-next-line import/no-named-as-default
|
|
21
22
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
@@ -93,9 +94,14 @@ const mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = css({
|
|
|
93
94
|
});
|
|
94
95
|
const appearance = 'comment';
|
|
95
96
|
export const CommentEditorWithIntl = props => {
|
|
97
|
+
var _editorAPI$blockMenu$, _editorAPI$blockMenu, _editorAPI$blockMenu$2, _editorAPI$blockMenu$3;
|
|
96
98
|
const {
|
|
97
99
|
editorAPI
|
|
98
100
|
} = props;
|
|
101
|
+
|
|
102
|
+
// Get useStandardNodeWidth from block menu plugin shared state
|
|
103
|
+
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
104
|
+
const useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 ? void 0 : (_editorAPI$blockMenu$2 = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu$2 === void 0 ? void 0 : (_editorAPI$blockMenu$3 = _editorAPI$blockMenu$2.currentState()) === null || _editorAPI$blockMenu$3 === void 0 ? void 0 : _editorAPI$blockMenu$3.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
|
|
99
105
|
const {
|
|
100
106
|
editorViewMode,
|
|
101
107
|
primaryToolbarComponentsState,
|
|
@@ -275,7 +281,8 @@ export const CommentEditorWithIntl = props => {
|
|
|
275
281
|
}),
|
|
276
282
|
featureFlags: featureFlags,
|
|
277
283
|
viewMode: editorViewMode,
|
|
278
|
-
appearance: appearance
|
|
284
|
+
appearance: appearance,
|
|
285
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
279
286
|
}, customContentComponents && 'before' in customContentComponents ? contentComponentClickWrapper(customContentComponents.before) : contentComponentClickWrapper(customContentComponents), jsx(PluginSlot, {
|
|
280
287
|
editorView: editorView,
|
|
281
288
|
editorActions: editorActions,
|
|
@@ -205,7 +205,7 @@ const contentAreaHeightNoToolbar = css({
|
|
|
205
205
|
export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
206
206
|
export const EDITOR_CONTAINER = 'ak-editor-container';
|
|
207
207
|
const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
208
|
-
var _props$editorAPI, _props$editorAPI$base, _props$editorAPI$base2, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
208
|
+
var _props$editorAPI, _props$editorAPI$base, _props$editorAPI$base2, _props$editorAPI$bloc, _props$editorAPI2, _props$editorAPI2$blo, _props$editorAPI2$blo2, _props$editorAPI2$blo3, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
209
209
|
const theme = useTheme();
|
|
210
210
|
const fullWidthMode = props.appearance === 'full-width';
|
|
211
211
|
const maxWidthMode = props.appearance === 'max';
|
|
@@ -214,6 +214,10 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
214
214
|
const containerRef = useRef(null);
|
|
215
215
|
const allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 ? void 0 : (_props$editorAPI$base = _props$editorAPI.base) === null || _props$editorAPI$base === void 0 ? void 0 : (_props$editorAPI$base2 = _props$editorAPI$base.sharedState.currentState()) === null || _props$editorAPI$base2 === void 0 ? void 0 : _props$editorAPI$base2.allowScrollGutter;
|
|
216
216
|
const contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : theme.layoutMaxWidth : akEditorFullWidthLayoutWidth);
|
|
217
|
+
|
|
218
|
+
// Get useStandardNodeWidth from block menu plugin shared state
|
|
219
|
+
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
220
|
+
const useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 ? void 0 : (_props$editorAPI2$blo = _props$editorAPI2.blockMenu) === null || _props$editorAPI2$blo === void 0 ? void 0 : (_props$editorAPI2$blo2 = _props$editorAPI2$blo.sharedState) === null || _props$editorAPI2$blo2 === void 0 ? void 0 : (_props$editorAPI2$blo3 = _props$editorAPI2$blo2.currentState()) === null || _props$editorAPI2$blo3 === void 0 ? void 0 : _props$editorAPI2$blo3.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false);
|
|
217
221
|
useImperativeHandle(ref, () => ({
|
|
218
222
|
get scrollContainer() {
|
|
219
223
|
return scrollContainerRef.current;
|
|
@@ -244,7 +248,8 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
244
248
|
viewMode: props === null || props === void 0 ? void 0 : props.viewMode,
|
|
245
249
|
isScrollable: true,
|
|
246
250
|
appearance: props.appearance,
|
|
247
|
-
contentMode: props.contentMode
|
|
251
|
+
contentMode: props.contentMode,
|
|
252
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
248
253
|
}, jsx(ClickAreaBlock, {
|
|
249
254
|
editorView: props.editorView,
|
|
250
255
|
editorDisabled: props.disabled
|
|
@@ -24,14 +24,14 @@ import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingB
|
|
|
24
24
|
import { blockMarksStyles } from './styles/blockMarksStyles';
|
|
25
25
|
import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
|
|
26
26
|
import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
|
|
27
|
-
import { codeMarkStyles } from './styles/codeMarkStyles';
|
|
27
|
+
import { codeMarkStyles, codeMarkStylesA11yFix } from './styles/codeMarkStyles';
|
|
28
28
|
import { commentEditorStyles } from './styles/commentEditorStyles';
|
|
29
29
|
import { cursorStyles } from './styles/cursorStyles';
|
|
30
30
|
import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
31
31
|
import { editorUGCSmallText, editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
32
32
|
import { embedCardStyles } from './styles/embedCardStyles';
|
|
33
33
|
import { emojiDangerStyles, emojiStyles, getDenseEmojiStyles, getScaledDenseEmojiStyles, scaledEmojiStyles } from './styles/emoji';
|
|
34
|
-
import { expandStyles, expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
|
|
34
|
+
import { expandStyles, expandStylesBase, expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
|
|
35
35
|
import { extensionDiffStyles, getExtensionStyles } from './styles/extensionStyles';
|
|
36
36
|
import { findReplaceStyles, findReplaceStylesNewWithA11Y, findReplaceStylesNewWithCodeblockColorContrastFix, findReplaceStylesWithCodeblockColorContrastFix } from './styles/findReplaceStyles';
|
|
37
37
|
import { firstBlockNodeStyles } from './styles/firstBlockNodeStyles';
|
|
@@ -58,7 +58,7 @@ import { selectionToolbarAnimationStyles } from './styles/selectionToolbarStyles
|
|
|
58
58
|
import { shadowStyles } from './styles/shadowStyles';
|
|
59
59
|
import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, showDiffDeletedNodeStyles, showDiffDeletedNodeStylesNew, smartCardDiffStyles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles } from './styles/smartCardStyles';
|
|
60
60
|
import { statusDangerStyles, statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_fg_platform_component_visual_refresh_with_search_match, statusStylesMixin_without_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, statusStylesTeam26 } from './styles/statusStyles';
|
|
61
|
-
import { syncBlockStyles, syncBlockFirstNodeStyles, syncBlockOverflowStyles } from './styles/syncBlockStyles';
|
|
61
|
+
import { syncBlockStyles, syncBlockStylesBase, syncBlockFirstNodeStyles, syncBlockOverflowStyles } from './styles/syncBlockStyles';
|
|
62
62
|
import { tableCommentEditorStyles, tableContainerStyles, tableEmptyRowStyles, tableLayoutFixes } from './styles/tableStyles';
|
|
63
63
|
import { decisionDangerStyles, decisionIconWithVisualRefresh, decisionStyles, getDenseTasksAndDecisionsStyles, taskItemCheckboxStyles, taskItemCheckboxStylesWithBlockTaskItem, taskItemNextCheckboxStyles, taskItemStyles, taskItemStylesWithBlockTaskItem, tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
|
|
64
64
|
import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telepointerStyles';
|
|
@@ -111,7 +111,8 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
111
111
|
viewMode,
|
|
112
112
|
isScrollable,
|
|
113
113
|
appearance,
|
|
114
|
-
contentMode
|
|
114
|
+
contentMode,
|
|
115
|
+
useStandardNodeWidth
|
|
115
116
|
} = props;
|
|
116
117
|
const theme = useTheme();
|
|
117
118
|
const {
|
|
@@ -222,7 +223,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
222
223
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
223
224
|
blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes,
|
|
224
225
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
225
|
-
codeMarkStyles,
|
|
226
|
+
codeMarkStyles, expValEquals('platform_editor_a11y_scrollable_region', 'isEnabled', true) &&
|
|
227
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
228
|
+
codeMarkStylesA11yFix,
|
|
226
229
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
227
230
|
textColorStyles,
|
|
228
231
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -296,7 +299,10 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
296
299
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
297
300
|
extensionDiffStyles,
|
|
298
301
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
299
|
-
|
|
302
|
+
expandStylesBase,
|
|
303
|
+
// Apply expand delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
304
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
305
|
+
!useStandardNodeWidth && expandStyles, contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
|
|
300
306
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
301
307
|
expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) &&
|
|
302
308
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -372,6 +378,11 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
372
378
|
// merge alignMultipleWrappedImageInLayoutStyles with layoutBaseStyles when clean up platform_editor_fix_media_in_renderer
|
|
373
379
|
fg('platform_editor_fix_media_in_renderer') && alignMultipleWrappedImageInLayoutStyles, editorExperiment('platform_synced_block', true) &&
|
|
374
380
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
381
|
+
syncBlockStylesBase, editorExperiment('platform_synced_block', true) &&
|
|
382
|
+
// Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
383
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
384
|
+
!useStandardNodeWidth &&
|
|
385
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
375
386
|
syncBlockStyles,
|
|
376
387
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
377
388
|
editorExperiment('platform_synced_block', true) && syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) &&
|
|
@@ -21,4 +21,12 @@ export const codeMarkStyles = css({
|
|
|
21
21
|
overflowWrap: 'break-word',
|
|
22
22
|
whiteSpace: 'pre-wrap'
|
|
23
23
|
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
27
|
+
export const codeMarkStylesA11yFix = css({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
29
|
+
'.code': {
|
|
30
|
+
overflow: 'unset'
|
|
31
|
+
}
|
|
24
32
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled */
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorFullPageDefaultFontSize, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
/**
|
|
5
|
+
* Base expand styles, always applied.
|
|
6
|
+
*/
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
-
export const
|
|
8
|
+
export const expandStylesBase = css({
|
|
6
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
7
10
|
'.ak-editor-expand__icon > div': {
|
|
8
11
|
display: 'flex'
|
|
@@ -76,11 +79,6 @@ export const expandStyles = css({
|
|
|
76
79
|
}
|
|
77
80
|
},
|
|
78
81
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
79
|
-
'.ProseMirror > .ak-editor-expand__type-expand, .fabric-editor-breakout-mark-dom > .ak-editor-expand__type-expand': {
|
|
80
|
-
marginLeft: "var(--ds-space-negative-150, -12px)",
|
|
81
|
-
marginRight: "var(--ds-space-negative-150, -12px)"
|
|
82
|
-
},
|
|
83
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
84
82
|
'.ak-editor-expand__content': {
|
|
85
83
|
// sharedExpandStyles.contentStyles({ expanded: false, focused: false })(),
|
|
86
84
|
paddingTop: "var(--ds-space-0, 0px)",
|
|
@@ -89,8 +87,8 @@ export const expandStyles = css({
|
|
|
89
87
|
marginLeft: "var(--ds-space-050, 4px)",
|
|
90
88
|
display: 'flow-root',
|
|
91
89
|
/* The follow rules inside @supports block are added as a part of ED-8893
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
The fix is targeting mobile bridge on iOS 12 or below,
|
|
91
|
+
We should consider remove this fix when we no longer support iOS 12 */
|
|
94
92
|
'@supports not (display: flow-root)': {
|
|
95
93
|
width: '100%',
|
|
96
94
|
boxSizing: 'border-box'
|
|
@@ -238,6 +236,16 @@ export const expandStyles = css({
|
|
|
238
236
|
}
|
|
239
237
|
});
|
|
240
238
|
|
|
239
|
+
// Export the default styles with negative margins (original behavior)
|
|
240
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
241
|
+
export const expandStyles = css({
|
|
242
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
243
|
+
'.ProseMirror > .ak-editor-expand__type-expand, .fabric-editor-breakout-mark-dom > .ak-editor-expand__type-expand': {
|
|
244
|
+
marginLeft: "var(--ds-space-negative-150, -12px)",
|
|
245
|
+
marginRight: "var(--ds-space-negative-150, -12px)"
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
|
|
241
249
|
/**
|
|
242
250
|
* This function gets the dynamic styles that scale the expand title font size based on the base font size.
|
|
243
251
|
* If the base font size is not the default font size, we want the expand title font size to match the base font size.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { css, keyframes } from '@emotion/react';
|
|
3
3
|
import { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
-
export const
|
|
5
|
+
export const syncBlockStylesBase = css({
|
|
6
6
|
'@property --angle': {
|
|
7
7
|
syntax: '"<angle>"',
|
|
8
8
|
initialValue: '0deg',
|
|
@@ -15,8 +15,6 @@ export const syncBlockStyles = css({
|
|
|
15
15
|
position: 'relative',
|
|
16
16
|
cursor: 'pointer',
|
|
17
17
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
18
|
-
marginRight: `-18px`,
|
|
19
|
-
marginLeft: `-18px`,
|
|
20
18
|
marginBottom: 0,
|
|
21
19
|
marginTop: "var(--ds-space-075, 6px)",
|
|
22
20
|
paddingBlock: "var(--ds-space-150, 12px)",
|
|
@@ -204,6 +202,19 @@ export const syncBlockStyles = css({
|
|
|
204
202
|
}
|
|
205
203
|
});
|
|
206
204
|
|
|
205
|
+
// Export the default styles with negative margins (original behavior)
|
|
206
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
207
|
+
export const syncBlockStyles = css({
|
|
208
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
209
|
+
'.ProseMirror': {
|
|
210
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
211
|
+
[`.${SyncBlockSharedCssClassName.prefix}, .${BodiedSyncBlockSharedCssClassName.prefix}`]: {
|
|
212
|
+
marginRight: `-18px`,
|
|
213
|
+
marginLeft: `-18px`
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
207
218
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
208
219
|
export const syncBlockOverflowStyles = css({
|
|
209
220
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "217.8.
|
|
2
|
+
export const version = "217.8.3";
|
|
@@ -80,7 +80,7 @@ import { createDefaultPreset } from './default';
|
|
|
80
80
|
* @returns a full featured preset configured according to the provided props - basis for create-plugins-list
|
|
81
81
|
*/
|
|
82
82
|
export default function createUniversalPresetInternal(_ref) {
|
|
83
|
-
var _featureFlags$lpLinkP, _initialPluginConfigu, _initialPluginConfigu2, _initialPluginConfigu3, _initialPluginConfigu4, _initialPluginConfigu5, _initialPluginConfigu6, _props$media, _props$media2, _props$media3, _props$media4, _props$media5, _props$media6, _props$media7, _props$mention$insert, _props$mention, _props$mention2, _props$mention3, _props$collabEdit$EXP, _props$collabEdit, _props$linking, _props$linking2, _featureFlags$lpLinkP2, _props$linking3, _props$primaryToolbar;
|
|
83
|
+
var _featureFlags$lpLinkP, _initialPluginConfigu, _initialPluginConfigu2, _initialPluginConfigu3, _initialPluginConfigu4, _initialPluginConfigu5, _initialPluginConfigu6, _initialPluginConfigu7, _initialPluginConfigu8, _props$media, _props$media2, _props$media3, _props$media4, _props$media5, _props$media6, _props$media7, _props$mention$insert, _props$mention, _props$mention2, _props$mention3, _props$collabEdit$EXP, _props$collabEdit, _props$linking, _props$linking2, _featureFlags$lpLinkP2, _props$linking3, _props$primaryToolbar;
|
|
84
84
|
var appearance = _ref.appearance,
|
|
85
85
|
props = _ref.props,
|
|
86
86
|
featureFlags = _ref.featureFlags,
|
|
@@ -112,7 +112,9 @@ export default function createUniversalPresetInternal(_ref) {
|
|
|
112
112
|
};
|
|
113
113
|
var finalPreset = defaultPreset.add(ufoPlugin).add(dataConsumerPlugin).add(accessibilityUtilsPlugin).add(contentInsertionPlugin).add(batchAttributeUpdatesPlugin).maybeAdd([blockControlsPlugin, {
|
|
114
114
|
quickInsertButtonEnabled: (_initialPluginConfigu = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu2 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu2 === void 0 ? void 0 : _initialPluginConfigu2.quickInsertButtonEnabled) !== null && _initialPluginConfigu !== void 0 ? _initialPluginConfigu : true
|
|
115
|
-
}], Boolean((_initialPluginConfigu3 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu4 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu4 === void 0 ? void 0 : _initialPluginConfigu4.enabled) !== null && _initialPluginConfigu3 !== void 0 ? _initialPluginConfigu3 : false)).maybeAdd([blockMenuPlugin, {
|
|
115
|
+
}], Boolean((_initialPluginConfigu3 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu4 = initialPluginConfiguration.blockControlsPlugin) === null || _initialPluginConfigu4 === void 0 ? void 0 : _initialPluginConfigu4.enabled) !== null && _initialPluginConfigu3 !== void 0 ? _initialPluginConfigu3 : false)).maybeAdd([blockMenuPlugin, {
|
|
116
|
+
useStandardNodeWidth: (_initialPluginConfigu5 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu6 = initialPluginConfiguration.blockMenuPlugin) === null || _initialPluginConfigu6 === void 0 ? void 0 : _initialPluginConfigu6.useStandardNodeWidth) !== null && _initialPluginConfigu5 !== void 0 ? _initialPluginConfigu5 : false
|
|
117
|
+
}], Boolean((_initialPluginConfigu7 = initialPluginConfiguration === null || initialPluginConfiguration === void 0 || (_initialPluginConfigu8 = initialPluginConfiguration.blockMenuPlugin) === null || _initialPluginConfigu8 === void 0 ? void 0 : _initialPluginConfigu8.enabled) !== null && _initialPluginConfigu7 !== void 0 ? _initialPluginConfigu7 : false)).maybeAdd([breakoutPlugin, {
|
|
116
118
|
allowBreakoutButton: appearance === 'full-page',
|
|
117
119
|
appearance: appearance
|
|
118
120
|
}], Boolean(props.allowBreakout && (isFullPage || appearance === 'max' && (expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEqualsNoExposure('confluence_max_width_content_appearance', 'isEnabled', true)) && fg('platform_editor_breakout_in_universal_preset')))).maybeAdd(alignmentPlugin, Boolean(props.allowTextAlignment)).maybeAdd([textColorPlugin, props.allowTextColor], Boolean(props.allowTextColor)).add(listPlugin).maybeAdd(rulePlugin, Boolean(props.allowRule)).maybeAdd([expandPlugin, {
|
|
@@ -18,6 +18,7 @@ import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
18
18
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
19
19
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
21
22
|
// Ignored via go/ees005
|
|
22
23
|
// eslint-disable-next-line import/no-named-as-default
|
|
23
24
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
@@ -92,7 +93,12 @@ var mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = css(_defineProperty(
|
|
|
92
93
|
}));
|
|
93
94
|
var appearance = 'comment';
|
|
94
95
|
export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
96
|
+
var _editorAPI$blockMenu$, _editorAPI$blockMenu;
|
|
95
97
|
var editorAPI = props.editorAPI;
|
|
98
|
+
|
|
99
|
+
// Get useStandardNodeWidth from block menu plugin shared state
|
|
100
|
+
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
101
|
+
var useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.currentState()) === null || _editorAPI$blockMenu === void 0 ? void 0 : _editorAPI$blockMenu.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
|
|
96
102
|
var _useSharedPluginState = useSharedPluginStateWithSelector(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
|
|
97
103
|
var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
|
|
98
104
|
return {
|
|
@@ -275,7 +281,8 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
275
281
|
}),
|
|
276
282
|
featureFlags: featureFlags,
|
|
277
283
|
viewMode: editorViewMode,
|
|
278
|
-
appearance: appearance
|
|
284
|
+
appearance: appearance,
|
|
285
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
279
286
|
}, customContentComponents && 'before' in customContentComponents ? contentComponentClickWrapper(customContentComponents.before) : contentComponentClickWrapper(customContentComponents), jsx(PluginSlot, {
|
|
280
287
|
editorView: editorView,
|
|
281
288
|
editorActions: editorActions,
|
|
@@ -203,7 +203,7 @@ var contentAreaHeightNoToolbar = css({
|
|
|
203
203
|
export var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
204
204
|
export var EDITOR_CONTAINER = 'ak-editor-container';
|
|
205
205
|
var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
206
|
-
var _props$editorAPI, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
206
|
+
var _props$editorAPI, _props$editorAPI$bloc, _props$editorAPI2, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
207
207
|
var theme = useTheme();
|
|
208
208
|
var fullWidthMode = props.appearance === 'full-width';
|
|
209
209
|
var maxWidthMode = props.appearance === 'max';
|
|
@@ -212,6 +212,10 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
212
212
|
var containerRef = useRef(null);
|
|
213
213
|
var allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.base) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.sharedState.currentState()) === null || _props$editorAPI === void 0 ? void 0 : _props$editorAPI.allowScrollGutter;
|
|
214
214
|
var contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : theme.layoutMaxWidth : akEditorFullWidthLayoutWidth);
|
|
215
|
+
|
|
216
|
+
// Get useStandardNodeWidth from block menu plugin shared state
|
|
217
|
+
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
218
|
+
var useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.blockMenu) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.sharedState) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.currentState()) === null || _props$editorAPI2 === void 0 ? void 0 : _props$editorAPI2.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false);
|
|
215
219
|
useImperativeHandle(ref, function () {
|
|
216
220
|
return {
|
|
217
221
|
get scrollContainer() {
|
|
@@ -244,7 +248,8 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
244
248
|
viewMode: props === null || props === void 0 ? void 0 : props.viewMode,
|
|
245
249
|
isScrollable: true,
|
|
246
250
|
appearance: props.appearance,
|
|
247
|
-
contentMode: props.contentMode
|
|
251
|
+
contentMode: props.contentMode,
|
|
252
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
248
253
|
}, jsx(ClickAreaBlock, {
|
|
249
254
|
editorView: props.editorView,
|
|
250
255
|
editorDisabled: props.disabled
|
|
@@ -25,14 +25,14 @@ import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingB
|
|
|
25
25
|
import { blockMarksStyles } from './styles/blockMarksStyles';
|
|
26
26
|
import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
|
|
27
27
|
import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
|
|
28
|
-
import { codeMarkStyles } from './styles/codeMarkStyles';
|
|
28
|
+
import { codeMarkStyles, codeMarkStylesA11yFix } from './styles/codeMarkStyles';
|
|
29
29
|
import { commentEditorStyles } from './styles/commentEditorStyles';
|
|
30
30
|
import { cursorStyles } from './styles/cursorStyles';
|
|
31
31
|
import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
32
32
|
import { editorUGCSmallText, editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
33
33
|
import { embedCardStyles } from './styles/embedCardStyles';
|
|
34
34
|
import { emojiDangerStyles, emojiStyles, getDenseEmojiStyles, getScaledDenseEmojiStyles, scaledEmojiStyles } from './styles/emoji';
|
|
35
|
-
import { expandStyles, expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
|
|
35
|
+
import { expandStyles, expandStylesBase, expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
|
|
36
36
|
import { extensionDiffStyles, getExtensionStyles } from './styles/extensionStyles';
|
|
37
37
|
import { findReplaceStyles, findReplaceStylesNewWithA11Y, findReplaceStylesNewWithCodeblockColorContrastFix, findReplaceStylesWithCodeblockColorContrastFix } from './styles/findReplaceStyles';
|
|
38
38
|
import { firstBlockNodeStyles } from './styles/firstBlockNodeStyles';
|
|
@@ -59,7 +59,7 @@ import { selectionToolbarAnimationStyles } from './styles/selectionToolbarStyles
|
|
|
59
59
|
import { shadowStyles } from './styles/shadowStyles';
|
|
60
60
|
import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, showDiffDeletedNodeStyles, showDiffDeletedNodeStylesNew, smartCardDiffStyles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles } from './styles/smartCardStyles';
|
|
61
61
|
import { statusDangerStyles, statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_fg_platform_component_visual_refresh_with_search_match, statusStylesMixin_without_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, statusStylesTeam26 } from './styles/statusStyles';
|
|
62
|
-
import { syncBlockStyles, syncBlockFirstNodeStyles, syncBlockOverflowStyles } from './styles/syncBlockStyles';
|
|
62
|
+
import { syncBlockStyles, syncBlockStylesBase, syncBlockFirstNodeStyles, syncBlockOverflowStyles } from './styles/syncBlockStyles';
|
|
63
63
|
import { tableCommentEditorStyles, tableContainerStyles, tableEmptyRowStyles, tableLayoutFixes } from './styles/tableStyles';
|
|
64
64
|
import { decisionDangerStyles, decisionIconWithVisualRefresh, decisionStyles, getDenseTasksAndDecisionsStyles, taskItemCheckboxStyles, taskItemCheckboxStylesWithBlockTaskItem, taskItemNextCheckboxStyles, taskItemStyles, taskItemStylesWithBlockTaskItem, tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
|
|
65
65
|
import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telepointerStyles';
|
|
@@ -109,7 +109,8 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
109
109
|
viewMode = props.viewMode,
|
|
110
110
|
isScrollable = props.isScrollable,
|
|
111
111
|
appearance = props.appearance,
|
|
112
|
-
contentMode = props.contentMode
|
|
112
|
+
contentMode = props.contentMode,
|
|
113
|
+
useStandardNodeWidth = props.useStandardNodeWidth;
|
|
113
114
|
var theme = useTheme();
|
|
114
115
|
var _useThemeObserver = useThemeObserver(),
|
|
115
116
|
colorMode = _useThemeObserver.colorMode;
|
|
@@ -218,7 +219,9 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
218
219
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
219
220
|
blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes,
|
|
220
221
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
221
|
-
codeMarkStyles,
|
|
222
|
+
codeMarkStyles, expValEquals('platform_editor_a11y_scrollable_region', 'isEnabled', true) &&
|
|
223
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
224
|
+
codeMarkStylesA11yFix,
|
|
222
225
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
223
226
|
textColorStyles,
|
|
224
227
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -292,7 +295,10 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
292
295
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
293
296
|
extensionDiffStyles,
|
|
294
297
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
295
|
-
|
|
298
|
+
expandStylesBase,
|
|
299
|
+
// Apply expand delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
300
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
301
|
+
!useStandardNodeWidth && expandStyles, contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
|
|
296
302
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
297
303
|
expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) &&
|
|
298
304
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -368,6 +374,11 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
368
374
|
// merge alignMultipleWrappedImageInLayoutStyles with layoutBaseStyles when clean up platform_editor_fix_media_in_renderer
|
|
369
375
|
fg('platform_editor_fix_media_in_renderer') && alignMultipleWrappedImageInLayoutStyles, editorExperiment('platform_synced_block', true) &&
|
|
370
376
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
377
|
+
syncBlockStylesBase, editorExperiment('platform_synced_block', true) &&
|
|
378
|
+
// Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
379
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
380
|
+
!useStandardNodeWidth &&
|
|
381
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
371
382
|
syncBlockStyles,
|
|
372
383
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
373
384
|
editorExperiment('platform_synced_block', true) && syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) &&
|
|
@@ -21,4 +21,12 @@ export var codeMarkStyles = css({
|
|
|
21
21
|
overflowWrap: 'break-word',
|
|
22
22
|
whiteSpace: 'pre-wrap'
|
|
23
23
|
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
27
|
+
export var codeMarkStylesA11yFix = css({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
29
|
+
'.code': {
|
|
30
|
+
overflow: 'unset'
|
|
31
|
+
}
|
|
24
32
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled */
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorFullPageDefaultFontSize, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
/**
|
|
5
|
+
* Base expand styles, always applied.
|
|
6
|
+
*/
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
-
export var
|
|
8
|
+
export var expandStylesBase = css({
|
|
6
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
7
10
|
'.ak-editor-expand__icon > div': {
|
|
8
11
|
display: 'flex'
|
|
@@ -76,11 +79,6 @@ export var expandStyles = css({
|
|
|
76
79
|
}
|
|
77
80
|
},
|
|
78
81
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
79
|
-
'.ProseMirror > .ak-editor-expand__type-expand, .fabric-editor-breakout-mark-dom > .ak-editor-expand__type-expand': {
|
|
80
|
-
marginLeft: "var(--ds-space-negative-150, -12px)",
|
|
81
|
-
marginRight: "var(--ds-space-negative-150, -12px)"
|
|
82
|
-
},
|
|
83
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
84
82
|
'.ak-editor-expand__content': {
|
|
85
83
|
// sharedExpandStyles.contentStyles({ expanded: false, focused: false })(),
|
|
86
84
|
paddingTop: "var(--ds-space-0, 0px)",
|
|
@@ -89,8 +87,8 @@ export var expandStyles = css({
|
|
|
89
87
|
marginLeft: "var(--ds-space-050, 4px)",
|
|
90
88
|
display: 'flow-root',
|
|
91
89
|
/* The follow rules inside @supports block are added as a part of ED-8893
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
The fix is targeting mobile bridge on iOS 12 or below,
|
|
91
|
+
We should consider remove this fix when we no longer support iOS 12 */
|
|
94
92
|
'@supports not (display: flow-root)': {
|
|
95
93
|
width: '100%',
|
|
96
94
|
boxSizing: 'border-box'
|
|
@@ -238,6 +236,16 @@ export var expandStyles = css({
|
|
|
238
236
|
}
|
|
239
237
|
});
|
|
240
238
|
|
|
239
|
+
// Export the default styles with negative margins (original behavior)
|
|
240
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
241
|
+
export var expandStyles = css({
|
|
242
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
243
|
+
'.ProseMirror > .ak-editor-expand__type-expand, .fabric-editor-breakout-mark-dom > .ak-editor-expand__type-expand': {
|
|
244
|
+
marginLeft: "var(--ds-space-negative-150, -12px)",
|
|
245
|
+
marginRight: "var(--ds-space-negative-150, -12px)"
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
|
|
241
249
|
/**
|
|
242
250
|
* This function gets the dynamic styles that scale the expand title font size based on the base font size.
|
|
243
251
|
* If the base font size is not the default font size, we want the expand title font size to match the base font size.
|
|
@@ -4,7 +4,7 @@ var _$concat$concat;
|
|
|
4
4
|
import { css, keyframes } from '@emotion/react';
|
|
5
5
|
import { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, SyncBlockStateCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
7
|
-
export var
|
|
7
|
+
export var syncBlockStylesBase = css(_defineProperty({
|
|
8
8
|
'@property --angle': {
|
|
9
9
|
syntax: '"<angle>"',
|
|
10
10
|
initialValue: '0deg',
|
|
@@ -15,8 +15,6 @@ export var syncBlockStyles = css(_defineProperty({
|
|
|
15
15
|
position: 'relative',
|
|
16
16
|
cursor: 'pointer',
|
|
17
17
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
18
|
-
marginRight: "-18px",
|
|
19
|
-
marginLeft: "-18px",
|
|
20
18
|
marginBottom: 0,
|
|
21
19
|
marginTop: "var(--ds-space-075, 6px)",
|
|
22
20
|
paddingBlock: "var(--ds-space-150, 12px)",
|
|
@@ -148,6 +146,16 @@ export var syncBlockStyles = css(_defineProperty({
|
|
|
148
146
|
maxWidth: '140px'
|
|
149
147
|
}));
|
|
150
148
|
|
|
149
|
+
// Export the default styles with negative margins (original behavior)
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
151
|
+
export var syncBlockStyles = css({
|
|
152
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
153
|
+
'.ProseMirror': _defineProperty({}, ".".concat(SyncBlockSharedCssClassName.prefix, ", .").concat(BodiedSyncBlockSharedCssClassName.prefix), {
|
|
154
|
+
marginRight: "-18px",
|
|
155
|
+
marginLeft: "-18px"
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
|
|
151
159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
152
160
|
export var syncBlockOverflowStyles = css({
|
|
153
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "217.8.
|
|
2
|
+
export var version = "217.8.3";
|
|
@@ -21,6 +21,7 @@ export type InitialPluginConfiguration = {
|
|
|
21
21
|
};
|
|
22
22
|
blockMenuPlugin?: {
|
|
23
23
|
enabled?: boolean;
|
|
24
|
+
useStandardNodeWidth?: boolean;
|
|
24
25
|
};
|
|
25
26
|
blockTypePlugin?: {
|
|
26
27
|
allowFontSize?: boolean;
|
|
@@ -456,7 +457,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
456
457
|
setMultiSelectPositions: (anchor?: number, head?: number) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
457
458
|
setNodeDragged: (getPos: () => number | undefined, anchorName: string, nodeType: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
458
459
|
setSelectedViaDragHandle: (isSelectedViaDragHandle?: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
459
|
-
showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: import("@atlaskit/editor-plugins/block-controls").HandleOptions, rootPos?: number, rootAnchorName?: string, rootNodeType
|
|
460
|
+
showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: import("@atlaskit/editor-plugins/block-controls").HandleOptions, rootPos?: number, rootAnchorName?: string, rootNodeType? /**
|
|
461
|
+
* Allows configuring plugins as the universal preset blocks direct access
|
|
462
|
+
* to configuring plugins.
|
|
463
|
+
*/: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
460
464
|
startPreservingSelection: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
461
465
|
stopPreservingSelection: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
462
466
|
toggleBlockMenu: (options?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
|
|
3
4
|
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
4
5
|
import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
|
|
5
6
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
@@ -9,7 +10,8 @@ type ComponentProps = EditorAppearanceComponentProps<[
|
|
|
9
10
|
OptionalPlugin<MediaPlugin>,
|
|
10
11
|
OptionalPlugin<MaxContentSizePlugin>,
|
|
11
12
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
12
|
-
OptionalPlugin<ToolbarPlugin
|
|
13
|
+
OptionalPlugin<ToolbarPlugin>,
|
|
14
|
+
OptionalPlugin<BlockMenuPlugin>
|
|
13
15
|
]>;
|
|
14
16
|
export declare const CommentEditorWithIntl: {
|
|
15
17
|
(props: ComponentProps): jsx.JSX.Element;
|
|
@@ -10,12 +10,18 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
10
10
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
11
11
|
import type { EditorAppearance, EditorContentMode, FeatureFlags, OptionalPlugin, PublicPluginAPI, ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
|
|
12
12
|
import type { BasePlugin } from '@atlaskit/editor-plugins/base';
|
|
13
|
+
import type { BlockMenuPlugin } from '@atlaskit/editor-plugins/block-menu';
|
|
13
14
|
import type { ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
|
|
14
15
|
import type { ViewMode } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
15
16
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
16
17
|
import type EditorActions from '../../../actions';
|
|
17
18
|
import type { ContentComponents, ReactComponents } from '../../../types';
|
|
18
19
|
import type { ScrollContainerRefs } from './types';
|
|
20
|
+
type EditorAPI = PublicPluginAPI<[
|
|
21
|
+
OptionalPlugin<ContextPanelPlugin>,
|
|
22
|
+
BasePlugin,
|
|
23
|
+
OptionalPlugin<BlockMenuPlugin>
|
|
24
|
+
]>;
|
|
19
25
|
interface FullPageEditorContentAreaProps {
|
|
20
26
|
appearance: EditorAppearance | undefined;
|
|
21
27
|
contentComponents: UIComponentFactory[] | undefined;
|
|
@@ -25,7 +31,7 @@ interface FullPageEditorContentAreaProps {
|
|
|
25
31
|
disabled: boolean | undefined;
|
|
26
32
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
|
|
27
33
|
editorActions: EditorActions | undefined;
|
|
28
|
-
editorAPI:
|
|
34
|
+
editorAPI: EditorAPI | undefined;
|
|
29
35
|
editorDOMElement: ReactElement;
|
|
30
36
|
editorView: EditorView;
|
|
31
37
|
eventDispatcher: EventDispatcher | undefined;
|
|
@@ -11,6 +11,11 @@ export type EditorContentContainerProps = {
|
|
|
11
11
|
contentMode?: EditorContentMode;
|
|
12
12
|
featureFlags?: FeatureFlags;
|
|
13
13
|
isScrollable?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* When true, nodes maintain their standard width without negative margins
|
|
16
|
+
* For when the drag handle is visible and the editor has limited space.
|
|
17
|
+
*/
|
|
18
|
+
useStandardNodeWidth?: boolean;
|
|
14
19
|
viewMode?: 'view' | 'edit';
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
/**
|
|
3
|
+
* Base expand styles, always applied.
|
|
4
|
+
*/
|
|
5
|
+
export declare const expandStylesBase: SerializedStyles;
|
|
2
6
|
export declare const expandStyles: SerializedStyles;
|
|
3
7
|
/**
|
|
4
8
|
* This function gets the dynamic styles that scale the expand title font size based on the base font size.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const syncBlockStylesBase: SerializedStyles;
|
|
2
3
|
export declare const syncBlockStyles: SerializedStyles;
|
|
3
4
|
export declare const syncBlockOverflowStyles: SerializedStyles;
|
|
4
5
|
export declare const syncBlockFirstNodeStyles: SerializedStyles;
|
|
@@ -21,6 +21,7 @@ export type InitialPluginConfiguration = {
|
|
|
21
21
|
};
|
|
22
22
|
blockMenuPlugin?: {
|
|
23
23
|
enabled?: boolean;
|
|
24
|
+
useStandardNodeWidth?: boolean;
|
|
24
25
|
};
|
|
25
26
|
blockTypePlugin?: {
|
|
26
27
|
allowFontSize?: boolean;
|
|
@@ -616,7 +617,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
616
617
|
setMultiSelectPositions: (anchor?: number, head?: number) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
617
618
|
setNodeDragged: (getPos: () => number | undefined, anchorName: string, nodeType: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
618
619
|
setSelectedViaDragHandle: (isSelectedViaDragHandle?: boolean) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
619
|
-
showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: import("@atlaskit/editor-plugins/block-controls").HandleOptions, rootPos?: number, rootAnchorName?: string, rootNodeType
|
|
620
|
+
showDragHandleAt: (pos: number, anchorName: string, nodeType: string, handleOptions?: import("@atlaskit/editor-plugins/block-controls").HandleOptions, rootPos?: number, rootAnchorName?: string, rootNodeType? /**
|
|
621
|
+
* Allows configuring plugins as the universal preset blocks direct access
|
|
622
|
+
* to configuring plugins.
|
|
623
|
+
*/: string) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
620
624
|
startPreservingSelection: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
621
625
|
stopPreservingSelection: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
622
626
|
toggleBlockMenu: (options?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
|
|
3
4
|
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
4
5
|
import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
|
|
5
6
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
@@ -9,7 +10,8 @@ type ComponentProps = EditorAppearanceComponentProps<[
|
|
|
9
10
|
OptionalPlugin<MediaPlugin>,
|
|
10
11
|
OptionalPlugin<MaxContentSizePlugin>,
|
|
11
12
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
12
|
-
OptionalPlugin<ToolbarPlugin
|
|
13
|
+
OptionalPlugin<ToolbarPlugin>,
|
|
14
|
+
OptionalPlugin<BlockMenuPlugin>
|
|
13
15
|
]>;
|
|
14
16
|
export declare const CommentEditorWithIntl: {
|
|
15
17
|
(props: ComponentProps): jsx.JSX.Element;
|
|
@@ -10,12 +10,18 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
|
10
10
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
11
11
|
import type { EditorAppearance, EditorContentMode, FeatureFlags, OptionalPlugin, PublicPluginAPI, ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
|
|
12
12
|
import type { BasePlugin } from '@atlaskit/editor-plugins/base';
|
|
13
|
+
import type { BlockMenuPlugin } from '@atlaskit/editor-plugins/block-menu';
|
|
13
14
|
import type { ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
|
|
14
15
|
import type { ViewMode } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
15
16
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
16
17
|
import type EditorActions from '../../../actions';
|
|
17
18
|
import type { ContentComponents, ReactComponents } from '../../../types';
|
|
18
19
|
import type { ScrollContainerRefs } from './types';
|
|
20
|
+
type EditorAPI = PublicPluginAPI<[
|
|
21
|
+
OptionalPlugin<ContextPanelPlugin>,
|
|
22
|
+
BasePlugin,
|
|
23
|
+
OptionalPlugin<BlockMenuPlugin>
|
|
24
|
+
]>;
|
|
19
25
|
interface FullPageEditorContentAreaProps {
|
|
20
26
|
appearance: EditorAppearance | undefined;
|
|
21
27
|
contentComponents: UIComponentFactory[] | undefined;
|
|
@@ -25,10 +31,7 @@ interface FullPageEditorContentAreaProps {
|
|
|
25
31
|
disabled: boolean | undefined;
|
|
26
32
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
|
|
27
33
|
editorActions: EditorActions | undefined;
|
|
28
|
-
editorAPI:
|
|
29
|
-
OptionalPlugin<ContextPanelPlugin>,
|
|
30
|
-
BasePlugin
|
|
31
|
-
]> | undefined;
|
|
34
|
+
editorAPI: EditorAPI | undefined;
|
|
32
35
|
editorDOMElement: ReactElement;
|
|
33
36
|
editorView: EditorView;
|
|
34
37
|
eventDispatcher: EventDispatcher | undefined;
|
|
@@ -11,6 +11,11 @@ export type EditorContentContainerProps = {
|
|
|
11
11
|
contentMode?: EditorContentMode;
|
|
12
12
|
featureFlags?: FeatureFlags;
|
|
13
13
|
isScrollable?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* When true, nodes maintain their standard width without negative margins
|
|
16
|
+
* For when the drag handle is visible and the editor has limited space.
|
|
17
|
+
*/
|
|
18
|
+
useStandardNodeWidth?: boolean;
|
|
14
19
|
viewMode?: 'view' | 'edit';
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
/**
|
|
3
|
+
* Base expand styles, always applied.
|
|
4
|
+
*/
|
|
5
|
+
export declare const expandStylesBase: SerializedStyles;
|
|
2
6
|
export declare const expandStyles: SerializedStyles;
|
|
3
7
|
/**
|
|
4
8
|
* This function gets the dynamic styles that scale the expand title font size based on the base font size.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const syncBlockStylesBase: SerializedStyles;
|
|
2
3
|
export declare const syncBlockStyles: SerializedStyles;
|
|
3
4
|
export declare const syncBlockOverflowStyles: SerializedStyles;
|
|
4
5
|
export declare const syncBlockFirstNodeStyles: SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "217.
|
|
3
|
+
"version": "217.9.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@atlaskit/mention": "^24.6.0",
|
|
65
65
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
66
66
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
67
|
-
"@atlaskit/react-ufo": "^5.
|
|
67
|
+
"@atlaskit/react-ufo": "^5.8.0",
|
|
68
68
|
"@atlaskit/task-decision": "^19.3.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^51.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^51.1.0",
|
|
70
70
|
"@atlaskit/tokens": "^11.4.0",
|
|
71
71
|
"@atlaskit/tooltip": "^21.0.0",
|
|
72
72
|
"@atlaskit/width-detector": "^5.0.0",
|