@atlaskit/editor-core 207.1.2 → 207.2.1
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/afm-jira/tsconfig.json +3 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +28 -234
- package/dist/cjs/ui/EditorContentContainer/styles/ai-panel.js +97 -0
- package/dist/cjs/ui/EditorContentContainer/styles/backgroundColorStyles.js +32 -0
- package/dist/cjs/ui/EditorContentContainer/styles/layout.js +126 -0
- package/dist/cjs/ui/EditorContentContainer/styles/link.js +32 -0
- package/dist/cjs/ui/EditorContentContainer/styles/rule.js +29 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +21 -773
- package/dist/es2019/ui/EditorContentContainer/styles/ai-panel.js +213 -0
- package/dist/es2019/ui/EditorContentContainer/styles/backgroundColorStyles.js +26 -0
- package/dist/es2019/ui/EditorContentContainer/styles/layout.js +517 -0
- package/dist/es2019/ui/EditorContentContainer/styles/link.js +26 -0
- package/dist/es2019/ui/EditorContentContainer/styles/rule.js +22 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +30 -237
- package/dist/esm/ui/EditorContentContainer/styles/ai-panel.js +91 -0
- package/dist/esm/ui/EditorContentContainer/styles/backgroundColorStyles.js +26 -0
- package/dist/esm/ui/EditorContentContainer/styles/layout.js +120 -0
- package/dist/esm/ui/EditorContentContainer/styles/link.js +26 -0
- package/dist/esm/ui/EditorContentContainer/styles/rule.js +21 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/EditorContentContainer/EditorContentContainer.d.ts +0 -11
- package/dist/types/ui/EditorContentContainer/styles/ai-panel.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/backgroundColorStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/layout.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/link.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/rule.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/EditorContentContainer.d.ts +0 -11
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/ai-panel.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/backgroundColorStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/layout.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/link.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/rule.d.ts +1 -0
- package/package.json +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 207.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#159359](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159359)
|
|
8
|
+
[`c3b98323f50a2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c3b98323f50a2) -
|
|
9
|
+
refactor link and rule styles
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 207.2.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#159179](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159179)
|
|
17
|
+
[`ab55bb0d0d3c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ab55bb0d0d3c1) -
|
|
18
|
+
[https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor background color
|
|
19
|
+
CSS in static emotion
|
|
20
|
+
|
|
3
21
|
## 207.1.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -4,8 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.placeholderStyles = exports.
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
|
+
exports.placeholderStyles = exports.fixBlockControlStylesSSR = exports.default = void 0;
|
|
9
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
9
|
var _react = _interopRequireDefault(require("react"));
|
|
11
10
|
var _react2 = require("@emotion/react");
|
|
@@ -20,9 +19,7 @@ var _styles2 = require("@atlaskit/editor-plugins/block-type/styles");
|
|
|
20
19
|
var _styles3 = require("@atlaskit/editor-plugins/find-replace/styles");
|
|
21
20
|
var _styles4 = require("@atlaskit/editor-plugins/paste-options-toolbar/styles");
|
|
22
21
|
var _styles5 = require("@atlaskit/editor-plugins/placeholder-text/styles");
|
|
23
|
-
var _types = require("@atlaskit/editor-plugins/table/types");
|
|
24
22
|
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
25
|
-
var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
|
|
26
23
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
27
24
|
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
28
25
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -37,7 +34,12 @@ var _media = require("../ContentStyles/media");
|
|
|
37
34
|
var _panel2 = require("../ContentStyles/panel");
|
|
38
35
|
var _status = require("../ContentStyles/status");
|
|
39
36
|
var _tasksAndDecisions = require("../ContentStyles/tasks-and-decisions");
|
|
40
|
-
var
|
|
37
|
+
var _aiPanel = require("./styles/ai-panel");
|
|
38
|
+
var _backgroundColorStyles = require("./styles/backgroundColorStyles");
|
|
39
|
+
var _layout = require("./styles/layout");
|
|
40
|
+
var _link = require("./styles/link");
|
|
41
|
+
var _rule = require("./styles/rule");
|
|
42
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
41
43
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
42
44
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
43
45
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Requires manual remediation over time due to use of unsafe nested mixins */
|
|
@@ -46,13 +48,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
46
48
|
* @jsx jsx
|
|
47
49
|
*/
|
|
48
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
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
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
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
|
-
var ruleStyles = function ruleStyles() {
|
|
54
|
-
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", ";\n\n\t\thr {\n\t\t\tcursor: pointer;\n\t\t\tpadding: ", " 0;\n\t\t\tmargin: ", " 0;\n\t\t\tbackground-clip: content-box;\n\n\t\t\t&.", " {\n\t\t\t\toutline: none;\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _styles.ruleSharedStyles)(), "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
|
|
55
|
-
};
|
|
56
51
|
var vanillaMentionsStyles = (0, _react2.css)({
|
|
57
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
58
53
|
'.editor-mention-primitive': {
|
|
@@ -97,11 +92,11 @@ var vanillaMentionsStyles = (0, _react2.css)({
|
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
94
|
});
|
|
100
|
-
var vanillaSelectionStyles = (0, _react2.css)(
|
|
101
|
-
var mentionsStyles = (0, _react2.css)(
|
|
102
|
-
var listsStyles = (0, _react2.css)(
|
|
103
|
-
var reactEmojiStyles = (0, _react2.css)(
|
|
104
|
-
var emojiStyles = (0, _react2.css)(
|
|
95
|
+
var vanillaSelectionStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.danger {\n\t\t.editor-mention-primitive {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t.", " > .editor-mention-primitive,\n\t.", " > .editor-mention-primitive.mention-self,\n\t.", " > .editor-mention-primitive.mention-restricted {\n\t\t", "\n\t\t/* need to specify dark text colour because personal mentions\n\t\t (in dark blue) have white text by default */\n\t\tcolor: ", "\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)");
|
|
96
|
+
var mentionsStyles = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\t&.", " [data-mention-id] > span {\n\t\t\t", "\n\n\t\t\t/* need to specify dark text colour because personal mentions\n\t\t (in dark blue) have white text by default */\n\t color: ", ";\n\t\t}\n\t}\n\n\t.danger {\n\t\t.", ".", "\n\t\t\t> span\n\t\t\t> span\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t\t.", " > span > span > span {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)", _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)");
|
|
97
|
+
var listsStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\tli {\n\t\t\tposition: relative;\n\n\t\t\t> p:not(:first-child) {\n\t\t\t\tmargin: ", " 0 0 0;\n\t\t\t}\n\n\t\t\t// In SSR the above rule will apply to all p tags because first-child would be a style tag.\n\t\t\t// The following rule resets the first p tag back to its original margin\n\t\t\t// defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n\t\t\t> style:first-child + p {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:not([data-node-type='decisionList']) > li,\n\t// This prevents https://product-fabric.atlassian.net/browse/ED-20924\n\t&:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-space-050, 4px)", _editorSharedStyles.blockNodesVerticalMargin, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _browser.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
98
|
+
var reactEmojiStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tdisplay: inline-block;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\n\t\t\t&.", " > span {\n\t\t\t\t/** needed for selection style to cover custom emoji image properly */\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", ", .", " {\n\t\t\t\tborder-radius: 2px;\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_NODE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
|
|
99
|
+
var emojiStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-prosemirror-node-view-type='vanilla'] {\n\t\t.", " {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t.", ", .", " {\n\t\t\tbackground: no-repeat transparent;\n\t\t\tdisplay: inline-block;\n\t\t\theight: ", "px;\n\t\t\tmax-height: ", "px;\n\t\t\tcursor: pointer;\n\t\t\tvertical-align: middle;\n\t\t\tuser-select: all;\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", ", .", " {\n\t\t\t\tborder-radius: 2px;\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _emoji.defaultEmojiHeight, _emoji.defaultEmojiHeight, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
|
|
105
100
|
|
|
106
101
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
107
102
|
var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
|
|
@@ -136,228 +131,27 @@ var placeholderWrapStyles = (0, _react2.css)({
|
|
|
136
131
|
whiteSpace: 'nowrap'
|
|
137
132
|
}
|
|
138
133
|
});
|
|
139
|
-
var firstBlockNodeStyles = (0, _react2.css)(
|
|
140
|
-
var firstBlockNodeStylesNew = (0, _react2.css)(
|
|
134
|
+
var firstBlockNodeStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (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);
|
|
135
|
+
var firstBlockNodeStylesNew = (0, _react2.css)(_templateObject7 || (_templateObject7 = (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
136
|
var fixBlockControlStylesSSR = exports.fixBlockControlStylesSSR = function fixBlockControlStylesSSR() {
|
|
142
137
|
if ((0, _platformFeatureFlags.fg)('platform_editor_element_dnd_nested_fix_patch_6')) {
|
|
143
138
|
return firstBlockNodeStylesNew;
|
|
144
139
|
}
|
|
145
140
|
return firstBlockNodeStyles;
|
|
146
141
|
};
|
|
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\n\t\t\t\t0;\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);
|
|
348
142
|
|
|
349
143
|
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
350
144
|
var akEditorBreakpointForSmallDevice = "1266px";
|
|
351
145
|
|
|
352
146
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
353
147
|
var contentStyles = function contentStyles() {
|
|
354
|
-
return (0, _react2.css)(
|
|
148
|
+
return (0, _react2.css)(_templateObject8 || (_templateObject8 = (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\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\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\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\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 ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\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)(_templateObject9 || (_templateObject9 = (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)(_templateObject10 || (_templateObject10 = (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)(_templateObject11 || (_templateObject11 = (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, _backgroundColorStyles.backgroundColorStyles, listsStyles, _rule.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, {
|
|
355
149
|
exposure: false
|
|
356
150
|
}) && vanillaMentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
357
151
|
exposure: false
|
|
358
152
|
}) && vanillaSelectionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
359
153
|
exposure: false
|
|
360
|
-
}) ? emojiStyles : reactEmojiStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles,
|
|
154
|
+
}) ? emojiStyles : reactEmojiStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
361
155
|
exposure: false
|
|
362
156
|
}) && _tasksAndDecisions.vanillaTaskItemStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
363
157
|
exposure: false
|
|
@@ -365,7 +159,7 @@ var contentStyles = function contentStyles() {
|
|
|
365
159
|
exposure: false
|
|
366
160
|
}) && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
367
161
|
exposure: false
|
|
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, (0, _styles.pragmaticResizerStyles)(), fixBlockControlStylesSSR(), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(
|
|
162
|
+
}) && !(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, (0, _styles.pragmaticResizerStyles)(), fixBlockControlStylesSSR(), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject12 || (_templateObject12 = (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);
|
|
369
163
|
};
|
|
370
164
|
var CommentEditorMargin = 14;
|
|
371
165
|
|
|
@@ -415,18 +209,8 @@ var listLayoutShiftFix = (0, _react2.css)({
|
|
|
415
209
|
* EditorContentStyles is a wrapper component that applies styles to its children
|
|
416
210
|
* based on the provided feature flags, view mode, and other props.
|
|
417
211
|
* It uses Emotion for styling and supports scrollable content.
|
|
418
|
-
* The component is memoized to optimize performance.
|
|
419
212
|
*
|
|
420
213
|
* This will be used in near future to replace the current editor content styles from index.tsx
|
|
421
|
-
*
|
|
422
|
-
* @param {EditorContentContainerProps} props - The props for the component.
|
|
423
|
-
* @param {string} props.className - Additional class name for the component.
|
|
424
|
-
* @param {React.ReactNode} props.children - The content to be rendered inside the component.
|
|
425
|
-
* @param {FeatureFlags} props.featureFlags - Feature flags to control the styles.
|
|
426
|
-
* @param {'view' | 'edit'} props.viewMode - The view mode of the editor.
|
|
427
|
-
* @param {boolean} props.isScrollable - Whether the content is scrollable.
|
|
428
|
-
* @param {'full-page' | 'full-width' | 'comment' | 'chromeless'} props.appearance - The appearance of the editor.
|
|
429
|
-
* @returns {JSX.Element} The styled content component.
|
|
430
214
|
*/
|
|
431
215
|
var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
432
216
|
var className = props.className,
|
|
@@ -443,7 +227,17 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
443
227
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
444
228
|
className: className,
|
|
445
229
|
ref: ref,
|
|
446
|
-
css: [contentStyles(),
|
|
230
|
+
css: [contentStyles(),
|
|
231
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
232
|
+
(0, _layout.layoutBaseStyles)(),
|
|
233
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
234
|
+
(0, _platformFeatureFlags.fg)('platform_editor_hyperlink_underline') ? _link.linkStyles : _link.linkStylesOld,
|
|
235
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
236
|
+
_aiPanel.aiPanelBaseStyles,
|
|
237
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
238
|
+
colorMode === 'dark' && _aiPanel.aiPanelDarkStyles,
|
|
239
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
240
|
+
viewMode === 'view' && _layout.layoutViewStyles, isComment && commentEditorStyles, isFullPage && fullPageEditorStyles, (0, _platformFeatureFlags.fg)('platform_editor_ssr_fix_lists') && listLayoutShiftFix],
|
|
447
241
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
448
242
|
"data-testid": "editor-content-container",
|
|
449
243
|
style: {
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.aiPanelDarkStyles = exports.aiPanelBaseStyles = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
|
+
var _templateObject, _templateObject2;
|
|
12
|
+
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; }
|
|
13
|
+
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; } // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
14
|
+
/**
|
|
15
|
+
* aiPanelStyles
|
|
16
|
+
* was imported from packages/editor/editor-core/src/ui/ContentStyles/ai-panels.ts
|
|
17
|
+
*/
|
|
18
|
+
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
19
|
+
var rotationAnimation = (0, _react.keyframes)({
|
|
20
|
+
'0%': _objectSpread({
|
|
21
|
+
'--panel-gradient-angle': '0deg'
|
|
22
|
+
}, isFirefox ? {
|
|
23
|
+
backgroundPosition: '100%'
|
|
24
|
+
} : {}),
|
|
25
|
+
'100%': _objectSpread({
|
|
26
|
+
'--panel-gradient-angle': '360deg'
|
|
27
|
+
}, isFirefox ? {
|
|
28
|
+
backgroundPosition: '-100%'
|
|
29
|
+
} : {})
|
|
30
|
+
});
|
|
31
|
+
var aiPrismColor = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, 'prism.border.step.1', {
|
|
32
|
+
light: '#0065FF',
|
|
33
|
+
dark: '#0065FF80'
|
|
34
|
+
}), 'prism.border.step.2', {
|
|
35
|
+
light: '#0469FF',
|
|
36
|
+
dark: '#0469FF80'
|
|
37
|
+
}), 'prism.border.step.3', {
|
|
38
|
+
light: '#BF63F3',
|
|
39
|
+
dark: '#BF63F380'
|
|
40
|
+
}), 'prism.border.step.4', {
|
|
41
|
+
light: '#FFA900',
|
|
42
|
+
dark: '#FFA90080'
|
|
43
|
+
});
|
|
44
|
+
var prismBorderAnimationStyles = (0, _react.css)({
|
|
45
|
+
'&::before, &::after': _objectSpread(_objectSpread({
|
|
46
|
+
animationName: rotationAnimation,
|
|
47
|
+
animationDuration: '2s',
|
|
48
|
+
animationTimingFunction: 'linear',
|
|
49
|
+
animationIterationCount: 'infinite'
|
|
50
|
+
}, isFirefox ? {
|
|
51
|
+
animationDirection: 'normal',
|
|
52
|
+
animationDuration: '1s'
|
|
53
|
+
} : {}), {}, {
|
|
54
|
+
'@media (prefers-reduced-motion)': {
|
|
55
|
+
animation: 'none'
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
var prismBorderBaseStyles = (0, _react.css)(_objectSpread({
|
|
60
|
+
content: "''",
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
62
|
+
position: 'absolute',
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
64
|
+
zIndex: -1,
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
|
+
width: "calc(100% + 2px)",
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
68
|
+
height: "calc(100% + 2px)",
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
70
|
+
top: "-1px",
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
72
|
+
left: "-1px",
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
74
|
+
borderRadius: "calc(".concat("var(--ds-border-radius-100, 3px)", " + 1px)"),
|
|
75
|
+
transform: 'translate3d(0, 0, 0)'
|
|
76
|
+
}, isFirefox ? {
|
|
77
|
+
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)"),
|
|
78
|
+
backgroundSize: '200%'
|
|
79
|
+
} : {
|
|
80
|
+
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)")
|
|
81
|
+
}));
|
|
82
|
+
var prismBorderDarkStyles = (0, _react.css)(_objectSpread({}, isFirefox ? {
|
|
83
|
+
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)"),
|
|
84
|
+
backgroundSize: '200%'
|
|
85
|
+
} : {
|
|
86
|
+
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)")
|
|
87
|
+
}));
|
|
88
|
+
var prismBorderHoverStyles = (0, _react.css)({
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
90
|
+
background: "var(--ds-border-input, #8590A2)"
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
94
|
+
var aiPanelBaseStyles = exports.aiPanelBaseStyles = (0, _react.css)(_templateObject || (_templateObject = (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)");
|
|
95
|
+
|
|
96
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
97
|
+
var aiPanelDarkStyles = exports.aiPanelDarkStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (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);
|