@atlaskit/editor-core 212.0.0 → 212.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +5 -66
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -32
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -25
- package/dist/cjs/ui/ContentStyles/index.js +6 -4
- package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -1
- package/dist/cjs/ui/EditorContentContainer/styles/blockTypeStyles.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/styles/expandStyles.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +25 -2
- package/dist/cjs/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +1 -1
- package/dist/cjs/ui/Toolbar/Toolbar.js +30 -2
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/index.js +8 -1
- package/dist/es2019/ui/Appearance/Chromeless.js +3 -62
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -30
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -22
- package/dist/es2019/ui/ContentStyles/index.js +6 -4
- package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +4 -2
- package/dist/es2019/ui/EditorContentContainer/styles/blockTypeStyles.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/expandStyles.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +23 -0
- package/dist/es2019/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +1 -1
- package/dist/es2019/ui/Toolbar/Toolbar.js +29 -2
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/index.js +8 -1
- package/dist/esm/ui/Appearance/Chromeless.js +3 -65
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -32
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -24
- package/dist/esm/ui/ContentStyles/index.js +6 -4
- package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +4 -2
- package/dist/esm/ui/EditorContentContainer/styles/blockTypeStyles.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/expandStyles.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +24 -1
- package/dist/esm/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +1 -1
- package/dist/esm/ui/Toolbar/Toolbar.js +30 -2
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +7 -1
- package/dist/types/ui/Appearance/Chromeless.d.ts +2 -11
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +0 -10
- package/dist/types/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +7 -1
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +2 -11
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +0 -10
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 212.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`4edb2aee0da9c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4edb2aee0da9c) -
|
|
8
|
+
Add conditionalHooksFactory and migrate usage of useSharedPluginStateSelector to useEditorToolbar
|
|
9
|
+
and useSharedPluginStateWithSelector
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`c0656bad0f992`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0656bad0f992) -
|
|
14
|
+
EDITOR-1389 fix table container width behind platform_editor_table_container_width_fix
|
|
15
|
+
- [`f0662cd7a143e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0662cd7a143e) -
|
|
16
|
+
Internal changes to how borders are applied.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
19
|
+
## 212.0.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`88eddbfa8aadd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88eddbfa8aadd) -
|
|
24
|
+
clean up FF of static emotion for editor
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 212.0.0
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -5,7 +5,8 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.ChromelessEditorContainer = ChromelessEditorContainer;
|
|
9
|
+
exports.default = void 0;
|
|
9
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -15,12 +16,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
17
|
var _react2 = require("@emotion/react");
|
|
17
18
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
18
|
-
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
21
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
23
|
-
var _ContentStyles = require("../ContentStyles");
|
|
24
20
|
var _EditorContentContainer = _interopRequireDefault(require("../EditorContentContainer/EditorContentContainer"));
|
|
25
21
|
var _PluginSlot = _interopRequireDefault(require("../PluginSlot"));
|
|
26
22
|
var _WithFlash = _interopRequireDefault(require("../WithFlash"));
|
|
@@ -50,30 +46,6 @@ var scrollbarStylesNew = (0, _react2.css)({
|
|
|
50
46
|
backgroundColor: "var(--ds-background-neutral-bold-hovered, #2C3E5D)"
|
|
51
47
|
}
|
|
52
48
|
});
|
|
53
|
-
var chromelessEditorStyles = (0, _react2.css)({
|
|
54
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
55
|
-
lineHeight: '20px',
|
|
56
|
-
height: 'auto',
|
|
57
|
-
overflowX: 'hidden',
|
|
58
|
-
overflowY: 'auto'
|
|
59
|
-
},
|
|
60
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
61
|
-
_scrollbar.scrollbarStyles, {
|
|
62
|
-
maxWidth: 'inherit',
|
|
63
|
-
boxSizing: 'border-box',
|
|
64
|
-
wordWrap: 'break-word',
|
|
65
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
66
|
-
'div > .ProseMirror': {
|
|
67
|
-
outline: 'none',
|
|
68
|
-
whiteSpace: 'pre-wrap',
|
|
69
|
-
padding: 0,
|
|
70
|
-
margin: 0,
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
72
|
-
'& > :last-child': {
|
|
73
|
-
paddingBottom: "var(--ds-space-100, 0.5em)"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
49
|
var chromelessEditorStylesNew = (0, _react2.css)({
|
|
78
50
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
79
51
|
lineHeight: '20px',
|
|
@@ -104,14 +76,6 @@ var extraSpaceLastLineFix = (0, _react2.css)({
|
|
|
104
76
|
}
|
|
105
77
|
}
|
|
106
78
|
});
|
|
107
|
-
var ContentArea = exports.ContentArea = (0, _ContentStyles.createEditorContentStyle)();
|
|
108
|
-
ContentArea.displayName = 'ContentArea';
|
|
109
|
-
var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
110
|
-
return (0, _experiments.editorExperiment)('platform_editor_core_static_emotion', true, {
|
|
111
|
-
exposure: true
|
|
112
|
-
});
|
|
113
|
-
}, _EditorContentContainer.default, ContentArea);
|
|
114
|
-
|
|
115
79
|
/**
|
|
116
80
|
* Render the editor in a chromeless appearance.
|
|
117
81
|
* Example use is the inline comment editor, which doesn't have editor toolbar
|
|
@@ -161,7 +125,7 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
161
125
|
containerRef: function containerRef(ref) {
|
|
162
126
|
return _this.containerElement = ref;
|
|
163
127
|
}
|
|
164
|
-
}, (0, _react2.jsx)(
|
|
128
|
+
}, (0, _react2.jsx)(_EditorContentContainer.default
|
|
165
129
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
166
130
|
, {
|
|
167
131
|
className: "ak-editor-content-area",
|
|
@@ -213,7 +177,7 @@ function RenderWithPluginState(_ref2) {
|
|
|
213
177
|
maxContentSize: maxContentSize
|
|
214
178
|
}));
|
|
215
179
|
}
|
|
216
|
-
function
|
|
180
|
+
function ChromelessEditorContainer(_ref3) {
|
|
217
181
|
var maxHeight = _ref3.maxHeight,
|
|
218
182
|
minHeight = _ref3.minHeight,
|
|
219
183
|
children = _ref3.children,
|
|
@@ -228,29 +192,4 @@ function ChromelessEditorContainerNext(_ref3) {
|
|
|
228
192
|
id: "chromeless-editor",
|
|
229
193
|
ref: containerRef
|
|
230
194
|
}, children);
|
|
231
|
-
}
|
|
232
|
-
function ChromelessEditorContainerOld(_ref4) {
|
|
233
|
-
var maxHeight = _ref4.maxHeight,
|
|
234
|
-
minHeight = _ref4.minHeight,
|
|
235
|
-
children = _ref4.children,
|
|
236
|
-
containerRef = _ref4.containerRef;
|
|
237
|
-
return (0, _react2.jsx)("div", {
|
|
238
|
-
css: [chromelessEditorStyles, maxHeight &&
|
|
239
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
240
|
-
(0, _react2.css)({
|
|
241
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
242
|
-
maxHeight: "".concat(maxHeight, "px")
|
|
243
|
-
}),
|
|
244
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
245
|
-
(0, _react2.css)({
|
|
246
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
247
|
-
minHeight: "".concat(minHeight, "px")
|
|
248
|
-
}), (0, _platformFeatureFlags.fg)('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
|
|
249
|
-
"data-testid": "chromeless-editor",
|
|
250
|
-
id: "chromeless-editor",
|
|
251
|
-
ref: containerRef
|
|
252
|
-
}, children);
|
|
253
|
-
}
|
|
254
|
-
var ChromelessEditorContainer = exports.ChromelessEditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
255
|
-
return (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion', 'isEnabled', true);
|
|
256
|
-
}, ChromelessEditorContainerNext, ChromelessEditorContainerOld);
|
|
195
|
+
}
|
|
@@ -17,17 +17,13 @@ var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group
|
|
|
17
17
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
18
18
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
19
19
|
var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
|
|
20
|
-
var _styles = require("@atlaskit/editor-common/styles");
|
|
21
20
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
22
21
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
23
|
-
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
24
22
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
26
23
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
27
24
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
28
25
|
var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
|
|
29
26
|
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
30
|
-
var _ContentStyles = require("../../ContentStyles");
|
|
31
27
|
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
|
|
32
28
|
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
33
29
|
var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
|
|
@@ -44,7 +40,6 @@ var _templateObject;
|
|
|
44
40
|
// Ignored via go/ees005
|
|
45
41
|
// eslint-disable-next-line import/no-named-as-default
|
|
46
42
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
47
|
-
var CommentEditorMargin = 14;
|
|
48
43
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
49
44
|
var commentEditorStyles = (0, _react2.css)({
|
|
50
45
|
display: 'flex',
|
|
@@ -63,27 +58,6 @@ var commentEditorStyles = (0, _react2.css)({
|
|
|
63
58
|
maxWidth: 'inherit',
|
|
64
59
|
wordWrap: 'break-word'
|
|
65
60
|
});
|
|
66
|
-
var ContentArea = (0, _ContentStyles.createEditorContentStyle)((0, _react2.css)({
|
|
67
|
-
flexGrow: 1,
|
|
68
|
-
overflowX: 'clip',
|
|
69
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
70
|
-
lineHeight: '24px',
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
72
|
-
'.ProseMirror': {
|
|
73
|
-
margin: "var(--ds-space-150, 12px)"
|
|
74
|
-
},
|
|
75
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
76
|
-
'.gridParent': {
|
|
77
|
-
marginLeft: "var(--ds-space-025, 2px)",
|
|
78
|
-
marginRight: "var(--ds-space-025, 2px)",
|
|
79
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
80
|
-
width: "calc(100% + ".concat(CommentEditorMargin - _styles.GRID_GUTTER, "px)")
|
|
81
|
-
},
|
|
82
|
-
padding: "var(--ds-space-250, 20px)"
|
|
83
|
-
},
|
|
84
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
85
|
-
_commonStyles.tableCommentEditorStyles));
|
|
86
|
-
ContentArea.displayName = 'ContentArea';
|
|
87
61
|
var secondaryToolbarStyles = (0, _react2.css)({
|
|
88
62
|
boxSizing: 'border-box',
|
|
89
63
|
justifyContent: 'flex-end',
|
|
@@ -113,11 +87,6 @@ var mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = (0, _react2.css)((0,
|
|
|
113
87
|
paddingRight: 0
|
|
114
88
|
}));
|
|
115
89
|
var appearance = 'comment';
|
|
116
|
-
var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
117
|
-
return (0, _experiments.editorExperiment)('platform_editor_core_static_emotion', true, {
|
|
118
|
-
exposure: true
|
|
119
|
-
});
|
|
120
|
-
}, _EditorContentContainer.default, ContentArea);
|
|
121
90
|
var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
122
91
|
var editorAPI = props.editorAPI;
|
|
123
92
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
|
|
@@ -268,7 +237,7 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
268
237
|
editorDisabled: disabled
|
|
269
238
|
}, (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref) {
|
|
270
239
|
var width = _ref.width;
|
|
271
|
-
return (0, _react2.jsx)(
|
|
240
|
+
return (0, _react2.jsx)(_EditorContentContainer.default, {
|
|
272
241
|
ref: containerElement,
|
|
273
242
|
css: [maxHeight ?
|
|
274
243
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.FullPageContentArea = exports.EDITOR_CONTAINER = exports.CONTENT_AREA_TEST_ID = void 0;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -16,15 +16,12 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
16
16
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
17
17
|
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
18
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
19
|
-
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
20
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
22
20
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
21
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
24
22
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
25
23
|
var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
|
|
26
24
|
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
27
|
-
var _ContentStyles = require("../../ContentStyles");
|
|
28
25
|
var _ContextPanel = require("../../ContextPanel");
|
|
29
26
|
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
|
|
30
27
|
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
@@ -331,26 +328,6 @@ var contentAreaHeightNoToolbar = (0, _react2.css)({
|
|
|
331
328
|
});
|
|
332
329
|
var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
333
330
|
var EDITOR_CONTAINER = exports.EDITOR_CONTAINER = 'ak-editor-container';
|
|
334
|
-
var scrollStyles = (0, _react2.css)({
|
|
335
|
-
flexGrow: 1,
|
|
336
|
-
height: '100%',
|
|
337
|
-
overflowY: 'scroll',
|
|
338
|
-
position: 'relative',
|
|
339
|
-
display: 'flex',
|
|
340
|
-
flexDirection: 'column',
|
|
341
|
-
scrollBehavior: 'smooth'
|
|
342
|
-
},
|
|
343
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
344
|
-
_scrollbar.scrollbarStyles);
|
|
345
|
-
|
|
346
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
347
|
-
var ScrollContainer = exports.ScrollContainer = (0, _ContentStyles.createEditorContentStyle)(scrollStyles);
|
|
348
|
-
ScrollContainer.displayName = 'ScrollContainer';
|
|
349
|
-
var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
350
|
-
return (0, _experiments.editorExperiment)('platform_editor_core_static_emotion', true, {
|
|
351
|
-
exposure: true
|
|
352
|
-
});
|
|
353
|
-
}, _EditorContentContainer.default, ScrollContainer);
|
|
354
331
|
var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
355
332
|
var _contentAreaRef$curre;
|
|
356
333
|
var theme = (0, _react2.useTheme)();
|
|
@@ -395,7 +372,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
395
372
|
_StyledComponents.contentAreaWrapper,
|
|
396
373
|
"data-testid": EDITOR_CONTAINER,
|
|
397
374
|
"data-editor-container": 'true'
|
|
398
|
-
}, (0, _react2.jsx)(
|
|
375
|
+
}, (0, _react2.jsx)(_EditorContentContainer.default
|
|
399
376
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
400
377
|
, {
|
|
401
378
|
className: "fabric-editor-popup-scroll-parent",
|
|
@@ -164,10 +164,12 @@ var firstFloatingToolbarButtonStyles = (0, _react2.css)({
|
|
|
164
164
|
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
165
165
|
var akEditorBreakpointForSmallDevice = "1266px";
|
|
166
166
|
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
168
|
+
/**
|
|
169
|
+
* @deprecated
|
|
170
|
+
* DO NOT USE THIS WILL BE REMOVED SOON.
|
|
171
|
+
* use this instead: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
|
|
172
|
+
*/
|
|
171
173
|
var legacyContentStyles = function legacyContentStyles(props) {
|
|
172
174
|
return (0, _react2.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--resizer-handle-spacing: 12px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-padding)\n\t);\n\t--ak-editor--breakout-min-width: 100%;\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\n\t\t--ak-editor--breakout-min-width: 0px;\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t", "\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t */\n\t.ProseMirror-hideselection {\n\t\tcaret-color: transparent;\n\t}\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t/* For FullPage only when inside a table\n\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn the \"editorContentAreaContainerStyle\" function */\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t\t\t\t@container editor-area (max-width: ", "px) {\n\t\t\t\t\t--ak-editor--large-gutter-padding: ", "px;\n\t\t\t\t}\n\t\t\t"])), _editorSharedStyles.akEditorFullPageNarrowBreakout, _editorSharedStyles.akEditorGutterPaddingReduced) : null, (0, _editorSharedStyles.editorFontSize)({
|
|
173
175
|
theme: props.theme
|
|
@@ -17,7 +17,7 @@ var taskDecisionStyles = exports.taskDecisionStyles = (0, _react.css)({
|
|
|
17
17
|
'.ak-editor-selected-node > [data-decision-wrapper], ol[data-node-type="decisionList"].ak-editor-selected-node':
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
19
19
|
[{
|
|
20
|
-
borderRadius:
|
|
20
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
21
21
|
},
|
|
22
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
23
23
|
(0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket])],
|
|
@@ -358,7 +358,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
358
358
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
359
359
|
_mediaStyles.mediaAlignmentStyles,
|
|
360
360
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
361
|
-
_tableStyles.tableLayoutFixes,
|
|
361
|
+
_tableStyles.tableLayoutFixes, (0, _expValEquals.expValEquals)('platform_editor_table_container_width_fix', 'isEnabled', true)
|
|
362
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
363
|
+
&& _tableStyles.tableContainerStyles,
|
|
362
364
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
363
365
|
_link.hyperLinkFloatingToolbarStyles,
|
|
364
366
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -19,7 +19,7 @@ var blocktypeStyles = exports.blocktypeStyles = (0, _react.css)({
|
|
|
19
19
|
width: '100%',
|
|
20
20
|
display: 'inline-block',
|
|
21
21
|
paddingLeft: "var(--ds-space-200, 16px)",
|
|
22
|
-
borderLeftWidth:
|
|
22
|
+
borderLeftWidth: "var(--ds-border-width-selected, 2px)",
|
|
23
23
|
borderLeftStyle: 'solid',
|
|
24
24
|
borderLeftColor: "var(--ds-border, #091E4224)",
|
|
25
25
|
margin: '0.75rem 0 0 0',
|
|
@@ -16,7 +16,7 @@ var expandStyles = exports.expandStyles = (0, _react.css)({
|
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
17
17
|
'.ak-editor-expand': {
|
|
18
18
|
// sharedExpandStyles.containerStyles({ expanded: false, focused: false })(),
|
|
19
|
-
borderWidth:
|
|
19
|
+
borderWidth: "var(--ds-border-width, 1px)",
|
|
20
20
|
borderStyle: 'solid',
|
|
21
21
|
borderColor: 'transparent',
|
|
22
22
|
borderRadius: "var(--ds-radius-small, 4px)",
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.tableLayoutFixes = exports.tableCommentEditorStyles = exports.tableCommentEditorMarginOverride = void 0;
|
|
7
|
+
exports.tableLayoutFixes = exports.tableContainerStyles = exports.tableCommentEditorStyles = exports.tableCommentEditorMarginOverride = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _scrollbarStyles = require("./scrollbarStyles");
|
|
@@ -32,4 +32,27 @@ var tableCommentEditorMarginOverride = exports.tableCommentEditorMarginOverride
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
35
|
-
var tableCommentEditorStyles = exports.tableCommentEditorStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".ProseMirror .pm-table-wrapper > table", [tableCommentEditorMarginOverride, _scrollbarStyles.scrollbarStyles]));
|
|
35
|
+
var tableCommentEditorStyles = exports.tableCommentEditorStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".ProseMirror .pm-table-wrapper > table", [tableCommentEditorMarginOverride, _scrollbarStyles.scrollbarStyles]));
|
|
36
|
+
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
38
|
+
var tableContainerStyles = exports.tableContainerStyles = (0, _react.css)({
|
|
39
|
+
/* Fix for HOT-119925: Ensure table containers have proper width constraints and overflow handling */
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
41
|
+
'.ProseMirror .pm-table-wrapper': {
|
|
42
|
+
maxWidth: '100%',
|
|
43
|
+
overflowX: 'auto',
|
|
44
|
+
overflowY: 'visible',
|
|
45
|
+
// Ensure the wrapper doesn't grow beyond its container
|
|
46
|
+
width: '100%',
|
|
47
|
+
boxSizing: 'border-box'
|
|
48
|
+
},
|
|
49
|
+
/* Fix for HOT-119925: Ensure table elements are responsive and don't overflow */
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
|
+
'.ProseMirror .pm-table-wrapper table': {
|
|
52
|
+
maxWidth: '100%',
|
|
53
|
+
width: '100%',
|
|
54
|
+
tableLayout: 'fixed',
|
|
55
|
+
// Ensure tables can be scrolled horizontally if needed
|
|
56
|
+
minWidth: 'auto'
|
|
57
|
+
}
|
|
58
|
+
});
|
|
@@ -77,7 +77,7 @@ var tasksAndDecisionsStyles = exports.tasksAndDecisionsStyles = (0, _react.css)(
|
|
|
77
77
|
var decisionStyles = exports.decisionStyles = (0, _react.css)((_css = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css, ".".concat(akEditorSelectedNodeClassName, " > [data-decision-wrapper], ol[data-node-type='decisionList'].").concat(akEditorSelectedNodeClassName),
|
|
78
78
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
79
79
|
[{
|
|
80
|
-
borderRadius:
|
|
80
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
81
81
|
},
|
|
82
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
83
83
|
_selectionStyles.boxShadowSelectionStyles,
|
|
@@ -6,11 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.ToolbarNext = exports.Toolbar = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
9
10
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
10
11
|
var _types = require("@atlaskit/editor-common/types");
|
|
11
12
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
12
13
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
13
14
|
var _editorToolbarModel = require("@atlaskit/editor-toolbar-model");
|
|
15
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
16
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
17
|
var _ToolbarInner = require("./ToolbarInner");
|
|
15
18
|
/**
|
|
16
19
|
* *Warning:* With `platform_editor_toolbar_aifc` enabled this component is no longer used and is replaced with `<ToolbarNext />`.
|
|
@@ -35,6 +38,26 @@ var Toolbar = exports.Toolbar = function Toolbar(props) {
|
|
|
35
38
|
containerElement: props.containerElement
|
|
36
39
|
});
|
|
37
40
|
};
|
|
41
|
+
var usePluginState = (0, _platformFeatureFlagsReact.conditionalHooksFactory)(function () {
|
|
42
|
+
return (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
|
|
43
|
+
}, function (api) {
|
|
44
|
+
return (0, _hooks.useSharedPluginStateWithSelector)(api, ['connectivity', 'editorViewMode', 'userPreferences'], function (state) {
|
|
45
|
+
var _state$connectivitySt, _state$editorViewMode, _state$userPreference;
|
|
46
|
+
return {
|
|
47
|
+
connectivityStateMode: (_state$connectivitySt = state.connectivityState) === null || _state$connectivitySt === void 0 ? void 0 : _state$connectivitySt.mode,
|
|
48
|
+
editorViewMode: (_state$editorViewMode = state.editorViewModeState) === null || _state$editorViewMode === void 0 ? void 0 : _state$editorViewMode.mode,
|
|
49
|
+
editorToolbarDockingPreference: (_state$userPreference = state.userPreferencesState) === null || _state$userPreference === void 0 || (_state$userPreference = _state$userPreference.preferences) === null || _state$userPreference === void 0 ? void 0 : _state$userPreference.toolbarDockingPosition
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}, function (api) {
|
|
53
|
+
var connectivityStateMode = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'connectivity.mode');
|
|
54
|
+
return {
|
|
55
|
+
connectivityStateMode: connectivityStateMode,
|
|
56
|
+
editorViewMode: undefined,
|
|
57
|
+
editorToolbarDockingPreference: undefined
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
|
|
38
61
|
/**
|
|
39
62
|
* Renders a primary toolbar, driven by components registed by `editor-plugin-toolbar`. `ToolbarModelRenderer` will just
|
|
40
63
|
* render the toolbar structure, the design is driven per component registered including the toolbar itself.
|
|
@@ -50,11 +73,16 @@ var ToolbarNext = exports.ToolbarNext = function ToolbarNext(_ref) {
|
|
|
50
73
|
editorAppearance = _ref.editorAppearance,
|
|
51
74
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
52
75
|
popupsScrollableElement = _ref.popupsScrollableElement;
|
|
53
|
-
var
|
|
76
|
+
var _usePluginState = usePluginState(editorAPI),
|
|
77
|
+
connectivityStateMode = _usePluginState.connectivityStateMode,
|
|
78
|
+
editorViewMode = _usePluginState.editorViewMode,
|
|
79
|
+
editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference;
|
|
54
80
|
var isOffline = connectivityStateMode === 'offline';
|
|
55
81
|
return /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarProvider, {
|
|
56
82
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null,
|
|
57
|
-
editorAppearance: editorAppearance
|
|
83
|
+
editorAppearance: editorAppearance,
|
|
84
|
+
editorViewMode: editorViewMode,
|
|
85
|
+
editorToolbarDockingPreference: editorToolbarDockingPreference
|
|
58
86
|
}, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarUIProvider, {
|
|
59
87
|
api: editorAPI,
|
|
60
88
|
isDisabled: isOffline,
|
|
@@ -29,7 +29,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
29
29
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
31
31
|
|
|
32
|
-
// Remove when
|
|
32
|
+
// Remove when platform_editor_core_static_emotion_non_central is cleaned up
|
|
33
33
|
var toolbar = (0, _react2.css)((0, _defineProperty2.default)({
|
|
34
34
|
width: '100%',
|
|
35
35
|
position: 'relative'
|
|
@@ -40,7 +40,7 @@ var toolbar = (0, _react2.css)((0, _defineProperty2.default)({
|
|
|
40
40
|
margin: "0 ".concat("var(--ds-space-200, 16px)")
|
|
41
41
|
}));
|
|
42
42
|
|
|
43
|
-
// Rename to toolbar when
|
|
43
|
+
// Rename to toolbar when platform_editor_core_static_emotion_non_central is cleaned up
|
|
44
44
|
var staticToolbar = (0, _react2.css)({
|
|
45
45
|
width: '100%',
|
|
46
46
|
position: 'relative'
|
package/dist/es2019/index.js
CHANGED
|
@@ -36,6 +36,13 @@ export { getNodesCount } from './utils/getNodesCount';
|
|
|
36
36
|
export { default as measurements } from './utils/performance/measure-enum';
|
|
37
37
|
export { createFeatureFlagsFromProps } from './utils/feature-flags-from-props';
|
|
38
38
|
export { default as EditorActions } from './actions';
|
|
39
|
-
export {
|
|
39
|
+
export {
|
|
40
|
+
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
* DO NOT USE THIS WILL BE REMOVED SOON.
|
|
44
|
+
* use this instead: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
|
|
45
|
+
*/
|
|
46
|
+
createEditorContentStyle } from './ui/ContentStyles';
|
|
40
47
|
export { getDefaultPresetOptionsFromEditorProps } from './create-editor/create-plugins-list';
|
|
41
48
|
export { ReactEditorView } from './create-editor/ReactEditorView';
|
|
@@ -8,12 +8,7 @@ import React, { Fragment } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
11
|
-
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
12
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
-
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
14
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
|
-
import { createEditorContentStyle } from '../ContentStyles';
|
|
17
12
|
import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
|
|
18
13
|
import PluginSlot from '../PluginSlot';
|
|
19
14
|
import WithFlash from '../WithFlash';
|
|
@@ -37,30 +32,6 @@ const scrollbarStylesNew = css({
|
|
|
37
32
|
backgroundColor: "var(--ds-background-neutral-bold-hovered, #2C3E5D)"
|
|
38
33
|
}
|
|
39
34
|
});
|
|
40
|
-
const chromelessEditorStyles = css({
|
|
41
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
42
|
-
lineHeight: '20px',
|
|
43
|
-
height: 'auto',
|
|
44
|
-
overflowX: 'hidden',
|
|
45
|
-
overflowY: 'auto'
|
|
46
|
-
},
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
48
|
-
scrollbarStyles, {
|
|
49
|
-
maxWidth: 'inherit',
|
|
50
|
-
boxSizing: 'border-box',
|
|
51
|
-
wordWrap: 'break-word',
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
53
|
-
'div > .ProseMirror': {
|
|
54
|
-
outline: 'none',
|
|
55
|
-
whiteSpace: 'pre-wrap',
|
|
56
|
-
padding: 0,
|
|
57
|
-
margin: 0,
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
59
|
-
'& > :last-child': {
|
|
60
|
-
paddingBottom: "var(--ds-space-100, 0.5em)"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
35
|
const chromelessEditorStylesNew = css({
|
|
65
36
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
66
37
|
lineHeight: '20px',
|
|
@@ -91,12 +62,6 @@ const extraSpaceLastLineFix = css({
|
|
|
91
62
|
}
|
|
92
63
|
}
|
|
93
64
|
});
|
|
94
|
-
export const ContentArea = createEditorContentStyle();
|
|
95
|
-
ContentArea.displayName = 'ContentArea';
|
|
96
|
-
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
|
|
97
|
-
exposure: true
|
|
98
|
-
}), EditorContentContainer, ContentArea);
|
|
99
|
-
|
|
100
65
|
/**
|
|
101
66
|
* Render the editor in a chromeless appearance.
|
|
102
67
|
* Example use is the inline comment editor, which doesn't have editor toolbar
|
|
@@ -140,7 +105,7 @@ export default class Editor extends React.Component {
|
|
|
140
105
|
maxHeight: maxHeight,
|
|
141
106
|
minHeight: minHeight,
|
|
142
107
|
containerRef: ref => this.containerElement = ref
|
|
143
|
-
}, jsx(
|
|
108
|
+
}, jsx(EditorContentContainer
|
|
144
109
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
145
110
|
, {
|
|
146
111
|
className: "ak-editor-content-area",
|
|
@@ -188,7 +153,7 @@ function RenderWithPluginState({
|
|
|
188
153
|
maxContentSize
|
|
189
154
|
}));
|
|
190
155
|
}
|
|
191
|
-
function
|
|
156
|
+
export function ChromelessEditorContainer({
|
|
192
157
|
maxHeight,
|
|
193
158
|
minHeight,
|
|
194
159
|
children,
|
|
@@ -204,28 +169,4 @@ function ChromelessEditorContainerNext({
|
|
|
204
169
|
id: "chromeless-editor",
|
|
205
170
|
ref: containerRef
|
|
206
171
|
}, children);
|
|
207
|
-
}
|
|
208
|
-
function ChromelessEditorContainerOld({
|
|
209
|
-
maxHeight,
|
|
210
|
-
minHeight,
|
|
211
|
-
children,
|
|
212
|
-
containerRef
|
|
213
|
-
}) {
|
|
214
|
-
return jsx("div", {
|
|
215
|
-
css: [chromelessEditorStyles, maxHeight &&
|
|
216
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
217
|
-
css({
|
|
218
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
219
|
-
maxHeight: `${maxHeight}px`
|
|
220
|
-
}),
|
|
221
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
222
|
-
css({
|
|
223
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
224
|
-
minHeight: `${minHeight}px`
|
|
225
|
-
}), fg('platform_fix_extra_space_last_line_comment_editor') && extraSpaceLastLineFix],
|
|
226
|
-
"data-testid": "chromeless-editor",
|
|
227
|
-
id: "chromeless-editor",
|
|
228
|
-
ref: containerRef
|
|
229
|
-
}, children);
|
|
230
|
-
}
|
|
231
|
-
export const ChromelessEditorContainer = componentWithCondition(() => expValEquals('platform_editor_core_static_emotion', 'isEnabled', true), ChromelessEditorContainerNext, ChromelessEditorContainerOld);
|
|
172
|
+
}
|