@atlaskit/editor-core 207.0.2 → 207.0.4
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 +18 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +13 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +3 -1
- package/dist/cjs/ui/ContentStyles/ai-panels.js +6 -1
- package/dist/cjs/ui/ContentStyles/index.js +10 -3
- package/dist/cjs/ui/ContentStyles/layout.js +8 -1
- package/dist/cjs/ui/ContentStyles/status.js +2 -2
- package/dist/cjs/ui/EditorContentContainer.js +227 -30
- package/dist/cjs/utils/extensions.js +16 -26
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Chromeless.js +11 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +3 -1
- package/dist/es2019/ui/ContentStyles/ai-panels.js +7 -0
- package/dist/es2019/ui/ContentStyles/index.js +12 -5
- package/dist/es2019/ui/ContentStyles/layout.js +7 -0
- package/dist/es2019/ui/ContentStyles/status.js +2 -2
- package/dist/es2019/ui/EditorContentContainer.js +759 -34
- package/dist/es2019/utils/extensions.js +16 -26
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Chromeless.js +13 -2
- package/dist/esm/ui/Appearance/Comment/Comment.js +3 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +3 -1
- package/dist/esm/ui/ContentStyles/ai-panels.js +7 -0
- package/dist/esm/ui/ContentStyles/index.js +10 -3
- package/dist/esm/ui/ContentStyles/layout.js +7 -0
- package/dist/esm/ui/ContentStyles/status.js +2 -2
- package/dist/esm/ui/EditorContentContainer.js +231 -30
- package/dist/esm/utils/extensions.js +16 -26
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Appearance/Chromeless.d.ts +8 -0
- package/dist/types/ui/ContentStyles/ai-panels.d.ts +6 -0
- package/dist/types/ui/ContentStyles/layout.d.ts +6 -0
- package/dist/types/ui/EditorContentContainer.d.ts +0 -3
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +8 -0
- package/dist/types-ts4.5/ui/ContentStyles/ai-panels.d.ts +6 -0
- package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +6 -0
- package/dist/types-ts4.5/ui/EditorContentContainer.d.ts +0 -3
- package/package.json +7 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.placeholderStyles = exports.linkStyles = exports.fixBlockControlStylesSSR = exports.default = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
13
13
|
var _collab = require("@atlaskit/editor-common/collab");
|
|
@@ -20,24 +20,24 @@ var _styles2 = require("@atlaskit/editor-plugins/block-type/styles");
|
|
|
20
20
|
var _styles3 = require("@atlaskit/editor-plugins/find-replace/styles");
|
|
21
21
|
var _styles4 = require("@atlaskit/editor-plugins/paste-options-toolbar/styles");
|
|
22
22
|
var _styles5 = require("@atlaskit/editor-plugins/placeholder-text/styles");
|
|
23
|
+
var _types = require("@atlaskit/editor-plugins/table/types");
|
|
23
24
|
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
25
|
+
var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
|
|
24
26
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
25
27
|
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
26
28
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
29
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
28
30
|
var _tokens = require("@atlaskit/tokens");
|
|
29
31
|
var _getInlineNodeViewProducer = require("../nodeviews/getInlineNodeViewProducer.styles");
|
|
30
|
-
var _aiPanels = require("./ContentStyles/ai-panels");
|
|
31
32
|
var _codeBlock = require("./ContentStyles/code-block");
|
|
32
33
|
var _date = require("./ContentStyles/date");
|
|
33
34
|
var _expand = require("./ContentStyles/expand");
|
|
34
35
|
var _extension = require("./ContentStyles/extension");
|
|
35
|
-
var _layout = require("./ContentStyles/layout");
|
|
36
36
|
var _media = require("./ContentStyles/media");
|
|
37
37
|
var _panel2 = require("./ContentStyles/panel");
|
|
38
38
|
var _status = require("./ContentStyles/status");
|
|
39
39
|
var _tasksAndDecisions = require("./ContentStyles/tasks-and-decisions");
|
|
40
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
40
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36;
|
|
41
41
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
42
42
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
43
43
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Requires manual remediation over time due to use of unsafe nested mixins */
|
|
@@ -46,8 +46,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
46
46
|
* @jsx jsx
|
|
47
47
|
*/
|
|
48
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
49
|
-
function
|
|
50
|
-
function
|
|
49
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
50
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
51
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
52
52
|
var linkStyles = exports.linkStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n"])), (0, _styles.linkSharedStyle)());
|
|
53
53
|
var ruleStyles = function ruleStyles() {
|
|
@@ -138,25 +138,220 @@ var placeholderWrapStyles = (0, _react2.css)({
|
|
|
138
138
|
});
|
|
139
139
|
var firstBlockNodeStyles = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> div[data-task-list-local-id],\n\t\t> div[data-layout-section],\n\t\t> .", " {\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t> hr:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n"])), _panel.PanelSharedCssClassName.prefix, _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.expandClassNames.prefix);
|
|
140
140
|
var firstBlockNodeStylesNew = (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> div[data-task-list-local-id],\n\t\t> div[data-layout-section],\n\t\t> .", " {\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t> hr:first-child,\n\t\t> .ProseMirror-widget:first-child + hr {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n"])), _panel.PanelSharedCssClassName.prefix, _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.expandClassNames.prefix);
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* fix layout issue of first block node
|
|
144
|
-
*/
|
|
145
141
|
var fixBlockControlStylesSSR = exports.fixBlockControlStylesSSR = function fixBlockControlStylesSSR() {
|
|
146
142
|
if ((0, _platformFeatureFlags.fg)('platform_editor_element_dnd_nested_fix_patch_6')) {
|
|
147
143
|
return firstBlockNodeStylesNew;
|
|
148
144
|
}
|
|
149
145
|
return firstBlockNodeStyles;
|
|
150
146
|
};
|
|
147
|
+
var columnLayoutSharedStyle = (0, _react2.css)({
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
149
|
+
'[data-layout-section]': (0, _defineProperty2.default)({
|
|
150
|
+
position: 'relative',
|
|
151
|
+
display: 'flex',
|
|
152
|
+
flexDirection: 'row',
|
|
153
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
154
|
+
'& > *': {
|
|
155
|
+
flex: 1,
|
|
156
|
+
minWidth: 0
|
|
157
|
+
},
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
159
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
160
|
+
minWidth: 'initial'
|
|
161
|
+
}
|
|
162
|
+
}, "@media screen and (max-width: ".concat(_editorSharedStyles.gridMediumMaxWidth, "px)"), {
|
|
163
|
+
flexDirection: 'column'
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
var columnLayoutResponsiveSharedStyle = (0, _react2.css)({
|
|
167
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
168
|
+
'[data-layout-section]': {
|
|
169
|
+
display: 'flex',
|
|
170
|
+
flexDirection: 'row',
|
|
171
|
+
gap: "var(--ds-space-100, 8px)",
|
|
172
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
173
|
+
'& > *': {
|
|
174
|
+
flex: 1,
|
|
175
|
+
minWidth: 0
|
|
176
|
+
},
|
|
177
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
178
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
179
|
+
minWidth: 'initial'
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
183
|
+
'.layout-section-container': {
|
|
184
|
+
containerType: 'inline-size',
|
|
185
|
+
containerName: 'layout-area'
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* layout styles
|
|
191
|
+
* was imported from packages/editor/editor-core/src/ui/ContentStyles/layout.ts
|
|
192
|
+
* @example
|
|
193
|
+
* @returns {string}
|
|
194
|
+
*/
|
|
195
|
+
var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
196
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
197
|
+
(0, _react2.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
198
|
+
(0, _react2.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :not(style):first-child,\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
|
|
199
|
+
};
|
|
200
|
+
var layoutColumnStyles = function layoutColumnStyles() {
|
|
201
|
+
return (0, _experiments.editorExperiment)('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
202
|
+
(0, _react2.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> [data-layout-column] {\n\t\t\t\t\tmargin: 0 ", "px;\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column]:first-of-type {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column]:last-of-type {\n\t\t\t\t\tmargin-right: 0;\n\t\t\t\t}\n\n\t\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column].", ":not(.danger) {\n\t\t\t\t\t", ";\n\t\t\t\t\t/* layout column selection shorter after layout border has been removed */\n\t\t\t\t\t::before {\n\t\t\t\t\t\twidth: calc(100% - 8px);\n\t\t\t\t\t\tleft: 4px;\n\t\t\t\t\t\tborder-radius: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), _styles.LAYOUT_SECTION_MARGIN / 2, _editorSharedStyles.gridMediumMaxWidth, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket]), "var(--ds-border-radius, 3px)") : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
203
|
+
(0, _react2.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\tmargin-left: ", "px;\n\t\t\t\t}\n\n\t\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), _styles.LAYOUT_SECTION_MARGIN, _editorSharedStyles.gridMediumMaxWidth);
|
|
204
|
+
};
|
|
205
|
+
var layoutSectionStyles = function layoutSectionStyles() {
|
|
206
|
+
return (0, _experiments.editorExperiment)('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
207
|
+
(0, _react2.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t", ";\n\t\t\t\t.layout-section-container [data-layout-section] {\n\t\t\t\t\t> .ProseMirror-widget {\n\t\t\t\t\t\tflex: none;\n\t\t\t\t\t\tdisplay: contents !important;\n\n\t\t\t\t\t\t&[data-blocks-drag-handle-container] div {\n\t\t\t\t\t\t\tdisplay: contents !important;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&[data-blocks-drop-target-container] {\n\t\t\t\t\t\t\tdisplay: block !important;\n\t\t\t\t\t\t\tmargin: ", ";\n\n\t\t\t\t\t\t\t[data-drop-target-for-element] {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t& + [data-layout-column] {\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t> [data-layout-column] {\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), columnLayoutResponsiveSharedStyle, "var(--ds-space-negative-050, -4px)") : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
208
|
+
(0, _react2.css)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t", "\n\t\t\t"])), columnLayoutSharedStyle);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
212
|
+
var layoutBorderBaseStyles = (0, _react2.css)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n\t/* TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n\tThis is because the default state already uses the same token and, as such, the hover style won't change anything.\n\thttps://product-fabric.atlassian.net/browse/DSP-4441 */\n\t/* Shows the border when cursor is inside a layout */\n\t&.selected [data-layout-column],\n\t&:hover [data-layout-column] {\n\t\tborder: ", "px solid ", ";\n\t}\n\n\t&.selected.danger [data-layout-column] {\n\t\tbackground-color: ", ";\n\t\tborder-color: ", ";\n\t}\n\n\t&.", ":not(.danger) {\n\t\t[data-layout-column] {\n\t\t\t", "\n\t\t\t::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Border, _editorSharedStyles.SelectionStyle.Blanket]));
|
|
213
|
+
|
|
214
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
215
|
+
var layoutBorderViewStyles = (0, _react2.css)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected [data-layout-column],\n\t&:hover [data-layout-column] {\n\t\tborder: 0;\n\t}\n"])));
|
|
216
|
+
|
|
217
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
218
|
+
var columnSeparatorBaseStyles = (0, _react2.css)(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tcontent: '';\n\t\tborder-left: ", "px solid ", ";\n\t\tposition: absolute;\n\t\theight: calc(100% - 24px);\n\t\tmargin-left: -25px;\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
|
|
219
|
+
|
|
220
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
221
|
+
var columnSeparatorViewStyles = (0, _react2.css)(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tborder-left: 0;\n\t}\n"])));
|
|
222
|
+
|
|
223
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
224
|
+
var rowSeparatorBaseStyles = (0, _react2.css)(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tcontent: '';\n\t\tborder-top: ", "px solid ", ";\n\t\tposition: absolute;\n\t\twidth: calc(100% - 32px);\n\t\tmargin-top: -13px;\n\n\t\t/* clear styles for column separator */\n\t\tborder-left: unset;\n\t\tmargin-left: unset;\n\t\theight: unset;\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
|
|
225
|
+
|
|
226
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
227
|
+
var rowSeparatorViewStyles = (0, _react2.css)(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tborder-top: 0;\n\t}\n"])));
|
|
228
|
+
|
|
229
|
+
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
230
|
+
var layoutWithSeparatorBorderResponsiveBaseStyles = function layoutWithSeparatorBorderResponsiveBaseStyles(breakpoint
|
|
231
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
232
|
+
) {
|
|
233
|
+
return (0, _react2.css)(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected,\n\t&:hover,\n\t&.selected.danger,\n\t&.", ":not(.danger) {\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t@container editor-area (max-width:", "px) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, breakpoint, rowSeparatorBaseStyles);
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
237
|
+
var layoutWithSeparatorBorderResponsiveViewStyles = function layoutWithSeparatorBorderResponsiveViewStyles(breakpoint
|
|
238
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
239
|
+
) {
|
|
240
|
+
return (0, _react2.css)(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected,\n\t&:hover,\n\t&.selected.danger,\n\t&.", ":not(.danger) {\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t@container editor-area (max-width:", "px) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, breakpoint, rowSeparatorViewStyles);
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
244
|
+
var layoutWithSeparatorBorderBaseStyles = (0, _react2.css)(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected [data-layout-column]:not(:first-of-type),\n\t[data-empty-layout='true'] [data-layout-column]:not(:first-of-type),\n\t&:hover [data-layout-column]:not(:first-of-type) {\n\t\t", "\n\t}\n\n\t&.selected.danger [data-layout-section] {\n\t\tbackground-color: ", ";\n\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\tborder-radius: 4px;\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&.", ":not(.danger) [data-layout-section] {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\tborder-radius: 4px;\n\t\tbackground-color: ", ";\n\t\t[data-layout-column] {\n\t\t\t", "\n\t\t\tborder: 0px;\n\t\t\t::before {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t}\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\t}\n"])), columnSeparatorBaseStyles, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, columnSeparatorBaseStyles, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", "var(--ds-background-selected, #E9F2FF)", (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket]), columnSeparatorBaseStyles);
|
|
245
|
+
|
|
246
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
247
|
+
var layoutWithSeparatorBorderViewStyles = (0, _react2.css)(_templateObject25 || (_templateObject25 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected [data-layout-column]:not(:first-of-type),\n\t[data-empty-layout='true'] [data-layout-column]:not(:first-of-type),\n\t&:hover [data-layout-column]:not(:first-of-type) {\n\t\t", "\n\t}\n\n\t&.selected.danger [data-layout-section] {\n\t\tbox-shadow: 0 0 0 0 ", ";\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&.", ":not(.danger) [data-layout-section] {\n\t\tbox-shadow: 0 0 0 0 ", ";\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\t}\n"])), columnSeparatorViewStyles, _editorSharedStyles.akEditorDeleteBorder, columnSeparatorViewStyles, _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, #0C66E4)", columnSeparatorViewStyles);
|
|
248
|
+
|
|
249
|
+
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
250
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
251
|
+
var layoutResponsiveBaseStyles = (0, _react2.css)(_templateObject26 || (_templateObject26 = (0, _taggedTemplateLiteral2.default)(["\n\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t/* not resized layout in full-width editor */\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t> .layoutSectionView-content-wrap {\n\t\t\t[data-layout-section] {\n\t\t\t\t@container editor-area (max-width:724px) {\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\t}\n\n\t/* not resized layout in fixed-width editor */\n\t.ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {\n\t\t> .layoutSectionView-content-wrap {\n\t\t\t[data-layout-section] {\n\t\t\t\t@container editor-area (max-width:788px) {\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\t}\n\n\t/* resized layout in full/fixed-width editor */\n\t.ProseMirror .fabric-editor-breakout-mark {\n\t\t.layoutSectionView-content-wrap {\n\t\t\t[data-layout-section] {\n\t\t\t\t@container editor-area (max-width:820px) {\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\t}\n"])), layoutWithSeparatorBorderResponsiveBaseStyles(724), layoutWithSeparatorBorderResponsiveBaseStyles(788), layoutWithSeparatorBorderResponsiveBaseStyles(820));
|
|
252
|
+
|
|
253
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
254
|
+
var layoutResponsiveViewStyles = (0, _react2.css)(_templateObject27 || (_templateObject27 = (0, _taggedTemplateLiteral2.default)(["\n\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t/* not resized layout in full-width editor */\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t> .layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t/* not resized layout in fixed-width editor */\n\t.ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {\n\t\t> .layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t/* resized layout in full/fixed-width editor */\n\t.ProseMirror .fabric-editor-breakout-mark {\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n"])), layoutWithSeparatorBorderResponsiveViewStyles(724), layoutWithSeparatorBorderResponsiveViewStyles(788), layoutWithSeparatorBorderResponsiveViewStyles(820));
|
|
255
|
+
|
|
256
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
257
|
+
var layoutBaseStyles = function layoutBaseStyles() {
|
|
258
|
+
return (0, _react2.css)(_templateObject28 || (_templateObject28 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: pointer;\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n\t\t\t and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n\t\t handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t/* styles to support borders for layout */\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t/* hide separator when element is dragging on top of a layout column */\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? 8 : 0), _editorSharedStyles.akEditorSwoopCubicBezier, (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderBaseStyles : layoutBorderBaseStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveBaseStyles, _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('advanced_layouts', false) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
262
|
+
var layoutViewStyles = (0, _react2.css)(_templateObject29 || (_templateObject29 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t[data-layout-section] {\n\t\t\tcursor: default;\n\t\t\t[data-layout-column] {\n\t\t\t\tborder: 0;\n\t\t\t}\n\t\t}\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n"])), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderViewStyles : layoutBorderViewStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveViewStyles);
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* aiPanelStyles
|
|
266
|
+
* was imported from packages/editor/editor-core/src/ui/ContentStyles/ai-panels.ts
|
|
267
|
+
*/
|
|
268
|
+
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
269
|
+
var rotationAnimation = (0, _react2.keyframes)({
|
|
270
|
+
'0%': _objectSpread({
|
|
271
|
+
'--panel-gradient-angle': '0deg'
|
|
272
|
+
}, isFirefox ? {
|
|
273
|
+
backgroundPosition: '100%'
|
|
274
|
+
} : {}),
|
|
275
|
+
'100%': _objectSpread({
|
|
276
|
+
'--panel-gradient-angle': '360deg'
|
|
277
|
+
}, isFirefox ? {
|
|
278
|
+
backgroundPosition: '-100%'
|
|
279
|
+
} : {})
|
|
280
|
+
});
|
|
281
|
+
var aiPrismColor = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, 'prism.border.step.1', {
|
|
282
|
+
light: '#0065FF',
|
|
283
|
+
dark: '#0065FF80'
|
|
284
|
+
}), 'prism.border.step.2', {
|
|
285
|
+
light: '#0469FF',
|
|
286
|
+
dark: '#0469FF80'
|
|
287
|
+
}), 'prism.border.step.3', {
|
|
288
|
+
light: '#BF63F3',
|
|
289
|
+
dark: '#BF63F380'
|
|
290
|
+
}), 'prism.border.step.4', {
|
|
291
|
+
light: '#FFA900',
|
|
292
|
+
dark: '#FFA90080'
|
|
293
|
+
});
|
|
294
|
+
var prismBorderAnimationStyles = (0, _react2.css)({
|
|
295
|
+
'&::before, &::after': _objectSpread(_objectSpread({
|
|
296
|
+
animationName: rotationAnimation,
|
|
297
|
+
animationDuration: '2s',
|
|
298
|
+
animationTimingFunction: 'linear',
|
|
299
|
+
animationIterationCount: 'infinite'
|
|
300
|
+
}, isFirefox ? {
|
|
301
|
+
animationDirection: 'normal',
|
|
302
|
+
animationDuration: '1s'
|
|
303
|
+
} : {}), {}, {
|
|
304
|
+
'@media (prefers-reduced-motion)': {
|
|
305
|
+
animation: 'none'
|
|
306
|
+
}
|
|
307
|
+
})
|
|
308
|
+
});
|
|
309
|
+
var prismBorderBaseStyles = (0, _react2.css)(_objectSpread({
|
|
310
|
+
content: "''",
|
|
311
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
312
|
+
position: 'absolute',
|
|
313
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
314
|
+
zIndex: -1,
|
|
315
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
316
|
+
width: "calc(100% + 2px)",
|
|
317
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
318
|
+
height: "calc(100% + 2px)",
|
|
319
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
320
|
+
top: "-1px",
|
|
321
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
322
|
+
left: "-1px",
|
|
323
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
324
|
+
borderRadius: "calc(".concat("var(--ds-border-radius-100, 3px)", " + 1px)"),
|
|
325
|
+
transform: 'translate3d(0, 0, 0)'
|
|
326
|
+
}, isFirefox ? {
|
|
327
|
+
background: "linear-gradient(90deg,\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['light'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 12%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 24%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['light'], " 48%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 64%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 80%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['light'], " 100%\n\t\t\t\t\t\t\t)"),
|
|
328
|
+
backgroundSize: '200%'
|
|
329
|
+
} : {
|
|
330
|
+
background: "conic-gradient(\n\t\t\t\t\t\t\t\tfrom var(--panel-gradient-angle, 270deg),\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['light'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 20%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 50%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['light'], " 56%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['light'], " 100%\n\t\t\t\t\t\t\t)")
|
|
331
|
+
}));
|
|
332
|
+
var prismBorderDarkStyles = (0, _react2.css)(_objectSpread({}, isFirefox ? {
|
|
333
|
+
background: "linear-gradient(90deg,\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['dark'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 12%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 24%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['dark'], " 48%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 64%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 80%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['dark'], " 100%\n\t\t\t\t\t\t\t)"),
|
|
334
|
+
backgroundSize: '200%'
|
|
335
|
+
} : {
|
|
336
|
+
background: "conic-gradient(\n\t\t\t\t\t\t\t\tfrom var(--panel-gradient-angle, 270deg),\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['dark'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 20%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 50%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['dark'], " 56%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['dark'], " 100%\n\t\t\t\t\t\t\t)")
|
|
337
|
+
}));
|
|
338
|
+
var prismBorderHoverStyles = (0, _react2.css)({
|
|
339
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
340
|
+
background: "var(--ds-border-input, #8590A2)"
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
344
|
+
var aiPanelBaseStyles = (0, _react2.css)(_templateObject30 || (_templateObject30 = (0, _taggedTemplateLiteral2.default)(["\n\t@property --panel-gradient-angle {\n\t\tsyntax: '<angle>';\n\t\tinitial-value: 270deg;\n\t\tinherits: false;\n\t}\n\n\tdiv[extensionType='com.atlassian.ai-blocks'] {\n\t\t/* This hides the label for the extension */\n\t\t.extension-label {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t/* This styles the ai panel correctly when its just sitting on the page and there\n\t\tis no user interaction */\n\t\t.extension-container {\n\t\t\tposition: relative;\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\tbackground-color: ", " !important;\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t\t&.with-hover-border {\n\t\t\t\t&::before,\n\t\t\t\t&::after {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\t\t\t& .with-margin-styles {\n\t\t\t\tbackground-color: ", " !important;\n\t\t\t\tborder-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t/* This styles the ai panel correctly when its streaming */\n\tdiv[extensionType='com.atlassian.ai-blocks']:has(.streaming) {\n\t\t.extension-container {\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\t", "\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t/* This styles the ai panel correctly when a user is hovering over the delete button in the floating panel */\n\tdiv[extensionType='com.atlassian.ai-blocks'].danger {\n\t\t.extension-container {\n\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t}\n\t}\n\n\t/* This removes the margin from the action list when inside an ai panel */\n\tdiv[extensiontype='com.atlassian.ai-blocks'][extensionkey='ai-action-items-block:aiActionItemsBodiedExtension'] {\n\t\tdiv[data-node-type='actionList'] {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n"])), "var(--ds-surface, #FFFFFF)", prismBorderBaseStyles, prismBorderHoverStyles, "var(--ds-surface, #FFFFFF)", "var(--ds-border-radius-100, 3px)", prismBorderAnimationStyles, prismBorderBaseStyles, "var(--ds-border-danger, #E2483D)");
|
|
345
|
+
|
|
346
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
347
|
+
var aiPanelDarkStyles = (0, _react2.css)(_templateObject31 || (_templateObject31 = (0, _taggedTemplateLiteral2.default)(["\n\tdiv[extensionType='com.atlassian.ai-blocks'] {\n\t\t.extension-container {\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t/* This styles the ai panel correctly when its streaming */\n\tdiv[extensionType='com.atlassian.ai-blocks']:has(.streaming) {\n\t\t.extension-container {\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), prismBorderDarkStyles, prismBorderDarkStyles);
|
|
151
348
|
|
|
152
349
|
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
153
350
|
var akEditorBreakpointForSmallDevice = "1266px";
|
|
154
351
|
|
|
155
352
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
156
|
-
var contentStyles = function contentStyles(
|
|
157
|
-
return (0, _react2.css)(
|
|
158
|
-
theme: props.theme
|
|
159
|
-
}), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t "]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t "]))) : null, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t "]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
353
|
+
var contentStyles = function contentStyles() {
|
|
354
|
+
return (0, _react2.css)(_templateObject32 || (_templateObject32 = (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--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.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\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.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\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 * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\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\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 ", "\n ", "\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\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\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In 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\t 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, _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject33 || (_templateObject33 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject34 || (_templateObject34 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject35 || (_templateObject35 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
160
355
|
exposure: false
|
|
161
356
|
}) && vanillaMentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
162
357
|
exposure: false
|
|
@@ -170,7 +365,7 @@ var contentStyles = function contentStyles(props) {
|
|
|
170
365
|
exposure: false
|
|
171
366
|
}) && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
172
367
|
exposure: false
|
|
173
|
-
}) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null, (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles,
|
|
368
|
+
}) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null, (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, fixBlockControlStylesSSR(), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject36 || (_templateObject36 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
|
|
174
369
|
};
|
|
175
370
|
var CommentEditorMargin = 14;
|
|
176
371
|
|
|
@@ -208,6 +403,13 @@ var fullPageEditorStyles = (0, _react2.css)({
|
|
|
208
403
|
},
|
|
209
404
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
210
405
|
_scrollbar.scrollbarStyles);
|
|
406
|
+
var listLayoutShiftFix = (0, _react2.css)({
|
|
407
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
408
|
+
'.ProseMirror ul, .ProseMirror ol': {
|
|
409
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
410
|
+
marginTop: '10px'
|
|
411
|
+
}
|
|
412
|
+
});
|
|
211
413
|
|
|
212
414
|
/**
|
|
213
415
|
* EditorContentStyles is a wrapper component that applies styles to its children
|
|
@@ -229,32 +431,27 @@ _scrollbar.scrollbarStyles);
|
|
|
229
431
|
var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
230
432
|
var className = props.className,
|
|
231
433
|
children = props.children,
|
|
232
|
-
featureFlags = props.featureFlags,
|
|
233
434
|
viewMode = props.viewMode,
|
|
234
435
|
isScrollable = props.isScrollable,
|
|
235
436
|
appearance = props.appearance;
|
|
236
437
|
var theme = (0, _react2.useTheme)();
|
|
237
438
|
var _useThemeObserver = (0, _tokens.useThemeObserver)(),
|
|
238
|
-
colorMode = _useThemeObserver.colorMode
|
|
239
|
-
typography = _useThemeObserver.typography;
|
|
240
|
-
var memoizedStyle = (0, _react.useMemo)(function () {
|
|
241
|
-
return contentStyles({
|
|
242
|
-
theme: theme,
|
|
243
|
-
colorMode: colorMode,
|
|
244
|
-
featureFlags: featureFlags,
|
|
245
|
-
viewMode: viewMode,
|
|
246
|
-
typographyTheme: typography
|
|
247
|
-
});
|
|
248
|
-
}, [theme, colorMode, featureFlags, viewMode, typography]);
|
|
439
|
+
colorMode = _useThemeObserver.colorMode;
|
|
249
440
|
var isFullPage = appearance === 'full-page' || appearance === 'full-width';
|
|
250
441
|
var isComment = appearance === 'comment';
|
|
251
442
|
return (0, _react2.jsx)("div", {
|
|
252
443
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
253
444
|
className: className,
|
|
254
445
|
ref: ref,
|
|
255
|
-
css: [
|
|
446
|
+
css: [contentStyles(), layoutBaseStyles(), aiPanelBaseStyles, colorMode === 'dark' && aiPanelDarkStyles, viewMode === 'view' && layoutViewStyles, isComment && commentEditorStyles, isFullPage && fullPageEditorStyles, (0, _platformFeatureFlags.fg)('platform_editor_ssr_fix_lists') && listLayoutShiftFix],
|
|
256
447
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
257
|
-
"data-testid": "editor-content-container"
|
|
448
|
+
"data-testid": "editor-content-container",
|
|
449
|
+
style: {
|
|
450
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
451
|
+
'--ak-editor-base-font-size': "".concat((0, _editorSharedStyles.editorFontSize)({
|
|
452
|
+
theme: theme
|
|
453
|
+
}), "px")
|
|
454
|
+
}
|
|
258
455
|
}, children);
|
|
259
456
|
});
|
|
260
457
|
var _default = exports.default = EditorContentContainer;
|
|
@@ -110,33 +110,23 @@ function _extensionProviderToQuickInsertProvider() {
|
|
|
110
110
|
isDisabledOffline: true,
|
|
111
111
|
action: function action(insert, state, source) {
|
|
112
112
|
if (typeof item.node === 'function') {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
});
|
|
125
|
-
} else {
|
|
126
|
-
// Originally it was understood we could only use this if we were using the extension plugin
|
|
127
|
-
// However there are some edge cases where this is not true (ie. in jira)
|
|
128
|
-
// Since making it optional now would be a breaking change - instead we can just pass a dummy
|
|
129
|
-
// extension API to consumers that warns them of using the methods.
|
|
130
|
-
(0, _extensions.resolveImport)(item.node(dummyExtensionAPI)).then(function (node) {
|
|
131
|
-
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
132
|
-
if (node) {
|
|
133
|
-
editorActions.replaceSelection(node);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
113
|
+
var _apiRef$current;
|
|
114
|
+
var extensionAPI = apiRef === null || apiRef === void 0 || (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 || (_apiRef$current = _apiRef$current.extension) === null || _apiRef$current === void 0 || (_apiRef$current = _apiRef$current.actions) === null || _apiRef$current === void 0 ? void 0 : _apiRef$current.api();
|
|
115
|
+
// While this should only run when the extension some setups of editor
|
|
116
|
+
// may not have the extension API
|
|
117
|
+
if (extensionAPI) {
|
|
118
|
+
(0, _extensions.resolveImport)(item.node(extensionAPI)).then(function (node) {
|
|
119
|
+
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
120
|
+
if (node) {
|
|
121
|
+
editorActions.replaceSelection(node);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
137
124
|
} else {
|
|
138
|
-
//
|
|
139
|
-
|
|
125
|
+
// Originally it was understood we could only use this if we were using the extension plugin
|
|
126
|
+
// However there are some edge cases where this is not true (ie. in jira)
|
|
127
|
+
// Since making it optional now would be a breaking change - instead we can just pass a dummy
|
|
128
|
+
// extension API to consumers that warns them of using the methods.
|
|
129
|
+
(0, _extensions.resolveImport)(item.node(dummyExtensionAPI)).then(function (node) {
|
|
140
130
|
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
141
131
|
if (node) {
|
|
142
132
|
editorActions.replaceSelection(node);
|
|
@@ -41,8 +41,14 @@ scrollbarStyles, {
|
|
|
41
41
|
});
|
|
42
42
|
export const ContentArea = createEditorContentStyle();
|
|
43
43
|
ContentArea.displayName = 'ContentArea';
|
|
44
|
-
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true
|
|
44
|
+
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
|
|
45
|
+
exposure: true
|
|
46
|
+
}), EditorContentContainer, ContentArea);
|
|
45
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Render the editor in a chromeless appearance.
|
|
50
|
+
* Example use is the inline comment editor, which doesn't have editor toolbar
|
|
51
|
+
*/
|
|
46
52
|
// Ignored via go/ees005
|
|
47
53
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
48
54
|
export default class Editor extends React.Component {
|
|
@@ -116,6 +122,10 @@ export default class Editor extends React.Component {
|
|
|
116
122
|
}), editorDOMElement, customContentComponents && 'after' in customContentComponents ? customContentComponents.after : null)));
|
|
117
123
|
});
|
|
118
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
*/
|
|
119
129
|
render() {
|
|
120
130
|
return jsx(RenderWithPluginState, {
|
|
121
131
|
editorAPI: this.props.editorAPI,
|
|
@@ -76,7 +76,9 @@ const secondaryToolbarStyles = css({
|
|
|
76
76
|
padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-025, 2px)"}`
|
|
77
77
|
});
|
|
78
78
|
const appearance = 'comment';
|
|
79
|
-
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true
|
|
79
|
+
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
|
|
80
|
+
exposure: true
|
|
81
|
+
}), EditorContentContainer, ContentArea);
|
|
80
82
|
export const CommentEditorWithIntl = props => {
|
|
81
83
|
const {
|
|
82
84
|
editorAPI
|
|
@@ -40,7 +40,9 @@ scrollbarStyles);
|
|
|
40
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
41
41
|
const ScrollContainer = createEditorContentStyle(scrollStyles);
|
|
42
42
|
ScrollContainer.displayName = 'ScrollContainer';
|
|
43
|
-
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true
|
|
43
|
+
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
|
|
44
|
+
exposure: true
|
|
45
|
+
}), EditorContentContainer, ScrollContainer);
|
|
44
46
|
const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
45
47
|
var _contentAreaRef$curre;
|
|
46
48
|
const theme = useTheme();
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO ED-26957 - remove legacy styles when static emotion refactor is complete
|
|
3
|
+
* We are moving this to new location under FF: platform_editor_core_static_emotion
|
|
4
|
+
* New location: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
|
|
5
|
+
* If you are making updates to this file, please updates in new location as well.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
9
|
import { css, keyframes } from '@emotion/react';
|
|
3
10
|
const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
@@ -361,7 +361,7 @@ const legacyContentStyles = props => css`
|
|
|
361
361
|
pointer-events: none;
|
|
362
362
|
opacity: 0.7;
|
|
363
363
|
}
|
|
364
|
-
|
|
364
|
+
`}
|
|
365
365
|
|
|
366
366
|
.ProseMirror-hideselection *::selection {
|
|
367
367
|
background: transparent;
|
|
@@ -382,14 +382,14 @@ const legacyContentStyles = props => css`
|
|
|
382
382
|
.ProseMirror-hideselection {
|
|
383
383
|
caret-color: transparent;
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
` : null}
|
|
386
386
|
|
|
387
387
|
/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */
|
|
388
388
|
${editorExperiment('platform_editor_advanced_code_blocks', true) ? css`
|
|
389
389
|
.ProseMirror-hideselection {
|
|
390
390
|
caret-color: transparent;
|
|
391
391
|
}
|
|
392
|
-
|
|
392
|
+
` : null}
|
|
393
393
|
|
|
394
394
|
.ProseMirror-selectednode {
|
|
395
395
|
outline: none;
|
|
@@ -536,8 +536,15 @@ const legacyContentStyles = props => css`
|
|
|
536
536
|
max-width: 18px;
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
|
|
539
|
+
` : null}
|
|
540
540
|
`;
|
|
541
|
+
const listLayoutShiftFix = css({
|
|
542
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
543
|
+
'.ProseMirror ul, .ProseMirror ol': {
|
|
544
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
545
|
+
marginTop: '10px'
|
|
546
|
+
}
|
|
547
|
+
});
|
|
541
548
|
export const createEditorContentStyle = styles => {
|
|
542
549
|
return /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
543
550
|
const {
|
|
@@ -571,7 +578,7 @@ export const createEditorContentStyle = styles => {
|
|
|
571
578
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
572
579
|
className: className,
|
|
573
580
|
ref: ref,
|
|
574
|
-
css: [memoizedStyle, styles],
|
|
581
|
+
css: [memoizedStyle, styles, fg('platform_editor_ssr_fix_lists') && listLayoutShiftFix],
|
|
575
582
|
"data-testid": "editor-content-container"
|
|
576
583
|
}, children);
|
|
577
584
|
});
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO ED-26957 - remove legacy styles when static emotion refactor is complete
|
|
3
|
+
* We are moving this to new location under FF: platform_editor_core_static_emotion
|
|
4
|
+
* New location: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
|
|
5
|
+
* If you are making updates to this file, please updates in new location as well.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
9
|
import { css } from '@emotion/react';
|
|
3
10
|
import { columnLayoutResponsiveSharedStyle, columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '@atlaskit/editor-common/styles';
|