@atlaskit/editor-core 193.24.19 → 193.24.20
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 +23 -0
- package/create-editor-content-style/package.json +15 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/keymaps/index.js +24 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +4 -8
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -5
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +12 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/keymaps/index.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -8
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -5
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +12 -8
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/keymaps/index.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +4 -8
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -5
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +13 -8
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-preset.d.ts +270 -111
- package/dist/types/index.d.ts +1 -0
- package/dist/types/keymaps/index.d.ts +1 -1
- package/dist/types/presets/default.d.ts +496 -84
- package/dist/types/presets/universal.d.ts +270 -111
- package/dist/types/presets/useUniversalPreset.d.ts +270 -111
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +320 -117
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/keymaps/index.d.ts +1 -1
- package/dist/types-ts4.5/presets/default.d.ts +1711 -1201
- package/dist/types-ts4.5/presets/universal.d.ts +320 -117
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +320 -117
- package/i18n-languages/package.json +15 -0
- package/package.json +21 -23
- package/tsconfig.json +2 -3
- package/use-preset-context/package.json +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 193.24.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#105253](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105253)
|
|
8
|
+
[`a5f3cd26fbd6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a5f3cd26fbd6) -
|
|
9
|
+
Clean up platform.editor.enable-localid-for-paragraph-in-stage-0_cby7g FF
|
|
10
|
+
- [#108295](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108295)
|
|
11
|
+
[`965a0e6c1088`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/965a0e6c1088) -
|
|
12
|
+
NO-ISSUE Condition adding primary toolbar plugin components based on their presence instead of on
|
|
13
|
+
the feature flag to avoid it not rendering in examples
|
|
14
|
+
- [#106586](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/106586)
|
|
15
|
+
[`861ecd061c72`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/861ecd061c72) -
|
|
16
|
+
Increase the editor page guttering for full page appearance to support block drag and drop
|
|
17
|
+
- [#105533](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105533)
|
|
18
|
+
[`ba448905afaf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ba448905afaf) -
|
|
19
|
+
ED-23459: Extracts example-helpers to editor-examples-helpers
|
|
20
|
+
- [#100714](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100714)
|
|
21
|
+
[`81849acfe13c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/81849acfe13c) -
|
|
22
|
+
ECA11Y-228: Added new shortcuts for insert column and row and added correct formatting for help
|
|
23
|
+
modal dialog
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 193.24.19
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-core/create-editor-content-style",
|
|
3
|
+
"main": "../dist/cjs/ui/ContentStyles/index.js",
|
|
4
|
+
"module": "../dist/esm/ui/ContentStyles/index.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/ui/ContentStyles/index.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/ui/ContentStyles/index.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.5 <5.4": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.5/ui/ContentStyles/index.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -130,6 +130,12 @@ Object.defineProperty(exports, "WithHelpTrigger", {
|
|
|
130
130
|
return _WithHelpTrigger.default;
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
+
Object.defineProperty(exports, "createEditorContentStyle", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function get() {
|
|
136
|
+
return _ContentStyles.createEditorContentStyle;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
133
139
|
Object.defineProperty(exports, "getNodesCount", {
|
|
134
140
|
enumerable: true,
|
|
135
141
|
get: function get() {
|
|
@@ -178,6 +184,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
178
184
|
var _utils = require("./utils");
|
|
179
185
|
var _actions = _interopRequireDefault(require("./actions"));
|
|
180
186
|
var _portalProvider = require("@atlaskit/editor-common/portal-provider");
|
|
187
|
+
var _ContentStyles = require("./ui/ContentStyles");
|
|
181
188
|
// [ED-22843] use FF in editor-core for sake of example
|
|
182
189
|
|
|
183
190
|
// Used in products integration code
|
|
@@ -93,12 +93,24 @@ Object.defineProperty(exports, "addColumnAfter", {
|
|
|
93
93
|
return _keymaps.addColumnAfter;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
+
Object.defineProperty(exports, "addColumnAfterVO", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function get() {
|
|
99
|
+
return _keymaps.addColumnAfterVO;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
96
102
|
Object.defineProperty(exports, "addColumnBefore", {
|
|
97
103
|
enumerable: true,
|
|
98
104
|
get: function get() {
|
|
99
105
|
return _keymaps.addColumnBefore;
|
|
100
106
|
}
|
|
101
107
|
});
|
|
108
|
+
Object.defineProperty(exports, "addColumnBeforeVO", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function get() {
|
|
111
|
+
return _keymaps.addColumnBeforeVO;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
102
114
|
Object.defineProperty(exports, "addInlineComment", {
|
|
103
115
|
enumerable: true,
|
|
104
116
|
get: function get() {
|
|
@@ -117,12 +129,24 @@ Object.defineProperty(exports, "addRowAfter", {
|
|
|
117
129
|
return _keymaps.addRowAfter;
|
|
118
130
|
}
|
|
119
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "addRowAfterVO", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function get() {
|
|
135
|
+
return _keymaps.addRowAfterVO;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
120
138
|
Object.defineProperty(exports, "addRowBefore", {
|
|
121
139
|
enumerable: true,
|
|
122
140
|
get: function get() {
|
|
123
141
|
return _keymaps.addRowBefore;
|
|
124
142
|
}
|
|
125
143
|
});
|
|
144
|
+
Object.defineProperty(exports, "addRowBeforeVO", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function get() {
|
|
147
|
+
return _keymaps.addRowBeforeVO;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
126
150
|
Object.defineProperty(exports, "alignCenter", {
|
|
127
151
|
enumerable: true,
|
|
128
152
|
get: function get() {
|
|
@@ -145,10 +145,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
145
145
|
event.stopPropagation();
|
|
146
146
|
};
|
|
147
147
|
var primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
148
|
-
if ((0
|
|
149
|
-
|
|
150
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
151
|
-
}
|
|
148
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
149
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
152
150
|
}
|
|
153
151
|
return (0, _react2.jsx)(_WithFlash.default, {
|
|
154
152
|
animate: maxContentSizeReached
|
|
@@ -342,10 +340,8 @@ var EditorNext = function EditorNext(props) {
|
|
|
342
340
|
event.stopPropagation();
|
|
343
341
|
}, [editorView]);
|
|
344
342
|
var primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
345
|
-
if ((0
|
|
346
|
-
|
|
347
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
348
|
-
}
|
|
343
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
344
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
349
345
|
}
|
|
350
346
|
return (0, _react2.jsx)(_WithFlash.default, {
|
|
351
347
|
animate: maxContentSizeReached
|
|
@@ -12,7 +12,6 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
13
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _context = require("../../../presets/context");
|
|
17
16
|
var _FullPageContentArea = require("./FullPageContentArea");
|
|
18
17
|
var _FullPageToolbar = require("./FullPageToolbar");
|
|
@@ -62,10 +61,8 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
62
61
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
63
62
|
primaryToolbarState = _useSharedPluginState.primaryToolbarState;
|
|
64
63
|
var primaryToolbarComponents = props.primaryToolbarComponents;
|
|
65
|
-
if ((0
|
|
66
|
-
|
|
67
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
68
|
-
}
|
|
64
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
65
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
69
66
|
}
|
|
70
67
|
var isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
71
68
|
return (0, _react2.jsx)(_ui.ContextPanelWidthProvider, null, (0, _react2.jsx)("div", {
|
|
@@ -11,11 +11,14 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
11
11
|
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
12
12
|
var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
|
|
13
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _ContentStyles = require("../../ContentStyles");
|
|
15
16
|
var _styles = require("../../styles");
|
|
16
17
|
var _ProseMirror;
|
|
17
18
|
var SWOOP_ANIMATION = "0.5s ".concat(_editorSharedStyles.akEditorSwoopCubicBezier);
|
|
18
|
-
var
|
|
19
|
+
var getTotalPadding = function getTotalPadding() {
|
|
20
|
+
return (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2;
|
|
21
|
+
};
|
|
19
22
|
var fullPageEditorWrapper = exports.fullPageEditorWrapper = (0, _react.css)({
|
|
20
23
|
minWidth: '340px',
|
|
21
24
|
height: '100%',
|
|
@@ -83,7 +86,7 @@ var editorContentAreaContainerStyle = function editorContentAreaContainerStyle(c
|
|
|
83
86
|
return (0, _react.css)({
|
|
84
87
|
'.fabric-editor--full-width-mode': {
|
|
85
88
|
'.code-block, .extension-container': {
|
|
86
|
-
maxWidth: "".concat(containerWidth -
|
|
89
|
+
maxWidth: "".concat(containerWidth - getTotalPadding() - _consts.tableMarginFullWidthMode * 2, "px")
|
|
87
90
|
},
|
|
88
91
|
'.extension-container.inline': {
|
|
89
92
|
maxWidth: '100%'
|
|
@@ -92,10 +95,10 @@ var editorContentAreaContainerStyle = function editorContentAreaContainerStyle(c
|
|
|
92
95
|
maxWidth: 'inherit'
|
|
93
96
|
},
|
|
94
97
|
'.multiBodiedExtension--container': {
|
|
95
|
-
maxWidth: "".concat(containerWidth -
|
|
98
|
+
maxWidth: "".concat(containerWidth - getTotalPadding() - _consts.tableMarginFullWidthMode * 2, "px")
|
|
96
99
|
},
|
|
97
100
|
'[data-layout-section]': {
|
|
98
|
-
maxWidth: "".concat(containerWidth -
|
|
101
|
+
maxWidth: "".concat(containerWidth - getTotalPadding() + _editorSharedStyles.akLayoutGutterOffset * 2, "px")
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
104
|
});
|
|
@@ -108,7 +111,8 @@ var editorContentAreaStyle = exports.editorContentAreaStyle = function editorCon
|
|
|
108
111
|
};
|
|
109
112
|
var editorContentAreaWithLayoutWith = function editorContentAreaWithLayoutWith(layoutMaxWidth) {
|
|
110
113
|
return (0, _react.css)({
|
|
111
|
-
|
|
114
|
+
// this restricts max width
|
|
115
|
+
maxWidth: "".concat(layoutMaxWidth + getTotalPadding(), "px")
|
|
112
116
|
});
|
|
113
117
|
};
|
|
114
118
|
var editorContentArea = (0, _react.css)({
|
|
@@ -120,7 +124,7 @@ var editorContentArea = (0, _react.css)({
|
|
|
120
124
|
margin: 'auto',
|
|
121
125
|
flexDirection: 'column',
|
|
122
126
|
flexGrow: 1,
|
|
123
|
-
maxWidth: "".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth +
|
|
127
|
+
maxWidth: "".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth + getTotalPadding(), "px"),
|
|
124
128
|
transition: "max-width ".concat(SWOOP_ANIMATION),
|
|
125
129
|
'& .ProseMirror': (_ProseMirror = {
|
|
126
130
|
flexGrow: 1,
|
|
@@ -147,5 +151,6 @@ var editorContentArea = (0, _react.css)({
|
|
|
147
151
|
});
|
|
148
152
|
var editorContentGutterStyle = exports.editorContentGutterStyle = (0, _react.css)({
|
|
149
153
|
boxSizing: 'border-box',
|
|
150
|
-
padding:
|
|
154
|
+
padding: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.core.increase-full-page-guttering') ? // there is no space token for 52px
|
|
155
|
+
"0 52px" : "0 ".concat("var(--ds-space-400, 32px)")
|
|
151
156
|
});
|
package/dist/es2019/index.js
CHANGED
|
@@ -59,4 +59,5 @@ const ignoreFunction = () => {
|
|
|
59
59
|
// eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage, @atlaskit/platform/ensure-feature-flag-prefix
|
|
60
60
|
getBooleanFF('__live-view-toggle');
|
|
61
61
|
return;
|
|
62
|
-
};
|
|
62
|
+
};
|
|
63
|
+
export { createEditorContentStyle } from './ui/ContentStyles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, deleteColumn, deleteRow, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, cut, copy, paste, altPaste, find, alignCenter, alignLeft, alignRight, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP } from '@atlaskit/editor-common/keymaps';
|
|
1
|
+
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, addRowBeforeVO, addRowAfterVO, addColumnAfterVO, addColumnBeforeVO, deleteColumn, deleteRow, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, cut, copy, paste, altPaste, find, alignCenter, alignLeft, alignRight, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP } from '@atlaskit/editor-common/keymaps';
|
|
@@ -124,10 +124,8 @@ class Editor extends React.Component {
|
|
|
124
124
|
event.stopPropagation();
|
|
125
125
|
};
|
|
126
126
|
let primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
127
|
-
if (
|
|
128
|
-
|
|
129
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
130
|
-
}
|
|
127
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
128
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
131
129
|
}
|
|
132
130
|
return jsx(WithFlash, {
|
|
133
131
|
animate: maxContentSizeReached
|
|
@@ -312,10 +310,8 @@ const EditorNext = props => {
|
|
|
312
310
|
event.stopPropagation();
|
|
313
311
|
}, [editorView]);
|
|
314
312
|
let primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
315
|
-
if (
|
|
316
|
-
|
|
317
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
318
|
-
}
|
|
313
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
314
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
319
315
|
}
|
|
320
316
|
return jsx(WithFlash, {
|
|
321
317
|
animate: maxContentSizeReached
|
|
@@ -4,7 +4,6 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
5
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
6
6
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { usePresetContext } from '../../../presets/context';
|
|
9
8
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
10
9
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
@@ -44,10 +43,8 @@ export const FullPageEditor = props => {
|
|
|
44
43
|
primaryToolbarState
|
|
45
44
|
} = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar']);
|
|
46
45
|
let primaryToolbarComponents = props.primaryToolbarComponents;
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
50
|
-
}
|
|
46
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
47
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
51
48
|
}
|
|
52
49
|
const isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
53
50
|
return jsx(ContextPanelWidthProvider, null, jsx("div", {
|
|
@@ -2,11 +2,12 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
3
3
|
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
4
4
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
|
|
5
|
-
import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth,
|
|
5
|
+
import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier, akLayoutGutterOffset, FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
7
8
|
import { scrollbarStyles } from '../../styles';
|
|
8
9
|
const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
|
|
9
|
-
const
|
|
10
|
+
const getTotalPadding = () => akEditorGutterPaddingDynamic() * 2;
|
|
10
11
|
export const fullPageEditorWrapper = css({
|
|
11
12
|
minWidth: '340px',
|
|
12
13
|
height: '100%',
|
|
@@ -73,7 +74,7 @@ export const editorContentAreaHideContainer = css({
|
|
|
73
74
|
const editorContentAreaContainerStyle = containerWidth => css({
|
|
74
75
|
'.fabric-editor--full-width-mode': {
|
|
75
76
|
'.code-block, .extension-container': {
|
|
76
|
-
maxWidth: `${containerWidth -
|
|
77
|
+
maxWidth: `${containerWidth - getTotalPadding() - tableMarginFullWidthMode * 2}px`
|
|
77
78
|
},
|
|
78
79
|
'.extension-container.inline': {
|
|
79
80
|
maxWidth: '100%'
|
|
@@ -82,10 +83,10 @@ const editorContentAreaContainerStyle = containerWidth => css({
|
|
|
82
83
|
maxWidth: 'inherit'
|
|
83
84
|
},
|
|
84
85
|
'.multiBodiedExtension--container': {
|
|
85
|
-
maxWidth: `${containerWidth -
|
|
86
|
+
maxWidth: `${containerWidth - getTotalPadding() - tableMarginFullWidthMode * 2}px`
|
|
86
87
|
},
|
|
87
88
|
'[data-layout-section]': {
|
|
88
|
-
maxWidth: `${containerWidth -
|
|
89
|
+
maxWidth: `${containerWidth - getTotalPadding() + akLayoutGutterOffset * 2}px`
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
});
|
|
@@ -95,7 +96,8 @@ export const editorContentAreaStyle = ({
|
|
|
95
96
|
containerWidth
|
|
96
97
|
}) => [editorContentArea, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth), containerWidth ? editorContentAreaContainerStyle(containerWidth) : editorContentAreaHideContainer];
|
|
97
98
|
const editorContentAreaWithLayoutWith = layoutMaxWidth => css({
|
|
98
|
-
|
|
99
|
+
// this restricts max width
|
|
100
|
+
maxWidth: `${layoutMaxWidth + getTotalPadding()}px`
|
|
99
101
|
});
|
|
100
102
|
const editorContentArea = css({
|
|
101
103
|
lineHeight: '24px',
|
|
@@ -106,7 +108,7 @@ const editorContentArea = css({
|
|
|
106
108
|
margin: 'auto',
|
|
107
109
|
flexDirection: 'column',
|
|
108
110
|
flexGrow: 1,
|
|
109
|
-
maxWidth: `${akEditorFullWidthLayoutWidth +
|
|
111
|
+
maxWidth: `${akEditorFullWidthLayoutWidth + getTotalPadding()}px`,
|
|
110
112
|
transition: `max-width ${SWOOP_ANIMATION}`,
|
|
111
113
|
'& .ProseMirror': {
|
|
112
114
|
flexGrow: 1,
|
|
@@ -135,5 +137,7 @@ const editorContentArea = css({
|
|
|
135
137
|
});
|
|
136
138
|
export const editorContentGutterStyle = css({
|
|
137
139
|
boxSizing: 'border-box',
|
|
138
|
-
padding:
|
|
140
|
+
padding: getBooleanFF('platform.editor.core.increase-full-page-guttering') ?
|
|
141
|
+
// there is no space token for 52px
|
|
142
|
+
`0 52px` : `0 ${"var(--ds-space-400, 32px)"}`
|
|
139
143
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "193.24.
|
|
2
|
+
export const version = "193.24.20";
|
package/dist/esm/index.js
CHANGED
|
@@ -59,4 +59,5 @@ var ignoreFunction = function ignoreFunction() {
|
|
|
59
59
|
// eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage, @atlaskit/platform/ensure-feature-flag-prefix
|
|
60
60
|
getBooleanFF('__live-view-toggle');
|
|
61
61
|
return;
|
|
62
|
-
};
|
|
62
|
+
};
|
|
63
|
+
export { createEditorContentStyle } from './ui/ContentStyles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, deleteColumn, deleteRow, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, cut, copy, paste, altPaste, find, alignCenter, alignLeft, alignRight, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP } from '@atlaskit/editor-common/keymaps';
|
|
1
|
+
export { addAltText, navToEditorToolbar, navToFloatingToolbar, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, toggleTaskItemCheckbox, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, addRowBeforeVO, addRowAfterVO, addColumnAfterVO, addColumnBeforeVO, deleteColumn, deleteRow, moveColumnLeft, moveColumnRight, moveRowDown, moveRowUp, cut, copy, paste, altPaste, find, alignCenter, alignLeft, alignRight, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP } from '@atlaskit/editor-common/keymaps';
|
|
@@ -136,10 +136,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
136
136
|
event.stopPropagation();
|
|
137
137
|
};
|
|
138
138
|
var primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
142
|
-
}
|
|
139
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
140
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
143
141
|
}
|
|
144
142
|
return jsx(WithFlash, {
|
|
145
143
|
animate: maxContentSizeReached
|
|
@@ -333,10 +331,8 @@ var EditorNext = function EditorNext(props) {
|
|
|
333
331
|
event.stopPropagation();
|
|
334
332
|
}, [editorView]);
|
|
335
333
|
var primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
336
|
-
if (
|
|
337
|
-
|
|
338
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
339
|
-
}
|
|
334
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
335
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
340
336
|
}
|
|
341
337
|
return jsx(WithFlash, {
|
|
342
338
|
animate: maxContentSizeReached
|
|
@@ -5,7 +5,6 @@ import { jsx } from '@emotion/react';
|
|
|
5
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { usePresetContext } from '../../../presets/context';
|
|
10
9
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
11
10
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
@@ -51,10 +50,8 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
51
50
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
52
51
|
primaryToolbarState = _useSharedPluginState.primaryToolbarState;
|
|
53
52
|
var primaryToolbarComponents = props.primaryToolbarComponents;
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
57
|
-
}
|
|
53
|
+
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
54
|
+
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
58
55
|
}
|
|
59
56
|
var isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
60
57
|
return jsx(ContextPanelWidthProvider, null, jsx("div", {
|
|
@@ -4,11 +4,14 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
5
5
|
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
6
6
|
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
|
|
7
|
-
import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth,
|
|
7
|
+
import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier, akLayoutGutterOffset, FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
9
10
|
import { scrollbarStyles } from '../../styles';
|
|
10
11
|
var SWOOP_ANIMATION = "0.5s ".concat(akEditorSwoopCubicBezier);
|
|
11
|
-
var
|
|
12
|
+
var getTotalPadding = function getTotalPadding() {
|
|
13
|
+
return akEditorGutterPaddingDynamic() * 2;
|
|
14
|
+
};
|
|
12
15
|
export var fullPageEditorWrapper = css({
|
|
13
16
|
minWidth: '340px',
|
|
14
17
|
height: '100%',
|
|
@@ -76,7 +79,7 @@ var editorContentAreaContainerStyle = function editorContentAreaContainerStyle(c
|
|
|
76
79
|
return css({
|
|
77
80
|
'.fabric-editor--full-width-mode': {
|
|
78
81
|
'.code-block, .extension-container': {
|
|
79
|
-
maxWidth: "".concat(containerWidth -
|
|
82
|
+
maxWidth: "".concat(containerWidth - getTotalPadding() - tableMarginFullWidthMode * 2, "px")
|
|
80
83
|
},
|
|
81
84
|
'.extension-container.inline': {
|
|
82
85
|
maxWidth: '100%'
|
|
@@ -85,10 +88,10 @@ var editorContentAreaContainerStyle = function editorContentAreaContainerStyle(c
|
|
|
85
88
|
maxWidth: 'inherit'
|
|
86
89
|
},
|
|
87
90
|
'.multiBodiedExtension--container': {
|
|
88
|
-
maxWidth: "".concat(containerWidth -
|
|
91
|
+
maxWidth: "".concat(containerWidth - getTotalPadding() - tableMarginFullWidthMode * 2, "px")
|
|
89
92
|
},
|
|
90
93
|
'[data-layout-section]': {
|
|
91
|
-
maxWidth: "".concat(containerWidth -
|
|
94
|
+
maxWidth: "".concat(containerWidth - getTotalPadding() + akLayoutGutterOffset * 2, "px")
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
97
|
});
|
|
@@ -101,7 +104,8 @@ export var editorContentAreaStyle = function editorContentAreaStyle(_ref) {
|
|
|
101
104
|
};
|
|
102
105
|
var editorContentAreaWithLayoutWith = function editorContentAreaWithLayoutWith(layoutMaxWidth) {
|
|
103
106
|
return css({
|
|
104
|
-
|
|
107
|
+
// this restricts max width
|
|
108
|
+
maxWidth: "".concat(layoutMaxWidth + getTotalPadding(), "px")
|
|
105
109
|
});
|
|
106
110
|
};
|
|
107
111
|
var editorContentArea = css({
|
|
@@ -113,7 +117,7 @@ var editorContentArea = css({
|
|
|
113
117
|
margin: 'auto',
|
|
114
118
|
flexDirection: 'column',
|
|
115
119
|
flexGrow: 1,
|
|
116
|
-
maxWidth: "".concat(akEditorFullWidthLayoutWidth +
|
|
120
|
+
maxWidth: "".concat(akEditorFullWidthLayoutWidth + getTotalPadding(), "px"),
|
|
117
121
|
transition: "max-width ".concat(SWOOP_ANIMATION),
|
|
118
122
|
'& .ProseMirror': (_ProseMirror = {
|
|
119
123
|
flexGrow: 1,
|
|
@@ -140,5 +144,6 @@ var editorContentArea = css({
|
|
|
140
144
|
});
|
|
141
145
|
export var editorContentGutterStyle = css({
|
|
142
146
|
boxSizing: 'border-box',
|
|
143
|
-
padding:
|
|
147
|
+
padding: getBooleanFF('platform.editor.core.increase-full-page-guttering') ? // there is no space token for 52px
|
|
148
|
+
"0 52px" : "0 ".concat("var(--ds-space-400, 32px)")
|
|
144
149
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "193.24.
|
|
2
|
+
export var version = "193.24.20";
|